osmgl 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -5
- package/dist/osmgl.cjs +58 -58
- package/dist/osmgl.cjs.map +1 -1
- package/dist/osmgl.d.cts +27 -1
- package/dist/osmgl.d.ts +27 -1
- package/dist/osmgl.global.js +64 -63
- package/dist/osmgl.js +58 -58
- package/dist/osmgl.js.map +1 -1
- package/package.json +3 -3
package/dist/osmgl.global.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
var OsmGL=(function(exports){'use strict';var Jl=Object.defineProperty;var go=(n,e)=>()=>(n&&(e=n(n=0)),e);var Xl=(n,e)=>{for(var t in e)Jl(n,t,{get:e[t],enumerable:true});};var Nf,el=go(()=>{Nf=(function(){var n="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FHRAOCUFHOXBKKAVC+QDF8kJJJJBK/uLEVUCUAICDTGVAICffffI0eGOCBYD1+KJJBhJJJJBBHRALALYD9gGWCDTFARbDBALAWCEFbD9gABARbDBAOCBYD1+KJJBhJJJJBBHRALALYD9gGOCDTFARbDBALAOCEFbD9gABARbDLCUADCDTADCffffI0eCBYD1+KJJBhJJJJBBHRALALYD9gGOCDTFARbDBALAOCEFbD9gABARbDWABYDBCBAVZ+TJJJB8aADCI9uHWDNADtMBABYDBHOAEHLADHRINAOALYDBCDTFGVAVYDBCEFbDBALCLFHLARCUFGRMBKKDNAItMBABYDBHLABYDLHRCBHVAIHOINARAVbDBARCLFHRALYDBAVFHVALCLFHLAOCUFGOMBKKDNADCI6MBAWCEAWCE0eHdABYDLHRABYDWHVCBHLINAECWFYDBHOAECLFYDBHDARAEYDBCDTFGWAWYDBGWCEFbDBAVAWCDTFALbDBARADCDTFGDADYDBGDCEFbDBAVADCDTFALbDBARAOCDTFGOAOYDBGOCEFbDBAVAOCDTFALbDBAECXFHEAdALCEFGL9HMBKKDNAItMBABYDLHEABYDBHLINAEAEYDBALYDB9rbDBALCLFHLAECLFHEAICUFGIMBKKKqBABAEADAIC+01JJBZ+MJJJBKqBABAEADAIC+c+JJJBZ+MJJJBK9dEEUABCfEAICDTZ+TJJJBHLCBHIDNADtMBINDNALAEYDBCDTFGBYDBCU9HMBABAIbDBAICEFHIKAECLFHEADCUFGDMBKKAIK9TEIUCBCBYD+M+KJJBGEABCIFC98gFGBbD+M+KJJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABK9TEIUCBCBYD+M+KJJBGEABCIFC98gFGBbD+M+KJJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK9+EIUzBHEDNDNCBYD+M+KJJBGDAECZTGI9NMBCUHEADAI9rCffIFCZ4NBCUsMEKADHEKCBABAE9rCIFC98gCBYD+M+KJJBFGDbD+M+KJJBDNADzBCZTGE9NMBADAE9rCffIFCZ4NB8aKKXBABAEZ+YJJJBK+BEEIUDNAB+8GDCl4GICfEgGLCfEsMBDNALMBDNABjBBBB9cMBAECBbDBABSKABjBBJ9fnAEZ+XJJJBHBAEAEYDBCNFbDBABSKAEAICfEgC+CUFbDBADCfff+D94gCJJJ/4Iv++HBKABK+gEBDNDNAECJE9IMBABjBBBUnHBDNAECfE9PMBAEC+BUFHEXDKABjBBBUnHBAECPDAECPD6eC+C9+FHEXEKAEC+BU9KMBABjBBJXnHBDNAEC+b9+9NMBAEC/mBFHEXEKABjBBJXnHBAEC+299AEC+2990eC/MEFHEKABAEClTCJJJ/8IF++nKK+eDDBCJWK+EDB4+H9W9n94+p+Gw+J9o+YE9pBBBBBBEBBBDBBBEBBBDBBBBBBBDBBBBBBBEBBBBBBB+L29Hz/69+9Kz/n/76z/RG97z/Z/O9Xz8j/b85z/+/U9Yz/B/K9hz+2/z9dz9E+L9Mz59a8kz+R/t3z+a+Zyz79ohz/J4++8++y+d9v8+BBBB9S+49+z8r+Hbz9m9m/m8+l/Z/O8+/8+pg89Q/X+j878r+Hq8++m+b/E87BBBBBBJzBBJzBBJz+e/v/n8++y+dSz9I/h/68+XD/r8+/H0838+/w+nOzBBBB+wv9o8+UF888+9I/h/68+9C9g/l89/N/M9M89/d8kO8+BBBBF+8Tz9M836zs+2azl/Zpzz818ez9E+LXz/u98f8+819e/68+BC+EQKXEBBBDBBBAwBB",e=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return {supported:false};var t,o=WebAssembly.instantiate(r(n),{}).then(function(f){t=f.instance,t.exports.__wasm_call_ctors(),t.exports.meshopt_encodeVertexVersion(0),t.exports.meshopt_encodeIndexVersion(1);});function r(f){for(var d=new Uint8Array(f.length),h=0;h<f.length;++h){var p=f.charCodeAt(h);d[h]=p>96?p-71:p>64?p-65:p>47?p+4:p>46?63:62;}for(var b=0,h=0;h<f.length;++h)d[b++]=d[h]<60?e[d[h]]:(d[h]-60)*64+d[++h];return d.buffer.slice(0,b)}function i(f){if(!f)throw new Error("Assertion failed")}function a(f){return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}function l(f,d,h){var p=t.exports.sbrk,b=p(f.length*4),A=p(d*4),y=new Uint8Array(t.exports.memory.buffer),g=a(f);y.set(g,b),h&&h(b,b,f.length,d);var B=t.exports.meshopt_optimizeVertexFetchRemap(A,b,f.length,d);y=new Uint8Array(t.exports.memory.buffer);var C=new Uint32Array(d);new Uint8Array(C.buffer).set(y.subarray(A,A+d*4)),g.set(y.subarray(b,b+f.length*4)),p(b-p(0));for(var v=0;v<f.length;++v)f[v]=C[f[v]];return [C,B]}function s(f,d,h,p,b){var A=t.exports.sbrk,y=A(d),g=A(p*b),B=new Uint8Array(t.exports.memory.buffer);B.set(a(h),g);var C=f(y,d,g,p,b),v=new Uint8Array(C);return v.set(B.subarray(y,y+C)),A(y-A(0)),v}function c(f){for(var d=0,h=0;h<f.length;++h){var p=f[h];d=d<p?p:d;}return d}function u(f,d){if(i(d==2||d==4),d==4)return new Uint32Array(f.buffer,f.byteOffset,f.byteLength/4);var h=new Uint16Array(f.buffer,f.byteOffset,f.byteLength/2);return new Uint32Array(h)}function m(f,d,h,p,b,A){var y=t.exports.sbrk,g=y(h*p),B=y(h*A),C=new Uint8Array(t.exports.memory.buffer);C.set(a(d),B),f(g,h,p,b,B);var v=new Uint8Array(h*p);return v.set(C.subarray(g,g+h*p)),y(g-y(0)),v}return {ready:o,supported:true,reorderMesh:function(f,d,h){var p=d?h?t.exports.meshopt_optimizeVertexCacheStrip:t.exports.meshopt_optimizeVertexCache:void 0;return l(f,c(f)+1,p)},encodeVertexBuffer:function(f,d,h){i(h>0&&h<=256),i(h%4==0);var p=t.exports.meshopt_encodeVertexBufferBound(d,h);return s(t.exports.meshopt_encodeVertexBuffer,p,f,d,h)},encodeIndexBuffer:function(f,d,h){i(h==2||h==4),i(d%3==0);var p=u(f,h),b=t.exports.meshopt_encodeIndexBufferBound(d,c(p)+1);return s(t.exports.meshopt_encodeIndexBuffer,b,p,d,4)},encodeIndexSequence:function(f,d,h){i(h==2||h==4);var p=u(f,h),b=t.exports.meshopt_encodeIndexSequenceBound(d,c(p)+1);return s(t.exports.meshopt_encodeIndexSequence,b,p,d,4)},encodeGltfBuffer:function(f,d,h,p){var b={ATTRIBUTES:this.encodeVertexBuffer,TRIANGLES:this.encodeIndexBuffer,INDICES:this.encodeIndexSequence};return i(b[p]),b[p](f,d,h)},encodeFilterOct:function(f,d,h,p){return i(h==4||h==8),i(p>=1&&p<=16),m(t.exports.meshopt_encodeFilterOct,f,d,h,p,16)},encodeFilterQuat:function(f,d,h,p){return i(h==8),i(p>=4&&p<=16),m(t.exports.meshopt_encodeFilterQuat,f,d,h,p,16)},encodeFilterExp:function(f,d,h,p){return i(h>0&&h%4==0),i(p>=1&&p<=24),m(t.exports.meshopt_encodeFilterExp,f,d,h,p,h)}}})();});var Kf,tl=go(()=>{Kf=(function(){var n="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",e="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",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),o=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return {supported:false};var r=n;WebAssembly.validate(t)&&(r=e);var i,a=WebAssembly.instantiate(l(r),{}).then(function(m){i=m.instance,i.exports.__wasm_call_ctors();});function l(m){for(var f=new Uint8Array(m.length),d=0;d<m.length;++d){var h=m.charCodeAt(d);f[d]=h>96?h-71:h>64?h-65:h>47?h+4:h>46?63:62;}for(var p=0,d=0;d<m.length;++d)f[p++]=f[d]<60?o[f[d]]:(f[d]-60)*64+f[++d];return f.buffer.slice(0,p)}function s(m,f,d,h,p,b){var A=i.exports.sbrk,y=d+3&-4,g=A(y*h),B=A(p.length),C=new Uint8Array(i.exports.memory.buffer);C.set(p,B);var v=m(g,d,h,B,p.length);if(v==0&&b&&b(g,y,h),f.set(C.subarray(g,g+d*h)),A(g-A(0)),v!=0)throw new Error("Malformed buffer data: "+v)}var c={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},u={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return {ready:a,supported:true,decodeVertexBuffer:function(m,f,d,h,p){s(i.exports.meshopt_decodeVertexBuffer,m,f,d,h,i.exports[c[p]]);},decodeIndexBuffer:function(m,f,d,h){s(i.exports.meshopt_decodeIndexBuffer,m,f,d,h);},decodeIndexSequence:function(m,f,d,h){s(i.exports.meshopt_decodeIndexSequence,m,f,d,h);},decodeGltfBuffer:function(m,f,d,h,p,b){s(i.exports[u[p]],m,f,d,h,i.exports[c[b]]);}}})();});var Uf,ol=go(()=>{Uf=(function(){var n="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iDZGK+TjBBBB+XGQALiDLALiDcGX+TGMAMAQ9deGQALiDWALiDkGM+TGpApAQ9deHpDNABtMBADtMBjBBBBjBBJzAp+VApjBBBB9beHQINABAQABiDBAK+TnuDBABCLFGIAQAIiDBAX+TnuDBABCWFGIAQAIiDBAM+TnuDBABCXFHBADCUFGDMBKKApK+qDIDUI99DUCBHI8jJJJJBCA9rGLCZFCWFCBYD11JJBbDBALCB8pDJ1JJB83IZALCWFCBYDn1JJBbDBALCB8pD+M1JJB83IBDNDNAEMBjBBJfHVjBBJfHOjBBJfHRXEKADCD4CDTHWINCBHDINALCZFADFGdABADFiDBGOAdiDBGRARAO9eeuDBALADFGdAOAdiDBGRARAO9deuDBADCLFGDCX9HMBKABAWFHBAICEFGIAE9HMBKALiDWALiDk+THRALiDLALiDc+THOALiDBALiDZ+THVKAVjBBBB+XGVAOAOAV9deGOARARAO9deK9dEEUABCfEAICDTZ1JJJBHLCBHIDNADtMBINDNALAEYDBCDTFGBYDBCU9HMBABAIbDBAICEFHIKAECLFHEADCUFGDMBKKAIK9TEIUCBCBYD/01JJBGEABCIFC98gFGBbD/01JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABK9TEIUCBCBYD/01JJBGEABCIFC98gFGBbD/01JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK9+EIUzBHEDNDNCBYD/01JJBGDAECZTGI9NMBCUHEADAI9rCffIFCZ4NBCUsMEKADHEKCBABAE9rCIFC98gCBYD/01JJBFGDbD/01JJBDNADzBCZTGE9NMBADAE9rCffIFCZ4NB8aKK6EIUCBHIDNADtMBDNINABrBBGLAErBBGV9HMEAECEFHEABCEFHBADCUFGDMBXDKKALAV9rHIKAIKK+CEDBCJWK9pffUUffUUffUUffUfffUfffUfBBBBBBBBEEEBEEBEBBEEEBEBBBBBEBEBBBBBEBBBDBBBBBBBBBBBBBBBEEEEEBEBBBBBEBBBBBEEBBBBBBC/sWKXEBBBDBBBJ9kBB",e=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return {supported:false};var t,o=WebAssembly.instantiate(r(n),{}).then(function(f){t=f.instance,t.exports.__wasm_call_ctors();});function r(f){for(var d=new Uint8Array(f.length),h=0;h<f.length;++h){var p=f.charCodeAt(h);d[h]=p>96?p-71:p>64?p-65:p>47?p+4:p>46?63:62;}for(var b=0,h=0;h<f.length;++h)d[b++]=d[h]<60?e[d[h]]:(d[h]-60)*64+d[++h];return d.buffer.slice(0,b)}function i(f){if(!f)throw new Error("Assertion failed")}function a(f){return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}function l(f,d){var h=t.exports.sbrk,p=h(f.length*4),b=h(d*4),A=new Uint8Array(t.exports.memory.buffer),y=a(f);A.set(y,p);var g=t.exports.meshopt_optimizeVertexFetchRemap(b,p,f.length,d);A=new Uint8Array(t.exports.memory.buffer);var B=new Uint32Array(d);new Uint8Array(B.buffer).set(A.subarray(b,b+d*4)),y.set(A.subarray(p,p+f.length*4)),h(p-h(0));for(var C=0;C<f.length;++C)f[C]=B[f[C]];return [B,g]}function s(f){for(var d=0,h=0;h<f.length;++h){var p=f[h];d=d<p?p:d;}return d}function c(f,d,h,p,b,A,y,g,B){var C=t.exports.sbrk,v=C(4),_=C(h*4),w=C(b*A),x=C(h*4),D=new Uint8Array(t.exports.memory.buffer);D.set(a(p),w),D.set(a(d),x);var I=f(_,x,h,w,b,A,y,g,B,v);D=new Uint8Array(t.exports.memory.buffer);var E=new Uint32Array(I);a(E).set(D.subarray(_,_+I*4));var L=new Float32Array(1);return a(L).set(D.subarray(v,v+4)),C(v-C(0)),[E,L[0]]}function u(f,d,h,p){var b=t.exports.sbrk,A=b(h*p),y=new Uint8Array(t.exports.memory.buffer);y.set(a(d),A);var g=f(A,h,p);return b(A-b(0)),g}var m={LockBorder:1};return {ready:o,supported:true,compactMesh:function(f){i(f instanceof Uint32Array||f instanceof Int32Array||f instanceof Uint16Array||f instanceof Int16Array),i(f.length%3==0);var d=f.BYTES_PER_ELEMENT==4?f:new Uint32Array(f);return l(d,s(f)+1)},simplify:function(f,d,h,p,b,A){i(f instanceof Uint32Array||f instanceof Int32Array||f instanceof Uint16Array||f instanceof Int16Array),i(f.length%3==0),i(d instanceof Float32Array),i(d.length%h==0),i(h>=3),i(p%3==0);for(var y=0,g=0;g<(A?A.length:0);++g)y|=m[A[g]];var B=f.BYTES_PER_ELEMENT==4?f:new Uint32Array(f),C=c(t.exports.meshopt_simplify,B,f.length,d,d.length,h*4,p,b,y);return C[0]=f instanceof Uint32Array?C[0]:new f.constructor(C[0]),C},getScale:function(f,d){return i(f instanceof Float32Array),i(f.length%d==0),u(t.exports.meshopt_simplifyScale,f,f.length,d*4)}}})();});var rl={};Xl(rl,{MeshoptDecoder:()=>Kf,MeshoptEncoder:()=>Nf,MeshoptSimplifier:()=>Uf});var nl=go(()=>{el();tl();ol();});var P=Map,q=Set;var Ne=class{constructor(){this.listeners=new P;}on(e,t){let o=this.listeners.get(e);return o||this.listeners.set(e,o=new q),o.add(t),this}once(e,t){let o=r=>{this.off(e,o),t(r);};return this.on(e,o)}off(e,t){return this.listeners.get(e)?.delete(t),this}emit(e,t){let o=this.listeners.get(e);if(!o)return this;for(let r of [...o])try{r(t);}catch(i){console.error(`[osmgl] \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A "${e}" \u0431\u0440\u043E\u0441\u0438\u043B \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435:`,i);}return this}removeAllListeners(){this.listeners.clear();}};var ve=(n,e,t)=>n<e?e:n>t?t:n;var Qe=n=>n*Math.PI/180,Xn=n=>n*180/Math.PI;function lt(n){let e=((n+180)%360+360)%360-180;return e===-180?180:e}var Bo=n=>1-Math.pow(1-n,3);function ce(n){let e=n.trim();if(e[0]==="#"){let o=e.slice(1);if(o.length===3||o.length===4){let r=o.split("").map(i=>parseInt(i+i,16)/255);return [r[0],r[1],r[2],r.length===4?r[3]:1]}if(o.length===6||o.length===8){let r=[];for(let i=0;i<o.length;i+=2)r.push(parseInt(o.slice(i,i+2),16)/255);return [r[0],r[1],r[2],r.length===4?r[3]:1]}}let t=e.match(/^rgba?\(([^)]+)\)$/i);if(t){let o=t[1].split(",").map(r=>parseFloat(r));if(o.length>=3)return [o[0]/255,o[1]/255,o[2]/255,o.length>3?o[3]:1]}return [1,0,1,1]}function xe(n){return [n[0]*n[3],n[1]*n[3],n[2]*n[3],n[3]]}var Co=class{constructor(e){this._program=null;this._vao=null;this._framebuffer=null;this._depthTest=false;this._depthMask=true;this._colorMask=true;this._depthFunc="lequal";this._blend="none";this._cull="none";this._viewport=[0,0,0,0];this._activeTexture=-1;this._boundTextures=new P;this._stencilTest=false;this.gl=e,this.caps=jl(e),e.enable(e.DEPTH_TEST),this._depthTest=true,e.depthFunc(e.LEQUAL),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,false);}useProgram(e){return this._program===e?false:(this.gl.useProgram(e),this._program=e,true)}bindVAO(e){this._vao!==e&&(this.gl.bindVertexArray(e),this._vao=e);}bindFramebuffer(e){this._framebuffer!==e&&(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,e),this._framebuffer=e);}bindTexture(e,t,o=this.gl.TEXTURE_2D){this._activeTexture!==e&&(this.gl.activeTexture(this.gl.TEXTURE0+e),this._activeTexture=e),this._boundTextures.get(e)!==t&&(this.gl.bindTexture(o,t),this._boundTextures.set(e,t));}viewport(e,t,o,r){let i=this._viewport;i[0]===e&&i[1]===t&&i[2]===o&&i[3]===r||(this.gl.viewport(e,t,o,r),this._viewport=[e,t,o,r]);}setDepthTest(e){this._depthTest!==e&&(e?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._depthTest=e);}setDepthMask(e){this._depthMask!==e&&(this.gl.depthMask(e),this._depthMask=e);}setColorMask(e){this._colorMask!==e&&(this.gl.colorMask(e,e,e,e),this._colorMask=e);}setDepthFunc(e){if(this._depthFunc===e)return;let t=this.gl;this.gl.depthFunc(e==="less"?t.LESS:e==="always"?t.ALWAYS:e==="greater"?t.GREATER:t.LEQUAL),this._depthFunc=e;}setBlend(e){if(this._blend===e)return;let t=this.gl;e==="none"?t.disable(t.BLEND):(this._blend==="none"&&t.enable(t.BLEND),e==="alpha"?t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA):e==="premultiplied"?t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA):e==="multiply"?t.blendFunc(t.DST_COLOR,t.ZERO):t.blendFunc(t.ONE,t.ONE)),this._blend=e;}setCull(e){if(this._cull===e)return;let t=this.gl;e==="none"?t.disable(t.CULL_FACE):(this._cull==="none"&&t.enable(t.CULL_FACE),t.cullFace(e==="back"?t.BACK:t.FRONT)),this._cull=e;}setStencilTest(e){this._stencilTest!==e&&(e?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._stencilTest=e);}clear(e,t=true,o=false){let r=this.gl,i=0;e&&(r.clearColor(e[0],e[1],e[2],e[3]),i|=r.COLOR_BUFFER_BIT),t&&(this.setDepthMask(true),r.clearDepth(1),i|=r.DEPTH_BUFFER_BIT),o&&(r.clearStencil(0),i|=r.STENCIL_BUFFER_BIT),i&&r.clear(i);}invalidateState(){this._program=null,this._vao=null,this._framebuffer=null,this._activeTexture=-1,this._boundTextures.clear(),this._viewport=[-1,-1,-1,-1];}};function jl(n){let e=n.getExtension("EXT_texture_filter_anisotropic")??n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),t=n.getExtension("WEBGL_debug_renderer_info");return {maxTextureSize:n.getParameter(n.MAX_TEXTURE_SIZE),maxVertexAttribs:n.getParameter(n.MAX_VERTEX_ATTRIBS),colorBufferFloat:!!n.getExtension("EXT_color_buffer_float"),anisotropic:e,maxAnisotropy:e?n.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,timerQuery:!!n.getExtension("EXT_disjoint_timer_query_webgl2"),rendererName:t?String(n.getParameter(t.UNMASKED_RENDERER_WEBGL)):"unknown"}}var qe=512,vo=40075016686e-3,jn=85.051129;function Z(n){return Array.isArray(n)?{lng:n[0],lat:n[1]}:n}var Ke=n=>512*Math.pow(2,n),wo=n=>Math.max(-jn,Math.min(jn,n));function ee(n){return (180+n)/360}function te(n){let e=wo(n);return (180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function De(n){return n*360-180}function _e(n){let e=180-n*360;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function He(n){return vo*Math.cos(n*Math.PI/180)}function ur(n,e){return n/He(e)}function Fd(n,e){return n*He(e)}function Ed(n,e){return ur(1,n)*Ke(e)}function Md(n,e){return He(n)/Ke(e)}function Yn(n,e){let t=Math.pow(2,n);return He(_e((e+.5)/t))/t}function dr(n){return vo/Math.pow(2,n)}function Zn(n,e,t){let o=dr(n),r=65536;return [(e*o%r+r)%r,(t*o%r+r)%r]}var It=class n{constructor(e,t){this.west=1/0;this.south=1/0;this.east=-1/0;this.north=-1/0;e&&this.extend(e),t&&this.extend(t);}static from(e){let t=new n;for(let o of e)t.extend(o);return t}extend(e){if(e instanceof n)return e.isEmpty()?this:(this.west=Math.min(this.west,e.west),this.south=Math.min(this.south,e.south),this.east=Math.max(this.east,e.east),this.north=Math.max(this.north,e.north),this);let t=Z(e);return this.west=Math.min(this.west,t.lng),this.south=Math.min(this.south,t.lat),this.east=Math.max(this.east,t.lng),this.north=Math.max(this.north,t.lat),this}isEmpty(){return !(this.west<=this.east&&this.south<=this.north)}getCenter(){return {lng:(this.west+this.east)/2,lat:(this.south+this.north)/2}}getSouthWest(){return {lng:this.west,lat:this.south}}getNorthEast(){return {lng:this.east,lat:this.north}}contains(e){let t=Z(e);return t.lng>=this.west&&t.lng<=this.east&&t.lat>=this.south&&t.lat<=this.north}pad(e){if(this.isEmpty())return this;let t=(this.east-this.west)*e,o=(this.north-this.south)*e;return this.west-=t,this.east+=t,this.south-=o,this.north+=o,this}toMercator(){return {minX:ee(this.west),maxX:ee(this.east),minY:te(this.north),maxY:te(this.south)}}};function hr(n,e){if(n.isEmpty())return null;let t={top:e.padding?.top??0,right:e.padding?.right??0,bottom:e.padding?.bottom??0,left:e.padding?.left??0},o=Math.max(e.width-t.left-t.right,Qn),r=Math.max(e.height-t.top-t.bottom,Qn),i=n.toMercator(),a=e.bearing??0,l=-a*Math.PI/180,s=Math.cos(l),c=Math.sin(l),u=(i.minX+i.maxX)/2,m=(i.minY+i.maxY)/2,f=0,d=0;for(let[g,B]of [[i.minX,i.minY],[i.maxX,i.minY],[i.maxX,i.maxY],[i.minX,i.maxY]]){let C=(g-u)*s-(B-m)*c,v=(g-u)*c+(B-m)*s;f=Math.max(f,Math.abs(C)*2),d=Math.max(d,Math.abs(v)*2);}let h=Math.min(o/Math.max(f,1e-12),r/Math.max(d,1e-12)),p=Math.min(Math.max(Math.log2(h/512),e.minZoom??0),e.maxZoom??22),b=Ke(p),A=(t.left-t.right)/2/b,y=(t.top-t.bottom)/2/b;return {center:{lng:De(u-(A*s+y*c)),lat:_e(m-(-A*c+y*s))},zoom:p,bearing:a}}var Qn=32;function z(){let n=new Float64Array(16);return n[0]=n[5]=n[10]=n[15]=1,n}function Re(n){return n.fill(0),n[0]=n[5]=n[10]=n[15]=1,n}function we(n,e,t){let o=e[0],r=e[1],i=e[2],a=e[3],l=e[4],s=e[5],c=e[6],u=e[7],m=e[8],f=e[9],d=e[10],h=e[11],p=e[12],b=e[13],A=e[14],y=e[15];for(let g=0;g<4;g++){let B=t[g*4],C=t[g*4+1],v=t[g*4+2],_=t[g*4+3];n[g*4]=B*o+C*l+v*m+_*p,n[g*4+1]=B*r+C*s+v*f+_*b,n[g*4+2]=B*i+C*c+v*d+_*A,n[g*4+3]=B*a+C*u+v*h+_*y;}return n}function Pe(n,e,t,o,r){return n!==e&&n.set(e),n[12]=e[0]*t+e[4]*o+e[8]*r+e[12],n[13]=e[1]*t+e[5]*o+e[9]*r+e[13],n[14]=e[2]*t+e[6]*o+e[10]*r+e[14],n[15]=e[3]*t+e[7]*o+e[11]*r+e[15],n}function Te(n,e,t,o,r){for(let i=0;i<4;i++)n[i]=e[i]*t,n[4+i]=e[4+i]*o,n[8+i]=e[8+i]*r,n[12+i]=e[12+i];return n}function pr(n,e,t){let o=Math.sin(t),r=Math.cos(t),i=e[4],a=e[5],l=e[6],s=e[7],c=e[8],u=e[9],m=e[10],f=e[11];return n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n[4]=i*r+c*o,n[5]=a*r+u*o,n[6]=l*r+m*o,n[7]=s*r+f*o,n[8]=c*r-i*o,n[9]=u*r-a*o,n[10]=m*r-l*o,n[11]=f*r-s*o,n}function br(n,e,t){let o=Math.sin(t),r=Math.cos(t),i=e[0],a=e[1],l=e[2],s=e[3],c=e[4],u=e[5],m=e[6],f=e[7];return n!==e&&(n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n[0]=i*r+c*o,n[1]=a*r+u*o,n[2]=l*r+m*o,n[3]=s*r+f*o,n[4]=c*r-i*o,n[5]=u*r-a*o,n[6]=m*r-l*o,n[7]=f*r-s*o,n}function $n(n,e,t,o,r){let i=1/Math.tan(e/2);return n.fill(0),n[0]=i/t,n[5]=i,n[11]=-1,n[10]=(r+o)/(o-r),n[14]=2*r*o/(o-r),n}function ei(n,e,t,o,r,i,a){let l=1/(e-t),s=1/(o-r),c=1/(i-a);return n.fill(0),n[0]=-2*l,n[5]=-2*s,n[10]=2*c,n[12]=(e+t)*l,n[13]=(r+o)*s,n[14]=(a+i)*c,n[15]=1,n}function ke(n,e){let t=e[0],o=e[1],r=e[2],i=e[3],a=e[4],l=e[5],s=e[6],c=e[7],u=e[8],m=e[9],f=e[10],d=e[11],h=e[12],p=e[13],b=e[14],A=e[15],y=t*l-o*a,g=t*s-r*a,B=t*c-i*a,C=o*s-r*l,v=o*c-i*l,_=r*c-i*s,w=u*p-m*h,x=u*b-f*h,D=u*A-d*h,I=m*b-f*p,E=m*A-d*p,L=f*A-d*b,M=y*L-g*E+B*I+C*D-v*x+_*w;return M?(M=1/M,n[0]=(l*L-s*E+c*I)*M,n[1]=(r*E-o*L-i*I)*M,n[2]=(p*_-b*v+A*C)*M,n[3]=(f*v-m*_-d*C)*M,n[4]=(s*D-a*L-c*x)*M,n[5]=(t*L-r*D+i*x)*M,n[6]=(b*B-h*_-A*g)*M,n[7]=(u*_-f*B+d*g)*M,n[8]=(a*E-l*D+c*w)*M,n[9]=(o*D-t*E-i*w)*M,n[10]=(h*v-p*B+A*y)*M,n[11]=(m*B-u*v-d*y)*M,n[12]=(l*x-a*I-s*w)*M,n[13]=(t*I-o*x+r*w)*M,n[14]=(p*g-h*C-b*y)*M,n[15]=(u*C-m*g+f*y)*M,n):null}function ae(n,e,t){let[o,r,i,a]=t;return n[0]=e[0]*o+e[4]*r+e[8]*i+e[12]*a,n[1]=e[1]*o+e[5]*r+e[9]*i+e[13]*a,n[2]=e[2]*o+e[6]*r+e[10]*i+e[14]*a,n[3]=e[3]*o+e[7]*r+e[11]*i+e[15]*a,n}function Oe(n,e){for(let t=0;t<16;t++)n[t]=e[t];return n}function xo(n){let e=Math.hypot(n[0],n[1],n[2])||1;return [n[0]/e,n[1]/e,n[2]/e]}function qn(n,e){return [n[1]*e[2]-n[2]*e[1],n[2]*e[0]-n[0]*e[2],n[0]*e[1]-n[1]*e[0]]}function Yl(n,e){return [n[0]-e[0],n[1]-e[1],n[2]-e[2]]}function mr(n,e){return n[0]*e[0]+n[1]*e[1]+n[2]*e[2]}function ti(n,e,t,o){let r=xo(Yl(t,e)),i=xo(qn(r,o)),a=qn(i,r);return n[0]=i[0],n[1]=a[0],n[2]=-r[0],n[3]=0,n[4]=i[1],n[5]=a[1],n[6]=-r[1],n[7]=0,n[8]=i[2],n[9]=a[2],n[10]=-r[2],n[11]=0,n[12]=-mr(i,e),n[13]=-mr(a,e),n[14]=mr(r,e),n[15]=1,n}var St=60,_o=4.5,$e=6,Do=n=>n/(2*Math.PI);function Fo(n){if(n<=_o)return 0;if(n>=$e)return 1;let e=(n-_o)/($e-_o);return e*e*(3-2*e)}function Eo(n,e){let t=n*Math.PI/180,o=wo(e)*Math.PI/180,r=Math.cos(o);return [r*Math.sin(t),-Math.sin(o),r*Math.cos(t)]}function Ar(n){let e=Math.hypot(n[0],n[1],n[2])||1,t=n[0]/e,o=n[1]/e,r=n[2]/e;return {lng:Math.atan2(t,r)*180/Math.PI,lat:Math.asin(-o)*180/Math.PI}}function Zl(n,e){return Eo(De(n),_e(e))}function yr(n,e){let t=n*Math.PI/180,o=wo(e)*Math.PI/180,r=Math.cos(o),i=Math.sin(o);return {east:[Math.cos(t),0,-Math.sin(t)],south:[i*Math.sin(t),r,i*Math.cos(t)],up:[r*Math.sin(t),-i,r*Math.cos(t)]}}function oi(n,e,t){let o=n[0]*e,r=n[1]*e,i=n[2]*e;return [o*t.east[0]+r*t.east[1]+i*t.east[2],o*t.south[0]+r*t.south[1]+i*t.south[2],o*t.up[0]+r*t.up[1]+i*t.up[2]-e]}function Ql(n,e,t,o,r){let i=n-t;return i>.5&&(i-=1),i<-0.5&&(i+=1),[i*r,(e-o)*r,0]}function ri(n,e,t,o,r,i,a,l){let s=oi(Zl(n,e),r,a);if(l<=0)return s;let c=Ql(n,e,t,o,i);return [s[0]+(c[0]-s[0])*l,s[1]+(c[1]-s[1])*l,s[2]+(c[2]-s[2])*l]}function gr(n,e,t){let o=n[0]*e[0]+n[1]*e[1]+n[2]*e[2],r=n[0]**2+n[1]**2+n[2]**2-t*t,i=o*o-r;if(i<0)return null;let a=-o-Math.sqrt(i);return a<0?null:[n[0]+e[0]*a,n[1]+e[1]*a,n[2]+e[2]*a]}var ni=1e3,ql=2,ii=84,$l=.42,Lt=class n{constructor(){this.width=0;this.height=0;this.minZoom=0;this.maxZoom=22;this.minPitch=0;this.maxPitch=75;this._center={lng:0,lat:0};this._zoom=0;this._bearing=0;this._pitch=0;this._fov=Qe(36.87);this._worldSize=512;this._pixelsPerMeter=1;this._cameraToCenterDistance=0;this._centerX=0;this._centerY=0;this._projMatrix=z();this._viewProjPx=z();this._viewMatrix=z();this._pixelMatrix=z();this._pixelMatrixInverse=z();this._cameraPosPx=[0,0,0];this._frustumPlanes=[];this._dirty=true;this.projection="mercator";this._f32=new Float32Array(16);this._tileMatrix=z();this._localView=z();this._localProj=z();this._localPixel=z();this._localPixelInverse=z();this._localF32=new Float32Array(16);this._globeBasis={east:[1,0,0],south:[0,1,0],up:[0,0,1]};this._objectF32=new Float32Array(16);this._objectMatrix=z();this._shadowView=z();this._shadowProj=z();this._shadowVP=z();this._shadowVPm=z();this._shadowTile=z();this._shadowObject=z();this._shadowTile32=new Float32Array(16);this._shadowObject32=new Float32Array(16);this._shadowValid=false;this._calc();}get center(){return {...this._center}}set center(e){this._center={lng:e.lng,lat:e.lat},this._dirty=true;}globeMinZoom(){let e=Math.max(Math.min(this.width,this.height),1),t=$l*e*2*Math.PI/512;return Math.log2(Math.max(t,1e-6))}effectiveMinZoom(){return this.projection==="globe"?Math.max(this.minZoom,this.globeMinZoom()):this.minZoom}get zoom(){return this._zoom}set zoom(e){let t=ve(e,this.effectiveMinZoom(),this.maxZoom);t!==this._zoom&&(this._zoom=t,this._dirty=true);}get bearing(){return this._bearing}set bearing(e){let t=lt(e);t!==this._bearing&&(this._bearing=t,this._dirty=true);}get pitch(){return this._pitch}set pitch(e){let t=this.projection==="globe"&&this._zoom<$e?Math.min(this.maxPitch,St):this.maxPitch,o=ve(e,this.minPitch,t);o!==this._pitch&&(this._pitch=o,this._dirty=true);}get fov(){return Xn(this._fov)}set fov(e){let t=Qe(ve(e,1,89));t!==this._fov&&(this._fov=t,this._dirty=true);}resize(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this._dirty=true);}get worldSize(){return this._ensure(),this._worldSize}get pixelsPerMeter(){return this._ensure(),this._pixelsPerMeter}get cameraToCenterDistance(){return this._ensure(),this._cameraToCenterDistance}get cameraPositionPx(){return this._ensure(),this._cameraPosPx}get projMatrix(){return this._ensure(),this._projMatrix}get viewMatrix(){return this._ensure(),this._viewMatrix}get centerPointPx(){return this._ensure(),{x:this._centerX,y:this._centerY}}clone(){let e=new n;return e.width=this.width,e.height=this.height,e.minZoom=this.minZoom,e.maxZoom=this.maxZoom,e.minPitch=this.minPitch,e.maxPitch=this.maxPitch,e._center={...this._center},e._zoom=this._zoom,e._bearing=this._bearing,e._pitch=this._pitch,e._fov=this._fov,e._dirty=true,e}project(e,t=0){this._ensure();let o=[ee(e.lng)*this._worldSize,te(e.lat)*this._worldSize,t,1],r=[0,0,0,0];ae(r,this._pixelMatrix,o);let i=r[3]||1e-9;return {x:r[0]/i,y:r[1]/i}}worldPxToPoint(e,t,o=0){if(this._ensure(),this.globeActive){let i=this.globeLocal(e/this._worldSize,t/this._worldSize),a={lng:De(e/this._worldSize),lat:_e(t/this._worldSize)};return this.isOnGlobeFront(a.lng,a.lat,0)?(i[2]+=o*this._pixelsPerMeter,this.localToPoint(i)):null}let r=[0,0,0,0];return ae(r,this._pixelMatrix,[e,t,o,1]),r[3]<=1e-6?null:{x:r[0]/r[3],y:r[1]/r[3]}}unproject(e){if(this.globeActive){let o=this.globeUnproject(e);if(o)return o}let t=this.pointToWorldPx(e);return {lng:De(t.x/this._worldSize),lat:_e(t.y/this._worldSize)}}pointToWorldPx(e){this._ensure();let t=[0,0,0,0],o=[0,0,0,0];ae(t,this._pixelMatrixInverse,[e.x,e.y,0,1]),ae(o,this._pixelMatrixInverse,[e.x,e.y,1,1]);let r=t[3]||1e-9,i=o[3]||1e-9,a={x:t[0]/r,y:t[1]/r,z:t[2]/r},l={x:o[0]/i,y:o[1]/i,z:o[2]/i},s=l.z-a.z,c=Math.abs(s)<1e-9?1:(0-a.z)/s,u=ve(c,-1e6,1e6);return {x:a.x+(l.x-a.x)*u,y:a.y+(l.y-a.y)*u}}setLocationAtPoint(e,t){if(this._ensure(),this.globeActive){let l=this.globeUnproject(t);if(!l)return;let s=lt(this._center.lng+(e.lng-l.lng)),c=ve(this._center.lat+(e.lat-l.lat),-ii,ii);this._center={lng:s,lat:c},this._dirty=true;return}let o=this.pointToWorldPx(t),r={x:ee(e.lng)*this._worldSize,y:te(e.lat)*this._worldSize},i=r.x-o.x,a=r.y-o.y;this._center={lng:De((this._centerX+i)/this._worldSize),lat:_e((this._centerY+a)/this._worldSize)},this._dirty=true;}tileMatrix(e,t){this._ensure();let o=e.bounds(),r=(o.maxX-o.minX)*this._worldSize/t,i=this._tileMatrix;return Pe(i,this._projMatrix,o.minX*this._worldSize,o.minY*this._worldSize,0),Te(i,i,r,r,1),Oe(this._f32,i)}tileMatrix64(e,t,o=z()){this._ensure();let r=e.bounds(),i=(r.maxX-r.minX)*this._worldSize/t;return Pe(o,this._projMatrix,r.minX*this._worldSize,r.minY*this._worldSize,0),Te(o,o,i,i,1),o}objectMatrix(e,t,o=0){this._ensure();let r=this._objectMatrix;return Pe(r,this._projMatrix,e*this._worldSize,t*this._worldSize,o),Te(r,r,this._worldSize,this._worldSize,1),Oe(this._objectF32,r)}horizonScreenY(){this._ensure();let e=Math.PI/2-Qe(this._pitch),o=this.height/2/Math.tan(this._fov/2)*Math.tan(Math.min(e,Qe(89.5)));return this.height/2-Math.min(o,this.height*50)}get globeActive(){return this._ensure(),this.projection==="globe"&&this._zoom<$e}get globeFlatMix(){return this._ensure(),Fo(this._zoom)}get globeRadiusPx(){return this._ensure(),Do(this._worldSize)}get globeBasis(){return this._ensure(),this._globeBasis}get localProjMatrix(){return this._ensure(),this._localProj}globeCamera(){this._ensure();let e=this.globeRadiusPx,t=z();if(!ke(t,this._localView))return {dir:[0,0,1],horizonCos:1};let o=t[12],r=t[13],i=t[14]+e,a=Math.hypot(o,r,i)||1;return {dir:[o/a,r/a,i/a],horizonCos:e/Math.max(a,e+1e-6)}}localRayCorners(){this._ensure();let e=this.width,t=this.height;return [[0,0],[e,0],[0,t],[e,t]].map(([r,i])=>{let a=[0,0,0,0],l=[0,0,0,0];ae(a,this._localPixelInverse,[r,i,0,1]),ae(l,this._localPixelInverse,[r,i,1,1]);let s=a[3]||1e-9,c=l[3]||1e-9,u=l[0]/c-a[0]/s,m=l[1]/c-a[1]/s,f=l[2]/c-a[2]/s,d=Math.hypot(u,m,f)||1;return [u/d,m/d,f/d]})}globeDisc(){this._ensure();let e=this.globeCamera();return {dir:[-e.dir[0],-e.dir[1],-e.dir[2]],angle:Math.asin(Math.min(e.horizonCos,1))}}localMatrix(){return this._ensure(),Oe(this._localF32,this._localProj)}globeLocal(e,t){return this._ensure(),ri(e,t,this._centerX/this._worldSize,this._centerY/this._worldSize,this.globeRadiusPx,this._worldSize,this._globeBasis,Fo(this._zoom))}localToPoint(e){this._ensure();let t=[0,0,0,0];return ae(t,this._localPixel,[e[0],e[1],e[2],1]),t[3]<=1e-6?null:{x:t[0]/t[3],y:t[1]/t[3]}}globeUnproject(e){this._ensure();let t=[0,0,0,0],o=[0,0,0,0];ae(t,this._localPixelInverse,[e.x,e.y,0,1]),ae(o,this._localPixelInverse,[e.x,e.y,1,1]);let r=t[3]||1e-9,i=o[3]||1e-9,a=this.globeRadiusPx,l=[t[0]/r,t[1]/r,t[2]/r+a],s=[o[0]/i-l[0],o[1]/i-l[1],o[2]/i+a-l[2]],c=Math.hypot(s[0],s[1],s[2])||1,u=[s[0]/c,s[1]/c,s[2]/c],m=gr(l,u,a);if(!m)return null;let f=this._globeBasis,d=[m[0]/a,m[1]/a,m[2]/a],h=[d[0]*f.east[0]+d[1]*f.south[0]+d[2]*f.up[0],d[0]*f.east[1]+d[1]*f.south[1]+d[2]*f.up[1],d[0]*f.east[2]+d[1]*f.south[2]+d[2]*f.up[2]];return Ar(h)}isOnGlobeFront(e,t,o=.06){this._ensure();let r=this.globeCamera(),i=this._globeBasis,a=Eo(e,t),l=[a[0]*i.east[0]+a[1]*i.east[1]+a[2]*i.east[2],a[0]*i.south[0]+a[1]*i.south[1]+a[2]*i.south[2],a[0]*i.up[0]+a[1]*i.up[1]+a[2]*i.up[2]];return l[0]*r.dir[0]+l[1]*r.dir[1]+l[2]*r.dir[2]>=r.horizonCos-o}updateShadow(e,t){this._ensure();let o=Math.max(this.width,this.height)*ql,r=z();if(!ke(r,this._viewProjPx))return;let i=this._cameraPosPx,a=[],l=[0,0,0,0];for(let C of [-1,1])for(let v of [-1,1])for(let _ of [-1,1]){if(ae(l,r,[C,v,_,1]),l[3]===0)continue;let w=l[0]/l[3],x=l[1]/l[3],D=w-i[0],I=x-i[1],E=Math.hypot(D,I);if(E>o){let L=o/E;w=i[0]+D*L,x=i[1]+I*L;}a.push({x:w,y:x,z:0});}if(!a.length)return;let s=xo(e),c=Math.abs(s[2])>.999?[0,1,0]:[0,0,1],u=this._shadowView;ti(u,[this._centerX,this._centerY,0],[this._centerX+s[0],this._centerY+s[1],s[2]],c);let m=Math.min(t*this._pixelsPerMeter,o),f=1/0,d=1/0,h=1/0,p=-1/0,b=-1/0,A=-1/0,y=[0,0,0,0];for(let C of a)for(let v of [0,m])ae(y,u,[C.x,C.y,v,1]),y[0]<f&&(f=y[0]),y[0]>p&&(p=y[0]),y[1]<d&&(d=y[1]),y[1]>b&&(b=y[1]),y[2]<h&&(h=y[2]),y[2]>A&&(A=y[2]);let g=m+1,B=this._shadowProj;ei(B,f,p,d,b,-A-g,-h+g),we(this._shadowVP,B,u),Te(this._shadowVPm,this._shadowVP,1,1,this._pixelsPerMeter),this._shadowValid=true;}get shadowReady(){return this._shadowValid}shadowObjectMatrix(e,t,o=0){this._ensure();let r=this._shadowObject;return Pe(r,this._shadowVPm,e*this._worldSize,t*this._worldSize,o),Te(r,r,this._worldSize,this._worldSize,1),Oe(this._shadowObject32,r)}shadowTileMatrix(e,t){this._ensure();let o=e.bounds(),r=(o.maxX-o.minX)*this._worldSize/t,i=this._shadowTile;return Pe(i,this._shadowVPm,o.minX*this._worldSize,o.minY*this._worldSize,0),Te(i,i,r,r,1),Oe(this._shadowTile32,i)}shadowDepthPerMeter(){return this._ensure(),Math.abs(this._shadowVPm[10])}shadowTexelWorldSize(e){return 2/(this._shadowVP[0]*e||1)}isTileVisible(e){this._ensure();let t=e.bounds(),o=t.minX*this._worldSize,r=t.maxX*this._worldSize,i=t.minY*this._worldSize,a=t.maxY*this._worldSize,l=ni*this._pixelsPerMeter;for(let s of this._frustumPlanes){let c=s[0]>0?r:o,u=s[1]>0?a:i,m=s[2]>0?l:0;if(s[0]*c+s[1]*u+s[2]*m+s[3]<0)return false}return true}isSphereVisible(e,t,o,r){this._ensure();let i=e*this._worldSize,a=t*this._worldSize,l=o*this._pixelsPerMeter,s=r*this._pixelsPerMeter;for(let c of this._frustumPlanes)if(c[0]*i+c[1]*a+c[2]*l+c[3]<-s)return false;return true}distanceToTile(e){this._ensure();let t=e.bounds(),[o,r,i]=this._cameraPosPx,a=Math.max(t.minX*this._worldSize-o,0,o-t.maxX*this._worldSize),l=Math.max(t.minY*this._worldSize-r,0,r-t.maxY*this._worldSize),s=Math.max(0-i,0,i-ni*this._pixelsPerMeter);return Math.hypot(a,l,s)}get flatFarDistance(){return this._ensure(),Math.hypot(this._cameraToCenterDistance,this.width/2,this.height/2)}detailZoom(e){return this._ensure(),this._zoom-Math.max(0,Math.log2(Math.max(e,1)/this.flatFarDistance))}_ensure(){this._dirty&&this._calc();}_calc(){this._dirty=false;let e=Ke(this._zoom);this._worldSize=e,this._pixelsPerMeter=ur(1,this._center.lat)*e,this._centerX=ee(this._center.lng)*e,this._centerY=te(this._center.lat)*e;let t=Math.max(this.width,1),o=Math.max(this.height,1),r=Qe(this._pitch),i=-Qe(this._bearing),a=.5/Math.tan(this._fov/2)*o;this._cameraToCenterDistance=a;let l=Math.PI/2+r,s=this._fov/2,c=Math.sin(s)*a/Math.sin(ve(Math.PI-l-s,.01,Math.PI-.01)),u=Math.cos(Math.PI/2-r)*c+a,m=Math.min(u*1.01,a*30),f=o/50;if(this.projection==="globe"&&this._zoom<$e){let y=Do(e);f=Math.max(a-y*1.6,a*.02),m=a+y*2.4;}let d=this._viewMatrix;Te(d,z(),1,-1,1),Pe(d,d,0,0,-a),pr(d,d,r),br(d,d,i),Pe(d,d,-this._centerX,-this._centerY,0);let h=z();$n(h,this._fov,t/o,f,m),we(this._viewProjPx,h,d);let p=z();Te(p,d,1,1,this._pixelsPerMeter),we(this._projMatrix,h,p);let b=this._localView;Te(b,z(),1,-1,1),Pe(b,b,0,0,-a),pr(b,b,r),br(b,b,i),we(this._localProj,h,b),this._globeBasis=yr(this._center.lng,this._center.lat);let A=z();Te(A,z(),t/2,-o/2,1),Pe(A,A,1,-1,0),we(this._pixelMatrix,A,this._projMatrix),ke(this._pixelMatrixInverse,this._pixelMatrix)||console.warn("[osmgl] \u043C\u0430\u0442\u0440\u0438\u0446\u0430 \u043A\u0430\u043C\u0435\u0440\u044B \u0432\u044B\u0440\u043E\u0436\u0434\u0435\u043D\u0430, unproject \u0434\u0430\u0441\u0442 \u043C\u0443\u0441\u043E\u0440"),we(this._localPixel,A,this._localProj),ke(this._localPixelInverse,this._localPixel),this._calcCameraPosition(),this._calcFrustum();}_calcCameraPosition(){let e=z();if(!ke(e,this._viewMatrix)){this._cameraPosPx=[this._centerX,this._centerY,this._cameraToCenterDistance];return}this._cameraPosPx=[e[12],e[13],e[14]];}_calcFrustum(){let e=z();if(!ke(e,this._viewProjPx)){this._frustumPlanes=[];return}let t=[];for(let l of [-1,1])for(let s of [-1,1])for(let c of [-1,1]){let u=[0,0,0,0];ae(u,e,[c,s,l,1]);let m=u[3]||1e-9;t.push([u[0]/m,u[1]/m,u[2]/m]);}let o=[[0,1,2],[6,5,4],[0,2,4],[5,3,1],[0,4,1],[3,6,2]];this._frustumPlanes=o.map(([l,s,c])=>{let u=t[l],m=t[s],f=t[c],d=m[0]-u[0],h=m[1]-u[1],p=m[2]-u[2],b=f[0]-u[0],A=f[1]-u[1],y=f[2]-u[2],g=h*y-p*A,B=p*b-d*y,C=d*A-h*b,v=Math.hypot(g,B,C)||1;g/=v,B/=v,C/=v;let _=new Float64Array(4);return _[0]=g,_[1]=B,_[2]=C,_[3]=-(g*u[0]+B*u[1]+C*u[2]),_});let r=0,i=0,a=0;for(let l of t)r+=l[0]/8,i+=l[1]/8,a+=l[2]/8;for(let l of this._frustumPlanes)l[0]*r+l[1]*i+l[2]*a+l[3]<0&&(l[0]=-l[0],l[1]=-l[1],l[2]=-l[2],l[3]=-l[3]);}tileScreenSize(e,t){return this._ensure(),this._worldSize/Math.pow(2,e)*this._cameraToCenterDistance/Math.max(t,1e-6)}visibleWrapRange(){this._ensure();let e=[this.pointToWorldPx({x:0,y:this.height}),this.pointToWorldPx({x:this.width,y:this.height}),this.pointToWorldPx({x:0,y:0}),this.pointToWorldPx({x:this.width,y:0})],t=1/0,o=-1/0;for(let r of e){let i=Math.floor(r.x/this._worldSize);i<t&&(t=i),i>o&&(o=i);}return !isFinite(t)||!isFinite(o)?{min:0,max:0}:{min:ve(t,-3,3),max:ve(o,-3,3)}}};var es={dragPan:true,scrollZoom:true,dragRotate:true,touchZoomRotate:true,touchPitch:true,doubleClickZoom:true,keyboard:true,inertia:1},ai=2,ts=100,os=.5,rs=.1,ns=25,li=n=>Math.abs(n.y)>Math.abs(n.x);function ci(n,e,t){let o=Math.hypot(n.x,n.y)>=ai,r=Math.hypot(e.x,e.y)>=ai;return !o&&!r?void 0:!o||!r?t<ts?void 0:false:n.y>0==e.y>0&&li(n)&&li(e)}function si(n,e){let t=(n-e)*(180/Math.PI);for(;t>180;)t-=360;for(;t<=-180;)t+=360;return t}var is=160,Br=4,Mo=class{constructor(e,t,o,r,i={}){this.canvas=e;this.tr=t;this.onChange=o;this.onInteractionEnd=r;this.pointers=new P;this.dragMode="none";this.lastPoint={x:0,y:0};this.panAnchor=null;this.samples=[];this.inertiaRaf=0;this.touch=null;this.lastTapTime=0;this.disposed=false;this.onContextMenu=e=>{this.opts.dragRotate&&e.preventDefault();};this.onPointerDown=e=>{this.stopInertia(),this.canvas.setPointerCapture(e.pointerId),this.pointers.set(e.pointerId,this.point(e));let t=this.point(e);if(this.pointers.size===2){this.beginTouchGesture();return}if(this.pointers.size>2)return;(e.button===2||e.ctrlKey||e.metaKey)&&this.opts.dragRotate?this.dragMode="rotate":this.opts.dragPan&&(this.dragMode="pan",this.panAnchor=this.tr.unproject(t)),this.lastPoint=t,this.samples=[{t:performance.now(),x:t.x,y:t.y}],this.opts.keyboard&&this.canvas.focus({preventScroll:true});};this.onPointerMove=e=>{if(!this.pointers.has(e.pointerId))return;let t=this.point(e);if(this.pointers.set(e.pointerId,t),this.pointers.size>=2){this.updateTouchGesture();return}let o=t.x-this.lastPoint.x,r=t.y-this.lastPoint.y;this.lastPoint=t,this.pushSample(t),this.dragMode==="pan"&&this.panAnchor?(this.tr.setLocationAtPoint(this.panAnchor,t),this.onChange("pan")):this.dragMode==="rotate"&&(this.tr.bearing=this.tr.bearing-o*.4,this.tr.pitch=this.tr.pitch-r*.4,this.onChange("rotate"));};this.onPointerUp=e=>{if(this.pointers.has(e.pointerId)){if(this.pointers.delete(e.pointerId),this.canvas.hasPointerCapture(e.pointerId)&&this.canvas.releasePointerCapture(e.pointerId),this.pointers.size===1){let t=[...this.pointers.values()][0];this.touch=null,this.lastPoint=t,this.samples=[{t:performance.now(),x:t.x,y:t.y}],this.dragMode=this.opts.dragPan?"pan":"none",this.panAnchor=this.opts.dragPan?this.tr.unproject(t):null;return}if(this.pointers.size>0){this.pointers.size>=2&&this.beginTouchGesture();return}if(this.touch=null,this.dragMode==="pan"&&this.opts.inertia>0&&this.startInertia(),this.dragMode="none",this.panAnchor=null,this.opts.doubleClickZoom&&e.pointerType!=="touch"){let t=performance.now();t-this.lastTapTime<300?(this.zoomAround(this.point(e),e.shiftKey?-1:1),this.lastTapTime=0):this.lastTapTime=t;}this.onInteractionEnd();}};this.onWheel=e=>{if(!this.opts.scrollZoom)return;e.preventDefault(),this.stopInertia();let t=e.deltaY;e.deltaMode===1?t*=40:e.deltaMode===2&&(t*=800);let o=ve(-t/200,-2,2);this.zoomAround(this.point(e),o),this.onInteractionEnd();};this.onKeyDown=e=>{if(!this.opts.keyboard)return;let t=e.shiftKey?200:80,o={x:this.tr.width/2,y:this.tr.height/2},r=true;switch(e.key){case "ArrowLeft":e.shiftKey?this.rotateBy(-15,0):this.panBy(-t,0,o);break;case "ArrowRight":e.shiftKey?this.rotateBy(15,0):this.panBy(t,0,o);break;case "ArrowUp":e.shiftKey?this.rotateBy(0,10):this.panBy(0,-t,o);break;case "ArrowDown":e.shiftKey?this.rotateBy(0,-10):this.panBy(0,t,o);break;case "=":case "+":this.zoomAround(o,1);break;case "-":case "_":this.zoomAround(o,-1);break;default:r=false;}r&&(e.preventDefault(),this.onInteractionEnd());};this.opts={...es,...i},this.bind();}setOptions(e){this.opts={...this.opts,...e};}bind(){let e=this.canvas;e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerup",this.onPointerUp),e.addEventListener("pointercancel",this.onPointerUp),e.addEventListener("wheel",this.onWheel,{passive:false}),e.addEventListener("contextmenu",this.onContextMenu),e.addEventListener("keydown",this.onKeyDown),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0"),e.style.touchAction="none";}point(e){let t=this.canvas.getBoundingClientRect();return {x:e.clientX-t.left,y:e.clientY-t.top}}beginTouchGesture(){let[e,t]=[...this.pointers.values()],o=t.x-e.x,r=t.y-e.y,i=Math.hypot(o,r);this.touch={mode:void 0,lastA:e,lastB:t,startA:e,startB:t,startDist:i,startAngle:Math.atan2(r,o),minDist:i,zoomActive:false,rotateActive:false,firstMoveAt:0,pitchPossible:Math.abs(o)>=Math.abs(r)},this.dragMode="none",this.panAnchor=null;}updateTouchGesture(){let e=this.touch;if(!e)return;let[t,o]=[...this.pointers.values()],r={x:t.x-e.lastA.x,y:t.y-e.lastA.y},i={x:o.x-e.lastB.x,y:o.y-e.lastB.y};if(e.mode===void 0){!e.firstMoveAt&&(Math.hypot(r.x,r.y)>0||Math.hypot(i.x,i.y)>0)&&(e.firstMoveAt=performance.now());let a=e.pitchPossible&&this.opts.touchPitch?ci(r,i,e.firstMoveAt?performance.now()-e.firstMoveAt:0):false;if(a===void 0)return;e.mode=a?"pitch":"zoomRotate";}if(e.mode==="pitch"){let a=(r.y+i.y)/2;a!==0&&(this.tr.pitch=this.tr.pitch-a*os,this.onChange("pitch"));}else this.opts.touchZoomRotate&&this.applyZoomRotate(e,t,o);e.lastA=t,e.lastB=o;}applyZoomRotate(e,t,o){let r=Math.hypot(o.x-t.x,o.y-t.y),i=Math.atan2(o.y-t.y,o.x-t.x),a={x:(e.lastA.x+e.lastB.x)/2,y:(e.lastA.y+e.lastB.y)/2},l={x:(t.x+o.x)/2,y:(t.y+o.y)/2},s=this.tr.unproject(a),c="pan",u=Math.hypot(e.lastB.x-e.lastA.x,e.lastB.y-e.lastA.y);if(r>0&&u>0&&e.startDist>0&&(!e.zoomActive&&Math.abs(Math.log2(r/e.startDist))>=rs&&(e.zoomActive=true),e.zoomActive)){let m=Math.log2(r/u);m!==0&&(this.tr.zoom=this.tr.zoom+m,c="zoom");}if(this.opts.dragRotate){e.minDist=Math.min(e.minDist,r);let m=ns/Math.max(Math.PI*e.minDist,1)*360;if(!e.rotateActive&&Math.abs(si(i,e.startAngle))>=m&&(e.rotateActive=true),e.rotateActive){let f=Math.atan2(e.lastB.y-e.lastA.y,e.lastB.x-e.lastA.x),d=si(i,f);d!==0&&(this.tr.bearing=this.tr.bearing-d,c==="pan"&&(c="rotate"));}}this.tr.setLocationAtPoint(s,l),this.onChange(c);}zoomAround(e,t){let o=this.tr.unproject(e);this.tr.zoom=this.tr.zoom+t,this.tr.setLocationAtPoint(o,e),this.onChange("zoom");}panBy(e,t,o){let r=this.tr.unproject(o);this.tr.setLocationAtPoint(r,{x:o.x-e,y:o.y-t}),this.onChange("pan");}rotateBy(e,t){e&&(this.tr.bearing=this.tr.bearing+e),t&&(this.tr.pitch=this.tr.pitch+t),this.onChange("rotate");}pushSample(e){let t=performance.now();for(this.samples.push({t,x:e.x,y:e.y});this.samples.length>2&&t-this.samples[0].t>is;)this.samples.shift();}startInertia(){if(this.samples.length<2)return;let e=this.samples[0],t=this.samples[this.samples.length-1],o=t.t-e.t;if(o<8||performance.now()-t.t>60)return;let r=(t.x-e.x)/o*this.opts.inertia,i=(t.y-e.y)/o*this.opts.inertia,a=Math.hypot(r,i);if(a<.05)return;a>Br&&(r=r/a*Br,i=i/a*Br);let l=performance.now(),s=()=>{if(this.disposed)return;let c=performance.now(),u=Math.min(c-l,34);l=c;let m=Math.exp(-25e-4*u*10);if(r*=m,i*=m,Math.hypot(r,i)<.01){this.inertiaRaf=0,this.onInteractionEnd();return}let f={x:this.tr.width/2,y:this.tr.height/2};this.panBy(-r*u,-i*u,f),this.inertiaRaf=requestAnimationFrame(s);};this.inertiaRaf=requestAnimationFrame(s);}stopInertia(){this.inertiaRaf&&cancelAnimationFrame(this.inertiaRaf),this.inertiaRaf=0;}destroy(){this.disposed=true,this.stopInertia();let e=this.canvas;e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerUp),e.removeEventListener("wheel",this.onWheel),e.removeEventListener("contextmenu",this.onContextMenu),e.removeEventListener("keydown",this.onKeyDown),this.pointers.clear();}};var ye=class{constructor(e,t,o,r=false){this.ctx=e;this.layout=o;let i=e.gl,a=i.createBuffer();if(!a)throw new Error("[osmgl] createBuffer \u0432\u0435\u0440\u043D\u0443\u043B null");this.buffer=a,e.bindVAO(null),i.bindBuffer(i.ARRAY_BUFFER,a),i.bufferData(i.ARRAY_BUFFER,t,r?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.byteLength=t.byteLength;}update(e,t=0){let o=this.ctx.gl;o.bindBuffer(o.ARRAY_BUFFER,this.buffer),o.bufferSubData(o.ARRAY_BUFFER,t,e);}destroy(){this.ctx.gl.deleteBuffer(this.buffer);}},fe=class{constructor(e,t){this.ctx=e;let o=e.gl,r=o.createBuffer();if(!r)throw new Error("[osmgl] createBuffer \u0432\u0435\u0440\u043D\u0443\u043B null");this.buffer=r,e.bindVAO(null),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,r),o.bufferData(o.ELEMENT_ARRAY_BUFFER,t,o.STATIC_DRAW),this.count=t.length,this.type=t instanceof Uint32Array?o.UNSIGNED_INT:o.UNSIGNED_SHORT;}destroy(){this.ctx.gl.deleteBuffer(this.buffer);}},le=class{constructor(e,t,o){this.ctx=e;let r=e.gl,i=r.createVertexArray();if(!i)throw new Error("[osmgl] createVertexArray \u0432\u0435\u0440\u043D\u0443\u043B null");this.vao=i,e.bindVAO(i);for(let{buffer:a,locations:l}of t){r.bindBuffer(r.ARRAY_BUFFER,a.buffer);for(let s of a.layout.attribs){let c=l.get(s.name);c===void 0||c<0||(r.enableVertexAttribArray(c),s.integer?r.vertexAttribIPointer(c,s.size,s.type,a.layout.stride,s.offset):r.vertexAttribPointer(c,s.size,s.type,s.normalized??false,a.layout.stride,s.offset),s.divisor&&r.vertexAttribDivisor(c,s.divisor));}}o&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,o.buffer),e.bindVAO(null);}bind(){this.ctx.bindVAO(this.vao);}destroy(){this.ctx.gl.deleteVertexArray(this.vao);}};var ls=["a_pos","a_height","a_tint","a_ao","a_normal","a_kind","a_level","a_wall","a_p0","a_p1","a_corner","a_width","a_dist","a_tex"],ue=class{constructor(e,t,o,r,i={}){this.ctx=e;this.name=t;this.uniforms=new P;this.attribs=new P;let a=e.gl,l=ss(i),s=ui(a,a.VERTEX_SHADER,fi(o,l),`${t}.vert`),c=ui(a,a.FRAGMENT_SHADER,fi(r,l),`${t}.frag`),u=a.createProgram();if(!u)throw new Error(`[osmgl] \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0443 ${t}`);if(a.attachShader(u,s),a.attachShader(u,c),ls.forEach((m,f)=>a.bindAttribLocation(u,f,m)),a.linkProgram(u),a.detachShader(u,s),a.detachShader(u,c),a.deleteShader(s),a.deleteShader(c),!a.getProgramParameter(u,a.LINK_STATUS)){let m=a.getProgramInfoLog(u);throw a.deleteProgram(u),new Error(`[osmgl] \u043B\u0438\u043D\u043A\u043E\u0432\u043A\u0430 ${t} \u043D\u0435 \u043F\u0440\u043E\u0448\u043B\u0430: ${m}`)}this.program=u,this.cacheLocations();}cacheLocations(){let e=this.ctx.gl,t=e.getProgramParameter(this.program,e.ACTIVE_UNIFORMS);for(let r=0;r<t;r++){let i=e.getActiveUniform(this.program,r);if(!i)continue;let a=i.name.replace(/\[0\]$/,"");this.uniforms.set(a,e.getUniformLocation(this.program,i.name));}let o=e.getProgramParameter(this.program,e.ACTIVE_ATTRIBUTES);for(let r=0;r<o;r++){let i=e.getActiveAttrib(this.program,r);i&&this.attribs.set(i.name,e.getAttribLocation(this.program,i.name));}}use(){this.ctx.useProgram(this.program);}attribLocation(e){return this.attribs.get(e)??-1}loc(e){return this.uniforms.get(e)??null}setMat4(e,t){let o=this.loc(e);o&&this.ctx.gl.uniformMatrix4fv(o,false,t);}setMat3(e,t){let o=this.loc(e);o&&this.ctx.gl.uniformMatrix3fv(o,false,t);}setFloat(e,t){let o=this.loc(e);o&&this.ctx.gl.uniform1f(o,t);}setInt(e,t){let o=this.loc(e);o&&this.ctx.gl.uniform1i(o,t);}setVec2(e,t,o){let r=this.loc(e);r&&this.ctx.gl.uniform2f(r,t,o);}setVec3(e,t,o,r){let i=this.loc(e);i&&this.ctx.gl.uniform3f(i,t,o,r);}setVec4(e,t,o,r,i){let a=this.loc(e);a&&this.ctx.gl.uniform4f(a,t,o,r,i);}setVec4v(e,t){let o=this.loc(e);o&&this.ctx.gl.uniform4f(o,t[0],t[1],t[2],t[3]);}setVec4Array(e,t){let o=this.loc(e)??this.loc(`${e}[0]`);o&&this.ctx.gl.uniform4fv(o,t);}destroy(){this.ctx.gl.deleteProgram(this.program),this.uniforms.clear(),this.attribs.clear();}};function ss(n){let e=[];for(let[t,o]of Object.entries(n))o!==false&&e.push(o===true?`#define ${t}`:`#define ${t} ${o}`);return e.join(`
|
|
2
|
-
`)}function
|
|
1
|
+
var OsmGL=(function(exports){'use strict';var Xs=Object.defineProperty;var Ro=(n,e)=>()=>(n&&(e=n(n=0)),e);var js=(n,e)=>{for(var t in e)Xs(n,t,{get:e[t],enumerable:true});};var sh,ts=Ro(()=>{sh=(function(){var n="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FHRAOCUFHOXBKKAVC+QDF8kJJJJBK/uLEVUCUAICDTGVAICffffI0eGOCBYD1+KJJBhJJJJBBHRALALYD9gGWCDTFARbDBALAWCEFbD9gABARbDBAOCBYD1+KJJBhJJJJBBHRALALYD9gGOCDTFARbDBALAOCEFbD9gABARbDLCUADCDTADCffffI0eCBYD1+KJJBhJJJJBBHRALALYD9gGOCDTFARbDBALAOCEFbD9gABARbDWABYDBCBAVZ+TJJJB8aADCI9uHWDNADtMBABYDBHOAEHLADHRINAOALYDBCDTFGVAVYDBCEFbDBALCLFHLARCUFGRMBKKDNAItMBABYDBHLABYDLHRCBHVAIHOINARAVbDBARCLFHRALYDBAVFHVALCLFHLAOCUFGOMBKKDNADCI6MBAWCEAWCE0eHdABYDLHRABYDWHVCBHLINAECWFYDBHOAECLFYDBHDARAEYDBCDTFGWAWYDBGWCEFbDBAVAWCDTFALbDBARADCDTFGDADYDBGDCEFbDBAVADCDTFALbDBARAOCDTFGOAOYDBGOCEFbDBAVAOCDTFALbDBAECXFHEAdALCEFGL9HMBKKDNAItMBABYDLHEABYDBHLINAEAEYDBALYDB9rbDBALCLFHLAECLFHEAICUFGIMBKKKqBABAEADAIC+01JJBZ+MJJJBKqBABAEADAIC+c+JJJBZ+MJJJBK9dEEUABCfEAICDTZ+TJJJBHLCBHIDNADtMBINDNALAEYDBCDTFGBYDBCU9HMBABAIbDBAICEFHIKAECLFHEADCUFGDMBKKAIK9TEIUCBCBYD+M+KJJBGEABCIFC98gFGBbD+M+KJJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABK9TEIUCBCBYD+M+KJJBGEABCIFC98gFGBbD+M+KJJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK9+EIUzBHEDNDNCBYD+M+KJJBGDAECZTGI9NMBCUHEADAI9rCffIFCZ4NBCUsMEKADHEKCBABAE9rCIFC98gCBYD+M+KJJBFGDbD+M+KJJBDNADzBCZTGE9NMBADAE9rCffIFCZ4NB8aKKXBABAEZ+YJJJBK+BEEIUDNAB+8GDCl4GICfEgGLCfEsMBDNALMBDNABjBBBB9cMBAECBbDBABSKABjBBJ9fnAEZ+XJJJBHBAEAEYDBCNFbDBABSKAEAICfEgC+CUFbDBADCfff+D94gCJJJ/4Iv++HBKABK+gEBDNDNAECJE9IMBABjBBBUnHBDNAECfE9PMBAEC+BUFHEXDKABjBBBUnHBAECPDAECPD6eC+C9+FHEXEKAEC+BU9KMBABjBBJXnHBDNAEC+b9+9NMBAEC/mBFHEXEKABjBBJXnHBAEC+299AEC+2990eC/MEFHEKABAEClTCJJJ/8IF++nKK+eDDBCJWK+EDB4+H9W9n94+p+Gw+J9o+YE9pBBBBBBEBBBDBBBEBBBDBBBBBBBDBBBBBBBEBBBBBBB+L29Hz/69+9Kz/n/76z/RG97z/Z/O9Xz8j/b85z/+/U9Yz/B/K9hz+2/z9dz9E+L9Mz59a8kz+R/t3z+a+Zyz79ohz/J4++8++y+d9v8+BBBB9S+49+z8r+Hbz9m9m/m8+l/Z/O8+/8+pg89Q/X+j878r+Hq8++m+b/E87BBBBBBJzBBJzBBJz+e/v/n8++y+dSz9I/h/68+XD/r8+/H0838+/w+nOzBBBB+wv9o8+UF888+9I/h/68+9C9g/l89/N/M9M89/d8kO8+BBBBF+8Tz9M836zs+2azl/Zpzz818ez9E+LXz/u98f8+819e/68+BC+EQKXEBBBDBBBAwBB",e=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return {supported:false};var t,o=WebAssembly.instantiate(r(n),{}).then(function(f){t=f.instance,t.exports.__wasm_call_ctors(),t.exports.meshopt_encodeVertexVersion(0),t.exports.meshopt_encodeIndexVersion(1);});function r(f){for(var d=new Uint8Array(f.length),p=0;p<f.length;++p){var m=f.charCodeAt(p);d[p]=m>96?m-71:m>64?m-65:m>47?m+4:m>46?63:62;}for(var b=0,p=0;p<f.length;++p)d[b++]=d[p]<60?e[d[p]]:(d[p]-60)*64+d[++p];return d.buffer.slice(0,b)}function i(f){if(!f)throw new Error("Assertion failed")}function a(f){return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}function l(f,d,p){var m=t.exports.sbrk,b=m(f.length*4),y=m(d*4),g=new Uint8Array(t.exports.memory.buffer),A=a(f);g.set(A,b),p&&p(b,b,f.length,d);var B=t.exports.meshopt_optimizeVertexFetchRemap(y,b,f.length,d);g=new Uint8Array(t.exports.memory.buffer);var w=new Uint32Array(d);new Uint8Array(w.buffer).set(g.subarray(y,y+d*4)),A.set(g.subarray(b,b+f.length*4)),m(b-m(0));for(var x=0;x<f.length;++x)f[x]=w[f[x]];return [w,B]}function s(f,d,p,m,b){var y=t.exports.sbrk,g=y(d),A=y(m*b),B=new Uint8Array(t.exports.memory.buffer);B.set(a(p),A);var w=f(g,d,A,m,b),x=new Uint8Array(w);return x.set(B.subarray(g,g+w)),y(g-y(0)),x}function c(f){for(var d=0,p=0;p<f.length;++p){var m=f[p];d=d<m?m:d;}return d}function u(f,d){if(i(d==2||d==4),d==4)return new Uint32Array(f.buffer,f.byteOffset,f.byteLength/4);var p=new Uint16Array(f.buffer,f.byteOffset,f.byteLength/2);return new Uint32Array(p)}function h(f,d,p,m,b,y){var g=t.exports.sbrk,A=g(p*m),B=g(p*y),w=new Uint8Array(t.exports.memory.buffer);w.set(a(d),B),f(A,p,m,b,B);var x=new Uint8Array(p*m);return x.set(w.subarray(A,A+p*m)),g(A-g(0)),x}return {ready:o,supported:true,reorderMesh:function(f,d,p){var m=d?p?t.exports.meshopt_optimizeVertexCacheStrip:t.exports.meshopt_optimizeVertexCache:void 0;return l(f,c(f)+1,m)},encodeVertexBuffer:function(f,d,p){i(p>0&&p<=256),i(p%4==0);var m=t.exports.meshopt_encodeVertexBufferBound(d,p);return s(t.exports.meshopt_encodeVertexBuffer,m,f,d,p)},encodeIndexBuffer:function(f,d,p){i(p==2||p==4),i(d%3==0);var m=u(f,p),b=t.exports.meshopt_encodeIndexBufferBound(d,c(m)+1);return s(t.exports.meshopt_encodeIndexBuffer,b,m,d,4)},encodeIndexSequence:function(f,d,p){i(p==2||p==4);var m=u(f,p),b=t.exports.meshopt_encodeIndexSequenceBound(d,c(m)+1);return s(t.exports.meshopt_encodeIndexSequence,b,m,d,4)},encodeGltfBuffer:function(f,d,p,m){var b={ATTRIBUTES:this.encodeVertexBuffer,TRIANGLES:this.encodeIndexBuffer,INDICES:this.encodeIndexSequence};return i(b[m]),b[m](f,d,p)},encodeFilterOct:function(f,d,p,m){return i(p==4||p==8),i(m>=1&&m<=16),h(t.exports.meshopt_encodeFilterOct,f,d,p,m,16)},encodeFilterQuat:function(f,d,p,m){return i(p==8),i(m>=4&&m<=16),h(t.exports.meshopt_encodeFilterQuat,f,d,p,m,16)},encodeFilterExp:function(f,d,p,m){return i(p>0&&p%4==0),i(m>=1&&m<=24),h(t.exports.meshopt_encodeFilterExp,f,d,p,m,p)}}})();});var ch,os=Ro(()=>{ch=(function(){var n="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",e="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",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),o=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return {supported:false};var r=n;WebAssembly.validate(t)&&(r=e);var i,a=WebAssembly.instantiate(l(r),{}).then(function(h){i=h.instance,i.exports.__wasm_call_ctors();});function l(h){for(var f=new Uint8Array(h.length),d=0;d<h.length;++d){var p=h.charCodeAt(d);f[d]=p>96?p-71:p>64?p-65:p>47?p+4:p>46?63:62;}for(var m=0,d=0;d<h.length;++d)f[m++]=f[d]<60?o[f[d]]:(f[d]-60)*64+f[++d];return f.buffer.slice(0,m)}function s(h,f,d,p,m,b){var y=i.exports.sbrk,g=d+3&-4,A=y(g*p),B=y(m.length),w=new Uint8Array(i.exports.memory.buffer);w.set(m,B);var x=h(A,d,p,B,m.length);if(x==0&&b&&b(A,g,p),f.set(w.subarray(A,A+d*p)),y(A-y(0)),x!=0)throw new Error("Malformed buffer data: "+x)}var c={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},u={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return {ready:a,supported:true,decodeVertexBuffer:function(h,f,d,p,m){s(i.exports.meshopt_decodeVertexBuffer,h,f,d,p,i.exports[c[m]]);},decodeIndexBuffer:function(h,f,d,p){s(i.exports.meshopt_decodeIndexBuffer,h,f,d,p);},decodeIndexSequence:function(h,f,d,p){s(i.exports.meshopt_decodeIndexSequence,h,f,d,p);},decodeGltfBuffer:function(h,f,d,p,m,b){s(i.exports[u[m]],h,f,d,p,i.exports[c[b]]);}}})();});var fh,rs=Ro(()=>{fh=(function(){var n="B9h79tEBBBECd9gEUEU9gEUB9gBB9gQUUUUUUU99UUEU9gVUUUUUB9gLUUUUE999gIUUUE999gLUUUUEU9gIUUUEUIMXDILVORBWWBEWLVE9wEIIVIEBEOWEUECJ/JEKR7OO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BBZ9tw79o9v9wT9f79p9t9w29p9m95BEx9tw79o9v9wT9f79p9t9w29p9m959T9j9h2wBLA9tw79o9v9wT9f9v9wT9p9t9p96w9WwvTw94swT9j9o9Sw9t9h9wBVL79iv9rBOdWEBCEKDdQQ+stXDBK/48yIkUp99hU8jJJJJBCJ/BB9rGQ8kJJJJBAQCkFCBC/kBZ1JJJB8aCUALCDTGKALCffffI0eGXCBYD/s1JJBhJJJJBBHMAQCkFAQYD94GpCDTFAMbDBAQAMbDWAQApCEFbD94AXCBYD/s1JJBhJJJJBBHSAQCkFAQYD94GpCDTFASbDBAQASbDXAQApCEFbD94CUADCITADCffffE0eCBYD/s1JJBhJJJJBBHZAQCkFAQYD94GpCDTFAZbDBAQAZbDZAQApCEFbD94AQCWFAEADALCBZ+CJJJBAXCBYD/s1JJBhJJJJBBHhAQCkFAQYD94GpCDTFAhbDBAQApCEFbD94AXCBYD/s1JJBhJJJJBBHoAQCkFAQYD94GpCDTFAobDBAQApCEFbD94ALCD4ALFHaCEHcINAcGpCETHcApAa6MBKCBHxCUApCDTGaApCffffI0eCBYD/s1JJBhJJJJBBHcAQCkFAQYD94GqCDTFAcbDBAQAqCEFbD94AcCfEAaZ1JJJBHlDNALtMBAVCD4HkApCUFHqINAIAxAk2CDTFGyYDLGpCh4Ap7C+f+B+dd2AyYDBGpCh4Ap7C/d/o+b8j27AyYDWGpCh4Ap7C+3f/n8n27HaCBHpDNDNINAlAaAqgGaCDTFG8aYDBGcCUsMEAIAcAk2CDTFAyCXZ+LJJJBtMDApCEFGpAaFHaApAq9NMBXDKKA8aAxbDBAxHcKAhAxCDTFAcbDBAxCEFGxAL9HMBKCBHpAoHcINAcApbDBAcCLFHcALApCEFGp9HMBKCBHpAhHcAoHaINDNApAcYDBGqsMBAaAoAqCDTFGqYDBbDBAqApbDBKAcCLFHcAaCLFHaALApCEFGp9HMBKKCBHaALCBYD/s1JJBhJJJJBBHyAQCkFAQYD94GpCDTFAybDBAQApCEFbD94AXCBYD/s1JJBhJJJJBBHpAQCkFAQYD94GcCDTFApbDBAQAcCEFbD94AXCBYD/s1JJBhJJJJBBHcAQCkFAQYD94GqCDTFAcbDBAQAqCEFbD94ApCfEAKZ1JJJBHeAcCfEAKZ1JJJBH3DNALtMBAZCWFH5INDNAMAaCDTGpFYDBG8etMBAZASApFYDBCITFH8fA3ApFHAAeApFHxCBHkINDNDNA8fAkCITFYDBGlAa9HMBAxAabDBAAAabDBXEKDNAMAlCDTGKFYDBGHtMBAZASAKFYDBCITGpFYDBAasMEAHCUFH8aA5ApFHcCBHpINA8aApsMEApCEFHpAcYDBHqAcCWFHcAqAa9HMBKApAH6MEKA3AKFGpAaAlApYDBCUsebDBAxAlAaAxYDBCUsebDBKAkCEFGkA8e9HMBKKAaCEFGaAL9HMBKAhHcAoHaA3HqAeHkCBHpINDNDNApAcYDBG8a9HMBDNApAaYDBG8a9HMBAkYDBH8aDNAqYDBGlCU9HMBA8aCU9HMBAyApFCB86BBXIKAyApFHxDNApAlsMBApA8asMBAxCE86BBXIKAxCL86BBXDKDNApAoA8aCDTGlFYDB9HMBDNAqYDBGxCUsMBApAxsMBAkYDBGKCUsMBApAKsMBA3AlFYDBG8eCUsMBA8eA8asMBAeAlFYDBGlCUsMBAlA8asMBDNAhAxCDTFYDBAhAlCDTFYDB9HMBAhAKCDTFYDBAhA8eCDTFYDB9HMBAyApFCD86BBXLKAyApFCL86BBXIKAyApFCL86BBXDKAyApFCL86BBXEKAyApFAyA8aFrBB86BBKAcCLFHcAaCLFHaAqCLFHqAkCLFHkALApCEFGp9HMBKAWCEgtMBAyHpALHcINDNAprBBCE9HMBApCL86BBKApCEFHpAcCUFGcMBKKCBHkCUALCX2ALC/V+q/V+qE0eCBYD/s1JJBhJJJJBBHMAQCkFAQYD94GpCDTFAMbDBAQApCEFbD94AMAIALAVZ+DJJJB8aCUALC8s2GcALC/d/o/F8u0eCBYD/s1JJBhJJJJBBHpAQCkFAQYD94GaCDTFApbDBAQAaCEFbD94ApCBAcZ1JJJBHZDNADtMBAEHcINDNAMAcCLFYDBG8aCX2FGpiDBAMAcYDBGlCX2FGaiDBGG+TG8jAMAcCWFYDBGxCX2FGqCLFiDBAaCLFiDBG8k+TG8lnAqiDBAG+TG8mApCLFiDBA8k+TG8nn+TGYAYnA8nAqCWFiDBAaCWFiDBG8p+TGinA8lApCWFiDBA8p+TG8nn+TG8lA8lnA8nA8mnAiA8jn+TG8jA8jnmm+RG8mjBBBB9etMBAYA8m+VHYA8jA8m+VH8jA8lA8m+VH8lKAZAhAlCDTFYDBC8s2FGpA8lA8m+RG8mA8lnnG8nApiDBmuDBApA8jA8mA8jnG8rnGiApiDLmuDLApAYA8mAYnG8snGrApiDWmuDWApA8rA8lnG8rApiDXmuDXApA8sA8lnG8uApiDZmuDZApA8sA8jnG8sApiDcmuDcApA8lA8mAYA8pnA8lAGnA8kA8jnmm+MG8knGGnG8lApiDkmuDkApA8jAGnG8jApiD3muD3ApAYAGnGYApiDAmuDAApAGA8knGGApiD8kmuD8kApA8mApiDYmuDYAZAhA8aCDTFYDBC8s2FGpA8nApiDBmuDBApAiApiDLmuDLApArApiDWmuDWApA8rApiDXmuDXApA8uApiDZmuDZApA8sApiDcmuDcApA8lApiDkmuDkApA8jApiD3muD3ApAYApiDAmuDAApAGApiD8kmuD8kApA8mApiDYmuDYAZAhAxCDTFYDBC8s2FGpA8nApiDBmuDBApAiApiDLmuDLApArApiDWmuDWApA8rApiDXmuDXApA8uApiDZmuDZApA8sApiDcmuDcApA8lApiDkmuDkApA8jApiD3muD3ApAYApiDAmuDAApAGApiD8kmuD8kApA8mApiDYmuDYAcCXFHcAkCIFGkAD6MBKCBH8aAEHxINCBHcINAyAEAcC+81JJBFYDBGlA8aFCDTFYDBGaFrBBHpDNDNAyAxAcFYDBGqFrBBGkC99FCfEgCPE0MBApCEsMBApCD9HMEKDNAkCUFCfEgCE0MBAeAqCDTFYDBAa9HMEKDNApCUFCfEgCE0MBA3AaCDTFYDBAq9HMEKDNAkCV2ApFC+g1JJBFrBBtMBAhAaCDTFYDBAhAqCDTFYDB0MEKjBBACjBBJzApCEseH8mAkCEsHKAEAlCDTC+81JJBFYDBA8aFCDTFYDBHlDNAMAaCX2FGpCWFiDBAMAqCX2FGkCWFiDBG8k+TG8lA8lnApiDBAkiDBG8p+TG8jA8jnApCLFiDBAkCLFiDBG8n+TGYAYnmm+RGGjBBBB9etMBA8lAG+VH8lAYAG+VHYA8jAG+VH8jKjBBACA8mAKeH8sDNAMAlCX2FGpiDWA8k+TG8mA8lA8mA8lnApiDBA8p+TGrA8jnAYApiDLA8n+TG8rnmmGin+TG8mA8mnArA8jAin+TG8lA8lnA8rAYAin+TG8jA8jnmm+RGYjBBBB9etMBA8mAY+VH8mA8jAY+VH8jA8lAY+VH8lKAZAhAqCDTFYDBC8s2FGpA8lA8sAGnGYA8lnnGiApiDBmuDBApA8jAYA8jnG8snGrApiDLmuDLApA8mAYA8mnGGnG8rApiDWmuDWApA8sA8lnG8sApiDXmuDXApAGA8lnG8uApiDZmuDZApAGA8jnG8vApiDcmuDcApA8lAYA8mA8knA8lA8pnA8nA8jnmm+MG8knGGnG8lApiDkmuDkApA8jAGnG8jApiD3muD3ApA8mAGnG8mApiDAmuDAApAGA8knGGApiD8kmuD8kApAYApiDYmuDYAZAhAaCDTFYDBC8s2FGpAiApiDBmuDBApArApiDLmuDLApA8rApiDWmuDWApA8sApiDXmuDXApA8uApiDZmuDZApA8vApiDcmuDcApA8lApiDkmuDkApA8jApiD3muD3ApA8mApiDAmuDAApAGApiD8kmuD8kApAYApiDYmuDYKAcCLFGcCX9HMBKAxCXFHxA8aCIFG8aAD6MBKKDNABAEsMBABAEADCDTZ+HJJJB8aKCUADCX2ADC/V+q/V+qE0eCBYD/s1JJBhJJJJBBHAAQCkFAQYD94GpCDTFAAbDBAQApCEFbD94CUADCDTADCffffI0eCBYD/s1JJBhJJJJBBH5AQCkFAQYD94GpCDTFA5bDBAQApCEFbD94AXCBYD/s1JJBhJJJJBBHIAQCkFAQYD94GpCDTFAIbDBAQApCEFbD94ALCBYD/s1JJBhJJJJBBH8wAQCkFAQYD94GpCDTFA8wbDBAQApCEFbD94jBBBBHrDNADAO9NMBARARnH8sAACWFH8xAQYDZH8yAQYDXH8zAQYDWH80jBBBBHrINAQCWFABADGSALAhZ+CJJJBCBHHABHxCBHKINCBHpINDNAhAxApFYDBGaCDTGEFYDBGkAhABApC+81JJBFYDBAKFCDTFYDBGcCDTFYDBG8asMBAyAcFrBBGlCV2AyAaFrBBGqFC/Q1JJBFrBBGDAqCV2AlFG8eC/Q1JJBFrBBG8fvCfEgtMBDNA8eC+g1JJBFrBBtMBA8aAk0MEKDNAqAl9HMBAqCUFCfEgCE0MBAeAEFYDBAc9HMEKAAAHCX2FGqAcAaA8fCfEgGkebDLAqAaAcAkebDBAqADA8fgCfEgCB9HbDWAHCEFHHKApCLFGpCX9HMBKAxCXFHxAKCIFGKAS6MBKDNDNAHtMBAAHcAHH8aINAcCWFGljBBBBjBBJzAZAhAcYDBGaCDTFYDBC8s2FGpiDYG8l+VA8ljBBBB9beApiDWAMAcCLFGEYDBGqCX2FGkCWFiDBG8lnApiDZAkiDBG8jnApiDAmG8mA8mmmA8lnApiDLAkCLFiDBG8mnApiDcA8lnApiD3mG8lA8lmmA8mnApiDBA8jnApiDXA8mnApiDkmG8lA8lmmA8jnApiD8kmmm+LnGYjBBBBjBBJzAZAhAqAaAlYDBGkeGlCDTFYDBC8s2FGpiDYG8l+VA8ljBBBB9beApiDWAMAaAqAkeGxCX2FGkCWFiDBG8lnApiDZAkiDBG8jnApiDAmG8mA8mmmA8lnApiDLAkCLFiDBG8mnApiDcA8lnApiD3mG8lA8lmmA8mnApiDBA8jnApiDXA8mnApiDkmG8lA8lmmA8jnApiD8kmmm+LnG8lAYA8l9fGpeuDBAEAqAxApebDBAcAaAlApebDBAcCXFHcA8aCUFG8aMBKAQCJEFCBCJ/ABZ1JJJB8aA8xHpAHHcINAQCJEFApYDBCo4C/8zgFGaAaYDBCEFbDBApCXFHpAcCUFGcMBKCBHpCBHcINAQCJEFApFGaYDBHqAaAcbDBAqAcFHcApCLFGpCJ/AB9HMBKCBHpA8xHcINAQCJEFAcYDBCo4C/8zgFGaAaYDBGaCEFbDBA5AaCDTFApbDBAcCXFHcAHApCEFGp9HMBKASAO9rGaCI9uH81DNALtMBCBHpAIHcINAcApbDBAcCLFHcALApCEFGp9HMBKKCBHbA8wCBALZ1JJJBH83AaCo9uHuA81CE4H85CBH86CBHKDNINAAA5AKCDTFYDBCX2FGxiDWG8jA8s9eMEA86A819PMEjffUUH8lDNA85AH9PMBAAA5A85CDTFYDBCX2FiDWjBB/AznH8lKDNA8jA8l9etMBA86Au0MDKDNA83AhAxYDLG87CDTG88FYDBGaFG89rBBA83AhAxYDBGECDTG8+FYDBGzFGNrBBvMBDNA80AzCDTGpFYDBGqtMBA8yA8zApFYDBCITFHpAMAaCX2FG8eCWFHDA8eCLFHXAMAzCX2FG8fCWFHVA8fCLFHWCBHcCEHlDNINDNAIApYDBCDTFYDBGkAasMBAIApCLFYDBCDTFYDBG8aAasMBAMA8aCX2FG8aiDBAMAkCX2FGkiDBG8m+TG8lAWiDBAkCLFiDBGY+TGGnA8fiDBA8m+TG8kA8aCLFiDBAY+TG8jn+TA8lAXiDBAY+TG8pnA8eiDBA8m+TG8nA8jn+TnA8jAViDBAkCWFiDBGY+TGinAGA8aCWFiDBAY+TG8mn+TA8jADiDBAY+TGYnA8pA8mn+TnA8mA8knAiA8ln+TA8mA8nnAYA8ln+TnmmjBBBB9dMDKApCWFHpAcCEFGcAq6HlAqAc9HMBKKAlCEgtMBA85CEFH85XEKAxCWFHqAZAaC8s2FGpAZAzC8s2FGciDBApiDBmuDBApAciDLApiDLmuDLApAciDWApiDWmuDWApAciDXApiDXmuDXApAciDZApiDZmuDZApAciDcApiDcmuDcApAciDkApiDkmuDkApAciD3ApiD3muD3ApAciDAApiDAmuDAApAciD8kApiD8kmuD8kApAciDYApiDYmuDYDNDNDNDNAyAEFGcrBBC9+FpDEBDKAEHpINAIApCDTGpFAabDBAoApFYDBGpAE9HMBXIKKAoA88FYDBHpAoA8+FYDBHEAIA8+FA87bDBApH87KAIAECDTFA87bDBKANCE86BBA89CE86BBAqiDBG8lArArA8l9deHrAbCEFHbCECDAcrBBCEseA86FH86KAKCEFGKAH9HMBKKAbtMBDNALtMBCBHcAeHpINDNApYDBGaCUsMBDNAcAIAaCDTGqFYDBGa9HMBAeAqFYDBHaKApAabDBKApCLFHpALAcCEFGc9HMBKCBHcA3HpINDNApYDBGaCUsMBDNAcAIAaCDTGqFYDBGa9HMBA3AqFYDBHaKApAabDBKApCLFHpALAcCEFGc9HMBKKCBHDABHpCBHkINDNAIApYDBCDTFYDBGcAIApCLFYDBCDTFYDBGasMBAcAIApCWFYDBCDTFYDBGqsMBAaAqsMBABADCDTFG8aAcbDBA8aCLFAabDBA8aCWFAqbDBADCIFHDKApCXFHpAkCIFGkAS9PMDXBKKASHDXDKADAO0MBKKDNAdtMBAdAr+RuDBKAQYD94GpCDTAQCkFFC98FHhDNINAptMEAhYDBCBYD/w1JJBh+BJJJBBAhC98FHhApCUFHpXBKKAQCJ/BBF8kJJJJBADK/PLEOUABYDBCBAICDTZ1JJJB8aADCI9uHVDNADtMBABYDBHODNALtMBAEHRADHWINAOALARYDBCDTFYDBCDTFGdAdYDBCEFbDBARCLFHRAWCUFGWMBXDKKAEHRADHWINAOARYDBCDTFGdAdYDBCEFbDBARCLFHRAWCUFGWMBKKDNAItMBABYDBHRABYDLHWCBHdAIHOINAWAdbDBAWCLFHWARYDBAdFHdARCLFHRAOCUFGOMBKKDNADCI6MBAVCEAVCE0eHQABYDLHVABYDWHRINAECWFYDBHWAECLFYDBHdAEYDBHODNALtMBALAWCDTFYDBHWALAdCDTFYDBHdALAOCDTFYDBHOKARAVAOCDTFGDYDBCITFAdbDBARADYDBCITFAWbDLADADYDBCEFbDBARAVAdCDTFGDYDBCITFAWbDBARADYDBCITFAObDLADADYDBCEFbDBARAVAWCDTFGWYDBCITFAObDBARAWYDBCITFAdbDLAWAWYDBCEFbDBAECXFHEAQCUFGQMBKKDNAItMBABYDLHRABYDBHWINARARYDBAWYDB9rbDBAWCLFHWARCLFHRAICUFGIMBKKK+3LDOUV998jJJJJBCA9rGLCZFCWFCBYD11JJBbDBALCB8pDJ1JJB83IZALCWFCBYDn1JJBbDBALCB8pD+M1JJB83IBDNADtMBAICD4HVDNABtMBAVCDTHOCBHRAEHWINABARCX2FGIAEARAV2CDTFGdiDBuDBAIAdiDLuDLAIAdiDWuDWCBHIINALCZFAIFGdAWAIFiDBGQAdiDBGKAKAQ9eeuDBALAIFGdAQAdiDBGKAKAQ9deuDBAICLFGICX9HMBKAWAOFHWARCEFGRAD9HMBXDKKAVCDTHRCBHWINCBHIINALCZFAIFGdAEAIFiDBGQAdiDBGKAKAQ9eeuDBALAIFGdAQAdiDBGKAKAQ9deuDBAICLFGICX9HMBKAEARFHEAWCEFGWAD9HMBKKALiDBALiDZGK+TjBBBB+XGQALiDLALiDcGX+TGMAMAQ9deGQALiDWALiDkGM+TGpApAQ9deHpDNABtMBADtMBjBBBBjBBJzAp+VApjBBBB9beHQINABAQABiDBAK+TnuDBABCLFGIAQAIiDBAX+TnuDBABCWFGIAQAIiDBAM+TnuDBABCXFHBADCUFGDMBKKApK+qDIDUI99DUCBHI8jJJJJBCA9rGLCZFCWFCBYD11JJBbDBALCB8pDJ1JJB83IZALCWFCBYDn1JJBbDBALCB8pD+M1JJB83IBDNDNAEMBjBBJfHVjBBJfHOjBBJfHRXEKADCD4CDTHWINCBHDINALCZFADFGdABADFiDBGOAdiDBGRARAO9eeuDBALADFGdAOAdiDBGRARAO9deuDBADCLFGDCX9HMBKABAWFHBAICEFGIAE9HMBKALiDWALiDk+THRALiDLALiDc+THOALiDBALiDZ+THVKAVjBBBB+XGVAOAOAV9deGOARARAO9deK9dEEUABCfEAICDTZ1JJJBHLCBHIDNADtMBINDNALAEYDBCDTFGBYDBCU9HMBABAIbDBAICEFHIKAECLFHEADCUFGDMBKKAIK9TEIUCBCBYD/01JJBGEABCIFC98gFGBbD/01JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABK9TEIUCBCBYD/01JJBGEABCIFC98gFGBbD/01JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK9+EIUzBHEDNDNCBYD/01JJBGDAECZTGI9NMBCUHEADAI9rCffIFCZ4NBCUsMEKADHEKCBABAE9rCIFC98gCBYD/01JJBFGDbD/01JJBDNADzBCZTGE9NMBADAE9rCffIFCZ4NB8aKK6EIUCBHIDNADtMBDNINABrBBGLAErBBGV9HMEAECEFHEABCEFHBADCUFGDMBXDKKALAV9rHIKAIKK+CEDBCJWK9pffUUffUUffUUffUfffUfffUfBBBBBBBBEEEBEEBEBBEEEBEBBBBBEBEBBBBBEBBBDBBBBBBBBBBBBBBBEEEEEBEBBBBBEBBBBBEEBBBBBBC/sWKXEBBBDBBBJ9kBB",e=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return {supported:false};var t,o=WebAssembly.instantiate(r(n),{}).then(function(f){t=f.instance,t.exports.__wasm_call_ctors();});function r(f){for(var d=new Uint8Array(f.length),p=0;p<f.length;++p){var m=f.charCodeAt(p);d[p]=m>96?m-71:m>64?m-65:m>47?m+4:m>46?63:62;}for(var b=0,p=0;p<f.length;++p)d[b++]=d[p]<60?e[d[p]]:(d[p]-60)*64+d[++p];return d.buffer.slice(0,b)}function i(f){if(!f)throw new Error("Assertion failed")}function a(f){return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}function l(f,d){var p=t.exports.sbrk,m=p(f.length*4),b=p(d*4),y=new Uint8Array(t.exports.memory.buffer),g=a(f);y.set(g,m);var A=t.exports.meshopt_optimizeVertexFetchRemap(b,m,f.length,d);y=new Uint8Array(t.exports.memory.buffer);var B=new Uint32Array(d);new Uint8Array(B.buffer).set(y.subarray(b,b+d*4)),g.set(y.subarray(m,m+f.length*4)),p(m-p(0));for(var w=0;w<f.length;++w)f[w]=B[f[w]];return [B,A]}function s(f){for(var d=0,p=0;p<f.length;++p){var m=f[p];d=d<m?m:d;}return d}function c(f,d,p,m,b,y,g,A,B){var w=t.exports.sbrk,x=w(4),_=w(p*4),C=w(b*y),v=w(p*4),E=new Uint8Array(t.exports.memory.buffer);E.set(a(m),C),E.set(a(d),v);var M=f(_,v,p,C,b,y,g,A,B,x);E=new Uint8Array(t.exports.memory.buffer);var F=new Uint32Array(M);a(F).set(E.subarray(_,_+M*4));var H=new Float32Array(1);return a(H).set(E.subarray(x,x+4)),w(x-w(0)),[F,H[0]]}function u(f,d,p,m){var b=t.exports.sbrk,y=b(p*m),g=new Uint8Array(t.exports.memory.buffer);g.set(a(d),y);var A=f(y,p,m);return b(y-b(0)),A}var h={LockBorder:1};return {ready:o,supported:true,compactMesh:function(f){i(f instanceof Uint32Array||f instanceof Int32Array||f instanceof Uint16Array||f instanceof Int16Array),i(f.length%3==0);var d=f.BYTES_PER_ELEMENT==4?f:new Uint32Array(f);return l(d,s(f)+1)},simplify:function(f,d,p,m,b,y){i(f instanceof Uint32Array||f instanceof Int32Array||f instanceof Uint16Array||f instanceof Int16Array),i(f.length%3==0),i(d instanceof Float32Array),i(d.length%p==0),i(p>=3),i(m%3==0);for(var g=0,A=0;A<(y?y.length:0);++A)g|=h[y[A]];var B=f.BYTES_PER_ELEMENT==4?f:new Uint32Array(f),w=c(t.exports.meshopt_simplify,B,f.length,d,d.length,p*4,m,b,g);return w[0]=f instanceof Uint32Array?w[0]:new f.constructor(w[0]),w},getScale:function(f,d){return i(f instanceof Float32Array),i(f.length%d==0),u(t.exports.meshopt_simplifyScale,f,f.length,d*4)}}})();});var ns={};js(ns,{MeshoptDecoder:()=>ch,MeshoptEncoder:()=>sh,MeshoptSimplifier:()=>fh});var is=Ro(()=>{ts();os();rs();});var G=Map,te=Set;var Ze=class{constructor(){this.listeners=new G;}on(e,t){let o=this.listeners.get(e);return o||this.listeners.set(e,o=new te),o.add(t),this}once(e,t){let o=r=>{this.off(e,o),t(r);};return this.on(e,o)}off(e,t){return this.listeners.get(e)?.delete(t),this}emit(e,t){let o=this.listeners.get(e);if(!o)return this;for(let r of [...o])try{r(t);}catch(i){console.error(`[osmgl] \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A "${e}" \u0431\u0440\u043E\u0441\u0438\u043B \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435:`,i);}return this}removeAllListeners(){this.listeners.clear();}};var _e=(n,e,t)=>n<e?e:n>t?t:n;var at=n=>n*Math.PI/180,Ti=n=>n*180/Math.PI;function gt(n){let e=((n+180)%360+360)%360-180;return e===-180?180:e}var Go=n=>1-Math.pow(1-n,3);function me(n){let e=n.trim();if(e[0]==="#"){let o=e.slice(1);if(o.length===3||o.length===4){let r=o.split("").map(i=>parseInt(i+i,16)/255);return [r[0],r[1],r[2],r.length===4?r[3]:1]}if(o.length===6||o.length===8){let r=[];for(let i=0;i<o.length;i+=2)r.push(parseInt(o.slice(i,i+2),16)/255);return [r[0],r[1],r[2],r.length===4?r[3]:1]}}let t=e.match(/^rgba?\(([^)]+)\)$/i);if(t){let o=t[1].split(",").map(r=>parseFloat(r));if(o.length>=3)return [o[0]/255,o[1]/255,o[2]/255,o.length>3?o[3]:1]}return [1,0,1,1]}function De(n){return [n[0]*n[3],n[1]*n[3],n[2]*n[3],n[3]]}var Oo=class{constructor(e){this._program=null;this._vao=null;this._framebuffer=null;this._depthTest=false;this._depthMask=true;this._colorMask=true;this._depthFunc="lequal";this._blend="none";this._cull="none";this._viewport=[0,0,0,0];this._activeTexture=-1;this._boundTextures=new G;this._stencilTest=false;this.gl=e,this.caps=Ys(e),e.enable(e.DEPTH_TEST),this._depthTest=true,e.depthFunc(e.LEQUAL),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,false);}useProgram(e){return this._program===e?false:(this.gl.useProgram(e),this._program=e,true)}bindVAO(e){this._vao!==e&&(this.gl.bindVertexArray(e),this._vao=e);}bindFramebuffer(e){this._framebuffer!==e&&(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,e),this._framebuffer=e);}bindTexture(e,t,o=this.gl.TEXTURE_2D){this._activeTexture!==e&&(this.gl.activeTexture(this.gl.TEXTURE0+e),this._activeTexture=e),this._boundTextures.get(e)!==t&&(this.gl.bindTexture(o,t),this._boundTextures.set(e,t));}viewport(e,t,o,r){let i=this._viewport;i[0]===e&&i[1]===t&&i[2]===o&&i[3]===r||(this.gl.viewport(e,t,o,r),this._viewport=[e,t,o,r]);}setDepthTest(e){this._depthTest!==e&&(e?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._depthTest=e);}setDepthMask(e){this._depthMask!==e&&(this.gl.depthMask(e),this._depthMask=e);}setColorMask(e){this._colorMask!==e&&(this.gl.colorMask(e,e,e,e),this._colorMask=e);}setDepthFunc(e){if(this._depthFunc===e)return;let t=this.gl;this.gl.depthFunc(e==="less"?t.LESS:e==="always"?t.ALWAYS:e==="greater"?t.GREATER:t.LEQUAL),this._depthFunc=e;}setBlend(e){if(this._blend===e)return;let t=this.gl;e==="none"?t.disable(t.BLEND):(this._blend==="none"&&t.enable(t.BLEND),e==="alpha"?t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA):e==="premultiplied"?t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA):e==="multiply"?t.blendFunc(t.DST_COLOR,t.ZERO):t.blendFunc(t.ONE,t.ONE)),this._blend=e;}setCull(e){if(this._cull===e)return;let t=this.gl;e==="none"?t.disable(t.CULL_FACE):(this._cull==="none"&&t.enable(t.CULL_FACE),t.cullFace(e==="back"?t.BACK:t.FRONT)),this._cull=e;}setStencilTest(e){this._stencilTest!==e&&(e?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._stencilTest=e);}clear(e,t=true,o=false){let r=this.gl,i=0;e&&(r.clearColor(e[0],e[1],e[2],e[3]),i|=r.COLOR_BUFFER_BIT),t&&(this.setDepthMask(true),r.clearDepth(1),i|=r.DEPTH_BUFFER_BIT),o&&(r.clearStencil(0),i|=r.STENCIL_BUFFER_BIT),i&&r.clear(i);}invalidateState(){this._program=null,this._vao=null,this._framebuffer=null,this._activeTexture=-1,this._boundTextures.clear(),this._viewport=[-1,-1,-1,-1];}};function Ys(n){let e=n.getExtension("EXT_texture_filter_anisotropic")??n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),t=n.getExtension("WEBGL_debug_renderer_info");return {maxTextureSize:n.getParameter(n.MAX_TEXTURE_SIZE),maxVertexAttribs:n.getParameter(n.MAX_VERTEX_ATTRIBS),colorBufferFloat:!!n.getExtension("EXT_color_buffer_float"),anisotropic:e,maxAnisotropy:e?n.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,timerQuery:!!n.getExtension("EXT_disjoint_timer_query_webgl2"),rendererName:t?String(n.getParameter(t.UNMASKED_RENDERER_WEBGL)):"unknown"}}var lt=512,Wo=40075016686e-3,Hi=85.051129;function $(n){return Array.isArray(n)?{lng:n[0],lat:n[1]}:n}var Qe=n=>512*Math.pow(2,n),Vo=n=>Math.max(-Hi,Math.min(Hi,n));function re(n){return (180+n)/360}function ne(n){let e=Vo(n);return (180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function Se(n){return n*360-180}function Me(n){let e=180-n*360;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}function Ge(n){return Wo*Math.cos(n*Math.PI/180)}function Pr(n,e){return n/Ge(e)}function Jd(n,e){return n*Ge(e)}function Xd(n,e){return Pr(1,n)*Qe(e)}function jd(n,e){return Ge(n)/Qe(e)}function Pi(n,e){let t=Math.pow(2,n);return Ge(Me((e+.5)/t))/t}function kr(n){return Wo/Math.pow(2,n)}function ki(n,e,t){let o=kr(n),r=65536;return [(e*o%r+r)%r,(t*o%r+r)%r]}var Kt=class n{constructor(e,t){this.west=1/0;this.south=1/0;this.east=-1/0;this.north=-1/0;e&&this.extend(e),t&&this.extend(t);}static from(e){let t=new n;for(let o of e)t.extend(o);return t}extend(e){if(e instanceof n)return e.isEmpty()?this:(this.west=Math.min(this.west,e.west),this.south=Math.min(this.south,e.south),this.east=Math.max(this.east,e.east),this.north=Math.max(this.north,e.north),this);let t=$(e);return this.west=Math.min(this.west,t.lng),this.south=Math.min(this.south,t.lat),this.east=Math.max(this.east,t.lng),this.north=Math.max(this.north,t.lat),this}isEmpty(){return !(this.west<=this.east&&this.south<=this.north)}getCenter(){return {lng:(this.west+this.east)/2,lat:(this.south+this.north)/2}}getSouthWest(){return {lng:this.west,lat:this.south}}getNorthEast(){return {lng:this.east,lat:this.north}}contains(e){let t=$(e);return t.lng>=this.west&&t.lng<=this.east&&t.lat>=this.south&&t.lat<=this.north}pad(e){if(this.isEmpty())return this;let t=(this.east-this.west)*e,o=(this.north-this.south)*e;return this.west-=t,this.east+=t,this.south-=o,this.north+=o,this}toMercator(){return {minX:re(this.west),maxX:re(this.east),minY:ne(this.north),maxY:ne(this.south)}}};function Rr(n,e){if(n.isEmpty())return null;let t={top:e.padding?.top??0,right:e.padding?.right??0,bottom:e.padding?.bottom??0,left:e.padding?.left??0},o=Math.max(e.width-t.left-t.right,Ri),r=Math.max(e.height-t.top-t.bottom,Ri),i=n.toMercator(),a=e.bearing??0,l=-a*Math.PI/180,s=Math.cos(l),c=Math.sin(l),u=(i.minX+i.maxX)/2,h=(i.minY+i.maxY)/2,f=0,d=0;for(let[A,B]of [[i.minX,i.minY],[i.maxX,i.minY],[i.maxX,i.maxY],[i.minX,i.maxY]]){let w=(A-u)*s-(B-h)*c,x=(A-u)*c+(B-h)*s;f=Math.max(f,Math.abs(w)*2),d=Math.max(d,Math.abs(x)*2);}let p=Math.min(o/Math.max(f,1e-12),r/Math.max(d,1e-12)),m=Math.min(Math.max(Math.log2(p/512),e.minZoom??0),e.maxZoom??22),b=Qe(m),y=(t.left-t.right)/2/b,g=(t.top-t.bottom)/2/b;return {center:{lng:Se(u-(y*s+g*c)),lat:Me(h-(-y*c+g*s))},zoom:m,bearing:a}}var Ri=32;function N(){let n=new Float64Array(16);return n[0]=n[5]=n[10]=n[15]=1,n}function Ke(n){return n.fill(0),n[0]=n[5]=n[10]=n[15]=1,n}function Ee(n,e,t){let o=e[0],r=e[1],i=e[2],a=e[3],l=e[4],s=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],m=e[12],b=e[13],y=e[14],g=e[15];for(let A=0;A<4;A++){let B=t[A*4],w=t[A*4+1],x=t[A*4+2],_=t[A*4+3];n[A*4]=B*o+w*l+x*h+_*m,n[A*4+1]=B*r+w*s+x*f+_*b,n[A*4+2]=B*i+w*c+x*d+_*y,n[A*4+3]=B*a+w*u+x*p+_*g;}return n}function We(n,e,t,o,r){return n!==e&&n.set(e),n[12]=e[0]*t+e[4]*o+e[8]*r+e[12],n[13]=e[1]*t+e[5]*o+e[9]*r+e[13],n[14]=e[2]*t+e[6]*o+e[10]*r+e[14],n[15]=e[3]*t+e[7]*o+e[11]*r+e[15],n}function Oe(n,e,t,o,r){for(let i=0;i<4;i++)n[i]=e[i]*t,n[4+i]=e[4+i]*o,n[8+i]=e[8+i]*r,n[12+i]=e[12+i];return n}function Or(n,e,t){let o=Math.sin(t),r=Math.cos(t),i=e[4],a=e[5],l=e[6],s=e[7],c=e[8],u=e[9],h=e[10],f=e[11];return n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n[4]=i*r+c*o,n[5]=a*r+u*o,n[6]=l*r+h*o,n[7]=s*r+f*o,n[8]=c*r-i*o,n[9]=u*r-a*o,n[10]=h*r-l*o,n[11]=f*r-s*o,n}function Wr(n,e,t){let o=Math.sin(t),r=Math.cos(t),i=e[0],a=e[1],l=e[2],s=e[3],c=e[4],u=e[5],h=e[6],f=e[7];return n!==e&&(n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n[0]=i*r+c*o,n[1]=a*r+u*o,n[2]=l*r+h*o,n[3]=s*r+f*o,n[4]=c*r-i*o,n[5]=u*r-a*o,n[6]=h*r-l*o,n[7]=f*r-s*o,n}function Oi(n,e,t,o,r){let i=1/Math.tan(e/2);return n.fill(0),n[0]=i/t,n[5]=i,n[11]=-1,n[10]=(r+o)/(o-r),n[14]=2*r*o/(o-r),n}function Wi(n,e,t,o,r,i,a){let l=1/(e-t),s=1/(o-r),c=1/(i-a);return n.fill(0),n[0]=-2*l,n[5]=-2*s,n[10]=2*c,n[12]=(e+t)*l,n[13]=(r+o)*s,n[14]=(a+i)*c,n[15]=1,n}function Ve(n,e){let t=e[0],o=e[1],r=e[2],i=e[3],a=e[4],l=e[5],s=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],b=e[14],y=e[15],g=t*l-o*a,A=t*s-r*a,B=t*c-i*a,w=o*s-r*l,x=o*c-i*l,_=r*c-i*s,C=u*m-h*p,v=u*b-f*p,E=u*y-d*p,M=h*b-f*m,F=h*y-d*m,H=f*y-d*b,S=g*H-A*F+B*M+w*E-x*v+_*C;return S?(S=1/S,n[0]=(l*H-s*F+c*M)*S,n[1]=(r*F-o*H-i*M)*S,n[2]=(m*_-b*x+y*w)*S,n[3]=(f*x-h*_-d*w)*S,n[4]=(s*E-a*H-c*v)*S,n[5]=(t*H-r*E+i*v)*S,n[6]=(b*B-p*_-y*A)*S,n[7]=(u*_-f*B+d*A)*S,n[8]=(a*F-l*E+c*C)*S,n[9]=(o*E-t*F-i*C)*S,n[10]=(p*x-m*B+y*g)*S,n[11]=(h*B-u*x-d*g)*S,n[12]=(l*v-a*M-s*C)*S,n[13]=(t*M-o*v+r*C)*S,n[14]=(m*A-p*w-b*g)*S,n[15]=(u*w-h*A+f*g)*S,n):null}function ce(n,e,t){let[o,r,i,a]=t;return n[0]=e[0]*o+e[4]*r+e[8]*i+e[12]*a,n[1]=e[1]*o+e[5]*r+e[9]*i+e[13]*a,n[2]=e[2]*o+e[6]*r+e[10]*i+e[14]*a,n[3]=e[3]*o+e[7]*r+e[11]*i+e[15]*a,n}function Ue(n,e){for(let t=0;t<16;t++)n[t]=e[t];return n}function zo(n){let e=Math.hypot(n[0],n[1],n[2])||1;return [n[0]/e,n[1]/e,n[2]/e]}function Gi(n,e){return [n[1]*e[2]-n[2]*e[1],n[2]*e[0]-n[0]*e[2],n[0]*e[1]-n[1]*e[0]]}function Zs(n,e){return [n[0]-e[0],n[1]-e[1],n[2]-e[2]]}function Gr(n,e){return n[0]*e[0]+n[1]*e[1]+n[2]*e[2]}function Vi(n,e,t,o){let r=zo(Zs(t,e)),i=zo(Gi(r,o)),a=Gi(i,r);return n[0]=i[0],n[1]=a[0],n[2]=-r[0],n[3]=0,n[4]=i[1],n[5]=a[1],n[6]=-r[1],n[7]=0,n[8]=i[2],n[9]=a[2],n[10]=-r[2],n[11]=0,n[12]=-Gr(i,e),n[13]=-Gr(a,e),n[14]=Gr(r,e),n[15]=1,n}var Ut=60,No=4.5,st=6,Ko=n=>n/(2*Math.PI);function Uo(n){if(n<=No)return 0;if(n>=st)return 1;let e=(n-No)/(st-No);return e*e*(3-2*e)}function Jo(n,e){let t=n*Math.PI/180,o=Vo(e)*Math.PI/180,r=Math.cos(o);return [r*Math.sin(t),-Math.sin(o),r*Math.cos(t)]}function Vr(n){let e=Math.hypot(n[0],n[1],n[2])||1,t=n[0]/e,o=n[1]/e,r=n[2]/e;return {lng:Math.atan2(t,r)*180/Math.PI,lat:Math.asin(-o)*180/Math.PI}}function Qs(n,e){return Jo(Se(n),Me(e))}function zr(n,e){let t=n*Math.PI/180,o=Vo(e)*Math.PI/180,r=Math.cos(o),i=Math.sin(o);return {east:[Math.cos(t),0,-Math.sin(t)],south:[i*Math.sin(t),r,i*Math.cos(t)],up:[r*Math.sin(t),-i,r*Math.cos(t)]}}function zi(n,e,t){let o=n[0]*e,r=n[1]*e,i=n[2]*e;return [o*t.east[0]+r*t.east[1]+i*t.east[2],o*t.south[0]+r*t.south[1]+i*t.south[2],o*t.up[0]+r*t.up[1]+i*t.up[2]-e]}function qs(n,e,t,o,r){let i=n-t;return i>.5&&(i-=1),i<-0.5&&(i+=1),[i*r,(e-o)*r,0]}function Ni(n,e,t,o,r,i,a,l){let s=zi(Qs(n,e),r,a);if(l<=0)return s;let c=qs(n,e,t,o,i);return [s[0]+(c[0]-s[0])*l,s[1]+(c[1]-s[1])*l,s[2]+(c[2]-s[2])*l]}function Nr(n,e,t){let o=n[0]*e[0]+n[1]*e[1]+n[2]*e[2],r=n[0]**2+n[1]**2+n[2]**2-t*t,i=o*o-r;if(i<0)return null;let a=-o-Math.sqrt(i);return a<0?null:[n[0]+e[0]*a,n[1]+e[1]*a,n[2]+e[2]*a]}var Ki=1e3,$s=2,Ui=84,ec=.42,Jt=class n{constructor(){this.width=0;this.height=0;this.minZoom=0;this.maxZoom=22;this.minPitch=0;this.maxPitch=75;this._center={lng:0,lat:0};this._zoom=0;this._bearing=0;this._pitch=0;this._fov=at(36.87);this._worldSize=512;this._pixelsPerMeter=1;this._cameraToCenterDistance=0;this._centerX=0;this._centerY=0;this._projMatrix=N();this._viewProjPx=N();this._viewMatrix=N();this._pixelMatrix=N();this._pixelMatrixInverse=N();this._cameraPosPx=[0,0,0];this._frustumPlanes=[];this._dirty=true;this.projection="mercator";this._f32=new Float32Array(16);this._tileMatrix=N();this._localView=N();this._localProj=N();this._localPixel=N();this._localPixelInverse=N();this._localF32=new Float32Array(16);this._globeBasis={east:[1,0,0],south:[0,1,0],up:[0,0,1]};this._objectF32=new Float32Array(16);this._objectMatrix=N();this._shadowView=N();this._shadowProj=N();this._shadowVP=N();this._shadowVPm=N();this._shadowTile=N();this._shadowObject=N();this._shadowTile32=new Float32Array(16);this._shadowObject32=new Float32Array(16);this._shadowValid=false;this._calc();}get center(){return {...this._center}}set center(e){this._center={lng:e.lng,lat:e.lat},this._dirty=true;}globeMinZoom(){let e=Math.max(Math.min(this.width,this.height),1),t=ec*e*2*Math.PI/512;return Math.log2(Math.max(t,1e-6))}effectiveMinZoom(){return this.projection==="globe"?Math.max(this.minZoom,this.globeMinZoom()):this.minZoom}get zoom(){return this._zoom}set zoom(e){let t=_e(e,this.effectiveMinZoom(),this.maxZoom);t!==this._zoom&&(this._zoom=t,this._dirty=true);}get bearing(){return this._bearing}set bearing(e){let t=gt(e);t!==this._bearing&&(this._bearing=t,this._dirty=true);}get pitch(){return this._pitch}set pitch(e){let t=this.projection==="globe"&&this._zoom<st?Math.min(this.maxPitch,Ut):this.maxPitch,o=_e(e,this.minPitch,t);o!==this._pitch&&(this._pitch=o,this._dirty=true);}get fov(){return Ti(this._fov)}set fov(e){let t=at(_e(e,1,89));t!==this._fov&&(this._fov=t,this._dirty=true);}resize(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this._dirty=true);}get worldSize(){return this._ensure(),this._worldSize}get pixelsPerMeter(){return this._ensure(),this._pixelsPerMeter}get cameraToCenterDistance(){return this._ensure(),this._cameraToCenterDistance}get cameraPositionPx(){return this._ensure(),this._cameraPosPx}get projMatrix(){return this._ensure(),this._projMatrix}get viewMatrix(){return this._ensure(),this._viewMatrix}get centerPointPx(){return this._ensure(),{x:this._centerX,y:this._centerY}}clone(){let e=new n;return e.width=this.width,e.height=this.height,e.minZoom=this.minZoom,e.maxZoom=this.maxZoom,e.minPitch=this.minPitch,e.maxPitch=this.maxPitch,e._center={...this._center},e._zoom=this._zoom,e._bearing=this._bearing,e._pitch=this._pitch,e._fov=this._fov,e._dirty=true,e}project(e,t=0){this._ensure();let o=[re(e.lng)*this._worldSize,ne(e.lat)*this._worldSize,t,1],r=[0,0,0,0];ce(r,this._pixelMatrix,o);let i=r[3]||1e-9;return {x:r[0]/i,y:r[1]/i}}worldPxToPoint(e,t,o=0){if(this._ensure(),this.globeActive){let i=this.globeLocal(e/this._worldSize,t/this._worldSize),a={lng:Se(e/this._worldSize),lat:Me(t/this._worldSize)};return this.isOnGlobeFront(a.lng,a.lat,0)?(i[2]+=o*this._pixelsPerMeter,this.localToPoint(i)):null}let r=[0,0,0,0];return ce(r,this._pixelMatrix,[e,t,o,1]),r[3]<=1e-6?null:{x:r[0]/r[3],y:r[1]/r[3]}}unproject(e){if(this.globeActive){let o=this.globeUnproject(e);if(o)return o}let t=this.pointToWorldPx(e);return {lng:Se(t.x/this._worldSize),lat:Me(t.y/this._worldSize)}}pointToWorldPx(e){this._ensure();let t=[0,0,0,0],o=[0,0,0,0];ce(t,this._pixelMatrixInverse,[e.x,e.y,0,1]),ce(o,this._pixelMatrixInverse,[e.x,e.y,1,1]);let r=t[3]||1e-9,i=o[3]||1e-9,a={x:t[0]/r,y:t[1]/r,z:t[2]/r},l={x:o[0]/i,y:o[1]/i,z:o[2]/i},s=l.z-a.z,c=Math.abs(s)<1e-9?1:(0-a.z)/s,u=_e(c,-1e6,1e6);return {x:a.x+(l.x-a.x)*u,y:a.y+(l.y-a.y)*u}}setLocationAtPoint(e,t){if(this._ensure(),this.globeActive){let l=this.globeUnproject(t);if(!l)return;let s=gt(this._center.lng+(e.lng-l.lng)),c=_e(this._center.lat+(e.lat-l.lat),-Ui,Ui);this._center={lng:s,lat:c},this._dirty=true;return}let o=this.pointToWorldPx(t),r={x:re(e.lng)*this._worldSize,y:ne(e.lat)*this._worldSize},i=r.x-o.x,a=r.y-o.y;this._center={lng:Se((this._centerX+i)/this._worldSize),lat:Me((this._centerY+a)/this._worldSize)},this._dirty=true;}tileMatrix(e,t){this._ensure();let o=e.bounds(),r=(o.maxX-o.minX)*this._worldSize/t,i=this._tileMatrix;return We(i,this._projMatrix,o.minX*this._worldSize,o.minY*this._worldSize,0),Oe(i,i,r,r,1),Ue(this._f32,i)}tileMatrix64(e,t,o=N()){this._ensure();let r=e.bounds(),i=(r.maxX-r.minX)*this._worldSize/t;return We(o,this._projMatrix,r.minX*this._worldSize,r.minY*this._worldSize,0),Oe(o,o,i,i,1),o}objectMatrix(e,t,o=0){this._ensure();let r=this._objectMatrix;return We(r,this._projMatrix,e*this._worldSize,t*this._worldSize,o),Oe(r,r,this._worldSize,this._worldSize,1),Ue(this._objectF32,r)}horizonScreenY(){this._ensure();let e=Math.PI/2-at(this._pitch),o=this.height/2/Math.tan(this._fov/2)*Math.tan(Math.min(e,at(89.5)));return this.height/2-Math.min(o,this.height*50)}get globeActive(){return this._ensure(),this.projection==="globe"&&this._zoom<st}get globeFlatMix(){return this._ensure(),Uo(this._zoom)}get globeRadiusPx(){return this._ensure(),Ko(this._worldSize)}get globeBasis(){return this._ensure(),this._globeBasis}get localProjMatrix(){return this._ensure(),this._localProj}globeCamera(){this._ensure();let e=this.globeRadiusPx,t=N();if(!Ve(t,this._localView))return {dir:[0,0,1],horizonCos:1};let o=t[12],r=t[13],i=t[14]+e,a=Math.hypot(o,r,i)||1;return {dir:[o/a,r/a,i/a],horizonCos:e/Math.max(a,e+1e-6)}}localRayCorners(){this._ensure();let e=this.width,t=this.height;return [[0,0],[e,0],[0,t],[e,t]].map(([r,i])=>{let a=[0,0,0,0],l=[0,0,0,0];ce(a,this._localPixelInverse,[r,i,0,1]),ce(l,this._localPixelInverse,[r,i,1,1]);let s=a[3]||1e-9,c=l[3]||1e-9,u=l[0]/c-a[0]/s,h=l[1]/c-a[1]/s,f=l[2]/c-a[2]/s,d=Math.hypot(u,h,f)||1;return [u/d,h/d,f/d]})}globeDisc(){this._ensure();let e=this.globeCamera();return {dir:[-e.dir[0],-e.dir[1],-e.dir[2]],angle:Math.asin(Math.min(e.horizonCos,1))}}localMatrix(){return this._ensure(),Ue(this._localF32,this._localProj)}globeLocal(e,t){return this._ensure(),Ni(e,t,this._centerX/this._worldSize,this._centerY/this._worldSize,this.globeRadiusPx,this._worldSize,this._globeBasis,Uo(this._zoom))}localToPoint(e){this._ensure();let t=[0,0,0,0];return ce(t,this._localPixel,[e[0],e[1],e[2],1]),t[3]<=1e-6?null:{x:t[0]/t[3],y:t[1]/t[3]}}globeUnproject(e){this._ensure();let t=[0,0,0,0],o=[0,0,0,0];ce(t,this._localPixelInverse,[e.x,e.y,0,1]),ce(o,this._localPixelInverse,[e.x,e.y,1,1]);let r=t[3]||1e-9,i=o[3]||1e-9,a=this.globeRadiusPx,l=[t[0]/r,t[1]/r,t[2]/r+a],s=[o[0]/i-l[0],o[1]/i-l[1],o[2]/i+a-l[2]],c=Math.hypot(s[0],s[1],s[2])||1,u=[s[0]/c,s[1]/c,s[2]/c],h=Nr(l,u,a);if(!h)return null;let f=this._globeBasis,d=[h[0]/a,h[1]/a,h[2]/a],p=[d[0]*f.east[0]+d[1]*f.south[0]+d[2]*f.up[0],d[0]*f.east[1]+d[1]*f.south[1]+d[2]*f.up[1],d[0]*f.east[2]+d[1]*f.south[2]+d[2]*f.up[2]];return Vr(p)}isOnGlobeFront(e,t,o=.06){this._ensure();let r=this.globeCamera(),i=this._globeBasis,a=Jo(e,t),l=[a[0]*i.east[0]+a[1]*i.east[1]+a[2]*i.east[2],a[0]*i.south[0]+a[1]*i.south[1]+a[2]*i.south[2],a[0]*i.up[0]+a[1]*i.up[1]+a[2]*i.up[2]];return l[0]*r.dir[0]+l[1]*r.dir[1]+l[2]*r.dir[2]>=r.horizonCos-o}updateShadow(e,t){this._ensure();let o=Math.max(this.width,this.height)*$s,r=N();if(!Ve(r,this._viewProjPx))return;let i=this._cameraPosPx,a=[],l=[0,0,0,0];for(let w of [-1,1])for(let x of [-1,1])for(let _ of [-1,1]){if(ce(l,r,[w,x,_,1]),l[3]===0)continue;let C=l[0]/l[3],v=l[1]/l[3],E=C-i[0],M=v-i[1],F=Math.hypot(E,M);if(F>o){let H=o/F;C=i[0]+E*H,v=i[1]+M*H;}a.push({x:C,y:v,z:0});}if(!a.length)return;let s=zo(e),c=Math.abs(s[2])>.999?[0,1,0]:[0,0,1],u=this._shadowView;Vi(u,[this._centerX,this._centerY,0],[this._centerX+s[0],this._centerY+s[1],s[2]],c);let h=Math.min(t*this._pixelsPerMeter,o),f=1/0,d=1/0,p=1/0,m=-1/0,b=-1/0,y=-1/0,g=[0,0,0,0];for(let w of a)for(let x of [0,h])ce(g,u,[w.x,w.y,x,1]),g[0]<f&&(f=g[0]),g[0]>m&&(m=g[0]),g[1]<d&&(d=g[1]),g[1]>b&&(b=g[1]),g[2]<p&&(p=g[2]),g[2]>y&&(y=g[2]);let A=h+1,B=this._shadowProj;Wi(B,f,m,d,b,-y-A,-p+A),Ee(this._shadowVP,B,u),Oe(this._shadowVPm,this._shadowVP,1,1,this._pixelsPerMeter),this._shadowValid=true;}get shadowReady(){return this._shadowValid}shadowObjectMatrix(e,t,o=0){this._ensure();let r=this._shadowObject;return We(r,this._shadowVPm,e*this._worldSize,t*this._worldSize,o),Oe(r,r,this._worldSize,this._worldSize,1),Ue(this._shadowObject32,r)}shadowTileMatrix(e,t){this._ensure();let o=e.bounds(),r=(o.maxX-o.minX)*this._worldSize/t,i=this._shadowTile;return We(i,this._shadowVPm,o.minX*this._worldSize,o.minY*this._worldSize,0),Oe(i,i,r,r,1),Ue(this._shadowTile32,i)}shadowDepthPerMeter(){return this._ensure(),Math.abs(this._shadowVPm[10])}shadowTexelWorldSize(e){return 2/(this._shadowVP[0]*e||1)}isTileVisible(e){this._ensure();let t=e.bounds(),o=t.minX*this._worldSize,r=t.maxX*this._worldSize,i=t.minY*this._worldSize,a=t.maxY*this._worldSize,l=Ki*this._pixelsPerMeter;for(let s of this._frustumPlanes){let c=s[0]>0?r:o,u=s[1]>0?a:i,h=s[2]>0?l:0;if(s[0]*c+s[1]*u+s[2]*h+s[3]<0)return false}return true}isSphereVisible(e,t,o,r){this._ensure();let i=e*this._worldSize,a=t*this._worldSize,l=o*this._pixelsPerMeter,s=r*this._pixelsPerMeter;for(let c of this._frustumPlanes)if(c[0]*i+c[1]*a+c[2]*l+c[3]<-s)return false;return true}distanceToTile(e){this._ensure();let t=e.bounds(),[o,r,i]=this._cameraPosPx,a=Math.max(t.minX*this._worldSize-o,0,o-t.maxX*this._worldSize),l=Math.max(t.minY*this._worldSize-r,0,r-t.maxY*this._worldSize),s=Math.max(0-i,0,i-Ki*this._pixelsPerMeter);return Math.hypot(a,l,s)}get flatFarDistance(){return this._ensure(),Math.hypot(this._cameraToCenterDistance,this.width/2,this.height/2)}detailZoom(e){return this._ensure(),this._zoom-Math.max(0,Math.log2(Math.max(e,1)/this.flatFarDistance))}_ensure(){this._dirty&&this._calc();}_calc(){this._dirty=false;let e=Qe(this._zoom);this._worldSize=e,this._pixelsPerMeter=Pr(1,this._center.lat)*e,this._centerX=re(this._center.lng)*e,this._centerY=ne(this._center.lat)*e;let t=Math.max(this.width,1),o=Math.max(this.height,1),r=at(this._pitch),i=-at(this._bearing),a=.5/Math.tan(this._fov/2)*o;this._cameraToCenterDistance=a;let l=Math.PI/2+r,s=this._fov/2,c=Math.sin(s)*a/Math.sin(_e(Math.PI-l-s,.01,Math.PI-.01)),u=Math.cos(Math.PI/2-r)*c+a,h=Math.min(u*1.01,a*30),f=o/50;if(this.projection==="globe"&&this._zoom<st){let g=Ko(e);f=Math.max(a-g*1.6,a*.02),h=a+g*2.4;}let d=this._viewMatrix;Oe(d,N(),1,-1,1),We(d,d,0,0,-a),Or(d,d,r),Wr(d,d,i),We(d,d,-this._centerX,-this._centerY,0);let p=N();Oi(p,this._fov,t/o,f,h),Ee(this._viewProjPx,p,d);let m=N();Oe(m,d,1,1,this._pixelsPerMeter),Ee(this._projMatrix,p,m);let b=this._localView;Oe(b,N(),1,-1,1),We(b,b,0,0,-a),Or(b,b,r),Wr(b,b,i),Ee(this._localProj,p,b),this._globeBasis=zr(this._center.lng,this._center.lat);let y=N();Oe(y,N(),t/2,-o/2,1),We(y,y,1,-1,0),Ee(this._pixelMatrix,y,this._projMatrix),Ve(this._pixelMatrixInverse,this._pixelMatrix)||console.warn("[osmgl] \u043C\u0430\u0442\u0440\u0438\u0446\u0430 \u043A\u0430\u043C\u0435\u0440\u044B \u0432\u044B\u0440\u043E\u0436\u0434\u0435\u043D\u0430, unproject \u0434\u0430\u0441\u0442 \u043C\u0443\u0441\u043E\u0440"),Ee(this._localPixel,y,this._localProj),Ve(this._localPixelInverse,this._localPixel),this._calcCameraPosition(),this._calcFrustum();}_calcCameraPosition(){let e=N();if(!Ve(e,this._viewMatrix)){this._cameraPosPx=[this._centerX,this._centerY,this._cameraToCenterDistance];return}this._cameraPosPx=[e[12],e[13],e[14]];}_calcFrustum(){let e=N();if(!Ve(e,this._viewProjPx)){this._frustumPlanes=[];return}let t=[];for(let l of [-1,1])for(let s of [-1,1])for(let c of [-1,1]){let u=[0,0,0,0];ce(u,e,[c,s,l,1]);let h=u[3]||1e-9;t.push([u[0]/h,u[1]/h,u[2]/h]);}let o=[[0,1,2],[6,5,4],[0,2,4],[5,3,1],[0,4,1],[3,6,2]];this._frustumPlanes=o.map(([l,s,c])=>{let u=t[l],h=t[s],f=t[c],d=h[0]-u[0],p=h[1]-u[1],m=h[2]-u[2],b=f[0]-u[0],y=f[1]-u[1],g=f[2]-u[2],A=p*g-m*y,B=m*b-d*g,w=d*y-p*b,x=Math.hypot(A,B,w)||1;A/=x,B/=x,w/=x;let _=new Float64Array(4);return _[0]=A,_[1]=B,_[2]=w,_[3]=-(A*u[0]+B*u[1]+w*u[2]),_});let r=0,i=0,a=0;for(let l of t)r+=l[0]/8,i+=l[1]/8,a+=l[2]/8;for(let l of this._frustumPlanes)l[0]*r+l[1]*i+l[2]*a+l[3]<0&&(l[0]=-l[0],l[1]=-l[1],l[2]=-l[2],l[3]=-l[3]);}tileScreenSize(e,t){return this._ensure(),this._worldSize/Math.pow(2,e)*this._cameraToCenterDistance/Math.max(t,1e-6)}visibleWrapRange(){this._ensure();let e=[this.pointToWorldPx({x:0,y:this.height}),this.pointToWorldPx({x:this.width,y:this.height}),this.pointToWorldPx({x:0,y:0}),this.pointToWorldPx({x:this.width,y:0})],t=1/0,o=-1/0;for(let r of e){let i=Math.floor(r.x/this._worldSize);i<t&&(t=i),i>o&&(o=i);}return !isFinite(t)||!isFinite(o)?{min:0,max:0}:{min:_e(t,-3,3),max:_e(o,-3,3)}}};var tc={dragPan:true,scrollZoom:true,dragRotate:true,touchZoomRotate:true,touchPitch:true,doubleClickZoom:true,keyboard:true,inertia:1},Ji=2,oc=100,rc=.5,nc=.1,ic=25,Xi=n=>Math.abs(n.y)>Math.abs(n.x);function Yi(n,e,t){let o=Math.hypot(n.x,n.y)>=Ji,r=Math.hypot(e.x,e.y)>=Ji;return !o&&!r?void 0:!o||!r?t<oc?void 0:false:n.y>0==e.y>0&&Xi(n)&&Xi(e)}function ji(n,e){let t=(n-e)*(180/Math.PI);for(;t>180;)t-=360;for(;t<=-180;)t+=360;return t}var ac=160,Kr=4,Xo=class{constructor(e,t,o,r,i={}){this.canvas=e;this.tr=t;this.onChange=o;this.onInteractionEnd=r;this.pointers=new G;this.dragMode="none";this.lastPoint={x:0,y:0};this.panAnchor=null;this.samples=[];this.inertiaRaf=0;this.touch=null;this.lastTapTime=0;this.disposed=false;this.onContextMenu=e=>{this.opts.dragRotate&&e.preventDefault();};this.onPointerDown=e=>{this.stopInertia(),this.canvas.setPointerCapture(e.pointerId),this.pointers.set(e.pointerId,this.point(e));let t=this.point(e);if(this.pointers.size===2){this.beginTouchGesture();return}if(this.pointers.size>2)return;(e.button===2||e.ctrlKey||e.metaKey)&&this.opts.dragRotate?this.dragMode="rotate":this.opts.dragPan&&(this.dragMode="pan",this.panAnchor=this.tr.unproject(t)),this.lastPoint=t,this.samples=[{t:performance.now(),x:t.x,y:t.y}],this.opts.keyboard&&this.canvas.focus({preventScroll:true});};this.onPointerMove=e=>{if(!this.pointers.has(e.pointerId))return;let t=this.point(e);if(this.pointers.set(e.pointerId,t),this.pointers.size>=2){this.updateTouchGesture();return}let o=t.x-this.lastPoint.x,r=t.y-this.lastPoint.y;this.lastPoint=t,this.pushSample(t),this.dragMode==="pan"&&this.panAnchor?(this.tr.setLocationAtPoint(this.panAnchor,t),this.onChange("pan")):this.dragMode==="rotate"&&(this.tr.bearing=this.tr.bearing-o*.4,this.tr.pitch=this.tr.pitch-r*.4,this.onChange("rotate"));};this.onPointerUp=e=>{if(this.pointers.has(e.pointerId)){if(this.pointers.delete(e.pointerId),this.canvas.hasPointerCapture(e.pointerId)&&this.canvas.releasePointerCapture(e.pointerId),this.pointers.size===1){let t=[...this.pointers.values()][0];this.touch=null,this.lastPoint=t,this.samples=[{t:performance.now(),x:t.x,y:t.y}],this.dragMode=this.opts.dragPan?"pan":"none",this.panAnchor=this.opts.dragPan?this.tr.unproject(t):null;return}if(this.pointers.size>0){this.pointers.size>=2&&this.beginTouchGesture();return}if(this.touch=null,this.dragMode==="pan"&&this.opts.inertia>0&&this.startInertia(),this.dragMode="none",this.panAnchor=null,this.opts.doubleClickZoom&&e.pointerType!=="touch"){let t=performance.now();t-this.lastTapTime<300?(this.zoomAround(this.point(e),e.shiftKey?-1:1),this.lastTapTime=0):this.lastTapTime=t;}this.onInteractionEnd();}};this.onWheel=e=>{if(!this.opts.scrollZoom)return;e.preventDefault(),this.stopInertia();let t=e.deltaY;e.deltaMode===1?t*=40:e.deltaMode===2&&(t*=800);let o=_e(-t/200,-2,2);this.zoomAround(this.point(e),o),this.onInteractionEnd();};this.onKeyDown=e=>{if(!this.opts.keyboard)return;let t=e.shiftKey?200:80,o={x:this.tr.width/2,y:this.tr.height/2},r=true;switch(e.key){case "ArrowLeft":e.shiftKey?this.rotateBy(-15,0):this.panBy(-t,0,o);break;case "ArrowRight":e.shiftKey?this.rotateBy(15,0):this.panBy(t,0,o);break;case "ArrowUp":e.shiftKey?this.rotateBy(0,10):this.panBy(0,-t,o);break;case "ArrowDown":e.shiftKey?this.rotateBy(0,-10):this.panBy(0,t,o);break;case "=":case "+":this.zoomAround(o,1);break;case "-":case "_":this.zoomAround(o,-1);break;default:r=false;}r&&(e.preventDefault(),this.onInteractionEnd());};this.opts={...tc,...i},this.bind();}setOptions(e){this.opts={...this.opts,...e};}bind(){let e=this.canvas;e.addEventListener("pointerdown",this.onPointerDown),e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerup",this.onPointerUp),e.addEventListener("pointercancel",this.onPointerUp),e.addEventListener("wheel",this.onWheel,{passive:false}),e.addEventListener("contextmenu",this.onContextMenu),e.addEventListener("keydown",this.onKeyDown),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0"),e.style.touchAction="none";}point(e){let t=this.canvas.getBoundingClientRect();return {x:e.clientX-t.left,y:e.clientY-t.top}}beginTouchGesture(){let[e,t]=[...this.pointers.values()],o=t.x-e.x,r=t.y-e.y,i=Math.hypot(o,r);this.touch={mode:void 0,lastA:e,lastB:t,startA:e,startB:t,startDist:i,startAngle:Math.atan2(r,o),minDist:i,zoomActive:false,rotateActive:false,firstMoveAt:0,pitchPossible:Math.abs(o)>=Math.abs(r)},this.dragMode="none",this.panAnchor=null;}updateTouchGesture(){let e=this.touch;if(!e)return;let[t,o]=[...this.pointers.values()],r={x:t.x-e.lastA.x,y:t.y-e.lastA.y},i={x:o.x-e.lastB.x,y:o.y-e.lastB.y};if(e.mode===void 0){!e.firstMoveAt&&(Math.hypot(r.x,r.y)>0||Math.hypot(i.x,i.y)>0)&&(e.firstMoveAt=performance.now());let a=e.pitchPossible&&this.opts.touchPitch?Yi(r,i,e.firstMoveAt?performance.now()-e.firstMoveAt:0):false;if(a===void 0)return;e.mode=a?"pitch":"zoomRotate";}if(e.mode==="pitch"){let a=(r.y+i.y)/2;a!==0&&(this.tr.pitch=this.tr.pitch-a*rc,this.onChange("pitch"));}else this.opts.touchZoomRotate&&this.applyZoomRotate(e,t,o);e.lastA=t,e.lastB=o;}applyZoomRotate(e,t,o){let r=Math.hypot(o.x-t.x,o.y-t.y),i=Math.atan2(o.y-t.y,o.x-t.x),a={x:(e.lastA.x+e.lastB.x)/2,y:(e.lastA.y+e.lastB.y)/2},l={x:(t.x+o.x)/2,y:(t.y+o.y)/2},s=this.tr.unproject(a),c="pan",u=Math.hypot(e.lastB.x-e.lastA.x,e.lastB.y-e.lastA.y);if(r>0&&u>0&&e.startDist>0&&(!e.zoomActive&&Math.abs(Math.log2(r/e.startDist))>=nc&&(e.zoomActive=true),e.zoomActive)){let h=Math.log2(r/u);h!==0&&(this.tr.zoom=this.tr.zoom+h,c="zoom");}if(this.opts.dragRotate){e.minDist=Math.min(e.minDist,r);let h=ic/Math.max(Math.PI*e.minDist,1)*360;if(!e.rotateActive&&Math.abs(ji(i,e.startAngle))>=h&&(e.rotateActive=true),e.rotateActive){let f=Math.atan2(e.lastB.y-e.lastA.y,e.lastB.x-e.lastA.x),d=ji(i,f);d!==0&&(this.tr.bearing=this.tr.bearing-d,c==="pan"&&(c="rotate"));}}this.tr.setLocationAtPoint(s,l),this.onChange(c);}zoomAround(e,t){let o=this.tr.unproject(e);this.tr.zoom=this.tr.zoom+t,this.tr.setLocationAtPoint(o,e),this.onChange("zoom");}panBy(e,t,o){let r=this.tr.unproject(o);this.tr.setLocationAtPoint(r,{x:o.x-e,y:o.y-t}),this.onChange("pan");}rotateBy(e,t){e&&(this.tr.bearing=this.tr.bearing+e),t&&(this.tr.pitch=this.tr.pitch+t),this.onChange("rotate");}pushSample(e){let t=performance.now();for(this.samples.push({t,x:e.x,y:e.y});this.samples.length>2&&t-this.samples[0].t>ac;)this.samples.shift();}startInertia(){if(this.samples.length<2)return;let e=this.samples[0],t=this.samples[this.samples.length-1],o=t.t-e.t;if(o<8||performance.now()-t.t>60)return;let r=(t.x-e.x)/o*this.opts.inertia,i=(t.y-e.y)/o*this.opts.inertia,a=Math.hypot(r,i);if(a<.05)return;a>Kr&&(r=r/a*Kr,i=i/a*Kr);let l=performance.now(),s=()=>{if(this.disposed)return;let c=performance.now(),u=Math.min(c-l,34);l=c;let h=Math.exp(-25e-4*u*10);if(r*=h,i*=h,Math.hypot(r,i)<.01){this.inertiaRaf=0,this.onInteractionEnd();return}let f={x:this.tr.width/2,y:this.tr.height/2};this.panBy(-r*u,-i*u,f),this.inertiaRaf=requestAnimationFrame(s);};this.inertiaRaf=requestAnimationFrame(s);}stopInertia(){this.inertiaRaf&&cancelAnimationFrame(this.inertiaRaf),this.inertiaRaf=0;}destroy(){this.disposed=true,this.stopInertia();let e=this.canvas;e.removeEventListener("pointerdown",this.onPointerDown),e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("pointercancel",this.onPointerUp),e.removeEventListener("wheel",this.onWheel),e.removeEventListener("contextmenu",this.onContextMenu),e.removeEventListener("keydown",this.onKeyDown),this.pointers.clear();}};var ve=class{constructor(e,t,o,r=false){this.ctx=e;this.layout=o;let i=e.gl,a=i.createBuffer();if(!a)throw new Error("[osmgl] createBuffer \u0432\u0435\u0440\u043D\u0443\u043B null");this.buffer=a,e.bindVAO(null),i.bindBuffer(i.ARRAY_BUFFER,a),i.bufferData(i.ARRAY_BUFFER,t,r?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.byteLength=t.byteLength;}update(e,t=0){let o=this.ctx.gl;o.bindBuffer(o.ARRAY_BUFFER,this.buffer),o.bufferSubData(o.ARRAY_BUFFER,t,e);}destroy(){this.ctx.gl.deleteBuffer(this.buffer);}},be=class{constructor(e,t){this.ctx=e;let o=e.gl,r=o.createBuffer();if(!r)throw new Error("[osmgl] createBuffer \u0432\u0435\u0440\u043D\u0443\u043B null");this.buffer=r,e.bindVAO(null),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,r),o.bufferData(o.ELEMENT_ARRAY_BUFFER,t,o.STATIC_DRAW),this.count=t.length,this.type=t instanceof Uint32Array?o.UNSIGNED_INT:o.UNSIGNED_SHORT;}destroy(){this.ctx.gl.deleteBuffer(this.buffer);}},fe=class{constructor(e,t,o){this.ctx=e;let r=e.gl,i=r.createVertexArray();if(!i)throw new Error("[osmgl] createVertexArray \u0432\u0435\u0440\u043D\u0443\u043B null");this.vao=i,e.bindVAO(i);for(let{buffer:a,locations:l}of t){r.bindBuffer(r.ARRAY_BUFFER,a.buffer);for(let s of a.layout.attribs){let c=l.get(s.name);c===void 0||c<0||(r.enableVertexAttribArray(c),s.integer?r.vertexAttribIPointer(c,s.size,s.type,a.layout.stride,s.offset):r.vertexAttribPointer(c,s.size,s.type,s.normalized??false,a.layout.stride,s.offset),s.divisor&&r.vertexAttribDivisor(c,s.divisor));}}o&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,o.buffer),e.bindVAO(null);}bind(){this.ctx.bindVAO(this.vao);}destroy(){this.ctx.gl.deleteVertexArray(this.vao);}};var sc=["a_pos","a_height","a_tint","a_ao","a_normal","a_kind","a_level","a_wall","a_p0","a_p1","a_corner","a_width","a_dist","a_tex"],ye=class{constructor(e,t,o,r,i={}){this.ctx=e;this.name=t;this.uniforms=new G;this.attribs=new G;let a=e.gl,l=cc(i),s=Qi(a,a.VERTEX_SHADER,Zi(o,l),`${t}.vert`),c=Qi(a,a.FRAGMENT_SHADER,Zi(r,l),`${t}.frag`),u=a.createProgram();if(!u)throw new Error(`[osmgl] \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0443 ${t}`);if(a.attachShader(u,s),a.attachShader(u,c),sc.forEach((h,f)=>a.bindAttribLocation(u,f,h)),a.linkProgram(u),a.detachShader(u,s),a.detachShader(u,c),a.deleteShader(s),a.deleteShader(c),!a.getProgramParameter(u,a.LINK_STATUS)){let h=a.getProgramInfoLog(u);throw a.deleteProgram(u),new Error(`[osmgl] \u043B\u0438\u043D\u043A\u043E\u0432\u043A\u0430 ${t} \u043D\u0435 \u043F\u0440\u043E\u0448\u043B\u0430: ${h}`)}this.program=u,this.cacheLocations();}cacheLocations(){let e=this.ctx.gl,t=e.getProgramParameter(this.program,e.ACTIVE_UNIFORMS);for(let r=0;r<t;r++){let i=e.getActiveUniform(this.program,r);if(!i)continue;let a=i.name.replace(/\[0\]$/,"");this.uniforms.set(a,e.getUniformLocation(this.program,i.name));}let o=e.getProgramParameter(this.program,e.ACTIVE_ATTRIBUTES);for(let r=0;r<o;r++){let i=e.getActiveAttrib(this.program,r);i&&this.attribs.set(i.name,e.getAttribLocation(this.program,i.name));}}use(){this.ctx.useProgram(this.program);}attribLocation(e){return this.attribs.get(e)??-1}loc(e){return this.uniforms.get(e)??null}setMat4(e,t){let o=this.loc(e);o&&this.ctx.gl.uniformMatrix4fv(o,false,t);}setMat3(e,t){let o=this.loc(e);o&&this.ctx.gl.uniformMatrix3fv(o,false,t);}setFloat(e,t){let o=this.loc(e);o&&this.ctx.gl.uniform1f(o,t);}setInt(e,t){let o=this.loc(e);o&&this.ctx.gl.uniform1i(o,t);}setVec2(e,t,o){let r=this.loc(e);r&&this.ctx.gl.uniform2f(r,t,o);}setVec3(e,t,o,r){let i=this.loc(e);i&&this.ctx.gl.uniform3f(i,t,o,r);}setVec4(e,t,o,r,i){let a=this.loc(e);a&&this.ctx.gl.uniform4f(a,t,o,r,i);}setVec4v(e,t){let o=this.loc(e);o&&this.ctx.gl.uniform4f(o,t[0],t[1],t[2],t[3]);}setVec4Array(e,t){let o=this.loc(e)??this.loc(`${e}[0]`);o&&this.ctx.gl.uniform4fv(o,t);}destroy(){this.ctx.gl.deleteProgram(this.program),this.uniforms.clear(),this.attribs.clear();}};function cc(n){let e=[];for(let[t,o]of Object.entries(n))o!==false&&e.push(o===true?`#define ${t}`:`#define ${t} ${o}`);return e.join(`
|
|
2
|
+
`)}function Zi(n,e){if(!e)return n;let t=n.match(/^\s*#version[^\n]*\n/);return t?n.slice(0,t[0].length)+e+`
|
|
3
3
|
`+n.slice(t[0].length):`${e}
|
|
4
|
-
${n}`}function
|
|
4
|
+
${n}`}function Qi(n,e,t,o){let r=n.createShader(e);if(!r)throw new Error(`[osmgl] \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0448\u0435\u0439\u0434\u0435\u0440 ${o}`);if(n.shaderSource(r,t),n.compileShader(r),!n.getShaderParameter(r,n.COMPILE_STATUS)){let i=n.getShaderInfoLog(r)??"";throw n.deleteShader(r),new Error(`[osmgl] \u043A\u043E\u043C\u043F\u0438\u043B\u044F\u0446\u0438\u044F ${o} \u043D\u0435 \u043F\u0440\u043E\u0448\u043B\u0430:
|
|
5
5
|
${i}
|
|
6
|
-
${
|
|
6
|
+
${fc(t)}`)}return r}function fc(n){return n.split(`
|
|
7
7
|
`).map((e,t)=>`${String(t+1).padStart(4)} | ${e}`).join(`
|
|
8
|
-
`)}var kt=new Set,Cr=false;function Se(n,e,t=2){let o=e&&e.length,r=o?e[0]*t:n.length;kt.size&&kt.clear();let i=pi(n,0,r,t,true),a=[];if(!i||i.next===i.prev)return a;let l=0,s=0,c=0;if(o&&(i=ms(n,e,i,t)),n.length>80*t){l=n[0],s=n[1];let u=l,m=s;for(let f=t;f<r;f+=t){let d=n[f],h=n[f+1];d<l&&(l=d),h<s&&(s=h),d>u&&(u=d),h>m&&(m=h);}c=Math.max(u-l,m-s),c=c!==0?32767/c:0;}return vr(i,a,l,s,c),a}function pi(n,e,t,o,r){let i=null;if(r===Fs(n,e,t,o)>0)for(let a=e;a<t;a+=o)i=mi(a/o|0,n[a],n[a+1],i);else for(let a=t-o;a>=e;a-=o)i=mi(a/o|0,n[a],n[a+1],i);return i&&Gt(i,i.next)&&(Ot(i),i=i.next),i}function tt(n,e=n){let t=e===n,o=n,r;do r=false,o!==o.next&&(kt.size===0||!kt.has(o))&&(Gt(o,o.next)||se(o.prev,o,o.next)===0)?((t||o===e)&&(e=o.prev),Cr=true,Ot(o),o=o.prev,r=true):(t||o!==e)&&(o=o.next,r=!t);while(r||o!==e);return e}function vr(n,e,t,o,r){r&&Cs(n,t,o,r);let i=n,a=false;for(;n.prev!==n.next;){let l=n.prev,s=n.next;if(se(l,n,s)<0&&(r?us(n,t,o,r):fs(n))){e.push(l.i,n.i,s.i),Ot(n),n=s,i=s;continue}if(n=s,n===i){if(Cr=false,n=tt(n),Cr){i=n;continue}if(!a){n=ds(n,e),i=n,a=true;continue}hs(n,e,t,o,r);break}}}function fs(n){let e=n.prev,t=n,o=n.next,r=e.x,i=t.x,a=o.x,l=e.y,s=t.y,c=o.y,u=Math.min(r,i,a),m=Math.min(l,s,c),f=Math.max(r,i,a),d=Math.max(l,s,c),h=o.next;for(;h!==e;){if(h.x>=u&&h.x<=f&&h.y>=m&&h.y<=d&&!(r===h.x&&l===h.y)&&Ho(r,l,i,s,a,c,h.x,h.y)&&se(h.prev,h,h.next)>=0)return false;h=h.next;}return true}function us(n,e,t,o){let r=n.prev,i=n,a=n.next,l=r.x,s=i.x,c=a.x,u=r.y,m=i.y,f=a.y,d=Math.min(l,s,c),h=Math.min(u,m,f),p=Math.max(l,s,c),b=Math.max(u,m,f),A=Dr(d,h,e,t,o),y=Dr(p,b,e,t,o),g=n.prevZ;for(;g&&g.z>=A;){if(g.x>=d&&g.x<=p&&g.y>=h&&g.y<=b&&g!==a&&!(l===g.x&&u===g.y)&&Ho(l,u,s,m,c,f,g.x,g.y)&&se(g.prev,g,g.next)>=0)return false;g=g.prevZ;}let B=n.nextZ;for(;B&&B.z<=y;){if(B.x>=d&&B.x<=p&&B.y>=h&&B.y<=b&&B!==a&&!(l===B.x&&u===B.y)&&Ho(l,u,s,m,c,f,B.x,B.y)&&se(B.prev,B,B.next)>=0)return false;B=B.nextZ;}return true}function ds(n,e){let t=n,o=false;do{let r=t.prev,i=t.next.next;yi(r,t,t.next,i,false)&&Rt(r,i)&&Rt(i,r)&&(e.push(r.i,t.i,i.i),Ot(t),Ot(t.next),t=n=i,o=true),t=t.next;}while(t!==n);return o?tt(t):t}function hs(n,e,t,o,r){let i=n;do{let a=i.next.next;for(;a!==i.prev;){if(i.i!==a.i&&xs(i,a)){let l=gi(i,a);i=tt(i,i.next),l=tt(l,l.next),vr(i,e,t,o,r),vr(l,e,t,o,r);return}a=a.next;}i=i.next;}while(i!==n)}var wr=false;function ms(n,e,t,o){let r=[];for(let i=0,a=e.length;i<a;i++){let l=e[i]*o,s=i<a-1?e[i+1]*o:n.length,c=pi(n,l,s,o,false);c===c.next&&kt.add(c),r.push(ws(c));}r.sort(ps),As(n.length/o,e.length),Ai(t,t),wr=true;for(let i=0;i<r.length;i++)t=bs(r[i],t);return wr=false,tt(t)}function ps(n,e){return n.x-e.x||n.y-e.y||(n.next.y-n.y)/(n.next.x-n.x)-(e.next.y-e.y)/(e.next.x-e.x)}function bs(n,e){let t=gs(n,e);if(!t)return e;let o=gi(t,n),r=o.next;return Ai(t,r.next),tt(o,o.next),tt(t,t.next)}var bi=16,re=new Float64Array(0),Lo=0,xr=[],_r=[];function As(n,e){let t=Math.ceil((n+2*e)/bi)+e+2;re.length<t*4&&(re=new Float64Array(t*4)),Lo=0;}function Ai(n,e){let t=n;do{let o=Lo++;xr[o]=t;let r=1/0,i=1/0,a=-1/0,l=-1/0,s=0;do{let u=t.next;t.z=o,t.x<r&&(r=t.x),t.x>a&&(a=t.x),t.y<i&&(i=t.y),t.y>l&&(l=t.y),u.x<r&&(r=u.x),u.x>a&&(a=u.x),u.y<i&&(i=u.y),u.y>l&&(l=u.y),t=u;}while(++s<bi&&t!==e);_r[o]=t;let c=o*4;re[c]=r,re[c+1]=i,re[c+2]=a,re[c+3]=l;}while(t!==e)}function ys(n,e){let t=n.z*4;e.x<re[t]&&(re[t]=e.x),e.y<re[t+1]&&(re[t+1]=e.y),e.x>re[t+2]&&(re[t+2]=e.x),e.y>re[t+3]&&(re[t+3]=e.y);}function di(n){let e=_r[n];for(;e.prev.next!==e;)e=e.next;return _r[n]=e,e}function hi(n){let e=xr[n];for(;e.prev.next!==e;)e=e.next;return xr[n]=e,e}function gs(n,e){let t=e,o=n.x,r=n.y,i=-1/0,a;if(Gt(n,t))return t;for(let f=0,d=0;f<Lo;f++,d+=4){if(r<re[d+1]||r>re[d+3]||re[d]>o||re[d+2]<=i)continue;let h=di(f);t=hi(f);do{if(t.prev.next===t){if(Gt(n,t.next))return t.next;if(r<=t.y&&r>=t.next.y&&t.next.y!==t.y){let p=t.x+(r-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(p<=o&&p>i&&(i=p,a=t.x<t.next.x?t:t.next,p===o))return a}}t=t.next;}while(t!==h)}if(!a)return null;let l=a.x,s=a.y,c=Math.min(r,s),u=Math.max(r,s),m=1/0;for(let f=0,d=0;f<Lo;f++,d+=4){if(re[d+2]<l||re[d]>o||re[d+3]<c||re[d+1]>u)continue;let h=di(f);t=hi(f);do{if(t.prev.next===t&&o>=t.x&&t.x>=l&&o!==t.x&&Ho(r<s?o:i,r,l,s,r<s?i:o,r,t.x,t.y)){let p=Math.abs(r-t.y)/(o-t.x);(Rt(t,n)||t.y===r&&t.next.y===r&&t.next.x>o)&&(p<m||p===m&&(t.x>a.x||t.x===a.x&&Bs(a,t)))&&(a=t,m=p);}t=t.next;}while(t!==h)}return a}function Bs(n,e){return se(n.prev,n,e.prev)<0&&se(e.next,n,n.next)<0}var Ie=[],Ht=[],et=new Uint32Array(0),Tt=new Uint32Array(0),Pt=new Uint32Array(256);function Cs(n,e,t,o){let r=n,i=0;do r.z=Dr(r.x,r.y,e,t,o),Ie[i++]=r,r=r.next;while(r!==n);vs(i);let a=null;for(let l=0;l<i;l++){let s=Ie[l];s.prevZ=a,a&&(a.nextZ=s),a=s;}a.nextZ=null;}function vs(n){if(n<=32){for(let e=1;e<n;e++){let t=Ie[e],o=t.z,r=e-1;for(;r>=0&&Ie[r].z>o;)Ie[r+1]=Ie[r],r--;Ie[r+1]=t;}return}et.length<n&&(et=new Uint32Array(n),Tt=new Uint32Array(n),Ht=new Array(n));for(let e=0;e<n;e++)et[e]=Ie[e].z;Io(n,Ie,et,Ht,Tt,0),Io(n,Ht,Tt,Ie,et,8),Io(n,Ie,et,Ht,Tt,16),Io(n,Ht,Tt,Ie,et,24);}function Io(n,e,t,o,r,i){Pt.fill(0);for(let l=0;l<n;l++)Pt[t[l]>>>i&255]++;let a=0;for(let l=0;l<256;l++){let s=Pt[l];Pt[l]=a,a+=s;}for(let l=0;l<n;l++){let s=t[l],c=Pt[s>>>i&255]++;o[c]=e[l],r[c]=s;}}function Dr(n,e,t,o,r){return n=(n-t)*r|0,e=(e-o)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function ws(n){let e=n,t=n;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==n);return t}function Ho(n,e,t,o,r,i,a,l){return (r-a)*(e-l)>=(n-a)*(i-l)&&(n-a)*(o-l)>=(t-a)*(e-l)&&(t-a)*(i-l)>=(r-a)*(o-l)}function xs(n,e){let t=Gt(n,e)&&se(n.prev,n,n.next)>0&&se(e.prev,e,e.next)>0;return n.next.i!==e.i&&(t||Rt(n,e)&&Rt(e,n)&&(se(n.prev,n,e.prev)!==0||se(n,e.prev,e)!==0))&&!_s(n,e)&&(t||Ds(n,e))}function se(n,e,t){return (e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Gt(n,e){return n.x===e.x&&n.y===e.y}function yi(n,e,t,o,r=true){let i=se(n,e,t),a=se(n,e,o),l=se(t,o,n),s=se(t,o,e);return (i>0&&a<0||i<0&&a>0)&&(l>0&&s<0||l<0&&s>0)?true:r?!!(i===0&&So(n,t,e)||a===0&&So(n,o,e)||l===0&&So(t,n,o)||s===0&&So(t,e,o)):false}function So(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function _s(n,e){let t=Math.min(n.x,e.x),o=Math.max(n.x,e.x),r=Math.min(n.y,e.y),i=Math.max(n.y,e.y),a=n;do{let l=a.next;if(a.x>o&&l.x>o||a.x<t&&l.x<t||a.y>i&&l.y>i||a.y<r&&l.y<r){a=l;continue}if(a.i!==n.i&&l.i!==n.i&&a.i!==e.i&&l.i!==e.i&&yi(a,l,n,e))return true;a=l;}while(a!==n);return false}function Rt(n,e){return se(n.prev,n,n.next)<0?se(n,e,n.next)>=0&&se(n,n.prev,e)>=0:se(n,e,n.prev)<0||se(n,n.next,e)<0}function Ds(n,e){let t=n,o=false,r=(n.x+e.x)/2,i=(n.y+e.y)/2;do{let a=t.next;t.y>i!=a.y>i&&r<(a.x-t.x)*(i-t.y)/(a.y-t.y)+t.x&&(o=!o),t=a;}while(t!==n);return o}function gi(n,e){let t=Fr(n.i,n.x,n.y),o=Fr(e.i,e.x,e.y),r=n.next,i=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,o.next=t,t.prev=o,i.next=o,o.prev=i,o}function mi(n,e,t,o){let r=Fr(n,e,t);return o?(r.next=o.next,r.prev=o,o.next.prev=r,o.next=r):(r.prev=r,r.next=r),r}function Ot(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ),wr&&ys(n.prev,n.next);}function Fr(n,e,t){return {i:n,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function Fs(n,e,t,o){let r=0;for(let i=e,a=t-o;i<t;i+=o)r+=(n[a]-n[i])*(n[i+1]+n[a+1]),a=i;return r}var Bi=23283064365386963e-26,Es=12,Ci=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),Er=0,To=1,Wt=2,Po=5,ot=class{constructor(e=new Uint8Array(16)){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length;}readFields(e,t,o=this.length){for(;this.pos<o;){let r=this.readVarint(),i=r>>3,a=this.pos;this.type=r&7,e(i,t,this),this.pos===a&&this.skip(r);}return t}readMessage(e,t){return this.readFields(e,t,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,true);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,true);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,true)+this.dataView.getUint32(this.pos+4,true)*4294967296;return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,true)+this.dataView.getInt32(this.pos+4,true)*4294967296;return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,true);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,true);return this.pos+=8,e}readVarint(e){let t=this.buf,o,r;return r=t[this.pos++],o=r&127,r<128||(r=t[this.pos++],o|=(r&127)<<7,r<128)||(r=t[this.pos++],o|=(r&127)<<14,r<128)||(r=t[this.pos++],o|=(r&127)<<21,r<128)?o:(r=t[this.pos],o|=(r&15)<<28,Ms(o,e,this))}readVarint64(){return this.readVarint(true)}readSVarint(){let e=this.readVarint();return e%2===1?(e+1)/-2:e/2}readBoolean(){return !!this.readVarint()}readString(){let e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=Es&&Ci?Ci.decode(this.buf.subarray(t,e)):zs(this.buf,t,e)}readBytes(){let e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){let o=this.readPackedEnd();for(;this.pos<o;)e.push(this.readVarint(t));return e}readPackedSVarint(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSVarint());return e}readPackedBoolean(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readBoolean());return e}readPackedFloat(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFloat());return e}readPackedDouble(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readDouble());return e}readPackedFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed32());return e}readPackedSFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed32());return e}readPackedFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed64());return e}readPackedSFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed64());return e}readPackedEnd(){return this.type===Wt?this.readVarint()+this.pos:this.pos+1}skip(e){let t=e&7;if(t===Er)for(;this.buf[this.pos++]>127;);else if(t===Wt)this.pos=this.readVarint()+this.pos;else if(t===Po)this.pos+=4;else if(t===To)this.pos+=8;else throw new Error(`Unimplemented type: ${t}`)}writeTag(e,t){this.writeVarint(e<<3|t);}realloc(e){let t=this.length||16;for(;t<this.pos+e;)t*=2;if(t!==this.length){let o=new Uint8Array(t);o.set(this.buf),this.buf=o,this.dataView=new DataView(o.buffer),this.length=t;}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,true),this.pos+=4;}writeSFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,true),this.pos+=4;}writeFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,true),this.dataView.setInt32(this.pos+4,Math.floor(e*Bi),true),this.pos+=8;}writeSFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,true),this.dataView.setInt32(this.pos+4,Math.floor(e*Bi),true),this.pos+=8;}writeVarint(e){if(e=+e||0,e>268435455||e<0){Is(e,this);return}this.realloc(4),this.buf[this.pos++]=e&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127)));}writeSVarint(e){this.writeVarint(e<0?-e*2-1:e*2);}writeBoolean(e){this.writeVarint(+e);}writeString(e){e=String(e),this.realloc(e.length*4),this.pos++;let t=this.pos;this.pos=Ns(this.buf,e,this.pos);let o=this.pos-t;o>=128&&vi(t,o,this),this.pos=t-1,this.writeVarint(o),this.pos+=o;}writeFloat(e){this.realloc(4),this.dataView.setFloat32(this.pos,e,true),this.pos+=4;}writeDouble(e){this.realloc(8),this.dataView.setFloat64(this.pos,e,true),this.pos+=8;}writeBytes(e){let t=e.length;this.writeVarint(t),this.realloc(t);for(let o=0;o<t;o++)this.buf[this.pos++]=e[o];}writeRawMessage(e,t){this.pos++;let o=this.pos;e(t,this);let r=this.pos-o;r>=128&&vi(o,r,this),this.pos=o-1,this.writeVarint(r),this.pos+=r;}writeMessage(e,t,o){this.writeTag(e,Wt),this.writeRawMessage(t,o);}writePackedVarint(e,t){t.length&&this.writeMessage(e,Hs,t);}writePackedSVarint(e,t){t.length&&this.writeMessage(e,Ts,t);}writePackedBoolean(e,t){t.length&&this.writeMessage(e,Gs,t);}writePackedFloat(e,t){t.length&&this.writeMessage(e,Ps,t);}writePackedDouble(e,t){t.length&&this.writeMessage(e,ks,t);}writePackedFixed32(e,t){t.length&&this.writeMessage(e,Rs,t);}writePackedSFixed32(e,t){t.length&&this.writeMessage(e,Os,t);}writePackedFixed64(e,t){t.length&&this.writeMessage(e,Ws,t);}writePackedSFixed64(e,t){t.length&&this.writeMessage(e,Vs,t);}writeBytesField(e,t){this.writeTag(e,Wt),this.writeBytes(t);}writeFixed32Field(e,t){this.writeTag(e,Po),this.writeFixed32(t);}writeSFixed32Field(e,t){this.writeTag(e,Po),this.writeSFixed32(t);}writeFixed64Field(e,t){this.writeTag(e,To),this.writeFixed64(t);}writeSFixed64Field(e,t){this.writeTag(e,To),this.writeSFixed64(t);}writeVarintField(e,t){this.writeTag(e,Er),this.writeVarint(t);}writeSVarintField(e,t){this.writeTag(e,Er),this.writeSVarint(t);}writeStringField(e,t){this.writeTag(e,Wt),this.writeString(t);}writeFloatField(e,t){this.writeTag(e,Po),this.writeFloat(t);}writeDoubleField(e,t){this.writeTag(e,To),this.writeDouble(t);}writeBooleanField(e,t){this.writeVarintField(e,+t);}};function Ms(n,e,t){let o=t.buf,r,i;if(i=o[t.pos++],r=(i&112)>>4,i<128||(i=o[t.pos++],r|=(i&127)<<3,i<128)||(i=o[t.pos++],r|=(i&127)<<10,i<128)||(i=o[t.pos++],r|=(i&127)<<17,i<128)||(i=o[t.pos++],r|=(i&127)<<24,i<128)||(i=o[t.pos++],r|=(i&1)<<31,i<128))return st(n,r,e);throw new Error("Expected varint not more than 10 bytes")}function st(n,e,t){return t?e*4294967296+(n>>>0):(e>>>0)*4294967296+(n>>>0)}function Is(n,e){let t,o;if(n>=0?(t=n%4294967296|0,o=n/4294967296|0):(t=~(-n%4294967296),o=~(-n/4294967296),t^4294967295?t=t+1|0:(t=0,o=o+1|0)),n>=18446744073709552e3||n<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),Ss(t,o,e),Ls(o,e);}function Ss(n,e,t){t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos]=n&127;}function Ls(n,e){let t=(n&7)<<4;e.buf[e.pos++]|=t|((n>>>=3)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127)))));}function vi(n,e,t){let o=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));t.realloc(o);for(let r=t.pos-1;r>=n;r--)t.buf[r+o]=t.buf[r];}function Hs(n,e){for(let t=0;t<n.length;t++)e.writeVarint(n[t]);}function Ts(n,e){for(let t=0;t<n.length;t++)e.writeSVarint(n[t]);}function Ps(n,e){for(let t=0;t<n.length;t++)e.writeFloat(n[t]);}function ks(n,e){for(let t=0;t<n.length;t++)e.writeDouble(n[t]);}function Gs(n,e){for(let t=0;t<n.length;t++)e.writeBoolean(n[t]);}function Rs(n,e){for(let t=0;t<n.length;t++)e.writeFixed32(n[t]);}function Os(n,e){for(let t=0;t<n.length;t++)e.writeSFixed32(n[t]);}function Ws(n,e){for(let t=0;t<n.length;t++)e.writeFixed64(n[t]);}function Vs(n,e){for(let t=0;t<n.length;t++)e.writeSFixed64(n[t]);}function zs(n,e,t){let o="",r=e;for(;r<t;){let i=n[r],a=null,l=i>239?4:i>223?3:i>191?2:1;if(r+l>t)break;let s,c,u;l===1?i<128&&(a=i):l===2?(s=n[r+1],(s&192)===128&&(a=(i&31)<<6|s&63,a<=127&&(a=null))):l===3?(s=n[r+1],c=n[r+2],(s&192)===128&&(c&192)===128&&(a=(i&15)<<12|(s&63)<<6|c&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):l===4&&(s=n[r+1],c=n[r+2],u=n[r+3],(s&192)===128&&(c&192)===128&&(u&192)===128&&(a=(i&15)<<18|(s&63)<<12|(c&63)<<6|u&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,l=1):a>65535&&(a-=65536,o+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),o+=String.fromCharCode(a),r+=l;}return o}function Ns(n,e,t){for(let o=0,r,i;o<e.length;o++){if(r=e.charCodeAt(o),r>55295&&r<57344)if(i)if(r<56320){n[t++]=239,n[t++]=191,n[t++]=189,i=r;continue}else r=i-55296<<10|r-56320|65536,i=null;else {r>56319||o+1===e.length?(n[t++]=239,n[t++]=191,n[t++]=189):i=r;continue}else i&&(n[t++]=239,n[t++]=191,n[t++]=189,i=null);r<128?n[t++]=r:(r<2048?n[t++]=r>>6|192:(r<65536?n[t++]=r>>12|224:(n[t++]=r>>18|240,n[t++]=r>>12&63|128),n[t++]=r>>6&63|128),n[t++]=r&63|128);}return t}var zt=(r=>(r[r.Unknown=0]="Unknown",r[r.Point=1]="Point",r[r.LineString=2]="LineString",r[r.Polygon=3]="Polygon",r))(zt||{}),ko=class n{constructor(e,t,o,r){this.pbf=e;this.keys=t;this.values=o;this.extent=r;this.type=0;this.properties={};this.geomOffset=-1;}static read(e,t,o,r,i){let a=new n(e,o,r,i);return e.readFields(Ks,a,t),a}loadGeometry(){if(this.geomOffset<0)return [];let e=this.pbf,t=e.pos;e.pos=this.geomOffset;let o=e.readVarint()+e.pos,r=1,i=0,a=0,l=0,s=[],c=[];for(;e.pos<o;){if(i<=0){let u=e.readVarint();r=u&7,i=u>>3;}if(i--,r===1||r===2)a+=e.readSVarint(),l+=e.readSVarint(),r===1&&(c.length&&s.push(c),c=[]),c.push(a,l);else if(r===7)c.length>=2&&c.push(c[0],c[1]);else throw new Error(`[osmgl] \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u0430\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0433\u0435\u043E\u043C\u0435\u0442\u0440\u0438\u0438 MVT: ${r}`)}return c.length&&s.push(c),e.pos=t,s}bbox(){let e=this.loadGeometry(),t=1/0,o=1/0,r=-1/0,i=-1/0;for(let a of e)for(let l=0;l<a.length;l+=2)a[l]<t&&(t=a[l]),a[l]>r&&(r=a[l]),a[l+1]<o&&(o=a[l+1]),a[l+1]>i&&(i=a[l+1]);return [t,o,r,i]}};function Ks(n,e,t){t&&(n===1?e.id=t.readVarint():n===2?Us(t,e):n===3?e.type=t.readVarint():n===4&&(e.geomOffset=t.pos,t.skip(2)));}function Us(n,e){let t=n.readVarint()+n.pos;for(;n.pos<t;){let o=e.keys[n.readVarint()],r=e.values[n.readVarint()];o!==void 0&&(e.properties[o]=r);}}var Go=class n{constructor(e){this.pbf=e;this.version=1;this.name="";this.extent=4096;this.featureOffsets=[];this.keys=[];this.values=[];}static read(e,t){let o=new n(e);return e.readFields(Js,o,t),o}get length(){return this.featureOffsets.length}feature(e){let t=this.pbf;t.pos=this.featureOffsets[e];let o=t.readVarint()+t.pos;return ko.read(t,o,this.keys,this.values,this.extent)}*features(){for(let e=0;e<this.featureOffsets.length;e++)yield this.feature(e);}};function Js(n,e,t){t&&(n===15?e.version=t.readVarint():n===1?e.name=t.readString():n===5?e.extent=t.readVarint():n===2?e.featureOffsets.push(t.pos):n===3?e.keys.push(t.readString()):n===4&&e.values.push(Xs(t)));}function Xs(n){let e=n.readVarint()+n.pos,t=null;for(;n.pos<e;){let o=n.readVarint()>>3;o===1?t=n.readString():o===2?t=n.readFloat():o===3?t=n.readDouble():o===4?t=n.readVarint64():o===5?t=n.readVarint():o===6?t=n.readSVarint():o===7?t=n.readBoolean():n.skip(o);}return t}var Vt=class{constructor(e){this.layers={};new ot(e instanceof Uint8Array?e:new Uint8Array(e)).readFields((o,r,i)=>{if(o===3&&i){let a=Go.read(i,i.readVarint()+i.pos);a.length&&(this.layers[a.name]=a);}},null);}};function rt(n){let e=[],t=null;for(let o of n){if(o.length<6)continue;let r=js(o);r!==0&&(r>0?(t&&e.push(t),t={outer:o,holes:[]}):t&&t.holes.push(o));}return t&&e.push(t),e}function js(n){let e=0;for(let t=0,o=n.length-2;t<n.length;o=t,t+=2)e+=(n[o]-n[t])*(n[t+1]+n[o+1]);return e/2}function O(n,e,t){return n===void 0?t:typeof n=="number"?n:wi(n.stops,e,(o,r,i)=>o+(r-o)*i,t)}function Le(n,e,t){return n===void 0?t:typeof n=="string"?ce(n):wi(n.stops,e,(o,r,i)=>{let a=ce(o),l=ce(r);return [a[0]+(l[0]-a[0])*i,a[1]+(l[1]-a[1])*i,a[2]+(l[2]-a[2])*i,a[3]+(l[3]-a[3])*i]},t)}function wi(n,e,t,o){if(!n.length)return o;if(e<=n[0][0])return t(n[0][1],n[0][1],0);let r=n[n.length-1];if(e>=r[0])return t(r[1],r[1],0);for(let i=1;i<n.length;i++){let[a,l]=n[i];if(e>a)continue;let[s,c]=n[i-1],u=a-s,m=u===0?0:(e-s)/u;return t(c,l,m)}return o}function me(n,e){if(!n)return true;let t=n[0];switch(t){case "all":return n.slice(1).every(o=>me(o,e));case "any":return n.slice(1).some(o=>me(o,e));case "!":return !me(n[1],e);case "has":return e[n[1]]!=null;case "!has":return e[n[1]]==null;case "in":{let o=e[n[1]];return o==null?false:n.slice(2).includes(o)}case "!in":{let o=e[n[1]];return o==null?true:!n.slice(2).includes(o)}default:{let o=e[n[1]],r=n[2];if(o==null)return t==="!=";switch(t){case "==":return o===r;case "!=":return o!==r;case ">":return o>r;case ">=":return o>=r;case "<":return o<r;case "<=":return o<=r;default:return true}}}}var Ys=Math.PI/8,Zs=.35,Qs=32,xi=.25,_i=.07;function Ge(n,e){let t=e.radius;if(!(t>0))return n;let o=n.length/2-1;if(o<3)return n;let r=Math.max(2,Math.round(e.segments??4)),i=Math.max(e.minCutRatio??Zs,0),a=e.extent,l=[];for(let s=0;s<o;s++){let c=n[s*2],u=n[s*2+1],m=n[(s+o-1)%o*2],f=n[(s+o-1)%o*2+1],d=n[(s+1)%o*2],h=n[(s+1)%o*2+1],p=c-m,b=u-f,A=d-c,y=h-u,g=Math.hypot(p,b),B=Math.hypot(A,y);if(g<1e-6||B<1e-6){l.push(c,u);continue}let C=p/g,v=b/g,_=A/B,w=y/B;if(e.keep?.[s]){l.push(c,u);continue}let x=C*_+v*w;if(x>.985){l.push(c,u);continue}if(a!==void 0&&(Mr(c,u,a)||Mr(m,f,a)||Mr(d,h,a))){l.push(c,u);continue}let D=Math.min(t,g*.4,B*.4);if(D<t*i){l.push(c,u);continue}let I=c-C*D,E=u-v*D,L=c+_*D,M=u+w*D,S=Math.acos(Math.max(-1,Math.min(1,x))),F=Math.min(Ys,Math.PI/2/r),T=Math.ceil(S/F-1e-6),k=e.maxChord&&e.maxChord>0?Math.ceil(D/Math.tan(S/2)*S/e.maxChord):0,H=Math.max(1,Math.min(Qs,Math.max(Math.min(r,T),k)));l.push(I,E);for(let G=1;G<H;G++){let N=G/H,R=1-N;l.push(R*R*I+2*R*N*c+N*N*L,R*R*E+2*R*N*u+N*N*M);}l.push(L,M);}return l.length<6?n:(l.push(l[0],l[1]),l)}var Mr=(n,e,t)=>n<=0||e<=0||n>=t||e>=t;function ct(n,e){let t=Di(n.outer,e);if(!t)return null;let o=[];for(let r of n.holes){let i=Di(r,e);i&&o.push(i);}return {outer:t,holes:o}}function Di(n,e){let t=[];for(let o=0;o<n.length-2;o+=2)t.push(n[o],n[o+1]);if(t.length<6)return null;for(let o=0;o<4;o++){let r=t;t=[];let i=r.length/2;if(i===0)return null;for(let a=0;a<i;a++){let l=r[a*2],s=r[a*2+1],c=r[(a+i-1)%i*2],u=r[(a+i-1)%i*2+1],m=Fi(l,s,o,e),f=Fi(c,u,o,e);if(m!==f){let d=qs(c,u,l,s,o,e);t.push(c+(l-c)*d,u+(s-u)*d);}m&&t.push(l,s);}}return t.length<6?null:(t.push(t[0],t[1]),t)}function Fi(n,e,t,o){return t===0?n>=0:t===1?n<=o:t===2?e>=0:e<=o}function qs(n,e,t,o,r,i){return r===0?(0-n)/(t-n):r===1?(i-n)/(t-n):r===2?(0-e)/(o-e):(i-e)/(o-e)}function Ro(n,e,t,o,r){return n===0&&t===0||n===r&&t===r||e===0&&o===0||e===r&&o===r}function Ei(n,e){for(let t=0;t<n.length;t+=2)if(n[t]<=0||n[t]>=e||n[t+1]<=0||n[t+1]>=e)return true;return false}var Fe=18,dt=4,Li=65535/dt,$s=9,ec=1,tc=0,oc=1,rc=2;var Mi=0,nc=1,Ii=2,ic=3,ac=.47;function Lr(n,e,t,o={}){let r=o.metersPerUnit&&o.metersPerUnit>0?o.metersPerUnit:ac,i=Math.max(1024,n.length*48),a=new ArrayBuffer(i*Fe),l={verts:new DataView(a),vertsU8:new Uint8Array(a),vertOffset:0,vertexCount:0,indices:[],featureIds:[],ensure:()=>{}};l.ensure=f=>s(f);let s=f=>{if(l.vertexCount+f<=i)return;i=Math.max(i*2,l.vertexCount+f);let d=new ArrayBuffer(i*Fe);new Uint8Array(d).set(l.vertsU8.subarray(0,l.vertOffset)),a=d,l.verts=new DataView(d),l.vertsU8=new Uint8Array(d);};for(let f of n.features()){if(f.type!==3||!me(t,f.properties))continue;let d=Fc(f.properties),h=Ec(f.properties,d);if(d<=h)continue;let p=Ic(f.properties)??Number(f.id??0),b=Dc(p>>>0),A=_c(b,f.properties),y=xc(f.properties,d),g=rt(f.loadGeometry());for(let B of g){let C=ct(B,e);if(!C)continue;let v=Ei(C.outer,e),_=(o.cornerRadius??0)/r,w={radius:_,segments:o.cornerSegments,extent:e,minCutRatio:0},x=_>0?{outer:Ge(C.outer,w),holes:C.holes.map(S=>Ge(S,w))}:C,D=x.outer.length/2+x.holes.reduce((S,F)=>S+F.length/2,0);s(D*5+32);let I=x.holes.length||v?null:fc(x.outer),E=I?bc(f.properties,I,d,b,r):null,L=null,M=[];if(E&&I){let S=Hi(gc(x.outer,r),I,E.shape);M=Bc(S,x.outer);let F=Cc(S,M);if(F>1e-6){let T=Math.min(Math.max(F*r*hc,pc),mc);L=vc(S,T/F,d);}}Si(l,x.outer,h,d,p,A,y,r,e,L);for(let S of x.holes)Si(l,S,h,d,p,A,y,r,e,null);L?wc(l,M,L,d,p,A,y,r):cc(l,x.outer,x.holes,d,p,A,y);}}if(!l.indices.length)return null;let c=new Uint32Array(l.indices),u=new Float64Array(l.featureIds);return {vertices:a.slice(0,l.vertOffset),indices:c.buffer,featureIds:u.buffer,vertexCount:l.vertexCount,indexCount:c.length,extent:e}}var Hr=(n,e)=>n|e<<2,Ir=n=>Math.max(0,Math.min(65535,Math.round(Math.min(n,Li)*dt)));function ft(n,e,t,o,r,i,a,l,s,c,u=0,m=0,f=0){let d=n.vertOffset;return n.verts.setInt16(d,Math.round(e),true),n.verts.setInt16(d+2,Math.round(t),true),n.verts.setUint16(d+4,Math.round(Math.min(o,Li)*dt),true),n.vertsU8[d+6]=s,n.vertsU8[d+7]=l,n.verts.setInt8(d+8,Sr(Math.round(r*127))),n.verts.setInt8(d+9,Sr(Math.round(i*127))),n.verts.setInt8(d+10,Sr(Math.round(a*127))),n.vertsU8[d+11]=c,n.verts.setUint16(d+12,Ir(u),true),n.verts.setUint16(d+14,Ir(m),true),n.verts.setUint16(d+16,Ir(f),true),n.vertOffset+=Fe,n.vertexCount++}function Si(n,e,t,o,r,i,a,l,s,c=null){let u=e.length/2;if(u<3)return;let m=Hr(tc,a),f=sc(e,l),d=o-t,h=new Float64Array(u*2),p=new Uint8Array(u);{let b=new Float64Array(u*2);for(let A=0;A<u-1;A++){let y=e[A*2+2]-e[A*2],g=e[A*2+3]-e[A*2+1],B=Math.hypot(y,g)||1;b[A*2]=g/B,b[A*2+1]=-y/B;}for(let A=0;A<u-1;A++){let y=(A+u-2)%(u-1),g=b[y*2]*b[A*2]+b[y*2+1]*b[A*2+1],B=b[y*2]+b[A*2],C=b[y*2+1]+b[A*2+1],v=Math.hypot(B,C);g>.5&&v>1e-6&&(h[A*2]=B/v,h[A*2+1]=C/v,p[A]=1);}}for(let b=0;b<u-1;b++){let A=e[b*2],y=e[b*2+1],g=e[b*2+2],B=e[b*2+3];if(A===g&&y===B||Ro(A,y,g,B,s))continue;let C=g-A,v=B-y,_=Math.hypot(C,v)||1,w=v/_,x=-C/_,D=f.offset[b],I=f.width[b],E=[0,1];if(c){for(let M=0;M<c.length;M++)for(let S=M+1;S<c.length;S++){let F=nt(c[M],A,y)-nt(c[S],A,y),T=nt(c[M],g,B)-nt(c[S],g,B);if(F===T)continue;let k=F/(F-T);k>1e-4&&k<1-1e-4&&E.push(k);}E.sort((M,S)=>M-S);}let L=(M,S)=>{if(!c)return o;let F=1/0;for(let T of c)F=Math.min(F,nt(T,M,S));return Math.max(o,F)};for(let M=0;M+1<E.length;M++){let S=E[M],F=E[M+1];if(F-S<1e-6)continue;let T=A+C*S,k=y+v*S,H=A+C*F,G=y+v*F,N=D+_*S*l,R=D+_*F*l,W=(b+1)%(u-1),V=p[b]?h[b*2]:w,j=p[b]?h[b*2+1]:x,Y=p[W]?h[W*2]:w,oe=p[W]?h[W*2+1]:x,ge=w+(V-w)*(1-S),$=x+(j-x)*(1-S),J=w+(Y-w)*F,be=x+(oe-x)*F,Ae=Math.hypot(ge,$)||1,Q=Math.hypot(J,be)||1,K=ge/Ae,U=$/Ae,de=J/Q,ie=be/Q;n.ensure(4);let he=ft(n,T,k,t,K,U,0,0,i,m,N,I,d),ne=ft(n,H,G,t,de,ie,0,0,i,m,R,I,d),Be=ft(n,T,k,L(T,k),K,U,0,255,i,m,N,I,d),Me=ft(n,H,G,L(H,G),de,ie,0,255,i,m,R,I,d);n.indices.push(he,Me,ne,he,Be,Me),n.featureIds.push(r,r);}}}var lc=.9976;function sc(n,e){let t=n.length/2-1,o=[];for(let s=0;s<t;s++){let c=n[s*2+2]-n[s*2],u=n[s*2+3]-n[s*2+1],m=Math.hypot(c,u);o.push(m>0?{x:c/m,y:u/m,len:m*e}:{x:0,y:0,len:0});}let r=(s,c)=>o[s].len>0&&o[c].len>0&&o[s].x*o[c].x+o[s].y*o[c].y>=lc,i=0;for(;i<t&&r((i-1+t)%t,i);)i++;i>=t&&(i=0);let a=new Array(t).fill(0),l=new Array(t).fill(0);for(let s=0;s<t;){let c=(i+s)%t,u=[c],m=o[c].len,f=s+1;for(;f<t;){let h=(i+f)%t;if(!r((i+f-1)%t,h))break;u.push(h),m+=o[h].len,f++;}let d=0;for(let h of u)a[h]=d,l[h]=m,d+=o[h].len;s=f;}return {offset:a,width:l}}function cc(n,e,t,o,r,i,a){let l=[],s=[];for(let f=0;f<e.length;f++)l.push(e[f]);for(let f of t){s.push(l.length/2);for(let d=0;d<f.length;d++)l.push(f[d]);}let c=Se(l,s.length?s:void 0,2);if(!c.length)return;let u=Hr(oc,a),m=n.vertexCount;for(let f=0;f<l.length;f+=2)ft(n,l[f],l[f+1],o,0,0,1,255,i,u);for(let f=0;f<c.length;f+=3)n.indices.push(m+c[f],m+c[f+2],m+c[f+1]),n.featureIds.push(r);}function fc(n){let e=uc(n);if(e.length<3)return null;let t=Math.abs(dc(n));if(t<=0)return null;let o=null,r=1/0;for(let i=0;i<e.length;i++){let a=(i+1)%e.length,l=e[a].x-e[i].x,s=e[a].y-e[i].y,c=Math.hypot(l,s);if(c<1e-6)continue;l/=c,s/=c;let u=1/0,m=-1/0,f=1/0,d=-1/0;for(let B of e){let C=B.x*l+B.y*s,v=-B.x*s+B.y*l;C<u&&(u=C),C>m&&(m=C),v<f&&(f=v),v>d&&(d=v);}let h=m-u,p=d-f,b=h*p;if(b<=0||b>=r)continue;r=b;let A=(u+m)/2,y=(f+d)/2,g=h>=p;o={cx:A*l-y*s,cy:A*s+y*l,ax:g?l:-s,ay:g?s:l,halfLong:(g?h:p)/2,halfShort:(g?p:h)/2,fill:t/b};}return o}function uc(n){let e=[];for(let i=0;i<n.length-2;i+=2)e.push({x:n[i],y:n[i+1]});if(e.length<3)return e;e.sort((i,a)=>i.x===a.x?i.y-a.y:i.x-a.x);let t=(i,a,l)=>(a.x-i.x)*(l.y-i.y)-(a.y-i.y)*(l.x-i.x),o=[];for(let i of e){for(;o.length>=2&&t(o[o.length-2],o[o.length-1],i)<=0;)o.pop();o.push(i);}let r=[];for(let i=e.length-1;i>=0;i--){let a=e[i];for(;r.length>=2&&t(r[r.length-2],r[r.length-1],a)<=0;)r.pop();r.push(a);}return o.pop(),r.pop(),o.concat(r)}function dc(n){let e=0;for(let t=0;t<n.length-2;t+=2)e+=n[t]*n[t+3]-n[t+2]*n[t+1];return e/2}var hc=Math.tan(30*Math.PI/180),mc=3.5,pc=.9;function bc(n,e,t,o,r){if(e.fill<.86)return null;let i=e.halfShort*2*r,a=e.halfLong*2*r,l=i*a,s=e.halfShort>0?e.halfLong/e.halfShort:99,c=Ac(n);if(!c){if(t>15||l>600||i<3)return null;let u=o%1e3/1e3;l<30?c=u<.5?"skillion":"gabled":s<1.25?c=u<.35?"pyramidal":"hipped":c=u<.8?"gabled":"hipped";}return c==="flat"?null:{shape:c}}function Ac(n){let e=String(n.roof_shape??n["roof:shape"]??"").toLowerCase();return e?e==="flat"?"flat":e==="skillion"||e==="lean_to"||e==="shed"?"skillion":e==="hipped"||e==="half-hipped"||e==="gambrel"?"hipped":e==="pyramidal"||e==="dome"||e==="conical"||e==="onion"?"pyramidal":e==="gabled"||e==="mansard"||e==="round"?"gabled":null:null}var nt=(n,e,t)=>n.a*e+n.b*t+n.c;function yc(n,e,t,o){let r=n.length/2;if(r<3)return [];let i=[],a=l=>[n[l*2],n[l*2+1]];for(let l=0;l<r;l++){let[s,c]=a(l),[u,m]=a((l+r-1)%r),f=e*s+t*c+o,d=e*u+t*m+o;if(f<=0!=d<=0){let h=d/(d-f);i.push(u+(s-u)*h,m+(c-m)*h);}f<=0&&i.push(s,c);}return i}function gc(n,e){let t=.5/Math.max(e,1e-6),o=n.length/2-1;if(o<5)return n;let r=[],i=0;r.push(n[0],n[1]);for(let a=1;a<o;a++){let l=n[i*2],s=n[i*2+1],c=n[a*2],u=n[a*2+1],m=c-l,f=u-s,d=Math.hypot(m,f),h=d>1e-6;if(h){for(let p=i+1;p<a;p++)if(Math.abs((n[p*2]-l)*f-(n[p*2+1]-s)*m)/d>=t){h=false;break}}h||(r.push(n[(a-1)*2],n[(a-1)*2+1]),i=a-1);}return r.length/2<3?n:(r.push(r[0],r[1]),r)}function Hi(n,e,t){let{ax:o,ay:r,halfLong:i}=e;if(t==="skillion"){let s=-r,c=o;return [{a:s,b:c,c:-(s*e.cx+c*e.cy)+e.halfShort}]}let a=[],l=n.length/2-1;for(let s=0;s<l;s++){let c=n[s*2],u=n[s*2+1],m=n[(s+1)%l*2],f=n[(s+1)%l*2+1],d=m-c,h=f-u,p=Math.hypot(d,h);if(p<1e-6||t==="gabled"&&Math.abs((d*o+h*r)/p)<.86)continue;let b=-h/p,A=d/p;a.push({a:b,b:A,c:-(b*c+A*u)});}return !a.length&&i>0?Hi(n,e,"hipped"):a}function Bc(n,e){let t=[];for(let r=0;r<e.length-2;r+=2)t.push(e[r],e[r+1]);if(t.length<6)return [];let o=[];for(let r=0;r<n.length;r++){let i=t;for(let a=0;a<n.length&&i.length>=6;a++)a!==r&&(i=yc(i,n[r].a-n[a].a,n[r].b-n[a].b,n[r].c-n[a].c));o.push(i.length>=6?i:[]);}return o}function Cc(n,e){let t=0;for(let o=0;o<e.length;o++){let r=e[o];for(let i=0;i<r.length;i+=2){let a=nt(n[o],r[i],r[i+1]);a>t&&(t=a);}}return t}function vc(n,e,t){return n.map(o=>({a:o.a*e,b:o.b*e,c:o.c*e+t}))}function wc(n,e,t,o,r,i,a,l){let s=Hr(rc,a);for(let c=0;c<t.length;c++){let u=e[c];if(!u||u.length<6)continue;let m=Se(u,void 0,2);if(!m.length)continue;let f=-t[c].a/l,d=-t[c].b/l,h=Math.hypot(f,d,1),p={x:f/h,y:d/h,z:1/h};n.ensure(u.length/2);let b=n.vertexCount;for(let A=0;A<u.length;A+=2){let y=Math.max(o,nt(t[c],u[A],u[A+1]));ft(n,u[A],u[A+1],y,p.x,p.y,p.z,255,i,s);}for(let A=0;A<m.length;A+=3)n.indices.push(b+m[A],b+m[A+2],b+m[A+1]),n.featureIds.push(r);}}function xc(n,e){let t=String(n.class??"").toLowerCase();return t==="industrial"||t==="warehouse"||t==="hangar"||t==="construction"?ic:t==="commercial"||t==="office"||t==="retail"||t==="supermarket"?Ii:t==="house"||t==="detached"||t==="garage"||t==="hut"||t==="shed"||e<=7?Mi:e>=40?Ii:nc}function _c(n,e){let t=String(e.class??""),o=128;return t==="industrial"||t==="warehouse"||t==="construction"?o=96:t==="commercial"||t==="office"||t==="retail"?o=150:(t==="apartments"||t==="residential"||t==="house")&&(o=134),Math.max(0,Math.min(255,o+(n%121-60)))}function Dc(n){let e=n>>>0;return e=(e>>>16^e)*73244475,e=(e>>>16^e)*73244475,e=e>>>16^e,e>>>0}function Fc(n){let e=ut(n.render_height)??ut(n.height)??Mc(n.levels??n.building_levels??n["building:levels"]);return e&&e>0?Math.max(e,ec):$s}function Ec(n,e){let t=ut(n.render_min_height)??ut(n.min_height)??ut(n.base)??0;return t>0&&t<e?t:0}function Mc(n){let e=ut(n);return e&&e>0?e*3:null}function ut(n){if(typeof n=="number"&&isFinite(n))return n;if(typeof n=="string"){let e=parseFloat(n);if(isFinite(e))return e}return null}var Sr=n=>n>127?127:n<-127?-127:n;function Ic(n){let e=n.osm_id;if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"){let t=Number(e);if(Number.isFinite(t))return t}return null}var ht=16,Oi=64,Sc=0,Lc=1,Ti=2,Hc=3,Nt=1;function Gr(n,e,t,o){let r=o.metersPerUnit>0?o.metersPerUnit:.5,i=o.elevation,a=o.base??0,l=Math.max(o.bevel??0,0)/r,s=Math.max(o.bevelDrop??0,0),c=Math.max(o.cornerRadius??0,0)/r,u=Math.max(512,n.length*24),m=new ArrayBuffer(u*ht),f={view:new DataView(m),bytes:new Uint8Array(m),offset:0,count:0,indices:[],extent:e,ensure(B){if(f.count+B<=u)return;u=Math.max(u*2,f.count+B);let C=new ArrayBuffer(u*ht);new Uint8Array(C).set(f.bytes.subarray(0,f.offset)),m=C,f.view=new DataView(C),f.bytes=new Uint8Array(C);}},d=[],h=new Map;for(let B of n.features()){if(B.type!==3||!me(t,B.properties))continue;let C=o.liftBy?.(B.properties)??0;for(let v of rt(B.loadGeometry())){let _=ct(v,e);if(_){d.push(C?{..._,lift:C}:_),Pi(_.outer,h);for(let w of _.holes)Pi(w,h);}}}o.onShapes?.(d);let p=new Set;for(let[B,C]of h)C>1&&p.add(B);let b=[],A={radius:c,segments:o.cornerSegments,extent:e,minCutRatio:0,maxChord:xi/r};for(let B of d){let C=c>0?{outer:Ge(B.outer,{...A,keep:ki(B.outer,p)}),holes:B.holes.map(L=>Ge(L,{...A,keep:ki(L,p)}))}:B,v=l>0?Ri(C.outer,l,e,p):C.outer,_=C.holes.map(L=>l>0?Ri(L,-l,e,p):L),w=B.lift??0,x=i+w,D=a+w;Gi(f,v??C.outer,_.map((L,M)=>L??C.holes[M]),x);let I=x,E=x-s;v&&l>0&&s>0&&Tr(f,v,C.outer,I,E,Lc,e,p),E!==D&&Tr(f,C.outer,C.outer,E,D,Ti,e,p);for(let L of C.holes)if(E!==D&&Tr(f,L,L,E,D,Ti,e,p),x<D){let M=f.indices.length;Gi(f,L,[],D,Hc);for(let S=M;S<f.indices.length;S++)b.push(f.indices[S]);f.indices.length=M;}}if(!f.indices.length&&!b.length)return null;let y=f.indices.length,g=new Uint32Array(y+b.length);return g.set(f.indices,0),g.set(b,y),{vertices:m.slice(0,f.offset),indices:g.buffer,vertexCount:f.count,indexCount:g.length,extent:e,capIndexOffset:y}}function mt(n,e,t,o){let r=`${Math.round(n*100)},${Math.round(e*100)}`,i=`${Math.round(t*100)},${Math.round(o*100)}`;return r<i?`${r}|${i}`:`${i}|${r}`}function Pi(n,e){for(let t=0;t+3<n.length;t+=2){let o=mt(n[t],n[t+1],n[t+2],n[t+3]);e.set(o,(e.get(o)??0)+1);}}function ki(n,e){if(!e.size)return;let t=n.length/2-1,o=new Array(t).fill(false);for(let r=0;r<t;r++){let i=mt(n[(r+t-1)%t*2],n[(r+t-1)%t*2+1],n[r*2],n[r*2+1]),a=mt(n[r*2],n[r*2+1],n[(r+1)%t*2],n[(r+1)%t*2+1]);(e.has(i)||e.has(a))&&(o[r]=true);}return o}function Kt(n,e,t,o,r,i,a,l){let s=n.offset;return n.view.setFloat32(s,e,true),n.view.setFloat32(s+4,t,true),n.view.setInt16(s+8,Tc(Math.round(o*Oi)),true),n.view.setInt8(s+10,kr(Math.round(r*127))),n.view.setInt8(s+11,kr(Math.round(i*127))),n.view.setInt8(s+12,kr(Math.round(a*127))),n.bytes[s+13]=l,n.view.setInt8(s+14,e<=0?-Nt:e>=n.extent?Nt:0),n.view.setInt8(s+15,t<=0?-Nt:t>=n.extent?Nt:0),n.offset+=ht,n.count++}function Gi(n,e,t,o,r=Sc){let i=[],a=[];for(let c=0;c<e.length;c++)i.push(e[c]);for(let c of t){a.push(i.length/2);for(let u=0;u<c.length;u++)i.push(c[u]);}let l=Se(i,a.length?a:void 0,2);if(!l.length)return;n.ensure(i.length/2);let s=n.count;for(let c=0;c<i.length;c+=2)Kt(n,i[c],i[c+1],o,0,0,1,r);for(let c=0;c<l.length;c+=3)n.indices.push(s+l[c],s+l[c+2],s+l[c+1]);}function Tr(n,e,t,o,r,i,a,l){let s=Math.min(e.length,t.length)/2;if(!(s<3)){n.ensure((s-1)*4);for(let c=0;c<s-1;c++){let u=t[c*2],m=t[c*2+1],f=t[c*2+2],d=t[c*2+3];if(u===f&&m===d||Ro(u,m,f,d,a)||l.has(mt(u,m,f,d)))continue;let h=f-u,p=d-m,b=Math.hypot(h,p)||1,A=p/b,y=-h/b,g=o-r,B=Math.hypot(e[c*2]-u,e[c*2+1]-m)||0,C=0;if(B>1e-6&&g!==0){let D=1/Math.hypot(1,g/B);C=B/Math.hypot(B,g)*Math.sign(g),A*=D,y*=D;}let v=Kt(n,e[c*2],e[c*2+1],o,A,y,C,i),_=Kt(n,e[c*2+2],e[c*2+3],o,A,y,C,i),w=Kt(n,u,m,r,A,y,C,i),x=Kt(n,f,d,r,A,y,C,i);n.indices.push(w,_,x,w,v,_);}}}function Ri(n,e,t,o){let r=n.length/2-1;if(r<3)return null;let i=[];for(let s=0;s<r;s++){let c=n[s*2],u=n[s*2+1],m=n[(s+r-1)%r*2],f=n[(s+r-1)%r*2+1],d=n[(s+1)%r*2],h=n[(s+1)%r*2+1],p=Math.hypot(c-m,u-f)||1,b=Math.hypot(d-c,h-u)||1,A=(u-f)/p,y=-(c-m)/p,g=(h-u)/b,B=-(d-c)/b,C=A+g,v=y+B,_=Math.hypot(C,v);if(_<1e-6){i.push(c,u);continue}C/=_,v/=_;let w=Math.min(1/Math.max(C*A+v*y,.35),3),x=c-C*e*w,D=u-v*e*w,I=mt(m,f,c,u),E=mt(c,u,d,h);if(o.has(I)||o.has(E)){i.push(c,u);continue}(c<=0||c>=t)&&(x=c),(u<=0||u>=t)&&(D=u),i.push(x,D);}i.push(i[0],i[1]);let a=Math.abs(Pr(n)),l=Pr(i);if(Math.sign(l)!==Math.sign(Pr(n))||Math.abs(l)<a*.25)return null;for(let s=0;s<i.length;s+=2)i[s]=Math.max(0,Math.min(t,i[s])),i[s+1]=Math.max(0,Math.min(t,i[s+1]));return i}function Pr(n){let e=0;for(let t=0;t<n.length-2;t+=2)e+=n[t]*n[t+3]-n[t+2]*n[t+1];return e/2}var kr=n=>n>127?127:n<-127?-127:n,Tc=n=>n>32767?32767:n<-32768?-32768:n;var Ue=4;function Pc(n,e,t,o,r){let i=o*o,a=[],l=u=>n[u*2],s=u=>n[u*2+1],c=(u,m)=>{let f=n.length/2;return n.push((l(u)+l(m))/2,(s(u)+s(m))/2),f};for(let u=0;u<e.length;u+=3){a.push([t+e[u],t+e[u+1],t+e[u+2]]);let m=0;for(;a.length&&!(++m>2e4);){let[f,d,h]=a.pop(),p=(l(f)-l(d))**2+(s(f)-s(d))**2,b=(l(d)-l(h))**2+(s(d)-s(h))**2,A=(l(h)-l(f))**2+(s(h)-s(f))**2,y=Math.max(p,b,A);if(y<=i){r.push(f,d,h);continue}if(y===p){let g=c(f,d);a.push([f,g,h],[g,d,h]);}else if(y===b){let g=c(d,h);a.push([d,g,f],[g,h,f]);}else {let g=c(h,f);a.push([h,g,d],[g,f,d]);}}}}function Rr(n,e,t=0,o,r=false,i=4096){let a=[],l=[],s=[];for(let d of n.features()){if(d.type!==3||!me(e,d.properties))continue;let h=d.properties.osm_id,p=typeof h=="number"?h:typeof h=="string"?Number(h):NaN,b=Number.isFinite(p)?p:Number(d.id??0);for(let A of rt(d.loadGeometry())){let y=r?ct(A,i):A;if(!y)continue;let g=[],B=[],C=o?Ge(y.outer,o):y.outer;for(let w=0;w<C.length;w++)g.push(C[w]);for(let w of y.holes){let x=o?Ge(w,o):w;B.push(g.length/2);for(let D=0;D<x.length;D++)g.push(x[D]);}let v=Se(g,B.length?B:void 0,2);if(!v.length)continue;let _=a.length/2;for(let w=0;w<g.length;w++)a.push(g[w]);if(t>0){let w=[];Pc(a,v,_,t,w);for(let x=0;x<w.length;x+=3)l.push(w[x],w[x+2],w[x+1]),s.push(b);continue}for(let w=0;w<v.length;w+=3)l.push(_+v[w],_+v[w+2],_+v[w+1]),s.push(b);}}if(!l.length)return null;let c=a.length/2,u=new Int16Array(a),m=new Uint32Array(l);return {featureIds:new Float64Array(s).buffer,vertices:u.buffer,indices:m.buffer,vertexCount:c,indexCount:m.length}}var kc=100;function Or(n){return {shapes:[],cells:[],extent:0,metersPerTile:n}}function Wr(n,e,t,o){if(!(t<=0)){n.extent=o;for(let r of e){let i=r.outer;if(i.length<6)continue;let a=1/0,l=1/0,s=-1/0,c=-1/0;for(let u=0;u<i.length;u+=2)i[u]<a&&(a=i[u]),i[u]>s&&(s=i[u]),i[u+1]<l&&(l=i[u+1]),i[u+1]>c&&(c=i[u+1]);n.shapes.push({outer:i,holes:r.holes,level:t,minX:a,minY:l,maxX:s,maxY:c});}n.cells=[];}}function Gc(n){n.cells=Array.from({length:1024},()=>[]);let e=n.extent/32;for(let t=0;t<n.shapes.length;t++){let o=n.shapes[t],r=pt(Math.floor(o.minX/e)),i=pt(Math.floor(o.maxX/e)),a=pt(Math.floor(o.minY/e)),l=pt(Math.floor(o.maxY/e));for(let s=a;s<=l;s++)for(let c=r;c<=i;c++)n.cells[s*32+c].push(t);}}var Vi=n=>n.shapes.length===0;function Oo(n,e,t){!n.cells.length&&n.shapes.length&&Gc(n);let o=n.extent/32,r=n.cells[pt(Math.floor(t/o))*32+pt(Math.floor(e/o))];if(!r||!r.length)return 0;let i=0;for(let a of r){let l=n.shapes[a];if(l.level<=i||e<l.minX||e>l.maxX||t<l.minY||t>l.maxY||!Wi(l.outer,e,t))continue;let s=false;for(let c of l.holes)if(Wi(c,e,t)){s=true;break}s||(i=l.level);}return Math.min(Math.round(i*100),127)}function Vr(n,e){let t=[],o=[],r=n.extent>0?n.metersPerTile/n.extent:0,i=r>0?2/r:0,a=Oo(n,e[0],e[1]);t.push(e[0],e[1]),o.push(a);for(let l=0;l+3<e.length;l+=2){let s=e[l],c=e[l+1],u=e[l+2],m=e[l+3],f=Oo(n,u,m);if(f!==a&&i>0){let d=Math.hypot(u-s,m-c),h=Math.min(Math.ceil(d/i),64),p=a;for(let b=1;b<h;b++){let A=b/h,y=s+(u-s)*A,g=c+(m-c)*A,B=Oo(n,y,g);B!==p&&(t.push(y,g),o.push(B),p=B);}}t.push(u,m),o.push(f),a=f;}return {pts:t,levels:o}}var pt=n=>n<0?0:n>31?31:n;function Wi(n,e,t){let o=false,r=n.length/2;for(let i=0,a=r-1;i<r;a=i++){let l=n[i*2],s=n[i*2+1],c=n[a*2],u=n[a*2+1];s>t!=u>t&&e<(c-l)*(t-s)/(u-s)+l&&(o=!o);}return o}var Je=20;function zr(n,e,t=0,o){let r=Math.max(256,n.length*24),i=new ArrayBuffer(r*Je),a=new DataView(i),l=0,s=[],c=d=>{if(l+d<=r)return;r=Math.max(r*2,l+d);let h=new ArrayBuffer(r*Je);new Uint8Array(h).set(new Uint8Array(i,0,l*Je)),i=h,a=new DataView(h);},u=(d,h,p,b,A,y,g,B=0,C=0)=>{let v=l*Je;return a.setInt16(v,d,true),a.setInt16(v+2,h,true),a.setInt16(v+4,p,true),a.setInt16(v+6,b,true),a.setInt8(v+8,A),a.setInt8(v+9,y),a.setInt8(v+10,B),a.setInt8(v+11,C),a.setFloat32(v+12,g,true),a.setFloat32(v+16,m,true),l++},m=0;for(let d of n.features()){if(d.type!==2&&d.type!==3||!me(e,d.properties))continue;let h=d.properties.width;m=typeof h=="number"&&h>.5&&h<100?h:0;let p=d.type===3;for(let b of d.loadGeometry()){let A=t>0?Rc(zi(b),t):zi(b);if(A.length<4)continue;let y=o&&!Vi(o)?Vr(o,A):null,g=y?y.pts:A,B=y?.levels,C=g.length/2;if(C<2)continue;c((C-1)*4);let v=0;for(let _=0;_<C-1;_++){let w=g[_*2],x=g[_*2+1],D=g[_*2+2],I=g[_*2+3],E=Math.hypot(D-w,I-x);if(p&&Wc(w,x,D,I,n.extent)){v+=E;continue}let L=Oc(w,x,D,I,n.extent);if(!L){v+=E;continue}let[M,S,F,T]=L,k=Math.hypot(M-w,S-x),H=Math.hypot(F-M,T-S),G=Math.hypot(D-F,I-T),N=v+k,R=B?B[_]:0,W=B?B[_+1]:0,V=u(M,S,F,T,0,-1,N,R,W),j=u(M,S,F,T,0,1,N,R,W),Y=u(M,S,F,T,1,1,N,R,W),oe=u(M,S,F,T,1,-1,N,R,W);v+=k+H+G,s.push(V,j,Y,V,Y,oe);}}}if(!s.length)return null;let f=new Uint32Array(s);return {vertices:i.slice(0,l*Je),indices:f.buffer,vertexCount:l,indexCount:f.length}}function Rc(n,e){let t=[];for(let o=0;o+3<n.length;o+=2){let r=n[o],i=n[o+1],a=n[o+2],l=n[o+3];t.push(r,i);let s=Math.min(64,Math.floor(Math.hypot(a-r,l-i)/e));for(let c=1;c<s;c++){let u=c/s;t.push(r+(a-r)*u,i+(l-i)*u);}}return t.push(n[n.length-2],n[n.length-1]),t}function zi(n){let e=[];for(let t=0;t<n.length;t+=2){let o=n[t],r=n[t+1],i=e.length;i>=2&&e[i-2]===o&&e[i-1]===r||e.push(o,r);}return e}function Oc(n,e,t,o,r){let i=t-n,a=o-e,l=0,s=1,c=[[-i,n],[i,r-n],[-a,e],[a,r-e]];for(let[u,m]of c){if(u===0){if(m<0)return null;continue}let f=m/u;if(u<0){if(f>s)return null;f>l&&(l=f);}else {if(f<l)return null;f<s&&(s=f);}}return s-l<1e-6?null:[Math.round(n+i*l),Math.round(e+a*l),Math.round(n+i*s),Math.round(e+a*s)]}function Wc(n,e,t,o,r){return n===t&&(n<=0||n>=r)?true:e===o&&(e<=0||e>=r)}var Nr={enabled:true,skyColor:"#7fb2e5",horizonColor:"#dfe6ee",fogRange:[1.35,7.5],fogIntensity:.92,spaceColor:"#05070f",atmosphereColor:"#79b8f5",starIntensity:.55,horizonBlend:.75},Kr={ambientColor:"#ffffff",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#fff4e2",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6f2",fillIntensity:.18};var Ni={version:1,name:"OSM 3D \u2014 \u0434\u043D\u0435\u0432\u043D\u043E\u0439",background:"#eceae4",light:{ambientColor:"#ffffff",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#fff4e2",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6f2",fillIntensity:.18},layers:[{id:"landcover-wood",type:"fill","source-layer":"landcover",filter:["in","class","wood","forest"],paint:{color:"#c6dcb4",opacity:{stops:[[8,.5],[12,.85]]},material:"foliage",materialScale:16}},{id:"landcover-grass",type:"fill","source-layer":"landcover",filter:["in","class","grass","farmland","meadow"],paint:{color:"#d9e6c6",opacity:{stops:[[8,.45],[12,.8]]},material:"foliage",materialScale:11}},{id:"landcover-sand",type:"fill","source-layer":"landcover",filter:["in","class","sand","beach"],paint:{color:"#f2e7c8",material:"sand",materialScale:26}},{id:"landcover-ice",type:"fill","source-layer":"landcover",filter:["in","class","ice","glacier"],paint:{color:"#e6f2f7"}},{id:"landcover-wetland",type:"fill","source-layer":"landcover",filter:["in","class","wetland","swamp"],paint:{color:"#cfe0d4",material:"foliage",materialScale:9}},{id:"landuse-residential",type:"fill","source-layer":"landuse",filter:["in","class","residential","suburb","neighbourhood","quarter"],paint:{color:"#e6e2da",opacity:{stops:[[10,.4],[14,.7]]}}},{id:"landuse-industrial",type:"fill","source-layer":"landuse",filter:["in","class","industrial","quarry","railway","substation"],paint:{color:"#e7e0dd"}},{id:"landuse-civic",type:"fill","source-layer":"landuse",filter:["in","class","school","university","college","hospital","clinic","police","kindergarten","bus_station"],paint:{color:"#ece3d8"}},{id:"landuse-sport",type:"fill","source-layer":"landuse",filter:["in","class","pitch","stadium","playground","track","swimming_pool"],paint:{color:"#cfe3c4",material:"foliage",materialScale:10}},{id:"landuse-cemetery",type:"fill","source-layer":"landuse",filter:["in","class","cemetery","grave_yard"],paint:{color:"#d6dfc8",material:"foliage",materialScale:12}},{id:"landuse-parking",type:"fill","source-layer":"landuse",filter:["in","class","parking","fuel"],paint:{color:"#e8e4dc"}},{id:"park",type:"fill","source-layer":"park",paint:{color:"#cfe5bd",opacity:.75,material:"foliage",materialScale:15}},{id:"aeroway-area",type:"fill","source-layer":"aeroway",filter:["in","class","aerodrome","apron","helipad"],paint:{color:"#e4e2e6"}},{id:"water",type:"fill","source-layer":"water",filter:["!in","class","swimming_pool"],paint:{color:"#a5cbe3",material:"water",materialScale:14,materialSpeed:1}},{id:"water-pool",type:"fill","source-layer":"water",filter:["==","class","swimming_pool"],paint:{color:"#9fd3e8",material:"water",materialScale:8,materialSpeed:1}},{id:"waterway",type:"line","source-layer":"waterway",paint:{color:"#a5cbe3",width:{stops:[[8,.6],[12,1.4],[16,4],[19,11.5],[20,23],[21,46],[22,92]]},material:"water",materialScale:10,materialSpeed:1}},{id:"aeroway-line",type:"line","source-layer":"aeroway",filter:["in","class","runway","taxiway"],paint:{color:"#d8d5da",width:{stops:[[10,1],[14,5],[18,24],[19,24],[20,48],[21,96],[22,192]]},material:"asphalt",materialScale:4}},{id:"road-casing-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#d4ab68",width:{stops:[[6,1.6],[10,3.4],[14,8],[16,14],[18,30],[19,45],[20,90],[21,180],[22,360]]},widthFromData:true,widthExtra:2.5}},{id:"road-casing-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#c6bca6",width:{stops:[[10,1.6],[14,5.5],[16,10],[18,22],[19,33],[20,66],[21,132],[22,264]]},widthFromData:true,widthExtra:2}},{id:"road-casing-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#cdc4b2",width:{stops:[[13,1.4],[16,6],[18,14],[19,22],[20,44],[21,88],[22,176]]},widthFromData:true,widthExtra:1.5}},{id:"road-rail",type:"line","source-layer":"transportation",filter:["in","class","rail","transit"],minzoom:10,paint:{color:"#b2a99e",width:{stops:[[10,.8],[14,1.8],[18,4],[19,5.5],[20,11],[21,22],[22,44]]}}},{id:"road-path",type:"line","source-layer":"transportation",filter:["in","class","path","pedestrian","footway","steps"],minzoom:14,paint:{color:"#bdb2a0",width:{stops:[[14,.8],[17,2],[19,4],[20,8],[21,16],[22,32]]},dashArray:[4,3],material:"asphalt",materialScale:2}},{id:"road-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#ffffff",width:{stops:[[13,.6],[16,4],[18,11],[19,18],[20,36],[21,72],[22,144]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#ffffff",width:{stops:[[10,.8],[14,3.6],[16,7.5],[18,18],[19,28],[20,56],[21,112],[22,224]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-lane-divider-major",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","motorway","trunk","primary"]],minzoom:16.5,paint:{color:"#e3bd7f",width:{stops:[[16.5,.54],[17,.78],[18,1.4],[19,2.17],[20,4.34],[21,8.68],[22,17.36]]},dashArray:[7,18],material:"flat"}},{id:"road-lane-divider-secondary",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","secondary","tertiary"]],minzoom:16.5,paint:{color:"#d8cfbc",width:{stops:[[16.5,.46],[17,.67],[18,1.2],[19,1.86],[20,3.72],[21,7.44],[22,14.88]]},dashArray:[7,18],material:"flat"}},{id:"boundary",type:"line","source-layer":"boundary",filter:["<=","admin_level",4],paint:{color:"#b3a6b8",opacity:.7,width:{stops:[[4,.7],[10,1.4],[16,2.4]]},dashArray:[6,4]}},{id:"building",type:"fill-extrusion","source-layer":"building",minzoom:15,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,heightScale:{stops:[[15,0],[15.8,1]]},aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"indoor-venue",type:"fill-extrusion",source:"indoor","source-layer":"area",filter:["all",["==","class","level"],["==","base",1]],minzoom:15,maxzoom:16,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"road-closed-casing",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#ffffff",width:{stops:[[11,4],[14,6],[17,10],[19,16],[20,32],[21,64],[22,128]]},opacity:.9},overlay:true},{id:"road-closed",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#d92b2b",width:{stops:[[11,2.5],[14,4],[17,7],[19,11],[20,22],[21,44],[22,88]]},dashArray:[5,4]},overlay:true},{id:"crossing",type:"fill",source:"points","source-layer":"crossings",minzoom:16.5,overlay:true,paint:{color:"#ffffff",opacity:.9}},{id:"housenumber",type:"symbol","source-layer":"housenumber",minzoom:17,layout:{textField:"{housenumber}",textSize:{stops:[[17,9],[19,11]]},maxLineChars:6,priority:-60},paint:{color:"#8c8478",haloColor:"#f5f3ee",haloWidth:1}},{id:"poi-food",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c2681c",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c2681c",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream"]},{id:"poi-shop",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#2f77c4",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#2f77c4",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle"]},{id:"poi-transport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3b82a6",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3b82a6",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport"]},{id:"poi-health",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c24444",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c24444",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pharmacy","hospital","doctors","dentist","veterinary"]},{id:"poi-education",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3f7f7a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3f7f7a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","school","college","university","library","kindergarten"]},{id:"poi-culture",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#8b5aa5",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#8b5aa5",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information"]},{id:"poi-sport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4f8b45",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4f8b45",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running"]},{id:"poi-lodging",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#7a5fbf",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#7a5fbf",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","lodging"]},{id:"poi-service",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#59636e",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#59636e",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"poi",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4a4a4a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["!in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport","pharmacy","hospital","doctors","dentist","veterinary","school","college","university","library","kindergarten","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running","lodging","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"traffic-signal",type:"symbol",source:"points","source-layer":"roadpoints",minzoom:16,filter:["==","kind","traffic_signals"],layout:{iconImage:"traffic_signals",priority:3},paint:{color:"#5c6470",haloColor:"#ffffff",haloWidth:1.4,iconSize:15}},{id:"road-shield",type:"symbol","source-layer":"transportation_name",filter:["has","ref"],minzoom:11,layout:{textField:"{ref}",iconImage:"shield-{ref_length}",iconPlacement:"behind",textSize:{stops:[[11,9.5],[16,11]]},iconTextGap:4,maxLineChars:10,collisionPadding:70,priority:3},paint:{color:"#3a4048",haloColor:"#f7f3e8",haloWidth:.5,iconColor:"#f7f3e8",iconHaloColor:"#8a8172",iconHaloWidth:1.4}},{id:"road-label",type:"symbol","source-layer":"transportation_name",minzoom:14,layout:{textField:["{name:ru}","{name}"],textPlacement:"line",textSize:{stops:[[14,10],[18,13]]},priority:20,abbreviate:true},paint:{color:"#5c5646",haloColor:"#ffffff",haloWidth:1.6}},{id:"water-label",type:"symbol","source-layer":"water_name",minzoom:10,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[10,11],[16,14]]},priority:30},paint:{color:"#3d7ea6",haloColor:"#ffffff",haloWidth:1.4}},{id:"place-label",type:"symbol","source-layer":"place",minzoom:4,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[6,12],[12,17],[16,22]]},maxLineChars:16,priority:90},paint:{color:"#3a3a3a",haloColor:"#ffffff",haloWidth:1.8}},{id:"indoor-shell",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","level"],minzoom:16,paint:{color:"#f6f3ec",opacity:.97},clipToTile:true},{id:"indoor-corridor",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","corridor"],minzoom:16,paint:{color:"#ffffff"},clipToTile:true},{id:"indoor-room",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["in","class","room","area"],minzoom:16,paint:{color:"#efeae0"},clipToTile:true},{id:"indoor-service",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","service"],minzoom:16,paint:{color:"#e6e1d6"},clipToTile:true},{id:"indoor-shop",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","shop"],minzoom:16,paint:{color:"#e8e0f0"},clipToTile:true},{id:"indoor-food",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","food"],minzoom:16,paint:{color:"#f7e3cd"},clipToTile:true},{id:"indoor-wc",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wc"],minzoom:16,paint:{color:"#d8e8f2"},clipToTile:true},{id:"indoor-wall",type:"fill-extrusion",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wall"],minzoom:16,paint:{color:"#cbc4b8",roofColor:"#e4ded2",facadeDetail:0,tintVariation:0,roofVariation:0,aoStrength:0}},{id:"indoor-transportation",type:"fill",source:"indoor","source-layer":"transportation",splitBy:"level",minzoom:16,paint:{color:"#d9d2e8",opacity:.95},clipToTile:true},{id:"indoor-door",type:"symbol",source:"indoor","source-layer":"poi",filter:["==","class","door"],splitBy:"level",minzoom:18,layout:{iconImage:"door",iconSize:{stops:[[18,9],[20,13]]},allowOverlap:true,priority:-10},paint:{color:"#8a8172",haloColor:"#ffffff",haloWidth:1.2}},{id:"indoor-poi",type:"symbol",source:"indoor","source-layer":"poi",splitBy:"level",minzoom:17,layout:{textField:["{name}"],iconImage:"{class}",textSize:{stops:[[17,10],[19,12]]},iconSize:{stops:[[17,12],[19,15]]},iconTextGap:2,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:.32}},{id:"indoor-name",type:"symbol",source:"indoor","source-layer":"area_name",splitBy:"level",minzoom:17,layout:{textField:["{name}"],textSize:{stops:[[17,10.5],[19,12.5]]},maxLineChars:8},paint:{color:"#3c3830",haloColor:"#ffffff",haloWidth:1.4}},{id:"building-entrance",type:"symbol",source:"points","source-layer":"entrances",minzoom:17,layout:{iconImage:"entrance",showFor:"highlight",textField:["{ref}"],textSize:{stops:[[17,10],[19,12.5]]},allowOverlap:true,priority:40,iconRotate:"angle",placement:"map",arrowLength:{stops:[[17,22],[18,32],[19,40],[20,48],[22,56]]},arrowWidth:{stops:[[17,6],[18,8.5],[19,10.5],[20,12.5],[22,15]]},arrowOutline:{stops:[[17,1.4],[18,2],[19,2.5],[20,3],[22,3.5]]},arrowGap:{stops:[[17,14],[18,19],[19,23],[20,27],[22,31]]},arrowUnits:"pixels",iconTextGap:3,arrowDotRadius:{stops:[[17,2.2],[18,3.2],[19,4],[20,4.8],[22,5.6]]},arrowDotGap:{stops:[[17,5],[18,7],[19,9],[20,11],[22,12.5]]}},paint:{color:"#2d6ecb",haloColor:"#ffffff",haloWidth:1.6}}],sources:{indoor:{url:"/tileserver/data/indoor/{z}/{x}/{y}.pbf",minzoom:15,maxzoom:18},points:{url:"/tileserver/data/points/{z}/{x}/{y}.pbf",minzoom:13,maxzoom:16},closures:{url:"/closures/tiles/{z}/{x}/{y}.mvt",minzoom:10,maxzoom:16}}};var Ki={version:1,name:"\u041C\u044F\u0433\u043A\u0430\u044F \u0433\u0435\u043E\u043C\u0435\u0442\u0440\u0438\u044F",background:"#eceae4",light:{ambientColor:"#ffffff",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#fff4e2",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6f2",fillIntensity:.18},layers:[{id:"landcover-wood",type:"fill","source-layer":"landcover",filter:["in","class","wood","forest"],paint:{color:"#c6dcb4",opacity:{stops:[[8,.5],[12,.85]]},material:"foliage",materialScale:16},cornerRadius:10,cornerSegments:4},{id:"landcover-grass",type:"fill","source-layer":"landcover",filter:["in","class","grass","farmland","meadow"],paint:{color:"#d9e6c6",opacity:{stops:[[8,.45],[12,.8]]},material:"foliage",materialScale:11},cornerRadius:8,cornerSegments:4},{id:"landcover-sand",type:"fill","source-layer":"landcover",filter:["in","class","sand","beach"],paint:{color:"#f2e7c8",material:"sand",materialScale:26},cornerRadius:10,cornerSegments:4},{id:"landcover-ice",type:"fill","source-layer":"landcover",filter:["in","class","ice","glacier"],paint:{color:"#e6f2f7"}},{id:"landcover-wetland",type:"fill","source-layer":"landcover",filter:["in","class","wetland","swamp"],paint:{color:"#cfe0d4",material:"foliage",materialScale:9},cornerRadius:8,cornerSegments:4},{id:"landuse-residential",type:"fill","source-layer":"landuse",filter:["in","class","residential","suburb","neighbourhood","quarter"],paint:{color:"#e6e2da",opacity:{stops:[[10,.4],[14,.7]]}},cornerRadius:4,cornerSegments:3},{id:"landuse-industrial",type:"fill","source-layer":"landuse",filter:["in","class","industrial","quarry","railway","substation"],paint:{color:"#e7e0dd"},cornerRadius:4,cornerSegments:3},{id:"landuse-civic",type:"fill","source-layer":"landuse",filter:["in","class","school","university","college","hospital","clinic","police","kindergarten","bus_station"],paint:{color:"#ece3d8"},cornerRadius:4,cornerSegments:3},{id:"landuse-sport",type:"fill","source-layer":"landuse",filter:["in","class","pitch","stadium","playground","track","swimming_pool"],paint:{color:"#cfe3c4",material:"foliage",materialScale:10},cornerRadius:5,cornerSegments:3},{id:"landuse-cemetery",type:"fill","source-layer":"landuse",filter:["in","class","cemetery","grave_yard"],paint:{color:"#d6dfc8",material:"foliage",materialScale:12},cornerRadius:5,cornerSegments:3},{id:"landuse-parking",type:"fill","source-layer":"landuse",filter:["in","class","parking","fuel"],paint:{color:"#e8e4dc"},cornerRadius:3,cornerSegments:3},{id:"park",type:"fill","source-layer":"park",paint:{color:"#cfe5bd",opacity:.75,material:"foliage",materialScale:15},cornerRadius:9,cornerSegments:4},{id:"aeroway-area",type:"fill","source-layer":"aeroway",filter:["in","class","aerodrome","apron","helipad"],paint:{color:"#e4e2e6"},cornerRadius:5,cornerSegments:3},{id:"water",type:"fill","source-layer":"water",filter:["!in","class","swimming_pool"],paint:{color:"#a5cbe3",material:"water",materialScale:14,materialSpeed:1},cornerRadius:7,cornerSegments:4},{id:"water-pool",type:"fill","source-layer":"water",filter:["==","class","swimming_pool"],paint:{color:"#9fd3e8",material:"water",materialScale:8,materialSpeed:1},cornerRadius:4,cornerSegments:4},{id:"waterway",type:"line","source-layer":"waterway",paint:{color:"#a5cbe3",width:{stops:[[8,.6],[12,1.4],[16,4],[19,11.5],[20,23],[21,46],[22,92]]},material:"water",materialScale:10,materialSpeed:1}},{id:"aeroway-line",type:"line","source-layer":"aeroway",filter:["in","class","runway","taxiway"],paint:{color:"#d8d5da",width:{stops:[[10,1],[14,5],[18,24],[19,24],[20,48],[21,96],[22,192]]},material:"asphalt",materialScale:4}},{id:"road-casing-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#d4ab68",width:{stops:[[6,1.6],[10,3.4],[14,8],[16,14],[18,30],[19,45],[20,90],[21,180],[22,360]]},widthFromData:true,widthExtra:2.5}},{id:"road-casing-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#c6bca6",width:{stops:[[10,1.6],[14,5.5],[16,10],[18,22],[19,33],[20,66],[21,132],[22,264]]},widthFromData:true,widthExtra:2}},{id:"road-casing-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#cdc4b2",width:{stops:[[13,1.4],[16,6],[18,14],[19,22],[20,44],[21,88],[22,176]]},widthFromData:true,widthExtra:1.5}},{id:"road-rail",type:"line","source-layer":"transportation",filter:["in","class","rail","transit"],minzoom:10,paint:{color:"#b2a99e",width:{stops:[[10,.8],[14,1.8],[18,4],[19,5.5],[20,11],[21,22],[22,44]]}}},{id:"road-path",type:"line","source-layer":"transportation",filter:["in","class","path","pedestrian","footway","steps"],minzoom:14,paint:{color:"#bdb2a0",width:{stops:[[14,.8],[17,2],[19,4],[20,8],[21,16],[22,32]]},dashArray:[4,3],material:"asphalt",materialScale:2}},{id:"road-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#ffffff",width:{stops:[[13,.6],[16,4],[18,11],[19,18],[20,36],[21,72],[22,144]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#ffffff",width:{stops:[[10,.8],[14,3.6],[16,7.5],[18,18],[19,28],[20,56],[21,112],[22,224]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-lane-divider-major",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","motorway","trunk","primary"]],minzoom:16.5,paint:{color:"#e3bd7f",width:{stops:[[16.5,.54],[17,.78],[18,1.4],[19,2.17],[20,4.34],[21,8.68],[22,17.36]]},dashArray:[7,18],material:"flat"}},{id:"road-lane-divider-secondary",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","secondary","tertiary"]],minzoom:16.5,paint:{color:"#d8cfbc",width:{stops:[[16.5,.46],[17,.67],[18,1.2],[19,1.86],[20,3.72],[21,7.44],[22,14.88]]},dashArray:[7,18],material:"flat"}},{id:"boundary",type:"line","source-layer":"boundary",filter:["<=","admin_level",4],paint:{color:"#b3a6b8",opacity:.7,width:{stops:[[4,.7],[10,1.4],[16,2.4]]},dashArray:[6,4]}},{id:"building",type:"fill-extrusion","source-layer":"building",minzoom:15,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,heightScale:{stops:[[15,0],[15.8,1]]},aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35},cornerRadius:1.6,cornerSegments:2},{id:"indoor-venue",type:"fill-extrusion",source:"indoor","source-layer":"area",filter:["all",["==","class","level"],["==","base",1]],minzoom:15,maxzoom:16,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"road-closed-casing",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#ffffff",width:{stops:[[11,4],[14,6],[17,10],[19,16],[20,32],[21,64],[22,128]]},opacity:.9},overlay:true},{id:"road-closed",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#d92b2b",width:{stops:[[11,2.5],[14,4],[17,7],[19,11],[20,22],[21,44],[22,88]]},dashArray:[5,4]},overlay:true},{id:"crossing",type:"fill",source:"points","source-layer":"crossings",minzoom:16.5,overlay:true,paint:{color:"#ffffff",opacity:.9}},{id:"housenumber",type:"symbol","source-layer":"housenumber",minzoom:17,layout:{textField:"{housenumber}",textSize:{stops:[[17,9],[19,11]]},maxLineChars:6,priority:-60},paint:{color:"#8c8478",haloColor:"#f5f3ee",haloWidth:1}},{id:"poi-food",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c2681c",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c2681c",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream"]},{id:"poi-shop",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#2f77c4",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#2f77c4",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle"]},{id:"poi-transport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3b82a6",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3b82a6",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport"]},{id:"poi-health",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c24444",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c24444",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pharmacy","hospital","doctors","dentist","veterinary"]},{id:"poi-education",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3f7f7a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3f7f7a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","school","college","university","library","kindergarten"]},{id:"poi-culture",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#8b5aa5",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#8b5aa5",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information"]},{id:"poi-sport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4f8b45",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4f8b45",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running"]},{id:"poi-lodging",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#7a5fbf",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#7a5fbf",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","lodging"]},{id:"poi-service",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#59636e",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#59636e",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"poi",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4a4a4a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["!in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport","pharmacy","hospital","doctors","dentist","veterinary","school","college","university","library","kindergarten","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running","lodging","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"traffic-signal",type:"symbol",source:"points","source-layer":"roadpoints",minzoom:16,filter:["==","kind","traffic_signals"],layout:{iconImage:"traffic_signals",priority:3},paint:{color:"#5c6470",haloColor:"#ffffff",haloWidth:1.4,iconSize:15}},{id:"road-shield",type:"symbol","source-layer":"transportation_name",filter:["has","ref"],minzoom:11,layout:{textField:"{ref}",iconImage:"shield-{ref_length}",iconPlacement:"behind",textSize:{stops:[[11,9.5],[16,11]]},iconTextGap:4,maxLineChars:10,collisionPadding:70,priority:3},paint:{color:"#3a4048",haloColor:"#f7f3e8",haloWidth:.5,iconColor:"#f7f3e8",iconHaloColor:"#8a8172",iconHaloWidth:1.4}},{id:"road-label",type:"symbol","source-layer":"transportation_name",minzoom:14,layout:{textField:["{name:ru}","{name}"],textPlacement:"line",textSize:{stops:[[14,10],[18,13]]},priority:20,abbreviate:true},paint:{color:"#5c5646",haloColor:"#ffffff",haloWidth:1.6}},{id:"water-label",type:"symbol","source-layer":"water_name",minzoom:10,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[10,11],[16,14]]},priority:30},paint:{color:"#3d7ea6",haloColor:"#ffffff",haloWidth:1.4}},{id:"place-label",type:"symbol","source-layer":"place",minzoom:4,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[6,12],[12,17],[16,22]]},maxLineChars:16,priority:90},paint:{color:"#3a3a3a",haloColor:"#ffffff",haloWidth:1.8}},{id:"indoor-shell",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","level"],minzoom:16,paint:{color:"#f6f3ec",opacity:.97},clipToTile:true},{id:"indoor-corridor",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","corridor"],minzoom:16,paint:{color:"#ffffff"},clipToTile:true},{id:"indoor-room",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["in","class","room","area"],minzoom:16,paint:{color:"#efeae0"},clipToTile:true},{id:"indoor-service",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","service"],minzoom:16,paint:{color:"#e6e1d6"},clipToTile:true},{id:"indoor-shop",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","shop"],minzoom:16,paint:{color:"#e8e0f0"},clipToTile:true},{id:"indoor-food",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","food"],minzoom:16,paint:{color:"#f7e3cd"},clipToTile:true},{id:"indoor-wc",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wc"],minzoom:16,paint:{color:"#d8e8f2"},clipToTile:true},{id:"indoor-wall",type:"fill-extrusion",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wall"],minzoom:16,paint:{color:"#cbc4b8",roofColor:"#e4ded2",facadeDetail:0,tintVariation:0,roofVariation:0,aoStrength:0}},{id:"indoor-transportation",type:"fill",source:"indoor","source-layer":"transportation",splitBy:"level",minzoom:16,paint:{color:"#d9d2e8",opacity:.95},clipToTile:true},{id:"indoor-door",type:"symbol",source:"indoor","source-layer":"poi",filter:["==","class","door"],splitBy:"level",minzoom:18,layout:{iconImage:"door",iconSize:{stops:[[18,9],[20,13]]},allowOverlap:true,priority:-10},paint:{color:"#8a8172",haloColor:"#ffffff",haloWidth:1.2}},{id:"indoor-poi",type:"symbol",source:"indoor","source-layer":"poi",splitBy:"level",minzoom:17,layout:{textField:["{name}"],iconImage:"{class}",textSize:{stops:[[17,10],[19,12]]},iconSize:{stops:[[17,12],[19,15]]},iconTextGap:2,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:.32}},{id:"indoor-name",type:"symbol",source:"indoor","source-layer":"area_name",splitBy:"level",minzoom:17,layout:{textField:["{name}"],textSize:{stops:[[17,10.5],[19,12.5]]},maxLineChars:8},paint:{color:"#3c3830",haloColor:"#ffffff",haloWidth:1.4}},{id:"building-entrance",type:"symbol",source:"points","source-layer":"entrances",minzoom:17,layout:{iconImage:"entrance",showFor:"highlight",textField:["{ref}"],textSize:{stops:[[17,10],[19,12.5]]},allowOverlap:true,priority:40,iconRotate:"angle",placement:"map",arrowLength:{stops:[[17,22],[18,32],[19,40],[20,48],[22,56]]},arrowWidth:{stops:[[17,6],[18,8.5],[19,10.5],[20,12.5],[22,15]]},arrowOutline:{stops:[[17,1.4],[18,2],[19,2.5],[20,3],[22,3.5]]},arrowGap:{stops:[[17,14],[18,19],[19,23],[20,27],[22,31]]},arrowUnits:"pixels",iconTextGap:3,arrowDotRadius:{stops:[[17,2.2],[18,3.2],[19,4],[20,4.8],[22,5.6]]},arrowDotGap:{stops:[[17,5],[18,7],[19,9],[20,11],[22,12.5]]}},paint:{color:"#2d6ecb",haloColor:"#ffffff",haloWidth:1.6}}],sources:{indoor:{url:"/tileserver/data/indoor/{z}/{x}/{y}.pbf",minzoom:15,maxzoom:18},points:{url:"/tileserver/data/points/{z}/{x}/{y}.pbf",minzoom:13,maxzoom:16},closures:{url:"/closures/tiles/{z}/{x}/{y}.mvt",minzoom:10,maxzoom:16}}};var Ui={version:1,name:"\u0420\u0435\u043B\u044C\u0435\u0444",background:"#eceae4",light:{ambientColor:"#ffffff",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#fff4e2",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6f2",fillIntensity:.18},layers:[{id:"landcover-wood",type:"surface","source-layer":"landcover",filter:["in","class","wood","forest"],paint:{color:"#c6dcb4",opacity:{stops:[[8,.5],[12,.85]]},material:"foliage",materialScale:16,sideShade:.16},elevation:.7,bevel:.5,bevelDrop:.15,cornerRadius:10,cornerSegments:4},{id:"landcover-grass",type:"surface","source-layer":"landcover",filter:["in","class","grass","farmland","meadow"],paint:{color:"#d9e6c6",opacity:{stops:[[8,.45],[12,.8]]},material:"foliage",materialScale:11,sideShade:.16},elevation:.5,bevel:.45,bevelDrop:.12,cornerRadius:8,cornerSegments:4},{id:"landcover-sand",type:"surface","source-layer":"landcover",filter:["in","class","sand","beach"],paint:{color:"#f2e7c8",material:"sand",materialScale:26,sideShade:.16},elevation:.12,bevel:.6,bevelDrop:.08,cornerRadius:10,cornerSegments:4},{id:"landcover-ice",type:"fill","source-layer":"landcover",filter:["in","class","ice","glacier"],paint:{color:"#e6f2f7"}},{id:"landcover-wetland",type:"surface","source-layer":"landcover",filter:["in","class","wetland","swamp"],paint:{color:"#cfe0d4",material:"foliage",materialScale:9,sideShade:.16},elevation:.15,bevel:.5,bevelDrop:.08,cornerRadius:8,cornerSegments:4},{id:"landuse-residential",type:"fill","source-layer":"landuse",filter:["in","class","residential","suburb","neighbourhood","quarter"],paint:{color:"#e6e2da",opacity:{stops:[[10,.4],[14,.7]]}}},{id:"landuse-industrial",type:"fill","source-layer":"landuse",filter:["in","class","industrial","quarry","railway","substation"],paint:{color:"#e7e0dd"}},{id:"landuse-civic",type:"fill","source-layer":"landuse",filter:["in","class","school","university","college","hospital","clinic","police","kindergarten","bus_station"],paint:{color:"#ece3d8"}},{id:"landuse-sport",type:"surface","source-layer":"landuse",filter:["in","class","pitch","stadium","playground","track","swimming_pool"],paint:{color:"#cfe3c4",material:"foliage",materialScale:10,sideShade:.16},elevation:.35,bevel:.4,bevelDrop:.1,cornerRadius:5,cornerSegments:4},{id:"landuse-cemetery",type:"surface","source-layer":"landuse",filter:["in","class","cemetery","grave_yard"],paint:{color:"#d6dfc8",material:"foliage",materialScale:12,sideShade:.16},elevation:.3,bevel:.4,bevelDrop:.1,cornerRadius:5,cornerSegments:4},{id:"landuse-parking",type:"fill","source-layer":"landuse",filter:["in","class","parking","fuel"],paint:{color:"#e8e4dc"}},{id:"park",type:"surface","source-layer":"park",paint:{color:"#cfe5bd",opacity:.75,material:"foliage",materialScale:15,sideShade:.16},elevation:.6,bevel:.5,bevelDrop:.15,cornerRadius:9,cornerSegments:4},{id:"aeroway-area",type:"fill","source-layer":"aeroway",filter:["in","class","aerodrome","apron","helipad"],paint:{color:"#e4e2e6"}},{id:"water",type:"surface","source-layer":"water",filter:["!in","class","swimming_pool"],paint:{color:"#a5cbe3",material:"water",materialScale:14,materialSpeed:1,sideShade:0},elevation:-0.35,bevel:.8,bevelDrop:.12,cornerRadius:7,cornerSegments:4},{id:"water-pool",type:"surface","source-layer":"water",filter:["==","class","swimming_pool"],paint:{color:"#9fd3e8",material:"water",materialScale:8,materialSpeed:1,sideShade:0},elevation:-0.2,bevel:.4,bevelDrop:.08,cornerRadius:4,cornerSegments:4},{id:"waterway",type:"line","source-layer":"waterway",paint:{color:"#a5cbe3",width:{stops:[[8,.6],[12,1.4],[16,4],[19,11.5],[20,23],[21,46],[22,92]]},material:"water",materialScale:10,materialSpeed:1,elevation:-0.3}},{id:"aeroway-line",type:"line","source-layer":"aeroway",filter:["in","class","runway","taxiway"],paint:{color:"#d8d5da",width:{stops:[[10,1],[14,5],[18,24],[19,24],[20,48],[21,96],[22,192]]},material:"asphalt",materialScale:4,elevation:.08}},{id:"road-casing-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#d4ab68",width:{stops:[[6,1.6],[10,3.4],[14,8],[16,14],[18,30],[19,45],[20,90],[21,180],[22,360]]},elevation:.15,widthFromData:true,widthExtra:2.5}},{id:"road-casing-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#c6bca6",width:{stops:[[10,1.6],[14,5.5],[16,10],[18,22],[19,33],[20,66],[21,132],[22,264]]},elevation:.13,widthFromData:true,widthExtra:2}},{id:"road-casing-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#cdc4b2",width:{stops:[[13,1.4],[16,6],[18,14],[19,22],[20,44],[21,88],[22,176]]},elevation:.11,widthFromData:true,widthExtra:1.5}},{id:"road-rail",type:"line","source-layer":"transportation",filter:["in","class","rail","transit"],minzoom:10,paint:{color:"#b2a99e",width:{stops:[[10,.8],[14,1.8],[18,4],[19,5.5],[20,11],[21,22],[22,44]]},elevation:.12}},{id:"road-path",type:"line","source-layer":"transportation",filter:["in","class","path","pedestrian","footway","steps"],minzoom:14,paint:{color:"#bdb2a0",width:{stops:[[14,.8],[17,2],[19,4],[20,8],[21,16],[22,32]]},dashArray:[4,3],material:"asphalt",materialScale:2,elevation:.05}},{id:"road-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#ffffff",width:{stops:[[13,.6],[16,4],[18,11],[19,18],[20,36],[21,72],[22,144]]},material:"asphalt",materialScale:3,elevation:.14,widthFromData:true}},{id:"road-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#ffffff",width:{stops:[[10,.8],[14,3.6],[16,7.5],[18,18],[19,28],[20,56],[21,112],[22,224]]},material:"asphalt",materialScale:3,elevation:.16,widthFromData:true}},{id:"road-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"asphalt",materialScale:3,elevation:.18,widthFromData:true}},{id:"road-lane-divider-major",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","motorway","trunk","primary"]],minzoom:16.5,paint:{color:"#e3bd7f",width:{stops:[[16.5,.54],[17,.78],[18,1.4],[19,2.17],[20,4.34],[21,8.68],[22,17.36]]},dashArray:[7,18],material:"flat",elevation:.182}},{id:"road-lane-divider-secondary",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","secondary","tertiary"]],minzoom:16.5,paint:{color:"#d8cfbc",width:{stops:[[16.5,.46],[17,.67],[18,1.2],[19,1.86],[20,3.72],[21,7.44],[22,14.88]]},dashArray:[7,18],material:"flat",elevation:.162}},{id:"boundary",type:"line","source-layer":"boundary",filter:["<=","admin_level",4],paint:{color:"#b3a6b8",opacity:.7,width:{stops:[[4,.7],[10,1.4],[16,2.4]]},dashArray:[6,4]}},{id:"building",type:"fill-extrusion","source-layer":"building",minzoom:15,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,heightScale:{stops:[[15,0],[15.8,1]]},aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"indoor-venue",type:"fill-extrusion",source:"indoor","source-layer":"area",filter:["all",["==","class","level"],["==","base",1]],minzoom:15,maxzoom:16,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"road-closed-casing",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#ffffff",width:{stops:[[11,4],[14,6],[17,10],[19,16],[20,32],[21,64],[22,128]]},opacity:.9},overlay:true},{id:"road-closed",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#d92b2b",width:{stops:[[11,2.5],[14,4],[17,7],[19,11],[20,22],[21,44],[22,88]]},dashArray:[5,4]},overlay:true},{id:"crossing",type:"surface",source:"points","source-layer":"crossings",minzoom:16.5,overlay:true,paint:{color:"#ffffff",opacity:.9,sideShade:.16},elevation:.09,bevel:.05,bevelDrop:.02,groundBy:{"landcover:wood":.7,"landcover:forest":.7,"landcover:grass":.5,"landcover:farmland":.5,"landcover:meadow":.5,"landcover:sand":.12,"landcover:beach":.12,"landcover:wetland":.15,"landcover:swamp":.15,"landuse:pitch":.35,"landuse:stadium":.35,"landuse:playground":.35,"landuse:track":.35,"landuse:swimming_pool":.35,"landuse:cemetery":.3,"landuse:grave_yard":.3,"park:park":.6}},{id:"housenumber",type:"symbol","source-layer":"housenumber",minzoom:17,layout:{textField:"{housenumber}",textSize:{stops:[[17,9],[19,11]]},maxLineChars:6,priority:-60},paint:{color:"#8c8478",haloColor:"#f5f3ee",haloWidth:1}},{id:"poi-food",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c2681c",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c2681c",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream"]},{id:"poi-shop",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#2f77c4",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#2f77c4",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle"]},{id:"poi-transport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3b82a6",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3b82a6",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport"]},{id:"poi-health",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c24444",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c24444",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pharmacy","hospital","doctors","dentist","veterinary"]},{id:"poi-education",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3f7f7a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3f7f7a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","school","college","university","library","kindergarten"]},{id:"poi-culture",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#8b5aa5",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#8b5aa5",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information"]},{id:"poi-sport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4f8b45",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4f8b45",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running"]},{id:"poi-lodging",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#7a5fbf",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#7a5fbf",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","lodging"]},{id:"poi-service",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#59636e",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#59636e",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"poi",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4a4a4a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["!in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport","pharmacy","hospital","doctors","dentist","veterinary","school","college","university","library","kindergarten","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running","lodging","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"traffic-signal",type:"symbol",source:"points","source-layer":"roadpoints",minzoom:16,filter:["==","kind","traffic_signals"],layout:{iconImage:"traffic_signals",priority:3},paint:{color:"#5c6470",haloColor:"#ffffff",haloWidth:1.4,iconSize:15}},{id:"road-shield",type:"symbol","source-layer":"transportation_name",filter:["has","ref"],minzoom:11,layout:{textField:"{ref}",iconImage:"shield-{ref_length}",iconPlacement:"behind",textSize:{stops:[[11,9.5],[16,11]]},iconTextGap:4,maxLineChars:10,collisionPadding:70,priority:3},paint:{color:"#3a4048",haloColor:"#f7f3e8",haloWidth:.5,iconColor:"#f7f3e8",iconHaloColor:"#8a8172",iconHaloWidth:1.4}},{id:"road-label",type:"symbol","source-layer":"transportation_name",minzoom:14,layout:{textField:["{name:ru}","{name}"],textPlacement:"line",textSize:{stops:[[14,10],[18,13]]},priority:20,abbreviate:true},paint:{color:"#5c5646",haloColor:"#ffffff",haloWidth:1.6}},{id:"water-label",type:"symbol","source-layer":"water_name",minzoom:10,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[10,11],[16,14]]},priority:30},paint:{color:"#3d7ea6",haloColor:"#ffffff",haloWidth:1.4}},{id:"place-label",type:"symbol","source-layer":"place",minzoom:4,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[6,12],[12,17],[16,22]]},maxLineChars:16,priority:90},paint:{color:"#3a3a3a",haloColor:"#ffffff",haloWidth:1.8}},{id:"indoor-shell",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","level"],minzoom:16,paint:{color:"#f6f3ec",opacity:.97},clipToTile:true},{id:"indoor-corridor",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","corridor"],minzoom:16,paint:{color:"#ffffff"},clipToTile:true},{id:"indoor-room",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["in","class","room","area"],minzoom:16,paint:{color:"#efeae0"},clipToTile:true},{id:"indoor-service",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","service"],minzoom:16,paint:{color:"#e6e1d6"},clipToTile:true},{id:"indoor-shop",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","shop"],minzoom:16,paint:{color:"#e8e0f0"},clipToTile:true},{id:"indoor-food",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","food"],minzoom:16,paint:{color:"#f7e3cd"},clipToTile:true},{id:"indoor-wc",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wc"],minzoom:16,paint:{color:"#d8e8f2"},clipToTile:true},{id:"indoor-wall",type:"fill-extrusion",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wall"],minzoom:16,paint:{color:"#cbc4b8",roofColor:"#e4ded2",facadeDetail:0,tintVariation:0,roofVariation:0,aoStrength:0}},{id:"indoor-transportation",type:"fill",source:"indoor","source-layer":"transportation",splitBy:"level",minzoom:16,paint:{color:"#d9d2e8",opacity:.95},clipToTile:true},{id:"indoor-door",type:"symbol",source:"indoor","source-layer":"poi",filter:["==","class","door"],splitBy:"level",minzoom:18,layout:{iconImage:"door",iconSize:{stops:[[18,9],[20,13]]},allowOverlap:true,priority:-10},paint:{color:"#8a8172",haloColor:"#ffffff",haloWidth:1.2}},{id:"indoor-poi",type:"symbol",source:"indoor","source-layer":"poi",splitBy:"level",minzoom:17,layout:{textField:["{name}"],iconImage:"{class}",textSize:{stops:[[17,10],[19,12]]},iconSize:{stops:[[17,12],[19,15]]},iconTextGap:2,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:.32}},{id:"indoor-name",type:"symbol",source:"indoor","source-layer":"area_name",splitBy:"level",minzoom:17,layout:{textField:["{name}"],textSize:{stops:[[17,10.5],[19,12.5]]},maxLineChars:8},paint:{color:"#3c3830",haloColor:"#ffffff",haloWidth:1.4}},{id:"building-entrance",type:"symbol",source:"points","source-layer":"entrances",minzoom:17,layout:{iconImage:"entrance",showFor:"highlight",textField:["{ref}"],textSize:{stops:[[17,10],[19,12.5]]},allowOverlap:true,priority:40,iconRotate:"angle",placement:"map",arrowLength:{stops:[[17,22],[18,32],[19,40],[20,48],[22,56]]},arrowWidth:{stops:[[17,6],[18,8.5],[19,10.5],[20,12.5],[22,15]]},arrowOutline:{stops:[[17,1.4],[18,2],[19,2.5],[20,3],[22,3.5]]},arrowGap:{stops:[[17,14],[18,19],[19,23],[20,27],[22,31]]},arrowUnits:"pixels",iconTextGap:3,arrowDotRadius:{stops:[[17,2.2],[18,3.2],[19,4],[20,4.8],[22,5.6]]},arrowDotGap:{stops:[[17,5],[18,7],[19,9],[20,11],[22,12.5]]}},paint:{color:"#2d6ecb",haloColor:"#ffffff",haloWidth:1.6}}],sources:{indoor:{url:"/tileserver/data/indoor/{z}/{x}/{y}.pbf",minzoom:15,maxzoom:18},points:{url:"/tileserver/data/points/{z}/{x}/{y}.pbf",minzoom:13,maxzoom:16},closures:{url:"/closures/tiles/{z}/{x}/{y}.mvt",minzoom:10,maxzoom:16}}};var Ji={version:1,name:"\u041E\u0431\u044A\u0451\u043C\u043D\u044B\u0439 \u0433\u043E\u0440\u043E\u0434",background:"#eceae4",light:{ambientColor:"#ffffff",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#fff4e2",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6f2",fillIntensity:.18},layers:[{id:"landcover-wood",type:"surface","source-layer":"landcover",filter:["in","class","wood","forest"],paint:{color:"#c6dcb4",opacity:{stops:[[8,.5],[12,.85]]},material:"flat",sideShade:.16},elevation:.175,bevel:.125,bevelDrop:.038,cornerRadius:10,cornerSegments:4},{id:"landcover-grass",type:"surface","source-layer":"landcover",filter:["in","class","grass","farmland","meadow"],paint:{color:"#d9e6c6",opacity:{stops:[[8,.45],[12,.8]]},material:"flat",sideShade:.16},elevation:.125,bevel:.113,bevelDrop:.03,cornerRadius:8,cornerSegments:4},{id:"landcover-sand",type:"surface","source-layer":"landcover",filter:["in","class","sand","beach"],paint:{color:"#f2e7c8",material:"flat",sideShade:.16},elevation:.035,bevel:.15,bevelDrop:.02,cornerRadius:10,cornerSegments:4},{id:"landcover-ice",type:"fill","source-layer":"landcover",filter:["in","class","ice","glacier"],paint:{color:"#e6f2f7"}},{id:"landcover-wetland",type:"surface","source-layer":"landcover",filter:["in","class","wetland","swamp"],paint:{color:"#cfe0d4",material:"flat",sideShade:.16},elevation:.045,bevel:.125,bevelDrop:.02,cornerRadius:8,cornerSegments:4},{id:"landuse-residential",type:"surface","source-layer":"landuse",filter:["in","class","residential","suburb","neighbourhood","quarter"],paint:{color:"#e6e2da",opacity:{stops:[[10,.4],[14,.7]]},material:"flat",sideShade:.16},cornerRadius:4,cornerSegments:3,elevation:.02,bevel:.1,bevelDrop:.02},{id:"landuse-industrial",type:"surface","source-layer":"landuse",filter:["in","class","industrial","quarry","railway","substation"],paint:{color:"#e7e0dd",material:"flat",sideShade:.16},cornerRadius:4,cornerSegments:3,elevation:.03,bevel:.1,bevelDrop:.02},{id:"landuse-civic",type:"surface","source-layer":"landuse",filter:["in","class","school","university","college","hospital","clinic","police","kindergarten","bus_station"],paint:{color:"#ece3d8",material:"flat",sideShade:.16},cornerRadius:4,cornerSegments:3,elevation:.055,bevel:.1,bevelDrop:.02},{id:"landuse-sport",type:"surface","source-layer":"landuse",filter:["in","class","pitch","stadium","playground","track","swimming_pool"],paint:{color:"#cfe3c4",material:"flat",sideShade:.16},elevation:.088,bevel:.1,bevelDrop:.025,cornerRadius:5,cornerSegments:3},{id:"landuse-cemetery",type:"surface","source-layer":"landuse",filter:["in","class","cemetery","grave_yard"],paint:{color:"#d6dfc8",material:"flat",sideShade:.16},elevation:.075,bevel:.1,bevelDrop:.025,cornerRadius:5,cornerSegments:3},{id:"landuse-parking",type:"surface","source-layer":"landuse",filter:["in","class","parking","fuel"],paint:{color:"#e8e4dc",material:"flat",sideShade:.16},cornerRadius:3,cornerSegments:3,elevation:.19,bevel:.1,bevelDrop:.02},{id:"park",type:"surface","source-layer":"park",paint:{color:"#cfe5bd",opacity:.75,material:"flat",sideShade:.16},elevation:.15,bevel:.125,bevelDrop:.038,cornerRadius:9,cornerSegments:4},{id:"aeroway-area",type:"surface","source-layer":"aeroway",filter:["in","class","aerodrome","apron","helipad"],paint:{color:"#e4e2e6",material:"flat",sideShade:.16},cornerRadius:5,cornerSegments:3,elevation:.065,bevel:.1,bevelDrop:.02},{id:"water",type:"surface","source-layer":"water",filter:["!in","class","swimming_pool"],paint:{color:"#a5cbe3",material:"water",materialScale:14,materialSpeed:1,sideShade:0},elevation:-0.087,bevel:.2,bevelDrop:.03,cornerRadius:7,cornerSegments:4},{id:"water-pool",type:"surface","source-layer":"water",filter:["==","class","swimming_pool"],paint:{color:"#9fd3e8",material:"water",materialScale:8,materialSpeed:1,sideShade:0},elevation:-0.05,bevel:.1,bevelDrop:.02,cornerRadius:4,cornerSegments:3},{id:"waterway",type:"line","source-layer":"waterway",paint:{color:"#a5cbe3",width:{stops:[[8,.6],[12,1.4],[16,4],[19,11.5],[20,23],[21,46],[22,92]]},material:"water",materialScale:10,materialSpeed:1,elevation:-0.075}},{id:"aeroway-line",type:"line","source-layer":"aeroway",filter:["in","class","runway","taxiway"],paint:{color:"#d8d5da",width:{stops:[[10,1],[14,5],[18,24],[19,24],[20,48],[21,96],[22,192]]},material:"flat",elevation:.02}},{id:"road-casing-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#d4ab68",width:{stops:[[6,1.6],[10,3.4],[14,8],[16,14],[18,30],[19,45],[20,90],[21,180],[22,360]]},elevation:.037,widthFromData:true,widthExtra:2.5}},{id:"road-casing-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#c6bca6",width:{stops:[[10,1.6],[14,5.5],[16,10],[18,22],[19,33],[20,66],[21,132],[22,264]]},elevation:.033,widthFromData:true,widthExtra:2}},{id:"road-casing-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#cdc4b2",width:{stops:[[13,1.4],[16,6],[18,14],[19,22],[20,44],[21,88],[22,176]]},elevation:.028,widthFromData:true,widthExtra:1.5}},{id:"road-rail",type:"line","source-layer":"transportation",filter:["in","class","rail","transit"],minzoom:10,paint:{color:"#b2a99e",width:{stops:[[10,.8],[14,1.8],[18,4],[19,5.5],[20,11],[21,22],[22,44]]},elevation:.03}},{id:"road-path",type:"line","source-layer":"transportation",filter:["in","class","path","pedestrian","footway","steps"],minzoom:14,paint:{color:"#bdb2a0",width:{stops:[[14,.8],[17,2],[19,4],[20,8],[21,16],[22,32]]},dashArray:[4,3],material:"flat",elevation:.013}},{id:"road-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#ffffff",width:{stops:[[13,.6],[16,4],[18,11],[19,18],[20,36],[21,72],[22,144]]},material:"flat",elevation:.035,widthFromData:true}},{id:"road-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#ffffff",width:{stops:[[10,.8],[14,3.6],[16,7.5],[18,18],[19,28],[20,56],[21,112],[22,224]]},material:"flat",elevation:.04,widthFromData:true}},{id:"road-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"flat",elevation:.045,widthFromData:true}},{id:"road-lane-divider-major",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","motorway","trunk","primary"]],minzoom:16.5,paint:{color:"#e3bd7f",width:{stops:[[16.5,.54],[17,.78],[18,1.4],[19,2.17],[20,4.34],[21,8.68],[22,17.36]]},dashArray:[7,18],material:"flat",elevation:.047}},{id:"road-lane-divider-secondary",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","secondary","tertiary"]],minzoom:16.5,paint:{color:"#d8cfbc",width:{stops:[[16.5,.46],[17,.67],[18,1.2],[19,1.86],[20,3.72],[21,7.44],[22,14.88]]},dashArray:[7,18],material:"flat",elevation:.042}},{id:"boundary",type:"line","source-layer":"boundary",filter:["<=","admin_level",4],paint:{color:"#b3a6b8",opacity:.7,width:{stops:[[4,.7],[10,1.4],[16,2.4]]},dashArray:[6,4]}},{id:"building",type:"fill-extrusion","source-layer":"building",minzoom:15,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,heightScale:{stops:[[15,0],[15.8,1]]},aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35},cornerRadius:1.6,cornerSegments:2},{id:"indoor-venue",type:"fill-extrusion",source:"indoor","source-layer":"area",filter:["all",["==","class","level"],["==","base",1]],minzoom:15,maxzoom:16,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"road-closed-casing",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#ffffff",width:{stops:[[11,4],[14,6],[17,10],[19,16],[20,32],[21,64],[22,128]]},opacity:.9},overlay:true},{id:"road-closed",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#d92b2b",width:{stops:[[11,2.5],[14,4],[17,7],[19,11],[20,22],[21,44],[22,88]]},dashArray:[5,4]},overlay:true},{id:"crossing",type:"surface",source:"points","source-layer":"crossings",minzoom:16.5,overlay:true,paint:{color:"#ffffff",opacity:.9,sideShade:.16,material:"flat"},elevation:.023,bevel:.013,bevelDrop:.005,groundBy:{"landcover:wood":.175,"landcover:forest":.175,"landcover:grass":.125,"landcover:farmland":.125,"landcover:meadow":.125,"landcover:sand":.035,"landcover:beach":.035,"landcover:wetland":.045,"landcover:swamp":.045,"landuse:residential":.02,"landuse:suburb":.02,"landuse:neighbourhood":.02,"landuse:quarter":.02,"landuse:industrial":.03,"landuse:quarry":.03,"landuse:railway":.03,"landuse:substation":.03,"landuse:school":.055,"landuse:university":.055,"landuse:college":.055,"landuse:hospital":.055,"landuse:clinic":.055,"landuse:police":.055,"landuse:kindergarten":.055,"landuse:bus_station":.055,"landuse:pitch":.088,"landuse:stadium":.088,"landuse:playground":.088,"landuse:track":.088,"landuse:swimming_pool":.088,"landuse:cemetery":.075,"landuse:grave_yard":.075,"landuse:parking":.19,"landuse:fuel":.19,"park:park":.15,"aeroway:aerodrome":.065,"aeroway:apron":.065,"aeroway:helipad":.065}},{id:"housenumber",type:"symbol","source-layer":"housenumber",minzoom:17,layout:{textField:"{housenumber}",textSize:{stops:[[17,9],[19,11]]},maxLineChars:6,priority:-60},paint:{color:"#8c8478",haloColor:"#f5f3ee",haloWidth:1}},{id:"poi-food",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c2681c",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c2681c",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream"]},{id:"poi-shop",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#2f77c4",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#2f77c4",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle"]},{id:"poi-transport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3b82a6",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3b82a6",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport"]},{id:"poi-health",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c24444",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c24444",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pharmacy","hospital","doctors","dentist","veterinary"]},{id:"poi-education",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3f7f7a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3f7f7a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","school","college","university","library","kindergarten"]},{id:"poi-culture",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#8b5aa5",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#8b5aa5",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information"]},{id:"poi-sport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4f8b45",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4f8b45",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running"]},{id:"poi-lodging",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#7a5fbf",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#7a5fbf",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","lodging"]},{id:"poi-service",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#59636e",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#59636e",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"poi",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4a4a4a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["!in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport","pharmacy","hospital","doctors","dentist","veterinary","school","college","university","library","kindergarten","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running","lodging","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"traffic-signal",type:"symbol",source:"points","source-layer":"roadpoints",minzoom:16,filter:["==","kind","traffic_signals"],layout:{iconImage:"traffic_signals",priority:3},paint:{color:"#5c6470",haloColor:"#ffffff",haloWidth:1.4,iconSize:15}},{id:"road-shield",type:"symbol","source-layer":"transportation_name",filter:["has","ref"],minzoom:11,layout:{textField:"{ref}",iconImage:"shield-{ref_length}",iconPlacement:"behind",textSize:{stops:[[11,9.5],[16,11]]},iconTextGap:4,maxLineChars:10,collisionPadding:70,priority:3},paint:{color:"#3a4048",haloColor:"#f7f3e8",haloWidth:.5,iconColor:"#f7f3e8",iconHaloColor:"#8a8172",iconHaloWidth:1.4}},{id:"road-label",type:"symbol","source-layer":"transportation_name",minzoom:14,layout:{textField:["{name:ru}","{name}"],textPlacement:"line",textSize:{stops:[[14,10],[18,13]]},priority:20,abbreviate:true},paint:{color:"#5c5646",haloColor:"#ffffff",haloWidth:1.6}},{id:"water-label",type:"symbol","source-layer":"water_name",minzoom:10,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[10,11],[16,14]]},priority:30},paint:{color:"#3d7ea6",haloColor:"#ffffff",haloWidth:1.4}},{id:"place-label",type:"symbol","source-layer":"place",minzoom:4,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[6,12],[12,17],[16,22]]},maxLineChars:16,priority:90},paint:{color:"#3a3a3a",haloColor:"#ffffff",haloWidth:1.8}},{id:"indoor-shell",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","level"],minzoom:16,paint:{color:"#f6f3ec",opacity:.97},clipToTile:true},{id:"indoor-corridor",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","corridor"],minzoom:16,paint:{color:"#ffffff"},clipToTile:true},{id:"indoor-room",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["in","class","room","area"],minzoom:16,paint:{color:"#efeae0"},clipToTile:true},{id:"indoor-service",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","service"],minzoom:16,paint:{color:"#e6e1d6"},clipToTile:true},{id:"indoor-shop",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","shop"],minzoom:16,paint:{color:"#e8e0f0"},clipToTile:true},{id:"indoor-food",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","food"],minzoom:16,paint:{color:"#f7e3cd"},clipToTile:true},{id:"indoor-wc",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wc"],minzoom:16,paint:{color:"#d8e8f2"},clipToTile:true},{id:"indoor-wall",type:"fill-extrusion",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wall"],minzoom:16,paint:{color:"#cbc4b8",roofColor:"#e4ded2",facadeDetail:0,tintVariation:0,roofVariation:0,aoStrength:0}},{id:"indoor-transportation",type:"fill",source:"indoor","source-layer":"transportation",splitBy:"level",minzoom:16,paint:{color:"#d9d2e8",opacity:.95},clipToTile:true},{id:"indoor-door",type:"symbol",source:"indoor","source-layer":"poi",filter:["==","class","door"],splitBy:"level",minzoom:18,layout:{iconImage:"door",iconSize:{stops:[[18,9],[20,13]]},allowOverlap:true,priority:-10},paint:{color:"#8a8172",haloColor:"#ffffff",haloWidth:1.2}},{id:"indoor-poi",type:"symbol",source:"indoor","source-layer":"poi",splitBy:"level",minzoom:17,layout:{textField:["{name}"],iconImage:"{class}",textSize:{stops:[[17,10],[19,12]]},iconSize:{stops:[[17,12],[19,15]]},iconTextGap:2,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:.32}},{id:"indoor-name",type:"symbol",source:"indoor","source-layer":"area_name",splitBy:"level",minzoom:17,layout:{textField:["{name}"],textSize:{stops:[[17,10.5],[19,12.5]]},maxLineChars:8},paint:{color:"#3c3830",haloColor:"#ffffff",haloWidth:1.4}},{id:"building-entrance",type:"symbol",source:"points","source-layer":"entrances",minzoom:17,layout:{iconImage:"entrance",showFor:"highlight",textField:["{ref}"],textSize:{stops:[[17,10],[19,12.5]]},allowOverlap:true,priority:40,iconRotate:"angle",placement:"map",arrowLength:{stops:[[17,22],[18,32],[19,40],[20,48],[22,56]]},arrowWidth:{stops:[[17,6],[18,8.5],[19,10.5],[20,12.5],[22,15]]},arrowOutline:{stops:[[17,1.4],[18,2],[19,2.5],[20,3],[22,3.5]]},arrowGap:{stops:[[17,14],[18,19],[19,23],[20,27],[22,31]]},arrowUnits:"pixels",iconTextGap:3,arrowDotRadius:{stops:[[17,2.2],[18,3.2],[19,4],[20,4.8],[22,5.6]]},arrowDotGap:{stops:[[17,5],[18,7],[19,9],[20,11],[22,12.5]]}},paint:{color:"#2d6ecb",haloColor:"#ffffff",haloWidth:1.6}}],sources:{indoor:{url:"/tileserver/data/indoor/{z}/{x}/{y}.pbf",minzoom:15,maxzoom:18},points:{url:"/tileserver/data/points/{z}/{x}/{y}.pbf",minzoom:13,maxzoom:16},closures:{url:"/closures/tiles/{z}/{x}/{y}.mvt",minzoom:10,maxzoom:16}}};var Xi={name:"\u041D\u043E\u0447\u043D\u0430\u044F",background:"#11151c",model3dKey:"night",light:{ambientColor:"#8fa3c4",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#cfd8ea",keyIntensity:.3,fillAzimuth:300,fillAltitude:20,fillColor:"#4a5f86",fillIntensity:.22},paint:{"landcover-wood":{color:"#16261a"},"landcover-grass":{color:"#182619"},"landcover-sand":{color:"#2a2417"},"landcover-ice":{color:"#1b2730"},"landcover-wetland":{color:"#16242a"},"landuse-residential":{color:"#171b23"},"landuse-industrial":{color:"#1b1c20"},"landuse-civic":{color:"#1c1f28"},"landuse-sport":{color:"#16261c"},"landuse-cemetery":{color:"#182018"},"landuse-parking":{color:"#191d24"},park:{color:"#15271a"},"aeroway-area":{color:"#1b1e26"},water:{color:"#0f2438"},"water-pool":{color:"#123048"},waterway:{color:"#14304a"},"aeroway-line":{color:"#242833"},"road-casing-major":{color:"#2a2519"},"road-casing-secondary":{color:"#22262f"},"road-casing-minor":{color:"#1e222a"},"road-rail":{color:"#333842"},"road-path":{color:"#2a2e36"},"road-minor":{color:"#2f343d"},"road-secondary":{color:"#3c424d"},"road-major":{color:"#6b5c3c"},boundary:{color:"#4a3f52"},building:{color:"#232833",roofColor:"#2b313d",aoStrength:.3,tintVariation:.1,windowColor:"#8fb8e8",windowFrameColor:"#39424f",windowGlow:.35},housenumber:{color:"#5f6672",haloColor:"#12161d"},poi:{color:"#c3ccd9",haloColor:"#12161d",haloWidth:1.3},"road-label":{color:"#a8b0bd",haloColor:"#12161d",haloWidth:1.5},"water-label":{color:"#6ea2c7",haloColor:"#0e1b28"},"place-label":{color:"#e2e7ee",haloColor:"#10141b",haloWidth:2},"poi-food":{color:"#d89964",haloColor:"#12161d",haloWidth:1.3,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#12161d",haloWidth:1.3,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#12161d",haloWidth:1.3,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#12161d",haloWidth:1.3,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#12161d",haloWidth:1.3,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#12161d",haloWidth:1.3,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#12161d",haloWidth:1.3,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#12161d",haloWidth:1.3,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#12161d",haloWidth:1.3,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"building-entrance":{color:"#79a0d7",haloColor:"#12161d"},"indoor-shell":{color:"#3a4254",opacity:.97},"indoor-corridor":{color:"#363d4e"},"indoor-room":{color:"#414a5f"},"indoor-service":{color:"#535f79"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#697183",roofColor:"#868c99",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#65548a",opacity:.95},"indoor-door":{color:"#c3ccd9",haloColor:"#12161d",haloWidth:1.3},"indoor-poi":{color:"#c3ccd9",haloColor:"#12161d",haloWidth:1.3},"indoor-name":{color:"#e2e7ee",haloColor:"#10141b",haloWidth:2}},sky:{skyColor:"#080d18",horizonColor:"#1b2436",fogRange:[1.3,6.5],fogIntensity:.9,spaceColor:"#02030a",atmosphereColor:"#3f6fa8",starIntensity:.8}};var ji={name:"\u0413\u0440\u0430\u0444\u0438\u0442",background:"#eeeeee",light:{ambientColor:"#ffffff",ambientIntensity:.55,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.5,fillAzimuth:300,fillAltitude:25,fillColor:"#ffffff",fillIntensity:.16},paint:{"landcover-wood":{color:"#e2e2e2"},"landcover-grass":{color:"#e7e7e7"},"landcover-sand":{color:"#eaeaea"},"landcover-ice":{color:"#f0f0f0"},"landcover-wetland":{color:"#e4e4e4"},"landuse-residential":{color:"#e9e9e9"},"landuse-industrial":{color:"#e5e5e5"},"landuse-civic":{color:"#ebebeb"},"landuse-sport":{color:"#e4e4e4"},"landuse-cemetery":{color:"#e6e6e6"},"landuse-parking":{color:"#ececec"},park:{color:"#e3e3e3"},"aeroway-area":{color:"#e8e8e8"},water:{color:"#d4d4d4"},"water-pool":{color:"#d8d8d8"},waterway:{color:"#d4d4d4"},"aeroway-line":{color:"#dedede"},"road-casing-major":{color:"#c9c9c9"},"road-casing-secondary":{color:"#d2d2d2"},"road-casing-minor":{color:"#d8d8d8"},"road-rail":{color:"#c2c2c2"},"road-path":{color:"#d0d0d0"},"road-minor":{color:"#f7f7f7"},"road-secondary":{color:"#fbfbfb"},"road-major":{color:"#ffffff"},boundary:{color:"#b0b0b0"},building:{color:"#dcdcdc",roofColor:"#e0e0e0",aoStrength:.22,tintVariation:.05,windowColor:"#b7bcc2",windowFrameColor:"#f2f2f2",windowGlow:0},housenumber:{color:"#9a9a9a",haloColor:"#f4f4f4"},poi:{color:"#3c3c3c",haloColor:"#ffffff"},"road-label":{color:"#585858",haloColor:"#ffffff"},"water-label":{color:"#6e6e6e",haloColor:"#ffffff"},"place-label":{color:"#2a2a2a",haloColor:"#ffffff"},"poi-food":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"building-entrance":{color:"#564e4e",haloColor:"#ffffff"},"indoor-shell":{color:"#e9e9e9",opacity:.97},"indoor-corridor":{color:"#eeeeee"},"indoor-room":{color:"#e2e2e2"},"indoor-service":{color:"#cecece"},"indoor-shop":{color:"#d7cfdf"},"indoor-food":{color:"#dfd7cf"},"indoor-wc":{color:"#cfd9df"},"indoor-wall":{color:"#c0c0c0",roofColor:"#d4d4d4",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#c2bbd1",opacity:.95},"indoor-door":{color:"#3c3c3c",haloColor:"#ffffff"},"indoor-poi":{color:"#3c3c3c",haloColor:"#ffffff"},"indoor-name":{color:"#2a2a2a",haloColor:"#ffffff"}},sky:{skyColor:"#8f96a0",horizonColor:"#d7dade",fogRange:[1.35,7.5],fogIntensity:.9,spaceColor:"#07080b",atmosphereColor:"#9aa3ad",starIntensity:.5}};var Yi={name:"\u0411\u043B\u0435\u0434\u043D\u0430\u044F",background:"#f7f6f3",light:{ambientColor:"#ffffff",ambientIntensity:.62,keyAzimuth:120,keyAltitude:65,keyColor:"#fffaf0",keyIntensity:.38,fillAzimuth:300,fillAltitude:25,fillColor:"#eef2f8",fillIntensity:.14},paint:{"landcover-wood":{color:"#e8efe2"},"landcover-grass":{color:"#edf2e6"},"landcover-sand":{color:"#f4eede"},"landcover-ice":{color:"#f0f5f7"},"landcover-wetland":{color:"#e8f0ec"},"landuse-residential":{color:"#f2f0ec"},"landuse-industrial":{color:"#f0edeb"},"landuse-civic":{color:"#f4efe9"},"landuse-sport":{color:"#e9f1e4"},"landuse-cemetery":{color:"#ecefe6"},"landuse-parking":{color:"#f3f1ed"},park:{color:"#e7f0df"},"aeroway-area":{color:"#f0f0f2"},water:{color:"#dce9f2"},"water-pool":{color:"#dcecf5"},waterway:{color:"#dce9f2"},"aeroway-line":{color:"#ebebee"},"road-casing-major":{color:"#efe4d2"},"road-casing-secondary":{color:"#eceae2"},"road-casing-minor":{color:"#efedE6"},"road-rail":{color:"#e0dcd6"},"road-path":{color:"#e6e2da"},"road-minor":{color:"#fdfcfa"},"road-secondary":{color:"#ffffff"},"road-major":{color:"#fff8e8"},boundary:{color:"#cfc3d2"},building:{color:"#eae7e0",roofColor:"#ecE9e2",aoStrength:.14,tintVariation:.04,windowColor:"#c7d6e4",windowFrameColor:"#f6f7f9",windowGlow:0},housenumber:{color:"#a9a296",haloColor:"#fbfaf7"},poi:{color:"#6b6b6b",haloColor:"#ffffff"},"road-label":{color:"#8a8474",haloColor:"#ffffff"},"water-label":{color:"#7ea8c4",haloColor:"#ffffff"},"place-label":{color:"#55524c",haloColor:"#ffffff"},"poi-food":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"building-entrance":{color:"#564e4e",haloColor:"#ffffff"},"indoor-shell":{color:"#f4f3f0",opacity:.97},"indoor-corridor":{color:"#f8f7f6"},"indoor-room":{color:"#edece8"},"indoor-service":{color:"#dcd9d1"},"indoor-shop":{color:"#e0dae6"},"indoor-food":{color:"#e6e0da"},"indoor-wc":{color:"#dae1e6"},"indoor-wall":{color:"#cdcbc4",roofColor:"#e0dedb",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#ccc5d9",opacity:.95},"indoor-door":{color:"#6b6b6b",haloColor:"#ffffff"},"indoor-poi":{color:"#6b6b6b",haloColor:"#ffffff"},"indoor-name":{color:"#55524c",haloColor:"#ffffff"}},sky:{skyColor:"#c8dbee",horizonColor:"#eef2f6",fogRange:[1.4,9],fogIntensity:.85,spaceColor:"#0a1018",atmosphereColor:"#9fd0ff",starIntensity:.45}};var Zi={name:"\u041E\u0431\u044A\u0451\u043C\u043D\u0430\u044F",background:"#f0ecea",light:{ambientColor:"#f8f8f8",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee8ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#9bda95"},"landcover-grass":{color:"#b2e6a8"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#d5e8f1"},"landcover-wetland":{color:"#badbde"},"landuse-residential":{color:"#f4f2f1"},"landuse-industrial":{color:"#dadce7"},"landuse-civic":{color:"#ecdae0"},"landuse-sport":{color:"#bbeba2"},"landuse-cemetery":{color:"#c2e2bb"},"landuse-parking":{color:"#e0dddc"},park:{color:"#b2e6a8"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#94d8f9"},waterway:{color:"#94d8f9"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#8997b3"},"road-casing-secondary":{color:"#9da7be"},"road-casing-minor":{color:"#9da7be"},"road-rail":{color:"#9e9e9e"},"road-path":{color:"#bbc1d3"},"road-minor":{color:"#bbc1d3"},"road-secondary":{color:"#bbc1d3"},"road-major":{color:"#99abc2"},boundary:{color:"#f66f91"},building:{color:"#ede7de",roofColor:"#ede7de",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#eef0f4",windowGlow:0},housenumber:{color:"#2e2e2e",haloColor:"#ffffff",haloWidth:1.4},poi:{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"road-label":{color:"#2e2e2e",haloColor:"#ffffff",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#2e2e2e",haloColor:"#ffffff",haloWidth:1.4},"poi-food":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#a7e1fd"},"indoor-shell":{color:"#f4f3f1",opacity:.97},"indoor-corridor":{color:"#f8f8f6"},"indoor-room":{color:"#eeece8"},"indoor-service":{color:"#ddd8d2"},"indoor-shop":{color:"#e0dae7"},"indoor-food":{color:"#e7e1da"},"indoor-wc":{color:"#dae2e7"},"indoor-wall":{color:"#cecac5",roofColor:"#e0dedc",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#ccc6d9",opacity:.95},"indoor-door":{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"indoor-poi":{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"indoor-name":{color:"#2e2e2e",haloColor:"#ffffff",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#ffffff"}},sky:{skyColor:"#91b8cb",horizonColor:"#dfd9d6",fogRange:[1.34,7.36],fogIntensity:.86,spaceColor:"#0e0b0a",atmosphereColor:"#5daad0",starIntensity:.38}};var Qi={name:"\u041C\u0443\u043B\u044C\u0442\u044F\u0448\u043D\u0430\u044F",background:"#f7f3de",light:{ambientColor:"#f8f7f7",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee8ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#61d161"},"landcover-grass":{color:"#91e481"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#c7dfeb"},"landcover-wetland":{color:"#9fccd1"},"landuse-residential":{color:"#f2ecd9"},"landuse-industrial":{color:"#d7d9e4"},"landuse-civic":{color:"#ead7dd"},"landuse-sport":{color:"#9fec79"},"landuse-cemetery":{color:"#a8d69f"},"landuse-parking":{color:"#dddcda"},park:{color:"#91e481"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#71c8f4"},waterway:{color:"#71c8f4"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#ca6a16"},"road-casing-secondary":{color:"#5a6faf"},"road-casing-minor":{color:"#5a6faf"},"road-rail":{color:"#737373"},"road-path":{color:"#ffffff"},"road-minor":{color:"#ffffff"},"road-secondary":{color:"#ffffff"},"road-major":{color:"#f8c662"},boundary:{color:"#f6517a"},building:{color:"#f4dfc2",roofColor:"#f4dfc2",aoStrength:.19,tintVariation:.06,windowColor:"#5b9ee0",windowFrameColor:"#ffffff",windowGlow:0},housenumber:{color:"#222b59",haloColor:"#ffffff",haloWidth:1.4},poi:{color:"#f05a0f",haloColor:"#ffffff",haloWidth:1.4},"road-label":{color:"#222b59",haloColor:"#ffffff",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#222b59",haloColor:"#ffffff",haloWidth:1.4},"poi-food":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#80d1fa"},"indoor-shell":{color:"#ebe9e5",opacity:.97},"indoor-corridor":{color:"#efedea"},"indoor-room":{color:"#e5e1dc"},"indoor-service":{color:"#d4cec6"},"indoor-shop":{color:"#d6cede"},"indoor-food":{color:"#ded6ce"},"indoor-wc":{color:"#ced8de"},"indoor-wall":{color:"#c4c0ba",roofColor:"#d6d4d0",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#c1b9d1",opacity:.95},"indoor-door":{color:"#f05a0f",haloColor:"#ffffff",haloWidth:1.4},"indoor-poi":{color:"#f05a0f",haloColor:"#ffffff",haloWidth:1.4},"indoor-name":{color:"#222b59",haloColor:"#ffffff",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#ffffff"}},sky:{skyColor:"#8cb5c9",horizonColor:"#e8e2c7",fogRange:[1.34,7.35],fogIntensity:.86,spaceColor:"#131105",atmosphereColor:"#5ca9d0",starIntensity:.39}};var qi={name:"\u041A\u0438\u0431\u0435\u0440\u043F\u0430\u043D\u043A",background:"#120817",model3dKey:"night",light:{ambientColor:"#b279cf",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#ff70d0",keyIntensity:.28,fillAzimuth:300,fillAltitude:25,fillColor:"#854770",fillIntensity:.22},paint:{"landcover-wood":{color:"#0c3728"},"landcover-grass":{color:"#104131"},"landcover-sand":{color:"#262417"},"landcover-ice":{color:"#74345f"},"landcover-wetland":{color:"#152223"},"landuse-residential":{color:"#170b1e"},"landuse-industrial":{color:"#171921"},"landuse-civic":{color:"#21171a"},"landuse-sport":{color:"#0c4529"},"landuse-cemetery":{color:"#151e1b"},"landuse-parking":{color:"#272428"},park:{color:"#104131"},"aeroway-area":{color:"#1a1c23"},water:{color:"#5f1145"},waterway:{color:"#711452"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#981662"},"road-casing-secondary":{color:"#6a1b6a"},"road-casing-minor":{color:"#6a1b6a"},"road-rail":{color:"#39acac"},"road-path":{color:"#12e2e2"},"road-minor":{color:"#12e2e2"},"road-secondary":{color:"#12e2e2"},"road-major":{color:"#f631a4"},boundary:{color:"#f53da8"},building:{color:"#311839",roofColor:"#9d2575",aoStrength:.29,tintVariation:.1,windowColor:"#84dcff",windowFrameColor:"#84dcff",windowGlow:.5},housenumber:{color:"#acf6f6",haloColor:"#110514",haloWidth:1.4},poi:{color:"#f6e95a",haloColor:"#110514",haloWidth:1.4},"road-label":{color:"#acf6f6",haloColor:"#110514",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#acf6f6",haloColor:"#110514",haloWidth:1.4},"poi-food":{color:"#d89964",haloColor:"#110514",haloWidth:1.4,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#110514",haloWidth:1.4,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#110514",haloWidth:1.4,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#110514",haloWidth:1.4,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#110514",haloWidth:1.4,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#110514",haloWidth:1.4,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#110514",haloWidth:1.4,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#110514",haloWidth:1.4,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#110514",haloWidth:1.4,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#84135f"},"indoor-shell":{color:"#4c3752",opacity:.97},"indoor-corridor":{color:"#46334c"},"indoor-room":{color:"#553e5d"},"indoor-service":{color:"#6e5078"},"indoor-shop":{color:"#59446f"},"indoor-food":{color:"#6f5a44"},"indoor-wc":{color:"#445e6f"},"indoor-wall":{color:"#7b6681",roofColor:"#938298",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#635287",opacity:.95},"indoor-door":{color:"#f6e95a",haloColor:"#110514",haloWidth:1.4},"indoor-poi":{color:"#f6e95a",haloColor:"#110514",haloWidth:1.4},"indoor-name":{color:"#acf6f6",haloColor:"#110514",haloWidth:1.4},"building-entrance":{color:"#79a0d7",haloColor:"#110514"}},sky:{skyColor:"#180813",horizonColor:"#281831",fogRange:[1.3,6.5],fogIntensity:.9,spaceColor:"#060308",atmosphereColor:"#b5358b",starIntensity:.82}};var $i={name:"\u0420\u0430\u0441\u0441\u0432\u0435\u0442",background:"#f4ebe1",light:{ambientColor:"#f8f7f7",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffe0c0",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee7ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#a4db9f"},"landcover-grass":{color:"#bae7b1"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#dbe7f0"},"landcover-wetland":{color:"#c1dee1"},"landuse-residential":{color:"#f5efeb"},"landuse-industrial":{color:"#d7d9e4"},"landuse-civic":{color:"#ead7dd"},"landuse-sport":{color:"#c1ecac"},"landuse-cemetery":{color:"#c8e5c2"},"landuse-parking":{color:"#dddbda"},park:{color:"#bae7b1"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#a6d2f2"},waterway:{color:"#a6d2f2"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#92a1bf"},"road-casing-secondary":{color:"#a6afc9"},"road-casing-minor":{color:"#a6afc9"},"road-rail":{color:"#b5a49b"},"road-path":{color:"#c3c9df"},"road-minor":{color:"#c3c9df"},"road-secondary":{color:"#c3c9df"},"road-major":{color:"#a9b9d1"},boundary:{color:"#f584a1"},building:{color:"#f6ebdf",roofColor:"#fdede7",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#f0ece8",windowGlow:0},housenumber:{color:"#46332a",haloColor:"#fdfaf7",haloWidth:1.4},poi:{color:"#56738f",haloColor:"#fdfaf7",haloWidth:1.4},"road-label":{color:"#46332a",haloColor:"#fdfaf7",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#46332a",haloColor:"#fdfaf7",haloWidth:1.4},"poi-food":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#b9ddf7"},"indoor-shell":{color:"#f8f7f5",opacity:.97},"indoor-corridor":{color:"#fcfbfb"},"indoor-room":{color:"#f1efed"},"indoor-service":{color:"#e0dbd6"},"indoor-shop":{color:"#e4dfea"},"indoor-food":{color:"#eae4df"},"indoor-wc":{color:"#dfe5ea"},"indoor-wall":{color:"#d1cdc9",roofColor:"#e4e2e0",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#d0cbdc",opacity:.95},"indoor-door":{color:"#56738f",haloColor:"#fdfaf7",haloWidth:1.4},"indoor-poi":{color:"#56738f",haloColor:"#fdfaf7",haloWidth:1.4},"indoor-name":{color:"#46332a",haloColor:"#fdfaf7",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#fdfaf7"}},sky:{skyColor:"#8cb0c9",horizonColor:"#e4d7cb",fogRange:[1.34,7.35],fogIntensity:.86,spaceColor:"#120c07",atmosphereColor:"#5c9fd0",starIntensity:.39}};var ea={name:"\u0421\u0443\u043C\u0435\u0440\u043A\u0438",background:"#d7cbc1",light:{ambientColor:"#ececeb",ambientIntensity:.46,keyAzimuth:120,keyAltitude:59,keyColor:"#ffcaa0",keyIntensity:.56,fillAzimuth:300,fillAltitude:25,fillColor:"#c7d0e1",fillIntensity:.19},paint:{"landcover-wood":{color:"#75af6a"},"landcover-grass":{color:"#94bd7f"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#c1c8d7"},"landcover-wetland":{color:"#83bec3"},"landuse-residential":{color:"#d5cac3"},"landuse-industrial":{color:"#b3b7cc"},"landuse-civic":{color:"#d5aebb"},"landuse-sport":{color:"#91c775"},"landuse-cemetery":{color:"#9ac982"},"landuse-parking":{color:"#c0bcb9"},park:{color:"#94bd7f"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#708bc2"},waterway:{color:"#708bc2"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#6a5b9a"},"road-casing-secondary":{color:"#7078a4"},"road-casing-minor":{color:"#7078a4"},"road-rail":{color:"#93796c"},"road-path":{color:"#8f94b7"},"road-minor":{color:"#8f94b7"},"road-secondary":{color:"#8f94b7"},"road-major":{color:"#8576b2"},boundary:{color:"#e05275"},building:{color:"#e0d1c2",roofColor:"#f1d6cb",aoStrength:.2,tintVariation:.07,windowColor:"#6b9ed1",windowFrameColor:"#efe6df",windowGlow:0},housenumber:{color:"#2c283e",haloColor:"#f5ebe0",haloWidth:1.4},poi:{color:"#64568f",haloColor:"#f5ebe0",haloWidth:1.4},"road-label":{color:"#2c283e",haloColor:"#f5ebe0",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#2c283e",haloColor:"#f5ebe0",haloWidth:1.4},"poi-food":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#7a94ca"},"indoor-shell":{color:"#e3deda",opacity:.97},"indoor-corridor":{color:"#e7e3df"},"indoor-room":{color:"#dcd7d1"},"indoor-service":{color:"#cbc3ba"},"indoor-shop":{color:"#ccc2d6"},"indoor-food":{color:"#d6ccc2"},"indoor-wc":{color:"#c2ced6"},"indoor-wall":{color:"#bbb5af",roofColor:"#cdc9c6",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#b6adc9",opacity:.95},"indoor-door":{color:"#64568f",haloColor:"#f5ebe0",haloWidth:1.4},"indoor-poi":{color:"#64568f",haloColor:"#f5ebe0",haloWidth:1.4},"indoor-name":{color:"#2c283e",haloColor:"#f5ebe0",haloWidth:1.4},"building-entrance":{haloColor:"#f5ebe0"}},sky:{skyColor:"#5675b3",horizonColor:"#c0b4aa",fogRange:[1.33,7.14],fogIntensity:.87,spaceColor:"#0e0b09",atmosphereColor:"#557dce",starIntensity:.45}};var ta={name:"\u0417\u0435\u043C\u043B\u044F",background:"#dbd1bd",light:{ambientColor:"#edecea",ambientIntensity:.46,keyAzimuth:120,keyAltitude:59,keyColor:"#fff2dc",keyIntensity:.56,fillAzimuth:300,fillAltitude:25,fillColor:"#c7d6e1",fillIntensity:.19},paint:{"landcover-wood":{color:"#50a136"},"landcover-grass":{color:"#8ac76b"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#aec5d6"},"landcover-wetland":{color:"#7cbac0"},"landuse-residential":{color:"#ded5c4"},"landuse-industrial":{color:"#b3b7cc"},"landuse-civic":{color:"#d5aebb"},"landuse-sport":{color:"#86d161"},"landuse-cemetery":{color:"#94c67b"},"landuse-parking":{color:"#c0beb9"},park:{color:"#8ac76b"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#3b91ce"},waterway:{color:"#4798d1"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#a47546"},"road-casing-secondary":{color:"#a79376"},"road-casing-minor":{color:"#a79376"},"road-rail":{color:"#877564"},"road-path":{color:"#c6bba9"},"road-minor":{color:"#c6bba9"},"road-secondary":{color:"#c6bba9"},"road-major":{color:"#cdaa7a"},boundary:{color:"#bf6a40"},building:{color:"#d4c5af",roofColor:"#d4c5af",aoStrength:.2,tintVariation:.07,windowColor:"#9fb0c0",windowFrameColor:"#eceae4",windowGlow:0},housenumber:{color:"#46382a",haloColor:"#f7f4ee",haloWidth:1.4},poi:{color:"#7c5c3c",haloColor:"#f7f4ee",haloWidth:1.4},"road-label":{color:"#46382a",haloColor:"#f7f4ee",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#46382a",haloColor:"#f7f4ee",haloWidth:1.4},"poi-food":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#4299d7"},"indoor-shell":{color:"#d6d0c8",opacity:.97},"indoor-corridor":{color:"#d9d5cd"},"indoor-room":{color:"#cfc9bf"},"indoor-service":{color:"#beb5a9"},"indoor-shop":{color:"#bcafca"},"indoor-food":{color:"#cabdaf"},"indoor-wc":{color:"#afbfca"},"indoor-wall":{color:"#ada79e",roofColor:"#bebbb5",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#a69bbc",opacity:.95},"indoor-door":{color:"#7c5c3c",haloColor:"#f7f4ee",haloWidth:1.4},"indoor-poi":{color:"#7c5c3c",haloColor:"#f7f4ee",haloWidth:1.4},"indoor-name":{color:"#46382a",haloColor:"#f7f4ee",haloWidth:1.4},"building-entrance":{haloColor:"#f7f4ee"}},sky:{skyColor:"#568db3",horizonColor:"#c4baa5",fogRange:[1.33,7.14],fogIntensity:.87,spaceColor:"#0f0c08",atmosphereColor:"#559cce",starIntensity:.45}};var oa={name:"\u0424\u0443\u0442\u0443\u0440\u0438\u0437\u043C",background:"#0c0f1d",model3dKey:"night",light:{ambientColor:"#8590c7",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#8ff0ff",keyIntensity:.28,fillAzimuth:300,fillAltitude:25,fillColor:"#477b85",fillIntensity:.22},paint:{"landcover-wood":{color:"#123026"},"landcover-grass":{color:"#18392e"},"landcover-sand":{color:"#2d2a1b"},"landcover-ice":{color:"#276672"},"landcover-wetland":{color:"#192829"},"landuse-residential":{color:"#111422"},"landuse-industrial":{color:"#1b1d27"},"landuse-civic":{color:"#271b1f"},"landuse-sport":{color:"#143d29"},"landuse-cemetery":{color:"#192420"},"landuse-parking":{color:"#292a2e"},park:{color:"#18392e"},"aeroway-area":{color:"#1e2129"},water:{color:"#055261"},waterway:{color:"#076a7e"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#8b238b"},"road-casing-secondary":{color:"#185662"},"road-casing-minor":{color:"#185662"},"road-rail":{color:"#8546a4"},"road-path":{color:"#22b6c3"},"road-minor":{color:"#22b6c3"},"road-secondary":{color:"#22b6c3"},"road-major":{color:"#e03ee0"},boundary:{color:"#eb47eb"},building:{color:"#1e2b3e",roofColor:"#277686",aoStrength:.29,tintVariation:.1,windowColor:"#84dcff",windowFrameColor:"#bfe6ff",windowGlow:.5},housenumber:{color:"#c6edf1",haloColor:"#080a17",haloWidth:1.4},poi:{color:"#eb84eb",haloColor:"#080a17",haloWidth:1.4},"road-label":{color:"#c6edf1",haloColor:"#080a17",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#c6edf1",haloColor:"#080a17",haloWidth:1.4},"poi-food":{color:"#d89964",haloColor:"#080a17",haloWidth:1.4,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#080a17",haloWidth:1.4,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#080a17",haloWidth:1.4,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#080a17",haloWidth:1.4,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#080a17",haloWidth:1.4,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#080a17",haloWidth:1.4,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#080a17",haloWidth:1.4,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#080a17",haloWidth:1.4,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#080a17",haloWidth:1.4,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#027288"},"indoor-shell":{color:"#394556",opacity:.97},"indoor-corridor":{color:"#354050"},"indoor-room":{color:"#404d60"},"indoor-service":{color:"#52637b"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#687485",roofColor:"#858e9a",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#66558a",opacity:.95},"indoor-door":{color:"#eb84eb",haloColor:"#080a17",haloWidth:1.4},"indoor-poi":{color:"#eb84eb",haloColor:"#080a17",haloWidth:1.4},"indoor-name":{color:"#c6edf1",haloColor:"#080a17",haloWidth:1.4},"building-entrance":{color:"#79a0d7",haloColor:"#080a17"}},sky:{skyColor:"#081619",horizonColor:"#1b1f30",fogRange:[1.3,6.51],fogIntensity:.9,spaceColor:"#030408",atmosphereColor:"#35a1b7",starIntensity:.81}};var ra={name:"\u0421\u0442\u0435\u043A\u043B\u043E \u043C\u044F\u0433\u043A\u043E\u0435",background:"#f2f5f7",light:{ambientColor:"#fbfbfb",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee9ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#bddbc3"},"landcover-grass":{color:"#d0ecda"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#cbebdb"},"landcover-wetland":{color:"#d9ebed"},"landuse-residential":{color:"#f6f7f9"},"landuse-industrial":{color:"#e3e5ed"},"landuse-civic":{color:"#f1e4e8"},"landuse-sport":{color:"#cdefd4"},"landuse-cemetery":{color:"#dbf0e3"},"landuse-parking":{color:"#e4e6e7"},park:{color:"#ccead9"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#b9e5f4"},waterway:{color:"#81c6e4"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#dabc95"},"road-casing-secondary":{color:"#d5cdb8"},"road-casing-minor":{color:"#cad1d8"},"road-rail":{color:"#a5a0b1"},"road-path":{color:"#9fbcad"},"road-minor":{color:"#ffffff"},"road-secondary":{color:"#fbf6ea"},"road-major":{color:"#f8e5c3"},boundary:{color:"#ce97c0"},building:{color:"#e5ebf0",roofColor:"#f7fbfd",aoStrength:.18,tintVariation:.06,windowColor:"#bcd4e8",windowFrameColor:"#dfe8f2",windowGlow:0},housenumber:{color:"#4e6779",haloColor:"#fbfdfe",haloWidth:1.4},poi:{color:"#4e6779",haloColor:"#fbfdfe",haloWidth:1.4},"road-label":{color:"#2f3f50",haloColor:"#fbfdfe",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#2f3f50",haloColor:"#fbfdfe",haloWidth:1.4},"poi-food":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#ceeef9"},"indoor-shell":{color:"#f5f7f8",opacity:.97},"indoor-corridor":{color:"#fbfbfc"},"indoor-room":{color:"#edeff1"},"indoor-service":{color:"#d6dce0"},"indoor-shop":{color:"#e4dfea"},"indoor-food":{color:"#eae4df"},"indoor-wc":{color:"#dfe5ea"},"indoor-wall":{color:"#c9ced1",roofColor:"#e0e2e4",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#d0cbdc",opacity:.95},"indoor-door":{color:"#4e6779",haloColor:"#fbfdfe",haloWidth:1.4},"indoor-poi":{color:"#4e6779",haloColor:"#fbfdfe",haloWidth:1.4},"indoor-name":{color:"#2f3f50",haloColor:"#fbfdfe",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#fbfdfe"}},sky:{skyColor:"#9fc5d2",horizonColor:"#dfe3e8",fogRange:[1.35,7.42],fogIntensity:.85,spaceColor:"#090c0f",atmosphereColor:"#5fb3d0",starIntensity:.37}};var na={name:"\u0421\u0442\u0435\u043A\u043B\u043E",background:"#f2f5f7",light:{ambientColor:"#fbfbfb",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee9ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#b8e0cf"},"landcover-grass":{color:"#cbebdb"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#e5f0f3"},"landcover-wetland":{color:"#d6e9eb"},"landuse-residential":{color:"#f6f7f9"},"landuse-industrial":{color:"#e3e5ed"},"landuse-civic":{color:"#f1e4e8"},"landuse-sport":{color:"#c8efd5"},"landuse-cemetery":{color:"#d8eee3"},"landuse-parking":{color:"#e4e6e7"},park:{color:"#cbebdb"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#bee6f4"},waterway:{color:"#bee6f4"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#9dc7dd"},"road-casing-secondary":{color:"#bdcfdb"},"road-casing-minor":{color:"#bdcfdb"},"road-rail":{color:"#adb9c2"},"road-path":{color:"#d6e2eb"},"road-minor":{color:"#d6e2eb"},"road-secondary":{color:"#d6e2eb"},"road-major":{color:"#b8daea"},boundary:{color:"#e28dc6"},building:{color:"#e8eef3",roofColor:"#f4f8fb",aoStrength:.18,tintVariation:.06,windowColor:"#bcd4e8",windowFrameColor:"#dfe8f2",windowGlow:0},housenumber:{color:"#2d4053",haloColor:"#fbfdfe",haloWidth:1.4},poi:{color:"#457aa1",haloColor:"#fbfdfe",haloWidth:1.4},"road-label":{color:"#2d4053",haloColor:"#fbfdfe",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#2d4053",haloColor:"#fbfdfe",haloWidth:1.4},"poi-food":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#d3eff9"},"indoor-shell":{color:"#f5f7f8",opacity:.97},"indoor-corridor":{color:"#fbfbfc"},"indoor-room":{color:"#edeff1"},"indoor-service":{color:"#d6dce0"},"indoor-shop":{color:"#e4dfea"},"indoor-food":{color:"#eae4df"},"indoor-wc":{color:"#dfe5ea"},"indoor-wall":{color:"#c9ced1",roofColor:"#e0e2e4",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#d0cbdc",opacity:.95},"indoor-door":{color:"#457aa1",haloColor:"#fbfdfe",haloWidth:1.4},"indoor-poi":{color:"#457aa1",haloColor:"#fbfdfe",haloWidth:1.4},"indoor-name":{color:"#2d4053",haloColor:"#fbfdfe",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#fbfdfe"}},sky:{skyColor:"#9fc5d2",horizonColor:"#dfe3e8",fogRange:[1.35,7.42],fogIntensity:.85,spaceColor:"#090c10",atmosphereColor:"#5fb3d0",starIntensity:.37}};var ia={name:"\u0413\u0430\u0440\u043C\u043E\u043D\u0438\u044F \u0447\u0451\u0440\u043D\u0430\u044F",background:"#1a1a1a",model3dKey:"night",light:{ambientColor:"#a8a8a8",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#cccccc",keyIntensity:.29,fillAzimuth:300,fillAltitude:25,fillColor:"#854747",fillIntensity:.22},paint:{"landcover-wood":{color:"#212121"},"landcover-grass":{color:"#292929"},"landcover-sand":{color:"#33301f"},"landcover-ice":{color:"#545454"},"landcover-wetland":{color:"#1d2e30"},"landuse-residential":{color:"#1f1f1f"},"landuse-industrial":{color:"#1f222d"},"landuse-civic":{color:"#2d1f24"},"landuse-sport":{color:"#2d2525"},"landuse-cemetery":{color:"#2a1d1d"},"landuse-parking":{color:"#332e2e"},park:{color:"#292929"},"aeroway-area":{color:"#23262f"},water:{color:"#383838"},waterway:{color:"#3d3d3d"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#525252"},"road-casing-secondary":{color:"#383838"},"road-casing-minor":{color:"#383838"},"road-rail":{color:"#595959"},"road-path":{color:"#525252"},"road-minor":{color:"#525252"},"road-secondary":{color:"#525252"},"road-major":{color:"#757575"},boundary:{color:"#808080"},building:{color:"#2e2e2e",roofColor:"#4f4f4f",aoStrength:.29,tintVariation:.1,windowColor:"#8fb8e8",windowFrameColor:"#c8ccd4",windowGlow:.36},housenumber:{color:"#d9d9d9",haloColor:"#0a0a0a",haloWidth:1.4},poi:{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4},"road-label":{color:"#d9d9d9",haloColor:"#0a0a0a",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#d9d9d9",haloColor:"#0a0a0a",haloWidth:1.4},"poi-food":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#4c4c4c"},"indoor-shell":{color:"#484848",opacity:.97},"indoor-corridor":{color:"#424242"},"indoor-room":{color:"#505050"},"indoor-service":{color:"#676767"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#767676",roofColor:"#909090",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#66558a",opacity:.95},"indoor-door":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4},"indoor-poi":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4},"indoor-name":{color:"#d9d9d9",haloColor:"#0a0a0a",haloWidth:1.4},"building-entrance":{color:"#cac4c4",haloColor:"#0a0a0a"}},sky:{skyColor:"#190909",horizonColor:"#282828",fogRange:[1.3,6.51],fogIntensity:.9,spaceColor:"#060606",atmosphereColor:"#b83535",starIntensity:.8}};var aa={name:"\u0413\u0430\u0440\u043C\u043E\u043D\u0438\u044F \u0441\u0438\u043D\u044F\u044F",background:"#e3e9f2",light:{ambientColor:"#f7f7f7",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#eef4ff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee5ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#a1b8ce"},"landcover-grass":{color:"#bdccdb"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#baccde"},"landcover-wetland":{color:"#c1dee1"},"landuse-residential":{color:"#ebeff4"},"landuse-industrial":{color:"#d7d9e4"},"landuse-civic":{color:"#ead7dd"},"landuse-sport":{color:"#b8d3e0"},"landuse-cemetery":{color:"#c2d4e5"},"landuse-parking":{color:"#dadbdd"},park:{color:"#bdccdb"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#5799db"},waterway:{color:"#5f9edd"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#407fbf"},"road-casing-secondary":{color:"#80a1c6"},"road-casing-minor":{color:"#80a1c6"},"road-rail":{color:"#738dab"},"road-path":{color:"#b0c5dd"},"road-minor":{color:"#b0c5dd"},"road-secondary":{color:"#b0c5dd"},"road-major":{color:"#71a3d6"},boundary:{color:"#478cd1"},building:{color:"#cfdae8",roofColor:"#e5edf6",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#e8eef6",windowGlow:0},housenumber:{color:"#1f395c",haloColor:"#fbfcfe",haloWidth:1.4},poi:{color:"#3e6da3",haloColor:"#fbfcfe",haloWidth:1.4},"road-label":{color:"#1f395c",haloColor:"#fbfcfe",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#1f395c",haloColor:"#fbfcfe",haloWidth:1.4},"poi-food":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#61a2e3"},"indoor-shell":{color:"#e6e8ec",opacity:.97},"indoor-corridor":{color:"#ebedf0"},"indoor-room":{color:"#dde1e5"},"indoor-service":{color:"#c6ccd4"},"indoor-shop":{color:"#d6cedf"},"indoor-food":{color:"#dfd7ce"},"indoor-wc":{color:"#ced8df"},"indoor-wall":{color:"#babfc5",roofColor:"#d1d4d7",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#c1bad1",opacity:.95},"indoor-door":{color:"#3e6da3",haloColor:"#fbfcfe",haloWidth:1.4},"indoor-poi":{color:"#3e6da3",haloColor:"#fbfcfe",haloWidth:1.4},"indoor-name":{color:"#1f395c",haloColor:"#fbfcfe",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#fbfcfe"}},sky:{skyColor:"#8cabc9",horizonColor:"#ced6e1",fogRange:[1.34,7.35],fogIntensity:.86,spaceColor:"#080b10",atmosphereColor:"#5c96d0",starIntensity:.39}};var la={name:"\u0413\u0430\u0440\u043C\u043E\u043D\u0438\u044F \u0437\u0435\u043B\u0451\u043D\u0430\u044F",background:"#dfecdf",light:{ambientColor:"#f5f6f5",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#f0fff0",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dcece7",fillIntensity:.18},paint:{"landcover-wood":{color:"#5ccc65"},"landcover-grass":{color:"#8cd98c"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#bbd8ce"},"landcover-wetland":{color:"#9fccd1"},"landuse-residential":{color:"#e6efe6"},"landuse-industrial":{color:"#d1d4e0"},"landuse-civic":{color:"#e7d0d7"},"landuse-sport":{color:"#94e085"},"landuse-cemetery":{color:"#9fd69f"},"landuse-parking":{color:"#d4d8d4"},park:{color:"#8cd98c"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#5ec9a6"},waterway:{color:"#66ccaa"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#44a754"},"road-casing-secondary":{color:"#7fbd7f"},"road-casing-minor":{color:"#7fbd7f"},"road-rail":{color:"#72a172"},"road-path":{color:"#afd4af"},"road-minor":{color:"#afd4af"},"road-secondary":{color:"#afd4af"},"road-major":{color:"#64c474"},boundary:{color:"#39c668"},building:{color:"#cfe2cb",roofColor:"#dff1df",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#e8f0e8",windowGlow:0},housenumber:{color:"#1c4a24",haloColor:"#f8fcf8",haloWidth:1.4},poi:{color:"#358d44",haloColor:"#f8fcf8",haloWidth:1.4},"road-label":{color:"#1c4a24",haloColor:"#f8fcf8",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#1c4a24",haloColor:"#f8fcf8",haloWidth:1.4},"poi-food":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#67d1af"},"indoor-shell":{color:"#e1e8e0",opacity:.97},"indoor-corridor":{color:"#e6ece5"},"indoor-room":{color:"#d9e1d7"},"indoor-service":{color:"#c3d0c1"},"indoor-shop":{color:"#d1c8db"},"indoor-food":{color:"#dbd2c8"},"indoor-wc":{color:"#c8d4db"},"indoor-wall":{color:"#b7c0b5",roofColor:"#cdd2cc",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#bcb4cd",opacity:.95},"indoor-door":{color:"#358d44",haloColor:"#f8fcf8",haloWidth:1.4},"indoor-poi":{color:"#358d44",haloColor:"#f8fcf8",haloWidth:1.4},"indoor-name":{color:"#1c4a24",haloColor:"#f8fcf8",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#f8fcf8"}},sky:{skyColor:"#83c5af",horizonColor:"#cad9ca",fogRange:[1.34,7.31],fogIntensity:.86,spaceColor:"#090f09",atmosphereColor:"#5bcfa9",starIntensity:.4}};var sa={name:"\u041B\u0443\u043D\u043D\u0430\u044F",background:"#c8cbd0",light:{ambientColor:"#ebecec",ambientIntensity:.46,keyAzimuth:120,keyAltitude:59,keyColor:"#e8ecf2",keyIntensity:.56,fillAzimuth:300,fillAltitude:25,fillColor:"#c7d0e1",fillIntensity:.19},paint:{"landcover-wood":{color:"#a8abb3"},"landcover-grass":{color:"#b9bbc1"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#cbcdd2"},"landcover-wetland":{color:"#acd4d7"},"landuse-residential":{color:"#ced0d4"},"landuse-industrial":{color:"#b3b7cc"},"landuse-civic":{color:"#d5aebb"},"landuse-sport":{color:"#b2bdc7"},"landuse-cemetery":{color:"#adbddc"},"landuse-parking":{color:"#b9bcc0"},park:{color:"#b9bbc1"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#929aaa"},waterway:{color:"#929aaa"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#6c7689"},"road-casing-secondary":{color:"#848b9a"},"road-casing-minor":{color:"#848b9a"},"road-rail":{color:"#7e838b"},"road-path":{color:"#acb0b9"},"road-minor":{color:"#acb0b9"},"road-secondary":{color:"#acb0b9"},"road-major":{color:"#949ba8"},boundary:{color:"#6a7181"},building:{color:"#c8cbd0",roofColor:"#d9dbdd",aoStrength:.2,tintVariation:.07,windowColor:"#9fb0c0",windowFrameColor:"#cfd6e0",windowGlow:0},housenumber:{color:"#31363f",haloColor:"#f1f2f4",haloWidth:1.4},poi:{color:"#606876",haloColor:"#f1f2f4",haloWidth:1.4},"road-label":{color:"#31363f",haloColor:"#f1f2f4",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#31363f",haloColor:"#f1f2f4",haloWidth:1.4},"poi-food":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#9ca4b3"},"indoor-shell":{color:"#d6d9dc",opacity:.97},"indoor-corridor":{color:"#dbdde0"},"indoor-room":{color:"#ced1d5"},"indoor-service":{color:"#b9bcc3"},"indoor-shop":{color:"#c7bcd2"},"indoor-food":{color:"#d2c7bc"},"indoor-wc":{color:"#bcc9d2"},"indoor-wall":{color:"#acafb4",roofColor:"#c2c4c7",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#b1a7c5",opacity:.95},"indoor-door":{color:"#606876",haloColor:"#f1f2f4",haloWidth:1.4},"indoor-poi":{color:"#606876",haloColor:"#f1f2f4",haloWidth:1.4},"indoor-name":{color:"#31363f",haloColor:"#f1f2f4",haloWidth:1.4},"building-entrance":{haloColor:"#f1f2f4"}},sky:{skyColor:"#5675b3",horizonColor:"#b1b4b9",fogRange:[1.33,7.14],fogIntensity:.87,spaceColor:"#0a0b0c",atmosphereColor:"#557dce",starIntensity:.45}};var ca={name:"\u041C\u0430\u0442\u043E\u0432\u0430\u044F",background:"#e7e6e4",light:{ambientColor:"#f5f5f5",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6ec",fillIntensity:.18},paint:{"landcover-wood":{color:"#a3be9d"},"landcover-grass":{color:"#b3cbae"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#d6dce0"},"landcover-wetland":{color:"#acd4d7"},"landuse-residential":{color:"#ecebe9"},"landuse-industrial":{color:"#d1d4e0"},"landuse-civic":{color:"#e7d0d7"},"landuse-sport":{color:"#b6d2a7"},"landuse-cemetery":{color:"#b5dcad"},"landuse-parking":{color:"#d8d6d4"},park:{color:"#b3cbae"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#a6bbc9"},waterway:{color:"#a6bbc9"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#969fb0"},"road-casing-secondary":{color:"#abb0ba"},"road-casing-minor":{color:"#abb0ba"},"road-rail":{color:"#adadad"},"road-path":{color:"#c7cad1"},"road-minor":{color:"#c7cad1"},"road-secondary":{color:"#c7cad1"},"road-major":{color:"#aeb4c2"},boundary:{color:"#ca919f"},building:{color:"#dad6d2",roofColor:"#e3e0dd",aoStrength:.19,tintVariation:.06,windowColor:"#9fb0c0",windowFrameColor:"#f0f0f2",windowGlow:0},housenumber:{color:"#4d4742",haloColor:"#f6f5f4",haloWidth:1.4},poi:{color:"#707a8f",haloColor:"#f6f5f4",haloWidth:1.4},"road-label":{color:"#4d4742",haloColor:"#f6f5f4",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#4d4742",haloColor:"#f6f5f4",haloWidth:1.4},"poi-food":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#b3c6d2"},"indoor-shell":{color:"#e6e3e1",opacity:.97},"indoor-corridor":{color:"#eae8e6"},"indoor-room":{color:"#dfdcd8"},"indoor-service":{color:"#cdc8c2"},"indoor-shop":{color:"#d1c8da"},"indoor-food":{color:"#dad1c8"},"indoor-wc":{color:"#c8d3da"},"indoor-wall":{color:"#bebab6",roofColor:"#d1cecc",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#bbb3cd",opacity:.95},"indoor-door":{color:"#707a8f",haloColor:"#f6f5f4",haloWidth:1.4},"indoor-poi":{color:"#707a8f",haloColor:"#f6f5f4",haloWidth:1.4},"indoor-name":{color:"#4d4742",haloColor:"#f6f5f4",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#f6f5f4"}},sky:{skyColor:"#83abc5",horizonColor:"#d3d2d0",fogRange:[1.34,7.31],fogIntensity:.86,spaceColor:"#0d0c0b",atmosphereColor:"#5ba1cf",starIntensity:.4}};var fa={name:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u0438\u0437\u043C",background:"#f7f7f7",light:{ambientColor:"#fcfcfc",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee7ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#d6e1d6"},"landcover-grass":{color:"#e1eae1"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#edf0f2"},"landcover-wetland":{color:"#e3f1f2"},"landuse-residential":{color:"#fafafa"},"landuse-industrial":{color:"#e7e8ef"},"landuse-civic":{color:"#f3e7eb"},"landuse-sport":{color:"#e1edde"},"landuse-cemetery":{color:"#e6f4e6"},"landuse-parking":{color:"#e9e7e7"},park:{color:"#e1eae1"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#d7e2ea"},waterway:{color:"#d7e2ea"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#a3a3a3"},"road-casing-secondary":{color:"#b8b8b8"},"road-casing-minor":{color:"#b8b8b8"},"road-rail":{color:"#b3b3b3"},"road-path":{color:"#d1d1d1"},"road-minor":{color:"#d1d1d1"},"road-secondary":{color:"#d1d1d1"},"road-major":{color:"#bdbdbd"},boundary:{color:"#999999"},building:{color:"#ebebeb",roofColor:"#f2f2f2",aoStrength:.18,tintVariation:.06,windowColor:"#9fb0c0",windowFrameColor:"#f4f4f6",windowGlow:0},housenumber:{color:"#404040",haloColor:"#ffffff",haloWidth:1.4},poi:{color:"#737373",haloColor:"#ffffff",haloWidth:1.4},"road-label":{color:"#404040",haloColor:"#ffffff",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#404040",haloColor:"#ffffff",haloWidth:1.4},"poi-food":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#e8eff4"},"indoor-shell":{color:"#f7f7f7",opacity:.97},"indoor-corridor":{color:"#fbfbfb"},"indoor-room":{color:"#efefef"},"indoor-service":{color:"#dbdbdb"},"indoor-shop":{color:"#e4dfea"},"indoor-food":{color:"#eae4df"},"indoor-wc":{color:"#dfe5ea"},"indoor-wall":{color:"#cdcdcd",roofColor:"#e2e2e2",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#d0cbdc",opacity:.95},"indoor-door":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4},"indoor-poi":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4},"indoor-name":{color:"#404040",haloColor:"#ffffff",haloWidth:1.4},"building-entrance":{color:"#564e4e",haloColor:"#ffffff"}},sky:{skyColor:"#a4c0d4",horizonColor:"#e6e6e6",fogRange:[1.35,7.44],fogIntensity:.85,spaceColor:"#0d0d0d",atmosphereColor:"#5fa1d1",starIntensity:.37}};var ua={name:"\u041E\u043A\u0435\u0430\u043D",background:"#d7e3ea",light:{ambientColor:"#f3f4f4",ambientIntensity:.47,keyAzimuth:120,keyAltitude:60,keyColor:"#e8f6ff",keyIntensity:.59,fillAzimuth:300,fillAltitude:25,fillColor:"#d8e4ea",fillIntensity:.18},paint:{"landcover-wood":{color:"#75c7c7"},"landcover-grass":{color:"#97d8d2"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#accedf"},"landcover-wetland":{color:"#a5d0d4"},"landuse-residential":{color:"#dfe8ec"},"landuse-industrial":{color:"#cbcedc"},"landuse-civic":{color:"#e3c9d2"},"landuse-sport":{color:"#90dfcb"},"landuse-cemetery":{color:"#a6d9d4"},"landuse-parking":{color:"#cfd2d3"},park:{color:"#97d8d2"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#30abe8"},waterway:{color:"#3eb0ea"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#47a3c2"},"road-casing-secondary":{color:"#8ab2c7"},"road-casing-minor":{color:"#8ab2c7"},"road-rail":{color:"#8a9ea8"},"road-path":{color:"#b8d3e0"},"road-minor":{color:"#b8d3e0"},"road-secondary":{color:"#b8d3e0"},"road-major":{color:"#79c0d8"},boundary:{color:"#47bad1"},building:{color:"#d2dee4",roofColor:"#e7f0f3",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#e6f0f6",windowGlow:0},housenumber:{color:"#1f3c51",haloColor:"#f8fbfc",haloWidth:1.4},poi:{color:"#3b7b9b",haloColor:"#f8fbfc",haloWidth:1.4},"road-label":{color:"#1f3c51",haloColor:"#f8fbfc",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#1f3c51",haloColor:"#f8fbfc",haloWidth:1.4},"poi-food":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#38b3f1"},"indoor-shell":{color:"#e5e9eb",opacity:.97},"indoor-corridor":{color:"#eaeeef"},"indoor-room":{color:"#dce2e5"},"indoor-service":{color:"#c6cfd4"},"indoor-shop":{color:"#d6cede"},"indoor-food":{color:"#ded6ce"},"indoor-wc":{color:"#ced8de"},"indoor-wall":{color:"#bac1c4",roofColor:"#d0d4d6",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#c1b9d1",opacity:.95},"indoor-door":{color:"#3b7b9b",haloColor:"#f8fbfc",haloWidth:1.4},"indoor-poi":{color:"#3b7b9b",haloColor:"#f8fbfc",haloWidth:1.4},"indoor-name":{color:"#1f3c51",haloColor:"#f8fbfc",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#f8fbfc"}},sky:{skyColor:"#7aaac1",horizonColor:"#c1cfd6",fogRange:[1.34,7.27],fogIntensity:.86,spaceColor:"#080d0f",atmosphereColor:"#5aa8cf",starIntensity:.41}};var da={name:"\u041F\u0440\u0435\u043C\u0438\u0443\u043C",background:"#211f1c",model3dKey:"night",light:{ambientColor:"#b0aaa4",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#c8b48a",keyIntensity:.3,fillAzimuth:300,fillAltitude:25,fillColor:"#496887",fillIntensity:.22},paint:{"landcover-wood":{color:"#1b271b"},"landcover-grass":{color:"#232f23"},"landcover-sand":{color:"#393622"},"landcover-ice":{color:"#2d3d4c"},"landcover-wetland":{color:"#213436"},"landuse-residential":{color:"#272421"},"landuse-industrial":{color:"#242633"},"landuse-civic":{color:"#332429"},"landuse-sport":{color:"#22331f"},"landuse-cemetery":{color:"#213021"},"landuse-parking":{color:"#383633"},park:{color:"#232f23"},"aeroway-area":{color:"#272a35"},water:{color:"#16293b"},waterway:{color:"#1c334a"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#856e32"},"road-casing-secondary":{color:"#423b2e"},"road-casing-minor":{color:"#423b2e"},"road-rail":{color:"#6b6457"},"road-path":{color:"#5e5645"},"road-minor":{color:"#5e5645"},"road-secondary":{color:"#5e5645"},"road-major":{color:"#bf9e4a"},boundary:{color:"#d1aa47"},building:{color:"#443b2c",roofColor:"#726037",aoStrength:.29,tintVariation:.1,windowColor:"#8fb8e8",windowFrameColor:"#eef0f4",windowGlow:.36},housenumber:{color:"#eae3d7",haloColor:"#181410",haloWidth:1.4},poi:{color:"#d4bb7d",haloColor:"#181410",haloWidth:1.4},"road-label":{color:"#eae3d7",haloColor:"#181410",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#eae3d7",haloColor:"#181410",haloWidth:1.4},"poi-food":{color:"#d89964",haloColor:"#181410",haloWidth:1.4,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#181410",haloWidth:1.4,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#181410",haloWidth:1.4,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#181410",haloWidth:1.4,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#181410",haloWidth:1.4,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#181410",haloWidth:1.4,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#181410",haloWidth:1.4,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#181410",haloWidth:1.4,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#181410",haloWidth:1.4,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#1c3752"},"indoor-shell":{color:"#564b39",opacity:.97},"indoor-corridor":{color:"#504635"},"indoor-room":{color:"#605440"},"indoor-service":{color:"#7b6c52"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#857a68",roofColor:"#9a9285",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#66558a",opacity:.95},"indoor-door":{color:"#d4bb7d",haloColor:"#181410",haloWidth:1.4},"indoor-poi":{color:"#d4bb7d",haloColor:"#181410",haloWidth:1.4},"indoor-name":{color:"#eae3d7",haloColor:"#181410",haloWidth:1.4},"building-entrance":{color:"#79a0d7",haloColor:"#181410"}},sky:{skyColor:"#09121b",horizonColor:"#2c2a27",fogRange:[1.3,6.51],fogIntensity:.9,spaceColor:"#060606",atmosphereColor:"#3679b9",starIntensity:.79}};var ha={name:"\u0420\u0435\u0430\u043B\u0438\u0441\u0442\u0438\u0447\u043D\u0430\u044F",background:"#d6dac8",light:{ambientColor:"#eeeeed",ambientIntensity:.46,keyAzimuth:120,keyAltitude:59,keyColor:"#fff0d8",keyIntensity:.57,fillAzimuth:300,fillAltitude:25,fillColor:"#cbd9e3",fillIntensity:.18},paint:{"landcover-wood":{color:"#62a63f"},"landcover-grass":{color:"#8dbf69"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#b4c9d7"},"landcover-wetland":{color:"#75b7bd"},"landuse-residential":{color:"#d6d1c2"},"landuse-industrial":{color:"#b9bdd0"},"landuse-civic":{color:"#d9b5c1"},"landuse-sport":{color:"#8bc95e"},"landuse-cemetery":{color:"#95c374"},"landuse-parking":{color:"#c3c5bf"},park:{color:"#8dbf69"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#4d97cb"},waterway:{color:"#599ecf"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#856b47"},"road-casing-secondary":{color:"#766b60"},"road-casing-minor":{color:"#766b60"},"road-rail":{color:"#666666"},"road-path":{color:"#9c948b"},"road-minor":{color:"#9c948b"},"road-secondary":{color:"#9c948b"},"road-major":{color:"#ccaa66"},boundary:{color:"#8a735c"},building:{color:"#cdc4b7",roofColor:"#cdc4b7",aoStrength:.2,tintVariation:.07,windowColor:"#9fb0c0",windowFrameColor:"#eceef2",windowGlow:0},housenumber:{color:"#3b332b",haloColor:"#f5f5f0",haloWidth:1.4},poi:{color:"#735c45",haloColor:"#f5f5f0",haloWidth:1.4},"road-label":{color:"#3b332b",haloColor:"#f5f5f0",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#3b332b",haloColor:"#f5f5f0",haloWidth:1.4},"poi-food":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#559fd3"},"indoor-shell":{color:"#d6d0c9",opacity:.97},"indoor-corridor":{color:"#dad5ce"},"indoor-room":{color:"#cfc9c0"},"indoor-service":{color:"#beb6a9"},"indoor-shop":{color:"#bdb0ca"},"indoor-food":{color:"#cabeb0"},"indoor-wc":{color:"#b0c0ca"},"indoor-wall":{color:"#ada79e",roofColor:"#bfbbb6",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#a69bbd",opacity:.95},"indoor-door":{color:"#735c45",haloColor:"#f5f5f0",haloWidth:1.4},"indoor-poi":{color:"#735c45",haloColor:"#f5f5f0",haloWidth:1.4},"indoor-name":{color:"#3b332b",haloColor:"#f5f5f0",haloWidth:1.4},"building-entrance":{haloColor:"#f5f5f0"}},sky:{skyColor:"#5f92b7",horizonColor:"#bfc4b1",fogRange:[1.33,7.17],fogIntensity:.87,spaceColor:"#0d0e09",atmosphereColor:"#569dce",starIntensity:.44}};var ma={name:"\u041A\u043E\u0441\u043C\u043E\u0441",background:"#0c0a1a",model3dKey:"night",light:{ambientColor:"#8c7fcb",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#c0a8ff",keyIntensity:.28,fillAzimuth:300,fillAltitude:25,fillColor:"#475385",fillIntensity:.22},paint:{"landcover-wood":{color:"#241730"},"landcover-grass":{color:"#2e203c"},"landcover-sand":{color:"#292719"},"landcover-ice":{color:"#2e365b"},"landcover-wetland":{color:"#172526"},"landuse-residential":{color:"#110e20"},"landuse-industrial":{color:"#191b24"},"landuse-civic":{color:"#24191d"},"landuse-sport":{color:"#281c40"},"landuse-cemetery":{color:"#1c1721"},"landuse-parking":{color:"#27272b"},park:{color:"#2e203c"},"aeroway-area":{color:"#1c1f26"},water:{color:"#121c49"},waterway:{color:"#16225a"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#7e279b"},"road-casing-secondary":{color:"#3a2060"},"road-casing-minor":{color:"#3a2060"},"road-rail":{color:"#985298"},"road-path":{color:"#6b35b6"},"road-minor":{color:"#6b35b6"},"road-secondary":{color:"#6b35b6"},"road-major":{color:"#bf4ce6"},boundary:{color:"#ec51b8"},building:{color:"#2a2145",roofColor:"#7f30a6",aoStrength:.29,tintVariation:.1,windowColor:"#84dcff",windowFrameColor:"#9fb0d8",windowGlow:.5},housenumber:{color:"#dbd1f0",haloColor:"#080614",haloWidth:1.4},poi:{color:"#d186ea",haloColor:"#080614",haloWidth:1.4},"road-label":{color:"#dbd1f0",haloColor:"#080614",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#dbd1f0",haloColor:"#080614",haloWidth:1.4},"poi-food":{color:"#d89964",haloColor:"#080614",haloWidth:1.4,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#080614",haloWidth:1.4,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#080614",haloWidth:1.4,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#080614",haloWidth:1.4,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#080614",haloWidth:1.4,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#080614",haloWidth:1.4,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#080614",haloWidth:1.4,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#080614",haloWidth:1.4,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#080614",haloWidth:1.4,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#152466"},"indoor-shell":{color:"#403956",opacity:.97},"indoor-corridor":{color:"#3c3550"},"indoor-room":{color:"#484060"},"indoor-service":{color:"#5c527b"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#6f6885",roofColor:"#8a859a",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#66558a",opacity:.95},"indoor-door":{color:"#d186ea",haloColor:"#080614",haloWidth:1.4},"indoor-poi":{color:"#d186ea",haloColor:"#080614",haloWidth:1.4},"indoor-name":{color:"#dbd1f0",haloColor:"#080614",haloWidth:1.4},"building-entrance":{color:"#79a0d7",haloColor:"#080614"}},sky:{skyColor:"#080b18",horizonColor:"#1d1931",fogRange:[1.3,6.5],fogIntensity:.9,spaceColor:"#040308",atmosphereColor:"#354cb6",starIntensity:.82}};var pa={name:"\u0412\u0443\u043B\u043A\u0430\u043D",background:"#29211e",model3dKey:"night",light:{ambientColor:"#b6a6a1",ambientIntensity:.35,keyAzimuth:120,keyAltitude:55,keyColor:"#ffb070",keyIntensity:.29,fillAzimuth:300,fillAltitude:25,fillColor:"#8b604b",fillIntensity:.22},paint:{"landcover-wood":{color:"#31241c"},"landcover-grass":{color:"#392e22"},"landcover-sand":{color:"#403c26"},"landcover-ice":{color:"#aa6b4b"},"landcover-wetland":{color:"#243b3d"},"landuse-residential":{color:"#2f2623"},"landuse-industrial":{color:"#282b39"},"landuse-civic":{color:"#39282e"},"landuse-sport":{color:"#3e2e1e"},"landuse-cemetery":{color:"#362e26"},"landuse-parking":{color:"#3e3938"},park:{color:"#392e22"},"aeroway-area":{color:"#2b2f3b"},water:{color:"#8b3f18"},waterway:{color:"#9c461c"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#aa350e"},"road-casing-secondary":{color:"#712b14"},"road-casing-minor":{color:"#712b14"},"road-rail":{color:"#8f583d"},"road-path":{color:"#e65e19"},"road-minor":{color:"#e65e19"},"road-secondary":{color:"#e65e19"},"road-major":{color:"#f98c1f"},boundary:{color:"#f48c25"},building:{color:"#422b24",roofColor:"#c1551f",aoStrength:.28,tintVariation:.09,windowColor:"#84dcff",windowFrameColor:"#d8b0a0",windowGlow:.5},housenumber:{color:"#f3e0ce",haloColor:"#150b09",haloWidth:1.4},poi:{color:"#f09e4c",haloColor:"#150b09",haloWidth:1.4},"road-label":{color:"#f3e0ce",haloColor:"#150b09",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#f3e0ce",haloColor:"#150b09",haloWidth:1.4},"poi-food":{color:"#d89964",haloColor:"#150b09",haloWidth:1.4,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#150b09",haloWidth:1.4,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#150b09",haloWidth:1.4,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#150b09",haloWidth:1.4,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#150b09",haloWidth:1.4,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#150b09",haloWidth:1.4,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#150b09",haloWidth:1.4,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#150b09",haloWidth:1.4,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#150b09",haloWidth:1.4,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#c2531a"},"indoor-shell":{color:"#564039",opacity:.97},"indoor-corridor":{color:"#503b35"},"indoor-room":{color:"#604840"},"indoor-service":{color:"#7b5c52"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#856f68",roofColor:"#9a8a85",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#66558a",opacity:.95},"indoor-door":{color:"#f09e4c",haloColor:"#150b09",haloWidth:1.4},"indoor-poi":{color:"#f09e4c",haloColor:"#150b09",haloWidth:1.4},"indoor-name":{color:"#f3e0ce",haloColor:"#150b09",haloWidth:1.4},"building-entrance":{color:"#79a0d7",haloColor:"#150b09"}},sky:{skyColor:"#1c100a",horizonColor:"#312a27",fogRange:[1.3,6.52],fogIntensity:.9,spaceColor:"#070605",atmosphereColor:"#ba6336",starIntensity:.78}};var ba={name:"\u0411\u0435\u043B\u0430\u044F",background:"#f5f1f0",light:{ambientColor:"#fafafa",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee8ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#a7e2a2"},"landcover-grass":{color:"#b8ebad"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#d7eaf4"},"landcover-wetland":{color:"#c1dee1"},"landuse-residential":{color:"#f6f4f4"},"landuse-industrial":{color:"#e0e2eb"},"landuse-civic":{color:"#efe1e6"},"landuse-sport":{color:"#c0f0a8"},"landuse-cemetery":{color:"#c8e5c2"},"landuse-parking":{color:"#e4e2e2"},park:{color:"#b8ebad"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#99ddff"},waterway:{color:"#99ddff"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#94a0b8"},"road-casing-secondary":{color:"#a3adc2"},"road-casing-minor":{color:"#a3adc2"},"road-rail":{color:"#a6a6a6"},"road-path":{color:"#bfc6d9"},"road-minor":{color:"#bfc6d9"},"road-secondary":{color:"#bfc6d9"},"road-major":{color:"#a1b0c4"},boundary:{color:"#f87797"},building:{color:"#ffffff",roofColor:"#ffffff",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#ffffff",windowGlow:0},housenumber:{color:"#262626",haloColor:"#ffffff",haloWidth:1.4},poi:{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"road-label":{color:"#262626",haloColor:"#ffffff",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#262626",haloColor:"#ffffff",haloWidth:1.4},"poi-food":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#b1e5ff"},"indoor-shell":{color:"#f7f7f7",opacity:.97},"indoor-corridor":{color:"#fbfbfb"},"indoor-room":{color:"#efefef"},"indoor-service":{color:"#dbdbdb"},"indoor-shop":{color:"#e4dfea"},"indoor-food":{color:"#eae4df"},"indoor-wc":{color:"#dfe5ea"},"indoor-wall":{color:"#cdcdcd",roofColor:"#e2e2e2",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#d0cbdc",opacity:.95},"indoor-door":{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"indoor-poi":{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"indoor-name":{color:"#262626",haloColor:"#ffffff",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#ffffff"}},sky:{skyColor:"#9bbecf",horizonColor:"#e5dfdc",fogRange:[1.35,7.4],fogIntensity:.85,spaceColor:"#0f0c0a",atmosphereColor:"#5eaad0",starIntensity:.38}};var Aa={"3d":Zi,cartoon:Qi,cyberpunk:qi,dawn:$i,dusk:ea,earth:ta,future:oa,"glass-refined":ra,glass:na,"harmony-black":ia,"harmony-blue":aa,"harmony-green":la,lunar:sa,matte:ca,minimal:fa,ocean:ua,premium:da,realistic:ha,space:ma,volcano:pa,white:ba};function Wo(n,e){let t=new Set(e.hidden??[]),o=n.layers.map(r=>{let i=e.paint?.[r.id],a={...r,paint:i?{...r.paint,...i}:{...r.paint}};return t.has(r.id)&&(a.visible=false),a});if(e.paint)for(let r of Object.keys(e.paint))n.layers.some(i=>i.id===r)||console.warn(`[osmgl] \u0442\u0435\u043C\u0430 \xAB${e.name}\xBB: \u0432 \u0431\u0430\u0437\u043E\u0432\u043E\u043C \u0441\u0442\u0438\u043B\u0435 \u043D\u0435\u0442 \u0441\u043B\u043E\u044F \xAB${r}\xBB`);return {...n,name:e.name,background:e.background??n.background,light:{...n.light,...e.light},sky:{...n.sky,...e.sky},model3dKey:e.model3dKey??n.model3dKey,layers:o}}var X="base",ya="\u241F",bt=(n,e)=>n+"\u241F"+String(e);var At=class{constructor(e=Ur){this.splitValues={};this.spec=e,this.light={...Kr,...e.light??{}},this.sky={...Nr,...e.sky??{}},this.layers=e.layers.map(t=>({...t,paint:{...t.paint}}));}get background(){return ce(this.spec.background??"#eceae4")}colorAt(e,t,o=[1,0,1,1]){let r=e.paint;return Le(r?.color,t,o)}layerVisibleAt(e,t){return !(e.visible===false||e.minzoom!==void 0&&t<e.minzoom||e.maxzoom!==void 0&&t>=e.maxzoom)}workerPlan(e=X){return this.layers.filter(t=>t.type!=="raster").filter(t=>(t.source??X)===e).map(t=>({id:t.id,type:t.type,sourceLayer:t["source-layer"],filter:t.filter,minzoom:t.minzoom??0,maxzoom:t.maxzoom??24,...t.splitBy?{splitBy:t.splitBy}:{},...t.cornerRadius?{cornerRadius:t.cornerRadius,cornerSegments:t.cornerSegments}:{},...t.clipToTile?{clipToTile:true}:{},...t.groundBy?{groundBy:t.groundBy}:{},...t.type==="surface"?{elevation:t.elevation,base:t.base,bevel:t.bevel,bevelDrop:t.bevelDrop}:{},...t.type==="line"&&typeof t.paint?.elevation=="number"&&t.paint.elevation>0?{ground:true}:{},...t.type==="symbol"?{textField:t.layout?.textField,iconImage:t.layout?.iconImage,iconRotate:t.layout?.iconRotate,textPlacement:t.layout?.textPlacement,abbreviate:t.layout?.abbreviate}:{}}))}usedSources(){return [...new Set(this.layers.map(e=>e.source??X))]}bucketKeyFor(e){if(e.type==="raster"||!e.splitBy)return e.id;let t=this.splitValues[e.splitBy];return t===void 0?null:bt(e.id,t)}sourceLayers(){return [...new Set(this.layers.flatMap(e=>e.type==="raster"?[]:[e["source-layer"]]))]}},Ur=Ni,bf=Ki,Af=Ui,yf=Ji,yt={day:{name:"\u0414\u043D\u0435\u0432\u043D\u0430\u044F"},night:Xi,mono:ji,pale:Yi,...Aa};function Vo(n,e=Ur){if(typeof n!="string")return Wo(e,n);if(n==="day")return e;let t=yt[n];return t?Wo(e,t):(console.warn(`[osmgl] \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u0430\u044F \u0442\u0435\u043C\u0430 \xAB${n}\xBB; \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B: ${Object.keys(yt).join(", ")}`),e)}var Ut=class{constructor(e,t){this.ctx=e;let o=e.gl;this._size=t;let r=o.createTexture(),i=o.createFramebuffer();if(!r||!i)throw new Error("[osmgl] \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0446\u0435\u043B\u044C \u0433\u043B\u0443\u0431\u0438\u043D\u044B");this.texture=r,this.framebuffer=i,e.bindTexture(7,r),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_COMPARE_MODE,o.COMPARE_REF_TO_TEXTURE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_COMPARE_FUNC,o.LEQUAL),this.allocate(t),o.bindFramebuffer(o.FRAMEBUFFER,i),o.framebufferTexture2D(o.FRAMEBUFFER,o.DEPTH_ATTACHMENT,o.TEXTURE_2D,r,0),o.drawBuffers([o.NONE]),o.readBuffer(o.NONE);let a=o.checkFramebufferStatus(o.FRAMEBUFFER);if(o.bindFramebuffer(o.FRAMEBUFFER,null),e.bindTexture(7,null),a!==o.FRAMEBUFFER_COMPLETE)throw new Error(`[osmgl] \u0446\u0435\u043B\u044C \u0433\u043B\u0443\u0431\u0438\u043D\u044B \u043D\u0435 \u0441\u043E\u0431\u0440\u0430\u043B\u0430\u0441\u044C: 0x${a.toString(16)}`)}get size(){return this._size}resize(e){e!==this._size&&(this._size=e,this.ctx.bindTexture(7,this.texture),this.allocate(e),this.ctx.bindTexture(7,null));}bind(){let e=this.ctx.gl;this.ctx.bindFramebuffer(this.framebuffer),this.ctx.viewport(0,0,this._size,this._size),this.ctx.setDepthTest(true),this.ctx.setDepthMask(true),e.clear(e.DEPTH_BUFFER_BIT);}bindTexture(e){this.ctx.bindTexture(e,this.texture);}allocate(e){let t=this.ctx.gl;t.texImage2D(t.TEXTURE_2D,0,t.DEPTH_COMPONENT24,e,e,0,t.DEPTH_COMPONENT,t.UNSIGNED_INT,null);}destroy(){this.ctx.gl.deleteFramebuffer(this.framebuffer),this.ctx.gl.deleteTexture(this.texture);}};function ga(n){let e=n.gl,t=e.createTexture();if(!t)throw new Error("[osmgl] \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0437\u0430\u0433\u043B\u0443\u0448\u043A\u0443 \u043A\u0430\u0440\u0442\u044B \u0442\u0435\u043D\u0435\u0439");return n.bindTexture(7,t),e.texImage2D(e.TEXTURE_2D,0,e.DEPTH_COMPONENT24,1,1,0,e.DEPTH_COMPONENT,e.UNSIGNED_INT,new Uint32Array([4294967295])),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_COMPARE_FUNC,e.LEQUAL),n.bindTexture(7,null),t}var Jt=`
|
|
8
|
+
`)}var Zt=new Set,Ur=false;function Pe(n,e,t=2){let o=e&&e.length,r=o?e[0]*t:n.length;Zt.size&&Zt.clear();let i=ta(n,0,r,t,true),a=[];if(!i||i.next===i.prev)return a;let l=0,s=0,c=0;if(o&&(i=mc(n,e,i,t)),n.length>80*t){l=n[0],s=n[1];let u=l,h=s;for(let f=t;f<r;f+=t){let d=n[f],p=n[f+1];d<l&&(l=d),p<s&&(s=p),d>u&&(u=d),p>h&&(h=p);}c=Math.max(u-l,h-s),c=c!==0?32767/c:0;}return Jr(i,a,l,s,c),a}function ta(n,e,t,o,r){let i=null;if(r===Mc(n,e,t,o)>0)for(let a=e;a<t;a+=o)i=ea(a/o|0,n[a],n[a+1],i);else for(let a=t-o;a>=e;a-=o)i=ea(a/o|0,n[a],n[a+1],i);return i&&Qt(i,i.next)&&($t(i),i=i.next),i}function ft(n,e=n){let t=e===n,o=n,r;do r=false,o!==o.next&&(Zt.size===0||!Zt.has(o))&&(Qt(o,o.next)||ue(o.prev,o,o.next)===0)?((t||o===e)&&(e=o.prev),Ur=true,$t(o),o=o.prev,r=true):(t||o!==e)&&(o=o.next,r=!t);while(r||o!==e);return e}function Jr(n,e,t,o,r){r&&vc(n,t,o,r);let i=n,a=false;for(;n.prev!==n.next;){let l=n.prev,s=n.next;if(ue(l,n,s)<0&&(r?hc(n,t,o,r):uc(n))){e.push(l.i,n.i,s.i),$t(n),n=s,i=s;continue}if(n=s,n===i){if(Ur=false,n=ft(n),Ur){i=n;continue}if(!a){n=dc(n,e),i=n,a=true;continue}pc(n,e,t,o,r);break}}}function uc(n){let e=n.prev,t=n,o=n.next,r=e.x,i=t.x,a=o.x,l=e.y,s=t.y,c=o.y,u=Math.min(r,i,a),h=Math.min(l,s,c),f=Math.max(r,i,a),d=Math.max(l,s,c),p=o.next;for(;p!==e;){if(p.x>=u&&p.x<=f&&p.y>=h&&p.y<=d&&!(r===p.x&&l===p.y)&&Qo(r,l,i,s,a,c,p.x,p.y)&&ue(p.prev,p,p.next)>=0)return false;p=p.next;}return true}function hc(n,e,t,o){let r=n.prev,i=n,a=n.next,l=r.x,s=i.x,c=a.x,u=r.y,h=i.y,f=a.y,d=Math.min(l,s,c),p=Math.min(u,h,f),m=Math.max(l,s,c),b=Math.max(u,h,f),y=Zr(d,p,e,t,o),g=Zr(m,b,e,t,o),A=n.prevZ;for(;A&&A.z>=y;){if(A.x>=d&&A.x<=m&&A.y>=p&&A.y<=b&&A!==a&&!(l===A.x&&u===A.y)&&Qo(l,u,s,h,c,f,A.x,A.y)&&ue(A.prev,A,A.next)>=0)return false;A=A.prevZ;}let B=n.nextZ;for(;B&&B.z<=g;){if(B.x>=d&&B.x<=m&&B.y>=p&&B.y<=b&&B!==a&&!(l===B.x&&u===B.y)&&Qo(l,u,s,h,c,f,B.x,B.y)&&ue(B.prev,B,B.next)>=0)return false;B=B.nextZ;}return true}function dc(n,e){let t=n,o=false;do{let r=t.prev,i=t.next.next;na(r,t,t.next,i,false)&&qt(r,i)&&qt(i,r)&&(e.push(r.i,t.i,i.i),$t(t),$t(t.next),t=n=i,o=true),t=t.next;}while(t!==n);return o?ft(t):t}function pc(n,e,t,o,r){let i=n;do{let a=i.next.next;for(;a!==i.prev;){if(i.i!==a.i&&_c(i,a)){let l=ia(i,a);i=ft(i,i.next),l=ft(l,l.next),Jr(i,e,t,o,r),Jr(l,e,t,o,r);return}a=a.next;}i=i.next;}while(i!==n)}var Xr=false;function mc(n,e,t,o){let r=[];for(let i=0,a=e.length;i<a;i++){let l=e[i]*o,s=i<a-1?e[i+1]*o:n.length,c=ta(n,l,s,o,false);c===c.next&&Zt.add(c),r.push(wc(c));}r.sort(bc),gc(n.length/o,e.length),ra(t,t),Xr=true;for(let i=0;i<r.length;i++)t=yc(r[i],t);return Xr=false,ft(t)}function bc(n,e){return n.x-e.x||n.y-e.y||(n.next.y-n.y)/(n.next.x-n.x)-(e.next.y-e.y)/(e.next.x-e.x)}function yc(n,e){let t=Bc(n,e);if(!t)return e;let o=ia(t,n),r=o.next;return ra(t,r.next),ft(o,o.next),ft(t,t.next)}var oa=16,ie=new Float64Array(0),Zo=0,jr=[],Yr=[];function gc(n,e){let t=Math.ceil((n+2*e)/oa)+e+2;ie.length<t*4&&(ie=new Float64Array(t*4)),Zo=0;}function ra(n,e){let t=n;do{let o=Zo++;jr[o]=t;let r=1/0,i=1/0,a=-1/0,l=-1/0,s=0;do{let u=t.next;t.z=o,t.x<r&&(r=t.x),t.x>a&&(a=t.x),t.y<i&&(i=t.y),t.y>l&&(l=t.y),u.x<r&&(r=u.x),u.x>a&&(a=u.x),u.y<i&&(i=u.y),u.y>l&&(l=u.y),t=u;}while(++s<oa&&t!==e);Yr[o]=t;let c=o*4;ie[c]=r,ie[c+1]=i,ie[c+2]=a,ie[c+3]=l;}while(t!==e)}function Ac(n,e){let t=n.z*4;e.x<ie[t]&&(ie[t]=e.x),e.y<ie[t+1]&&(ie[t+1]=e.y),e.x>ie[t+2]&&(ie[t+2]=e.x),e.y>ie[t+3]&&(ie[t+3]=e.y);}function qi(n){let e=Yr[n];for(;e.prev.next!==e;)e=e.next;return Yr[n]=e,e}function $i(n){let e=jr[n];for(;e.prev.next!==e;)e=e.next;return jr[n]=e,e}function Bc(n,e){let t=e,o=n.x,r=n.y,i=-1/0,a;if(Qt(n,t))return t;for(let f=0,d=0;f<Zo;f++,d+=4){if(r<ie[d+1]||r>ie[d+3]||ie[d]>o||ie[d+2]<=i)continue;let p=qi(f);t=$i(f);do{if(t.prev.next===t){if(Qt(n,t.next))return t.next;if(r<=t.y&&r>=t.next.y&&t.next.y!==t.y){let m=t.x+(r-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(m<=o&&m>i&&(i=m,a=t.x<t.next.x?t:t.next,m===o))return a}}t=t.next;}while(t!==p)}if(!a)return null;let l=a.x,s=a.y,c=Math.min(r,s),u=Math.max(r,s),h=1/0;for(let f=0,d=0;f<Zo;f++,d+=4){if(ie[d+2]<l||ie[d]>o||ie[d+3]<c||ie[d+1]>u)continue;let p=qi(f);t=$i(f);do{if(t.prev.next===t&&o>=t.x&&t.x>=l&&o!==t.x&&Qo(r<s?o:i,r,l,s,r<s?i:o,r,t.x,t.y)){let m=Math.abs(r-t.y)/(o-t.x);(qt(t,n)||t.y===r&&t.next.y===r&&t.next.x>o)&&(m<h||m===h&&(t.x>a.x||t.x===a.x&&Cc(a,t)))&&(a=t,h=m);}t=t.next;}while(t!==p)}return a}function Cc(n,e){return ue(n.prev,n,e.prev)<0&&ue(e.next,n,n.next)<0}var He=[],Xt=[],ct=new Uint32Array(0),jt=new Uint32Array(0),Yt=new Uint32Array(256);function vc(n,e,t,o){let r=n,i=0;do r.z=Zr(r.x,r.y,e,t,o),He[i++]=r,r=r.next;while(r!==n);xc(i);let a=null;for(let l=0;l<i;l++){let s=He[l];s.prevZ=a,a&&(a.nextZ=s),a=s;}a.nextZ=null;}function xc(n){if(n<=32){for(let e=1;e<n;e++){let t=He[e],o=t.z,r=e-1;for(;r>=0&&He[r].z>o;)He[r+1]=He[r],r--;He[r+1]=t;}return}ct.length<n&&(ct=new Uint32Array(n),jt=new Uint32Array(n),Xt=new Array(n));for(let e=0;e<n;e++)ct[e]=He[e].z;jo(n,He,ct,Xt,jt,0),jo(n,Xt,jt,He,ct,8),jo(n,He,ct,Xt,jt,16),jo(n,Xt,jt,He,ct,24);}function jo(n,e,t,o,r,i){Yt.fill(0);for(let l=0;l<n;l++)Yt[t[l]>>>i&255]++;let a=0;for(let l=0;l<256;l++){let s=Yt[l];Yt[l]=a,a+=s;}for(let l=0;l<n;l++){let s=t[l],c=Yt[s>>>i&255]++;o[c]=e[l],r[c]=s;}}function Zr(n,e,t,o,r){return n=(n-t)*r|0,e=(e-o)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function wc(n){let e=n,t=n;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==n);return t}function Qo(n,e,t,o,r,i,a,l){return (r-a)*(e-l)>=(n-a)*(i-l)&&(n-a)*(o-l)>=(t-a)*(e-l)&&(t-a)*(i-l)>=(r-a)*(o-l)}function _c(n,e){let t=Qt(n,e)&&ue(n.prev,n,n.next)>0&&ue(e.prev,e,e.next)>0;return n.next.i!==e.i&&(t||qt(n,e)&&qt(e,n)&&(ue(n.prev,n,e.prev)!==0||ue(n,e.prev,e)!==0))&&!Ec(n,e)&&(t||Dc(n,e))}function ue(n,e,t){return (e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Qt(n,e){return n.x===e.x&&n.y===e.y}function na(n,e,t,o,r=true){let i=ue(n,e,t),a=ue(n,e,o),l=ue(t,o,n),s=ue(t,o,e);return (i>0&&a<0||i<0&&a>0)&&(l>0&&s<0||l<0&&s>0)?true:r?!!(i===0&&Yo(n,t,e)||a===0&&Yo(n,o,e)||l===0&&Yo(t,n,o)||s===0&&Yo(t,e,o)):false}function Yo(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Ec(n,e){let t=Math.min(n.x,e.x),o=Math.max(n.x,e.x),r=Math.min(n.y,e.y),i=Math.max(n.y,e.y),a=n;do{let l=a.next;if(a.x>o&&l.x>o||a.x<t&&l.x<t||a.y>i&&l.y>i||a.y<r&&l.y<r){a=l;continue}if(a.i!==n.i&&l.i!==n.i&&a.i!==e.i&&l.i!==e.i&&na(a,l,n,e))return true;a=l;}while(a!==n);return false}function qt(n,e){return ue(n.prev,n,n.next)<0?ue(n,e,n.next)>=0&&ue(n,n.prev,e)>=0:ue(n,e,n.prev)<0||ue(n,n.next,e)<0}function Dc(n,e){let t=n,o=false,r=(n.x+e.x)/2,i=(n.y+e.y)/2;do{let a=t.next;t.y>i!=a.y>i&&r<(a.x-t.x)*(i-t.y)/(a.y-t.y)+t.x&&(o=!o),t=a;}while(t!==n);return o}function ia(n,e){let t=Qr(n.i,n.x,n.y),o=Qr(e.i,e.x,e.y),r=n.next,i=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,o.next=t,t.prev=o,i.next=o,o.prev=i,o}function ea(n,e,t,o){let r=Qr(n,e,t);return o?(r.next=o.next,r.prev=o,o.next.prev=r,o.next=r):(r.prev=r,r.next=r),r}function $t(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ),Xr&&Ac(n.prev,n.next);}function Qr(n,e,t){return {i:n,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function Mc(n,e,t,o){let r=0;for(let i=e,a=t-o;i<t;i+=o)r+=(n[a]-n[i])*(n[i+1]+n[a+1]),a=i;return r}var aa=23283064365386963e-26,Fc=12,la=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),qr=0,qo=1,eo=2,$o=5,ut=class{constructor(e=new Uint8Array(16)){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length;}readFields(e,t,o=this.length){for(;this.pos<o;){let r=this.readVarint(),i=r>>3,a=this.pos;this.type=r&7,e(i,t,this),this.pos===a&&this.skip(r);}return t}readMessage(e,t){return this.readFields(e,t,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,true);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,true);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,true)+this.dataView.getUint32(this.pos+4,true)*4294967296;return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,true)+this.dataView.getInt32(this.pos+4,true)*4294967296;return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,true);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,true);return this.pos+=8,e}readVarint(e){let t=this.buf,o,r;return r=t[this.pos++],o=r&127,r<128||(r=t[this.pos++],o|=(r&127)<<7,r<128)||(r=t[this.pos++],o|=(r&127)<<14,r<128)||(r=t[this.pos++],o|=(r&127)<<21,r<128)?o:(r=t[this.pos],o|=(r&15)<<28,Sc(o,e,this))}readVarint64(){return this.readVarint(true)}readSVarint(){let e=this.readVarint();return e%2===1?(e+1)/-2:e/2}readBoolean(){return !!this.readVarint()}readString(){let e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=Fc&&la?la.decode(this.buf.subarray(t,e)):Nc(this.buf,t,e)}readBytes(){let e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){let o=this.readPackedEnd();for(;this.pos<o;)e.push(this.readVarint(t));return e}readPackedSVarint(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSVarint());return e}readPackedBoolean(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readBoolean());return e}readPackedFloat(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFloat());return e}readPackedDouble(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readDouble());return e}readPackedFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed32());return e}readPackedSFixed32(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed32());return e}readPackedFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readFixed64());return e}readPackedSFixed64(e=[]){let t=this.readPackedEnd();for(;this.pos<t;)e.push(this.readSFixed64());return e}readPackedEnd(){return this.type===eo?this.readVarint()+this.pos:this.pos+1}skip(e){let t=e&7;if(t===qr)for(;this.buf[this.pos++]>127;);else if(t===eo)this.pos=this.readVarint()+this.pos;else if(t===$o)this.pos+=4;else if(t===qo)this.pos+=8;else throw new Error(`Unimplemented type: ${t}`)}writeTag(e,t){this.writeVarint(e<<3|t);}realloc(e){let t=this.length||16;for(;t<this.pos+e;)t*=2;if(t!==this.length){let o=new Uint8Array(t);o.set(this.buf),this.buf=o,this.dataView=new DataView(o.buffer),this.length=t;}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,true),this.pos+=4;}writeSFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,true),this.pos+=4;}writeFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,true),this.dataView.setInt32(this.pos+4,Math.floor(e*aa),true),this.pos+=8;}writeSFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,true),this.dataView.setInt32(this.pos+4,Math.floor(e*aa),true),this.pos+=8;}writeVarint(e){if(e=+e||0,e>268435455||e<0){Ic(e,this);return}this.realloc(4),this.buf[this.pos++]=e&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127)));}writeSVarint(e){this.writeVarint(e<0?-e*2-1:e*2);}writeBoolean(e){this.writeVarint(+e);}writeString(e){e=String(e),this.realloc(e.length*4),this.pos++;let t=this.pos;this.pos=Kc(this.buf,e,this.pos);let o=this.pos-t;o>=128&&sa(t,o,this),this.pos=t-1,this.writeVarint(o),this.pos+=o;}writeFloat(e){this.realloc(4),this.dataView.setFloat32(this.pos,e,true),this.pos+=4;}writeDouble(e){this.realloc(8),this.dataView.setFloat64(this.pos,e,true),this.pos+=8;}writeBytes(e){let t=e.length;this.writeVarint(t),this.realloc(t);for(let o=0;o<t;o++)this.buf[this.pos++]=e[o];}writeRawMessage(e,t){this.pos++;let o=this.pos;e(t,this);let r=this.pos-o;r>=128&&sa(o,r,this),this.pos=o-1,this.writeVarint(r),this.pos+=r;}writeMessage(e,t,o){this.writeTag(e,eo),this.writeRawMessage(t,o);}writePackedVarint(e,t){t.length&&this.writeMessage(e,Hc,t);}writePackedSVarint(e,t){t.length&&this.writeMessage(e,Pc,t);}writePackedBoolean(e,t){t.length&&this.writeMessage(e,Gc,t);}writePackedFloat(e,t){t.length&&this.writeMessage(e,kc,t);}writePackedDouble(e,t){t.length&&this.writeMessage(e,Rc,t);}writePackedFixed32(e,t){t.length&&this.writeMessage(e,Oc,t);}writePackedSFixed32(e,t){t.length&&this.writeMessage(e,Wc,t);}writePackedFixed64(e,t){t.length&&this.writeMessage(e,Vc,t);}writePackedSFixed64(e,t){t.length&&this.writeMessage(e,zc,t);}writeBytesField(e,t){this.writeTag(e,eo),this.writeBytes(t);}writeFixed32Field(e,t){this.writeTag(e,$o),this.writeFixed32(t);}writeSFixed32Field(e,t){this.writeTag(e,$o),this.writeSFixed32(t);}writeFixed64Field(e,t){this.writeTag(e,qo),this.writeFixed64(t);}writeSFixed64Field(e,t){this.writeTag(e,qo),this.writeSFixed64(t);}writeVarintField(e,t){this.writeTag(e,qr),this.writeVarint(t);}writeSVarintField(e,t){this.writeTag(e,qr),this.writeSVarint(t);}writeStringField(e,t){this.writeTag(e,eo),this.writeString(t);}writeFloatField(e,t){this.writeTag(e,$o),this.writeFloat(t);}writeDoubleField(e,t){this.writeTag(e,qo),this.writeDouble(t);}writeBooleanField(e,t){this.writeVarintField(e,+t);}};function Sc(n,e,t){let o=t.buf,r,i;if(i=o[t.pos++],r=(i&112)>>4,i<128||(i=o[t.pos++],r|=(i&127)<<3,i<128)||(i=o[t.pos++],r|=(i&127)<<10,i<128)||(i=o[t.pos++],r|=(i&127)<<17,i<128)||(i=o[t.pos++],r|=(i&127)<<24,i<128)||(i=o[t.pos++],r|=(i&1)<<31,i<128))return At(n,r,e);throw new Error("Expected varint not more than 10 bytes")}function At(n,e,t){return t?e*4294967296+(n>>>0):(e>>>0)*4294967296+(n>>>0)}function Ic(n,e){let t,o;if(n>=0?(t=n%4294967296|0,o=n/4294967296|0):(t=~(-n%4294967296),o=~(-n/4294967296),t^4294967295?t=t+1|0:(t=0,o=o+1|0)),n>=18446744073709552e3||n<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),Lc(t,o,e),Tc(o,e);}function Lc(n,e,t){t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos++]=n&127|128,n>>>=7,t.buf[t.pos]=n&127;}function Tc(n,e){let t=(n&7)<<4;e.buf[e.pos++]|=t|((n>>>=3)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127|((n>>>=7)?128:0),n&&(e.buf[e.pos++]=n&127)))));}function sa(n,e,t){let o=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));t.realloc(o);for(let r=t.pos-1;r>=n;r--)t.buf[r+o]=t.buf[r];}function Hc(n,e){for(let t=0;t<n.length;t++)e.writeVarint(n[t]);}function Pc(n,e){for(let t=0;t<n.length;t++)e.writeSVarint(n[t]);}function kc(n,e){for(let t=0;t<n.length;t++)e.writeFloat(n[t]);}function Rc(n,e){for(let t=0;t<n.length;t++)e.writeDouble(n[t]);}function Gc(n,e){for(let t=0;t<n.length;t++)e.writeBoolean(n[t]);}function Oc(n,e){for(let t=0;t<n.length;t++)e.writeFixed32(n[t]);}function Wc(n,e){for(let t=0;t<n.length;t++)e.writeSFixed32(n[t]);}function Vc(n,e){for(let t=0;t<n.length;t++)e.writeFixed64(n[t]);}function zc(n,e){for(let t=0;t<n.length;t++)e.writeSFixed64(n[t]);}function Nc(n,e,t){let o="",r=e;for(;r<t;){let i=n[r],a=null,l=i>239?4:i>223?3:i>191?2:1;if(r+l>t)break;let s,c,u;l===1?i<128&&(a=i):l===2?(s=n[r+1],(s&192)===128&&(a=(i&31)<<6|s&63,a<=127&&(a=null))):l===3?(s=n[r+1],c=n[r+2],(s&192)===128&&(c&192)===128&&(a=(i&15)<<12|(s&63)<<6|c&63,(a<=2047||a>=55296&&a<=57343)&&(a=null))):l===4&&(s=n[r+1],c=n[r+2],u=n[r+3],(s&192)===128&&(c&192)===128&&(u&192)===128&&(a=(i&15)<<18|(s&63)<<12|(c&63)<<6|u&63,(a<=65535||a>=1114112)&&(a=null))),a===null?(a=65533,l=1):a>65535&&(a-=65536,o+=String.fromCharCode(a>>>10&1023|55296),a=56320|a&1023),o+=String.fromCharCode(a),r+=l;}return o}function Kc(n,e,t){for(let o=0,r,i;o<e.length;o++){if(r=e.charCodeAt(o),r>55295&&r<57344)if(i)if(r<56320){n[t++]=239,n[t++]=191,n[t++]=189,i=r;continue}else r=i-55296<<10|r-56320|65536,i=null;else {r>56319||o+1===e.length?(n[t++]=239,n[t++]=191,n[t++]=189):i=r;continue}else i&&(n[t++]=239,n[t++]=191,n[t++]=189,i=null);r<128?n[t++]=r:(r<2048?n[t++]=r>>6|192:(r<65536?n[t++]=r>>12|224:(n[t++]=r>>18|240,n[t++]=r>>12&63|128),n[t++]=r>>6&63|128),n[t++]=r&63|128);}return t}var oo=(r=>(r[r.Unknown=0]="Unknown",r[r.Point=1]="Point",r[r.LineString=2]="LineString",r[r.Polygon=3]="Polygon",r))(oo||{}),er=class n{constructor(e,t,o,r){this.pbf=e;this.keys=t;this.values=o;this.extent=r;this.type=0;this.properties={};this.geomOffset=-1;}static read(e,t,o,r,i){let a=new n(e,o,r,i);return e.readFields(Uc,a,t),a}loadGeometry(){if(this.geomOffset<0)return [];let e=this.pbf,t=e.pos;e.pos=this.geomOffset;let o=e.readVarint()+e.pos,r=1,i=0,a=0,l=0,s=[],c=[];for(;e.pos<o;){if(i<=0){let u=e.readVarint();r=u&7,i=u>>3;}if(i--,r===1||r===2)a+=e.readSVarint(),l+=e.readSVarint(),r===1&&(c.length&&s.push(c),c=[]),c.push(a,l);else if(r===7)c.length>=2&&c.push(c[0],c[1]);else throw new Error(`[osmgl] \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u0430\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0433\u0435\u043E\u043C\u0435\u0442\u0440\u0438\u0438 MVT: ${r}`)}return c.length&&s.push(c),e.pos=t,s}bbox(){let e=this.loadGeometry(),t=1/0,o=1/0,r=-1/0,i=-1/0;for(let a of e)for(let l=0;l<a.length;l+=2)a[l]<t&&(t=a[l]),a[l]>r&&(r=a[l]),a[l+1]<o&&(o=a[l+1]),a[l+1]>i&&(i=a[l+1]);return [t,o,r,i]}};function Uc(n,e,t){t&&(n===1?e.id=t.readVarint():n===2?Jc(t,e):n===3?e.type=t.readVarint():n===4&&(e.geomOffset=t.pos,t.skip(2)));}function Jc(n,e){let t=n.readVarint()+n.pos;for(;n.pos<t;){let o=e.keys[n.readVarint()],r=e.values[n.readVarint()];o!==void 0&&(e.properties[o]=r);}}var tr=class n{constructor(e){this.pbf=e;this.version=1;this.name="";this.extent=4096;this.featureOffsets=[];this.keys=[];this.values=[];}static read(e,t){let o=new n(e);return e.readFields(Xc,o,t),o}get length(){return this.featureOffsets.length}feature(e){let t=this.pbf;t.pos=this.featureOffsets[e];let o=t.readVarint()+t.pos;return er.read(t,o,this.keys,this.values,this.extent)}*features(){for(let e=0;e<this.featureOffsets.length;e++)yield this.feature(e);}};function Xc(n,e,t){t&&(n===15?e.version=t.readVarint():n===1?e.name=t.readString():n===5?e.extent=t.readVarint():n===2?e.featureOffsets.push(t.pos):n===3?e.keys.push(t.readString()):n===4&&e.values.push(jc(t)));}function jc(n){let e=n.readVarint()+n.pos,t=null;for(;n.pos<e;){let o=n.readVarint()>>3;o===1?t=n.readString():o===2?t=n.readFloat():o===3?t=n.readDouble():o===4?t=n.readVarint64():o===5?t=n.readVarint():o===6?t=n.readSVarint():o===7?t=n.readBoolean():n.skip(o);}return t}var to=class{constructor(e){this.layers={};new ut(e instanceof Uint8Array?e:new Uint8Array(e)).readFields((o,r,i)=>{if(o===3&&i){let a=tr.read(i,i.readVarint()+i.pos);a.length&&(this.layers[a.name]=a);}},null);}};function ht(n){let e=[],t=null;for(let o of n){if(o.length<6)continue;let r=Yc(o);r!==0&&(r>0?(t&&e.push(t),t={outer:o,holes:[]}):t&&t.holes.push(o));}return t&&e.push(t),e}function Yc(n){let e=0;for(let t=0,o=n.length-2;t<n.length;o=t,t+=2)e+=(n[o]-n[t])*(n[t+1]+n[o+1]);return e/2}function W(n,e,t){return n===void 0?t:typeof n=="number"?n:ca(n.stops,e,(o,r,i)=>o+(r-o)*i,t)}function ke(n,e,t){return n===void 0?t:typeof n=="string"?me(n):ca(n.stops,e,(o,r,i)=>{let a=me(o),l=me(r);return [a[0]+(l[0]-a[0])*i,a[1]+(l[1]-a[1])*i,a[2]+(l[2]-a[2])*i,a[3]+(l[3]-a[3])*i]},t)}function ca(n,e,t,o){if(!n.length)return o;if(e<=n[0][0])return t(n[0][1],n[0][1],0);let r=n[n.length-1];if(e>=r[0])return t(r[1],r[1],0);for(let i=1;i<n.length;i++){let[a,l]=n[i];if(e>a)continue;let[s,c]=n[i-1],u=a-s,h=u===0?0:(e-s)/u;return t(c,l,h)}return o}function Be(n,e){if(!n)return true;let t=n[0];switch(t){case "all":return n.slice(1).every(o=>Be(o,e));case "any":return n.slice(1).some(o=>Be(o,e));case "!":return !Be(n[1],e);case "has":return e[n[1]]!=null;case "!has":return e[n[1]]==null;case "in":{let o=e[n[1]];return o==null?false:n.slice(2).includes(o)}case "!in":{let o=e[n[1]];return o==null?true:!n.slice(2).includes(o)}default:{let o=e[n[1]],r=n[2];if(o==null)return t==="!=";switch(t){case "==":return o===r;case "!=":return o!==r;case ">":return o>r;case ">=":return o>=r;case "<":return o<r;case "<=":return o<=r;default:return true}}}}var Zc=Math.PI/8,Qc=.35,qc=32,fa=.25,ua=.07;function ze(n,e){let t=e.radius;if(!(t>0))return n;let o=n.length/2-1;if(o<3)return n;let r=Math.max(2,Math.round(e.segments??4)),i=Math.max(e.minCutRatio??Qc,0),a=e.extent,l=e.margin??0,s=[];for(let c=0;c<o;c++){let u=n[c*2],h=n[c*2+1],f=n[(c+o-1)%o*2],d=n[(c+o-1)%o*2+1],p=n[(c+1)%o*2],m=n[(c+1)%o*2+1],b=u-f,y=h-d,g=p-u,A=m-h,B=Math.hypot(b,y),w=Math.hypot(g,A);if(B<1e-6||w<1e-6){s.push(u,h);continue}let x=b/B,_=y/B,C=g/w,v=A/w;if(e.keep?.[c]){s.push(u,h);continue}let E=x*C+_*v;if(E>.985){s.push(u,h);continue}if(a!==void 0&&($r(u,h,a,l)||$r(f,d,a,l)||$r(p,m,a,l))){s.push(u,h);continue}let M=Math.min(t,B*.4,w*.4);if(M<t*i){s.push(u,h);continue}let F=u-x*M,H=h-_*M,S=u+C*M,L=h+v*M,D=Math.acos(Math.max(-1,Math.min(1,E))),T=Math.min(Zc,Math.PI/2/r),k=Math.ceil(D/T-1e-6),P=e.maxChord&&e.maxChord>0?Math.ceil(M/Math.tan(D/2)*D/e.maxChord):0,R=Math.max(1,Math.min(qc,Math.max(Math.min(r,k),P)));s.push(F,H);for(let K=1;K<R;K++){let V=K/R,O=1-V;s.push(O*O*F+2*O*V*u+V*V*S,O*O*H+2*O*V*h+V*V*L);}s.push(S,L);}return s.length<6?n:(s.push(s[0],s[1]),s)}var $r=(n,e,t,o)=>n<=-o||e<=-o||n>=t+o||e>=t+o;var Je=n=>n/64;function Bt(n,e,t=0){let o=ha(n.outer,e,t);if(!o)return null;let r=[];for(let i of n.holes){let a=ha(i,e,t);a&&r.push(a);}return {outer:o,holes:r}}function ha(n,e,t){let o=[];for(let r=0;r<n.length-2;r+=2)o.push(n[r],n[r+1]);if(o.length<6)return null;for(let r=0;r<4;r++){let i=o;o=[];let a=i.length/2;if(a===0)return null;for(let l=0;l<a;l++){let s=i[l*2],c=i[l*2+1],u=i[(l+a-1)%a*2],h=i[(l+a-1)%a*2+1],f=da(s,c,r,e,t),d=da(u,h,r,e,t);if(f!==d){let p=$c(u,h,s,c,r,e,t);o.push(u+(s-u)*p,h+(c-h)*p);}f&&o.push(s,c);}}return o.length<6?null:(o.push(o[0],o[1]),o)}function da(n,e,t,o,r){return t===0?n>=-r:t===1?n<=o+r:t===2?e>=-r:e<=o+r}function $c(n,e,t,o,r,i,a){return r===0?(-a-n)/(t-n):r===1?(i+a-n)/(t-n):r===2?(-a-e)/(o-e):(i+a-e)/(o-e)}function or(n,e,t,o,r,i=0){let a=-i,l=r+i;return n===a&&t===a||n===l&&t===l||e===a&&o===a||e===l&&o===l}function pa(n,e){for(let t=0;t<n.length;t+=2)if(n[t]<=0||n[t]>=e||n[t+1]<=0||n[t+1]>=e)return true;return false}var Ie=18,xt=4,ga=65535/xt,ef=9,tf=1,of=0,rf=1,nf=2;var ma=0,af=1,ba=2,lf=3,sf=.47;function on(n,e,t,o={}){let r=o.metersPerUnit&&o.metersPerUnit>0?o.metersPerUnit:sf,i=Math.max(1024,n.length*48),a=new ArrayBuffer(i*Ie),l={verts:new DataView(a),vertsU8:new Uint8Array(a),vertOffset:0,vertexCount:0,indices:[],featureIds:[],ensure:()=>{}};l.ensure=f=>s(f);let s=f=>{if(l.vertexCount+f<=i)return;i=Math.max(i*2,l.vertexCount+f);let d=new ArrayBuffer(i*Ie);new Uint8Array(d).set(l.vertsU8.subarray(0,l.vertOffset)),a=d,l.verts=new DataView(d),l.vertsU8=new Uint8Array(d);};for(let f of n.features()){if(f.type!==3||!Be(t,f.properties))continue;let d=Ff(f.properties),p=Sf(f.properties,d);if(d<=p)continue;let m=Lf(f.properties)??Number(f.id??0),b=Mf(m>>>0),y=Df(b,f.properties),g=Ef(f.properties,d),A=ht(f.loadGeometry());for(let B of A){let w=Bt(B,e);if(!w)continue;let x=pa(w.outer,e),_=(o.cornerRadius??0)/r,C={radius:_,segments:o.cornerSegments,extent:e,minCutRatio:0},v=_>0?{outer:ze(w.outer,C),holes:w.holes.map(L=>ze(L,C))}:w,E=v.outer.length/2+v.holes.reduce((L,D)=>L+D.length/2,0);s(E*5+32);let M=v.holes.length||x?null:hf(v.outer),F=M?gf(f.properties,M,d,b,r):null,H=null,S=[];if(F&&M){let L=Aa(Cf(v.outer,r),M,F.shape);S=vf(L,v.outer);let D=xf(L,S);if(D>1e-6){let T=Math.min(Math.max(D*r*mf,yf),bf);H=wf(L,T/D,d);}}ya(l,v.outer,p,d,m,y,g,r,e,H);for(let L of v.holes)ya(l,L,p,d,m,y,g,r,e,null);H?_f(l,S,H,d,m,y,g,r):uf(l,v.outer,v.holes,d,m,y,g);}}if(!l.indices.length)return null;let c=new Uint32Array(l.indices),u=new Float64Array(l.featureIds);return {vertices:a.slice(0,l.vertOffset),indices:c.buffer,featureIds:u.buffer,vertexCount:l.vertexCount,indexCount:c.length,extent:e}}var rn=(n,e)=>n|e<<2,en=n=>Math.max(0,Math.min(65535,Math.round(Math.min(n,ga)*xt)));function Ct(n,e,t,o,r,i,a,l,s,c,u=0,h=0,f=0){let d=n.vertOffset;return n.verts.setInt16(d,Math.round(e),true),n.verts.setInt16(d+2,Math.round(t),true),n.verts.setUint16(d+4,Math.round(Math.min(o,ga)*xt),true),n.vertsU8[d+6]=s,n.vertsU8[d+7]=l,n.verts.setInt8(d+8,tn(Math.round(r*127))),n.verts.setInt8(d+9,tn(Math.round(i*127))),n.verts.setInt8(d+10,tn(Math.round(a*127))),n.vertsU8[d+11]=c,n.verts.setUint16(d+12,en(u),true),n.verts.setUint16(d+14,en(h),true),n.verts.setUint16(d+16,en(f),true),n.vertOffset+=Ie,n.vertexCount++}function ya(n,e,t,o,r,i,a,l,s,c=null){let u=e.length/2;if(u<3)return;let h=rn(of,a),f=ff(e,l),d=o-t,p=new Float64Array(u*2),m=new Uint8Array(u);{let b=new Float64Array(u*2);for(let y=0;y<u-1;y++){let g=e[y*2+2]-e[y*2],A=e[y*2+3]-e[y*2+1],B=Math.hypot(g,A)||1;b[y*2]=A/B,b[y*2+1]=-g/B;}for(let y=0;y<u-1;y++){let g=(y+u-2)%(u-1),A=b[g*2]*b[y*2]+b[g*2+1]*b[y*2+1],B=b[g*2]+b[y*2],w=b[g*2+1]+b[y*2+1],x=Math.hypot(B,w);A>.5&&x>1e-6&&(p[y*2]=B/x,p[y*2+1]=w/x,m[y]=1);}}for(let b=0;b<u-1;b++){let y=e[b*2],g=e[b*2+1],A=e[b*2+2],B=e[b*2+3];if(y===A&&g===B||or(y,g,A,B,s))continue;let w=A-y,x=B-g,_=Math.hypot(w,x)||1,C=x/_,v=-w/_,E=f.offset[b],M=f.width[b],F=[0,1];if(c){for(let S=0;S<c.length;S++)for(let L=S+1;L<c.length;L++){let D=dt(c[S],y,g)-dt(c[L],y,g),T=dt(c[S],A,B)-dt(c[L],A,B);if(D===T)continue;let k=D/(D-T);k>1e-4&&k<1-1e-4&&F.push(k);}F.sort((S,L)=>S-L);}let H=(S,L)=>{if(!c)return o;let D=1/0;for(let T of c)D=Math.min(D,dt(T,S,L));return Math.max(o,D)};for(let S=0;S+1<F.length;S++){let L=F[S],D=F[S+1];if(D-L<1e-6)continue;let T=y+w*L,k=g+x*L,P=y+w*D,R=g+x*D,K=E+_*L*l,V=E+_*D*l,O=(b+1)%(u-1),z=m[b]?p[b*2]:C,j=m[b]?p[b*2+1]:v,Z=m[O]?p[O*2]:C,oe=m[O]?p[O*2+1]:v,de=C+(z-C)*(1-L),ee=v+(j-v)*(1-L),U=C+(Z-C)*D,pe=v+(oe-v)*D,le=Math.hypot(de,ee)||1,q=Math.hypot(U,pe)||1,J=de/le,X=ee/le,ge=U/q,se=pe/q;n.ensure(4);let Ae=Ct(n,T,k,t,J,X,0,0,i,h,K,M,d),ae=Ct(n,P,R,t,ge,se,0,0,i,h,V,M,d),xe=Ct(n,T,k,H(T,k),J,X,0,255,i,h,K,M,d),Te=Ct(n,P,R,H(P,R),ge,se,0,255,i,h,V,M,d);n.indices.push(Ae,Te,ae,Ae,xe,Te),n.featureIds.push(r,r);}}}var cf=.9976;function ff(n,e){let t=n.length/2-1,o=[];for(let s=0;s<t;s++){let c=n[s*2+2]-n[s*2],u=n[s*2+3]-n[s*2+1],h=Math.hypot(c,u);o.push(h>0?{x:c/h,y:u/h,len:h*e}:{x:0,y:0,len:0});}let r=(s,c)=>o[s].len>0&&o[c].len>0&&o[s].x*o[c].x+o[s].y*o[c].y>=cf,i=0;for(;i<t&&r((i-1+t)%t,i);)i++;i>=t&&(i=0);let a=new Array(t).fill(0),l=new Array(t).fill(0);for(let s=0;s<t;){let c=(i+s)%t,u=[c],h=o[c].len,f=s+1;for(;f<t;){let p=(i+f)%t;if(!r((i+f-1)%t,p))break;u.push(p),h+=o[p].len,f++;}let d=0;for(let p of u)a[p]=d,l[p]=h,d+=o[p].len;s=f;}return {offset:a,width:l}}function uf(n,e,t,o,r,i,a){let l=[],s=[];for(let f=0;f<e.length;f++)l.push(e[f]);for(let f of t){s.push(l.length/2);for(let d=0;d<f.length;d++)l.push(f[d]);}let c=Pe(l,s.length?s:void 0,2);if(!c.length)return;let u=rn(rf,a),h=n.vertexCount;for(let f=0;f<l.length;f+=2)Ct(n,l[f],l[f+1],o,0,0,1,255,i,u);for(let f=0;f<c.length;f+=3)n.indices.push(h+c[f],h+c[f+2],h+c[f+1]),n.featureIds.push(r);}function hf(n){let e=df(n);if(e.length<3)return null;let t=Math.abs(pf(n));if(t<=0)return null;let o=null,r=1/0;for(let i=0;i<e.length;i++){let a=(i+1)%e.length,l=e[a].x-e[i].x,s=e[a].y-e[i].y,c=Math.hypot(l,s);if(c<1e-6)continue;l/=c,s/=c;let u=1/0,h=-1/0,f=1/0,d=-1/0;for(let B of e){let w=B.x*l+B.y*s,x=-B.x*s+B.y*l;w<u&&(u=w),w>h&&(h=w),x<f&&(f=x),x>d&&(d=x);}let p=h-u,m=d-f,b=p*m;if(b<=0||b>=r)continue;r=b;let y=(u+h)/2,g=(f+d)/2,A=p>=m;o={cx:y*l-g*s,cy:y*s+g*l,ax:A?l:-s,ay:A?s:l,halfLong:(A?p:m)/2,halfShort:(A?m:p)/2,fill:t/b};}return o}function df(n){let e=[];for(let i=0;i<n.length-2;i+=2)e.push({x:n[i],y:n[i+1]});if(e.length<3)return e;e.sort((i,a)=>i.x===a.x?i.y-a.y:i.x-a.x);let t=(i,a,l)=>(a.x-i.x)*(l.y-i.y)-(a.y-i.y)*(l.x-i.x),o=[];for(let i of e){for(;o.length>=2&&t(o[o.length-2],o[o.length-1],i)<=0;)o.pop();o.push(i);}let r=[];for(let i=e.length-1;i>=0;i--){let a=e[i];for(;r.length>=2&&t(r[r.length-2],r[r.length-1],a)<=0;)r.pop();r.push(a);}return o.pop(),r.pop(),o.concat(r)}function pf(n){let e=0;for(let t=0;t<n.length-2;t+=2)e+=n[t]*n[t+3]-n[t+2]*n[t+1];return e/2}var mf=Math.tan(30*Math.PI/180),bf=3.5,yf=.9;function gf(n,e,t,o,r){if(e.fill<.86)return null;let i=e.halfShort*2*r,a=e.halfLong*2*r,l=i*a,s=e.halfShort>0?e.halfLong/e.halfShort:99,c=Af(n);if(!c){if(t>15||l>600||i<3)return null;let u=o%1e3/1e3;l<30?c=u<.5?"skillion":"gabled":s<1.25?c=u<.35?"pyramidal":"hipped":c=u<.8?"gabled":"hipped";}return c==="flat"?null:{shape:c}}function Af(n){let e=String(n.roof_shape??n["roof:shape"]??"").toLowerCase();return e?e==="flat"?"flat":e==="skillion"||e==="lean_to"||e==="shed"?"skillion":e==="hipped"||e==="half-hipped"||e==="gambrel"?"hipped":e==="pyramidal"||e==="dome"||e==="conical"||e==="onion"?"pyramidal":e==="gabled"||e==="mansard"||e==="round"?"gabled":null:null}var dt=(n,e,t)=>n.a*e+n.b*t+n.c;function Bf(n,e,t,o){let r=n.length/2;if(r<3)return [];let i=[],a=l=>[n[l*2],n[l*2+1]];for(let l=0;l<r;l++){let[s,c]=a(l),[u,h]=a((l+r-1)%r),f=e*s+t*c+o,d=e*u+t*h+o;if(f<=0!=d<=0){let p=d/(d-f);i.push(u+(s-u)*p,h+(c-h)*p);}f<=0&&i.push(s,c);}return i}function Cf(n,e){let t=.5/Math.max(e,1e-6),o=n.length/2-1;if(o<5)return n;let r=[],i=0;r.push(n[0],n[1]);for(let a=1;a<o;a++){let l=n[i*2],s=n[i*2+1],c=n[a*2],u=n[a*2+1],h=c-l,f=u-s,d=Math.hypot(h,f),p=d>1e-6;if(p){for(let m=i+1;m<a;m++)if(Math.abs((n[m*2]-l)*f-(n[m*2+1]-s)*h)/d>=t){p=false;break}}p||(r.push(n[(a-1)*2],n[(a-1)*2+1]),i=a-1);}return r.length/2<3?n:(r.push(r[0],r[1]),r)}function Aa(n,e,t){let{ax:o,ay:r,halfLong:i}=e;if(t==="skillion"){let s=-r,c=o;return [{a:s,b:c,c:-(s*e.cx+c*e.cy)+e.halfShort}]}let a=[],l=n.length/2-1;for(let s=0;s<l;s++){let c=n[s*2],u=n[s*2+1],h=n[(s+1)%l*2],f=n[(s+1)%l*2+1],d=h-c,p=f-u,m=Math.hypot(d,p);if(m<1e-6||t==="gabled"&&Math.abs((d*o+p*r)/m)<.86)continue;let b=-p/m,y=d/m;a.push({a:b,b:y,c:-(b*c+y*u)});}return !a.length&&i>0?Aa(n,e,"hipped"):a}function vf(n,e){let t=[];for(let r=0;r<e.length-2;r+=2)t.push(e[r],e[r+1]);if(t.length<6)return [];let o=[];for(let r=0;r<n.length;r++){let i=t;for(let a=0;a<n.length&&i.length>=6;a++)a!==r&&(i=Bf(i,n[r].a-n[a].a,n[r].b-n[a].b,n[r].c-n[a].c));o.push(i.length>=6?i:[]);}return o}function xf(n,e){let t=0;for(let o=0;o<e.length;o++){let r=e[o];for(let i=0;i<r.length;i+=2){let a=dt(n[o],r[i],r[i+1]);a>t&&(t=a);}}return t}function wf(n,e,t){return n.map(o=>({a:o.a*e,b:o.b*e,c:o.c*e+t}))}function _f(n,e,t,o,r,i,a,l){let s=rn(nf,a);for(let c=0;c<t.length;c++){let u=e[c];if(!u||u.length<6)continue;let h=Pe(u,void 0,2);if(!h.length)continue;let f=-t[c].a/l,d=-t[c].b/l,p=Math.hypot(f,d,1),m={x:f/p,y:d/p,z:1/p};n.ensure(u.length/2);let b=n.vertexCount;for(let y=0;y<u.length;y+=2){let g=Math.max(o,dt(t[c],u[y],u[y+1]));Ct(n,u[y],u[y+1],g,m.x,m.y,m.z,255,i,s);}for(let y=0;y<h.length;y+=3)n.indices.push(b+h[y],b+h[y+2],b+h[y+1]),n.featureIds.push(r);}}function Ef(n,e){let t=String(n.class??"").toLowerCase();return t==="industrial"||t==="warehouse"||t==="hangar"||t==="construction"?lf:t==="commercial"||t==="office"||t==="retail"||t==="supermarket"?ba:t==="house"||t==="detached"||t==="garage"||t==="hut"||t==="shed"||e<=7?ma:e>=40?ba:af}function Df(n,e){let t=String(e.class??""),o=128;return t==="industrial"||t==="warehouse"||t==="construction"?o=96:t==="commercial"||t==="office"||t==="retail"?o=150:(t==="apartments"||t==="residential"||t==="house")&&(o=134),Math.max(0,Math.min(255,o+(n%121-60)))}function Mf(n){let e=n>>>0;return e=(e>>>16^e)*73244475,e=(e>>>16^e)*73244475,e=e>>>16^e,e>>>0}function Ff(n){let e=vt(n.render_height)??vt(n.height)??If(n.levels??n.building_levels??n["building:levels"]);return e&&e>0?Math.max(e,tf):ef}function Sf(n,e){let t=vt(n.render_min_height)??vt(n.min_height)??vt(n.base)??0;return t>0&&t<e?t:0}function If(n){let e=vt(n);return e&&e>0?e*3:null}function vt(n){if(typeof n=="number"&&isFinite(n))return n;if(typeof n=="string"){let e=parseFloat(n);if(isFinite(e))return e}return null}var tn=n=>n>127?127:n<-127?-127:n;function Lf(n){let e=n.osm_id;if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"){let t=Number(e);if(Number.isFinite(t))return t}return null}var Ne=class{constructor(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null;}};function Tf(n,e){return n>e?1:n<e?-1:0}function qe(n,e,t){let o=new Ne(null,null),r=o,i=o;for(;;){let a=t(n,e.key);if(a<0){if(e.left===null)break;if(t(n,e.left.key)<0){let l=e.left;if(e.left=l.right,l.right=e,e=l,e.left===null)break}i.left=e,i=e,e=e.left;}else if(a>0){if(e.right===null)break;if(t(n,e.right.key)>0){let l=e.right;if(e.right=l.left,l.left=e,e=l,e.right===null)break}r.right=e,r=e,e=e.right;}else break}return r.right=e.left,i.left=e.right,e.left=o.right,e.right=o.left,e}function nn(n,e,t,o){let r=new Ne(n,e);if(t===null)return r.left=r.right=null,r;t=qe(n,t,o);let i=o(n,t.key);return i<0?(r.left=t.left,r.right=t,t.left=null):i>=0&&(r.right=t.right,r.left=t,t.right=null),r}function Ba(n,e,t){let o=null,r=null;if(e){e=qe(n,e,t);let i=t(e.key,n);i===0?(o=e.left,r=e.right):i<0?(r=e.right,e.right=null,o=e):(o=e.left,e.left=null,r=e);}return {left:o,right:r}}function Hf(n,e,t){return e===null?n:(n===null||(e=qe(n.key,e,t),e.left=n),e)}function an(n,e,t,o,r){if(n){o(`${e}${t?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 "}${r(n)}
|
|
9
|
+
`);let i=e+(t?" ":"\u2502 ");n.left&&an(n.left,i,false,o,r),n.right&&an(n.right,i,true,o,r);}}var wt=class{constructor(e=Tf){this._root=null,this._size=0,this._comparator=e;}insert(e,t){return this._size++,this._root=nn(e,t,this._root,this._comparator)}add(e,t){let o=new Ne(e,t);this._root===null&&(o.left=o.right=null,this._size++,this._root=o);let r=this._comparator,i=qe(e,this._root,r),a=r(e,i.key);return a===0?this._root=i:(a<0?(o.left=i.left,o.right=i,i.left=null):a>0&&(o.right=i.right,o.left=i,i.right=null),this._size++,this._root=o),this._root}remove(e){this._root=this._remove(e,this._root,this._comparator);}_remove(e,t,o){let r;return t===null?null:(t=qe(e,t,o),o(e,t.key)===0?(t.left===null?r=t.right:(r=qe(e,t.left,o),r.right=t.right),this._size--,r):t)}pop(){let e=this._root;if(e){for(;e.left;)e=e.left;return this._root=qe(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null}findStatic(e){let t=this._root,o=this._comparator;for(;t;){let r=o(e,t.key);if(r===0)return t;r<0?t=t.left:t=t.right;}return null}find(e){return this._root&&(this._root=qe(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root}contains(e){let t=this._root,o=this._comparator;for(;t;){let r=o(e,t.key);if(r===0)return true;r<0?t=t.left:t=t.right;}return false}forEach(e,t){let o=this._root,r=[],i=false;for(;!i;)o!==null?(r.push(o),o=o.left):r.length!==0?(o=r.pop(),e.call(t,o),o=o.right):i=true;return this}range(e,t,o,r){let i=[],a=this._comparator,l=this._root,s;for(;i.length!==0||l;)if(l)i.push(l),l=l.left;else {if(l=i.pop(),s=a(l.key,t),s>0)break;if(a(l.key,e)>=0&&o.call(r,l))return this;l=l.right;}return this}keys(){let e=[];return this.forEach(({key:t})=>{e.push(t);}),e}values(){let e=[];return this.forEach(({data:t})=>{e.push(t);}),e}min(){return this._root?this.minNode(this._root).key:null}max(){return this._root?this.maxNode(this._root).key:null}minNode(e=this._root){if(e)for(;e.left;)e=e.left;return e}maxNode(e=this._root){if(e)for(;e.right;)e=e.right;return e}at(e){let t=this._root,o=false,r=0,i=[];for(;!o;)if(t)i.push(t),t=t.left;else if(i.length>0){if(t=i.pop(),r===e)return t;r++,t=t.right;}else o=true;return null}next(e){let t=this._root,o=null;if(e.right){for(o=e.right;o.left;)o=o.left;return o}let r=this._comparator;for(;t;){let i=r(e.key,t.key);if(i===0)break;i<0?(o=t,t=t.left):t=t.right;}return o}prev(e){let t=this._root,o=null;if(e.left!==null){for(o=e.left;o.right;)o=o.right;return o}let r=this._comparator;for(;t;){let i=r(e.key,t.key);if(i===0)break;i<0?t=t.left:(o=t,t=t.right);}return o}clear(){return this._root=null,this._size=0,this}toList(){return kf(this._root)}load(e,t=[],o=false){let r=e.length,i=this._comparator;if(o&&cn(e,t,0,r-1,i),this._root===null)this._root=ln(e,t,0,r),this._size=r;else {let a=Rf(this.toList(),Pf(e,t),i);r=this._size+r,this._root=sn({head:a},0,r);}return this}isEmpty(){return this._root===null}get size(){return this._size}get root(){return this._root}toString(e=t=>String(t.key)){let t=[];return an(this._root,"",true,o=>t.push(o),e),t.join("")}update(e,t,o){let r=this._comparator,{left:i,right:a}=Ba(e,this._root,r);r(e,t)<0?a=nn(t,o,a,r):i=nn(t,o,i,r),this._root=Hf(i,a,r);}split(e){return Ba(e,this._root,this._comparator)}*[Symbol.iterator](){let e=this._root,t=[],o=false;for(;!o;)e!==null?(t.push(e),e=e.left):t.length!==0?(e=t.pop(),yield e,e=e.right):o=true;}};function ln(n,e,t,o){let r=o-t;if(r>0){let i=t+Math.floor(r/2),a=n[i],l=e[i],s=new Ne(a,l);return s.left=ln(n,e,t,i),s.right=ln(n,e,i+1,o),s}return null}function Pf(n,e){let t=new Ne(null,null),o=t;for(let r=0;r<n.length;r++)o=o.next=new Ne(n[r],e[r]);return o.next=null,t.next}function kf(n){let e=n,t=[],o=false,r=new Ne(null,null),i=r;for(;!o;)e?(t.push(e),e=e.left):t.length>0?(e=i=i.next=t.pop(),e=e.right):o=true;return i.next=null,r.next}function sn(n,e,t){let o=t-e;if(o>0){let r=e+Math.floor(o/2),i=sn(n,e,r),a=n.head;return a.left=i,n.head=n.head.next,a.right=sn(n,r+1,t),a}return null}function Rf(n,e,t){let o=new Ne(null,null),r=o,i=n,a=e;for(;i!==null&&a!==null;)t(i.key,a.key)<0?(r.next=i,i=i.next):(r.next=a,a=a.next),r=r.next;return i!==null?r.next=i:a!==null&&(r.next=a),o.next}function cn(n,e,t,o,r){if(t>=o)return;let i=n[t+o>>1],a=t-1,l=o+1;for(;;){do a++;while(r(n[a],i)<0);do l--;while(r(n[l],i)>0);if(a>=l)break;let s=n[a];n[a]=n[l],n[l]=s,s=e[a],e[a]=e[l],e[l]=s;}cn(n,e,t,l,r),cn(n,e,l+1,o,r);}var $e=Number.EPSILON;$e===void 0&&($e=Math.pow(2,-52));var Nf=$e*$e,_a=(n,e)=>{if(-$e<n&&n<$e&&-$e<e&&e<$e)return 0;let t=n-e;return t*t<Nf*n*e?0:n<e?-1:1},hn=class{constructor(){this.reset();}reset(){this.xRounder=new nr,this.yRounder=new nr;}round(e,t){return {x:this.xRounder.round(e),y:this.yRounder.round(t)}}},nr=class{constructor(){this.tree=new wt,this.round(0);}round(e){let t=this.tree.add(e),o=this.tree.prev(t);if(o!==null&&_a(t.key,o.key)===0)return this.tree.remove(e),o.key;let r=this.tree.next(t);return r!==null&&_a(t.key,r.key)===0?(this.tree.remove(e),r.key):e}};new hn;typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6;typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;function Ia(n){let e=[];for(let t=0;t+1<n.length;t+=2)e.push([n[t],n[t+1]]);return e}function La(n){let e=[];for(let o of n)e.push(o[0],o[1]);let t=e.length;return t>=4&&(e[0]!==e[t-2]||e[1]!==e[t-1])&&e.push(e[0],e[1]),e}function Ta(n,e,t=0){if(n.length<2)return n;let o=new Map;for(let i of n){let a=i.lift??0,l=o.get(a);l?l.push(i):o.set(a,[i]);}let r=[];for(let[i,a]of o){if(a.length<2){r.push(...a);continue}let s=(t>0&&e?a.map(h=>({outer:e(h.outer,-t)??h.outer,holes:h.holes.map(f=>e(f,t)??f)})):a).map(h=>[Ia(h.outer),...h.holes.map(Ia)]),c;try{c=(void 0)(s[0],...s.slice(1));}catch{r.push(...a);continue}let u=c;if(!Array.isArray(u)||u.length===0){r.push(...a);continue}for(let h of u){if(!h.length)continue;let f=La(h[0]);if(f.length<8)continue;let d=[];for(let p=1;p<h.length;p++){let m=La(h[p]);m.length>=8&&d.push(m);}r.push(i?{outer:f,holes:d,lift:i}:{outer:f,holes:d});}}return r}var Dt=16,Oa=64,Yf=0,Zf=1,Ha=2,Qf=3,lo=1,qf=.6;function xn(n,e,t,o){let r=o.metersPerUnit>0?o.metersPerUnit:.5,i=o.elevation,a=o.base??0,l=Math.max(o.bevel??0,0)/r,s=Math.max(o.bevelDrop??0,0),c=Math.max(o.cornerRadius??0,0)/r,u=Math.max(512,n.length*24),h=new ArrayBuffer(u*Dt),f={view:new DataView(h),bytes:new Uint8Array(h),offset:0,count:0,indices:[],extent:e,ensure(C){if(f.count+C<=u)return;u=Math.max(u*2,f.count+C);let v=new ArrayBuffer(u*Dt);new Uint8Array(v).set(f.bytes.subarray(0,f.offset)),h=v,f.view=new DataView(v),f.bytes=new Uint8Array(v);}},d=[],p=new Map;for(let C of n.features()){if(C.type!==3||!Be(t,C.properties))continue;let v=o.liftBy?.(C.properties)??0;for(let E of ht(C.loadGeometry())){let M=Bt(E,e,Je(e));M&&d.push(v?{...M,lift:v}:M);}}let m=new Set,b=Math.max(o.weld??qf,0),y=Ta(d,(C,v)=>Bn(C,v,e,m),b/r),g=b>0?y.map(C=>({...C,outer:Ga(C.outer,b/r,e),holes:C.holes.map(v=>Ga(v,b/r,e))})):y;for(let C of g){Pa(C.outer,p);for(let v of C.holes)Pa(v,p);}o.onShapes?.(g);let A=new Set;for(let[C,v]of p)v>1&&A.add(C);let B=[],w={radius:c,segments:o.cornerSegments,extent:e,margin:Je(e),minCutRatio:0,maxChord:fa/r};for(let C of g){let v=c>0?{outer:ze(C.outer,{...w,keep:ka(C.outer,A)}),holes:C.holes.map(T=>ze(T,{...w,keep:ka(T,A)}))}:C,E=l>0?Bn(v.outer,l,e,A):v.outer,M=v.holes.map(T=>l>0?Bn(T,-l,e,A):T),F=C.lift??0,H=i+F,S=a+F;Ra(f,E??v.outer,M.map((T,k)=>T??v.holes[k]),H);let L=H,D=H-s;E&&l>0&&s>0&&An(f,E,v.outer,L,D,Zf,e,A),D!==S&&An(f,v.outer,v.outer,D,S,Ha,e,A);for(let T of v.holes)if(D!==S&&An(f,T,T,D,S,Ha,e,A),H<S){let k=f.indices.length;Ra(f,T,[],S,Qf);for(let P=k;P<f.indices.length;P++)B.push(f.indices[P]);f.indices.length=k;}}if(!f.indices.length&&!B.length)return null;let x=f.indices.length,_=new Uint32Array(x+B.length);return _.set(f.indices,0),_.set(B,x),{vertices:h.slice(0,f.offset),indices:_.buffer,vertexCount:f.count,indexCount:_.length,extent:e,capIndexOffset:x}}function Mt(n,e,t,o){let r=`${Math.round(n*100)},${Math.round(e*100)}`,i=`${Math.round(t*100)},${Math.round(o*100)}`;return r<i?`${r}|${i}`:`${i}|${r}`}function Pa(n,e){for(let t=0;t+3<n.length;t+=2){let o=Mt(n[t],n[t+1],n[t+2],n[t+3]);e.set(o,(e.get(o)??0)+1);}}function ka(n,e){if(!e.size)return;let t=n.length/2-1,o=new Array(t).fill(false);for(let r=0;r<t;r++){let i=Mt(n[(r+t-1)%t*2],n[(r+t-1)%t*2+1],n[r*2],n[r*2+1]),a=Mt(n[r*2],n[r*2+1],n[(r+1)%t*2],n[(r+1)%t*2+1]);(e.has(i)||e.has(a))&&(o[r]=true);}return o}function so(n,e,t,o,r,i,a,l){let s=n.offset;return n.view.setFloat32(s,e,true),n.view.setFloat32(s+4,t,true),n.view.setInt16(s+8,$f(Math.round(o*Oa)),true),n.view.setInt8(s+10,vn(Math.round(r*127))),n.view.setInt8(s+11,vn(Math.round(i*127))),n.view.setInt8(s+12,vn(Math.round(a*127))),n.bytes[s+13]=l,n.view.setInt8(s+14,e<=0?-lo:e>=n.extent?lo:0),n.view.setInt8(s+15,t<=0?-lo:t>=n.extent?lo:0),n.offset+=Dt,n.count++}function Ra(n,e,t,o,r=Yf){let i=[],a=[];for(let c=0;c<e.length;c++)i.push(e[c]);for(let c of t){a.push(i.length/2);for(let u=0;u<c.length;u++)i.push(c[u]);}let l=Pe(i,a.length?a:void 0,2);if(!l.length)return;n.ensure(i.length/2);let s=n.count;for(let c=0;c<i.length;c+=2)so(n,i[c],i[c+1],o,0,0,1,r);for(let c=0;c<l.length;c+=3)n.indices.push(s+l[c],s+l[c+2],s+l[c+1]);}function An(n,e,t,o,r,i,a,l){let s=Math.min(e.length,t.length)/2;if(!(s<3)){n.ensure((s-1)*4);for(let c=0;c<s-1;c++){let u=t[c*2],h=t[c*2+1],f=t[c*2+2],d=t[c*2+3];if(u===f&&h===d||or(u,h,f,d,a,Je(a))||l.has(Mt(u,h,f,d)))continue;let p=f-u,m=d-h,b=Math.hypot(p,m)||1,y=m/b,g=-p/b,A=o-r,B=Math.hypot(e[c*2]-u,e[c*2+1]-h)||0,w=0;if(B>1e-6&&A!==0){let E=1/Math.hypot(1,A/B);w=B/Math.hypot(B,A)*Math.sign(A),y*=E,g*=E;}let x=so(n,e[c*2],e[c*2+1],o,y,g,w,i),_=so(n,e[c*2+2],e[c*2+3],o,y,g,w,i),C=so(n,u,h,r,y,g,w,i),v=so(n,f,d,r,y,g,w,i);n.indices.push(C,_,v,C,x,_);}}}function Bn(n,e,t,o){let r=n.length/2-1;if(r<3)return null;let i=[];for(let u=0;u<r;u++){let h=n[u*2],f=n[u*2+1],d=n[(u+r-1)%r*2],p=n[(u+r-1)%r*2+1],m=n[(u+1)%r*2],b=n[(u+1)%r*2+1],y=Math.hypot(h-d,f-p)||1,g=Math.hypot(m-h,b-f)||1,A=(f-p)/y,B=-(h-d)/y,w=(b-f)/g,x=-(m-h)/g,_=A+w,C=B+x,v=Math.hypot(_,C);if(v<1e-6){i.push(h,f);continue}_/=v,C/=v;let E=Math.min(1/Math.max(_*A+C*B,.35),3),M=h-_*e*E,F=f-C*e*E,H=Mt(d,p,h,f),S=Mt(h,f,m,b);if(o.has(H)||o.has(S)){i.push(h,f);continue}let L=-Je(t),D=t+Je(t),T=(k,P)=>k<=L||k>=D||P<=L||P>=D;(T(h,f)||T(d,p)||T(m,b))&&(M=h,F=f),i.push(M,F);}i.push(i[0],i[1]);let a=Math.abs(Cn(n)),l=Cn(i);if(Math.sign(l)!==Math.sign(Cn(n))||Math.abs(l)<a*.25)return null;let s=-Je(t),c=t+Je(t);for(let u=0;u<i.length;u+=2)i[u]=Math.max(s,Math.min(c,i[u])),i[u+1]=Math.max(s,Math.min(c,i[u+1]));return i}function Cn(n){let e=0;for(let t=0;t<n.length-2;t+=2)e+=n[t]*n[t+3]-n[t+2]*n[t+1];return e/2}var vn=n=>n>127?127:n<-127?-127:n,$f=n=>n>32767?32767:n<-32768?-32768:n;function Ga(n,e,t){if(!(e>0))return n;let o=Je(t),r=-o,i=t+o,a=n;for(let l=0;l<3;l++){let s=a.length/2-1;if(s<6)break;let c=new Array(s).fill(true),u=s;for(let f=0;f<s&&!(u<=5);f++){let d=a[f*2],p=a[f*2+1];if(d<=r||d>=i||p<=r||p>=i)continue;let m=(f+s-1)%s;for(;!c[m]&&m!==f;)m=(m+s-1)%s;let b=(f+1)%s;for(;!c[b]&&b!==f;)b=(b+1)%s;if(m===f||b===f)break;let y=a[m*2],g=a[m*2+1],A=a[b*2]-y,B=a[b*2+1]-g,w=Math.hypot(A,B);w<1e-6||Math.abs((d-y)*B-(p-g)*A)/w<e&&(c[f]=false,u--);}if(u===s)break;let h=[];for(let f=0;f<s;f++)c[f]&&h.push(a[f*2],a[f*2+1]);h.push(h[0],h[1]),a=h;}return a}var et=4;function eu(n,e,t,o,r){let i=o*o,a=[],l=u=>n[u*2],s=u=>n[u*2+1],c=(u,h)=>{let f=n.length/2;return n.push((l(u)+l(h))/2,(s(u)+s(h))/2),f};for(let u=0;u<e.length;u+=3){a.push([t+e[u],t+e[u+1],t+e[u+2]]);let h=0;for(;a.length&&!(++h>2e4);){let[f,d,p]=a.pop(),m=(l(f)-l(d))**2+(s(f)-s(d))**2,b=(l(d)-l(p))**2+(s(d)-s(p))**2,y=(l(p)-l(f))**2+(s(p)-s(f))**2,g=Math.max(m,b,y);if(g<=i){r.push(f,d,p);continue}if(g===m){let A=c(f,d);a.push([f,A,p],[A,d,p]);}else if(g===b){let A=c(d,p);a.push([d,A,f],[A,p,f]);}else {let A=c(p,f);a.push([p,A,d],[A,f,d]);}}}}function wn(n,e,t=0,o,r=false,i=4096){let a=[],l=[],s=[];for(let d of n.features()){if(d.type!==3||!Be(e,d.properties))continue;let p=d.properties.osm_id,m=typeof p=="number"?p:typeof p=="string"?Number(p):NaN,b=Number.isFinite(m)?m:Number(d.id??0);for(let y of ht(d.loadGeometry())){let g=r?Bt(y,i):y;if(!g)continue;let A=[],B=[],w=o?ze(g.outer,o):g.outer;for(let C=0;C<w.length;C++)A.push(w[C]);for(let C of g.holes){let v=o?ze(C,o):C;B.push(A.length/2);for(let E=0;E<v.length;E++)A.push(v[E]);}let x=Pe(A,B.length?B:void 0,2);if(!x.length)continue;let _=a.length/2;for(let C=0;C<A.length;C++)a.push(A[C]);if(t>0){let C=[];eu(a,x,_,t,C);for(let v=0;v<C.length;v+=3)l.push(C[v],C[v+2],C[v+1]),s.push(b);continue}for(let C=0;C<x.length;C+=3)l.push(_+x[C],_+x[C+2],_+x[C+1]),s.push(b);}}if(!l.length)return null;let c=a.length/2,u=new Int16Array(a),h=new Uint32Array(l);return {featureIds:new Float64Array(s).buffer,vertices:u.buffer,indices:h.buffer,vertexCount:c,indexCount:h.length}}var tu=100;function _n(n){return {shapes:[],cells:[],extent:0,metersPerTile:n}}function En(n,e,t,o){if(!(t<=0)){n.extent=o;for(let r of e){let i=r.outer;if(i.length<6)continue;let a=1/0,l=1/0,s=-1/0,c=-1/0;for(let u=0;u<i.length;u+=2)i[u]<a&&(a=i[u]),i[u]>s&&(s=i[u]),i[u+1]<l&&(l=i[u+1]),i[u+1]>c&&(c=i[u+1]);n.shapes.push({outer:i,holes:r.holes,level:t,minX:a,minY:l,maxX:s,maxY:c});}n.cells=[];}}function ou(n){n.cells=Array.from({length:1024},()=>[]);let e=n.extent/32;for(let t=0;t<n.shapes.length;t++){let o=n.shapes[t],r=Ft(Math.floor(o.minX/e)),i=Ft(Math.floor(o.maxX/e)),a=Ft(Math.floor(o.minY/e)),l=Ft(Math.floor(o.maxY/e));for(let s=a;s<=l;s++)for(let c=r;c<=i;c++)n.cells[s*32+c].push(t);}}var Va=n=>n.shapes.length===0;function cr(n,e,t){!n.cells.length&&n.shapes.length&&ou(n);let o=n.extent/32,r=n.cells[Ft(Math.floor(t/o))*32+Ft(Math.floor(e/o))];if(!r||!r.length)return 0;let i=0;for(let a of r){let l=n.shapes[a];if(l.level<=i||e<l.minX||e>l.maxX||t<l.minY||t>l.maxY||!Wa(l.outer,e,t))continue;let s=false;for(let c of l.holes)if(Wa(c,e,t)){s=true;break}s||(i=l.level);}return Math.min(Math.round(i*100),127)}function Dn(n,e){let t=[],o=[],r=n.extent>0?n.metersPerTile/n.extent:0,i=r>0?2/r:0,a=cr(n,e[0],e[1]);t.push(e[0],e[1]),o.push(a);for(let l=0;l+3<e.length;l+=2){let s=e[l],c=e[l+1],u=e[l+2],h=e[l+3],f=cr(n,u,h);if(f!==a&&i>0){let d=Math.hypot(u-s,h-c),p=Math.min(Math.ceil(d/i),64),m=a;for(let b=1;b<p;b++){let y=b/p,g=s+(u-s)*y,A=c+(h-c)*y,B=cr(n,g,A);B!==m&&(t.push(g,A),o.push(B),m=B);}}t.push(u,h),o.push(f),a=f;}return {pts:t,levels:o}}var Ft=n=>n<0?0:n>31?31:n;function Wa(n,e,t){let o=false,r=n.length/2;for(let i=0,a=r-1;i<r;a=i++){let l=n[i*2],s=n[i*2+1],c=n[a*2],u=n[a*2+1];s>t!=u>t&&e<(c-l)*(t-s)/(u-s)+l&&(o=!o);}return o}var tt=20;function Fn(n,e,t=0,o,r=0){let i=Math.max(256,n.length*24),a=new ArrayBuffer(i*tt),l=new DataView(a),s=0,c=[],u=b=>{if(s+b<=i)return;i=Math.max(i*2,s+b);let y=new ArrayBuffer(i*tt);new Uint8Array(y).set(new Uint8Array(a,0,s*tt)),a=y,l=new DataView(y);},h=(b,y,g,A,B,w,x,_=0,C=0,v=0)=>{let E=s*tt;return l.setInt16(E,b,true),l.setInt16(E+2,y,true),l.setInt16(E+4,g,true),l.setInt16(E+6,A,true),l.setInt8(E+8,B),l.setInt8(E+9,w),l.setInt8(E+10,_),l.setInt8(E+11,C),l.setFloat32(E+12,x,true),l.setFloat32(E+16,v,true),s++},f=0,d=r>0?12/r:0,p=d>0?au(n):null;for(let b of n.features()){if(b.type!==2&&b.type!==3||!Be(e,b.properties))continue;let y=b.properties.width;f=typeof y=="number"&&y>.5&&y<100?y:0;let g=b.type===3;for(let A of b.loadGeometry()){let B=t>0?ru(za(A),t):za(A);if(B.length<4)continue;let w=o&&!Va(o)?Dn(o,B):null,x=w?w.pts:B,_=w?.levels,C=x.length/2;if(C<2)continue;let v=null;if(p&&f>0&&!g){let M=0;for(let T=0;T<C-1;T++)M+=Math.hypot(x[T*2+2]-x[T*2],x[T*2+3]-x[T*2+1]);let F=p.get(Mn(Math.round(x[0]),Math.round(x[1])))??0,H=p.get(Mn(Math.round(x[C*2-2]),Math.round(x[C*2-1])))??0,S=F-f,L=H-f,D=Math.min(d,M/2);D>0&&(S>0||L>0)&&(v=T=>{let k=0;return S>0&&T<D&&(k=S*(1-T/D)),L>0&&M-T<D&&(k=Math.max(k,L*(1-(M-T)/D))),f+k});}u((C-1)*4);let E=0;for(let M=0;M<C-1;M++){let F=x[M*2],H=x[M*2+1],S=x[M*2+2],L=x[M*2+3],D=Math.hypot(S-F,L-H);if(g&&iu(F,H,S,L,n.extent)){E+=D;continue}let T=nu(F,H,S,L,n.extent);if(!T){E+=D;continue}let[k,P,R,K]=T,V=Math.hypot(k-F,P-H),O=Math.hypot(R-k,K-P),z=Math.hypot(S-R,L-K),j=E+V,Z=_?_[M]:0,oe=_?_[M+1]:0,de=v?v(j):f,ee=v?v(j+O):f,U=h(k,P,R,K,0,-1,j,Z,oe,de),pe=h(k,P,R,K,0,1,j,Z,oe,de),le=h(k,P,R,K,1,1,j,Z,oe,ee),q=h(k,P,R,K,1,-1,j,Z,oe,ee);E+=V+O+z,c.push(U,pe,le,U,le,q);}}}if(!c.length)return null;let m=new Uint32Array(c);return {vertices:a.slice(0,s*tt),indices:m.buffer,vertexCount:s,indexCount:m.length}}function ru(n,e){let t=[];for(let o=0;o+3<n.length;o+=2){let r=n[o],i=n[o+1],a=n[o+2],l=n[o+3];t.push(r,i);let s=Math.min(64,Math.floor(Math.hypot(a-r,l-i)/e));for(let c=1;c<s;c++){let u=c/s;t.push(r+(a-r)*u,i+(l-i)*u);}}return t.push(n[n.length-2],n[n.length-1]),t}function za(n){let e=[];for(let t=0;t<n.length;t+=2){let o=n[t],r=n[t+1],i=e.length;i>=2&&e[i-2]===o&&e[i-1]===r||e.push(o,r);}return e}function nu(n,e,t,o,r){let i=t-n,a=o-e,l=0,s=1,c=[[-i,n],[i,r-n],[-a,e],[a,r-e]];for(let[u,h]of c){if(u===0){if(h<0)return null;continue}let f=h/u;if(u<0){if(f>s)return null;f>l&&(l=f);}else {if(f<l)return null;f<s&&(s=f);}}return s-l<1e-6?null:[Math.round(n+i*l),Math.round(e+a*l),Math.round(n+i*s),Math.round(e+a*s)]}function iu(n,e,t,o,r){return n===t&&(n<=0||n>=r)?true:e===o&&(e<=0||e>=r)}var Na=new WeakMap,Mn=(n,e)=>(n+512)*65536+(e+512);function au(n){let e=Na.get(n);if(e)return e;let t=new Map,o=(r,i,a)=>{let l=Mn(Math.round(r),Math.round(i)),s=t.get(l);(s===void 0||a>s)&&t.set(l,a);};for(let r of n.features()){if(r.type!==2)continue;let i=r.properties.width;if(!(typeof i!="number"||!(i>.5)||!(i<100)))for(let a of r.loadGeometry())a.length<4||(o(a[0],a[1],i),o(a[a.length-2],a[a.length-1],i));}return Na.set(n,t),t}var Sn={enabled:true,skyColor:"#7fb2e5",horizonColor:"#dfe6ee",fogRange:[1.35,7.5],fogIntensity:.92,spaceColor:"#05070f",atmosphereColor:"#79b8f5",starIntensity:.55,horizonBlend:.75},In={ambientColor:"#ffffff",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#fff4e2",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6f2",fillIntensity:.18};var Ka={version:1,name:"OSM 3D \u2014 \u0434\u043D\u0435\u0432\u043D\u043E\u0439",background:"#eceae4",light:{ambientColor:"#ffffff",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#fff4e2",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6f2",fillIntensity:.18},layers:[{id:"landcover-wood",type:"fill","source-layer":"landcover",filter:["in","class","wood","forest"],paint:{color:"#c6dcb4",opacity:{stops:[[8,.5],[12,.85]]},material:"foliage",materialScale:16}},{id:"landcover-grass",type:"fill","source-layer":"landcover",filter:["in","class","grass","farmland","meadow"],paint:{color:"#d9e6c6",opacity:{stops:[[8,.45],[12,.8]]},material:"foliage",materialScale:11}},{id:"landcover-sand",type:"fill","source-layer":"landcover",filter:["in","class","sand","beach"],paint:{color:"#f2e7c8",material:"sand",materialScale:26}},{id:"landcover-ice",type:"fill","source-layer":"landcover",filter:["in","class","ice","glacier"],paint:{color:"#e6f2f7"}},{id:"landcover-wetland",type:"fill","source-layer":"landcover",filter:["in","class","wetland","swamp"],paint:{color:"#cfe0d4",material:"foliage",materialScale:9}},{id:"landuse-residential",type:"fill","source-layer":"landuse",filter:["in","class","residential","suburb","neighbourhood","quarter"],paint:{color:"#e6e2da",opacity:{stops:[[10,.4],[14,.7]]}}},{id:"landuse-industrial",type:"fill","source-layer":"landuse",filter:["in","class","industrial","quarry","railway","substation"],paint:{color:"#e7e0dd"}},{id:"landuse-civic",type:"fill","source-layer":"landuse",filter:["in","class","school","university","college","hospital","clinic","police","kindergarten","bus_station"],paint:{color:"#ece3d8"}},{id:"landuse-sport",type:"fill","source-layer":"landuse",filter:["in","class","pitch","stadium","playground","track","swimming_pool"],paint:{color:"#cfe3c4",material:"foliage",materialScale:10}},{id:"landuse-cemetery",type:"fill","source-layer":"landuse",filter:["in","class","cemetery","grave_yard"],paint:{color:"#d6dfc8",material:"foliage",materialScale:12}},{id:"landuse-parking",type:"fill","source-layer":"landuse",filter:["in","class","parking","fuel"],paint:{color:"#e8e4dc"}},{id:"park",type:"fill","source-layer":"park",paint:{color:"#cfe5bd",opacity:.75,material:"foliage",materialScale:15}},{id:"aeroway-area",type:"fill","source-layer":"aeroway",filter:["in","class","aerodrome","apron","helipad"],paint:{color:"#e4e2e6"}},{id:"water",type:"fill","source-layer":"water",filter:["!in","class","swimming_pool"],paint:{color:"#a5cbe3",material:"water",materialScale:14,materialSpeed:1}},{id:"water-pool",type:"fill","source-layer":"water",filter:["==","class","swimming_pool"],paint:{color:"#9fd3e8",material:"water",materialScale:8,materialSpeed:1}},{id:"waterway",type:"line","source-layer":"waterway",paint:{color:"#a5cbe3",width:{stops:[[8,.6],[12,1.4],[16,4],[19,11.5],[20,23],[21,46],[22,92]]},material:"water",materialScale:10,materialSpeed:1}},{id:"aeroway-line",type:"line","source-layer":"aeroway",filter:["in","class","runway","taxiway"],paint:{color:"#d8d5da",width:{stops:[[10,1],[14,5],[18,24],[19,24],[20,48],[21,96],[22,192]]},material:"asphalt",materialScale:4}},{id:"road-casing-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#d4ab68",width:{stops:[[6,1.6],[10,3.4],[14,8],[16,14],[18,30],[19,45],[20,90],[21,180],[22,360]]},widthFromData:true,widthExtra:2.5}},{id:"road-casing-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#c6bca6",width:{stops:[[10,1.6],[14,5.5],[16,10],[18,22],[19,33],[20,66],[21,132],[22,264]]},widthFromData:true,widthExtra:2}},{id:"road-casing-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#cdc4b2",width:{stops:[[13,1.4],[16,6],[18,14],[19,22],[20,44],[21,88],[22,176]]},widthFromData:true,widthExtra:1.5}},{id:"road-rail",type:"line","source-layer":"transportation",filter:["in","class","rail","transit"],minzoom:10,paint:{color:"#b2a99e",width:{stops:[[10,.8],[14,1.8],[18,4],[19,5.5],[20,11],[21,22],[22,44]]}}},{id:"road-path",type:"line","source-layer":"transportation",filter:["in","class","path","pedestrian","footway","steps"],minzoom:14,paint:{color:"#bdb2a0",width:{stops:[[14,.8],[17,2],[19,4],[20,8],[21,16],[22,32]]},dashArray:[4,3],material:"asphalt",materialScale:2}},{id:"road-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#ffffff",width:{stops:[[13,.6],[16,4],[18,11],[19,18],[20,36],[21,72],[22,144]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-ramp",type:"line","source-layer":"transportation",filter:["all",["in","class","motorway","trunk","primary"],["has","ramp"]],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#ffffff",width:{stops:[[10,.8],[14,3.6],[16,7.5],[18,18],[19,28],[20,56],[21,112],[22,224]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-major",type:"line","source-layer":"transportation",filter:["all",["in","class","motorway","trunk","primary"],["!has","ramp"]],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-lane-divider-major",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","motorway","trunk","primary"]],minzoom:16.5,paint:{color:"#e3bd7f",width:{stops:[[16.5,.54],[17,.78],[18,1.4],[19,2.17],[20,4.34],[21,8.68],[22,17.36]]},dashArray:[7,18],material:"flat"}},{id:"road-lane-divider-secondary",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","secondary","tertiary"]],minzoom:16.5,paint:{color:"#d8cfbc",width:{stops:[[16.5,.46],[17,.67],[18,1.2],[19,1.86],[20,3.72],[21,7.44],[22,14.88]]},dashArray:[7,18],material:"flat"}},{id:"boundary",type:"line","source-layer":"boundary",filter:["<=","admin_level",4],paint:{color:"#b3a6b8",opacity:.7,width:{stops:[[4,.7],[10,1.4],[16,2.4]]},dashArray:[6,4]}},{id:"building",type:"fill-extrusion","source-layer":"building",minzoom:15,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,heightScale:{stops:[[15,0],[15.8,1]]},aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"indoor-venue",type:"fill-extrusion",source:"indoor","source-layer":"area",filter:["all",["==","class","level"],["==","base",1]],minzoom:15,maxzoom:16,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"road-closed-casing",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#ffffff",width:{stops:[[11,4],[14,6],[17,10],[19,16],[20,32],[21,64],[22,128]]},opacity:.9},overlay:true},{id:"road-closed",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#d92b2b",width:{stops:[[11,2.5],[14,4],[17,7],[19,11],[20,22],[21,44],[22,88]]},dashArray:[5,4]},overlay:true},{id:"road-closed-end",type:"symbol",source:"closures","source-layer":"closure_ends",minzoom:13,layout:{iconImage:"road_closed",iconFrame:"circle",iconFrameScale:1.6,allowOverlap:true,priority:6},paint:{color:"#d92b2b",frameColor:"#d92b2b",frameOpacity:1,frameHaloColor:"#ffffff",frameHaloWidth:1.4,iconColor:"#ffffff",iconHaloWidth:0,iconSize:13}},{id:"crossing",type:"fill",source:"points","source-layer":"crossings",minzoom:16.5,overlay:true,paint:{color:"#ffffff",opacity:.9}},{id:"housenumber",type:"symbol","source-layer":"housenumber",minzoom:17,layout:{textField:"{housenumber}",textSize:{stops:[[17,9],[19,11]]},maxLineChars:6,priority:-60},paint:{color:"#8c8478",haloColor:"#f5f3ee",haloWidth:1}},{id:"poi-food",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c2681c",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c2681c",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream"]},{id:"poi-shop",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#2f77c4",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#2f77c4",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle"]},{id:"poi-transport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3b82a6",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3b82a6",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport"]},{id:"poi-health",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c24444",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c24444",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pharmacy","hospital","doctors","dentist","veterinary"]},{id:"poi-education",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3f7f7a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3f7f7a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","school","college","university","library","kindergarten"]},{id:"poi-culture",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#8b5aa5",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#8b5aa5",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information"]},{id:"poi-sport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4f8b45",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4f8b45",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running"]},{id:"poi-lodging",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#7a5fbf",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#7a5fbf",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","lodging"]},{id:"poi-service",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#59636e",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#59636e",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"poi",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4a4a4a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["!in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport","pharmacy","hospital","doctors","dentist","veterinary","school","college","university","library","kindergarten","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running","lodging","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"traffic-signal",type:"symbol",source:"points","source-layer":"roadpoints",minzoom:16,filter:["==","kind","traffic_signals"],layout:{iconImage:"traffic_signals",priority:3},paint:{color:"#5c6470",haloColor:"#ffffff",haloWidth:1.4,iconSize:15}},{id:"road-shield",type:"symbol","source-layer":"transportation_name",filter:["has","ref"],minzoom:11,layout:{textField:"{ref}",iconImage:"shield-{ref_length}",iconPlacement:"behind",textSize:{stops:[[11,9.5],[16,11]]},iconTextGap:4,maxLineChars:10,collisionPadding:70,priority:3},paint:{color:"#3a4048",haloColor:"#f7f3e8",haloWidth:.5,iconColor:"#f7f3e8",iconHaloColor:"#8a8172",iconHaloWidth:1.4}},{id:"road-label",type:"symbol","source-layer":"transportation_name",minzoom:14,layout:{textField:["{name:ru}","{name}"],textPlacement:"line",textSize:{stops:[[14,10],[18,13]]},priority:20,abbreviate:true},paint:{color:"#5c5646",haloColor:"#ffffff",haloWidth:1.6}},{id:"water-label",type:"symbol","source-layer":"water_name",minzoom:10,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[10,11],[16,14]]},priority:30},paint:{color:"#3d7ea6",haloColor:"#ffffff",haloWidth:1.4}},{id:"place-label",type:"symbol","source-layer":"place",minzoom:4,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[6,12],[12,17],[16,22]]},maxLineChars:16,priority:90},paint:{color:"#3a3a3a",haloColor:"#ffffff",haloWidth:1.8}},{id:"indoor-shell",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","level"],minzoom:16,paint:{color:"#f6f3ec",opacity:.97},clipToTile:true},{id:"indoor-corridor",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","corridor"],minzoom:16,paint:{color:"#ffffff"},clipToTile:true},{id:"indoor-room",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["in","class","room","area"],minzoom:16,paint:{color:"#efeae0"},clipToTile:true},{id:"indoor-service",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","service"],minzoom:16,paint:{color:"#e6e1d6"},clipToTile:true},{id:"indoor-shop",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","shop"],minzoom:16,paint:{color:"#e8e0f0"},clipToTile:true},{id:"indoor-food",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","food"],minzoom:16,paint:{color:"#f7e3cd"},clipToTile:true},{id:"indoor-wc",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wc"],minzoom:16,paint:{color:"#d8e8f2"},clipToTile:true},{id:"indoor-wall",type:"fill-extrusion",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wall"],minzoom:16,paint:{color:"#cbc4b8",roofColor:"#e4ded2",facadeDetail:0,tintVariation:0,roofVariation:0,aoStrength:0}},{id:"indoor-transportation",type:"fill",source:"indoor","source-layer":"transportation",splitBy:"level",minzoom:16,paint:{color:"#d9d2e8",opacity:.95},clipToTile:true},{id:"indoor-door",type:"symbol",source:"indoor","source-layer":"poi",filter:["==","class","door"],splitBy:"level",minzoom:18,layout:{iconImage:"door",iconSize:{stops:[[18,9],[20,13]]},allowOverlap:true,priority:-10},paint:{color:"#8a8172",haloColor:"#ffffff",haloWidth:1.2}},{id:"indoor-poi",type:"symbol",source:"indoor","source-layer":"poi",splitBy:"level",minzoom:17,layout:{textField:["{name}"],iconImage:"{class}",textSize:{stops:[[17,10],[19,12]]},iconSize:{stops:[[17,12],[19,15]]},iconTextGap:2,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:.32}},{id:"indoor-name",type:"symbol",source:"indoor","source-layer":"area_name",splitBy:"level",minzoom:17,layout:{textField:["{name}"],textSize:{stops:[[17,10.5],[19,12.5]]},maxLineChars:8},paint:{color:"#3c3830",haloColor:"#ffffff",haloWidth:1.4}},{id:"building-entrance",type:"symbol",source:"points","source-layer":"entrances",minzoom:17,layout:{iconImage:"entrance",showFor:"highlight",textField:["{ref}"],textSize:{stops:[[17,10],[19,12.5]]},allowOverlap:true,priority:40,iconRotate:"angle",placement:"map",arrowLength:{stops:[[17,22],[18,32],[19,40],[20,48],[22,56]]},arrowWidth:{stops:[[17,6],[18,8.5],[19,10.5],[20,12.5],[22,15]]},arrowOutline:{stops:[[17,1.4],[18,2],[19,2.5],[20,3],[22,3.5]]},arrowGap:{stops:[[17,14],[18,19],[19,23],[20,27],[22,31]]},arrowUnits:"pixels",iconTextGap:3,arrowDotRadius:{stops:[[17,2.2],[18,3.2],[19,4],[20,4.8],[22,5.6]]},arrowDotGap:{stops:[[17,5],[18,7],[19,9],[20,11],[22,12.5]]}},paint:{color:"#2d6ecb",haloColor:"#ffffff",haloWidth:1.6}}],sources:{indoor:{url:"/tileserver/data/indoor/{z}/{x}/{y}.pbf",minzoom:15,maxzoom:18},points:{url:"/tileserver/data/points/{z}/{x}/{y}.pbf",minzoom:13,maxzoom:16},closures:{url:"/tileserver/data/closures/{z}/{x}/{y}.pbf",minzoom:10,maxzoom:16}}};var Ua={version:1,name:"\u041C\u044F\u0433\u043A\u0430\u044F \u0433\u0435\u043E\u043C\u0435\u0442\u0440\u0438\u044F",background:"#eceae4",light:{ambientColor:"#ffffff",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#fff4e2",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6f2",fillIntensity:.18},layers:[{id:"landcover-wood",type:"fill","source-layer":"landcover",filter:["in","class","wood","forest"],paint:{color:"#c6dcb4",opacity:{stops:[[8,.5],[12,.85]]},material:"foliage",materialScale:16},cornerRadius:10,cornerSegments:4},{id:"landcover-grass",type:"fill","source-layer":"landcover",filter:["in","class","grass","farmland","meadow"],paint:{color:"#d9e6c6",opacity:{stops:[[8,.45],[12,.8]]},material:"foliage",materialScale:11},cornerRadius:8,cornerSegments:4},{id:"landcover-sand",type:"fill","source-layer":"landcover",filter:["in","class","sand","beach"],paint:{color:"#f2e7c8",material:"sand",materialScale:26},cornerRadius:10,cornerSegments:4},{id:"landcover-ice",type:"fill","source-layer":"landcover",filter:["in","class","ice","glacier"],paint:{color:"#e6f2f7"}},{id:"landcover-wetland",type:"fill","source-layer":"landcover",filter:["in","class","wetland","swamp"],paint:{color:"#cfe0d4",material:"foliage",materialScale:9},cornerRadius:8,cornerSegments:4},{id:"landuse-residential",type:"fill","source-layer":"landuse",filter:["in","class","residential","suburb","neighbourhood","quarter"],paint:{color:"#e6e2da",opacity:{stops:[[10,.4],[14,.7]]}},cornerRadius:4,cornerSegments:3},{id:"landuse-industrial",type:"fill","source-layer":"landuse",filter:["in","class","industrial","quarry","railway","substation"],paint:{color:"#e7e0dd"},cornerRadius:4,cornerSegments:3},{id:"landuse-civic",type:"fill","source-layer":"landuse",filter:["in","class","school","university","college","hospital","clinic","police","kindergarten","bus_station"],paint:{color:"#ece3d8"},cornerRadius:4,cornerSegments:3},{id:"landuse-sport",type:"fill","source-layer":"landuse",filter:["in","class","pitch","stadium","playground","track","swimming_pool"],paint:{color:"#cfe3c4",material:"foliage",materialScale:10},cornerRadius:5,cornerSegments:3},{id:"landuse-cemetery",type:"fill","source-layer":"landuse",filter:["in","class","cemetery","grave_yard"],paint:{color:"#d6dfc8",material:"foliage",materialScale:12},cornerRadius:5,cornerSegments:3},{id:"landuse-parking",type:"fill","source-layer":"landuse",filter:["in","class","parking","fuel"],paint:{color:"#e8e4dc"},cornerRadius:3,cornerSegments:3},{id:"park",type:"fill","source-layer":"park",paint:{color:"#cfe5bd",opacity:.75,material:"foliage",materialScale:15},cornerRadius:9,cornerSegments:4},{id:"aeroway-area",type:"fill","source-layer":"aeroway",filter:["in","class","aerodrome","apron","helipad"],paint:{color:"#e4e2e6"},cornerRadius:5,cornerSegments:3},{id:"water",type:"fill","source-layer":"water",filter:["!in","class","swimming_pool"],paint:{color:"#a5cbe3",material:"water",materialScale:14,materialSpeed:1},cornerRadius:7,cornerSegments:4},{id:"water-pool",type:"fill","source-layer":"water",filter:["==","class","swimming_pool"],paint:{color:"#9fd3e8",material:"water",materialScale:8,materialSpeed:1},cornerRadius:4,cornerSegments:4},{id:"waterway",type:"line","source-layer":"waterway",paint:{color:"#a5cbe3",width:{stops:[[8,.6],[12,1.4],[16,4],[19,11.5],[20,23],[21,46],[22,92]]},material:"water",materialScale:10,materialSpeed:1}},{id:"aeroway-line",type:"line","source-layer":"aeroway",filter:["in","class","runway","taxiway"],paint:{color:"#d8d5da",width:{stops:[[10,1],[14,5],[18,24],[19,24],[20,48],[21,96],[22,192]]},material:"asphalt",materialScale:4}},{id:"road-casing-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#d4ab68",width:{stops:[[6,1.6],[10,3.4],[14,8],[16,14],[18,30],[19,45],[20,90],[21,180],[22,360]]},widthFromData:true,widthExtra:2.5}},{id:"road-casing-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#c6bca6",width:{stops:[[10,1.6],[14,5.5],[16,10],[18,22],[19,33],[20,66],[21,132],[22,264]]},widthFromData:true,widthExtra:2}},{id:"road-casing-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#cdc4b2",width:{stops:[[13,1.4],[16,6],[18,14],[19,22],[20,44],[21,88],[22,176]]},widthFromData:true,widthExtra:1.5}},{id:"road-rail",type:"line","source-layer":"transportation",filter:["in","class","rail","transit"],minzoom:10,paint:{color:"#b2a99e",width:{stops:[[10,.8],[14,1.8],[18,4],[19,5.5],[20,11],[21,22],[22,44]]}}},{id:"road-path",type:"line","source-layer":"transportation",filter:["in","class","path","pedestrian","footway","steps"],minzoom:14,paint:{color:"#bdb2a0",width:{stops:[[14,.8],[17,2],[19,4],[20,8],[21,16],[22,32]]},dashArray:[4,3],material:"asphalt",materialScale:2}},{id:"road-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#ffffff",width:{stops:[[13,.6],[16,4],[18,11],[19,18],[20,36],[21,72],[22,144]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-ramp",type:"line","source-layer":"transportation",filter:["all",["in","class","motorway","trunk","primary"],["has","ramp"]],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#ffffff",width:{stops:[[10,.8],[14,3.6],[16,7.5],[18,18],[19,28],[20,56],[21,112],[22,224]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-major",type:"line","source-layer":"transportation",filter:["all",["in","class","motorway","trunk","primary"],["!has","ramp"]],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"asphalt",materialScale:3,widthFromData:true}},{id:"road-lane-divider-major",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","motorway","trunk","primary"]],minzoom:16.5,paint:{color:"#e3bd7f",width:{stops:[[16.5,.54],[17,.78],[18,1.4],[19,2.17],[20,4.34],[21,8.68],[22,17.36]]},dashArray:[7,18],material:"flat"}},{id:"road-lane-divider-secondary",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","secondary","tertiary"]],minzoom:16.5,paint:{color:"#d8cfbc",width:{stops:[[16.5,.46],[17,.67],[18,1.2],[19,1.86],[20,3.72],[21,7.44],[22,14.88]]},dashArray:[7,18],material:"flat"}},{id:"boundary",type:"line","source-layer":"boundary",filter:["<=","admin_level",4],paint:{color:"#b3a6b8",opacity:.7,width:{stops:[[4,.7],[10,1.4],[16,2.4]]},dashArray:[6,4]}},{id:"building",type:"fill-extrusion","source-layer":"building",minzoom:15,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,heightScale:{stops:[[15,0],[15.8,1]]},aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35},cornerRadius:1.6,cornerSegments:2},{id:"indoor-venue",type:"fill-extrusion",source:"indoor","source-layer":"area",filter:["all",["==","class","level"],["==","base",1]],minzoom:15,maxzoom:16,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"road-closed-casing",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#ffffff",width:{stops:[[11,4],[14,6],[17,10],[19,16],[20,32],[21,64],[22,128]]},opacity:.9},overlay:true},{id:"road-closed",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#d92b2b",width:{stops:[[11,2.5],[14,4],[17,7],[19,11],[20,22],[21,44],[22,88]]},dashArray:[5,4]},overlay:true},{id:"road-closed-end",type:"symbol",source:"closures","source-layer":"closure_ends",minzoom:13,layout:{iconImage:"road_closed",iconFrame:"circle",iconFrameScale:1.6,allowOverlap:true,priority:6},paint:{color:"#d92b2b",frameColor:"#d92b2b",frameOpacity:1,frameHaloColor:"#ffffff",frameHaloWidth:1.4,iconColor:"#ffffff",iconHaloWidth:0,iconSize:13}},{id:"crossing",type:"fill",source:"points","source-layer":"crossings",minzoom:16.5,overlay:true,paint:{color:"#ffffff",opacity:.9}},{id:"housenumber",type:"symbol","source-layer":"housenumber",minzoom:17,layout:{textField:"{housenumber}",textSize:{stops:[[17,9],[19,11]]},maxLineChars:6,priority:-60},paint:{color:"#8c8478",haloColor:"#f5f3ee",haloWidth:1}},{id:"poi-food",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c2681c",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c2681c",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream"]},{id:"poi-shop",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#2f77c4",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#2f77c4",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle"]},{id:"poi-transport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3b82a6",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3b82a6",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport"]},{id:"poi-health",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c24444",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c24444",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pharmacy","hospital","doctors","dentist","veterinary"]},{id:"poi-education",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3f7f7a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3f7f7a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","school","college","university","library","kindergarten"]},{id:"poi-culture",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#8b5aa5",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#8b5aa5",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information"]},{id:"poi-sport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4f8b45",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4f8b45",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running"]},{id:"poi-lodging",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#7a5fbf",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#7a5fbf",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","lodging"]},{id:"poi-service",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#59636e",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#59636e",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"poi",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4a4a4a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["!in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport","pharmacy","hospital","doctors","dentist","veterinary","school","college","university","library","kindergarten","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running","lodging","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"traffic-signal",type:"symbol",source:"points","source-layer":"roadpoints",minzoom:16,filter:["==","kind","traffic_signals"],layout:{iconImage:"traffic_signals",priority:3},paint:{color:"#5c6470",haloColor:"#ffffff",haloWidth:1.4,iconSize:15}},{id:"road-shield",type:"symbol","source-layer":"transportation_name",filter:["has","ref"],minzoom:11,layout:{textField:"{ref}",iconImage:"shield-{ref_length}",iconPlacement:"behind",textSize:{stops:[[11,9.5],[16,11]]},iconTextGap:4,maxLineChars:10,collisionPadding:70,priority:3},paint:{color:"#3a4048",haloColor:"#f7f3e8",haloWidth:.5,iconColor:"#f7f3e8",iconHaloColor:"#8a8172",iconHaloWidth:1.4}},{id:"road-label",type:"symbol","source-layer":"transportation_name",minzoom:14,layout:{textField:["{name:ru}","{name}"],textPlacement:"line",textSize:{stops:[[14,10],[18,13]]},priority:20,abbreviate:true},paint:{color:"#5c5646",haloColor:"#ffffff",haloWidth:1.6}},{id:"water-label",type:"symbol","source-layer":"water_name",minzoom:10,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[10,11],[16,14]]},priority:30},paint:{color:"#3d7ea6",haloColor:"#ffffff",haloWidth:1.4}},{id:"place-label",type:"symbol","source-layer":"place",minzoom:4,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[6,12],[12,17],[16,22]]},maxLineChars:16,priority:90},paint:{color:"#3a3a3a",haloColor:"#ffffff",haloWidth:1.8}},{id:"indoor-shell",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","level"],minzoom:16,paint:{color:"#f6f3ec",opacity:.97},clipToTile:true},{id:"indoor-corridor",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","corridor"],minzoom:16,paint:{color:"#ffffff"},clipToTile:true},{id:"indoor-room",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["in","class","room","area"],minzoom:16,paint:{color:"#efeae0"},clipToTile:true},{id:"indoor-service",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","service"],minzoom:16,paint:{color:"#e6e1d6"},clipToTile:true},{id:"indoor-shop",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","shop"],minzoom:16,paint:{color:"#e8e0f0"},clipToTile:true},{id:"indoor-food",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","food"],minzoom:16,paint:{color:"#f7e3cd"},clipToTile:true},{id:"indoor-wc",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wc"],minzoom:16,paint:{color:"#d8e8f2"},clipToTile:true},{id:"indoor-wall",type:"fill-extrusion",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wall"],minzoom:16,paint:{color:"#cbc4b8",roofColor:"#e4ded2",facadeDetail:0,tintVariation:0,roofVariation:0,aoStrength:0}},{id:"indoor-transportation",type:"fill",source:"indoor","source-layer":"transportation",splitBy:"level",minzoom:16,paint:{color:"#d9d2e8",opacity:.95},clipToTile:true},{id:"indoor-door",type:"symbol",source:"indoor","source-layer":"poi",filter:["==","class","door"],splitBy:"level",minzoom:18,layout:{iconImage:"door",iconSize:{stops:[[18,9],[20,13]]},allowOverlap:true,priority:-10},paint:{color:"#8a8172",haloColor:"#ffffff",haloWidth:1.2}},{id:"indoor-poi",type:"symbol",source:"indoor","source-layer":"poi",splitBy:"level",minzoom:17,layout:{textField:["{name}"],iconImage:"{class}",textSize:{stops:[[17,10],[19,12]]},iconSize:{stops:[[17,12],[19,15]]},iconTextGap:2,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:.32}},{id:"indoor-name",type:"symbol",source:"indoor","source-layer":"area_name",splitBy:"level",minzoom:17,layout:{textField:["{name}"],textSize:{stops:[[17,10.5],[19,12.5]]},maxLineChars:8},paint:{color:"#3c3830",haloColor:"#ffffff",haloWidth:1.4}},{id:"building-entrance",type:"symbol",source:"points","source-layer":"entrances",minzoom:17,layout:{iconImage:"entrance",showFor:"highlight",textField:["{ref}"],textSize:{stops:[[17,10],[19,12.5]]},allowOverlap:true,priority:40,iconRotate:"angle",placement:"map",arrowLength:{stops:[[17,22],[18,32],[19,40],[20,48],[22,56]]},arrowWidth:{stops:[[17,6],[18,8.5],[19,10.5],[20,12.5],[22,15]]},arrowOutline:{stops:[[17,1.4],[18,2],[19,2.5],[20,3],[22,3.5]]},arrowGap:{stops:[[17,14],[18,19],[19,23],[20,27],[22,31]]},arrowUnits:"pixels",iconTextGap:3,arrowDotRadius:{stops:[[17,2.2],[18,3.2],[19,4],[20,4.8],[22,5.6]]},arrowDotGap:{stops:[[17,5],[18,7],[19,9],[20,11],[22,12.5]]}},paint:{color:"#2d6ecb",haloColor:"#ffffff",haloWidth:1.6}}],sources:{indoor:{url:"/tileserver/data/indoor/{z}/{x}/{y}.pbf",minzoom:15,maxzoom:18},points:{url:"/tileserver/data/points/{z}/{x}/{y}.pbf",minzoom:13,maxzoom:16},closures:{url:"/tileserver/data/closures/{z}/{x}/{y}.pbf",minzoom:10,maxzoom:16}}};var Ja={version:1,name:"\u0420\u0435\u043B\u044C\u0435\u0444",background:"#eceae4",light:{ambientColor:"#ffffff",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#fff4e2",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6f2",fillIntensity:.18},layers:[{id:"landcover-wood",type:"surface","source-layer":"landcover",filter:["in","class","wood","forest"],paint:{color:"#c6dcb4",opacity:{stops:[[8,.5],[12,.85]]},material:"foliage",materialScale:16,sideShade:.16},elevation:.7,bevel:.5,bevelDrop:.15,cornerRadius:10,cornerSegments:4},{id:"landcover-grass",type:"surface","source-layer":"landcover",filter:["in","class","grass","farmland","meadow"],paint:{color:"#d9e6c6",opacity:{stops:[[8,.45],[12,.8]]},material:"foliage",materialScale:11,sideShade:.16},elevation:.5,bevel:.45,bevelDrop:.12,cornerRadius:8,cornerSegments:4},{id:"landcover-sand",type:"surface","source-layer":"landcover",filter:["in","class","sand","beach"],paint:{color:"#f2e7c8",material:"sand",materialScale:26,sideShade:.16},elevation:.12,bevel:.6,bevelDrop:.08,cornerRadius:10,cornerSegments:4},{id:"landcover-ice",type:"fill","source-layer":"landcover",filter:["in","class","ice","glacier"],paint:{color:"#e6f2f7"}},{id:"landcover-wetland",type:"surface","source-layer":"landcover",filter:["in","class","wetland","swamp"],paint:{color:"#cfe0d4",material:"foliage",materialScale:9,sideShade:.16},elevation:.15,bevel:.5,bevelDrop:.08,cornerRadius:8,cornerSegments:4},{id:"landuse-residential",type:"fill","source-layer":"landuse",filter:["in","class","residential","suburb","neighbourhood","quarter"],paint:{color:"#e6e2da",opacity:{stops:[[10,.4],[14,.7]]}}},{id:"landuse-industrial",type:"fill","source-layer":"landuse",filter:["in","class","industrial","quarry","railway","substation"],paint:{color:"#e7e0dd"}},{id:"landuse-civic",type:"fill","source-layer":"landuse",filter:["in","class","school","university","college","hospital","clinic","police","kindergarten","bus_station"],paint:{color:"#ece3d8"}},{id:"landuse-sport",type:"surface","source-layer":"landuse",filter:["in","class","pitch","stadium","playground","track","swimming_pool"],paint:{color:"#cfe3c4",material:"foliage",materialScale:10,sideShade:.16},elevation:.35,bevel:.4,bevelDrop:.1,cornerRadius:5,cornerSegments:4},{id:"landuse-cemetery",type:"surface","source-layer":"landuse",filter:["in","class","cemetery","grave_yard"],paint:{color:"#d6dfc8",material:"foliage",materialScale:12,sideShade:.16},elevation:.3,bevel:.4,bevelDrop:.1,cornerRadius:5,cornerSegments:4},{id:"landuse-parking",type:"fill","source-layer":"landuse",filter:["in","class","parking","fuel"],paint:{color:"#e8e4dc"}},{id:"park",type:"surface","source-layer":"park",paint:{color:"#cfe5bd",opacity:.75,material:"foliage",materialScale:15,sideShade:.16},elevation:.6,bevel:.5,bevelDrop:.15,cornerRadius:9,cornerSegments:4},{id:"aeroway-area",type:"fill","source-layer":"aeroway",filter:["in","class","aerodrome","apron","helipad"],paint:{color:"#e4e2e6"}},{id:"water",type:"surface","source-layer":"water",filter:["!in","class","swimming_pool"],paint:{color:"#a5cbe3",material:"water",materialScale:14,materialSpeed:1,sideShade:0},elevation:-0.35,bevel:.8,bevelDrop:.12,cornerRadius:7,cornerSegments:4},{id:"water-pool",type:"surface","source-layer":"water",filter:["==","class","swimming_pool"],paint:{color:"#9fd3e8",material:"water",materialScale:8,materialSpeed:1,sideShade:0},elevation:-0.2,bevel:.4,bevelDrop:.08,cornerRadius:4,cornerSegments:4},{id:"waterway",type:"line","source-layer":"waterway",paint:{color:"#a5cbe3",width:{stops:[[8,.6],[12,1.4],[16,4],[19,11.5],[20,23],[21,46],[22,92]]},material:"water",materialScale:10,materialSpeed:1,elevation:-0.3}},{id:"aeroway-line",type:"line","source-layer":"aeroway",filter:["in","class","runway","taxiway"],paint:{color:"#d8d5da",width:{stops:[[10,1],[14,5],[18,24],[19,24],[20,48],[21,96],[22,192]]},material:"asphalt",materialScale:4,elevation:.08}},{id:"road-casing-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#d4ab68",width:{stops:[[6,1.6],[10,3.4],[14,8],[16,14],[18,30],[19,45],[20,90],[21,180],[22,360]]},elevation:.15,widthFromData:true,widthExtra:2.5}},{id:"road-casing-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#c6bca6",width:{stops:[[10,1.6],[14,5.5],[16,10],[18,22],[19,33],[20,66],[21,132],[22,264]]},elevation:.13,widthFromData:true,widthExtra:2}},{id:"road-casing-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#cdc4b2",width:{stops:[[13,1.4],[16,6],[18,14],[19,22],[20,44],[21,88],[22,176]]},elevation:.11,widthFromData:true,widthExtra:1.5}},{id:"road-rail",type:"line","source-layer":"transportation",filter:["in","class","rail","transit"],minzoom:10,paint:{color:"#b2a99e",width:{stops:[[10,.8],[14,1.8],[18,4],[19,5.5],[20,11],[21,22],[22,44]]},elevation:.12}},{id:"road-path",type:"line","source-layer":"transportation",filter:["in","class","path","pedestrian","footway","steps"],minzoom:14,paint:{color:"#bdb2a0",width:{stops:[[14,.8],[17,2],[19,4],[20,8],[21,16],[22,32]]},dashArray:[4,3],material:"asphalt",materialScale:2,elevation:.05}},{id:"road-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#ffffff",width:{stops:[[13,.6],[16,4],[18,11],[19,18],[20,36],[21,72],[22,144]]},material:"asphalt",materialScale:3,elevation:.14,widthFromData:true}},{id:"road-ramp",type:"line","source-layer":"transportation",filter:["all",["in","class","motorway","trunk","primary"],["has","ramp"]],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"asphalt",materialScale:3,elevation:.18,widthFromData:true}},{id:"road-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#ffffff",width:{stops:[[10,.8],[14,3.6],[16,7.5],[18,18],[19,28],[20,56],[21,112],[22,224]]},material:"asphalt",materialScale:3,elevation:.16,widthFromData:true}},{id:"road-major",type:"line","source-layer":"transportation",filter:["all",["in","class","motorway","trunk","primary"],["!has","ramp"]],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"asphalt",materialScale:3,elevation:.18,widthFromData:true}},{id:"road-lane-divider-major",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","motorway","trunk","primary"]],minzoom:16.5,paint:{color:"#e3bd7f",width:{stops:[[16.5,.54],[17,.78],[18,1.4],[19,2.17],[20,4.34],[21,8.68],[22,17.36]]},dashArray:[7,18],material:"flat",elevation:.182}},{id:"road-lane-divider-secondary",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","secondary","tertiary"]],minzoom:16.5,paint:{color:"#d8cfbc",width:{stops:[[16.5,.46],[17,.67],[18,1.2],[19,1.86],[20,3.72],[21,7.44],[22,14.88]]},dashArray:[7,18],material:"flat",elevation:.162}},{id:"boundary",type:"line","source-layer":"boundary",filter:["<=","admin_level",4],paint:{color:"#b3a6b8",opacity:.7,width:{stops:[[4,.7],[10,1.4],[16,2.4]]},dashArray:[6,4]}},{id:"building",type:"fill-extrusion","source-layer":"building",minzoom:15,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,heightScale:{stops:[[15,0],[15.8,1]]},aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"indoor-venue",type:"fill-extrusion",source:"indoor","source-layer":"area",filter:["all",["==","class","level"],["==","base",1]],minzoom:15,maxzoom:16,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"road-closed-casing",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#ffffff",width:{stops:[[11,4],[14,6],[17,10],[19,16],[20,32],[21,64],[22,128]]},opacity:.9},overlay:true},{id:"road-closed",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#d92b2b",width:{stops:[[11,2.5],[14,4],[17,7],[19,11],[20,22],[21,44],[22,88]]},dashArray:[5,4]},overlay:true},{id:"road-closed-end",type:"symbol",source:"closures","source-layer":"closure_ends",minzoom:13,layout:{iconImage:"road_closed",iconFrame:"circle",iconFrameScale:1.6,allowOverlap:true,priority:6},paint:{color:"#d92b2b",frameColor:"#d92b2b",frameOpacity:1,frameHaloColor:"#ffffff",frameHaloWidth:1.4,iconColor:"#ffffff",iconHaloWidth:0,iconSize:13}},{id:"crossing",type:"surface",weld:0,source:"points","source-layer":"crossings",minzoom:16.5,overlay:true,paint:{color:"#ffffff",opacity:.9,sideShade:.16},elevation:.09,bevel:.05,bevelDrop:.02,groundBy:{"landcover:wood":.7,"landcover:forest":.7,"landcover:grass":.5,"landcover:farmland":.5,"landcover:meadow":.5,"landcover:sand":.12,"landcover:beach":.12,"landcover:wetland":.15,"landcover:swamp":.15,"landuse:pitch":.35,"landuse:stadium":.35,"landuse:playground":.35,"landuse:track":.35,"landuse:swimming_pool":.35,"landuse:cemetery":.3,"landuse:grave_yard":.3,"park:park":.6}},{id:"housenumber",type:"symbol","source-layer":"housenumber",minzoom:17,layout:{textField:"{housenumber}",textSize:{stops:[[17,9],[19,11]]},maxLineChars:6,priority:-60},paint:{color:"#8c8478",haloColor:"#f5f3ee",haloWidth:1}},{id:"poi-food",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c2681c",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c2681c",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream"]},{id:"poi-shop",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#2f77c4",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#2f77c4",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle"]},{id:"poi-transport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3b82a6",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3b82a6",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport"]},{id:"poi-health",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c24444",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c24444",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pharmacy","hospital","doctors","dentist","veterinary"]},{id:"poi-education",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3f7f7a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3f7f7a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","school","college","university","library","kindergarten"]},{id:"poi-culture",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#8b5aa5",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#8b5aa5",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information"]},{id:"poi-sport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4f8b45",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4f8b45",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running"]},{id:"poi-lodging",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#7a5fbf",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#7a5fbf",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","lodging"]},{id:"poi-service",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#59636e",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#59636e",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"poi",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4a4a4a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["!in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport","pharmacy","hospital","doctors","dentist","veterinary","school","college","university","library","kindergarten","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running","lodging","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"traffic-signal",type:"symbol",source:"points","source-layer":"roadpoints",minzoom:16,filter:["==","kind","traffic_signals"],layout:{iconImage:"traffic_signals",priority:3},paint:{color:"#5c6470",haloColor:"#ffffff",haloWidth:1.4,iconSize:15}},{id:"road-shield",type:"symbol","source-layer":"transportation_name",filter:["has","ref"],minzoom:11,layout:{textField:"{ref}",iconImage:"shield-{ref_length}",iconPlacement:"behind",textSize:{stops:[[11,9.5],[16,11]]},iconTextGap:4,maxLineChars:10,collisionPadding:70,priority:3},paint:{color:"#3a4048",haloColor:"#f7f3e8",haloWidth:.5,iconColor:"#f7f3e8",iconHaloColor:"#8a8172",iconHaloWidth:1.4}},{id:"road-label",type:"symbol","source-layer":"transportation_name",minzoom:14,layout:{textField:["{name:ru}","{name}"],textPlacement:"line",textSize:{stops:[[14,10],[18,13]]},priority:20,abbreviate:true},paint:{color:"#5c5646",haloColor:"#ffffff",haloWidth:1.6}},{id:"water-label",type:"symbol","source-layer":"water_name",minzoom:10,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[10,11],[16,14]]},priority:30},paint:{color:"#3d7ea6",haloColor:"#ffffff",haloWidth:1.4}},{id:"place-label",type:"symbol","source-layer":"place",minzoom:4,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[6,12],[12,17],[16,22]]},maxLineChars:16,priority:90},paint:{color:"#3a3a3a",haloColor:"#ffffff",haloWidth:1.8}},{id:"indoor-shell",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","level"],minzoom:16,paint:{color:"#f6f3ec",opacity:.97},clipToTile:true},{id:"indoor-corridor",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","corridor"],minzoom:16,paint:{color:"#ffffff"},clipToTile:true},{id:"indoor-room",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["in","class","room","area"],minzoom:16,paint:{color:"#efeae0"},clipToTile:true},{id:"indoor-service",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","service"],minzoom:16,paint:{color:"#e6e1d6"},clipToTile:true},{id:"indoor-shop",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","shop"],minzoom:16,paint:{color:"#e8e0f0"},clipToTile:true},{id:"indoor-food",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","food"],minzoom:16,paint:{color:"#f7e3cd"},clipToTile:true},{id:"indoor-wc",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wc"],minzoom:16,paint:{color:"#d8e8f2"},clipToTile:true},{id:"indoor-wall",type:"fill-extrusion",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wall"],minzoom:16,paint:{color:"#cbc4b8",roofColor:"#e4ded2",facadeDetail:0,tintVariation:0,roofVariation:0,aoStrength:0}},{id:"indoor-transportation",type:"fill",source:"indoor","source-layer":"transportation",splitBy:"level",minzoom:16,paint:{color:"#d9d2e8",opacity:.95},clipToTile:true},{id:"indoor-door",type:"symbol",source:"indoor","source-layer":"poi",filter:["==","class","door"],splitBy:"level",minzoom:18,layout:{iconImage:"door",iconSize:{stops:[[18,9],[20,13]]},allowOverlap:true,priority:-10},paint:{color:"#8a8172",haloColor:"#ffffff",haloWidth:1.2}},{id:"indoor-poi",type:"symbol",source:"indoor","source-layer":"poi",splitBy:"level",minzoom:17,layout:{textField:["{name}"],iconImage:"{class}",textSize:{stops:[[17,10],[19,12]]},iconSize:{stops:[[17,12],[19,15]]},iconTextGap:2,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:.32}},{id:"indoor-name",type:"symbol",source:"indoor","source-layer":"area_name",splitBy:"level",minzoom:17,layout:{textField:["{name}"],textSize:{stops:[[17,10.5],[19,12.5]]},maxLineChars:8},paint:{color:"#3c3830",haloColor:"#ffffff",haloWidth:1.4}},{id:"building-entrance",type:"symbol",source:"points","source-layer":"entrances",minzoom:17,layout:{iconImage:"entrance",showFor:"highlight",textField:["{ref}"],textSize:{stops:[[17,10],[19,12.5]]},allowOverlap:true,priority:40,iconRotate:"angle",placement:"map",arrowLength:{stops:[[17,22],[18,32],[19,40],[20,48],[22,56]]},arrowWidth:{stops:[[17,6],[18,8.5],[19,10.5],[20,12.5],[22,15]]},arrowOutline:{stops:[[17,1.4],[18,2],[19,2.5],[20,3],[22,3.5]]},arrowGap:{stops:[[17,14],[18,19],[19,23],[20,27],[22,31]]},arrowUnits:"pixels",iconTextGap:3,arrowDotRadius:{stops:[[17,2.2],[18,3.2],[19,4],[20,4.8],[22,5.6]]},arrowDotGap:{stops:[[17,5],[18,7],[19,9],[20,11],[22,12.5]]}},paint:{color:"#2d6ecb",haloColor:"#ffffff",haloWidth:1.6}}],sources:{indoor:{url:"/tileserver/data/indoor/{z}/{x}/{y}.pbf",minzoom:15,maxzoom:18},points:{url:"/tileserver/data/points/{z}/{x}/{y}.pbf",minzoom:13,maxzoom:16},closures:{url:"/tileserver/data/closures/{z}/{x}/{y}.pbf",minzoom:10,maxzoom:16}}};var Xa={version:1,name:"\u041E\u0431\u044A\u0451\u043C\u043D\u044B\u0439 \u0433\u043E\u0440\u043E\u0434",background:"#eceae4",light:{ambientColor:"#ffffff",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#fff4e2",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6f2",fillIntensity:.18},layers:[{id:"landcover-wood",type:"surface","source-layer":"landcover",filter:["in","class","wood","forest"],paint:{color:"#c6dcb4",opacity:{stops:[[8,.5],[12,.85]]},material:"flat",sideShade:.16},elevation:.175,bevel:.125,bevelDrop:.038,cornerRadius:10,cornerSegments:4},{id:"landcover-grass",type:"surface","source-layer":"landcover",filter:["in","class","grass","farmland","meadow"],paint:{color:"#d9e6c6",opacity:{stops:[[8,.45],[12,.8]]},material:"flat",sideShade:.16},elevation:.125,bevel:.113,bevelDrop:.03,cornerRadius:8,cornerSegments:4},{id:"landcover-sand",type:"surface","source-layer":"landcover",filter:["in","class","sand","beach"],paint:{color:"#f2e7c8",material:"flat",sideShade:.16},elevation:.035,bevel:.15,bevelDrop:.02,cornerRadius:10,cornerSegments:4},{id:"landcover-ice",type:"fill","source-layer":"landcover",filter:["in","class","ice","glacier"],paint:{color:"#e6f2f7"}},{id:"landcover-wetland",type:"surface","source-layer":"landcover",filter:["in","class","wetland","swamp"],paint:{color:"#cfe0d4",material:"flat",sideShade:.16},elevation:.045,bevel:.125,bevelDrop:.02,cornerRadius:8,cornerSegments:4},{id:"landuse-residential",type:"surface","source-layer":"landuse",filter:["in","class","residential","suburb","neighbourhood","quarter"],paint:{color:"#e6e2da",opacity:{stops:[[10,.4],[14,.7]]},material:"flat",sideShade:.16},cornerRadius:4,cornerSegments:3,elevation:.02,bevel:.1,bevelDrop:.02},{id:"landuse-industrial",type:"surface","source-layer":"landuse",filter:["in","class","industrial","quarry","railway","substation"],paint:{color:"#e7e0dd",material:"flat",sideShade:.16},cornerRadius:4,cornerSegments:3,elevation:.03,bevel:.1,bevelDrop:.02},{id:"landuse-civic",type:"surface","source-layer":"landuse",filter:["in","class","school","university","college","hospital","clinic","police","kindergarten","bus_station"],paint:{color:"#ece3d8",material:"flat",sideShade:.16},cornerRadius:4,cornerSegments:3,elevation:.055,bevel:.1,bevelDrop:.02},{id:"landuse-sport",type:"surface","source-layer":"landuse",filter:["in","class","pitch","stadium","playground","track","swimming_pool"],paint:{color:"#cfe3c4",material:"flat",sideShade:.16},elevation:.088,bevel:.1,bevelDrop:.025,cornerRadius:5,cornerSegments:3},{id:"landuse-cemetery",type:"surface","source-layer":"landuse",filter:["in","class","cemetery","grave_yard"],paint:{color:"#d6dfc8",material:"flat",sideShade:.16},elevation:.075,bevel:.1,bevelDrop:.025,cornerRadius:5,cornerSegments:3},{id:"landuse-parking",type:"surface","source-layer":"landuse",filter:["in","class","parking","fuel"],paint:{color:"#e8e4dc",material:"flat",sideShade:.16},cornerRadius:3,cornerSegments:3,elevation:.19,bevel:.1,bevelDrop:.02},{id:"park",type:"surface","source-layer":"park",paint:{color:"#cfe5bd",opacity:.75,material:"flat",sideShade:.16},elevation:.15,bevel:.125,bevelDrop:.038,cornerRadius:9,cornerSegments:4},{id:"aeroway-area",type:"surface","source-layer":"aeroway",filter:["in","class","aerodrome","apron","helipad"],paint:{color:"#e4e2e6",material:"flat",sideShade:.16},cornerRadius:5,cornerSegments:3,elevation:.065,bevel:.1,bevelDrop:.02},{id:"water",type:"surface","source-layer":"water",filter:["!in","class","swimming_pool"],paint:{color:"#a5cbe3",material:"water",materialScale:14,materialSpeed:1,sideShade:0},elevation:-0.087,bevel:.2,bevelDrop:.03,cornerRadius:7,cornerSegments:4},{id:"water-pool",type:"surface","source-layer":"water",filter:["==","class","swimming_pool"],paint:{color:"#9fd3e8",material:"water",materialScale:8,materialSpeed:1,sideShade:0},elevation:-0.05,bevel:.1,bevelDrop:.02,cornerRadius:4,cornerSegments:3},{id:"waterway",type:"line","source-layer":"waterway",paint:{color:"#a5cbe3",width:{stops:[[8,.6],[12,1.4],[16,4],[19,11.5],[20,23],[21,46],[22,92]]},material:"water",materialScale:10,materialSpeed:1,elevation:-0.075}},{id:"aeroway-line",type:"line","source-layer":"aeroway",filter:["in","class","runway","taxiway"],paint:{color:"#d8d5da",width:{stops:[[10,1],[14,5],[18,24],[19,24],[20,48],[21,96],[22,192]]},material:"flat",elevation:.02}},{id:"road-casing-major",type:"line","source-layer":"transportation",filter:["in","class","motorway","trunk","primary"],minzoom:5,paint:{color:"#d4ab68",width:{stops:[[6,1.6],[10,3.4],[14,8],[16,14],[18,30],[19,45],[20,90],[21,180],[22,360]]},elevation:.037,widthFromData:true,widthExtra:2.5}},{id:"road-casing-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#c6bca6",width:{stops:[[10,1.6],[14,5.5],[16,10],[18,22],[19,33],[20,66],[21,132],[22,264]]},elevation:.033,widthFromData:true,widthExtra:2}},{id:"road-casing-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#cdc4b2",width:{stops:[[13,1.4],[16,6],[18,14],[19,22],[20,44],[21,88],[22,176]]},elevation:.028,widthFromData:true,widthExtra:1.5}},{id:"road-rail",type:"line","source-layer":"transportation",filter:["in","class","rail","transit"],minzoom:10,paint:{color:"#b2a99e",width:{stops:[[10,.8],[14,1.8],[18,4],[19,5.5],[20,11],[21,22],[22,44]]},elevation:.03}},{id:"road-path",type:"line","source-layer":"transportation",filter:["in","class","path","pedestrian","footway","steps"],minzoom:14,paint:{color:"#bdb2a0",width:{stops:[[14,.8],[17,2],[19,4],[20,8],[21,16],[22,32]]},dashArray:[4,3],material:"flat",elevation:.013}},{id:"road-minor",type:"line","source-layer":"transportation",filter:["in","class","minor","service","track"],minzoom:12,paint:{color:"#ffffff",width:{stops:[[13,.6],[16,4],[18,11],[19,18],[20,36],[21,72],[22,144]]},material:"flat",elevation:.035,widthFromData:true}},{id:"road-ramp",type:"line","source-layer":"transportation",filter:["all",["in","class","motorway","trunk","primary"],["has","ramp"]],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"flat",elevation:.045,widthFromData:true}},{id:"road-secondary",type:"line","source-layer":"transportation",filter:["in","class","secondary","tertiary"],minzoom:9,paint:{color:"#ffffff",width:{stops:[[10,.8],[14,3.6],[16,7.5],[18,18],[19,28],[20,56],[21,112],[22,224]]},material:"flat",elevation:.04,widthFromData:true}},{id:"road-major",type:"line","source-layer":"transportation",filter:["all",["in","class","motorway","trunk","primary"],["!has","ramp"]],minzoom:5,paint:{color:"#ffdfa3",width:{stops:[[6,.8],[10,2.2],[14,6],[16,11],[18,25],[19,38.5],[20,77],[21,154],[22,308]]},material:"flat",elevation:.045,widthFromData:true}},{id:"road-lane-divider-major",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","motorway","trunk","primary"]],minzoom:16.5,paint:{color:"#e3bd7f",width:{stops:[[16.5,.54],[17,.78],[18,1.4],[19,2.17],[20,4.34],[21,8.68],[22,17.36]]},dashArray:[7,18],material:"flat",elevation:.047}},{id:"road-lane-divider-secondary",type:"line","source-layer":"transportation",filter:["all",["!has","oneway"],["in","class","secondary","tertiary"]],minzoom:16.5,paint:{color:"#d8cfbc",width:{stops:[[16.5,.46],[17,.67],[18,1.2],[19,1.86],[20,3.72],[21,7.44],[22,14.88]]},dashArray:[7,18],material:"flat",elevation:.042}},{id:"boundary",type:"line","source-layer":"boundary",filter:["<=","admin_level",4],paint:{color:"#b3a6b8",opacity:.7,width:{stops:[[4,.7],[10,1.4],[16,2.4]]},dashArray:[6,4]}},{id:"building",type:"fill-extrusion","source-layer":"building",minzoom:15,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,heightScale:{stops:[[15,0],[15.8,1]]},aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35},cornerRadius:1.6,cornerSegments:2},{id:"indoor-venue",type:"fill-extrusion",source:"indoor","source-layer":"area",filter:["all",["==","class","level"],["==","base",1]],minzoom:15,maxzoom:16,paint:{color:"#d8d3c8",roofColor:"#d9d3c7",opacity:1,aoStrength:.18,tintVariation:.06,windowColor:"#7f9ab5",windowFrameColor:"#e9e5dc",windowGlow:0,facadeDetail:1,floorHeight:3.2,roofVariation:.35}},{id:"road-closed-casing",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#ffffff",width:{stops:[[11,4],[14,6],[17,10],[19,16],[20,32],[21,64],[22,128]]},opacity:.9},overlay:true},{id:"road-closed",type:"line",source:"closures","source-layer":"closures",minzoom:11,paint:{color:"#d92b2b",width:{stops:[[11,2.5],[14,4],[17,7],[19,11],[20,22],[21,44],[22,88]]},dashArray:[5,4]},overlay:true},{id:"road-closed-end",type:"symbol",source:"closures","source-layer":"closure_ends",minzoom:13,layout:{iconImage:"road_closed",iconFrame:"circle",iconFrameScale:1.6,allowOverlap:true,priority:6},paint:{color:"#d92b2b",frameColor:"#d92b2b",frameOpacity:1,frameHaloColor:"#ffffff",frameHaloWidth:1.4,iconColor:"#ffffff",iconHaloWidth:0,iconSize:13}},{id:"crossing",type:"surface",weld:0,source:"points","source-layer":"crossings",minzoom:16.5,overlay:true,paint:{color:"#ffffff",opacity:.9,sideShade:.16,material:"flat"},elevation:.023,bevel:.013,bevelDrop:.005,groundBy:{"landcover:wood":.175,"landcover:forest":.175,"landcover:grass":.125,"landcover:farmland":.125,"landcover:meadow":.125,"landcover:sand":.035,"landcover:beach":.035,"landcover:wetland":.045,"landcover:swamp":.045,"landuse:residential":.02,"landuse:suburb":.02,"landuse:neighbourhood":.02,"landuse:quarter":.02,"landuse:industrial":.03,"landuse:quarry":.03,"landuse:railway":.03,"landuse:substation":.03,"landuse:school":.055,"landuse:university":.055,"landuse:college":.055,"landuse:hospital":.055,"landuse:clinic":.055,"landuse:police":.055,"landuse:kindergarten":.055,"landuse:bus_station":.055,"landuse:pitch":.088,"landuse:stadium":.088,"landuse:playground":.088,"landuse:track":.088,"landuse:swimming_pool":.088,"landuse:cemetery":.075,"landuse:grave_yard":.075,"landuse:parking":.19,"landuse:fuel":.19,"park:park":.15,"aeroway:aerodrome":.065,"aeroway:apron":.065,"aeroway:helipad":.065}},{id:"housenumber",type:"symbol","source-layer":"housenumber",minzoom:17,layout:{textField:"{housenumber}",textSize:{stops:[[17,9],[19,11]]},maxLineChars:6,priority:-60},paint:{color:"#8c8478",haloColor:"#f5f3ee",haloWidth:1}},{id:"poi-food",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c2681c",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c2681c",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream"]},{id:"poi-shop",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#2f77c4",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#2f77c4",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle"]},{id:"poi-transport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3b82a6",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3b82a6",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport"]},{id:"poi-health",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#c24444",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#c24444",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pharmacy","hospital","doctors","dentist","veterinary"]},{id:"poi-education",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#3f7f7a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#3f7f7a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","school","college","university","library","kindergarten"]},{id:"poi-culture",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#8b5aa5",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#8b5aa5",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information"]},{id:"poi-sport",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4f8b45",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4f8b45",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running"]},{id:"poi-lodging",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#7a5fbf",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#7a5fbf",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","lodging"]},{id:"poi-service",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#59636e",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#59636e",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["in","class","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"poi",type:"symbol","source-layer":"poi",minzoom:15,layout:{textField:["{name:ru}","{name}"],iconImage:"{class}",textSize:{stops:[[15,10.5],[18,12.5]]},iconSize:{stops:[[15,13],[18,16]]},iconTextGap:2,maxLineChars:14,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:1,frameColor:"#4a4a4a",frameHaloColor:"#ffffff",frameHaloWidth:1.2,iconColor:"#ffffff",iconHaloWidth:0},filter:["!in","class","cafe","restaurant","fast_food","bar","pub","beer","bakery","ice_cream","shop","clothing_store","grocery","alcohol_shop","music","laundry","hairdresser","car","bicycle","bus","railway","parking","fuel","bicycle_parking","bicycle_rental","taxi","airport","pharmacy","hospital","doctors","dentist","veterinary","school","college","university","library","kindergarten","museum","theatre","cinema","art_gallery","attraction","monument","zoo","theme_park","castle","place_of_worship","information","pitch","park","garden","playground","stadium","sports_centre","swimming_pool","athletics","running","lodging","bank","atm","post","office","town_hall","police","fire_station","toilets"]},{id:"traffic-signal",type:"symbol",source:"points","source-layer":"roadpoints",minzoom:16,filter:["==","kind","traffic_signals"],layout:{iconImage:"traffic_signals",priority:3},paint:{color:"#5c6470",haloColor:"#ffffff",haloWidth:1.4,iconSize:15}},{id:"road-shield",type:"symbol","source-layer":"transportation_name",filter:["has","ref"],minzoom:11,layout:{textField:"{ref}",iconImage:"shield-{ref_length}",iconPlacement:"behind",textSize:{stops:[[11,9.5],[16,11]]},iconTextGap:4,maxLineChars:10,collisionPadding:70,priority:3},paint:{color:"#3a4048",haloColor:"#f7f3e8",haloWidth:.5,iconColor:"#f7f3e8",iconHaloColor:"#8a8172",iconHaloWidth:1.4}},{id:"road-label",type:"symbol","source-layer":"transportation_name",minzoom:14,layout:{textField:["{name:ru}","{name}"],textPlacement:"line",textSize:{stops:[[14,10],[18,13]]},priority:20,abbreviate:true},paint:{color:"#5c5646",haloColor:"#ffffff",haloWidth:1.6}},{id:"water-label",type:"symbol","source-layer":"water_name",minzoom:10,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[10,11],[16,14]]},priority:30},paint:{color:"#3d7ea6",haloColor:"#ffffff",haloWidth:1.4}},{id:"place-label",type:"symbol","source-layer":"place",minzoom:4,layout:{textField:["{name:ru}","{name}"],textSize:{stops:[[6,12],[12,17],[16,22]]},maxLineChars:16,priority:90},paint:{color:"#3a3a3a",haloColor:"#ffffff",haloWidth:1.8}},{id:"indoor-shell",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","level"],minzoom:16,paint:{color:"#f6f3ec",opacity:.97},clipToTile:true},{id:"indoor-corridor",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","corridor"],minzoom:16,paint:{color:"#ffffff"},clipToTile:true},{id:"indoor-room",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["in","class","room","area"],minzoom:16,paint:{color:"#efeae0"},clipToTile:true},{id:"indoor-service",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","service"],minzoom:16,paint:{color:"#e6e1d6"},clipToTile:true},{id:"indoor-shop",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","shop"],minzoom:16,paint:{color:"#e8e0f0"},clipToTile:true},{id:"indoor-food",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","food"],minzoom:16,paint:{color:"#f7e3cd"},clipToTile:true},{id:"indoor-wc",type:"fill",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wc"],minzoom:16,paint:{color:"#d8e8f2"},clipToTile:true},{id:"indoor-wall",type:"fill-extrusion",source:"indoor","source-layer":"area",splitBy:"level",filter:["==","class","wall"],minzoom:16,paint:{color:"#cbc4b8",roofColor:"#e4ded2",facadeDetail:0,tintVariation:0,roofVariation:0,aoStrength:0}},{id:"indoor-transportation",type:"fill",source:"indoor","source-layer":"transportation",splitBy:"level",minzoom:16,paint:{color:"#d9d2e8",opacity:.95},clipToTile:true},{id:"indoor-door",type:"symbol",source:"indoor","source-layer":"poi",filter:["==","class","door"],splitBy:"level",minzoom:18,layout:{iconImage:"door",iconSize:{stops:[[18,9],[20,13]]},allowOverlap:true,priority:-10},paint:{color:"#8a8172",haloColor:"#ffffff",haloWidth:1.2}},{id:"indoor-poi",type:"symbol",source:"indoor","source-layer":"poi",splitBy:"level",minzoom:17,layout:{textField:["{name}"],iconImage:"{class}",textSize:{stops:[[17,10],[19,12]]},iconSize:{stops:[[17,12],[19,15]]},iconTextGap:2,iconFrame:"circle",iconFrameScale:1.55},paint:{color:"#4a4a4a",haloColor:"#ffffff",haloWidth:1.3,frameOpacity:.32}},{id:"indoor-name",type:"symbol",source:"indoor","source-layer":"area_name",splitBy:"level",minzoom:17,layout:{textField:["{name}"],textSize:{stops:[[17,10.5],[19,12.5]]},maxLineChars:8},paint:{color:"#3c3830",haloColor:"#ffffff",haloWidth:1.4}},{id:"building-entrance",type:"symbol",source:"points","source-layer":"entrances",minzoom:17,layout:{iconImage:"entrance",showFor:"highlight",textField:["{ref}"],textSize:{stops:[[17,10],[19,12.5]]},allowOverlap:true,priority:40,iconRotate:"angle",placement:"map",arrowLength:{stops:[[17,22],[18,32],[19,40],[20,48],[22,56]]},arrowWidth:{stops:[[17,6],[18,8.5],[19,10.5],[20,12.5],[22,15]]},arrowOutline:{stops:[[17,1.4],[18,2],[19,2.5],[20,3],[22,3.5]]},arrowGap:{stops:[[17,14],[18,19],[19,23],[20,27],[22,31]]},arrowUnits:"pixels",iconTextGap:3,arrowDotRadius:{stops:[[17,2.2],[18,3.2],[19,4],[20,4.8],[22,5.6]]},arrowDotGap:{stops:[[17,5],[18,7],[19,9],[20,11],[22,12.5]]}},paint:{color:"#2d6ecb",haloColor:"#ffffff",haloWidth:1.6}}],sources:{indoor:{url:"/tileserver/data/indoor/{z}/{x}/{y}.pbf",minzoom:15,maxzoom:18},points:{url:"/tileserver/data/points/{z}/{x}/{y}.pbf",minzoom:13,maxzoom:16},closures:{url:"/tileserver/data/closures/{z}/{x}/{y}.pbf",minzoom:10,maxzoom:16}}};var ja={name:"\u041D\u043E\u0447\u043D\u0430\u044F",background:"#11151c",model3dKey:"night",light:{ambientColor:"#8fa3c4",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#cfd8ea",keyIntensity:.3,fillAzimuth:300,fillAltitude:20,fillColor:"#4a5f86",fillIntensity:.22},paint:{"landcover-wood":{color:"#16261a"},"landcover-grass":{color:"#182619"},"landcover-sand":{color:"#2a2417"},"landcover-ice":{color:"#1b2730"},"landcover-wetland":{color:"#16242a"},"landuse-residential":{color:"#171b23"},"landuse-industrial":{color:"#1b1c20"},"landuse-civic":{color:"#1c1f28"},"landuse-sport":{color:"#16261c"},"landuse-cemetery":{color:"#182018"},"landuse-parking":{color:"#191d24"},park:{color:"#15271a"},"aeroway-area":{color:"#1b1e26"},water:{color:"#0f2438"},"water-pool":{color:"#123048"},waterway:{color:"#14304a"},"aeroway-line":{color:"#242833"},"road-casing-major":{color:"#2a2519"},"road-casing-secondary":{color:"#22262f"},"road-casing-minor":{color:"#1e222a"},"road-rail":{color:"#333842"},"road-path":{color:"#2a2e36"},"road-minor":{color:"#2f343d"},"road-secondary":{color:"#3c424d"},"road-ramp":{color:"#6b5c3c"},"road-major":{color:"#6b5c3c"},boundary:{color:"#4a3f52"},building:{color:"#232833",roofColor:"#2b313d",aoStrength:.3,tintVariation:.1,windowColor:"#8fb8e8",windowFrameColor:"#39424f",windowGlow:.35},housenumber:{color:"#5f6672",haloColor:"#12161d"},poi:{color:"#c3ccd9",haloColor:"#12161d",haloWidth:1.3},"road-label":{color:"#a8b0bd",haloColor:"#12161d",haloWidth:1.5},"water-label":{color:"#6ea2c7",haloColor:"#0e1b28"},"place-label":{color:"#e2e7ee",haloColor:"#10141b",haloWidth:2},"poi-food":{color:"#d89964",haloColor:"#12161d",haloWidth:1.3,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#12161d",haloWidth:1.3,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#12161d",haloWidth:1.3,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#12161d",haloWidth:1.3,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#12161d",haloWidth:1.3,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#12161d",haloWidth:1.3,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#12161d",haloWidth:1.3,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#12161d",haloWidth:1.3,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#12161d",haloWidth:1.3,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#12161d",iconColor:"#1b1b1b",iconHaloWidth:0},"building-entrance":{color:"#79a0d7",haloColor:"#12161d"},"indoor-shell":{color:"#3a4254",opacity:.97},"indoor-corridor":{color:"#363d4e"},"indoor-room":{color:"#414a5f"},"indoor-service":{color:"#535f79"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#697183",roofColor:"#868c99",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#65548a",opacity:.95},"indoor-door":{color:"#c3ccd9",haloColor:"#12161d",haloWidth:1.3},"indoor-poi":{color:"#c3ccd9",haloColor:"#12161d",haloWidth:1.3},"indoor-name":{color:"#e2e7ee",haloColor:"#10141b",haloWidth:2}},sky:{skyColor:"#080d18",horizonColor:"#1b2436",fogRange:[1.3,6.5],fogIntensity:.9,spaceColor:"#02030a",atmosphereColor:"#3f6fa8",starIntensity:.8}};var Ya={name:"\u0413\u0440\u0430\u0444\u0438\u0442",background:"#eeeeee",light:{ambientColor:"#ffffff",ambientIntensity:.55,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.5,fillAzimuth:300,fillAltitude:25,fillColor:"#ffffff",fillIntensity:.16},paint:{"landcover-wood":{color:"#e2e2e2"},"landcover-grass":{color:"#e7e7e7"},"landcover-sand":{color:"#eaeaea"},"landcover-ice":{color:"#f0f0f0"},"landcover-wetland":{color:"#e4e4e4"},"landuse-residential":{color:"#e9e9e9"},"landuse-industrial":{color:"#e5e5e5"},"landuse-civic":{color:"#ebebeb"},"landuse-sport":{color:"#e4e4e4"},"landuse-cemetery":{color:"#e6e6e6"},"landuse-parking":{color:"#ececec"},park:{color:"#e3e3e3"},"aeroway-area":{color:"#e8e8e8"},water:{color:"#d4d4d4"},"water-pool":{color:"#d8d8d8"},waterway:{color:"#d4d4d4"},"aeroway-line":{color:"#dedede"},"road-casing-major":{color:"#c9c9c9"},"road-casing-secondary":{color:"#d2d2d2"},"road-casing-minor":{color:"#d8d8d8"},"road-rail":{color:"#c2c2c2"},"road-path":{color:"#d0d0d0"},"road-minor":{color:"#f7f7f7"},"road-secondary":{color:"#fbfbfb"},"road-ramp":{color:"#ffffff"},"road-major":{color:"#ffffff"},boundary:{color:"#b0b0b0"},building:{color:"#dcdcdc",roofColor:"#e0e0e0",aoStrength:.22,tintVariation:.05,windowColor:"#b7bcc2",windowFrameColor:"#f2f2f2",windowGlow:0},housenumber:{color:"#9a9a9a",haloColor:"#f4f4f4"},poi:{color:"#3c3c3c",haloColor:"#ffffff"},"road-label":{color:"#585858",haloColor:"#ffffff"},"water-label":{color:"#6e6e6e",haloColor:"#ffffff"},"place-label":{color:"#2a2a2a",haloColor:"#ffffff"},"poi-food":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{color:"#3c3c3c",haloColor:"#ffffff",frameColor:"#3c3c3c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"building-entrance":{color:"#564e4e",haloColor:"#ffffff"},"indoor-shell":{color:"#e9e9e9",opacity:.97},"indoor-corridor":{color:"#eeeeee"},"indoor-room":{color:"#e2e2e2"},"indoor-service":{color:"#cecece"},"indoor-shop":{color:"#d7cfdf"},"indoor-food":{color:"#dfd7cf"},"indoor-wc":{color:"#cfd9df"},"indoor-wall":{color:"#c0c0c0",roofColor:"#d4d4d4",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#c2bbd1",opacity:.95},"indoor-door":{color:"#3c3c3c",haloColor:"#ffffff"},"indoor-poi":{color:"#3c3c3c",haloColor:"#ffffff"},"indoor-name":{color:"#2a2a2a",haloColor:"#ffffff"}},sky:{skyColor:"#8f96a0",horizonColor:"#d7dade",fogRange:[1.35,7.5],fogIntensity:.9,spaceColor:"#07080b",atmosphereColor:"#9aa3ad",starIntensity:.5}};var Za={name:"\u0411\u043B\u0435\u0434\u043D\u0430\u044F",background:"#f7f6f3",light:{ambientColor:"#ffffff",ambientIntensity:.62,keyAzimuth:120,keyAltitude:65,keyColor:"#fffaf0",keyIntensity:.38,fillAzimuth:300,fillAltitude:25,fillColor:"#eef2f8",fillIntensity:.14},paint:{"landcover-wood":{color:"#e8efe2"},"landcover-grass":{color:"#edf2e6"},"landcover-sand":{color:"#f4eede"},"landcover-ice":{color:"#f0f5f7"},"landcover-wetland":{color:"#e8f0ec"},"landuse-residential":{color:"#f2f0ec"},"landuse-industrial":{color:"#f0edeb"},"landuse-civic":{color:"#f4efe9"},"landuse-sport":{color:"#e9f1e4"},"landuse-cemetery":{color:"#ecefe6"},"landuse-parking":{color:"#f3f1ed"},park:{color:"#e7f0df"},"aeroway-area":{color:"#f0f0f2"},water:{color:"#dce9f2"},"water-pool":{color:"#dcecf5"},waterway:{color:"#dce9f2"},"aeroway-line":{color:"#ebebee"},"road-casing-major":{color:"#efe4d2"},"road-casing-secondary":{color:"#eceae2"},"road-casing-minor":{color:"#efedE6"},"road-rail":{color:"#e0dcd6"},"road-path":{color:"#e6e2da"},"road-minor":{color:"#fdfcfa"},"road-secondary":{color:"#ffffff"},"road-ramp":{color:"#fff8e8"},"road-major":{color:"#fff8e8"},boundary:{color:"#cfc3d2"},building:{color:"#eae7e0",roofColor:"#ecE9e2",aoStrength:.14,tintVariation:.04,windowColor:"#c7d6e4",windowFrameColor:"#f6f7f9",windowGlow:0},housenumber:{color:"#a9a296",haloColor:"#fbfaf7"},poi:{color:"#6b6b6b",haloColor:"#ffffff"},"road-label":{color:"#8a8474",haloColor:"#ffffff"},"water-label":{color:"#7ea8c4",haloColor:"#ffffff"},"place-label":{color:"#55524c",haloColor:"#ffffff"},"poi-food":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{color:"#6b6b6b",haloColor:"#ffffff",frameColor:"#6b6b6b",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"building-entrance":{color:"#564e4e",haloColor:"#ffffff"},"indoor-shell":{color:"#f4f3f0",opacity:.97},"indoor-corridor":{color:"#f8f7f6"},"indoor-room":{color:"#edece8"},"indoor-service":{color:"#dcd9d1"},"indoor-shop":{color:"#e0dae6"},"indoor-food":{color:"#e6e0da"},"indoor-wc":{color:"#dae1e6"},"indoor-wall":{color:"#cdcbc4",roofColor:"#e0dedb",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#ccc5d9",opacity:.95},"indoor-door":{color:"#6b6b6b",haloColor:"#ffffff"},"indoor-poi":{color:"#6b6b6b",haloColor:"#ffffff"},"indoor-name":{color:"#55524c",haloColor:"#ffffff"}},sky:{skyColor:"#c8dbee",horizonColor:"#eef2f6",fogRange:[1.4,9],fogIntensity:.85,spaceColor:"#0a1018",atmosphereColor:"#9fd0ff",starIntensity:.45}};var Qa={name:"\u041E\u0431\u044A\u0451\u043C\u043D\u0430\u044F",background:"#f0ecea",light:{ambientColor:"#f8f8f8",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee8ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#9bda95"},"landcover-grass":{color:"#b2e6a8"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#d5e8f1"},"landcover-wetland":{color:"#badbde"},"landuse-residential":{color:"#f4f2f1"},"landuse-industrial":{color:"#dadce7"},"landuse-civic":{color:"#ecdae0"},"landuse-sport":{color:"#bbeba2"},"landuse-cemetery":{color:"#c2e2bb"},"landuse-parking":{color:"#e0dddc"},park:{color:"#b2e6a8"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#94d8f9"},waterway:{color:"#94d8f9"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#8997b3"},"road-casing-secondary":{color:"#9da7be"},"road-casing-minor":{color:"#9da7be"},"road-rail":{color:"#9e9e9e"},"road-path":{color:"#bbc1d3"},"road-minor":{color:"#bbc1d3"},"road-secondary":{color:"#bbc1d3"},"road-ramp":{color:"#99abc2"},"road-major":{color:"#99abc2"},boundary:{color:"#f66f91"},building:{color:"#ede7de",roofColor:"#ede7de",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#eef0f4",windowGlow:0},housenumber:{color:"#2e2e2e",haloColor:"#ffffff",haloWidth:1.4},poi:{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"road-label":{color:"#2e2e2e",haloColor:"#ffffff",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#2e2e2e",haloColor:"#ffffff",haloWidth:1.4},"poi-food":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#a7e1fd"},"indoor-shell":{color:"#f4f3f1",opacity:.97},"indoor-corridor":{color:"#f8f8f6"},"indoor-room":{color:"#eeece8"},"indoor-service":{color:"#ddd8d2"},"indoor-shop":{color:"#e0dae7"},"indoor-food":{color:"#e7e1da"},"indoor-wc":{color:"#dae2e7"},"indoor-wall":{color:"#cecac5",roofColor:"#e0dedc",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#ccc6d9",opacity:.95},"indoor-door":{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"indoor-poi":{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"indoor-name":{color:"#2e2e2e",haloColor:"#ffffff",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#ffffff"}},sky:{skyColor:"#91b8cb",horizonColor:"#dfd9d6",fogRange:[1.34,7.36],fogIntensity:.86,spaceColor:"#0e0b0a",atmosphereColor:"#5daad0",starIntensity:.38}};var qa={name:"\u041C\u0443\u043B\u044C\u0442\u044F\u0448\u043D\u0430\u044F",background:"#f7f3de",light:{ambientColor:"#f8f7f7",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee8ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#61d161"},"landcover-grass":{color:"#91e481"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#c7dfeb"},"landcover-wetland":{color:"#9fccd1"},"landuse-residential":{color:"#f2ecd9"},"landuse-industrial":{color:"#d7d9e4"},"landuse-civic":{color:"#ead7dd"},"landuse-sport":{color:"#9fec79"},"landuse-cemetery":{color:"#a8d69f"},"landuse-parking":{color:"#dddcda"},park:{color:"#91e481"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#71c8f4"},waterway:{color:"#71c8f4"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#ca6a16"},"road-casing-secondary":{color:"#5a6faf"},"road-casing-minor":{color:"#5a6faf"},"road-rail":{color:"#737373"},"road-path":{color:"#ffffff"},"road-minor":{color:"#ffffff"},"road-secondary":{color:"#ffffff"},"road-ramp":{color:"#f8c662"},"road-major":{color:"#f8c662"},boundary:{color:"#f6517a"},building:{color:"#f4dfc2",roofColor:"#f4dfc2",aoStrength:.19,tintVariation:.06,windowColor:"#5b9ee0",windowFrameColor:"#ffffff",windowGlow:0},housenumber:{color:"#222b59",haloColor:"#ffffff",haloWidth:1.4},poi:{color:"#f05a0f",haloColor:"#ffffff",haloWidth:1.4},"road-label":{color:"#222b59",haloColor:"#ffffff",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#222b59",haloColor:"#ffffff",haloWidth:1.4},"poi-food":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#80d1fa"},"indoor-shell":{color:"#ebe9e5",opacity:.97},"indoor-corridor":{color:"#efedea"},"indoor-room":{color:"#e5e1dc"},"indoor-service":{color:"#d4cec6"},"indoor-shop":{color:"#d6cede"},"indoor-food":{color:"#ded6ce"},"indoor-wc":{color:"#ced8de"},"indoor-wall":{color:"#c4c0ba",roofColor:"#d6d4d0",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#c1b9d1",opacity:.95},"indoor-door":{color:"#f05a0f",haloColor:"#ffffff",haloWidth:1.4},"indoor-poi":{color:"#f05a0f",haloColor:"#ffffff",haloWidth:1.4},"indoor-name":{color:"#222b59",haloColor:"#ffffff",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#ffffff"}},sky:{skyColor:"#8cb5c9",horizonColor:"#e8e2c7",fogRange:[1.34,7.35],fogIntensity:.86,spaceColor:"#131105",atmosphereColor:"#5ca9d0",starIntensity:.39}};var $a={name:"\u041A\u0438\u0431\u0435\u0440\u043F\u0430\u043D\u043A",background:"#120817",model3dKey:"night",light:{ambientColor:"#b279cf",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#ff70d0",keyIntensity:.28,fillAzimuth:300,fillAltitude:25,fillColor:"#854770",fillIntensity:.22},paint:{"landcover-wood":{color:"#0c3728"},"landcover-grass":{color:"#104131"},"landcover-sand":{color:"#262417"},"landcover-ice":{color:"#74345f"},"landcover-wetland":{color:"#152223"},"landuse-residential":{color:"#170b1e"},"landuse-industrial":{color:"#171921"},"landuse-civic":{color:"#21171a"},"landuse-sport":{color:"#0c4529"},"landuse-cemetery":{color:"#151e1b"},"landuse-parking":{color:"#272428"},park:{color:"#104131"},"aeroway-area":{color:"#1a1c23"},water:{color:"#5f1145"},waterway:{color:"#711452"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#981662"},"road-casing-secondary":{color:"#6a1b6a"},"road-casing-minor":{color:"#6a1b6a"},"road-rail":{color:"#39acac"},"road-path":{color:"#12e2e2"},"road-minor":{color:"#12e2e2"},"road-secondary":{color:"#12e2e2"},"road-ramp":{color:"#f631a4"},"road-major":{color:"#f631a4"},boundary:{color:"#f53da8"},building:{color:"#311839",roofColor:"#9d2575",aoStrength:.29,tintVariation:.1,windowColor:"#84dcff",windowFrameColor:"#84dcff",windowGlow:.5},housenumber:{color:"#acf6f6",haloColor:"#110514",haloWidth:1.4},poi:{color:"#f6e95a",haloColor:"#110514",haloWidth:1.4},"road-label":{color:"#acf6f6",haloColor:"#110514",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#acf6f6",haloColor:"#110514",haloWidth:1.4},"poi-food":{color:"#d89964",haloColor:"#110514",haloWidth:1.4,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#110514",haloWidth:1.4,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#110514",haloWidth:1.4,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#110514",haloWidth:1.4,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#110514",haloWidth:1.4,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#110514",haloWidth:1.4,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#110514",haloWidth:1.4,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#110514",haloWidth:1.4,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#110514",haloWidth:1.4,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#110514",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#84135f"},"indoor-shell":{color:"#4c3752",opacity:.97},"indoor-corridor":{color:"#46334c"},"indoor-room":{color:"#553e5d"},"indoor-service":{color:"#6e5078"},"indoor-shop":{color:"#59446f"},"indoor-food":{color:"#6f5a44"},"indoor-wc":{color:"#445e6f"},"indoor-wall":{color:"#7b6681",roofColor:"#938298",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#635287",opacity:.95},"indoor-door":{color:"#f6e95a",haloColor:"#110514",haloWidth:1.4},"indoor-poi":{color:"#f6e95a",haloColor:"#110514",haloWidth:1.4},"indoor-name":{color:"#acf6f6",haloColor:"#110514",haloWidth:1.4},"building-entrance":{color:"#79a0d7",haloColor:"#110514"}},sky:{skyColor:"#180813",horizonColor:"#281831",fogRange:[1.3,6.5],fogIntensity:.9,spaceColor:"#060308",atmosphereColor:"#b5358b",starIntensity:.82}};var el={name:"\u0420\u0430\u0441\u0441\u0432\u0435\u0442",background:"#f4ebe1",light:{ambientColor:"#f8f7f7",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffe0c0",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee7ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#a4db9f"},"landcover-grass":{color:"#bae7b1"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#dbe7f0"},"landcover-wetland":{color:"#c1dee1"},"landuse-residential":{color:"#f5efeb"},"landuse-industrial":{color:"#d7d9e4"},"landuse-civic":{color:"#ead7dd"},"landuse-sport":{color:"#c1ecac"},"landuse-cemetery":{color:"#c8e5c2"},"landuse-parking":{color:"#dddbda"},park:{color:"#bae7b1"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#a6d2f2"},waterway:{color:"#a6d2f2"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#92a1bf"},"road-casing-secondary":{color:"#a6afc9"},"road-casing-minor":{color:"#a6afc9"},"road-rail":{color:"#b5a49b"},"road-path":{color:"#c3c9df"},"road-minor":{color:"#c3c9df"},"road-secondary":{color:"#c3c9df"},"road-ramp":{color:"#a9b9d1"},"road-major":{color:"#a9b9d1"},boundary:{color:"#f584a1"},building:{color:"#f6ebdf",roofColor:"#fdede7",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#f0ece8",windowGlow:0},housenumber:{color:"#46332a",haloColor:"#fdfaf7",haloWidth:1.4},poi:{color:"#56738f",haloColor:"#fdfaf7",haloWidth:1.4},"road-label":{color:"#46332a",haloColor:"#fdfaf7",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#46332a",haloColor:"#fdfaf7",haloWidth:1.4},"poi-food":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#fdfaf7",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#fdfaf7",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#b9ddf7"},"indoor-shell":{color:"#f8f7f5",opacity:.97},"indoor-corridor":{color:"#fcfbfb"},"indoor-room":{color:"#f1efed"},"indoor-service":{color:"#e0dbd6"},"indoor-shop":{color:"#e4dfea"},"indoor-food":{color:"#eae4df"},"indoor-wc":{color:"#dfe5ea"},"indoor-wall":{color:"#d1cdc9",roofColor:"#e4e2e0",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#d0cbdc",opacity:.95},"indoor-door":{color:"#56738f",haloColor:"#fdfaf7",haloWidth:1.4},"indoor-poi":{color:"#56738f",haloColor:"#fdfaf7",haloWidth:1.4},"indoor-name":{color:"#46332a",haloColor:"#fdfaf7",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#fdfaf7"}},sky:{skyColor:"#8cb0c9",horizonColor:"#e4d7cb",fogRange:[1.34,7.35],fogIntensity:.86,spaceColor:"#120c07",atmosphereColor:"#5c9fd0",starIntensity:.39}};var tl={name:"\u0421\u0443\u043C\u0435\u0440\u043A\u0438",background:"#d7cbc1",light:{ambientColor:"#ececeb",ambientIntensity:.46,keyAzimuth:120,keyAltitude:59,keyColor:"#ffcaa0",keyIntensity:.56,fillAzimuth:300,fillAltitude:25,fillColor:"#c7d0e1",fillIntensity:.19},paint:{"landcover-wood":{color:"#75af6a"},"landcover-grass":{color:"#94bd7f"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#c1c8d7"},"landcover-wetland":{color:"#83bec3"},"landuse-residential":{color:"#d5cac3"},"landuse-industrial":{color:"#b3b7cc"},"landuse-civic":{color:"#d5aebb"},"landuse-sport":{color:"#91c775"},"landuse-cemetery":{color:"#9ac982"},"landuse-parking":{color:"#c0bcb9"},park:{color:"#94bd7f"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#708bc2"},waterway:{color:"#708bc2"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#6a5b9a"},"road-casing-secondary":{color:"#7078a4"},"road-casing-minor":{color:"#7078a4"},"road-rail":{color:"#93796c"},"road-path":{color:"#8f94b7"},"road-minor":{color:"#8f94b7"},"road-secondary":{color:"#8f94b7"},"road-ramp":{color:"#8576b2"},"road-major":{color:"#8576b2"},boundary:{color:"#e05275"},building:{color:"#e0d1c2",roofColor:"#f1d6cb",aoStrength:.2,tintVariation:.07,windowColor:"#6b9ed1",windowFrameColor:"#efe6df",windowGlow:0},housenumber:{color:"#2c283e",haloColor:"#f5ebe0",haloWidth:1.4},poi:{color:"#64568f",haloColor:"#f5ebe0",haloWidth:1.4},"road-label":{color:"#2c283e",haloColor:"#f5ebe0",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#2c283e",haloColor:"#f5ebe0",haloWidth:1.4},"poi-food":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f5ebe0",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f5ebe0",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#7a94ca"},"indoor-shell":{color:"#e3deda",opacity:.97},"indoor-corridor":{color:"#e7e3df"},"indoor-room":{color:"#dcd7d1"},"indoor-service":{color:"#cbc3ba"},"indoor-shop":{color:"#ccc2d6"},"indoor-food":{color:"#d6ccc2"},"indoor-wc":{color:"#c2ced6"},"indoor-wall":{color:"#bbb5af",roofColor:"#cdc9c6",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#b6adc9",opacity:.95},"indoor-door":{color:"#64568f",haloColor:"#f5ebe0",haloWidth:1.4},"indoor-poi":{color:"#64568f",haloColor:"#f5ebe0",haloWidth:1.4},"indoor-name":{color:"#2c283e",haloColor:"#f5ebe0",haloWidth:1.4},"building-entrance":{haloColor:"#f5ebe0"}},sky:{skyColor:"#5675b3",horizonColor:"#c0b4aa",fogRange:[1.33,7.14],fogIntensity:.87,spaceColor:"#0e0b09",atmosphereColor:"#557dce",starIntensity:.45}};var ol={name:"\u0417\u0435\u043C\u043B\u044F",background:"#dbd1bd",light:{ambientColor:"#edecea",ambientIntensity:.46,keyAzimuth:120,keyAltitude:59,keyColor:"#fff2dc",keyIntensity:.56,fillAzimuth:300,fillAltitude:25,fillColor:"#c7d6e1",fillIntensity:.19},paint:{"landcover-wood":{color:"#50a136"},"landcover-grass":{color:"#8ac76b"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#aec5d6"},"landcover-wetland":{color:"#7cbac0"},"landuse-residential":{color:"#ded5c4"},"landuse-industrial":{color:"#b3b7cc"},"landuse-civic":{color:"#d5aebb"},"landuse-sport":{color:"#86d161"},"landuse-cemetery":{color:"#94c67b"},"landuse-parking":{color:"#c0beb9"},park:{color:"#8ac76b"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#3b91ce"},waterway:{color:"#4798d1"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#a47546"},"road-casing-secondary":{color:"#a79376"},"road-casing-minor":{color:"#a79376"},"road-rail":{color:"#877564"},"road-path":{color:"#c6bba9"},"road-minor":{color:"#c6bba9"},"road-secondary":{color:"#c6bba9"},"road-ramp":{color:"#cdaa7a"},"road-major":{color:"#cdaa7a"},boundary:{color:"#bf6a40"},building:{color:"#d4c5af",roofColor:"#d4c5af",aoStrength:.2,tintVariation:.07,windowColor:"#9fb0c0",windowFrameColor:"#eceae4",windowGlow:0},housenumber:{color:"#46382a",haloColor:"#f7f4ee",haloWidth:1.4},poi:{color:"#7c5c3c",haloColor:"#f7f4ee",haloWidth:1.4},"road-label":{color:"#46382a",haloColor:"#f7f4ee",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#46382a",haloColor:"#f7f4ee",haloWidth:1.4},"poi-food":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f7f4ee",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f7f4ee",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#4299d7"},"indoor-shell":{color:"#d6d0c8",opacity:.97},"indoor-corridor":{color:"#d9d5cd"},"indoor-room":{color:"#cfc9bf"},"indoor-service":{color:"#beb5a9"},"indoor-shop":{color:"#bcafca"},"indoor-food":{color:"#cabdaf"},"indoor-wc":{color:"#afbfca"},"indoor-wall":{color:"#ada79e",roofColor:"#bebbb5",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#a69bbc",opacity:.95},"indoor-door":{color:"#7c5c3c",haloColor:"#f7f4ee",haloWidth:1.4},"indoor-poi":{color:"#7c5c3c",haloColor:"#f7f4ee",haloWidth:1.4},"indoor-name":{color:"#46382a",haloColor:"#f7f4ee",haloWidth:1.4},"building-entrance":{haloColor:"#f7f4ee"}},sky:{skyColor:"#568db3",horizonColor:"#c4baa5",fogRange:[1.33,7.14],fogIntensity:.87,spaceColor:"#0f0c08",atmosphereColor:"#559cce",starIntensity:.45}};var rl={name:"\u0424\u0443\u0442\u0443\u0440\u0438\u0437\u043C",background:"#0c0f1d",model3dKey:"night",light:{ambientColor:"#8590c7",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#8ff0ff",keyIntensity:.28,fillAzimuth:300,fillAltitude:25,fillColor:"#477b85",fillIntensity:.22},paint:{"landcover-wood":{color:"#123026"},"landcover-grass":{color:"#18392e"},"landcover-sand":{color:"#2d2a1b"},"landcover-ice":{color:"#276672"},"landcover-wetland":{color:"#192829"},"landuse-residential":{color:"#111422"},"landuse-industrial":{color:"#1b1d27"},"landuse-civic":{color:"#271b1f"},"landuse-sport":{color:"#143d29"},"landuse-cemetery":{color:"#192420"},"landuse-parking":{color:"#292a2e"},park:{color:"#18392e"},"aeroway-area":{color:"#1e2129"},water:{color:"#055261"},waterway:{color:"#076a7e"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#8b238b"},"road-casing-secondary":{color:"#185662"},"road-casing-minor":{color:"#185662"},"road-rail":{color:"#8546a4"},"road-path":{color:"#22b6c3"},"road-minor":{color:"#22b6c3"},"road-secondary":{color:"#22b6c3"},"road-ramp":{color:"#e03ee0"},"road-major":{color:"#e03ee0"},boundary:{color:"#eb47eb"},building:{color:"#1e2b3e",roofColor:"#277686",aoStrength:.29,tintVariation:.1,windowColor:"#84dcff",windowFrameColor:"#bfe6ff",windowGlow:.5},housenumber:{color:"#c6edf1",haloColor:"#080a17",haloWidth:1.4},poi:{color:"#eb84eb",haloColor:"#080a17",haloWidth:1.4},"road-label":{color:"#c6edf1",haloColor:"#080a17",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#c6edf1",haloColor:"#080a17",haloWidth:1.4},"poi-food":{color:"#d89964",haloColor:"#080a17",haloWidth:1.4,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#080a17",haloWidth:1.4,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#080a17",haloWidth:1.4,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#080a17",haloWidth:1.4,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#080a17",haloWidth:1.4,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#080a17",haloWidth:1.4,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#080a17",haloWidth:1.4,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#080a17",haloWidth:1.4,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#080a17",haloWidth:1.4,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#080a17",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#027288"},"indoor-shell":{color:"#394556",opacity:.97},"indoor-corridor":{color:"#354050"},"indoor-room":{color:"#404d60"},"indoor-service":{color:"#52637b"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#687485",roofColor:"#858e9a",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#66558a",opacity:.95},"indoor-door":{color:"#eb84eb",haloColor:"#080a17",haloWidth:1.4},"indoor-poi":{color:"#eb84eb",haloColor:"#080a17",haloWidth:1.4},"indoor-name":{color:"#c6edf1",haloColor:"#080a17",haloWidth:1.4},"building-entrance":{color:"#79a0d7",haloColor:"#080a17"}},sky:{skyColor:"#081619",horizonColor:"#1b1f30",fogRange:[1.3,6.51],fogIntensity:.9,spaceColor:"#030408",atmosphereColor:"#35a1b7",starIntensity:.81}};var nl={name:"\u0421\u0442\u0435\u043A\u043B\u043E \u043C\u044F\u0433\u043A\u043E\u0435",background:"#f2f5f7",light:{ambientColor:"#fbfbfb",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee9ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#bddbc3"},"landcover-grass":{color:"#d0ecda"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#cbebdb"},"landcover-wetland":{color:"#d9ebed"},"landuse-residential":{color:"#f6f7f9"},"landuse-industrial":{color:"#e3e5ed"},"landuse-civic":{color:"#f1e4e8"},"landuse-sport":{color:"#cdefd4"},"landuse-cemetery":{color:"#dbf0e3"},"landuse-parking":{color:"#e4e6e7"},park:{color:"#ccead9"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#b9e5f4"},waterway:{color:"#81c6e4"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#dabc95"},"road-casing-secondary":{color:"#d5cdb8"},"road-casing-minor":{color:"#cad1d8"},"road-rail":{color:"#a5a0b1"},"road-path":{color:"#9fbcad"},"road-minor":{color:"#ffffff"},"road-secondary":{color:"#fbf6ea"},"road-ramp":{color:"#f8e5c3"},"road-major":{color:"#f8e5c3"},boundary:{color:"#ce97c0"},building:{color:"#e5ebf0",roofColor:"#f7fbfd",aoStrength:.18,tintVariation:.06,windowColor:"#bcd4e8",windowFrameColor:"#dfe8f2",windowGlow:0},housenumber:{color:"#4e6779",haloColor:"#fbfdfe",haloWidth:1.4},poi:{color:"#4e6779",haloColor:"#fbfdfe",haloWidth:1.4},"road-label":{color:"#2f3f50",haloColor:"#fbfdfe",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#2f3f50",haloColor:"#fbfdfe",haloWidth:1.4},"poi-food":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#ceeef9"},"indoor-shell":{color:"#f5f7f8",opacity:.97},"indoor-corridor":{color:"#fbfbfc"},"indoor-room":{color:"#edeff1"},"indoor-service":{color:"#d6dce0"},"indoor-shop":{color:"#e4dfea"},"indoor-food":{color:"#eae4df"},"indoor-wc":{color:"#dfe5ea"},"indoor-wall":{color:"#c9ced1",roofColor:"#e0e2e4",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#d0cbdc",opacity:.95},"indoor-door":{color:"#4e6779",haloColor:"#fbfdfe",haloWidth:1.4},"indoor-poi":{color:"#4e6779",haloColor:"#fbfdfe",haloWidth:1.4},"indoor-name":{color:"#2f3f50",haloColor:"#fbfdfe",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#fbfdfe"}},sky:{skyColor:"#9fc5d2",horizonColor:"#dfe3e8",fogRange:[1.35,7.42],fogIntensity:.85,spaceColor:"#090c0f",atmosphereColor:"#5fb3d0",starIntensity:.37}};var il={name:"\u0421\u0442\u0435\u043A\u043B\u043E",background:"#f2f5f7",light:{ambientColor:"#fbfbfb",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee9ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#b8e0cf"},"landcover-grass":{color:"#cbebdb"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#e5f0f3"},"landcover-wetland":{color:"#d6e9eb"},"landuse-residential":{color:"#f6f7f9"},"landuse-industrial":{color:"#e3e5ed"},"landuse-civic":{color:"#f1e4e8"},"landuse-sport":{color:"#c8efd5"},"landuse-cemetery":{color:"#d8eee3"},"landuse-parking":{color:"#e4e6e7"},park:{color:"#cbebdb"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#bee6f4"},waterway:{color:"#bee6f4"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#9dc7dd"},"road-casing-secondary":{color:"#bdcfdb"},"road-casing-minor":{color:"#bdcfdb"},"road-rail":{color:"#adb9c2"},"road-path":{color:"#d6e2eb"},"road-minor":{color:"#d6e2eb"},"road-secondary":{color:"#d6e2eb"},"road-ramp":{color:"#b8daea"},"road-major":{color:"#b8daea"},boundary:{color:"#e28dc6"},building:{color:"#e8eef3",roofColor:"#f4f8fb",aoStrength:.18,tintVariation:.06,windowColor:"#bcd4e8",windowFrameColor:"#dfe8f2",windowGlow:0},housenumber:{color:"#2d4053",haloColor:"#fbfdfe",haloWidth:1.4},poi:{color:"#457aa1",haloColor:"#fbfdfe",haloWidth:1.4},"road-label":{color:"#2d4053",haloColor:"#fbfdfe",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#2d4053",haloColor:"#fbfdfe",haloWidth:1.4},"poi-food":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#fbfdfe",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#fbfdfe",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#d3eff9"},"indoor-shell":{color:"#f5f7f8",opacity:.97},"indoor-corridor":{color:"#fbfbfc"},"indoor-room":{color:"#edeff1"},"indoor-service":{color:"#d6dce0"},"indoor-shop":{color:"#e4dfea"},"indoor-food":{color:"#eae4df"},"indoor-wc":{color:"#dfe5ea"},"indoor-wall":{color:"#c9ced1",roofColor:"#e0e2e4",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#d0cbdc",opacity:.95},"indoor-door":{color:"#457aa1",haloColor:"#fbfdfe",haloWidth:1.4},"indoor-poi":{color:"#457aa1",haloColor:"#fbfdfe",haloWidth:1.4},"indoor-name":{color:"#2d4053",haloColor:"#fbfdfe",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#fbfdfe"}},sky:{skyColor:"#9fc5d2",horizonColor:"#dfe3e8",fogRange:[1.35,7.42],fogIntensity:.85,spaceColor:"#090c10",atmosphereColor:"#5fb3d0",starIntensity:.37}};var al={name:"\u0413\u0430\u0440\u043C\u043E\u043D\u0438\u044F \u0447\u0451\u0440\u043D\u0430\u044F",background:"#1a1a1a",model3dKey:"night",light:{ambientColor:"#a8a8a8",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#cccccc",keyIntensity:.29,fillAzimuth:300,fillAltitude:25,fillColor:"#854747",fillIntensity:.22},paint:{"landcover-wood":{color:"#212121"},"landcover-grass":{color:"#292929"},"landcover-sand":{color:"#33301f"},"landcover-ice":{color:"#545454"},"landcover-wetland":{color:"#1d2e30"},"landuse-residential":{color:"#1f1f1f"},"landuse-industrial":{color:"#1f222d"},"landuse-civic":{color:"#2d1f24"},"landuse-sport":{color:"#2d2525"},"landuse-cemetery":{color:"#2a1d1d"},"landuse-parking":{color:"#332e2e"},park:{color:"#292929"},"aeroway-area":{color:"#23262f"},water:{color:"#383838"},waterway:{color:"#3d3d3d"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#525252"},"road-casing-secondary":{color:"#383838"},"road-casing-minor":{color:"#383838"},"road-rail":{color:"#595959"},"road-path":{color:"#525252"},"road-minor":{color:"#525252"},"road-secondary":{color:"#525252"},"road-ramp":{color:"#757575"},"road-major":{color:"#757575"},boundary:{color:"#808080"},building:{color:"#2e2e2e",roofColor:"#4f4f4f",aoStrength:.29,tintVariation:.1,windowColor:"#8fb8e8",windowFrameColor:"#c8ccd4",windowGlow:.36},housenumber:{color:"#d9d9d9",haloColor:"#0a0a0a",haloWidth:1.4},poi:{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4},"road-label":{color:"#d9d9d9",haloColor:"#0a0a0a",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#d9d9d9",haloColor:"#0a0a0a",haloWidth:1.4},"poi-food":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4,frameColor:"#a3a3a3",frameOpacity:1,frameHaloColor:"#0a0a0a",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#4c4c4c"},"indoor-shell":{color:"#484848",opacity:.97},"indoor-corridor":{color:"#424242"},"indoor-room":{color:"#505050"},"indoor-service":{color:"#676767"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#767676",roofColor:"#909090",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#66558a",opacity:.95},"indoor-door":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4},"indoor-poi":{color:"#a3a3a3",haloColor:"#0a0a0a",haloWidth:1.4},"indoor-name":{color:"#d9d9d9",haloColor:"#0a0a0a",haloWidth:1.4},"building-entrance":{color:"#cac4c4",haloColor:"#0a0a0a"}},sky:{skyColor:"#190909",horizonColor:"#282828",fogRange:[1.3,6.51],fogIntensity:.9,spaceColor:"#060606",atmosphereColor:"#b83535",starIntensity:.8}};var ll={name:"\u0413\u0430\u0440\u043C\u043E\u043D\u0438\u044F \u0441\u0438\u043D\u044F\u044F",background:"#e3e9f2",light:{ambientColor:"#f7f7f7",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#eef4ff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee5ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#a1b8ce"},"landcover-grass":{color:"#bdccdb"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#baccde"},"landcover-wetland":{color:"#c1dee1"},"landuse-residential":{color:"#ebeff4"},"landuse-industrial":{color:"#d7d9e4"},"landuse-civic":{color:"#ead7dd"},"landuse-sport":{color:"#b8d3e0"},"landuse-cemetery":{color:"#c2d4e5"},"landuse-parking":{color:"#dadbdd"},park:{color:"#bdccdb"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#5799db"},waterway:{color:"#5f9edd"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#407fbf"},"road-casing-secondary":{color:"#80a1c6"},"road-casing-minor":{color:"#80a1c6"},"road-rail":{color:"#738dab"},"road-path":{color:"#b0c5dd"},"road-minor":{color:"#b0c5dd"},"road-secondary":{color:"#b0c5dd"},"road-ramp":{color:"#71a3d6"},"road-major":{color:"#71a3d6"},boundary:{color:"#478cd1"},building:{color:"#cfdae8",roofColor:"#e5edf6",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#e8eef6",windowGlow:0},housenumber:{color:"#1f395c",haloColor:"#fbfcfe",haloWidth:1.4},poi:{color:"#3e6da3",haloColor:"#fbfcfe",haloWidth:1.4},"road-label":{color:"#1f395c",haloColor:"#fbfcfe",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#1f395c",haloColor:"#fbfcfe",haloWidth:1.4},"poi-food":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#fbfcfe",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#fbfcfe",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#61a2e3"},"indoor-shell":{color:"#e6e8ec",opacity:.97},"indoor-corridor":{color:"#ebedf0"},"indoor-room":{color:"#dde1e5"},"indoor-service":{color:"#c6ccd4"},"indoor-shop":{color:"#d6cedf"},"indoor-food":{color:"#dfd7ce"},"indoor-wc":{color:"#ced8df"},"indoor-wall":{color:"#babfc5",roofColor:"#d1d4d7",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#c1bad1",opacity:.95},"indoor-door":{color:"#3e6da3",haloColor:"#fbfcfe",haloWidth:1.4},"indoor-poi":{color:"#3e6da3",haloColor:"#fbfcfe",haloWidth:1.4},"indoor-name":{color:"#1f395c",haloColor:"#fbfcfe",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#fbfcfe"}},sky:{skyColor:"#8cabc9",horizonColor:"#ced6e1",fogRange:[1.34,7.35],fogIntensity:.86,spaceColor:"#080b10",atmosphereColor:"#5c96d0",starIntensity:.39}};var sl={name:"\u0413\u0430\u0440\u043C\u043E\u043D\u0438\u044F \u0437\u0435\u043B\u0451\u043D\u0430\u044F",background:"#dfecdf",light:{ambientColor:"#f5f6f5",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#f0fff0",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dcece7",fillIntensity:.18},paint:{"landcover-wood":{color:"#5ccc65"},"landcover-grass":{color:"#8cd98c"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#bbd8ce"},"landcover-wetland":{color:"#9fccd1"},"landuse-residential":{color:"#e6efe6"},"landuse-industrial":{color:"#d1d4e0"},"landuse-civic":{color:"#e7d0d7"},"landuse-sport":{color:"#94e085"},"landuse-cemetery":{color:"#9fd69f"},"landuse-parking":{color:"#d4d8d4"},park:{color:"#8cd98c"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#5ec9a6"},waterway:{color:"#66ccaa"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#44a754"},"road-casing-secondary":{color:"#7fbd7f"},"road-casing-minor":{color:"#7fbd7f"},"road-rail":{color:"#72a172"},"road-path":{color:"#afd4af"},"road-minor":{color:"#afd4af"},"road-secondary":{color:"#afd4af"},"road-ramp":{color:"#64c474"},"road-major":{color:"#64c474"},boundary:{color:"#39c668"},building:{color:"#cfe2cb",roofColor:"#dff1df",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#e8f0e8",windowGlow:0},housenumber:{color:"#1c4a24",haloColor:"#f8fcf8",haloWidth:1.4},poi:{color:"#358d44",haloColor:"#f8fcf8",haloWidth:1.4},"road-label":{color:"#1c4a24",haloColor:"#f8fcf8",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#1c4a24",haloColor:"#f8fcf8",haloWidth:1.4},"poi-food":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f8fcf8",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f8fcf8",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#67d1af"},"indoor-shell":{color:"#e1e8e0",opacity:.97},"indoor-corridor":{color:"#e6ece5"},"indoor-room":{color:"#d9e1d7"},"indoor-service":{color:"#c3d0c1"},"indoor-shop":{color:"#d1c8db"},"indoor-food":{color:"#dbd2c8"},"indoor-wc":{color:"#c8d4db"},"indoor-wall":{color:"#b7c0b5",roofColor:"#cdd2cc",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#bcb4cd",opacity:.95},"indoor-door":{color:"#358d44",haloColor:"#f8fcf8",haloWidth:1.4},"indoor-poi":{color:"#358d44",haloColor:"#f8fcf8",haloWidth:1.4},"indoor-name":{color:"#1c4a24",haloColor:"#f8fcf8",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#f8fcf8"}},sky:{skyColor:"#83c5af",horizonColor:"#cad9ca",fogRange:[1.34,7.31],fogIntensity:.86,spaceColor:"#090f09",atmosphereColor:"#5bcfa9",starIntensity:.4}};var cl={name:"\u041B\u0443\u043D\u043D\u0430\u044F",background:"#c8cbd0",light:{ambientColor:"#ebecec",ambientIntensity:.46,keyAzimuth:120,keyAltitude:59,keyColor:"#e8ecf2",keyIntensity:.56,fillAzimuth:300,fillAltitude:25,fillColor:"#c7d0e1",fillIntensity:.19},paint:{"landcover-wood":{color:"#a8abb3"},"landcover-grass":{color:"#b9bbc1"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#cbcdd2"},"landcover-wetland":{color:"#acd4d7"},"landuse-residential":{color:"#ced0d4"},"landuse-industrial":{color:"#b3b7cc"},"landuse-civic":{color:"#d5aebb"},"landuse-sport":{color:"#b2bdc7"},"landuse-cemetery":{color:"#adbddc"},"landuse-parking":{color:"#b9bcc0"},park:{color:"#b9bbc1"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#929aaa"},waterway:{color:"#929aaa"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#6c7689"},"road-casing-secondary":{color:"#848b9a"},"road-casing-minor":{color:"#848b9a"},"road-rail":{color:"#7e838b"},"road-path":{color:"#acb0b9"},"road-minor":{color:"#acb0b9"},"road-secondary":{color:"#acb0b9"},"road-ramp":{color:"#949ba8"},"road-major":{color:"#949ba8"},boundary:{color:"#6a7181"},building:{color:"#c8cbd0",roofColor:"#d9dbdd",aoStrength:.2,tintVariation:.07,windowColor:"#9fb0c0",windowFrameColor:"#cfd6e0",windowGlow:0},housenumber:{color:"#31363f",haloColor:"#f1f2f4",haloWidth:1.4},poi:{color:"#606876",haloColor:"#f1f2f4",haloWidth:1.4},"road-label":{color:"#31363f",haloColor:"#f1f2f4",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#31363f",haloColor:"#f1f2f4",haloWidth:1.4},"poi-food":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f1f2f4",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f1f2f4",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#9ca4b3"},"indoor-shell":{color:"#d6d9dc",opacity:.97},"indoor-corridor":{color:"#dbdde0"},"indoor-room":{color:"#ced1d5"},"indoor-service":{color:"#b9bcc3"},"indoor-shop":{color:"#c7bcd2"},"indoor-food":{color:"#d2c7bc"},"indoor-wc":{color:"#bcc9d2"},"indoor-wall":{color:"#acafb4",roofColor:"#c2c4c7",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#b1a7c5",opacity:.95},"indoor-door":{color:"#606876",haloColor:"#f1f2f4",haloWidth:1.4},"indoor-poi":{color:"#606876",haloColor:"#f1f2f4",haloWidth:1.4},"indoor-name":{color:"#31363f",haloColor:"#f1f2f4",haloWidth:1.4},"building-entrance":{haloColor:"#f1f2f4"}},sky:{skyColor:"#5675b3",horizonColor:"#b1b4b9",fogRange:[1.33,7.14],fogIntensity:.87,spaceColor:"#0a0b0c",atmosphereColor:"#557dce",starIntensity:.45}};var fl={name:"\u041C\u0430\u0442\u043E\u0432\u0430\u044F",background:"#e7e6e4",light:{ambientColor:"#f5f5f5",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dce6ec",fillIntensity:.18},paint:{"landcover-wood":{color:"#a3be9d"},"landcover-grass":{color:"#b3cbae"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#d6dce0"},"landcover-wetland":{color:"#acd4d7"},"landuse-residential":{color:"#ecebe9"},"landuse-industrial":{color:"#d1d4e0"},"landuse-civic":{color:"#e7d0d7"},"landuse-sport":{color:"#b6d2a7"},"landuse-cemetery":{color:"#b5dcad"},"landuse-parking":{color:"#d8d6d4"},park:{color:"#b3cbae"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#a6bbc9"},waterway:{color:"#a6bbc9"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#969fb0"},"road-casing-secondary":{color:"#abb0ba"},"road-casing-minor":{color:"#abb0ba"},"road-rail":{color:"#adadad"},"road-path":{color:"#c7cad1"},"road-minor":{color:"#c7cad1"},"road-secondary":{color:"#c7cad1"},"road-ramp":{color:"#aeb4c2"},"road-major":{color:"#aeb4c2"},boundary:{color:"#ca919f"},building:{color:"#dad6d2",roofColor:"#e3e0dd",aoStrength:.19,tintVariation:.06,windowColor:"#9fb0c0",windowFrameColor:"#f0f0f2",windowGlow:0},housenumber:{color:"#4d4742",haloColor:"#f6f5f4",haloWidth:1.4},poi:{color:"#707a8f",haloColor:"#f6f5f4",haloWidth:1.4},"road-label":{color:"#4d4742",haloColor:"#f6f5f4",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#4d4742",haloColor:"#f6f5f4",haloWidth:1.4},"poi-food":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f6f5f4",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f6f5f4",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#b3c6d2"},"indoor-shell":{color:"#e6e3e1",opacity:.97},"indoor-corridor":{color:"#eae8e6"},"indoor-room":{color:"#dfdcd8"},"indoor-service":{color:"#cdc8c2"},"indoor-shop":{color:"#d1c8da"},"indoor-food":{color:"#dad1c8"},"indoor-wc":{color:"#c8d3da"},"indoor-wall":{color:"#bebab6",roofColor:"#d1cecc",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#bbb3cd",opacity:.95},"indoor-door":{color:"#707a8f",haloColor:"#f6f5f4",haloWidth:1.4},"indoor-poi":{color:"#707a8f",haloColor:"#f6f5f4",haloWidth:1.4},"indoor-name":{color:"#4d4742",haloColor:"#f6f5f4",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#f6f5f4"}},sky:{skyColor:"#83abc5",horizonColor:"#d3d2d0",fogRange:[1.34,7.31],fogIntensity:.86,spaceColor:"#0d0c0b",atmosphereColor:"#5ba1cf",starIntensity:.4}};var ul={name:"\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u0438\u0437\u043C",background:"#f7f7f7",light:{ambientColor:"#fcfcfc",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee7ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#d6e1d6"},"landcover-grass":{color:"#e1eae1"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#edf0f2"},"landcover-wetland":{color:"#e3f1f2"},"landuse-residential":{color:"#fafafa"},"landuse-industrial":{color:"#e7e8ef"},"landuse-civic":{color:"#f3e7eb"},"landuse-sport":{color:"#e1edde"},"landuse-cemetery":{color:"#e6f4e6"},"landuse-parking":{color:"#e9e7e7"},park:{color:"#e1eae1"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#d7e2ea"},waterway:{color:"#d7e2ea"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#a3a3a3"},"road-casing-secondary":{color:"#b8b8b8"},"road-casing-minor":{color:"#b8b8b8"},"road-rail":{color:"#b3b3b3"},"road-path":{color:"#d1d1d1"},"road-minor":{color:"#d1d1d1"},"road-secondary":{color:"#d1d1d1"},"road-ramp":{color:"#bdbdbd"},"road-major":{color:"#bdbdbd"},boundary:{color:"#999999"},building:{color:"#ebebeb",roofColor:"#f2f2f2",aoStrength:.18,tintVariation:.06,windowColor:"#9fb0c0",windowFrameColor:"#f4f4f6",windowGlow:0},housenumber:{color:"#404040",haloColor:"#ffffff",haloWidth:1.4},poi:{color:"#737373",haloColor:"#ffffff",haloWidth:1.4},"road-label":{color:"#404040",haloColor:"#ffffff",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#404040",haloColor:"#ffffff",haloWidth:1.4},"poi-food":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4,frameColor:"#737373",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#e8eff4"},"indoor-shell":{color:"#f7f7f7",opacity:.97},"indoor-corridor":{color:"#fbfbfb"},"indoor-room":{color:"#efefef"},"indoor-service":{color:"#dbdbdb"},"indoor-shop":{color:"#e4dfea"},"indoor-food":{color:"#eae4df"},"indoor-wc":{color:"#dfe5ea"},"indoor-wall":{color:"#cdcdcd",roofColor:"#e2e2e2",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#d0cbdc",opacity:.95},"indoor-door":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4},"indoor-poi":{color:"#737373",haloColor:"#ffffff",haloWidth:1.4},"indoor-name":{color:"#404040",haloColor:"#ffffff",haloWidth:1.4},"building-entrance":{color:"#564e4e",haloColor:"#ffffff"}},sky:{skyColor:"#a4c0d4",horizonColor:"#e6e6e6",fogRange:[1.35,7.44],fogIntensity:.85,spaceColor:"#0d0d0d",atmosphereColor:"#5fa1d1",starIntensity:.37}};var hl={name:"\u041E\u043A\u0435\u0430\u043D",background:"#d7e3ea",light:{ambientColor:"#f3f4f4",ambientIntensity:.47,keyAzimuth:120,keyAltitude:60,keyColor:"#e8f6ff",keyIntensity:.59,fillAzimuth:300,fillAltitude:25,fillColor:"#d8e4ea",fillIntensity:.18},paint:{"landcover-wood":{color:"#75c7c7"},"landcover-grass":{color:"#97d8d2"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#accedf"},"landcover-wetland":{color:"#a5d0d4"},"landuse-residential":{color:"#dfe8ec"},"landuse-industrial":{color:"#cbcedc"},"landuse-civic":{color:"#e3c9d2"},"landuse-sport":{color:"#90dfcb"},"landuse-cemetery":{color:"#a6d9d4"},"landuse-parking":{color:"#cfd2d3"},park:{color:"#97d8d2"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#30abe8"},waterway:{color:"#3eb0ea"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#47a3c2"},"road-casing-secondary":{color:"#8ab2c7"},"road-casing-minor":{color:"#8ab2c7"},"road-rail":{color:"#8a9ea8"},"road-path":{color:"#b8d3e0"},"road-minor":{color:"#b8d3e0"},"road-secondary":{color:"#b8d3e0"},"road-ramp":{color:"#79c0d8"},"road-major":{color:"#79c0d8"},boundary:{color:"#47bad1"},building:{color:"#d2dee4",roofColor:"#e7f0f3",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#e6f0f6",windowGlow:0},housenumber:{color:"#1f3c51",haloColor:"#f8fbfc",haloWidth:1.4},poi:{color:"#3b7b9b",haloColor:"#f8fbfc",haloWidth:1.4},"road-label":{color:"#1f3c51",haloColor:"#f8fbfc",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#1f3c51",haloColor:"#f8fbfc",haloWidth:1.4},"poi-food":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f8fbfc",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f8fbfc",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#38b3f1"},"indoor-shell":{color:"#e5e9eb",opacity:.97},"indoor-corridor":{color:"#eaeeef"},"indoor-room":{color:"#dce2e5"},"indoor-service":{color:"#c6cfd4"},"indoor-shop":{color:"#d6cede"},"indoor-food":{color:"#ded6ce"},"indoor-wc":{color:"#ced8de"},"indoor-wall":{color:"#bac1c4",roofColor:"#d0d4d6",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#c1b9d1",opacity:.95},"indoor-door":{color:"#3b7b9b",haloColor:"#f8fbfc",haloWidth:1.4},"indoor-poi":{color:"#3b7b9b",haloColor:"#f8fbfc",haloWidth:1.4},"indoor-name":{color:"#1f3c51",haloColor:"#f8fbfc",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#f8fbfc"}},sky:{skyColor:"#7aaac1",horizonColor:"#c1cfd6",fogRange:[1.34,7.27],fogIntensity:.86,spaceColor:"#080d0f",atmosphereColor:"#5aa8cf",starIntensity:.41}};var dl={name:"\u041F\u0440\u0435\u043C\u0438\u0443\u043C",background:"#211f1c",model3dKey:"night",light:{ambientColor:"#b0aaa4",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#c8b48a",keyIntensity:.3,fillAzimuth:300,fillAltitude:25,fillColor:"#496887",fillIntensity:.22},paint:{"landcover-wood":{color:"#1b271b"},"landcover-grass":{color:"#232f23"},"landcover-sand":{color:"#393622"},"landcover-ice":{color:"#2d3d4c"},"landcover-wetland":{color:"#213436"},"landuse-residential":{color:"#272421"},"landuse-industrial":{color:"#242633"},"landuse-civic":{color:"#332429"},"landuse-sport":{color:"#22331f"},"landuse-cemetery":{color:"#213021"},"landuse-parking":{color:"#383633"},park:{color:"#232f23"},"aeroway-area":{color:"#272a35"},water:{color:"#16293b"},waterway:{color:"#1c334a"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#856e32"},"road-casing-secondary":{color:"#423b2e"},"road-casing-minor":{color:"#423b2e"},"road-rail":{color:"#6b6457"},"road-path":{color:"#5e5645"},"road-minor":{color:"#5e5645"},"road-secondary":{color:"#5e5645"},"road-ramp":{color:"#bf9e4a"},"road-major":{color:"#bf9e4a"},boundary:{color:"#d1aa47"},building:{color:"#443b2c",roofColor:"#726037",aoStrength:.29,tintVariation:.1,windowColor:"#8fb8e8",windowFrameColor:"#eef0f4",windowGlow:.36},housenumber:{color:"#eae3d7",haloColor:"#181410",haloWidth:1.4},poi:{color:"#d4bb7d",haloColor:"#181410",haloWidth:1.4},"road-label":{color:"#eae3d7",haloColor:"#181410",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#eae3d7",haloColor:"#181410",haloWidth:1.4},"poi-food":{color:"#d89964",haloColor:"#181410",haloWidth:1.4,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#181410",haloWidth:1.4,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#181410",haloWidth:1.4,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#181410",haloWidth:1.4,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#181410",haloWidth:1.4,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#181410",haloWidth:1.4,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#181410",haloWidth:1.4,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#181410",haloWidth:1.4,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#181410",haloWidth:1.4,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#181410",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#1c3752"},"indoor-shell":{color:"#564b39",opacity:.97},"indoor-corridor":{color:"#504635"},"indoor-room":{color:"#605440"},"indoor-service":{color:"#7b6c52"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#857a68",roofColor:"#9a9285",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#66558a",opacity:.95},"indoor-door":{color:"#d4bb7d",haloColor:"#181410",haloWidth:1.4},"indoor-poi":{color:"#d4bb7d",haloColor:"#181410",haloWidth:1.4},"indoor-name":{color:"#eae3d7",haloColor:"#181410",haloWidth:1.4},"building-entrance":{color:"#79a0d7",haloColor:"#181410"}},sky:{skyColor:"#09121b",horizonColor:"#2c2a27",fogRange:[1.3,6.51],fogIntensity:.9,spaceColor:"#060606",atmosphereColor:"#3679b9",starIntensity:.79}};var pl={name:"\u0420\u0435\u0430\u043B\u0438\u0441\u0442\u0438\u0447\u043D\u0430\u044F",background:"#d6dac8",light:{ambientColor:"#eeeeed",ambientIntensity:.46,keyAzimuth:120,keyAltitude:59,keyColor:"#fff0d8",keyIntensity:.57,fillAzimuth:300,fillAltitude:25,fillColor:"#cbd9e3",fillIntensity:.18},paint:{"landcover-wood":{color:"#62a63f"},"landcover-grass":{color:"#8dbf69"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#b4c9d7"},"landcover-wetland":{color:"#75b7bd"},"landuse-residential":{color:"#d6d1c2"},"landuse-industrial":{color:"#b9bdd0"},"landuse-civic":{color:"#d9b5c1"},"landuse-sport":{color:"#8bc95e"},"landuse-cemetery":{color:"#95c374"},"landuse-parking":{color:"#c3c5bf"},park:{color:"#8dbf69"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#4d97cb"},waterway:{color:"#599ecf"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#856b47"},"road-casing-secondary":{color:"#766b60"},"road-casing-minor":{color:"#766b60"},"road-rail":{color:"#666666"},"road-path":{color:"#9c948b"},"road-minor":{color:"#9c948b"},"road-secondary":{color:"#9c948b"},"road-ramp":{color:"#ccaa66"},"road-major":{color:"#ccaa66"},boundary:{color:"#8a735c"},building:{color:"#cdc4b7",roofColor:"#cdc4b7",aoStrength:.2,tintVariation:.07,windowColor:"#9fb0c0",windowFrameColor:"#eceef2",windowGlow:0},housenumber:{color:"#3b332b",haloColor:"#f5f5f0",haloWidth:1.4},poi:{color:"#735c45",haloColor:"#f5f5f0",haloWidth:1.4},"road-label":{color:"#3b332b",haloColor:"#f5f5f0",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#3b332b",haloColor:"#f5f5f0",haloWidth:1.4},"poi-food":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#f5f5f0",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#f5f5f0",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#559fd3"},"indoor-shell":{color:"#d6d0c9",opacity:.97},"indoor-corridor":{color:"#dad5ce"},"indoor-room":{color:"#cfc9c0"},"indoor-service":{color:"#beb6a9"},"indoor-shop":{color:"#bdb0ca"},"indoor-food":{color:"#cabeb0"},"indoor-wc":{color:"#b0c0ca"},"indoor-wall":{color:"#ada79e",roofColor:"#bfbbb6",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#a69bbd",opacity:.95},"indoor-door":{color:"#735c45",haloColor:"#f5f5f0",haloWidth:1.4},"indoor-poi":{color:"#735c45",haloColor:"#f5f5f0",haloWidth:1.4},"indoor-name":{color:"#3b332b",haloColor:"#f5f5f0",haloWidth:1.4},"building-entrance":{haloColor:"#f5f5f0"}},sky:{skyColor:"#5f92b7",horizonColor:"#bfc4b1",fogRange:[1.33,7.17],fogIntensity:.87,spaceColor:"#0d0e09",atmosphereColor:"#569dce",starIntensity:.44}};var ml={name:"\u041A\u043E\u0441\u043C\u043E\u0441",background:"#0c0a1a",model3dKey:"night",light:{ambientColor:"#8c7fcb",ambientIntensity:.34,keyAzimuth:120,keyAltitude:55,keyColor:"#c0a8ff",keyIntensity:.28,fillAzimuth:300,fillAltitude:25,fillColor:"#475385",fillIntensity:.22},paint:{"landcover-wood":{color:"#241730"},"landcover-grass":{color:"#2e203c"},"landcover-sand":{color:"#292719"},"landcover-ice":{color:"#2e365b"},"landcover-wetland":{color:"#172526"},"landuse-residential":{color:"#110e20"},"landuse-industrial":{color:"#191b24"},"landuse-civic":{color:"#24191d"},"landuse-sport":{color:"#281c40"},"landuse-cemetery":{color:"#1c1721"},"landuse-parking":{color:"#27272b"},park:{color:"#2e203c"},"aeroway-area":{color:"#1c1f26"},water:{color:"#121c49"},waterway:{color:"#16225a"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#7e279b"},"road-casing-secondary":{color:"#3a2060"},"road-casing-minor":{color:"#3a2060"},"road-rail":{color:"#985298"},"road-path":{color:"#6b35b6"},"road-minor":{color:"#6b35b6"},"road-secondary":{color:"#6b35b6"},"road-ramp":{color:"#bf4ce6"},"road-major":{color:"#bf4ce6"},boundary:{color:"#ec51b8"},building:{color:"#2a2145",roofColor:"#7f30a6",aoStrength:.29,tintVariation:.1,windowColor:"#84dcff",windowFrameColor:"#9fb0d8",windowGlow:.5},housenumber:{color:"#dbd1f0",haloColor:"#080614",haloWidth:1.4},poi:{color:"#d186ea",haloColor:"#080614",haloWidth:1.4},"road-label":{color:"#dbd1f0",haloColor:"#080614",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#dbd1f0",haloColor:"#080614",haloWidth:1.4},"poi-food":{color:"#d89964",haloColor:"#080614",haloWidth:1.4,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#080614",haloWidth:1.4,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#080614",haloWidth:1.4,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#080614",haloWidth:1.4,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#080614",haloWidth:1.4,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#080614",haloWidth:1.4,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#080614",haloWidth:1.4,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#080614",haloWidth:1.4,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#080614",haloWidth:1.4,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#080614",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#152466"},"indoor-shell":{color:"#403956",opacity:.97},"indoor-corridor":{color:"#3c3550"},"indoor-room":{color:"#484060"},"indoor-service":{color:"#5c527b"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#6f6885",roofColor:"#8a859a",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#66558a",opacity:.95},"indoor-door":{color:"#d186ea",haloColor:"#080614",haloWidth:1.4},"indoor-poi":{color:"#d186ea",haloColor:"#080614",haloWidth:1.4},"indoor-name":{color:"#dbd1f0",haloColor:"#080614",haloWidth:1.4},"building-entrance":{color:"#79a0d7",haloColor:"#080614"}},sky:{skyColor:"#080b18",horizonColor:"#1d1931",fogRange:[1.3,6.5],fogIntensity:.9,spaceColor:"#040308",atmosphereColor:"#354cb6",starIntensity:.82}};var bl={name:"\u0412\u0443\u043B\u043A\u0430\u043D",background:"#29211e",model3dKey:"night",light:{ambientColor:"#b6a6a1",ambientIntensity:.35,keyAzimuth:120,keyAltitude:55,keyColor:"#ffb070",keyIntensity:.29,fillAzimuth:300,fillAltitude:25,fillColor:"#8b604b",fillIntensity:.22},paint:{"landcover-wood":{color:"#31241c"},"landcover-grass":{color:"#392e22"},"landcover-sand":{color:"#403c26"},"landcover-ice":{color:"#aa6b4b"},"landcover-wetland":{color:"#243b3d"},"landuse-residential":{color:"#2f2623"},"landuse-industrial":{color:"#282b39"},"landuse-civic":{color:"#39282e"},"landuse-sport":{color:"#3e2e1e"},"landuse-cemetery":{color:"#362e26"},"landuse-parking":{color:"#3e3938"},park:{color:"#392e22"},"aeroway-area":{color:"#2b2f3b"},water:{color:"#8b3f18"},waterway:{color:"#9c461c"},"aeroway-line":{color:"#55493a"},"road-casing-major":{color:"#aa350e"},"road-casing-secondary":{color:"#712b14"},"road-casing-minor":{color:"#712b14"},"road-rail":{color:"#8f583d"},"road-path":{color:"#e65e19"},"road-minor":{color:"#e65e19"},"road-secondary":{color:"#e65e19"},"road-ramp":{color:"#f98c1f"},"road-major":{color:"#f98c1f"},boundary:{color:"#f48c25"},building:{color:"#422b24",roofColor:"#c1551f",aoStrength:.28,tintVariation:.09,windowColor:"#84dcff",windowFrameColor:"#d8b0a0",windowGlow:.5},housenumber:{color:"#f3e0ce",haloColor:"#150b09",haloWidth:1.4},poi:{color:"#f09e4c",haloColor:"#150b09",haloWidth:1.4},"road-label":{color:"#f3e0ce",haloColor:"#150b09",haloWidth:1.4},"water-label":{color:"#9fbcd1",haloColor:"#131b20",haloWidth:1.4},"place-label":{color:"#f3e0ce",haloColor:"#150b09",haloWidth:1.4},"poi-food":{color:"#d89964",haloColor:"#150b09",haloWidth:1.4,frameColor:"#d89964",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-shop":{color:"#699cd4",haloColor:"#150b09",haloWidth:1.4,frameColor:"#699cd4",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-transport":{color:"#75acc8",haloColor:"#150b09",haloWidth:1.4,frameColor:"#75acc8",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-health":{color:"#ca7272",haloColor:"#150b09",haloWidth:1.4,frameColor:"#ca7272",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-education":{color:"#81bbb7",haloColor:"#150b09",haloWidth:1.4,frameColor:"#81bbb7",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-culture":{color:"#a684b8",haloColor:"#150b09",haloWidth:1.4,frameColor:"#a684b8",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-sport":{color:"#89bb81",haloColor:"#150b09",haloWidth:1.4,frameColor:"#89bb81",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-lodging":{color:"#8e79c3",haloColor:"#150b09",haloWidth:1.4,frameColor:"#8e79c3",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"poi-service":{color:"#959ea7",haloColor:"#150b09",haloWidth:1.4,frameColor:"#959ea7",frameOpacity:1,frameHaloColor:"#150b09",iconColor:"#1b1b1b",iconHaloWidth:0},"water-pool":{color:"#c2531a"},"indoor-shell":{color:"#564039",opacity:.97},"indoor-corridor":{color:"#503b35"},"indoor-room":{color:"#604840"},"indoor-service":{color:"#7b5c52"},"indoor-shop":{color:"#5c4672"},"indoor-food":{color:"#725d46"},"indoor-wc":{color:"#466172"},"indoor-wall":{color:"#856f68",roofColor:"#9a8a85",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#66558a",opacity:.95},"indoor-door":{color:"#f09e4c",haloColor:"#150b09",haloWidth:1.4},"indoor-poi":{color:"#f09e4c",haloColor:"#150b09",haloWidth:1.4},"indoor-name":{color:"#f3e0ce",haloColor:"#150b09",haloWidth:1.4},"building-entrance":{color:"#79a0d7",haloColor:"#150b09"}},sky:{skyColor:"#1c100a",horizonColor:"#312a27",fogRange:[1.3,6.52],fogIntensity:.9,spaceColor:"#070605",atmosphereColor:"#ba6336",starIntensity:.78}};var yl={name:"\u0411\u0435\u043B\u0430\u044F",background:"#f5f1f0",light:{ambientColor:"#fafafa",ambientIntensity:.48,keyAzimuth:120,keyAltitude:60,keyColor:"#ffffff",keyIntensity:.6,fillAzimuth:300,fillAltitude:25,fillColor:"#dee8ed",fillIntensity:.18},paint:{"landcover-wood":{color:"#a7e2a2"},"landcover-grass":{color:"#b8ebad"},"landcover-sand":{color:"#efeac8"},"landcover-ice":{color:"#d7eaf4"},"landcover-wetland":{color:"#c1dee1"},"landuse-residential":{color:"#f6f4f4"},"landuse-industrial":{color:"#e0e2eb"},"landuse-civic":{color:"#efe1e6"},"landuse-sport":{color:"#c0f0a8"},"landuse-cemetery":{color:"#c8e5c2"},"landuse-parking":{color:"#e4e2e2"},park:{color:"#b8ebad"},"aeroway-area":{color:"#d6dbeb"},water:{color:"#99ddff"},waterway:{color:"#99ddff"},"aeroway-line":{color:"#f0ede9"},"road-casing-major":{color:"#94a0b8"},"road-casing-secondary":{color:"#a3adc2"},"road-casing-minor":{color:"#a3adc2"},"road-rail":{color:"#a6a6a6"},"road-path":{color:"#bfc6d9"},"road-minor":{color:"#bfc6d9"},"road-secondary":{color:"#bfc6d9"},"road-ramp":{color:"#a1b0c4"},"road-major":{color:"#a1b0c4"},boundary:{color:"#f87797"},building:{color:"#ffffff",roofColor:"#ffffff",aoStrength:.19,tintVariation:.06,windowColor:"#6b9ed1",windowFrameColor:"#ffffff",windowGlow:0},housenumber:{color:"#262626",haloColor:"#ffffff",haloWidth:1.4},poi:{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"road-label":{color:"#262626",haloColor:"#ffffff",haloWidth:1.4},"water-label":{color:"#35688d",haloColor:"#f7f7f7",haloWidth:1.4},"place-label":{color:"#262626",haloColor:"#ffffff",haloWidth:1.4},"poi-food":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c2681c",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-shop":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#2f77c4",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-transport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3b82a6",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-health":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#c24444",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-education":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#3f7f7a",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-culture":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#8b5aa5",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-sport":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#4f8b45",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-lodging":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#7a5fbf",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"poi-service":{haloColor:"#ffffff",haloWidth:1.4,frameColor:"#59636e",frameOpacity:1,frameHaloColor:"#ffffff",iconColor:"#ffffff",iconHaloWidth:0},"water-pool":{color:"#b1e5ff"},"indoor-shell":{color:"#f7f7f7",opacity:.97},"indoor-corridor":{color:"#fbfbfb"},"indoor-room":{color:"#efefef"},"indoor-service":{color:"#dbdbdb"},"indoor-shop":{color:"#e4dfea"},"indoor-food":{color:"#eae4df"},"indoor-wc":{color:"#dfe5ea"},"indoor-wall":{color:"#cdcdcd",roofColor:"#e2e2e2",aoStrength:0,facadeDetail:0,tintVariation:0,roofVariation:0},"indoor-transportation":{color:"#d0cbdc",opacity:.95},"indoor-door":{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"indoor-poi":{color:"#586e84",haloColor:"#ffffff",haloWidth:1.4},"indoor-name":{color:"#262626",haloColor:"#ffffff",haloWidth:1.4},"building-entrance":{color:"#225aaa",haloColor:"#ffffff"}},sky:{skyColor:"#9bbecf",horizonColor:"#e5dfdc",fogRange:[1.35,7.4],fogIntensity:.85,spaceColor:"#0f0c0a",atmosphereColor:"#5eaad0",starIntensity:.38}};var gl={"3d":Qa,cartoon:qa,cyberpunk:$a,dawn:el,dusk:tl,earth:ol,future:rl,"glass-refined":nl,glass:il,"harmony-black":al,"harmony-blue":ll,"harmony-green":sl,lunar:cl,matte:fl,minimal:ul,ocean:hl,premium:dl,realistic:pl,space:ml,volcano:bl,white:yl};function fr(n,e){let t=new Set(e.hidden??[]),o=n.layers.map(r=>{let i=e.paint?.[r.id],a={...r,paint:i?{...r.paint,...i}:{...r.paint}};return t.has(r.id)&&(a.visible=false),a});if(e.paint)for(let r of Object.keys(e.paint))n.layers.some(i=>i.id===r)||console.warn(`[osmgl] \u0442\u0435\u043C\u0430 \xAB${e.name}\xBB: \u0432 \u0431\u0430\u0437\u043E\u0432\u043E\u043C \u0441\u0442\u0438\u043B\u0435 \u043D\u0435\u0442 \u0441\u043B\u043E\u044F \xAB${r}\xBB`);return {...n,name:e.name,background:e.background??n.background,light:{...n.light,...e.light},sky:{...n.sky,...e.sky},model3dKey:e.model3dKey??n.model3dKey,layers:o}}var Y="base",Al="\u241F",St=(n,e)=>n+"\u241F"+String(e);var It=class{constructor(e=Ln){this.splitValues={};this.spec=e,this.light={...In,...e.light??{}},this.sky={...Sn,...e.sky??{}},this.layers=e.layers.map(t=>({...t,paint:{...t.paint}}));}get background(){return me(this.spec.background??"#eceae4")}colorAt(e,t,o=[1,0,1,1]){let r=e.paint;return ke(r?.color,t,o)}layerVisibleAt(e,t){return !(e.visible===false||e.minzoom!==void 0&&t<e.minzoom||e.maxzoom!==void 0&&t>=e.maxzoom)}workerPlan(e=Y){return this.layers.filter(t=>t.type!=="raster").filter(t=>(t.source??Y)===e).map(t=>({id:t.id,type:t.type,sourceLayer:t["source-layer"],filter:t.filter,minzoom:t.minzoom??0,maxzoom:t.maxzoom??24,...t.splitBy?{splitBy:t.splitBy}:{},...t.cornerRadius?{cornerRadius:t.cornerRadius,cornerSegments:t.cornerSegments}:{},...t.clipToTile?{clipToTile:true}:{},...t.groundBy?{groundBy:t.groundBy}:{},...t.type==="surface"?{elevation:t.elevation,base:t.base,bevel:t.bevel,bevelDrop:t.bevelDrop,weld:t.weld}:{},...t.type==="line"&&typeof t.paint?.elevation=="number"&&t.paint.elevation>0?{ground:true}:{},...t.type==="symbol"?{textField:t.layout?.textField,iconImage:t.layout?.iconImage,iconRotate:t.layout?.iconRotate,textPlacement:t.layout?.textPlacement,abbreviate:t.layout?.abbreviate}:{}}))}usedSources(){return [...new Set(this.layers.map(e=>e.source??Y))]}bucketKeyFor(e){if(e.type==="raster"||!e.splitBy)return e.id;let t=this.splitValues[e.splitBy];return t===void 0?null:St(e.id,t)}sourceLayers(){return [...new Set(this.layers.flatMap(e=>e.type==="raster"?[]:[e["source-layer"]]))]}},Ln=Ka,Pu=Ua,ku=Ja,Ru=Xa,Lt={day:{name:"\u0414\u043D\u0435\u0432\u043D\u0430\u044F"},night:ja,mono:Ya,pale:Za,...gl};function ur(n,e=Ln){if(typeof n!="string")return fr(e,n);if(n==="day")return e;let t=Lt[n];return t?fr(e,t):(console.warn(`[osmgl] \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u0430\u044F \u0442\u0435\u043C\u0430 \xAB${n}\xBB; \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B: ${Object.keys(Lt).join(", ")}`),e)}var co=class{constructor(e,t){this.ctx=e;let o=e.gl;this._size=t;let r=o.createTexture(),i=o.createFramebuffer();if(!r||!i)throw new Error("[osmgl] \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0446\u0435\u043B\u044C \u0433\u043B\u0443\u0431\u0438\u043D\u044B");this.texture=r,this.framebuffer=i,e.bindTexture(7,r),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_COMPARE_MODE,o.COMPARE_REF_TO_TEXTURE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_COMPARE_FUNC,o.LEQUAL),this.allocate(t),o.bindFramebuffer(o.FRAMEBUFFER,i),o.framebufferTexture2D(o.FRAMEBUFFER,o.DEPTH_ATTACHMENT,o.TEXTURE_2D,r,0),o.drawBuffers([o.NONE]),o.readBuffer(o.NONE);let a=o.checkFramebufferStatus(o.FRAMEBUFFER);if(o.bindFramebuffer(o.FRAMEBUFFER,null),e.bindTexture(7,null),a!==o.FRAMEBUFFER_COMPLETE)throw new Error(`[osmgl] \u0446\u0435\u043B\u044C \u0433\u043B\u0443\u0431\u0438\u043D\u044B \u043D\u0435 \u0441\u043E\u0431\u0440\u0430\u043B\u0430\u0441\u044C: 0x${a.toString(16)}`)}get size(){return this._size}resize(e){e!==this._size&&(this._size=e,this.ctx.bindTexture(7,this.texture),this.allocate(e),this.ctx.bindTexture(7,null));}bind(){let e=this.ctx.gl;this.ctx.bindFramebuffer(this.framebuffer),this.ctx.viewport(0,0,this._size,this._size),this.ctx.setDepthTest(true),this.ctx.setDepthMask(true),e.clear(e.DEPTH_BUFFER_BIT);}bindTexture(e){this.ctx.bindTexture(e,this.texture);}allocate(e){let t=this.ctx.gl;t.texImage2D(t.TEXTURE_2D,0,t.DEPTH_COMPONENT24,e,e,0,t.DEPTH_COMPONENT,t.UNSIGNED_INT,null);}destroy(){this.ctx.gl.deleteFramebuffer(this.framebuffer),this.ctx.gl.deleteTexture(this.texture);}};function Bl(n){let e=n.gl,t=e.createTexture();if(!t)throw new Error("[osmgl] \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0437\u0434\u0430\u0442\u044C \u0437\u0430\u0433\u043B\u0443\u0448\u043A\u0443 \u043A\u0430\u0440\u0442\u044B \u0442\u0435\u043D\u0435\u0439");return n.bindTexture(7,t),e.texImage2D(e.TEXTURE_2D,0,e.DEPTH_COMPONENT24,1,1,0,e.DEPTH_COMPONENT,e.UNSIGNED_INT,new Uint32Array([4294967295])),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_COMPARE_FUNC,e.LEQUAL),n.bindTexture(7,null),t}var fo=`
|
|
9
10
|
uniform vec3 u_ambient_color;
|
|
10
11
|
uniform float u_ambient_intensity;
|
|
11
12
|
uniform vec3 u_key_dir; // \u043A\u0443\u0434\u0430 \u043B\u0435\u0442\u0438\u0442 \u0441\u0432\u0435\u0442 \u043A\u043B\u044E\u0447\u0435\u0432\u043E\u0433\u043E \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430
|
|
@@ -68,7 +69,7 @@ vec3 applyLightWithFactor(vec3 albedo, vec3 normal, float keyFactor) {
|
|
|
68
69
|
vec3 applyLight(vec3 albedo, vec3 normal) {
|
|
69
70
|
return applyLightWithFactor(albedo, normal, max(dot(normal, -u_key_dir), 0.0));
|
|
70
71
|
}
|
|
71
|
-
`,
|
|
72
|
+
`,hr=`
|
|
72
73
|
// \u0423 \u0441\u0440\u0430\u0432\u043D\u0438\u0432\u0430\u044E\u0449\u0435\u0433\u043E \u0441\u044D\u043C\u043F\u043B\u0435\u0440\u0430 \u0432 GLSL ES 3.00 \u041D\u0415\u0422 \u0442\u043E\u0447\u043D\u043E\u0441\u0442\u0438 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E (\u0432 \u043E\u0442\u043B\u0438\u0447\u0438\u0435
|
|
73
74
|
// \u043E\u0442 \u043E\u0431\u044B\u0447\u043D\u043E\u0433\u043E sampler2D \u0432\u043E \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0435) \u2014 \u0431\u0435\u0437 \u044D\u0442\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u0438 \u0448\u0435\u0439\u0434\u0435\u0440 \u043D\u0435 \u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u0443\u0435\u0442\u0441\u044F.
|
|
74
75
|
precision highp sampler2DShadow;
|
|
@@ -129,7 +130,7 @@ float shadowOcclusion(float ndotl) {
|
|
|
129
130
|
|
|
130
131
|
return (1.0 - lit * 0.25) * u_shadow_params.x;
|
|
131
132
|
}
|
|
132
|
-
`,
|
|
133
|
+
`,Tn=`
|
|
133
134
|
uniform int u_material; // 0 \u2014 \u043D\u0435\u0442, 1 \u0432\u043E\u0434\u0430, 2 \u0437\u0435\u043B\u0435\u043D\u044C, 3 \u043F\u0435\u0441\u043E\u043A, 4 \u0430\u0441\u0444\u0430\u043B\u044C\u0442
|
|
134
135
|
uniform vec4 u_material_params; // x: \u0441\u0438\u043B\u0430, y: \u043C\u0430\u0441\u0448\u0442\u0430\u0431 (\u043C), z: \u0441\u043A\u043E\u0440\u043E\u0441\u0442\u044C, w: \u0432\u0440\u0435\u043C\u044F (\u0441)
|
|
135
136
|
|
|
@@ -238,7 +239,7 @@ vec3 applyMaterial(vec3 color, vec2 world) {
|
|
|
238
239
|
|
|
239
240
|
return mix(color, shaded, strength);
|
|
240
241
|
}
|
|
241
|
-
`,
|
|
242
|
+
`,Cl=`
|
|
242
243
|
uniform vec4 u_globe; // x: \u0432\u043A\u043B, y: \u0434\u043E\u043B\u044F \u043F\u043B\u043E\u0441\u043A\u043E\u0439 \u043A\u0430\u0440\u0442\u044B, z: \u0440\u0430\u0434\u0438\u0443\u0441, w: worldSize
|
|
243
244
|
uniform vec2 u_globe_center; // \u0446\u0435\u043D\u0442\u0440 \u043A\u0430\u0440\u0442\u044B \u0432 \u043D\u043E\u0440\u043C\u0430\u043B\u0438\u0437\u043E\u0432\u0430\u043D\u043D\u043E\u043C \u043C\u0435\u0440\u043A\u0430\u0442\u043E\u0440\u0435
|
|
244
245
|
uniform vec4 u_globe_cam; // xyz: \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043D\u0430 \u043A\u0430\u043C\u0435\u0440\u0443 \u043E\u0442 \u0446\u0435\u043D\u0442\u0440\u0430 \u0448\u0430\u0440\u0430, w: \u043A\u043E\u0441\u0438\u043D\u0443\u0441 \u0443\u0433\u043B\u0430 \u0434\u043E \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430
|
|
@@ -291,7 +292,7 @@ vec3 globeLocal(vec2 tilePos) {
|
|
|
291
292
|
|
|
292
293
|
return mix(sphere, flat_pos, u_globe.y);
|
|
293
294
|
}
|
|
294
|
-
`,
|
|
295
|
+
`,vl=`#version 300 es
|
|
295
296
|
precision highp float;
|
|
296
297
|
|
|
297
298
|
in vec2 a_lnglat; // \u0440\u0430\u0434\u0438\u0430\u043D\u044B: \u0434\u043E\u043B\u0433\u043E\u0442\u0430, \u0448\u0438\u0440\u043E\u0442\u0430
|
|
@@ -315,7 +316,7 @@ void main() {
|
|
|
315
316
|
vec3 n = u_globe_basis * unit;
|
|
316
317
|
v_rim = 1.0 - clamp(n.z, 0.0, 1.0);
|
|
317
318
|
}
|
|
318
|
-
`,
|
|
319
|
+
`,xl=`#version 300 es
|
|
319
320
|
precision highp float;
|
|
320
321
|
|
|
321
322
|
in float v_rim;
|
|
@@ -331,17 +332,17 @@ void main() {
|
|
|
331
332
|
float rim = pow(v_rim, 6.0) * u_atmo_strength;
|
|
332
333
|
fragColor = vec4(mix(u_body_color, u_atmo_color, clamp(rim, 0.0, 1.0)), 1.0);
|
|
333
334
|
}
|
|
334
|
-
`,
|
|
335
|
+
`,wl=`#version 300 es
|
|
335
336
|
precision highp float;
|
|
336
337
|
in vec2 a_pos; // 0..1, \u043E\u0431\u0449\u0438\u0439 \u043A\u0432\u0430\u0434\u0440\u0430\u0442
|
|
337
338
|
uniform float u_center_depth; // NDC-\u0433\u043B\u0443\u0431\u0438\u043D\u0430 \u0446\u0435\u043D\u0442\u0440\u0430 \u0448\u0430\u0440\u0430
|
|
338
339
|
void main() {
|
|
339
340
|
gl_Position = vec4(a_pos * 2.0 - 1.0, u_center_depth, 1.0);
|
|
340
341
|
}
|
|
341
|
-
`,
|
|
342
|
+
`,_l=`#version 300 es
|
|
342
343
|
precision highp float;
|
|
343
344
|
void main() {}
|
|
344
|
-
`,
|
|
345
|
+
`,El=`#version 300 es
|
|
345
346
|
precision highp float;
|
|
346
347
|
in vec2 a_pos;
|
|
347
348
|
in float a_height; // \u043C\u0435\u0442\u0440\u044B \xD7 4, \u043A\u0430\u043A \u0443 \u0437\u0434\u0430\u043D\u0438\u0439
|
|
@@ -350,10 +351,10 @@ uniform float u_height_scale;
|
|
|
350
351
|
void main() {
|
|
351
352
|
gl_Position = u_matrix * vec4(a_pos, (a_height / 4.0) * u_height_scale, 1.0);
|
|
352
353
|
}
|
|
353
|
-
`,
|
|
354
|
+
`,Hn=`#version 300 es
|
|
354
355
|
precision highp float;
|
|
355
356
|
void main() {}
|
|
356
|
-
`,
|
|
357
|
+
`,ot=`
|
|
357
358
|
uniform vec3 u_fog_color;
|
|
358
359
|
uniform vec3 u_fog_range; // x: \u043D\u0430\u0447\u0430\u043B\u043E, y: \u043A\u043E\u043D\u0435\u0446 (\u043C\u0438\u0440\u043E\u0432\u044B\u0435 \u043F\u0438\u043A\u0441\u0435\u043B\u0438), z: \u043F\u0440\u0435\u0434\u0435\u043B \u0441\u0438\u043B\u044B
|
|
359
360
|
|
|
@@ -376,7 +377,7 @@ vec4 applyFogPremultiplied(vec4 color) {
|
|
|
376
377
|
vec3 applyFog(vec3 color) {
|
|
377
378
|
return mix(color, u_fog_color, fogAmount());
|
|
378
379
|
}
|
|
379
|
-
`,
|
|
380
|
+
`,Dl=`#version 300 es
|
|
380
381
|
precision highp float;
|
|
381
382
|
|
|
382
383
|
in vec3 a_pos;
|
|
@@ -449,7 +450,7 @@ void main() {
|
|
|
449
450
|
// \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u043E\u043D\u0430 \u0436\u0435 \u0433\u043E\u0434\u0438\u0442\u0441\u044F \u0438 \u0434\u043B\u044F \u0432\u0435\u043A\u0442\u043E\u0440\u0430 \u0432\u0437\u0433\u043B\u044F\u0434\u0430.
|
|
450
451
|
v_view = u_normal_matrix * (u_camera_model - a_pos);
|
|
451
452
|
}
|
|
452
|
-
`,
|
|
453
|
+
`,Ml=`#version 300 es
|
|
453
454
|
precision highp float;
|
|
454
455
|
|
|
455
456
|
in vec3 a_pos;
|
|
@@ -513,12 +514,12 @@ void main() {
|
|
|
513
514
|
v_nmodel = a_normal;
|
|
514
515
|
v_view = n * (u_camera_model - a_pos);
|
|
515
516
|
}
|
|
516
|
-
`,
|
|
517
|
+
`,Pn=`#version 300 es
|
|
517
518
|
precision highp float;
|
|
518
519
|
|
|
519
|
-
${
|
|
520
|
-
${
|
|
521
|
-
${
|
|
520
|
+
${fo}
|
|
521
|
+
${hr}
|
|
522
|
+
${ot}
|
|
522
523
|
|
|
523
524
|
in vec3 v_normal;
|
|
524
525
|
in vec2 v_tex;
|
|
@@ -797,14 +798,14 @@ void main() {
|
|
|
797
798
|
float alpha = albedo.a * u_opacity;
|
|
798
799
|
fragColor = vec4(applyFog(color) * alpha, alpha);
|
|
799
800
|
}
|
|
800
|
-
`,
|
|
801
|
+
`,Fl=`#version 300 es
|
|
801
802
|
precision highp float;
|
|
802
803
|
in vec3 a_pos;
|
|
803
804
|
uniform mat4 u_matrix;
|
|
804
805
|
void main() {
|
|
805
806
|
gl_Position = u_matrix * vec4(a_pos, 1.0);
|
|
806
807
|
}
|
|
807
|
-
`,
|
|
808
|
+
`,Sl=`#version 300 es
|
|
808
809
|
precision highp float;
|
|
809
810
|
in vec2 a_pos; // 0..1, \u0442\u043E\u0442 \u0436\u0435 \u043A\u0432\u0430\u0434\u0440\u0430\u0442, \u0447\u0442\u043E \u0443 \u0442\u0435\u043D\u0438 \u043D\u0430 \u0437\u0435\u043C\u043B\u0435
|
|
810
811
|
|
|
@@ -823,7 +824,7 @@ void main() {
|
|
|
823
824
|
v_ray = mix(mix(u_ray_bl, u_ray_br, a_pos.x), mix(u_ray_tl, u_ray_tr, a_pos.x), a_pos.y);
|
|
824
825
|
gl_Position = vec4(a_pos * 2.0 - 1.0, 0.999, 1.0);
|
|
825
826
|
}
|
|
826
|
-
`,
|
|
827
|
+
`,Il=`#version 300 es
|
|
827
828
|
precision highp float;
|
|
828
829
|
|
|
829
830
|
in vec2 v_uv;
|
|
@@ -912,7 +913,7 @@ void main() {
|
|
|
912
913
|
|
|
913
914
|
fragColor = vec4(sky * alpha, alpha);
|
|
914
915
|
}
|
|
915
|
-
`,
|
|
916
|
+
`,Ll=`#version 300 es
|
|
916
917
|
precision highp float;
|
|
917
918
|
|
|
918
919
|
in vec2 a_pos; // \u0443\u0433\u043E\u043B \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0442\u0430\u0439\u043B\u0430, 0..1
|
|
@@ -930,10 +931,10 @@ void main() {
|
|
|
930
931
|
v_uv = u_uv_transform.xy + a_pos * u_uv_transform.z;
|
|
931
932
|
gl_Position = u_matrix * vec4(a_pos, 0.0, 1.0);
|
|
932
933
|
}
|
|
933
|
-
`,
|
|
934
|
+
`,Tl=`#version 300 es
|
|
934
935
|
precision highp float;
|
|
935
936
|
|
|
936
|
-
${
|
|
937
|
+
${ot}
|
|
937
938
|
|
|
938
939
|
in vec2 v_uv;
|
|
939
940
|
|
|
@@ -948,7 +949,7 @@ void main() {
|
|
|
948
949
|
// \u043A\u0430\u043C\u0435\u0440\u0435 \u0434\u0430\u043B\u0451\u043A\u0438\u0439 \u0440\u0430\u0441\u0442\u0440 \u043E\u0441\u0442\u0430\u0451\u0442\u0441\u044F \u0447\u0451\u0442\u043A\u0438\u043C \u0442\u0430\u043C, \u0433\u0434\u0435 \u0432\u0441\u0451 \u043E\u0441\u0442\u0430\u043B\u044C\u043D\u043E\u0435 \u0443\u0436\u0435 \u0437\u0430\u0442\u044F\u043D\u0443\u0442\u043E.
|
|
949
950
|
fragColor = applyFogPremultiplied(vec4(color.rgb * color.a, color.a)) * u_opacity;
|
|
950
951
|
}
|
|
951
|
-
`,
|
|
952
|
+
`,Hl=`#version 300 es
|
|
952
953
|
precision highp float;
|
|
953
954
|
in vec2 a_pos; // \u0443\u0433\u043E\u043B \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0442\u0430\u0439\u043B\u0430, 0..1
|
|
954
955
|
uniform mat4 u_matrix;
|
|
@@ -959,11 +960,11 @@ void main() {
|
|
|
959
960
|
gl_Position = u_matrix * local;
|
|
960
961
|
v_shadow = u_shadow_matrix * local;
|
|
961
962
|
}
|
|
962
|
-
`,
|
|
963
|
+
`,Pl=`#version 300 es
|
|
963
964
|
precision highp float;
|
|
964
965
|
|
|
965
|
-
${
|
|
966
|
-
${
|
|
966
|
+
${hr}
|
|
967
|
+
${ot}
|
|
967
968
|
|
|
968
969
|
uniform vec3 u_shadow_ground; // \u0432\u043E \u0447\u0442\u043E \u043F\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044F \u043E\u0441\u0432\u0435\u0449\u0451\u043D\u043D\u044B\u0439 \u0446\u0432\u0435\u0442 \u0432 \u0442\u0435\u043D\u0438
|
|
969
970
|
uniform float u_ground_ndotl; // \u0441\u0438\u043D\u0443\u0441 \u0432\u044B\u0441\u043E\u0442\u044B \u0441\u043E\u043B\u043D\u0446\u0430: \u0437\u0435\u043C\u043B\u044F \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u0430
|
|
@@ -975,10 +976,10 @@ void main() {
|
|
|
975
976
|
float occlusion = shadowOcclusion(u_ground_ndotl) * (1.0 - fogAmount());
|
|
976
977
|
fragColor = vec4(mix(vec3(1.0), u_shadow_ground, occlusion), 1.0);
|
|
977
978
|
}
|
|
978
|
-
`,
|
|
979
|
+
`,kl=`#version 300 es
|
|
979
980
|
precision highp float;
|
|
980
981
|
|
|
981
|
-
${
|
|
982
|
+
${Cl}
|
|
982
983
|
|
|
983
984
|
in vec2 a_pos;
|
|
984
985
|
uniform mat4 u_matrix;
|
|
@@ -1000,12 +1001,12 @@ void main() {
|
|
|
1000
1001
|
// \u043D\u0435 \u043F\u043E\u043F\u0430\u0434\u0430\u043B \u2014 \u0443 \u043B\u0438\u043D\u0438\u0439 \u0438 \u043F\u043E\u0432\u0435\u0440\u0445\u043D\u043E\u0441\u0442\u0435\u0439 \u044D\u0442\u043E \u0441\u0434\u0435\u043B\u0430\u043D\u043E, \u0443 \u0437\u0430\u043B\u0438\u0432\u043A\u0438 \u0437\u0430\u0431\u044B\u043B\u043E\u0441\u044C.
|
|
1001
1002
|
v_world = u_world_origin + a_pos * u_meters_per_unit;
|
|
1002
1003
|
}
|
|
1003
|
-
`,
|
|
1004
|
+
`,Rl=`#version 300 es
|
|
1004
1005
|
precision highp float;
|
|
1005
1006
|
|
|
1006
|
-
${
|
|
1007
|
-
${
|
|
1008
|
-
${
|
|
1007
|
+
${ot}
|
|
1008
|
+
${fo}
|
|
1009
|
+
${Tn}
|
|
1009
1010
|
|
|
1010
1011
|
in vec2 v_world;
|
|
1011
1012
|
|
|
@@ -1022,10 +1023,10 @@ void main() {
|
|
|
1022
1023
|
if (u_material != 0) c.rgb = applyMaterial(c.rgb, v_world);
|
|
1023
1024
|
fragColor = applyFogPremultiplied(c);
|
|
1024
1025
|
}
|
|
1025
|
-
`,
|
|
1026
|
+
`,Gl=`#version 300 es
|
|
1026
1027
|
precision highp float;
|
|
1027
1028
|
|
|
1028
|
-
${
|
|
1029
|
+
${Cl}
|
|
1029
1030
|
|
|
1030
1031
|
in vec2 a_p0; // \u043D\u0430\u0447\u0430\u043B\u043E \u043E\u0442\u0440\u0435\u0437\u043A\u0430 (\u043E\u0434\u0438\u043D\u0430\u043A\u043E\u0432\u043E \u0443 \u0432\u0441\u0435\u0445 \u0432\u0435\u0440\u0448\u0438\u043D \u043A\u0430\u043F\u0441\u0443\u043B\u044B)
|
|
1031
1032
|
in vec2 a_p1; // \u043A\u043E\u043D\u0435\u0446 \u043E\u0442\u0440\u0435\u0437\u043A\u0430
|
|
@@ -1143,12 +1144,12 @@ void main() {
|
|
|
1143
1144
|
v_dist0 = a_dist * u_tile_to_px;
|
|
1144
1145
|
v_seg_len = len * u_tile_to_px;
|
|
1145
1146
|
}
|
|
1146
|
-
`,
|
|
1147
|
+
`,Ol=`#version 300 es
|
|
1147
1148
|
precision highp float;
|
|
1148
1149
|
|
|
1149
|
-
${
|
|
1150
|
-
${
|
|
1151
|
-
${
|
|
1150
|
+
${ot}
|
|
1151
|
+
${fo}
|
|
1152
|
+
${Tn}
|
|
1152
1153
|
|
|
1153
1154
|
in vec2 v_pos;
|
|
1154
1155
|
in vec2 v_p0;
|
|
@@ -1399,7 +1400,7 @@ void main() {
|
|
|
1399
1400
|
if (alpha <= 0.003) discard;
|
|
1400
1401
|
fragColor = applyFogPremultiplied(color) * alpha;
|
|
1401
1402
|
}
|
|
1402
|
-
`,
|
|
1403
|
+
`,Wl=`#version 300 es
|
|
1403
1404
|
precision highp float;
|
|
1404
1405
|
|
|
1405
1406
|
in vec2 a_pos; // \u0442\u043E\u0447\u043A\u0430 \u043E\u0441\u0438, \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u044B\u0439 \u043C\u0435\u0440\u043A\u0430\u0442\u043E\u0440
|
|
@@ -1433,10 +1434,10 @@ void main() {
|
|
|
1433
1434
|
v_half = u_half_width;
|
|
1434
1435
|
v_dist = a_dist * u_units_to_px;
|
|
1435
1436
|
}
|
|
1436
|
-
`,
|
|
1437
|
+
`,Vl=`#version 300 es
|
|
1437
1438
|
precision highp float;
|
|
1438
1439
|
|
|
1439
|
-
${
|
|
1440
|
+
${ot}
|
|
1440
1441
|
|
|
1441
1442
|
in float v_side;
|
|
1442
1443
|
in float v_outset;
|
|
@@ -1482,7 +1483,7 @@ void main() {
|
|
|
1482
1483
|
if (alpha <= 0.003) discard;
|
|
1483
1484
|
fragColor = applyFogPremultiplied(color) * alpha;
|
|
1484
1485
|
}
|
|
1485
|
-
`,
|
|
1486
|
+
`,zl=`#version 300 es
|
|
1486
1487
|
precision highp float;
|
|
1487
1488
|
|
|
1488
1489
|
in vec2 a_pos;
|
|
@@ -1524,7 +1525,7 @@ void main() {
|
|
|
1524
1525
|
v_up = h;
|
|
1525
1526
|
v_wall = a_wall / 4.0;
|
|
1526
1527
|
}
|
|
1527
|
-
`,
|
|
1528
|
+
`,Gu=`
|
|
1528
1529
|
uniform float u_facade_detail; // 0 \u2014 \u0433\u043B\u0430\u0434\u043A\u0438\u0435 \u0441\u0442\u0435\u043D\u044B, 1 \u2014 \u043F\u043E\u043B\u043D\u044B\u0439 \u0440\u0438\u0441\u0443\u043D\u043E\u043A
|
|
1529
1530
|
uniform vec3 u_window_color;
|
|
1530
1531
|
uniform vec3 u_window_frame;
|
|
@@ -1689,13 +1690,13 @@ vec3 roofHue(vec3 base, float seed) {
|
|
|
1689
1690
|
float hueLum = max(dot(hue, vec3(0.2126, 0.7152, 0.0722)), 1e-3);
|
|
1690
1691
|
return hue * (baseLum / hueLum);
|
|
1691
1692
|
}
|
|
1692
|
-
`,
|
|
1693
|
+
`,Nl=`#version 300 es
|
|
1693
1694
|
precision highp float;
|
|
1694
1695
|
|
|
1695
|
-
${
|
|
1696
|
-
${
|
|
1697
|
-
${
|
|
1698
|
-
${
|
|
1696
|
+
${fo}
|
|
1697
|
+
${hr}
|
|
1698
|
+
${ot}
|
|
1699
|
+
${Gu}
|
|
1699
1700
|
|
|
1700
1701
|
in vec3 v_normal;
|
|
1701
1702
|
in float v_ao;
|
|
@@ -1774,7 +1775,7 @@ void main() {
|
|
|
1774
1775
|
float alpha = u_opacity * u_wall_color.a;
|
|
1775
1776
|
fragColor = vec4(applyFog(color) * alpha, alpha);
|
|
1776
1777
|
}
|
|
1777
|
-
`,
|
|
1778
|
+
`,Kl=`#version 300 es
|
|
1778
1779
|
precision highp float;
|
|
1779
1780
|
|
|
1780
1781
|
in vec2 a_pos; // \u0435\u0434\u0438\u043D\u0438\u0446\u044B \u0442\u0430\u0439\u043B\u0430, \u0414\u0420\u041E\u0411\u041D\u042B\u0415 (\u0441\u043C. generators/surface.ts)
|
|
@@ -1814,13 +1815,13 @@ void main() {
|
|
|
1814
1815
|
v_world = u_world_origin + pos * u_meters_per_unit;
|
|
1815
1816
|
v_shadow = u_shadow_matrix * local;
|
|
1816
1817
|
}
|
|
1817
|
-
`,
|
|
1818
|
+
`,Ul=`#version 300 es
|
|
1818
1819
|
precision highp float;
|
|
1819
1820
|
|
|
1820
|
-
${
|
|
1821
|
-
${
|
|
1822
|
-
${
|
|
1823
|
-
${
|
|
1821
|
+
${fo}
|
|
1822
|
+
${hr}
|
|
1823
|
+
${ot}
|
|
1824
|
+
${Tn}
|
|
1824
1825
|
|
|
1825
1826
|
in vec3 v_normal;
|
|
1826
1827
|
in float v_kind; // 0 \u0432\u0435\u0440\u0445, 1 \u0431\u043E\u0440\u0442, 2 \u044E\u0431\u043A\u0430, 3 \u043A\u0440\u044B\u0448\u043A\u0430 \u043E\u0441\u0442\u0440\u043E\u0432\u0430
|
|
@@ -1869,7 +1870,7 @@ void main() {
|
|
|
1869
1870
|
|
|
1870
1871
|
fragColor = vec4(applyFog(color) * alpha, alpha);
|
|
1871
1872
|
}
|
|
1872
|
-
`,
|
|
1873
|
+
`,Jl=`#version 300 es
|
|
1873
1874
|
precision highp float;
|
|
1874
1875
|
|
|
1875
1876
|
in vec2 a_pos; // \u044D\u043A\u0440\u0430\u043D\u043D\u044B\u0435 \u043F\u0438\u043A\u0441\u0435\u043B\u0438 (CSS)
|
|
@@ -1899,7 +1900,7 @@ void main() {
|
|
|
1899
1900
|
v_scale = a_scale;
|
|
1900
1901
|
v_fade = a_fade;
|
|
1901
1902
|
}
|
|
1902
|
-
`,
|
|
1903
|
+
`,Xl=`#version 300 es
|
|
1903
1904
|
precision highp float;
|
|
1904
1905
|
|
|
1905
1906
|
in vec2 v_tex;
|
|
@@ -1949,6 +1950,6 @@ void main() {
|
|
|
1949
1950
|
if (color.a <= 0.001) discard;
|
|
1950
1951
|
fragColor = color;
|
|
1951
1952
|
}
|
|
1952
|
-
`;var No=n=>n.kind==="symbol",Xa=n=>n.kind==="placement";function We(n,e,t,o){for(let r of n)for(let i=0;i+5<r.length;i+=6){let a=r[i],l=r[i+1],s=r[i+2],c=r[i+3],u=r[i+4],m=r[i+5];if(Bf(e,t,a,l,s,c,u,m)||o>0&&(Yr(e,t,a,l,s,c)<=o||Yr(e,t,s,c,u,m)<=o||Yr(e,t,u,m,a,l)<=o))return true}return false}function Bf(n,e,t,o,r,i,a,l){let s=(n-r)*(o-i)-(t-r)*(e-i),c=(n-a)*(i-l)-(r-a)*(e-l),u=(n-t)*(l-o)-(a-t)*(e-o),m=s<0||c<0||u<0,f=s>0||c>0||u>0;return !(m&&f)}function Yr(n,e,t,o,r,i){let a=r-t,l=i-o,s=a*a+l*l,c=s>0?Math.max(0,Math.min(1,((n-t)*a+(e-o)*l)/s)):0;return Math.hypot(n-(t+a*c),e-(o+l*c))}function Zr(n,e){let t=new DataView(n.vertices),o=new Uint32Array(n.indices),r=e.bounds(),i=(r.maxX-r.minX)/n.extent,a=new Float64Array(o.length*2);for(let l=0;l<o.length;l++){let s=o[l]*Ue;a[l*2]=r.minX+t.getInt16(s,true)*i,a[l*2+1]=r.minY+t.getInt16(s+2,true)*i;}return a}function Qr(n,e,t){let o=new DataView(n.vertices),r=t.bounds(),i=(r.maxX-r.minX)/e,a=r.minX,l=r.minY,s=new Float64Array(n.indices.length*2);for(let c=0;c<n.indices.length;c++){let u=n.indices[c]*Fe;s[c*2]=a+o.getInt16(u,true)*i,s[c*2+1]=l+o.getInt16(u+2,true)*i;}return s}var Cf={stride:8,attribs:[{name:"a_pos",size:2,type:5126,offset:0}]},vf=40,wf=10.5,ja=2.5,xf=16,_f=4,Df=7,Xt=class{constructor(){this.vbo=null;this.ibo=null;this.vao=null;this.capacity=0;this.perArrow=0;this.indicesPerArrow=0;this.highlightFootprint=null;this.count=0;}render(e,t,o,r,i,a,l,s=false){this.count=0;let c=t.zoom,u=r.layers.filter(B=>B.type==="symbol"&&B.layout?.placement==="map"&&r.layerVisibleAt(B,c));if(!u.length)return;let m=t.center,f=ee(m.lng),d=te(m.lat),h=t.worldSize>0?t.pixelsPerMeter/t.worldSize:0;if(!(h>0))return;let p=[];for(let B of u){let C=o.get(B.source??X);if(!C)continue;let v=r.bucketKeyFor(B);if(v===null)continue;let _=B.layout?.showFor==="highlight";if(_&&!this.highlightFootprint)continue;let w=h*1.5,D=B.layout?.arrowUnits==="meters"?h:1/t.worldSize,I=O(B.layout?.arrowLength,c,vf)*D,E=O(B.layout?.arrowWidth,c,wf)*D,L=O(B.layout?.arrowOutline,c,ja)*D,M=O(B.layout?.arrowGap,c,xf)*D,S=O(B.layout?.arrowDotRadius,c,_f)*D,F=O(B.layout?.arrowDotGap,c,Df)*D,T=$r(I,E,S,M-F),k=L>0?$r(I,E,S,M-F,L).outline:null,H={layer:B,verts:[],shape:T};for(let G of C.visibleTiles){let R=C.getTile(G)?.data?.buckets?.[v];if(!R||!No(R))continue;let W=new Int16Array(R.anchors),V=R.rotations?new Int16Array(R.rotations):null,j=G.bounds(),Y=(j.maxX-j.minX)/R.extent,oe=j.minX,ge=j.minY;for(let $=0;$<W.length/2;$++){let J=oe+W[$*2]*Y,be=ge+W[$*2+1]*Y;if(_&&!We(this.highlightFootprint,J,be,w))continue;let Ae=(V?V[$]:0)*Math.PI/180,Q=Math.sin(Ae),K=-Math.cos(Ae),U=J-f-Q*M,de=be-d-K*M;k&&en(H,k,U,de,Q,K),en(H,T.outline,U,de,Q,K),this.count++;}}H.verts.length&&p.push(H);}if(!p.length)return;let b=p[0].shape,A=b.outline.length/2,y=[],g=[];for(let B of p){let C=y.length/2/A;for(let v of B.verts)y.push(v);g.push({layer:B.layer,first:C,count:B.verts.length/2/A});}if(this.ensureBuffers(e,y.length/2/A,b,a),!(!this.vao||!this.vbo)){this.vbo.update(new Uint8Array(new Float32Array(y).buffer)),i.use(),l?.(i),s&&i.setMat4("u_shadow_matrix",t.shadowObjectMatrix(f,d,0)),i.setMat4("u_matrix",t.objectMatrix(f,d,0)),e.setDepthTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),this.vao.bind();for(let B of g){let C=B.layer.paint,v=O(C.opacity,c,1),_=Le(C.color,c,[.18,.45,.76,1]),w=Le(C.haloColor,c,[1,1,1,1]),x=O(B.layer.layout?.arrowOutline,c,ja)>0;Ff(e,i,B,w,_,v,x,this.indicesPerArrow);}e.bindVAO(null),e.setDepthTest(true);}}ensureBuffers(e,t,o,r){let i=o.outline.length/2;if(this.vao&&t<=this.capacity&&i===this.perArrow)return;this.vao?.destroy(),this.vbo?.destroy(),this.ibo?.destroy(),this.capacity=Math.max(256,Math.ceil(t*1.5)),this.perArrow=i,this.indicesPerArrow=o.indices.length,this.vbo=new ye(e,new Uint8Array(this.capacity*i*8),Cf,true);let a=new Uint32Array(this.capacity*o.indices.length);for(let l=0;l<this.capacity;l++){let s=l*i;for(let c=0;c<o.indices.length;c++)a[l*o.indices.length+c]=s+o.indices[c];}this.ibo=new fe(e,a),this.vao=new le(e,[{buffer:this.vbo,locations:r}],this.ibo);}destroy(){this.vao?.destroy(),this.vbo?.destroy(),this.ibo?.destroy(),this.vao=null,this.vbo=null,this.ibo=null,this.capacity=0;}};function Ff(n,e,t,o,r,i,a,l){let s=a?2:1;if(a){e.setVec4v("u_color",xe([o[0],o[1],o[2],o[3]*i]));for(let c=0;c<t.count;c+=s)Ya(n,t.first+c,l);}e.setVec4v("u_color",xe([r[0],r[1],r[2],r[3]*i]));for(let c=a?1:0;c<t.count;c+=s)Ya(n,t.first+c,l);}function Ya(n,e,t){n.gl.drawElements(n.gl.TRIANGLES,t,n.gl.UNSIGNED_INT,e*t*4);}var Za=4,qr=12;function $r(n,e,t,o,r=0){let i=n*.38,a=e*1.35,l=i*.3,s=e*.32,c=e/2,u=-n+s,m=[],f=(A,y)=>m.push(A,y);f(0,0),f(-i,a),f(-i+l,c),f(u,s);for(let A=1;A<Za;A++){let y=A/Za*Math.PI;f(u-Math.sin(y)*s,Math.cos(y)*s);}f(u,-s),f(-i+l,-c),f(-i,-a);let d=r>0?Ef(m,r):m,h=Se(m,void 0,2);if(t<=0)return {outline:d,indices:h};let p=d.length/2,b=t+r;for(let A=0;A<qr;A++){let y=A/qr*Math.PI*2;d.push(o+Math.cos(y)*b,Math.sin(y)*b);}for(let A=1;A<qr-1;A++)h.push(p,p+A,p+A+1);return {outline:d,indices:h}}function Ef(n,e){let t=n.length/2,o=0;for(let a=0;a<t;a++){let l=(a+1)%t;o+=n[a*2]*n[l*2+1]-n[l*2]*n[a*2+1];}let r=o<0?-1:1,i=[];for(let a=0;a<t;a++){let l=n[(a+t-1)%t*2],s=n[(a+t-1)%t*2+1],c=n[a*2],u=n[a*2+1],m=n[(a+1)%t*2],f=n[(a+1)%t*2+1],d=Math.hypot(c-l,u-s)||1,h=Math.hypot(m-c,f-u)||1,p=r*(u-s)/d,b=-r*(c-l)/d,A=r*(f-u)/h,y=-r*(m-c)/h,g=p+A,B=b+y,C=Math.hypot(g,B);if(C<1e-9){i.push(c,u);continue}g/=C,B/=C;let v=Math.min(1/Math.max(g*p+B*b,.35),3);i.push(c+g*e*v,u+B*e*v);}return i}function en(n,e,t,o,r,i){let a=-i,l=r;for(let s=0;s<e.length;s+=2){let c=e[s],u=e[s+1];n.verts.push(t+r*c+a*u,o+i*c+l*u);}}function Mf(n,e,t,o,r,i=0,a=0){let l=t*Math.PI/180,s={verts:[]};return en(s,$r(o,r,i,a).outline,n,e,Math.sin(l),-Math.cos(l)),s.verts}var If=5;function Qa(n,e){let t=1/(1<<e),o=(1<<e)-1;return [(n.x&o)*t,(n.y&o)*t,t]}var Ko=class{constructor(){this.anisotropy=0;this.anisotropyPname=0;this.anisotropyChecked=false;}render(e,t,o,r,i,a,l,s=false){if(!a.size)return;let c=i.layers.filter(u=>u.type==="raster"&&!!u.overlay===s&&i.layerVisibleAt(u,l));if(c.length){r.use(),e.setDepthTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),r.setInt("u_image",0);for(let u of c){let m=a.get(u.source);if(!m)continue;let f=O(u.paint?.opacity,l,1);if(!(f<=.001)){r.setFloat("u_opacity",f),o.bind();for(let d of m.visibleTiles){let h=this.patchFor(e,m,d);h&&(e.bindTexture(0,h.texture),r.setVec3("u_uv_transform",h.uv[0],h.uv[1],h.uv[2]),r.setMat4("u_matrix",t.tileMatrix(d,1)),e.gl.drawElements(e.gl.TRIANGLES,6,e.gl.UNSIGNED_SHORT,0));}}}e.bindVAO(null);}}patchFor(e,t,o){let r=t.getTile(o),i=r&&r.state==="loaded"?this.textureFor(e,r):null;if(i)return {texture:i,uv:[0,0,1]};for(let a=1;a<=If&&a<=o.z;a++){let l=o.scaledTo(o.z-a),s=t.getTile(l);if(!s||s.state!=="loaded")continue;let c=this.textureFor(e,s);if(c)return {texture:c,uv:Qa(o,a)}}return null}textureFor(e,t){let o=t.texture;if(o)return o.handle;if(!t.image)return null;let r=e.gl,i=r.createTexture();if(!i)return null;e.bindTexture(0,i),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t.image),r.generateMipmap(r.TEXTURE_2D),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR_MIPMAP_LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),this.applyAnisotropy(r);let a={handle:i,destroy:()=>r.deleteTexture(i)};return t.texture=a,t.image.close(),t.image=null,i}applyAnisotropy(e){if(!this.anisotropyChecked){this.anisotropyChecked=true;let t=e.getExtension("EXT_texture_filter_anisotropic");t&&(this.anisotropyPname=t.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropy=Math.min(4,e.getParameter(t.MAX_TEXTURE_MAX_ANISOTROPY_EXT)));}this.anisotropy>0&&e.texParameterf(e.TEXTURE_2D,this.anisotropyPname,this.anisotropy);}};var Sf="indoor-",jt=class{constructor(){this.parts=null;this.stamp="";this.cache=new P;this.box=null;this.hidden=new q;this.collected=new q;}get active(){return this.parts!==null}footprint(){return this.parts}get hiddenCount(){return this.hidden.size}sync(e,t,o){let r=[],i;for(let f of t.layers){if(!f.id.startsWith(Sf)||f.type!=="fill"||!t.layerVisibleAt(f,o))continue;let d=t.bucketKeyFor(f);d&&(r.push(d),i??(i=e.get(f.source??X)));}if(!r.length||!i){this.parts&&this.destroy();return}let a=r.join(",")+"|"+i.visibleTiles.map(f=>f.dataKey+(i.getTile(f)?.data?"+":"-")).join(",");if(a===this.stamp)return;this.stamp=a,this.free();let l=[],s=1/0,c=1/0,u=-1/0,m=-1/0;for(let f of i.visibleTiles){let d=i.getTile(f)?.data?.buckets;if(d)for(let h of r){let p=d[h];if(!p||p.kind!=="fill")continue;let b=Zr(p,f);l.push(b);for(let A=0;A<b.length;A+=2)b[A]<s&&(s=b[A]),b[A]>u&&(u=b[A]),b[A+1]<c&&(c=b[A+1]),b[A+1]>m&&(m=b[A+1]);}}this.parts=l.length?l:null,this.box=l.length?[s,c,u,m]:null,this.hidden.clear(),this.collected.clear();}collectHidden(e,t){let o=this.parts;if(!o||!e.featureIds)return;let r=new Uint32Array(e.indices),i=new Float64Array(e.featureIds),a=new DataView(e.vertices),l=t.bounds(),s=(l.maxX-l.minX)/e.extent,c=this.box,u=new P;for(let m=0;m*3<r.length;m++){let f=i[m];if(this.hidden.has(f))continue;let d=u.get(f);d||u.set(f,d=[1/0,1/0,-1/0,-1/0]);for(let h=0;h<3;h++){let p=r[m*3+h]*Fe,b=a.getInt16(p,true),A=a.getInt16(p+2,true);b<d[0]&&(d[0]=b),A<d[1]&&(d[1]=A),b>d[2]&&(d[2]=b),A>d[3]&&(d[3]=A);}}for(let[m,f]of u){let d=l.minX+(f[0]+f[2])/2*s,h=l.minY+(f[1]+f[3])/2*s;c&&(d<c[0]||d>c[2]||h<c[1]||h>c[3])||We(o,d,h,0)&&this.hidden.add(m);}}destroy(){this.parts=null,this.hidden.clear(),this.collected.clear(),this.box=null,this.stamp="",this.free();}free(){this.cache.forEach(e=>{e?.vao.destroy(),e?.ibo.destroy();}),this.cache.clear();}prepare(e,t){if(!this.parts)return;let o=this.hidden.size;for(let r of e.visibleTiles){if(this.collected.has(r.dataKey))continue;let i=e.getTile(r)?.data?.buckets?.[t];!i||i.kind!=="fill-extrusion"||(this.collected.add(r.dataKey),this.collectHidden(i,r));}this.hidden.size!==o&&this.free();}indicesFor(e,t,o,r,i,a){if(!this.parts)return null;let l=this.cache.get(r.dataKey);if(l!==void 0)return l;let s=t.data?.buckets?.[o];if(!s)return null;let c=null;if(s.kind==="fill-extrusion"&&s.featureIds&&this.hidden.size){let u=new Uint32Array(s.indices),m=new Float64Array(s.featureIds),f=[];for(let d=0;d*3<u.length;d++)this.hidden.has(m[d])||f.push(u[d*3],u[d*3+1],u[d*3+2]);if(f.length<u.length){let d=new fe(e,new Uint32Array(f));c={vao:new le(e,[{buffer:i,locations:a}],d),ibo:d,count:f.length};}}return this.cache.set(r.dataKey,c),c}};var qa=35,Lf=70,Hf=.35,Tf=.5,Pf=1.1;function gt(n,e){let t=e.sky;if(!t.enabled||t.fogIntensity<=0)return {near:0,far:1/0,intensity:0,cutoff:1/0};let o=n.cameraToCenterDistance,r=ve((n.pitch-qa)/(Lf-qa),0,1),i=t.fogRange[0]*(1-Hf*r)*o,a=t.fogRange[1]*(1-Tf*r)*o,l=Math.min(1,t.fogIntensity+(1-t.fogIntensity)*Math.min(1,r*2)),s=l>=.995?a*Pf:1/0;return {near:i,far:a,intensity:l,cutoff:s}}function tn(n,e,t,o){let r=o.x/Math.max(n.width,1)*2-1,i=1-o.y/Math.max(n.height,1)*2,a=null,l=new Float64Array(16),s=[0,0,0,0],c=[0,0,0,0];for(let u of e.visibleTiles){let m=e.getTile(u),f=m&&$a(m,t);if(!f||!ke(l,n.tileMatrix64(u,f.extent))||(ae(s,l,[r,i,-1,1]),ae(c,l,[r,i,1,1]),s[3]===0||c[3]===0))continue;let d=s[0]/s[3],h=s[1]/s[3],p=s[2]/s[3],b=c[0]/c[3]-d,A=c[1]/c[3]-h,y=c[2]/c[3]-p,g=Gf(f,d,h,p,b,A,y);g&&(!a||g.t<a.distance)&&(a={featureId:g.featureId,tile:u,layerId:t,distance:g.t});}return a}function on(n,e,t,o){let r=o.x/Math.max(n.width,1)*2-1,i=1-o.y/Math.max(n.height,1)*2,a=null,l=new Float64Array(16),s=[0,0,0,0],c=[0,0,0,0];for(let u of e.visibleTiles){let m=e.getTile(u);if(m)for(let f of t){let d=m.data?.buckets?.[f];if(!d||d.kind!=="fill"||!d.featureIds||!ke(l,n.tileMatrix64(u,d.extent))||(ae(s,l,[r,i,-1,1]),ae(c,l,[r,i,1,1]),s[3]===0||c[3]===0))continue;let h=s[0]/s[3],p=s[1]/s[3],b=s[2]/s[3],A=c[2]/c[3]-b;if(Math.abs(A)<1e-9)continue;let y=-b/A;if(y<0||y>1)continue;let g=h+(c[0]/c[3]-h)*y,B=p+(c[1]/c[3]-p)*y,C=kf(d,g,B);C!==null&&(!a||y<a.distance)&&(a={featureId:C,tile:u,layerId:f,distance:y});}}return a}function kf(n,e,t){let o=new DataView(n.vertices),r=new Uint32Array(n.indices),i=new Float64Array(n.featureIds),a=s=>o.getInt16(s*Ue,true),l=s=>o.getInt16(s*Ue+2,true);for(let s=0;s*3<r.length;s++){let c=r[s*3],u=r[s*3+1],m=r[s*3+2],f=a(c),d=l(c),h=a(u),p=l(u),b=a(m),A=l(m),y=(e-h)*(d-p)-(f-h)*(t-p),g=(e-b)*(p-A)-(h-b)*(t-A),B=(e-f)*(A-d)-(b-f)*(t-d),C=y<0||g<0||B<0,v=y>0||g>0||B>0;if(!(C&&v))return i[s]}return null}function $a(n,e){let t=n.data?.buckets?.[e];return !t||t.kind!=="fill-extrusion"||!t.featureIds?null:t}function Gf(n,e,t,o,r,i,a){let l=new DataView(n.vertices),s=new Uint32Array(n.indices),c=new Float64Array(n.featureIds),u=p=>l.getInt16(p*Fe,true),m=p=>l.getInt16(p*Fe+2,true),f=p=>l.getUint16(p*Fe+4,true)/dt,d=1/0,h=-1;for(let p=0;p+2<s.length;p+=3){let b=s[p],A=s[p+1],y=s[p+2],g=u(b),B=m(b),C=f(b),v=u(A)-g,_=m(A)-B,w=f(A)-C,x=u(y)-g,D=m(y)-B,I=f(y)-C,E=i*I-a*D,L=a*x-r*I,M=r*D-i*x,S=v*E+_*L+w*M;if(S>-1e-9&&S<1e-9)continue;let F=1/S,T=e-g,k=t-B,H=o-C,G=(T*E+k*L+H*M)*F;if(G<0||G>1)continue;let N=k*w-H*_,R=H*v-T*w,W=T*_-k*v,V=(r*N+i*R+a*W)*F;if(V<0||G+V>1)continue;let j=(x*N+D*R+I*W)*F;j<0||j>1||j>=d||(d=j,h=c[p/3]??0);}return h>=0?{featureId:h,t:d}:null}function Uo(n,e,t){let o=$a(n,e);if(!o)return null;let r=new Uint32Array(o.indices),i=new Float64Array(o.featureIds),a=[];for(let l=0;l+2<r.length;l+=3)i[l/3]===t&&a.push(r[l],r[l+1],r[l+2]);return a.length?{vertices:o.vertices,indices:new Uint32Array(a)}:null}var Bt=24,rn=8,Rf=2,Of=12,Jo=8,Xo=8;function Yt(n){let e=0;for(let d of n)e+=d.length/2;if(e<2)return null;let t=(Jo+2)*2,o=e*t+n.length*(Xo+2)*2+8,r=e*(Jo+2)*6+n.length*Xo*6+24,i=new ArrayBuffer(o*Bt),a=new DataView(i),l=new Uint32Array(r),s=0,c=0,u=(d,h,p,b,A,y)=>{let g=s*Bt;return a.setFloat32(g,d,true),a.setFloat32(g+4,h,true),a.setFloat32(g+8,p,true),a.setFloat32(g+12,b,true),a.setFloat32(g+16,A,true),a.setFloat32(g+20,y,true),s++},m=(d,h,p,b)=>{l[c++]=d,l[c++]=h,l[c++]=b,l[c++]=d,l[c++]=b,l[c++]=p;},f=(d,h,p,b,A,y,g)=>{let B=u(d,h,0,0,0,g),C=u(d,h,p,b,1,g);for(let v=1;v<=Xo;v++){let _=Math.PI*v/Xo,w=p*Math.cos(_)+A*Math.sin(_),x=b*Math.cos(_)+y*Math.sin(_),D=u(d,h,w,x,1,g);l[c++]=B,l[c++]=C,l[c++]=D,C=D;}};for(let d of n){let h=Wf(d),p=h.length/2;if(p<2)continue;let b=new Float64Array(p-1),A=new Float64Array(p-1);for(let v=0;v<p-1;v++){let _=h[v*2+2]-h[v*2],w=h[v*2+3]-h[v*2+1],x=Math.hypot(_,w)||1;b[v]=_/x,A[v]=w/x;}let y=0,g=-1,B=-1;for(let v=0;v<p;v++){let _=h[v*2],w=h[v*2+1];v>0&&(y+=Math.hypot(_-h[v*2-2],w-h[v*2-1]));let x=v>0?v-1:0,D=v<p-1?v:p-2,I=-A[x],E=b[x],L=-A[D],M=b[D],S=I+L,F=E+M,T=Math.hypot(S,F);T>1e-9?(S/=T,F/=T):(S=I,F=E);let k=S*L+F*M,H=k>1e-6?1/k:1/0,G=Math.acos(Math.min(1,Math.max(-1,b[x]*b[D]+A[x]*A[D])));if(!(G>Of*Math.PI/180)&&H<=Rf){let R=u(_,w,S*H,F*H,1,y),W=u(_,w,-S*H,-F*H,-1,y);g>=0&&m(g,B,R,W),g=R,B=W;}else {let R=Math.max(1,Math.min(Jo,Math.ceil(G/(Math.PI/Jo)))),V=b[x]*A[D]-A[x]*b[D]>=0?1:-1,j=u(_,w,I,E,1,y),Y=u(_,w,-I,-E,-1,y);g>=0&&m(g,B,j,Y);for(let oe=1;oe<=R;oe++){let ge=V*G*(oe/R),$=Math.cos(ge),J=Math.sin(ge),be=I*$-E*J,Ae=I*J+E*$,Q=u(_,w,be,Ae,1,y),K=u(_,w,-be,-Ae,-1,y);m(j,Y,Q,K),j=Q,Y=K;}g=j,B=Y;}}let C=p-2;f(h[0],h[1],-A[0],b[0],-b[0],-A[0],0),f(h[(p-1)*2],h[(p-1)*2+1],-A[C],b[C],b[C],A[C],y);}return c?{vertices:i.slice(0,s*Bt),indices:l.slice(0,c),vertexCount:s}:null}function nn(n){if(!n.length||n[0].length<6)return null;let e=[],t=[];for(let i=0;i<n[0].length;i++)e.push(n[0][i]);for(let i=1;i<n.length;i++)if(!(n[i].length<6)){t.push(e.length/2);for(let a=0;a<n[i].length;a++)e.push(n[i][a]);}let o=Se(e,t.length?t:void 0,2);if(!o.length)return null;let r=new Uint32Array(o.length);for(let i=0;i<o.length;i+=3)r[i]=o[i],r[i+1]=o[i+2],r[i+2]=o[i+1];return {vertices:new Float32Array(e).buffer,indices:r,vertexCount:e.length/2}}function Wf(n){let e=[];for(let t=0;t<n.length;t+=2){let o=n[t],r=n[t+1],i=e.length;i>=2&&e[i-2]===o&&e[i-1]===r||e.push(o,r);}return e}var Zt=5126,Vf={stride:rn,attribs:[{name:"a_pos",size:2,type:Zt,offset:0}]},ln={stride:Bt,attribs:[{name:"a_pos",size:2,type:Zt,offset:0},{name:"a_extrude",size:2,type:Zt,offset:8},{name:"a_side",size:1,type:Zt,offset:16},{name:"a_dist",size:1,type:Zt,offset:20}]},an=class{constructor(e,t){this.revision=e;this.parts=t;}destroy(){for(let e of this.parts)e.vao.destroy(),e.vbo.destroy(),e.ibo.destroy();}},zf=(n,e)=>[n[0],n[1],n[2],n[3]*e],Qt=class{constructor(){this.objects=[];this.markers=[];this.gpu=new P;this.markerHost=null;}setMarkerHost(e){this.markerHost=e;for(let t of this.markers)t.attach(e);}add(e){this.objects.includes(e)||this.objects.push(e);}remove(e){let t=this.objects.indexOf(e);t<0||(this.objects.splice(t,1),this.gpu.get(e.id)?.destroy(),this.gpu.delete(e.id));}addMarker(e){this.markers.includes(e)||(this.markers.push(e),this.markerHost&&e.attach(this.markerHost));}removeMarker(e){let t=this.markers.indexOf(e);t<0||(this.markers.splice(t,1),e.detach());}get all(){return this.objects}get allMarkers(){return this.markers}get isEmpty(){return this.objects.length===0}updateMarkers(e){for(let t of this.markers)t.update(e);}render(e,t,o,r,i,a,l,s=false,c=false){if(!this.objects.length||c&&!this.objects.some(h=>h.ghostOpacity>0))return;this.objects.length>1&&this.objects.sort((h,p)=>h.zIndex-p.zIndex);let u=e.gl.drawingBufferWidth,m=t.width>0?u/t.width:1,f=t.worldSize*m,d=null;for(let h of this.objects){if(!h.visible)continue;let p=h.ghostOpacity;if(c&&p<=0)continue;let b=this.gpuFor(e,h,r,a);if(!b)continue;let A=s?t.shadowObjectMatrix(h.originX,h.originY,h.altitude):null,y=t.objectMatrix(h.originX,h.originY,h.altitude);for(let{part:g,vao:B,ibo:C}of b.parts){if(c&&(g.kind!=="line"||g.arrow))continue;let v=c?zf(g.color,p):g.color;if(g.kind==="fill")d!==o&&(o.use(),l?.(o),d=o),o.setVec4v("u_color",xe(v)),A&&o.setMat4("u_shadow_matrix",A),o.setMat4("u_matrix",y);else {d!==i&&(i.use(),l?.(i),d=i);let _=g.width/2*m,w=f>1e-9?1/f:1;if(i.setVec4v("u_color",xe(v)),i.setFloat("u_half_width",_),i.setFloat("u_offset",(g.offset??0)*m),i.setFloat("u_aa",1),i.setFloat("u_units_per_px",w),i.setFloat("u_units_to_px",f),i.setInt("u_pattern",c?0:g.dashArray?1:g.arrow?2:0),g.dashArray){let[x,D]=g.dashArray;i.setVec2("u_dash",x*m,(x+D)*m);}if(g.arrow){i.setVec4v("u_arrow_color",xe(g.arrowColor??[1,1,1,1]));let x=(g.arrowSize??5)*m;i.setVec3("u_arrow",(g.arrowPeriod??46)*m,Math.max(x*.4,1),Math.min(x,_*.72));}A&&i.setMat4("u_shadow_matrix",A),i.setMat4("u_matrix",y);}B.bind(),e.gl.drawElements(e.gl.TRIANGLES,C.count,C.type,0);}}e.bindVAO(null);}hitTest(e,t,o=4){let r=e.worldSize,i=(a,l,s)=>e.worldPxToPoint(ee(a)*r,te(l)*r,s);for(let a=this.objects.length-1;a>=0;a--){let l=this.objects[a];if(l.visible&&l.hitTest(t,i,o))return l}return null}boundsOf(e){let t=1/0,o=1/0,r=-1/0,i=-1/0;for(let a of e.rings())for(let l of a){let s=Z(l);s.lng<t&&(t=s.lng),s.lng>r&&(r=s.lng),s.lat<o&&(o=s.lat),s.lat>i&&(i=s.lat);}return isFinite(t)?{west:t,south:o,east:r,north:i}:null}gpuFor(e,t,o,r){let i=this.gpu.get(t.id);if(i&&i.revision===t.revision)return i;i?.destroy();let a=[];for(let s of t.build()){let c=s.kind==="fill"?Vf:ln,u=s.kind==="fill"?o:r,m=new ye(e,new Uint8Array(s.mesh.vertices),c),f=new fe(e,s.mesh.indices),d=new le(e,[{buffer:m,locations:u}],f);a.push({part:s,vao:d,vbo:m,ibo:f});}let l=new an(t.revision,a);return this.gpu.set(t.id,l),a.length?l:null}destroy(){for(let e of this.gpu.values())e.destroy();this.gpu.clear();for(let e of this.markers)e.detach();this.markers=[],this.objects=[];}};var jo=32,Jf=1179937895,Xf=1313821514,jf=5130562,Yf={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Zf={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT4:16};async function sn(n){let{json:e,bin:t}=il(n),o=await qf(e,t);return ll(e,t,o)}function Qf(n){let{json:e,bin:t}=il(n);for(let o of e.bufferViews??[])if(o.extensions?.EXT_meshopt_compression)throw new Error("[osmgl] GLB \u0441\u0436\u0430\u0442 meshopt \u2014 \u043D\u0443\u0436\u0435\u043D parseGlbAsync");return ll(e,t,null)}function il(n){let e=new DataView(n);if(e.getUint32(0,true)!==Jf)throw new Error("[osmgl] \u044D\u0442\u043E \u043D\u0435 GLB: \u043D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0438\u0433\u043D\u0430\u0442\u0443\u0440\u0430");if(e.getUint32(4,true)!==2)throw new Error("[osmgl] \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E glTF 2.0");let t=null,o=null,r=12;for(;r+8<=n.byteLength;){let i=e.getUint32(r,true),a=e.getUint32(r+4,true),l=r+8;a===Xf?t=JSON.parse(new TextDecoder().decode(new Uint8Array(n,l,i))):a===jf&&(o=new Uint8Array(n,l,i)),r=l+i+(4-i%4)%4;}if(!t)throw new Error("[osmgl] \u0432 GLB \u043D\u0435\u0442 JSON-\u043A\u0443\u0441\u043A\u0430");return {json:t,bin:o??new Uint8Array(0)}}async function qf(n,e){let t=n.bufferViews??[],o=[];for(let a=0;a<t.length;a++)t[a].extensions?.EXT_meshopt_compression&&o.push(a);if(!o.length)return null;let{MeshoptDecoder:r}=await Promise.resolve().then(()=>(nl(),rl));await r.ready;let i=new Map;for(let a of o){let l=t[a].extensions.EXT_meshopt_compression,s=l.byteOffset??0,c=e.subarray(s,s+l.byteLength),u=new Uint8Array(l.count*l.byteStride);r.decodeGltfBuffer(u,l.count,l.byteStride,c,l.mode,l.filter??"NONE"),i.set(a,u);}return i}function al(n){let e=z();if(n.matrix){for(let w=0;w<16;w++)e[w]=n.matrix[w];return e}Re(e);let[t,o,r]=n.translation??[0,0,0],[i,a,l,s]=n.rotation??[0,0,0,1],[c,u,m]=n.scale??[1,1,1],f=i+i,d=a+a,h=l+l,p=i*f,b=i*d,A=i*h,y=a*d,g=a*h,B=l*h,C=s*f,v=s*d,_=s*h;return e[0]=(1-(y+B))*c,e[1]=(b+_)*c,e[2]=(A-v)*c,e[4]=(b-_)*u,e[5]=(1-(p+B))*u,e[6]=(g+C)*u,e[8]=(A+v)*m,e[9]=(g-C)*m,e[10]=(1-(p+y))*m,e[12]=t,e[13]=o,e[14]=r,e}var $f={5120:127,5121:255,5122:32767,5123:65535};function eu(n){let e=n[0],t=n[1],o=n[2],r=n[4],i=n[5],a=n[6],l=n[8],s=n[9],c=n[10],u=e*(i*c-a*s)-r*(t*c-o*s)+l*(t*a-o*i);if(Math.abs(u)<1e-20)return [1,0,0,0,1,0,0,0,1];let m=1/u;return [(i*c-a*s)*m,(a*l-r*c)*m,(r*s-i*l)*m,(o*s-t*c)*m,(e*c-o*l)*m,(t*l-e*s)*m,(t*a-o*i)*m,(o*r-e*a)*m,(e*i-t*r)*m]}function ll(n,e,t){let o=w=>{let x=t?.get(w);if(x)return x;let D=n.bufferViews?.[w];if(!D)return null;let I=D.byteOffset??0;return e.subarray(I,I+D.byteLength)},r=[],i=[],a=[],l=[],s=[],c=[1/0,1/0,1/0],u=[-1/0,-1/0,-1/0],m=w=>{if(w===void 0)return null;let x=n.accessors?.[w];if(!x)return null;let D=Zf[x.type]??1,I=new Float64Array(x.count*D),E=x.bufferView!==void 0?n.bufferViews?.[x.bufferView]:void 0;if(!E||x.bufferView===void 0)return {data:I,components:D};let L=o(x.bufferView);if(!L)return {data:I,components:D};let M=Yf[x.componentType]??4,S=E.extensions?.EXT_meshopt_compression,F=S?S.byteStride:E.byteStride,T=F&&F>0?F:M*D,k=x.byteOffset??0,H=new DataView(L.buffer,L.byteOffset,L.byteLength),G=x.normalized?$f[x.componentType]??1:1;for(let N=0;N<x.count;N++)for(let R=0;R<D;R++){let W=k+N*T+R*M,V;switch(x.componentType){case 5120:V=H.getInt8(W);break;case 5121:V=H.getUint8(W);break;case 5122:V=H.getInt16(W,true);break;case 5123:V=H.getUint16(W,true);break;case 5125:V=H.getUint32(W,true);break;default:V=H.getFloat32(W,true);}I[N*D+R]=G===1?V:Math.max(V/G,-1);}return {data:I,components:D}},f=(w,x,D=-1)=>{if(w.mode!==void 0&&w.mode!==4)return;let I=m(w.attributes.POSITION);if(!I)return;let E=m(w.attributes.NORMAL),L=m(w.attributes.TEXCOORD_0),M=m(w.indices),S=r.length/3,F=I.data.length/3,T=eu(x),H=(w.material!==void 0?n.materials?.[w.material]:void 0)?.pbrMetallicRoughness?.baseColorTexture?.extensions?.KHR_texture_transform,G=H?{ox:H.offset?.[0]??0,oy:H.offset?.[1]??0,sx:H.scale?.[0]??1,sy:H.scale?.[1]??1,rot:H.rotation??0}:null;for(let J=0;J<F;J++){let be=I.data[J*3],Ae=I.data[J*3+1],Q=I.data[J*3+2],K=x[0]*be+x[4]*Ae+x[8]*Q+x[12],U=x[1]*be+x[5]*Ae+x[9]*Q+x[13],de=x[2]*be+x[6]*Ae+x[10]*Q+x[14];if(r.push(K,U,de),K<c[0]&&(c[0]=K),U<c[1]&&(c[1]=U),de<c[2]&&(c[2]=de),K>u[0]&&(u[0]=K),U>u[1]&&(u[1]=U),de>u[2]&&(u[2]=de),E){let ne=E.data[J*3],Be=E.data[J*3+1],Me=E.data[J*3+2],Ce=T[0]*ne+T[3]*Be+T[6]*Me,bo=T[1]*ne+T[4]*Be+T[7]*Me,Ao=T[2]*ne+T[5]*Be+T[8]*Me,yo=Math.hypot(Ce,bo,Ao);yo>1e-12?(Ce/=yo,bo/=yo,Ao/=yo):(Ce=0,bo=1,Ao=0),i.push(Ce,bo,Ao);}else i.push(0,1,0);let ie=L?L.data[J*2]:0,he=L?L.data[J*2+1]:0;if(G){if(G.rot!==0){let ne=Math.cos(G.rot),Be=Math.sin(G.rot),Me=ne*ie+Be*he,Ce=-Be*ie+ne*he;ie=Me,he=Ce;}ie=ie*G.sx+G.ox,he=he*G.sy+G.oy;}a.push(ie,he);}let N=l.length;if(M)for(let J=0;J<M.data.length;J++)l.push(S+M.data[J]);else for(let J=0;J<F;J++)l.push(S+J);let R=w.material!==void 0?n.materials?.[w.material]:void 0,W=R?.pbrMetallicRoughness,V=W?.metallicFactor!==void 0||W?.roughnessFactor!==void 0,j=W?.baseColorFactor??[1,1,1,1],Y=W?.baseColorTexture?.index,oe=Y!==void 0?n.textures?.[Y]?.source:void 0,ge=R?.emissiveFactor??[0,0,0],$=R?.extensions?.KHR_materials_emissive_strength?.emissiveStrength??1;s.push({indexOffset:N,indexCount:l.length-N,baseColor:[j[0],j[1],j[2],j[3]??1],metallic:V?W?.metallicFactor??1:0,roughness:V?W?.roughnessFactor??1:1,emissive:[ge[0]*$,ge[1]*$,ge[2]*$],texture:oe??-1,doubleSided:R?.doubleSided===true,blend:R?.alphaMode==="BLEND",alphaCutoff:R?.alphaMode==="MASK"?R.alphaCutoff??.5:.02,node:D});},d=n.skins?.length?null:tu(n,m),h=d?d.nodes:null,p=(w,x,D,I)=>{let E=n.nodes?.[w];if(!E)return;let L=al(E),M=z();we(M,x,L);let S=z(),F=I,T=h?.get(w);if(T?(T.parentNode=I,T.parent=D.slice(),Re(S),F=w):we(S,D,L),E.mesh!==void 0)for(let H of n.meshes?.[E.mesh]?.primitives??[])f(H,S,F);let k=E.extensions?.KHR_lights_punctual?.light;if(k!==void 0){let H=n.extensions?.KHR_lights_punctual?.lights?.[k],G=H?.type;if(H&&(G==="point"||G==="spot"||G==="directional")){let N=-M[8],R=-M[9],W=-M[10],V=Math.hypot(N,R,W)||1,j=H.spot?.innerConeAngle??0,Y=H.spot?.outerConeAngle??Math.PI/4;b.push({type:G,color:[H.color?.[0]??1,H.color?.[1]??1,H.color?.[2]??1],intensity:H.intensity??1,range:H.range??0,position:[M[12],M[13],M[14]],direction:[N/V,R/V,W/V],cosInner:Math.cos(j),cosOuter:Math.cos(Y)});}}for(let H of E.children??[])p(H,M,S,F);},b=[],A=z();Re(A);let y=z();Re(y);let g=n.scenes?.[n.scene??0]?.nodes??n.nodes?.map((w,x)=>x)??[];for(let w of g)p(w,A,y,-1);let B=[];for(let w of n.images??[]){if(w.bufferView===void 0){B.push(new Uint8Array(0));continue}let x=o(w.bufferView);B.push(x?x.slice():new Uint8Array(0));}let C=r.length/3,v=new ArrayBuffer(C*jo),_=new Float32Array(v);for(let w=0;w<C;w++){let x=w*8;_[x]=r[w*3],_[x+1]=r[w*3+1],_[x+2]=r[w*3+2],_[x+3]=i[w*3],_[x+4]=i[w*3+1],_[x+5]=i[w*3+2],_[x+6]=a[w*2],_[x+7]=a[w*2+1];}return isFinite(c[0])||(c[0]=c[1]=c[2]=0,u[0]=u[1]=u[2]=0),{vertices:v,indices:new Uint32Array(l),primitives:s,images:B,min:c,max:u,animation:d,lights:b}}function tu(n,e){let t=n.animations?.[0];if(!t||!t.channels.length)return null;let o=new Map,r=0;for(let i of t.channels){let a=i.target.node,l=i.target.path;if(a===void 0||l!=="translation"&&l!=="rotation"&&l!=="scale")continue;let s=t.samplers[i.sampler];if(!s)continue;let c=e(s.input),u=e(s.output);if(!c||!u||!c.data.length)continue;let m=l==="rotation"?4:3,f=s.interpolation==="CUBICSPLINE",d=c.data.length,h=new Float32Array(d*m);for(let b=0;b<d;b++){let A=f?(b*3+1)*m:b*m;for(let y=0;y<m;y++)h[b*m+y]=u.data[A+y];}let p=o.get(a)??{parentNode:-1,parent:Re(z()),base:ou(n.nodes?.[a]),channels:[]};p.channels.push({path:l,times:Float32Array.from(c.data),values:h,step:s.interpolation==="STEP"}),o.set(a,p),r=Math.max(r,c.data[d-1]);}return o.size?{duration:r||1,nodes:o}:null}function ou(n){let e=n?.translation,t=n?.rotation,o=n?.scale;return {t:[e?.[0]??0,e?.[1]??0,e?.[2]??0],r:[t?.[0]??0,t?.[1]??0,t?.[2]??0,t?.[3]??1],s:[o?.[0]??1,o?.[1]??1,o?.[2]??1]}}function cn(n,e,t,o){let r=n.nodes.get(e);if(!r)return Re(o);let i=z();ru(r,t,i);let a=z();if(we(a,r.parent,i),r.parentNode<0)return sl(o,a);let l=z();return cn(n,r.parentNode,t,l),we(o,l,a)}var sl=(n,e)=>{for(let t=0;t<16;t++)n[t]=e[t];return n};function ru(n,e,t){let o=[...n.base.t],r=[...n.base.r],i=[...n.base.s];for(let a of n.channels){let l=a.times.length,s=a.path==="rotation"?4:3,c=0;for(;c<l-1&&a.times[c+1]<e;)c++;let u=Math.min(c+1,l-1),m=a.times[u]-a.times[c],f=a.step||m<=0?0:Math.min(Math.max((e-a.times[c])/m,0),1),d=c*s,h=u*s;if(a.path==="rotation"){let p=0;for(let y=0;y<4;y++)p+=a.values[d+y]*a.values[h+y];let b=p<0?-1:1,A=0;for(let y=0;y<4;y++)r[y]=a.values[d+y]*(1-f)+a.values[h+y]*b*f,A+=r[y]*r[y];A=Math.sqrt(A)||1;for(let y=0;y<4;y++)r[y]/=A;}else {let p=a.path==="translation"?o:i;for(let b=0;b<3;b++)p[b]=a.values[d+b]*(1-f)+a.values[h+b]*f;}}return sl(t,al({translation:o,rotation:r,scale:i}))}var Ee=5126,nu=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),cl={stride:jo,attribs:[{name:"a_pos",size:3,type:Ee,offset:0},{name:"a_normal",size:3,type:Ee,offset:12},{name:"a_tex",size:2,type:Ee,offset:24}]},un=class{constructor(e,t,o,r){this.vao=e;this.vbo=t;this.ibo=o;this.textures=r;this.users=0;this.instVao=null;}destroy(e){this.vao.destroy(),this.instVao?.destroy(),this.vbo.destroy(),this.ibo.destroy();for(let t of this.textures)t&&e.deleteTexture(t);}},fn=256,Yo=41,fl={stride:Yo*4,attribs:[{name:"a_i_m0",size:4,type:Ee,offset:0,divisor:1},{name:"a_i_m1",size:4,type:Ee,offset:16,divisor:1},{name:"a_i_m2",size:4,type:Ee,offset:32,divisor:1},{name:"a_i_m3",size:4,type:Ee,offset:48,divisor:1},{name:"a_i_s0",size:4,type:Ee,offset:64,divisor:1},{name:"a_i_s1",size:4,type:Ee,offset:80,divisor:1},{name:"a_i_s2",size:4,type:Ee,offset:96,divisor:1},{name:"a_i_s3",size:4,type:Ee,offset:112,divisor:1},{name:"a_i_n0",size:3,type:Ee,offset:128,divisor:1},{name:"a_i_n1",size:3,type:Ee,offset:140,divisor:1},{name:"a_i_n2",size:3,type:Ee,offset:152,divisor:1}]},qt=2,Ct=16,je=class{constructor(){this.models=[];this.gpu=new P;this.counted=new Set;this.instBuffer=null;this.instScratch=new Float32Array(fn*Yo);this.drawnInstanced=new Set;this.onLoaded=null;this.growDurationSec=.45;this.fadeDurationSec=.6;this.transitioning=false;this.depthTimeSec=0;this.lightPacks=new WeakMap;this.shadow32=new Float32Array(16);this.shadowNode32=new Float32Array(16);this.shadowNodeColor32=new Float32Array(16);}add(e){this.models.includes(e)||(this.models.push(e),e.isLoaded||e.load(()=>this.onLoaded?.()));}remove(e,t){let o=this.models.indexOf(e);if(o<0)return;this.models.splice(o,1);let r=this.gpu.get(e.url);r&&(this.counted.delete(e)&&r.users--,!(r.users>0)&&(t&&r.destroy(t),this.gpu.delete(e.url)));}get all(){return this.models}get hasTransitions(){return this.transitioning}get hasAnimated(){return this.models.some(e=>e.isAnimated)}get isEmpty(){return this.models.length===0}get readyCount(){return this.models.filter(e=>e.visible&&e.isLoaded).length}render(e,t,o,r,i,a,l=0,s){if(this.models.length){this.drawnInstanced.clear(),s&&this.renderInstanced(e,t,s.shader,s.locations,i,a),o.use(),i(o),o.setInt("u_base_texture",qt);for(let c of this.models){if(this.drawnInstanced.has(c)||!this.inView(t,c))continue;let u=c.visible&&c.fade>0?this.gpuFor(e,c,r):null;if(!u||!c.mesh)continue;let m=c.fade<1;o.setFloat("u_opacity",c.fade);let f=c.matrixFor(t);o.setMat4("u_matrix",f),o.setMat3("u_normal_matrix",c.normalMatrix());let d=a?this.shadowMatrix(t,c):null;this.uploadLights(o,c.mesh);let h=c.cameraInModelSpace(t);o.setVec3("u_camera_model",h[0],h[1],h[2]),o.setFloat("u_reflect",1),u.vao.bind();for(let p of [false,true])if(!(m&&!p))for(let b of c.mesh.primitives){if(!m&&b.blend!==p)continue;o.setMat4("u_matrix",b.node>=0?c.matrixForNode(t,b.node,l):f),d&&o.setMat4("u_shadow_matrix",b.node>=0?this.shadowMatrixForNodeAt(t,c,b.node,l):d);let A=b.texture>=0?u.textures[b.texture]:null;o.setFloat("u_has_texture",A?1:0),o.setFloat("u_alpha_cutoff",b.alphaCutoff),A&&e.bindTexture(qt,A),o.setVec4v("u_base_color",b.baseColor),o.setVec3("u_emissive",b.emissive[0],b.emissive[1],b.emissive[2]),o.setFloat("u_metallic",b.metallic),o.setFloat("u_roughness",b.roughness),e.setCull(b.doubleSided?"none":"back"),e.setBlend(p?"premultiplied":"none"),e.setDepthMask(!p),e.gl.drawElements(e.gl.TRIANGLES,b.indexCount,e.gl.UNSIGNED_INT,b.indexOffset*4);}}e.bindVAO(null),e.setCull("back"),e.setBlend("premultiplied"),e.setDepthMask(true);}}renderInstanced(e,t,o,r,i,a){let l=new P;for(let c of this.models){if(!c.visible||c.fade<1||!c.mesh||!c.isLoaded||!this.inView(t,c)||c.mesh.primitives.some(m=>m.blend||m.node>=0))continue;let u=l.get(c.url);u?u.push(c):l.set(c.url,[c]);}let s=false;o.setFloat("u_reflect",0);for(let[,c]of l){if(c.length<2)continue;let u=this.gpuFor(e,c[0],r);if(!u||!c[0].mesh)continue;this.instBuffer||(this.instBuffer=new ye(e,this.instScratch,fl,true)),u.instVao||(u.instVao=new le(e,[{buffer:u.vbo,locations:r},{buffer:this.instBuffer,locations:r}],u.ibo)),s||(o.use(),i(o),o.setInt("u_base_texture",qt),o.setFloat("u_opacity",1),s=true);let m=c[0].mesh;for(let f=0;f<c.length;f+=fn){let d=Math.min(fn,c.length-f);for(let h=0;h<d;h++){let p=c[f+h],b=h*Yo;this.instScratch.set(p.matrixFor(t),b);let A=a?this.shadowMatrix(t,p):nu;this.instScratch.set(A,b+16),this.instScratch.set(p.normalMatrix(),b+32),this.drawnInstanced.add(p);}this.instBuffer.update(this.instScratch.subarray(0,d*Yo)),e.bindVAO(u.instVao.vao);for(let h of m.primitives){let p=h.texture>=0?u.textures[h.texture]:null;o.setFloat("u_has_texture",p?1:0),o.setFloat("u_alpha_cutoff",h.alphaCutoff),p&&e.bindTexture(qt,p),o.setVec4v("u_base_color",h.baseColor),o.setVec3("u_emissive",h.emissive[0],h.emissive[1],h.emissive[2]),o.setFloat("u_metallic",h.metallic),o.setFloat("u_roughness",h.roughness),e.setCull(h.doubleSided?"none":"back"),e.setBlend("none"),e.setDepthMask(true),e.gl.drawElementsInstanced(e.gl.TRIANGLES,h.indexCount,e.gl.UNSIGNED_INT,h.indexOffset*4,d);}}}s&&e.bindVAO(null);}uploadLights(e,t){let o=this.lightPacks.get(t);if(!o){let r=t.lights.filter(u=>u.type!=="directional"),i=r.length<=Ct?r:[...r].sort((u,m)=>m.intensity-u.intensity).slice(0,Ct),a=new Float32Array(Ct*4),l=new Float32Array(Ct*4),s=new Float32Array(Ct*4),c=new Float32Array(Ct*4);i.forEach((u,m)=>{let f=m*4;a[f]=u.position[0],a[f+1]=u.position[1],a[f+2]=u.position[2],a[f+3]=u.range,l[f]=u.color[0]*u.intensity,l[f+1]=u.color[1]*u.intensity,l[f+2]=u.color[2]*u.intensity,l[f+3]=u.type==="spot"?1:0,s[f]=u.direction[0],s[f+1]=u.direction[1],s[f+2]=u.direction[2],c[f]=u.cosInner,c[f+1]=u.cosOuter;}),o={count:i.length,pos:a,color:l,dir:s,cone:c},this.lightPacks.set(t,o);}e.setInt("u_light_count",o.count),o.count!==0&&(e.setVec4Array("u_light_pos",o.pos),e.setVec4Array("u_light_color",o.color),e.setVec4Array("u_light_dir",o.dir),e.setVec4Array("u_light_cone",o.cone));}inView(e,t){if(!t.mesh)return false;let r=t.origin(),i=t.boundingRadiusM();return e.isSphereVisible(r.x,r.y,t.altitude+i*.5,i)}advanceTransitions(){this.transitioning=false;for(let e of this.models)e.advanceGrow(this.growDurationSec)&&(this.transitioning=true),e.advanceFade(this.fadeDurationSec)&&(this.transitioning=true);}renderDepth(e,t,o,r){if(this.models.length){o.use();for(let i of this.models){let a=i.visible&&i.fade>.5?this.gpuFor(e,i,r):null;if(!a||!i.mesh)continue;let l=this.shadowMatrix(t,i);o.setMat4("u_matrix",l),a.vao.bind();for(let s of i.mesh.primitives)s.blend||(o.setMat4("u_matrix",s.node>=0?this.shadowMatrixForNode(t,i,s.node):l),e.gl.drawElements(e.gl.TRIANGLES,s.indexCount,e.gl.UNSIGNED_INT,s.indexOffset*4));}e.bindVAO(null);}}shadowMatrix(e,t){let o=t.origin();return t.matrixInSpace(e.shadowObjectMatrix(o.x,o.y,t.altitude),this.shadow32)}shadowMatrixForNode(e,t,o){return this.shadowMatrixForNodeInto(e,t,o,this.depthTimeSec,this.shadowNode32)}shadowMatrixForNodeAt(e,t,o,r){return this.shadowMatrixForNodeInto(e,t,o,r,this.shadowNodeColor32)}shadowMatrixForNodeInto(e,t,o,r,i){let a=t.origin();return t.matrixInSpaceForNode(e.shadowObjectMatrix(a.x,a.y,t.altitude),o,r,i)}gpuFor(e,t,o){let r=this.gpu.get(t.url);if(r)return this.counted.has(t)||(this.counted.add(t),r.users++),r;if(!t.mesh)return null;let i=e.gl,a=new ye(e,new Uint8Array(t.mesh.vertices),cl),l=new fe(e,t.mesh.indices),s=new le(e,[{buffer:a,locations:o}],l),c=t.bitmaps.map(m=>{if(!m)return null;let f=i.createTexture();return f?(e.bindTexture(qt,f),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,m),i.generateMipmap(i.TEXTURE_2D),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR_MIPMAP_LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.REPEAT),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.REPEAT),f):null}),u=new un(s,a,l,c);return u.users=1,this.counted.add(t),this.gpu.set(t.url,u),u}static get layout(){return cl}static get instanceLayout(){return fl}destroy(e){for(let t of this.gpu.values())t.destroy(e);this.gpu.clear(),this.models=[];}};var dn=4,ul=new q;function iu(n){ul.has(n)||(ul.add(n),console.warn(`[osmgl] ${n}`));}var au=.5,lu=.01,su=300,hn=127,mn=128,$t=5120,qo=5121,eo=5122,dl=5123,to=5126,cu={stride:8,attribs:[{name:"a_pos",size:2,type:to,offset:0}]},pn={stride:Ue,attribs:[{name:"a_pos",size:2,type:eo,offset:0}]},hl={stride:Je,attribs:[{name:"a_p0",size:2,type:eo,offset:0},{name:"a_p1",size:2,type:eo,offset:4},{name:"a_corner",size:2,type:$t,offset:8},{name:"a_ground",size:2,type:$t,offset:10},{name:"a_dist",size:1,type:to,offset:12},{name:"a_width",size:1,type:to,offset:16}]},Zo={stride:Fe,attribs:[{name:"a_pos",size:2,type:eo,offset:0},{name:"a_height",size:1,type:dl,offset:4},{name:"a_tint",size:1,type:qo,normalized:true,offset:6},{name:"a_ao",size:1,type:qo,normalized:true,offset:7},{name:"a_normal",size:3,type:$t,normalized:true,offset:8},{name:"a_kind",size:1,type:qo,offset:11},{name:"a_wall",size:3,type:dl,offset:12}]},fu={flat:0,water:1,foliage:2,sand:3,asphalt:4},uu=[1,9,14,26,3],ml={stride:ht,attribs:[{name:"a_pos",size:2,type:to,offset:0},{name:"a_level",size:1,type:eo,offset:8},{name:"a_normal",size:3,type:$t,normalized:true,offset:10},{name:"a_kind",size:1,type:qo,offset:13},{name:"a_bleed",size:2,type:$t,offset:14}]},bn=class{constructor(e,t,o,r,i,a,l=r){this.vao=e;this.buffer=t;this.ibo=o;this.indexCount=r;this.indexType=i;this.extent=a;this.capIndexOffset=l;this.firstDrawTime=0;}destroy(){this.vao.destroy(),this.buffer.destroy(),this.ibo.destroy();}},bl={enabled:false,resolution:1024,strength:.75,color:"#5a6b86",bias:.25},oo=class{constructor(){this.fill=null;this.surface=null;this.surfaceLocs=new P;this.line=null;this.building=null;this.depth=null;this.groundShadow=null;this.sky=null;this.raster=null;this.rasterLayer=new Ko;this.globeBody=null;this.globeClip=null;this.globeMesh=null;this.quad=null;this.fillLocs=new P;this.lineLocs=new P;this.objectLine=null;this.objectLineLocs=new P;this.buildingLocs=new P;this.shadows={...bl};this.shadowTarget=null;this.shadowPlaceholder=null;this.fog=null;this.shadowActive=false;this.materialTime=0;this.materialAnimating=false;this.stencilIds=new P;this.patternScale=1;this.detailScale=1;this.reliefScale=1;this.allowShadows=true;this.highlight=null;this.highlightGpu=new P;this.highlightKey="";this.groundArrows=new Xt;this.highlightTris=new P;this.fillHighlightGpu=new P;this.fillHighlightKey="";this.footprintKey="";this.highlightFill=null;this.indoorMask=new jt;this.hiddenBuildings=new Set;this.hiddenVenues=new Set;this.hiddenVenueLayer=null;this.hiddenCut=new P;this.hiddenStamp="";this.shadowDepthPerMeter=1;this.shadowTexelMeters=0;this.growDurationMs=350;this.symbols=null;this.objects=null;this.models=new je;this.model=null;this.modelInstanced=null;this.modelDepth=null;this.modelLocs=new P;this.modelInstLocs=new P;}get indoorOpen(){return this.indoorMask.active}syncHiddenStamp(){let e=o=>[...o].sort((r,i)=>r-i).join(","),t=e(this.hiddenBuildings)+"#"+e(this.hiddenVenues);if(t!==this.hiddenStamp){this.hiddenStamp=t;for(let o of this.hiddenCut.values())o?.vao.destroy(),o?.ibo.destroy();this.hiddenCut.clear();}}hiddenFor(e,t){return t?this.hiddenBuildings:e===this.hiddenVenueLayer?this.hiddenVenues:null}cutHidden(e,t,o,r,i,a){if(!a||!a.size)return null;let l=r+"|"+o,s=this.hiddenCut.get(l);if(s!==void 0&&(s===null||s.vbo===i))return s;s&&(s.vao.destroy(),s.ibo.destroy());let c=t.data?.buckets?.[o];if(!c||c.kind!=="fill-extrusion"||!c.featureIds)return null;let u=new Uint32Array(c.indices),m=new Float64Array(c.featureIds),f=[];for(let h=0;h*3<u.length;h++)a.has(m[h])||f.push(u[h*3],u[h*3+1],u[h*3+2]);let d=null;if(f.length<u.length){let h=new fe(e,new Uint32Array(f));d={vao:new le(e,[{buffer:i,locations:this.buildingLocs}],h),ibo:h,count:f.length,vbo:i};}return this.hiddenCut.set(l,d),d}init(e){this.symbols?.init(e),this.fill=new ue(e,"fill",Pa,ka),this.surface=new ue(e,"surface",Na,Ka),this.line=new ue(e,"line",Ga,Ra),this.objectLine=new ue(e,"objectLine",Oa,Wa),this.building=new ue(e,"buildings",Va,za),this.depth=new ue(e,"depth",_a,Xr),this.groundShadow=new ue(e,"groundShadow",Ha,Ta),this.sky=new ue(e,"sky",Ma,Ia),this.raster=new ue(e,"raster",Sa,La),this.globeBody=new ue(e,"globeBody",Ca,va),this.globeClip=new ue(e,"globeClip",wa,xa),this.globeMesh=du(e,this.globeBody),this.model=new ue(e,"model",Da,jr),this.modelInstanced=new ue(e,"model-instanced",Fa,jr),this.modelDepth=new ue(e,"modelDepth",Ea,Xr);for(let i of je.layout.attribs)this.modelLocs.set(i.name,this.model.attribLocation(i.name));for(let i of [...je.layout.attribs,...je.instanceLayout.attribs])this.modelInstLocs.set(i.name,this.modelInstanced.attribLocation(i.name));this.shadowPlaceholder=ga(e);let t=new P([["a_pos",this.groundShadow.attribLocation("a_pos")]]),o=new ye(e,new Float32Array([0,0,1,0,1,1,0,1]),cu),r=new fe(e,new Uint16Array([0,1,2,0,2,3]));this.quad={vao:new le(e,[{buffer:o,locations:t}],r),vbo:o,ibo:r};for(let i of pn.attribs)this.fillLocs.set(i.name,this.fill.attribLocation(i.name));for(let i of ml.attribs)this.surfaceLocs.set(i.name,this.surface.attribLocation(i.name));for(let i of hl.attribs)this.lineLocs.set(i.name,this.line.attribLocation(i.name));for(let i of ln.attribs)this.objectLineLocs.set(i.name,this.objectLine.attribLocation(i.name));for(let i of Zo.attribs)this.buildingLocs.set(i.name,this.building.attribLocation(i.name));}render(e,t,o,r,i,a=new P){if(!this.fill||!this.line||!this.building)return false;let l=t.zoom,s=false;this.materialTime=i/1e3,this.materialAnimating=false,this.fog=gt(t,r),this.patternScale=vo/Math.max(He(t.center.lat),1);let c=f=>o.get(f.source??X);this.syncHighlightFootprint(o,r),this.indoorMask.sync(o,r,l),this.syncHiddenStamp(),this.models.advanceTransitions(),this.renderShadowMap(e,t,o,r,i),this.drawSky(e,t,r),this.drawGlobeBody(e,t,r),this.raster&&this.quad&&this.rasterLayer.render(e,t,this.quad.vao,this.raster,r,a,l),this.drawTileStencil(e,t,o),e.setDepthTest(t.globeActive),e.setDepthFunc("lequal"),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none");let u=f=>f.type==="line"&&O(f.paint.elevation,l,0)!==0;for(let f of r.layers){if(f.type==="raster"||f.type==="fill-extrusion"||f.type==="symbol"||f.overlay||u(f)||!r.layerVisibleAt(f,l))continue;let d=c(f);if(d){if(f.type==="surface"){if(!this.flattened(d,r,f))continue;this.drawFill(e,t,d,r,f,l);continue}f.type==="fill"?this.drawFill(e,t,d,r,f,l):this.drawLine(e,t,d,r,f,l);}}this.drawFillHighlight(e,t,o,r),this.groundArrows&&(this.groundArrows.highlightFootprint=this.highlightFootprint(),this.groundArrows.render(e,t,o,r,this.fill,this.fillLocs,f=>{this.applyFogUniforms(f,t,r),f.setVec4("u_globe",0,0,0,0),f.setInt("u_material",0),f.setFloat("u_elevation",0),f.setVec2("u_world_origin",0,0);},this.shadowActive)),this.drawGroundShadow(e,t,o,r),this.drawEarthDepth(e,t,o,r),e.setDepthTest(true),e.setDepthMask(true),e.setDepthFunc("lequal"),e.setCull("back");for(let f of r.layers){if(f.type!=="surface"||f.overlay||!r.layerVisibleAt(f,l))continue;let d=c(f);d&&(this.flattened(d,r,f)||this.drawSurface(e,t,d,r,f,l));}e.setStencilTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),e.setDepthTest(false);for(let f of r.layers){if(f.type==="raster"||!u(f)||f.overlay||!r.layerVisibleAt(f,l))continue;let d=c(f);d&&this.drawLine(e,t,d,r,f,l);}e.setDepthTest(true),e.setDepthMask(true),e.setCull("back");for(let f of r.layers){if(f.type!=="fill-extrusion"||!r.layerVisibleAt(f,l))continue;let d=c(f);d&&(this.drawBuildings(e,t,d,r,f,l,i)&&(s=true),this.drawHighlight(e,t,d,r,f,l));}this.model&&!this.models.isEmpty&&(this.models.render(e,t,this.model,this.modelLocs,f=>{this.applyShadowUniforms(f),this.applyFogUniforms(f,t,r),this.applyLight(f,r);},this.shadowActive,i/1e3,this.modelInstanced?{shader:this.modelInstanced,locations:this.modelInstLocs}:void 0),(this.models.hasAnimated||this.models.hasTransitions)&&(s=true)),e.setDepthTest(false),e.setDepthMask(false),e.setCull("none");for(let f of r.layers){if(f.type==="raster"||!f.overlay||f.type==="symbol"||f.type==="fill-extrusion"||!r.layerVisibleAt(f,l))continue;let d=c(f);if(d){if(f.type==="surface"){this.flattened(d,r,f)?this.drawFill(e,t,d,r,f,l):this.drawSurface(e,t,d,r,f,l),e.setDepthTest(false),e.setDepthMask(false),e.setCull("none");continue}f.type==="fill"?this.drawFill(e,t,d,r,f,l):this.drawLine(e,t,d,r,f,l);}}this.objects&&!this.objects.isEmpty&&(e.setDepthTest(true),e.setDepthFunc("lequal"),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),this.objects.render(e,t,this.fill,this.fillLocs,this.objectLine,this.objectLineLocs,f=>{this.applyFogUniforms(f,t,r),f.setVec4("u_globe",0,0,0,0),f.setInt("u_material",0),f.setFloat("u_elevation",0),f.setVec2("u_world_origin",0,0);},this.shadowActive),e.setDepthTest(false)),this.raster&&this.quad&&this.rasterLayer.render(e,t,this.quad.vao,this.raster,r,a,l,true);let m=r.layers.filter(f=>f.type==="line"&&O(f.paint.ghostOpacity,l,0)>.001&&r.layerVisibleAt(f,l));if(m.length){e.setDepthTest(true),e.setDepthFunc("greater"),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none");for(let f of m){let d=c(f);d&&this.drawLine(e,t,d,r,f,l,O(f.paint.ghostOpacity,l,0));}e.setDepthFunc("lequal"),e.setDepthTest(false);}return this.objects&&!this.objects.isEmpty&&(e.setDepthTest(true),e.setDepthFunc("greater"),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),this.objects.render(e,t,this.fill,this.fillLocs,this.objectLine,this.objectLineLocs,f=>{this.applyFogUniforms(f,t,r),f.setVec4("u_globe",0,0,0,0),f.setInt("u_material",0),f.setFloat("u_elevation",0),f.setVec2("u_world_origin",0,0);},this.shadowActive,true),e.setDepthFunc("lequal"),e.setDepthTest(false)),this.symbols&&(this.symbols.highlightFootprint=this.highlightFootprint()),this.symbols?.render(e,t,o,r),e.bindVAO(null),s||this.materialAnimating}renderShadowMap(e,t,o,r,i){if(this.shadowPlaceholder&&e.bindTexture(dn,this.shadowPlaceholder),this.shadowActive=false,!this.shadows.enabled||!this.allowShadows||!this.depth)return;let a=r.layers.filter(m=>m.type==="fill-extrusion"&&!m.overlay&&r.layerVisibleAt(m,t.zoom));if(!a.length&&this.models.isEmpty)return;this.shadowTarget?this.shadowTarget.resize(this.shadows.resolution):this.shadowTarget=new Ut(e,this.shadows.resolution);let l=r.light;if(t.updateShadow(Qo(l.keyAzimuth,l.keyAltitude),su),!t.shadowReady)return;let s=this.shadowTarget;s.bind(),e.setDepthFunc("lequal"),e.setBlend("none"),e.setCull("none");let c=e.gl;c.enable(c.POLYGON_OFFSET_FILL),c.polygonOffset(2,4);let u=this.depth;u.use();for(let m of a){let f=o.get(m.source??X);if(!f)continue;let d=r.bucketKeyFor(m);if(d===null)continue;let h=O(m.paint.heightScale,t.zoom,1);(m.source??X)===X&&this.indoorMask.prepare(f,d);for(let p of f.visibleTiles){if(!this.drawsTile(t,r,m,p))continue;let b=f.getTile(p),A=b&&this.bucketFor(e,b,d,Zo,this.buildingLocs,"fill-extrusion");if(!A)continue;u.setFloat("u_height_scale",this.growScale(A,i,!f.warm)*h),u.setMat4("u_matrix",t.shadowTileMatrix(p,A.extent));let y=(m.source??X)===X,g=this.cutHidden(e,b,d,p.dataKey,A.buffer,this.hiddenFor(d,y)),B=y?g??this.indoorMask.indicesFor(e,b,d,p,A.buffer,this.buildingLocs):g;B?(B.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,B.count,e.gl.UNSIGNED_INT,0)):(A.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,A.indexCount,A.indexType,0));}}this.modelDepth&&(this.models.depthTimeSec=i/1e3,e.gl.polygonOffset(6,96),this.models.renderDepth(e,t,this.modelDepth,this.modelLocs),e.gl.polygonOffset(2,4)),c.disable(c.POLYGON_OFFSET_FILL),e.bindFramebuffer(null),e.viewport(0,0,e.gl.drawingBufferWidth,e.gl.drawingBufferHeight),s.bindTexture(dn),this.shadowDepthPerMeter=t.shadowDepthPerMeter(),this.shadowTexelMeters=Math.abs(t.shadowTexelWorldSize(s.size))/(t.pixelsPerMeter||1),this.shadowActive=true;}drawGlobeBody(e,t,o){if(!t.globeActive||!this.globeBody||!this.globeMesh)return;let r=this.globeBody;r.use(),this.applyGlobeUniforms(r,t),r.setMat4("u_matrix",t.localMatrix());let i=o.background;r.setVec3("u_body_color",i[0],i[1],i[2]),Ve(r,"u_atmo_color",o.sky.horizonColor),r.setFloat("u_atmo_strength",o.sky.enabled?1-t.globeFlatMix:0),e.setBlend("none"),e.setDepthTest(true),e.setDepthMask(true),e.setDepthFunc("less"),e.setCull("none"),this.globeMesh.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,this.globeMesh.count,e.gl.UNSIGNED_SHORT,0),e.bindVAO(null),this.drawGlobeClip(e,t),e.setBlend("premultiplied"),e.setDepthTest(false),e.setDepthMask(false);}drawGlobeClip(e,t){if(!this.globeClip||!this.quad)return;let o=e.gl,r=[0,0,-t.globeRadiusPx,1],i=[0,0,0,0];if(ae(i,t.localProjMatrix,r),i[3]<=1e-6)return;let a=this.globeClip;a.use(),a.setFloat("u_center_depth",i[2]/i[3]),o.colorMask(false,false,false,false),e.setDepthTest(true),e.setDepthMask(true),e.setDepthFunc("always"),this.quad.vao.bind(),o.drawElements(o.TRIANGLES,6,o.UNSIGNED_SHORT,0),o.colorMask(true,true,true,true),e.bindVAO(null);}drawSky(e,t,o){if(!this.sky||!this.quad||!o.sky.enabled)return;let r=this.sky;r.use(),Ve(r,"u_sky_color",o.sky.skyColor),Ve(r,"u_horizon_color",o.sky.horizonColor);let i=t.width>0?e.gl.drawingBufferWidth/t.width:1,a=t.horizonScreenY(),l=(t.height-a)*i,s=Math.max(a,1)*i,c=Math.min(s*.5,t.height*i*.1);r.setVec3("u_sky_params",l,o.sky.horizonBlend*s,c);let u=t.globeActive?1-t.globeFlatMix:0;if(r.setVec2("u_space",u,o.sky.starIntensity),u>.001){Ve(r,"u_space_color",o.sky.spaceColor),Ve(r,"u_atmo_color",o.sky.atmosphereColor);let m=t.globeDisc();r.setVec4("u_globe_disc",m.dir[0],m.dir[1],m.dir[2],m.angle);let[f,d,h,p]=t.localRayCorners();r.setVec3("u_ray_tl",f[0],f[1],f[2]),r.setVec3("u_ray_tr",d[0],d[1],d[2]),r.setVec3("u_ray_bl",h[0],h[1],h[2]),r.setVec3("u_ray_br",p[0],p[1],p[2]);}e.setDepthTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),this.quad.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,6,e.gl.UNSIGNED_SHORT,0),e.bindVAO(null);}applyGlobeUniforms(e,t){if(!t.globeActive){e.setVec4("u_globe",0,0,0,0);return}let o=t.globeBasis,r=t.worldSize;e.setVec4("u_globe",1,t.globeFlatMix,t.globeRadiusPx,r),e.setVec2("u_globe_center",t.centerPointPx.x/r,t.centerPointPx.y/r);let i=t.globeCamera();e.setVec4("u_globe_cam",i.dir[0],i.dir[1],i.dir[2],i.horizonCos),e.setMat3("u_globe_basis",[o.east[0],o.south[0],o.up[0],o.east[1],o.south[1],o.up[1],o.east[2],o.south[2],o.up[2]]);}applyTileMatrix(e,t,o,r){if(t.globeActive){let i=o.bounds();e.setVec3("u_tile_merc",i.minX,i.minY,(i.maxX-i.minX)/r),e.setMat4("u_matrix",t.localMatrix());return}e.setMat4("u_matrix",t.tileMatrix(o,r));}applyFogUniforms(e,t,o){let r=this.fog??gt(t,o);if(r.intensity<=0){e.setVec3("u_fog_range",0,1,0);return}Ve(e,"u_fog_color",o.sky.horizonColor),e.setVec3("u_fog_range",r.near,r.far,r.intensity);}drawsTile(e,t,o,r){let i=this.fog;if(!i)return true;let a=e.distanceToTile(r);return a>i.cutoff?false:t.layerVisibleAt(o,e.detailZoom(a))}earthDepthLevel(e,t){let o=0;for(let i of e.layers)i.type==="surface"?o=Math.min(o,(i.elevation-(i.bevelDrop??0))*this.reliefScale):i.type==="line"&&(o=Math.min(o,O(i.paint.elevation,t.zoom,0)*this.reliefScale));let r=Math.max(au/Math.max(t.pixelsPerMeter,1e-9),lu);return o-r}clipToTile(e,t){let o=this.stencilIds.get(t.dataKey);e.setStencilTest(o!==void 0),o!==void 0&&e.gl.stencilFunc(e.gl.EQUAL,o,hn);}drawTileStencil(e,t,o){this.stencilIds.clear();let r=o.get(X);if(!r||!this.fill||!this.quad)return;let i=r.visibleTiles;if(!i.length||i.length>hn)return;let a=e.gl;a.stencilMask(255),e.clear(null,false,true),e.setStencilTest(true),a.stencilOp(a.KEEP,a.KEEP,a.REPLACE),e.setColorMask(false),e.setDepthTest(false),e.setDepthMask(false),e.setCull("none");let l=this.fill;l.use(),l.setVec4("u_globe",0,0,0,0),l.setInt("u_material",0),l.setVec2("u_world_origin",0,0),l.setVec4("u_color",0,0,0,1),l.setFloat("u_elevation",0),this.quad.vao.bind();let s=0;for(let c of i)s++,this.stencilIds.set(c.dataKey,s),a.stencilFunc(a.ALWAYS,s,hn),l.setMat4("u_matrix",t.tileMatrix(c,1)),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0);e.bindVAO(null),e.setColorMask(true),a.stencilOp(a.KEEP,a.KEEP,a.KEEP),e.setStencilTest(false);}drawEarthDepth(e,t,o,r){if(!this.fill||!this.quad)return;let i=o.get(X);if(!i)return;let a=this.fill;a.use(),this.applyFogUniforms(a,t,r),a.setVec4("u_globe",0,0,0,0),a.setInt("u_material",0),a.setVec2("u_world_origin",0,0),a.setVec4("u_color",0,0,0,1),a.setFloat("u_elevation",0);let l=this.earthDepthLevel(r,t);e.gl.colorMask(false,false,false,false),e.setDepthTest(true),e.setDepthFunc("lequal"),e.setDepthMask(true),e.setCull("none"),e.gl.enable(e.gl.POLYGON_OFFSET_FILL),e.gl.polygonOffset(1,8),this.quad.vao.bind();let s=new Float32Array(16);for(let c of i.visibleTiles){let u=t.tileMatrix(c,1);s.set(u);for(let m=0;m<4;m++)s[12+m]+=l*u[8+m];a.setMat4("u_matrix",s),e.gl.drawElements(e.gl.TRIANGLES,6,e.gl.UNSIGNED_SHORT,0);}e.bindVAO(null),e.gl.disable(e.gl.POLYGON_OFFSET_FILL),e.gl.colorMask(true,true,true,true);}drawGroundShadow(e,t,o,r){if(!this.shadowActive||!this.groundShadow||!this.quad)return;let i=o.get(X);if(!i)return;let a=this.groundShadow;a.use(),this.applyShadowUniforms(a),this.applyFogUniforms(a,t,r);let l=r.light,[,,s]=Qo(l.keyAzimuth,l.keyAltitude),c=Math.max(-s,0),u=ce(l.ambientColor),m=ce(l.keyColor),f=[0,0,0];for(let d=0;d<3;d++){let h=u[d]*l.ambientIntensity,p=m[d]*l.keyIntensity*c;f[d]=h>0?h/(h+p):1;}a.setVec3("u_shadow_ground",f[0],f[1],f[2]),a.setFloat("u_ground_ndotl",c),e.setBlend("multiply"),e.setDepthTest(false),e.setDepthMask(false),e.setCull("none"),this.quad.vao.bind();for(let d of i.visibleTiles)a.setMat4("u_shadow_matrix",t.shadowTileMatrix(d,1)),a.setMat4("u_matrix",t.tileMatrix(d,1)),e.gl.drawElements(e.gl.TRIANGLES,6,e.gl.UNSIGNED_SHORT,0);e.setBlend("premultiplied");}applyShadowUniforms(e){if(e.setInt("u_shadow_map",dn),!this.shadowActive){e.setVec4("u_shadow_params",0,0,0,0);return}let t=this.shadowTarget?.size??1,r=Math.max(this.shadows.bias,1.5*this.shadowTexelMeters)*(this.shadowDepthPerMeter||1);e.setVec4("u_shadow_params",this.shadows.strength,1/t,r,1),e.setFloat("u_shadow_normal_offset",1.5*2/t);let i=ce(this.shadows.color);e.setVec3("u_shadow_color",i[0],i[1],i[2]);}get shadowsActive(){return this.shadowActive}applyTileScale(e,t,o){let r=dr(t.z)/this.patternScale;e.setFloat("u_meters_per_unit",r/o);let[i,a]=Zn(t.z,t.x,t.y);e.setVec2("u_world_origin",i/this.patternScale,a/this.patternScale);}applyMaterial(e,t,o){let r=t.paint&&"material"in t.paint?t.paint.material:void 0,i=this.detailScale<=0?0:fu[r??"flat"]??0;if(e.setInt("u_material",i),i===0)return;let a=t.paint,l=O(a.materialStrength,o,1)*this.detailScale,s=O(a.materialScale,o,uu[i]),c=O(a.materialSpeed,o,i===1?1:0);e.setVec4("u_material_params",l,s,c,this.materialTime),c>0&&l>.004&&(this.materialAnimating=true);}drawFill(e,t,o,r,i,a){let l=this.fill,s=r.colorAt(i,a),c=O(i.paint?.opacity,a,1);if(c<=.001)return;l.use(),this.applyFogUniforms(l,t,r),this.applyGlobeUniforms(l,t),this.applyLight(l,r),this.applyMaterial(l,i,a),l.setVec4v("u_color",xe([s[0],s[1],s[2],s[3]*c]));let u=r.bucketKeyFor(i);if(u!==null){for(let m of o.visibleTiles){if(!this.drawsTile(t,r,i,m))continue;let f=o.getTile(m),d=f&&this.bucketFor(e,f,u,pn,this.fillLocs,"fill");d&&(this.clipToTile(e,m),this.shadowActive&&l.setMat4("u_shadow_matrix",t.shadowTileMatrix(m,d.extent)),this.applyTileScale(l,m,d.extent),this.applyTileMatrix(l,t,m,d.extent),d.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,d.indexCount,d.indexType,0));}e.setStencilTest(false);}}drawLine(e,t,o,r,i,a,l=0){let s=this.line,c=r.colorAt(i,a),u=O(i.paint.opacity,a,1)*(l||1),m=O(i.paint.width,a,1);if(u<=.001||m<=.01)return;let f=e.gl.drawingBufferWidth,d=e.gl.drawingBufferHeight,h=t.width>0?f/t.width:1,p=m/2*h;s.use(),this.applyFogUniforms(s,t,r),this.applyGlobeUniforms(s,t),this.applyLight(s,r),this.applyMaterial(s,i,a),s.setVec4v("u_color",xe([c[0],c[1],c[2],c[3]*u])),s.setFloat("u_center_w",t.cameraToCenterDistance);let b=O(i.paint.offset,a,0)*h;s.setFloat("u_elevation",O(i.paint.elevation,a,0)*this.reliefScale),s.setFloat("u_relief",this.reliefScale),s.setVec2("u_viewport",f,d);let A=i.paint.dashArray,y=i.paint.arrow===true,g=i.paint.arrowStyle,B=y&&(g==="head"||g==="headOnly"),C=y&&g==="dash";if(s.setInt("u_pattern",C?5:A?1:g==="headOnly"&&y?4:B?3:y?2:0),A){let[_,w]=A;s.setVec2("u_dash",_*h,(_+w)*h);}if(y){let _=Le(i.paint.arrowColor,a,[1,1,1,1]);s.setVec4v("u_arrow_color",xe(_));let w=O(i.paint.arrowPeriod,a,46)*h,x=O(i.paint.arrowSize,a,5)*h;if(C){let D=O(i.paint.arrowGap,a,24)*h,I=Math.max(w-D,1),E=Math.min(x,I),L=O(i.paint.arrowShaft,a,2)*h,M=O(i.paint.arrowHead,a,4)*h,S=O(i.paint.arrowOutline,a,0)*h;s.setVec4("u_arrow",L,E,M,I),s.setVec2("u_dash",S,w);}else B?s.setVec4("u_arrow",w,x,p,0):s.setVec4("u_arrow",w,Math.max(x*.4,1),Math.min(x,p*.72),0);}let v=r.bucketKeyFor(i);if(v!==null)for(let _ of o.visibleTiles){if(!this.drawsTile(t,r,i,_))continue;let w=o.getTile(_),x=w&&this.bucketFor(e,w,v,hl,this.lineLocs,"line");if(!x)continue;let D=_.bounds(),I=(D.maxX-D.minX)*t.worldSize/x.extent*h;s.setFloat("u_tile_to_px",I);let E=I>1e-6?1/I:1;s.setFloat("u_half_width",p*E),s.setFloat("u_meters_to_units",t.pixelsPerMeter*E),s.setFloat("u_width_from_data",i.paint.widthFromData===true?1:0),s.setFloat("u_width_extra",O(i.paint.widthExtra,a,0)*E),s.setFloat("u_offset",b*E),s.setFloat("u_tile_per_px",E),this.applyTileScale(s,_,x.extent),this.shadowActive&&s.setMat4("u_shadow_matrix",t.shadowTileMatrix(_,x.extent)),this.applyTileMatrix(s,t,_,x.extent),x.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,x.indexCount,x.indexType,0);}}drawHighlight(e,t,o,r,i,a){let l=this.highlight;if(!l||!this.building||l.layerId!==i.id)return;let s=`${i.id}/${l.featureId}`;this.highlightKey!==s&&(this.disposeHighlight(),this.highlightKey=s);let c=ce(l.color)??[.31,.79,.5,1],u=this.building;u.use(),this.applyShadowUniforms(u),this.applyFogUniforms(u,t,r),this.applyLight(u,r),u.setVec4v("u_wall_color",[c[0],c[1],c[2],1]),u.setVec4v("u_roof_color",[c[0],c[1],c[2],1]),u.setFloat("u_opacity",l.opacity),u.setFloat("u_ao_strength",O(i.paint.aoStrength,a,.4)),u.setFloat("u_tint_variation",0),u.setFloat("u_facade_detail",0),u.setFloat("u_window_glow",0),u.setFloat("u_roof_variation",0),u.setFloat("u_height_scale",O(i.paint.heightScale,a,1)),e.setDepthFunc("lequal"),e.setDepthMask(false),e.setBlend("alpha");for(let m of o.visibleTiles){let f=o.getTile(m);if(!f)continue;let d=f.data?.buckets?.[i.id];if(!d)continue;let h=m.dataKey,p=this.highlightGpu.get(h);if(p===void 0){let b=Uo(f,i.id,l.featureId);if(b){let A=new ye(e,new Uint8Array(b.vertices),Zo),y=new fe(e,b.indices);p={vao:new le(e,[{buffer:A,locations:this.buildingLocs}],y),vbo:A,ibo:y,count:b.indices.length};}else p=null;this.highlightGpu.set(h,p);}p&&(this.applyTileScale(u,m,d.extent),this.shadowActive&&u.setMat4("u_shadow_matrix",t.shadowTileMatrix(m,d.extent)),u.setMat4("u_matrix",t.tileMatrix(m,d.extent)),p.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,p.count,e.gl.UNSIGNED_INT,0));}e.setBlend("none"),e.setDepthMask(true);}refreshHighlight(){this.disposeHighlight();}disposeHighlight(){for(let e of this.highlightGpu.values())e&&(e.vao.destroy(),e.vbo.destroy(),e.ibo.destroy());this.highlightGpu.clear(),this.highlightTris.clear(),this.highlightKey="";}syncHighlightFootprint(e,t){let o=this.highlight;if(!o){this.highlightTris.size&&this.highlightTris.clear();return}let r=`${o.layerId}/${o.featureId}`;this.footprintKey!==r&&(this.highlightTris.clear(),this.footprintKey=r);let i=t.layers.find(s=>s.id===o.layerId),a=e.get(i?.source??X);if(!a)return;let l=new q;for(let s of a.visibleTiles){if(l.add(s.dataKey),this.highlightTris.has(s.dataKey))continue;let c=a.getTile(s),u=c?.data?.buckets?.[o.layerId];if(!c||!u)continue;let m=Uo(c,o.layerId,o.featureId);m&&this.highlightTris.set(s.dataKey,Qr(m,u.extent,s));}for(let s of [...this.highlightTris.keys()])l.has(s)||this.highlightTris.delete(s);}drawFillHighlight(e,t,o,r){let i=this.highlightFill,a=this.fill;if(!i||!a)return;let l=r.layers.find(f=>f.id===i.layerId),s=l?o.get(l.source??X):void 0;if(!l||!s)return;let c=i.bucketKey,u=ce(i.color)??[.31,.79,.5,1];a.use(),this.applyFogUniforms(a,t,r),a.setVec4("u_globe",0,0,0,0),a.setInt("u_material",0),a.setFloat("u_elevation",0),a.setVec2("u_world_origin",0,0),a.setVec4v("u_color",xe([u[0],u[1],u[2],i.opacity])),e.setDepthTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none");let m=e.gl;e.setStencilTest(true),m.stencilFunc(m.NOTEQUAL,mn,mn),m.stencilOp(m.KEEP,m.KEEP,m.REPLACE),m.stencilMask(mn);for(let f of s.visibleTiles){let d=s.getTile(f),h=d?.data?.buckets?.[c];if(!d||!h||h.kind!=="fill"||!h.featureIds)continue;let p=this.fillHighlightFor(e,h,f,i.featureId,c);p&&(a.setMat4("u_matrix",t.tileMatrix(f,h.extent)),p.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,p.count,e.gl.UNSIGNED_INT,0));}e.setStencilTest(false),m.stencilOp(m.KEEP,m.KEEP,m.KEEP),m.stencilMask(255),e.bindVAO(null);}fillHighlightFor(e,t,o,r,i){let a=`${i}/${r}/${o.dataKey}`;this.fillHighlightKey!==`${i}/${r}`&&(this.fillHighlightGpu.forEach(f=>{f?.vao.destroy(),f?.ibo.destroy(),f?.vbo.destroy();}),this.fillHighlightGpu.clear(),this.fillHighlightKey=`${i}/${r}`);let l=this.fillHighlightGpu.get(a);if(l!==void 0)return l;let s=new Uint32Array(t.indices),c=new Float64Array(t.featureIds),u=[];for(let f=0;f*3<s.length;f++)c[f]===r&&u.push(s[f*3],s[f*3+1],s[f*3+2]);let m=null;if(u.length){let f=new ye(e,new Uint8Array(t.vertices),pn),d=new fe(e,new Uint32Array(u));m={vao:new le(e,[{buffer:f,locations:this.fillLocs}],d),vbo:f,ibo:d,count:u.length};}return this.fillHighlightGpu.set(a,m),m}highlightFootprint(){return this.highlight&&this.highlightTris.size?[...this.highlightTris.values()]:this.indoorMask.footprint()}drawSurface(e,t,o,r,i,a){let l=this.surface,s=r.colorAt(i,a,[.7,.8,.7,1]),c=O(i.paint.opacity,a,1);if(c<=.001)return;l.use(),this.applyShadowUniforms(l),this.applyFogUniforms(l,t,r),this.applyLight(l,r),this.applyMaterial(l,i,a),l.setVec4v("u_color",s),l.setFloat("u_opacity",c),l.setFloat("u_side_shade",O(i.paint.sideShade,a,.12));let u=i.elevation<(i.base??0),m=i.paint.sideColor?Le(i.paint.sideColor,a,s):s;l.setVec3("u_side_color",m[0],m[1],m[2]),l.setFloat("u_side_light",O(i.paint.sideLight,a,u?1:0)),l.setFloat("u_relief",this.reliefScale);let f=r.bucketKeyFor(i);if(f===null)return;let d=c>=1&&!i.overlay;e.setDepthMask(d),e.setBlend(d?"none":"premultiplied"),e.setCull("none");let h=[];for(let A of o.visibleTiles){if(!this.drawsTile(t,r,i,A))continue;let y=o.getTile(A),g=y&&this.bucketFor(e,y,f,ml,this.surfaceLocs,"surface");g&&h.push({id:A,bucket:g});}let p=(A,y)=>{this.clipToTile(e,A),this.applyTileScale(l,A,y.extent),this.shadowActive&&l.setMat4("u_shadow_matrix",t.shadowTileMatrix(A,y.extent)),l.setMat4("u_matrix",t.tileMatrix(A,y.extent)),y.vao.bind();},b=h.filter(({bucket:A})=>A.capIndexOffset<A.indexCount);if(b.length){e.setColorMask(false),e.setDepthMask(true);for(let{id:A,bucket:y}of b){p(A,y);let g=y.indexType===e.gl.UNSIGNED_INT?4:2;e.gl.drawElements(e.gl.TRIANGLES,y.indexCount-y.capIndexOffset,y.indexType,y.capIndexOffset*g);}e.setColorMask(true),e.setDepthMask(d);}for(let{id:A,bucket:y}of h)p(A,y),e.gl.drawElements(e.gl.TRIANGLES,y.capIndexOffset,y.indexType,0);e.setCull("back"),e.setDepthMask(true),e.setBlend("none");}drawBuildings(e,t,o,r,i,a,l){let s=this.building,c=r.colorAt(i,a,[.86,.84,.8,1]),u=i.paint.roofColor?r.colorAt({...i,paint:{...i.paint,color:i.paint.roofColor}},a,c):c,m=O(i.paint.opacity,a,1);if(m<=.001)return false;s.use(),this.applyShadowUniforms(s),this.applyFogUniforms(s,t,r),s.setVec4v("u_wall_color",c),s.setVec4v("u_roof_color",u),s.setFloat("u_opacity",m),s.setFloat("u_ao_strength",O(i.paint.aoStrength,a,.4)),s.setFloat("u_tint_variation",O(i.paint.tintVariation,a,.07));let f=(B,C)=>i.paint[B]?r.colorAt({...i,paint:{...i.paint,color:i.paint[B]}},a,C):C,d=f("windowColor",[.62,.71,.8,1]),h=f("windowFrameColor",[c[0]*1.1,c[1]*1.1,c[2]*1.1,1]);s.setVec3("u_window_color",d[0],d[1],d[2]),s.setVec3("u_window_frame",h[0],h[1],h[2]),s.setFloat("u_facade_detail",O(i.paint.facadeDetail,a,1)*this.detailScale),s.setFloat("u_window_glow",O(i.paint.windowGlow,a,0)),s.setFloat("u_floor_height",O(i.paint.floorHeight,a,3.2)),s.setFloat("u_roof_variation",O(i.paint.roofVariation,a,.3)),this.applyLight(s,r);let p=m>=1;e.setDepthMask(p),e.setBlend(p?"none":"premultiplied");let b=O(i.paint.heightScale,a,1),A=false,y=r.bucketKeyFor(i);if(y===null)return A;let g=(i.source??X)===X;g&&this.indoorMask.prepare(o,y);for(let B of o.visibleTiles){if(!this.drawsTile(t,r,i,B))continue;let C=o.getTile(B),v=C&&this.bucketFor(e,C,y,Zo,this.buildingLocs,"fill-extrusion");if(!v)continue;let _=this.growScale(v,l,!o.warm);_<1&&(A=true),s.setFloat("u_height_scale",_*b),this.applyTileScale(s,B,v.extent),this.shadowActive&&s.setMat4("u_shadow_matrix",t.shadowTileMatrix(B,v.extent)),s.setMat4("u_matrix",t.tileMatrix(B,v.extent));let x=this.cutHidden(e,C,y,B.dataKey,v.buffer,this.hiddenFor(y,g))??(C&&g?this.indoorMask.indicesFor(e,C,y,B,v.buffer,this.buildingLocs):null);x?(x.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,x.count,e.gl.UNSIGNED_INT,0)):(v.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,v.indexCount,v.indexType,0));}return A}growScale(e,t,o=true){if(e.firstDrawTime===0&&(e.firstDrawTime=t),!o||this.growDurationMs<=0)return 1;let r=(t-e.firstDrawTime)/this.growDurationMs;return r<1?hu(Math.max(r,0)):1}applyLight(e,t){let o=t.light;Ve(e,"u_ambient_color",o.ambientColor),e.setFloat("u_ambient_intensity",o.ambientIntensity);let[r,i,a]=Qo(o.keyAzimuth,o.keyAltitude);e.setVec3("u_key_dir",r,i,a),Ve(e,"u_key_color",o.keyColor),e.setFloat("u_key_intensity",o.keyIntensity);let[l,s,c]=Qo(o.fillAzimuth,o.fillAltitude);e.setVec3("u_fill_dir",l,s,c),Ve(e,"u_fill_color",o.fillColor),e.setFloat("u_fill_intensity",o.fillIntensity);}flattened(e,t,o){let r=t.bucketKeyFor(o);if(r===null)return false;for(let i of e.visibleTiles){let a=e.getTile(i)?.data?.buckets?.[r];if(a)return a.kind==="fill"}return false}bucketFor(e,t,o,r,i,a){let l=t.buckets.get(o);if(l)return l;let s=t.data?.buckets?.[o];if(!s||s.kind==="symbol"||s.kind==="placement")return null;if(s.kind!==a)return iu(`\u0441\u043B\u043E\u0439 ${o}: \u0432 \u0442\u0430\u0439\u043B\u0435 \u043C\u0435\u0448 \xAB${s.kind}\xBB, \u0430 \u0440\u0438\u0441\u0443\u044E\u0442 \u043A\u0430\u043A \xAB${a}\xBB \u2014 \u043F\u0440\u043E\u043F\u0443\u0449\u0435\u043D`),null;let c=new ye(e,new Uint8Array(s.vertices),r),u=new fe(e,new Uint32Array(s.indices)),m=new le(e,[{buffer:c,locations:i}],u),f=new bn(m,c,u,u.count,u.type,s.extent,s.capIndexOffset??u.count);return t.buckets.set(o,f),f}destroy(e){this.disposeHighlight(),this.fill?.destroy(),this.surface?.destroy(),this.line?.destroy(),this.objectLine?.destroy(),this.building?.destroy(),this.symbols?.destroy(e),this.models.destroy(e.gl),this.shadowTarget?.destroy(),this.shadowTarget=null,this.shadowPlaceholder&&e.gl.deleteTexture(this.shadowPlaceholder),this.shadowPlaceholder=null,this.quad&&(this.quad.vao.destroy(),this.quad.vbo.destroy(),this.quad.ibo.destroy(),this.quad=null),this.globeMesh&&(this.globeMesh.vao.destroy(),this.globeMesh.vbo.destroy(),this.globeMesh.ibo.destroy(),this.globeMesh=null),this.fill=this.line=this.building=null,this.objectLine=null;}},pl=new P;function du(n,e){let r=new Float32Array(4290),i=0;for(let f=0;f<=32;f++){let d=(f/32-.5)*Math.PI;for(let h=0;h<=64;h++)r[i++]=h/64*2*Math.PI-Math.PI,r[i++]=d;}let a=new Uint16Array(2048*6),l=0;for(let f=0;f<32;f++)for(let d=0;d<64;d++){let h=f*65+d,p=h+64+1;a[l++]=h,a[l++]=h+1,a[l++]=p,a[l++]=h+1,a[l++]=p+1,a[l++]=p;}let s={stride:8,attribs:[{name:"a_lnglat",size:2,type:to,offset:0}]},c=new P([["a_lnglat",e.attribLocation("a_lnglat")]]),u=new ye(n,r,s),m=new fe(n,a);return {vao:new le(n,[{buffer:u,locations:c}],m),vbo:u,ibo:m,count:a.length}}function Ve(n,e,t){let o=pl.get(t);o||(o=ce(t),pl.set(t,o)),n.setVec3(e,o[0],o[1],o[2]);}function Qo(n,e){let t=n*Math.PI/180,o=e*Math.PI/180,r=Math.cos(o);return [-Math.sin(t)*r,Math.cos(t)*r,-Math.sin(o)]}function hu(n){let o=n-1;return 1+2.20158*o*o*o+1.20158*o*o}var $o=1,ro=class{constructor(e=1024){this.entries=new P;this.shelfY=0;this.shelfX=0;this.shelfHeight=0;this.texture=null;this.dirty=true;this.full=false;this.size=e,this.data=new Uint8Array(e*e);}get(e){return this.entries.get(e)}add(e,t,o,r){let i=this.entries.get(e);if(i)return i;if(this.full||o>this.size)return null;if(this.shelfX+o+$o>this.size&&(this.shelfY+=this.shelfHeight+$o,this.shelfX=0,this.shelfHeight=0),this.shelfY+r+$o>this.size)return this.full||console.warn("[osmgl] \u0430\u0442\u043B\u0430\u0441 SDF \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D, \u043D\u043E\u0432\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043D\u0435 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u044E\u0442\u0441\u044F"),this.full=true,null;let a={x:this.shelfX,y:this.shelfY,width:o,height:r};for(let l=0;l<r;l++){let s=l*o,c=(a.y+l)*this.size+a.x;this.data.set(t.subarray(s,s+o),c);}return this.shelfX+=o+$o,r>this.shelfHeight&&(this.shelfHeight=r),this.entries.set(e,a),this.dirty=true,a}bind(e,t){let o=e.gl;this.texture?e.bindTexture(t,this.texture):(this.texture=o.createTexture(),e.bindTexture(t,this.texture),o.texStorage2D(o.TEXTURE_2D,1,o.R8,this.size,this.size),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),this.dirty=true),this.dirty&&(o.pixelStorei(o.UNPACK_ALIGNMENT,1),o.texSubImage2D(o.TEXTURE_2D,0,0,0,this.size,this.size,o.RED,o.UNSIGNED_BYTE,this.data),this.dirty=false);}destroy(e){this.texture&&e.gl.deleteTexture(this.texture),this.texture=null,this.entries.clear(),this.data=new Uint8Array(0);}};var An=.75,io=8,pe=3,ze=24,vt=256,Al=255,no=class{constructor(e,t="Noto Sans Regular"){this.urlTemplate=e;this.fontstack=t;this.glyphs=new P;this.loaded=new q;this.inflight=new P;}get(e){return this.glyphs.get(e)}hasRange(e){return this.loaded.has(Math.floor(e/vt))}needsLoad(e){for(let t of e){let o=t.codePointAt(0);if(o===void 0)continue;let r=Math.floor(o/vt);if(r<=Al&&!this.loaded.has(r))return true}return false}async ensure(e){let t=new q;for(let o of e){let r=o.codePointAt(0);if(r===void 0)continue;let i=Math.floor(r/vt);i>Al||this.loaded.has(i)||t.add(i);}return t.size?(await Promise.all([...t].map(o=>this.loadRange(o))),true):false}loadRange(e){let t=this.inflight.get(e);if(t)return t;let o=this.urlTemplate.replace("{fontstack}",encodeURIComponent(this.fontstack)).replace("{range}",`${e*vt}-${e*vt+vt-1}`),r=fetch(o,{credentials:"same-origin"}).then(i=>{if(!i.ok)throw new Error(`HTTP ${i.status}`);return i.arrayBuffer()}).then(i=>{for(let a of yl(i))this.glyphs.set(a.id,a);this.loaded.add(e);}).catch(i=>{this.loaded.add(e),console.warn(`[osmgl] \u0433\u043B\u0438\u0444\u044B ${o} \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0438\u0441\u044C:`,i instanceof Error?i.message:i);}).finally(()=>{this.inflight.delete(e);});return this.inflight.set(e,r),r}};function yl(n){let e=new ot(n instanceof Uint8Array?n:new Uint8Array(n)),t=[];return e.readFields((o,r,i)=>{if(o!==1||!i)return;let a=i.readVarint()+i.pos;i.readFields((l,s,c)=>{if(l!==3||!c)return;let u=c.readVarint()+c.pos,m={id:0,bitmap:null,width:0,height:0,left:0,top:0,advance:0};c.readFields((f,d,h)=>{h&&(f===1?m.id=h.readVarint():f===2?m.bitmap=h.readBytes():f===3?m.width=h.readVarint():f===4?m.height=h.readVarint():f===5?m.left=h.readSVarint():f===6?m.top=h.readSVarint():f===7&&(m.advance=h.readVarint()));},null,u),t.push(m);},null,a);},null),t}var mu=.25,wt=1e20;function yn(n,e,t){let o=e+pe*2,r=t+pe*2,i=o*r,a=new Float64Array(i),l=new Float64Array(i);a.fill(wt),l.fill(0);for(let c=0;c<t;c++)for(let u=0;u<e;u++){let m=n[c*e+u]/255,f=(c+pe)*o+(u+pe);if(m>=1)a[f]=0,l[f]=wt;else if(m>0){let d=.5-m;a[f]=d>0?d*d:0,l[f]=d<0?d*d:0;}else a[f]=wt,l[f]=0;}gl(a,o,r),gl(l,o,r);let s=new Uint8Array(i);for(let c=0;c<i;c++){let u=Math.sqrt(a[c])-Math.sqrt(l[c]);s[c]=pu(Math.round(255-255*(u/io+mu)));}return {data:s,width:o,height:r}}function gl(n,e,t){let o=Math.max(e,t),r=new Float64Array(o),i=new Float64Array(o),a=new Int32Array(o),l=new Float64Array(o+1);for(let s=0;s<e;s++){for(let c=0;c<t;c++)r[c]=n[c*e+s];Bl(r,i,a,l,t);for(let c=0;c<t;c++)n[c*e+s]=i[c];}for(let s=0;s<t;s++){for(let c=0;c<e;c++)r[c]=n[s*e+c];Bl(r,i,a,l,e);for(let c=0;c<e;c++)n[s*e+c]=i[c];}}function Bl(n,e,t,o,r){t[0]=0,o[0]=-wt,o[1]=wt;for(let i=1,a=0;i<r;i++){let l=0;do{let s=t[a];l=(n[i]-n[s]+i*i-s*s)/(i-s)/2;}while(l<=o[a]&&--a>-1);a++,t[a]=i,o[a]=l,o[a+1]=wt;}for(let i=0,a=0;i<r;i++){for(;o[a+1]<i;)a++;let l=t[a];e[i]=(i-l)*(i-l)+n[l];}}var pu=n=>n<0?0:n>255?255:n;var Cl=48,ao=class{constructor(e={}){this.defs=e;this.sdfs=new P;this.pending=new q;this.failed=new q;}setIcons(e){this.defs=e,this.sdfs.clear(),this.failed.clear();}has(e){return this.sdfs.has(e)}get(e){return this.sdfs.get(e)}isDefined(e){return this.defs[e]!==void 0}async ensure(e){if(this.sdfs.has(e)||this.pending.has(e)||this.failed.has(e))return false;let t=this.defs[e];if(t===void 0)return this.failed.add(e),false;this.pending.add(e);try{let o=typeof t=="string"?t:t.svg,r=/viewBox="0 0 ([\d.]+) ([\d.]+)"/.exec(o),i=r?Number(r[1])/Number(r[2]):1,a=Math.max(8,Math.round(Cl*(i>1?i:1))),l=Math.max(8,Math.round(Cl/(i<1?i:1))),s=await bu(o,a,l);return this.sdfs.set(e,yn(s,a,l)),!0}catch(o){return this.failed.add(e),console.warn(`[osmgl] \u0438\u043A\u043E\u043D\u043A\u0430 \xAB${e}\xBB \u043D\u0435 \u0440\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u043E\u0432\u0430\u043B\u0430\u0441\u044C:`,o instanceof Error?o.message:o),false}finally{this.pending.delete(e);}}};async function bu(n,e,t){let o=n.includes("width=")?n:n.replace("<svg",`<svg width="${e}" height="${t}"`),r=new Blob([o],{type:"image/svg+xml;charset=utf-8"}),i=URL.createObjectURL(r);try{let a=new Image;a.width=e,a.height=t,await new Promise((m,f)=>{a.onload=()=>m(),a.onerror=()=>f(new Error("\u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0434\u0435\u043A\u043E\u0434\u0438\u0440\u043E\u0432\u0430\u0442\u044C SVG")),a.src=i;});let l=document.createElement("canvas");l.width=e,l.height=t;let s=l.getContext("2d",{willReadFrequently:!0});if(!s)throw new Error("\u043D\u0435\u0442 2D-\u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430");s.clearRect(0,0,e,t),s.drawImage(a,0,0,e,t);let c=s.getImageData(0,0,e,t).data,u=new Uint8ClampedArray(e*t);for(let m=0;m<u.length;m++)u[m]=c[m*4+3];return u}finally{URL.revokeObjectURL(i);}}var it={dot:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="5"/></svg>',entrance:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2.5 19.5 10l-2.1 2.1-3.9-3.9V21h-3V8.2l-3.9 3.9L4.5 10 12 2.5z"/></svg>',door:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 2h11a3 3 0 0 1 3 3v17H5V2zm9 9.2a1.2 1.2 0 1 0 0 2.4 1.2 1.2 0 0 0 0-2.4z"/></svg>',elevator:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 3h14v18H5V3zm7 2.2L9.2 9h5.6L12 5.2zM9.2 15h5.6L12 18.8 9.2 15z"/></svg>',"frame-circle":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="11"/></svg>',cafe:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 6h12v6a6 6 0 0 1-12 0V6zm12 1h2.5a2.5 2.5 0 0 1 0 5H16V7zM3 20h14v2H3z"/></svg>',restaurant:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 2h2v8a2 2 0 0 1-4 0V2h2zM5 2v6h2V2zm7 0h2v20h-2V13a4 4 0 0 1 0-8V2zM6 12h2v10H6z"/></svg>',shop:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 8h16l-1.5 12h-13L4 8zm4-3a4 4 0 0 1 8 0v2h-2V5a2 2 0 0 0-4 0v2H8V5z"/></svg>',grocery:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 4h3l3 11h9l2-8H8m1 15a2 2 0 1 0 4 0 2 2 0 0 0-4 0zm8 0a2 2 0 1 0 4 0 2 2 0 0 0-4 0z"/></svg>',fuel:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 3h9v18H4V3zm2 2v5h5V5H6zm10 2 3 3v8a2 2 0 0 1-4 0V9h1V7z"/></svg>',parking:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 3h6a5 5 0 0 1 0 10H9v8H6V3zm3 3v4h3a2 2 0 0 0 0-4H9z"/></svg>',hospital:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 3h4v7h7v4h-7v7h-4v-7H3v-4h7V3z"/></svg>',pharmacy:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11 4h2v5h5v2h-5v5h-2v-5H6V9h5V4zM5 18h14v3H5z"/></svg>',school:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 3 2 8l10 5 10-5-10-5zM5 12v5c0 2 3 4 7 4s7-2 7-4v-5l-7 3.5L5 12z"/></svg>',bank:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2 2 8h20L12 2zM4 10h3v8H4v-8zm6.5 0h3v8h-3v-8zM17 10h3v8h-3v-8zM2 20h20v2H2z"/></svg>',bus:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 5a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10a2 2 0 0 1-2 2v2h-3v-2H9v2H6v-2a2 2 0 0 1-2-2V5zm2 2v5h12V7H6zm1 8a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0zm7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0z"/></svg>',railway:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 3h12v11a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V3zm2 3v4h8V6H8zm-2 15 3-3h6l3 3H6z"/></svg>',park:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2a6 6 0 0 1 5.2 9 4.5 4.5 0 0 1-2.4 8.3H13V22h-2v-2.7H9.2A4.5 4.5 0 0 1 6.8 11 6 6 0 0 1 12 2z"/></svg>',hotel:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 6h3v7h10a4 4 0 0 1 4 4v3h-3v-3H5v3H2V6zm5 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z"/></svg>',place_of_worship:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c3 3 5 5 5 8v12h-4v-5a1 1 0 0 0-2 0v5H7V10c0-3 2-5 5-8z"/></svg>',police:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l8 3v7c0 5-3.5 8.5-8 10-4.5-1.5-8-5-8-10V5l8-3z"/></svg>',stadium:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4c5.5 0 10 1.8 10 4v4c0 2.2-4.5 4-10 4S2 14.2 2 12V8c0-2.2 4.5-4 10-4zm0 2C7.6 6 4 7.1 4 8s3.6 2 8 2 8-1.1 8-2-3.6-2-8-2z"/></svg>',fast_food:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 9a9 9 0 0 1 18 0H3zm-1 3h20v2H2v-2zm2 4h16a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3z"/></svg>',bakery:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 9c0-2 1.5-3 3-3h10c1.5 0 3 1 3 3l-1 9H5L4 9zm4-1v9h2V8H8zm4 0v9h2V8h-2z"/></svg>',ice_cream:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2a5 5 0 0 1 5 5H7a5 5 0 0 1 5-5zM7 9h10l-5 13L7 9z"/></svg>',bar:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 4h18l-8 9v6h4v2H7v-2h4v-6L3 4zm3.5 2 2 2h7l2-2h-11z"/></svg>',butcher:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 3h6l2 5-3 3-5-3V3zm8 7 6 6-2 2-6-6 2-2zM3 17h8v4H3v-4z"/></svg>',alcohol_shop:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 2h4v4l3 5v11H7V11l3-5V2zm-1 11h6v7H9v-7z"/></svg>',clothing_store:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 3h6l5 3-2 4-2-1v12H8V9L6 10 4 6l5-3zm1 1.5L12 6l2-1.5h-4z"/></svg>',hairdresser:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 3l9 9-2 2-2-2-2 2 2 2-1 1a3 3 0 1 1-2-2l1-1-1-1a3 3 0 1 1 2-2L5 3zm14 0l-6 6 2 2 5-6V3zM6 17a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm0-11a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z"/></svg>',laundry:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 2h14v20H5V2zm2 2v2h10V4H7zm5 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 3a3 3 0 1 1 0 6 3 3 0 0 1 0-6z"/></svg>',music:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 4l11-2v13a3.5 3.5 0 1 1-2-3.2V6L11 7.4v10.1A3.5 3.5 0 1 1 9 14.3V4z"/></svg>',car:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 11l2-5a2 2 0 0 1 2-1h6a2 2 0 0 1 2 1l2 5v7h-3v-2H8v2H5v-7zm2.5-1h9l-1.2-3H8.7L7.5 10zM7 13a1.3 1.3 0 1 0 0 2.6A1.3 1.3 0 0 0 7 13zm10 0a1.3 1.3 0 1 0 0 2.6 1.3 1.3 0 0 0 0-2.6z"/></svg>',bicycle:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 12a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm12 0a5 5 0 1 0 0 10 5 5 0 0 0 0-10zM6 15a2 2 0 1 1 0 4 2 2 0 0 1 0-4zm12 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4zM9 4h4l4 8-2 1-3-6H9V4z"/></svg>',atm:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 5h20v14H2V5zm2 2v3h16V7H4zm0 5v5h16v-5H4zm2 2h5v2H6v-2z"/></svg>',post:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 5h20v14H2V5zm2.5 2 7.5 6 7.5-6h-15z"/></svg>',telephone:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 2c1 0 2 3 2 4s-2 2-2 3 4 6 5 6 2-2 3-2 4 1 4 2-1 4-3 4C9 19 5 15 3 5c0-2 3-3 4-3z"/></svg>',office:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 2h11v20H4V2zm2 3v3h3V5H6zm5 0v3h3V5h-3zM6 10v3h3v-3H6zm5 0v3h3v-3h-3zM6 15v3h3v-3H6zm5 0v7h3v-7h-3zM17 8h4v14h-4V8z"/></svg>',town_hall:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l9 5v2H3V7l9-5zM5 11h3v7H5v-7zm5.5 0h3v7h-3v-7zM16 11h3v7h-3v-7zM3 20h18v2H3v-2z"/></svg>',doctors:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 2v6a5 5 0 0 0 4 4.9V16a3 3 0 1 0 6 0v-1.2a2.5 2.5 0 1 0-2 0V16a1 1 0 1 1-2 0v-3.1A5 5 0 0 0 17 8V2h-3v6a2 2 0 0 1-4 0V2H7z"/></svg>',dentist:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c3 0 4-1 6 0 2 1 2 4 1 8l-1 5c-1 4-3 4-3.5 1L14 12c-.4-2-1.6-2-2 0l-.5 4c-.5 3-2.5 3-3.5-1l-1-5C6 6 6 3 8 2c2-1 3 0 4 0z"/></svg>',veterinary:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 11c3 0 6 3 6 6a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3c0-3 3-6 6-6zM6 5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zm12 0a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zM10 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zm4 0a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z"/></svg>',library:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 3h5c1.5 0 2.5.5 3 1.2.5-.7 1.5-1.2 3-1.2h5v16h-5c-1.5 0-2.5.6-3 1.5-.5-.9-1.5-1.5-3-1.5H4V3zm2 2v12h3c1 0 2 .2 2.5.5V5.8C11 5.3 10 5 9 5H6z"/></svg>',college:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 3 2 8l10 5 10-5-10-5zM5 12v5c0 2 3 4 7 4s7-2 7-4v-5l-7 3.5L5 12zm15-2v7h2v-7h-2z"/></svg>',museum:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l10 5v2H2V7l10-5zM5 11h2.5v7H5v-7zm5 0h2.5v7H10v-7zm5 0h2.5v7H15v-7zM3 20h18v2H3v-2z"/></svg>',art_gallery:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2a10 10 0 0 0 0 20c1.7 0 2-1 1.4-2-.7-1.2 0-2.5 1.6-2.5H18a4 4 0 0 0 4-4c0-6-4.5-11.5-10-11.5zM7 9a1.7 1.7 0 1 1 0 3.4A1.7 1.7 0 0 1 7 9zm3-4a1.7 1.7 0 1 1 0 3.4A1.7 1.7 0 0 1 10 5zm5 0a1.7 1.7 0 1 1 0 3.4A1.7 1.7 0 0 1 15 5zm3 4a1.7 1.7 0 1 1 0 3.4A1.7 1.7 0 0 1 18 9z"/></svg>',theatre:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 5h8v9a4 4 0 0 1-8 0V5zm2.5 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm3 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2zM13 5h8v9a4 4 0 0 1-8 0V5zm2.5 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm3 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>',cinema:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 4h20v16H2V4zm3 2v2h2V6H5zm0 5v2h2v-2H5zm0 5v2h2v-2H5zm12-10v2h2V6h-2zm0 5v2h2v-2h-2zm0 5v2h2v-2h-2zM9 6v12h6V6H9z"/></svg>',monument:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 2h4l1 13H9l1-13zM7 17h10v2H7v-2zm-2 3h14v2H5v-2z"/></svg>',castle:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 6h3V3h2v3h3V3h2v3h3V3h2v3h3v16H2V6zm7 8h6v8H9v-8z"/></svg>',attraction:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l2.9 6.3 6.9.8-5.1 4.7 1.4 6.8L12 17.2 5.9 20.6l1.4-6.8L2.2 9.1l6.9-.8L12 2z"/></svg>',zoo:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 12c3.3 0 6 2.7 6 5.5S15.3 21 12 21s-6-.7-6-3.5S8.7 12 12 12zM5 6a2.7 2.7 0 1 1 0 5.4A2.7 2.7 0 0 1 5 6zm14 0a2.7 2.7 0 1 1 0 5.4A2.7 2.7 0 0 1 19 6zM9.5 2a2.7 2.7 0 1 1 0 5.4 2.7 2.7 0 0 1 0-5.4zm5 0a2.7 2.7 0 1 1 0 5.4 2.7 2.7 0 0 1 0-5.4z"/></svg>',theme_park:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11 2h2v6h-2V2zM4 20a8 8 0 0 1 16 0v2H4v-2zm3.5-2h9A6 6 0 0 0 12 14a6 6 0 0 0-4.5 4zM3 9l3-2 3 2-3 2-3-2zm12 0l3-2 3 2-3 2-3-2z"/></svg>',information:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.5 4h3v3h-3V6zm0 5h3v8h-3v-8z"/></svg>',garden:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c2 2 3 4 3 6a3 3 0 0 1-6 0c0-2 1-4 3-6zM4 9c2.5 0 5 1.5 6 4H8c-2.5 0-4-1.5-4-4zm16 0c0 2.5-1.5 4-4 4h-2c1-2.5 3.5-4 6-4zm-9 5h2v8h-2v-8z"/></svg>',pitch:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 5h20v14H2V5zm2 2v10h7V7H4zm9 0v10h7V7h-7zm-1 3a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"/></svg>',playground:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 4h2v16H3V4zm16 0h2v16h-2V4zM5 6h14v2H5V6zm2 3 3 11H8L5 9h2zm10 0-3 11h2l3-11h-2z"/></svg>',swimming_pool:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 3a3 3 0 0 1 6 0v3h4a3 3 0 0 1 3 3h-3a1 1 0 0 0-1 1v3H12V6a1 1 0 0 0-2 0v8H6V3zm-4 14c2 0 2 2 5 2s3-2 5-2 3 2 5 2 3-2 5-2v3c-2 0-2 2-5 2s-3-2-5-2-3 2-5 2-3-2-5-2v-3z"/></svg>',sports_centre:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 8h3v8H4V8zM2 10h2v4H2v-4zm15-2h3v8h-3V8zm3 2h2v4h-2v-4zM8 11h8v2H8v-2z"/></svg>',bicycle_parking:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 2h5a4 4 0 0 1 0 8H7v5H4V2zm3 3v2h2a1 1 0 0 0 0-2H7zm-2 13a4 4 0 1 1 8 0 4 4 0 0 1-8 0zm10 0a4 4 0 1 1 8 0 4 4 0 0 1-8 0z"/></svg>',aerialway:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 4l20-2v2L13 5v2h1l4 3v6a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2v-6l4-3h1V5.3L2 6V4zm7 8v3h6v-3H9z"/></svg>',ferry_terminal:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11 2h2v3h4v4h-4v5l7 2-2 6c-2 0-2-1-4-1s-2 1-4 1-2-1-4-1-2 1-4 1l-2-6 7-2V9H3V5h4V2h4zM9 7v2h6V7H9z"/></svg>',traffic_signals:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M8 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-3v3h4v2H7v-2h4v-3H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm4 1.6a1.6 1.6 0 1 0 0 3.2 1.6 1.6 0 0 0 0-3.2zm0 4.3a1.6 1.6 0 1 0 0 3.2 1.6 1.6 0 0 0 0-3.2zm0 4.3a1.4 1.4 0 1 0 0 2.8 1.4 1.4 0 0 0 0-2.8z"/></svg>',gate:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 4h3v16H2V4zm17 0h3v16h-3V4zM6 8h12v2H6V8zm0 5h12v2H6v-2z"/></svg>',toilets:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4zM4 7h4l2 7H8v8H4v-8H2l2-7zm12-5a2 2 0 1 1 0 4 2 2 0 0 1 0-4zm-3 5h6l1 8h-2v7h-4v-7h-2l1-8z"/></svg>',drinking_water:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c4 5 6 8 6 11a6 6 0 0 1-12 0c0-3 2-6 6-11zm0 5c-2 3-3 4.6-3 6a3 3 0 0 0 6 0c0-1.4-1-3-3-6z"/></svg>',waste_basket:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 2h6l1 2h4v3H4V4h4l1-2zM5 8h14l-1 14H6L5 8zm4 3v8h2v-8H9zm4 0v8h2v-8h-2z"/></svg>',recycling:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l4 7h-3v4h-2V9H8l4-7zM3 18l3-6 2 1-1.4 2.5H10v2H6.6L8 20l-2 1-3-3zm18 0-3 3-2-1 1.4-2.5H14v-2h3.4L16 13l2-1 3 6z"/></svg>',campsite:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l9 18h-4l-5-10-5 10H3L12 2zm0 9 5 9H7l5-9z"/></svg>',shelter:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l10 8-1.5 2L19 11v9H5v-9l-1.5 1L2 10l10-8zm0 3.5L7 9.5V18h10V9.5l-5-4z"/></svg>',fire_station:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 2c0 3-4 4-4 8 0 1 .4 2 1 2.6C9.4 11 10 9.5 11 9c0 2 3 3 3 6a3.5 3.5 0 0 1-1 2.5c2.5-.6 4-2.8 4-5.5 0-5-4-7-4-10zM7 15c0 4 2.5 7 5 7s5-3 5-7c0 2-1 3-2 3.5.3-.6.5-1.2.5-2 0-2.5-2-3.5-2.5-5.5-1 1-2 2.5-2 4 0 .8.2 1.5.6 2C10.2 17.5 9 16.5 9 15H7z"/></svg>',prison:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 3h2v18H3V3zm4 0h2v18H7V3zm4 0h2v18h-2V3zm4 0h2v18h-2V3zm4 0h2v18h-2V3zM2 10h20v2H2v-2z"/></svg>',cemetery:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c3 0 5 2 5 5v13H7V7c0-3 2-5 5-5zm-1 3v2H9v2h2v7h2v-7h2V7h-2V5h-2zM5 21h14v2H5v-2z"/></svg>',basin:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 8c2 0 2 2 5 2s3-2 5-2 3 2 5 2 3-2 5-2v3c-2 0-2 2-5 2s-3-2-5-2-3 2-5 2-3-2-5-2V8zm0 7c2 0 2 2 5 2s3-2 5-2 3 2 5 2 3-2 5-2v3c-2 0-2 2-5 2s-3-2-5-2-3 2-5 2-3-2-5-2v-3z"/></svg>',"shield-2":'<svg viewBox="0 0 32 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="30" height="18" rx="4"/></svg>',"shield-3":'<svg viewBox="0 0 41 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="39" height="18" rx="4"/></svg>',"shield-4":'<svg viewBox="0 0 50 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="48" height="18" rx="4"/></svg>',"shield-5":'<svg viewBox="0 0 59 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="57" height="18" rx="4"/></svg>',"shield-6":'<svg viewBox="0 0 68 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="66" height="18" rx="4"/></svg>',"shield-7":'<svg viewBox="0 0 77 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="75" height="18" rx="4"/></svg>',"shield-8":'<svg viewBox="0 0 86 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="84" height="18" rx="4"/></svg>'},Au={lodging:"hotel",beer:"bar",pub:"bar",kindergarten:"school",university:"college",lift_gate:"gate",toll_booth:"gate",border_control:"gate",bollard:"gate",picnic_site:"campsite",motorcycle_parking:"parking",bicycle_rental:"bicycle",harbor:"ferry_terminal",reservoir:"basin",water_park:"swimming_pool",volleyball:"pitch",basketball:"pitch",tennis:"pitch",horse_racing:"pitch",athletics:"sports_centre",running:"sports_centre",cycling:"bicycle",climbing:"sports_centre",climbing_adventure:"sports_centre",winter_sports:"sports_centre",ice_rink:"sports_centre",karting:"car",motor:"car",escape_game:"attraction"};for(let[n,e]of Object.entries(Au)){let t=it[e];t?it[n]=t:console.warn(`[osmgl] \u043F\u0441\u0435\u0432\u0434\u043E\u043D\u0438\u043C \u0438\u043A\u043E\u043D\u043A\u0438 \xAB${n}\xBB \u0441\u0441\u044B\u043B\u0430\u0435\u0442\u0441\u044F \u043D\u0430 \u043D\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0443\u044E \xAB${e}\xBB`);}var yu=1.2;function gn(n,e,t=16,o=0){let r=gu(n,t),i=[],a=[],l=0;for(let u of r){let m=0,f=0;for(let d of u){let h=d.codePointAt(0);if(h===void 0)continue;let p=e.get(h);p&&(m+=p.advance,f++);}f>1&&(m+=o*(f-1)),a.push(m),m>l&&(l=m);}if(l===0)return null;let s=ze*yu,c=r.length*s;for(let u=0;u<r.length;u++){let m=-a[u]/2,f=-c/2+u*s+s/2;for(let d of r[u]){let h=d.codePointAt(0);if(h===void 0)continue;let p=e.get(h);p&&(p.width>0&&p.height>0&&p.bitmap&&i.push({glyph:p,x:m,y:f}),m+=p.advance+o);}}return i.length?{glyphs:i,width:l,height:c}:null}function gu(n,e){let t=n.replace(/\s+/g," ").trim();if(t.length<=e)return [t];let o=t.split(" "),r=[],i="";for(let a of o)i?i.length+1+a.length<=e?i+=" "+a:(r.push(i),i=a):i=a;return i&&r.push(i),r.slice(0,3)}function Bn(n,e,t,o){if(n.length<2)return [];let r=-o,i=-o,a=e+o,l=t+o,s=f=>f.x>=r&&f.x<=a&&f.y>=i&&f.y<=l,c=[],u=[],m=()=>{u.length>=2&&c.push(u),u=[];};for(let f=0;f+1<n.length;f++){let d=n[f],h=n[f+1],p=s(d),b=s(h);if(p&&b){u.length||u.push(d),u.push(h);continue}let A=Bu(d,h,r,i,a,l);if(!A){m();continue}u.length||u.push(A[0]),u.push(A[1]),b||m();}return m(),c}function Bu(n,e,t,o,r,i){let a=e.x-n.x,l=e.y-n.y,s=0,c=1,u=[[-a,n.x-t],[a,r-n.x],[-l,n.y-o],[l,i-n.y]];for(let[m,f]of u){if(m===0){if(f<0)return null;continue}let d=f/m;if(m<0){if(d>c)return null;d>s&&(s=d);}else {if(d<s)return null;d<c&&(c=d);}}return [{x:n.x+a*s,y:n.y+l*s},{x:n.x+a*c,y:n.y+l*c}]}var Cu=[0,.25,-0.25,.5,-0.5,.75,-0.75,1,-1];function vn(n,e,t,o={}){if(n.length<2||!e.length||t<=0)return [];let r=_u(n),i=r[r.length-1];if(i<t)return [];let a=o.maxAngle??25,l=o.stableScale&&o.stableScale>0?o.stableScale:1,s=i*l,c=o.fontSize?o.fontSize*.6:t/e.length,u=(o.fontSize??0)*.85,m=[],f=o.spacing??250,d=f>0&&f-t<f*.25?t+f*.25:f;if(o.accept)return vu(n,r,e,t,d,c,a,u,o.accept);if(d>0&&s>=t+d){let p=Math.min(Math.floor((s-t)/d)+1,24),b=t+d*(p-1),A=(s-b)/2;for(let y=0;y<p;y++,A+=d){let g=A/l,B=Cn(n,r,e,t,g,c,a,u);B&&m.push({glyphs:B,path:B.map(C=>({x:C.x,y:C.y})),at:g});}if(m.length)return m}let h=(i-t)/2;for(let p of Cu){let b=h+h*p,A=Cn(n,r,e,t,b,c,a,u);if(A)return [{glyphs:A,path:A.map(y=>({x:y.x,y:y.y})),at:b}];if(h===0)break}return []}function vu(n,e,t,o,r,i,a,l,s){let c=e[e.length-1],u=Math.max(o/3,r/8,12),m=[],f=-1/0;for(let d=0;d+o<=c;d+=u){if(d-f<r)continue;let h=Cn(n,e,t,o,d,i,a,l);if(!h)continue;let p={glyphs:h,path:h.map(b=>({x:b.x,y:b.y})),at:d};if(s(p)&&(m.push(p),f=d,m.length>=24))break}return m}function Cn(n,e,t,o,r,i,a,l){if(r<0||r+o>e[e.length-1]||!wu(n,e,r,r+o,i,a))return null;let s=lo(n,e,r),c=lo(n,e,r+o);if(!s||!c)return null;if(c.x>=s.x)return vl(n,e,t,r,l);let u=e[e.length-1];return vl([...n].reverse(),Du(e),t,u-(r+o),l)}function wu(n,e,t,o,r,i){if(r<=0)return true;let a=[],l=0;for(let s=1;s+1<n.length;s++){let c=e[s];if(c<=t)continue;if(c>=o)break;let u=Math.atan2(n[s].y-n[s-1].y,n[s].x-n[s-1].x),m=Math.atan2(n[s+1].y-n[s].y,n[s+1].x-n[s].x),f=Math.abs((m-u)*180/Math.PI+540)%360-180,d=Math.abs(f);for(a.push({at:c,delta:d}),l+=d;a.length&&c-a[0].at>r;)l-=a.shift().delta;if(l>i)return false}return true}function vl(n,e,t,o,r){let i=[];for(let c of t){let u=wl(n,e,o+c.offset,c.width);if(!u)return null;i.push(u);}if(!i.length)return null;if(r<=0)return i;let a=[],l=o,s=0;for(let c=0;c<t.length;c++){if(c>0){let m=Math.abs(xu(i[c].angle,i[c-1].angle))*(Math.PI/180);s+=r*2*Math.tan(Math.min(m,Math.PI/3)/2);}l=o+t[c].offset+s;let u=wl(n,e,l,t[c].width);if(!u)return null;a.push(u);}return a}function wl(n,e,t,o){let r=lo(n,e,t+o/2);if(!r)return null;let i=lo(n,e,t),a=lo(n,e,t+o);if(!i||!a)return r;let l=a.x-i.x,s=a.y-i.y;return l===0&&s===0?r:{x:r.x,y:r.y,angle:Math.atan2(s,l)*180/Math.PI}}function xu(n,e){let t=n-e;for(;t>180;)t-=360;for(;t<=-180;)t+=360;return t}function _u(n){let e=new Array(n.length);e[0]=0;for(let t=1;t<n.length;t++)e[t]=e[t-1]+Math.hypot(n[t].x-n[t-1].x,n[t].y-n[t-1].y);return e}function Du(n){let e=n[n.length-1];return n.map(t=>e-t).reverse()}function lo(n,e,t){if(t<0||t>e[e.length-1])return null;let o=1;for(;o<e.length-1&&e[o]<t;)o++;let r=e[o]-e[o-1];if(r<=0)return null;let i=(t-e[o-1])/r,a=n[o-1],l=n[o],s=l.x-a.x,c=l.y-a.y;return {x:a.x+s*i,y:a.y+c*i,angle:Math.atan2(c,s)*180/Math.PI}}var xn=20,xl={stride:xn,attribs:[{name:"a_pos",size:2,type:5126,offset:0},{name:"a_tex",size:2,type:5123,offset:8},{name:"a_scale",size:1,type:5126,offset:12},{name:"a_fade",size:1,type:5126,offset:16}]},Fu=220,Ye=64,_l=2,Eu=1.22,Mu=128,Iu=.7;function Su(n,e,t){let o=n.layout?.letterSpacing;if(o!==void 0)return O(o,e,0)*ze;let r=O(n.paint?.haloWidth,e,0);return r<=0||t<=0?0:r*Iu/(t/ze)}var Lu=256,Hu=200,wn="frame-circle",xt=class n{constructor(e,t){this.shader=null;this.locations=new P;this.atlas=new ro(1024);this.vbo=null;this.ibo=null;this.vao=null;this.capacityQuads=0;this.onAssetsReady=null;this.pendingText=new Set;this.pendingIcons=new Set;this.highlightFootprint=null;this.placedCount=0;this.placed=[];this.hoverKey=null;this.hiddenKey=null;this.padding={top:0,right:0,bottom:0,left:0};this.viewport={width:0,height:0};this.stickyKeys=new Set;this.now=0;this.shownAt=new P;this.fading=false;this.styleOrder=new P;this.glyphs=new no(e,t),this.icons=new ao(it);}init(e){this.shader=new ue(e,"symbol",Ua,Ja);for(let t of xl.attribs)this.locations.set(t.name,this.shader.attribLocation(t.name));}static keyOf(e){return `${e.layerId}|${e.mercX.toFixed(9)}|${e.mercY.toFixed(9)}`}setHover(e){return this.hoverKey===e?false:(this.hoverKey=e,true)}setHidden(e){return this.hiddenKey===e?false:(this.hiddenKey=e,true)}querySymbol(e,t=2){let o=null;for(let r of this.placed)e.x<r.box.x1-t||e.x>r.box.x2+t||e.y<r.box.y1-t||e.y>r.box.y2+t||(!o||r.order>=o.order)&&(o=r);return o}fadeOf(e,t){let o=this.shownAt.get(e);if(o===void 0)return this.shownAt.set(e,t),this.fading=true,0;let r=(t-o)/Fu;return r<1?(this.fading=true,r):1}order(e){let t=o=>o.priority+(this.stickyKeys.has(n.keyOf({layerId:o.layer.id,mercX:o.mercX,mercY:o.mercY}))?Hu:0);e.sort((o,r)=>t(r)-t(o));}rememberPlaced(){this.stickyKeys=new Set(this.placed.map(e=>n.keyOf(e)));for(let e of [...this.shownAt.keys()])this.stickyKeys.has(e)||this.shownAt.delete(e);}render(e,t,o,r){let i=this.shader;if(this.placedCount=0,this.placed=[],this.viewport={width:t.width,height:t.height},!i)return;let a=t.zoom,l=r.layers.filter(d=>d.type==="symbol"&&r.layerVisibleAt(d,a));if(!l.length)return;let s=this.collect(t,o,r,l);if(!s.length)return;this.now=performance.now(),this.fading=false,this.order(s);let c=new P,u=new P,m=new P;l.forEach((d,h)=>m.set(d.id,h));let f=0;for(let d of s){let h=this.place(d,a,c);if(!h)continue;this.placed.push({layerId:d.layer.id,text:d.text,icon:d.icon,mercX:d.mercX,mercY:d.mercY,box:h.box,order:m.get(d.layer.id)??0});let p=u.get(d.layer.id);p||u.set(d.layer.id,p={layer:d.layer,verts:[],texs:[],iconVerts:[],iconTexs:[],frameVerts:[],frameTexs:[]}),p.verts.push(...h.verts),p.texs.push(...h.texs),p.iconVerts.push(...h.iconVerts),p.iconTexs.push(...h.iconTexs),p.frameVerts.push(...h.frameVerts),p.frameTexs.push(...h.frameTexs),f+=h.quads,this.placedCount++;}this.rememberPlaced(),this.fading&&this.onAssetsReady?.(),this.requestMissing(),f&&(this.styleOrder=m,this.draw(e,t,u,f,a));}collect(e,t,o,r){let i=[],l=this.padding,s=gt(e,o).far,[c,u,m]=e.cameraPositionPx;for(let f of r){let d=(f.layout?.priority??0)*Lu,h=t.get(f.source??X);if(!h)continue;let p=f.layout?.showFor==="highlight",b=f.layout?.placement==="map",{shift:A,drop:y}=b?Ml(f,e.zoom,e.pixelsPerMeter):{shift:0,drop:0};if(p&&!this.highlightFootprint)continue;let g=e.worldSize>0?e.pixelsPerMeter/e.worldSize*1.5:0,B=o.bucketKeyFor(f);if(B!==null)for(let C of h.visibleTiles){if(!o.layerVisibleAt(f,e.detailZoom(e.distanceToTile(C))))continue;let _=h.getTile(C)?.data?.buckets?.[B];if(!_||!No(_))continue;let w=new Int16Array(_.anchors),x=new Uint8Array(_.priorities),D=_.rotations?new Int16Array(_.rotations):null,I=_.lines?new Int16Array(_.lines):null,E=_.lineStarts?new Uint32Array(_.lineStarts):null,L=C.bounds(),M=e.worldSize,S=(L.maxX-L.minX)*M/_.extent,F=L.minX*M,T=L.minY*M;for(let k=0;k<x.length;k++){let H=F+w[k*2]*S,G=T+w[k*2+1]*S;if(s!==1/0&&Math.hypot(H-c,G-u,m)>s||p&&!We(this.highlightFootprint,H/M,G/M,g))continue;let N=H,R=G;if(b&&D){let Y=D[k]*Math.PI/180,oe=A;N-=Math.sin(Y)*oe,R+=Math.cos(Y)*oe;}let W=e.worldPxToPoint(N,R),V=I&&E?Tu(e,I,E,k,F,T,S):void 0;if(f.layout?.textPlacement==="line"){if(!V)continue}else if(!W||W.x<l.left-64||W.y<l.top-64||W.x>e.width-l.right+64||W.y>e.height-l.bottom+64)continue;i.push({layer:f,screenX:W?W.x:V[0].x,screenY:(W?W.y:V[0].y)+y,text:_.texts[k]??"",icon:_.icons[k]??"",priority:x[k]+d,rotate:Il(f,D,k,e.bearing),mercX:H/M,mercY:G/M,line:V});}}}return i}place(e,t,o){let r=e.layer.layout??{},i=n.keyOf({layerId:e.layer.id,mercX:e.mercX,mercY:e.mercY});if(this.hiddenKey!==null&&this.hiddenKey===i)return null;let a=this.fadeOf(i,this.now),l=this.hoverKey!==null&&this.hoverKey===i,s=O(r.textSize,t,13),c=O(r.iconSize,t,16),u=r.iconTextGap??5,[m,f]=r.offset??[0,0],d=r.placement==="map",h=null;if(e.icon&&!d){this.icons.isDefined(e.icon)||(e.icon="dot");let Q=`icon:${e.icon}`,K=this.atlas.get(Q);if(!K){let U=this.icons.get(e.icon);U?K=this.atlas.add(Q,U.data,U.width,U.height)??void 0:this.pendingIcons.add(e.icon);}K&&(h=K);}let p=null;if(h&&r.iconFrame==="circle"){let Q=`icon:${wn}`,K=this.atlas.get(Q);if(!K){let U=this.icons.get(wn);U?K=this.atlas.add(Q,U.data,U.width,U.height)??void 0:this.pendingIcons.add(wn);}K&&(p=K);}let b=p?Math.max(r.iconFrameScale??1.6,1):1,A=null;if(e.text&&(this.glyphs.needsLoad(e.text)&&this.pendingText.add(e.text),A=gn(e.text,this.glyphs,r.textPlacement==="line"?Number.MAX_SAFE_INTEGER:r.maxLineChars??15,Su(e.layer,t,s)),!A&&!h)||!A&&!h)return null;let y=s/ze,g=A?A.width*y:0,B=A?A.height*y:0;if(e.layer.layout?.textPlacement==="line")return A&&e.line?this.placeOnLine(e,A,y,B,o,t,a):null;let C=r.iconPlacement??"top",v=C==="behind"&&!!h&&!!A,_=C==="top"&&!!h&&!!A,w=h?h.width/Math.max(h.height,1):1,x=v?B+u*2:c,D=h?x*w:0,I=Math.max(D,h?c*b:0),E=Math.max(x,h?c*b:0),L=v?Math.max(D,g+u*2):_?Math.max(I,g):I+(h&&A?u:0)+g,M=v?Math.max(x,B):_?E+u+B:Math.max(h?E:0,B),S=e.screenX+m,F=e.screenY+f,T=_l+(r.collisionPadding??0),k={x1:S-L/2-T,y1:F-M/2-T,x2:S+L/2+T,y2:F+M/2+T},H=this.padding;if(k.x1<H.left||k.y1<H.top||k.x2>this.viewport.width-H.right||k.y2>this.viewport.height-H.bottom)return null;if(!r.allowOverlap){if(Dl(o,k))return null;Fl(o,k);}let G=[],N=[],R=[],W=[],V=[],j=[],Y=0,oe=S-L/2,ge=_?(E+u)/2:0,$=1/0,J=1/0,be=-1/0,Ae=-1/0;if(A){let Q=_||v?S:oe+(h?I+u:0)+g/2;for(let K of A.glyphs){let U=K.glyph,de=`g:${U.id}`,ie=this.atlas.get(de);if(!ie&&(!U.bitmap||(ie=this.atlas.add(de,U.bitmap,U.width+pe*2,U.height+pe*2)??void 0,!ie)))continue;let he=Q+(K.x+U.left-pe)*y,ne=F+ge+(K.y-U.top-pe)*y,Be=ie.width*y,Me=ie.height*y;er(G,N,he,ne,Be,Me,ie,0,a),Y++;let Ce=pe*y;$=Math.min($,he+Ce),J=Math.min(J,ne+Ce),be=Math.max(be,he+Be-Ce),Ae=Math.max(Ae,ne+Me-Ce);}if(_&&h&&J<1/0){let K=F-M/2+E+u-J;if(K!==0){for(let U=1;U<G.length;U+=4)G[U]+=K;J+=K,Ae+=K;}}}if(h){let Q=l?Eu:1,K=D*Q,U=x*Q,de=(_?S-D/2:oe+(I-D)/2)-(K-D)/2,ie=(_?F-M/2+(E-x)/2:F-x/2)-(U-x)/2;if(p){let ne=c*b*Q,Be=de+K/2-ne/2,Me=ie+U/2-ne/2,Ce=pe/Math.max(p.height-pe*2,1)*ne;er(V,j,Be-Ce,Me-Ce,ne+Ce*2,ne+Ce*2,p,0,a),Y++;}if(v&&be>$){let ne=u*1.6,Be=u;K=(be-$+ne*2)*Q,U=(Ae-J+Be*2)*Q,de=$-ne,ie=J-Be;}let he=pe/Math.max(h.height-pe*2,1)*U;er(R,W,de-he,ie-he,K+he*2,U+he*2,h,e.rotate,a),Y++;}return Y?{verts:G,texs:N,iconVerts:R,iconTexs:W,frameVerts:V,frameTexs:j,quads:Y,box:k}:null}placeOnLine(e,t,o,r,i,a,l){let s=e.line,c=t.glyphs.map(D=>({offset:(D.x+t.width/2)*o,width:Math.max(D.glyph.advance,1)*o})),u=c.length?c[c.length-1].offset+c[c.length-1].width:0,m=e.layer.layout??{},f=[],d=[],h=[],p=0,b=r/2+_l,A=this.padding,y=D=>{let I=D.path.map(E=>({x1:E.x-b,y1:E.y-b,x2:E.x+b,y2:E.y+b}));for(let E of I)if(E.x1<A.left||E.y1<A.top||E.x2>this.viewport.width-A.right||E.y2>this.viewport.height-A.bottom||!m.allowOverlap&&Dl(i,E))return false;if(!m.allowOverlap)for(let E of I)Fl(i,E);return h.push(...I),true},g=-1/0,B=1/0;for(let D of t.glyphs)D.glyph.height<=0||(g=Math.max(g,D.glyph.top),B=Math.min(B,D.glyph.top-D.glyph.height));let C=Number.isFinite(g)?(g+B)/2*o:0,_=Bn(s,this.viewport.width,this.viewport.height,Mu).flatMap(D=>vn(D,c,u,{spacing:m.symbolSpacing,fontSize:ze*o,stableScale:Math.pow(2,Math.round(a)-a),accept:y}));if(!_.length)return null;for(let D of _)for(let I=0;I<t.glyphs.length;I++){let E=t.glyphs[I].glyph,L=D.glyphs[I],M=`g:${E.id}`,S=this.atlas.get(M);if(!S&&(!E.bitmap||(S=this.atlas.add(M,E.bitmap,E.width+pe*2,E.height+pe*2)??void 0,!S)))continue;let F=S.width*o,T=S.height*o,k=(E.height/2-E.top)*o+C,H=L.angle*Math.PI/180;er(f,d,L.x-F/2-Math.sin(H)*k,L.y-T/2+Math.cos(H)*k,F,T,S,L.angle,l),p++;}if(!p)return null;let w=h.map(D=>(D.x1+D.x2)/2),x=h.map(D=>(D.y1+D.y2)/2);return {verts:f,texs:d,iconVerts:[],iconTexs:[],frameVerts:[],frameTexs:[],quads:p,box:{x1:Math.min(...w)-b,y1:Math.min(...x)-b,x2:Math.max(...w)+b,y2:Math.max(...x)+b}}}inStyleOrder(e){return [...e.values()].sort((t,o)=>(this.styleOrder.get(t.layer.id)??0)-(this.styleOrder.get(o.layer.id)??0))}draw(e,t,o,r,i){let a=this.shader,l=e.gl;this.ensureBuffers(e,r);let s=this.vbo,c=this.vao;if(!s||!c||!this.ibo)return;let u=new ArrayBuffer(r*4*xn),m=new Float32Array(u),f=new Uint16Array(u),d=[],h=0,p=(b,A,y,g)=>{let B=b.length/16;if(B){d.push({layer:y,role:g,first:h/4*6,count:B*6});for(let C=0;C<B*4;C++){let v=h*5;m[v]=b[C*4],m[v+1]=b[C*4+1],f[v*2+4]=A[C*2],f[v*2+5]=A[C*2+1],m[v+3]=b[C*4+2],m[v+4]=b[C*4+3],h++;}}};for(let b of this.inStyleOrder(o))p(b.frameVerts,b.frameTexs,b.layer,"frame"),p(b.iconVerts,b.iconTexs,b.layer,"icon"),p(b.verts,b.texs,b.layer,"text");s.update(new Uint8Array(u)),a.use(),this.atlas.bind(e,0),a.setInt("u_atlas",0),a.setVec2("u_viewport",t.width,t.height),a.setFloat("u_atlas_size",this.atlas.size),a.setFloat("u_edge",An),a.setFloat("u_dpr",t.width>0?l.drawingBufferWidth/t.width:1),e.setDepthTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),c.bind();for(let b of d){let A=b.layer.paint,y=O(A.opacity,i,1),g=b.role==="icon",B=b.role==="frame",C=(I,E,L)=>B?E??I??L:g?I??L:L,v=Le(B?A.frameColor??A.haloColor??A.color:C(A.iconColor,void 0,A.color),i,[.15,.15,.15,1]),_=B?A.frameHaloColor:C(A.iconHaloColor,void 0,A.haloColor),w=Le(_??(B?A.iconColor??A.color:A.haloColor),i,[1,1,1,1]);B&&A.frameHaloColor===void 0&&(w[3]*=.35),B&&(v[3]*=O(A.frameOpacity,i,1));let x=O(B?A.frameHaloWidth??1.1:C(A.iconHaloWidth,void 0,A.haloWidth),i,1.2),D=O(b.layer.layout?.textSize,i,13);a.setVec4v("u_color",xe([v[0],v[1],v[2],v[3]*y])),a.setVec4v("u_halo_color",xe([w[0],w[1],w[2],w[3]*y])),a.setFloat("u_halo",x/(io*(D/ze))),l.drawElements(l.TRIANGLES,b.count,l.UNSIGNED_INT,b.first*4);}e.bindVAO(null);}ensureBuffers(e,t){if(this.vao&&t<=this.capacityQuads)return;this.vao?.destroy(),this.vbo?.destroy(),this.ibo?.destroy(),this.capacityQuads=Math.max(1024,Math.ceil(t*1.5)),this.vbo=new ye(e,new Uint8Array(this.capacityQuads*4*xn),xl,true);let o=new Uint32Array(this.capacityQuads*6);for(let r=0;r<this.capacityQuads;r++){let i=r*4;o.set([i,i+1,i+2,i,i+2,i+3],r*6);}this.ibo=new fe(e,o),this.vao=new le(e,[{buffer:this.vbo,locations:this.locations}],this.ibo);}requestMissing(){if(this.pendingText.size){let e=[...this.pendingText].join("");this.pendingText.clear(),this.glyphs.ensure(e).then(t=>{t&&this.onAssetsReady?.();});}if(this.pendingIcons.size){let e=[...this.pendingIcons];this.pendingIcons.clear(),Promise.all(e.map(t=>this.icons.ensure(t))).then(t=>{t.some(Boolean)&&this.onAssetsReady?.();});}}destroy(e){this.shader?.destroy(),this.vao?.destroy(),this.vbo?.destroy(),this.ibo?.destroy(),this.atlas.destroy(e),this.shader=null,this.vao=null;}};function er(n,e,t,o,r,i,a,l=0,s=1){let c=i/Math.max(a.height,1);if(l){let u=l*Math.PI/180,m=Math.cos(u),f=Math.sin(u),d=t+r/2,h=o+i/2;for(let[p,b]of [[t,o],[t+r,o],[t+r,o+i],[t,o+i]]){let A=p-d,y=b-h;n.push(d+A*m-y*f,h+A*f+y*m,c,s);}}else n.push(t,o,c,s,t+r,o,c,s,t+r,o+i,c,s,t,o+i,c,s);e.push(a.x,a.y,a.x+a.width,a.y,a.x+a.width,a.y+a.height,a.x,a.y+a.height);}function Tu(n,e,t,o,r,i,a){if(o+1>=t.length)return;let l=t[o],s=t[o+1],c=[];for(let u=l;u<s;u++){let m=n.worldPxToPoint(r+e[u*2]*a,i+e[u*2+1]*a);if(!m)break;c.push(m);}return c.length>=2?c:void 0}var El=(n,e)=>n*4096+e;function Dl(n,e){let t=Math.floor(e.x1/Ye),o=Math.floor(e.y1/Ye),r=Math.floor(e.x2/Ye),i=Math.floor(e.y2/Ye);for(let a=t;a<=r;a++)for(let l=o;l<=i;l++){let s=n.get(El(a,l));if(s){for(let c of s)if(e.x1<c.x2&&e.x2>c.x1&&e.y1<c.y2&&e.y2>c.y1)return true}}return false}function Fl(n,e){let t=Math.floor(e.x1/Ye),o=Math.floor(e.y1/Ye),r=Math.floor(e.x2/Ye),i=Math.floor(e.y2/Ye);for(let a=t;a<=r;a++)for(let l=o;l<=i;l++){let s=El(a,l),c=n.get(s);c||n.set(s,c=[]),c.push(e);}}function Ml(n,e,t){let r=n.layout?.arrowUnits!=="meters"?1:t,i=O(n.layout?.arrowLength,e,50)*r;return {shift:O(n.layout?.arrowGap,e,20)*r+i/2,drop:i/2+(n.layout?.iconTextGap??4)}}function Il(n,e,t,o){return !n.layout?.iconRotate||!e?0:e[t]-o}var _t=class{constructor(e,t){this.capacity=e;this.onEvict=t;this.map=new P;}get size(){return this.map.size}has(e){return this.map.has(e)}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}peek(e){return this.map.get(e)}set(e,t){let o=this.map.get(e);o!==void 0&&(this.map.delete(e),o!==t&&this.onEvict?.(e,o)),this.map.set(e,t),this.trim();}delete(e){let t=this.map.get(e);return t===void 0?false:(this.map.delete(e),this.onEvict?.(e,t),true)}setCapacity(e){this.capacity=e,this.trim();}keys(){return this.map.keys()}values(){return this.map.values()}entries(){return this.map.entries()}clear(){for(let[e,t]of this.map)this.onEvict?.(e,t);this.map.clear();}trim(){for(;this.map.size>this.capacity;){let e=this.map.keys().next();if(e.done)break;let t=e.value,o=this.map.get(t);this.map.delete(t),this.onEvict?.(t,o);}}};var Dt=class n{constructor(e,t,o,r=0){this.z=e;this.x=t;this.y=o;this.wrap=r;this.dataKey=`${e}/${t}/${o}`,this.key=r===0?this.dataKey:`${this.dataKey}@${r}`;}parent(){return this.z===0?null:new n(this.z-1,this.x>>1,this.y>>1,this.wrap)}children(){let e=this.z+1,t=this.x*2,o=this.y*2;return [new n(e,t,o,this.wrap),new n(e,t+1,o,this.wrap),new n(e,t,o+1,this.wrap),new n(e,t+1,o+1,this.wrap)]}scaledTo(e){if(e>=this.z)return this;let t=this.z-e;return new n(e,this.x>>t,this.y>>t,this.wrap)}isAncestorOf(e){if(e.z<=this.z||e.wrap!==this.wrap)return false;let t=e.z-this.z;return e.x>>t===this.x&&e.y>>t===this.y}bounds(){let t=1/Math.pow(2,this.z);return {minX:this.x*t+this.wrap,minY:this.y*t,maxX:(this.x+1)*t+this.wrap,maxY:(this.y+1)*t}}toString(){return this.key}};function Pu(n,e,t){let o=Math.pow(2,t),r=e.maxTiles??512,i=[],a=128;for(let l=0;l<o;l++)for(let s=0;s<o;s++){let c=new Dt(t,s,l),u=c.bounds(),m=(u.minX+u.maxX)/2,f=(u.minY+u.maxY)/2,d=[[m,f],[u.minX,u.minY],[u.maxX,u.minY],[u.minX,u.maxY],[u.maxX,u.maxY]],h=false;for(let[b,A]of d)if(n.isOnGlobeFront(De(b),_e(A))){h=true;break}if(!h)continue;let p=false;for(let[b,A]of d){let y=n.localToPoint(n.globeLocal(b,A));if(y&&y.x>-a&&y.y>-a&&y.x<n.width+a&&y.y<n.height+a){p=true;break}}if(p&&(i.push(c),i.length>=r))return i}return i}function so(n,e){let t=Math.min(e.maxzoom,24),o=Math.max(0,Math.min(e.minzoom,t)),r=e.detailBias??1,i=e.maxTiles??512,a=512*r,l=Math.min(Math.round(n.zoom),t);if(l<o)return [];if(n.globeActive)return Pu(n,e,l);let{min:s,max:c}=n.visibleWrapRange(),u=[],m=[];for(let d=s;d<=c;d++)m.push(new Dt(0,0,0,d));let f=0;for(;m.length&&!(++f>2e4||u.length>=i);){let d=m.pop();if(!n.isTileVisible(d))continue;if(d.z>=l){d.z>=o&&u.push(d);continue}if(n.tileScreenSize(d.z,n.distanceToTile(d))<=a&&d.z>=o){u.push(d);continue}for(let p of d.children())m.push(p);}return u.sort((d,h)=>n.distanceToTile(d)-n.distanceToTile(h)),u}var _n=class{constructor(e){this.id=e;this.state="loading";this.data=null;this.error=null;this.requestId=0;this.buckets=new P;}get hasGeometry(){return this.state==="loaded"&&!!this.data&&Object.keys(this.data.buckets).length>0}destroy(){for(let e of this.buckets.values())e.destroy();this.buckets.clear(),this.data=null;}},ku=1500,tr=class extends Ne{constructor(t,o){super();this.pool=t;this.visible=[];this.holdSince=0;this.warmed=false;this.version=0;this.opts={cacheSize:160,detailBias:1,maxTiles:512,...o},this.cache=new _t(this.opts.cacheSize,(r,i)=>{i.state==="loading"&&this.pool.abort(i.requestId),i.destroy();});}get visibleTiles(){return this.visible}get dataVersion(){return this.version+this.visible.length*1e6}get warm(){return this.warmed}getTile(t){return this.cache.peek(t.dataKey)}splitValues(t){let o=[];for(let r of this.visible){let i=this.getTile(r)?.data?.splits?.[t];if(i)for(let a of i)o.includes(a)||o.push(a);}return o.sort((r,i)=>typeof r=="number"&&typeof i=="number"?r-i:String(r).localeCompare(String(i))),o}get pendingCount(){let t=0;for(let o of this.cache.values())o.state==="loading"&&t++;return t}update(t){let o=so(t,this.opts),r=new q;for(let s of o)r.add(s.dataKey);for(let[s,c]of this.cache.entries())c.state==="loading"&&!r.has(s)&&(this.pool.abort(c.requestId),this.cache.delete(s));let i=Math.max(this.opts.cacheSize,r.size*2);this.cache.setCapacity(i);for(let s of o)this.cache.get(s.dataKey)||this.loadTile(s);let a=this.visible.length>0&&this.covers(o),l=performance.now();this.readyFor(o)||!a||this.holdSince&&l-this.holdSince>ku?(this.visible=o,this.holdSince=0,this.readyFor(o)&&o.length&&(this.warmed=true)):this.holdSince||(this.holdSince=l);}readyFor(t){for(let o of t){let r=this.cache.peek(o.dataKey);if(!r||r.state==="loading")return false}return true}covers(t){let o=new q;for(let r of this.visible)o.add(r.dataKey);for(let r of t){if(o.has(r.dataKey))continue;let i=r.parent(),a=false;for(let l=0;i&&l<4;l++){if(o.has(i.dataKey)){a=true;break}i=i.parent();}if(!a)for(let l of this.visible){let s=l.parent();for(let c=0;s&&c<4;c++){if(s.dataKey===r.dataKey){a=true;break}s=s.parent();}if(a)break}if(!a)return false}return true}loadTile(t){let o=new _n(t);this.cache.set(t.dataKey,o);let r=Gu(this.opts.url.replace("{z}",String(t.z)).replace("{x}",String(t.x)).replace("{y}",String(t.y)));o.requestId=this.pool.load({url:r,zoom:t.z,metersPerTile:Yn(t.z,t.y),sourceMaxZoom:this.opts.maxzoom,plan:this.opts.plan},i=>{if(this.cache.peek(t.dataKey)===o){if(i.type==="error"){if(i.aborted)return;o.state="error",o.error=i.message,this.emit("error",{tile:t,message:i.message});}else o.data=i,o.state=Object.keys(i.buckets).length?"loaded":"empty",this.version++,i.diag?.failed?.length&&console.warn(`[osmgl] \u0442\u0430\u0439\u043B ${t.z}/${t.x}/${t.y}: \u0441\u043B\u043E\u0438 \u043D\u0435 \u0441\u043E\u0431\u0440\u0430\u043B\u0438\u0441\u044C \u2014 ${i.diag.failed.join("; ")}`),this.emit("data",{tile:o});this.pendingCount===0&&this.emit("idle",void 0);}});}findReadyAncestor(t,o=5){let r=t.parent();for(let i=0;r&&i<o;i++){let a=this.cache.peek(r.dataKey);if(a&&a.hasGeometry)return a;r=r.parent();}return null}setCoverOptions(t){t.detailBias!==void 0&&(this.opts.detailBias=t.detailBias),t.maxTiles!==void 0&&(this.opts.maxTiles=t.maxTiles);}setPlan(t){this.opts.plan=t,this.cache.clear();}reload(){this.cache.clear();}destroy(){this.cache.clear(),this.removeAllListeners();}};function Gu(n){if(typeof location>"u")return n;try{return new URL(n,location.href).href}catch{return n}}var or=class{constructor(e){this.id=e;this.state="loading";this.image=null;this.error=null;this.texture=null;}destroy(){this.texture?.destroy(),this.texture=null,this.image?.close(),this.image=null;}},co=class extends Ne{constructor(t){super();this.visible=[];this.aborts=new Map;this.opts={cacheSize:128,detailBias:1,maxTiles:256,...t},this.cache=new _t(this.opts.cacheSize,(o,r)=>{this.aborts.get(o)?.abort(),this.aborts.delete(o),r.destroy();});}get visibleTiles(){return this.visible}getTile(t){return this.cache.peek(t.dataKey)}update(t){this.visible=so(t,this.opts);let o=new q;for(let r of this.visible)o.add(r.dataKey);for(let[r,i]of this.cache.entries())i.state==="loading"&&!o.has(r)&&(this.aborts.get(r)?.abort(),this.aborts.delete(r),this.cache.delete(r));this.cache.setCapacity(Math.max(this.opts.cacheSize,o.size*2));for(let r of this.visible)this.cache.get(r.dataKey)||this.loadTile(r);}reload(){for(let t of this.aborts.values())t.abort();this.aborts.clear(),this.cache.clear();}destroy(){this.reload(),this.removeAllListeners();}loadTile(t){let o=new or(t);this.cache.set(t.dataKey,o);let r=new AbortController;this.aborts.set(t.dataKey,r),this.fetchImage(Sl(this.opts.url,t),r.signal).then(i=>{if(this.aborts.delete(t.dataKey),this.cache.peek(t.dataKey)!==o){i.close();return}o.image=i,o.state="loaded",this.emit("data",{tile:o});}).catch(i=>{this.aborts.delete(t.dataKey),!r.signal.aborted&&this.cache.peek(t.dataKey)===o&&(o.state="error",o.error=i instanceof Error?i.message:String(i),this.emit("error",{tile:t,message:o.error}));});}async fetchImage(t,o){let r=await fetch(t,{signal:o});if(!r.ok)throw new Error(`\u0442\u0430\u0439\u043B \u043F\u043E\u0434\u043B\u043E\u0436\u043A\u0438 ${r.status} ${r.statusText}`);return createImageBitmap(await r.blob())}};function Sl(n,e){let t=n.replace("{z}",String(e.z)).replace("{x}",String(e.x)).replace("{y}",String(e.y));if(typeof location>"u")return t;try{return new URL(t,location.href).href}catch{return t}}var Ru="osmgl-assets",Ft="assets";var rr=null;function Hl(){return rr||(rr=new Promise(n=>{if(typeof indexedDB>"u")return n(null);try{let e=indexedDB.open(Ru,1);e.onupgradeneeded=()=>{let t=e.result;t.objectStoreNames.contains(Ft)||t.createObjectStore(Ft,{keyPath:"key"});},e.onsuccess=()=>n(e.result),e.onerror=()=>n(null);}catch{n(null);}}),rr)}function Ou(n){return Hl().then(e=>new Promise(t=>{if(!e)return t(null);try{let o=e.transaction(Ft,"readonly").objectStore(Ft).get(n);o.onsuccess=()=>t(o.result??null),o.onerror=()=>t(null);}catch{t(null);}}))}function Wu(n){Hl().then(e=>{if(e)try{e.transaction(Ft,"readwrite").objectStore(Ft).put(n);}catch{}});}var Ll=n=>{let e=atob(n),t=new Uint8Array(e.length);for(let o=0;o<e.length;o++)t[o]=e.charCodeAt(o);return t};async function Vu(n,e,t){let o=await crypto.subtle.importKey("raw",Ll(e),"AES-GCM",false,["decrypt"]);return crypto.subtle.decrypt({name:"AES-GCM",iv:Ll(t),tagLength:128},o,n)}var fo=class{constructor(e){this.keys=new Map;this.variants=null;this.inflight=new Map;this.endpoint=e.endpoint.replace(/\/+$/,""),this.apiKey=e.apiKey??null;}withKey(e){return this.apiKey?e+(e.includes("?")?"&":"?")+"key="+encodeURIComponent(this.apiKey):e}loadVariants(){return this.variants??(this.variants=fetch(this.withKey(`${this.endpoint}/variants`),{credentials:"same-origin"}).then(e=>e.ok?e.json():{}).catch(()=>({}))),this.variants}async resolve(e,t){return t?(await this.loadVariants())[String(e)]?.[t]??e:e}async load(e,t,o="",r){let i=await this.resolve(e,o),a=`${i}:${t}`,l=this.inflight.get(a);if(l)return l;let s=this.fetchAsset(a,i,t,r).finally(()=>this.inflight.delete(a));return this.inflight.set(a,s),s}async fetchAsset(e,t,o,r){let i,a,l=await Ou(e);if(l)i=l.bytes,a=l.encrypted;else {let c=await fetch(this.withKey(`${this.endpoint}/files/${t}/data?lod=${o}`),{signal:r,credentials:"same-origin"});if(!c.ok)throw new Error(`data ${c.status}`);a=(c.headers.get("X-Enc")??"none")!=="none",i=await c.arrayBuffer(),Wu({key:e,bytes:i,encrypted:a,savedAt:Date.now()});}if(!a)return i;let s=await this.getKey(t,r);if(!s)throw new Error("\u043D\u0435\u0442 \u043A\u043B\u044E\u0447\u0430 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043E\u0432\u043A\u0438");return Vu(i,s.key,s.iv)}getKey(e,t){let o=this.keys.get(e);if(o)return o;let r=(async()=>{let i=await fetch(this.withKey(`${this.endpoint}/files/${e}/key`),{signal:t,credentials:"same-origin"});if(!i.ok)return null;let a=await i.json();return a.encrypted&&a.key&&a.iv?{key:a.key,iv:a.iv}:null})();return r.catch(()=>this.keys.delete(e)),this.keys.set(e,r),r}};var zu=1,uo=class{constructor(e){this.mesh=null;this.bitmaps=[];this.error=null;this.loading=null;this.matrix=z();this.grow=1;this.growTarget=1;this.animateIn=false;this.shrinkFrom=1;this.growStart=-1;this.fade=1;this.fadeTarget=1;this.fadeFrom=1;this.fadeStart=-1;this.matrix32=new Float32Array(16);this.nodeMatrix32=new Float32Array(16);this.normal32=new Float32Array(9);this.id=e.id??`model-${zu++}`,this.url=e.url,this.fetchBytes=e.fetchBytes,this.coordinates=e.coordinates,this.altitude=e.altitude??0,this.rotation=e.rotation??0,this.rotationTiltX=e.rotationTiltX??0,this.rotationTiltZ=e.rotationTiltZ??0,e.growIn&&(this.animateIn=true,this.grow=0),this.scale=e.scale??1,this.fitHeight=e.fitHeight,this.visible=e.visible!==false,this.userData=e.userData??{};}get isLoaded(){return this.mesh!==null}load(e){return this.loading?(e&&this.loading.then(e),this.loading):(this.loading=(async()=>{try{let t=this.fetchBytes?await this.fetchBytes():await(async()=>{let r=await fetch(this.url);if(!r.ok)throw new Error(`HTTP ${r.status}`);return r.arrayBuffer()})(),o=await sn(t);this.bitmaps=await Promise.all(o.images.map(async r=>{if(!r.length)return null;try{return await createImageBitmap(new Blob([r]))}catch{return null}})),this.mesh=o;}catch(t){this.error=t instanceof Error?t.message:String(t),console.warn(`[osmgl] \u043C\u043E\u0434\u0435\u043B\u044C ${this.url} \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0430\u0441\u044C: ${this.error}`);}e?.();})(),this.loading)}advanceGrow(e){if(!this.mesh)return false;if(!this.animateIn&&this.growTarget===1)return this.grow=1,false;if(e<=0)return this.grow=1,false;let t=performance.now()/1e3;this.growStart<0&&(this.growStart=t);let o=(t-this.growStart)/e;if(this.growTarget===0){if(o>=1)return this.grow=0,false;let i=Math.max(o,0);return this.grow=this.shrinkFrom*(1-i*i*(3-2*i)),true}if(o>=1)return this.grow=1,false;let r=Math.max(o,0)-1;return this.grow=1+r*r*(2.70158*r+1.70158),true}retire(){this.growTarget!==0&&(this.growTarget=0,this.shrinkFrom=this.grow,this.growStart=performance.now()/1e3);}setHidden(e){let t=e?0:1;this.fadeTarget!==t&&(this.fadeTarget=t,this.fadeFrom=this.fade,this.fadeStart=performance.now()/1e3);}advanceFade(e){if(this.fadeStart<0)return false;if(e<=0)return this.fade=this.fadeTarget,this.fadeStart=-1,false;let t=(performance.now()/1e3-this.fadeStart)/e;if(t>=1)return this.fade=this.fadeTarget,this.fadeStart=-1,false;let o=Math.max(t,0),r=o*o*(3-2*o);return this.fade=this.fadeFrom+(this.fadeTarget-this.fadeFrom)*r,true}markGrown(){this.grow=1,this.growTarget=1,this.growStart=-1/0;}revive(){this.growTarget!==1&&(this.growTarget=1,this.growStart=performance.now()/1e3-(this.animateIn?0:1e9));}effectiveScale(){if(!this.mesh||this.fitHeight===void 0)return this.scale;let e=this.mesh.max[1]-this.mesh.min[1];return e>1e-6?this.fitHeight/e:this.scale}boundingRadiusM(){let e=this.mesh;if(!e)return 0;let t=this.effectiveScale(),o=Math.max(Math.abs(e.min[0]),Math.abs(e.max[0])),r=Math.max(Math.abs(e.min[1]),Math.abs(e.max[1])),i=Math.max(Math.abs(e.min[2]),Math.abs(e.max[2]));return Math.hypot(o,r,i)*t}origin(){let e=Z(this.coordinates);return {x:ee(e.lng),y:te(e.lat)}}localMatrix(e){let t=this.effectiveScale(),o=t/He(e),r=[o,0,0,0,0,t*this.grow,0,o,0],i=c=>c*Math.PI/180,a=Fn(i(-this.rotation));this.rotationTiltX&&(a=Ze(Dn(i(this.rotationTiltX)),a)),this.rotationTiltZ&&(a=Ze(En(i(this.rotationTiltZ)),a));let l=Ze(r,a),s=this.matrix;return Re(s),s[0]=l[0],s[1]=l[1],s[2]=l[2],s[4]=l[3],s[5]=l[4],s[6]=l[5],s[8]=l[6],s[9]=l[7],s[10]=l[8],s[15]=1,s}matrixInSpace(e,t){let o=Z(this.coordinates),r=z();for(let a=0;a<16;a++)r[a]=e[a];let i=z();return we(i,r,this.localMatrix(o.lat)),Oe(t??this.matrix32,i)}cameraInModelSpace(e){let t=this.effectiveScale();if(!(t>0))return [0,0,0];let o=this.origin(),r=Z(this.coordinates),i=He(r.lat),a=e.worldSize,l=e.cameraPositionPx,s=(l[0]/a-o.x)*i,c=(l[1]/a-o.y)*i,u=l[2]/e.pixelsPerMeter-this.altitude,m=s,f=u,d=c,h=b=>b*Math.PI/180,p=Fn(h(-this.rotation));return this.rotationTiltX&&(p=Ze(Dn(h(this.rotationTiltX)),p)),this.rotationTiltZ&&(p=Ze(En(h(this.rotationTiltZ)),p)),[(p[0]*m+p[1]*f+p[2]*d)/t,(p[3]*m+p[4]*f+p[5]*d)/t,(p[6]*m+p[7]*f+p[8]*d)/t]}matrixFor(e){let t=this.origin();return this.matrixInSpace(e.objectMatrix(t.x,t.y,this.altitude))}coversPoint(e,t){let o=this.mesh;if(!o)return false;let r=this.origin(),i=e-r.x,a=t-r.y,l=Z(this.coordinates),s=this.localMatrix(l.lat),c=s[0],u=s[1],m=s[8],f=s[9],d=c*f-u*m;if(Math.abs(d)<1e-30)return false;let h=(i*f-a*m)/d,p=(c*a-u*i)/d,b=1.05,A=(o.min[0]+o.max[0])/2,y=(o.min[2]+o.max[2])/2,g=(o.max[0]-o.min[0])/2*b,B=(o.max[2]-o.min[2])/2*b;return Math.abs(h-A)<=g&&Math.abs(p-y)<=B}get isAnimated(){return this.mesh?.animation!=null}matrixForNode(e,t,o){let r=this.origin();return this.matrixInSpaceForNode(e.objectMatrix(r.x,r.y,this.altitude),t,o,this.nodeMatrix32)}matrixInSpaceForNode(e,t,o,r){let i=this.mesh?.animation;if(!i||!i.nodes.has(t))return this.matrixInSpace(e,r);let a=z();for(let m=0;m<16;m++)a[m]=e[m];let l=Z(this.coordinates),s=z();we(s,a,this.localMatrix(l.lat));let c=z();cn(i,t,i.duration>0?o%i.duration:0,c);let u=z();return we(u,s,c),Oe(r,u)}normalMatrix(){let e=i=>i*Math.PI/180,t=Fn(e(-this.rotation));this.rotationTiltX&&(t=Ze(Dn(e(this.rotationTiltX)),t)),this.rotationTiltZ&&(t=Ze(En(e(this.rotationTiltZ)),t));let o=Ze([1,0,0,0,0,1,0,1,0],t),r=this.normal32;for(let i=0;i<9;i++)r[i]=o[i];return r}};function Ze(n,e){let t=new Array(9);for(let o=0;o<3;o++)for(let r=0;r<3;r++)t[o*3+r]=n[r]*e[o*3]+n[3+r]*e[o*3+1]+n[6+r]*e[o*3+2];return t}var Dn=n=>{let e=Math.cos(n),t=Math.sin(n);return [1,0,0,0,e,t,0,-t,e]},Fn=n=>{let e=Math.cos(n),t=Math.sin(n);return [e,0,-t,0,1,0,t,0,e]},En=n=>{let e=Math.cos(n),t=Math.sin(n);return [e,t,0,-t,e,0,0,0,1]};var ir=class{constructor(){this.hit=new P;this.miss=new q;this.stamp="";}find(e,t){if(!t)return null;let o=this.hit.get(e.id);if(o!==void 0)return o;let r=t.source.visibleTiles.map(i=>i.dataKey).join(",");if(r!==this.stamp&&(this.stamp=r,this.miss.clear()),this.miss.has(e.id))return null;for(let i of t.source.visibleTiles){let a=t.source.getTile(i)?.data?.buckets?.[t.key];if(!a||a.kind!=="fill-extrusion"||!a.featureIds)continue;let l=i.bounds();if(e.mercX<l.minX||e.mercX>l.maxX||e.mercY<l.minY||e.mercY>l.maxY)continue;let s=(e.mercX-l.minX)/(l.maxX-l.minX)*a.extent,c=(e.mercY-l.minY)/(l.maxY-l.minY)*a.extent,u=new Int16Array(a.vertices),m=new Uint32Array(a.indices),f=new Float64Array(a.featureIds),d=u.length/a.vertexCount;for(let h=0;h*3+2<m.length;h++){let p=m[h*3]*d,b=m[h*3+1]*d,A=m[h*3+2]*d;if(!Yu(s,c,u[p],u[p+1],u[b],u[b+1],u[A],u[A+1]))continue;let y=f[h];return this.hit.set(e.id,y),y}}return this.miss.add(e.id),null}clear(){this.hit.clear(),this.miss.clear(),this.stamp="";}},Nu=14,Ku=2e3,Uu=4e3,Tl=160,Ju=50,Xu=4e3,Mn=6,ar=class{constructor(e){this.wantKey="";this.modelKey="";this.entries=new P;this.loading=0;this.pending=[];this.known=new P;this.underBuilding=new ir;this.underVenue=new ir;this.tilesStamp="";this.rulesInScan=0;this.found=[];this.foundStamp="";this.sortedAt=null;this.budgetScale=1;this.addModel=null;this.lod=0;this.budget=Tl;this.replacedBuildings=new q;this.replacedVenues=new q;this.onReady=null;this.stats={found:0,kept:0,live:0,tooFar:0,overBudget:0,queued:0,rules:0,loadingNow:0,pendingNow:0,replaced:0};this.loader=new fo(e);}get models(){let e=[];for(let t of this.entries.values())e.push(t.model);return e}update(e,t,o,r,i,a,l){this.wantKey!==this.modelKey&&(this.modelKey=this.wantKey,this.clear(i));let s=e.layout??{},c=s.minZoom??Nu,u=s.loadRadius??Ku,m=Math.max(s.keepRadius??Uu,u),f=Math.min(1,Math.max(.25,(o.zoom-c)/3)),d=Math.max(8,Math.round((s.budget??Tl)*this.budgetScale*f));this.budget=d,this.addModel=r;let h=s.maskReplaced!==false,p=performance.now();if(o.zoom<c){for(let F of [...this.entries.values()])F.model.retire(),F.model.grow<=0&&this.release(F,i);this.replacedBuildings.clear(),this.replacedVenues.clear();return}let b=o.center,A=this.lodFor(o.zoom,c);this.lod=A;let y="";for(let F of t.visibleTiles)y+=F.dataKey+(t.getTile(F)?.data?"+":"-");let g=this.rulesInScan;if(y!==this.tilesStamp){this.tilesStamp=y;let F=new q;g=0;for(let T of t.visibleTiles){let k=t.getTile(T)?.data?.buckets?.[e.id];if(!k||!Xa(k))continue;let H=new Int16Array(k.anchors),G=T.bounds(),N=G.maxX-G.minX,R=G.maxY-G.minY;for(let W=0;W<k.props.length;W++){let V=k.props[W],j=at(V.file,NaN);if(!Number.isFinite(j))continue;let Y=String(V.kind??"model"),oe=Y==="rule"?`t-${V.rid}-${V.oid}`:`m-${V.mid}`;if(F.has(oe))continue;F.add(oe),Y==="rule"&&g++;let ge=G.minX+H[W*2]/k.extent*N,$=G.minY+H[W*2+1]/k.extent*R,J=ju(ge,$);this.known.set(oe,{id:oe,fileId:j,lng:J.lng,lat:J.lat,mercX:ge,mercY:$,altitude:at(V.alt,0),scale:at(V.scale,1),rotation:at(V.rx,0),tiltX:at(V.rz,0),tiltZ:at(V.ry,0),kind:Y==="rule"?"rule":"model",target:nr(Y==="rule"?V.oid:V.replaces),replaces:h?Y==="rule"?nr(V.oid):String(V.anchor??"replace")==="replace"?nr(V.replaces):null:null});}}this.rulesInScan=g;}y!==this.foundStamp&&(this.foundStamp=y,this.found=[...this.known.values()],this.sortedAt=null);let B=this.found,C=new q;for(let F of B)F.kind==="model"&&F.target!==null&&C.add(F.target);let v=111320,_=Math.cos(b.lat*Math.PI/180),w=F=>Math.hypot((F.lng-b.lng)*v*_,(F.lat-b.lat)*v);this.replacedBuildings.clear(),this.replacedVenues.clear();let x=new q,D=[],I=0,E=0;(this.sortedAt===null||Math.hypot((b.lng-this.sortedAt.lng)*v*_,(b.lat-this.sortedAt.lat)*v)>Ju)&&(B.sort((F,T)=>w(F)-w(T)),this.sortedAt={lng:b.lng,lat:b.lat});let M=0;for(let F of B){let T=w(F);if(T>m){I++;continue}if(F.kind==="rule"&&F.target!==null&&C.has(F.target)){let N=this.entries.get(F.id);N&&N.model.retire();continue}let k=this.entries.get(F.id);if(M>=d){E++,k&&k.model.retire();continue}M++,x.add(F.id);let H=()=>{if(F.replaces===null)return;this.replacedBuildings.add(F.replaces);let N=this.underBuilding.find(F,a);N!==null&&this.replacedBuildings.add(N);let R=this.underVenue.find(F,l);R!==null&&this.replacedVenues.add(R);},G=k;if(G){H(),G.distance=T,G.leftAt=0,G.model.revive(),A<G.lod&&!G.upgrading&&this.loading<Mn&&this.upgrade(G,A,r,i);continue}if(T>u){I++;continue}if(this.loading>=Mn){D.push(F),H();continue}H(),this.spawn(F,T,A,r);}for(let F of [...this.entries.values()])if(!x.has(F.placement.id)){if(F.leftAt===0){F.leftAt=p;continue}p-F.leftAt>Xu&&F.model.retire();}for(let F of [...this.entries.values()])F.model.growTarget===0&&F.model.grow<=0&&this.release(F,i);if(this.known.size>4e3)for(let[F,T]of [...this.known.entries()])w(T)>m*3&&this.known.delete(F);let S=this.stats;S.found=B.length,S.kept=x.size,S.live=this.entries.size,S.tooFar=I,S.overBudget=E,S.queued=D.length,S.rules=g,S.loadingNow=this.loading,S.pendingNow=D.length,S.replaced=this.replacedBuildings.size,this.pending=D;}pump(){let e=this.addModel;if(this.stats.loadingNow=this.loading,this.stats.pendingNow=this.pending.length,!!e)for(;this.pending.length&&this.loading<Mn&&this.entries.size<this.budget;){let t=this.pending.shift();this.entries.has(t.id)||this.spawn(t,0,this.lod,e);}}lodFor(e,t){return e>=t+2?0:1}upgrade(e,t,o,r){let i=this.makeModel(e.placement,t,true);e.upgrading=i,this.loading++,i.load(()=>{this.loading--,this.pump(),this.entries.get(e.placement.id)===e&&(e.upgrading=null,i.isLoaded&&(r(e.model),e.model=i,e.lod=t,o(i),this.onReady?.()));});}makeModel(e,t,o){let r=new uo({id:`objects3d-${e.id}`,url:`objects3d:${e.fileId}/${this.modelKey}/lod${t}`,fetchBytes:()=>this.loader.load(e.fileId,t,this.modelKey),coordinates:[e.lng,e.lat],altitude:e.altitude,scale:e.scale,rotation:e.rotation,rotationTiltX:e.tiltX,rotationTiltZ:e.tiltZ,growIn:!o});return o&&r.markGrown(),r}spawn(e,t,o,r,i=false){let a=this.makeModel(e,o,i);this.entries.set(e.id,{placement:e,model:a,distance:t,leftAt:0,lod:o,upgrading:null}),this.loading++,r(a),a.load(()=>{this.loading--,this.pump(),this.onReady?.();});}release(e,t){this.entries.delete(e.placement.id),e.upgrading=null,t(e.model);}setModelKey(e){this.wantKey=e??"";}clear(e){for(let t of [...this.entries.values()])this.release(t,e);this.replacedBuildings.clear(),this.replacedVenues.clear(),this.underBuilding.clear(),this.underVenue.clear();for(let t of Object.keys(this.stats))this.stats[t]=0;}},at=(n,e)=>{let t=typeof n=="number"?n:Number(n);return Number.isFinite(t)?t:e},nr=n=>{let e=at(n,NaN);return Number.isFinite(e)?e:null};function ju(n,e){let t=n*360-180,o=Math.PI*(1-2*e),r=Math.atan(Math.sinh(o))*180/Math.PI;return {lng:t,lat:r}}function Yu(n,e,t,o,r,i,a,l){let s=(n-r)*(o-i)-(t-r)*(e-i),c=(n-a)*(i-l)-(r-a)*(e-l),u=(n-t)*(l-o)-(a-t)*(e-o),m=s<0||c<0||u<0,f=s>0||c>0||u>0;return !(m&&f)}var Zu=200,Qu={center:"translate(-50%, -50%)",top:"translate(-50%, 0)",bottom:"translate(-50%, -100%)",left:"translate(0, -50%)",right:"translate(-100%, -50%)"},ho=class{constructor(e){this.attachedTo=null;this.culled=false;this._visible=true;this._coordinates=e.coordinates,this.altitude=e.altitude??0,this.offset=e.offset??[0,0],this.anchorTransform=Qu[e.anchor??"bottom"],this.userData=e.userData??{};let t=e.element??document.createElement("div");e.element||(t.className="osmgl-marker-default",t.innerHTML=e.html??qu),t.classList.add("osmgl-marker"),e.className&&t.classList.add(e.className),t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.willChange="transform",e.zIndex!==void 0&&(t.style.zIndex=String(e.zIndex)),this.element=t;}get coordinates(){return this._coordinates}setCoordinates(e){return this._coordinates=e,this}setVisible(e){return this._visible=e,this.applyVisibility(),this}get visible(){return this._visible}attach(e){this.attachedTo!==e&&(e.appendChild(this.element),this.attachedTo=e);}detach(){this.element.remove(),this.attachedTo=null;}update(e){let t=Z(this._coordinates),o=e.worldSize,r=e.worldPxToPoint(ee(t.lng)*o,te(t.lat)*o,this.altitude);if(!r){this.culled=true,this.applyVisibility();return}let i=Zu;if(r.x<-i||r.y<-i||r.x>e.width+i||r.y>e.height+i){this.culled=true,this.applyVisibility();return}this.culled=false,this.applyVisibility(),this.element.style.transform=`translate(${Math.round(r.x+this.offset[0])}px, ${Math.round(r.y+this.offset[1])}px) ${this.anchorTransform}`;}applyVisibility(){this.element.style.display=this._visible&&!this.culled?"":"none";}},qu='<svg width="24" height="32" viewBox="0 0 24 32" xmlns="http://www.w3.org/2000/svg"><path d="M12 0C5.4 0 0 5.4 0 12c0 9 12 20 12 20s12-11 12-20c0-6.6-5.4-12-12-12z" fill="#2f6df6"/><circle cx="12" cy="12" r="4.5" fill="#fff"/></svg>';var mo=class extends ho{constructor(t){let o=document.createElement("div");o.className="osmgl-popup",o.style.pointerEvents="auto";let r=document.createElement("div");if(r.className="osmgl-popup-content",t.element?r.appendChild(t.element):r.innerHTML=t.html??"",o.appendChild(r),t.closeButton!==false){let a=document.createElement("button");a.className="osmgl-popup-close",a.type="button",a.setAttribute("aria-label","\u0417\u0430\u043A\u0440\u044B\u0442\u044C"),a.textContent="\xD7",o.appendChild(a);}let i=document.createElement("div");i.className="osmgl-popup-tip",o.appendChild(i);super({coordinates:t.coordinates,element:o,anchor:t.anchor??"bottom",offset:t.offset??[0,-12],altitude:t.altitude,zIndex:t.zIndex??10,className:t.className,userData:t.userData});this.onClose=null;this.content=r,this.closeOnClick=t.closeOnClick!==false,o.querySelector(".osmgl-popup-close")?.addEventListener("click",()=>this.onClose?.());}onCloseRequest(t){return this.onClose=t,this}setHtml(t){return this.content.innerHTML=t,this}setContent(t){return this.content.replaceChildren(t),this}};var $u=[["\u0443\u043B\u0438\u0446\u0430","\u0443\u043B."],["\u0443\u043B\u0438\u0446\u044B","\u0443\u043B."],["\u0443\u043B\u0438\u0446\u0435","\u0443\u043B."],["\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442","\u043F\u0440\u043E\u0441\u043F."],["\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442\u0430","\u043F\u0440\u043E\u0441\u043F."],["\u043F\u0435\u0440\u0435\u0443\u043B\u043E\u043A","\u043F\u0435\u0440."],["\u043F\u0435\u0440\u0435\u0443\u043B\u043A\u0430","\u043F\u0435\u0440."],["\u043F\u0440\u043E\u0435\u0437\u0434","\u043F\u0440-\u0434"],["\u043F\u0440\u043E\u0435\u0437\u0434\u0430","\u043F\u0440-\u0434"],["\u043F\u043B\u043E\u0449\u0430\u0434\u044C","\u043F\u043B."],["\u043F\u043B\u043E\u0449\u0430\u0434\u0438","\u043F\u043B."],["\u0431\u0443\u043B\u044C\u0432\u0430\u0440","\u0431\u0443\u043B."],["\u0431\u0443\u043B\u044C\u0432\u0430\u0440\u0430","\u0431\u0443\u043B."],["\u043D\u0430\u0431\u0435\u0440\u0435\u0436\u043D\u0430\u044F","\u043D\u0430\u0431."],["\u043D\u0430\u0431\u0435\u0440\u0435\u0436\u043D\u043E\u0439","\u043D\u0430\u0431."],["\u0448\u043E\u0441\u0441\u0435","\u0448."],["\u0442\u0443\u043F\u0438\u043A","\u0442\u0443\u043F."],["\u0442\u0443\u043F\u0438\u043A\u0430","\u0442\u0443\u043F."],["\u043C\u0438\u043A\u0440\u043E\u0440\u0430\u0439\u043E\u043D","\u043C\u043A\u0440."],["\u043C\u0438\u043A\u0440\u043E\u0440\u0430\u0439\u043E\u043D\u0430","\u043C\u043A\u0440."],["\u043A\u04EF\u0447\u0430\u0438","\u043A."],["\u043A\u0443\u0447\u0430\u0438","\u043A."],["\u0445\u0438\u0451\u0431\u043E\u043D\u0438","\u0445\u0438\u0451\u0431."],["\u0448\u043E\u04B3\u0440\u043E\u04B3\u0438","\u0448\u043E\u04B3."],["\u0433\u0443\u0437\u0430\u0440\u0433\u043E\u04B3\u0438","\u0433\u0443\u0437."],["\u043C\u0430\u0439\u0434\u043E\u043D\u0438","\u043C\u0430\u0439\u0434."]],Pl=new Map($u);function In(n){let e=n.split(" ");if(e.length<2)return n;let t=false,o=e.map(i=>{let a=Pl.get(i.toLowerCase());return a?(t=true,i[0]===i[0].toUpperCase()?a[0].toUpperCase()+a.slice(1):a):i});return !t||!e.filter(i=>Pl.get(i.toLowerCase())===void 0).length?n:o.join(" ")}function Ln(n,e){let t=[],o=[],r=[],i=[],a=[],l=e.textPlacement==="line",s=[],c=[],u=[];for(let m of n.features()){if(!me(e.filter,m.properties))continue;let f=m.loadGeometry(),d=od(m.type,f);if(!d)continue;let h=e.textField?Sn(e.textField,m.properties):"",p=h&&e.abbreviate?In(h):h,b=e.iconImage?Sn(e.iconImage,m.properties):"";if(!(!p&&!b)){if(l){let A=td(m.type,f);if(!A)continue;u.push({text:p,line:A});continue}t.push(d[0],d[1]),o.push(p),r.push(b),i.push(rd(m.properties)),a.push(e.iconRotate&&Math.round(Number(m.properties[e.iconRotate]??0))||0);}}if(l){for(let{text:m,line:f}of ed(u)){c.push(s.length/2);for(let d of f)s.push(d);t.push(Math.round(f[0]),Math.round(f[1])),o.push(m),r.push(""),i.push(128),a.push(0);}c.push(s.length/2);}return o.length?{anchors:new Int16Array(t).buffer,texts:o,icons:r,priorities:new Uint8Array(i).buffer,rotations:new Int16Array(a).buffer,...l?{lines:new Int16Array(s).buffer,lineStarts:new Uint32Array(c).buffer}:{}}:null}function ed(n){let e=[],t=new Map,o=new Map,r=(i,a,l)=>`${i}\u241F${a}\u241F${l}`;for(let{text:i,line:a}of n){let l=r(i,a[0],a[1]),s=r(i,a[a.length-2],a[a.length-1]),c=t.get(s),u=o.get(l);if(u!==void 0){let m=e[u];if(m.line.push(...a.slice(2)),o.delete(l),o.set(r(i,m.line[m.line.length-2],m.line[m.line.length-1]),u),c!==void 0&&c!==u){let f=e[c];m.line.push(...f.line.slice(2)),f.line=[],t.delete(s),o.set(r(i,m.line[m.line.length-2],m.line[m.line.length-1]),u);}continue}if(c!==void 0){let m=e[c];m.line.unshift(...a.slice(0,a.length-2)),t.delete(s),t.set(r(i,m.line[0],m.line[1]),c);continue}t.set(l,e.length),o.set(s,e.length),e.push({text:i,line:a});}return e.filter(i=>i.line.length>=4)}function td(n,e){if(n!==2)return null;let t=null,o=0;for(let r of e){if(r.length<4)continue;let i=0;for(let a=0;a+3<r.length;a+=2)i+=Math.hypot(r[a+2]-r[a],r[a+3]-r[a+1]);i>o&&(o=i,t=r);}return t}function od(n,e){if(!e.length)return null;if(n===1){let a=e[0];return a.length>=2?[a[0],a[1]]:null}if(n===2){let a=-1,l=0,s=0;for(let c of e)for(let u=0;u+3<c.length;u+=2){let m=c[u+2]-c[u],f=c[u+3]-c[u+1],d=m*m+f*f;d>a&&(a=d,l=c[u]+m/2,s=c[u+1]+f/2);}return a>0?[Math.round(l),Math.round(s)]:null}let t=1/0,o=1/0,r=-1/0,i=-1/0;for(let a of e)for(let l=0;l<a.length;l+=2)a[l]<t&&(t=a[l]),a[l]>r&&(r=a[l]),a[l+1]<o&&(o=a[l+1]),a[l+1]>i&&(i=a[l+1]);return isFinite(t)?[Math.round((t+r)/2),Math.round((o+i)/2)]:null}function rd(n){let e=n.rank;return typeof e=="number"&&isFinite(e)?Math.max(0,255-Math.min(e,255)):128}function Sn(n,e){let t=Array.isArray(n)?n:[n];for(let o of t){let r=true,a=o.replace(/\{([^}]+)\}/g,(l,s)=>{let c=e[s];return c==null||c===""?(r=false,""):String(c)}).trim();if(r&&a)return a}return ""}function kl(n,e){let t=[],o=[];for(let r=0;r<n.length;r++){let i=n.feature(r);if(i.type===1&&me(e,i.properties))for(let a of i.loadGeometry())for(let l=0;l+1<a.length;l+=2)t.push(a[l],a[l+1]),o.push(i.properties);}return o.length?{anchors:Int16Array.from(t).buffer,props:o}:null}function nd(){let n=typeof self<"u"?self.origin:void 0;return n&&n!=="null"&&!n.startsWith("blob:")?n+"/":void 0}async function Rl(n,e){let t=performance.now(),o=nd(),r=await fetch(n.url,{signal:e,credentials:"same-origin",...o?{referrer:o}:{}}),i=(b,A,y,g,B=0)=>({type:"loaded",id:n.id,buckets:{},timing:{fetchMs:g,parseMs:B},diag:{status:b,bytes:A,layers:y,built:0}});if(!r.ok){if(r.status===404||r.status===204)return i(r.status,0,[],performance.now()-t);throw new Error(`HTTP ${r.status} \u0434\u043B\u044F ${n.url}`)}let a=await r.arrayBuffer(),l=performance.now()-t;if(a.byteLength===0)return i(r.status,0,[],l);let s=performance.now(),c=new Vt(a),u=Object.keys(c.layers),m={},f={},d=[],p=n.plan.some(b=>b.type==="surface"&&(b.elevation??0)>0)&&n.plan.some(b=>b.type==="line"&&b.ground)?Or(n.metersPerTile):void 0;for(let b of n.plan){if(!ad(b,n.zoom,n.sourceMaxZoom))continue;let A=c.layers[b.sourceLayer];if(!A)continue;let y=ld(n.zoom,A.extent);try{if(b.splitBy){let B=sd(A,b.splitBy,b.filter);if(!B.length)continue;let C=f[b.splitBy]??(f[b.splitBy]=[]);for(let v of B){C.includes(v)||C.push(v);let _={...b,splitBy:void 0,filter:cd(b.filter,b.splitBy,v)},w=Gl(_,A,y,n.metersPerTile,p);w&&(m[bt(b.id,v)]=w);}continue}let g=Gl(b,A,y,n.metersPerTile,p);g&&(m[b.id]=g);}catch(g){d.push(`${b.id}: ${g instanceof Error?g.message:String(g)}`);}}return {type:"loaded",id:n.id,buckets:m,...Object.keys(f).length?{splits:f}:{},timing:{fetchMs:l,parseMs:performance.now()-s},diag:{status:r.status,bytes:a.byteLength,layers:u,built:Object.keys(m).length,...d.length?{failed:d}:{}}}}function id(n){return e=>{let t=e.on;if(typeof t!="string"||!t)return 0;let o=0;for(let r of t.split(",")){let i=n[r];typeof i=="number"&&i>o&&(o=i);}return o}}function ad(n,e,t){let o=e-1,r=e<t?e+1:24;return !(n.maxzoom<o||n.minzoom>r)}function ld(n,e){return n<=6?Math.max(64,e/24):0}function Gl(n,e,t,o,r){{if(n.type==="fill"){let a=o>0?o/e.extent:0,l=n.cornerRadius&&a>0?{radius:n.cornerRadius/a,segments:n.cornerSegments,extent:e.extent,minCutRatio:0,maxChord:_i/a}:void 0,s=Rr(e,n.filter,t,l,n.clipToTile===true,e.extent);return s?{kind:"fill",...s,extent:e.extent}:null}if(n.type==="surface"){let a=Gr(e,e.extent,n.filter,{metersPerUnit:o>0?o/e.extent:0,elevation:n.elevation??0,base:n.base,bevel:n.bevel,bevelDrop:n.bevelDrop,cornerRadius:n.cornerRadius,cornerSegments:n.cornerSegments,...r?{onShapes:l=>Wr(r,l,n.elevation??0,e.extent)}:{},...n.groundBy?{liftBy:id(n.groundBy)}:{}});return a?{kind:"surface",...a}:null}if(n.type==="line"){let a=zr(e,n.filter,t,n.ground?r:void 0);return a?{kind:"line",...a,extent:e.extent}:null}if(n.type==="model"){let a=kl(e,n.filter);return a?{kind:"placement",...a,extent:e.extent}:null}if(n.type==="symbol"){let a=Ln(e,{filter:n.filter,textField:n.textField,iconImage:n.iconImage,iconRotate:n.iconRotate,textPlacement:n.textPlacement,abbreviate:n.abbreviate});return a?{kind:"symbol",...a,extent:e.extent}:null}let i=Lr(e,e.extent,n.filter,{metersPerUnit:o>0?o/e.extent:0,cornerRadius:n.cornerRadius,cornerSegments:n.cornerSegments});return i?{kind:"fill-extrusion",vertices:i.vertices,indices:i.indices,featureIds:i.featureIds,vertexCount:i.vertexCount,indexCount:i.indexCount,extent:i.extent}:null}}function sd(n,e,t){let o=[];for(let r of n.features()){if(!me(t,r.properties))continue;let i=r.properties[e];typeof i!="string"&&typeof i!="number"||o.includes(i)||o.push(i);}return o.sort((r,i)=>typeof r=="number"&&typeof i=="number"?r-i:String(r).localeCompare(String(i))),o}function cd(n,e,t){let o=["==",e,t];return n?["all",n,o]:o}var Hn='"use strict";(()=>{var se=new Set,Pe=!1;function Y(t,e,n=2){let r=e&&e.length,o=r?e[0]*n:t.length;se.size&&se.clear();let i=ft(t,0,o,n,!0),s=[];if(!i||i.next===i.prev)return s;let u=0,c=0,l=0;if(r&&(i=un(t,e,i,n)),t.length>80*n){u=t[0],c=t[1];let f=u,m=c;for(let a=n;a<o;a+=n){let h=t[a],d=t[a+1];h<u&&(u=h),d<c&&(c=d),h>f&&(f=h),d>m&&(m=d)}l=Math.max(f-u,m-c),l=l!==0?32767/l:0}return Ae(i,s,u,c,l),s}function ft(t,e,n,r,o){let i=null;if(o===wn(t,e,n,r)>0)for(let s=e;s<n;s+=r)i=lt(s/r|0,t[s],t[s+1],i);else for(let s=n-r;s>=e;s-=r)i=lt(s/r|0,t[s],t[s+1],i);return i&&ue(i,i.next)&&(le(i),i=i.next),i}function $(t,e=t){let n=e===t,r=t,o;do o=!1,r!==r.next&&(se.size===0||!se.has(r))&&(ue(r,r.next)||L(r.prev,r,r.next)===0)?((n||r===e)&&(e=r.prev),Pe=!0,le(r),r=r.prev,o=!0):(n||r!==e)&&(r=r.next,o=!n);while(o||r!==e);return e}function Ae(t,e,n,r,o){o&&dn(t,n,r,o);let i=t,s=!1;for(;t.prev!==t.next;){let u=t.prev,c=t.next;if(L(u,t,c)<0&&(o?rn(t,n,r,o):nn(t))){e.push(u.i,t.i,c.i),le(t),t=c,i=c;continue}if(t=c,t===i){if(Pe=!1,t=$(t),Pe){i=t;continue}if(!s){t=on(t,e),i=t,s=!0;continue}sn(t,e,n,r,o);break}}}function nn(t){let e=t.prev,n=t,r=t.next,o=e.x,i=n.x,s=r.x,u=e.y,c=n.y,l=r.y,f=Math.min(o,i,s),m=Math.min(u,c,l),a=Math.max(o,i,s),h=Math.max(u,c,l),d=r.next;for(;d!==e;){if(d.x>=f&&d.x<=a&&d.y>=m&&d.y<=h&&!(o===d.x&&u===d.y)&&ge(o,u,i,c,s,l,d.x,d.y)&&L(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function rn(t,e,n,r){let o=t.prev,i=t,s=t.next,u=o.x,c=i.x,l=s.x,f=o.y,m=i.y,a=s.y,h=Math.min(u,c,l),d=Math.min(f,m,a),g=Math.max(u,c,l),x=Math.max(f,m,a),p=Te(h,d,e,n,r),w=Te(g,x,e,n,r),b=t.prevZ;for(;b&&b.z>=p;){if(b.x>=h&&b.x<=g&&b.y>=d&&b.y<=x&&b!==s&&!(u===b.x&&f===b.y)&&ge(u,f,c,m,l,a,b.x,b.y)&&L(b.prev,b,b.next)>=0)return!1;b=b.prevZ}let y=t.nextZ;for(;y&&y.z<=w;){if(y.x>=h&&y.x<=g&&y.y>=d&&y.y<=x&&y!==s&&!(u===y.x&&f===y.y)&&ge(u,f,c,m,l,a,y.x,y.y)&&L(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function on(t,e){let n=t,r=!1;do{let o=n.prev,i=n.next.next;mt(o,n,n.next,i,!1)&&ce(o,i)&&ce(i,o)&&(e.push(o.i,n.i,i.i),le(n),le(n.next),n=t=i,r=!0),n=n.next}while(n!==t);return r?$(n):n}function sn(t,e,n,r,o){let i=t;do{let s=i.next.next;for(;s!==i.prev;){if(i.i!==s.i&&bn(i,s)){let u=dt(i,s);i=$(i,i.next),u=$(u,u.next),Ae(i,e,n,r,o),Ae(u,e,n,r,o);return}s=s.next}i=i.next}while(i!==t)}var Be=!1;function un(t,e,n,r){let o=[];for(let i=0,s=e.length;i<s;i++){let u=e[i]*r,c=i<s-1?e[i+1]*r:t.length,l=ft(t,u,c,r,!1);l===l.next&&se.add(l),o.push(pn(l))}o.sort(cn),fn(t.length/r,e.length),ht(n,n),Be=!0;for(let i=0;i<o.length;i++)n=ln(o[i],n);return Be=!1,$(n)}function cn(t,e){return t.x-e.x||t.y-e.y||(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)}function ln(t,e){let n=hn(t,e);if(!n)return e;let r=dt(n,t),o=r.next;return ht(n,o.next),$(r,r.next),$(n,n.next)}var at=16,T=new Float64Array(0),ye=0,Ie=[],Ee=[];function fn(t,e){let n=Math.ceil((t+2*e)/at)+e+2;T.length<n*4&&(T=new Float64Array(n*4)),ye=0}function ht(t,e){let n=t;do{let r=ye++;Ie[r]=n;let o=1/0,i=1/0,s=-1/0,u=-1/0,c=0;do{let f=n.next;n.z=r,n.x<o&&(o=n.x),n.x>s&&(s=n.x),n.y<i&&(i=n.y),n.y>u&&(u=n.y),f.x<o&&(o=f.x),f.x>s&&(s=f.x),f.y<i&&(i=f.y),f.y>u&&(u=f.y),n=f}while(++c<at&&n!==e);Ee[r]=n;let l=r*4;T[l]=o,T[l+1]=i,T[l+2]=s,T[l+3]=u}while(n!==e)}function an(t,e){let n=t.z*4;e.x<T[n]&&(T[n]=e.x),e.y<T[n+1]&&(T[n+1]=e.y),e.x>T[n+2]&&(T[n+2]=e.x),e.y>T[n+3]&&(T[n+3]=e.y)}function ut(t){let e=Ee[t];for(;e.prev.next!==e;)e=e.next;return Ee[t]=e,e}function ct(t){let e=Ie[t];for(;e.prev.next!==e;)e=e.next;return Ie[t]=e,e}function hn(t,e){let n=e,r=t.x,o=t.y,i=-1/0,s;if(ue(t,n))return n;for(let a=0,h=0;a<ye;a++,h+=4){if(o<T[h+1]||o>T[h+3]||T[h]>r||T[h+2]<=i)continue;let d=ut(a);n=ct(a);do{if(n.prev.next===n){if(ue(t,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){let g=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(g<=r&&g>i&&(i=g,s=n.x<n.next.x?n:n.next,g===r))return s}}n=n.next}while(n!==d)}if(!s)return null;let u=s.x,c=s.y,l=Math.min(o,c),f=Math.max(o,c),m=1/0;for(let a=0,h=0;a<ye;a++,h+=4){if(T[h+2]<u||T[h]>r||T[h+3]<l||T[h+1]>f)continue;let d=ut(a);n=ct(a);do{if(n.prev.next===n&&r>=n.x&&n.x>=u&&r!==n.x&&ge(o<c?r:i,o,u,c,o<c?i:r,o,n.x,n.y)){let g=Math.abs(o-n.y)/(r-n.x);(ce(n,t)||n.y===o&&n.next.y===o&&n.next.x>r)&&(g<m||g===m&&(n.x>s.x||n.x===s.x&&mn(s,n)))&&(s=n,m=g)}n=n.next}while(n!==d)}return s}function mn(t,e){return L(t.prev,t,e.prev)<0&&L(e.next,t,t.next)<0}var G=[],re=[],Z=new Uint32Array(0),oe=new Uint32Array(0),ie=new Uint32Array(256);function dn(t,e,n,r){let o=t,i=0;do o.z=Te(o.x,o.y,e,n,r),G[i++]=o,o=o.next;while(o!==t);xn(i);let s=null;for(let u=0;u<i;u++){let c=G[u];c.prevZ=s,s&&(s.nextZ=c),s=c}s.nextZ=null}function xn(t){if(t<=32){for(let e=1;e<t;e++){let n=G[e],r=n.z,o=e-1;for(;o>=0&&G[o].z>r;)G[o+1]=G[o],o--;G[o+1]=n}return}Z.length<t&&(Z=new Uint32Array(t),oe=new Uint32Array(t),re=new Array(t));for(let e=0;e<t;e++)Z[e]=G[e].z;pe(t,G,Z,re,oe,0),pe(t,re,oe,G,Z,8),pe(t,G,Z,re,oe,16),pe(t,re,oe,G,Z,24)}function pe(t,e,n,r,o,i){ie.fill(0);for(let u=0;u<t;u++)ie[n[u]>>>i&255]++;let s=0;for(let u=0;u<256;u++){let c=ie[u];ie[u]=s,s+=c}for(let u=0;u<t;u++){let c=n[u],l=ie[c>>>i&255]++;r[l]=e[u],o[l]=c}}function Te(t,e,n,r,o){return t=(t-n)*o|0,e=(e-r)*o|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function pn(t){let e=t,n=t;do(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next;while(e!==t);return n}function ge(t,e,n,r,o,i,s,u){return(o-s)*(e-u)>=(t-s)*(i-u)&&(t-s)*(r-u)>=(n-s)*(e-u)&&(n-s)*(i-u)>=(o-s)*(r-u)}function bn(t,e){let n=ue(t,e)&&L(t.prev,t,t.next)>0&&L(e.prev,e,e.next)>0;return t.next.i!==e.i&&(n||ce(t,e)&&ce(e,t)&&(L(t.prev,t,e.prev)!==0||L(t,e.prev,e)!==0))&&!yn(t,e)&&(n||gn(t,e))}function L(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function ue(t,e){return t.x===e.x&&t.y===e.y}function mt(t,e,n,r,o=!0){let i=L(t,e,n),s=L(t,e,r),u=L(n,r,t),c=L(n,r,e);return(i>0&&s<0||i<0&&s>0)&&(u>0&&c<0||u<0&&c>0)?!0:o?!!(i===0&&be(t,n,e)||s===0&&be(t,r,e)||u===0&&be(n,t,r)||c===0&&be(n,e,r)):!1}function be(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function yn(t,e){let n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),o=Math.min(t.y,e.y),i=Math.max(t.y,e.y),s=t;do{let u=s.next;if(s.x>r&&u.x>r||s.x<n&&u.x<n||s.y>i&&u.y>i||s.y<o&&u.y<o){s=u;continue}if(s.i!==t.i&&u.i!==t.i&&s.i!==e.i&&u.i!==e.i&&mt(s,u,t,e))return!0;s=u}while(s!==t);return!1}function ce(t,e){return L(t.prev,t,t.next)<0?L(t,e,t.next)>=0&&L(t,t.prev,e)>=0:L(t,e,t.prev)<0||L(t,t.next,e)<0}function gn(t,e){let n=t,r=!1,o=(t.x+e.x)/2,i=(t.y+e.y)/2;do{let s=n.next;n.y>i!=s.y>i&&o<(s.x-n.x)*(i-n.y)/(s.y-n.y)+n.x&&(r=!r),n=s}while(n!==t);return r}function dt(t,e){let n=Ve(t.i,t.x,t.y),r=Ve(e.i,e.x,e.y),o=t.next,i=e.prev;return t.next=e,e.prev=t,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function lt(t,e,n,r){let o=Ve(t,e,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function le(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ),Be&&an(t.prev,t.next)}function Ve(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function wn(t,e,n,r){let o=0;for(let i=e,s=n-r;i<n;i+=r)o+=(t[s]-t[i])*(t[i+1]+t[s+1]),s=i;return o}var xt=23283064365386963e-26,Fn=12,pt=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),Le=0,we=1,fe=2,Fe=5,ae=class{constructor(e=new Uint8Array(16)){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(e,n,r=this.length){for(;this.pos<r;){let o=this.readVarint(),i=o>>3,s=this.pos;this.type=o&7,e(i,n,this),this.pos===s&&this.skip(o)}return n}readMessage(e,n){return this.readFields(e,n,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*4294967296;return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*4294967296;return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){let n=this.buf,r,o;return o=n[this.pos++],r=o&127,o<128||(o=n[this.pos++],r|=(o&127)<<7,o<128)||(o=n[this.pos++],r|=(o&127)<<14,o<128)||(o=n[this.pos++],r|=(o&127)<<21,o<128)?r:(o=n[this.pos],r|=(o&15)<<28,Mn(r,e,this))}readVarint64(){return this.readVarint(!0)}readSVarint(){let e=this.readVarint();return e%2===1?(e+1)/-2:e/2}readBoolean(){return!!this.readVarint()}readString(){let e=this.readVarint()+this.pos,n=this.pos;return this.pos=e,e-n>=Fn&&pt?pt.decode(this.buf.subarray(n,e)):Cn(this.buf,n,e)}readBytes(){let e=this.readVarint()+this.pos,n=this.buf.subarray(this.pos,e);return this.pos=e,n}readPackedVarint(e=[],n){let r=this.readPackedEnd();for(;this.pos<r;)e.push(this.readVarint(n));return e}readPackedSVarint(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readSVarint());return e}readPackedBoolean(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readBoolean());return e}readPackedFloat(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readFloat());return e}readPackedDouble(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readDouble());return e}readPackedFixed32(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readFixed32());return e}readPackedSFixed32(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readSFixed32());return e}readPackedFixed64(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readFixed64());return e}readPackedSFixed64(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readSFixed64());return e}readPackedEnd(){return this.type===fe?this.readVarint()+this.pos:this.pos+1}skip(e){let n=e&7;if(n===Le)for(;this.buf[this.pos++]>127;);else if(n===fe)this.pos=this.readVarint()+this.pos;else if(n===Fe)this.pos+=4;else if(n===we)this.pos+=8;else throw new Error(`Unimplemented type: ${n}`)}writeTag(e,n){this.writeVarint(e<<3|n)}realloc(e){let n=this.length||16;for(;n<this.pos+e;)n*=2;if(n!==this.length){let r=new Uint8Array(n);r.set(this.buf),this.buf=r,this.dataView=new DataView(r.buffer),this.length=n}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}writeSFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}writeFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*xt),!0),this.pos+=8}writeSFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*xt),!0),this.pos+=8}writeVarint(e){if(e=+e||0,e>268435455||e<0){Rn(e,this);return}this.realloc(4),this.buf[this.pos++]=e&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127)))}writeSVarint(e){this.writeVarint(e<0?-e*2-1:e*2)}writeBoolean(e){this.writeVarint(+e)}writeString(e){e=String(e),this.realloc(e.length*4),this.pos++;let n=this.pos;this.pos=_n(this.buf,e,this.pos);let r=this.pos-n;r>=128&&bt(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r}writeFloat(e){this.realloc(4),this.dataView.setFloat32(this.pos,e,!0),this.pos+=4}writeDouble(e){this.realloc(8),this.dataView.setFloat64(this.pos,e,!0),this.pos+=8}writeBytes(e){let n=e.length;this.writeVarint(n),this.realloc(n);for(let r=0;r<n;r++)this.buf[this.pos++]=e[r]}writeRawMessage(e,n){this.pos++;let r=this.pos;e(n,this);let o=this.pos-r;o>=128&&bt(r,o,this),this.pos=r-1,this.writeVarint(o),this.pos+=o}writeMessage(e,n,r){this.writeTag(e,fe),this.writeRawMessage(n,r)}writePackedVarint(e,n){n.length&&this.writeMessage(e,kn,n)}writePackedSVarint(e,n){n.length&&this.writeMessage(e,Pn,n)}writePackedBoolean(e,n){n.length&&this.writeMessage(e,In,n)}writePackedFloat(e,n){n.length&&this.writeMessage(e,An,n)}writePackedDouble(e,n){n.length&&this.writeMessage(e,Bn,n)}writePackedFixed32(e,n){n.length&&this.writeMessage(e,En,n)}writePackedSFixed32(e,n){n.length&&this.writeMessage(e,Tn,n)}writePackedFixed64(e,n){n.length&&this.writeMessage(e,Vn,n)}writePackedSFixed64(e,n){n.length&&this.writeMessage(e,Ln,n)}writeBytesField(e,n){this.writeTag(e,fe),this.writeBytes(n)}writeFixed32Field(e,n){this.writeTag(e,Fe),this.writeFixed32(n)}writeSFixed32Field(e,n){this.writeTag(e,Fe),this.writeSFixed32(n)}writeFixed64Field(e,n){this.writeTag(e,we),this.writeFixed64(n)}writeSFixed64Field(e,n){this.writeTag(e,we),this.writeSFixed64(n)}writeVarintField(e,n){this.writeTag(e,Le),this.writeVarint(n)}writeSVarintField(e,n){this.writeTag(e,Le),this.writeSVarint(n)}writeStringField(e,n){this.writeTag(e,fe),this.writeString(n)}writeFloatField(e,n){this.writeTag(e,Fe),this.writeFloat(n)}writeDoubleField(e,n){this.writeTag(e,we),this.writeDouble(n)}writeBooleanField(e,n){this.writeVarintField(e,+n)}};function Mn(t,e,n){let r=n.buf,o,i;if(i=r[n.pos++],o=(i&112)>>4,i<128||(i=r[n.pos++],o|=(i&127)<<3,i<128)||(i=r[n.pos++],o|=(i&127)<<10,i<128)||(i=r[n.pos++],o|=(i&127)<<17,i<128)||(i=r[n.pos++],o|=(i&127)<<24,i<128)||(i=r[n.pos++],o|=(i&1)<<31,i<128))return W(t,o,e);throw new Error("Expected varint not more than 10 bytes")}function W(t,e,n){return n?e*4294967296+(t>>>0):(e>>>0)*4294967296+(t>>>0)}function Rn(t,e){let n,r;if(t>=0?(n=t%4294967296|0,r=t/4294967296|0):(n=~(-t%4294967296),r=~(-t/4294967296),n^4294967295?n=n+1|0:(n=0,r=r+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw new Error("Given varint doesn\'t fit into 10 bytes");e.realloc(10),Sn(n,r,e),vn(r,e)}function Sn(t,e,n){n.buf[n.pos++]=t&127|128,t>>>=7,n.buf[n.pos++]=t&127|128,t>>>=7,n.buf[n.pos++]=t&127|128,t>>>=7,n.buf[n.pos++]=t&127|128,t>>>=7,n.buf[n.pos]=t&127}function vn(t,e){let n=(t&7)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127)))))}function bt(t,e,n){let r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));n.realloc(r);for(let o=n.pos-1;o>=t;o--)n.buf[o+r]=n.buf[o]}function kn(t,e){for(let n=0;n<t.length;n++)e.writeVarint(t[n])}function Pn(t,e){for(let n=0;n<t.length;n++)e.writeSVarint(t[n])}function An(t,e){for(let n=0;n<t.length;n++)e.writeFloat(t[n])}function Bn(t,e){for(let n=0;n<t.length;n++)e.writeDouble(t[n])}function In(t,e){for(let n=0;n<t.length;n++)e.writeBoolean(t[n])}function En(t,e){for(let n=0;n<t.length;n++)e.writeFixed32(t[n])}function Tn(t,e){for(let n=0;n<t.length;n++)e.writeSFixed32(t[n])}function Vn(t,e){for(let n=0;n<t.length;n++)e.writeFixed64(t[n])}function Ln(t,e){for(let n=0;n<t.length;n++)e.writeSFixed64(t[n])}function Cn(t,e,n){let r="",o=e;for(;o<n;){let i=t[o],s=null,u=i>239?4:i>223?3:i>191?2:1;if(o+u>n)break;let c,l,f;u===1?i<128&&(s=i):u===2?(c=t[o+1],(c&192)===128&&(s=(i&31)<<6|c&63,s<=127&&(s=null))):u===3?(c=t[o+1],l=t[o+2],(c&192)===128&&(l&192)===128&&(s=(i&15)<<12|(c&63)<<6|l&63,(s<=2047||s>=55296&&s<=57343)&&(s=null))):u===4&&(c=t[o+1],l=t[o+2],f=t[o+3],(c&192)===128&&(l&192)===128&&(f&192)===128&&(s=(i&15)<<18|(c&63)<<12|(l&63)<<6|f&63,(s<=65535||s>=1114112)&&(s=null))),s===null?(s=65533,u=1):s>65535&&(s-=65536,r+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),r+=String.fromCharCode(s),o+=u}return r}function _n(t,e,n){for(let r=0,o,i;r<e.length;r++){if(o=e.charCodeAt(r),o>55295&&o<57344)if(i)if(o<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=o;continue}else o=i-55296<<10|o-56320|65536,i=null;else{o>56319||r+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=o;continue}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);o<128?t[n++]=o:(o<2048?t[n++]=o>>6|192:(o<65536?t[n++]=o>>12|224:(t[n++]=o>>18|240,t[n++]=o>>12&63|128),t[n++]=o>>6&63|128),t[n++]=o&63|128)}return n}var Ce=class t{constructor(e,n,r,o){this.pbf=e;this.keys=n;this.values=r;this.extent=o;this.type=0;this.properties={};this.geomOffset=-1}static read(e,n,r,o,i){let s=new t(e,r,o,i);return e.readFields(Dn,s,n),s}loadGeometry(){if(this.geomOffset<0)return[];let e=this.pbf,n=e.pos;e.pos=this.geomOffset;let r=e.readVarint()+e.pos,o=1,i=0,s=0,u=0,c=[],l=[];for(;e.pos<r;){if(i<=0){let f=e.readVarint();o=f&7,i=f>>3}if(i--,o===1||o===2)s+=e.readSVarint(),u+=e.readSVarint(),o===1&&(l.length&&c.push(l),l=[]),l.push(s,u);else if(o===7)l.length>=2&&l.push(l[0],l[1]);else throw new Error(`[osmgl] \\u043D\\u0435\\u0438\\u0437\\u0432\\u0435\\u0441\\u0442\\u043D\\u0430\\u044F \\u043A\\u043E\\u043C\\u0430\\u043D\\u0434\\u0430 \\u0433\\u0435\\u043E\\u043C\\u0435\\u0442\\u0440\\u0438\\u0438 MVT: ${o}`)}return l.length&&c.push(l),e.pos=n,c}bbox(){let e=this.loadGeometry(),n=1/0,r=1/0,o=-1/0,i=-1/0;for(let s of e)for(let u=0;u<s.length;u+=2)s[u]<n&&(n=s[u]),s[u]>o&&(o=s[u]),s[u+1]<r&&(r=s[u+1]),s[u+1]>i&&(i=s[u+1]);return[n,r,o,i]}};function Dn(t,e,n){n&&(t===1?e.id=n.readVarint():t===2?Un(n,e):t===3?e.type=n.readVarint():t===4&&(e.geomOffset=n.pos,n.skip(2)))}function Un(t,e){let n=t.readVarint()+t.pos;for(;t.pos<n;){let r=e.keys[t.readVarint()],o=e.values[t.readVarint()];r!==void 0&&(e.properties[r]=o)}}var _e=class t{constructor(e){this.pbf=e;this.version=1;this.name="";this.extent=4096;this.featureOffsets=[];this.keys=[];this.values=[]}static read(e,n){let r=new t(e);return e.readFields(On,r,n),r}get length(){return this.featureOffsets.length}feature(e){let n=this.pbf;n.pos=this.featureOffsets[e];let r=n.readVarint()+n.pos;return Ce.read(n,r,this.keys,this.values,this.extent)}*features(){for(let e=0;e<this.featureOffsets.length;e++)yield this.feature(e)}};function On(t,e,n){n&&(t===15?e.version=n.readVarint():t===1?e.name=n.readString():t===5?e.extent=n.readVarint():t===2?e.featureOffsets.push(n.pos):t===3?e.keys.push(n.readString()):t===4&&e.values.push(Gn(n)))}function Gn(t){let e=t.readVarint()+t.pos,n=null;for(;t.pos<e;){let r=t.readVarint()>>3;r===1?n=t.readString():r===2?n=t.readFloat():r===3?n=t.readDouble():r===4?n=t.readVarint64():r===5?n=t.readVarint():r===6?n=t.readSVarint():r===7?n=t.readBoolean():t.skip(r)}return n}var Me=class{constructor(e){this.layers={};new ae(e instanceof Uint8Array?e:new Uint8Array(e)).readFields((r,o,i)=>{if(r===3&&i){let s=_e.read(i,i.readVarint()+i.pos);s.length&&(this.layers[s.name]=s)}},null)}};function K(t){let e=[],n=null;for(let r of t){if(r.length<6)continue;let o=Hn(r);o!==0&&(o>0?(n&&e.push(n),n={outer:r,holes:[]}):n&&n.holes.push(r))}return n&&e.push(n),e}function Hn(t){let e=0;for(let n=0,r=t.length-2;n<t.length;r=n,n+=2)e+=(t[r]-t[n])*(t[n+1]+t[r+1]);return e/2}function _(t,e){if(!t)return!0;let n=t[0];switch(n){case"all":return t.slice(1).every(r=>_(r,e));case"any":return t.slice(1).some(r=>_(r,e));case"!":return!_(t[1],e);case"has":return e[t[1]]!=null;case"!has":return e[t[1]]==null;case"in":{let r=e[t[1]];return r==null?!1:t.slice(2).includes(r)}case"!in":{let r=e[t[1]];return r==null?!0:!t.slice(2).includes(r)}default:{let r=e[t[1]],o=t[2];if(r==null)return n==="!=";switch(n){case"==":return r===o;case"!=":return r!==o;case">":return r>o;case">=":return r>=o;case"<":return r<o;case"<=":return r<=o;default:return!0}}}}var Nn=Math.PI/8,Xn=.35,zn=32,yt=.25,gt=.07;function X(t,e){let n=e.radius;if(!(n>0))return t;let r=t.length/2-1;if(r<3)return t;let o=Math.max(2,Math.round(e.segments??4)),i=Math.max(e.minCutRatio??Xn,0),s=e.extent,u=[];for(let c=0;c<r;c++){let l=t[c*2],f=t[c*2+1],m=t[(c+r-1)%r*2],a=t[(c+r-1)%r*2+1],h=t[(c+1)%r*2],d=t[(c+1)%r*2+1],g=l-m,x=f-a,p=h-l,w=d-f,b=Math.hypot(g,x),y=Math.hypot(p,w);if(b<1e-6||y<1e-6){u.push(l,f);continue}let F=g/b,M=x/b,v=p/y,R=w/y;if(e.keep?.[c]){u.push(l,f);continue}let S=F*v+M*R;if(S>.985){u.push(l,f);continue}if(s!==void 0&&(De(l,f,s)||De(m,a,s)||De(h,d,s))){u.push(l,f);continue}let P=Math.min(n,b*.4,y*.4);if(P<n*i){u.push(l,f);continue}let V=l-F*P,E=f-M*P,I=l+v*P,A=f+R*P,k=Math.acos(Math.max(-1,Math.min(1,S))),B=Math.min(Nn,Math.PI/2/o),C=Math.ceil(k/B-1e-6),O=e.maxChord&&e.maxChord>0?Math.ceil(P/Math.tan(k/2)*k/e.maxChord):0,z=Math.max(1,Math.min(zn,Math.max(Math.min(o,C),O)));u.push(V,E);for(let H=1;H<z;H++){let D=H/z,U=1-D;u.push(U*U*V+2*U*D*l+D*D*I,U*U*E+2*U*D*f+D*D*A)}u.push(I,A)}return u.length<6?t:(u.push(u[0],u[1]),u)}var De=(t,e,n)=>t<=0||e<=0||t>=n||e>=n;function J(t,e){let n=wt(t.outer,e);if(!n)return null;let r=[];for(let o of t.holes){let i=wt(o,e);i&&r.push(i)}return{outer:n,holes:r}}function wt(t,e){let n=[];for(let r=0;r<t.length-2;r+=2)n.push(t[r],t[r+1]);if(n.length<6)return null;for(let r=0;r<4;r++){let o=n;n=[];let i=o.length/2;if(i===0)return null;for(let s=0;s<i;s++){let u=o[s*2],c=o[s*2+1],l=o[(s+i-1)%i*2],f=o[(s+i-1)%i*2+1],m=Ft(u,c,r,e),a=Ft(l,f,r,e);if(m!==a){let h=Yn(l,f,u,c,r,e);n.push(l+(u-l)*h,f+(c-f)*h)}m&&n.push(u,c)}}return n.length<6?null:(n.push(n[0],n[1]),n)}function Ft(t,e,n,r){return n===0?t>=0:n===1?t<=r:n===2?e>=0:e<=r}function Yn(t,e,n,r,o,i){return o===0?(0-t)/(n-t):o===1?(i-t)/(n-t):o===2?(0-e)/(r-e):(i-e)/(r-e)}function Re(t,e,n,r,o){return t===0&&n===0||t===o&&n===o||e===0&&r===0||e===o&&r===o}function Mt(t,e){for(let n=0;n<t.length;n+=2)if(t[n]<=0||t[n]>=e||t[n+1]<=0||t[n+1]>=e)return!0;return!1}var Ge=18,He=4,Pt=65535/He,Zn=9,$n=1,jn=0,Wn=1,Kn=2;var Rt=0,Jn=1,St=2,Qn=3,qn=.47;function At(t,e,n,r={}){let o=r.metersPerUnit&&r.metersPerUnit>0?r.metersPerUnit:qn,i=Math.max(1024,t.length*48),s=new ArrayBuffer(i*Ge),u={verts:new DataView(s),vertsU8:new Uint8Array(s),vertOffset:0,vertexCount:0,indices:[],featureIds:[],ensure:()=>{}};u.ensure=a=>c(a);let c=a=>{if(u.vertexCount+a<=i)return;i=Math.max(i*2,u.vertexCount+a);let h=new ArrayBuffer(i*Ge);new Uint8Array(h).set(u.vertsU8.subarray(0,u.vertOffset)),s=h,u.verts=new DataView(h),u.vertsU8=new Uint8Array(h)};for(let a of t.features()){if(a.type!==3||!_(n,a.properties))continue;let h=wr(a.properties),d=Fr(a.properties,h);if(h<=d)continue;let g=Rr(a.properties)??Number(a.id??0),x=gr(g>>>0),p=yr(x,a.properties),w=br(a.properties,h),b=K(a.loadGeometry());for(let y of b){let F=J(y,e);if(!F)continue;let M=Mt(F.outer,e),v=(r.cornerRadius??0)/o,R={radius:v,segments:r.cornerSegments,extent:e,minCutRatio:0},S=v>0?{outer:X(F.outer,R),holes:F.holes.map(k=>X(k,R))}:F,P=S.outer.length/2+S.holes.reduce((k,B)=>k+B.length/2,0);c(P*5+32);let V=S.holes.length||M?null:rr(S.outer),E=V?lr(a.properties,V,h,x,o):null,I=null,A=[];if(E&&V){let k=Bt(hr(S.outer,o),V,E.shape);A=mr(k,S.outer);let B=dr(k,A);if(B>1e-6){let C=Math.min(Math.max(B*o*sr,cr),ur);I=xr(k,C/B,h)}}vt(u,S.outer,d,h,g,p,w,o,e,I);for(let k of S.holes)vt(u,k,d,h,g,p,w,o,e,null);I?pr(u,A,I,h,g,p,w,o):nr(u,S.outer,S.holes,h,g,p,w)}}if(!u.indices.length)return null;let l=new Uint32Array(u.indices),f=new Float64Array(u.featureIds);return{vertices:s.slice(0,u.vertOffset),indices:l.buffer,featureIds:f.buffer,vertexCount:u.vertexCount,indexCount:l.length,extent:e}}var Ne=(t,e)=>t|e<<2,Ue=t=>Math.max(0,Math.min(65535,Math.round(Math.min(t,Pt)*He)));function Q(t,e,n,r,o,i,s,u,c,l,f=0,m=0,a=0){let h=t.vertOffset;return t.verts.setInt16(h,Math.round(e),!0),t.verts.setInt16(h+2,Math.round(n),!0),t.verts.setUint16(h+4,Math.round(Math.min(r,Pt)*He),!0),t.vertsU8[h+6]=c,t.vertsU8[h+7]=u,t.verts.setInt8(h+8,Oe(Math.round(o*127))),t.verts.setInt8(h+9,Oe(Math.round(i*127))),t.verts.setInt8(h+10,Oe(Math.round(s*127))),t.vertsU8[h+11]=l,t.verts.setUint16(h+12,Ue(f),!0),t.verts.setUint16(h+14,Ue(m),!0),t.verts.setUint16(h+16,Ue(a),!0),t.vertOffset+=Ge,t.vertexCount++}function vt(t,e,n,r,o,i,s,u,c,l=null){let f=e.length/2;if(f<3)return;let m=Ne(jn,s),a=tr(e,u),h=r-n,d=new Float64Array(f*2),g=new Uint8Array(f);{let x=new Float64Array(f*2);for(let p=0;p<f-1;p++){let w=e[p*2+2]-e[p*2],b=e[p*2+3]-e[p*2+1],y=Math.hypot(w,b)||1;x[p*2]=b/y,x[p*2+1]=-w/y}for(let p=0;p<f-1;p++){let w=(p+f-2)%(f-1),b=x[w*2]*x[p*2]+x[w*2+1]*x[p*2+1],y=x[w*2]+x[p*2],F=x[w*2+1]+x[p*2+1],M=Math.hypot(y,F);b>.5&&M>1e-6&&(d[p*2]=y/M,d[p*2+1]=F/M,g[p]=1)}}for(let x=0;x<f-1;x++){let p=e[x*2],w=e[x*2+1],b=e[x*2+2],y=e[x*2+3];if(p===b&&w===y||Re(p,w,b,y,c))continue;let F=b-p,M=y-w,v=Math.hypot(F,M)||1,R=M/v,S=-F/v,P=a.offset[x],V=a.width[x],E=[0,1];if(l){for(let A=0;A<l.length;A++)for(let k=A+1;k<l.length;k++){let B=j(l[A],p,w)-j(l[k],p,w),C=j(l[A],b,y)-j(l[k],b,y);if(B===C)continue;let O=B/(B-C);O>1e-4&&O<1-1e-4&&E.push(O)}E.sort((A,k)=>A-k)}let I=(A,k)=>{if(!l)return r;let B=1/0;for(let C of l)B=Math.min(B,j(C,A,k));return Math.max(r,B)};for(let A=0;A+1<E.length;A++){let k=E[A],B=E[A+1];if(B-k<1e-6)continue;let C=p+F*k,O=w+M*k,z=p+F*B,H=w+M*B,D=P+v*k*u,U=P+v*B*u,N=(x+1)%(f-1),de=g[x]?d[x*2]:R,ve=g[x]?d[x*2+1]:S,xe=g[N]?d[N*2]:R,ke=g[N]?d[N*2+1]:S,We=R+(de-R)*(1-k),Ke=S+(ve-S)*(1-k),Je=R+(xe-R)*B,Qe=S+(ke-S)*B,qe=Math.hypot(We,Ke)||1,et=Math.hypot(Je,Qe)||1,tt=We/qe,nt=Ke/qe,rt=Je/et,ot=Qe/et;t.ensure(4);let it=Q(t,C,O,n,tt,nt,0,0,i,m,D,V,h),en=Q(t,z,H,n,rt,ot,0,0,i,m,U,V,h),tn=Q(t,C,O,I(C,O),tt,nt,0,255,i,m,D,V,h),st=Q(t,z,H,I(z,H),rt,ot,0,255,i,m,U,V,h);t.indices.push(it,st,en,it,tn,st),t.featureIds.push(o,o)}}}var er=.9976;function tr(t,e){let n=t.length/2-1,r=[];for(let c=0;c<n;c++){let l=t[c*2+2]-t[c*2],f=t[c*2+3]-t[c*2+1],m=Math.hypot(l,f);r.push(m>0?{x:l/m,y:f/m,len:m*e}:{x:0,y:0,len:0})}let o=(c,l)=>r[c].len>0&&r[l].len>0&&r[c].x*r[l].x+r[c].y*r[l].y>=er,i=0;for(;i<n&&o((i-1+n)%n,i);)i++;i>=n&&(i=0);let s=new Array(n).fill(0),u=new Array(n).fill(0);for(let c=0;c<n;){let l=(i+c)%n,f=[l],m=r[l].len,a=c+1;for(;a<n;){let d=(i+a)%n;if(!o((i+a-1)%n,d))break;f.push(d),m+=r[d].len,a++}let h=0;for(let d of f)s[d]=h,u[d]=m,h+=r[d].len;c=a}return{offset:s,width:u}}function nr(t,e,n,r,o,i,s){let u=[],c=[];for(let a=0;a<e.length;a++)u.push(e[a]);for(let a of n){c.push(u.length/2);for(let h=0;h<a.length;h++)u.push(a[h])}let l=Y(u,c.length?c:void 0,2);if(!l.length)return;let f=Ne(Wn,s),m=t.vertexCount;for(let a=0;a<u.length;a+=2)Q(t,u[a],u[a+1],r,0,0,1,255,i,f);for(let a=0;a<l.length;a+=3)t.indices.push(m+l[a],m+l[a+2],m+l[a+1]),t.featureIds.push(o)}function rr(t){let e=or(t);if(e.length<3)return null;let n=Math.abs(ir(t));if(n<=0)return null;let r=null,o=1/0;for(let i=0;i<e.length;i++){let s=(i+1)%e.length,u=e[s].x-e[i].x,c=e[s].y-e[i].y,l=Math.hypot(u,c);if(l<1e-6)continue;u/=l,c/=l;let f=1/0,m=-1/0,a=1/0,h=-1/0;for(let y of e){let F=y.x*u+y.y*c,M=-y.x*c+y.y*u;F<f&&(f=F),F>m&&(m=F),M<a&&(a=M),M>h&&(h=M)}let d=m-f,g=h-a,x=d*g;if(x<=0||x>=o)continue;o=x;let p=(f+m)/2,w=(a+h)/2,b=d>=g;r={cx:p*u-w*c,cy:p*c+w*u,ax:b?u:-c,ay:b?c:u,halfLong:(b?d:g)/2,halfShort:(b?g:d)/2,fill:n/x}}return r}function or(t){let e=[];for(let i=0;i<t.length-2;i+=2)e.push({x:t[i],y:t[i+1]});if(e.length<3)return e;e.sort((i,s)=>i.x===s.x?i.y-s.y:i.x-s.x);let n=(i,s,u)=>(s.x-i.x)*(u.y-i.y)-(s.y-i.y)*(u.x-i.x),r=[];for(let i of e){for(;r.length>=2&&n(r[r.length-2],r[r.length-1],i)<=0;)r.pop();r.push(i)}let o=[];for(let i=e.length-1;i>=0;i--){let s=e[i];for(;o.length>=2&&n(o[o.length-2],o[o.length-1],s)<=0;)o.pop();o.push(s)}return r.pop(),o.pop(),r.concat(o)}function ir(t){let e=0;for(let n=0;n<t.length-2;n+=2)e+=t[n]*t[n+3]-t[n+2]*t[n+1];return e/2}var sr=Math.tan(30*Math.PI/180),ur=3.5,cr=.9;function lr(t,e,n,r,o){if(e.fill<.86)return null;let i=e.halfShort*2*o,s=e.halfLong*2*o,u=i*s,c=e.halfShort>0?e.halfLong/e.halfShort:99,l=fr(t);if(!l){if(n>15||u>600||i<3)return null;let f=r%1e3/1e3;u<30?l=f<.5?"skillion":"gabled":c<1.25?l=f<.35?"pyramidal":"hipped":l=f<.8?"gabled":"hipped"}return l==="flat"?null:{shape:l}}function fr(t){let e=String(t.roof_shape??t["roof:shape"]??"").toLowerCase();return e?e==="flat"?"flat":e==="skillion"||e==="lean_to"||e==="shed"?"skillion":e==="hipped"||e==="half-hipped"||e==="gambrel"?"hipped":e==="pyramidal"||e==="dome"||e==="conical"||e==="onion"?"pyramidal":e==="gabled"||e==="mansard"||e==="round"?"gabled":null:null}var j=(t,e,n)=>t.a*e+t.b*n+t.c;function ar(t,e,n,r){let o=t.length/2;if(o<3)return[];let i=[],s=u=>[t[u*2],t[u*2+1]];for(let u=0;u<o;u++){let[c,l]=s(u),[f,m]=s((u+o-1)%o),a=e*c+n*l+r,h=e*f+n*m+r;if(a<=0!=h<=0){let d=h/(h-a);i.push(f+(c-f)*d,m+(l-m)*d)}a<=0&&i.push(c,l)}return i}function hr(t,e){let n=.5/Math.max(e,1e-6),r=t.length/2-1;if(r<5)return t;let o=[],i=0;o.push(t[0],t[1]);for(let s=1;s<r;s++){let u=t[i*2],c=t[i*2+1],l=t[s*2],f=t[s*2+1],m=l-u,a=f-c,h=Math.hypot(m,a),d=h>1e-6;if(d){for(let g=i+1;g<s;g++)if(Math.abs((t[g*2]-u)*a-(t[g*2+1]-c)*m)/h>=n){d=!1;break}}d||(o.push(t[(s-1)*2],t[(s-1)*2+1]),i=s-1)}return o.length/2<3?t:(o.push(o[0],o[1]),o)}function Bt(t,e,n){let{ax:r,ay:o,halfLong:i}=e;if(n==="skillion"){let c=-o,l=r;return[{a:c,b:l,c:-(c*e.cx+l*e.cy)+e.halfShort}]}let s=[],u=t.length/2-1;for(let c=0;c<u;c++){let l=t[c*2],f=t[c*2+1],m=t[(c+1)%u*2],a=t[(c+1)%u*2+1],h=m-l,d=a-f,g=Math.hypot(h,d);if(g<1e-6||n==="gabled"&&Math.abs((h*r+d*o)/g)<.86)continue;let x=-d/g,p=h/g;s.push({a:x,b:p,c:-(x*l+p*f)})}return!s.length&&i>0?Bt(t,e,"hipped"):s}function mr(t,e){let n=[];for(let o=0;o<e.length-2;o+=2)n.push(e[o],e[o+1]);if(n.length<6)return[];let r=[];for(let o=0;o<t.length;o++){let i=n;for(let s=0;s<t.length&&i.length>=6;s++)s!==o&&(i=ar(i,t[o].a-t[s].a,t[o].b-t[s].b,t[o].c-t[s].c));r.push(i.length>=6?i:[])}return r}function dr(t,e){let n=0;for(let r=0;r<e.length;r++){let o=e[r];for(let i=0;i<o.length;i+=2){let s=j(t[r],o[i],o[i+1]);s>n&&(n=s)}}return n}function xr(t,e,n){return t.map(r=>({a:r.a*e,b:r.b*e,c:r.c*e+n}))}function pr(t,e,n,r,o,i,s,u){let c=Ne(Kn,s);for(let l=0;l<n.length;l++){let f=e[l];if(!f||f.length<6)continue;let m=Y(f,void 0,2);if(!m.length)continue;let a=-n[l].a/u,h=-n[l].b/u,d=Math.hypot(a,h,1),g={x:a/d,y:h/d,z:1/d};t.ensure(f.length/2);let x=t.vertexCount;for(let p=0;p<f.length;p+=2){let w=Math.max(r,j(n[l],f[p],f[p+1]));Q(t,f[p],f[p+1],w,g.x,g.y,g.z,255,i,c)}for(let p=0;p<m.length;p+=3)t.indices.push(x+m[p],x+m[p+2],x+m[p+1]),t.featureIds.push(o)}}function br(t,e){let n=String(t.class??"").toLowerCase();return n==="industrial"||n==="warehouse"||n==="hangar"||n==="construction"?Qn:n==="commercial"||n==="office"||n==="retail"||n==="supermarket"?St:n==="house"||n==="detached"||n==="garage"||n==="hut"||n==="shed"||e<=7?Rt:e>=40?St:Jn}function yr(t,e){let n=String(e.class??""),r=128;return n==="industrial"||n==="warehouse"||n==="construction"?r=96:n==="commercial"||n==="office"||n==="retail"?r=150:(n==="apartments"||n==="residential"||n==="house")&&(r=134),Math.max(0,Math.min(255,r+(t%121-60)))}function gr(t){let e=t>>>0;return e=(e>>>16^e)*73244475,e=(e>>>16^e)*73244475,e=e>>>16^e,e>>>0}function wr(t){let e=q(t.render_height)??q(t.height)??Mr(t.levels??t.building_levels??t["building:levels"]);return e&&e>0?Math.max(e,$n):Zn}function Fr(t,e){let n=q(t.render_min_height)??q(t.min_height)??q(t.base)??0;return n>0&&n<e?n:0}function Mr(t){let e=q(t);return e&&e>0?e*3:null}function q(t){if(typeof t=="number"&&isFinite(t))return t;if(typeof t=="string"){let e=parseFloat(t);if(isFinite(e))return e}return null}var Oe=t=>t>127?127:t<-127?-127:t;function Rr(t){let e=t.osm_id;if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"){let n=Number(e);if(Number.isFinite(n))return n}return null}function Sr(t,e,n,r,o){let i=r*r,s=[],u=f=>t[f*2],c=f=>t[f*2+1],l=(f,m)=>{let a=t.length/2;return t.push((u(f)+u(m))/2,(c(f)+c(m))/2),a};for(let f=0;f<e.length;f+=3){s.push([n+e[f],n+e[f+1],n+e[f+2]]);let m=0;for(;s.length&&!(++m>2e4);){let[a,h,d]=s.pop(),g=(u(a)-u(h))**2+(c(a)-c(h))**2,x=(u(h)-u(d))**2+(c(h)-c(d))**2,p=(u(d)-u(a))**2+(c(d)-c(a))**2,w=Math.max(g,x,p);if(w<=i){o.push(a,h,d);continue}if(w===g){let b=l(a,h);s.push([a,b,d],[b,h,d])}else if(w===x){let b=l(h,d);s.push([h,b,a],[b,d,a])}else{let b=l(d,a);s.push([d,b,h],[b,a,h])}}}}function It(t,e,n=0,r,o=!1,i=4096){let s=[],u=[],c=[];for(let h of t.features()){if(h.type!==3||!_(e,h.properties))continue;let d=h.properties.osm_id,g=typeof d=="number"?d:typeof d=="string"?Number(d):NaN,x=Number.isFinite(g)?g:Number(h.id??0);for(let p of K(h.loadGeometry())){let w=o?J(p,i):p;if(!w)continue;let b=[],y=[],F=r?X(w.outer,r):w.outer;for(let R=0;R<F.length;R++)b.push(F[R]);for(let R of w.holes){let S=r?X(R,r):R;y.push(b.length/2);for(let P=0;P<S.length;P++)b.push(S[P])}let M=Y(b,y.length?y:void 0,2);if(!M.length)continue;let v=s.length/2;for(let R=0;R<b.length;R++)s.push(b[R]);if(n>0){let R=[];Sr(s,M,v,n,R);for(let S=0;S<R.length;S+=3)u.push(R[S],R[S+2],R[S+1]),c.push(x);continue}for(let R=0;R<M.length;R+=3)u.push(v+M[R],v+M[R+2],v+M[R+1]),c.push(x)}}if(!u.length)return null;let l=s.length/2,f=new Int16Array(s),m=new Uint32Array(u);return{featureIds:new Float64Array(c).buffer,vertices:f.buffer,indices:m.buffer,vertexCount:l,indexCount:m.length}}function Tt(t){return{shapes:[],cells:[],extent:0,metersPerTile:t}}function Vt(t,e,n,r){if(!(n<=0)){t.extent=r;for(let o of e){let i=o.outer;if(i.length<6)continue;let s=1/0,u=1/0,c=-1/0,l=-1/0;for(let f=0;f<i.length;f+=2)i[f]<s&&(s=i[f]),i[f]>c&&(c=i[f]),i[f+1]<u&&(u=i[f+1]),i[f+1]>l&&(l=i[f+1]);t.shapes.push({outer:i,holes:o.holes,level:n,minX:s,minY:u,maxX:c,maxY:l})}t.cells=[]}}function vr(t){t.cells=Array.from({length:32*32},()=>[]);let e=t.extent/32;for(let n=0;n<t.shapes.length;n++){let r=t.shapes[n],o=ee(Math.floor(r.minX/e)),i=ee(Math.floor(r.maxX/e)),s=ee(Math.floor(r.minY/e)),u=ee(Math.floor(r.maxY/e));for(let c=s;c<=u;c++)for(let l=o;l<=i;l++)t.cells[c*32+l].push(n)}}var Lt=t=>t.shapes.length===0;function Xe(t,e,n){!t.cells.length&&t.shapes.length&&vr(t);let r=t.extent/32,o=t.cells[ee(Math.floor(n/r))*32+ee(Math.floor(e/r))];if(!o||!o.length)return 0;let i=0;for(let s of o){let u=t.shapes[s];if(u.level<=i||e<u.minX||e>u.maxX||n<u.minY||n>u.maxY||!Et(u.outer,e,n))continue;let c=!1;for(let l of u.holes)if(Et(l,e,n)){c=!0;break}c||(i=u.level)}return Math.min(Math.round(i*100),127)}function Ct(t,e){let n=[],r=[],o=t.extent>0?t.metersPerTile/t.extent:0,i=o>0?2/o:0,s=Xe(t,e[0],e[1]);n.push(e[0],e[1]),r.push(s);for(let u=0;u+3<e.length;u+=2){let c=e[u],l=e[u+1],f=e[u+2],m=e[u+3],a=Xe(t,f,m);if(a!==s&&i>0){let h=Math.hypot(f-c,m-l),d=Math.min(Math.ceil(h/i),64),g=s;for(let x=1;x<d;x++){let p=x/d,w=c+(f-c)*p,b=l+(m-l)*p,y=Xe(t,w,b);y!==g&&(n.push(w,b),r.push(y),g=y)}}n.push(f,m),r.push(a),s=a}return{pts:n,levels:r}}var ee=t=>t<0?0:t>31?31:t;function Et(t,e,n){let r=!1,o=t.length/2;for(let i=0,s=o-1;i<o;s=i++){let u=t[i*2],c=t[i*2+1],l=t[s*2],f=t[s*2+1];c>n!=f>n&&e<(l-u)*(n-c)/(f-c)+u&&(r=!r)}return r}var $e=16,kr=64,Pr=0,Ar=1,_t=2,Br=3,Se=1;function Ht(t,e,n,r){let o=r.metersPerUnit>0?r.metersPerUnit:.5,i=r.elevation,s=r.base??0,u=Math.max(r.bevel??0,0)/o,c=Math.max(r.bevelDrop??0,0),l=Math.max(r.cornerRadius??0,0)/o,f=Math.max(512,t.length*24),m=new ArrayBuffer(f*$e),a={view:new DataView(m),bytes:new Uint8Array(m),offset:0,count:0,indices:[],extent:e,ensure(y){if(a.count+y<=f)return;f=Math.max(f*2,a.count+y);let F=new ArrayBuffer(f*$e);new Uint8Array(F).set(a.bytes.subarray(0,a.offset)),m=F,a.view=new DataView(F),a.bytes=new Uint8Array(F)}},h=[],d=new Map;for(let y of t.features()){if(y.type!==3||!_(n,y.properties))continue;let F=r.liftBy?.(y.properties)??0;for(let M of K(y.loadGeometry())){let v=J(M,e);if(v){h.push(F?{...v,lift:F}:v),Dt(v.outer,d);for(let R of v.holes)Dt(R,d)}}}r.onShapes?.(h);let g=new Set;for(let[y,F]of d)F>1&&g.add(y);let x=[],p={radius:l,segments:r.cornerSegments,extent:e,minCutRatio:0,maxChord:yt/o};for(let y of h){let F=l>0?{outer:X(y.outer,{...p,keep:Ut(y.outer,g)}),holes:y.holes.map(I=>X(I,{...p,keep:Ut(I,g)}))}:y,M=u>0?Gt(F.outer,u,e,g):F.outer,v=F.holes.map(I=>u>0?Gt(I,-u,e,g):I),R=y.lift??0,S=i+R,P=s+R;Ot(a,M??F.outer,v.map((I,A)=>I??F.holes[A]),S);let V=S,E=S-c;M&&u>0&&c>0&&ze(a,M,F.outer,V,E,Ar,e,g),E!==P&&ze(a,F.outer,F.outer,E,P,_t,e,g);for(let I of F.holes)if(E!==P&&ze(a,I,I,E,P,_t,e,g),S<P){let A=a.indices.length;Ot(a,I,[],P,Br);for(let k=A;k<a.indices.length;k++)x.push(a.indices[k]);a.indices.length=A}}if(!a.indices.length&&!x.length)return null;let w=a.indices.length,b=new Uint32Array(w+x.length);return b.set(a.indices,0),b.set(x,w),{vertices:m.slice(0,a.offset),indices:b.buffer,vertexCount:a.count,indexCount:b.length,extent:e,capIndexOffset:w}}function te(t,e,n,r){let o=`${Math.round(t*100)},${Math.round(e*100)}`,i=`${Math.round(n*100)},${Math.round(r*100)}`;return o<i?`${o}|${i}`:`${i}|${o}`}function Dt(t,e){for(let n=0;n+3<t.length;n+=2){let r=te(t[n],t[n+1],t[n+2],t[n+3]);e.set(r,(e.get(r)??0)+1)}}function Ut(t,e){if(!e.size)return;let n=t.length/2-1,r=new Array(n).fill(!1);for(let o=0;o<n;o++){let i=te(t[(o+n-1)%n*2],t[(o+n-1)%n*2+1],t[o*2],t[o*2+1]),s=te(t[o*2],t[o*2+1],t[(o+1)%n*2],t[(o+1)%n*2+1]);(e.has(i)||e.has(s))&&(r[o]=!0)}return r}function he(t,e,n,r,o,i,s,u){let c=t.offset;return t.view.setFloat32(c,e,!0),t.view.setFloat32(c+4,n,!0),t.view.setInt16(c+8,Ir(Math.round(r*kr)),!0),t.view.setInt8(c+10,Ze(Math.round(o*127))),t.view.setInt8(c+11,Ze(Math.round(i*127))),t.view.setInt8(c+12,Ze(Math.round(s*127))),t.bytes[c+13]=u,t.view.setInt8(c+14,e<=0?-Se:e>=t.extent?Se:0),t.view.setInt8(c+15,n<=0?-Se:n>=t.extent?Se:0),t.offset+=$e,t.count++}function Ot(t,e,n,r,o=Pr){let i=[],s=[];for(let l=0;l<e.length;l++)i.push(e[l]);for(let l of n){s.push(i.length/2);for(let f=0;f<l.length;f++)i.push(l[f])}let u=Y(i,s.length?s:void 0,2);if(!u.length)return;t.ensure(i.length/2);let c=t.count;for(let l=0;l<i.length;l+=2)he(t,i[l],i[l+1],r,0,0,1,o);for(let l=0;l<u.length;l+=3)t.indices.push(c+u[l],c+u[l+2],c+u[l+1])}function ze(t,e,n,r,o,i,s,u){let c=Math.min(e.length,n.length)/2;if(!(c<3)){t.ensure((c-1)*4);for(let l=0;l<c-1;l++){let f=n[l*2],m=n[l*2+1],a=n[l*2+2],h=n[l*2+3];if(f===a&&m===h||Re(f,m,a,h,s)||u.has(te(f,m,a,h)))continue;let d=a-f,g=h-m,x=Math.hypot(d,g)||1,p=g/x,w=-d/x,b=r-o,y=Math.hypot(e[l*2]-f,e[l*2+1]-m)||0,F=0;if(y>1e-6&&b!==0){let P=1/Math.hypot(1,b/y);F=y/Math.hypot(y,b)*Math.sign(b),p*=P,w*=P}let M=he(t,e[l*2],e[l*2+1],r,p,w,F,i),v=he(t,e[l*2+2],e[l*2+3],r,p,w,F,i),R=he(t,f,m,o,p,w,F,i),S=he(t,a,h,o,p,w,F,i);t.indices.push(R,v,S,R,M,v)}}}function Gt(t,e,n,r){let o=t.length/2-1;if(o<3)return null;let i=[];for(let c=0;c<o;c++){let l=t[c*2],f=t[c*2+1],m=t[(c+o-1)%o*2],a=t[(c+o-1)%o*2+1],h=t[(c+1)%o*2],d=t[(c+1)%o*2+1],g=Math.hypot(l-m,f-a)||1,x=Math.hypot(h-l,d-f)||1,p=(f-a)/g,w=-(l-m)/g,b=(d-f)/x,y=-(h-l)/x,F=p+b,M=w+y,v=Math.hypot(F,M);if(v<1e-6){i.push(l,f);continue}F/=v,M/=v;let R=Math.min(1/Math.max(F*p+M*w,.35),3),S=l-F*e*R,P=f-M*e*R,V=te(m,a,l,f),E=te(l,f,h,d);if(r.has(V)||r.has(E)){i.push(l,f);continue}(l<=0||l>=n)&&(S=l),(f<=0||f>=n)&&(P=f),i.push(S,P)}i.push(i[0],i[1]);let s=Math.abs(Ye(t)),u=Ye(i);if(Math.sign(u)!==Math.sign(Ye(t))||Math.abs(u)<s*.25)return null;for(let c=0;c<i.length;c+=2)i[c]=Math.max(0,Math.min(n,i[c])),i[c+1]=Math.max(0,Math.min(n,i[c+1]));return i}function Ye(t){let e=0;for(let n=0;n<t.length-2;n+=2)e+=t[n]*t[n+3]-t[n+2]*t[n+1];return e/2}var Ze=t=>t>127?127:t<-127?-127:t,Ir=t=>t>32767?32767:t<-32768?-32768:t;var me=20;function Xt(t,e,n=0,r){let o=Math.max(256,t.length*24),i=new ArrayBuffer(o*me),s=new DataView(i),u=0,c=[],l=h=>{if(u+h<=o)return;o=Math.max(o*2,u+h);let d=new ArrayBuffer(o*me);new Uint8Array(d).set(new Uint8Array(i,0,u*me)),i=d,s=new DataView(d)},f=(h,d,g,x,p,w,b,y=0,F=0)=>{let M=u*me;return s.setInt16(M,h,!0),s.setInt16(M+2,d,!0),s.setInt16(M+4,g,!0),s.setInt16(M+6,x,!0),s.setInt8(M+8,p),s.setInt8(M+9,w),s.setInt8(M+10,y),s.setInt8(M+11,F),s.setFloat32(M+12,b,!0),s.setFloat32(M+16,m,!0),u++},m=0;for(let h of t.features()){if(h.type!==2&&h.type!==3||!_(e,h.properties))continue;let d=h.properties.width;m=typeof d=="number"&&d>.5&&d<100?d:0;let g=h.type===3;for(let x of h.loadGeometry()){let p=n>0?Er(Nt(x),n):Nt(x);if(p.length<4)continue;let w=r&&!Lt(r)?Ct(r,p):null,b=w?w.pts:p,y=w?.levels,F=b.length/2;if(F<2)continue;l((F-1)*4);let M=0;for(let v=0;v<F-1;v++){let R=b[v*2],S=b[v*2+1],P=b[v*2+2],V=b[v*2+3],E=Math.hypot(P-R,V-S);if(g&&Vr(R,S,P,V,t.extent)){M+=E;continue}let I=Tr(R,S,P,V,t.extent);if(!I){M+=E;continue}let[A,k,B,C]=I,O=Math.hypot(A-R,k-S),z=Math.hypot(B-A,C-k),H=Math.hypot(P-B,V-C),D=M+O,U=y?y[v]:0,N=y?y[v+1]:0,de=f(A,k,B,C,0,-1,D,U,N),ve=f(A,k,B,C,0,1,D,U,N),xe=f(A,k,B,C,1,1,D,U,N),ke=f(A,k,B,C,1,-1,D,U,N);M+=O+z+H,c.push(de,ve,xe,de,xe,ke)}}}if(!c.length)return null;let a=new Uint32Array(c);return{vertices:i.slice(0,u*me),indices:a.buffer,vertexCount:u,indexCount:a.length}}function Er(t,e){let n=[];for(let r=0;r+3<t.length;r+=2){let o=t[r],i=t[r+1],s=t[r+2],u=t[r+3];n.push(o,i);let c=Math.min(64,Math.floor(Math.hypot(s-o,u-i)/e));for(let l=1;l<c;l++){let f=l/c;n.push(o+(s-o)*f,i+(u-i)*f)}}return n.push(t[t.length-2],t[t.length-1]),n}function Nt(t){let e=[];for(let n=0;n<t.length;n+=2){let r=t[n],o=t[n+1],i=e.length;i>=2&&e[i-2]===r&&e[i-1]===o||e.push(r,o)}return e}function Tr(t,e,n,r,o){let i=n-t,s=r-e,u=0,c=1,l=[[-i,t],[i,o-t],[-s,e],[s,o-e]];for(let[f,m]of l){if(f===0){if(m<0)return null;continue}let a=m/f;if(f<0){if(a>c)return null;a>u&&(u=a)}else{if(a<u)return null;a<c&&(c=a)}}return c-u<1e-6?null:[Math.round(t+i*u),Math.round(e+s*u),Math.round(t+i*c),Math.round(e+s*c)]}function Vr(t,e,n,r,o){return t===n&&(t<=0||t>=o)?!0:e===r&&(e<=0||e>=o)}var Lr=[["\\u0443\\u043B\\u0438\\u0446\\u0430","\\u0443\\u043B."],["\\u0443\\u043B\\u0438\\u0446\\u044B","\\u0443\\u043B."],["\\u0443\\u043B\\u0438\\u0446\\u0435","\\u0443\\u043B."],["\\u043F\\u0440\\u043E\\u0441\\u043F\\u0435\\u043A\\u0442","\\u043F\\u0440\\u043E\\u0441\\u043F."],["\\u043F\\u0440\\u043E\\u0441\\u043F\\u0435\\u043A\\u0442\\u0430","\\u043F\\u0440\\u043E\\u0441\\u043F."],["\\u043F\\u0435\\u0440\\u0435\\u0443\\u043B\\u043E\\u043A","\\u043F\\u0435\\u0440."],["\\u043F\\u0435\\u0440\\u0435\\u0443\\u043B\\u043A\\u0430","\\u043F\\u0435\\u0440."],["\\u043F\\u0440\\u043E\\u0435\\u0437\\u0434","\\u043F\\u0440-\\u0434"],["\\u043F\\u0440\\u043E\\u0435\\u0437\\u0434\\u0430","\\u043F\\u0440-\\u0434"],["\\u043F\\u043B\\u043E\\u0449\\u0430\\u0434\\u044C","\\u043F\\u043B."],["\\u043F\\u043B\\u043E\\u0449\\u0430\\u0434\\u0438","\\u043F\\u043B."],["\\u0431\\u0443\\u043B\\u044C\\u0432\\u0430\\u0440","\\u0431\\u0443\\u043B."],["\\u0431\\u0443\\u043B\\u044C\\u0432\\u0430\\u0440\\u0430","\\u0431\\u0443\\u043B."],["\\u043D\\u0430\\u0431\\u0435\\u0440\\u0435\\u0436\\u043D\\u0430\\u044F","\\u043D\\u0430\\u0431."],["\\u043D\\u0430\\u0431\\u0435\\u0440\\u0435\\u0436\\u043D\\u043E\\u0439","\\u043D\\u0430\\u0431."],["\\u0448\\u043E\\u0441\\u0441\\u0435","\\u0448."],["\\u0442\\u0443\\u043F\\u0438\\u043A","\\u0442\\u0443\\u043F."],["\\u0442\\u0443\\u043F\\u0438\\u043A\\u0430","\\u0442\\u0443\\u043F."],["\\u043C\\u0438\\u043A\\u0440\\u043E\\u0440\\u0430\\u0439\\u043E\\u043D","\\u043C\\u043A\\u0440."],["\\u043C\\u0438\\u043A\\u0440\\u043E\\u0440\\u0430\\u0439\\u043E\\u043D\\u0430","\\u043C\\u043A\\u0440."],["\\u043A\\u04EF\\u0447\\u0430\\u0438","\\u043A."],["\\u043A\\u0443\\u0447\\u0430\\u0438","\\u043A."],["\\u0445\\u0438\\u0451\\u0431\\u043E\\u043D\\u0438","\\u0445\\u0438\\u0451\\u0431."],["\\u0448\\u043E\\u04B3\\u0440\\u043E\\u04B3\\u0438","\\u0448\\u043E\\u04B3."],["\\u0433\\u0443\\u0437\\u0430\\u0440\\u0433\\u043E\\u04B3\\u0438","\\u0433\\u0443\\u0437."],["\\u043C\\u0430\\u0439\\u0434\\u043E\\u043D\\u0438","\\u043C\\u0430\\u0439\\u0434."]],zt=new Map(Lr);function Yt(t){let e=t.split(" ");if(e.length<2)return t;let n=!1,r=e.map(i=>{let s=zt.get(i.toLowerCase());return s?(n=!0,i[0]===i[0].toUpperCase()?s[0].toUpperCase()+s.slice(1):s):i});return!n||!e.filter(i=>zt.get(i.toLowerCase())===void 0).length?t:r.join(" ")}function $t(t,e){let n=[],r=[],o=[],i=[],s=[],u=e.textPlacement==="line",c=[],l=[],f=[];for(let m of t.features()){if(!_(e.filter,m.properties))continue;let a=m.loadGeometry(),h=Dr(m.type,a);if(!h)continue;let d=e.textField?Zt(e.textField,m.properties):"",g=d&&e.abbreviate?Yt(d):d,x=e.iconImage?Zt(e.iconImage,m.properties):"";if(!(!g&&!x)){if(u){let p=_r(m.type,a);if(!p)continue;f.push({text:g,line:p});continue}n.push(h[0],h[1]),r.push(g),o.push(x),i.push(Ur(m.properties)),s.push(e.iconRotate&&Math.round(Number(m.properties[e.iconRotate]??0))||0)}}if(u){for(let{text:m,line:a}of Cr(f)){l.push(c.length/2);for(let h of a)c.push(h);n.push(Math.round(a[0]),Math.round(a[1])),r.push(m),o.push(""),i.push(128),s.push(0)}l.push(c.length/2)}return r.length?{anchors:new Int16Array(n).buffer,texts:r,icons:o,priorities:new Uint8Array(i).buffer,rotations:new Int16Array(s).buffer,...u?{lines:new Int16Array(c).buffer,lineStarts:new Uint32Array(l).buffer}:{}}:null}function Cr(t){let e=[],n=new Map,r=new Map,o=(i,s,u)=>`${i}\\u241F${s}\\u241F${u}`;for(let{text:i,line:s}of t){let u=o(i,s[0],s[1]),c=o(i,s[s.length-2],s[s.length-1]),l=n.get(c),f=r.get(u);if(f!==void 0){let m=e[f];if(m.line.push(...s.slice(2)),r.delete(u),r.set(o(i,m.line[m.line.length-2],m.line[m.line.length-1]),f),l!==void 0&&l!==f){let a=e[l];m.line.push(...a.line.slice(2)),a.line=[],n.delete(c),r.set(o(i,m.line[m.line.length-2],m.line[m.line.length-1]),f)}continue}if(l!==void 0){let m=e[l];m.line.unshift(...s.slice(0,s.length-2)),n.delete(c),n.set(o(i,m.line[0],m.line[1]),l);continue}n.set(u,e.length),r.set(c,e.length),e.push({text:i,line:s})}return e.filter(i=>i.line.length>=4)}function _r(t,e){if(t!==2)return null;let n=null,r=0;for(let o of e){if(o.length<4)continue;let i=0;for(let s=0;s+3<o.length;s+=2)i+=Math.hypot(o[s+2]-o[s],o[s+3]-o[s+1]);i>r&&(r=i,n=o)}return n}function Dr(t,e){if(!e.length)return null;if(t===1){let s=e[0];return s.length>=2?[s[0],s[1]]:null}if(t===2){let s=-1,u=0,c=0;for(let l of e)for(let f=0;f+3<l.length;f+=2){let m=l[f+2]-l[f],a=l[f+3]-l[f+1],h=m*m+a*a;h>s&&(s=h,u=l[f]+m/2,c=l[f+1]+a/2)}return s>0?[Math.round(u),Math.round(c)]:null}let n=1/0,r=1/0,o=-1/0,i=-1/0;for(let s of e)for(let u=0;u<s.length;u+=2)s[u]<n&&(n=s[u]),s[u]>o&&(o=s[u]),s[u+1]<r&&(r=s[u+1]),s[u+1]>i&&(i=s[u+1]);return isFinite(n)?[Math.round((n+o)/2),Math.round((r+i)/2)]:null}function Ur(t){let e=t.rank;return typeof e=="number"&&isFinite(e)?Math.max(0,255-Math.min(e,255)):128}function Zt(t,e){let n=Array.isArray(t)?t:[t];for(let r of n){let o=!0,s=r.replace(/\\{([^}]+)\\}/g,(u,c)=>{let l=e[c];return l==null||l===""?(o=!1,""):String(l)}).trim();if(o&&s)return s}return""}function jt(t,e){let n=[],r=[];for(let o=0;o<t.length;o++){let i=t.feature(o);if(i.type===1&&_(e,i.properties))for(let s of i.loadGeometry())for(let u=0;u+1<s.length;u+=2)n.push(s[u],s[u+1]),r.push(i.properties)}return r.length?{anchors:Int16Array.from(n).buffer,props:r}:null}var Or="\\u241F",Wt=(t,e)=>t+Or+String(e);function Gr(){let t=typeof self<"u"?self.origin:void 0;return t&&t!=="null"&&!t.startsWith("blob:")?t+"/":void 0}async function Jt(t,e){let n=performance.now(),r=Gr(),o=await fetch(t.url,{signal:e,credentials:"same-origin",...r?{referrer:r}:{}}),i=(x,p,w,b,y=0)=>({type:"loaded",id:t.id,buckets:{},timing:{fetchMs:b,parseMs:y},diag:{status:x,bytes:p,layers:w,built:0}});if(!o.ok){if(o.status===404||o.status===204)return i(o.status,0,[],performance.now()-n);throw new Error(`HTTP ${o.status} \\u0434\\u043B\\u044F ${t.url}`)}let s=await o.arrayBuffer(),u=performance.now()-n;if(s.byteLength===0)return i(o.status,0,[],u);let c=performance.now(),l=new Me(s),f=Object.keys(l.layers),m={},a={},h=[],g=t.plan.some(x=>x.type==="surface"&&(x.elevation??0)>0)&&t.plan.some(x=>x.type==="line"&&x.ground)?Tt(t.metersPerTile):void 0;for(let x of t.plan){if(!Nr(x,t.zoom,t.sourceMaxZoom))continue;let p=l.layers[x.sourceLayer];if(!p)continue;let w=Xr(t.zoom,p.extent);try{if(x.splitBy){let y=zr(p,x.splitBy,x.filter);if(!y.length)continue;let F=a[x.splitBy]??(a[x.splitBy]=[]);for(let M of y){F.includes(M)||F.push(M);let v={...x,splitBy:void 0,filter:Yr(x.filter,x.splitBy,M)},R=Kt(v,p,w,t.metersPerTile,g);R&&(m[Wt(x.id,M)]=R)}continue}let b=Kt(x,p,w,t.metersPerTile,g);b&&(m[x.id]=b)}catch(b){h.push(`${x.id}: ${b instanceof Error?b.message:String(b)}`)}}return{type:"loaded",id:t.id,buckets:m,...Object.keys(a).length?{splits:a}:{},timing:{fetchMs:u,parseMs:performance.now()-c},diag:{status:o.status,bytes:s.byteLength,layers:f,built:Object.keys(m).length,...h.length?{failed:h}:{}}}}function Hr(t){return e=>{let n=e.on;if(typeof n!="string"||!n)return 0;let r=0;for(let o of n.split(",")){let i=t[o];typeof i=="number"&&i>r&&(r=i)}return r}}function Nr(t,e,n){let r=e-1,o=e<n?e+1:24;return!(t.maxzoom<r||t.minzoom>o)}function Xr(t,e){return t<=6?Math.max(64,e/24):0}function Kt(t,e,n,r,o){{if(t.type==="fill"){let s=r>0?r/e.extent:0,u=t.cornerRadius&&s>0?{radius:t.cornerRadius/s,segments:t.cornerSegments,extent:e.extent,minCutRatio:0,maxChord:gt/s}:void 0,c=It(e,t.filter,n,u,t.clipToTile===!0,e.extent);return c?{kind:"fill",...c,extent:e.extent}:null}if(t.type==="surface"){let s=Ht(e,e.extent,t.filter,{metersPerUnit:r>0?r/e.extent:0,elevation:t.elevation??0,base:t.base,bevel:t.bevel,bevelDrop:t.bevelDrop,cornerRadius:t.cornerRadius,cornerSegments:t.cornerSegments,...o?{onShapes:u=>Vt(o,u,t.elevation??0,e.extent)}:{},...t.groundBy?{liftBy:Hr(t.groundBy)}:{}});return s?{kind:"surface",...s}:null}if(t.type==="line"){let s=Xt(e,t.filter,n,t.ground?o:void 0);return s?{kind:"line",...s,extent:e.extent}:null}if(t.type==="model"){let s=jt(e,t.filter);return s?{kind:"placement",...s,extent:e.extent}:null}if(t.type==="symbol"){let s=$t(e,{filter:t.filter,textField:t.textField,iconImage:t.iconImage,iconRotate:t.iconRotate,textPlacement:t.textPlacement,abbreviate:t.abbreviate});return s?{kind:"symbol",...s,extent:e.extent}:null}let i=At(e,e.extent,t.filter,{metersPerUnit:r>0?r/e.extent:0,cornerRadius:t.cornerRadius,cornerSegments:t.cornerSegments});return i?{kind:"fill-extrusion",vertices:i.vertices,indices:i.indices,featureIds:i.featureIds,vertexCount:i.vertexCount,indexCount:i.indexCount,extent:i.extent}:null}}function zr(t,e,n){let r=[];for(let o of t.features()){if(!_(n,o.properties))continue;let i=o.properties[e];typeof i!="string"&&typeof i!="number"||r.includes(i)||r.push(i)}return r.sort((o,i)=>typeof o=="number"&&typeof i=="number"?o-i:String(o).localeCompare(String(i))),r}function Yr(t,e,n){let r=["==",e,n];return t?["all",t,r]:r}var Zr=t=>t.kind==="symbol",$r=t=>t.kind==="placement";function Qt(t){let e=[];for(let n of Object.values(t.buckets)){if($r(n)){e.push(n.anchors);continue}if(Zr(n)){e.push(n.anchors,n.priorities),n.lines&&e.push(n.lines),n.lineStarts&&e.push(n.lineStarts);continue}e.push(n.vertices,n.indices),n.featureIds&&e.push(n.featureIds)}return e}var qt=Map;var ne=new qt,je=self;je.onmessage=t=>{let e=t.data;if(e.type==="abort"){ne.get(e.id)?.abort(),ne.delete(e.id);return}let n=new AbortController;ne.set(e.id,n),Jt(e,n.signal).then(r=>{ne.has(e.id)&&(ne.delete(e.id),je.postMessage(r,Qt(r)))}).catch(r=>{let o=n.signal.aborted;ne.delete(e.id);let i={type:"error",id:e.id,message:r instanceof Error?r.message:String(r),aborted:o};je.postMessage(i)})};})();\n';var lr=class{constructor(e=Tn()){this.workers=[];this.blobUrl=null;this.pending=new P;this.nextId=1;this.cursor=0;this.mainThreadAborts=new P;this.destroyed=false;try{let t=new Blob([Hn],{type:"text/javascript"});this.blobUrl=URL.createObjectURL(t);for(let o=0;o<e;o++){let r=new Worker(this.blobUrl);r.onmessage=i=>this.onMessage(i.data),r.onerror=i=>console.error("[osmgl] \u0432\u043E\u0440\u043A\u0435\u0440 \u0443\u043F\u0430\u043B:",i.message),this.workers.push(r);}}catch(t){console.warn("[osmgl] \u0432\u043E\u0440\u043A\u0435\u0440\u044B \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B, \u0440\u0430\u0437\u0431\u043E\u0440 \u0442\u0430\u0439\u043B\u043E\u0432 \u043F\u043E\u0439\u0434\u0451\u0442 \u0432 \u0433\u043B\u0430\u0432\u043D\u043E\u043C \u043F\u043E\u0442\u043E\u043A\u0435:",t),this.disposeWorkers();}this.usingWorkers=this.workers.length>0;}get size(){return this.workers.length}load(e,t){let o=this.nextId++,r={type:"load",id:o,...e};if(!this.usingWorkers){let a=new AbortController;return this.mainThreadAborts.set(o,a),Rl(r,a.signal).then(l=>{this.mainThreadAborts.has(o)&&(this.mainThreadAborts.delete(o),t(l));}).catch(l=>{let s=a.signal.aborted;this.mainThreadAborts.delete(o),t({type:"error",id:o,message:l instanceof Error?l.message:String(l),aborted:s});}),o}let i=this.cursor++%this.workers.length;return this.pending.set(o,{resolve:t,workerIndex:i}),this.workers[i].postMessage(r),o}abort(e){if(!this.usingWorkers){this.mainThreadAborts.get(e)?.abort(),this.mainThreadAborts.delete(e);return}let t=this.pending.get(e);if(!t)return;this.pending.delete(e);let o={type:"abort",id:e};this.workers[t.workerIndex].postMessage(o);}onMessage(e){if(this.destroyed)return;let t=this.pending.get(e.id);t&&(this.pending.delete(e.id),t.resolve(e));}disposeWorkers(){for(let e of this.workers)e.terminate();this.workers=[],this.blobUrl&&URL.revokeObjectURL(this.blobUrl),this.blobUrl=null;}destroy(){this.destroyed=true;for(let e of this.mainThreadAborts.values())e.abort();this.mainThreadAborts.clear(),this.pending.clear(),this.disposeWorkers();}};function Tn(){let n=typeof navigator<"u"&&navigator.hardwareConcurrency||4;return Math.max(1,Math.min(n-1,6))}function Ol(n){return Math.max(0,Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10))}function Pn(n,e){let t=Ol(n.zoom),o=[Math.round(n.zoom*100)/100,n.center.lat.toFixed(t),n.center.lng.toFixed(t)],r=Math.round(n.bearing*10)/10,i=Math.round(n.pitch*10)/10;(r!==0||i!==0)&&(o.push(r),i!==0&&o.push(i));let a=o.join("/");return e?`${e}=${a}`:a}function kn(n,e){let t=n.replace(/^#/,"");if(!t)return null;if(e){let s=t.split("&").map(c=>c.split("=")).find(([c])=>c===e);if(!s||s.length<2)return null;t=s[1];}let o=t.split("/");if(o.length<3)return null;let r=Number(o[0]),i=Number(o[1]),a=Number(o[2]);if(!isFinite(r)||!isFinite(i)||!isFinite(a)||Math.abs(i)>90||Math.abs(a)>180)return null;let l={center:{lng:a,lat:i},zoom:r};return o.length>3&&isFinite(Number(o[3]))&&(l.bearing=Number(o[3])),o.length>4&&isFinite(Number(o[4]))&&(l.pitch=Number(o[4])),l}function Wl(n){if(typeof window>"u"||!window.history?.replaceState)return;let e=new URL(window.location.href);e.hash=n,window.history.replaceState(window.history.state,"",e.toString());}var Vl={high:{name:"high",maxPixelRatio:2,maxCanvasPixels:16777216,antialias:true,maxWorkers:6,shadowMapSize:1024,detail:1,tileCacheSize:64,allowShadows:true,detailBias:1,maxTiles:512,modelBudget:1,simpleGeometry:false},balanced:{name:"balanced",maxPixelRatio:1.75,maxCanvasPixels:5529600,antialias:true,maxWorkers:4,shadowMapSize:1024,detail:.85,tileCacheSize:40,allowShadows:true,detailBias:1.1,maxTiles:192,modelBudget:.7,simpleGeometry:false},low:{name:"low",maxPixelRatio:1.25,maxCanvasPixels:2592e3,antialias:true,maxWorkers:2,shadowMapSize:512,detail:.5,tileCacheSize:24,allowShadows:false,detailBias:1.25,maxTiles:96,modelBudget:.4,simpleGeometry:true},minimal:{name:"minimal",maxPixelRatio:1,maxCanvasPixels:1152e3,antialias:false,maxWorkers:2,shadowMapSize:512,detail:0,tileCacheSize:16,allowShadows:false,detailBias:1.7,maxTiles:48,modelBudget:.2,simpleGeometry:true}},Et=n=>Vl[n]??Vl.high;function sr(n){let{cores:e,memory:t,mobile:o,devicePixelRatio:r}=n;return e<=2||t!==void 0&&t<=2?"minimal":o?e<=4||t!==void 0&&t<=3?"minimal":e<=6||t!==void 0&&t<=4||r>=3?"low":"balanced":e<=4||t!==void 0&&t<=4?"balanced":"high"}function cr(){if(typeof navigator>"u")return {cores:4,mobile:false,devicePixelRatio:1};let n=navigator,e=typeof matchMedia=="function"&&matchMedia("(pointer: coarse)").matches&&typeof screen<"u"&&Math.min(screen.width,screen.height)<=820,t=n.userAgentData?.mobile===true||e;return {cores:n.hardwareConcurrency||4,memory:n.deviceMemory,mobile:t,devicePixelRatio:typeof devicePixelRatio=="number"?devicePixelRatio:1}}function Gn(n,e,t,o){let r=Math.min(t||1,o.maxPixelRatio),i=Math.max(n*e,1),a=Math.sqrt(o.maxCanvasPixels/i);return Math.max(Math.min(r,a),1)}function Rn(n){return n==="high"?3:n==="balanced"?2:n==="low"?1:0}function zl(n){return n==="minimal"?"low":n==="low"?"balanced":n==="balanced"?"high":null}function On(n){return n==="high"?"balanced":n==="balanced"?"low":n==="low"?"minimal":null}var fd=1,po=class{constructor(e){this.originX=0;this.originY=0;this._revision=0;this.id=e.id??`obj-${fd++}`,this.zIndex=e.zIndex??0,this.altitude=e.altitude??0,this.visible=e.visible!==false,this.userData=e.userData??{},this.paint=e;}get ghostOpacity(){return this.paint.ghostOpacity??0}get revision(){return this._revision}invalidate(){this._revision++;}setPaint(e){return Object.assign(this.paint,e),this.invalidate(),this}setOriginFromCoords(e){let t=1/0,o=1/0,r=-1/0,i=-1/0;for(let a of e)for(let l of a){let s=Z(l),c=ee(s.lng),u=te(s.lat);c<t&&(t=c),c>r&&(r=c),u<o&&(o=u),u>i&&(i=u);}if(!isFinite(t)){this.originX=0,this.originY=0;return}this.originX=(t+r)/2,this.originY=(o+i)/2;}toLocal(e){let t=[];for(let o of e){let r=Z(o);t.push(ee(r.lng)-this.originX,te(r.lat)-this.originY);}return t}color(e,t){let o=ce(this.paint[e]??t),r=this.paint.opacity??1;return [o[0],o[1],o[2],o[3]*r]}linePaint(e){return e.dashArray=this.paint.dashArray,e.offset=this.paint.offset,this.paint.arrow&&(e.arrow=true,e.arrowColor=this.color("arrowColor","#ffffff"),e.arrowPeriod=this.paint.arrowPeriod??46,e.arrowSize=this.paint.arrowSize??5),e}},Vn=class extends po{constructor(e){super(e),this.coordinates=e.coordinates,this.segments=e.segments??[],this.setOriginFromCoords([this.coordinates]);}setCoordinates(e){return this.coordinates=e,this.setOriginFromCoords([e]),this.invalidate(),this}setSegments(e){return this.segments=e,this.invalidate(),this}getCoordinates(){return this.coordinates}rings(){return [this.coordinates]}build(){let e=Yt([this.toLocal(this.coordinates)]);if(!e)return [];let t=this.paint.width??6,o=[],r=this.paint.strokeWidth??0;r>0&&o.push({kind:"line",mesh:e,color:this.color("strokeColor","#ffffff"),width:t+r*2,offset:this.paint.offset});let i=this.colorRuns();if(!i.length)return o.push(this.linePaint({kind:"line",mesh:e,color:this.color("color","#2f6df6"),width:t})),o;let a=this.paint.opacity??1;for(let l of i){let s=Yt([this.toLocal(this.coordinates.slice(l.from,l.to+1))]);if(!s)continue;let c=ce(l.color);o.push(this.linePaint({kind:"line",mesh:s,color:[c[0],c[1],c[2],c[3]*a],width:t}));}return o}colorRuns(){if(this.segments.length===0||this.coordinates.length<2)return [];let e=this.coordinates.length-1,t=this.segments.filter(r=>Number.isInteger(r.at)&&r.at>=0&&r.at<e).sort((r,i)=>r.at-i.at);if(!t.length)return [];let o=[];for(let r=0;r<t.length;r++){let i=r===0?0:t[r].at,a=r+1<t.length?t[r+1].at:e;a>i&&o.push({from:i,to:a,color:t[r].color});}return o}hitTest(e,t,o){let r=(this.paint.width??6)/2+(this.paint.strokeWidth??0)+o,i=Nn(this.coordinates,this.altitude,t);for(let a=0;a+1<i.length;a++)if(Nl(e,i[a],i[a+1])<=r)return true;return false}},fr=class extends po{constructor(e){super(e),this.coordinates=e.coordinates,this.setOriginFromCoords(this.coordinates);}setCoordinates(e){return this.coordinates=e,this.setOriginFromCoords(e),this.invalidate(),this}rings(){return this.coordinates}build(){let e=[],t=nn(this.coordinates.map(r=>this.toLocal(r)));t&&e.push({kind:"fill",mesh:t,color:this.color("color","#2f6df6"),width:0});let o=this.paint.strokeWidth??this.paint.width??0;if(o>0){let r=this.coordinates.map(a=>this.toLocal(Wn(a))),i=Yt(r);i&&e.push(this.linePaint({kind:"line",mesh:i,color:this.color("strokeColor","#2f6df6"),width:o}));}return e}hitTest(e,t){let o=Nn(Wn(this.coordinates[0]??[]),this.altitude,t);if(!Kn(e,o))return false;for(let r=1;r<this.coordinates.length;r++)if(Kn(e,Nn(Wn(this.coordinates[r]),this.altitude,t)))return false;return true}},zn=class extends fr{constructor(e){super({...e,coordinates:[ud(e.center,e.radius,e.segments)]});}};function ud(n,e,t){let o=Z(n),r=e/He(o.lat),i=ee(o.lng),a=te(o.lat),l=Math.max(12,t??Math.min(128,Math.round(24+e/20))),s=[];for(let c=0;c<l;c++){let u=c/l*Math.PI*2;s.push([De(i+Math.cos(u)*r),_e(a+Math.sin(u)*r)]);}return s}function Nn(n,e,t){let o=[];for(let r of n){let i=Z(r),a=t(i.lng,i.lat,e);a&&o.push(a);}return o}function Wn(n){if(n.length<2)return n;let e=Z(n[0]),t=Z(n[n.length-1]);return e.lng===t.lng&&e.lat===t.lat?n:[...n,n[0]]}function Nl(n,e,t){let o=t.x-e.x,r=t.y-e.y,i=o*o+r*r;if(i<1e-12)return Math.hypot(n.x-e.x,n.y-e.y);let a=((n.x-e.x)*o+(n.y-e.y)*r)/i;return a=a<0?0:a>1?1:a,Math.hypot(n.x-(e.x+a*o),n.y-(e.y+a*r))}function Kn(n,e){let t=false;for(let o=0,r=e.length-1;o<e.length;r=o++){let i=e[o].x,a=e[o].y,l=e[r].x,s=e[r].y;a>n.y!=s>n.y&&n.x<(l-i)*(n.y-a)/(s-a)+i&&(t=!t);}return t}var Kl="objects3d",Mt="level",dd=32,hd=100,Un=120,md=40,pd=.35,bd=.02,Ad=150,yd=250;function Ul(n){return typeof n=="number"?{top:n,right:n,bottom:n,left:n}:{top:n?.top??0,right:n?.right??0,bottom:n?.bottom??0,left:n?.left??0}}function gd(n){let e={...n};return delete e.cornerRadius,delete e.cornerSegments,e.type==="surface"&&(e.type="fill",delete e.elevation,delete e.base,delete e.bevel,delete e.bevelDrop),e}var Jn=class extends Ne{constructor(t){super();this.options=t;this.transform=new Lt;this.ctx=null;this.sources=new P;this.rasterSources=new P;this.renderer=new oo;this.objects=new Qt;this.markerHost=null;this.gestures=null;this.resizeObserver=null;this.frameHandle=0;this.needsRepaint=true;this.padding={top:0,right:0,bottom:0,left:0};this.animation=null;this.loaded=false;this.destroyed=false;this.objects3d=null;this.objects3dEnabled=true;this.frameRing=new Uint8Array(Un);this.ringAt=0;this.ringSum=0;this.ringFilled=0;this.steadyFrames=0;this.lastFrameAt=0;this.continuousFrames=0;this.onHashChange=null;this.lastMoveEmit=0;this.lastIndoorKey="";this.writingHash=false;this.hashTimer=0;this.layerOverrides=new P;this.autoIndoorLevel=true;let o=typeof t.container=="string"?document.getElementById(t.container):t.container;if(!o)throw new Error(`[osmgl] \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D: ${String(t.container)}`);this.container=o,this.qualityAuto=(t.quality??"auto")==="auto";let r=this.qualityAuto?sr(cr()):t.quality;this.qualityCeiling=r,this.quality=Et(r),this.densityQuality=this.quality,this.maxPixelRatio=t.maxPixelRatio??this.quality.maxPixelRatio,this._style=new At(t.theme?Vo(t.theme,t.style):t.style),this.background=t.background?ce(t.background):null,this.canvas=document.createElement("canvas"),this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.canvas.style.outline="none",getComputedStyle(this.container).position==="static"&&(this.container.style.position="relative"),this.container.appendChild(this.canvas);let i=document.createElement("div");i.className="osmgl-markers",i.style.cssText="position:absolute;inset:0;overflow:hidden;pointer-events:none",this.container.appendChild(i),this.markerHost=i,this.objects.setMarkerHost(i);let a=this.transform;a.minZoom=t.minZoom??0,a.maxZoom=t.maxZoom??22,a.maxPitch=t.maxPitch??75,a.projection=t.projection??"mercator",a.center=Z(t.center??[0,0]),a.zoom=t.zoom??2,a.bearing=t.bearing??0,a.pitch=t.pitch??0,this.hashName=typeof t.hash=="string"?t.hash:void 0,t.hash&&this.applyHash(false),this.pool=new lr(t.workerCount??Math.min(Tn(),this.quality.maxWorkers)),this.initGL(),this.initSource(),this.initInput(),this.initResize(),queueMicrotask(()=>{this.destroyed||(this.loaded=true,this.emit("load",void 0),this.triggerRepaint());});}initGL(){let t=this.canvas.getContext("webgl2",{alpha:false,antialias:this.quality.antialias,depth:true,stencil:true,preserveDrawingBuffer:false,powerPreference:"high-performance",failIfMajorPerformanceCaveat:false});if(!t)throw new Error("[osmgl] WebGL2 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435");this.ctx=new Co(t);let o=new xt(this.options.fonts??"/tileserver/fonts/{fontstack}/{range}.pbf",this.options.fontstack);this.options.icons&&o.icons.setIcons({...it,...this.options.icons}),o.onAssetsReady=()=>this.triggerRepaint(),this.renderer.symbols=o,this.renderer.objects=this.objects,this.renderer.models.onLoaded=()=>this.triggerRepaint(),this.renderer.init(this.ctx),this.canvas.addEventListener("webglcontextlost",r=>{r.preventDefault(),this.stopFrameLoop(),this.emit("contextlost",void 0),this.emit("error",{message:"\u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 WebGL \u043F\u043E\u0442\u0435\u0440\u044F\u043D"});});}initSource(){this.options.tiles&&this.addSource(X,{url:this.options.tiles,minzoom:this.options.sourceMinZoom??0,maxzoom:this.options.sourceMaxZoom??14});for(let[o,r]of Object.entries({...this._style.spec.sources??{},...this.options.sources??{}}))this.addSource(o,r);let t=this.options.objects3d;if(t){this.objects3d=new ar({endpoint:t.endpoint??"/objects3d",apiKey:t.apiKey??null}),this.objects3d.onReady=()=>this.triggerRepaint(),this.objects3d.setModelKey(this._style.spec.model3dKey??"");let o=t.sourceMaxZoom??14;this.addSource(this.objects3dSource,{url:t.tiles,minzoom:o,maxzoom:o});}}get objects3dSource(){return this.options.objects3d?this.options.objects3d.source??"model3d":null}objects3dPlan(){let t=this.options.objects3d;return {id:Kl,type:"model",sourceLayer:t.sourceLayer??"model3d",minzoom:0,maxzoom:24}}planFor(t,o=this._style){let r=o.workerPlan(t),i=t===this.objects3dSource?[...r,this.objects3dPlan()]:r;return this.quality.simpleGeometry?i.map(gd):i}updateObjects3D(){let t=this.objects3d,o=this.objects3dSource;if(!t||!o)return;let r=this.sources.get(o);if(!r)return;if(!this.objects3dEnabled){t.models.length&&t.clear(l=>this.renderer.models.remove(l,this.ctx?.gl)),this.renderer.hiddenBuildings=t.replacedBuildings,this.renderer.hiddenVenues=t.replacedVenues,this.renderer.hiddenVenueLayer=null;return}let i=this.venuesForMask();t.update({id:Kl,"source-layer":this.options.objects3d.sourceLayer??"model3d",layout:this.options.objects3d.layout},r,this.transform,l=>this.renderer.models.add(l),l=>this.renderer.models.remove(l,this.ctx?.gl),this.buildingsForMask(),i),this.renderer.hiddenBuildings=t.replacedBuildings,this.renderer.hiddenVenues=t.replacedVenues,this.renderer.hiddenVenueLayer=i?.key??null;let a=this.renderer.indoorMask.footprint();if(a){let l=this.transform.worldSize>0?this.transform.pixelsPerMeter/this.transform.worldSize*1.5:0;for(let s of t.models){let c=s.origin();s.setHidden(We(a,c.x,c.y,l));}}else for(let l of t.models)l.setHidden(false);}buildingsForMask(){let t=this.sources.get(X);if(!t)return null;for(let o of this._style.layers){if(o.type!=="fill-extrusion"||(o.source??X)!==X)continue;let r=this._style.bucketKeyFor(o);if(r!==null)return {source:t,key:r}}return null}venuesForMask(){let t=new Set;for(let o of this._style.layers)"splitBy"in o&&o.splitBy===Mt&&t.add(o.source??X);for(let o of this._style.layers){if(o.type!=="fill-extrusion"||"splitBy"in o&&o.splitBy)continue;let r=o.source??X;if(!t.has(r))continue;let i=this.sources.get(r),a=this._style.bucketKeyFor(o);if(i&&a!==null)return {source:i,key:a}}return null}addSource(t,o){if(this.sources.get(t)?.destroy(),this.sources.delete(t),this.rasterSources.get(t)?.destroy(),this.rasterSources.delete(t),o.type==="raster"){let i=new co({url:o.url,minzoom:o.minzoom??0,maxzoom:o.maxzoom??19,cacheSize:this.quality.tileCacheSize*2});return i.on("data",()=>this.triggerRepaint()),i.on("error",({message:a})=>this.emit("error",{message:a})),this.rasterSources.set(t,i),this.triggerRepaint(),this}let r=new tr(this.pool,{url:o.url,minzoom:o.minzoom??0,maxzoom:o.maxzoom??14,cacheSize:this.quality.tileCacheSize*2,plan:this.planFor(t)});return r.on("data",()=>this.triggerRepaint()),r.on("error",({message:i})=>this.emit("error",{message:i})),t===X&&r.on("idle",()=>this.emit("idle",void 0)),this.sources.set(t,r),this.triggerRepaint(),this}initInput(){this.gestures=new Mo(this.canvas,this.transform,t=>{this.animation=null,t==="zoom"&&this.emit("zoom",void 0),this.emitMove(),this.triggerRepaint();},()=>this.emit("moveend",void 0),this.options.gestures),this.initClicks(),this.initHash();}initClicks(){let t=null;this.canvas.addEventListener("pointerdown",r=>{r.button===0&&(t={x:r.clientX,y:r.clientY,t:performance.now()});}),this.canvas.addEventListener("pointerup",r=>{let i=t;if(t=null,r.button!==0||!i||Math.hypot(r.clientX-i.x,r.clientY-i.y)>4||performance.now()-i.t>500)return;let a=this.canvas.getBoundingClientRect(),l={x:r.clientX-a.left,y:r.clientY-a.top},s=this.objects.hitTest(this.transform,l),c=s?null:this.queryRoom(l),u=s||c?null:this.queryBuilding(l);this.options.highlightBuildings!==false&&(this.setHighlight(u),this.setRoomHighlight(c));for(let m of this.getPopups())m.closeOnClick&&this.removePopup(m);this.emit("click",{point:l,lngLat:this.transform.unproject(l),object:s,building:u,symbol:this.querySymbol(l,4)});}),this.canvas.addEventListener("dblclick",r=>{let i=this.pointOf(r);this.emit("dblclick",{point:i,lngLat:this.transform.unproject(i)});}),this.canvas.addEventListener("contextmenu",r=>{r.preventDefault();let i=this.pointOf(r);this.emit("contextmenu",{point:i,lngLat:this.transform.unproject(i)});});let o=0;this.canvas.addEventListener("pointermove",r=>{if(r.pointerType==="touch")return;let i=performance.now();if(i-o<16)return;o=i;let a=this.pointOf(r),l=this.querySymbol(a);this.setSymbolHover(l),this.emit("mousemove",{point:a,lngLat:this.transform.unproject(a),object:this.objects.hitTest(this.transform,a),symbol:l});});}pointOf(t){let o=this.canvas.getBoundingClientRect();return {x:t.clientX-o.left,y:t.clientY-o.top}}initResize(){this.resizeObserver=new ResizeObserver(()=>this.resize()),this.resizeObserver.observe(this.container),this.resize();}resize(){if(this.destroyed)return;let t=this.container.clientWidth||1,o=this.container.clientHeight||1,r=Gn(t,o,Math.min(window.devicePixelRatio||1,this.maxPixelRatio),this.densityQuality);this.canvas.width=Math.round(t*r),this.canvas.height=Math.round(o*r),this.transform.resize(t,o),this.triggerRepaint();}getCenter(){return this.transform.center}getZoom(){return this.transform.zoom}getBearing(){return this.transform.bearing}getPitch(){return this.transform.pitch}setCenter(t){return this.transform.center=Z(t),this.afterCameraChange()}setZoom(t){return this.transform.zoom=t,this.emit("zoom",void 0),this.afterCameraChange()}setBearing(t){return this.transform.bearing=t,this.afterCameraChange()}setPitch(t){return this.transform.pitch=t,this.afterCameraChange()}jumpTo(t){let o=this.transform;return t.center!==void 0&&(o.center=Z(t.center)),t.zoom!==void 0&&(o.zoom=t.zoom),t.bearing!==void 0&&(o.bearing=t.bearing),t.pitch!==void 0&&(o.pitch=t.pitch),this.animation=null,this.afterCameraChange()}easeTo(t){let o=t.duration??0;if(o<=0)return this.jumpTo(t);let r=this.transform,i={center:r.center,zoom:r.zoom,bearing:r.bearing,pitch:r.pitch},l={center:t.center!==void 0?Z(t.center):r.center,zoom:t.zoom??r.zoom,bearing:i.bearing+lt((t.bearing??r.bearing)-i.bearing),pitch:t.pitch??r.pitch};return this.animation={start:performance.now(),duration:o,from:i,to:l},this.triggerRepaint(),this}flyTo(t){let o=this.transform,r={center:o.center,zoom:o.zoom,bearing:o.bearing,pitch:o.pitch},a={center:t.center!==void 0?Z(t.center):o.center,zoom:t.zoom??o.zoom,bearing:r.bearing+lt((t.bearing??o.bearing)-r.bearing),pitch:t.pitch??o.pitch},l=Ke(r.zoom),s=(ee(a.center.lng)-ee(r.center.lng))*l,c=(te(a.center.lat)-te(r.center.lat))*l,u=Math.hypot(s,c),m=Math.max(o.width,o.height),f=m*Math.pow(2,r.zoom-a.zoom),d=1.42,h=d*d,p,b=null;if(u<1e-6){let y=Math.log(f/m);p=Math.abs(y)/d,b=g=>({u:0,w:m*Math.exp(d*Math.sign(y)*g)});}else {let y=w=>{let x=w===0?m:f,D=w===0?f:m;return (D*D-x*x+(w===0?1:-1)*h*h*u*u)/(2*x*h*u)},g=w=>Math.log(-y(w)+Math.sqrt(y(w)*y(w)+1)),B=g(0);p=(g(1)-B)/d;let v=w=>(Math.exp(w)+Math.exp(-w))/2,_=w=>(Math.exp(2*w)-1)/(Math.exp(2*w)+1);b=w=>{let x=d*w+B;return {u:m*v(B)*_(x)/h-m*Math.sinh(B)/h,w:m*v(B)/v(x)}};}if(!Number.isFinite(p)||p<=0)return this.jumpTo(t);let A=t.duration??Math.min(3e3,p/1.2*1e3);return this.animation={start:performance.now(),duration:A,from:r,to:a,fly:{S:p,u1:u,curve:b,w0:m}},this.triggerRepaint(),this}setPadding(t){return this.padding=Ul(t),this.renderer.symbols&&(this.renderer.symbols.padding=this.padding),this.triggerRepaint(),this}getPadding(){return {...this.padding}}getBounds(){let t=this.transform,o=new It;for(let[r,i]of [[0,0],[t.width,0],[t.width,t.height],[0,t.height]])o.extend(t.unproject({x:r,y:i}));return o}cameraForBounds(t,o={}){let r=this.transform,i=hr(t,{width:r.width,height:r.height,bearing:o.bearing??r.bearing,padding:o.padding!==void 0?Ul(o.padding):this.padding,maxZoom:Math.min(o.maxZoom??r.maxZoom,r.maxZoom),minZoom:r.minZoom});return i?{...i,pitch:o.pitch??r.pitch}:null}fitBounds(t,o={}){let r=this.cameraForBounds(t,o);if(!r)return this;let i={...r,duration:o.duration??600};return o.fly?this.flyTo(i):this.easeTo(i)}stepAnimation(t){let o=this.animation;if(!o)return false;let r=ve((t-o.start)/o.duration,0,1),i=o.fly?r:Bo(r),a=this.transform,l=Z(o.from.center),s=Z(o.to.center);if(o.fly){let{u:c,w:u}=o.fly.curve(o.fly.S*r),m=o.fly.u1>1e-6?ve(c/o.fly.u1,0,1):r;return a.center={lng:l.lng+(s.lng-l.lng)*m,lat:l.lat+(s.lat-l.lat)*m},a.zoom=o.from.zoom+Math.log2(o.fly.w0/u),a.bearing=o.from.bearing+(o.to.bearing-o.from.bearing)*Bo(r),a.pitch=o.from.pitch+(o.to.pitch-o.from.pitch)*Bo(r),r>=1&&(a.center=s,a.zoom=o.to.zoom),this.emitMove(),r>=1?(this.animation=null,this.emit("moveend",void 0),false):true}return a.center={lng:l.lng+(s.lng-l.lng)*i,lat:l.lat+(s.lat-l.lat)*i},a.zoom=o.from.zoom+(o.to.zoom-o.from.zoom)*i,a.bearing=o.from.bearing+(o.to.bearing-o.from.bearing)*i,a.pitch=o.from.pitch+(o.to.pitch-o.from.pitch)*i,this.emitMove(),r>=1?(this.animation=null,this.emit("moveend",void 0),false):true}afterCameraChange(){return this.emitMove(),this.triggerRepaint(),this}emitMove(){let t=performance.now();t-this.lastMoveEmit<8||(this.lastMoveEmit=t,this.emit("move",void 0));}project(t,o=0){return this.transform.project(Z(t),o)}unproject(t){return this.transform.unproject(t)}get style(){return this._style}setStyle(t){let o=this._style,r=new At(t);Object.assign(r.splitValues,o.splitValues),this._style=r,this.applyLayerOverrides();for(let[i,a]of this.sources.entries()){let l=JSON.stringify(o.workerPlan(i)),s=JSON.stringify(r.workerPlan(i));l!==s&&a.setPlan(this.planFor(i,r));}return this.objects3d?.setModelKey(t.model3dKey??""),this.triggerRepaint(),this}setTheme(t){return this.setStyle(Vo(t,this.options.style))}static get themes(){return Object.keys(yt)}static get themeList(){return Object.entries(yt).map(([t,o])=>({id:t,name:o.name||t}))}setLayoutProperty(t,o,r){let i=this._style.layers.find(l=>l.id===t);if(!i)return console.warn(`[osmgl] \u0441\u043B\u043E\u0439 \u0441\u0442\u0438\u043B\u044F "${t}" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D`),this;let a=i.layout??(i.layout={});if(a[o]=r,this.rememberOverride(t,{layout:{[o]:r}}),o==="textField"||o==="iconImage"||o==="splitBy")for(let[l,s]of this.sources)s.setPlan(this.planFor(l));return this.triggerRepaint(),this}setPaintProperty(t,o,r){let i=this._style.layers.find(a=>a.id===t);return i?(i.paint[o]=r,this.rememberOverride(t,{paint:{[o]:r}}),this.triggerRepaint(),this):(console.warn(`[osmgl] \u0441\u043B\u043E\u0439 \u0441\u0442\u0438\u043B\u044F "${t}" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D`),this)}setShadows(t){let o=typeof t=="boolean"?{enabled:t}:t;return Object.assign(this.renderer.shadows,o),this.triggerRepaint(),this}querySymbol(t,o=2){let r=this.renderer.symbols?.querySymbol(t,o);return r?{layerId:r.layerId,text:r.text,icon:r.icon,lngLat:{lng:De(r.mercX),lat:_e(r.mercY)},key:xt.keyOf(r)}:null}setSymbolHover(t){return this.renderer.symbols?.setHover(t?.key??null)&&this.triggerRepaint(),this}setSymbolHidden(t){return this.renderer.symbols?.setHidden(t?.key??null)&&this.triggerRepaint(),this}queryBuilding(t){let o=null;for(let r of this._style.layers){if(r.type!=="fill-extrusion"||r.overlay||!this._style.layerVisibleAt(r,this.transform.zoom))continue;let i=this.sources.get(r.source??X);if(!i)continue;let a=tn(this.transform,i,r.id,t);a&&(!o||a.distance<o.distance)&&(o=a);}return o}setHighlight(t,o={}){return this.renderer.highlight=t?{layerId:t.layerId,featureId:t.featureId,color:o.color??this.options.highlightColor??"#4ec97f",opacity:o.opacity??.45}:null,this.triggerRepaint(),this}queryRoom(t){if(!this.renderer.indoorOpen)return null;let o=[],r=new P,i;for(let l of this._style.layers){if(l.type!=="fill"||!l.id.startsWith("indoor-")||l.id==="indoor-shell"||!this._style.layerVisibleAt(l,this.transform.zoom))continue;let s=this._style.bucketKeyFor(l);s&&(o.push(s),r.set(s,l.id),i??(i=this.sources.get(l.source??X)));}if(!i||!o.length)return null;let a=on(this.transform,i,o,t);return a?{...a,layerId:r.get(a.layerId)??a.layerId,bucketKey:a.layerId}:null}setRoomHighlight(t,o={}){return this.renderer.highlightFill=t?{layerId:t.layerId,bucketKey:t.bucketKey??t.layerId,featureId:t.featureId,color:o.color??this.options.highlightColor??"#4ec97f",opacity:o.opacity??.5}:null,this.triggerRepaint(),this}getHighlight(){let t=this.renderer.highlight;return t?{featureId:t.featureId,layerId:t.layerId}:null}initHash(){this.options.hash&&(this.on("move",()=>this.scheduleHash()),this.on("moveend",()=>this.scheduleHash(true)),this.onHashChange=()=>{this.writingHash||this.applyHash(true);},window.addEventListener("hashchange",this.onHashChange),this.scheduleHash(true));}scheduleHash(t=false){if(!(!this.options.hash||this.destroyed)){if(this.hashTimer){if(!t)return;clearTimeout(this.hashTimer);}this.hashTimer=setTimeout(()=>{this.hashTimer=0,this.writeHash();},t?0:300);}}writeHash(){if(!this.options.hash||this.destroyed)return;let t=this.transform,o=Pn({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch},this.hashName);this.writingHash=true,Wl("#"+o),setTimeout(()=>this.writingHash=false,0);}applyHash(t){if(typeof window>"u")return;let o=kn(window.location.hash,this.hashName);if(!o)return;let r=this.transform;o.center&&(r.center=o.center),o.zoom!==void 0&&(r.zoom=o.zoom),o.bearing!==void 0&&(r.bearing=o.bearing),o.pitch!==void 0&&(r.pitch=o.pitch),t&&(this.emitMove(),this.triggerRepaint());}setQuality(t){this.qualityAuto=t==="auto";let o=t==="auto"?sr(cr()):t;return this.qualityCeiling=o,this.resetFrameWindow(),this.applyQuality(Et(o)),this}getQuality(){return {auto:this.qualityAuto,profile:{...this.quality},pixelRatio:this.transform.width>0?this.canvas.width/this.transform.width:1}}applyQuality(t,o=false){let r=this.quality.simpleGeometry,i=o?r:t.simpleGeometry;if(this.quality={...t,simpleGeometry:i},this.resetFrameWindow(),this.objects3d&&(this.objects3d.budgetScale=t.modelBudget),r!==i)for(let[a,l]of this.sources.entries())l.setPlan(this.planFor(a));o||(this.densityQuality=t,this.options.maxPixelRatio===void 0&&(this.maxPixelRatio=t.maxPixelRatio)),this.renderer.detailScale=t.detail,this.renderer.allowShadows=t.allowShadows,this.renderer.shadows.resolution!==t.shadowMapSize&&this.setShadows({resolution:t.shadowMapSize});for(let a of this.sources.values())a.setCoverOptions({detailBias:t.detailBias,maxTiles:t.maxTiles});this.resize();}resetFrameWindow(){this.frameRing.fill(0),this.ringAt=0,this.ringSum=0,this.ringFilled=0,this.steadyFrames=0;}checkFrameBudget(t){if(!this.qualityAuto||this.sum(a=>a.pendingCount)>0)return;let o=t>hd?3:t>dd?1:0;if(this.ringSum+=o-this.frameRing[this.ringAt],this.frameRing[this.ringAt]=o,this.ringAt=(this.ringAt+1)%Un,this.ringFilled<Un&&this.ringFilled++,this.steadyFrames++,this.ringFilled<md)return;let r=this.ringSum/this.ringFilled;if(r>=pd){let a=On(this.quality.name);if(!a)return;console.info(`[osmgl] \u0442\u044F\u0436\u0451\u043B\u044B\u0445 \u043A\u0430\u0434\u0440\u043E\u0432 ${(r*100).toFixed(0)}% \u2014 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u043E \u043F\u043E\u043D\u0438\u0436\u0435\u043D\u043E \u0434\u043E \xAB${a}\xBB (\u043F\u043B\u043E\u0442\u043D\u043E\u0441\u0442\u044C \u0431\u0443\u0444\u0435\u0440\u0430 \u043F\u0440\u0435\u0436\u043D\u044F\u044F)`),this.applyQuality(Et(a),true);return}if(r>bd||this.steadyFrames<Ad)return;let i=zl(this.quality.name);!i||Rn(i)>Rn(this.qualityCeiling)||(console.info(`[osmgl] \u043A\u0430\u0434\u0440\u044B \u0443\u043A\u043B\u0430\u0434\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0432 \u0431\u044E\u0434\u0436\u0435\u0442 \u2014 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u043E \u043F\u043E\u0434\u043D\u044F\u0442\u043E \u0434\u043E \xAB${i}\xBB`),this.applyQuality(Et(i),true));}getShadows(){return {...this.renderer.shadows}}setSky(t){let o=typeof t=="boolean"?{enabled:t}:t;return Object.assign(this._style.sky,o),this.triggerRepaint(),this}getSky(){return {...this._style.sky}}setLight(t){return Object.assign(this._style.light,t),this.triggerRepaint(),this}setLayerVisible(t,o){let r=this._style.layers.find(i=>i.id===t);return r&&(r.visible=o,this.rememberOverride(t,{visible:o}),this.triggerRepaint()),this}setObjects3DEnabled(t){return this.objects3dEnabled===t?this:(this.objects3dEnabled=t,this.triggerRepaint(),this)}get objects3DEnabled(){return this.objects3dEnabled}rasterLayerVisible(t){let o=this.transform.zoom;return this._style.layers.some(r=>r.type==="raster"&&r.source===t&&this._style.layerVisibleAt(r,o))}rememberOverride(t,o){let r=this.layerOverrides.get(t)??{};this.layerOverrides.set(t,{...r,...o,paint:{...r.paint??{},...o.paint??{}},layout:{...r.layout??{},...o.layout??{}}});}applyLayerOverrides(){if(this.layerOverrides.size)for(let t of this._style.layers){let o=this.layerOverrides.get(t.id);if(o&&(o.visible!==void 0&&(t.visible=o.visible),o.paint&&Object.assign(t.paint??(t.paint={}),o.paint),o.layout)){let r=t;Object.assign(r.layout??(r.layout={}),o.layout);}}}setBackground(t){return this.background=ce(t),this.triggerRepaint(),this}getIndoorLevels(){let t=[];for(let[o,r]of this.sources.entries())if(this._style.layers.some(i=>(i.source??X)===o&&"splitBy"in i&&i.splitBy===Mt))for(let i of r.splitValues(Mt)){let a=Number(i);Number.isFinite(a)&&!t.includes(a)&&t.push(a);}return t.sort((o,r)=>o-r)}getIndoorLevel(){let t=this._style.splitValues[Mt];return typeof t=="number"?t:null}setIndoorLevel(t){return t===null?delete this._style.splitValues[Mt]:this._style.splitValues[Mt]=t,this.triggerRepaint(),this}syncIndoor(){let t=this.getIndoorLevels(),o=t.join(",");if(o!==this.lastIndoorKey){if(this.lastIndoorKey=o,this.autoIndoorLevel){let r=this.getIndoorLevel();t.length?(r===null||!t.includes(r))&&this.setIndoorLevel(t.includes(0)?0:t.find(i=>i>=0)??t[0]):r!==null&&this.setIndoorLevel(null);}this.emit("indoor",{levels:t,level:this.getIndoorLevel()});}}addObject(t){return this.objects.add(t),this.triggerRepaint(),this}removeObject(t){return this.objects.remove(t),this.triggerRepaint(),this}getObjects(){return this.objects.all}updateObject(){return this.triggerRepaint(),this}addModel(t){return this.renderer.models.add(t),this.triggerRepaint(),this}removeModel(t){return this.renderer.models.remove(t,this.ctx?.gl),this.triggerRepaint(),this}getObjects3DStats(){return this.objects3d?.stats??null}getModels(){return this.renderer.models.all}addMarker(t){return this.objects.addMarker(t),t.update(this.transform),this}removeMarker(t){return this.objects.removeMarker(t),this}getMarkers(){return this.objects.allMarkers}addPopup(t){return t.onCloseRequest(()=>this.removePopup(t)),this.objects.addMarker(t),t.update(this.transform),this}removePopup(t){return this.objects.removeMarker(t),this}getPopups(){return this.objects.allMarkers.filter(t=>t instanceof mo)}objectAt(t,o=4){return this.objects.hitTest(this.transform,t,o)}setProjection(t){let o=this.transform;if(o.projection===t)return this;o.projection=t;let r=o.effectiveMinZoom(),i=t==="globe"?Math.min(o.maxPitch,St):o.maxPitch,a=o.zoom<r,l=o.pitch>i;return a||l?this.easeTo({zoom:a?r:o.zoom,pitch:l?i:o.pitch,duration:600}):(this.emit("move",void 0),this.triggerRepaint()),this}getProjection(){return this.transform.projection}refreshSource(t){return this.sources.get(t)?.reload(),this.rasterSources.get(t)?.reload(),this.triggerRepaint(),this}refresh(){for(let t of this.sources.values())t.reload();for(let t of this.rasterSources.values())t.reload();return this.renderer.refreshHighlight(),this.triggerRepaint(),this}sum(t){let o=0;for(let r of this.sources.values())o+=t(r);return o}getStats(){return {pendingTiles:this.sum(t=>t.pendingCount),visibleTiles:this.sum(t=>t.visibleTiles.length),labels:this.renderer.symbols?.placedCount??0,models:this.renderer.models.readyCount,workers:this.pool.usingWorkers?this.pool.size:0,renderer:this.ctx?.caps.rendererName??"\u043D\u0435\u0442 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430"}}triggerRepaint(){this.destroyed||(this.needsRepaint=true,!this.frameHandle&&(this.frameHandle=requestAnimationFrame(t=>{this.frameHandle=0,this.renderFrame(t);})));}renderFrame(t){if(this.destroyed||!this.ctx)return;let o=performance.now();this.needsRepaint=false;let r=this.stepAnimation(t),i=this.ctx;i.bindFramebuffer(null),i.viewport(0,0,this.canvas.width,this.canvas.height),i.setDepthMask(true),i.clear(this.background??this._style.background,true,true);for(let d of this.sources.values())d.update(this.transform);this.updateObjects3D();for(let[d,h]of this.rasterSources)this.rasterLayerVisible(d)&&h.update(this.transform);this.syncIndoor(),this.objects.updateMarkers(this.transform);let a=(this.sources.size>0||this.rasterSources.size>0)&&this.renderer.render(i,this.transform,this.sources,this._style,t,this.rasterSources),l=performance.now()-o,s=r||a||this.needsRepaint,c=this.lastFrameAt>0?t-this.lastFrameAt:0,u=c>0&&c<yd,m=u?c:0;this.continuousFrames=u?this.continuousFrames+1:0;let f=this.continuousFrames>1?c:l;this.lastFrameAt=t,this.checkFrameBudget(f),this.emit("render",{frameMs:l,intervalMs:m}),s&&this.triggerRepaint();}stopFrameLoop(){this.frameHandle&&cancelAnimationFrame(this.frameHandle),this.frameHandle=0;}get isLoaded(){return this.loaded}destroy(){if(this.onHashChange&&(window.removeEventListener("hashchange",this.onHashChange),this.onHashChange=null),this.hashTimer&&clearTimeout(this.hashTimer),!this.destroyed){this.destroyed=true,this.stopFrameLoop(),this.resizeObserver?.disconnect(),this.gestures?.destroy();for(let t of this.sources.values())t.destroy();this.sources.clear();for(let t of this.rasterSources.values())t.destroy();this.rasterSources.clear(),this.objects.destroy(),this.markerHost?.remove(),this.pool.destroy(),this.ctx&&this.renderer.destroy(this.ctx),this.removeAllListeners(),this.canvas.remove();}}},fb=Jn;
|
|
1953
|
-
exports.AssetLoader=
|
|
1953
|
+
`;var dr=n=>n.kind==="symbol",jl=n=>n.kind==="placement";function Xe(n,e,t,o){for(let r of n)for(let i=0;i+5<r.length;i+=6){let a=r[i],l=r[i+1],s=r[i+2],c=r[i+3],u=r[i+4],h=r[i+5];if(Ou(e,t,a,l,s,c,u,h)||o>0&&(kn(e,t,a,l,s,c)<=o||kn(e,t,s,c,u,h)<=o||kn(e,t,u,h,a,l)<=o))return true}return false}function Ou(n,e,t,o,r,i,a,l){let s=(n-r)*(o-i)-(t-r)*(e-i),c=(n-a)*(i-l)-(r-a)*(e-l),u=(n-t)*(l-o)-(a-t)*(e-o),h=s<0||c<0||u<0,f=s>0||c>0||u>0;return !(h&&f)}function kn(n,e,t,o,r,i){let a=r-t,l=i-o,s=a*a+l*l,c=s>0?Math.max(0,Math.min(1,((n-t)*a+(e-o)*l)/s)):0;return Math.hypot(n-(t+a*c),e-(o+l*c))}function Rn(n,e){let t=new DataView(n.vertices),o=new Uint32Array(n.indices),r=e.bounds(),i=(r.maxX-r.minX)/n.extent,a=new Float64Array(o.length*2);for(let l=0;l<o.length;l++){let s=o[l]*et;a[l*2]=r.minX+t.getInt16(s,true)*i,a[l*2+1]=r.minY+t.getInt16(s+2,true)*i;}return a}function Gn(n,e,t){let o=new DataView(n.vertices),r=t.bounds(),i=(r.maxX-r.minX)/e,a=r.minX,l=r.minY,s=new Float64Array(n.indices.length*2);for(let c=0;c<n.indices.length;c++){let u=n.indices[c]*Ie;s[c*2]=a+o.getInt16(u,true)*i,s[c*2+1]=l+o.getInt16(u+2,true)*i;}return s}var Wu={stride:8,attribs:[{name:"a_pos",size:2,type:5126,offset:0}]},Vu=40,zu=10.5,Yl=2.5,Nu=16,Ku=4,Uu=7,uo=class{constructor(){this.vbo=null;this.ibo=null;this.vao=null;this.capacity=0;this.perArrow=0;this.indicesPerArrow=0;this.highlightFootprint=null;this.count=0;}render(e,t,o,r,i,a,l,s=false){this.count=0;let c=t.zoom,u=r.layers.filter(B=>B.type==="symbol"&&B.layout?.placement==="map"&&r.layerVisibleAt(B,c));if(!u.length)return;let h=t.center,f=re(h.lng),d=ne(h.lat),p=t.worldSize>0?t.pixelsPerMeter/t.worldSize:0;if(!(p>0))return;let m=[];for(let B of u){let w=o.get(B.source??Y);if(!w)continue;let x=r.bucketKeyFor(B);if(x===null)continue;let _=B.layout?.showFor==="highlight";if(_&&!this.highlightFootprint)continue;let C=p*1.5,E=B.layout?.arrowUnits==="meters"?p:1/t.worldSize,M=W(B.layout?.arrowLength,c,Vu)*E,F=W(B.layout?.arrowWidth,c,zu)*E,H=W(B.layout?.arrowOutline,c,Yl)*E,S=W(B.layout?.arrowGap,c,Nu)*E,L=W(B.layout?.arrowDotRadius,c,Ku)*E,D=W(B.layout?.arrowDotGap,c,Uu)*E,T=Wn(M,F,L,S-D),k=H>0?Wn(M,F,L,S-D,H).outline:null,P={layer:B,verts:[],shape:T};for(let R of w.visibleTiles){let V=w.getTile(R)?.data?.buckets?.[x];if(!V||!dr(V))continue;let O=new Int16Array(V.anchors),z=V.rotations?new Int16Array(V.rotations):null,j=R.bounds(),Z=(j.maxX-j.minX)/V.extent,oe=j.minX,de=j.minY;for(let ee=0;ee<O.length/2;ee++){let U=oe+O[ee*2]*Z,pe=de+O[ee*2+1]*Z;if(_&&!Xe(this.highlightFootprint,U,pe,C))continue;let le=(z?z[ee]:0)*Math.PI/180,q=Math.sin(le),J=-Math.cos(le),X=U-f-q*S,ge=pe-d-J*S;k&&Vn(P,k,X,ge,q,J),Vn(P,T.outline,X,ge,q,J),this.count++;}}P.verts.length&&m.push(P);}if(!m.length)return;let b=m[0].shape,y=b.outline.length/2,g=[],A=[];for(let B of m){let w=g.length/2/y;for(let x of B.verts)g.push(x);A.push({layer:B.layer,first:w,count:B.verts.length/2/y});}if(this.ensureBuffers(e,g.length/2/y,b,a),!(!this.vao||!this.vbo)){this.vbo.update(new Uint8Array(new Float32Array(g).buffer)),i.use(),l?.(i),s&&i.setMat4("u_shadow_matrix",t.shadowObjectMatrix(f,d,0)),i.setMat4("u_matrix",t.objectMatrix(f,d,0)),e.setDepthTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),this.vao.bind();for(let B of A){let w=B.layer.paint,x=W(w.opacity,c,1),_=ke(w.color,c,[.18,.45,.76,1]),C=ke(w.haloColor,c,[1,1,1,1]),v=W(B.layer.layout?.arrowOutline,c,Yl)>0;Ju(e,i,B,C,_,x,v,this.indicesPerArrow);}e.bindVAO(null),e.setDepthTest(true);}}ensureBuffers(e,t,o,r){let i=o.outline.length/2;if(this.vao&&t<=this.capacity&&i===this.perArrow)return;this.vao?.destroy(),this.vbo?.destroy(),this.ibo?.destroy(),this.capacity=Math.max(256,Math.ceil(t*1.5)),this.perArrow=i,this.indicesPerArrow=o.indices.length,this.vbo=new ve(e,new Uint8Array(this.capacity*i*8),Wu,true);let a=new Uint32Array(this.capacity*o.indices.length);for(let l=0;l<this.capacity;l++){let s=l*i;for(let c=0;c<o.indices.length;c++)a[l*o.indices.length+c]=s+o.indices[c];}this.ibo=new be(e,a),this.vao=new fe(e,[{buffer:this.vbo,locations:r}],this.ibo);}destroy(){this.vao?.destroy(),this.vbo?.destroy(),this.ibo?.destroy(),this.vao=null,this.vbo=null,this.ibo=null,this.capacity=0;}};function Ju(n,e,t,o,r,i,a,l){let s=a?2:1;if(a){e.setVec4v("u_color",De([o[0],o[1],o[2],o[3]*i]));for(let c=0;c<t.count;c+=s)Zl(n,t.first+c,l);}e.setVec4v("u_color",De([r[0],r[1],r[2],r[3]*i]));for(let c=a?1:0;c<t.count;c+=s)Zl(n,t.first+c,l);}function Zl(n,e,t){n.gl.drawElements(n.gl.TRIANGLES,t,n.gl.UNSIGNED_INT,e*t*4);}var Ql=4,On=12;function Wn(n,e,t,o,r=0){let i=n*.38,a=e*1.35,l=i*.3,s=e*.32,c=e/2,u=-n+s,h=[],f=(y,g)=>h.push(y,g);f(0,0),f(-i,a),f(-i+l,c),f(u,s);for(let y=1;y<Ql;y++){let g=y/Ql*Math.PI;f(u-Math.sin(g)*s,Math.cos(g)*s);}f(u,-s),f(-i+l,-c),f(-i,-a);let d=r>0?Xu(h,r):h,p=Pe(h,void 0,2);if(t<=0)return {outline:d,indices:p};let m=d.length/2,b=t+r;for(let y=0;y<On;y++){let g=y/On*Math.PI*2;d.push(o+Math.cos(g)*b,Math.sin(g)*b);}for(let y=1;y<On-1;y++)p.push(m,m+y,m+y+1);return {outline:d,indices:p}}function Xu(n,e){let t=n.length/2,o=0;for(let a=0;a<t;a++){let l=(a+1)%t;o+=n[a*2]*n[l*2+1]-n[l*2]*n[a*2+1];}let r=o<0?-1:1,i=[];for(let a=0;a<t;a++){let l=n[(a+t-1)%t*2],s=n[(a+t-1)%t*2+1],c=n[a*2],u=n[a*2+1],h=n[(a+1)%t*2],f=n[(a+1)%t*2+1],d=Math.hypot(c-l,u-s)||1,p=Math.hypot(h-c,f-u)||1,m=r*(u-s)/d,b=-r*(c-l)/d,y=r*(f-u)/p,g=-r*(h-c)/p,A=m+y,B=b+g,w=Math.hypot(A,B);if(w<1e-9){i.push(c,u);continue}A/=w,B/=w;let x=Math.min(1/Math.max(A*m+B*b,.35),3);i.push(c+A*e*x,u+B*e*x);}return i}function Vn(n,e,t,o,r,i){let a=-i,l=r;for(let s=0;s<e.length;s+=2){let c=e[s],u=e[s+1];n.verts.push(t+r*c+a*u,o+i*c+l*u);}}function ju(n,e,t,o,r,i=0,a=0){let l=t*Math.PI/180,s={verts:[]};return Vn(s,Wn(o,r,i,a).outline,n,e,Math.sin(l),-Math.cos(l)),s.verts}var Yu=5;function ql(n,e){let t=1/(1<<e),o=(1<<e)-1;return [(n.x&o)*t,(n.y&o)*t,t]}var pr=class{constructor(){this.anisotropy=0;this.anisotropyPname=0;this.anisotropyChecked=false;}render(e,t,o,r,i,a,l,s=false){if(!a.size)return;let c=i.layers.filter(u=>u.type==="raster"&&!!u.overlay===s&&i.layerVisibleAt(u,l));if(c.length){r.use(),e.setDepthTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),r.setInt("u_image",0);for(let u of c){let h=a.get(u.source);if(!h)continue;let f=W(u.paint?.opacity,l,1);if(!(f<=.001)){r.setFloat("u_opacity",f),o.bind();for(let d of h.visibleTiles){let p=this.patchFor(e,h,d);p&&(e.bindTexture(0,p.texture),r.setVec3("u_uv_transform",p.uv[0],p.uv[1],p.uv[2]),r.setMat4("u_matrix",t.tileMatrix(d,1)),e.gl.drawElements(e.gl.TRIANGLES,6,e.gl.UNSIGNED_SHORT,0));}}}e.bindVAO(null);}}patchFor(e,t,o){let r=t.getTile(o),i=r&&r.state==="loaded"?this.textureFor(e,r):null;if(i)return {texture:i,uv:[0,0,1]};for(let a=1;a<=Yu&&a<=o.z;a++){let l=o.scaledTo(o.z-a),s=t.getTile(l);if(!s||s.state!=="loaded")continue;let c=this.textureFor(e,s);if(c)return {texture:c,uv:ql(o,a)}}return null}textureFor(e,t){let o=t.texture;if(o)return o.handle;if(!t.image)return null;let r=e.gl,i=r.createTexture();if(!i)return null;e.bindTexture(0,i),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t.image),r.generateMipmap(r.TEXTURE_2D),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR_MIPMAP_LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),this.applyAnisotropy(r);let a={handle:i,destroy:()=>r.deleteTexture(i)};return t.texture=a,t.image.close(),t.image=null,i}applyAnisotropy(e){if(!this.anisotropyChecked){this.anisotropyChecked=true;let t=e.getExtension("EXT_texture_filter_anisotropic");t&&(this.anisotropyPname=t.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropy=Math.min(4,e.getParameter(t.MAX_TEXTURE_MAX_ANISOTROPY_EXT)));}this.anisotropy>0&&e.texParameterf(e.TEXTURE_2D,this.anisotropyPname,this.anisotropy);}};var Zu="indoor-",ho=class{constructor(){this.parts=null;this.stamp="";this.cache=new G;this.box=null;this.hidden=new te;this.collected=new te;}get active(){return this.parts!==null}footprint(){return this.parts}get hiddenCount(){return this.hidden.size}sync(e,t,o){let r=[],i;for(let f of t.layers){if(!f.id.startsWith(Zu)||f.type!=="fill"||!t.layerVisibleAt(f,o))continue;let d=t.bucketKeyFor(f);d&&(r.push(d),i??(i=e.get(f.source??Y)));}if(!r.length||!i){this.parts&&this.destroy();return}let a=r.join(",")+"|"+i.visibleTiles.map(f=>f.dataKey+(i.getTile(f)?.data?"+":"-")).join(",");if(a===this.stamp)return;this.stamp=a,this.free();let l=[],s=1/0,c=1/0,u=-1/0,h=-1/0;for(let f of i.visibleTiles){let d=i.getTile(f)?.data?.buckets;if(d)for(let p of r){let m=d[p];if(!m||m.kind!=="fill")continue;let b=Rn(m,f);l.push(b);for(let y=0;y<b.length;y+=2)b[y]<s&&(s=b[y]),b[y]>u&&(u=b[y]),b[y+1]<c&&(c=b[y+1]),b[y+1]>h&&(h=b[y+1]);}}this.parts=l.length?l:null,this.box=l.length?[s,c,u,h]:null,this.hidden.clear(),this.collected.clear();}collectHidden(e,t){let o=this.parts;if(!o||!e.featureIds)return;let r=new Uint32Array(e.indices),i=new Float64Array(e.featureIds),a=new DataView(e.vertices),l=t.bounds(),s=(l.maxX-l.minX)/e.extent,c=this.box,u=new G;for(let h=0;h*3<r.length;h++){let f=i[h];if(this.hidden.has(f))continue;let d=u.get(f);d||u.set(f,d=[1/0,1/0,-1/0,-1/0]);for(let p=0;p<3;p++){let m=r[h*3+p]*Ie,b=a.getInt16(m,true),y=a.getInt16(m+2,true);b<d[0]&&(d[0]=b),y<d[1]&&(d[1]=y),b>d[2]&&(d[2]=b),y>d[3]&&(d[3]=y);}}for(let[h,f]of u){let d=l.minX+(f[0]+f[2])/2*s,p=l.minY+(f[1]+f[3])/2*s;c&&(d<c[0]||d>c[2]||p<c[1]||p>c[3])||Xe(o,d,p,0)&&this.hidden.add(h);}}destroy(){this.parts=null,this.hidden.clear(),this.collected.clear(),this.box=null,this.stamp="",this.free();}free(){this.cache.forEach(e=>{e?.vao.destroy(),e?.ibo.destroy();}),this.cache.clear();}prepare(e,t){if(!this.parts)return;let o=this.hidden.size;for(let r of e.visibleTiles){if(this.collected.has(r.dataKey))continue;let i=e.getTile(r)?.data?.buckets?.[t];!i||i.kind!=="fill-extrusion"||(this.collected.add(r.dataKey),this.collectHidden(i,r));}this.hidden.size!==o&&this.free();}indicesFor(e,t,o,r,i,a){if(!this.parts)return null;let l=this.cache.get(r.dataKey);if(l!==void 0)return l;let s=t.data?.buckets?.[o];if(!s)return null;let c=null;if(s.kind==="fill-extrusion"&&s.featureIds&&this.hidden.size){let u=new Uint32Array(s.indices),h=new Float64Array(s.featureIds),f=[];for(let d=0;d*3<u.length;d++)this.hidden.has(h[d])||f.push(u[d*3],u[d*3+1],u[d*3+2]);if(f.length<u.length){let d=new be(e,new Uint32Array(f));c={vao:new fe(e,[{buffer:i,locations:a}],d),ibo:d,count:f.length};}}return this.cache.set(r.dataKey,c),c}};var $l=35,Qu=70,qu=.35,$u=.5,eh=1.1;function Tt(n,e){let t=e.sky;if(!t.enabled||t.fogIntensity<=0)return {near:0,far:1/0,intensity:0,cutoff:1/0};let o=n.cameraToCenterDistance,r=_e((n.pitch-$l)/(Qu-$l),0,1),i=t.fogRange[0]*(1-qu*r)*o,a=t.fogRange[1]*(1-$u*r)*o,l=Math.min(1,t.fogIntensity+(1-t.fogIntensity)*Math.min(1,r*2)),s=l>=.995?a*eh:1/0;return {near:i,far:a,intensity:l,cutoff:s}}function zn(n,e,t,o){let r=o.x/Math.max(n.width,1)*2-1,i=1-o.y/Math.max(n.height,1)*2,a=null,l=new Float64Array(16),s=[0,0,0,0],c=[0,0,0,0];for(let u of e.visibleTiles){let h=e.getTile(u),f=h&&es(h,t);if(!f||!Ve(l,n.tileMatrix64(u,f.extent))||(ce(s,l,[r,i,-1,1]),ce(c,l,[r,i,1,1]),s[3]===0||c[3]===0))continue;let d=s[0]/s[3],p=s[1]/s[3],m=s[2]/s[3],b=c[0]/c[3]-d,y=c[1]/c[3]-p,g=c[2]/c[3]-m,A=oh(f,d,p,m,b,y,g);A&&(!a||A.t<a.distance)&&(a={featureId:A.featureId,tile:u,layerId:t,distance:A.t});}return a}function Nn(n,e,t,o){let r=o.x/Math.max(n.width,1)*2-1,i=1-o.y/Math.max(n.height,1)*2,a=null,l=new Float64Array(16),s=[0,0,0,0],c=[0,0,0,0];for(let u of e.visibleTiles){let h=e.getTile(u);if(h)for(let f of t){let d=h.data?.buckets?.[f];if(!d||d.kind!=="fill"||!d.featureIds||!Ve(l,n.tileMatrix64(u,d.extent))||(ce(s,l,[r,i,-1,1]),ce(c,l,[r,i,1,1]),s[3]===0||c[3]===0))continue;let p=s[0]/s[3],m=s[1]/s[3],b=s[2]/s[3],y=c[2]/c[3]-b;if(Math.abs(y)<1e-9)continue;let g=-b/y;if(g<0||g>1)continue;let A=p+(c[0]/c[3]-p)*g,B=m+(c[1]/c[3]-m)*g,w=th(d,A,B);w!==null&&(!a||g<a.distance)&&(a={featureId:w,tile:u,layerId:f,distance:g});}}return a}function th(n,e,t){let o=new DataView(n.vertices),r=new Uint32Array(n.indices),i=new Float64Array(n.featureIds),a=s=>o.getInt16(s*et,true),l=s=>o.getInt16(s*et+2,true);for(let s=0;s*3<r.length;s++){let c=r[s*3],u=r[s*3+1],h=r[s*3+2],f=a(c),d=l(c),p=a(u),m=l(u),b=a(h),y=l(h),g=(e-p)*(d-m)-(f-p)*(t-m),A=(e-b)*(m-y)-(p-b)*(t-y),B=(e-f)*(y-d)-(b-f)*(t-d),w=g<0||A<0||B<0,x=g>0||A>0||B>0;if(!(w&&x))return i[s]}return null}function es(n,e){let t=n.data?.buckets?.[e];return !t||t.kind!=="fill-extrusion"||!t.featureIds?null:t}function oh(n,e,t,o,r,i,a){let l=new DataView(n.vertices),s=new Uint32Array(n.indices),c=new Float64Array(n.featureIds),u=m=>l.getInt16(m*Ie,true),h=m=>l.getInt16(m*Ie+2,true),f=m=>l.getUint16(m*Ie+4,true)/xt,d=1/0,p=-1;for(let m=0;m+2<s.length;m+=3){let b=s[m],y=s[m+1],g=s[m+2],A=u(b),B=h(b),w=f(b),x=u(y)-A,_=h(y)-B,C=f(y)-w,v=u(g)-A,E=h(g)-B,M=f(g)-w,F=i*M-a*E,H=a*v-r*M,S=r*E-i*v,L=x*F+_*H+C*S;if(L>-1e-9&&L<1e-9)continue;let D=1/L,T=e-A,k=t-B,P=o-w,R=(T*F+k*H+P*S)*D;if(R<0||R>1)continue;let K=k*C-P*_,V=P*x-T*C,O=T*_-k*x,z=(r*K+i*V+a*O)*D;if(z<0||R+z>1)continue;let j=(v*K+E*V+M*O)*D;j<0||j>1||j>=d||(d=j,p=c[m/3]??0);}return p>=0?{featureId:p,t:d}:null}function mr(n,e,t){let o=es(n,e);if(!o)return null;let r=new Uint32Array(o.indices),i=new Float64Array(o.featureIds),a=[];for(let l=0;l+2<r.length;l+=3)i[l/3]===t&&a.push(r[l],r[l+1],r[l+2]);return a.length?{vertices:o.vertices,indices:new Uint32Array(a)}:null}var Ht=24,Kn=8,rh=2,nh=12,br=8,yr=8;function po(n){let e=0;for(let d of n)e+=d.length/2;if(e<2)return null;let t=(br+2)*2,o=e*t+n.length*(yr+2)*2+8,r=e*(br+2)*6+n.length*yr*6+24,i=new ArrayBuffer(o*Ht),a=new DataView(i),l=new Uint32Array(r),s=0,c=0,u=(d,p,m,b,y,g)=>{let A=s*Ht;return a.setFloat32(A,d,true),a.setFloat32(A+4,p,true),a.setFloat32(A+8,m,true),a.setFloat32(A+12,b,true),a.setFloat32(A+16,y,true),a.setFloat32(A+20,g,true),s++},h=(d,p,m,b)=>{l[c++]=d,l[c++]=p,l[c++]=b,l[c++]=d,l[c++]=b,l[c++]=m;},f=(d,p,m,b,y,g,A)=>{let B=u(d,p,0,0,0,A),w=u(d,p,m,b,1,A);for(let x=1;x<=yr;x++){let _=Math.PI*x/yr,C=m*Math.cos(_)+y*Math.sin(_),v=b*Math.cos(_)+g*Math.sin(_),E=u(d,p,C,v,1,A);l[c++]=B,l[c++]=w,l[c++]=E,w=E;}};for(let d of n){let p=ih(d),m=p.length/2;if(m<2)continue;let b=new Float64Array(m-1),y=new Float64Array(m-1);for(let x=0;x<m-1;x++){let _=p[x*2+2]-p[x*2],C=p[x*2+3]-p[x*2+1],v=Math.hypot(_,C)||1;b[x]=_/v,y[x]=C/v;}let g=0,A=-1,B=-1;for(let x=0;x<m;x++){let _=p[x*2],C=p[x*2+1];x>0&&(g+=Math.hypot(_-p[x*2-2],C-p[x*2-1]));let v=x>0?x-1:0,E=x<m-1?x:m-2,M=-y[v],F=b[v],H=-y[E],S=b[E],L=M+H,D=F+S,T=Math.hypot(L,D);T>1e-9?(L/=T,D/=T):(L=M,D=F);let k=L*H+D*S,P=k>1e-6?1/k:1/0,R=Math.acos(Math.min(1,Math.max(-1,b[v]*b[E]+y[v]*y[E])));if(!(R>nh*Math.PI/180)&&P<=rh){let V=u(_,C,L*P,D*P,1,g),O=u(_,C,-L*P,-D*P,-1,g);A>=0&&h(A,B,V,O),A=V,B=O;}else {let V=Math.max(1,Math.min(br,Math.ceil(R/(Math.PI/br)))),z=b[v]*y[E]-y[v]*b[E]>=0?1:-1,j=u(_,C,M,F,1,g),Z=u(_,C,-M,-F,-1,g);A>=0&&h(A,B,j,Z);for(let oe=1;oe<=V;oe++){let de=z*R*(oe/V),ee=Math.cos(de),U=Math.sin(de),pe=M*ee-F*U,le=M*U+F*ee,q=u(_,C,pe,le,1,g),J=u(_,C,-pe,-le,-1,g);h(j,Z,q,J),j=q,Z=J;}A=j,B=Z;}}let w=m-2;f(p[0],p[1],-y[0],b[0],-b[0],-y[0],0),f(p[(m-1)*2],p[(m-1)*2+1],-y[w],b[w],b[w],y[w],g);}return c?{vertices:i.slice(0,s*Ht),indices:l.slice(0,c),vertexCount:s}:null}function Un(n){if(!n.length||n[0].length<6)return null;let e=[],t=[];for(let i=0;i<n[0].length;i++)e.push(n[0][i]);for(let i=1;i<n.length;i++)if(!(n[i].length<6)){t.push(e.length/2);for(let a=0;a<n[i].length;a++)e.push(n[i][a]);}let o=Pe(e,t.length?t:void 0,2);if(!o.length)return null;let r=new Uint32Array(o.length);for(let i=0;i<o.length;i+=3)r[i]=o[i],r[i+1]=o[i+2],r[i+2]=o[i+1];return {vertices:new Float32Array(e).buffer,indices:r,vertexCount:e.length/2}}function ih(n){let e=[];for(let t=0;t<n.length;t+=2){let o=n[t],r=n[t+1],i=e.length;i>=2&&e[i-2]===o&&e[i-1]===r||e.push(o,r);}return e}var mo=5126,ah={stride:Kn,attribs:[{name:"a_pos",size:2,type:mo,offset:0}]},Xn={stride:Ht,attribs:[{name:"a_pos",size:2,type:mo,offset:0},{name:"a_extrude",size:2,type:mo,offset:8},{name:"a_side",size:1,type:mo,offset:16},{name:"a_dist",size:1,type:mo,offset:20}]},Jn=class{constructor(e,t){this.revision=e;this.parts=t;}destroy(){for(let e of this.parts)e.vao.destroy(),e.vbo.destroy(),e.ibo.destroy();}},lh=(n,e)=>[n[0],n[1],n[2],n[3]*e],bo=class{constructor(){this.objects=[];this.markers=[];this.gpu=new G;this.markerHost=null;}setMarkerHost(e){this.markerHost=e;for(let t of this.markers)t.attach(e);}add(e){this.objects.includes(e)||this.objects.push(e);}remove(e){let t=this.objects.indexOf(e);t<0||(this.objects.splice(t,1),this.gpu.get(e.id)?.destroy(),this.gpu.delete(e.id));}addMarker(e){this.markers.includes(e)||(this.markers.push(e),this.markerHost&&e.attach(this.markerHost));}removeMarker(e){let t=this.markers.indexOf(e);t<0||(this.markers.splice(t,1),e.detach());}get all(){return this.objects}get allMarkers(){return this.markers}get isEmpty(){return this.objects.length===0}updateMarkers(e){for(let t of this.markers)t.update(e);}render(e,t,o,r,i,a,l,s=false,c=false){if(!this.objects.length||c&&!this.objects.some(p=>p.ghostOpacity>0))return;this.objects.length>1&&this.objects.sort((p,m)=>p.zIndex-m.zIndex);let u=e.gl.drawingBufferWidth,h=t.width>0?u/t.width:1,f=t.worldSize*h,d=null;for(let p of this.objects){if(!p.visible)continue;let m=p.ghostOpacity;if(c&&m<=0)continue;let b=this.gpuFor(e,p,r,a);if(!b)continue;let y=s?t.shadowObjectMatrix(p.originX,p.originY,p.altitude):null,g=t.objectMatrix(p.originX,p.originY,p.altitude);for(let{part:A,vao:B,ibo:w}of b.parts){if(c&&(A.kind!=="line"||A.arrow))continue;let x=c?lh(A.color,m):A.color;if(A.kind==="fill")d!==o&&(o.use(),l?.(o),d=o),o.setVec4v("u_color",De(x)),y&&o.setMat4("u_shadow_matrix",y),o.setMat4("u_matrix",g);else {d!==i&&(i.use(),l?.(i),d=i);let _=A.width/2*h,C=f>1e-9?1/f:1;if(i.setVec4v("u_color",De(x)),i.setFloat("u_half_width",_),i.setFloat("u_offset",(A.offset??0)*h),i.setFloat("u_aa",1),i.setFloat("u_units_per_px",C),i.setFloat("u_units_to_px",f),i.setInt("u_pattern",c?0:A.dashArray?1:A.arrow?2:0),A.dashArray){let[v,E]=A.dashArray;i.setVec2("u_dash",v*h,(v+E)*h);}if(A.arrow){i.setVec4v("u_arrow_color",De(A.arrowColor??[1,1,1,1]));let v=(A.arrowSize??5)*h;i.setVec3("u_arrow",(A.arrowPeriod??46)*h,Math.max(v*.4,1),Math.min(v,_*.72));}y&&i.setMat4("u_shadow_matrix",y),i.setMat4("u_matrix",g);}B.bind(),e.gl.drawElements(e.gl.TRIANGLES,w.count,w.type,0);}}e.bindVAO(null);}hitTest(e,t,o=4){let r=e.worldSize,i=(a,l,s)=>e.worldPxToPoint(re(a)*r,ne(l)*r,s);for(let a=this.objects.length-1;a>=0;a--){let l=this.objects[a];if(l.visible&&l.hitTest(t,i,o))return l}return null}boundsOf(e){let t=1/0,o=1/0,r=-1/0,i=-1/0;for(let a of e.rings())for(let l of a){let s=$(l);s.lng<t&&(t=s.lng),s.lng>r&&(r=s.lng),s.lat<o&&(o=s.lat),s.lat>i&&(i=s.lat);}return isFinite(t)?{west:t,south:o,east:r,north:i}:null}gpuFor(e,t,o,r){let i=this.gpu.get(t.id);if(i&&i.revision===t.revision)return i;i?.destroy();let a=[];for(let s of t.build()){let c=s.kind==="fill"?ah:Xn,u=s.kind==="fill"?o:r,h=new ve(e,new Uint8Array(s.mesh.vertices),c),f=new be(e,s.mesh.indices),d=new fe(e,[{buffer:h,locations:u}],f);a.push({part:s,vao:d,vbo:h,ibo:f});}let l=new Jn(t.revision,a);return this.gpu.set(t.id,l),a.length?l:null}destroy(){for(let e of this.gpu.values())e.destroy();this.gpu.clear();for(let e of this.markers)e.detach();this.markers=[],this.objects=[];}};var gr=32,uh=1179937895,hh=1313821514,dh=5130562,ph={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},mh={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT4:16};async function jn(n){let{json:e,bin:t}=as(n),o=await yh(e,t);return ss(e,t,o)}function bh(n){let{json:e,bin:t}=as(n);for(let o of e.bufferViews??[])if(o.extensions?.EXT_meshopt_compression)throw new Error("[osmgl] GLB \u0441\u0436\u0430\u0442 meshopt \u2014 \u043D\u0443\u0436\u0435\u043D parseGlbAsync");return ss(e,t,null)}function as(n){let e=new DataView(n);if(e.getUint32(0,true)!==uh)throw new Error("[osmgl] \u044D\u0442\u043E \u043D\u0435 GLB: \u043D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0438\u0433\u043D\u0430\u0442\u0443\u0440\u0430");if(e.getUint32(4,true)!==2)throw new Error("[osmgl] \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E glTF 2.0");let t=null,o=null,r=12;for(;r+8<=n.byteLength;){let i=e.getUint32(r,true),a=e.getUint32(r+4,true),l=r+8;a===hh?t=JSON.parse(new TextDecoder().decode(new Uint8Array(n,l,i))):a===dh&&(o=new Uint8Array(n,l,i)),r=l+i+(4-i%4)%4;}if(!t)throw new Error("[osmgl] \u0432 GLB \u043D\u0435\u0442 JSON-\u043A\u0443\u0441\u043A\u0430");return {json:t,bin:o??new Uint8Array(0)}}async function yh(n,e){let t=n.bufferViews??[],o=[];for(let a=0;a<t.length;a++)t[a].extensions?.EXT_meshopt_compression&&o.push(a);if(!o.length)return null;let{MeshoptDecoder:r}=await Promise.resolve().then(()=>(is(),ns));await r.ready;let i=new Map;for(let a of o){let l=t[a].extensions.EXT_meshopt_compression,s=l.byteOffset??0,c=e.subarray(s,s+l.byteLength),u=new Uint8Array(l.count*l.byteStride);r.decodeGltfBuffer(u,l.count,l.byteStride,c,l.mode,l.filter??"NONE"),i.set(a,u);}return i}function ls(n){let e=N();if(n.matrix){for(let C=0;C<16;C++)e[C]=n.matrix[C];return e}Ke(e);let[t,o,r]=n.translation??[0,0,0],[i,a,l,s]=n.rotation??[0,0,0,1],[c,u,h]=n.scale??[1,1,1],f=i+i,d=a+a,p=l+l,m=i*f,b=i*d,y=i*p,g=a*d,A=a*p,B=l*p,w=s*f,x=s*d,_=s*p;return e[0]=(1-(g+B))*c,e[1]=(b+_)*c,e[2]=(y-x)*c,e[4]=(b-_)*u,e[5]=(1-(m+B))*u,e[6]=(A+w)*u,e[8]=(y+x)*h,e[9]=(A-w)*h,e[10]=(1-(m+g))*h,e[12]=t,e[13]=o,e[14]=r,e}var gh={5120:127,5121:255,5122:32767,5123:65535};function Ah(n){let e=n[0],t=n[1],o=n[2],r=n[4],i=n[5],a=n[6],l=n[8],s=n[9],c=n[10],u=e*(i*c-a*s)-r*(t*c-o*s)+l*(t*a-o*i);if(Math.abs(u)<1e-20)return [1,0,0,0,1,0,0,0,1];let h=1/u;return [(i*c-a*s)*h,(a*l-r*c)*h,(r*s-i*l)*h,(o*s-t*c)*h,(e*c-o*l)*h,(t*l-e*s)*h,(t*a-o*i)*h,(o*r-e*a)*h,(e*i-t*r)*h]}function ss(n,e,t){let o=C=>{let v=t?.get(C);if(v)return v;let E=n.bufferViews?.[C];if(!E)return null;let M=E.byteOffset??0;return e.subarray(M,M+E.byteLength)},r=[],i=[],a=[],l=[],s=[],c=[1/0,1/0,1/0],u=[-1/0,-1/0,-1/0],h=C=>{if(C===void 0)return null;let v=n.accessors?.[C];if(!v)return null;let E=mh[v.type]??1,M=new Float64Array(v.count*E),F=v.bufferView!==void 0?n.bufferViews?.[v.bufferView]:void 0;if(!F||v.bufferView===void 0)return {data:M,components:E};let H=o(v.bufferView);if(!H)return {data:M,components:E};let S=ph[v.componentType]??4,L=F.extensions?.EXT_meshopt_compression,D=L?L.byteStride:F.byteStride,T=D&&D>0?D:S*E,k=v.byteOffset??0,P=new DataView(H.buffer,H.byteOffset,H.byteLength),R=v.normalized?gh[v.componentType]??1:1;for(let K=0;K<v.count;K++)for(let V=0;V<E;V++){let O=k+K*T+V*S,z;switch(v.componentType){case 5120:z=P.getInt8(O);break;case 5121:z=P.getUint8(O);break;case 5122:z=P.getInt16(O,true);break;case 5123:z=P.getUint16(O,true);break;case 5125:z=P.getUint32(O,true);break;default:z=P.getFloat32(O,true);}M[K*E+V]=R===1?z:Math.max(z/R,-1);}return {data:M,components:E}},f=(C,v,E=-1)=>{if(C.mode!==void 0&&C.mode!==4)return;let M=h(C.attributes.POSITION);if(!M)return;let F=h(C.attributes.NORMAL),H=h(C.attributes.TEXCOORD_0),S=h(C.indices),L=r.length/3,D=M.data.length/3,T=Ah(v),P=(C.material!==void 0?n.materials?.[C.material]:void 0)?.pbrMetallicRoughness?.baseColorTexture?.extensions?.KHR_texture_transform,R=P?{ox:P.offset?.[0]??0,oy:P.offset?.[1]??0,sx:P.scale?.[0]??1,sy:P.scale?.[1]??1,rot:P.rotation??0}:null;for(let U=0;U<D;U++){let pe=M.data[U*3],le=M.data[U*3+1],q=M.data[U*3+2],J=v[0]*pe+v[4]*le+v[8]*q+v[12],X=v[1]*pe+v[5]*le+v[9]*q+v[13],ge=v[2]*pe+v[6]*le+v[10]*q+v[14];if(r.push(J,X,ge),J<c[0]&&(c[0]=J),X<c[1]&&(c[1]=X),ge<c[2]&&(c[2]=ge),J>u[0]&&(u[0]=J),X>u[1]&&(u[1]=X),ge>u[2]&&(u[2]=ge),F){let ae=F.data[U*3],xe=F.data[U*3+1],Te=F.data[U*3+2],we=T[0]*ae+T[3]*xe+T[6]*Te,Ho=T[1]*ae+T[4]*xe+T[7]*Te,Po=T[2]*ae+T[5]*xe+T[8]*Te,ko=Math.hypot(we,Ho,Po);ko>1e-12?(we/=ko,Ho/=ko,Po/=ko):(we=0,Ho=1,Po=0),i.push(we,Ho,Po);}else i.push(0,1,0);let se=H?H.data[U*2]:0,Ae=H?H.data[U*2+1]:0;if(R){if(R.rot!==0){let ae=Math.cos(R.rot),xe=Math.sin(R.rot),Te=ae*se+xe*Ae,we=-xe*se+ae*Ae;se=Te,Ae=we;}se=se*R.sx+R.ox,Ae=Ae*R.sy+R.oy;}a.push(se,Ae);}let K=l.length;if(S)for(let U=0;U<S.data.length;U++)l.push(L+S.data[U]);else for(let U=0;U<D;U++)l.push(L+U);let V=C.material!==void 0?n.materials?.[C.material]:void 0,O=V?.pbrMetallicRoughness,z=O?.metallicFactor!==void 0||O?.roughnessFactor!==void 0,j=O?.baseColorFactor??[1,1,1,1],Z=O?.baseColorTexture?.index,oe=Z!==void 0?n.textures?.[Z]?.source:void 0,de=V?.emissiveFactor??[0,0,0],ee=V?.extensions?.KHR_materials_emissive_strength?.emissiveStrength??1;s.push({indexOffset:K,indexCount:l.length-K,baseColor:[j[0],j[1],j[2],j[3]??1],metallic:z?O?.metallicFactor??1:0,roughness:z?O?.roughnessFactor??1:1,emissive:[de[0]*ee,de[1]*ee,de[2]*ee],texture:oe??-1,doubleSided:V?.doubleSided===true,blend:V?.alphaMode==="BLEND",alphaCutoff:V?.alphaMode==="MASK"?V.alphaCutoff??.5:.02,node:E});},d=n.skins?.length?null:Bh(n,h),p=d?d.nodes:null,m=(C,v,E,M)=>{let F=n.nodes?.[C];if(!F)return;let H=ls(F),S=N();Ee(S,v,H);let L=N(),D=M,T=p?.get(C);if(T?(T.parentNode=M,T.parent=E.slice(),Ke(L),D=C):Ee(L,E,H),F.mesh!==void 0)for(let P of n.meshes?.[F.mesh]?.primitives??[])f(P,L,D);let k=F.extensions?.KHR_lights_punctual?.light;if(k!==void 0){let P=n.extensions?.KHR_lights_punctual?.lights?.[k],R=P?.type;if(P&&(R==="point"||R==="spot"||R==="directional")){let K=-S[8],V=-S[9],O=-S[10],z=Math.hypot(K,V,O)||1,j=P.spot?.innerConeAngle??0,Z=P.spot?.outerConeAngle??Math.PI/4;b.push({type:R,color:[P.color?.[0]??1,P.color?.[1]??1,P.color?.[2]??1],intensity:P.intensity??1,range:P.range??0,position:[S[12],S[13],S[14]],direction:[K/z,V/z,O/z],cosInner:Math.cos(j),cosOuter:Math.cos(Z)});}}for(let P of F.children??[])m(P,S,L,D);},b=[],y=N();Ke(y);let g=N();Ke(g);let A=n.scenes?.[n.scene??0]?.nodes??n.nodes?.map((C,v)=>v)??[];for(let C of A)m(C,y,g,-1);let B=[];for(let C of n.images??[]){if(C.bufferView===void 0){B.push(new Uint8Array(0));continue}let v=o(C.bufferView);B.push(v?v.slice():new Uint8Array(0));}let w=r.length/3,x=new ArrayBuffer(w*gr),_=new Float32Array(x);for(let C=0;C<w;C++){let v=C*8;_[v]=r[C*3],_[v+1]=r[C*3+1],_[v+2]=r[C*3+2],_[v+3]=i[C*3],_[v+4]=i[C*3+1],_[v+5]=i[C*3+2],_[v+6]=a[C*2],_[v+7]=a[C*2+1];}return isFinite(c[0])||(c[0]=c[1]=c[2]=0,u[0]=u[1]=u[2]=0),{vertices:x,indices:new Uint32Array(l),primitives:s,images:B,min:c,max:u,animation:d,lights:b}}function Bh(n,e){let t=n.animations?.[0];if(!t||!t.channels.length)return null;let o=new Map,r=0;for(let i of t.channels){let a=i.target.node,l=i.target.path;if(a===void 0||l!=="translation"&&l!=="rotation"&&l!=="scale")continue;let s=t.samplers[i.sampler];if(!s)continue;let c=e(s.input),u=e(s.output);if(!c||!u||!c.data.length)continue;let h=l==="rotation"?4:3,f=s.interpolation==="CUBICSPLINE",d=c.data.length,p=new Float32Array(d*h);for(let b=0;b<d;b++){let y=f?(b*3+1)*h:b*h;for(let g=0;g<h;g++)p[b*h+g]=u.data[y+g];}let m=o.get(a)??{parentNode:-1,parent:Ke(N()),base:Ch(n.nodes?.[a]),channels:[]};m.channels.push({path:l,times:Float32Array.from(c.data),values:p,step:s.interpolation==="STEP"}),o.set(a,m),r=Math.max(r,c.data[d-1]);}return o.size?{duration:r||1,nodes:o}:null}function Ch(n){let e=n?.translation,t=n?.rotation,o=n?.scale;return {t:[e?.[0]??0,e?.[1]??0,e?.[2]??0],r:[t?.[0]??0,t?.[1]??0,t?.[2]??0,t?.[3]??1],s:[o?.[0]??1,o?.[1]??1,o?.[2]??1]}}function Yn(n,e,t,o){let r=n.nodes.get(e);if(!r)return Ke(o);let i=N();vh(r,t,i);let a=N();if(Ee(a,r.parent,i),r.parentNode<0)return cs(o,a);let l=N();return Yn(n,r.parentNode,t,l),Ee(o,l,a)}var cs=(n,e)=>{for(let t=0;t<16;t++)n[t]=e[t];return n};function vh(n,e,t){let o=[...n.base.t],r=[...n.base.r],i=[...n.base.s];for(let a of n.channels){let l=a.times.length,s=a.path==="rotation"?4:3,c=0;for(;c<l-1&&a.times[c+1]<e;)c++;let u=Math.min(c+1,l-1),h=a.times[u]-a.times[c],f=a.step||h<=0?0:Math.min(Math.max((e-a.times[c])/h,0),1),d=c*s,p=u*s;if(a.path==="rotation"){let m=0;for(let g=0;g<4;g++)m+=a.values[d+g]*a.values[p+g];let b=m<0?-1:1,y=0;for(let g=0;g<4;g++)r[g]=a.values[d+g]*(1-f)+a.values[p+g]*b*f,y+=r[g]*r[g];y=Math.sqrt(y)||1;for(let g=0;g<4;g++)r[g]/=y;}else {let m=a.path==="translation"?o:i;for(let b=0;b<3;b++)m[b]=a.values[d+b]*(1-f)+a.values[p+b]*f;}}return cs(t,ls({translation:o,rotation:r,scale:i}))}var Le=5126,xh=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),fs={stride:gr,attribs:[{name:"a_pos",size:3,type:Le,offset:0},{name:"a_normal",size:3,type:Le,offset:12},{name:"a_tex",size:2,type:Le,offset:24}]},Qn=class{constructor(e,t,o,r){this.vao=e;this.vbo=t;this.ibo=o;this.textures=r;this.users=0;this.instVao=null;}destroy(e){this.vao.destroy(),this.instVao?.destroy(),this.vbo.destroy(),this.ibo.destroy();for(let t of this.textures)t&&e.deleteTexture(t);}},Zn=256,Ar=41,us={stride:Ar*4,attribs:[{name:"a_i_m0",size:4,type:Le,offset:0,divisor:1},{name:"a_i_m1",size:4,type:Le,offset:16,divisor:1},{name:"a_i_m2",size:4,type:Le,offset:32,divisor:1},{name:"a_i_m3",size:4,type:Le,offset:48,divisor:1},{name:"a_i_s0",size:4,type:Le,offset:64,divisor:1},{name:"a_i_s1",size:4,type:Le,offset:80,divisor:1},{name:"a_i_s2",size:4,type:Le,offset:96,divisor:1},{name:"a_i_s3",size:4,type:Le,offset:112,divisor:1},{name:"a_i_n0",size:3,type:Le,offset:128,divisor:1},{name:"a_i_n1",size:3,type:Le,offset:140,divisor:1},{name:"a_i_n2",size:3,type:Le,offset:152,divisor:1}]},yo=2,Pt=16,rt=class{constructor(){this.models=[];this.gpu=new G;this.counted=new Set;this.instBuffer=null;this.instScratch=new Float32Array(Zn*Ar);this.drawnInstanced=new Set;this.onLoaded=null;this.growDurationSec=.45;this.fadeDurationSec=.6;this.transitioning=false;this.depthTimeSec=0;this.lightPacks=new WeakMap;this.shadow32=new Float32Array(16);this.shadowNode32=new Float32Array(16);this.shadowNodeColor32=new Float32Array(16);}add(e){this.models.includes(e)||(this.models.push(e),e.isLoaded||e.load(()=>this.onLoaded?.()));}remove(e,t){let o=this.models.indexOf(e);if(o<0)return;this.models.splice(o,1);let r=this.gpu.get(e.url);r&&(this.counted.delete(e)&&r.users--,!(r.users>0)&&(t&&r.destroy(t),this.gpu.delete(e.url)));}get all(){return this.models}get hasTransitions(){return this.transitioning}get hasAnimated(){return this.models.some(e=>e.isAnimated)}get isEmpty(){return this.models.length===0}get readyCount(){return this.models.filter(e=>e.visible&&e.isLoaded).length}render(e,t,o,r,i,a,l=0,s){if(this.models.length){this.drawnInstanced.clear(),s&&this.renderInstanced(e,t,s.shader,s.locations,i,a),o.use(),i(o),o.setInt("u_base_texture",yo);for(let c of this.models){if(this.drawnInstanced.has(c)||!this.inView(t,c))continue;let u=c.visible&&c.fade>0?this.gpuFor(e,c,r):null;if(!u||!c.mesh)continue;let h=c.fade<1;o.setFloat("u_opacity",c.fade);let f=c.matrixFor(t);o.setMat4("u_matrix",f),o.setMat3("u_normal_matrix",c.normalMatrix());let d=a?this.shadowMatrix(t,c):null;this.uploadLights(o,c.mesh);let p=c.cameraInModelSpace(t);o.setVec3("u_camera_model",p[0],p[1],p[2]),o.setFloat("u_reflect",1),u.vao.bind();for(let m of [false,true])if(!(h&&!m))for(let b of c.mesh.primitives){if(!h&&b.blend!==m)continue;o.setMat4("u_matrix",b.node>=0?c.matrixForNode(t,b.node,l):f),d&&o.setMat4("u_shadow_matrix",b.node>=0?this.shadowMatrixForNodeAt(t,c,b.node,l):d);let y=b.texture>=0?u.textures[b.texture]:null;o.setFloat("u_has_texture",y?1:0),o.setFloat("u_alpha_cutoff",b.alphaCutoff),y&&e.bindTexture(yo,y),o.setVec4v("u_base_color",b.baseColor),o.setVec3("u_emissive",b.emissive[0],b.emissive[1],b.emissive[2]),o.setFloat("u_metallic",b.metallic),o.setFloat("u_roughness",b.roughness),e.setCull(b.doubleSided?"none":"back"),e.setBlend(m?"premultiplied":"none"),e.setDepthMask(!m),e.gl.drawElements(e.gl.TRIANGLES,b.indexCount,e.gl.UNSIGNED_INT,b.indexOffset*4);}}e.bindVAO(null),e.setCull("back"),e.setBlend("premultiplied"),e.setDepthMask(true);}}renderInstanced(e,t,o,r,i,a){let l=new G;for(let c of this.models){if(!c.visible||c.fade<1||!c.mesh||!c.isLoaded||!this.inView(t,c)||c.mesh.primitives.some(h=>h.blend||h.node>=0))continue;let u=l.get(c.url);u?u.push(c):l.set(c.url,[c]);}let s=false;o.setFloat("u_reflect",0);for(let[,c]of l){if(c.length<2)continue;let u=this.gpuFor(e,c[0],r);if(!u||!c[0].mesh)continue;this.instBuffer||(this.instBuffer=new ve(e,this.instScratch,us,true)),u.instVao||(u.instVao=new fe(e,[{buffer:u.vbo,locations:r},{buffer:this.instBuffer,locations:r}],u.ibo)),s||(o.use(),i(o),o.setInt("u_base_texture",yo),o.setFloat("u_opacity",1),s=true);let h=c[0].mesh;for(let f=0;f<c.length;f+=Zn){let d=Math.min(Zn,c.length-f);for(let p=0;p<d;p++){let m=c[f+p],b=p*Ar;this.instScratch.set(m.matrixFor(t),b);let y=a?this.shadowMatrix(t,m):xh;this.instScratch.set(y,b+16),this.instScratch.set(m.normalMatrix(),b+32),this.drawnInstanced.add(m);}this.instBuffer.update(this.instScratch.subarray(0,d*Ar)),e.bindVAO(u.instVao.vao);for(let p of h.primitives){let m=p.texture>=0?u.textures[p.texture]:null;o.setFloat("u_has_texture",m?1:0),o.setFloat("u_alpha_cutoff",p.alphaCutoff),m&&e.bindTexture(yo,m),o.setVec4v("u_base_color",p.baseColor),o.setVec3("u_emissive",p.emissive[0],p.emissive[1],p.emissive[2]),o.setFloat("u_metallic",p.metallic),o.setFloat("u_roughness",p.roughness),e.setCull(p.doubleSided?"none":"back"),e.setBlend("none"),e.setDepthMask(true),e.gl.drawElementsInstanced(e.gl.TRIANGLES,p.indexCount,e.gl.UNSIGNED_INT,p.indexOffset*4,d);}}}s&&e.bindVAO(null);}uploadLights(e,t){let o=this.lightPacks.get(t);if(!o){let r=t.lights.filter(u=>u.type!=="directional"),i=r.length<=Pt?r:[...r].sort((u,h)=>h.intensity-u.intensity).slice(0,Pt),a=new Float32Array(Pt*4),l=new Float32Array(Pt*4),s=new Float32Array(Pt*4),c=new Float32Array(Pt*4);i.forEach((u,h)=>{let f=h*4;a[f]=u.position[0],a[f+1]=u.position[1],a[f+2]=u.position[2],a[f+3]=u.range,l[f]=u.color[0]*u.intensity,l[f+1]=u.color[1]*u.intensity,l[f+2]=u.color[2]*u.intensity,l[f+3]=u.type==="spot"?1:0,s[f]=u.direction[0],s[f+1]=u.direction[1],s[f+2]=u.direction[2],c[f]=u.cosInner,c[f+1]=u.cosOuter;}),o={count:i.length,pos:a,color:l,dir:s,cone:c},this.lightPacks.set(t,o);}e.setInt("u_light_count",o.count),o.count!==0&&(e.setVec4Array("u_light_pos",o.pos),e.setVec4Array("u_light_color",o.color),e.setVec4Array("u_light_dir",o.dir),e.setVec4Array("u_light_cone",o.cone));}inView(e,t){if(!t.mesh)return false;let r=t.origin(),i=t.boundingRadiusM();return e.isSphereVisible(r.x,r.y,t.altitude+i*.5,i)}advanceTransitions(){this.transitioning=false;for(let e of this.models)e.advanceGrow(this.growDurationSec)&&(this.transitioning=true),e.advanceFade(this.fadeDurationSec)&&(this.transitioning=true);}renderDepth(e,t,o,r){if(this.models.length){o.use();for(let i of this.models){let a=i.visible&&i.fade>.5?this.gpuFor(e,i,r):null;if(!a||!i.mesh)continue;let l=this.shadowMatrix(t,i);o.setMat4("u_matrix",l),a.vao.bind();for(let s of i.mesh.primitives)s.blend||(o.setMat4("u_matrix",s.node>=0?this.shadowMatrixForNode(t,i,s.node):l),e.gl.drawElements(e.gl.TRIANGLES,s.indexCount,e.gl.UNSIGNED_INT,s.indexOffset*4));}e.bindVAO(null);}}shadowMatrix(e,t){let o=t.origin();return t.matrixInSpace(e.shadowObjectMatrix(o.x,o.y,t.altitude),this.shadow32)}shadowMatrixForNode(e,t,o){return this.shadowMatrixForNodeInto(e,t,o,this.depthTimeSec,this.shadowNode32)}shadowMatrixForNodeAt(e,t,o,r){return this.shadowMatrixForNodeInto(e,t,o,r,this.shadowNodeColor32)}shadowMatrixForNodeInto(e,t,o,r,i){let a=t.origin();return t.matrixInSpaceForNode(e.shadowObjectMatrix(a.x,a.y,t.altitude),o,r,i)}gpuFor(e,t,o){let r=this.gpu.get(t.url);if(r)return this.counted.has(t)||(this.counted.add(t),r.users++),r;if(!t.mesh)return null;let i=e.gl,a=new ve(e,new Uint8Array(t.mesh.vertices),fs),l=new be(e,t.mesh.indices),s=new fe(e,[{buffer:a,locations:o}],l),c=t.bitmaps.map(h=>{if(!h)return null;let f=i.createTexture();return f?(e.bindTexture(yo,f),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,h),i.generateMipmap(i.TEXTURE_2D),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR_MIPMAP_LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.REPEAT),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.REPEAT),f):null}),u=new Qn(s,a,l,c);return u.users=1,this.counted.add(t),this.gpu.set(t.url,u),u}static get layout(){return fs}static get instanceLayout(){return us}destroy(e){for(let t of this.gpu.values())t.destroy(e);this.gpu.clear(),this.models=[];}};var qn=4,hs=new te;function wh(n){hs.has(n)||(hs.add(n),console.warn(`[osmgl] ${n}`));}var _h=.5,Eh=.01,Dh=300,$n=127,ei=128,go=5120,vr=5121,Ao=5122,ds=5123,Bo=5126,Mh={stride:8,attribs:[{name:"a_pos",size:2,type:Bo,offset:0}]},ti={stride:et,attribs:[{name:"a_pos",size:2,type:Ao,offset:0}]},ps={stride:tt,attribs:[{name:"a_p0",size:2,type:Ao,offset:0},{name:"a_p1",size:2,type:Ao,offset:4},{name:"a_corner",size:2,type:go,offset:8},{name:"a_ground",size:2,type:go,offset:10},{name:"a_dist",size:1,type:Bo,offset:12},{name:"a_width",size:1,type:Bo,offset:16}]},Br={stride:Ie,attribs:[{name:"a_pos",size:2,type:Ao,offset:0},{name:"a_height",size:1,type:ds,offset:4},{name:"a_tint",size:1,type:vr,normalized:true,offset:6},{name:"a_ao",size:1,type:vr,normalized:true,offset:7},{name:"a_normal",size:3,type:go,normalized:true,offset:8},{name:"a_kind",size:1,type:vr,offset:11},{name:"a_wall",size:3,type:ds,offset:12}]},Fh={flat:0,water:1,foliage:2,sand:3,asphalt:4},Sh=[1,9,14,26,3],ms={stride:Dt,attribs:[{name:"a_pos",size:2,type:Bo,offset:0},{name:"a_level",size:1,type:Ao,offset:8},{name:"a_normal",size:3,type:go,normalized:true,offset:10},{name:"a_kind",size:1,type:vr,offset:13},{name:"a_bleed",size:2,type:go,offset:14}]},oi=class{constructor(e,t,o,r,i,a,l=r){this.vao=e;this.buffer=t;this.ibo=o;this.indexCount=r;this.indexType=i;this.extent=a;this.capIndexOffset=l;this.firstDrawTime=0;}destroy(){this.vao.destroy(),this.buffer.destroy(),this.ibo.destroy();}},ys={enabled:false,resolution:1024,strength:.75,color:"#5a6b86",bias:.25},Co=class{constructor(){this.fill=null;this.surface=null;this.surfaceLocs=new G;this.line=null;this.building=null;this.depth=null;this.groundShadow=null;this.sky=null;this.raster=null;this.rasterLayer=new pr;this.globeBody=null;this.globeClip=null;this.globeMesh=null;this.quad=null;this.fillLocs=new G;this.lineLocs=new G;this.objectLine=null;this.objectLineLocs=new G;this.buildingLocs=new G;this.shadows={...ys};this.shadowTarget=null;this.shadowPlaceholder=null;this.fog=null;this.shadowActive=false;this.materialTime=0;this.materialAnimating=false;this.stencilIds=new G;this.patternScale=1;this.detailScale=1;this.reliefScale=1;this.allowShadows=true;this.highlight=null;this.highlightGpu=new G;this.highlightKey="";this.groundArrows=new uo;this.highlightTris=new G;this.fillHighlightGpu=new G;this.fillHighlightKey="";this.footprintKey="";this.highlightFill=null;this.indoorMask=new ho;this.hiddenBuildings=new Set;this.hiddenVenues=new Set;this.hiddenVenueLayer=null;this.hiddenCut=new G;this.hiddenStamp="";this.shadowDepthPerMeter=1;this.shadowTexelMeters=0;this.growDurationMs=350;this.symbols=null;this.objects=null;this.models=new rt;this.model=null;this.modelInstanced=null;this.modelDepth=null;this.modelLocs=new G;this.modelInstLocs=new G;}get indoorOpen(){return this.indoorMask.active}syncHiddenStamp(){let e=o=>[...o].sort((r,i)=>r-i).join(","),t=e(this.hiddenBuildings)+"#"+e(this.hiddenVenues);if(t!==this.hiddenStamp){this.hiddenStamp=t;for(let o of this.hiddenCut.values())o?.vao.destroy(),o?.ibo.destroy();this.hiddenCut.clear();}}hiddenFor(e,t){return t?this.hiddenBuildings:e===this.hiddenVenueLayer?this.hiddenVenues:null}cutHidden(e,t,o,r,i,a){if(!a||!a.size)return null;let l=r+"|"+o,s=this.hiddenCut.get(l);if(s!==void 0&&(s===null||s.vbo===i))return s;s&&(s.vao.destroy(),s.ibo.destroy());let c=t.data?.buckets?.[o];if(!c||c.kind!=="fill-extrusion"||!c.featureIds)return null;let u=new Uint32Array(c.indices),h=new Float64Array(c.featureIds),f=[];for(let p=0;p*3<u.length;p++)a.has(h[p])||f.push(u[p*3],u[p*3+1],u[p*3+2]);let d=null;if(f.length<u.length){let p=new be(e,new Uint32Array(f));d={vao:new fe(e,[{buffer:i,locations:this.buildingLocs}],p),ibo:p,count:f.length,vbo:i};}return this.hiddenCut.set(l,d),d}init(e){this.symbols?.init(e),this.fill=new ye(e,"fill",kl,Rl),this.surface=new ye(e,"surface",Kl,Ul),this.line=new ye(e,"line",Gl,Ol),this.objectLine=new ye(e,"objectLine",Wl,Vl),this.building=new ye(e,"buildings",zl,Nl),this.depth=new ye(e,"depth",El,Hn),this.groundShadow=new ye(e,"groundShadow",Hl,Pl),this.sky=new ye(e,"sky",Sl,Il),this.raster=new ye(e,"raster",Ll,Tl),this.globeBody=new ye(e,"globeBody",vl,xl),this.globeClip=new ye(e,"globeClip",wl,_l),this.globeMesh=Ih(e,this.globeBody),this.model=new ye(e,"model",Dl,Pn),this.modelInstanced=new ye(e,"model-instanced",Ml,Pn),this.modelDepth=new ye(e,"modelDepth",Fl,Hn);for(let i of rt.layout.attribs)this.modelLocs.set(i.name,this.model.attribLocation(i.name));for(let i of [...rt.layout.attribs,...rt.instanceLayout.attribs])this.modelInstLocs.set(i.name,this.modelInstanced.attribLocation(i.name));this.shadowPlaceholder=Bl(e);let t=new G([["a_pos",this.groundShadow.attribLocation("a_pos")]]),o=new ve(e,new Float32Array([0,0,1,0,1,1,0,1]),Mh),r=new be(e,new Uint16Array([0,1,2,0,2,3]));this.quad={vao:new fe(e,[{buffer:o,locations:t}],r),vbo:o,ibo:r};for(let i of ti.attribs)this.fillLocs.set(i.name,this.fill.attribLocation(i.name));for(let i of ms.attribs)this.surfaceLocs.set(i.name,this.surface.attribLocation(i.name));for(let i of ps.attribs)this.lineLocs.set(i.name,this.line.attribLocation(i.name));for(let i of Xn.attribs)this.objectLineLocs.set(i.name,this.objectLine.attribLocation(i.name));for(let i of Br.attribs)this.buildingLocs.set(i.name,this.building.attribLocation(i.name));}render(e,t,o,r,i,a=new G){if(!this.fill||!this.line||!this.building)return false;let l=t.zoom,s=false;this.materialTime=i/1e3,this.materialAnimating=false,this.fog=Tt(t,r),this.patternScale=Wo/Math.max(Ge(t.center.lat),1);let c=f=>o.get(f.source??Y);this.syncHighlightFootprint(o,r),this.indoorMask.sync(o,r,l),this.syncHiddenStamp(),this.models.advanceTransitions(),this.renderShadowMap(e,t,o,r,i),this.drawSky(e,t,r),this.drawGlobeBody(e,t,r),this.raster&&this.quad&&this.rasterLayer.render(e,t,this.quad.vao,this.raster,r,a,l),this.drawTileStencil(e,t,o),e.setDepthTest(t.globeActive),e.setDepthFunc("lequal"),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none");let u=f=>f.type==="line"&&W(f.paint.elevation,l,0)!==0;for(let f of r.layers){if(f.type==="raster"||f.type==="fill-extrusion"||f.type==="symbol"||f.overlay||u(f)||!r.layerVisibleAt(f,l))continue;let d=c(f);if(d){if(f.type==="surface"){if(!this.flattened(d,r,f))continue;this.drawFill(e,t,d,r,f,l);continue}f.type==="fill"?this.drawFill(e,t,d,r,f,l):this.drawLine(e,t,d,r,f,l);}}this.drawFillHighlight(e,t,o,r),this.groundArrows&&(this.groundArrows.highlightFootprint=this.highlightFootprint(),this.groundArrows.render(e,t,o,r,this.fill,this.fillLocs,f=>{this.applyFogUniforms(f,t,r),f.setVec4("u_globe",0,0,0,0),f.setInt("u_material",0),f.setFloat("u_elevation",0),f.setVec2("u_world_origin",0,0);},this.shadowActive)),this.drawGroundShadow(e,t,o,r),this.drawEarthDepth(e,t,o,r),e.setDepthTest(true),e.setDepthMask(true),e.setDepthFunc("lequal"),e.setCull("back");for(let f of r.layers){if(f.type!=="surface"||f.overlay||!r.layerVisibleAt(f,l))continue;let d=c(f);d&&(this.flattened(d,r,f)||this.drawSurface(e,t,d,r,f,l));}e.setStencilTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),e.setDepthTest(false);for(let f of r.layers){if(f.type==="raster"||!u(f)||f.overlay||!r.layerVisibleAt(f,l))continue;let d=c(f);d&&this.drawLine(e,t,d,r,f,l);}e.setDepthTest(true),e.setDepthMask(true),e.setCull("back");for(let f of r.layers){if(f.type!=="fill-extrusion"||!r.layerVisibleAt(f,l))continue;let d=c(f);d&&(this.drawBuildings(e,t,d,r,f,l,i)&&(s=true),this.drawHighlight(e,t,d,r,f,l));}this.model&&!this.models.isEmpty&&(this.models.render(e,t,this.model,this.modelLocs,f=>{this.applyShadowUniforms(f),this.applyFogUniforms(f,t,r),this.applyLight(f,r);},this.shadowActive,i/1e3,this.modelInstanced?{shader:this.modelInstanced,locations:this.modelInstLocs}:void 0),(this.models.hasAnimated||this.models.hasTransitions)&&(s=true)),e.setDepthTest(false),e.setDepthMask(false),e.setCull("none");for(let f of r.layers){if(f.type==="raster"||!f.overlay||f.type==="symbol"||f.type==="fill-extrusion"||!r.layerVisibleAt(f,l))continue;let d=c(f);if(d){if(f.type==="surface"){this.flattened(d,r,f)?this.drawFill(e,t,d,r,f,l):this.drawSurface(e,t,d,r,f,l),e.setDepthTest(false),e.setDepthMask(false),e.setCull("none");continue}f.type==="fill"?this.drawFill(e,t,d,r,f,l):this.drawLine(e,t,d,r,f,l);}}this.objects&&!this.objects.isEmpty&&(e.setDepthTest(true),e.setDepthFunc("lequal"),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),this.objects.render(e,t,this.fill,this.fillLocs,this.objectLine,this.objectLineLocs,f=>{this.applyFogUniforms(f,t,r),f.setVec4("u_globe",0,0,0,0),f.setInt("u_material",0),f.setFloat("u_elevation",0),f.setVec2("u_world_origin",0,0);},this.shadowActive),e.setDepthTest(false)),this.raster&&this.quad&&this.rasterLayer.render(e,t,this.quad.vao,this.raster,r,a,l,true);let h=r.layers.filter(f=>f.type==="line"&&W(f.paint.ghostOpacity,l,0)>.001&&r.layerVisibleAt(f,l));if(h.length){e.setDepthTest(true),e.setDepthFunc("greater"),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none");for(let f of h){let d=c(f);d&&this.drawLine(e,t,d,r,f,l,W(f.paint.ghostOpacity,l,0));}e.setDepthFunc("lequal"),e.setDepthTest(false);}return this.objects&&!this.objects.isEmpty&&(e.setDepthTest(true),e.setDepthFunc("greater"),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),this.objects.render(e,t,this.fill,this.fillLocs,this.objectLine,this.objectLineLocs,f=>{this.applyFogUniforms(f,t,r),f.setVec4("u_globe",0,0,0,0),f.setInt("u_material",0),f.setFloat("u_elevation",0),f.setVec2("u_world_origin",0,0);},this.shadowActive,true),e.setDepthFunc("lequal"),e.setDepthTest(false)),this.symbols&&(this.symbols.highlightFootprint=this.highlightFootprint()),this.symbols?.render(e,t,o,r),e.bindVAO(null),s||this.materialAnimating}renderShadowMap(e,t,o,r,i){if(this.shadowPlaceholder&&e.bindTexture(qn,this.shadowPlaceholder),this.shadowActive=false,!this.shadows.enabled||!this.allowShadows||!this.depth)return;let a=r.layers.filter(h=>h.type==="fill-extrusion"&&!h.overlay&&r.layerVisibleAt(h,t.zoom));if(!a.length&&this.models.isEmpty)return;this.shadowTarget?this.shadowTarget.resize(this.shadows.resolution):this.shadowTarget=new co(e,this.shadows.resolution);let l=r.light;if(t.updateShadow(Cr(l.keyAzimuth,l.keyAltitude),Dh),!t.shadowReady)return;let s=this.shadowTarget;s.bind(),e.setDepthFunc("lequal"),e.setBlend("none"),e.setCull("none");let c=e.gl;c.enable(c.POLYGON_OFFSET_FILL),c.polygonOffset(2,4);let u=this.depth;u.use();for(let h of a){let f=o.get(h.source??Y);if(!f)continue;let d=r.bucketKeyFor(h);if(d===null)continue;let p=W(h.paint.heightScale,t.zoom,1);(h.source??Y)===Y&&this.indoorMask.prepare(f,d);for(let m of f.visibleTiles){if(!this.drawsTile(t,r,h,m))continue;let b=f.getTile(m),y=b&&this.bucketFor(e,b,d,Br,this.buildingLocs,"fill-extrusion");if(!y)continue;u.setFloat("u_height_scale",this.growScale(y,i,!f.warm)*p),u.setMat4("u_matrix",t.shadowTileMatrix(m,y.extent));let g=(h.source??Y)===Y,A=this.cutHidden(e,b,d,m.dataKey,y.buffer,this.hiddenFor(d,g)),B=g?A??this.indoorMask.indicesFor(e,b,d,m,y.buffer,this.buildingLocs):A;B?(B.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,B.count,e.gl.UNSIGNED_INT,0)):(y.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,y.indexCount,y.indexType,0));}}this.modelDepth&&(this.models.depthTimeSec=i/1e3,e.gl.polygonOffset(6,96),this.models.renderDepth(e,t,this.modelDepth,this.modelLocs),e.gl.polygonOffset(2,4)),c.disable(c.POLYGON_OFFSET_FILL),e.bindFramebuffer(null),e.viewport(0,0,e.gl.drawingBufferWidth,e.gl.drawingBufferHeight),s.bindTexture(qn),this.shadowDepthPerMeter=t.shadowDepthPerMeter(),this.shadowTexelMeters=Math.abs(t.shadowTexelWorldSize(s.size))/(t.pixelsPerMeter||1),this.shadowActive=true;}drawGlobeBody(e,t,o){if(!t.globeActive||!this.globeBody||!this.globeMesh)return;let r=this.globeBody;r.use(),this.applyGlobeUniforms(r,t),r.setMat4("u_matrix",t.localMatrix());let i=o.background;r.setVec3("u_body_color",i[0],i[1],i[2]),je(r,"u_atmo_color",o.sky.horizonColor),r.setFloat("u_atmo_strength",o.sky.enabled?1-t.globeFlatMix:0),e.setBlend("none"),e.setDepthTest(true),e.setDepthMask(true),e.setDepthFunc("less"),e.setCull("none"),this.globeMesh.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,this.globeMesh.count,e.gl.UNSIGNED_SHORT,0),e.bindVAO(null),this.drawGlobeClip(e,t),e.setBlend("premultiplied"),e.setDepthTest(false),e.setDepthMask(false);}drawGlobeClip(e,t){if(!this.globeClip||!this.quad)return;let o=e.gl,r=[0,0,-t.globeRadiusPx,1],i=[0,0,0,0];if(ce(i,t.localProjMatrix,r),i[3]<=1e-6)return;let a=this.globeClip;a.use(),a.setFloat("u_center_depth",i[2]/i[3]),o.colorMask(false,false,false,false),e.setDepthTest(true),e.setDepthMask(true),e.setDepthFunc("always"),this.quad.vao.bind(),o.drawElements(o.TRIANGLES,6,o.UNSIGNED_SHORT,0),o.colorMask(true,true,true,true),e.bindVAO(null);}drawSky(e,t,o){if(!this.sky||!this.quad||!o.sky.enabled)return;let r=this.sky;r.use(),je(r,"u_sky_color",o.sky.skyColor),je(r,"u_horizon_color",o.sky.horizonColor);let i=t.width>0?e.gl.drawingBufferWidth/t.width:1,a=t.horizonScreenY(),l=(t.height-a)*i,s=Math.max(a,1)*i,c=Math.min(s*.5,t.height*i*.1);r.setVec3("u_sky_params",l,o.sky.horizonBlend*s,c);let u=t.globeActive?1-t.globeFlatMix:0;if(r.setVec2("u_space",u,o.sky.starIntensity),u>.001){je(r,"u_space_color",o.sky.spaceColor),je(r,"u_atmo_color",o.sky.atmosphereColor);let h=t.globeDisc();r.setVec4("u_globe_disc",h.dir[0],h.dir[1],h.dir[2],h.angle);let[f,d,p,m]=t.localRayCorners();r.setVec3("u_ray_tl",f[0],f[1],f[2]),r.setVec3("u_ray_tr",d[0],d[1],d[2]),r.setVec3("u_ray_bl",p[0],p[1],p[2]),r.setVec3("u_ray_br",m[0],m[1],m[2]);}e.setDepthTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),this.quad.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,6,e.gl.UNSIGNED_SHORT,0),e.bindVAO(null);}applyGlobeUniforms(e,t){if(!t.globeActive){e.setVec4("u_globe",0,0,0,0);return}let o=t.globeBasis,r=t.worldSize;e.setVec4("u_globe",1,t.globeFlatMix,t.globeRadiusPx,r),e.setVec2("u_globe_center",t.centerPointPx.x/r,t.centerPointPx.y/r);let i=t.globeCamera();e.setVec4("u_globe_cam",i.dir[0],i.dir[1],i.dir[2],i.horizonCos),e.setMat3("u_globe_basis",[o.east[0],o.south[0],o.up[0],o.east[1],o.south[1],o.up[1],o.east[2],o.south[2],o.up[2]]);}applyTileMatrix(e,t,o,r){if(t.globeActive){let i=o.bounds();e.setVec3("u_tile_merc",i.minX,i.minY,(i.maxX-i.minX)/r),e.setMat4("u_matrix",t.localMatrix());return}e.setMat4("u_matrix",t.tileMatrix(o,r));}applyFogUniforms(e,t,o){let r=this.fog??Tt(t,o);if(r.intensity<=0){e.setVec3("u_fog_range",0,1,0);return}je(e,"u_fog_color",o.sky.horizonColor),e.setVec3("u_fog_range",r.near,r.far,r.intensity);}drawsTile(e,t,o,r){let i=this.fog;if(!i)return true;let a=e.distanceToTile(r);return a>i.cutoff?false:t.layerVisibleAt(o,e.detailZoom(a))}earthDepthLevel(e,t){let o=0;for(let i of e.layers)i.type==="surface"?o=Math.min(o,(i.elevation-(i.bevelDrop??0))*this.reliefScale):i.type==="line"&&(o=Math.min(o,W(i.paint.elevation,t.zoom,0)*this.reliefScale));let r=Math.max(_h/Math.max(t.pixelsPerMeter,1e-9),Eh);return o-r}clipToTile(e,t){let o=this.stencilIds.get(t.dataKey);e.setStencilTest(o!==void 0),o!==void 0&&e.gl.stencilFunc(e.gl.EQUAL,o,$n);}drawTileStencil(e,t,o){this.stencilIds.clear();let r=o.get(Y);if(!r||!this.fill||!this.quad)return;let i=r.visibleTiles;if(!i.length||i.length>$n)return;let a=e.gl;a.stencilMask(255),e.clear(null,false,true),e.setStencilTest(true),a.stencilOp(a.KEEP,a.KEEP,a.REPLACE),e.setColorMask(false),e.setDepthTest(false),e.setDepthMask(false),e.setCull("none");let l=this.fill;l.use(),l.setVec4("u_globe",0,0,0,0),l.setInt("u_material",0),l.setVec2("u_world_origin",0,0),l.setVec4("u_color",0,0,0,1),l.setFloat("u_elevation",0),this.quad.vao.bind();let s=0;for(let c of i)s++,this.stencilIds.set(c.dataKey,s),a.stencilFunc(a.ALWAYS,s,$n),l.setMat4("u_matrix",t.tileMatrix(c,1)),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0);e.bindVAO(null),e.setColorMask(true),a.stencilOp(a.KEEP,a.KEEP,a.KEEP),e.setStencilTest(false);}drawEarthDepth(e,t,o,r){if(!this.fill||!this.quad)return;let i=o.get(Y);if(!i)return;let a=this.fill;a.use(),this.applyFogUniforms(a,t,r),a.setVec4("u_globe",0,0,0,0),a.setInt("u_material",0),a.setVec2("u_world_origin",0,0),a.setVec4("u_color",0,0,0,1),a.setFloat("u_elevation",0);let l=this.earthDepthLevel(r,t);e.gl.colorMask(false,false,false,false),e.setDepthTest(true),e.setDepthFunc("lequal"),e.setDepthMask(true),e.setCull("none"),e.gl.enable(e.gl.POLYGON_OFFSET_FILL),e.gl.polygonOffset(1,8),this.quad.vao.bind();let s=new Float32Array(16);for(let c of i.visibleTiles){let u=t.tileMatrix(c,1);s.set(u);for(let h=0;h<4;h++)s[12+h]+=l*u[8+h];a.setMat4("u_matrix",s),e.gl.drawElements(e.gl.TRIANGLES,6,e.gl.UNSIGNED_SHORT,0);}e.bindVAO(null),e.gl.disable(e.gl.POLYGON_OFFSET_FILL),e.gl.colorMask(true,true,true,true);}drawGroundShadow(e,t,o,r){if(!this.shadowActive||!this.groundShadow||!this.quad)return;let i=o.get(Y);if(!i)return;let a=this.groundShadow;a.use(),this.applyShadowUniforms(a),this.applyFogUniforms(a,t,r);let l=r.light,[,,s]=Cr(l.keyAzimuth,l.keyAltitude),c=Math.max(-s,0),u=me(l.ambientColor),h=me(l.keyColor),f=[0,0,0];for(let d=0;d<3;d++){let p=u[d]*l.ambientIntensity,m=h[d]*l.keyIntensity*c;f[d]=p>0?p/(p+m):1;}a.setVec3("u_shadow_ground",f[0],f[1],f[2]),a.setFloat("u_ground_ndotl",c),e.setBlend("multiply"),e.setDepthTest(false),e.setDepthMask(false),e.setCull("none"),this.quad.vao.bind();for(let d of i.visibleTiles)a.setMat4("u_shadow_matrix",t.shadowTileMatrix(d,1)),a.setMat4("u_matrix",t.tileMatrix(d,1)),e.gl.drawElements(e.gl.TRIANGLES,6,e.gl.UNSIGNED_SHORT,0);e.setBlend("premultiplied");}applyShadowUniforms(e){if(e.setInt("u_shadow_map",qn),!this.shadowActive){e.setVec4("u_shadow_params",0,0,0,0);return}let t=this.shadowTarget?.size??1,r=Math.max(this.shadows.bias,1.5*this.shadowTexelMeters)*(this.shadowDepthPerMeter||1);e.setVec4("u_shadow_params",this.shadows.strength,1/t,r,1),e.setFloat("u_shadow_normal_offset",1.5*2/t);let i=me(this.shadows.color);e.setVec3("u_shadow_color",i[0],i[1],i[2]);}get shadowsActive(){return this.shadowActive}applyTileScale(e,t,o){let r=kr(t.z)/this.patternScale;e.setFloat("u_meters_per_unit",r/o);let[i,a]=ki(t.z,t.x,t.y);e.setVec2("u_world_origin",i/this.patternScale,a/this.patternScale);}applyMaterial(e,t,o){let r=t.paint&&"material"in t.paint?t.paint.material:void 0,i=this.detailScale<=0?0:Fh[r??"flat"]??0;if(e.setInt("u_material",i),i===0)return;let a=t.paint,l=W(a.materialStrength,o,1)*this.detailScale,s=W(a.materialScale,o,Sh[i]),c=W(a.materialSpeed,o,i===1?1:0);e.setVec4("u_material_params",l,s,c,this.materialTime),c>0&&l>.004&&(this.materialAnimating=true);}drawFill(e,t,o,r,i,a){let l=this.fill,s=r.colorAt(i,a),c=W(i.paint?.opacity,a,1);if(c<=.001)return;l.use(),this.applyFogUniforms(l,t,r),this.applyGlobeUniforms(l,t),this.applyLight(l,r),this.applyMaterial(l,i,a),l.setVec4v("u_color",De([s[0],s[1],s[2],s[3]*c]));let u=r.bucketKeyFor(i);if(u!==null){for(let h of o.visibleTiles){if(!this.drawsTile(t,r,i,h))continue;let f=o.getTile(h),d=f&&this.bucketFor(e,f,u,ti,this.fillLocs,"fill");d&&(this.clipToTile(e,h),this.shadowActive&&l.setMat4("u_shadow_matrix",t.shadowTileMatrix(h,d.extent)),this.applyTileScale(l,h,d.extent),this.applyTileMatrix(l,t,h,d.extent),d.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,d.indexCount,d.indexType,0));}e.setStencilTest(false);}}drawLine(e,t,o,r,i,a,l=0){let s=this.line,c=r.colorAt(i,a),u=W(i.paint.opacity,a,1)*(l||1),h=W(i.paint.width,a,1);if(u<=.001||h<=.01)return;let f=e.gl.drawingBufferWidth,d=e.gl.drawingBufferHeight,p=t.width>0?f/t.width:1,m=h/2*p;s.use(),this.applyFogUniforms(s,t,r),this.applyGlobeUniforms(s,t),this.applyLight(s,r),this.applyMaterial(s,i,a),s.setVec4v("u_color",De([c[0],c[1],c[2],c[3]*u])),s.setFloat("u_center_w",t.cameraToCenterDistance);let b=W(i.paint.offset,a,0)*p;s.setFloat("u_elevation",W(i.paint.elevation,a,0)*this.reliefScale),s.setFloat("u_relief",this.reliefScale),s.setVec2("u_viewport",f,d);let y=i.paint.dashArray,g=i.paint.arrow===true,A=i.paint.arrowStyle,B=g&&(A==="head"||A==="headOnly"),w=g&&A==="dash";if(s.setInt("u_pattern",w?5:y?1:A==="headOnly"&&g?4:B?3:g?2:0),y){let[_,C]=y;s.setVec2("u_dash",_*p,(_+C)*p);}if(g){let _=ke(i.paint.arrowColor,a,[1,1,1,1]);s.setVec4v("u_arrow_color",De(_));let C=W(i.paint.arrowPeriod,a,46)*p,v=W(i.paint.arrowSize,a,5)*p;if(w){let E=W(i.paint.arrowGap,a,24)*p,M=Math.max(C-E,1),F=Math.min(v,M),H=W(i.paint.arrowShaft,a,2)*p,S=W(i.paint.arrowHead,a,4)*p,L=W(i.paint.arrowOutline,a,0)*p;s.setVec4("u_arrow",H,F,S,M),s.setVec2("u_dash",L,C);}else B?s.setVec4("u_arrow",C,v,m,0):s.setVec4("u_arrow",C,Math.max(v*.4,1),Math.min(v,m*.72),0);}let x=r.bucketKeyFor(i);if(x!==null)for(let _ of o.visibleTiles){if(!this.drawsTile(t,r,i,_))continue;let C=o.getTile(_),v=C&&this.bucketFor(e,C,x,ps,this.lineLocs,"line");if(!v)continue;let E=_.bounds(),M=(E.maxX-E.minX)*t.worldSize/v.extent*p;s.setFloat("u_tile_to_px",M);let F=M>1e-6?1/M:1;s.setFloat("u_half_width",m*F),s.setFloat("u_meters_to_units",t.pixelsPerMeter*F),s.setFloat("u_width_from_data",i.paint.widthFromData===true?1:0),s.setFloat("u_width_extra",W(i.paint.widthExtra,a,0)*F),s.setFloat("u_offset",b*F),s.setFloat("u_tile_per_px",F),this.applyTileScale(s,_,v.extent),this.shadowActive&&s.setMat4("u_shadow_matrix",t.shadowTileMatrix(_,v.extent)),this.applyTileMatrix(s,t,_,v.extent),v.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,v.indexCount,v.indexType,0);}}drawHighlight(e,t,o,r,i,a){let l=this.highlight;if(!l||!this.building||l.layerId!==i.id)return;let s=`${i.id}/${l.featureId}`;this.highlightKey!==s&&(this.disposeHighlight(),this.highlightKey=s);let c=me(l.color)??[.31,.79,.5,1],u=this.building;u.use(),this.applyShadowUniforms(u),this.applyFogUniforms(u,t,r),this.applyLight(u,r),u.setVec4v("u_wall_color",[c[0],c[1],c[2],1]),u.setVec4v("u_roof_color",[c[0],c[1],c[2],1]),u.setFloat("u_opacity",l.opacity),u.setFloat("u_ao_strength",W(i.paint.aoStrength,a,.4)),u.setFloat("u_tint_variation",0),u.setFloat("u_facade_detail",0),u.setFloat("u_window_glow",0),u.setFloat("u_roof_variation",0),u.setFloat("u_height_scale",W(i.paint.heightScale,a,1)),e.setDepthFunc("lequal"),e.setDepthMask(false),e.setBlend("alpha");for(let h of o.visibleTiles){let f=o.getTile(h);if(!f)continue;let d=f.data?.buckets?.[i.id];if(!d)continue;let p=h.dataKey,m=this.highlightGpu.get(p);if(m===void 0){let b=mr(f,i.id,l.featureId);if(b){let y=new ve(e,new Uint8Array(b.vertices),Br),g=new be(e,b.indices);m={vao:new fe(e,[{buffer:y,locations:this.buildingLocs}],g),vbo:y,ibo:g,count:b.indices.length};}else m=null;this.highlightGpu.set(p,m);}m&&(this.applyTileScale(u,h,d.extent),this.shadowActive&&u.setMat4("u_shadow_matrix",t.shadowTileMatrix(h,d.extent)),u.setMat4("u_matrix",t.tileMatrix(h,d.extent)),m.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,m.count,e.gl.UNSIGNED_INT,0));}e.setBlend("none"),e.setDepthMask(true);}refreshHighlight(){this.disposeHighlight();}disposeHighlight(){for(let e of this.highlightGpu.values())e&&(e.vao.destroy(),e.vbo.destroy(),e.ibo.destroy());this.highlightGpu.clear(),this.highlightTris.clear(),this.highlightKey="";}syncHighlightFootprint(e,t){let o=this.highlight;if(!o){this.highlightTris.size&&this.highlightTris.clear();return}let r=`${o.layerId}/${o.featureId}`;this.footprintKey!==r&&(this.highlightTris.clear(),this.footprintKey=r);let i=t.layers.find(s=>s.id===o.layerId),a=e.get(i?.source??Y);if(!a)return;let l=new te;for(let s of a.visibleTiles){if(l.add(s.dataKey),this.highlightTris.has(s.dataKey))continue;let c=a.getTile(s),u=c?.data?.buckets?.[o.layerId];if(!c||!u)continue;let h=mr(c,o.layerId,o.featureId);h&&this.highlightTris.set(s.dataKey,Gn(h,u.extent,s));}for(let s of [...this.highlightTris.keys()])l.has(s)||this.highlightTris.delete(s);}drawFillHighlight(e,t,o,r){let i=this.highlightFill,a=this.fill;if(!i||!a)return;let l=r.layers.find(f=>f.id===i.layerId),s=l?o.get(l.source??Y):void 0;if(!l||!s)return;let c=i.bucketKey,u=me(i.color)??[.31,.79,.5,1];a.use(),this.applyFogUniforms(a,t,r),a.setVec4("u_globe",0,0,0,0),a.setInt("u_material",0),a.setFloat("u_elevation",0),a.setVec2("u_world_origin",0,0),a.setVec4v("u_color",De([u[0],u[1],u[2],i.opacity])),e.setDepthTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none");let h=e.gl;e.setStencilTest(true),h.stencilFunc(h.NOTEQUAL,ei,ei),h.stencilOp(h.KEEP,h.KEEP,h.REPLACE),h.stencilMask(ei);for(let f of s.visibleTiles){let d=s.getTile(f),p=d?.data?.buckets?.[c];if(!d||!p||p.kind!=="fill"||!p.featureIds)continue;let m=this.fillHighlightFor(e,p,f,i.featureId,c);m&&(a.setMat4("u_matrix",t.tileMatrix(f,p.extent)),m.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,m.count,e.gl.UNSIGNED_INT,0));}e.setStencilTest(false),h.stencilOp(h.KEEP,h.KEEP,h.KEEP),h.stencilMask(255),e.bindVAO(null);}fillHighlightFor(e,t,o,r,i){let a=`${i}/${r}/${o.dataKey}`;this.fillHighlightKey!==`${i}/${r}`&&(this.fillHighlightGpu.forEach(f=>{f?.vao.destroy(),f?.ibo.destroy(),f?.vbo.destroy();}),this.fillHighlightGpu.clear(),this.fillHighlightKey=`${i}/${r}`);let l=this.fillHighlightGpu.get(a);if(l!==void 0)return l;let s=new Uint32Array(t.indices),c=new Float64Array(t.featureIds),u=[];for(let f=0;f*3<s.length;f++)c[f]===r&&u.push(s[f*3],s[f*3+1],s[f*3+2]);let h=null;if(u.length){let f=new ve(e,new Uint8Array(t.vertices),ti),d=new be(e,new Uint32Array(u));h={vao:new fe(e,[{buffer:f,locations:this.fillLocs}],d),vbo:f,ibo:d,count:u.length};}return this.fillHighlightGpu.set(a,h),h}highlightFootprint(){return this.highlight&&this.highlightTris.size?[...this.highlightTris.values()]:this.indoorMask.footprint()}drawSurface(e,t,o,r,i,a){let l=this.surface,s=r.colorAt(i,a,[.7,.8,.7,1]),c=W(i.paint.opacity,a,1);if(c<=.001)return;l.use(),this.applyShadowUniforms(l),this.applyFogUniforms(l,t,r),this.applyLight(l,r),this.applyMaterial(l,i,a),l.setVec4v("u_color",s),l.setFloat("u_opacity",c),l.setFloat("u_side_shade",W(i.paint.sideShade,a,.12));let u=i.elevation<(i.base??0),h=i.paint.sideColor?ke(i.paint.sideColor,a,s):s;l.setVec3("u_side_color",h[0],h[1],h[2]),l.setFloat("u_side_light",W(i.paint.sideLight,a,u?1:0)),l.setFloat("u_relief",this.reliefScale);let f=r.bucketKeyFor(i);if(f===null)return;let d=c>=1&&!i.overlay;e.setDepthMask(d),e.setBlend(d?"none":"premultiplied"),e.setCull("none");let p=[];for(let y of o.visibleTiles){if(!this.drawsTile(t,r,i,y))continue;let g=o.getTile(y),A=g&&this.bucketFor(e,g,f,ms,this.surfaceLocs,"surface");A&&p.push({id:y,bucket:A});}let m=(y,g)=>{this.clipToTile(e,y),this.applyTileScale(l,y,g.extent),this.shadowActive&&l.setMat4("u_shadow_matrix",t.shadowTileMatrix(y,g.extent)),l.setMat4("u_matrix",t.tileMatrix(y,g.extent)),g.vao.bind();},b=p.filter(({bucket:y})=>y.capIndexOffset<y.indexCount);if(b.length){e.setColorMask(false),e.setDepthMask(true);for(let{id:y,bucket:g}of b){m(y,g);let A=g.indexType===e.gl.UNSIGNED_INT?4:2;e.gl.drawElements(e.gl.TRIANGLES,g.indexCount-g.capIndexOffset,g.indexType,g.capIndexOffset*A);}e.setColorMask(true),e.setDepthMask(d);}for(let{id:y,bucket:g}of p)m(y,g),e.gl.drawElements(e.gl.TRIANGLES,g.capIndexOffset,g.indexType,0);e.setCull("back"),e.setDepthMask(true),e.setBlend("none");}drawBuildings(e,t,o,r,i,a,l){let s=this.building,c=r.colorAt(i,a,[.86,.84,.8,1]),u=i.paint.roofColor?r.colorAt({...i,paint:{...i.paint,color:i.paint.roofColor}},a,c):c,h=W(i.paint.opacity,a,1);if(h<=.001)return false;s.use(),this.applyShadowUniforms(s),this.applyFogUniforms(s,t,r),s.setVec4v("u_wall_color",c),s.setVec4v("u_roof_color",u),s.setFloat("u_opacity",h),s.setFloat("u_ao_strength",W(i.paint.aoStrength,a,.4)),s.setFloat("u_tint_variation",W(i.paint.tintVariation,a,.07));let f=(B,w)=>i.paint[B]?r.colorAt({...i,paint:{...i.paint,color:i.paint[B]}},a,w):w,d=f("windowColor",[.62,.71,.8,1]),p=f("windowFrameColor",[c[0]*1.1,c[1]*1.1,c[2]*1.1,1]);s.setVec3("u_window_color",d[0],d[1],d[2]),s.setVec3("u_window_frame",p[0],p[1],p[2]),s.setFloat("u_facade_detail",W(i.paint.facadeDetail,a,1)*this.detailScale),s.setFloat("u_window_glow",W(i.paint.windowGlow,a,0)),s.setFloat("u_floor_height",W(i.paint.floorHeight,a,3.2)),s.setFloat("u_roof_variation",W(i.paint.roofVariation,a,.3)),this.applyLight(s,r);let m=h>=1;e.setDepthMask(m),e.setBlend(m?"none":"premultiplied");let b=W(i.paint.heightScale,a,1),y=false,g=r.bucketKeyFor(i);if(g===null)return y;let A=(i.source??Y)===Y;A&&this.indoorMask.prepare(o,g);for(let B of o.visibleTiles){if(!this.drawsTile(t,r,i,B))continue;let w=o.getTile(B),x=w&&this.bucketFor(e,w,g,Br,this.buildingLocs,"fill-extrusion");if(!x)continue;let _=this.growScale(x,l,!o.warm);_<1&&(y=true),s.setFloat("u_height_scale",_*b),this.applyTileScale(s,B,x.extent),this.shadowActive&&s.setMat4("u_shadow_matrix",t.shadowTileMatrix(B,x.extent)),s.setMat4("u_matrix",t.tileMatrix(B,x.extent));let v=this.cutHidden(e,w,g,B.dataKey,x.buffer,this.hiddenFor(g,A))??(w&&A?this.indoorMask.indicesFor(e,w,g,B,x.buffer,this.buildingLocs):null);v?(v.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,v.count,e.gl.UNSIGNED_INT,0)):(x.vao.bind(),e.gl.drawElements(e.gl.TRIANGLES,x.indexCount,x.indexType,0));}return y}growScale(e,t,o=true){if(e.firstDrawTime===0&&(e.firstDrawTime=t),!o||this.growDurationMs<=0)return 1;let r=(t-e.firstDrawTime)/this.growDurationMs;return r<1?Lh(Math.max(r,0)):1}applyLight(e,t){let o=t.light;je(e,"u_ambient_color",o.ambientColor),e.setFloat("u_ambient_intensity",o.ambientIntensity);let[r,i,a]=Cr(o.keyAzimuth,o.keyAltitude);e.setVec3("u_key_dir",r,i,a),je(e,"u_key_color",o.keyColor),e.setFloat("u_key_intensity",o.keyIntensity);let[l,s,c]=Cr(o.fillAzimuth,o.fillAltitude);e.setVec3("u_fill_dir",l,s,c),je(e,"u_fill_color",o.fillColor),e.setFloat("u_fill_intensity",o.fillIntensity);}flattened(e,t,o){let r=t.bucketKeyFor(o);if(r===null)return false;for(let i of e.visibleTiles){let a=e.getTile(i)?.data?.buckets?.[r];if(a)return a.kind==="fill"}return false}bucketFor(e,t,o,r,i,a){let l=t.buckets.get(o);if(l)return l;let s=t.data?.buckets?.[o];if(!s||s.kind==="symbol"||s.kind==="placement")return null;if(s.kind!==a)return wh(`\u0441\u043B\u043E\u0439 ${o}: \u0432 \u0442\u0430\u0439\u043B\u0435 \u043C\u0435\u0448 \xAB${s.kind}\xBB, \u0430 \u0440\u0438\u0441\u0443\u044E\u0442 \u043A\u0430\u043A \xAB${a}\xBB \u2014 \u043F\u0440\u043E\u043F\u0443\u0449\u0435\u043D`),null;let c=new ve(e,new Uint8Array(s.vertices),r),u=new be(e,new Uint32Array(s.indices)),h=new fe(e,[{buffer:c,locations:i}],u),f=new oi(h,c,u,u.count,u.type,s.extent,s.capIndexOffset??u.count);return t.buckets.set(o,f),f}destroy(e){this.disposeHighlight(),this.fill?.destroy(),this.surface?.destroy(),this.line?.destroy(),this.objectLine?.destroy(),this.building?.destroy(),this.symbols?.destroy(e),this.models.destroy(e.gl),this.shadowTarget?.destroy(),this.shadowTarget=null,this.shadowPlaceholder&&e.gl.deleteTexture(this.shadowPlaceholder),this.shadowPlaceholder=null,this.quad&&(this.quad.vao.destroy(),this.quad.vbo.destroy(),this.quad.ibo.destroy(),this.quad=null),this.globeMesh&&(this.globeMesh.vao.destroy(),this.globeMesh.vbo.destroy(),this.globeMesh.ibo.destroy(),this.globeMesh=null),this.fill=this.line=this.building=null,this.objectLine=null;}},bs=new G;function Ih(n,e){let r=new Float32Array(4290),i=0;for(let f=0;f<=32;f++){let d=(f/32-.5)*Math.PI;for(let p=0;p<=64;p++)r[i++]=p/64*2*Math.PI-Math.PI,r[i++]=d;}let a=new Uint16Array(2048*6),l=0;for(let f=0;f<32;f++)for(let d=0;d<64;d++){let p=f*65+d,m=p+64+1;a[l++]=p,a[l++]=p+1,a[l++]=m,a[l++]=p+1,a[l++]=m+1,a[l++]=m;}let s={stride:8,attribs:[{name:"a_lnglat",size:2,type:Bo,offset:0}]},c=new G([["a_lnglat",e.attribLocation("a_lnglat")]]),u=new ve(n,r,s),h=new be(n,a);return {vao:new fe(n,[{buffer:u,locations:c}],h),vbo:u,ibo:h,count:a.length}}function je(n,e,t){let o=bs.get(t);o||(o=me(t),bs.set(t,o)),n.setVec3(e,o[0],o[1],o[2]);}function Cr(n,e){let t=n*Math.PI/180,o=e*Math.PI/180,r=Math.cos(o);return [-Math.sin(t)*r,Math.cos(t)*r,-Math.sin(o)]}function Lh(n){let o=n-1;return 1+2.20158*o*o*o+1.20158*o*o}var xr=1,vo=class{constructor(e=1024){this.entries=new G;this.shelfY=0;this.shelfX=0;this.shelfHeight=0;this.texture=null;this.dirty=true;this.full=false;this.size=e,this.data=new Uint8Array(e*e);}get(e){return this.entries.get(e)}add(e,t,o,r){let i=this.entries.get(e);if(i)return i;if(this.full||o>this.size)return null;if(this.shelfX+o+xr>this.size&&(this.shelfY+=this.shelfHeight+xr,this.shelfX=0,this.shelfHeight=0),this.shelfY+r+xr>this.size)return this.full||console.warn("[osmgl] \u0430\u0442\u043B\u0430\u0441 SDF \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D, \u043D\u043E\u0432\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043D\u0435 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u044E\u0442\u0441\u044F"),this.full=true,null;let a={x:this.shelfX,y:this.shelfY,width:o,height:r};for(let l=0;l<r;l++){let s=l*o,c=(a.y+l)*this.size+a.x;this.data.set(t.subarray(s,s+o),c);}return this.shelfX+=o+xr,r>this.shelfHeight&&(this.shelfHeight=r),this.entries.set(e,a),this.dirty=true,a}bind(e,t){let o=e.gl;this.texture?e.bindTexture(t,this.texture):(this.texture=o.createTexture(),e.bindTexture(t,this.texture),o.texStorage2D(o.TEXTURE_2D,1,o.R8,this.size,this.size),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MAG_FILTER,o.LINEAR),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),this.dirty=true),this.dirty&&(o.pixelStorei(o.UNPACK_ALIGNMENT,1),o.texSubImage2D(o.TEXTURE_2D,0,0,0,this.size,this.size,o.RED,o.UNSIGNED_BYTE,this.data),this.dirty=false);}destroy(e){this.texture&&e.gl.deleteTexture(this.texture),this.texture=null,this.entries.clear(),this.data=new Uint8Array(0);}};var ri=.75,wo=8,Ce=3,Ye=24,kt=256,gs=255,xo=class{constructor(e,t="Noto Sans Regular"){this.urlTemplate=e;this.fontstack=t;this.glyphs=new G;this.loaded=new te;this.inflight=new G;}get(e){return this.glyphs.get(e)}hasRange(e){return this.loaded.has(Math.floor(e/kt))}needsLoad(e){for(let t of e){let o=t.codePointAt(0);if(o===void 0)continue;let r=Math.floor(o/kt);if(r<=gs&&!this.loaded.has(r))return true}return false}async ensure(e){let t=new te;for(let o of e){let r=o.codePointAt(0);if(r===void 0)continue;let i=Math.floor(r/kt);i>gs||this.loaded.has(i)||t.add(i);}return t.size?(await Promise.all([...t].map(o=>this.loadRange(o))),true):false}loadRange(e){let t=this.inflight.get(e);if(t)return t;let o=this.urlTemplate.replace("{fontstack}",encodeURIComponent(this.fontstack)).replace("{range}",`${e*kt}-${e*kt+kt-1}`),r=fetch(o,{credentials:"same-origin"}).then(i=>{if(!i.ok)throw new Error(`HTTP ${i.status}`);return i.arrayBuffer()}).then(i=>{for(let a of As(i))this.glyphs.set(a.id,a);this.loaded.add(e);}).catch(i=>{this.loaded.add(e),console.warn(`[osmgl] \u0433\u043B\u0438\u0444\u044B ${o} \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0438\u0441\u044C:`,i instanceof Error?i.message:i);}).finally(()=>{this.inflight.delete(e);});return this.inflight.set(e,r),r}};function As(n){let e=new ut(n instanceof Uint8Array?n:new Uint8Array(n)),t=[];return e.readFields((o,r,i)=>{if(o!==1||!i)return;let a=i.readVarint()+i.pos;i.readFields((l,s,c)=>{if(l!==3||!c)return;let u=c.readVarint()+c.pos,h={id:0,bitmap:null,width:0,height:0,left:0,top:0,advance:0};c.readFields((f,d,p)=>{p&&(f===1?h.id=p.readVarint():f===2?h.bitmap=p.readBytes():f===3?h.width=p.readVarint():f===4?h.height=p.readVarint():f===5?h.left=p.readSVarint():f===6?h.top=p.readSVarint():f===7&&(h.advance=p.readVarint()));},null,u),t.push(h);},null,a);},null),t}var Th=.25,Rt=1e20;function ni(n,e,t){let o=e+Ce*2,r=t+Ce*2,i=o*r,a=new Float64Array(i),l=new Float64Array(i);a.fill(Rt),l.fill(0);for(let c=0;c<t;c++)for(let u=0;u<e;u++){let h=n[c*e+u]/255,f=(c+Ce)*o+(u+Ce);if(h>=1)a[f]=0,l[f]=Rt;else if(h>0){let d=.5-h;a[f]=d>0?d*d:0,l[f]=d<0?d*d:0;}else a[f]=Rt,l[f]=0;}Bs(a,o,r),Bs(l,o,r);let s=new Uint8Array(i);for(let c=0;c<i;c++){let u=Math.sqrt(a[c])-Math.sqrt(l[c]);s[c]=Hh(Math.round(255-255*(u/wo+Th)));}return {data:s,width:o,height:r}}function Bs(n,e,t){let o=Math.max(e,t),r=new Float64Array(o),i=new Float64Array(o),a=new Int32Array(o),l=new Float64Array(o+1);for(let s=0;s<e;s++){for(let c=0;c<t;c++)r[c]=n[c*e+s];Cs(r,i,a,l,t);for(let c=0;c<t;c++)n[c*e+s]=i[c];}for(let s=0;s<t;s++){for(let c=0;c<e;c++)r[c]=n[s*e+c];Cs(r,i,a,l,e);for(let c=0;c<e;c++)n[s*e+c]=i[c];}}function Cs(n,e,t,o,r){t[0]=0,o[0]=-Rt,o[1]=Rt;for(let i=1,a=0;i<r;i++){let l=0;do{let s=t[a];l=(n[i]-n[s]+i*i-s*s)/(i-s)/2;}while(l<=o[a]&&--a>-1);a++,t[a]=i,o[a]=l,o[a+1]=Rt;}for(let i=0,a=0;i<r;i++){for(;o[a+1]<i;)a++;let l=t[a];e[i]=(i-l)*(i-l)+n[l];}}var Hh=n=>n<0?0:n>255?255:n;var vs=48,_o=class{constructor(e={}){this.defs=e;this.sdfs=new G;this.pending=new te;this.failed=new te;}setIcons(e){this.defs=e,this.sdfs.clear(),this.failed.clear();}has(e){return this.sdfs.has(e)}get(e){return this.sdfs.get(e)}isDefined(e){return this.defs[e]!==void 0}async ensure(e){if(this.sdfs.has(e)||this.pending.has(e)||this.failed.has(e))return false;let t=this.defs[e];if(t===void 0)return this.failed.add(e),false;this.pending.add(e);try{let o=typeof t=="string"?t:t.svg,r=/viewBox="0 0 ([\d.]+) ([\d.]+)"/.exec(o),i=r?Number(r[1])/Number(r[2]):1,a=Math.max(8,Math.round(vs*(i>1?i:1))),l=Math.max(8,Math.round(vs/(i<1?i:1))),s=await Ph(o,a,l);return this.sdfs.set(e,ni(s,a,l)),!0}catch(o){return this.failed.add(e),console.warn(`[osmgl] \u0438\u043A\u043E\u043D\u043A\u0430 \xAB${e}\xBB \u043D\u0435 \u0440\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u043E\u0432\u0430\u043B\u0430\u0441\u044C:`,o instanceof Error?o.message:o),false}finally{this.pending.delete(e);}}};async function Ph(n,e,t){let o=n.includes("width=")?n:n.replace("<svg",`<svg width="${e}" height="${t}"`),r=new Blob([o],{type:"image/svg+xml;charset=utf-8"}),i=URL.createObjectURL(r);try{let a=new Image;a.width=e,a.height=t,await new Promise((h,f)=>{a.onload=()=>h(),a.onerror=()=>f(new Error("\u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0434\u0435\u043A\u043E\u0434\u0438\u0440\u043E\u0432\u0430\u0442\u044C SVG")),a.src=i;});let l=document.createElement("canvas");l.width=e,l.height=t;let s=l.getContext("2d",{willReadFrequently:!0});if(!s)throw new Error("\u043D\u0435\u0442 2D-\u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430");s.clearRect(0,0,e,t),s.drawImage(a,0,0,e,t);let c=s.getImageData(0,0,e,t).data,u=new Uint8ClampedArray(e*t);for(let h=0;h<u.length;h++)u[h]=c[h*4+3];return u}finally{URL.revokeObjectURL(i);}}var bt={dot:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="5"/></svg>',entrance:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2.5 19.5 10l-2.1 2.1-3.9-3.9V21h-3V8.2l-3.9 3.9L4.5 10 12 2.5z"/></svg>',door:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 2h11a3 3 0 0 1 3 3v17H5V2zm9 9.2a1.2 1.2 0 1 0 0 2.4 1.2 1.2 0 0 0 0-2.4z"/></svg>',elevator:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 3h14v18H5V3zm7 2.2L9.2 9h5.6L12 5.2zM9.2 15h5.6L12 18.8 9.2 15z"/></svg>',"frame-circle":'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="11"/></svg>',cafe:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 6h12v6a6 6 0 0 1-12 0V6zm12 1h2.5a2.5 2.5 0 0 1 0 5H16V7zM3 20h14v2H3z"/></svg>',restaurant:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 2h2v8a2 2 0 0 1-4 0V2h2zM5 2v6h2V2zm7 0h2v20h-2V13a4 4 0 0 1 0-8V2zM6 12h2v10H6z"/></svg>',shop:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 8h16l-1.5 12h-13L4 8zm4-3a4 4 0 0 1 8 0v2h-2V5a2 2 0 0 0-4 0v2H8V5z"/></svg>',grocery:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 4h3l3 11h9l2-8H8m1 15a2 2 0 1 0 4 0 2 2 0 0 0-4 0zm8 0a2 2 0 1 0 4 0 2 2 0 0 0-4 0z"/></svg>',fuel:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 3h9v18H4V3zm2 2v5h5V5H6zm10 2 3 3v8a2 2 0 0 1-4 0V9h1V7z"/></svg>',parking:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 3h6a5 5 0 0 1 0 10H9v8H6V3zm3 3v4h3a2 2 0 0 0 0-4H9z"/></svg>',hospital:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 3h4v7h7v4h-7v7h-4v-7H3v-4h7V3z"/></svg>',pharmacy:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11 4h2v5h5v2h-5v5h-2v-5H6V9h5V4zM5 18h14v3H5z"/></svg>',school:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 3 2 8l10 5 10-5-10-5zM5 12v5c0 2 3 4 7 4s7-2 7-4v-5l-7 3.5L5 12z"/></svg>',bank:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2 2 8h20L12 2zM4 10h3v8H4v-8zm6.5 0h3v8h-3v-8zM17 10h3v8h-3v-8zM2 20h20v2H2z"/></svg>',bus:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 5a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10a2 2 0 0 1-2 2v2h-3v-2H9v2H6v-2a2 2 0 0 1-2-2V5zm2 2v5h12V7H6zm1 8a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0zm7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0z"/></svg>',railway:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 3h12v11a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V3zm2 3v4h8V6H8zm-2 15 3-3h6l3 3H6z"/></svg>',park:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2a6 6 0 0 1 5.2 9 4.5 4.5 0 0 1-2.4 8.3H13V22h-2v-2.7H9.2A4.5 4.5 0 0 1 6.8 11 6 6 0 0 1 12 2z"/></svg>',hotel:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 6h3v7h10a4 4 0 0 1 4 4v3h-3v-3H5v3H2V6zm5 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z"/></svg>',place_of_worship:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c3 3 5 5 5 8v12h-4v-5a1 1 0 0 0-2 0v5H7V10c0-3 2-5 5-8z"/></svg>',police:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l8 3v7c0 5-3.5 8.5-8 10-4.5-1.5-8-5-8-10V5l8-3z"/></svg>',stadium:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 4c5.5 0 10 1.8 10 4v4c0 2.2-4.5 4-10 4S2 14.2 2 12V8c0-2.2 4.5-4 10-4zm0 2C7.6 6 4 7.1 4 8s3.6 2 8 2 8-1.1 8-2-3.6-2-8-2z"/></svg>',fast_food:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 9a9 9 0 0 1 18 0H3zm-1 3h20v2H2v-2zm2 4h16a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3z"/></svg>',bakery:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 9c0-2 1.5-3 3-3h10c1.5 0 3 1 3 3l-1 9H5L4 9zm4-1v9h2V8H8zm4 0v9h2V8h-2z"/></svg>',ice_cream:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2a5 5 0 0 1 5 5H7a5 5 0 0 1 5-5zM7 9h10l-5 13L7 9z"/></svg>',bar:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 4h18l-8 9v6h4v2H7v-2h4v-6L3 4zm3.5 2 2 2h7l2-2h-11z"/></svg>',butcher:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 3h6l2 5-3 3-5-3V3zm8 7 6 6-2 2-6-6 2-2zM3 17h8v4H3v-4z"/></svg>',alcohol_shop:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 2h4v4l3 5v11H7V11l3-5V2zm-1 11h6v7H9v-7z"/></svg>',clothing_store:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 3h6l5 3-2 4-2-1v12H8V9L6 10 4 6l5-3zm1 1.5L12 6l2-1.5h-4z"/></svg>',hairdresser:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 3l9 9-2 2-2-2-2 2 2 2-1 1a3 3 0 1 1-2-2l1-1-1-1a3 3 0 1 1 2-2L5 3zm14 0l-6 6 2 2 5-6V3zM6 17a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm0-11a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z"/></svg>',laundry:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 2h14v20H5V2zm2 2v2h10V4H7zm5 4a6 6 0 1 0 0 12 6 6 0 0 0 0-12zm0 3a3 3 0 1 1 0 6 3 3 0 0 1 0-6z"/></svg>',music:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 4l11-2v13a3.5 3.5 0 1 1-2-3.2V6L11 7.4v10.1A3.5 3.5 0 1 1 9 14.3V4z"/></svg>',car:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5 11l2-5a2 2 0 0 1 2-1h6a2 2 0 0 1 2 1l2 5v7h-3v-2H8v2H5v-7zm2.5-1h9l-1.2-3H8.7L7.5 10zM7 13a1.3 1.3 0 1 0 0 2.6A1.3 1.3 0 0 0 7 13zm10 0a1.3 1.3 0 1 0 0 2.6 1.3 1.3 0 0 0 0-2.6z"/></svg>',bicycle:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 12a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm12 0a5 5 0 1 0 0 10 5 5 0 0 0 0-10zM6 15a2 2 0 1 1 0 4 2 2 0 0 1 0-4zm12 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4zM9 4h4l4 8-2 1-3-6H9V4z"/></svg>',atm:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 5h20v14H2V5zm2 2v3h16V7H4zm0 5v5h16v-5H4zm2 2h5v2H6v-2z"/></svg>',post:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 5h20v14H2V5zm2.5 2 7.5 6 7.5-6h-15z"/></svg>',telephone:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 2c1 0 2 3 2 4s-2 2-2 3 4 6 5 6 2-2 3-2 4 1 4 2-1 4-3 4C9 19 5 15 3 5c0-2 3-3 4-3z"/></svg>',office:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 2h11v20H4V2zm2 3v3h3V5H6zm5 0v3h3V5h-3zM6 10v3h3v-3H6zm5 0v3h3v-3h-3zM6 15v3h3v-3H6zm5 0v7h3v-7h-3zM17 8h4v14h-4V8z"/></svg>',town_hall:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l9 5v2H3V7l9-5zM5 11h3v7H5v-7zm5.5 0h3v7h-3v-7zM16 11h3v7h-3v-7zM3 20h18v2H3v-2z"/></svg>',doctors:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M7 2v6a5 5 0 0 0 4 4.9V16a3 3 0 1 0 6 0v-1.2a2.5 2.5 0 1 0-2 0V16a1 1 0 1 1-2 0v-3.1A5 5 0 0 0 17 8V2h-3v6a2 2 0 0 1-4 0V2H7z"/></svg>',dentist:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c3 0 4-1 6 0 2 1 2 4 1 8l-1 5c-1 4-3 4-3.5 1L14 12c-.4-2-1.6-2-2 0l-.5 4c-.5 3-2.5 3-3.5-1l-1-5C6 6 6 3 8 2c2-1 3 0 4 0z"/></svg>',veterinary:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 11c3 0 6 3 6 6a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3c0-3 3-6 6-6zM6 5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zm12 0a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zM10 2a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5zm4 0a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5z"/></svg>',library:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 3h5c1.5 0 2.5.5 3 1.2.5-.7 1.5-1.2 3-1.2h5v16h-5c-1.5 0-2.5.6-3 1.5-.5-.9-1.5-1.5-3-1.5H4V3zm2 2v12h3c1 0 2 .2 2.5.5V5.8C11 5.3 10 5 9 5H6z"/></svg>',college:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 3 2 8l10 5 10-5-10-5zM5 12v5c0 2 3 4 7 4s7-2 7-4v-5l-7 3.5L5 12zm15-2v7h2v-7h-2z"/></svg>',museum:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l10 5v2H2V7l10-5zM5 11h2.5v7H5v-7zm5 0h2.5v7H10v-7zm5 0h2.5v7H15v-7zM3 20h18v2H3v-2z"/></svg>',art_gallery:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2a10 10 0 0 0 0 20c1.7 0 2-1 1.4-2-.7-1.2 0-2.5 1.6-2.5H18a4 4 0 0 0 4-4c0-6-4.5-11.5-10-11.5zM7 9a1.7 1.7 0 1 1 0 3.4A1.7 1.7 0 0 1 7 9zm3-4a1.7 1.7 0 1 1 0 3.4A1.7 1.7 0 0 1 10 5zm5 0a1.7 1.7 0 1 1 0 3.4A1.7 1.7 0 0 1 15 5zm3 4a1.7 1.7 0 1 1 0 3.4A1.7 1.7 0 0 1 18 9z"/></svg>',theatre:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 5h8v9a4 4 0 0 1-8 0V5zm2.5 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm3 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2zM13 5h8v9a4 4 0 0 1-8 0V5zm2.5 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm3 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>',cinema:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 4h20v16H2V4zm3 2v2h2V6H5zm0 5v2h2v-2H5zm0 5v2h2v-2H5zm12-10v2h2V6h-2zm0 5v2h2v-2h-2zm0 5v2h2v-2h-2zM9 6v12h6V6H9z"/></svg>',monument:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 2h4l1 13H9l1-13zM7 17h10v2H7v-2zm-2 3h14v2H5v-2z"/></svg>',castle:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 6h3V3h2v3h3V3h2v3h3V3h2v3h3v16H2V6zm7 8h6v8H9v-8z"/></svg>',attraction:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l2.9 6.3 6.9.8-5.1 4.7 1.4 6.8L12 17.2 5.9 20.6l1.4-6.8L2.2 9.1l6.9-.8L12 2z"/></svg>',zoo:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 12c3.3 0 6 2.7 6 5.5S15.3 21 12 21s-6-.7-6-3.5S8.7 12 12 12zM5 6a2.7 2.7 0 1 1 0 5.4A2.7 2.7 0 0 1 5 6zm14 0a2.7 2.7 0 1 1 0 5.4A2.7 2.7 0 0 1 19 6zM9.5 2a2.7 2.7 0 1 1 0 5.4 2.7 2.7 0 0 1 0-5.4zm5 0a2.7 2.7 0 1 1 0 5.4 2.7 2.7 0 0 1 0-5.4z"/></svg>',theme_park:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11 2h2v6h-2V2zM4 20a8 8 0 0 1 16 0v2H4v-2zm3.5-2h9A6 6 0 0 0 12 14a6 6 0 0 0-4.5 4zM3 9l3-2 3 2-3 2-3-2zm12 0l3-2 3 2-3 2-3-2z"/></svg>',information:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.5 4h3v3h-3V6zm0 5h3v8h-3v-8z"/></svg>',garden:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c2 2 3 4 3 6a3 3 0 0 1-6 0c0-2 1-4 3-6zM4 9c2.5 0 5 1.5 6 4H8c-2.5 0-4-1.5-4-4zm16 0c0 2.5-1.5 4-4 4h-2c1-2.5 3.5-4 6-4zm-9 5h2v8h-2v-8z"/></svg>',pitch:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 5h20v14H2V5zm2 2v10h7V7H4zm9 0v10h7V7h-7zm-1 3a2 2 0 1 1 0 4 2 2 0 0 1 0-4z"/></svg>',playground:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 4h2v16H3V4zm16 0h2v16h-2V4zM5 6h14v2H5V6zm2 3 3 11H8L5 9h2zm10 0-3 11h2l3-11h-2z"/></svg>',swimming_pool:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 3a3 3 0 0 1 6 0v3h4a3 3 0 0 1 3 3h-3a1 1 0 0 0-1 1v3H12V6a1 1 0 0 0-2 0v8H6V3zm-4 14c2 0 2 2 5 2s3-2 5-2 3 2 5 2 3-2 5-2v3c-2 0-2 2-5 2s-3-2-5-2-3 2-5 2-3-2-5-2v-3z"/></svg>',sports_centre:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 8h3v8H4V8zM2 10h2v4H2v-4zm15-2h3v8h-3V8zm3 2h2v4h-2v-4zM8 11h8v2H8v-2z"/></svg>',bicycle_parking:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 2h5a4 4 0 0 1 0 8H7v5H4V2zm3 3v2h2a1 1 0 0 0 0-2H7zm-2 13a4 4 0 1 1 8 0 4 4 0 0 1-8 0zm10 0a4 4 0 1 1 8 0 4 4 0 0 1-8 0z"/></svg>',aerialway:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 4l20-2v2L13 5v2h1l4 3v6a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2v-6l4-3h1V5.3L2 6V4zm7 8v3h6v-3H9z"/></svg>',ferry_terminal:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11 2h2v3h4v4h-4v5l7 2-2 6c-2 0-2-1-4-1s-2 1-4 1-2-1-4-1-2 1-4 1l-2-6 7-2V9H3V5h4V2h4zM9 7v2h6V7H9z"/></svg>',traffic_signals:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M8 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-3v3h4v2H7v-2h4v-3H8a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm4 1.6a1.6 1.6 0 1 0 0 3.2 1.6 1.6 0 0 0 0-3.2zm0 4.3a1.6 1.6 0 1 0 0 3.2 1.6 1.6 0 0 0 0-3.2zm0 4.3a1.4 1.4 0 1 0 0 2.8 1.4 1.4 0 0 0 0-2.8z"/></svg>',road_closed:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4 10.1h16v3.8H4z"/></svg>',gate:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 4h3v16H2V4zm17 0h3v16h-3V4zM6 8h12v2H6V8zm0 5h12v2H6v-2z"/></svg>',toilets:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4zM4 7h4l2 7H8v8H4v-8H2l2-7zm12-5a2 2 0 1 1 0 4 2 2 0 0 1 0-4zm-3 5h6l1 8h-2v7h-4v-7h-2l1-8z"/></svg>',drinking_water:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c4 5 6 8 6 11a6 6 0 0 1-12 0c0-3 2-6 6-11zm0 5c-2 3-3 4.6-3 6a3 3 0 0 0 6 0c0-1.4-1-3-3-6z"/></svg>',waste_basket:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M9 2h6l1 2h4v3H4V4h4l1-2zM5 8h14l-1 14H6L5 8zm4 3v8h2v-8H9zm4 0v8h2v-8h-2z"/></svg>',recycling:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l4 7h-3v4h-2V9H8l4-7zM3 18l3-6 2 1-1.4 2.5H10v2H6.6L8 20l-2 1-3-3zm18 0-3 3-2-1 1.4-2.5H14v-2h3.4L16 13l2-1 3 6z"/></svg>',campsite:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l9 18h-4l-5-10-5 10H3L12 2zm0 9 5 9H7l5-9z"/></svg>',shelter:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2l10 8-1.5 2L19 11v9H5v-9l-1.5 1L2 10l10-8zm0 3.5L7 9.5V18h10V9.5l-5-4z"/></svg>',fire_station:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 2c0 3-4 4-4 8 0 1 .4 2 1 2.6C9.4 11 10 9.5 11 9c0 2 3 3 3 6a3.5 3.5 0 0 1-1 2.5c2.5-.6 4-2.8 4-5.5 0-5-4-7-4-10zM7 15c0 4 2.5 7 5 7s5-3 5-7c0 2-1 3-2 3.5.3-.6.5-1.2.5-2 0-2.5-2-3.5-2.5-5.5-1 1-2 2.5-2 4 0 .8.2 1.5.6 2C10.2 17.5 9 16.5 9 15H7z"/></svg>',prison:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M3 3h2v18H3V3zm4 0h2v18H7V3zm4 0h2v18h-2V3zm4 0h2v18h-2V3zm4 0h2v18h-2V3zM2 10h20v2H2v-2z"/></svg>',cemetery:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2c3 0 5 2 5 5v13H7V7c0-3 2-5 5-5zm-1 3v2H9v2h2v7h2v-7h2V7h-2V5h-2zM5 21h14v2H5v-2z"/></svg>',basin:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M2 8c2 0 2 2 5 2s3-2 5-2 3 2 5 2 3-2 5-2v3c-2 0-2 2-5 2s-3-2-5-2-3 2-5 2-3-2-5-2V8zm0 7c2 0 2 2 5 2s3-2 5-2 3 2 5 2 3-2 5-2v3c-2 0-2 2-5 2s-3-2-5-2-3 2-5 2-3-2-5-2v-3z"/></svg>',"shield-2":'<svg viewBox="0 0 32 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="30" height="18" rx="4"/></svg>',"shield-3":'<svg viewBox="0 0 41 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="39" height="18" rx="4"/></svg>',"shield-4":'<svg viewBox="0 0 50 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="48" height="18" rx="4"/></svg>',"shield-5":'<svg viewBox="0 0 59 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="57" height="18" rx="4"/></svg>',"shield-6":'<svg viewBox="0 0 68 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="66" height="18" rx="4"/></svg>',"shield-7":'<svg viewBox="0 0 77 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="75" height="18" rx="4"/></svg>',"shield-8":'<svg viewBox="0 0 86 24" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="3" width="84" height="18" rx="4"/></svg>'},kh={lodging:"hotel",beer:"bar",pub:"bar",kindergarten:"school",university:"college",lift_gate:"gate",toll_booth:"gate",border_control:"gate",bollard:"gate",picnic_site:"campsite",motorcycle_parking:"parking",bicycle_rental:"bicycle",harbor:"ferry_terminal",reservoir:"basin",water_park:"swimming_pool",volleyball:"pitch",basketball:"pitch",tennis:"pitch",horse_racing:"pitch",athletics:"sports_centre",running:"sports_centre",cycling:"bicycle",climbing:"sports_centre",climbing_adventure:"sports_centre",winter_sports:"sports_centre",ice_rink:"sports_centre",karting:"car",motor:"car",escape_game:"attraction"};for(let[n,e]of Object.entries(kh)){let t=bt[e];t?bt[n]=t:console.warn(`[osmgl] \u043F\u0441\u0435\u0432\u0434\u043E\u043D\u0438\u043C \u0438\u043A\u043E\u043D\u043A\u0438 \xAB${n}\xBB \u0441\u0441\u044B\u043B\u0430\u0435\u0442\u0441\u044F \u043D\u0430 \u043D\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0449\u0443\u044E \xAB${e}\xBB`);}var Rh=1.2;function ii(n,e,t=16,o=0){let r=Gh(n,t),i=[],a=[],l=0;for(let u of r){let h=0,f=0;for(let d of u){let p=d.codePointAt(0);if(p===void 0)continue;let m=e.get(p);m&&(h+=m.advance,f++);}f>1&&(h+=o*(f-1)),a.push(h),h>l&&(l=h);}if(l===0)return null;let s=Ye*Rh,c=r.length*s;for(let u=0;u<r.length;u++){let h=-a[u]/2,f=-c/2+u*s+s/2;for(let d of r[u]){let p=d.codePointAt(0);if(p===void 0)continue;let m=e.get(p);m&&(m.width>0&&m.height>0&&m.bitmap&&i.push({glyph:m,x:h,y:f}),h+=m.advance+o);}}return i.length?{glyphs:i,width:l,height:c}:null}function Gh(n,e){let t=n.replace(/\s+/g," ").trim();if(t.length<=e)return [t];let o=t.split(" "),r=[],i="";for(let a of o)i?i.length+1+a.length<=e?i+=" "+a:(r.push(i),i=a):i=a;return i&&r.push(i),r.slice(0,3)}function ai(n,e,t,o){if(n.length<2)return [];let r=-o,i=-o,a=e+o,l=t+o,s=f=>f.x>=r&&f.x<=a&&f.y>=i&&f.y<=l,c=[],u=[],h=()=>{u.length>=2&&c.push(u),u=[];};for(let f=0;f+1<n.length;f++){let d=n[f],p=n[f+1],m=s(d),b=s(p);if(m&&b){u.length||u.push(d),u.push(p);continue}let y=Oh(d,p,r,i,a,l);if(!y){h();continue}u.length||u.push(y[0]),u.push(y[1]),b||h();}return h(),c}function Oh(n,e,t,o,r,i){let a=e.x-n.x,l=e.y-n.y,s=0,c=1,u=[[-a,n.x-t],[a,r-n.x],[-l,n.y-o],[l,i-n.y]];for(let[h,f]of u){if(h===0){if(f<0)return null;continue}let d=f/h;if(h<0){if(d>c)return null;d>s&&(s=d);}else {if(d<s)return null;d<c&&(c=d);}}return [{x:n.x+a*s,y:n.y+l*s},{x:n.x+a*c,y:n.y+l*c}]}var Wh=[0,.25,-0.25,.5,-0.5,.75,-0.75,1,-1];function si(n,e,t,o={}){if(n.length<2||!e.length||t<=0)return [];let r=Kh(n),i=r[r.length-1];if(i<t)return [];let a=o.maxAngle??25,l=o.stableScale&&o.stableScale>0?o.stableScale:1,s=i*l,c=o.fontSize?o.fontSize*.6:t/e.length,u=(o.fontSize??0)*.85,h=[],f=o.spacing??250,d=f>0&&f-t<f*.25?t+f*.25:f;if(o.accept)return Vh(n,r,e,t,d,c,a,u,o.accept);if(d>0&&s>=t+d){let m=Math.min(Math.floor((s-t)/d)+1,24),b=t+d*(m-1),y=(s-b)/2;for(let g=0;g<m;g++,y+=d){let A=y/l,B=li(n,r,e,t,A,c,a,u);B&&h.push({glyphs:B,path:B.map(w=>({x:w.x,y:w.y})),at:A});}if(h.length)return h}let p=(i-t)/2;for(let m of Wh){let b=p+p*m,y=li(n,r,e,t,b,c,a,u);if(y)return [{glyphs:y,path:y.map(g=>({x:g.x,y:g.y})),at:b}];if(p===0)break}return []}function Vh(n,e,t,o,r,i,a,l,s){let c=e[e.length-1],u=Math.max(o/3,r/8,12),h=[],f=-1/0;for(let d=0;d+o<=c;d+=u){if(d-f<r)continue;let p=li(n,e,t,o,d,i,a,l);if(!p)continue;let m={glyphs:p,path:p.map(b=>({x:b.x,y:b.y})),at:d};if(s(m)&&(h.push(m),f=d,h.length>=24))break}return h}function li(n,e,t,o,r,i,a,l){if(r<0||r+o>e[e.length-1]||!zh(n,e,r,r+o,i,a))return null;let s=Eo(n,e,r),c=Eo(n,e,r+o);if(!s||!c)return null;if(c.x>=s.x)return xs(n,e,t,r,l);let u=e[e.length-1];return xs([...n].reverse(),Uh(e),t,u-(r+o),l)}function zh(n,e,t,o,r,i){if(r<=0)return true;let a=[],l=0;for(let s=1;s+1<n.length;s++){let c=e[s];if(c<=t)continue;if(c>=o)break;let u=Math.atan2(n[s].y-n[s-1].y,n[s].x-n[s-1].x),h=Math.atan2(n[s+1].y-n[s].y,n[s+1].x-n[s].x),f=Math.abs((h-u)*180/Math.PI+540)%360-180,d=Math.abs(f);for(a.push({at:c,delta:d}),l+=d;a.length&&c-a[0].at>r;)l-=a.shift().delta;if(l>i)return false}return true}function xs(n,e,t,o,r){let i=[];for(let c of t){let u=ws(n,e,o+c.offset,c.width);if(!u)return null;i.push(u);}if(!i.length)return null;if(r<=0)return i;let a=[],l=o,s=0;for(let c=0;c<t.length;c++){if(c>0){let h=Math.abs(Nh(i[c].angle,i[c-1].angle))*(Math.PI/180);s+=r*2*Math.tan(Math.min(h,Math.PI/3)/2);}l=o+t[c].offset+s;let u=ws(n,e,l,t[c].width);if(!u)return null;a.push(u);}return a}function ws(n,e,t,o){let r=Eo(n,e,t+o/2);if(!r)return null;let i=Eo(n,e,t),a=Eo(n,e,t+o);if(!i||!a)return r;let l=a.x-i.x,s=a.y-i.y;return l===0&&s===0?r:{x:r.x,y:r.y,angle:Math.atan2(s,l)*180/Math.PI}}function Nh(n,e){let t=n-e;for(;t>180;)t-=360;for(;t<=-180;)t+=360;return t}function Kh(n){let e=new Array(n.length);e[0]=0;for(let t=1;t<n.length;t++)e[t]=e[t-1]+Math.hypot(n[t].x-n[t-1].x,n[t].y-n[t-1].y);return e}function Uh(n){let e=n[n.length-1];return n.map(t=>e-t).reverse()}function Eo(n,e,t){if(t<0||t>e[e.length-1])return null;let o=1;for(;o<e.length-1&&e[o]<t;)o++;let r=e[o]-e[o-1];if(r<=0)return null;let i=(t-e[o-1])/r,a=n[o-1],l=n[o],s=l.x-a.x,c=l.y-a.y;return {x:a.x+s*i,y:a.y+c*i,angle:Math.atan2(c,s)*180/Math.PI}}var fi=20,_s={stride:fi,attribs:[{name:"a_pos",size:2,type:5126,offset:0},{name:"a_tex",size:2,type:5123,offset:8},{name:"a_scale",size:1,type:5126,offset:12},{name:"a_fade",size:1,type:5126,offset:16}]},Jh=220,nt=64,Es=2,Xh=1.22,jh=128,Yh=.7;function Zh(n,e,t){let o=n.layout?.letterSpacing;if(o!==void 0)return W(o,e,0)*Ye;let r=W(n.paint?.haloWidth,e,0);return r<=0||t<=0?0:r*Yh/(t/Ye)}var Qh=256,qh=200,ci="frame-circle",Gt=class n{constructor(e,t){this.shader=null;this.locations=new G;this.atlas=new vo(1024);this.vbo=null;this.ibo=null;this.vao=null;this.capacityQuads=0;this.onAssetsReady=null;this.pendingText=new Set;this.pendingIcons=new Set;this.highlightFootprint=null;this.placedCount=0;this.placed=[];this.hoverKey=null;this.hiddenKey=null;this.padding={top:0,right:0,bottom:0,left:0};this.viewport={width:0,height:0};this.stickyKeys=new Set;this.now=0;this.shownAt=new G;this.fading=false;this.styleOrder=new G;this.glyphs=new xo(e,t),this.icons=new _o(bt);}init(e){this.shader=new ye(e,"symbol",Jl,Xl);for(let t of _s.attribs)this.locations.set(t.name,this.shader.attribLocation(t.name));}static keyOf(e){return `${e.layerId}|${e.mercX.toFixed(9)}|${e.mercY.toFixed(9)}`}setHover(e){return this.hoverKey===e?false:(this.hoverKey=e,true)}setHidden(e){return this.hiddenKey===e?false:(this.hiddenKey=e,true)}querySymbol(e,t=2){let o=null;for(let r of this.placed)e.x<r.box.x1-t||e.x>r.box.x2+t||e.y<r.box.y1-t||e.y>r.box.y2+t||(!o||r.order>=o.order)&&(o=r);return o}fadeOf(e,t){let o=this.shownAt.get(e);if(o===void 0)return this.shownAt.set(e,t),this.fading=true,0;let r=(t-o)/Jh;return r<1?(this.fading=true,r):1}order(e){let t=o=>o.priority+(this.stickyKeys.has(n.keyOf({layerId:o.layer.id,mercX:o.mercX,mercY:o.mercY}))?qh:0);e.sort((o,r)=>t(r)-t(o));}rememberPlaced(){this.stickyKeys=new Set(this.placed.map(e=>n.keyOf(e)));for(let e of [...this.shownAt.keys()])this.stickyKeys.has(e)||this.shownAt.delete(e);}render(e,t,o,r){let i=this.shader;if(this.placedCount=0,this.placed=[],this.viewport={width:t.width,height:t.height},!i)return;let a=t.zoom,l=r.layers.filter(d=>d.type==="symbol"&&r.layerVisibleAt(d,a));if(!l.length)return;let s=this.collect(t,o,r,l);if(!s.length)return;this.now=performance.now(),this.fading=false,this.order(s);let c=new G,u=new G,h=new G;l.forEach((d,p)=>h.set(d.id,p));let f=0;for(let d of s){let p=this.place(d,a,c);if(!p)continue;this.placed.push({layerId:d.layer.id,text:d.text,icon:d.icon,mercX:d.mercX,mercY:d.mercY,box:p.box,order:h.get(d.layer.id)??0});let m=u.get(d.layer.id);m||u.set(d.layer.id,m={layer:d.layer,verts:[],texs:[],iconVerts:[],iconTexs:[],frameVerts:[],frameTexs:[]}),m.verts.push(...p.verts),m.texs.push(...p.texs),m.iconVerts.push(...p.iconVerts),m.iconTexs.push(...p.iconTexs),m.frameVerts.push(...p.frameVerts),m.frameTexs.push(...p.frameTexs),f+=p.quads,this.placedCount++;}this.rememberPlaced(),this.fading&&this.onAssetsReady?.(),this.requestMissing(),f&&(this.styleOrder=h,this.draw(e,t,u,f,a));}collect(e,t,o,r){let i=[],l=this.padding,s=Tt(e,o).far,[c,u,h]=e.cameraPositionPx;for(let f of r){let d=(f.layout?.priority??0)*Qh,p=t.get(f.source??Y);if(!p)continue;let m=f.layout?.showFor==="highlight",b=f.layout?.placement==="map",{shift:y,drop:g}=b?Ss(f,e.zoom,e.pixelsPerMeter):{shift:0,drop:0};if(m&&!this.highlightFootprint)continue;let A=e.worldSize>0?e.pixelsPerMeter/e.worldSize*1.5:0,B=o.bucketKeyFor(f);if(B!==null)for(let w of p.visibleTiles){if(!o.layerVisibleAt(f,e.detailZoom(e.distanceToTile(w))))continue;let _=p.getTile(w)?.data?.buckets?.[B];if(!_||!dr(_))continue;let C=new Int16Array(_.anchors),v=new Uint8Array(_.priorities),E=_.rotations?new Int16Array(_.rotations):null,M=_.lines?new Int16Array(_.lines):null,F=_.lineStarts?new Uint32Array(_.lineStarts):null,H=w.bounds(),S=e.worldSize,L=(H.maxX-H.minX)*S/_.extent,D=H.minX*S,T=H.minY*S;for(let k=0;k<v.length;k++){let P=D+C[k*2]*L,R=T+C[k*2+1]*L;if(s!==1/0&&Math.hypot(P-c,R-u,h)>s||m&&!Xe(this.highlightFootprint,P/S,R/S,A))continue;let K=P,V=R;if(b&&E){let Z=E[k]*Math.PI/180,oe=y;K-=Math.sin(Z)*oe,V+=Math.cos(Z)*oe;}let O=e.worldPxToPoint(K,V),z=M&&F?$h(e,M,F,k,D,T,L):void 0;if(f.layout?.textPlacement==="line"){if(!z)continue}else if(!O||O.x<l.left-64||O.y<l.top-64||O.x>e.width-l.right+64||O.y>e.height-l.bottom+64)continue;i.push({layer:f,screenX:O?O.x:z[0].x,screenY:(O?O.y:z[0].y)+g,text:_.texts[k]??"",icon:_.icons[k]??"",priority:v[k]+d,rotate:Is(f,E,k,e.bearing),mercX:P/S,mercY:R/S,line:z});}}}return i}place(e,t,o){let r=e.layer.layout??{},i=n.keyOf({layerId:e.layer.id,mercX:e.mercX,mercY:e.mercY});if(this.hiddenKey!==null&&this.hiddenKey===i)return null;let a=this.fadeOf(i,this.now),l=this.hoverKey!==null&&this.hoverKey===i,s=W(r.textSize,t,13),c=W(r.iconSize,t,16),u=r.iconTextGap??5,[h,f]=r.offset??[0,0],d=r.placement==="map",p=null;if(e.icon&&!d){this.icons.isDefined(e.icon)||(e.icon="dot");let q=`icon:${e.icon}`,J=this.atlas.get(q);if(!J){let X=this.icons.get(e.icon);X?J=this.atlas.add(q,X.data,X.width,X.height)??void 0:this.pendingIcons.add(e.icon);}J&&(p=J);}let m=null;if(p&&r.iconFrame==="circle"){let q=`icon:${ci}`,J=this.atlas.get(q);if(!J){let X=this.icons.get(ci);X?J=this.atlas.add(q,X.data,X.width,X.height)??void 0:this.pendingIcons.add(ci);}J&&(m=J);}let b=m?Math.max(r.iconFrameScale??1.6,1):1,y=null;if(e.text&&(this.glyphs.needsLoad(e.text)&&this.pendingText.add(e.text),y=ii(e.text,this.glyphs,r.textPlacement==="line"?Number.MAX_SAFE_INTEGER:r.maxLineChars??15,Zh(e.layer,t,s)),!y&&!p)||!y&&!p)return null;let g=s/Ye,A=y?y.width*g:0,B=y?y.height*g:0;if(e.layer.layout?.textPlacement==="line")return y&&e.line?this.placeOnLine(e,y,g,B,o,t,a):null;let w=r.iconPlacement??"top",x=w==="behind"&&!!p&&!!y,_=w==="top"&&!!p&&!!y,C=p?p.width/Math.max(p.height,1):1,v=x?B+u*2:c,E=p?v*C:0,M=Math.max(E,p?c*b:0),F=Math.max(v,p?c*b:0),H=x?Math.max(E,A+u*2):_?Math.max(M,A):M+(p&&y?u:0)+A,S=x?Math.max(v,B):_?F+u+B:Math.max(p?F:0,B),L=e.screenX+h,D=e.screenY+f,T=Es+(r.collisionPadding??0),k={x1:L-H/2-T,y1:D-S/2-T,x2:L+H/2+T,y2:D+S/2+T},P=this.padding;if(k.x1<P.left||k.y1<P.top||k.x2>this.viewport.width-P.right||k.y2>this.viewport.height-P.bottom)return null;if(!r.allowOverlap){if(Ds(o,k))return null;Ms(o,k);}let R=[],K=[],V=[],O=[],z=[],j=[],Z=0,oe=L-H/2,de=_?(F+u)/2:0,ee=1/0,U=1/0,pe=-1/0,le=-1/0;if(y){let q=_||x?L:oe+(p?M+u:0)+A/2;for(let J of y.glyphs){let X=J.glyph,ge=`g:${X.id}`,se=this.atlas.get(ge);if(!se&&(!X.bitmap||(se=this.atlas.add(ge,X.bitmap,X.width+Ce*2,X.height+Ce*2)??void 0,!se)))continue;let Ae=q+(J.x+X.left-Ce)*g,ae=D+de+(J.y-X.top-Ce)*g,xe=se.width*g,Te=se.height*g;wr(R,K,Ae,ae,xe,Te,se,0,a),Z++;let we=Ce*g;ee=Math.min(ee,Ae+we),U=Math.min(U,ae+we),pe=Math.max(pe,Ae+xe-we),le=Math.max(le,ae+Te-we);}if(_&&p&&U<1/0){let J=D-S/2+F+u-U;if(J!==0){for(let X=1;X<R.length;X+=4)R[X]+=J;U+=J,le+=J;}}}if(p){let q=l?Xh:1,J=E*q,X=v*q,ge=(_?L-E/2:oe+(M-E)/2)-(J-E)/2,se=(_?D-S/2+(F-v)/2:D-v/2)-(X-v)/2;if(m){let ae=c*b*q,xe=ge+J/2-ae/2,Te=se+X/2-ae/2,we=Ce/Math.max(m.height-Ce*2,1)*ae;wr(z,j,xe-we,Te-we,ae+we*2,ae+we*2,m,0,a),Z++;}if(x&&pe>ee){let ae=u*1.6,xe=u;J=(pe-ee+ae*2)*q,X=(le-U+xe*2)*q,ge=ee-ae,se=U-xe;}let Ae=Ce/Math.max(p.height-Ce*2,1)*X;wr(V,O,ge-Ae,se-Ae,J+Ae*2,X+Ae*2,p,e.rotate,a),Z++;}return Z?{verts:R,texs:K,iconVerts:V,iconTexs:O,frameVerts:z,frameTexs:j,quads:Z,box:k}:null}placeOnLine(e,t,o,r,i,a,l){let s=e.line,c=t.glyphs.map(E=>({offset:(E.x+t.width/2)*o,width:Math.max(E.glyph.advance,1)*o})),u=c.length?c[c.length-1].offset+c[c.length-1].width:0,h=e.layer.layout??{},f=[],d=[],p=[],m=0,b=r/2+Es,y=this.padding,g=E=>{let M=E.path.map(F=>({x1:F.x-b,y1:F.y-b,x2:F.x+b,y2:F.y+b}));for(let F of M)if(F.x1<y.left||F.y1<y.top||F.x2>this.viewport.width-y.right||F.y2>this.viewport.height-y.bottom||!h.allowOverlap&&Ds(i,F))return false;if(!h.allowOverlap)for(let F of M)Ms(i,F);return p.push(...M),true},A=-1/0,B=1/0;for(let E of t.glyphs)E.glyph.height<=0||(A=Math.max(A,E.glyph.top),B=Math.min(B,E.glyph.top-E.glyph.height));let w=Number.isFinite(A)?(A+B)/2*o:0,_=ai(s,this.viewport.width,this.viewport.height,jh).flatMap(E=>si(E,c,u,{spacing:h.symbolSpacing,fontSize:Ye*o,stableScale:Math.pow(2,Math.round(a)-a),accept:g}));if(!_.length)return null;for(let E of _)for(let M=0;M<t.glyphs.length;M++){let F=t.glyphs[M].glyph,H=E.glyphs[M],S=`g:${F.id}`,L=this.atlas.get(S);if(!L&&(!F.bitmap||(L=this.atlas.add(S,F.bitmap,F.width+Ce*2,F.height+Ce*2)??void 0,!L)))continue;let D=L.width*o,T=L.height*o,k=(F.height/2-F.top)*o+w,P=H.angle*Math.PI/180;wr(f,d,H.x-D/2-Math.sin(P)*k,H.y-T/2+Math.cos(P)*k,D,T,L,H.angle,l),m++;}if(!m)return null;let C=p.map(E=>(E.x1+E.x2)/2),v=p.map(E=>(E.y1+E.y2)/2);return {verts:f,texs:d,iconVerts:[],iconTexs:[],frameVerts:[],frameTexs:[],quads:m,box:{x1:Math.min(...C)-b,y1:Math.min(...v)-b,x2:Math.max(...C)+b,y2:Math.max(...v)+b}}}inStyleOrder(e){return [...e.values()].sort((t,o)=>(this.styleOrder.get(t.layer.id)??0)-(this.styleOrder.get(o.layer.id)??0))}draw(e,t,o,r,i){let a=this.shader,l=e.gl;this.ensureBuffers(e,r);let s=this.vbo,c=this.vao;if(!s||!c||!this.ibo)return;let u=new ArrayBuffer(r*4*fi),h=new Float32Array(u),f=new Uint16Array(u),d=[],p=0,m=(b,y,g,A)=>{let B=b.length/16;if(B){d.push({layer:g,role:A,first:p/4*6,count:B*6});for(let w=0;w<B*4;w++){let x=p*5;h[x]=b[w*4],h[x+1]=b[w*4+1],f[x*2+4]=y[w*2],f[x*2+5]=y[w*2+1],h[x+3]=b[w*4+2],h[x+4]=b[w*4+3],p++;}}};for(let b of this.inStyleOrder(o))m(b.frameVerts,b.frameTexs,b.layer,"frame"),m(b.iconVerts,b.iconTexs,b.layer,"icon"),m(b.verts,b.texs,b.layer,"text");s.update(new Uint8Array(u)),a.use(),this.atlas.bind(e,0),a.setInt("u_atlas",0),a.setVec2("u_viewport",t.width,t.height),a.setFloat("u_atlas_size",this.atlas.size),a.setFloat("u_edge",ri),a.setFloat("u_dpr",t.width>0?l.drawingBufferWidth/t.width:1),e.setDepthTest(false),e.setDepthMask(false),e.setBlend("premultiplied"),e.setCull("none"),c.bind();for(let b of d){let y=b.layer.paint,g=W(y.opacity,i,1),A=b.role==="icon",B=b.role==="frame",w=(M,F,H)=>B?F??M??H:A?M??H:H,x=ke(B?y.frameColor??y.haloColor??y.color:w(y.iconColor,void 0,y.color),i,[.15,.15,.15,1]),_=B?y.frameHaloColor:w(y.iconHaloColor,void 0,y.haloColor),C=ke(_??(B?y.iconColor??y.color:y.haloColor),i,[1,1,1,1]);B&&y.frameHaloColor===void 0&&(C[3]*=.35),B&&(x[3]*=W(y.frameOpacity,i,1));let v=W(B?y.frameHaloWidth??1.1:w(y.iconHaloWidth,void 0,y.haloWidth),i,1.2),E=W(b.layer.layout?.textSize,i,13);a.setVec4v("u_color",De([x[0],x[1],x[2],x[3]*g])),a.setVec4v("u_halo_color",De([C[0],C[1],C[2],C[3]*g])),a.setFloat("u_halo",v/(wo*(E/Ye))),l.drawElements(l.TRIANGLES,b.count,l.UNSIGNED_INT,b.first*4);}e.bindVAO(null);}ensureBuffers(e,t){if(this.vao&&t<=this.capacityQuads)return;this.vao?.destroy(),this.vbo?.destroy(),this.ibo?.destroy(),this.capacityQuads=Math.max(1024,Math.ceil(t*1.5)),this.vbo=new ve(e,new Uint8Array(this.capacityQuads*4*fi),_s,true);let o=new Uint32Array(this.capacityQuads*6);for(let r=0;r<this.capacityQuads;r++){let i=r*4;o.set([i,i+1,i+2,i,i+2,i+3],r*6);}this.ibo=new be(e,o),this.vao=new fe(e,[{buffer:this.vbo,locations:this.locations}],this.ibo);}requestMissing(){if(this.pendingText.size){let e=[...this.pendingText].join("");this.pendingText.clear(),this.glyphs.ensure(e).then(t=>{t&&this.onAssetsReady?.();});}if(this.pendingIcons.size){let e=[...this.pendingIcons];this.pendingIcons.clear(),Promise.all(e.map(t=>this.icons.ensure(t))).then(t=>{t.some(Boolean)&&this.onAssetsReady?.();});}}destroy(e){this.shader?.destroy(),this.vao?.destroy(),this.vbo?.destroy(),this.ibo?.destroy(),this.atlas.destroy(e),this.shader=null,this.vao=null;}};function wr(n,e,t,o,r,i,a,l=0,s=1){let c=i/Math.max(a.height,1);if(l){let u=l*Math.PI/180,h=Math.cos(u),f=Math.sin(u),d=t+r/2,p=o+i/2;for(let[m,b]of [[t,o],[t+r,o],[t+r,o+i],[t,o+i]]){let y=m-d,g=b-p;n.push(d+y*h-g*f,p+y*f+g*h,c,s);}}else n.push(t,o,c,s,t+r,o,c,s,t+r,o+i,c,s,t,o+i,c,s);e.push(a.x,a.y,a.x+a.width,a.y,a.x+a.width,a.y+a.height,a.x,a.y+a.height);}function $h(n,e,t,o,r,i,a){if(o+1>=t.length)return;let l=t[o],s=t[o+1],c=[];for(let u=l;u<s;u++){let h=n.worldPxToPoint(r+e[u*2]*a,i+e[u*2+1]*a);if(!h)break;c.push(h);}return c.length>=2?c:void 0}var Fs=(n,e)=>n*4096+e;function Ds(n,e){let t=Math.floor(e.x1/nt),o=Math.floor(e.y1/nt),r=Math.floor(e.x2/nt),i=Math.floor(e.y2/nt);for(let a=t;a<=r;a++)for(let l=o;l<=i;l++){let s=n.get(Fs(a,l));if(s){for(let c of s)if(e.x1<c.x2&&e.x2>c.x1&&e.y1<c.y2&&e.y2>c.y1)return true}}return false}function Ms(n,e){let t=Math.floor(e.x1/nt),o=Math.floor(e.y1/nt),r=Math.floor(e.x2/nt),i=Math.floor(e.y2/nt);for(let a=t;a<=r;a++)for(let l=o;l<=i;l++){let s=Fs(a,l),c=n.get(s);c||n.set(s,c=[]),c.push(e);}}function Ss(n,e,t){let r=n.layout?.arrowUnits!=="meters"?1:t,i=W(n.layout?.arrowLength,e,50)*r;return {shift:W(n.layout?.arrowGap,e,20)*r+i/2,drop:i/2+(n.layout?.iconTextGap??4)}}function Is(n,e,t,o){return !n.layout?.iconRotate||!e?0:e[t]-o}var Ot=class{constructor(e,t){this.capacity=e;this.onEvict=t;this.map=new G;}get size(){return this.map.size}has(e){return this.map.has(e)}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}peek(e){return this.map.get(e)}set(e,t){let o=this.map.get(e);o!==void 0&&(this.map.delete(e),o!==t&&this.onEvict?.(e,o)),this.map.set(e,t),this.trim();}delete(e){let t=this.map.get(e);return t===void 0?false:(this.map.delete(e),this.onEvict?.(e,t),true)}setCapacity(e){this.capacity=e,this.trim();}keys(){return this.map.keys()}values(){return this.map.values()}entries(){return this.map.entries()}clear(){for(let[e,t]of this.map)this.onEvict?.(e,t);this.map.clear();}trim(){for(;this.map.size>this.capacity;){let e=this.map.keys().next();if(e.done)break;let t=e.value,o=this.map.get(t);this.map.delete(t),this.onEvict?.(t,o);}}};var Wt=class n{constructor(e,t,o,r=0){this.z=e;this.x=t;this.y=o;this.wrap=r;this.dataKey=`${e}/${t}/${o}`,this.key=r===0?this.dataKey:`${this.dataKey}@${r}`;}parent(){return this.z===0?null:new n(this.z-1,this.x>>1,this.y>>1,this.wrap)}children(){let e=this.z+1,t=this.x*2,o=this.y*2;return [new n(e,t,o,this.wrap),new n(e,t+1,o,this.wrap),new n(e,t,o+1,this.wrap),new n(e,t+1,o+1,this.wrap)]}scaledTo(e){if(e>=this.z)return this;let t=this.z-e;return new n(e,this.x>>t,this.y>>t,this.wrap)}isAncestorOf(e){if(e.z<=this.z||e.wrap!==this.wrap)return false;let t=e.z-this.z;return e.x>>t===this.x&&e.y>>t===this.y}bounds(){let t=1/Math.pow(2,this.z);return {minX:this.x*t+this.wrap,minY:this.y*t,maxX:(this.x+1)*t+this.wrap,maxY:(this.y+1)*t}}toString(){return this.key}};function ed(n,e,t){let o=Math.pow(2,t),r=e.maxTiles??512,i=[],a=128;for(let l=0;l<o;l++)for(let s=0;s<o;s++){let c=new Wt(t,s,l),u=c.bounds(),h=(u.minX+u.maxX)/2,f=(u.minY+u.maxY)/2,d=[[h,f],[u.minX,u.minY],[u.maxX,u.minY],[u.minX,u.maxY],[u.maxX,u.maxY]],p=false;for(let[b,y]of d)if(n.isOnGlobeFront(Se(b),Me(y))){p=true;break}if(!p)continue;let m=false;for(let[b,y]of d){let g=n.localToPoint(n.globeLocal(b,y));if(g&&g.x>-a&&g.y>-a&&g.x<n.width+a&&g.y<n.height+a){m=true;break}}if(m&&(i.push(c),i.length>=r))return i}return i}function Do(n,e){let t=Math.min(e.maxzoom,24),o=Math.max(0,Math.min(e.minzoom,t)),r=e.detailBias??1,i=e.maxTiles??512,a=512*r,l=Math.min(Math.round(n.zoom),t);if(l<o)return [];if(n.globeActive)return ed(n,e,l);let{min:s,max:c}=n.visibleWrapRange(),u=[],h=[];for(let d=s;d<=c;d++)h.push(new Wt(0,0,0,d));let f=0;for(;h.length&&!(++f>2e4||u.length>=i);){let d=h.pop();if(!n.isTileVisible(d))continue;if(d.z>=l){d.z>=o&&u.push(d);continue}if(n.tileScreenSize(d.z,n.distanceToTile(d))<=a&&d.z>=o){u.push(d);continue}for(let m of d.children())h.push(m);}return u.sort((d,p)=>n.distanceToTile(d)-n.distanceToTile(p)),u}var ui=class{constructor(e){this.id=e;this.state="loading";this.data=null;this.error=null;this.requestId=0;this.buckets=new G;}get hasGeometry(){return this.state==="loaded"&&!!this.data&&Object.keys(this.data.buckets).length>0}destroy(){for(let e of this.buckets.values())e.destroy();this.buckets.clear(),this.data=null;}},td=1500,_r=class extends Ze{constructor(t,o){super();this.pool=t;this.visible=[];this.holdSince=0;this.warmed=false;this.version=0;this.opts={cacheSize:160,detailBias:1,maxTiles:512,...o},this.cache=new Ot(this.opts.cacheSize,(r,i)=>{i.state==="loading"&&this.pool.abort(i.requestId),i.destroy();});}get visibleTiles(){return this.visible}get dataVersion(){return this.version+this.visible.length*1e6}get warm(){return this.warmed}getTile(t){return this.cache.peek(t.dataKey)}splitValues(t){let o=[];for(let r of this.visible){let i=this.getTile(r)?.data?.splits?.[t];if(i)for(let a of i)o.includes(a)||o.push(a);}return o.sort((r,i)=>typeof r=="number"&&typeof i=="number"?r-i:String(r).localeCompare(String(i))),o}get pendingCount(){let t=0;for(let o of this.cache.values())o.state==="loading"&&t++;return t}update(t){let o=Do(t,this.opts),r=new te;for(let s of o)r.add(s.dataKey);for(let[s,c]of this.cache.entries())c.state==="loading"&&!r.has(s)&&(this.pool.abort(c.requestId),this.cache.delete(s));let i=Math.max(this.opts.cacheSize,r.size*2);this.cache.setCapacity(i);for(let s of o)this.cache.get(s.dataKey)||this.loadTile(s);let a=this.visible.length>0&&this.covers(o),l=performance.now();this.readyFor(o)||!a||this.holdSince&&l-this.holdSince>td?(this.visible=o,this.holdSince=0,this.readyFor(o)&&o.length&&(this.warmed=true)):this.holdSince||(this.holdSince=l);}readyFor(t){for(let o of t){let r=this.cache.peek(o.dataKey);if(!r||r.state==="loading")return false}return true}covers(t){let o=new te;for(let r of this.visible)o.add(r.dataKey);for(let r of t){if(o.has(r.dataKey))continue;let i=r.parent(),a=false;for(let l=0;i&&l<4;l++){if(o.has(i.dataKey)){a=true;break}i=i.parent();}if(!a)for(let l of this.visible){let s=l.parent();for(let c=0;s&&c<4;c++){if(s.dataKey===r.dataKey){a=true;break}s=s.parent();}if(a)break}if(!a)return false}return true}loadTile(t){let o=new ui(t);this.cache.set(t.dataKey,o);let r=od(this.opts.url.replace("{z}",String(t.z)).replace("{x}",String(t.x)).replace("{y}",String(t.y)));o.requestId=this.pool.load({url:r,zoom:t.z,metersPerTile:Pi(t.z,t.y),sourceMaxZoom:this.opts.maxzoom,plan:this.opts.plan},i=>{if(this.cache.peek(t.dataKey)===o){if(i.type==="error"){if(i.aborted)return;o.state="error",o.error=i.message,this.emit("error",{tile:t,message:i.message});}else o.data=i,o.state=Object.keys(i.buckets).length?"loaded":"empty",this.version++,i.diag?.failed?.length&&console.warn(`[osmgl] \u0442\u0430\u0439\u043B ${t.z}/${t.x}/${t.y}: \u0441\u043B\u043E\u0438 \u043D\u0435 \u0441\u043E\u0431\u0440\u0430\u043B\u0438\u0441\u044C \u2014 ${i.diag.failed.join("; ")}`),this.emit("data",{tile:o});this.pendingCount===0&&this.emit("idle",void 0);}});}findReadyAncestor(t,o=5){let r=t.parent();for(let i=0;r&&i<o;i++){let a=this.cache.peek(r.dataKey);if(a&&a.hasGeometry)return a;r=r.parent();}return null}setCoverOptions(t){t.detailBias!==void 0&&(this.opts.detailBias=t.detailBias),t.maxTiles!==void 0&&(this.opts.maxTiles=t.maxTiles);}setPlan(t){this.opts.plan=t,this.cache.clear();}reload(){this.cache.clear();}destroy(){this.cache.clear(),this.removeAllListeners();}};function od(n){if(typeof location>"u")return n;try{return new URL(n,location.href).href}catch{return n}}var Er=class{constructor(e){this.id=e;this.state="loading";this.image=null;this.error=null;this.texture=null;}destroy(){this.texture?.destroy(),this.texture=null,this.image?.close(),this.image=null;}},Mo=class extends Ze{constructor(t){super();this.visible=[];this.aborts=new Map;this.opts={cacheSize:128,detailBias:1,maxTiles:256,...t},this.cache=new Ot(this.opts.cacheSize,(o,r)=>{this.aborts.get(o)?.abort(),this.aborts.delete(o),r.destroy();});}get visibleTiles(){return this.visible}getTile(t){return this.cache.peek(t.dataKey)}update(t){this.visible=Do(t,this.opts);let o=new te;for(let r of this.visible)o.add(r.dataKey);for(let[r,i]of this.cache.entries())i.state==="loading"&&!o.has(r)&&(this.aborts.get(r)?.abort(),this.aborts.delete(r),this.cache.delete(r));this.cache.setCapacity(Math.max(this.opts.cacheSize,o.size*2));for(let r of this.visible)this.cache.get(r.dataKey)||this.loadTile(r);}reload(){for(let t of this.aborts.values())t.abort();this.aborts.clear(),this.cache.clear();}destroy(){this.reload(),this.removeAllListeners();}loadTile(t){let o=new Er(t);this.cache.set(t.dataKey,o);let r=new AbortController;this.aborts.set(t.dataKey,r),this.fetchImage(Ls(this.opts.url,t),r.signal).then(i=>{if(this.aborts.delete(t.dataKey),this.cache.peek(t.dataKey)!==o){i.close();return}o.image=i,o.state="loaded",this.emit("data",{tile:o});}).catch(i=>{this.aborts.delete(t.dataKey),!r.signal.aborted&&this.cache.peek(t.dataKey)===o&&(o.state="error",o.error=i instanceof Error?i.message:String(i),this.emit("error",{tile:t,message:o.error}));});}async fetchImage(t,o){let r=await fetch(t,{signal:o});if(!r.ok)throw new Error(`\u0442\u0430\u0439\u043B \u043F\u043E\u0434\u043B\u043E\u0436\u043A\u0438 ${r.status} ${r.statusText}`);return createImageBitmap(await r.blob())}};function Ls(n,e){let t=n.replace("{z}",String(e.z)).replace("{x}",String(e.x)).replace("{y}",String(e.y));if(typeof location>"u")return t;try{return new URL(t,location.href).href}catch{return t}}var rd="osmgl-assets",Vt="assets";var Dr=null;function Hs(){return Dr||(Dr=new Promise(n=>{if(typeof indexedDB>"u")return n(null);try{let e=indexedDB.open(rd,1);e.onupgradeneeded=()=>{let t=e.result;t.objectStoreNames.contains(Vt)||t.createObjectStore(Vt,{keyPath:"key"});},e.onsuccess=()=>n(e.result),e.onerror=()=>n(null);}catch{n(null);}}),Dr)}function nd(n){return Hs().then(e=>new Promise(t=>{if(!e)return t(null);try{let o=e.transaction(Vt,"readonly").objectStore(Vt).get(n);o.onsuccess=()=>t(o.result??null),o.onerror=()=>t(null);}catch{t(null);}}))}function id(n){Hs().then(e=>{if(e)try{e.transaction(Vt,"readwrite").objectStore(Vt).put(n);}catch{}});}var Ts=n=>{let e=atob(n),t=new Uint8Array(e.length);for(let o=0;o<e.length;o++)t[o]=e.charCodeAt(o);return t};async function ad(n,e,t){let o=await crypto.subtle.importKey("raw",Ts(e),"AES-GCM",false,["decrypt"]);return crypto.subtle.decrypt({name:"AES-GCM",iv:Ts(t),tagLength:128},o,n)}var Fo=class{constructor(e){this.keys=new Map;this.variants=null;this.inflight=new Map;this.endpoint=e.endpoint.replace(/\/+$/,""),this.apiKey=e.apiKey??null;}withKey(e){return this.apiKey?e+(e.includes("?")?"&":"?")+"key="+encodeURIComponent(this.apiKey):e}loadVariants(){return this.variants??(this.variants=fetch(this.withKey(`${this.endpoint}/variants`),{credentials:"same-origin"}).then(e=>e.ok?e.json():{}).catch(()=>({}))),this.variants}async resolve(e,t){return t?(await this.loadVariants())[String(e)]?.[t]??e:e}async load(e,t,o="",r){let i=await this.resolve(e,o),a=`${i}:${t}`,l=this.inflight.get(a);if(l)return l;let s=this.fetchAsset(a,i,t,r).finally(()=>this.inflight.delete(a));return this.inflight.set(a,s),s}async fetchAsset(e,t,o,r){let i,a,l=await nd(e);if(l)i=l.bytes,a=l.encrypted;else {let c=await fetch(this.withKey(`${this.endpoint}/files/${t}/data?lod=${o}`),{signal:r,credentials:"same-origin"});if(!c.ok)throw new Error(`data ${c.status}`);a=(c.headers.get("X-Enc")??"none")!=="none",i=await c.arrayBuffer(),id({key:e,bytes:i,encrypted:a,savedAt:Date.now()});}if(!a)return i;let s=await this.getKey(t,r);if(!s)throw new Error("\u043D\u0435\u0442 \u043A\u043B\u044E\u0447\u0430 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043E\u0432\u043A\u0438");return ad(i,s.key,s.iv)}getKey(e,t){let o=this.keys.get(e);if(o)return o;let r=(async()=>{let i=await fetch(this.withKey(`${this.endpoint}/files/${e}/key`),{signal:t,credentials:"same-origin"});if(!i.ok)return null;let a=await i.json();return a.encrypted&&a.key&&a.iv?{key:a.key,iv:a.iv}:null})();return r.catch(()=>this.keys.delete(e)),this.keys.set(e,r),r}};var ld=1,So=class{constructor(e){this.mesh=null;this.bitmaps=[];this.error=null;this.loading=null;this.matrix=N();this.grow=1;this.growTarget=1;this.animateIn=false;this.shrinkFrom=1;this.growStart=-1;this.fade=1;this.fadeTarget=1;this.fadeFrom=1;this.fadeStart=-1;this.matrix32=new Float32Array(16);this.nodeMatrix32=new Float32Array(16);this.normal32=new Float32Array(9);this.id=e.id??`model-${ld++}`,this.url=e.url,this.fetchBytes=e.fetchBytes,this.coordinates=e.coordinates,this.altitude=e.altitude??0,this.rotation=e.rotation??0,this.rotationTiltX=e.rotationTiltX??0,this.rotationTiltZ=e.rotationTiltZ??0,e.growIn&&(this.animateIn=true,this.grow=0),this.scale=e.scale??1,this.fitHeight=e.fitHeight,this.visible=e.visible!==false,this.userData=e.userData??{};}get isLoaded(){return this.mesh!==null}load(e){return this.loading?(e&&this.loading.then(e),this.loading):(this.loading=(async()=>{try{let t=this.fetchBytes?await this.fetchBytes():await(async()=>{let r=await fetch(this.url);if(!r.ok)throw new Error(`HTTP ${r.status}`);return r.arrayBuffer()})(),o=await jn(t);this.bitmaps=await Promise.all(o.images.map(async r=>{if(!r.length)return null;try{return await createImageBitmap(new Blob([r]))}catch{return null}})),this.mesh=o;}catch(t){this.error=t instanceof Error?t.message:String(t),console.warn(`[osmgl] \u043C\u043E\u0434\u0435\u043B\u044C ${this.url} \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0430\u0441\u044C: ${this.error}`);}e?.();})(),this.loading)}advanceGrow(e){if(!this.mesh)return false;if(!this.animateIn&&this.growTarget===1)return this.grow=1,false;if(e<=0)return this.grow=1,false;let t=performance.now()/1e3;this.growStart<0&&(this.growStart=t);let o=(t-this.growStart)/e;if(this.growTarget===0){if(o>=1)return this.grow=0,false;let i=Math.max(o,0);return this.grow=this.shrinkFrom*(1-i*i*(3-2*i)),true}if(o>=1)return this.grow=1,false;let r=Math.max(o,0)-1;return this.grow=1+r*r*(2.70158*r+1.70158),true}retire(){this.growTarget!==0&&(this.growTarget=0,this.shrinkFrom=this.grow,this.growStart=performance.now()/1e3);}setHidden(e){let t=e?0:1;this.fadeTarget!==t&&(this.fadeTarget=t,this.fadeFrom=this.fade,this.fadeStart=performance.now()/1e3);}advanceFade(e){if(this.fadeStart<0)return false;if(e<=0)return this.fade=this.fadeTarget,this.fadeStart=-1,false;let t=(performance.now()/1e3-this.fadeStart)/e;if(t>=1)return this.fade=this.fadeTarget,this.fadeStart=-1,false;let o=Math.max(t,0),r=o*o*(3-2*o);return this.fade=this.fadeFrom+(this.fadeTarget-this.fadeFrom)*r,true}markGrown(){this.grow=1,this.growTarget=1,this.growStart=-1/0;}revive(){this.growTarget!==1&&(this.growTarget=1,this.growStart=performance.now()/1e3-(this.animateIn?0:1e9));}effectiveScale(){if(!this.mesh||this.fitHeight===void 0)return this.scale;let e=this.mesh.max[1]-this.mesh.min[1];return e>1e-6?this.fitHeight/e:this.scale}boundingRadiusM(){let e=this.mesh;if(!e)return 0;let t=this.effectiveScale(),o=Math.max(Math.abs(e.min[0]),Math.abs(e.max[0])),r=Math.max(Math.abs(e.min[1]),Math.abs(e.max[1])),i=Math.max(Math.abs(e.min[2]),Math.abs(e.max[2]));return Math.hypot(o,r,i)*t}origin(){let e=$(this.coordinates);return {x:re(e.lng),y:ne(e.lat)}}localMatrix(e){let t=this.effectiveScale(),o=t/Ge(e),r=[o,0,0,0,0,t*this.grow,0,o,0],i=c=>c*Math.PI/180,a=di(i(-this.rotation));this.rotationTiltX&&(a=it(hi(i(this.rotationTiltX)),a)),this.rotationTiltZ&&(a=it(pi(i(this.rotationTiltZ)),a));let l=it(r,a),s=this.matrix;return Ke(s),s[0]=l[0],s[1]=l[1],s[2]=l[2],s[4]=l[3],s[5]=l[4],s[6]=l[5],s[8]=l[6],s[9]=l[7],s[10]=l[8],s[15]=1,s}matrixInSpace(e,t){let o=$(this.coordinates),r=N();for(let a=0;a<16;a++)r[a]=e[a];let i=N();return Ee(i,r,this.localMatrix(o.lat)),Ue(t??this.matrix32,i)}cameraInModelSpace(e){let t=this.effectiveScale();if(!(t>0))return [0,0,0];let o=this.origin(),r=$(this.coordinates),i=Ge(r.lat),a=e.worldSize,l=e.cameraPositionPx,s=(l[0]/a-o.x)*i,c=(l[1]/a-o.y)*i,u=l[2]/e.pixelsPerMeter-this.altitude,h=s,f=u,d=c,p=b=>b*Math.PI/180,m=di(p(-this.rotation));return this.rotationTiltX&&(m=it(hi(p(this.rotationTiltX)),m)),this.rotationTiltZ&&(m=it(pi(p(this.rotationTiltZ)),m)),[(m[0]*h+m[1]*f+m[2]*d)/t,(m[3]*h+m[4]*f+m[5]*d)/t,(m[6]*h+m[7]*f+m[8]*d)/t]}matrixFor(e){let t=this.origin();return this.matrixInSpace(e.objectMatrix(t.x,t.y,this.altitude))}coversPoint(e,t){let o=this.mesh;if(!o)return false;let r=this.origin(),i=e-r.x,a=t-r.y,l=$(this.coordinates),s=this.localMatrix(l.lat),c=s[0],u=s[1],h=s[8],f=s[9],d=c*f-u*h;if(Math.abs(d)<1e-30)return false;let p=(i*f-a*h)/d,m=(c*a-u*i)/d,b=1.05,y=(o.min[0]+o.max[0])/2,g=(o.min[2]+o.max[2])/2,A=(o.max[0]-o.min[0])/2*b,B=(o.max[2]-o.min[2])/2*b;return Math.abs(p-y)<=A&&Math.abs(m-g)<=B}get isAnimated(){return this.mesh?.animation!=null}matrixForNode(e,t,o){let r=this.origin();return this.matrixInSpaceForNode(e.objectMatrix(r.x,r.y,this.altitude),t,o,this.nodeMatrix32)}matrixInSpaceForNode(e,t,o,r){let i=this.mesh?.animation;if(!i||!i.nodes.has(t))return this.matrixInSpace(e,r);let a=N();for(let h=0;h<16;h++)a[h]=e[h];let l=$(this.coordinates),s=N();Ee(s,a,this.localMatrix(l.lat));let c=N();Yn(i,t,i.duration>0?o%i.duration:0,c);let u=N();return Ee(u,s,c),Ue(r,u)}normalMatrix(){let e=i=>i*Math.PI/180,t=di(e(-this.rotation));this.rotationTiltX&&(t=it(hi(e(this.rotationTiltX)),t)),this.rotationTiltZ&&(t=it(pi(e(this.rotationTiltZ)),t));let o=it([1,0,0,0,0,1,0,1,0],t),r=this.normal32;for(let i=0;i<9;i++)r[i]=o[i];return r}};function it(n,e){let t=new Array(9);for(let o=0;o<3;o++)for(let r=0;r<3;r++)t[o*3+r]=n[r]*e[o*3]+n[3+r]*e[o*3+1]+n[6+r]*e[o*3+2];return t}var hi=n=>{let e=Math.cos(n),t=Math.sin(n);return [1,0,0,0,e,t,0,-t,e]},di=n=>{let e=Math.cos(n),t=Math.sin(n);return [e,0,-t,0,1,0,t,0,e]},pi=n=>{let e=Math.cos(n),t=Math.sin(n);return [e,t,0,-t,e,0,0,0,1]};var Fr=class{constructor(){this.hit=new G;this.miss=new te;this.stamp="";}find(e,t){if(!t)return null;let o=this.hit.get(e.id);if(o!==void 0)return o;let r=t.source.visibleTiles.map(i=>i.dataKey).join(",");if(r!==this.stamp&&(this.stamp=r,this.miss.clear()),this.miss.has(e.id))return null;for(let i of t.source.visibleTiles){let a=t.source.getTile(i)?.data?.buckets?.[t.key];if(!a||a.kind!=="fill-extrusion"||!a.featureIds)continue;let l=i.bounds();if(e.mercX<l.minX||e.mercX>l.maxX||e.mercY<l.minY||e.mercY>l.maxY)continue;let s=(e.mercX-l.minX)/(l.maxX-l.minX)*a.extent,c=(e.mercY-l.minY)/(l.maxY-l.minY)*a.extent,u=new Int16Array(a.vertices),h=new Uint32Array(a.indices),f=new Float64Array(a.featureIds),d=u.length/a.vertexCount;for(let p=0;p*3+2<h.length;p++){let m=h[p*3]*d,b=h[p*3+1]*d,y=h[p*3+2]*d;if(!pd(s,c,u[m],u[m+1],u[b],u[b+1],u[y],u[y+1]))continue;let g=f[p];return this.hit.set(e.id,g),g}}return this.miss.add(e.id),null}clear(){this.hit.clear(),this.miss.clear(),this.stamp="";}},sd=14,cd=2e3,fd=4e3,Ps=160,ud=50,hd=4e3,mi=6,Sr=class{constructor(e){this.wantKey="";this.modelKey="";this.entries=new G;this.loading=0;this.pending=[];this.known=new G;this.underBuilding=new Fr;this.underVenue=new Fr;this.tilesStamp="";this.rulesInScan=0;this.found=[];this.foundStamp="";this.sortedAt=null;this.budgetScale=1;this.addModel=null;this.lod=0;this.budget=Ps;this.replacedBuildings=new te;this.replacedVenues=new te;this.onReady=null;this.stats={found:0,kept:0,live:0,tooFar:0,overBudget:0,queued:0,rules:0,loadingNow:0,pendingNow:0,replaced:0};this.loader=new Fo(e);}get models(){let e=[];for(let t of this.entries.values())e.push(t.model);return e}update(e,t,o,r,i,a,l){this.wantKey!==this.modelKey&&(this.modelKey=this.wantKey,this.clear(i));let s=e.layout??{},c=s.minZoom??sd,u=s.loadRadius??cd,h=Math.max(s.keepRadius??fd,u),f=Math.min(1,Math.max(.25,(o.zoom-c)/3)),d=Math.max(8,Math.round((s.budget??Ps)*this.budgetScale*f));this.budget=d,this.addModel=r;let p=s.maskReplaced!==false,m=performance.now();if(o.zoom<c){for(let D of [...this.entries.values()])D.model.retire(),D.model.grow<=0&&this.release(D,i);this.replacedBuildings.clear(),this.replacedVenues.clear();return}let b=o.center,y=this.lodFor(o.zoom,c);this.lod=y;let g="";for(let D of t.visibleTiles)g+=D.dataKey+(t.getTile(D)?.data?"+":"-");let A=this.rulesInScan;if(g!==this.tilesStamp){this.tilesStamp=g;let D=new te;A=0;for(let T of t.visibleTiles){let k=t.getTile(T)?.data?.buckets?.[e.id];if(!k||!jl(k))continue;let P=new Int16Array(k.anchors),R=T.bounds(),K=R.maxX-R.minX,V=R.maxY-R.minY;for(let O=0;O<k.props.length;O++){let z=k.props[O],j=yt(z.file,NaN);if(!Number.isFinite(j))continue;let Z=String(z.kind??"model"),oe=Z==="rule"?`t-${z.rid}-${z.oid}`:`m-${z.mid}`;if(D.has(oe))continue;D.add(oe),Z==="rule"&&A++;let de=R.minX+P[O*2]/k.extent*K,ee=R.minY+P[O*2+1]/k.extent*V,U=dd(de,ee);this.known.set(oe,{id:oe,fileId:j,lng:U.lng,lat:U.lat,mercX:de,mercY:ee,altitude:yt(z.alt,0),scale:yt(z.scale,1),rotation:yt(z.rx,0),tiltX:yt(z.rz,0),tiltZ:yt(z.ry,0),kind:Z==="rule"?"rule":"model",target:Mr(Z==="rule"?z.oid:z.replaces),replaces:p?Z==="rule"?Mr(z.oid):String(z.anchor??"replace")==="replace"?Mr(z.replaces):null:null});}}this.rulesInScan=A;}g!==this.foundStamp&&(this.foundStamp=g,this.found=[...this.known.values()],this.sortedAt=null);let B=this.found,w=new te;for(let D of B)D.kind==="model"&&D.target!==null&&w.add(D.target);let x=111320,_=Math.cos(b.lat*Math.PI/180),C=D=>Math.hypot((D.lng-b.lng)*x*_,(D.lat-b.lat)*x);this.replacedBuildings.clear(),this.replacedVenues.clear();let v=new te,E=[],M=0,F=0;(this.sortedAt===null||Math.hypot((b.lng-this.sortedAt.lng)*x*_,(b.lat-this.sortedAt.lat)*x)>ud)&&(B.sort((D,T)=>C(D)-C(T)),this.sortedAt={lng:b.lng,lat:b.lat});let S=0;for(let D of B){let T=C(D);if(T>h){M++;continue}if(D.kind==="rule"&&D.target!==null&&w.has(D.target)){let K=this.entries.get(D.id);K&&K.model.retire();continue}let k=this.entries.get(D.id);if(S>=d){F++,k&&k.model.retire();continue}S++,v.add(D.id);let P=()=>{if(D.replaces===null)return;this.replacedBuildings.add(D.replaces);let K=this.underBuilding.find(D,a);K!==null&&this.replacedBuildings.add(K);let V=this.underVenue.find(D,l);V!==null&&this.replacedVenues.add(V);},R=k;if(R){P(),R.distance=T,R.leftAt=0,R.model.revive(),y<R.lod&&!R.upgrading&&this.loading<mi&&this.upgrade(R,y,r,i);continue}if(T>u){M++;continue}if(this.loading>=mi){E.push(D),P();continue}P(),this.spawn(D,T,y,r);}for(let D of [...this.entries.values()])if(!v.has(D.placement.id)){if(D.leftAt===0){D.leftAt=m;continue}m-D.leftAt>hd&&D.model.retire();}for(let D of [...this.entries.values()])D.model.growTarget===0&&D.model.grow<=0&&this.release(D,i);if(this.known.size>4e3)for(let[D,T]of [...this.known.entries()])C(T)>h*3&&this.known.delete(D);let L=this.stats;L.found=B.length,L.kept=v.size,L.live=this.entries.size,L.tooFar=M,L.overBudget=F,L.queued=E.length,L.rules=A,L.loadingNow=this.loading,L.pendingNow=E.length,L.replaced=this.replacedBuildings.size,this.pending=E;}pump(){let e=this.addModel;if(this.stats.loadingNow=this.loading,this.stats.pendingNow=this.pending.length,!!e)for(;this.pending.length&&this.loading<mi&&this.entries.size<this.budget;){let t=this.pending.shift();this.entries.has(t.id)||this.spawn(t,0,this.lod,e);}}lodFor(e,t){return e>=t+2?0:1}upgrade(e,t,o,r){let i=this.makeModel(e.placement,t,true);e.upgrading=i,this.loading++,i.load(()=>{this.loading--,this.pump(),this.entries.get(e.placement.id)===e&&(e.upgrading=null,i.isLoaded&&(r(e.model),e.model=i,e.lod=t,o(i),this.onReady?.()));});}makeModel(e,t,o){let r=new So({id:`objects3d-${e.id}`,url:`objects3d:${e.fileId}/${this.modelKey}/lod${t}`,fetchBytes:()=>this.loader.load(e.fileId,t,this.modelKey),coordinates:[e.lng,e.lat],altitude:e.altitude,scale:e.scale,rotation:e.rotation,rotationTiltX:e.tiltX,rotationTiltZ:e.tiltZ,growIn:!o});return o&&r.markGrown(),r}spawn(e,t,o,r,i=false){let a=this.makeModel(e,o,i);this.entries.set(e.id,{placement:e,model:a,distance:t,leftAt:0,lod:o,upgrading:null}),this.loading++,r(a),a.load(()=>{this.loading--,this.pump(),this.onReady?.();});}release(e,t){this.entries.delete(e.placement.id),e.upgrading=null,t(e.model);}setModelKey(e){this.wantKey=e??"";}clear(e){for(let t of [...this.entries.values()])this.release(t,e);this.replacedBuildings.clear(),this.replacedVenues.clear(),this.underBuilding.clear(),this.underVenue.clear();for(let t of Object.keys(this.stats))this.stats[t]=0;}},yt=(n,e)=>{let t=typeof n=="number"?n:Number(n);return Number.isFinite(t)?t:e},Mr=n=>{let e=yt(n,NaN);return Number.isFinite(e)?e:null};function dd(n,e){let t=n*360-180,o=Math.PI*(1-2*e),r=Math.atan(Math.sinh(o))*180/Math.PI;return {lng:t,lat:r}}function pd(n,e,t,o,r,i,a,l){let s=(n-r)*(o-i)-(t-r)*(e-i),c=(n-a)*(i-l)-(r-a)*(e-l),u=(n-t)*(l-o)-(a-t)*(e-o),h=s<0||c<0||u<0,f=s>0||c>0||u>0;return !(h&&f)}var md=200,bd={center:"translate(-50%, -50%)",top:"translate(-50%, 0)",bottom:"translate(-50%, -100%)",left:"translate(0, -50%)",right:"translate(-100%, -50%)"},Io=class{constructor(e){this.attachedTo=null;this.culled=false;this._visible=true;this._coordinates=e.coordinates,this.altitude=e.altitude??0,this.offset=e.offset??[0,0],this.anchorTransform=bd[e.anchor??"bottom"],this.userData=e.userData??{};let t=e.element??document.createElement("div");e.element||(t.className="osmgl-marker-default",t.innerHTML=e.html??yd),t.classList.add("osmgl-marker"),e.className&&t.classList.add(e.className),t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.willChange="transform",e.zIndex!==void 0&&(t.style.zIndex=String(e.zIndex)),this.element=t;}get coordinates(){return this._coordinates}setCoordinates(e){return this._coordinates=e,this}setVisible(e){return this._visible=e,this.applyVisibility(),this}get visible(){return this._visible}attach(e){this.attachedTo!==e&&(e.appendChild(this.element),this.attachedTo=e);}detach(){this.element.remove(),this.attachedTo=null;}update(e){let t=$(this._coordinates),o=e.worldSize,r=e.worldPxToPoint(re(t.lng)*o,ne(t.lat)*o,this.altitude);if(!r){this.culled=true,this.applyVisibility();return}let i=md;if(r.x<-i||r.y<-i||r.x>e.width+i||r.y>e.height+i){this.culled=true,this.applyVisibility();return}this.culled=false,this.applyVisibility(),this.element.style.transform=`translate(${Math.round(r.x+this.offset[0])}px, ${Math.round(r.y+this.offset[1])}px) ${this.anchorTransform}`;}applyVisibility(){this.element.style.display=this._visible&&!this.culled?"":"none";}},yd='<svg width="24" height="32" viewBox="0 0 24 32" xmlns="http://www.w3.org/2000/svg"><path d="M12 0C5.4 0 0 5.4 0 12c0 9 12 20 12 20s12-11 12-20c0-6.6-5.4-12-12-12z" fill="#2f6df6"/><circle cx="12" cy="12" r="4.5" fill="#fff"/></svg>';var Lo=class extends Io{constructor(t){let o=document.createElement("div");o.className="osmgl-popup",o.style.pointerEvents="auto";let r=document.createElement("div");if(r.className="osmgl-popup-content",t.element?r.appendChild(t.element):r.innerHTML=t.html??"",o.appendChild(r),t.closeButton!==false){let a=document.createElement("button");a.className="osmgl-popup-close",a.type="button",a.setAttribute("aria-label","\u0417\u0430\u043A\u0440\u044B\u0442\u044C"),a.textContent="\xD7",o.appendChild(a);}let i=document.createElement("div");i.className="osmgl-popup-tip",o.appendChild(i);super({coordinates:t.coordinates,element:o,anchor:t.anchor??"bottom",offset:t.offset??[0,-12],altitude:t.altitude,zIndex:t.zIndex??10,className:t.className,userData:t.userData});this.onClose=null;this.content=r,this.closeOnClick=t.closeOnClick!==false,o.querySelector(".osmgl-popup-close")?.addEventListener("click",()=>this.onClose?.());}onCloseRequest(t){return this.onClose=t,this}setHtml(t){return this.content.innerHTML=t,this}setContent(t){return this.content.replaceChildren(t),this}};var gd=[["\u0443\u043B\u0438\u0446\u0430","\u0443\u043B."],["\u0443\u043B\u0438\u0446\u044B","\u0443\u043B."],["\u0443\u043B\u0438\u0446\u0435","\u0443\u043B."],["\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442","\u043F\u0440\u043E\u0441\u043F."],["\u043F\u0440\u043E\u0441\u043F\u0435\u043A\u0442\u0430","\u043F\u0440\u043E\u0441\u043F."],["\u043F\u0435\u0440\u0435\u0443\u043B\u043E\u043A","\u043F\u0435\u0440."],["\u043F\u0435\u0440\u0435\u0443\u043B\u043A\u0430","\u043F\u0435\u0440."],["\u043F\u0440\u043E\u0435\u0437\u0434","\u043F\u0440-\u0434"],["\u043F\u0440\u043E\u0435\u0437\u0434\u0430","\u043F\u0440-\u0434"],["\u043F\u043B\u043E\u0449\u0430\u0434\u044C","\u043F\u043B."],["\u043F\u043B\u043E\u0449\u0430\u0434\u0438","\u043F\u043B."],["\u0431\u0443\u043B\u044C\u0432\u0430\u0440","\u0431\u0443\u043B."],["\u0431\u0443\u043B\u044C\u0432\u0430\u0440\u0430","\u0431\u0443\u043B."],["\u043D\u0430\u0431\u0435\u0440\u0435\u0436\u043D\u0430\u044F","\u043D\u0430\u0431."],["\u043D\u0430\u0431\u0435\u0440\u0435\u0436\u043D\u043E\u0439","\u043D\u0430\u0431."],["\u0448\u043E\u0441\u0441\u0435","\u0448."],["\u0442\u0443\u043F\u0438\u043A","\u0442\u0443\u043F."],["\u0442\u0443\u043F\u0438\u043A\u0430","\u0442\u0443\u043F."],["\u043C\u0438\u043A\u0440\u043E\u0440\u0430\u0439\u043E\u043D","\u043C\u043A\u0440."],["\u043C\u0438\u043A\u0440\u043E\u0440\u0430\u0439\u043E\u043D\u0430","\u043C\u043A\u0440."],["\u043A\u04EF\u0447\u0430\u0438","\u043A."],["\u043A\u0443\u0447\u0430\u0438","\u043A."],["\u0445\u0438\u0451\u0431\u043E\u043D\u0438","\u0445\u0438\u0451\u0431."],["\u0448\u043E\u04B3\u0440\u043E\u04B3\u0438","\u0448\u043E\u04B3."],["\u0433\u0443\u0437\u0430\u0440\u0433\u043E\u04B3\u0438","\u0433\u0443\u0437."],["\u043C\u0430\u0439\u0434\u043E\u043D\u0438","\u043C\u0430\u0439\u0434."]],ks=new Map(gd);function bi(n){let e=n.split(" ");if(e.length<2)return n;let t=false,o=e.map(i=>{let a=ks.get(i.toLowerCase());return a?(t=true,i[0]===i[0].toUpperCase()?a[0].toUpperCase()+a.slice(1):a):i});return !t||!e.filter(i=>ks.get(i.toLowerCase())===void 0).length?n:o.join(" ")}function gi(n,e){let t=[],o=[],r=[],i=[],a=[],l=e.textPlacement==="line",s=[],c=[],u=[];for(let h of n.features()){if(!Be(e.filter,h.properties))continue;let f=h.loadGeometry(),d=Cd(h.type,f);if(!d)continue;let p=e.textField?yi(e.textField,h.properties):"",m=p&&e.abbreviate?bi(p):p,b=e.iconImage?yi(e.iconImage,h.properties):"";if(!(!m&&!b)){if(l){let y=Bd(h.type,f);if(!y)continue;u.push({text:m,line:y});continue}t.push(d[0],d[1]),o.push(m),r.push(b),i.push(vd(h.properties)),a.push(e.iconRotate&&Math.round(Number(h.properties[e.iconRotate]??0))||0);}}if(l){for(let{text:h,line:f}of Ad(u)){c.push(s.length/2);for(let d of f)s.push(d);t.push(Math.round(f[0]),Math.round(f[1])),o.push(h),r.push(""),i.push(128),a.push(0);}c.push(s.length/2);}return o.length?{anchors:new Int16Array(t).buffer,texts:o,icons:r,priorities:new Uint8Array(i).buffer,rotations:new Int16Array(a).buffer,...l?{lines:new Int16Array(s).buffer,lineStarts:new Uint32Array(c).buffer}:{}}:null}function Ad(n){let e=[],t=new Map,o=new Map,r=(i,a,l)=>`${i}\u241F${a}\u241F${l}`;for(let{text:i,line:a}of n){let l=r(i,a[0],a[1]),s=r(i,a[a.length-2],a[a.length-1]),c=t.get(s),u=o.get(l);if(u!==void 0){let h=e[u];if(h.line.push(...a.slice(2)),o.delete(l),o.set(r(i,h.line[h.line.length-2],h.line[h.line.length-1]),u),c!==void 0&&c!==u){let f=e[c];h.line.push(...f.line.slice(2)),f.line=[],t.delete(s),o.set(r(i,h.line[h.line.length-2],h.line[h.line.length-1]),u);}continue}if(c!==void 0){let h=e[c];h.line.unshift(...a.slice(0,a.length-2)),t.delete(s),t.set(r(i,h.line[0],h.line[1]),c);continue}t.set(l,e.length),o.set(s,e.length),e.push({text:i,line:a});}return e.filter(i=>i.line.length>=4)}function Bd(n,e){if(n!==2)return null;let t=null,o=0;for(let r of e){if(r.length<4)continue;let i=0;for(let a=0;a+3<r.length;a+=2)i+=Math.hypot(r[a+2]-r[a],r[a+3]-r[a+1]);i>o&&(o=i,t=r);}return t}function Cd(n,e){if(!e.length)return null;if(n===1){let a=e[0];return a.length>=2?[a[0],a[1]]:null}if(n===2){let a=-1,l=0,s=0;for(let c of e)for(let u=0;u+3<c.length;u+=2){let h=c[u+2]-c[u],f=c[u+3]-c[u+1],d=h*h+f*f;d>a&&(a=d,l=c[u]+h/2,s=c[u+1]+f/2);}return a>0?[Math.round(l),Math.round(s)]:null}let t=1/0,o=1/0,r=-1/0,i=-1/0;for(let a of e)for(let l=0;l<a.length;l+=2)a[l]<t&&(t=a[l]),a[l]>r&&(r=a[l]),a[l+1]<o&&(o=a[l+1]),a[l+1]>i&&(i=a[l+1]);return isFinite(t)?[Math.round((t+r)/2),Math.round((o+i)/2)]:null}function vd(n){let e=n.rank;return typeof e=="number"&&isFinite(e)?Math.max(0,255-Math.min(e,255)):128}function yi(n,e){let t=Array.isArray(n)?n:[n];for(let o of t){let r=true,a=o.replace(/\{([^}]+)\}/g,(l,s)=>{let c=e[s];return c==null||c===""?(r=false,""):String(c)}).trim();if(r&&a)return a}return ""}function Rs(n,e){let t=[],o=[];for(let r=0;r<n.length;r++){let i=n.feature(r);if(i.type===1&&Be(e,i.properties))for(let a of i.loadGeometry())for(let l=0;l+1<a.length;l+=2)t.push(a[l],a[l+1]),o.push(i.properties);}return o.length?{anchors:Int16Array.from(t).buffer,props:o}:null}function xd(){let n=typeof self<"u"?self.origin:void 0;return n&&n!=="null"&&!n.startsWith("blob:")?n+"/":void 0}async function Os(n,e){let t=performance.now(),o=xd(),r=await fetch(n.url,{signal:e,credentials:"same-origin",...o?{referrer:o}:{}}),i=(b,y,g,A,B=0)=>({type:"loaded",id:n.id,buckets:{},timing:{fetchMs:A,parseMs:B},diag:{status:b,bytes:y,layers:g,built:0}});if(!r.ok){if(r.status===404||r.status===204)return i(r.status,0,[],performance.now()-t);throw new Error(`HTTP ${r.status} \u0434\u043B\u044F ${n.url}`)}let a=await r.arrayBuffer(),l=performance.now()-t;if(a.byteLength===0)return i(r.status,0,[],l);let s=performance.now(),c=new to(a),u=Object.keys(c.layers),h={},f={},d=[],m=n.plan.some(b=>b.type==="surface"&&(b.elevation??0)>0)&&n.plan.some(b=>b.type==="line"&&b.ground)?_n(n.metersPerTile):void 0;for(let b of n.plan){if(!_d(b,n.zoom,n.sourceMaxZoom))continue;let y=c.layers[b.sourceLayer];if(!y)continue;let g=Ed(n.zoom,y.extent);try{if(b.splitBy){let B=Dd(y,b.splitBy,b.filter);if(!B.length)continue;let w=f[b.splitBy]??(f[b.splitBy]=[]);for(let x of B){w.includes(x)||w.push(x);let _={...b,splitBy:void 0,filter:Md(b.filter,b.splitBy,x)},C=Gs(_,y,g,n.metersPerTile,m);C&&(h[St(b.id,x)]=C);}continue}let A=Gs(b,y,g,n.metersPerTile,m);A&&(h[b.id]=A);}catch(A){d.push(`${b.id}: ${A instanceof Error?A.message:String(A)}`);}}return {type:"loaded",id:n.id,buckets:h,...Object.keys(f).length?{splits:f}:{},timing:{fetchMs:l,parseMs:performance.now()-s},diag:{status:r.status,bytes:a.byteLength,layers:u,built:Object.keys(h).length,...d.length?{failed:d}:{}}}}function wd(n){return e=>{let t=e.on;if(typeof t!="string"||!t)return 0;let o=0;for(let r of t.split(",")){let i=n[r];typeof i=="number"&&i>o&&(o=i);}return o}}function _d(n,e,t){let o=e-1,r=e<t?e+1:24;return !(n.maxzoom<o||n.minzoom>r)}function Ed(n,e){return n<=6?Math.max(64,e/24):0}function Gs(n,e,t,o,r){{if(n.type==="fill"){let a=o>0?o/e.extent:0,l=n.cornerRadius&&a>0?{radius:n.cornerRadius/a,segments:n.cornerSegments,extent:e.extent,minCutRatio:0,maxChord:ua/a}:void 0,s=wn(e,n.filter,t,l,n.clipToTile===true,e.extent);return s?{kind:"fill",...s,extent:e.extent}:null}if(n.type==="surface"){let a=xn(e,e.extent,n.filter,{metersPerUnit:o>0?o/e.extent:0,elevation:n.elevation??0,base:n.base,bevel:n.bevel,weld:n.weld,bevelDrop:n.bevelDrop,cornerRadius:n.cornerRadius,cornerSegments:n.cornerSegments,...r?{onShapes:l=>En(r,l,n.elevation??0,e.extent)}:{},...n.groundBy?{liftBy:wd(n.groundBy)}:{}});return a?{kind:"surface",...a}:null}if(n.type==="line"){let a=Fn(e,n.filter,t,n.ground?r:void 0,o>0?o/e.extent:0);return a?{kind:"line",...a,extent:e.extent}:null}if(n.type==="model"){let a=Rs(e,n.filter);return a?{kind:"placement",...a,extent:e.extent}:null}if(n.type==="symbol"){let a=gi(e,{filter:n.filter,textField:n.textField,iconImage:n.iconImage,iconRotate:n.iconRotate,textPlacement:n.textPlacement,abbreviate:n.abbreviate});return a?{kind:"symbol",...a,extent:e.extent}:null}let i=on(e,e.extent,n.filter,{metersPerUnit:o>0?o/e.extent:0,cornerRadius:n.cornerRadius,cornerSegments:n.cornerSegments});return i?{kind:"fill-extrusion",vertices:i.vertices,indices:i.indices,featureIds:i.featureIds,vertexCount:i.vertexCount,indexCount:i.indexCount,extent:i.extent}:null}}function Dd(n,e,t){let o=[];for(let r of n.features()){if(!Be(t,r.properties))continue;let i=r.properties[e];typeof i!="string"&&typeof i!="number"||o.includes(i)||o.push(i);}return o.sort((r,i)=>typeof r=="number"&&typeof i=="number"?r-i:String(r).localeCompare(String(i))),o}function Md(n,e,t){let o=["==",e,t];return n?["all",n,o]:o}var Ai='"use strict";(()=>{var er=Object.create;var Yt=Object.defineProperty;var tr=Object.getOwnPropertyDescriptor;var nr=Object.getOwnPropertyNames;var rr=Object.getPrototypeOf,ir=Object.prototype.hasOwnProperty;var or=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var sr=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of nr(e))!ir.call(t,o)&&o!==n&&Yt(t,o,{get:()=>e[o],enumerable:!(r=tr(e,o))||r.enumerable});return t};var ur=(t,e,n)=>(n=t!=null?er(rr(t)):{},sr(e||!t||!t.__esModule?Yt(n,"default",{value:t,enumerable:!0}):n,t));var Mn=or((Ot,Ut)=>{(function(t,e){typeof Ot=="object"&&typeof Ut<"u"?Ut.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.polygonClipping=e())})(Ot,function(){"use strict";function t(g,i){var u={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},f,p,a,S;return S={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function w(M){return function(V){return F([M,V])}}function F(M){if(f)throw new TypeError("Generator is already executing.");for(;u;)try{if(f=1,p&&(a=M[0]&2?p.return:M[0]?p.throw||((a=p.return)&&a.call(p),0):p.next)&&!(a=a.call(p,M[1])).done)return a;switch(p=0,a&&(M=[M[0]&2,a.value]),M[0]){case 0:case 1:a=M;break;case 4:return u.label++,{value:M[1],done:!1};case 5:u.label++,p=M[1],M=[0];continue;case 7:M=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(M[0]===6||M[0]===2)){u=0;continue}if(M[0]===3&&(!a||M[1]>a[0]&&M[1]<a[3])){u.label=M[1];break}if(M[0]===6&&u.label<a[1]){u.label=a[1],a=M;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(M);break}a[2]&&u.ops.pop(),u.trys.pop();continue}M=i.call(g,u)}catch(V){M=[6,V],p=0}finally{f=a=0}if(M[0]&5)throw M[1];return{value:M[0]?M[1]:void 0,done:!0}}}var e=function(){function g(i,u){this.next=null,this.key=i,this.data=u,this.left=null,this.right=null}return g}();function n(g,i){return g>i?1:g<i?-1:0}function r(g,i,u){for(var f=new e(null,null),p=f,a=f;;){var S=u(g,i.key);if(S<0){if(i.left===null)break;if(u(g,i.left.key)<0){var w=i.left;if(i.left=w.right,w.right=i,i=w,i.left===null)break}a.left=i,a=i,i=i.left}else if(S>0){if(i.right===null)break;if(u(g,i.right.key)>0){var w=i.right;if(i.right=w.left,w.left=i,i=w,i.right===null)break}p.right=i,p=i,i=i.right}else break}return p.right=i.left,a.left=i.right,i.left=f.right,i.right=f.left,i}function o(g,i,u,f){var p=new e(g,i);if(u===null)return p.left=p.right=null,p;u=r(g,u,f);var a=f(g,u.key);return a<0?(p.left=u.left,p.right=u,u.left=null):a>=0&&(p.right=u.right,p.left=u,u.right=null),p}function s(g,i,u){var f=null,p=null;if(i){i=r(g,i,u);var a=u(i.key,g);a===0?(f=i.left,p=i.right):a<0?(p=i.right,i.right=null,f=i):(f=i.left,i.left=null,p=i)}return{left:f,right:p}}function l(g,i,u){return i===null?g:(g===null||(i=r(g.key,i,u),i.left=g),i)}function c(g,i,u,f,p){if(g){f(""+i+(u?"\\u2514\\u2500\\u2500 ":"\\u251C\\u2500\\u2500 ")+p(g)+`\n`);var a=i+(u?" ":"\\u2502 ");g.left&&c(g.left,a,!1,f,p),g.right&&c(g.right,a,!0,f,p)}}var h=function(){function g(i){i===void 0&&(i=n),this._root=null,this._size=0,this._comparator=i}return g.prototype.insert=function(i,u){return this._size++,this._root=o(i,u,this._root,this._comparator)},g.prototype.add=function(i,u){var f=new e(i,u);this._root===null&&(f.left=f.right=null,this._size++,this._root=f);var p=this._comparator,a=r(i,this._root,p),S=p(i,a.key);return S===0?this._root=a:(S<0?(f.left=a.left,f.right=a,a.left=null):S>0&&(f.right=a.right,f.left=a,a.right=null),this._size++,this._root=f),this._root},g.prototype.remove=function(i){this._root=this._remove(i,this._root,this._comparator)},g.prototype._remove=function(i,u,f){var p;if(u===null)return null;u=r(i,u,f);var a=f(i,u.key);return a===0?(u.left===null?p=u.right:(p=r(i,u.left,f),p.right=u.right),this._size--,p):u},g.prototype.pop=function(){var i=this._root;if(i){for(;i.left;)i=i.left;return this._root=r(i.key,this._root,this._comparator),this._root=this._remove(i.key,this._root,this._comparator),{key:i.key,data:i.data}}return null},g.prototype.findStatic=function(i){for(var u=this._root,f=this._comparator;u;){var p=f(i,u.key);if(p===0)return u;p<0?u=u.left:u=u.right}return null},g.prototype.find=function(i){return this._root&&(this._root=r(i,this._root,this._comparator),this._comparator(i,this._root.key)!==0)?null:this._root},g.prototype.contains=function(i){for(var u=this._root,f=this._comparator;u;){var p=f(i,u.key);if(p===0)return!0;p<0?u=u.left:u=u.right}return!1},g.prototype.forEach=function(i,u){for(var f=this._root,p=[],a=!1;!a;)f!==null?(p.push(f),f=f.left):p.length!==0?(f=p.pop(),i.call(u,f),f=f.right):a=!0;return this},g.prototype.range=function(i,u,f,p){for(var a=[],S=this._comparator,w=this._root,F;a.length!==0||w;)if(w)a.push(w),w=w.left;else{if(w=a.pop(),F=S(w.key,u),F>0)break;if(S(w.key,i)>=0&&f.call(p,w))return this;w=w.right}return this},g.prototype.keys=function(){var i=[];return this.forEach(function(u){var f=u.key;return i.push(f)}),i},g.prototype.values=function(){var i=[];return this.forEach(function(u){var f=u.data;return i.push(f)}),i},g.prototype.min=function(){return this._root?this.minNode(this._root).key:null},g.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},g.prototype.minNode=function(i){if(i===void 0&&(i=this._root),i)for(;i.left;)i=i.left;return i},g.prototype.maxNode=function(i){if(i===void 0&&(i=this._root),i)for(;i.right;)i=i.right;return i},g.prototype.at=function(i){for(var u=this._root,f=!1,p=0,a=[];!f;)if(u)a.push(u),u=u.left;else if(a.length>0){if(u=a.pop(),p===i)return u;p++,u=u.right}else f=!0;return null},g.prototype.next=function(i){var u=this._root,f=null;if(i.right){for(f=i.right;f.left;)f=f.left;return f}for(var p=this._comparator;u;){var a=p(i.key,u.key);if(a===0)break;a<0?(f=u,u=u.left):u=u.right}return f},g.prototype.prev=function(i){var u=this._root,f=null;if(i.left!==null){for(f=i.left;f.right;)f=f.right;return f}for(var p=this._comparator;u;){var a=p(i.key,u.key);if(a===0)break;a<0?u=u.left:(f=u,u=u.right)}return f},g.prototype.clear=function(){return this._root=null,this._size=0,this},g.prototype.toList=function(){return y(this._root)},g.prototype.load=function(i,u,f){u===void 0&&(u=[]),f===void 0&&(f=!1);var p=i.length,a=this._comparator;if(f&&E(i,u,0,p-1,a),this._root===null)this._root=m(i,u,0,p),this._size=p;else{var S=v(this.toList(),d(i,u),a);p=this._size+p,this._root=x({head:S},0,p)}return this},g.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(g.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(g.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),g.prototype.toString=function(i){i===void 0&&(i=function(f){return String(f.key)});var u=[];return c(this._root,"",!0,function(f){return u.push(f)},i),u.join("")},g.prototype.update=function(i,u,f){var p=this._comparator,a=s(i,this._root,p),S=a.left,w=a.right;p(i,u)<0?w=o(u,f,w,p):S=o(u,f,S,p),this._root=l(S,w,p)},g.prototype.split=function(i){return s(i,this._root,this._comparator)},g.prototype[Symbol.iterator]=function(){var i,u,f;return t(this,function(p){switch(p.label){case 0:i=this._root,u=[],f=!1,p.label=1;case 1:return f?[3,6]:i===null?[3,2]:(u.push(i),i=i.left,[3,5]);case 2:return u.length===0?[3,4]:(i=u.pop(),[4,i]);case 3:return p.sent(),i=i.right,[3,5];case 4:f=!0,p.label=5;case 5:return[3,1];case 6:return[2]}})},g}();function m(g,i,u,f){var p=f-u;if(p>0){var a=u+Math.floor(p/2),S=g[a],w=i[a],F=new e(S,w);return F.left=m(g,i,u,a),F.right=m(g,i,a+1,f),F}return null}function d(g,i){for(var u=new e(null,null),f=u,p=0;p<g.length;p++)f=f.next=new e(g[p],i[p]);return f.next=null,u.next}function y(g){for(var i=g,u=[],f=!1,p=new e(null,null),a=p;!f;)i?(u.push(i),i=i.left):u.length>0?(i=a=a.next=u.pop(),i=i.right):f=!0;return a.next=null,p.next}function x(g,i,u){var f=u-i;if(f>0){var p=i+Math.floor(f/2),a=x(g,i,p),S=g.head;return S.left=a,g.head=g.head.next,S.right=x(g,p+1,u),S}return null}function v(g,i,u){for(var f=new e(null,null),p=f,a=g,S=i;a!==null&&S!==null;)u(a.key,S.key)<0?(p.next=a,a=a.next):(p.next=S,S=S.next),p=p.next;return a!==null?p.next=a:S!==null&&(p.next=S),f.next}function E(g,i,u,f,p){if(!(u>=f)){for(var a=g[u+f>>1],S=u-1,w=f+1;;){do S++;while(p(g[S],a)<0);do w--;while(p(g[w],a)>0);if(S>=w)break;var F=g[S];g[S]=g[w],g[w]=F,F=i[S],i[S]=i[w],i[w]=F}E(g,i,u,w,p),E(g,i,w+1,f,p)}}let A=(g,i)=>g.ll.x<=i.x&&i.x<=g.ur.x&&g.ll.y<=i.y&&i.y<=g.ur.y,R=(g,i)=>{if(i.ur.x<g.ll.x||g.ur.x<i.ll.x||i.ur.y<g.ll.y||g.ur.y<i.ll.y)return null;let u=g.ll.x<i.ll.x?i.ll.x:g.ll.x,f=g.ur.x<i.ur.x?g.ur.x:i.ur.x,p=g.ll.y<i.ll.y?i.ll.y:g.ll.y,a=g.ur.y<i.ur.y?g.ur.y:i.ur.y;return{ll:{x:u,y:p},ur:{x:f,y:a}}},P=Number.EPSILON;P===void 0&&(P=Math.pow(2,-52));let C=P*P,_=(g,i)=>{if(-P<g&&g<P&&-P<i&&i<P)return 0;let u=g-i;return u*u<C*g*i?0:g<i?-1:1};class L{constructor(){this.reset()}reset(){this.xRounder=new U,this.yRounder=new U}round(i,u){return{x:this.xRounder.round(i),y:this.yRounder.round(u)}}}class U{constructor(){this.tree=new h,this.round(0)}round(i){let u=this.tree.add(i),f=this.tree.prev(u);if(f!==null&&_(u.key,f.key)===0)return this.tree.remove(i),f.key;let p=this.tree.next(u);return p!==null&&_(u.key,p.key)===0?(this.tree.remove(i),p.key):i}}let O=new L,N=11102230246251565e-32,k=134217729,T=(3+8*N)*N;function j(g,i,u,f,p){let a,S,w,F,M=i[0],V=f[0],b=0,I=0;V>M==V>-M?(a=M,M=i[++b]):(a=V,V=f[++I]);let B=0;if(b<g&&I<u)for(V>M==V>-M?(S=M+a,w=a-(S-M),M=i[++b]):(S=V+a,w=a-(S-V),V=f[++I]),a=S,w!==0&&(p[B++]=w);b<g&&I<u;)V>M==V>-M?(S=a+M,F=S-a,w=a-(S-F)+(M-F),M=i[++b]):(S=a+V,F=S-a,w=a-(S-F)+(V-F),V=f[++I]),a=S,w!==0&&(p[B++]=w);for(;b<g;)S=a+M,F=S-a,w=a-(S-F)+(M-F),M=i[++b],a=S,w!==0&&(p[B++]=w);for(;I<u;)S=a+V,F=S-a,w=a-(S-F)+(V-F),V=f[++I],a=S,w!==0&&(p[B++]=w);return(a!==0||B===0)&&(p[B++]=a),B}function X(g,i){let u=i[0];for(let f=1;f<g;f++)u+=i[f];return u}function K(g){return new Float64Array(g)}let q=(3+16*N)*N,Y=(2+12*N)*N,$=(9+64*N)*N*N,D=K(4),z=K(8),Q=K(12),te=K(16),J=K(4);function he(g,i,u,f,p,a,S){let w,F,M,V,b,I,B,H,G,W,Z,ee,le,re,ce,fe,me,ae,we=g-p,ve=u-p,Se=i-a,Ee=f-a;re=we*Ee,I=k*we,B=I-(I-we),H=we-B,I=k*Ee,G=I-(I-Ee),W=Ee-G,ce=H*W-(re-B*G-H*G-B*W),fe=Se*ve,I=k*Se,B=I-(I-Se),H=Se-B,I=k*ve,G=I-(I-ve),W=ve-G,me=H*W-(fe-B*G-H*G-B*W),Z=ce-me,b=ce-Z,D[0]=ce-(Z+b)+(b-me),ee=re+Z,b=ee-re,le=re-(ee-b)+(Z-b),Z=le-fe,b=le-Z,D[1]=le-(Z+b)+(b-fe),ae=ee+Z,b=ae-ee,D[2]=ee-(ae-b)+(Z-b),D[3]=ae;let Me=X(4,D),We=Y*S;if(Me>=We||-Me>=We||(b=g-we,w=g-(we+b)+(b-p),b=u-ve,M=u-(ve+b)+(b-p),b=i-Se,F=i-(Se+b)+(b-a),b=f-Ee,V=f-(Ee+b)+(b-a),w===0&&F===0&&M===0&&V===0)||(We=$*S+T*Math.abs(Me),Me+=we*V+Ee*w-(Se*M+ve*F),Me>=We||-Me>=We))return Me;re=w*Ee,I=k*w,B=I-(I-w),H=w-B,I=k*Ee,G=I-(I-Ee),W=Ee-G,ce=H*W-(re-B*G-H*G-B*W),fe=F*ve,I=k*F,B=I-(I-F),H=F-B,I=k*ve,G=I-(I-ve),W=ve-G,me=H*W-(fe-B*G-H*G-B*W),Z=ce-me,b=ce-Z,J[0]=ce-(Z+b)+(b-me),ee=re+Z,b=ee-re,le=re-(ee-b)+(Z-b),Z=le-fe,b=le-Z,J[1]=le-(Z+b)+(b-fe),ae=ee+Z,b=ae-ee,J[2]=ee-(ae-b)+(Z-b),J[3]=ae;let Kn=j(4,D,4,J,z);re=we*V,I=k*we,B=I-(I-we),H=we-B,I=k*V,G=I-(I-V),W=V-G,ce=H*W-(re-B*G-H*G-B*W),fe=Se*M,I=k*Se,B=I-(I-Se),H=Se-B,I=k*M,G=I-(I-M),W=M-G,me=H*W-(fe-B*G-H*G-B*W),Z=ce-me,b=ce-Z,J[0]=ce-(Z+b)+(b-me),ee=re+Z,b=ee-re,le=re-(ee-b)+(Z-b),Z=le-fe,b=le-Z,J[1]=le-(Z+b)+(b-fe),ae=ee+Z,b=ae-ee,J[2]=ee-(ae-b)+(Z-b),J[3]=ae;let Jn=j(Kn,z,4,J,Q);re=w*V,I=k*w,B=I-(I-w),H=w-B,I=k*V,G=I-(I-V),W=V-G,ce=H*W-(re-B*G-H*G-B*W),fe=F*M,I=k*F,B=I-(I-F),H=F-B,I=k*M,G=I-(I-M),W=M-G,me=H*W-(fe-B*G-H*G-B*W),Z=ce-me,b=ce-Z,J[0]=ce-(Z+b)+(b-me),ee=re+Z,b=ee-re,le=re-(ee-b)+(Z-b),Z=le-fe,b=le-Z,J[1]=le-(Z+b)+(b-fe),ae=ee+Z,b=ae-ee,J[2]=ee-(ae-b)+(Z-b),J[3]=ae;let qn=j(Jn,Q,4,J,te);return te[qn-1]}function pe(g,i,u,f,p,a){let S=(i-a)*(u-p),w=(g-p)*(f-a),F=S-w,M=Math.abs(S+w);return Math.abs(F)>=q*M?F:-he(g,i,u,f,p,a,M)}let oe=(g,i)=>g.x*i.y-g.y*i.x,Ve=(g,i)=>g.x*i.x+g.y*i.y,de=(g,i,u)=>{let f=pe(g.x,g.y,i.x,i.y,u.x,u.y);return f>0?-1:f<0?1:0},ge=g=>Math.sqrt(Ve(g,g)),Pe=(g,i,u)=>{let f={x:i.x-g.x,y:i.y-g.y},p={x:u.x-g.x,y:u.y-g.y};return oe(p,f)/ge(p)/ge(f)},Ae=(g,i,u)=>{let f={x:i.x-g.x,y:i.y-g.y},p={x:u.x-g.x,y:u.y-g.y};return Ve(p,f)/ge(p)/ge(f)},Ie=(g,i,u)=>i.y===0?null:{x:g.x+i.x/i.y*(u-g.y),y:u},ke=(g,i,u)=>i.x===0?null:{x:u,y:g.y+i.y/i.x*(u-g.x)},Oe=(g,i,u,f)=>{if(i.x===0)return ke(u,f,g.x);if(f.x===0)return ke(g,i,u.x);if(i.y===0)return Ie(u,f,g.y);if(f.y===0)return Ie(g,i,u.y);let p=oe(i,f);if(p==0)return null;let a={x:u.x-g.x,y:u.y-g.y},S=oe(a,i)/p,w=oe(a,f)/p,F=g.x+w*i.x,M=u.x+S*f.x,V=g.y+w*i.y,b=u.y+S*f.y,I=(F+M)/2,B=(V+b)/2;return{x:I,y:B}};class se{static compare(i,u){let f=se.comparePoints(i.point,u.point);return f!==0?f:(i.point!==u.point&&i.link(u),i.isLeft!==u.isLeft?i.isLeft?1:-1:ye.compare(i.segment,u.segment))}static comparePoints(i,u){return i.x<u.x?-1:i.x>u.x?1:i.y<u.y?-1:i.y>u.y?1:0}constructor(i,u){i.events===void 0?i.events=[this]:i.events.push(this),this.point=i,this.isLeft=u}link(i){if(i.point===this.point)throw new Error("Tried to link already linked events");let u=i.point.events;for(let f=0,p=u.length;f<p;f++){let a=u[f];this.point.events.push(a),a.point=this.point}this.checkForConsuming()}checkForConsuming(){let i=this.point.events.length;for(let u=0;u<i;u++){let f=this.point.events[u];if(f.segment.consumedBy===void 0)for(let p=u+1;p<i;p++){let a=this.point.events[p];a.consumedBy===void 0&&f.otherSE.point.events===a.otherSE.point.events&&f.segment.consume(a.segment)}}}getAvailableLinkedEvents(){let i=[];for(let u=0,f=this.point.events.length;u<f;u++){let p=this.point.events[u];p!==this&&!p.segment.ringOut&&p.segment.isInResult()&&i.push(p)}return i}getLeftmostComparator(i){let u=new Map,f=p=>{let a=p.otherSE;u.set(p,{sine:Pe(this.point,i.point,a.point),cosine:Ae(this.point,i.point,a.point)})};return(p,a)=>{u.has(p)||f(p),u.has(a)||f(a);let{sine:S,cosine:w}=u.get(p),{sine:F,cosine:M}=u.get(a);return S>=0&&F>=0?w<M?1:w>M?-1:0:S<0&&F<0?w<M?-1:w>M?1:0:F<S?-1:F>S?1:0}}}let Ue=0;class ye{static compare(i,u){let f=i.leftSE.point.x,p=u.leftSE.point.x,a=i.rightSE.point.x,S=u.rightSE.point.x;if(S<f)return 1;if(a<p)return-1;let w=i.leftSE.point.y,F=u.leftSE.point.y,M=i.rightSE.point.y,V=u.rightSE.point.y;if(f<p){if(F<w&&F<M)return 1;if(F>w&&F>M)return-1;let b=i.comparePoint(u.leftSE.point);if(b<0)return 1;if(b>0)return-1;let I=u.comparePoint(i.rightSE.point);return I!==0?I:-1}if(f>p){if(w<F&&w<V)return-1;if(w>F&&w>V)return 1;let b=u.comparePoint(i.leftSE.point);if(b!==0)return b;let I=i.comparePoint(u.rightSE.point);return I<0?1:I>0?-1:1}if(w<F)return-1;if(w>F)return 1;if(a<S){let b=u.comparePoint(i.rightSE.point);if(b!==0)return b}if(a>S){let b=i.comparePoint(u.rightSE.point);if(b<0)return 1;if(b>0)return-1}if(a!==S){let b=M-w,I=a-f,B=V-F,H=S-p;if(b>I&&B<H)return 1;if(b<I&&B>H)return-1}return a>S?1:a<S||M<V?-1:M>V?1:i.id<u.id?-1:i.id>u.id?1:0}constructor(i,u,f,p){this.id=++Ue,this.leftSE=i,i.segment=this,i.otherSE=u,this.rightSE=u,u.segment=this,u.otherSE=i,this.rings=f,this.windings=p}static fromRing(i,u,f){let p,a,S,w=se.comparePoints(i,u);if(w<0)p=i,a=u,S=1;else if(w>0)p=u,a=i,S=-1;else throw new Error(`Tried to create degenerate segment at [${i.x}, ${i.y}]`);let F=new se(p,!0),M=new se(a,!1);return new ye(F,M,[f],[S])}replaceRightSE(i){this.rightSE=i,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let i=this.leftSE.point.y,u=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:i<u?i:u},ur:{x:this.rightSE.point.x,y:i>u?i:u}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(i){return i.x===this.leftSE.point.x&&i.y===this.leftSE.point.y||i.x===this.rightSE.point.x&&i.y===this.rightSE.point.y}comparePoint(i){if(this.isAnEndpoint(i))return 0;let u=this.leftSE.point,f=this.rightSE.point,p=this.vector();if(u.x===f.x)return i.x===u.x?0:i.x<u.x?1:-1;let a=(i.y-u.y)/p.y,S=u.x+a*p.x;if(i.x===S)return 0;let w=(i.x-u.x)/p.x,F=u.y+w*p.y;return i.y===F?0:i.y<F?-1:1}getIntersection(i){let u=this.bbox(),f=i.bbox(),p=R(u,f);if(p===null)return null;let a=this.leftSE.point,S=this.rightSE.point,w=i.leftSE.point,F=i.rightSE.point,M=A(u,w)&&this.comparePoint(w)===0,V=A(f,a)&&i.comparePoint(a)===0,b=A(u,F)&&this.comparePoint(F)===0,I=A(f,S)&&i.comparePoint(S)===0;if(V&&M)return I&&!b?S:!I&&b?F:null;if(V)return b&&a.x===F.x&&a.y===F.y?null:a;if(M)return I&&S.x===w.x&&S.y===w.y?null:w;if(I&&b)return null;if(I)return S;if(b)return F;let B=Oe(a,this.vector(),w,i.vector());return B===null||!A(p,B)?null:O.round(B.x,B.y)}split(i){let u=[],f=i.events!==void 0,p=new se(i,!0),a=new se(i,!1),S=this.rightSE;this.replaceRightSE(a),u.push(a),u.push(p);let w=new ye(p,S,this.rings.slice(),this.windings.slice());return se.comparePoints(w.leftSE.point,w.rightSE.point)>0&&w.swapEvents(),se.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),f&&(p.checkForConsuming(),a.checkForConsuming()),u}swapEvents(){let i=this.rightSE;this.rightSE=this.leftSE,this.leftSE=i,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let u=0,f=this.windings.length;u<f;u++)this.windings[u]*=-1}consume(i){let u=this,f=i;for(;u.consumedBy;)u=u.consumedBy;for(;f.consumedBy;)f=f.consumedBy;let p=ye.compare(u,f);if(p!==0){if(p>0){let a=u;u=f,f=a}if(u.prev===f){let a=u;u=f,f=a}for(let a=0,S=f.rings.length;a<S;a++){let w=f.rings[a],F=f.windings[a],M=u.rings.indexOf(w);M===-1?(u.rings.push(w),u.windings.push(F)):u.windings[M]+=F}f.rings=null,f.windings=null,f.consumedBy=u,f.leftSE.consumedBy=u.leftSE,f.rightSE.consumedBy=u.rightSE}}prevInResult(){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)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{let i=this.prev.consumedBy||this.prev;this._beforeState=i.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;let i=this.beforeState();this._afterState={rings:i.rings.slice(0),windings:i.windings.slice(0),multiPolys:[]};let u=this._afterState.rings,f=this._afterState.windings,p=this._afterState.multiPolys;for(let w=0,F=this.rings.length;w<F;w++){let M=this.rings[w],V=this.windings[w],b=u.indexOf(M);b===-1?(u.push(M),f.push(V)):f[b]+=V}let a=[],S=[];for(let w=0,F=u.length;w<F;w++){if(f[w]===0)continue;let M=u[w],V=M.poly;if(S.indexOf(V)===-1)if(M.isExterior)a.push(V);else{S.indexOf(V)===-1&&S.push(V);let b=a.indexOf(M.poly);b!==-1&&a.splice(b,1)}}for(let w=0,F=a.length;w<F;w++){let M=a[w].multiPoly;p.indexOf(M)===-1&&p.push(M)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;let i=this.beforeState().multiPolys,u=this.afterState().multiPolys;switch(be.type){case"union":{let f=i.length===0,p=u.length===0;this._isInResult=f!==p;break}case"intersection":{let f,p;i.length<u.length?(f=i.length,p=u.length):(f=u.length,p=i.length),this._isInResult=p===be.numMultiPolys&&f<p;break}case"xor":{let f=Math.abs(i.length-u.length);this._isInResult=f%2===1;break}case"difference":{let f=p=>p.length===1&&p[0].isSubject;this._isInResult=f(i)!==f(u);break}default:throw new Error(`Unrecognized operation type found ${be.type}`)}return this._isInResult}}class Ye{constructor(i,u,f){if(!Array.isArray(i)||i.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=u,this.isExterior=f,this.segments=[],typeof i[0][0]!="number"||typeof i[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let p=O.round(i[0][0],i[0][1]);this.bbox={ll:{x:p.x,y:p.y},ur:{x:p.x,y:p.y}};let a=p;for(let S=1,w=i.length;S<w;S++){if(typeof i[S][0]!="number"||typeof i[S][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let F=O.round(i[S][0],i[S][1]);F.x===a.x&&F.y===a.y||(this.segments.push(ye.fromRing(a,F,this)),F.x<this.bbox.ll.x&&(this.bbox.ll.x=F.x),F.y<this.bbox.ll.y&&(this.bbox.ll.y=F.y),F.x>this.bbox.ur.x&&(this.bbox.ur.x=F.x),F.y>this.bbox.ur.y&&(this.bbox.ur.y=F.y),a=F)}(p.x!==a.x||p.y!==a.y)&&this.segments.push(ye.fromRing(a,p,this))}getSweepEvents(){let i=[];for(let u=0,f=this.segments.length;u<f;u++){let p=this.segments[u];i.push(p.leftSE),i.push(p.rightSE)}return i}}class ut{constructor(i,u){if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new Ye(i[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(let f=1,p=i.length;f<p;f++){let a=new Ye(i[f],this,!1);a.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=a.bbox.ll.x),a.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=a.bbox.ll.y),a.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.interiorRings.push(a)}this.multiPoly=u}getSweepEvents(){let i=this.exteriorRing.getSweepEvents();for(let u=0,f=this.interiorRings.length;u<f;u++){let p=this.interiorRings[u].getSweepEvents();for(let a=0,S=p.length;a<S;a++)i.push(p[a])}return i}}class Ze{constructor(i,u){if(!Array.isArray(i))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof i[0][0][0]=="number"&&(i=[i])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let f=0,p=i.length;f<p;f++){let a=new ut(i[f],this);a.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=a.bbox.ll.x),a.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=a.bbox.ll.y),a.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.polys.push(a)}this.isSubject=u}getSweepEvents(){let i=[];for(let u=0,f=this.polys.length;u<f;u++){let p=this.polys[u].getSweepEvents();for(let a=0,S=p.length;a<S;a++)i.push(p[a])}return i}}class Be{static factory(i){let u=[];for(let f=0,p=i.length;f<p;f++){let a=i[f];if(!a.isInResult()||a.ringOut)continue;let S=null,w=a.leftSE,F=a.rightSE,M=[w],V=w.point,b=[];for(;S=w,w=F,M.push(w),w.point!==V;)for(;;){let I=w.getAvailableLinkedEvents();if(I.length===0){let G=M[0].point,W=M[M.length-1].point;throw new Error(`Unable to complete output ring starting at [${G.x}, ${G.y}]. Last matching segment found ends at [${W.x}, ${W.y}].`)}if(I.length===1){F=I[0].otherSE;break}let B=null;for(let G=0,W=b.length;G<W;G++)if(b[G].point===w.point){B=G;break}if(B!==null){let G=b.splice(B)[0],W=M.splice(G.index);W.unshift(W[0].otherSE),u.push(new Be(W.reverse()));continue}b.push({index:M.length,point:w.point});let H=w.getLeftmostComparator(S);F=I.sort(H)[0].otherSE;break}u.push(new Be(M))}return u}constructor(i){this.events=i;for(let u=0,f=i.length;u<f;u++)i[u].segment.ringOut=this;this.poly=null}getGeom(){let i=this.events[0].point,u=[i];for(let M=1,V=this.events.length-1;M<V;M++){let b=this.events[M].point,I=this.events[M+1].point;de(b,i,I)!==0&&(u.push(b),i=b)}if(u.length===1)return null;let f=u[0],p=u[1];de(f,i,p)===0&&u.shift(),u.push(u[0]);let a=this.isExteriorRing()?1:-1,S=this.isExteriorRing()?0:u.length-1,w=this.isExteriorRing()?u.length:-1,F=[];for(let M=S;M!=w;M+=a)F.push([u[M].x,u[M].y]);return F}isExteriorRing(){if(this._isExteriorRing===void 0){let i=this.enclosingRing();this._isExteriorRing=i?!i.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let i=this.events[0];for(let p=1,a=this.events.length;p<a;p++){let S=this.events[p];se.compare(i,S)>0&&(i=S)}let u=i.segment.prevInResult(),f=u?u.prevInResult():null;for(;;){if(!u)return null;if(!f)return u.ringOut;if(f.ringOut!==u.ringOut)return f.ringOut.enclosingRing()!==u.ringOut?u.ringOut:u.ringOut.enclosingRing();u=f.prevInResult(),f=u?u.prevInResult():null}}}class lt{constructor(i){this.exteriorRing=i,i.poly=this,this.interiorRings=[]}addInterior(i){this.interiorRings.push(i),i.poly=this}getGeom(){let i=[this.exteriorRing.getGeom()];if(i[0]===null)return null;for(let u=0,f=this.interiorRings.length;u<f;u++){let p=this.interiorRings[u].getGeom();p!==null&&i.push(p)}return i}}class bt{constructor(i){this.rings=i,this.polys=this._composePolys(i)}getGeom(){let i=[];for(let u=0,f=this.polys.length;u<f;u++){let p=this.polys[u].getGeom();p!==null&&i.push(p)}return i}_composePolys(i){let u=[];for(let f=0,p=i.length;f<p;f++){let a=i[f];if(!a.poly)if(a.isExteriorRing())u.push(new lt(a));else{let S=a.enclosingRing();S.poly||u.push(new lt(S)),S.poly.addInterior(a)}}return u}}class ct{constructor(i){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ye.compare;this.queue=i,this.tree=new h(u),this.segments=[]}process(i){let u=i.segment,f=[];if(i.consumedBy)return i.isLeft?this.queue.remove(i.otherSE):this.tree.remove(u),f;let p=i.isLeft?this.tree.add(u):this.tree.find(u);if(!p)throw new Error(`Unable to find segment #${u.id} [${u.leftSE.point.x}, ${u.leftSE.point.y}] -> [${u.rightSE.point.x}, ${u.rightSE.point.y}] in SweepLine tree.`);let a=p,S=p,w,F;for(;w===void 0;)a=this.tree.prev(a),a===null?w=null:a.key.consumedBy===void 0&&(w=a.key);for(;F===void 0;)S=this.tree.next(S),S===null?F=null:S.key.consumedBy===void 0&&(F=S.key);if(i.isLeft){let M=null;if(w){let b=w.getIntersection(u);if(b!==null&&(u.isAnEndpoint(b)||(M=b),!w.isAnEndpoint(b))){let I=this._splitSafely(w,b);for(let B=0,H=I.length;B<H;B++)f.push(I[B])}}let V=null;if(F){let b=F.getIntersection(u);if(b!==null&&(u.isAnEndpoint(b)||(V=b),!F.isAnEndpoint(b))){let I=this._splitSafely(F,b);for(let B=0,H=I.length;B<H;B++)f.push(I[B])}}if(M!==null||V!==null){let b=null;M===null?b=V:V===null?b=M:b=se.comparePoints(M,V)<=0?M:V,this.queue.remove(u.rightSE),f.push(u.rightSE);let I=u.split(b);for(let B=0,H=I.length;B<H;B++)f.push(I[B])}f.length>0?(this.tree.remove(u),f.push(i)):(this.segments.push(u),u.prev=w)}else{if(w&&F){let M=w.getIntersection(F);if(M!==null){if(!w.isAnEndpoint(M)){let V=this._splitSafely(w,M);for(let b=0,I=V.length;b<I;b++)f.push(V[b])}if(!F.isAnEndpoint(M)){let V=this._splitSafely(F,M);for(let b=0,I=V.length;b<I;b++)f.push(V[b])}}}this.tree.remove(u)}return f}_splitSafely(i,u){this.tree.remove(i);let f=i.rightSE;this.queue.remove(f);let p=i.split(u);return p.push(f),i.consumedBy===void 0&&this.tree.add(i),p}}let Xt=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,Zn=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class Wn{run(i,u,f){be.type=i,O.reset();let p=[new Ze(u,!0)];for(let b=0,I=f.length;b<I;b++)p.push(new Ze(f[b],!1));if(be.numMultiPolys=p.length,be.type==="difference"){let b=p[0],I=1;for(;I<p.length;)R(p[I].bbox,b.bbox)!==null?I++:p.splice(I,1)}if(be.type==="intersection")for(let b=0,I=p.length;b<I;b++){let B=p[b];for(let H=b+1,G=p.length;H<G;H++)if(R(B.bbox,p[H].bbox)===null)return[]}let a=new h(se.compare);for(let b=0,I=p.length;b<I;b++){let B=p[b].getSweepEvents();for(let H=0,G=B.length;H<G;H++)if(a.insert(B[H]),a.size>Xt)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}let S=new ct(a),w=a.size,F=a.pop();for(;F;){let b=F.key;if(a.size===w){let B=b.segment;throw new Error(`Unable to pop() ${b.isLeft?"left":"right"} SweepEvent [${b.point.x}, ${b.point.y}] from segment #${B.id} [${B.leftSE.point.x}, ${B.leftSE.point.y}] -> [${B.rightSE.point.x}, ${B.rightSE.point.y}] from queue.`)}if(a.size>Xt)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(S.segments.length>Zn)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");let I=S.process(b);for(let B=0,H=I.length;B<H;B++){let G=I[B];G.consumedBy===void 0&&a.insert(G)}w=a.size,F=a.pop()}O.reset();let M=Be.factory(S.segments);return new bt(M).getGeom()}}let be=new Wn;var Qn={union:function(g){for(var i=arguments.length,u=new Array(i>1?i-1:0),f=1;f<i;f++)u[f-1]=arguments[f];return be.run("union",g,u)},intersection:function(g){for(var i=arguments.length,u=new Array(i>1?i-1:0),f=1;f<i;f++)u[f-1]=arguments[f];return be.run("intersection",g,u)},xor:function(g){for(var i=arguments.length,u=new Array(i>1?i-1:0),f=1;f<i;f++)u[f-1]=arguments[f];return be.run("xor",g,u)},difference:function(g){for(var i=arguments.length,u=new Array(i>1?i-1:0),f=1;f<i;f++)u[f-1]=arguments[f];return be.run("difference",g,u)}};return Qn})});var qe=new Set,wt=!1;function _e(t,e,n=2){let r=e&&e.length,o=r?e[0]*n:t.length;qe.size&&qe.clear();let s=Kt(t,0,o,n,!0),l=[];if(!s||s.next===s.prev)return l;let c=0,h=0,m=0;if(r&&(s=hr(t,e,s,n)),t.length>80*n){c=t[0],h=t[1];let d=c,y=h;for(let x=n;x<o;x+=n){let v=t[x],E=t[x+1];v<c&&(c=v),E<h&&(h=E),v>d&&(d=v),E>y&&(y=E)}m=Math.max(d-c,y-h),m=m!==0?32767/m:0}return vt(s,l,c,h,m),l}function Kt(t,e,n,r,o){let s=null;if(o===Rr(t,e,n,r)>0)for(let l=e;l<n;l+=r)s=Qt(l/r|0,t[l],t[l+1],s);else for(let l=n-r;l>=e;l-=r)s=Qt(l/r|0,t[l],t[l+1],s);return s&&et(s,s.next)&&(nt(s),s=s.next),s}function Te(t,e=t){let n=e===t,r=t,o;do o=!1,r!==r.next&&(qe.size===0||!qe.has(r))&&(et(r,r.next)||ie(r.prev,r,r.next)===0)?((n||r===e)&&(e=r.prev),wt=!0,nt(r),r=r.prev,o=!0):(n||r!==e)&&(r=r.next,o=!n);while(o||r!==e);return e}function vt(t,e,n,r,o){o&&br(t,n,r,o);let s=t,l=!1;for(;t.prev!==t.next;){let c=t.prev,h=t.next;if(ie(c,t,h)<0&&(o?cr(t,n,r,o):lr(t))){e.push(c.i,t.i,h.i),nt(t),t=h,s=h;continue}if(t=h,t===s){if(wt=!1,t=Te(t),wt){s=t;continue}if(!l){t=fr(t,e),s=t,l=!0;continue}ar(t,e,n,r,o);break}}}function lr(t){let e=t.prev,n=t,r=t.next,o=e.x,s=n.x,l=r.x,c=e.y,h=n.y,m=r.y,d=Math.min(o,s,l),y=Math.min(c,h,m),x=Math.max(o,s,l),v=Math.max(c,h,m),E=r.next;for(;E!==e;){if(E.x>=d&&E.x<=x&&E.y>=y&&E.y<=v&&!(o===E.x&&c===E.y)&&pt(o,c,s,h,l,m,E.x,E.y)&&ie(E.prev,E,E.next)>=0)return!1;E=E.next}return!0}function cr(t,e,n,r){let o=t.prev,s=t,l=t.next,c=o.x,h=s.x,m=l.x,d=o.y,y=s.y,x=l.y,v=Math.min(c,h,m),E=Math.min(d,y,x),A=Math.max(c,h,m),R=Math.max(d,y,x),P=Rt(v,E,e,n,r),C=Rt(A,R,e,n,r),_=t.prevZ;for(;_&&_.z>=P;){if(_.x>=v&&_.x<=A&&_.y>=E&&_.y<=R&&_!==l&&!(c===_.x&&d===_.y)&&pt(c,d,h,y,m,x,_.x,_.y)&&ie(_.prev,_,_.next)>=0)return!1;_=_.prevZ}let L=t.nextZ;for(;L&&L.z<=C;){if(L.x>=v&&L.x<=A&&L.y>=E&&L.y<=R&&L!==l&&!(c===L.x&&d===L.y)&&pt(c,d,h,y,m,x,L.x,L.y)&&ie(L.prev,L,L.next)>=0)return!1;L=L.nextZ}return!0}function fr(t,e){let n=t,r=!1;do{let o=n.prev,s=n.next.next;en(o,n,n.next,s,!1)&&tt(o,s)&&tt(s,o)&&(e.push(o.i,n.i,s.i),nt(n),nt(n.next),n=t=s,r=!0),n=n.next}while(n!==t);return r?Te(n):n}function ar(t,e,n,r,o){let s=t;do{let l=s.next.next;for(;l!==s.prev;){if(s.i!==l.i&&Sr(s,l)){let c=tn(s,l);s=Te(s,s.next),c=Te(c,c.next),vt(s,e,n,r,o),vt(c,e,n,r,o);return}l=l.next}s=s.next}while(s!==t)}var St=!1;function hr(t,e,n,r){let o=[];for(let s=0,l=e.length;s<l;s++){let c=e[s]*r,h=s<l-1?e[s+1]*r:t.length,m=Kt(t,c,h,r,!1);m===m.next&&qe.add(m),o.push(vr(m))}o.sort(pr),xr(t.length/r,e.length),qt(n,n),St=!0;for(let s=0;s<o.length;s++)n=mr(o[s],n);return St=!1,Te(n)}function pr(t,e){return t.x-e.x||t.y-e.y||(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)}function mr(t,e){let n=gr(t,e);if(!n)return e;let r=tn(n,t),o=r.next;return qt(n,o.next),Te(r,r.next),Te(n,n.next)}var Jt=16,ne=new Float64Array(0),ht=0,Et=[],Mt=[];function xr(t,e){let n=Math.ceil((t+2*e)/Jt)+e+2;ne.length<n*4&&(ne=new Float64Array(n*4)),ht=0}function qt(t,e){let n=t;do{let r=ht++;Et[r]=n;let o=1/0,s=1/0,l=-1/0,c=-1/0,h=0;do{let d=n.next;n.z=r,n.x<o&&(o=n.x),n.x>l&&(l=n.x),n.y<s&&(s=n.y),n.y>c&&(c=n.y),d.x<o&&(o=d.x),d.x>l&&(l=d.x),d.y<s&&(s=d.y),d.y>c&&(c=d.y),n=d}while(++h<Jt&&n!==e);Mt[r]=n;let m=r*4;ne[m]=o,ne[m+1]=s,ne[m+2]=l,ne[m+3]=c}while(n!==e)}function dr(t,e){let n=t.z*4;e.x<ne[n]&&(ne[n]=e.x),e.y<ne[n+1]&&(ne[n+1]=e.y),e.x>ne[n+2]&&(ne[n+2]=e.x),e.y>ne[n+3]&&(ne[n+3]=e.y)}function Zt(t){let e=Mt[t];for(;e.prev.next!==e;)e=e.next;return Mt[t]=e,e}function Wt(t){let e=Et[t];for(;e.prev.next!==e;)e=e.next;return Et[t]=e,e}function gr(t,e){let n=e,r=t.x,o=t.y,s=-1/0,l;if(et(t,n))return n;for(let x=0,v=0;x<ht;x++,v+=4){if(o<ne[v+1]||o>ne[v+3]||ne[v]>r||ne[v+2]<=s)continue;let E=Zt(x);n=Wt(x);do{if(n.prev.next===n){if(et(t,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){let A=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(A<=r&&A>s&&(s=A,l=n.x<n.next.x?n:n.next,A===r))return l}}n=n.next}while(n!==E)}if(!l)return null;let c=l.x,h=l.y,m=Math.min(o,h),d=Math.max(o,h),y=1/0;for(let x=0,v=0;x<ht;x++,v+=4){if(ne[v+2]<c||ne[v]>r||ne[v+3]<m||ne[v+1]>d)continue;let E=Zt(x);n=Wt(x);do{if(n.prev.next===n&&r>=n.x&&n.x>=c&&r!==n.x&&pt(o<h?r:s,o,c,h,o<h?s:r,o,n.x,n.y)){let A=Math.abs(o-n.y)/(r-n.x);(tt(n,t)||n.y===o&&n.next.y===o&&n.next.x>r)&&(A<y||A===y&&(n.x>l.x||n.x===l.x&&yr(l,n)))&&(l=n,y=A)}n=n.next}while(n!==E)}return l}function yr(t,e){return ie(t.prev,t,e.prev)<0&&ie(e.next,t,t.next)<0}var xe=[],Qe=[],Le=new Uint32Array(0),Ke=new Uint32Array(0),Je=new Uint32Array(256);function br(t,e,n,r){let o=t,s=0;do o.z=Rt(o.x,o.y,e,n,r),xe[s++]=o,o=o.next;while(o!==t);wr(s);let l=null;for(let c=0;c<s;c++){let h=xe[c];h.prevZ=l,l&&(l.nextZ=h),l=h}l.nextZ=null}function wr(t){if(t<=32){for(let e=1;e<t;e++){let n=xe[e],r=n.z,o=e-1;for(;o>=0&&xe[o].z>r;)xe[o+1]=xe[o],o--;xe[o+1]=n}return}Le.length<t&&(Le=new Uint32Array(t),Ke=new Uint32Array(t),Qe=new Array(t));for(let e=0;e<t;e++)Le[e]=xe[e].z;ft(t,xe,Le,Qe,Ke,0),ft(t,Qe,Ke,xe,Le,8),ft(t,xe,Le,Qe,Ke,16),ft(t,Qe,Ke,xe,Le,24)}function ft(t,e,n,r,o,s){Je.fill(0);for(let c=0;c<t;c++)Je[n[c]>>>s&255]++;let l=0;for(let c=0;c<256;c++){let h=Je[c];Je[c]=l,l+=h}for(let c=0;c<t;c++){let h=n[c],m=Je[h>>>s&255]++;r[m]=e[c],o[m]=h}}function Rt(t,e,n,r,o){return t=(t-n)*o|0,e=(e-r)*o|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function vr(t){let e=t,n=t;do(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next;while(e!==t);return n}function pt(t,e,n,r,o,s,l,c){return(o-l)*(e-c)>=(t-l)*(s-c)&&(t-l)*(r-c)>=(n-l)*(e-c)&&(n-l)*(s-c)>=(o-l)*(r-c)}function Sr(t,e){let n=et(t,e)&&ie(t.prev,t,t.next)>0&&ie(e.prev,e,e.next)>0;return t.next.i!==e.i&&(n||tt(t,e)&&tt(e,t)&&(ie(t.prev,t,e.prev)!==0||ie(t,e.prev,e)!==0))&&!Er(t,e)&&(n||Mr(t,e))}function ie(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function et(t,e){return t.x===e.x&&t.y===e.y}function en(t,e,n,r,o=!0){let s=ie(t,e,n),l=ie(t,e,r),c=ie(n,r,t),h=ie(n,r,e);return(s>0&&l<0||s<0&&l>0)&&(c>0&&h<0||c<0&&h>0)?!0:o?!!(s===0&&at(t,n,e)||l===0&&at(t,r,e)||c===0&&at(n,t,r)||h===0&&at(n,e,r)):!1}function at(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Er(t,e){let n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),o=Math.min(t.y,e.y),s=Math.max(t.y,e.y),l=t;do{let c=l.next;if(l.x>r&&c.x>r||l.x<n&&c.x<n||l.y>s&&c.y>s||l.y<o&&c.y<o){l=c;continue}if(l.i!==t.i&&c.i!==t.i&&l.i!==e.i&&c.i!==e.i&&en(l,c,t,e))return!0;l=c}while(l!==t);return!1}function tt(t,e){return ie(t.prev,t,t.next)<0?ie(t,e,t.next)>=0&&ie(t,t.prev,e)>=0:ie(t,e,t.prev)<0||ie(t,t.next,e)<0}function Mr(t,e){let n=t,r=!1,o=(t.x+e.x)/2,s=(t.y+e.y)/2;do{let l=n.next;n.y>s!=l.y>s&&o<(l.x-n.x)*(s-n.y)/(l.y-n.y)+n.x&&(r=!r),n=l}while(n!==t);return r}function tn(t,e){let n=Ft(t.i,t.x,t.y),r=Ft(e.i,e.x,e.y),o=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=o,o.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function Qt(t,e,n,r){let o=Ft(t,e,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function nt(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ),St&&dr(t.prev,t.next)}function Ft(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function Rr(t,e,n,r){let o=0;for(let s=e,l=n-r;s<n;s+=r)o+=(t[l]-t[s])*(t[s+1]+t[l+1]),l=s;return o}var nn=23283064365386963e-26,Fr=12,rn=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),Pt=0,mt=1,rt=2,xt=5,it=class{constructor(e=new Uint8Array(16)){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(e,n,r=this.length){for(;this.pos<r;){let o=this.readVarint(),s=o>>3,l=this.pos;this.type=o&7,e(s,n,this),this.pos===l&&this.skip(o)}return n}readMessage(e,n){return this.readFields(e,n,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*4294967296;return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*4294967296;return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){let n=this.buf,r,o;return o=n[this.pos++],r=o&127,o<128||(o=n[this.pos++],r|=(o&127)<<7,o<128)||(o=n[this.pos++],r|=(o&127)<<14,o<128)||(o=n[this.pos++],r|=(o&127)<<21,o<128)?r:(o=n[this.pos],r|=(o&15)<<28,Pr(r,e,this))}readVarint64(){return this.readVarint(!0)}readSVarint(){let e=this.readVarint();return e%2===1?(e+1)/-2:e/2}readBoolean(){return!!this.readVarint()}readString(){let e=this.readVarint()+this.pos,n=this.pos;return this.pos=e,e-n>=Fr&&rn?rn.decode(this.buf.subarray(n,e)):Gr(this.buf,n,e)}readBytes(){let e=this.readVarint()+this.pos,n=this.buf.subarray(this.pos,e);return this.pos=e,n}readPackedVarint(e=[],n){let r=this.readPackedEnd();for(;this.pos<r;)e.push(this.readVarint(n));return e}readPackedSVarint(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readSVarint());return e}readPackedBoolean(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readBoolean());return e}readPackedFloat(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readFloat());return e}readPackedDouble(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readDouble());return e}readPackedFixed32(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readFixed32());return e}readPackedSFixed32(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readSFixed32());return e}readPackedFixed64(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readFixed64());return e}readPackedSFixed64(e=[]){let n=this.readPackedEnd();for(;this.pos<n;)e.push(this.readSFixed64());return e}readPackedEnd(){return this.type===rt?this.readVarint()+this.pos:this.pos+1}skip(e){let n=e&7;if(n===Pt)for(;this.buf[this.pos++]>127;);else if(n===rt)this.pos=this.readVarint()+this.pos;else if(n===xt)this.pos+=4;else if(n===mt)this.pos+=8;else throw new Error(`Unimplemented type: ${n}`)}writeTag(e,n){this.writeVarint(e<<3|n)}realloc(e){let n=this.length||16;for(;n<this.pos+e;)n*=2;if(n!==this.length){let r=new Uint8Array(n);r.set(this.buf),this.buf=r,this.dataView=new DataView(r.buffer),this.length=n}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}writeSFixed32(e){this.realloc(4),this.dataView.setInt32(this.pos,e,!0),this.pos+=4}writeFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*nn),!0),this.pos+=8}writeSFixed64(e){this.realloc(8),this.dataView.setInt32(this.pos,e&-1,!0),this.dataView.setInt32(this.pos+4,Math.floor(e*nn),!0),this.pos+=8}writeVarint(e){if(e=+e||0,e>268435455||e<0){Ir(e,this);return}this.realloc(4),this.buf[this.pos++]=e&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=(e>>>=7)&127|(e>127?128:0),!(e<=127)&&(this.buf[this.pos++]=e>>>7&127)))}writeSVarint(e){this.writeVarint(e<0?-e*2-1:e*2)}writeBoolean(e){this.writeVarint(+e)}writeString(e){e=String(e),this.realloc(e.length*4),this.pos++;let n=this.pos;this.pos=Nr(this.buf,e,this.pos);let r=this.pos-n;r>=128&&on(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r}writeFloat(e){this.realloc(4),this.dataView.setFloat32(this.pos,e,!0),this.pos+=4}writeDouble(e){this.realloc(8),this.dataView.setFloat64(this.pos,e,!0),this.pos+=8}writeBytes(e){let n=e.length;this.writeVarint(n),this.realloc(n);for(let r=0;r<n;r++)this.buf[this.pos++]=e[r]}writeRawMessage(e,n){this.pos++;let r=this.pos;e(n,this);let o=this.pos-r;o>=128&&on(r,o,this),this.pos=r-1,this.writeVarint(o),this.pos+=o}writeMessage(e,n,r){this.writeTag(e,rt),this.writeRawMessage(n,r)}writePackedVarint(e,n){n.length&&this.writeMessage(e,Ar,n)}writePackedSVarint(e,n){n.length&&this.writeMessage(e,Br,n)}writePackedBoolean(e,n){n.length&&this.writeMessage(e,Cr,n)}writePackedFloat(e,n){n.length&&this.writeMessage(e,Lr,n)}writePackedDouble(e,n){n.length&&this.writeMessage(e,Tr,n)}writePackedFixed32(e,n){n.length&&this.writeMessage(e,Vr,n)}writePackedSFixed32(e,n){n.length&&this.writeMessage(e,Or,n)}writePackedFixed64(e,n){n.length&&this.writeMessage(e,Ur,n)}writePackedSFixed64(e,n){n.length&&this.writeMessage(e,Dr,n)}writeBytesField(e,n){this.writeTag(e,rt),this.writeBytes(n)}writeFixed32Field(e,n){this.writeTag(e,xt),this.writeFixed32(n)}writeSFixed32Field(e,n){this.writeTag(e,xt),this.writeSFixed32(n)}writeFixed64Field(e,n){this.writeTag(e,mt),this.writeFixed64(n)}writeSFixed64Field(e,n){this.writeTag(e,mt),this.writeSFixed64(n)}writeVarintField(e,n){this.writeTag(e,Pt),this.writeVarint(n)}writeSVarintField(e,n){this.writeTag(e,Pt),this.writeSVarint(n)}writeStringField(e,n){this.writeTag(e,rt),this.writeString(n)}writeFloatField(e,n){this.writeTag(e,xt),this.writeFloat(n)}writeDoubleField(e,n){this.writeTag(e,mt),this.writeDouble(n)}writeBooleanField(e,n){this.writeVarintField(e,+n)}};function Pr(t,e,n){let r=n.buf,o,s;if(s=r[n.pos++],o=(s&112)>>4,s<128||(s=r[n.pos++],o|=(s&127)<<3,s<128)||(s=r[n.pos++],o|=(s&127)<<10,s<128)||(s=r[n.pos++],o|=(s&127)<<17,s<128)||(s=r[n.pos++],o|=(s&127)<<24,s<128)||(s=r[n.pos++],o|=(s&1)<<31,s<128))return De(t,o,e);throw new Error("Expected varint not more than 10 bytes")}function De(t,e,n){return n?e*4294967296+(t>>>0):(e>>>0)*4294967296+(t>>>0)}function Ir(t,e){let n,r;if(t>=0?(n=t%4294967296|0,r=t/4294967296|0):(n=~(-t%4294967296),r=~(-t/4294967296),n^4294967295?n=n+1|0:(n=0,r=r+1|0)),t>=18446744073709552e3||t<-18446744073709552e3)throw new Error("Given varint doesn\'t fit into 10 bytes");e.realloc(10),kr(n,r,e),_r(r,e)}function kr(t,e,n){n.buf[n.pos++]=t&127|128,t>>>=7,n.buf[n.pos++]=t&127|128,t>>>=7,n.buf[n.pos++]=t&127|128,t>>>=7,n.buf[n.pos++]=t&127|128,t>>>=7,n.buf[n.pos]=t&127}function _r(t,e){let n=(t&7)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=t&127)))))}function on(t,e,n){let r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));n.realloc(r);for(let o=n.pos-1;o>=t;o--)n.buf[o+r]=n.buf[o]}function Ar(t,e){for(let n=0;n<t.length;n++)e.writeVarint(t[n])}function Br(t,e){for(let n=0;n<t.length;n++)e.writeSVarint(t[n])}function Lr(t,e){for(let n=0;n<t.length;n++)e.writeFloat(t[n])}function Tr(t,e){for(let n=0;n<t.length;n++)e.writeDouble(t[n])}function Cr(t,e){for(let n=0;n<t.length;n++)e.writeBoolean(t[n])}function Vr(t,e){for(let n=0;n<t.length;n++)e.writeFixed32(t[n])}function Or(t,e){for(let n=0;n<t.length;n++)e.writeSFixed32(t[n])}function Ur(t,e){for(let n=0;n<t.length;n++)e.writeFixed64(t[n])}function Dr(t,e){for(let n=0;n<t.length;n++)e.writeSFixed64(t[n])}function Gr(t,e,n){let r="",o=e;for(;o<n;){let s=t[o],l=null,c=s>239?4:s>223?3:s>191?2:1;if(o+c>n)break;let h,m,d;c===1?s<128&&(l=s):c===2?(h=t[o+1],(h&192)===128&&(l=(s&31)<<6|h&63,l<=127&&(l=null))):c===3?(h=t[o+1],m=t[o+2],(h&192)===128&&(m&192)===128&&(l=(s&15)<<12|(h&63)<<6|m&63,(l<=2047||l>=55296&&l<=57343)&&(l=null))):c===4&&(h=t[o+1],m=t[o+2],d=t[o+3],(h&192)===128&&(m&192)===128&&(d&192)===128&&(l=(s&15)<<18|(h&63)<<12|(m&63)<<6|d&63,(l<=65535||l>=1114112)&&(l=null))),l===null?(l=65533,c=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|l&1023),r+=String.fromCharCode(l),o+=c}return r}function Nr(t,e,n){for(let r=0,o,s;r<e.length;r++){if(o=e.charCodeAt(r),o>55295&&o<57344)if(s)if(o<56320){t[n++]=239,t[n++]=191,t[n++]=189,s=o;continue}else o=s-55296<<10|o-56320|65536,s=null;else{o>56319||r+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):s=o;continue}else s&&(t[n++]=239,t[n++]=191,t[n++]=189,s=null);o<128?t[n++]=o:(o<2048?t[n++]=o>>6|192:(o<65536?t[n++]=o>>12|224:(t[n++]=o>>18|240,t[n++]=o>>12&63|128),t[n++]=o>>6&63|128),t[n++]=o&63|128)}return n}var It=class t{constructor(e,n,r,o){this.pbf=e;this.keys=n;this.values=r;this.extent=o;this.type=0;this.properties={};this.geomOffset=-1}static read(e,n,r,o,s){let l=new t(e,r,o,s);return e.readFields(zr,l,n),l}loadGeometry(){if(this.geomOffset<0)return[];let e=this.pbf,n=e.pos;e.pos=this.geomOffset;let r=e.readVarint()+e.pos,o=1,s=0,l=0,c=0,h=[],m=[];for(;e.pos<r;){if(s<=0){let d=e.readVarint();o=d&7,s=d>>3}if(s--,o===1||o===2)l+=e.readSVarint(),c+=e.readSVarint(),o===1&&(m.length&&h.push(m),m=[]),m.push(l,c);else if(o===7)m.length>=2&&m.push(m[0],m[1]);else throw new Error(`[osmgl] \\u043D\\u0435\\u0438\\u0437\\u0432\\u0435\\u0441\\u0442\\u043D\\u0430\\u044F \\u043A\\u043E\\u043C\\u0430\\u043D\\u0434\\u0430 \\u0433\\u0435\\u043E\\u043C\\u0435\\u0442\\u0440\\u0438\\u0438 MVT: ${o}`)}return m.length&&h.push(m),e.pos=n,h}bbox(){let e=this.loadGeometry(),n=1/0,r=1/0,o=-1/0,s=-1/0;for(let l of e)for(let c=0;c<l.length;c+=2)l[c]<n&&(n=l[c]),l[c]>o&&(o=l[c]),l[c+1]<r&&(r=l[c+1]),l[c+1]>s&&(s=l[c+1]);return[n,r,o,s]}};function zr(t,e,n){n&&(t===1?e.id=n.readVarint():t===2?Hr(n,e):t===3?e.type=n.readVarint():t===4&&(e.geomOffset=n.pos,n.skip(2)))}function Hr(t,e){let n=t.readVarint()+t.pos;for(;t.pos<n;){let r=e.keys[t.readVarint()],o=e.values[t.readVarint()];r!==void 0&&(e.properties[r]=o)}}var kt=class t{constructor(e){this.pbf=e;this.version=1;this.name="";this.extent=4096;this.featureOffsets=[];this.keys=[];this.values=[]}static read(e,n){let r=new t(e);return e.readFields($r,r,n),r}get length(){return this.featureOffsets.length}feature(e){let n=this.pbf;n.pos=this.featureOffsets[e];let r=n.readVarint()+n.pos;return It.read(n,r,this.keys,this.values,this.extent)}*features(){for(let e=0;e<this.featureOffsets.length;e++)yield this.feature(e)}};function $r(t,e,n){n&&(t===15?e.version=n.readVarint():t===1?e.name=n.readString():t===5?e.extent=n.readVarint():t===2?e.featureOffsets.push(n.pos):t===3?e.keys.push(n.readString()):t===4&&e.values.push(jr(n)))}function jr(t){let e=t.readVarint()+t.pos,n=null;for(;t.pos<e;){let r=t.readVarint()>>3;r===1?n=t.readString():r===2?n=t.readFloat():r===3?n=t.readDouble():r===4?n=t.readVarint64():r===5?n=t.readVarint():r===6?n=t.readSVarint():r===7?n=t.readBoolean():t.skip(r)}return n}var dt=class{constructor(e){this.layers={};new it(e instanceof Uint8Array?e:new Uint8Array(e)).readFields((r,o,s)=>{if(r===3&&s){let l=kt.read(s,s.readVarint()+s.pos);l.length&&(this.layers[l.name]=l)}},null)}};function Ge(t){let e=[],n=null;for(let r of t){if(r.length<6)continue;let o=Xr(r);o!==0&&(o>0?(n&&e.push(n),n={outer:r,holes:[]}):n&&n.holes.push(r))}return n&&e.push(n),e}function Xr(t){let e=0;for(let n=0,r=t.length-2;n<t.length;r=n,n+=2)e+=(t[r]-t[n])*(t[n+1]+t[r+1]);return e/2}function ue(t,e){if(!t)return!0;let n=t[0];switch(n){case"all":return t.slice(1).every(r=>ue(r,e));case"any":return t.slice(1).some(r=>ue(r,e));case"!":return!ue(t[1],e);case"has":return e[t[1]]!=null;case"!has":return e[t[1]]==null;case"in":{let r=e[t[1]];return r==null?!1:t.slice(2).includes(r)}case"!in":{let r=e[t[1]];return r==null?!0:!t.slice(2).includes(r)}default:{let r=e[t[1]],o=t[2];if(r==null)return n==="!=";switch(n){case"==":return r===o;case"!=":return r!==o;case">":return r>o;case">=":return r>=o;case"<":return r<o;case"<=":return r<=o;default:return!0}}}}var Yr=Math.PI/8,Zr=.35,Wr=32,sn=.25,un=.07;function Re(t,e){let n=e.radius;if(!(n>0))return t;let r=t.length/2-1;if(r<3)return t;let o=Math.max(2,Math.round(e.segments??4)),s=Math.max(e.minCutRatio??Zr,0),l=e.extent,c=e.margin??0,h=[];for(let m=0;m<r;m++){let d=t[m*2],y=t[m*2+1],x=t[(m+r-1)%r*2],v=t[(m+r-1)%r*2+1],E=t[(m+1)%r*2],A=t[(m+1)%r*2+1],R=d-x,P=y-v,C=E-d,_=A-y,L=Math.hypot(R,P),U=Math.hypot(C,_);if(L<1e-6||U<1e-6){h.push(d,y);continue}let O=R/L,N=P/L,k=C/U,T=_/U;if(e.keep?.[m]){h.push(d,y);continue}let j=O*k+N*T;if(j>.985){h.push(d,y);continue}if(l!==void 0&&(_t(d,y,l,c)||_t(x,v,l,c)||_t(E,A,l,c))){h.push(d,y);continue}let X=Math.min(n,L*.4,U*.4);if(X<n*s){h.push(d,y);continue}let K=d-O*X,q=y-N*X,Y=d+k*X,$=y+T*X,D=Math.acos(Math.max(-1,Math.min(1,j))),z=Math.min(Yr,Math.PI/2/o),Q=Math.ceil(D/z-1e-6),te=e.maxChord&&e.maxChord>0?Math.ceil(X/Math.tan(D/2)*D/e.maxChord):0,J=Math.max(1,Math.min(Wr,Math.max(Math.min(o,Q),te)));h.push(K,q);for(let he=1;he<J;he++){let pe=he/J,oe=1-pe;h.push(oe*oe*K+2*oe*pe*d+pe*pe*Y,oe*oe*q+2*oe*pe*y+pe*pe*$)}h.push(Y,$)}return h.length<6?t:(h.push(h[0],h[1]),h)}var _t=(t,e,n,r)=>t<=-r||e<=-r||t>=n+r||e>=n+r;var Fe=t=>t/64;function Ne(t,e,n=0){let r=ln(t.outer,e,n);if(!r)return null;let o=[];for(let s of t.holes){let l=ln(s,e,n);l&&o.push(l)}return{outer:r,holes:o}}function ln(t,e,n){let r=[];for(let o=0;o<t.length-2;o+=2)r.push(t[o],t[o+1]);if(r.length<6)return null;for(let o=0;o<4;o++){let s=r;r=[];let l=s.length/2;if(l===0)return null;for(let c=0;c<l;c++){let h=s[c*2],m=s[c*2+1],d=s[(c+l-1)%l*2],y=s[(c+l-1)%l*2+1],x=cn(h,m,o,e,n),v=cn(d,y,o,e,n);if(x!==v){let E=Qr(d,y,h,m,o,e,n);r.push(d+(h-d)*E,y+(m-y)*E)}x&&r.push(h,m)}}return r.length<6?null:(r.push(r[0],r[1]),r)}function cn(t,e,n,r,o){return n===0?t>=-o:n===1?t<=r+o:n===2?e>=-o:e<=r+o}function Qr(t,e,n,r,o,s,l){return o===0?(-l-t)/(n-t):o===1?(s+l-t)/(n-t):o===2?(-l-e)/(r-e):(s+l-e)/(r-e)}function gt(t,e,n,r,o,s=0){let l=-s,c=o+s;return t===l&&n===l||t===c&&n===c||e===l&&r===l||e===c&&r===c}function fn(t,e){for(let n=0;n<t.length;n+=2)if(t[n]<=0||t[n]>=e||t[n+1]<=0||t[n+1]>=e)return!0;return!1}var Lt=18,Tt=4,xn=65535/Tt,Kr=9,Jr=1,qr=0,ei=1,ti=2;var an=0,ni=1,hn=2,ri=3,ii=.47;function dn(t,e,n,r={}){let o=r.metersPerUnit&&r.metersPerUnit>0?r.metersPerUnit:ii,s=Math.max(1024,t.length*48),l=new ArrayBuffer(s*Lt),c={verts:new DataView(l),vertsU8:new Uint8Array(l),vertOffset:0,vertexCount:0,indices:[],featureIds:[],ensure:()=>{}};c.ensure=x=>h(x);let h=x=>{if(c.vertexCount+x<=s)return;s=Math.max(s*2,c.vertexCount+x);let v=new ArrayBuffer(s*Lt);new Uint8Array(v).set(c.vertsU8.subarray(0,c.vertOffset)),l=v,c.verts=new DataView(v),c.vertsU8=new Uint8Array(v)};for(let x of t.features()){if(x.type!==3||!ue(n,x.properties))continue;let v=Ri(x.properties),E=Fi(x.properties,v);if(v<=E)continue;let A=Ii(x.properties)??Number(x.id??0),R=Mi(A>>>0),P=Ei(R,x.properties),C=Si(x.properties,v),_=Ge(x.loadGeometry());for(let L of _){let U=Ne(L,e);if(!U)continue;let O=fn(U.outer,e),N=(r.cornerRadius??0)/o,k={radius:N,segments:r.cornerSegments,extent:e,minCutRatio:0},T=N>0?{outer:Re(U.outer,k),holes:U.holes.map($=>Re($,k))}:U,j=T.outer.length/2+T.holes.reduce(($,D)=>$+D.length/2,0);h(j*5+32);let X=T.holes.length||O?null:li(T.outer),K=X?mi(x.properties,X,v,R,o):null,q=null,Y=[];if(K&&X){let $=gn(gi(T.outer,o),X,K.shape);Y=yi($,T.outer);let D=bi($,Y);if(D>1e-6){let z=Math.min(Math.max(D*o*ai,pi),hi);q=wi($,z/D,v)}}pn(c,T.outer,E,v,A,P,C,o,e,q);for(let $ of T.holes)pn(c,$,E,v,A,P,C,o,e,null);q?vi(c,Y,q,v,A,P,C,o):ui(c,T.outer,T.holes,v,A,P,C)}}if(!c.indices.length)return null;let m=new Uint32Array(c.indices),d=new Float64Array(c.featureIds);return{vertices:l.slice(0,c.vertOffset),indices:m.buffer,featureIds:d.buffer,vertexCount:c.vertexCount,indexCount:m.length,extent:e}}var Ct=(t,e)=>t|e<<2,At=t=>Math.max(0,Math.min(65535,Math.round(Math.min(t,xn)*Tt)));function ze(t,e,n,r,o,s,l,c,h,m,d=0,y=0,x=0){let v=t.vertOffset;return t.verts.setInt16(v,Math.round(e),!0),t.verts.setInt16(v+2,Math.round(n),!0),t.verts.setUint16(v+4,Math.round(Math.min(r,xn)*Tt),!0),t.vertsU8[v+6]=h,t.vertsU8[v+7]=c,t.verts.setInt8(v+8,Bt(Math.round(o*127))),t.verts.setInt8(v+9,Bt(Math.round(s*127))),t.verts.setInt8(v+10,Bt(Math.round(l*127))),t.vertsU8[v+11]=m,t.verts.setUint16(v+12,At(d),!0),t.verts.setUint16(v+14,At(y),!0),t.verts.setUint16(v+16,At(x),!0),t.vertOffset+=Lt,t.vertexCount++}function pn(t,e,n,r,o,s,l,c,h,m=null){let d=e.length/2;if(d<3)return;let y=Ct(qr,l),x=si(e,c),v=r-n,E=new Float64Array(d*2),A=new Uint8Array(d);{let R=new Float64Array(d*2);for(let P=0;P<d-1;P++){let C=e[P*2+2]-e[P*2],_=e[P*2+3]-e[P*2+1],L=Math.hypot(C,_)||1;R[P*2]=_/L,R[P*2+1]=-C/L}for(let P=0;P<d-1;P++){let C=(P+d-2)%(d-1),_=R[C*2]*R[P*2]+R[C*2+1]*R[P*2+1],L=R[C*2]+R[P*2],U=R[C*2+1]+R[P*2+1],O=Math.hypot(L,U);_>.5&&O>1e-6&&(E[P*2]=L/O,E[P*2+1]=U/O,A[P]=1)}}for(let R=0;R<d-1;R++){let P=e[R*2],C=e[R*2+1],_=e[R*2+2],L=e[R*2+3];if(P===_&&C===L||gt(P,C,_,L,h))continue;let U=_-P,O=L-C,N=Math.hypot(U,O)||1,k=O/N,T=-U/N,j=x.offset[R],X=x.width[R],K=[0,1];if(m){for(let Y=0;Y<m.length;Y++)for(let $=Y+1;$<m.length;$++){let D=Ce(m[Y],P,C)-Ce(m[$],P,C),z=Ce(m[Y],_,L)-Ce(m[$],_,L);if(D===z)continue;let Q=D/(D-z);Q>1e-4&&Q<1-1e-4&&K.push(Q)}K.sort((Y,$)=>Y-$)}let q=(Y,$)=>{if(!m)return r;let D=1/0;for(let z of m)D=Math.min(D,Ce(z,Y,$));return Math.max(r,D)};for(let Y=0;Y+1<K.length;Y++){let $=K[Y],D=K[Y+1];if(D-$<1e-6)continue;let z=P+U*$,Q=C+O*$,te=P+U*D,J=C+O*D,he=j+N*$*c,pe=j+N*D*c,oe=(R+1)%(d-1),Ve=A[R]?E[R*2]:k,de=A[R]?E[R*2+1]:T,ge=A[oe]?E[oe*2]:k,Pe=A[oe]?E[oe*2+1]:T,Ae=k+(Ve-k)*(1-$),Ie=T+(de-T)*(1-$),ke=k+(ge-k)*D,Oe=T+(Pe-T)*D,se=Math.hypot(Ae,Ie)||1,Ue=Math.hypot(ke,Oe)||1,ye=Ae/se,Ye=Ie/se,ut=ke/Ue,Ze=Oe/Ue;t.ensure(4);let Be=ze(t,z,Q,n,ye,Ye,0,0,s,y,he,X,v),lt=ze(t,te,J,n,ut,Ze,0,0,s,y,pe,X,v),bt=ze(t,z,Q,q(z,Q),ye,Ye,0,255,s,y,he,X,v),ct=ze(t,te,J,q(te,J),ut,Ze,0,255,s,y,pe,X,v);t.indices.push(Be,ct,lt,Be,bt,ct),t.featureIds.push(o,o)}}}var oi=.9976;function si(t,e){let n=t.length/2-1,r=[];for(let h=0;h<n;h++){let m=t[h*2+2]-t[h*2],d=t[h*2+3]-t[h*2+1],y=Math.hypot(m,d);r.push(y>0?{x:m/y,y:d/y,len:y*e}:{x:0,y:0,len:0})}let o=(h,m)=>r[h].len>0&&r[m].len>0&&r[h].x*r[m].x+r[h].y*r[m].y>=oi,s=0;for(;s<n&&o((s-1+n)%n,s);)s++;s>=n&&(s=0);let l=new Array(n).fill(0),c=new Array(n).fill(0);for(let h=0;h<n;){let m=(s+h)%n,d=[m],y=r[m].len,x=h+1;for(;x<n;){let E=(s+x)%n;if(!o((s+x-1)%n,E))break;d.push(E),y+=r[E].len,x++}let v=0;for(let E of d)l[E]=v,c[E]=y,v+=r[E].len;h=x}return{offset:l,width:c}}function ui(t,e,n,r,o,s,l){let c=[],h=[];for(let x=0;x<e.length;x++)c.push(e[x]);for(let x of n){h.push(c.length/2);for(let v=0;v<x.length;v++)c.push(x[v])}let m=_e(c,h.length?h:void 0,2);if(!m.length)return;let d=Ct(ei,l),y=t.vertexCount;for(let x=0;x<c.length;x+=2)ze(t,c[x],c[x+1],r,0,0,1,255,s,d);for(let x=0;x<m.length;x+=3)t.indices.push(y+m[x],y+m[x+2],y+m[x+1]),t.featureIds.push(o)}function li(t){let e=ci(t);if(e.length<3)return null;let n=Math.abs(fi(t));if(n<=0)return null;let r=null,o=1/0;for(let s=0;s<e.length;s++){let l=(s+1)%e.length,c=e[l].x-e[s].x,h=e[l].y-e[s].y,m=Math.hypot(c,h);if(m<1e-6)continue;c/=m,h/=m;let d=1/0,y=-1/0,x=1/0,v=-1/0;for(let L of e){let U=L.x*c+L.y*h,O=-L.x*h+L.y*c;U<d&&(d=U),U>y&&(y=U),O<x&&(x=O),O>v&&(v=O)}let E=y-d,A=v-x,R=E*A;if(R<=0||R>=o)continue;o=R;let P=(d+y)/2,C=(x+v)/2,_=E>=A;r={cx:P*c-C*h,cy:P*h+C*c,ax:_?c:-h,ay:_?h:c,halfLong:(_?E:A)/2,halfShort:(_?A:E)/2,fill:n/R}}return r}function ci(t){let e=[];for(let s=0;s<t.length-2;s+=2)e.push({x:t[s],y:t[s+1]});if(e.length<3)return e;e.sort((s,l)=>s.x===l.x?s.y-l.y:s.x-l.x);let n=(s,l,c)=>(l.x-s.x)*(c.y-s.y)-(l.y-s.y)*(c.x-s.x),r=[];for(let s of e){for(;r.length>=2&&n(r[r.length-2],r[r.length-1],s)<=0;)r.pop();r.push(s)}let o=[];for(let s=e.length-1;s>=0;s--){let l=e[s];for(;o.length>=2&&n(o[o.length-2],o[o.length-1],l)<=0;)o.pop();o.push(l)}return r.pop(),o.pop(),r.concat(o)}function fi(t){let e=0;for(let n=0;n<t.length-2;n+=2)e+=t[n]*t[n+3]-t[n+2]*t[n+1];return e/2}var ai=Math.tan(30*Math.PI/180),hi=3.5,pi=.9;function mi(t,e,n,r,o){if(e.fill<.86)return null;let s=e.halfShort*2*o,l=e.halfLong*2*o,c=s*l,h=e.halfShort>0?e.halfLong/e.halfShort:99,m=xi(t);if(!m){if(n>15||c>600||s<3)return null;let d=r%1e3/1e3;c<30?m=d<.5?"skillion":"gabled":h<1.25?m=d<.35?"pyramidal":"hipped":m=d<.8?"gabled":"hipped"}return m==="flat"?null:{shape:m}}function xi(t){let e=String(t.roof_shape??t["roof:shape"]??"").toLowerCase();return e?e==="flat"?"flat":e==="skillion"||e==="lean_to"||e==="shed"?"skillion":e==="hipped"||e==="half-hipped"||e==="gambrel"?"hipped":e==="pyramidal"||e==="dome"||e==="conical"||e==="onion"?"pyramidal":e==="gabled"||e==="mansard"||e==="round"?"gabled":null:null}var Ce=(t,e,n)=>t.a*e+t.b*n+t.c;function di(t,e,n,r){let o=t.length/2;if(o<3)return[];let s=[],l=c=>[t[c*2],t[c*2+1]];for(let c=0;c<o;c++){let[h,m]=l(c),[d,y]=l((c+o-1)%o),x=e*h+n*m+r,v=e*d+n*y+r;if(x<=0!=v<=0){let E=v/(v-x);s.push(d+(h-d)*E,y+(m-y)*E)}x<=0&&s.push(h,m)}return s}function gi(t,e){let n=.5/Math.max(e,1e-6),r=t.length/2-1;if(r<5)return t;let o=[],s=0;o.push(t[0],t[1]);for(let l=1;l<r;l++){let c=t[s*2],h=t[s*2+1],m=t[l*2],d=t[l*2+1],y=m-c,x=d-h,v=Math.hypot(y,x),E=v>1e-6;if(E){for(let A=s+1;A<l;A++)if(Math.abs((t[A*2]-c)*x-(t[A*2+1]-h)*y)/v>=n){E=!1;break}}E||(o.push(t[(l-1)*2],t[(l-1)*2+1]),s=l-1)}return o.length/2<3?t:(o.push(o[0],o[1]),o)}function gn(t,e,n){let{ax:r,ay:o,halfLong:s}=e;if(n==="skillion"){let h=-o,m=r;return[{a:h,b:m,c:-(h*e.cx+m*e.cy)+e.halfShort}]}let l=[],c=t.length/2-1;for(let h=0;h<c;h++){let m=t[h*2],d=t[h*2+1],y=t[(h+1)%c*2],x=t[(h+1)%c*2+1],v=y-m,E=x-d,A=Math.hypot(v,E);if(A<1e-6||n==="gabled"&&Math.abs((v*r+E*o)/A)<.86)continue;let R=-E/A,P=v/A;l.push({a:R,b:P,c:-(R*m+P*d)})}return!l.length&&s>0?gn(t,e,"hipped"):l}function yi(t,e){let n=[];for(let o=0;o<e.length-2;o+=2)n.push(e[o],e[o+1]);if(n.length<6)return[];let r=[];for(let o=0;o<t.length;o++){let s=n;for(let l=0;l<t.length&&s.length>=6;l++)l!==o&&(s=di(s,t[o].a-t[l].a,t[o].b-t[l].b,t[o].c-t[l].c));r.push(s.length>=6?s:[])}return r}function bi(t,e){let n=0;for(let r=0;r<e.length;r++){let o=e[r];for(let s=0;s<o.length;s+=2){let l=Ce(t[r],o[s],o[s+1]);l>n&&(n=l)}}return n}function wi(t,e,n){return t.map(r=>({a:r.a*e,b:r.b*e,c:r.c*e+n}))}function vi(t,e,n,r,o,s,l,c){let h=Ct(ti,l);for(let m=0;m<n.length;m++){let d=e[m];if(!d||d.length<6)continue;let y=_e(d,void 0,2);if(!y.length)continue;let x=-n[m].a/c,v=-n[m].b/c,E=Math.hypot(x,v,1),A={x:x/E,y:v/E,z:1/E};t.ensure(d.length/2);let R=t.vertexCount;for(let P=0;P<d.length;P+=2){let C=Math.max(r,Ce(n[m],d[P],d[P+1]));ze(t,d[P],d[P+1],C,A.x,A.y,A.z,255,s,h)}for(let P=0;P<y.length;P+=3)t.indices.push(R+y[P],R+y[P+2],R+y[P+1]),t.featureIds.push(o)}}function Si(t,e){let n=String(t.class??"").toLowerCase();return n==="industrial"||n==="warehouse"||n==="hangar"||n==="construction"?ri:n==="commercial"||n==="office"||n==="retail"||n==="supermarket"?hn:n==="house"||n==="detached"||n==="garage"||n==="hut"||n==="shed"||e<=7?an:e>=40?hn:ni}function Ei(t,e){let n=String(e.class??""),r=128;return n==="industrial"||n==="warehouse"||n==="construction"?r=96:n==="commercial"||n==="office"||n==="retail"?r=150:(n==="apartments"||n==="residential"||n==="house")&&(r=134),Math.max(0,Math.min(255,r+(t%121-60)))}function Mi(t){let e=t>>>0;return e=(e>>>16^e)*73244475,e=(e>>>16^e)*73244475,e=e>>>16^e,e>>>0}function Ri(t){let e=He(t.render_height)??He(t.height)??Pi(t.levels??t.building_levels??t["building:levels"]);return e&&e>0?Math.max(e,Jr):Kr}function Fi(t,e){let n=He(t.render_min_height)??He(t.min_height)??He(t.base)??0;return n>0&&n<e?n:0}function Pi(t){let e=He(t);return e&&e>0?e*3:null}function He(t){if(typeof t=="number"&&isFinite(t))return t;if(typeof t=="string"){let e=parseFloat(t);if(isFinite(e))return e}return null}var Bt=t=>t>127?127:t<-127?-127:t;function Ii(t){let e=t.osm_id;if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"){let n=Number(e);if(Number.isFinite(n))return n}return null}function ki(t,e,n,r,o){let s=r*r,l=[],c=d=>t[d*2],h=d=>t[d*2+1],m=(d,y)=>{let x=t.length/2;return t.push((c(d)+c(y))/2,(h(d)+h(y))/2),x};for(let d=0;d<e.length;d+=3){l.push([n+e[d],n+e[d+1],n+e[d+2]]);let y=0;for(;l.length&&!(++y>2e4);){let[x,v,E]=l.pop(),A=(c(x)-c(v))**2+(h(x)-h(v))**2,R=(c(v)-c(E))**2+(h(v)-h(E))**2,P=(c(E)-c(x))**2+(h(E)-h(x))**2,C=Math.max(A,R,P);if(C<=s){o.push(x,v,E);continue}if(C===A){let _=m(x,v);l.push([x,_,E],[_,v,E])}else if(C===R){let _=m(v,E);l.push([v,_,x],[_,E,x])}else{let _=m(E,x);l.push([E,_,v],[_,x,v])}}}}function yn(t,e,n=0,r,o=!1,s=4096){let l=[],c=[],h=[];for(let v of t.features()){if(v.type!==3||!ue(e,v.properties))continue;let E=v.properties.osm_id,A=typeof E=="number"?E:typeof E=="string"?Number(E):NaN,R=Number.isFinite(A)?A:Number(v.id??0);for(let P of Ge(v.loadGeometry())){let C=o?Ne(P,s):P;if(!C)continue;let _=[],L=[],U=r?Re(C.outer,r):C.outer;for(let k=0;k<U.length;k++)_.push(U[k]);for(let k of C.holes){let T=r?Re(k,r):k;L.push(_.length/2);for(let j=0;j<T.length;j++)_.push(T[j])}let O=_e(_,L.length?L:void 0,2);if(!O.length)continue;let N=l.length/2;for(let k=0;k<_.length;k++)l.push(_[k]);if(n>0){let k=[];ki(l,O,N,n,k);for(let T=0;T<k.length;T+=3)c.push(k[T],k[T+2],k[T+1]),h.push(R);continue}for(let k=0;k<O.length;k+=3)c.push(N+O[k],N+O[k+2],N+O[k+1]),h.push(R)}}if(!c.length)return null;let m=l.length/2,d=new Int16Array(l),y=new Uint32Array(c);return{featureIds:new Float64Array(h).buffer,vertices:d.buffer,indices:y.buffer,vertexCount:m,indexCount:y.length}}function wn(t){return{shapes:[],cells:[],extent:0,metersPerTile:t}}function vn(t,e,n,r){if(!(n<=0)){t.extent=r;for(let o of e){let s=o.outer;if(s.length<6)continue;let l=1/0,c=1/0,h=-1/0,m=-1/0;for(let d=0;d<s.length;d+=2)s[d]<l&&(l=s[d]),s[d]>h&&(h=s[d]),s[d+1]<c&&(c=s[d+1]),s[d+1]>m&&(m=s[d+1]);t.shapes.push({outer:s,holes:o.holes,level:n,minX:l,minY:c,maxX:h,maxY:m})}t.cells=[]}}function _i(t){t.cells=Array.from({length:32*32},()=>[]);let e=t.extent/32;for(let n=0;n<t.shapes.length;n++){let r=t.shapes[n],o=$e(Math.floor(r.minX/e)),s=$e(Math.floor(r.maxX/e)),l=$e(Math.floor(r.minY/e)),c=$e(Math.floor(r.maxY/e));for(let h=l;h<=c;h++)for(let m=o;m<=s;m++)t.cells[h*32+m].push(n)}}var Sn=t=>t.shapes.length===0;function Vt(t,e,n){!t.cells.length&&t.shapes.length&&_i(t);let r=t.extent/32,o=t.cells[$e(Math.floor(n/r))*32+$e(Math.floor(e/r))];if(!o||!o.length)return 0;let s=0;for(let l of o){let c=t.shapes[l];if(c.level<=s||e<c.minX||e>c.maxX||n<c.minY||n>c.maxY||!bn(c.outer,e,n))continue;let h=!1;for(let m of c.holes)if(bn(m,e,n)){h=!0;break}h||(s=c.level)}return Math.min(Math.round(s*100),127)}function En(t,e){let n=[],r=[],o=t.extent>0?t.metersPerTile/t.extent:0,s=o>0?2/o:0,l=Vt(t,e[0],e[1]);n.push(e[0],e[1]),r.push(l);for(let c=0;c+3<e.length;c+=2){let h=e[c],m=e[c+1],d=e[c+2],y=e[c+3],x=Vt(t,d,y);if(x!==l&&s>0){let v=Math.hypot(d-h,y-m),E=Math.min(Math.ceil(v/s),64),A=l;for(let R=1;R<E;R++){let P=R/E,C=h+(d-h)*P,_=m+(y-m)*P,L=Vt(t,C,_);L!==A&&(n.push(C,_),r.push(L),A=L)}}n.push(d,y),r.push(x),l=x}return{pts:n,levels:r}}var $e=t=>t<0?0:t>31?31:t;function bn(t,e,n){let r=!1,o=t.length/2;for(let s=0,l=o-1;s<o;l=s++){let c=t[s*2],h=t[s*2+1],m=t[l*2],d=t[l*2+1];h>n!=d>n&&e<(m-c)*(n-h)/(d-h)+c&&(r=!r)}return r}var Pn=ur(Mn(),1);function Rn(t){let e=[];for(let n=0;n+1<t.length;n+=2)e.push([t[n],t[n+1]]);return e}function Fn(t){let e=[];for(let r of t)e.push(r[0],r[1]);let n=e.length;return n>=4&&(e[0]!==e[n-2]||e[1]!==e[n-1])&&e.push(e[0],e[1]),e}function In(t,e,n=0){if(t.length<2)return t;let r=new Map;for(let s of t){let l=s.lift??0,c=r.get(l);c?c.push(s):r.set(l,[s])}let o=[];for(let[s,l]of r){if(l.length<2){o.push(...l);continue}let h=(n>0&&e?l.map(y=>({outer:e(y.outer,-n)??y.outer,holes:y.holes.map(x=>e(x,n)??x)})):l).map(y=>[Rn(y.outer),...y.holes.map(Rn)]),m;try{m=Pn.union(h[0],...h.slice(1))}catch{o.push(...l);continue}let d=m;if(!Array.isArray(d)||d.length===0){o.push(...l);continue}for(let y of d){if(!y.length)continue;let x=Fn(y[0]);if(x.length<8)continue;let v=[];for(let E=1;E<y.length;E++){let A=Fn(y[E]);A.length>=8&&v.push(A)}o.push(s?{outer:x,holes:v,lift:s}:{outer:x,holes:v})}}return o}var Ht=16,Ai=64,Bi=0,Li=1,kn=2,Ti=3,yt=1,Ci=.6;function Tn(t,e,n,r){let o=r.metersPerUnit>0?r.metersPerUnit:.5,s=r.elevation,l=r.base??0,c=Math.max(r.bevel??0,0)/o,h=Math.max(r.bevelDrop??0,0),m=Math.max(r.cornerRadius??0,0)/o,d=Math.max(512,t.length*24),y=new ArrayBuffer(d*Ht),x={view:new DataView(y),bytes:new Uint8Array(y),offset:0,count:0,indices:[],extent:e,ensure(k){if(x.count+k<=d)return;d=Math.max(d*2,x.count+k);let T=new ArrayBuffer(d*Ht);new Uint8Array(T).set(x.bytes.subarray(0,x.offset)),y=T,x.view=new DataView(T),x.bytes=new Uint8Array(T)}},v=[],E=new Map;for(let k of t.features()){if(k.type!==3||!ue(n,k.properties))continue;let T=r.liftBy?.(k.properties)??0;for(let j of Ge(k.loadGeometry())){let X=Ne(j,e,Fe(e));X&&v.push(T?{...X,lift:T}:X)}}let A=new Set,R=Math.max(r.weld??Ci,0),P=In(v,(k,T)=>Gt(k,T,e,A),R/o),C=R>0?P.map(k=>({...k,outer:Ln(k.outer,R/o,e),holes:k.holes.map(T=>Ln(T,R/o,e))})):P;for(let k of C){_n(k.outer,E);for(let T of k.holes)_n(T,E)}r.onShapes?.(C);let _=new Set;for(let[k,T]of E)T>1&&_.add(k);let L=[],U={radius:m,segments:r.cornerSegments,extent:e,margin:Fe(e),minCutRatio:0,maxChord:sn/o};for(let k of C){let T=m>0?{outer:Re(k.outer,{...U,keep:An(k.outer,_)}),holes:k.holes.map(z=>Re(z,{...U,keep:An(z,_)}))}:k,j=c>0?Gt(T.outer,c,e,_):T.outer,X=T.holes.map(z=>c>0?Gt(z,-c,e,_):z),K=k.lift??0,q=s+K,Y=l+K;Bn(x,j??T.outer,X.map((z,Q)=>z??T.holes[Q]),q);let $=q,D=q-h;j&&c>0&&h>0&&Dt(x,j,T.outer,$,D,Li,e,_),D!==Y&&Dt(x,T.outer,T.outer,D,Y,kn,e,_);for(let z of T.holes)if(D!==Y&&Dt(x,z,z,D,Y,kn,e,_),q<Y){let Q=x.indices.length;Bn(x,z,[],Y,Ti);for(let te=Q;te<x.indices.length;te++)L.push(x.indices[te]);x.indices.length=Q}}if(!x.indices.length&&!L.length)return null;let O=x.indices.length,N=new Uint32Array(O+L.length);return N.set(x.indices,0),N.set(L,O),{vertices:y.slice(0,x.offset),indices:N.buffer,vertexCount:x.count,indexCount:N.length,extent:e,capIndexOffset:O}}function je(t,e,n,r){let o=`${Math.round(t*100)},${Math.round(e*100)}`,s=`${Math.round(n*100)},${Math.round(r*100)}`;return o<s?`${o}|${s}`:`${s}|${o}`}function _n(t,e){for(let n=0;n+3<t.length;n+=2){let r=je(t[n],t[n+1],t[n+2],t[n+3]);e.set(r,(e.get(r)??0)+1)}}function An(t,e){if(!e.size)return;let n=t.length/2-1,r=new Array(n).fill(!1);for(let o=0;o<n;o++){let s=je(t[(o+n-1)%n*2],t[(o+n-1)%n*2+1],t[o*2],t[o*2+1]),l=je(t[o*2],t[o*2+1],t[(o+1)%n*2],t[(o+1)%n*2+1]);(e.has(s)||e.has(l))&&(r[o]=!0)}return r}function ot(t,e,n,r,o,s,l,c){let h=t.offset;return t.view.setFloat32(h,e,!0),t.view.setFloat32(h+4,n,!0),t.view.setInt16(h+8,Vi(Math.round(r*Ai)),!0),t.view.setInt8(h+10,zt(Math.round(o*127))),t.view.setInt8(h+11,zt(Math.round(s*127))),t.view.setInt8(h+12,zt(Math.round(l*127))),t.bytes[h+13]=c,t.view.setInt8(h+14,e<=0?-yt:e>=t.extent?yt:0),t.view.setInt8(h+15,n<=0?-yt:n>=t.extent?yt:0),t.offset+=Ht,t.count++}function Bn(t,e,n,r,o=Bi){let s=[],l=[];for(let m=0;m<e.length;m++)s.push(e[m]);for(let m of n){l.push(s.length/2);for(let d=0;d<m.length;d++)s.push(m[d])}let c=_e(s,l.length?l:void 0,2);if(!c.length)return;t.ensure(s.length/2);let h=t.count;for(let m=0;m<s.length;m+=2)ot(t,s[m],s[m+1],r,0,0,1,o);for(let m=0;m<c.length;m+=3)t.indices.push(h+c[m],h+c[m+2],h+c[m+1])}function Dt(t,e,n,r,o,s,l,c){let h=Math.min(e.length,n.length)/2;if(!(h<3)){t.ensure((h-1)*4);for(let m=0;m<h-1;m++){let d=n[m*2],y=n[m*2+1],x=n[m*2+2],v=n[m*2+3];if(d===x&&y===v||gt(d,y,x,v,l,Fe(l))||c.has(je(d,y,x,v)))continue;let E=x-d,A=v-y,R=Math.hypot(E,A)||1,P=A/R,C=-E/R,_=r-o,L=Math.hypot(e[m*2]-d,e[m*2+1]-y)||0,U=0;if(L>1e-6&&_!==0){let j=1/Math.hypot(1,_/L);U=L/Math.hypot(L,_)*Math.sign(_),P*=j,C*=j}let O=ot(t,e[m*2],e[m*2+1],r,P,C,U,s),N=ot(t,e[m*2+2],e[m*2+3],r,P,C,U,s),k=ot(t,d,y,o,P,C,U,s),T=ot(t,x,v,o,P,C,U,s);t.indices.push(k,N,T,k,O,N)}}}function Gt(t,e,n,r){let o=t.length/2-1;if(o<3)return null;let s=[];for(let d=0;d<o;d++){let y=t[d*2],x=t[d*2+1],v=t[(d+o-1)%o*2],E=t[(d+o-1)%o*2+1],A=t[(d+1)%o*2],R=t[(d+1)%o*2+1],P=Math.hypot(y-v,x-E)||1,C=Math.hypot(A-y,R-x)||1,_=(x-E)/P,L=-(y-v)/P,U=(R-x)/C,O=-(A-y)/C,N=_+U,k=L+O,T=Math.hypot(N,k);if(T<1e-6){s.push(y,x);continue}N/=T,k/=T;let j=Math.min(1/Math.max(N*_+k*L,.35),3),X=y-N*e*j,K=x-k*e*j,q=je(v,E,y,x),Y=je(y,x,A,R);if(r.has(q)||r.has(Y)){s.push(y,x);continue}let $=-Fe(n),D=n+Fe(n),z=(Q,te)=>Q<=$||Q>=D||te<=$||te>=D;(z(y,x)||z(v,E)||z(A,R))&&(X=y,K=x),s.push(X,K)}s.push(s[0],s[1]);let l=Math.abs(Nt(t)),c=Nt(s);if(Math.sign(c)!==Math.sign(Nt(t))||Math.abs(c)<l*.25)return null;let h=-Fe(n),m=n+Fe(n);for(let d=0;d<s.length;d+=2)s[d]=Math.max(h,Math.min(m,s[d])),s[d+1]=Math.max(h,Math.min(m,s[d+1]));return s}function Nt(t){let e=0;for(let n=0;n<t.length-2;n+=2)e+=t[n]*t[n+3]-t[n+2]*t[n+1];return e/2}var zt=t=>t>127?127:t<-127?-127:t,Vi=t=>t>32767?32767:t<-32768?-32768:t;function Ln(t,e,n){if(!(e>0))return t;let r=Fe(n),o=-r,s=n+r,l=t;for(let c=0;c<3;c++){let h=l.length/2-1;if(h<6)break;let m=new Array(h).fill(!0),d=h;for(let x=0;x<h&&!(d<=5);x++){let v=l[x*2],E=l[x*2+1];if(v<=o||v>=s||E<=o||E>=s)continue;let A=(x+h-1)%h;for(;!m[A]&&A!==x;)A=(A+h-1)%h;let R=(x+1)%h;for(;!m[R]&&R!==x;)R=(R+1)%h;if(A===x||R===x)break;let P=l[A*2],C=l[A*2+1],_=l[R*2]-P,L=l[R*2+1]-C,U=Math.hypot(_,L);U<1e-6||Math.abs((v-P)*L-(E-C)*_)/U<e&&(m[x]=!1,d--)}if(d===h)break;let y=[];for(let x=0;x<h;x++)m[x]&&y.push(l[x*2],l[x*2+1]);y.push(y[0],y[1]),l=y}return l}var st=20;function On(t,e,n=0,r,o=0){let s=Math.max(256,t.length*24),l=new ArrayBuffer(s*st),c=new DataView(l),h=0,m=[],d=R=>{if(h+R<=s)return;s=Math.max(s*2,h+R);let P=new ArrayBuffer(s*st);new Uint8Array(P).set(new Uint8Array(l,0,h*st)),l=P,c=new DataView(P)},y=(R,P,C,_,L,U,O,N=0,k=0,T=0)=>{let j=h*st;return c.setInt16(j,R,!0),c.setInt16(j+2,P,!0),c.setInt16(j+4,C,!0),c.setInt16(j+6,_,!0),c.setInt8(j+8,L),c.setInt8(j+9,U),c.setInt8(j+10,N),c.setInt8(j+11,k),c.setFloat32(j+12,O,!0),c.setFloat32(j+16,T,!0),h++},x=0,v=o>0?12/o:0,E=v>0?Gi(t):null;for(let R of t.features()){if(R.type!==2&&R.type!==3||!ue(e,R.properties))continue;let P=R.properties.width;x=typeof P=="number"&&P>.5&&P<100?P:0;let C=R.type===3;for(let _ of R.loadGeometry()){let L=n>0?Oi(Cn(_),n):Cn(_);if(L.length<4)continue;let U=r&&!Sn(r)?En(r,L):null,O=U?U.pts:L,N=U?.levels,k=O.length/2;if(k<2)continue;let T=null;if(E&&x>0&&!C){let X=0;for(let z=0;z<k-1;z++)X+=Math.hypot(O[z*2+2]-O[z*2],O[z*2+3]-O[z*2+1]);let K=E.get($t(Math.round(O[0]),Math.round(O[1])))??0,q=E.get($t(Math.round(O[k*2-2]),Math.round(O[k*2-1])))??0,Y=K-x,$=q-x,D=Math.min(v,X/2);D>0&&(Y>0||$>0)&&(T=z=>{let Q=0;return Y>0&&z<D&&(Q=Y*(1-z/D)),$>0&&X-z<D&&(Q=Math.max(Q,$*(1-(X-z)/D))),x+Q})}d((k-1)*4);let j=0;for(let X=0;X<k-1;X++){let K=O[X*2],q=O[X*2+1],Y=O[X*2+2],$=O[X*2+3],D=Math.hypot(Y-K,$-q);if(C&&Di(K,q,Y,$,t.extent)){j+=D;continue}let z=Ui(K,q,Y,$,t.extent);if(!z){j+=D;continue}let[Q,te,J,he]=z,pe=Math.hypot(Q-K,te-q),oe=Math.hypot(J-Q,he-te),Ve=Math.hypot(Y-J,$-he),de=j+pe,ge=N?N[X]:0,Pe=N?N[X+1]:0,Ae=T?T(de):x,Ie=T?T(de+oe):x,ke=y(Q,te,J,he,0,-1,de,ge,Pe,Ae),Oe=y(Q,te,J,he,0,1,de,ge,Pe,Ae),se=y(Q,te,J,he,1,1,de,ge,Pe,Ie),Ue=y(Q,te,J,he,1,-1,de,ge,Pe,Ie);j+=pe+oe+Ve,m.push(ke,Oe,se,ke,se,Ue)}}}if(!m.length)return null;let A=new Uint32Array(m);return{vertices:l.slice(0,h*st),indices:A.buffer,vertexCount:h,indexCount:A.length}}function Oi(t,e){let n=[];for(let r=0;r+3<t.length;r+=2){let o=t[r],s=t[r+1],l=t[r+2],c=t[r+3];n.push(o,s);let h=Math.min(64,Math.floor(Math.hypot(l-o,c-s)/e));for(let m=1;m<h;m++){let d=m/h;n.push(o+(l-o)*d,s+(c-s)*d)}}return n.push(t[t.length-2],t[t.length-1]),n}function Cn(t){let e=[];for(let n=0;n<t.length;n+=2){let r=t[n],o=t[n+1],s=e.length;s>=2&&e[s-2]===r&&e[s-1]===o||e.push(r,o)}return e}function Ui(t,e,n,r,o){let s=n-t,l=r-e,c=0,h=1,m=[[-s,t],[s,o-t],[-l,e],[l,o-e]];for(let[d,y]of m){if(d===0){if(y<0)return null;continue}let x=y/d;if(d<0){if(x>h)return null;x>c&&(c=x)}else{if(x<c)return null;x<h&&(h=x)}}return h-c<1e-6?null:[Math.round(t+s*c),Math.round(e+l*c),Math.round(t+s*h),Math.round(e+l*h)]}function Di(t,e,n,r,o){return t===n&&(t<=0||t>=o)?!0:e===r&&(e<=0||e>=o)}var Vn=new WeakMap,$t=(t,e)=>(t+512)*65536+(e+512);function Gi(t){let e=Vn.get(t);if(e)return e;let n=new Map,r=(o,s,l)=>{let c=$t(Math.round(o),Math.round(s)),h=n.get(c);(h===void 0||l>h)&&n.set(c,l)};for(let o of t.features()){if(o.type!==2)continue;let s=o.properties.width;if(!(typeof s!="number"||!(s>.5)||!(s<100)))for(let l of o.loadGeometry())l.length<4||(r(l[0],l[1],s),r(l[l.length-2],l[l.length-1],s))}return Vn.set(t,n),n}var Ni=[["\\u0443\\u043B\\u0438\\u0446\\u0430","\\u0443\\u043B."],["\\u0443\\u043B\\u0438\\u0446\\u044B","\\u0443\\u043B."],["\\u0443\\u043B\\u0438\\u0446\\u0435","\\u0443\\u043B."],["\\u043F\\u0440\\u043E\\u0441\\u043F\\u0435\\u043A\\u0442","\\u043F\\u0440\\u043E\\u0441\\u043F."],["\\u043F\\u0440\\u043E\\u0441\\u043F\\u0435\\u043A\\u0442\\u0430","\\u043F\\u0440\\u043E\\u0441\\u043F."],["\\u043F\\u0435\\u0440\\u0435\\u0443\\u043B\\u043E\\u043A","\\u043F\\u0435\\u0440."],["\\u043F\\u0435\\u0440\\u0435\\u0443\\u043B\\u043A\\u0430","\\u043F\\u0435\\u0440."],["\\u043F\\u0440\\u043E\\u0435\\u0437\\u0434","\\u043F\\u0440-\\u0434"],["\\u043F\\u0440\\u043E\\u0435\\u0437\\u0434\\u0430","\\u043F\\u0440-\\u0434"],["\\u043F\\u043B\\u043E\\u0449\\u0430\\u0434\\u044C","\\u043F\\u043B."],["\\u043F\\u043B\\u043E\\u0449\\u0430\\u0434\\u0438","\\u043F\\u043B."],["\\u0431\\u0443\\u043B\\u044C\\u0432\\u0430\\u0440","\\u0431\\u0443\\u043B."],["\\u0431\\u0443\\u043B\\u044C\\u0432\\u0430\\u0440\\u0430","\\u0431\\u0443\\u043B."],["\\u043D\\u0430\\u0431\\u0435\\u0440\\u0435\\u0436\\u043D\\u0430\\u044F","\\u043D\\u0430\\u0431."],["\\u043D\\u0430\\u0431\\u0435\\u0440\\u0435\\u0436\\u043D\\u043E\\u0439","\\u043D\\u0430\\u0431."],["\\u0448\\u043E\\u0441\\u0441\\u0435","\\u0448."],["\\u0442\\u0443\\u043F\\u0438\\u043A","\\u0442\\u0443\\u043F."],["\\u0442\\u0443\\u043F\\u0438\\u043A\\u0430","\\u0442\\u0443\\u043F."],["\\u043C\\u0438\\u043A\\u0440\\u043E\\u0440\\u0430\\u0439\\u043E\\u043D","\\u043C\\u043A\\u0440."],["\\u043C\\u0438\\u043A\\u0440\\u043E\\u0440\\u0430\\u0439\\u043E\\u043D\\u0430","\\u043C\\u043A\\u0440."],["\\u043A\\u04EF\\u0447\\u0430\\u0438","\\u043A."],["\\u043A\\u0443\\u0447\\u0430\\u0438","\\u043A."],["\\u0445\\u0438\\u0451\\u0431\\u043E\\u043D\\u0438","\\u0445\\u0438\\u0451\\u0431."],["\\u0448\\u043E\\u04B3\\u0440\\u043E\\u04B3\\u0438","\\u0448\\u043E\\u04B3."],["\\u0433\\u0443\\u0437\\u0430\\u0440\\u0433\\u043E\\u04B3\\u0438","\\u0433\\u0443\\u0437."],["\\u043C\\u0430\\u0439\\u0434\\u043E\\u043D\\u0438","\\u043C\\u0430\\u0439\\u0434."]],Un=new Map(Ni);function Dn(t){let e=t.split(" ");if(e.length<2)return t;let n=!1,r=e.map(s=>{let l=Un.get(s.toLowerCase());return l?(n=!0,s[0]===s[0].toUpperCase()?l[0].toUpperCase()+l.slice(1):l):s});return!n||!e.filter(s=>Un.get(s.toLowerCase())===void 0).length?t:r.join(" ")}function Nn(t,e){let n=[],r=[],o=[],s=[],l=[],c=e.textPlacement==="line",h=[],m=[],d=[];for(let y of t.features()){if(!ue(e.filter,y.properties))continue;let x=y.loadGeometry(),v=$i(y.type,x);if(!v)continue;let E=e.textField?Gn(e.textField,y.properties):"",A=E&&e.abbreviate?Dn(E):E,R=e.iconImage?Gn(e.iconImage,y.properties):"";if(!(!A&&!R)){if(c){let P=Hi(y.type,x);if(!P)continue;d.push({text:A,line:P});continue}n.push(v[0],v[1]),r.push(A),o.push(R),s.push(ji(y.properties)),l.push(e.iconRotate&&Math.round(Number(y.properties[e.iconRotate]??0))||0)}}if(c){for(let{text:y,line:x}of zi(d)){m.push(h.length/2);for(let v of x)h.push(v);n.push(Math.round(x[0]),Math.round(x[1])),r.push(y),o.push(""),s.push(128),l.push(0)}m.push(h.length/2)}return r.length?{anchors:new Int16Array(n).buffer,texts:r,icons:o,priorities:new Uint8Array(s).buffer,rotations:new Int16Array(l).buffer,...c?{lines:new Int16Array(h).buffer,lineStarts:new Uint32Array(m).buffer}:{}}:null}function zi(t){let e=[],n=new Map,r=new Map,o=(s,l,c)=>`${s}\\u241F${l}\\u241F${c}`;for(let{text:s,line:l}of t){let c=o(s,l[0],l[1]),h=o(s,l[l.length-2],l[l.length-1]),m=n.get(h),d=r.get(c);if(d!==void 0){let y=e[d];if(y.line.push(...l.slice(2)),r.delete(c),r.set(o(s,y.line[y.line.length-2],y.line[y.line.length-1]),d),m!==void 0&&m!==d){let x=e[m];y.line.push(...x.line.slice(2)),x.line=[],n.delete(h),r.set(o(s,y.line[y.line.length-2],y.line[y.line.length-1]),d)}continue}if(m!==void 0){let y=e[m];y.line.unshift(...l.slice(0,l.length-2)),n.delete(h),n.set(o(s,y.line[0],y.line[1]),m);continue}n.set(c,e.length),r.set(h,e.length),e.push({text:s,line:l})}return e.filter(s=>s.line.length>=4)}function Hi(t,e){if(t!==2)return null;let n=null,r=0;for(let o of e){if(o.length<4)continue;let s=0;for(let l=0;l+3<o.length;l+=2)s+=Math.hypot(o[l+2]-o[l],o[l+3]-o[l+1]);s>r&&(r=s,n=o)}return n}function $i(t,e){if(!e.length)return null;if(t===1){let l=e[0];return l.length>=2?[l[0],l[1]]:null}if(t===2){let l=-1,c=0,h=0;for(let m of e)for(let d=0;d+3<m.length;d+=2){let y=m[d+2]-m[d],x=m[d+3]-m[d+1],v=y*y+x*x;v>l&&(l=v,c=m[d]+y/2,h=m[d+1]+x/2)}return l>0?[Math.round(c),Math.round(h)]:null}let n=1/0,r=1/0,o=-1/0,s=-1/0;for(let l of e)for(let c=0;c<l.length;c+=2)l[c]<n&&(n=l[c]),l[c]>o&&(o=l[c]),l[c+1]<r&&(r=l[c+1]),l[c+1]>s&&(s=l[c+1]);return isFinite(n)?[Math.round((n+o)/2),Math.round((r+s)/2)]:null}function ji(t){let e=t.rank;return typeof e=="number"&&isFinite(e)?Math.max(0,255-Math.min(e,255)):128}function Gn(t,e){let n=Array.isArray(t)?t:[t];for(let r of n){let o=!0,l=r.replace(/\\{([^}]+)\\}/g,(c,h)=>{let m=e[h];return m==null||m===""?(o=!1,""):String(m)}).trim();if(o&&l)return l}return""}function zn(t,e){let n=[],r=[];for(let o=0;o<t.length;o++){let s=t.feature(o);if(s.type===1&&ue(e,s.properties))for(let l of s.loadGeometry())for(let c=0;c+1<l.length;c+=2)n.push(l[c],l[c+1]),r.push(s.properties)}return r.length?{anchors:Int16Array.from(n).buffer,props:r}:null}var Xi="\\u241F",Hn=(t,e)=>t+Xi+String(e);function Yi(){let t=typeof self<"u"?self.origin:void 0;return t&&t!=="null"&&!t.startsWith("blob:")?t+"/":void 0}async function jn(t,e){let n=performance.now(),r=Yi(),o=await fetch(t.url,{signal:e,credentials:"same-origin",...r?{referrer:r}:{}}),s=(R,P,C,_,L=0)=>({type:"loaded",id:t.id,buckets:{},timing:{fetchMs:_,parseMs:L},diag:{status:R,bytes:P,layers:C,built:0}});if(!o.ok){if(o.status===404||o.status===204)return s(o.status,0,[],performance.now()-n);throw new Error(`HTTP ${o.status} \\u0434\\u043B\\u044F ${t.url}`)}let l=await o.arrayBuffer(),c=performance.now()-n;if(l.byteLength===0)return s(o.status,0,[],c);let h=performance.now(),m=new dt(l),d=Object.keys(m.layers),y={},x={},v=[],A=t.plan.some(R=>R.type==="surface"&&(R.elevation??0)>0)&&t.plan.some(R=>R.type==="line"&&R.ground)?wn(t.metersPerTile):void 0;for(let R of t.plan){if(!Wi(R,t.zoom,t.sourceMaxZoom))continue;let P=m.layers[R.sourceLayer];if(!P)continue;let C=Qi(t.zoom,P.extent);try{if(R.splitBy){let L=Ki(P,R.splitBy,R.filter);if(!L.length)continue;let U=x[R.splitBy]??(x[R.splitBy]=[]);for(let O of L){U.includes(O)||U.push(O);let N={...R,splitBy:void 0,filter:Ji(R.filter,R.splitBy,O)},k=$n(N,P,C,t.metersPerTile,A);k&&(y[Hn(R.id,O)]=k)}continue}let _=$n(R,P,C,t.metersPerTile,A);_&&(y[R.id]=_)}catch(_){v.push(`${R.id}: ${_ instanceof Error?_.message:String(_)}`)}}return{type:"loaded",id:t.id,buckets:y,...Object.keys(x).length?{splits:x}:{},timing:{fetchMs:c,parseMs:performance.now()-h},diag:{status:o.status,bytes:l.byteLength,layers:d,built:Object.keys(y).length,...v.length?{failed:v}:{}}}}function Zi(t){return e=>{let n=e.on;if(typeof n!="string"||!n)return 0;let r=0;for(let o of n.split(",")){let s=t[o];typeof s=="number"&&s>r&&(r=s)}return r}}function Wi(t,e,n){let r=e-1,o=e<n?e+1:24;return!(t.maxzoom<r||t.minzoom>o)}function Qi(t,e){return t<=6?Math.max(64,e/24):0}function $n(t,e,n,r,o){{if(t.type==="fill"){let l=r>0?r/e.extent:0,c=t.cornerRadius&&l>0?{radius:t.cornerRadius/l,segments:t.cornerSegments,extent:e.extent,minCutRatio:0,maxChord:un/l}:void 0,h=yn(e,t.filter,n,c,t.clipToTile===!0,e.extent);return h?{kind:"fill",...h,extent:e.extent}:null}if(t.type==="surface"){let l=Tn(e,e.extent,t.filter,{metersPerUnit:r>0?r/e.extent:0,elevation:t.elevation??0,base:t.base,bevel:t.bevel,weld:t.weld,bevelDrop:t.bevelDrop,cornerRadius:t.cornerRadius,cornerSegments:t.cornerSegments,...o?{onShapes:c=>vn(o,c,t.elevation??0,e.extent)}:{},...t.groundBy?{liftBy:Zi(t.groundBy)}:{}});return l?{kind:"surface",...l}:null}if(t.type==="line"){let l=On(e,t.filter,n,t.ground?o:void 0,r>0?r/e.extent:0);return l?{kind:"line",...l,extent:e.extent}:null}if(t.type==="model"){let l=zn(e,t.filter);return l?{kind:"placement",...l,extent:e.extent}:null}if(t.type==="symbol"){let l=Nn(e,{filter:t.filter,textField:t.textField,iconImage:t.iconImage,iconRotate:t.iconRotate,textPlacement:t.textPlacement,abbreviate:t.abbreviate});return l?{kind:"symbol",...l,extent:e.extent}:null}let s=dn(e,e.extent,t.filter,{metersPerUnit:r>0?r/e.extent:0,cornerRadius:t.cornerRadius,cornerSegments:t.cornerSegments});return s?{kind:"fill-extrusion",vertices:s.vertices,indices:s.indices,featureIds:s.featureIds,vertexCount:s.vertexCount,indexCount:s.indexCount,extent:s.extent}:null}}function Ki(t,e,n){let r=[];for(let o of t.features()){if(!ue(n,o.properties))continue;let s=o.properties[e];typeof s!="string"&&typeof s!="number"||r.includes(s)||r.push(s)}return r.sort((o,s)=>typeof o=="number"&&typeof s=="number"?o-s:String(o).localeCompare(String(s))),r}function Ji(t,e,n){let r=["==",e,n];return t?["all",t,r]:r}var qi=t=>t.kind==="symbol",eo=t=>t.kind==="placement";function Xn(t){let e=[];for(let n of Object.values(t.buckets)){if(eo(n)){e.push(n.anchors);continue}if(qi(n)){e.push(n.anchors,n.priorities),n.lines&&e.push(n.lines),n.lineStarts&&e.push(n.lineStarts);continue}e.push(n.vertices,n.indices),n.featureIds&&e.push(n.featureIds)}return e}var Yn=Map;var Xe=new Yn,jt=self;jt.onmessage=t=>{let e=t.data;if(e.type==="abort"){Xe.get(e.id)?.abort(),Xe.delete(e.id);return}let n=new AbortController;Xe.set(e.id,n),jn(e,n.signal).then(r=>{Xe.has(e.id)&&(Xe.delete(e.id),jt.postMessage(r,Xn(r)))}).catch(r=>{let o=n.signal.aborted;Xe.delete(e.id);let s={type:"error",id:e.id,message:r instanceof Error?r.message:String(r),aborted:o};jt.postMessage(s)})};})();\n';var Ir=class{constructor(e=Bi()){this.workers=[];this.blobUrl=null;this.pending=new G;this.nextId=1;this.cursor=0;this.mainThreadAborts=new G;this.destroyed=false;try{let t=new Blob([Ai],{type:"text/javascript"});this.blobUrl=URL.createObjectURL(t);for(let o=0;o<e;o++){let r=new Worker(this.blobUrl);r.onmessage=i=>this.onMessage(i.data),r.onerror=i=>console.error("[osmgl] \u0432\u043E\u0440\u043A\u0435\u0440 \u0443\u043F\u0430\u043B:",i.message),this.workers.push(r);}}catch(t){console.warn("[osmgl] \u0432\u043E\u0440\u043A\u0435\u0440\u044B \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B, \u0440\u0430\u0437\u0431\u043E\u0440 \u0442\u0430\u0439\u043B\u043E\u0432 \u043F\u043E\u0439\u0434\u0451\u0442 \u0432 \u0433\u043B\u0430\u0432\u043D\u043E\u043C \u043F\u043E\u0442\u043E\u043A\u0435:",t),this.disposeWorkers();}this.usingWorkers=this.workers.length>0;}get size(){return this.workers.length}load(e,t){let o=this.nextId++,r={type:"load",id:o,...e};if(!this.usingWorkers){let a=new AbortController;return this.mainThreadAborts.set(o,a),Os(r,a.signal).then(l=>{this.mainThreadAborts.has(o)&&(this.mainThreadAborts.delete(o),t(l));}).catch(l=>{let s=a.signal.aborted;this.mainThreadAborts.delete(o),t({type:"error",id:o,message:l instanceof Error?l.message:String(l),aborted:s});}),o}let i=this.cursor++%this.workers.length;return this.pending.set(o,{resolve:t,workerIndex:i}),this.workers[i].postMessage(r),o}abort(e){if(!this.usingWorkers){this.mainThreadAborts.get(e)?.abort(),this.mainThreadAborts.delete(e);return}let t=this.pending.get(e);if(!t)return;this.pending.delete(e);let o={type:"abort",id:e};this.workers[t.workerIndex].postMessage(o);}onMessage(e){if(this.destroyed)return;let t=this.pending.get(e.id);t&&(this.pending.delete(e.id),t.resolve(e));}disposeWorkers(){for(let e of this.workers)e.terminate();this.workers=[],this.blobUrl&&URL.revokeObjectURL(this.blobUrl),this.blobUrl=null;}destroy(){this.destroyed=true;for(let e of this.mainThreadAborts.values())e.abort();this.mainThreadAborts.clear(),this.pending.clear(),this.disposeWorkers();}};function Bi(){let n=typeof navigator<"u"&&navigator.hardwareConcurrency||4;return Math.max(1,Math.min(n-1,6))}function Ws(n){return Math.max(0,Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10))}function Ci(n,e){let t=Ws(n.zoom),o=[Math.round(n.zoom*100)/100,n.center.lat.toFixed(t),n.center.lng.toFixed(t)],r=Math.round(n.bearing*10)/10,i=Math.round(n.pitch*10)/10;(r!==0||i!==0)&&(o.push(r),i!==0&&o.push(i));let a=o.join("/");return e?`${e}=${a}`:a}function vi(n,e){let t=n.replace(/^#/,"");if(!t)return null;if(e){let s=t.split("&").map(c=>c.split("=")).find(([c])=>c===e);if(!s||s.length<2)return null;t=s[1];}let o=t.split("/");if(o.length<3)return null;let r=Number(o[0]),i=Number(o[1]),a=Number(o[2]);if(!isFinite(r)||!isFinite(i)||!isFinite(a)||Math.abs(i)>90||Math.abs(a)>180)return null;let l={center:{lng:a,lat:i},zoom:r};return o.length>3&&isFinite(Number(o[3]))&&(l.bearing=Number(o[3])),o.length>4&&isFinite(Number(o[4]))&&(l.pitch=Number(o[4])),l}function Vs(n){if(typeof window>"u"||!window.history?.replaceState)return;let e=new URL(window.location.href);e.hash=n,window.history.replaceState(window.history.state,"",e.toString());}var zs={high:{name:"high",maxPixelRatio:2,maxCanvasPixels:16777216,antialias:true,maxWorkers:6,shadowMapSize:1024,detail:1,tileCacheSize:64,allowShadows:true,detailBias:1,maxTiles:512,modelBudget:1,simpleGeometry:false},balanced:{name:"balanced",maxPixelRatio:1.75,maxCanvasPixels:5529600,antialias:true,maxWorkers:4,shadowMapSize:1024,detail:.85,tileCacheSize:40,allowShadows:true,detailBias:1.1,maxTiles:192,modelBudget:.7,simpleGeometry:false},low:{name:"low",maxPixelRatio:1.25,maxCanvasPixels:2592e3,antialias:true,maxWorkers:2,shadowMapSize:512,detail:.5,tileCacheSize:24,allowShadows:false,detailBias:1.25,maxTiles:96,modelBudget:.4,simpleGeometry:true},minimal:{name:"minimal",maxPixelRatio:1,maxCanvasPixels:1152e3,antialias:false,maxWorkers:2,shadowMapSize:512,detail:0,tileCacheSize:16,allowShadows:false,detailBias:1.7,maxTiles:48,modelBudget:.2,simpleGeometry:true}},zt=n=>zs[n]??zs.high;function Lr(n){let{cores:e,memory:t,mobile:o,devicePixelRatio:r}=n;return e<=2||t!==void 0&&t<=2?"minimal":o?e<=4||t!==void 0&&t<=3?"minimal":e<=6||t!==void 0&&t<=4||r>=3?"low":"balanced":e<=4||t!==void 0&&t<=4?"balanced":"high"}function Tr(){if(typeof navigator>"u")return {cores:4,mobile:false,devicePixelRatio:1};let n=navigator,e=typeof matchMedia=="function"&&matchMedia("(pointer: coarse)").matches&&typeof screen<"u"&&Math.min(screen.width,screen.height)<=820,t=n.userAgentData?.mobile===true||e;return {cores:n.hardwareConcurrency||4,memory:n.deviceMemory,mobile:t,devicePixelRatio:typeof devicePixelRatio=="number"?devicePixelRatio:1}}function xi(n,e,t,o){let r=Math.min(t||1,o.maxPixelRatio),i=Math.max(n*e,1),a=Math.sqrt(o.maxCanvasPixels/i);return Math.max(Math.min(r,a),1)}function wi(n){return n==="high"?3:n==="balanced"?2:n==="low"?1:0}function Ns(n){return n==="minimal"?"low":n==="low"?"balanced":n==="balanced"?"high":null}function _i(n){return n==="high"?"balanced":n==="balanced"?"low":n==="low"?"minimal":null}var Fd=1,To=class{constructor(e){this.originX=0;this.originY=0;this._revision=0;this.id=e.id??`obj-${Fd++}`,this.zIndex=e.zIndex??0,this.altitude=e.altitude??0,this.visible=e.visible!==false,this.userData=e.userData??{},this.paint=e;}get ghostOpacity(){return this.paint.ghostOpacity??0}get revision(){return this._revision}invalidate(){this._revision++;}setPaint(e){return Object.assign(this.paint,e),this.invalidate(),this}setOriginFromCoords(e){let t=1/0,o=1/0,r=-1/0,i=-1/0;for(let a of e)for(let l of a){let s=$(l),c=re(s.lng),u=ne(s.lat);c<t&&(t=c),c>r&&(r=c),u<o&&(o=u),u>i&&(i=u);}if(!isFinite(t)){this.originX=0,this.originY=0;return}this.originX=(t+r)/2,this.originY=(o+i)/2;}toLocal(e){let t=[];for(let o of e){let r=$(o);t.push(re(r.lng)-this.originX,ne(r.lat)-this.originY);}return t}color(e,t){let o=me(this.paint[e]??t),r=this.paint.opacity??1;return [o[0],o[1],o[2],o[3]*r]}linePaint(e){return e.dashArray=this.paint.dashArray,e.offset=this.paint.offset,this.paint.arrow&&(e.arrow=true,e.arrowColor=this.color("arrowColor","#ffffff"),e.arrowPeriod=this.paint.arrowPeriod??46,e.arrowSize=this.paint.arrowSize??5),e}},Di=class extends To{constructor(e){super(e),this.coordinates=e.coordinates,this.segments=e.segments??[],this.setOriginFromCoords([this.coordinates]);}setCoordinates(e){return this.coordinates=e,this.setOriginFromCoords([e]),this.invalidate(),this}setSegments(e){return this.segments=e,this.invalidate(),this}getCoordinates(){return this.coordinates}rings(){return [this.coordinates]}build(){let e=po([this.toLocal(this.coordinates)]);if(!e)return [];let t=this.paint.width??6,o=[],r=this.paint.strokeWidth??0;r>0&&o.push({kind:"line",mesh:e,color:this.color("strokeColor","#ffffff"),width:t+r*2,offset:this.paint.offset});let i=this.colorRuns();if(!i.length)return o.push(this.linePaint({kind:"line",mesh:e,color:this.color("color","#2f6df6"),width:t})),o;let a=this.paint.opacity??1;for(let l of i){let s=po([this.toLocal(this.coordinates.slice(l.from,l.to+1))]);if(!s)continue;let c=me(l.color);o.push(this.linePaint({kind:"line",mesh:s,color:[c[0],c[1],c[2],c[3]*a],width:t}));}return o}colorRuns(){if(this.segments.length===0||this.coordinates.length<2)return [];let e=this.coordinates.length-1,t=this.segments.filter(r=>Number.isInteger(r.at)&&r.at>=0&&r.at<e).sort((r,i)=>r.at-i.at);if(!t.length)return [];let o=[];for(let r=0;r<t.length;r++){let i=r===0?0:t[r].at,a=r+1<t.length?t[r+1].at:e;a>i&&o.push({from:i,to:a,color:t[r].color});}return o}hitTest(e,t,o){let r=(this.paint.width??6)/2+(this.paint.strokeWidth??0)+o,i=Fi(this.coordinates,this.altitude,t);for(let a=0;a+1<i.length;a++)if(Ks(e,i[a],i[a+1])<=r)return true;return false}},Hr=class extends To{constructor(e){super(e),this.coordinates=e.coordinates,this.setOriginFromCoords(this.coordinates);}setCoordinates(e){return this.coordinates=e,this.setOriginFromCoords(e),this.invalidate(),this}rings(){return this.coordinates}build(){let e=[],t=Un(this.coordinates.map(r=>this.toLocal(r)));t&&e.push({kind:"fill",mesh:t,color:this.color("color","#2f6df6"),width:0});let o=this.paint.strokeWidth??this.paint.width??0;if(o>0){let r=this.coordinates.map(a=>this.toLocal(Ei(a))),i=po(r);i&&e.push(this.linePaint({kind:"line",mesh:i,color:this.color("strokeColor","#2f6df6"),width:o}));}return e}hitTest(e,t){let o=Fi(Ei(this.coordinates[0]??[]),this.altitude,t);if(!Si(e,o))return false;for(let r=1;r<this.coordinates.length;r++)if(Si(e,Fi(Ei(this.coordinates[r]),this.altitude,t)))return false;return true}},Mi=class extends Hr{constructor(e){super({...e,coordinates:[Sd(e.center,e.radius,e.segments)]});}};function Sd(n,e,t){let o=$(n),r=e/Ge(o.lat),i=re(o.lng),a=ne(o.lat),l=Math.max(12,t??Math.min(128,Math.round(24+e/20))),s=[];for(let c=0;c<l;c++){let u=c/l*Math.PI*2;s.push([Se(i+Math.cos(u)*r),Me(a+Math.sin(u)*r)]);}return s}function Fi(n,e,t){let o=[];for(let r of n){let i=$(r),a=t(i.lng,i.lat,e);a&&o.push(a);}return o}function Ei(n){if(n.length<2)return n;let e=$(n[0]),t=$(n[n.length-1]);return e.lng===t.lng&&e.lat===t.lat?n:[...n,n[0]]}function Ks(n,e,t){let o=t.x-e.x,r=t.y-e.y,i=o*o+r*r;if(i<1e-12)return Math.hypot(n.x-e.x,n.y-e.y);let a=((n.x-e.x)*o+(n.y-e.y)*r)/i;return a=a<0?0:a>1?1:a,Math.hypot(n.x-(e.x+a*o),n.y-(e.y+a*r))}function Si(n,e){let t=false;for(let o=0,r=e.length-1;o<e.length;r=o++){let i=e[o].x,a=e[o].y,l=e[r].x,s=e[r].y;a>n.y!=s>n.y&&n.x<(l-i)*(n.y-a)/(s-a)+i&&(t=!t);}return t}var Us="objects3d",Nt="level",Id=32,Ld=100,Ii=120,Td=40,Hd=.35,Pd=.02,kd=150,Rd=250;function Js(n){return typeof n=="number"?{top:n,right:n,bottom:n,left:n}:{top:n?.top??0,right:n?.right??0,bottom:n?.bottom??0,left:n?.left??0}}function Gd(n){let e={...n};return delete e.cornerRadius,delete e.cornerSegments,e.type==="surface"&&(e.type="fill",delete e.elevation,delete e.base,delete e.bevel,delete e.bevelDrop),e}var Li=class extends Ze{constructor(t){super();this.options=t;this.transform=new Jt;this.ctx=null;this.sources=new G;this.rasterSources=new G;this.renderer=new Co;this.objects=new bo;this.markerHost=null;this.gestures=null;this.resizeObserver=null;this.frameHandle=0;this.needsRepaint=true;this.padding={top:0,right:0,bottom:0,left:0};this.animation=null;this.loaded=false;this.destroyed=false;this.objects3d=null;this.objects3dEnabled=true;this.frameRing=new Uint8Array(Ii);this.ringAt=0;this.ringSum=0;this.ringFilled=0;this.steadyFrames=0;this.lastFrameAt=0;this.continuousFrames=0;this.onHashChange=null;this.lastMoveEmit=0;this.lastIndoorKey="";this.writingHash=false;this.hashTimer=0;this.layerOverrides=new G;this.autoIndoorLevel=true;let o=typeof t.container=="string"?document.getElementById(t.container):t.container;if(!o)throw new Error(`[osmgl] \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D: ${String(t.container)}`);this.container=o,this.qualityAuto=(t.quality??"auto")==="auto";let r=this.qualityAuto?Lr(Tr()):t.quality;this.qualityCeiling=r,this.quality=zt(r),this.densityQuality=this.quality,this.maxPixelRatio=t.maxPixelRatio??this.quality.maxPixelRatio,this._style=new It(t.theme?ur(t.theme,t.style):t.style),this.background=t.background?me(t.background):null,this.canvas=document.createElement("canvas"),this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.canvas.style.outline="none",getComputedStyle(this.container).position==="static"&&(this.container.style.position="relative"),this.container.appendChild(this.canvas);let i=document.createElement("div");i.className="osmgl-markers",i.style.cssText="position:absolute;inset:0;overflow:hidden;pointer-events:none",this.container.appendChild(i),this.markerHost=i,this.objects.setMarkerHost(i);let a=this.transform;a.minZoom=t.minZoom??0,a.maxZoom=t.maxZoom??22,a.maxPitch=t.maxPitch??75,a.projection=t.projection??"mercator",a.center=$(t.center??[0,0]),a.zoom=t.zoom??2,a.bearing=t.bearing??0,a.pitch=t.pitch??0,this.hashName=typeof t.hash=="string"?t.hash:void 0,t.hash&&this.applyHash(false),this.pool=new Ir(t.workerCount??Math.min(Bi(),this.quality.maxWorkers)),this.initGL(),this.initSource(),this.initInput(),this.initResize(),queueMicrotask(()=>{this.destroyed||(this.loaded=true,this.emit("load",void 0),this.triggerRepaint());});}initGL(){let t=this.canvas.getContext("webgl2",{alpha:false,antialias:this.quality.antialias,depth:true,stencil:true,preserveDrawingBuffer:false,powerPreference:"high-performance",failIfMajorPerformanceCaveat:false});if(!t)throw new Error("[osmgl] WebGL2 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435");this.ctx=new Oo(t);let o=new Gt(this.options.fonts??"/tileserver/fonts/{fontstack}/{range}.pbf",this.options.fontstack);this.options.icons&&o.icons.setIcons({...bt,...this.options.icons}),o.onAssetsReady=()=>this.triggerRepaint(),this.renderer.symbols=o,this.renderer.objects=this.objects,this.renderer.models.onLoaded=()=>this.triggerRepaint(),this.renderer.init(this.ctx),this.canvas.addEventListener("webglcontextlost",r=>{r.preventDefault(),this.stopFrameLoop(),this.emit("contextlost",void 0),this.emit("error",{message:"\u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 WebGL \u043F\u043E\u0442\u0435\u0440\u044F\u043D"});});}initSource(){this.options.tiles&&this.addSource(Y,{url:this.options.tiles,minzoom:this.options.sourceMinZoom??0,maxzoom:this.options.sourceMaxZoom??14});for(let[o,r]of Object.entries({...this._style.spec.sources??{},...this.options.sources??{}}))this.addSource(o,r);let t=this.options.objects3d;if(t){this.objects3d=new Sr({endpoint:t.endpoint??"/objects3d",apiKey:t.apiKey??null}),this.objects3d.onReady=()=>this.triggerRepaint(),this.objects3d.setModelKey(this._style.spec.model3dKey??"");let o=t.sourceMaxZoom??14;this.addSource(this.objects3dSource,{url:t.tiles,minzoom:o,maxzoom:o});}}get objects3dSource(){return this.options.objects3d?this.options.objects3d.source??"model3d":null}objects3dPlan(){let t=this.options.objects3d;return {id:Us,type:"model",sourceLayer:t.sourceLayer??"model3d",minzoom:0,maxzoom:24}}planFor(t,o=this._style){let r=o.workerPlan(t),i=t===this.objects3dSource?[...r,this.objects3dPlan()]:r;return this.quality.simpleGeometry?i.map(Gd):i}updateObjects3D(){let t=this.objects3d,o=this.objects3dSource;if(!t||!o)return;let r=this.sources.get(o);if(!r)return;if(!this.objects3dEnabled){t.models.length&&t.clear(l=>this.renderer.models.remove(l,this.ctx?.gl)),this.renderer.hiddenBuildings=t.replacedBuildings,this.renderer.hiddenVenues=t.replacedVenues,this.renderer.hiddenVenueLayer=null;return}let i=this.venuesForMask();t.update({id:Us,"source-layer":this.options.objects3d.sourceLayer??"model3d",layout:this.options.objects3d.layout},r,this.transform,l=>this.renderer.models.add(l),l=>this.renderer.models.remove(l,this.ctx?.gl),this.buildingsForMask(),i),this.renderer.hiddenBuildings=t.replacedBuildings,this.renderer.hiddenVenues=t.replacedVenues,this.renderer.hiddenVenueLayer=i?.key??null;let a=this.renderer.indoorMask.footprint();if(a){let l=this.transform.worldSize>0?this.transform.pixelsPerMeter/this.transform.worldSize*1.5:0;for(let s of t.models){let c=s.origin();s.setHidden(Xe(a,c.x,c.y,l));}}else for(let l of t.models)l.setHidden(false);}buildingsForMask(){let t=this.sources.get(Y);if(!t)return null;for(let o of this._style.layers){if(o.type!=="fill-extrusion"||(o.source??Y)!==Y)continue;let r=this._style.bucketKeyFor(o);if(r!==null)return {source:t,key:r}}return null}venuesForMask(){let t=new Set;for(let o of this._style.layers)"splitBy"in o&&o.splitBy===Nt&&t.add(o.source??Y);for(let o of this._style.layers){if(o.type!=="fill-extrusion"||"splitBy"in o&&o.splitBy)continue;let r=o.source??Y;if(!t.has(r))continue;let i=this.sources.get(r),a=this._style.bucketKeyFor(o);if(i&&a!==null)return {source:i,key:a}}return null}addSource(t,o){if(this.sources.get(t)?.destroy(),this.sources.delete(t),this.rasterSources.get(t)?.destroy(),this.rasterSources.delete(t),o.type==="raster"){let i=new Mo({url:o.url,minzoom:o.minzoom??0,maxzoom:o.maxzoom??19,cacheSize:this.quality.tileCacheSize*2});return i.on("data",()=>this.triggerRepaint()),i.on("error",({message:a})=>this.emit("error",{message:a})),this.rasterSources.set(t,i),this.triggerRepaint(),this}let r=new _r(this.pool,{url:o.url,minzoom:o.minzoom??0,maxzoom:o.maxzoom??14,cacheSize:this.quality.tileCacheSize*2,plan:this.planFor(t)});return r.on("data",()=>this.triggerRepaint()),r.on("error",({message:i})=>this.emit("error",{message:i})),t===Y&&r.on("idle",()=>this.emit("idle",void 0)),this.sources.set(t,r),this.triggerRepaint(),this}initInput(){this.gestures=new Xo(this.canvas,this.transform,t=>{this.animation=null,t==="zoom"&&this.emit("zoom",void 0),this.emitMove(),this.triggerRepaint();},()=>this.emit("moveend",void 0),this.options.gestures),this.initClicks(),this.initHash();}initClicks(){let t=null;this.canvas.addEventListener("pointerdown",r=>{r.button===0&&(t={x:r.clientX,y:r.clientY,t:performance.now()});}),this.canvas.addEventListener("pointerup",r=>{let i=t;if(t=null,r.button!==0||!i||Math.hypot(r.clientX-i.x,r.clientY-i.y)>4||performance.now()-i.t>500)return;let a=this.canvas.getBoundingClientRect(),l={x:r.clientX-a.left,y:r.clientY-a.top},s=this.objects.hitTest(this.transform,l),c=s?null:this.queryRoom(l),u=s||c?null:this.queryBuilding(l);this.options.highlightBuildings!==false&&(this.setHighlight(u),this.setRoomHighlight(c));for(let h of this.getPopups())h.closeOnClick&&this.removePopup(h);this.emit("click",{point:l,lngLat:this.transform.unproject(l),object:s,building:u,symbol:this.querySymbol(l,4)});}),this.canvas.addEventListener("dblclick",r=>{let i=this.pointOf(r);this.emit("dblclick",{point:i,lngLat:this.transform.unproject(i)});}),this.canvas.addEventListener("contextmenu",r=>{r.preventDefault();let i=this.pointOf(r);this.emit("contextmenu",{point:i,lngLat:this.transform.unproject(i)});});let o=0;this.canvas.addEventListener("pointermove",r=>{if(r.pointerType==="touch")return;let i=performance.now();if(i-o<16)return;o=i;let a=this.pointOf(r),l=this.querySymbol(a);this.setSymbolHover(l),this.emit("mousemove",{point:a,lngLat:this.transform.unproject(a),object:this.objects.hitTest(this.transform,a),symbol:l});});}pointOf(t){let o=this.canvas.getBoundingClientRect();return {x:t.clientX-o.left,y:t.clientY-o.top}}initResize(){this.resizeObserver=new ResizeObserver(()=>this.resize()),this.resizeObserver.observe(this.container),this.resize();}resize(){if(this.destroyed)return;let t=this.container.clientWidth||1,o=this.container.clientHeight||1,r=xi(t,o,Math.min(window.devicePixelRatio||1,this.maxPixelRatio),this.densityQuality);this.canvas.width=Math.round(t*r),this.canvas.height=Math.round(o*r),this.transform.resize(t,o),this.triggerRepaint();}getCenter(){return this.transform.center}getZoom(){return this.transform.zoom}getBearing(){return this.transform.bearing}getPitch(){return this.transform.pitch}setCenter(t){return this.transform.center=$(t),this.afterCameraChange()}setZoom(t){return this.transform.zoom=t,this.emit("zoom",void 0),this.afterCameraChange()}setBearing(t){return this.transform.bearing=t,this.afterCameraChange()}setPitch(t){return this.transform.pitch=t,this.afterCameraChange()}jumpTo(t){let o=this.transform;return t.center!==void 0&&(o.center=$(t.center)),t.zoom!==void 0&&(o.zoom=t.zoom),t.bearing!==void 0&&(o.bearing=t.bearing),t.pitch!==void 0&&(o.pitch=t.pitch),this.animation=null,this.afterCameraChange()}easeTo(t){let o=t.duration??0;if(o<=0)return this.jumpTo(t);let r=this.transform,i={center:r.center,zoom:r.zoom,bearing:r.bearing,pitch:r.pitch},l={center:t.center!==void 0?$(t.center):r.center,zoom:t.zoom??r.zoom,bearing:i.bearing+gt((t.bearing??r.bearing)-i.bearing),pitch:t.pitch??r.pitch};return this.animation={start:performance.now(),duration:o,from:i,to:l},this.triggerRepaint(),this}flyTo(t){let o=this.transform,r={center:o.center,zoom:o.zoom,bearing:o.bearing,pitch:o.pitch},a={center:t.center!==void 0?$(t.center):o.center,zoom:t.zoom??o.zoom,bearing:r.bearing+gt((t.bearing??o.bearing)-r.bearing),pitch:t.pitch??o.pitch},l=Qe(r.zoom),s=(re(a.center.lng)-re(r.center.lng))*l,c=(ne(a.center.lat)-ne(r.center.lat))*l,u=Math.hypot(s,c),h=Math.max(o.width,o.height),f=h*Math.pow(2,r.zoom-a.zoom),d=1.42,p=d*d,m,b=null;if(u<1e-6){let g=Math.log(f/h);m=Math.abs(g)/d,b=A=>({u:0,w:h*Math.exp(d*Math.sign(g)*A)});}else {let g=C=>{let v=C===0?h:f,E=C===0?f:h;return (E*E-v*v+(C===0?1:-1)*p*p*u*u)/(2*v*p*u)},A=C=>Math.log(-g(C)+Math.sqrt(g(C)*g(C)+1)),B=A(0);m=(A(1)-B)/d;let x=C=>(Math.exp(C)+Math.exp(-C))/2,_=C=>(Math.exp(2*C)-1)/(Math.exp(2*C)+1);b=C=>{let v=d*C+B;return {u:h*x(B)*_(v)/p-h*Math.sinh(B)/p,w:h*x(B)/x(v)}};}if(!Number.isFinite(m)||m<=0)return this.jumpTo(t);let y=t.duration??Math.min(3e3,m/1.2*1e3);return this.animation={start:performance.now(),duration:y,from:r,to:a,fly:{S:m,u1:u,curve:b,w0:h}},this.triggerRepaint(),this}setPadding(t){return this.padding=Js(t),this.renderer.symbols&&(this.renderer.symbols.padding=this.padding),this.triggerRepaint(),this}getPadding(){return {...this.padding}}getBounds(){let t=this.transform,o=new Kt;for(let[r,i]of [[0,0],[t.width,0],[t.width,t.height],[0,t.height]])o.extend(t.unproject({x:r,y:i}));return o}cameraForBounds(t,o={}){let r=this.transform,i=Rr(t,{width:r.width,height:r.height,bearing:o.bearing??r.bearing,padding:o.padding!==void 0?Js(o.padding):this.padding,maxZoom:Math.min(o.maxZoom??r.maxZoom,r.maxZoom),minZoom:r.minZoom});return i?{...i,pitch:o.pitch??r.pitch}:null}fitBounds(t,o={}){let r=this.cameraForBounds(t,o);if(!r)return this;let i={...r,duration:o.duration??600};return o.fly?this.flyTo(i):this.easeTo(i)}stepAnimation(t){let o=this.animation;if(!o)return false;let r=_e((t-o.start)/o.duration,0,1),i=o.fly?r:Go(r),a=this.transform,l=$(o.from.center),s=$(o.to.center);if(o.fly){let{u:c,w:u}=o.fly.curve(o.fly.S*r),h=o.fly.u1>1e-6?_e(c/o.fly.u1,0,1):r;return a.center={lng:l.lng+(s.lng-l.lng)*h,lat:l.lat+(s.lat-l.lat)*h},a.zoom=o.from.zoom+Math.log2(o.fly.w0/u),a.bearing=o.from.bearing+(o.to.bearing-o.from.bearing)*Go(r),a.pitch=o.from.pitch+(o.to.pitch-o.from.pitch)*Go(r),r>=1&&(a.center=s,a.zoom=o.to.zoom),this.emitMove(),r>=1?(this.animation=null,this.emit("moveend",void 0),false):true}return a.center={lng:l.lng+(s.lng-l.lng)*i,lat:l.lat+(s.lat-l.lat)*i},a.zoom=o.from.zoom+(o.to.zoom-o.from.zoom)*i,a.bearing=o.from.bearing+(o.to.bearing-o.from.bearing)*i,a.pitch=o.from.pitch+(o.to.pitch-o.from.pitch)*i,this.emitMove(),r>=1?(this.animation=null,this.emit("moveend",void 0),false):true}afterCameraChange(){return this.emitMove(),this.triggerRepaint(),this}emitMove(){let t=performance.now();t-this.lastMoveEmit<8||(this.lastMoveEmit=t,this.emit("move",void 0));}project(t,o=0){return this.transform.project($(t),o)}unproject(t){return this.transform.unproject(t)}get style(){return this._style}setStyle(t){let o=this._style,r=new It(t);Object.assign(r.splitValues,o.splitValues),this._style=r,this.applyLayerOverrides();for(let[i,a]of this.sources.entries()){let l=JSON.stringify(o.workerPlan(i)),s=JSON.stringify(r.workerPlan(i));l!==s&&a.setPlan(this.planFor(i,r));}return this.objects3d?.setModelKey(t.model3dKey??""),this.triggerRepaint(),this}setTheme(t){return this.setStyle(ur(t,this.options.style))}static get themes(){return Object.keys(Lt)}static get themeList(){return Object.entries(Lt).map(([t,o])=>({id:t,name:o.name||t}))}setLayoutProperty(t,o,r){let i=this._style.layers.find(l=>l.id===t);if(!i)return console.warn(`[osmgl] \u0441\u043B\u043E\u0439 \u0441\u0442\u0438\u043B\u044F "${t}" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D`),this;let a=i.layout??(i.layout={});if(a[o]=r,this.rememberOverride(t,{layout:{[o]:r}}),o==="textField"||o==="iconImage"||o==="splitBy")for(let[l,s]of this.sources)s.setPlan(this.planFor(l));return this.triggerRepaint(),this}setPaintProperty(t,o,r){let i=this._style.layers.find(a=>a.id===t);return i?(i.paint[o]=r,this.rememberOverride(t,{paint:{[o]:r}}),this.triggerRepaint(),this):(console.warn(`[osmgl] \u0441\u043B\u043E\u0439 \u0441\u0442\u0438\u043B\u044F "${t}" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D`),this)}setShadows(t){let o=typeof t=="boolean"?{enabled:t}:t;return Object.assign(this.renderer.shadows,o),this.triggerRepaint(),this}querySymbol(t,o=2){let r=this.renderer.symbols?.querySymbol(t,o);return r?{layerId:r.layerId,text:r.text,icon:r.icon,lngLat:{lng:Se(r.mercX),lat:Me(r.mercY)},key:Gt.keyOf(r)}:null}setSymbolHover(t){return this.renderer.symbols?.setHover(t?.key??null)&&this.triggerRepaint(),this}setSymbolHidden(t){return this.renderer.symbols?.setHidden(t?.key??null)&&this.triggerRepaint(),this}queryBuilding(t){let o=null;for(let r of this._style.layers){if(r.type!=="fill-extrusion"||r.overlay||!this._style.layerVisibleAt(r,this.transform.zoom))continue;let i=this.sources.get(r.source??Y);if(!i)continue;let a=zn(this.transform,i,r.id,t);a&&(!o||a.distance<o.distance)&&(o=a);}return o}setHighlight(t,o={}){return this.renderer.highlight=t?{layerId:t.layerId,featureId:t.featureId,color:o.color??this.options.highlightColor??"#4ec97f",opacity:o.opacity??.45}:null,this.triggerRepaint(),this}queryRoom(t){if(!this.renderer.indoorOpen)return null;let o=[],r=new G,i;for(let l of this._style.layers){if(l.type!=="fill"||!l.id.startsWith("indoor-")||l.id==="indoor-shell"||!this._style.layerVisibleAt(l,this.transform.zoom))continue;let s=this._style.bucketKeyFor(l);s&&(o.push(s),r.set(s,l.id),i??(i=this.sources.get(l.source??Y)));}if(!i||!o.length)return null;let a=Nn(this.transform,i,o,t);return a?{...a,layerId:r.get(a.layerId)??a.layerId,bucketKey:a.layerId}:null}setRoomHighlight(t,o={}){return this.renderer.highlightFill=t?{layerId:t.layerId,bucketKey:t.bucketKey??t.layerId,featureId:t.featureId,color:o.color??this.options.highlightColor??"#4ec97f",opacity:o.opacity??.5}:null,this.triggerRepaint(),this}getHighlight(){let t=this.renderer.highlight;return t?{featureId:t.featureId,layerId:t.layerId}:null}initHash(){this.options.hash&&(this.on("move",()=>this.scheduleHash()),this.on("moveend",()=>this.scheduleHash(true)),this.onHashChange=()=>{this.writingHash||this.applyHash(true);},window.addEventListener("hashchange",this.onHashChange),this.scheduleHash(true));}scheduleHash(t=false){if(!(!this.options.hash||this.destroyed)){if(this.hashTimer){if(!t)return;clearTimeout(this.hashTimer);}this.hashTimer=setTimeout(()=>{this.hashTimer=0,this.writeHash();},t?0:300);}}writeHash(){if(!this.options.hash||this.destroyed)return;let t=this.transform,o=Ci({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch},this.hashName);this.writingHash=true,Vs("#"+o),setTimeout(()=>this.writingHash=false,0);}applyHash(t){if(typeof window>"u")return;let o=vi(window.location.hash,this.hashName);if(!o)return;let r=this.transform;o.center&&(r.center=o.center),o.zoom!==void 0&&(r.zoom=o.zoom),o.bearing!==void 0&&(r.bearing=o.bearing),o.pitch!==void 0&&(r.pitch=o.pitch),t&&(this.emitMove(),this.triggerRepaint());}setQuality(t){this.qualityAuto=t==="auto";let o=t==="auto"?Lr(Tr()):t;return this.qualityCeiling=o,this.resetFrameWindow(),this.applyQuality(zt(o)),this}getQuality(){return {auto:this.qualityAuto,profile:{...this.quality},pixelRatio:this.transform.width>0?this.canvas.width/this.transform.width:1}}applyQuality(t,o=false){let r=this.quality.simpleGeometry,i=o?r:t.simpleGeometry;if(this.quality={...t,simpleGeometry:i},this.resetFrameWindow(),this.objects3d&&(this.objects3d.budgetScale=t.modelBudget),r!==i)for(let[a,l]of this.sources.entries())l.setPlan(this.planFor(a));o||(this.densityQuality=t,this.options.maxPixelRatio===void 0&&(this.maxPixelRatio=t.maxPixelRatio)),this.renderer.detailScale=t.detail,this.renderer.allowShadows=t.allowShadows,this.renderer.shadows.resolution!==t.shadowMapSize&&this.setShadows({resolution:t.shadowMapSize});for(let a of this.sources.values())a.setCoverOptions({detailBias:t.detailBias,maxTiles:t.maxTiles});this.resize();}resetFrameWindow(){this.frameRing.fill(0),this.ringAt=0,this.ringSum=0,this.ringFilled=0,this.steadyFrames=0;}checkFrameBudget(t){if(!this.qualityAuto||this.sum(a=>a.pendingCount)>0)return;let o=t>Ld?3:t>Id?1:0;if(this.ringSum+=o-this.frameRing[this.ringAt],this.frameRing[this.ringAt]=o,this.ringAt=(this.ringAt+1)%Ii,this.ringFilled<Ii&&this.ringFilled++,this.steadyFrames++,this.ringFilled<Td)return;let r=this.ringSum/this.ringFilled;if(r>=Hd){let a=_i(this.quality.name);if(!a)return;console.info(`[osmgl] \u0442\u044F\u0436\u0451\u043B\u044B\u0445 \u043A\u0430\u0434\u0440\u043E\u0432 ${(r*100).toFixed(0)}% \u2014 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u043E \u043F\u043E\u043D\u0438\u0436\u0435\u043D\u043E \u0434\u043E \xAB${a}\xBB (\u043F\u043B\u043E\u0442\u043D\u043E\u0441\u0442\u044C \u0431\u0443\u0444\u0435\u0440\u0430 \u043F\u0440\u0435\u0436\u043D\u044F\u044F)`),this.applyQuality(zt(a),true);return}if(r>Pd||this.steadyFrames<kd)return;let i=Ns(this.quality.name);!i||wi(i)>wi(this.qualityCeiling)||(console.info(`[osmgl] \u043A\u0430\u0434\u0440\u044B \u0443\u043A\u043B\u0430\u0434\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0432 \u0431\u044E\u0434\u0436\u0435\u0442 \u2014 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u043E \u043F\u043E\u0434\u043D\u044F\u0442\u043E \u0434\u043E \xAB${i}\xBB`),this.applyQuality(zt(i),true));}getShadows(){return {...this.renderer.shadows}}setSky(t){let o=typeof t=="boolean"?{enabled:t}:t;return Object.assign(this._style.sky,o),this.triggerRepaint(),this}getSky(){return {...this._style.sky}}setLight(t){return Object.assign(this._style.light,t),this.triggerRepaint(),this}setLayerVisible(t,o){let r=this._style.layers.find(i=>i.id===t);return r&&(r.visible=o,this.rememberOverride(t,{visible:o}),this.triggerRepaint()),this}setObjects3DEnabled(t){return this.objects3dEnabled===t?this:(this.objects3dEnabled=t,this.triggerRepaint(),this)}get objects3DEnabled(){return this.objects3dEnabled}rasterLayerVisible(t){let o=this.transform.zoom;return this._style.layers.some(r=>r.type==="raster"&&r.source===t&&this._style.layerVisibleAt(r,o))}rememberOverride(t,o){let r=this.layerOverrides.get(t)??{};this.layerOverrides.set(t,{...r,...o,paint:{...r.paint??{},...o.paint??{}},layout:{...r.layout??{},...o.layout??{}}});}applyLayerOverrides(){if(this.layerOverrides.size)for(let t of this._style.layers){let o=this.layerOverrides.get(t.id);if(o&&(o.visible!==void 0&&(t.visible=o.visible),o.paint&&Object.assign(t.paint??(t.paint={}),o.paint),o.layout)){let r=t;Object.assign(r.layout??(r.layout={}),o.layout);}}}setBackground(t){return this.background=me(t),this.triggerRepaint(),this}getIndoorLevels(){let t=[];for(let[o,r]of this.sources.entries())if(this._style.layers.some(i=>(i.source??Y)===o&&"splitBy"in i&&i.splitBy===Nt))for(let i of r.splitValues(Nt)){let a=Number(i);Number.isFinite(a)&&!t.includes(a)&&t.push(a);}return t.sort((o,r)=>o-r)}getIndoorLevel(){let t=this._style.splitValues[Nt];return typeof t=="number"?t:null}setIndoorLevel(t){return t===null?delete this._style.splitValues[Nt]:this._style.splitValues[Nt]=t,this.triggerRepaint(),this}syncIndoor(){let t=this.getIndoorLevels(),o=t.join(",");if(o!==this.lastIndoorKey){if(this.lastIndoorKey=o,this.autoIndoorLevel){let r=this.getIndoorLevel();t.length?(r===null||!t.includes(r))&&this.setIndoorLevel(t.includes(0)?0:t.find(i=>i>=0)??t[0]):r!==null&&this.setIndoorLevel(null);}this.emit("indoor",{levels:t,level:this.getIndoorLevel()});}}addObject(t){return this.objects.add(t),this.triggerRepaint(),this}removeObject(t){return this.objects.remove(t),this.triggerRepaint(),this}getObjects(){return this.objects.all}updateObject(){return this.triggerRepaint(),this}addModel(t){return this.renderer.models.add(t),this.triggerRepaint(),this}removeModel(t){return this.renderer.models.remove(t,this.ctx?.gl),this.triggerRepaint(),this}getObjects3DStats(){return this.objects3d?.stats??null}getModels(){return this.renderer.models.all}addMarker(t){return this.objects.addMarker(t),t.update(this.transform),this}removeMarker(t){return this.objects.removeMarker(t),this}getMarkers(){return this.objects.allMarkers}addPopup(t){return t.onCloseRequest(()=>this.removePopup(t)),this.objects.addMarker(t),t.update(this.transform),this}removePopup(t){return this.objects.removeMarker(t),this}getPopups(){return this.objects.allMarkers.filter(t=>t instanceof Lo)}objectAt(t,o=4){return this.objects.hitTest(this.transform,t,o)}setProjection(t){let o=this.transform;if(o.projection===t)return this;o.projection=t;let r=o.effectiveMinZoom(),i=t==="globe"?Math.min(o.maxPitch,Ut):o.maxPitch,a=o.zoom<r,l=o.pitch>i;return a||l?this.easeTo({zoom:a?r:o.zoom,pitch:l?i:o.pitch,duration:600}):(this.emit("move",void 0),this.triggerRepaint()),this}getProjection(){return this.transform.projection}refreshSource(t){return this.sources.get(t)?.reload(),this.rasterSources.get(t)?.reload(),this.triggerRepaint(),this}refresh(){for(let t of this.sources.values())t.reload();for(let t of this.rasterSources.values())t.reload();return this.renderer.refreshHighlight(),this.triggerRepaint(),this}sum(t){let o=0;for(let r of this.sources.values())o+=t(r);return o}getStats(){return {pendingTiles:this.sum(t=>t.pendingCount),visibleTiles:this.sum(t=>t.visibleTiles.length),labels:this.renderer.symbols?.placedCount??0,models:this.renderer.models.readyCount,workers:this.pool.usingWorkers?this.pool.size:0,renderer:this.ctx?.caps.rendererName??"\u043D\u0435\u0442 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430"}}triggerRepaint(){this.destroyed||(this.needsRepaint=true,!this.frameHandle&&(this.frameHandle=requestAnimationFrame(t=>{this.frameHandle=0,this.renderFrame(t);})));}renderFrame(t){if(this.destroyed||!this.ctx)return;let o=performance.now();this.needsRepaint=false;let r=this.stepAnimation(t),i=this.ctx;i.bindFramebuffer(null),i.viewport(0,0,this.canvas.width,this.canvas.height),i.setDepthMask(true),i.clear(this.background??this._style.background,true,true);for(let d of this.sources.values())d.update(this.transform);this.updateObjects3D();for(let[d,p]of this.rasterSources)this.rasterLayerVisible(d)&&p.update(this.transform);this.syncIndoor(),this.objects.updateMarkers(this.transform);let a=(this.sources.size>0||this.rasterSources.size>0)&&this.renderer.render(i,this.transform,this.sources,this._style,t,this.rasterSources),l=performance.now()-o,s=r||a||this.needsRepaint,c=this.lastFrameAt>0?t-this.lastFrameAt:0,u=c>0&&c<Rd,h=u?c:0;this.continuousFrames=u?this.continuousFrames+1:0;let f=this.continuousFrames>1?c:l;this.lastFrameAt=t,this.checkFrameBudget(f),this.emit("render",{frameMs:l,intervalMs:h}),s&&this.triggerRepaint();}stopFrameLoop(){this.frameHandle&&cancelAnimationFrame(this.frameHandle),this.frameHandle=0;}get isLoaded(){return this.loaded}destroy(){if(this.onHashChange&&(window.removeEventListener("hashchange",this.onHashChange),this.onHashChange=null),this.hashTimer&&clearTimeout(this.hashTimer),!this.destroyed){this.destroyed=true,this.stopFrameLoop(),this.resizeObserver?.disconnect(),this.gestures?.destroy();for(let t of this.sources.values())t.destroy();this.sources.clear();for(let t of this.rasterSources.values())t.destroy();this.rasterSources.clear(),this.objects.destroy(),this.markerHost?.remove(),this.pool.destroy(),this.ctx&&this.renderer.destroy(this.ctx),this.removeAllListeners(),this.canvas.remove();}}},qA=Li;
|
|
1954
|
+
exports.AssetLoader=Fo;exports.BASE_SOURCE=Y;exports.BUILDING_HEIGHT_SCALE=xt;exports.BUILDING_VERTEX_STRIDE=Ie;exports.CITY_STYLE=Ru;exports.Circle=Mi;exports.DEFAULT_ICONS=bt;exports.DEFAULT_LIGHT=In;exports.DEFAULT_SHADOWS=ys;exports.DEFAULT_SKY=Sn;exports.DEFAULT_STYLE=Ln;exports.DepthTarget=co;exports.EARTH_CIRCUMFERENCE=Wo;exports.FILL_VERTEX_STRIDE=et;exports.GLOBE_MAX_PITCH=Ut;exports.GLOBE_ZOOM_MAX=st;exports.GLOBE_ZOOM_MIN=No;exports.GLYPH_BORDER=Ce;exports.GLYPH_SIZE=Ye;exports.GROUND_SCALE=tu;exports.GeomType=oo;exports.GlyphSource=xo;exports.GroundArrows=uo;exports.IconSource=_o;exports.IndoorMask=ho;exports.LINE_VERTEX_STRIDE=tt;exports.LayerRenderer=Co;exports.LngLatBounds=Kt;exports.MAX_LATITUDE=Hi;exports.MODEL_VERTEX_STRIDE=gr;exports.Map=Li;exports.MapObject=To;exports.Marker=Io;exports.Model=So;exports.ModelLayer=rt;exports.ObjectManager=bo;exports.Polygon=Hr;exports.Polyline=Di;exports.Popup=Lo;exports.RELIEF_STYLE=ku;exports.RUNTIME_FILL_STRIDE=Kn;exports.RUNTIME_LINE_STRIDE=Ht;exports.RasterSource=Mo;exports.RasterTile=Er;exports.SDF_EDGE=ri;exports.SDF_PX=wo;exports.SOFT_STYLE=Pu;exports.SPLIT_SEP=Al;exports.SURFACE_CUT_BLEED=lo;exports.SURFACE_LEVEL_SCALE=Oa;exports.SURFACE_VERTEX_STRIDE=Dt;exports.SdfAtlas=vo;exports.Style=It;exports.SymbolRenderer=Gt;exports.THEMES=Lt;exports.TILE_SIZE=lt;exports.TileID=Wt;exports.Transform=Jt;exports.VectorTile=to;exports.VectorTileFeature=er;exports.VectorTileLayer=tr;exports.abbreviateStreet=bi;exports.addGround=En;exports.altitudeFromMercatorZ=Jd;exports.applyTheme=fr;exports.arrowLabelOffset=Ss;exports.arrowVertices=ju;exports.buildRuntimeFill=Un;exports.buildRuntimeLine=po;exports.cameraForBounds=Rr;exports.circumferenceAtLatitude=Ge;exports.clampLat=Vo;exports.clampPixelRatio=xi;exports.clipLineToRect=ai;exports.coordinateDigits=Ws;exports.coveringTiles=Do;exports.createGround=_n;exports.default=qA;exports.deviceHints=Tr;exports.distToSegment=Ks;exports.evaluateColor=ke;exports.evaluateNumber=W;exports.extractFeature=mr;exports.fillFootprint=Rn;exports.fogPlanes=Tt;exports.footprintOf=Gn;exports.formatHash=Ci;exports.generateBuildings=on;exports.generateFill=wn;exports.generateLine=Fn;exports.generateSurface=xn;exports.generateSymbols=gi;exports.globeBasis=zr;exports.globeFlatMix=Uo;exports.globeRadius=Ko;exports.globeToLocal=zi;exports.groundAt=cr;exports.iconRotation=Is;exports.insideFootprint=Xe;exports.latFromMercatorY=Me;exports.lngFromMercatorX=Se;exports.lngLatToUnit=Jo;exports.matchesFilter=Be;exports.mercatorMetersPerTile=kr;exports.mercatorX=re;exports.mercatorY=ne;exports.mercatorZFromAltitude=Pr;exports.metersPerPixel=jd;exports.metersPerTile=Pi;exports.nextQualityDown=_i;exports.parseGlb=bh;exports.parseGlbAsync=jn;exports.parseGlyphs=As;exports.parseHash=vi;exports.patchUV=ql;exports.pickBuilding=zn;exports.pickFill=Nn;exports.pitchIntent=Yi;exports.pixelsPerMeter=Xd;exports.placeAlongLine=si;exports.pointInRing=Si;exports.qualityFor=Lr;exports.qualityProfile=zt;exports.raySphere=Nr;exports.resolveTemplate=yi;exports.roundRing=ze;exports.sdfFromAlpha=ni;exports.shapeText=ii;exports.splitBucketKey=St;exports.splitByGround=Dn;exports.splitPolygons=ht;exports.styleWithTheme=ur;exports.tileOriginMeters=ki;exports.tileUrl=Ls;exports.toLngLat=$;exports.unitToLngLat=Vr;exports.worldSize=Qe;Object.defineProperty(exports,'__esModule',{value:true});return exports;})({});//# sourceMappingURL=osmgl.global.js.map
|
|
1954
1955
|
//# sourceMappingURL=osmgl.global.js.map
|