/*! For license information please see index.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mapgl=e():t.mapgl=e()}(window,(function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=18)}([function(t,e,n){window,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=108)}([function(t,e,n){"use strict";n.r(e),n.d(e,"MAP_DEFAULTS",(function(){return o})),n.d(e,"tiles",(function(){return a})),n.d(e,"hillshade",(function(){return s})),n.d(e,"modelCacheSize",(function(){return c})),n.d(e,"loadModelsInfoStyleZoom",(function(){return l})),n.d(e,"atlasSize",(function(){return u})),n.d(e,"urls",(function(){return d})),n.d(e,"traffic",(function(){return f})),n.d(e,"fonts",(function(){return h})),n.d(e,"icons",(function(){return p})),n.d(e,"styles",(function(){return m})),n.d(e,"events",(function(){return v})),n.d(e,"analytics",(function(){return _})),n.d(e,"workerResetDebounceTime",(function(){return y})),n.d(e,"styleMaxDpi",(function(){return g})),n.d(e,"forcedDensityPresetIndex",(function(){return b})),n.d(e,"houseHover",(function(){return x})),n.d(e,"tileAnimation",(function(){return w})),n.d(e,"buildingAnimation",(function(){return S})),n.d(e,"entranceAnimation",(function(){return I})),n.d(e,"identify",(function(){return j})),n.d(e,"labeling",(function(){return O})),n.d(e,"render",(function(){return M})),n.d(e,"defaultLang",(function(){return P})),n.d(e,"zoom",(function(){return L})),n.d(e,"inertia",(function(){return T})),n.d(e,"camera",(function(){return k})),n.d(e,"floors",(function(){return z})),n.d(e,"fences",(function(){return C})),n.d(e,"performanceCheck",(function(){return E})),n.d(e,"branchPoiSublayers",(function(){return A})),n.d(e,"transportPoiSublayerMetroExit",(function(){return D})),n.d(e,"transportPoiSublayers",(function(){return F})),n.d(e,"commercialSublayers",(function(){return R})),n.d(e,"personalSublayers",(function(){return B})),n.d(e,"landmarkPoiSublayers",(function(){return N})),n.d(e,"floorsDefaultPoiSublayer",(function(){return U})),n.d(e,"commercialRasterSizes",(function(){return H})),n.d(e,"landmarkRasterSizes",(function(){return Z})),n.d(e,"cityNameSublayers",(function(){return G})),n.d(e,"defaultMarkerIcon",(function(){return W})),n.d(e,"defaultMarkerAnchor",(function(){return V}));var i=n(1),r=n(50),o={minZoom:2,maxZoom:20},a={protocol:"https",server:r.h,subdomains:"0123",tileSet:"vector_b",tileKey:"empty",appId:"empty",cacheRatio:2,maxUniverseZoom:8,maxRegionalZoom:15,maxDetailLevel:17,displayBounds:!1},s={minZoom:5,maxZoom:11},c=100,l=13.5,u=[2048,2048],d={tiles:"{protocol}://{host}/vt?r={request}&ts={tileSet}&key={tileKey}&appId={appId}&lang={lang}&default_lang={defaultLang}&s={sessionId}",metatile:"{protocol}://{host}/metafiles/{hash}/metatile.json?ts={tileSet}",modelInfo:"{protocol}://{host}/metafiles/{regionId}/models.json?ts={tileSet}",model:"{protocol}://{host}/metafiles/{regionId}/{name}?ts={tileSet}",convertData:"{protocol}://{host}/metafiles/{hash}/convert.json?ts={tileSet}",dynamicPoi:"{protocol}://{host}/metafiles/{regionId}/poi/{id}_{width}_{height}.png?ts={tileSet}"},f={protocol:"https",host:r.i,url:"{protocol}://{host}/tiles?tls={tiles}&reg={regions}&tm={time}&fmt=json&z={z}",timestampUrl:"{protocol}://{host}/meta?reg={regions}&time&score",updateInterval:12e4,minZoom:10,maxZoom:16,maxDetailLevel:17},h={defaultUrl:r.a,gamma:.08,baseSize:24,baseLineHeight:1.2,bomCharCode:65279},p={defaultUrl:r.b,nameTemplate:"{name}"},m={url:r.g,path:"styles/{id}"},v={doubleClickTime:185,dragThreshold:2,pitchWaitingTime:200,pitchThreshold:7},_={gaCode:"UA-25529177-4",gaName:"mapglEngine"},y=3e3,g=[155,230,300,400,520],b=-1,x={inAnimationTime:180,inAnimationType:"linear",outAnimationTime:800,outAnimationType:"linear"},w={time:300,type:"linear"},S={minStyleZoom:16,duration:500,easing:"easeOutQuint"},I={bounceType:"easeOutElastic",bounceTime:750,growType:"easeInOutQuad",growTime:750,stagger:0},j={pixelDensity:.5,sceneOpacity:0,cacheDebounceTime:400,pickDistance:3},O={interval:220,animationTime:200,animationType:"linear",tileMultiplier:1.5,axisAngleToleranceDeg:45,axisCheckDistancePx:12,boundsDead:!1,boundsAlive:!1,commercialBoundsDead:!1,commercialBoundsAlive:!1,boundsUnused:!1,commercialMargins:{visibleLeftRight:60,visibleTopBottom:60,appearLeftRight:70,appearTopBottom:70},lineLabelsHidePitchDeg:40,maxLabelLength:30},M={alwaysRerender:!1},P="en",L={mouseDelta:.65,macTouchDelta:.0018,animDuration:400,throttleDelay:100,mouseRotateDelta:2.5,mousePitchDelta:2.5,mobilePinchDelta:1,mobileTapDelta:10},T={duration:1300,maxSpeed:8,minSpeed:.02,nonLinearity:5},k={fov:60,near:1e3,far:Math.pow(2,34),minCalculationScreenHeight:1e3,hidePointObjectsAtPitch:30,viewportLimitRatio:2},z={enabled:!0,url:r.c,displayStyleZoom:17,wallHeight:800,islandHeight:400,wallMinBrightness:.8265,wallMaxBrightness:.95,viewportPadding:.2},C={lightIntensity:.1},E={fpsCaveat:10},A=["Commercial_poi_custom","Commercial_poi_navi","Commercial_poi_default","Anchor","Transport_poi","High_zoom_poi","High_zoom_poi_navigator","Medium_zoom_poi","Medium_zoom_poi_navigator","Low_zoom_poi","Low_zoom_poi_navigator"],D=["Subway_exit","Subway_exit_on_floor"],F=Object(i.e)(["Transport_stop"],D),R=["Commercial_poi_default","Commercial_poi_custom","Commercial_poi_navi"],B=["s_personal_poi"],N=["Landmark_poi","Landmark_point"],U="Anchor",H=[96,84,72,60,48,36,24],Z=[105,84,63,42,21],G=["City_2gis_medium","City_2gis_big","Capital_2gis"],W="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSI0OHB4IiB2aWV3Qm94PSIwIDAgMzAgNDgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA1MS4yICg1NzUxOSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+PHRpdGxlPlBhZ2UgMSBDb3B5PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjUwJSIgeTE9IjUwJSIgeDI9IjUwJSIgeTI9IjAlIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+PHN0b3Agc3RvcC1jb2xvcj0iIzFCODlFRSIgb2Zmc2V0PSIwJSI+PC9zdG9wPjxzdG9wIHN0b3AtY29sb3I9IiMzMTk4RUMiIG9mZnNldD0iMTAwJSI+PC9zdG9wPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGlkPSJSZWNvdmVyeS0wMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTgzOS4wMDAwMDAsIC00MjUuMDAwMDAwKSI+PGcgaWQ9IlBhZ2UtMS1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4MzkuMDAwMDAwLCA0MjUuMDAwMDAwKSI+PGVsbGlwc2UgaWQ9Ik92YWwtMyIgZmlsbD0iIzAwMDAwMCIgb3BhY2l0eT0iMC4wMzYzODA1OTciIGN4PSIxNSIgY3k9IjQ1LjUiIHJ4PSIzIiByeT0iMS41Ij48L2VsbGlwc2U+PGVsbGlwc2UgaWQ9Ik92YWwtMy1Db3B5IiBmaWxsPSIjMDAwMDAwIiBvcGFjaXR5PSIwLjAzNjM4MDU5NyIgY3g9IjE1IiBjeT0iNDUuNSIgcng9IjQuNSIgcnk9IjIuNSI+PC9lbGxpcHNlPjxwYXRoIGQ9Ik0xNSw0NS44ODM2MzUzIEwxNS44ODIzNTI5LDQ1Ljg4MzYzNTMgQzE1Ljg4MjM1MjksMjkuMjE3NzUyOSAyMC43NzY3NjQ3LDIzLjc5NzQ1ODggMjcuOTg3MzUyOSwyMy43OTc0NTg4IEwyOC4zMjk3MDU5LDIzLjc5NzQ1ODggQzI5LjA3Nzk0MTIsMjEuNTkwNjk0MSAzMCwxNy45OTE1NzY1IDMwLDE1LjAwMDQgQzMwLDcuMTQzOTI5NDEgMjMuNzY3OTQxMiwwLjAwMDQgMTUsMC4wMDA0IEM2LjIzMjA1ODgyLDAuMDAwNCAwLDcuMTQzOTI5NDEgMCwxNS4wMDA0IEMwLDE3Ljk5MTU3NjUgMC45MjIwNTg4MjQsMjEuNTkwNjk0MSAxLjY3MDI5NDEyLDIzLjc5NzQ1ODggTDIuMDEyNjQ3MDYsMjMuNzk3NDU4OCBDOS4yMjQxMTc2NSwyMy43OTc0NTg4IDE0LjExNzY0NzEsMjkuMjE3NzUyOSAxNC4xMTc2NDcxLDQ1Ljg4MzYzNTMgTDE1LDQ1Ljg4MzYzNTMgWiIgaWQ9IkZpbGwtMSIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudC0xKSI+PC9wYXRoPjwvZz48L2c+PC9nPjwvc3ZnPg==",V=[15,43]},function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return c}));var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function s(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function c(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}Object.create,Object.create},function(t,e,n){"use strict";n.d(e,"h",(function(){return l})),n.d(e,"d",(function(){return u})),n.d(e,"G",(function(){return d})),n.d(e,"u",(function(){return f})),n.d(e,"p",(function(){return p})),n.d(e,"q",(function(){return m})),n.d(e,"J",(function(){return _})),n.d(e,"g",(function(){return y})),n.d(e,"A",(function(){return g})),n.d(e,"E",(function(){return b})),n.d(e,"z",(function(){return w})),n.d(e,"x",(function(){return j})),n.d(e,"y",(function(){return O})),n.d(e,"F",(function(){return M})),n.d(e,"e",(function(){return P})),n.d(e,"k",(function(){return L})),n.d(e,"m",(function(){return T})),n.d(e,"o",(function(){return k})),n.d(e,"B",(function(){return z})),n.d(e,"v",(function(){return C})),n.d(e,"w",(function(){return E})),n.d(e,"c",(function(){return A})),n.d(e,"I",(function(){return D})),n.d(e,"C",(function(){return F})),n.d(e,"b",(function(){return R})),n.d(e,"D",(function(){return B})),n.d(e,"n",(function(){return N})),n.d(e,"t",(function(){return Z})),n.d(e,"H",(function(){return G})),n.d(e,"a",(function(){return W})),n.d(e,"l",(function(){return V})),n.d(e,"r",(function(){return q})),n.d(e,"s",(function(){return Y})),n.d(e,"i",(function(){return X})),n.d(e,"f",(function(){return K})),n.d(e,"j",(function(){return J}));var i=n(1),r=n(8),o=n(4),a=n(17),s=n(0),c=n(3);function l(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function u(t,e,n){return t=Math.max(t,e),Math.min(t,n)}function d(t){return 0==(t=+t)||Number.isNaN(t)?t:t>0?1:-1}function f(t,e){return[e[0]/t[0]*2-1,-e[1]/t[1]*2+1]}function h(t){var e=t.split("?"),n=e[0],i=e[1];if(!i)return n;var r=i.split("&").map((function(t){return t.split("=")})).filter((function(t){return"undefined"!==t[1]})).map((function(t){return t.join("=")})).join("&");return r.length?n+"?"+r:n}function p(t,e){var n=_(e.host,{subdomain:e.subdomain});return h(_(s.urls[t],Object(i.a)(Object(i.a)({},e),{host:n})))}function m(t,e){return h(_(t,e))}var v=/\{(\w+)\}/g;function _(t,e){return t.replace(v,(function(t,n){return e[n]}))}function y(t){return t*Math.PI/180}function g(t){return t/Math.PI*180}function b(t,e){var n=e.center,i=e.rotation,r=e.zoom,o=e.pitch,a=e.size,s=Object(c.u)(r,a),l=Math.max(s*Math.sin(o),1);t[0]=n[0]+Math.sin(i)*l,t[1]=n[1]-Math.cos(i)*l,t[2]=s*Math.cos(o)}var x,w=(x=a.b(),function(t,e){var n=o.d();return M(x,t),function(t,e,n,i){if(b(I,i),a.e(S,n),t[0]=(e[0]-i.viewport.left)/i.size[0]*2-1,t[1]=-(e[1]-i.viewport.top)/i.size[1]*2+1,t[2]=0,o.t(t,t,S),t[0]-=I[0],t[1]-=I[1],t[2]-=I[2],o.n(t,t),0!==t[2]){var r=-I[2]/t[2];r>=0?(t[0]=I[0]+t[0]*r,t[1]=I[1]+t[1]*r,t[2]=I[2]+t[2]*r):t[0]=t[1]=t[2]=0}else t[0]=t[1]=t[2]=0}(n,e,x,t),n}),S=a.b(),I=o.d(),j=function(){var t=a.b();return function(e,n){var i=[0,0,0];return M(t,e),O(i,n,t,e.size,e.viewport),i}}();function O(t,e,n,i,r){var o=e[0],a=e[1],s=e[2],c=i[0]/2,l=i[1]/2,u=n[3]*o+n[7]*a+n[11]*s+n[15];t[0]=c+r.left+(n[0]*o+n[4]*a+n[12])*c/u,t[1]=l+r.top-(n[1]*o+n[5]*a+n[9]*s+n[13])*l/u}function M(t,e,n,i,r){void 0===n&&(n=s.camera.near),void 0===i&&(i=s.camera.far);var o=e.center,c=e.size,l=e.padding,u=s.camera.fov;b(I,e);var d=Math.max(0,l.top-l.bottom)*Math.tan(e.pitch),f=P(c[1])+d,h=void 0!==r?r:{x:0+(l.right-l.left)/2,y:0+(l.bottom-l.top)/2,width:c[0],height:c[1]};h.y+=(f-c[1])/2;var p=[c[0],f];a.n(t,u,n,i,p,o,I,h)}function P(t){return Math.max(t,s.camera.minCalculationScreenHeight)}function L(t,e,n){void 0!==n.zoom&&(n.zoom=u(n.zoom,t.minZoom,t.maxZoom));var r=w(t,e),a=w(Object(i.a)(Object(i.a)({},t),n),e),s=o.d();return o.r(s,r,a),s}function T(t,e){return{a:t[1]-e[1],b:e[0]-t[0],c:t[0]*e[1]-e[0]*t[1]}}function k(t){var e=t[0][0],n=t[0][1],i=t[1][0],r=t[1][1],o=t[2][0],a=t[2][1],s=t[3][0],c=t[3][1];return{min:[Math.min(e,i,o,s),Math.min(n,r,a,c)],max:[Math.max(e,i,o,s),Math.max(n,r,a,c)]}}function z(t,e){var n,i,r,o;if(i=k(e),r=(n=t).min[0]<=i.max[0]&&i.min[0]<=n.max[0],o=n.min[1]<=i.max[1]&&i.min[1]<=n.max[1],!r||!o)return!1;for(var a=[T(e[3],e[2]),T(e[1],e[0]),T(e[0],e[3]),T(e[2],e[1])],s=[t.min,t.max,[t.min[0],t.max[1]],[t.max[0],t.min[1]]],c=0;c<a.length;c++){for(var l=a[c],u=!0,d=0;d<s.length;d++){var f=s[d];if(l.a*f[0]+l.b*f[1]+l.c<0){u=!1;break}}if(u)return!1}return!0}function C(t,e){return Math.abs(e.a*t[0]+e.b*t[1]+e.c)/Math.sqrt(e.a*e.a+e.b*e.b)}function E(t){return t>>>=0,t-=1,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,1+(t|=t>>16)}function A(t){var e=new Blob([t],{type:"image/png"}),n=URL.createObjectURL(e),i=document.createElement("img");return new Promise((function(e){i.onload=function(){URL.revokeObjectURL(n),e(i)},0===t.byteLength?i.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=":i.src=n}))}function D(t,e,n){var i=document.createElement("img");return i.width=e,i.height=n,new Promise((function(e){i.onload=function(){return e(i)},i.src="data:image/svg+xml;base64,"+btoa(t)}))}function F(t,e){if(e[0]===t.width&&e[1]===t.height)return t;var n=document.createElement("canvas"),i=n.getContext("2d");return n.width=e[0],n.height=e[1],i.shadowColor="transparent",i.shadowBlur=0,i.drawImage(t,0,0,e[0],e[1]),n}function R(t,e){var n=Object(i.a)({},e);for(var r in t)void 0!==t[r]&&(n[r]=t[r]);return n}function B(t){var e={};for(var n in t)e[t[n]]=n;return e}function N(t,e){for(var n=0,i=0;i<e.length;i++)n+=e.charCodeAt(i);return t[n%t.length]}var U=r.d(),H=r.d();function Z(t,e,n){r.q(U,n.center,t),r.q(H,e,t);var i=r.g(U,H)/r.k(U);return Math.atan2(i,t[2])}function G(t,e){var n=[];for(var i in t)e[i]||n.push(t[i]);return n}function W(t,e,n){return u((n-t)/(e-t),0,1)}function V(t){return t%1}function q(t,e,n){return t>=e&&t<=n}function Y(t){var e=t[0],n=t[1];return q(e,-180,180)&&q(n,-90,90)}function X(t,e){if(t.size!==e.size)return!1;for(var n=0,i=Array.from(t);n<i.length;n++){var r=i[n];if(!e.has(r))return!1}return!0}function K(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var n=Array.isArray(t),i=Array.isArray(e),r=void 0,o=void 0,a=void 0;if(n&&i){if((o=t.length)!==e.length)return!1;for(r=o;0!=r--;)if(!K(t[r],e[r]))return!1;return!0}if(n!==i)return!1;var s=t instanceof Date,c=e instanceof Date;if(s!==c)return!1;if(s&&c)return t.getTime()===e.getTime();var l=t instanceof RegExp,u=e instanceof RegExp;if(l!==u)return!1;if(l&&u)return t.toString()===e.toString();var d=Object.keys(t);if((o=d.length)!==Object.keys(e).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,d[r]))return!1;for(r=o;0!=r--;)if(!K(t[a=d[r]],e[a]))return!1;return!0}return t!=t&&e!=e}function J(t,e){var n=t.indexOf(e);return-1!==n&&(t.splice(n,1),!0)}},function(t,e,n){"use strict";n.d(e,"q",(function(){return l})),n.d(e,"k",(function(){return u})),n.d(e,"l",(function(){return d})),n.d(e,"m",(function(){return f})),n.d(e,"u",(function(){return h})),n.d(e,"i",(function(){return p})),n.d(e,"v",(function(){return m})),n.d(e,"f",(function(){return _})),n.d(e,"h",(function(){return y})),n.d(e,"r",(function(){return g})),n.d(e,"t",(function(){return b})),n.d(e,"x",(function(){return x})),n.d(e,"w",(function(){return w})),n.d(e,"b",(function(){return S})),n.d(e,"o",(function(){return I})),n.d(e,"j",(function(){return j})),n.d(e,"n",(function(){return O})),n.d(e,"c",(function(){return M})),n.d(e,"e",(function(){return P})),n.d(e,"g",(function(){return L})),n.d(e,"d",(function(){return T})),n.d(e,"a",(function(){return k})),n.d(e,"s",(function(){return z})),n.d(e,"p",(function(){return C}));var i=n(8),r=n(4),o=n(2),a=n(6),s=n(0),c=n(13);function l(t,e,n){t[0]=e[0]*n.size/a.i+n.offset[0],t[1]=e[1]*n.size/a.i+n.offset[1],t[2]=e[2]*a.l/a.i}function u(t,e,n){t[0]=(e[0]-n.offset[0])*a.i/n.size,t[1]=(e[1]-n.offset[1])*a.i/n.size,t[2]=e[2]*a.i/a.l}function d(t){var e=a.n/2,n=Math.sin(Object(o.g)(t[1])),i=t[0]*a.n/360,s=Math.log((1+n)/(1-n))*a.n/(4*Math.PI);return r.i(Object(o.d)(i,-e,e),Object(o.d)(s,-e,e),0)}function f(t){var e=[0,0];e[0]=360*t[0]/a.n;var n=-2*Math.PI/a.n;return e[1]=90-2*Object(o.A)(Math.atan(Math.exp(t[1]*n))),e}function h(t,e){return Object(o.e)(e[1])*a.n/(2*a.m*Math.tan(Object(o.g)(s.camera.fov)/2)*Math.pow(2,t))}function p(t,e){return Math.log(Object(o.e)(e[1])*a.n/(2*a.m*Math.tan(Object(o.g)(s.camera.fov)/2)*t))/Math.LN2}function m(t){return a.o*Math.pow(2,-t)}function v(t){var e=f(t)[1],n=1/(2*Math.cos(Object(o.g)(e)));return Math.log(n)/Math.log(2)}function _(t,e){var n=v(e)*Object(o.a)(9,10,t);return t+Object(o.d)(n,-1,0)}function y(t,e){var n=v(e),i=n*Object(o.a)(9,10+n,t);return t-Object(o.d)(i,-1,0)}function g(t){return Math.pow(2,32-t)}function b(t,e){return t*Math.pow(2,e)*a.m/a.n}function x(t,e){return t*Math.pow(2,-e)*a.n/a.m}function w(t,e){return a.f*(t/a.p)/e}function S(t,e){return e*(a.n/40075e3)*function(t){return 1/Math.cos(t[1]*Math.PI/180)}(t)}function I(t){var e=g(t[2]);return r.i(t[0]*e-2147483648,t[1]*e-2147483648,0)}function j(t){return[t[0]+2147483648,t[1]+2147483648,32,32]}function O(t){var e=g(t[2]);return r.i((t[0]+.5)*e-2147483648,(t[1]+.5)*e-2147483648,0)}function M(t){var e=c.e(i.b(t.center),i.b(t.center)),n=P(t);return c.f(e,n[0]),c.f(e,n[1]),c.f(e,n[2]),c.f(e,n[3]),e}function P(t){var e=t.size,n=t.zoom,i=t.viewport,r=[Object(o.z)(t,[i.left,e[1]+i.top]),Object(o.z)(t,[e[0]+i.left,e[1]+i.top]),Object(o.z)(t,[e[0]+i.left,i.top]),Object(o.z)(t,[i.left,i.top])],a=Object(o.m)(r[0],r[1]),c=Object(o.v)(r[2],a),l=x(e[1],n)*s.camera.viewportLimitRatio;if(c>l){var u=l/c;r[2]=[(r[2][0]-r[1][0])*u+r[1][0],(r[2][1]-r[1][1])*u+r[1][1]],r[3]=[(r[3][0]-r[0][0])*u+r[0][0],(r[3][1]-r[0][1])*u+r[0][1]]}return r}function L(t,e){var n=g(e);return[(t[0]-n/2+2147483648)/n,(t[1]-n/2+2147483648)/n,e,e]}function T(t,e){void 0===e&&(e=1);var n=Math.max(t.max[0]-t.min[0],t.max[1]-t.min[1],1)*e,r=32-Math.log(n)/Math.LN2,o=i.d();return c.a(o,t),L(o,r)}function k(t,e){var n=Math.PI/180,i=t[1]*n,r=e[1]*n,o=Math.sin((e[1]-t[1])*n/2),a=Math.sin((e[0]-t[0])*n/2),s=o*o+Math.cos(i)*Math.cos(r)*a*a,c=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return Math.round(6371e3*c)}var z=c.e([-a.n/2,-a.n/2],[a.n/2,a.n/2]),C=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return[e,Math.pow(2,i)-1-n,i,r]}},function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"k",(function(){return a})),n.d(e,"i",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"q",(function(){return l})),n.d(e,"a",(function(){return u})),n.d(e,"m",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"o",(function(){return h})),n.d(e,"p",(function(){return p})),n.d(e,"n",(function(){return m})),n.d(e,"g",(function(){return v})),n.d(e,"e",(function(){return _})),n.d(e,"t",(function(){return y})),n.d(e,"s",(function(){return g})),n.d(e,"h",(function(){return b})),n.d(e,"r",(function(){return x})),n.d(e,"f",(function(){return w})),n.d(e,"j",(function(){return S}));var i=n(11);function r(){var t=new i.a(3);return t[0]=0,t[1]=0,t[2]=0,t}function o(t){var e=new i.a(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e,n){var r=new i.a(3);return r[0]=t,r[1]=e,r[2]=n,r}function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function l(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function d(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function f(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function h(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function p(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t}function m(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function _(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],c=n[2];return t[0]=r*c-o*s,t[1]=o*a-i*c,t[2]=i*s-r*a,t}function y(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[3]*i+n[7]*r+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*i+n[4]*r+n[8]*o+n[12])/a,t[1]=(n[1]*i+n[5]*r+n[9]*o+n[13])/a,t[2]=(n[2]*i+n[6]*r+n[10]*o+n[14])/a,t}function g(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t}function b(t,e){var n=t[0],r=t[1],o=t[2],a=e[0],s=e[1],c=e[2];return Math.abs(n-a)<=i.b*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=i.b*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(o-c)<=i.b*Math.max(1,Math.abs(o),Math.abs(c))}var x=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},w=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)},S=a;r()},function(t,e,n){"use strict";n.d(e,"h",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"i",(function(){return c})),n.d(e,"j",(function(){return l})),n.d(e,"k",(function(){return u})),n.d(e,"c",(function(){return d})),n.d(e,"f",(function(){return f})),n.d(e,"d",(function(){return h})),n.d(e,"e",(function(){return p})),n.d(e,"b",(function(){return _})),n.d(e,"a",(function(){return y}));var i=n(19),r=n(48),o=n(37);function a(t,e){if(Object(i.e)(t)||!t)return t;if(!e.allowedExpressions||e.allowedExpressions.has(t.type))switch(t.type){case"all":for(var n=0,s=t.array.length;n<s;n++)if(!0!==Boolean(a(t.array[n],e)))return!1;return!0;case"get":return function(t,e){return"binder"===e.type||"labeling"===e.type?void 0!==e.tileData?e.tileData[t.dataIndex]:0:e.tileAttrs[e.tileProps[t.property]]}(t,e);case"global":return e.styleState[t.property]||!1;case"sourceAttr":return function(t,e){return"geojsonFilter"===e.type||"filter"===e.type?e.sourceAttrs[t.property]||void 0:"binder"===e.type||"labeling"===e.type?void 0!==e.tileData?e.tileData[t.dataIndex]:0:void 0}(t,e);case"interpolate":return function(t,e){if(0!==t.steps.length){var n=a(t.steps[0].value,e),i=a(t.argument,e);return"number"!=typeof i?(Object(o.a)("Interpolate value resolved to non-number value: "+i+" "+t.argument),0):Object(r.c)(n)?u(t,i,e):function(t,e,n){var i=m(t,e);if(0===i)return Number(a(t.steps[0].value,n));if(i===t.steps.length)return function(t,e,n){var i=t.steps[t.steps.length-1],r=t.base;return 1===r?c(i.value,e):c(i.value,e)*Math.pow(r,n-i.key)}(t,n,e);var r=Number(a(t.steps[i-1].value,n));if("labeling"===n.type&&n.interpolateExpressionAsStep)return r;var o=v(t,e,i);return(1-o)*r+o*Number(a(t.steps[i].value,n))}(t,i,e)}Object(o.a)("Interpolate expression contains 0 steps, cannot interpolate")}(t,e);case"match":return function(t,e){var n,i=a(t.input,e);return void 0!==i&&(n=t.cases.find((function(t){return t.values.has(i)}))),a(n?n.output:t.defaultOutput,e)}(t,e);case"step":return function(t,e){var n=m(t,Number(a(t.value,e)))-1;return a(t.steps[n].value,e)}(t,e);case"zoom":return"binder"===e.type||"labeling"===e.type?e.styleZoom:void Object(o.a)("Zoom expression cannot be used in filter context");default:return void Object(o.a)("Not supported expression type <<"+t.type+">> in "+JSON.stringify(t))}else Object(o.a)("Expression of type "+t.type+" is not allowed here")}function s(t,e,n){void 0===n&&(n=[0,0,0,0]);var i=a(t,e);return Object(r.c)(i)?i:n}function c(t,e,n){void 0===n&&(n=NaN);var i=a(t,e);return"number"==typeof i?i:n}function l(t,e,n){void 0===n&&(n="");var i=a(t,e);return"string"==typeof i?i:n}function u(t,e,n){var i=m(t,e);if(0===i)return s(t.steps[0].value,n);if(i===t.steps.length)return s(t.steps[t.steps.length-1].value,n);var r=v(t,e,i),o=s(t.steps[i-1].value,n),a=s(t.steps[i].value,n);return[o[0]*(1-r)+a[0]*r,o[1]*(1-r)+a[1]*r,o[2]*(1-r)+a[2]*r,o[3]*(1-r)+a[3]*r]}function d(t,e,n){return{type:"binder",styleZoom:t,styleState:e,tileData:n}}function f(t,e,n,i){return{type:"labeling",styleZoom:t,styleState:e,interpolateExpressionAsStep:n,tileData:i}}function h(t,e,n,i,r){return{type:"filter",metatile:t,styleState:e,tileProps:i,tileAttrs:r,sourceAttrs:n}}function p(t,e,n,i,r){return{type:"geojsonFilter",metatile:t,styleState:e,sourceAttrs:n,tileProps:i,tileAttrs:r}}function m(t,e){for(var n=0;n<t.steps.length&&!(e<t.steps[n].key);)n++;return n}function v(t,e,n){var i=t.base,r=t.steps[n].key-t.steps[n-1].key,o=e-t.steps[n-1].key;return 1===i?o/r:(Math.pow(i,o)-1)/(Math.pow(i,r)-1)}function _(t){var e=t[0],n=t[1],i=t[2],r=t[3];return[((e*r+127)/255>>>0)/255,((n*r+127)/255>>>0)/255,((i*r+127)/255>>>0)/255,r/255]}function y(t){var e=new Set;return function t(e,n){if(Object(i.e)(n))e.add(n);else switch(n.type){case"all":return function(e,n){n.array.forEach((function(n){return t(e,n)}))}(e,n);case"match":return function(e,n){t(e,n.defaultOutput),n.cases.forEach((function(n){return t(e,n.output)}))}(e,n);case"step":case"interpolate":return function(e,n){n.steps.forEach((function(n){return t(e,n.value)}))}(e,n)}}(e,t),Array.from(e)}},function(t,e,n){"use strict";n.d(e,"m",(function(){return i})),n.d(e,"n",(function(){return r})),n.d(e,"l",(function(){return o})),n.d(e,"i",(function(){return a})),n.d(e,"f",(function(){return s})),n.d(e,"p",(function(){return c})),n.d(e,"o",(function(){return l})),n.d(e,"h",(function(){return u})),n.d(e,"j",(function(){return d})),n.d(e,"d",(function(){return f})),n.d(e,"c",(function(){return h})),n.d(e,"g",(function(){return p})),n.d(e,"b",(function(){return m})),n.d(e,"a",(function(){return v})),n.d(e,"e",(function(){return _})),n.d(e,"k",(function(){return y}));var i=256,r=Math.pow(2,32),o=Math.pow(2,20),a=Math.pow(2,16)-1,s=2.54,c=96,l=r/(i/c*s),u=.7071067811865475,d=4294967295,f=1175494351e-47,h=3402823466e29,p=["Arial","Helvetica","HelveticaNeueCyr","Open_Sans","Open_Sans_Semibold","Open_Sans_Italic","Segoe_UI","PT_Sans_Caption","PT_Sans","Verdana","Verdana_bold","Noto_Sans","Noto_Sans_Semibold","Noto_Sans_Italic","SuisseIntl_Bold"],m="Noto_Sans",v=1,_=v/2,y=-3},function(t,e,n){"use strict";var i=function(){function t(e,n){this._initData=e,this.byteLength=void 0!==e.byteLength?e.byteLength:e,this.type=t.ArrayBuffer,this.drawType=t.StaticDraw,this.options=Object.assign({},t.defaultOptions,n),this._glBuffer=null,this._glContext=null}return t.prototype.bind=function(e,n,i){return this._glBuffer||this.prepare(e),this.type===t.ArrayBuffer?(e.bindBuffer(e.ARRAY_BUFFER,this._glBuffer),i=i||this.options,e.vertexAttribPointer(n,i.itemSize,this._toGlParam(e,i.dataType),i.normalized,i.stride,i.offset)):this.type===t.ElementArrayBuffer&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this._glBuffer),this},t.prototype.remove=function(){return this._unprepare(),this},t.prototype.subData=function(t,e,n){return t.bindBuffer(this._toGlParam(t,this.type),this._glBuffer),t.bufferSubData(this._toGlParam(t,this.type),e,n),this},t.prototype.prepare=function(t){return this._glContext=t,this._glBuffer=t.createBuffer(),t.bindBuffer(this._toGlParam(t,this.type),this._glBuffer),t.bufferData(this._toGlParam(t,this.type),this._initData,this._toGlParam(t,this.drawType)),this._initData=null,this},t.prototype._unprepare=function(){this._glBuffer&&(this._glContext.deleteBuffer(this._glBuffer),this._glBuffer=null,this._glContext=null)},t.prototype._toGlParam=function(e,n){return n===t.ArrayBuffer?e.ARRAY_BUFFER:n===t.ElementArrayBuffer?e.ELEMENT_ARRAY_BUFFER:n===t.StaticDraw?e.STATIC_DRAW:n===t.DynamicDraw?e.DYNAMIC_DRAW:n===t.Byte?e.BYTE:n===t.Short?e.SHORT:n===t.Int?e.INT:n===t.Float?e.FLOAT:n===t.UnsignedByte?e.UNSIGNED_BYTE:n===t.UnsignedShort?e.UNSIGNED_SHORT:n===t.UnsignedInt?e.UNSIGNED_INT:null},t}();i.ArrayBuffer=1,i.ElementArrayBuffer=2,i.StaticDraw=10,i.DynamicDraw=11,i.Float=20,i.UnsignedByte=21,i.UnsignedShort=22,i.UnsignedInt=23,i.Byte=24,i.Short=25,i.Int=26,i.defaultOptions={itemSize:3,dataType:i.Float,stride:0,offset:0,normalized:!1},e.a=i},function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"j",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"o",(function(){return c})),n.d(e,"a",(function(){return l})),n.d(e,"q",(function(){return u})),n.d(e,"m",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"f",(function(){return h})),n.d(e,"k",(function(){return p})),n.d(e,"n",(function(){return m})),n.d(e,"g",(function(){return v})),n.d(e,"i",(function(){return _})),n.d(e,"h",(function(){return y})),n.d(e,"p",(function(){return g})),n.d(e,"e",(function(){return b}));var i=n(11);function r(){var t=new i.a(2);return t[0]=0,t[1]=0,t}function o(t){var e=new i.a(2);return e[0]=t[0],e[1]=t[1],e}function a(t,e){var n=new i.a(2);return n[0]=t,n[1]=e,n}function s(t,e){return t[0]=e[0],t[1]=e[1],t}function c(t,e,n){return t[0]=e,t[1]=n,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function d(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function f(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function h(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function p(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function m(t,e){var n=e[0],i=e[1],r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]}function _(t,e){return t[0]===e[0]&&t[1]===e[1]}function y(t,e){var n=t[0],r=t[1],o=e[0],a=e[1];return Math.abs(n-o)<=i.b*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=i.b*Math.max(1,Math.abs(r),Math.abs(a))}var g=u,b=h;r()},function(t,e,n){"use strict";n.d(e,"e",(function(){return d})),n.d(e,"c",(function(){return f})),n.d(e,"i",(function(){return h})),n.d(e,"o",(function(){return p})),n.d(e,"r",(function(){return m})),n.d(e,"s",(function(){return v})),n.d(e,"d",(function(){return _})),n.d(e,"n",(function(){return y})),n.d(e,"h",(function(){return g})),n.d(e,"k",(function(){return b})),n.d(e,"l",(function(){return x})),n.d(e,"j",(function(){return S})),n.d(e,"q",(function(){return I})),n.d(e,"p",(function(){return j})),n.d(e,"a",(function(){return O})),n.d(e,"b",(function(){return M})),n.d(e,"f",(function(){return P})),n.d(e,"g",(function(){return L})),n.d(e,"m",(function(){return T}));var i=n(8),r=n(84),o=n(64),a=n.n(o),s=n(16),c=n(2),l=n(3),u=n(97);function d(t){return{coords:t,size:Object(l.r)(t[2]),offset:Object(l.o)(t)}}function f(t){return t[0]+"_"+t[1]+"_"+t[2]+"_"+t[3]}function h(t,e){return f(t)+"_"+e.stringify()}function p(t){var e=t.split("_");return[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}function m(t){var e=new a.a(t),n=u.TileResponseData.read(e).tileGroups[0],i=n.x,r=n.y,o=n.zoom;return n.tiles.map((function(t){var e=t.regionId,n=t.hash,a=t.data;return a||(console.warn("Tile "+o+"_"+i+"_"+r+" from region "+e+" is corrupt (has no data)"),a=new Uint8Array(0)),{data:a,regionId:e,metatileHash:Object(s.e)(n)}}))}function v(t){return t.map((function(t){return{regionId:t.regionId,metatileHash:t.metatileHash}}))}function _(t){var e=4*Math.ceil(t.byteLength/4),n=new ArrayBuffer(e);return new Uint8Array(n).set(t),n}function y(t,e){var n=t[0],i=t[1],r=t[2],o={min:Object(l.o)([n,i,r,r]),max:Object(l.o)([n+1,i+1,r,r])};return Object(c.B)(o,e)}function g(t,e,n){for(var i=Object(c.o)(t),r=Object(l.r)(e),o=Math.pow(2,e)-1,a=Math.max(Math.floor((i.min[0]+2147483648)/r),0),s=Math.min(Math.floor((i.max[0]+2147483648)/r),o),u=Math.max(Math.floor((i.min[1]+2147483648)/r),0),d=Math.min(Math.floor((i.max[1]+2147483648)/r),o),h=[],p=a;p<=s;p++)for(var m=u;m<=d;m++){var v=[p,m,e,n];y(v,t)&&h.push(f(v))}return h}function b(t,e,n,i,o,s,l,d,f,h){var p=new a.a,m={tiles:[{x:o[0],y:o[1],zoom:o[2]}]};return u.TileRequestUrl.write(m,p),Object(c.p)("tiles",{host:t,tileSet:e,tileKey:s,sessionId:h,protocol:n,appId:l,lang:d,defaultLang:f,subdomain:i[Math.abs(o[0]+o[1])%i.length],request:encodeURIComponent(r.encode(p.finish()))})}function x(t,e){var n=t.coords,i=e.coords,r=n[2],o=i[2];return r===o?n[0]===i[0]&&n[1]===i[1]:r<o?w(t,e):w(e,t)}function w(t,e){if(e.zoomLevel<t.zoomLevel)return!1;if(e.zoomLevel===t.zoomLevel)return e.coords[0]===t.coords[0]&&e.coords[1]===t.coords[1]&&e.detailLevel>t.detailLevel;var n=Math.pow(2,e.coords[2]-t.coords[2]),i=t.coords[0]*n,r=i+n,o=t.coords[1]*n,a=o+n,s=e.coords[0],c=e.coords[1];return s>=i&&s<r&&c>=o&&c<a}function S(t,e,n){var i=t.coords,r=Math.min(e,n),o=Math.pow(2,t.zoomLevel-r);return f([Math.floor(i[0]/o),Math.floor(i[1]/o),r,e])}function I(t,e,n,i){return t[S(e,n,i)]}function j(t,e){var n=[];for(var i in t){var r=t[i];w(e,r)&&n.push(r)}return n}function O(t,e,n){return i.f(t,Object(l.n)(e.coords))-i.f(t,Object(l.n)(n.coords))}function M(t,e){return t[1]-e[1]||t[0]-e[0]}function P(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var i=t[n],r=e[n];if(i[0]!==r[0]||i[1]!==r[1])return!1}return!0}function L(t,e){for(var n=[],i=0;i<t.length;i++){var r=t[i];e.has(r)&&n.push(r)}return n}function T(t){return t>=1&&t<=65535}},function(t,e,n){"use strict";n.d(e,"q",(function(){return o})),n.d(e,"p",(function(){return a})),n.d(e,"h",(function(){return s})),n.d(e,"m",(function(){return c})),n.d(e,"o",(function(){return l})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return d})),n.d(e,"c",(function(){return f})),n.d(e,"d",(function(){return h})),n.d(e,"i",(function(){return p})),n.d(e,"j",(function(){return m})),n.d(e,"a",(function(){return v})),n.d(e,"n",(function(){return _})),n.d(e,"k",(function(){return y})),n.d(e,"b",(function(){return g})),n.d(e,"e",(function(){return b})),n.d(e,"l",(function(){return x}));var i=n(6),r=n(8);function o(t,e){return t*Math.pow(2,-e)*i.n/i.m}function a(t,e){return 0===t?-1/0:-Math.log(e*i.m/(t*i.n))/Math.LN2}function s(t){return t[0]>=0&&t[0]<=65535&&t[1]>=0&&t[1]<=65535}function c(t,e){return t*i.n/(65535*Math.pow(2,e))}function l(t){return t/i.l*65535}function u(t,e,n,i,r){if(e!==i||n!==r){var o=r-n,a=e-i,s=1/Math.sqrt(o*o+a*a);t[0]=o*s,t[1]=a*s}else t[0]=0,t[1]=0}function d(t,e,n,i){var r=0;if(t!==n||e!==i){var o=i-e,a=t-n,s=1/Math.sqrt(o*o+a*a);r=(a=127*(a*=s)+(a<0?-.5:.5)<<24>>>16)+(o=127*(o*=s)+(o<0?-.5:.5)<<24>>>24)}return r}function f(t,e,n,i,r){if(e!==i||n!==r){var o=i-e,a=r-n,s=1/Math.sqrt(o*o+a*a);t[0]=o*s,t[1]=a*s}else t[0]=0,t[1]=0}function h(t,e,n,i,r){var o=e+i,a=n+r,s=e*o+n*a;if(0!==s){var c=1/s;t[0]=o*c,t[1]=a*c}else t[0]=0,t[1]=0}function p(t,e){return(127*e+(e<0?-.5:.5)<<24>>>16)+(127*t+(t<0?-.5:.5)<<24>>>24)}function m(t){var e=127*t[0]+(t[0]<0?-.5:.5)<<24>>>24;return(127*t[1]+(t[1]<0?-.5:.5)<<24>>>16)+e}function v(t,e,n,i,r){t[0]=e*i+n*r,t[1]=n*i-e*r}function _(t,e){t[0]=-e[1],t[1]=e[0]}function y(t){return 0===t[0]&&0===t[1]}function g(t,e){return Math.atan2(e[1]-t[1],e[0]-t[0])}function b(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}function x(t,e){var n=Math.cos(e)*t[0]-Math.sin(e)*t[1],i=Math.sin(e)*t[0]+Math.cos(e)*t[1];r.o(t,n,i)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return s}));var i=1e-6,r="undefined"!=typeof Float64Array?Float64Array:Array,o=Math.random,a=Math.PI/180;function s(t){return t*a}},function(t,e,n){"use strict";var i,r,o,a;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return a})),function(t){t[t.Common=0]="Common",t[t.Commercial=1]="Commercial",t[t.Landmark=2]="Landmark"}(i||(i={})),function(t){t[t.Tile=0]="Tile",t[t.Floor=1]="Floor",t[t.DynamicObject=2]="DynamicObject",t[t.PersonalPoi=3]="PersonalPoi"}(r||(r={})),function(t){t[t.Dead=0]="Dead",t[t.Alive=1]="Alive",t[t.Unused=2]="Unused",t[t.CommercialAlive=3]="CommercialAlive",t[t.CommercialDead=4]="CommercialDead"}(o||(o={})),function(t){t[t.Text=0]="Text",t[t.Icon=1]="Icon",t[t.PoiText=2]="PoiText",t[t.PoiText2=3]="PoiText2",t[t.OneWayLine=4]="OneWayLine",t[t.LineText=5]="LineText",t[t.Box=6]="Box"}(a||(a={}))},function(t,e,n){"use strict";n.d(e,"e",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"f",(function(){return c})),n.d(e,"d",(function(){return l})),n.d(e,"h",(function(){return u})),n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return h}));var i=n(8),r=n(2),o=n(3);function a(t,e){return{min:t||i.j(1/0,1/0),max:e||i.j(-1/0,-1/0)}}function s(t){return a(Object(o.l)(t.southWest),Object(o.l)(t.northEast))}function c(t,e){i.m(t.min,t.min,e),i.l(t.max,t.max,e)}function l(t,e){t.min[0]=e.min[0],t.max[0]=e.max[0],t.min[1]=e.min[1],t.max[1]=e.max[1]}function u(t){t.min[0]=1/0,t.max[0]=-1/0,t.min[1]=1/0,t.max[1]=-1/0}function d(t,e){t[0]=e.min[0]+(e.max[0]-e.min[0])/2,t[1]=e.min[1]+(e.max[1]-e.min[1])/2}function f(t,e,n){t[0]=Object(r.d)(n[0],e.min[0],e.max[0]),t[1]=Object(r.d)(n[1],e.min[1],e.max[1])}function h(t,e){return e[0]<=t.max[0]&&e[0]>=t.min[0]&&e[1]<=t.max[1]&&e[1]>=t.min[1]}},function(t,e,n){"use strict";n.d(e,"b",(function(){return B})),n.d(e,"c",(function(){return N})),n.d(e,"d",(function(){return U})),n.d(e,"a",(function(){return H})),n.d(e,"e",(function(){return Z}));var i={};n.r(i),n.d(i,"linear",(function(){return a})),n.d(i,"ease",(function(){return c})),n.d(i,"easeInQuad",(function(){return l})),n.d(i,"easeOutQuad",(function(){return u})),n.d(i,"easeInOutQuad",(function(){return d})),n.d(i,"easeInCubic",(function(){return f})),n.d(i,"easeOutCubic",(function(){return h})),n.d(i,"easeInOutCubic",(function(){return p})),n.d(i,"easeInQuart",(function(){return m})),n.d(i,"easeOutQuart",(function(){return v})),n.d(i,"easeInOutQuart",(function(){return _})),n.d(i,"easeInQuint",(function(){return y})),n.d(i,"easeOutQuint",(function(){return g})),n.d(i,"easeInOutQuint",(function(){return b})),n.d(i,"easeInSine",(function(){return x})),n.d(i,"easeOutSine",(function(){return w})),n.d(i,"easeInOutSine",(function(){return S})),n.d(i,"easeInExpo",(function(){return I})),n.d(i,"easeOutExpo",(function(){return j})),n.d(i,"easeInOutExpo",(function(){return O})),n.d(i,"easeInCirc",(function(){return M})),n.d(i,"easeOutCirc",(function(){return P})),n.d(i,"easeInOutCirc",(function(){return L})),n.d(i,"easeInElastic",(function(){return T})),n.d(i,"easeOutElastic",(function(){return k})),n.d(i,"easeInOutElastic",(function(){return z})),n.d(i,"easeInBack",(function(){return C})),n.d(i,"easeOutBack",(function(){return E})),n.d(i,"easeInOutBack",(function(){return A})),n.d(i,"easeOutBounce",(function(){return D})),n.d(i,"inertia",(function(){return F}));var r=n(1),o=n(0);function a(t,e,n,i,r){return n+i/r*e}var s=n(99)(.25,.1,.25,1);function c(t,e,n,i,r){return n+i*s(e/r)}function l(t,e,n,i,r){return i*(e/=r)*e+n}function u(t,e,n,i,r){return-i*(e/=r)*(e-2)+n}function d(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e+n:-i/2*(--e*(e-2)-1)+n}function f(t,e,n,i,r){return i*(e/=r)*e*e+n}function h(t,e,n,i,r){return i*((e=e/r-1)*e*e+1)+n}function p(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e*e+n:i/2*((e-=2)*e*e+2)+n}function m(t,e,n,i,r){return i*(e/=r)*e*e*e+n}function v(t,e,n,i,r){return-i*((e=e/r-1)*e*e*e-1)+n}function _(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e*e*e+n:-i/2*((e-=2)*e*e*e-2)+n}function y(t,e,n,i,r){return i*(e/=r)*e*e*e*e+n}function g(t,e,n,i,r){return i*((e=e/r-1)*e*e*e*e+1)+n}function b(t,e,n,i,r){return(e/=r/2)<1?i/2*e*e*e*e*e+n:i/2*((e-=2)*e*e*e*e+2)+n}function x(t,e,n,i,r){return-i*Math.cos(e/r*(Math.PI/2))+i+n}function w(t,e,n,i,r){return i*Math.sin(e/r*(Math.PI/2))+n}function S(t,e,n,i,r){return-i/2*(Math.cos(Math.PI*e/r)-1)+n}function I(t,e,n,i,r){return 0==e?n:i*Math.pow(2,10*(e/r-1))+n}function j(t,e,n,i,r){return e==r?n+i:i*(1-Math.pow(2,-10*e/r))+n}function O(t,e,n,i,r){return 0==e?n:e==r?n+i:(e/=r/2)<1?i/2*Math.pow(2,10*(e-1))+n:i/2*(2-Math.pow(2,-10*--e))+n}function M(t,e,n,i,r){return-i*(Math.sqrt(1-(e/=r)*e)-1)+n}function P(t,e,n,i,r){return i*Math.sqrt(1-(e=e/r-1)*e)+n}function L(t,e,n,i,r){return(e/=r/2)<1?-i/2*(Math.sqrt(1-e*e)-1)+n:i/2*(Math.sqrt(1-(e-=2)*e)+1)+n}function T(t,e,n,i,r){var o=1.70158,a=0,s=i;return 0==e?n:1==(e/=r)?n+i:(a||(a=.3*r),s<Math.abs(i)?(s=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/s),-s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)+n)}function k(t,e,n,i,r){var o=1.70158,a=0,s=i;return 0==e?n:1==(e/=r)?n+i:(a||(a=.3*r),s<Math.abs(i)?(s=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/s),s*Math.pow(2,-10*e)*Math.sin((e*r-o)*(2*Math.PI)/a)+i+n)}function z(t,e,n,i,r){var o=1.70158,a=0,s=i;return 0==e?n:2==(e/=r/2)?n+i:(a||(a=r*(.3*1.5)),s<Math.abs(i)?(s=i,o=a/4):o=a/(2*Math.PI)*Math.asin(i/s),e<1?s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)*-.5+n:s*Math.pow(2,-10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/a)*.5+i+n)}function C(t,e,n,i,r,o){return null==o&&(o=1.70158),i*(e/=r)*e*((o+1)*e-o)+n}function E(t,e,n,i,r,o){return null==o&&(o=1.70158),i*((e=e/r-1)*e*((o+1)*e+o)+1)+n}function A(t,e,n,i,r,o){return null==o&&(o=1.70158),(e/=r/2)<1?i/2*(e*e*((1+(o*=1.525))*e-o))+n:i/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+n}function D(t,e,n,i,r){return(e/=r)<1/2.75?i*(7.5625*e*e)+n:e<2/2.75?i*(7.5625*(e-=1.5/2.75)*e+.75)+n:e<2.5/2.75?i*(7.5625*(e-=2.25/2.75)*e+.9375)+n:i*(7.5625*(e-=2.625/2.75)*e+.984375)+n}function F(t,e,n,i,r){return i*(1-Math.pow(1-e/r,o.inertia.nonLinearity+1))+n}var R={easing:"easeInOutQuad",forceFinalValue:!0,renderAfterUpdate:!0};function B(t,e){return e.tickers[t]}function N(t,e,n,i,o,a,s){n.tickers[t]=Object(r.a)(Object(r.a)(Object(r.a)({},R),e),{from:i,to:o,duration:a,attributes:s,startTime:n.time})}function U(t,e){delete e.tickers[t]}function H(t,e){return!!e.tickers[t]}function Z(t,e,n){var i=n.tickers[t];if(i){var r,o=n.time-i.startTime;if(i.from.length){r=[];for(var a=0;a<i.from.length;a++){var s=G(i.easing,i.from[a],i.to[a],i.duration,o);r.push(s)}}else r=G(i.easing,i.from,i.to,i.duration,o);var c=!1;o>=i.duration&&(i.forceFinalValue&&(r=i.to),c=!0),e.step&&e.step(n,r,i.attributes),c&&(U(t,n),e.complete&&e.complete(n)),i.renderAfterUpdate&&(n.needRerender=!0)}}function G(t,e,n,r,o){return i[t](null,o,e,n-e,r)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return nt})),n.d(e,"f",(function(){return at})),n.d(e,"e",(function(){return st})),n.d(e,"a",(function(){return ct})),n.d(e,"d",(function(){return lt})),n.d(e,"c",(function(){return ut}));var i={};n.r(i),n.d(i,"sinks",(function(){return f})),n.d(i,"generateShiftedLine",(function(){return h}));var r={};n.r(r),n.d(r,"sinks",(function(){return L})),n.d(r,"generateLineExtrusion",(function(){return T}));var o={};n.r(o),n.d(o,"sinks",(function(){return H})),n.d(o,"processElement",(function(){return Z})),n.d(o,"getLabelingInfo",(function(){return G}));var a={};n.r(a),n.d(a,"sinks",(function(){return V})),n.d(a,"processElement",(function(){return q})),n.d(a,"getLabelingInfo",(function(){return Y}));var s=n(1),c=n(46),l=n(85),u=n(23),d=function(t,e,n,i,r){return Object(u.c)([t,e],n,i,r)},f={solid:{stride:16,binder:function(t,e){t.position=new Uint16Array(e),t.extender=new Int8Array(e,4),t.normal=new Int8Array(e,6),t.shift=new Float32Array(e,8)},packObjectAttributes:d,unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},h=function(t,e,n,i,r,o){var a=!Number.isNaN(r[i.beginningIsCut])&&0!==r[i.beginningIsCut],s=!Number.isNaN(r[i.endingIsCut])&&0!==r[i.endingIsCut],c=t.getBucket(n.type,"solid",d(e,n.innerId,n.dataKeys,i,r),f.solid.binder);Object(l.a)(c,o[0],o[1],o[0].length,!a,!s,0,o[2],o[3])},p=n(74),m=n(80),v=n(81),_=n(82),y=n(88),g=n(8),b=n(86),x=n(59),w=n(61),S=g.d(),I=g.d(),j=g.d(),O=g.d(),M=function(t,e,n,i,r,o){return Object(u.c)([t,e],n,i,r,o)},P=function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}},L={fill:{stride:16,binder:function(t,e){t.position=new Uint16Array(e),t.normal=new Uint16Array(e,8)},packObjectAttributes:M,unpackObjectAttributes:P},topStroke:{stride:12,binder:function(t,e){t.position=new Uint16Array(e),t.directionDistance=new Int8Array(e,8)},packObjectAttributes:M,unpackObjectAttributes:P},sideStroke:{stride:16,binder:function(t,e){t.position=new Uint16Array(e),t.distance=new Int16Array(e,6),t.normals=new Uint16Array(e,8),t.direction=new Uint16Array(e,12)},packObjectAttributes:M,unpackObjectAttributes:P}},T=function(t,e,n,i,r,o,a){for(var s=a[0],c=a[1],l=s.length,u=t.getBucket(n.type,"fill",L.fill.packObjectAttributes(e,n.innerId,n.dataKeys,r,o,i),L.fill.binder),d=t.getBucket(n.type,"topStroke",L.topStroke.packObjectAttributes(e,n.innerId,n.dataKeys,r,o,i),L.topStroke.binder),f=t.getBucket(n.type,"sideStroke",L.sideStroke.packObjectAttributes(e,n.innerId,n.dataKeys,r,o,i),L.sideStroke.binder),h=0;h<l-1;h++){var p=s[h],m=c[h],v=s[h+1],_=c[h+1];g.o(S,p,v),g.o(I,m,_),g.o(j,v,p),g.o(O,_,m),Object(b.a)(u,2,S,I,void 0,1),Object(x.a)(d,p,m,1,v,_,1),Object(w.a)(f,2,S,I,void 0),Object(w.a)(f,2,j,O,void 0),Object(w.b)(f,2,S,I,void 0,1)}g.o(S,s[l-1],s[0]),g.o(I,c[l-1],c[0]),Object(w.b)(f,2,S,I,void 0,1)},k=n(66),z=n(54),C=n(10),E=n(3),A=n(67),D=n(0),F=n(2),R=n(5),B=n(6),N=[0,0,0],U=[0,0],H={raster:{stride:28,binder:function(t,e){t.position=new Uint16Array(e),t.texCoords=new Uint16Array(e,8),t.cornerOffset=new Float32Array(e,12),t.styleZoomLimits=new Float32Array(e,20)},packObjectAttributes:function(t,e,n,i){return Object(u.b)([t.styleId,t.layer.innerId,e,n,i],t.tileData)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],range:t[3],fontIndex:t[4],tileData:t.slice(5)}}}},Z=function(t,e,n,i,r,o,a){var s,c=n.label,l=n.anchorPosition,u=n.anchorSegmentIndex,d=n.halfLabelWidth,f=n.layer;if("labelLine"===f.type){for(var h=c.axis,p=o.center,m=o.styleZoom,v=Object(R.f)(m,o.styleState,!1,c.tileData),_=Object(R.j)(f.style.textFont,v),y=null!==(s=t.fontNameToIndex[_])&&void 0!==s?s:t.fontNameToIndex[B.b],g={},b=0,x=c.ranges;b<x.length;b++){var w=x[b];g[w]=e.getBucket("labelLine","raster",H.raster.packObjectAttributes(c,i,w,y),H.raster.binder)}var S=c.textMetrics.lines[0],I=Object(R.i)(f.style.textFontSize,v)/D.fonts.baseSize,j=S.glyphs,O=function(t,e,n,i){var r=t.interpolate(e-n,t.getSegmentIndex(e-n)),o=t.interpolate(e+n,t.getSegmentIndex(e+n)),a=Math.atan2(o[1]-r[1],o[0]-r[0])-i;return Math.cos(a)<0}(h,l,d,o.rotation);U[0]=-S.width/2,U[1]=0;for(var M=0;M<j.length;M++){for(var P=j[M],L=(U[0]+P.left+P.width/2)*I*(O?-1:1),T=Object(F.G)(L)||1,k=-1/0,z=1/0,Z=u;Z>=1&&Z<h.vertexCount&&!(z<n.overflowStyleZoom);Z+=T,z=k){var G=1===T?Z:Z-1;k=Object(E.f)(Object(C.p)(L,h.lengths[G]-l),p);var W=h.interpolate(l,Z);Object(E.k)(N,W,a),Object(C.h)(N)&&void 0!==P.bitmap&&Object(A.a)(g[P.range],N,U,P,W[3]+(O?Math.PI:0),Math.max(k,n.overflowStyleZoom),z)}U[0]+=P.advance+D.fonts.baseSize*f.style.textLetterSpacing}}},G=function(){},W=[0,0,0],V={raster:{stride:16,binder:function(t,e){t.position=new Uint16Array(e),t.direction=new Uint16Array(e,8),t.widenDirection=new Uint16Array(e,12)},packObjectAttributes:function(t,e){return[t.styleId,t.layer.innerId,e]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],tileData:[]}}}},q=function(t,e,n,i,r,o,a){var s=n.label,c=n.anchorWorld;if(Object(E.k)(W,c,a),Object(C.h)(W)){var l=e.getBucket("oneWayLine","raster",V.raster.packObjectAttributes(s,i),V.raster.binder);Object(A.b)(l,W,c[3])}},Y=function(){},X=n(35),K=n(65),J=n(55),Q=n(53),$=n(30),tt=function(t,e,n,i,r,o,a,s){var c=o.tileProps,l={type:$.a.Line,styleId:e,layerId:n.innerId,tileCoords:i,id:a[c.id],componentDistanceStart:Object($.b)(a[c.componentDistanceStart],0),componentDistanceEnd:Object($.b)(a[c.componentDistanceEnd],0),objectLength:Object($.b)(a[c.objectLength],0),labelPriority:Object($.b)(a[c.labelPriority],0),vertices:[s[0],s[1]],tileData:Object(u.c)([],n.dataKeys,c,a,r)};t.addLabel(l)},et=function(t,e,n,i,r,o,a,s){var c=o.tileProps,l={type:$.a.OneWayLine,styleId:e,layerId:n.innerId,tileCoords:i,id:a[c.id],componentDistanceStart:Object($.b)(a[c.componentDistanceStart],0),componentDistanceEnd:Object($.b)(a[c.componentDistanceEnd],0),objectLength:Object($.b)(a[c.objectLength],0),labelPriority:Object($.b)(a[c.labelPriority],0),vertices:[s[0],s[1]],tileData:Object(u.c)([],n.dataKeys,c,a,r)};t.addLabel(l)};function nt(t){var e=t.collector,n=t.generator,i=t.args;do{n.apply(void 0,Object(s.e)([e],i))}while(e.isOverloaded())}var it={line:c,polygon:z,labelLine:o,lineExtrusion:r,polygonExtrusion:p,oneWayLine:a,dashedLine:m,shiftedLine:i,circle:y,buildingModel:v,arrow:_,point:X,stretchableImage:K,raster:k,heatmap:J},rt={labelLine:o,oneWayLine:a,point:X},ot=function(t){var e=it[t];return(null==e?void 0:e.sinks)||void 0};function at(t,e,n){var i=ot(t);return i?i[e].unpackObjectAttributes(n):{styleId:0,layerId:0}}function st(t,e){var n=ot(t);return n?n[e].stride:0}function ct(t,e,n,i,r,o,a,s,l,u,d,f,v,y,g){n.forEach((function(n){if((void 0===i||!(n.maxzoom<=i||n.minzoom>=i+1&&i!==D.tiles.maxDetailLevel))&&(!o.hovered||Number.isNaN(a[o.hovered])||1!==a[o.hovered]||"polygon"===n.type||"polygonExtrusion"===n.type||"point"===n.type))do{switch(n.type){case"line":c.generateLine(t,e.id,n,o,a,v);break;case"dashedLine":m.generateDashedLine(t,e.id,n,o,a,v);break;case"shiftedLine":h(t,e.id,n,o,a,v);break;case"polygon":z.generatePolygon(t,e,n,o,a,v,y);break;case"polygonExtrusion":p.generatePolygonExtrusion(t,e.id,n,r,l,s,o,a,v,!0,y);break;case"labelLine":tt(t,e.id,n,u,s,r,a,v);break;case"oneWayLine":et(t,e.id,n,u,s,r,a,v);break;case"point":Object(Q.a)(t,e,n,u,s,r,a,v,d,f,g);break;case"lineExtrusion":T(t,e.id,n,s,o,a,v);break;case"arrow":_.generateArrow(t,e.id,n,o,a,v);break;case"heatmap":var b=Object(R.e)(r,l,s,o,a);J.generateHeatmapPoints(t,e.id,n,v,b)}}while(t.isOverloaded())}))}function lt(t,e,n,i,r,o,a,s){var c=rt[e.type];if(c)do{c.processElement(t,n,i,r,o,a,s)}while(n.isOverloaded())}function ut(t,e,n,i,r,o){var a=rt[n.type];a&&a.getLabelingInfo(t,e,i,r,o)}},function(t,e,n){"use strict";n.d(e,"e",(function(){return o})),n.d(e,"f",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return l})),n.d(e,"d",(function(){return d})),n.d(e,"c",(function(){return f}));var i=n(2),r=n(84);function o(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]*Math.pow(256,t.length-1-n);return e}function a(t){for(var e=new Uint8Array(6),n=0;n<6;n++)e[n]=255&Math.floor(t/Math.pow(256,5-n));return encodeURIComponent(r.encode(e))}function s(t){var e=function(t,e){var n={};t.forEach((function(t,e){n[t]=e}));var i=t.length;for(var r in n.selected=i++,n.hovered=i++,n.dpi=i++,n.isRealtime=i++,n.pixelDensityPreset=i++,e)void 0===n[r]&&(n[r]=i++);return n}(t.tileProps,t.defaultProps),n={};for(var r in t.defaultProps)n[r]={index:e[r],value:t.defaultProps[r]};return{version:t.version,dictionaries:t.enumerationValues,reverseDictionaries:Object.keys(t.enumerationValues).reduce((function(e,n){return e[n]=Object(i.D)(t.enumerationValues[n]),e}),{}),tileProps:e,tilePropsByIndex:Object(i.D)(e),defaultProps:n}}function c(t,e){var n={};if(e)for(var i=0;i<e.length;i++)n[e[i]]=i;return s({enumerationValues:{db_sublayer:n},version:"",zenithVersion:"",date:"",defaultProps:{},tileProps:t})}function l(t,e){for(var n=t.tileProps,i=Object.keys(n).length,r=0,o=e;r<o.length;r++){var a=o[r];void 0===n[a]&&(n[a]=i,i+=1)}}var u=0,d={beginningIsCut:u++,class:u++,componentDistanceEnd:u++,componentDistanceStart:u++,iconPriority:u++,labelPriority:u++,label2Priority:u++,dpi:u++,endingIsCut:u++,height:u++,hiddenByPlanBuildingId:u++,id:u++,isRealtime:u++,db_label:u++,db_label2:u++,nextPointX:u++,nextPointY:u++,db_object_class:u++,objectLength:u++,pixelDensityPreset:u++,previousPointX:u++,previousPointY:u++,db_region:u++,selected:u++,hovered:u++,db_sublayer:u++,traffic_color:u++,traffic_road_class:u++,traffic_road_z_level:u++},f={version:"0.0.0",tileProps:d,tilePropsByIndex:Object(i.D)(d),defaultProps:{},dictionaries:{},reverseDictionaries:{}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"m",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"h",(function(){return c})),n.d(e,"l",(function(){return l})),n.d(e,"k",(function(){return u})),n.d(e,"c",(function(){return d})),n.d(e,"j",(function(){return f})),n.d(e,"i",(function(){return h})),n.d(e,"f",(function(){return p})),n.d(e,"g",(function(){return m})),n.d(e,"d",(function(){return v})),n.d(e,"n",(function(){return _}));var i=n(11);function r(){var t=new i.a(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function a(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function s(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8],d=e[9],f=e[10],h=e[11],p=e[12],m=e[13],v=e[14],_=e[15],y=n*s-i*a,g=n*c-r*a,b=n*l-o*a,x=i*c-r*s,w=i*l-o*s,S=r*l-o*c,I=u*m-d*p,j=u*v-f*p,O=u*_-h*p,M=d*v-f*m,P=d*_-h*m,L=f*_-h*v,T=y*L-g*P+b*M+x*O-w*j+S*I;return T?(T=1/T,t[0]=(s*L-c*P+l*M)*T,t[1]=(r*P-i*L-o*M)*T,t[2]=(m*S-v*w+_*x)*T,t[3]=(f*w-d*S-h*x)*T,t[4]=(c*O-a*L-l*j)*T,t[5]=(n*L-r*O+o*j)*T,t[6]=(v*b-p*S-_*g)*T,t[7]=(u*S-f*b+h*g)*T,t[8]=(a*P-s*O+l*I)*T,t[9]=(i*O-n*P-o*I)*T,t[10]=(p*w-m*b+_*y)*T,t[11]=(d*b-u*w-h*y)*T,t[12]=(s*j-a*M-c*I)*T,t[13]=(n*M-i*j+r*I)*T,t[14]=(m*g-p*x-v*y)*T,t[15]=(u*x-d*g+f*y)*T,t):null}function c(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],d=e[8],f=e[9],h=e[10],p=e[11],m=e[12],v=e[13],_=e[14],y=e[15],g=n[0],b=n[1],x=n[2],w=n[3];return t[0]=g*i+b*s+x*d+w*m,t[1]=g*r+b*c+x*f+w*v,t[2]=g*o+b*l+x*h+w*_,t[3]=g*a+b*u+x*p+w*y,g=n[4],b=n[5],x=n[6],w=n[7],t[4]=g*i+b*s+x*d+w*m,t[5]=g*r+b*c+x*f+w*v,t[6]=g*o+b*l+x*h+w*_,t[7]=g*a+b*u+x*p+w*y,g=n[8],b=n[9],x=n[10],w=n[11],t[8]=g*i+b*s+x*d+w*m,t[9]=g*r+b*c+x*f+w*v,t[10]=g*o+b*l+x*h+w*_,t[11]=g*a+b*u+x*p+w*y,g=n[12],b=n[13],x=n[14],w=n[15],t[12]=g*i+b*s+x*d+w*m,t[13]=g*r+b*c+x*f+w*v,t[14]=g*o+b*l+x*h+w*_,t[15]=g*a+b*u+x*p+w*y,t}function l(t,e,n){var i,r,o,a,s,c,l,u,d,f,h,p,m=n[0],v=n[1],_=n[2];return e===t?(t[12]=e[0]*m+e[4]*v+e[8]*_+e[12],t[13]=e[1]*m+e[5]*v+e[9]*_+e[13],t[14]=e[2]*m+e[6]*v+e[10]*_+e[14],t[15]=e[3]*m+e[7]*v+e[11]*_+e[15]):(i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],d=e[8],f=e[9],h=e[10],p=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=h,t[11]=p,t[12]=i*m+s*v+d*_+e[12],t[13]=r*m+c*v+f*_+e[13],t[14]=o*m+l*v+h*_+e[14],t[15]=a*m+u*v+p*_+e[15]),t}function u(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3],c=r+r,l=o+o,u=a+a,d=r*c,f=r*l,h=r*u,p=o*l,m=o*u,v=a*u,_=s*c,y=s*l,g=s*u,b=i[0],x=i[1],w=i[2];return t[0]=(1-(p+v))*b,t[1]=(f+g)*b,t[2]=(h-y)*b,t[3]=0,t[4]=(f-g)*x,t[5]=(1-(d+v))*x,t[6]=(m+_)*x,t[7]=0,t[8]=(h+y)*w,t[9]=(m-_)*w,t[10]=(1-(d+p))*w,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function f(t,e,n,i,r){var o=1/Math.tan(e/2),a=1/(i-r);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(r+i)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*r*i*a,t[15]=0,t}function h(t,e,n,i,r,o,a){var s=1/(e-n),c=1/(i-r),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(r+i)*c,t[14]=(a+o)*l,t[15]=1,t}function p(t,e,n,r){var o,a,s,c,l,u,d,f,h,p,m=e[0],v=e[1],_=e[2],y=r[0],g=r[1],b=r[2],x=n[0],w=n[1],S=n[2];return Math.abs(m-x)<i.b&&Math.abs(v-w)<i.b&&Math.abs(_-S)<i.b?mat4.identity(t):(d=m-x,f=v-w,h=_-S,o=g*(h*=p=1/Math.sqrt(d*d+f*f+h*h))-b*(f*=p),a=b*(d*=p)-y*h,s=y*f-g*d,(p=Math.sqrt(o*o+a*a+s*s))?(o*=p=1/p,a*=p,s*=p):(o=0,a=0,s=0),c=f*s-h*a,l=h*o-d*s,u=d*a-f*o,(p=Math.sqrt(c*c+l*l+u*u))?(c*=p=1/p,l*=p,u*=p):(c=0,l=0,u=0),t[0]=o,t[1]=c,t[2]=d,t[3]=0,t[4]=a,t[5]=l,t[6]=f,t[7]=0,t[8]=s,t[9]=u,t[10]=h,t[11]=0,t[12]=-(o*m+a*v+s*_),t[13]=-(c*m+l*v+u*_),t[14]=-(d*m+f*v+h*_),t[15]=1,t)}var m=c;function v(t,e,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function _(t,e,n,r,o,a,s,c){var l=o[0]/o[1],u=n*Math.tan(i.d(e)/2),d=2*u,f=l*d,h=-f/2;c&&(h+=c.x*f/o[0],u-=c.y*d/o[1],f*=c.width/o[0],d*=c.height/o[1]);var p,m=h+f,v=u-d,_=2*n/(m-h),y=(m+h)/(m-h),g=(u+v)/(u-v),b=2*n/(u-v),x=-(r+n)/(r-n),w=-2*r*n/(r-n),S=0,I=0,j=s[0]-a[0],O=s[1]-a[1],M=s[2]-a[2],P=j*j+O*O+M*M;P>0&&(j*=p=1/Math.sqrt(P),O*=p,M*=p),(P=O*O+j*j)>0&&(S=-O*(p=1/Math.sqrt(P)),I=j*p);var L=-M*I,T=M*S,k=j*I-O*S,z=-(S*s[0]+I*s[1]),C=-(L*s[0]+T*s[1]+k*s[2]),E=-(j*s[0]+O*s[1]+M*s[2]);return t[0]=_*S+y*j,t[1]=b*L+g*j,t[2]=x*j,t[3]=-j,t[4]=_*I+y*O,t[5]=b*T+g*O,t[6]=x*O,t[7]=-O,t[8]=y*M,t[9]=b*k+g*M,t[10]=x*M,t[11]=-M,t[12]=_*z+y*E,t[13]=b*C+g*E,t[14]=x*E+w,t[15]=-E,t}},function(t,e,n){"use strict";var i,r;n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),function(t){t[t.Main=0]="Main",t[t.Parser=1]="Parser",t[t.Labeling=2]="Labeling",t[t.All=3]="All"}(i||(i={})),function(t){t[t.FunctionUse=0]="FunctionUse",t[t.FunctionResult=1]="FunctionResult"}(r||(r={}))},function(t,e,n){"use strict";function i(t){return"number"==typeof t||"boolean"==typeof t||"string"==typeof t||t instanceof Array&&4===t.length&&"number"==typeof t[0]}function r(t){if(Array.isArray(t)){var e=t;if(e.length>0&&("step"===e[0]||"interpolate"===e[0]||"all"===e[0]||"get"===e[0]||"sourceAttr"===e[0]||"global"===e[0]||"match"===e[0]))return!0}return!1}function o(t,e,n){return t+"_"+e+"_"+n}function a(t,e){return"unique-"+t+"_"+e}function s(t){if(Array.isArray(t)){var e=t;return r(t)?e:t[0]}return t}function c(t){if(Array.isArray(t)&&!r(t)&&void 0!==t[1])return t[1]}function l(t,e){if(Array.isArray(t)){var n=t[0],i=t.slice(1);if("all"===n)i.forEach((function(t){return l(t,e)}));else if("match"===n){var r=t[1];if(Array.isArray(r)&&"get"===r[0]&&"db_sublayer"===r[1]){var o=t[2];if(!Array.isArray(o))return;for(var a=0,s=o;a<s.length;a++){var c=s[a];"string"==typeof c&&e.add(c)}}}}}n.d(e,"e",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"f",(function(){return c})),n.d(e,"a",(function(){return l}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"c",(function(){return p})),n.d(e,"b",(function(){return m}));var i=n(39),r=n(16),o=n(6),a=n(19),s=n(21),c=n(57),l=0,u={type:i.b.Static,index:-1,key:Object(a.c)("",.5,.5),isSvg:!1,name:"",fileName:"",rasters:[],anchorX:.5,anchorY:.5},d=["default","marker","markerText","htmlLabel"],f={default:0,marker:1,markerText:2,htmlLabel:3},h={default:{default:!0,marker:!1,markerText:!0,htmlLabel:!0},marker:{default:!1,marker:!1,markerText:!0,htmlLabel:!1},markerText:{default:!0,marker:!0,markerText:!0,htmlLabel:!1},htmlLabel:{default:!0,marker:!1,markerText:!1,htmlLabel:!1}};function p(t){for(var e=[],n=Object.keys(r.d).length,i=0;i<n;i++)e[i]=NaN;for(var o in t){if(void 0===r.d[o])throw new Error("No such tile prop '"+o+"'");e[r.d[o]]=t[o]}return e}var m=function(){function t(){this.style={id:l,layers:[],layersById:{},layerIdToInnerId:{},groupsById:{},iconBaseUrl:"",iconNameTemplate:"",fontUrlTemplate:"",rasterSets:{byIndex:{},byKey:{}},labelingGroups:{indexToGroup:d,groupToIndex:f,table:h},fonts:o.g,fontNameToIndex:Object(c.a)(o.g),icons:{}},this.needRenderIndexRebuild=!1,this.zIndexById={};var t=Object(s.d)({type:"line",id:"debug-tile-bounds",minzoom:-1/0,maxzoom:1/0,style:{color:"#ff0000",width:1}});t&&this.addLayer(t,0)}return t.prototype.getStyle=function(){return this.style},t.prototype.appendRasterSet=function(t,e){this.style.rasterSets.byIndex[t.index]=t,void 0!==e&&(this.style.rasterSets.byKey[e]=t)},t.prototype.removeRasterSet=function(t){this.style.rasterSets.byIndex[t]=u},t.prototype.getLabelingGroupIndex=function(t){var e=this.style.labelingGroups.groupToIndex;return void 0!==e[t]?e[t]:e.default},t.prototype.addLayer=function(t,e){this.style.layers.push(t),this.style.layersById[t.innerId]=t,void 0!==e&&(this.zIndexById[t.innerId]=e),this.needRenderIndexRebuild=!0},t.prototype.removeLayer=function(t){var e=this.style.layersById[t];if(e){var n=this.style.layers.indexOf(e);-1!==n&&this.style.layers.splice(n,1),delete this.style.layersById[t]}},t.prototype.update=function(){this.needRenderIndexRebuild&&(this.rebuildRenderIndex(),this.needRenderIndexRebuild=!1)},t.prototype.updateLayerStyle=function(t,e){var n=e.style,i=e.dataKeys,r=this.style.layersById[t];r&&(r.style=n,r.dataKeys=i)},t.prototype.rebuildRenderIndex=function(){var t=this;this.style.layers.sort((function(e,n){var i,r;return(null!==(i=t.zIndexById[e.innerId])&&void 0!==i?i:0)-(null!==(r=t.zIndexById[n.innerId])&&void 0!==r?r:0)}));for(var e=0;e<this.style.layers.length;e++)this.style.layers[e].renderIndex=e},t}()},function(t,e,n){"use strict";n.d(e,"c",(function(){return x})),n.d(e,"a",(function(){return w})),n.d(e,"b",(function(){return S})),n.d(e,"d",(function(){return O}));var i=n(1),r=n(48),o=n(24),a=n(19),s=n(62),c=n(6),l=n(39),u=n(5);function d(t){for(var e=function(t){for(var e=t.groups,n=t.overlay,i=t.intersect,r=e.reduce((function(t,e,n){return t[e]=n,t}),{}),o=[],a=0;a<e.length;a++){for(var s=[],c=0;c<e.length;c++)s.push(!0);o.push(s)}for(var l=0;l<n.length;l++){var u=n[l];for(a=0;a<u.length;a++)for(c=a+1;c<u.length;c++){var d=r[u[a]],f=r[u[c]];o[d][f]=!1,o[f][d]=!1}}for(l=0;l<i.length;l++){var h=i[l];for(a=0;a<h.length;a++)for(c=a+1;c<h.length;c++)d=r[h[a]],f=r[h[c]],o[d][f]=!0,o[f][d]=!0}return{groups:e,table:o}}(function(t){var e=(t.groups||[]).concat(o.q.groups).reduce((function(t,e){return t.includes(e)||t.push(e),t}),[]),n=(t.overlay||[]).concat(o.q.overlay).concat(e.reduce((function(t,e){return e===o.p||e===o.r||e===o.o||t.push([e,o.r]),t}),[])).reduce((function(t,n){for(var i=[],r=0,o=n;r<o.length;r++){var a=o[r];e.includes(a)&&i.push(a)}return i.length>1&&t.push(i),1===n.length&&1===i.length&&t.push(i),t}),[]);return{groups:e,overlay:n,intersect:o.q.intersect}}(t)),n=e.groups,i=e.table,r={},a=0;a<i.length;a++){var s=i[a],c=n[a];r[c]={};for(var l=0;l<s.length;l++){var u=n[l];r[c][u]=i[a][l]}}var d=n.reduce((function(t,e,n){return t[e]=n,t}),{});return{indexToGroup:n,groupToIndex:d,table:r}}var f=n(57),h=n(63),p=0;function m(){return++p}var v=n(89),_=function(t){function e(e){var n=this.constructor,i=t.call(this,"Unknown expression type '"+e[0]+"' in '"+JSON.stringify(e)+"'")||this;return i.name="UnknownExpressionTypeError",Object.setPrototypeOf(i,n.prototype),i}return Object(i.c)(e,t),e}(Error);function y(t,e){if(Object(a.e)(t))return Object(r.b)(t)?Object(r.a)(t):t;switch(t[0]){case"all":return function(t,e){return{type:"all",array:t.slice(1).map((function(t){return y(t,e)}))}}(t,e);case"match":return function(t,e){for(var n={type:"match",input:b(t[1],e),cases:[],defaultOutput:y(t[t.length-1],e)},i=t.slice(2,-1),r=0;r<i.length;r+=2){var o=i[r].reduce((function(t,e){return"boolean"==typeof e&&t.push(Number(e)),t.push(e),t}),[]),a={values:new Set(o),output:y(i[r+1],e)};n.cases.push(a)}return n}(t,e);case"interpolate":return function(t,e){var n={type:"interpolate",base:1,argument:y(t[2],e),steps:[]};"exponential"===t[1][0]&&void 0!==t[1][1]&&(n.base=t[1][1]);for(var i=t.slice(3),r=0;r<i.length;r+=2){var o={key:i[r],value:y(i[r+1],e)};n.steps.push(o)}return n}(t,e);case"step":return function(t,e){var n={type:"step",steps:[],value:y(t[1],e)},i={key:0,value:y(t[2],e)};n.steps.push(i);for(var r=t.slice(3),o=0;o<r.length;o+=2){var a={key:r[o],value:y(r[o+1],e)};n.steps.push(a)}return n}(t,e);case"get":case"sourceAttr":case"global":return b(t,e);case"zoom":return{type:"zoom"};case"heatmap-density":return{type:"heatmap-density"};default:throw new _(t)}}function g(t,e){return void 0===t?t:y(t,e)}function b(t,e){var n=t[0],i=Object(h.b)(t[1]);return{type:n,dataIndex:e?e.getUniqueIndex(n+":"+i):NaN,property:i}}function x(t,e,n){var r,o={id:e,layers:[],layersById:{},layerIdToInnerId:{},groupsById:{},iconBaseUrl:"",iconNameTemplate:"",fontUrlTemplate:"",fonts:c.g,fontNameToIndex:Object(f.a)(c.g),rasterSets:{byIndex:{},byKey:{}},icons:t.icons||{},labelingGroups:d(null!==(r=t.labelingGroups)&&void 0!==r?r:{})},a=new s.a,l=t.layers;n&&(l=function(t,e){var n=0,r=0;function o(t,e){Object(f.c)(t.filter)&&(n=e),"point"===t.type&&t.style.iconPriority&&t.style.iconPriority>r&&(r=t.style.iconPriority)}return t.forEach((function(t,e){"group"===t.type?t.layers.forEach((function(t){return o(t,e)})):o(t,e)})),e.forEach((function(t){"point"===t.type&&(t.style.iconPriority=r)})),Object(i.e)(Object(i.e)(Object(i.e)([],t.slice(0,n+1)),e),t.slice(n+1))}(t.layers,v.a));for(var u=0,h=l;u<h.length;u++){var p=w(h[u]);p&&("group"===p.type&&(o.groupsById[p.innerId]=p,o.layerIdToInnerId[p.id]=p.innerId),("group"===p.type?p.layers:[p]).forEach((function(t){o.layers.push(t),o.layersById[t.innerId]=t,o.layerIdToInnerId[t.id]=t.innerId,"point"===t.type&&S(t,a).forEach((function(t){o.rasterSets.byKey[t.key]||(o.rasterSets.byIndex[t.index]=t,o.rasterSets.byKey[t.key]=t)}))})))}return o}function w(t){return"group"===t.type?(e=t,i=new s.a,r=null===(n=e.orderBy)||void 0===n?void 0:n.map((function(t){return b(t,i)})),o={id:e.id,innerId:m(),renderIndex:I.getIndex(),type:e.type,layers:[],orderBy:null!=r?r:[]},e.layers.forEach((function(t,e){var n=O(t,r);n&&(n.groupId=o.innerId,n.groupIndex=e,n.renderIndex=o.renderIndex,o.layers.push(n))})),o):O(t);var e,n,i,r,o}function S(t,e){var n=[];return t.style.iconImage&&Object(u.a)(t.style.iconImage).forEach((function(i){if(i.length){var r=Object(a.c)(i,t.style.iconAnchor[0],t.style.iconAnchor[1]),o={type:l.b.Static,index:e.getUniqueIndex(r),key:r,isSvg:!0,name:i,fileName:i,anchorX:t.style.iconAnchor[0],anchorY:t.style.iconAnchor[1],rasters:[]};n.push(o)}})),n}var I=new s.a;function j(t,e){return"appearence"===t.type?{type:t.type,tipMovementAmplitude:y(t.tipMovementAmplitude,e)}:t}function O(t,e){if(!("visibility"in t.style)||"none"!==t.style.visibility){var n,r,c=new s.a(e?e.length:0);try{var l={id:t.id,innerId:m(),renderIndex:I.getIndex(),filter:(r=t.filter||!1,y(r)),minzoom:M(t.minzoom,-1/0),maxzoom:M(t.maxzoom,1/0),dataKeys:[]};switch(t.type){case"line":var u=Object(o.h)(t.style);n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{color:y(u.color,c),width:y(u.width,c)}});break;case"lineExtrusion":u=Object(o.g)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{sideColor:y(u.sideColor,c),strokeWidth:y(u.strokeWidth,c),strokeColor:y(u.strokeColor,c),height:y(u.height,c)}});break;case"polygon":u=Object(o.l)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{color:y(u.color,c),strokeColor:y(u.strokeColor,c),strokeWidth:y(u.strokeWidth,c)}});break;case"polygonExtrusion":if(!(u=Object(o.k)(t.style)).visibility)return;n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{topColor:y(u.topColor,c),sideColor:y(u.sideColor,c),strokeColor:y(u.strokeColor,c),strokeWidth:y(u.strokeWidth,c)}});break;case"dashedLine":u=Object(o.d)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{color:y(u.color,c),gapColor:y(u.gapColor,c),width:y(u.width,c),gapLength:y(u.gapLength,c),dashLength:y(u.dashLength,c)}});break;case"shiftedLine":u=Object(o.n)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{color:y(u.color,c),width:y(u.width,c),shift:y(u.shift,c)}});break;case"oneWayLine":u=Object(o.i)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{color:y(u.color,c),lineWidth:y(u.lineWidth,c),lineLength:y(u.lineLength,c),tipWidth:u.tipWidth,tipHeight:u.tipHeight,priority:u.priority,duplicationSpacing:y(u.duplicationSpacing,c),endingOffsets:u.endingOffsets,labelingGroup:u.labelingGroup}});break;case"buildingModel":u=Object(o.b)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{color:y(u.color,c),strokeColor:y(u.strokeColor,c),strokeWidth:y(u.strokeWidth,c)}});break;case"labelLine":u=Object(o.f)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{textField:y(u.textField,c),textFont:u.textFont,textColor:y(u.textColor,c),textFontSize:y(u.textFontSize,c),textLetterSpacing:y(u.textLetterSpacing,c),textHaloColor:u.textHaloColor?y(u.textHaloColor,c):void 0,textHaloWidth:y(u.textHaloWidth,c),textPriority:y(u.textPriority,c),textLabelingSideMargin:y(u.textLabelingSideMargin,c),textDuplicationSpacing:y(u.textDuplicationSpacing,c),labelingGroup:u.labelingGroup,lineEndingOffsets:y(u.lineEndingOffsets,c)}});break;case"point":u=Object(o.j)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{allowOverlap:u.allowOverlap,allowElevation:u.allowElevation,iconImage:y(u.iconImage,c),iconAnchor:u.iconAnchor,iconWidth:y(u.iconWidth,c),iconTextField:y(u.iconTextField,c),iconTextFont:g(u.iconTextFont,c),iconTextColor:y(u.iconTextColor,c),iconTextFontSize:y(u.iconTextFontSize,c),iconTextLineHeight:u.iconTextLineHeight,iconTextLetterSpacing:u.iconTextLetterSpacing,iconTextPadding:u.iconTextPadding,iconTextHaloWidth:Object(a.b)(u.iconTextHaloWidth),iconTextHaloColor:y(u.iconTextHaloColor,c),iconOpacity:y(u.iconOpacity,c),iconPriority:u.iconPriority,iconLabelingMargin:u.iconLabelingMargin,iconLabelingGroup:u.iconLabelingGroup,iconRotation:y(u.iconRotation,c),textField:y(Object(a.b)(u.textField),c),textFont:y(Object(a.b)(u.textFont),c),textColor:y(Object(a.b)(u.textColor),c),textFontSize:y(Object(a.b)(u.textFontSize),c),textLineHeight:Object(a.b)(u.textLineHeight),textLetterSpacing:Object(a.b)(u.textLetterSpacing),textField2:g(Object(a.f)(u.textField),c),textFont2:g(Object(a.f)(u.textFont),c),textColor2:g(Object(a.f)(u.textColor),c)||y(Object(a.b)(u.textColor),c),textFontSize2:g(Object(a.f)(u.textFontSize),c)||y(Object(a.b)(u.textFontSize),c),textMaxLengthPerLine:u.textMaxLengthPerLine,textPlacement:u.textPlacement,textPriority:u.textPriority,textOffset:y(Object(a.b)(u.textOffset),c),textOffset2:g(Object(a.f)(u.textOffset),c),textHaloColor:y(Object(a.b)(u.textHaloColor),c),textHaloColor2:g(Object(a.f)(u.textHaloColor),c)||y(Object(a.b)(u.textHaloColor),c),textHaloWidth:Object(a.b)(u.textHaloWidth),textHaloWidth2:Object(a.f)(u.textHaloWidth)||Object(a.b)(u.textHaloWidth),textLabelingMargin:Object(a.b)(u.textLabelingMargin),textLabelingMargin2:Object(a.f)(u.textLabelingMargin)||Object(a.b)(u.textLabelingMargin),textLabelingGroup:Object(a.b)(u.textLabelingGroup),textLabelingGroup2:Object(a.f)(u.textLabelingGroup)||Object(a.b)(u.textLabelingGroup)}});break;case"arrow":u=Object(o.a)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{color:y(u.color,c),strokeColor:y(u.strokeColor,c),lineWidth:y(u.lineWidth,c),strokeWidth:y(u.strokeWidth,c),tipWidth:y(u.tipWidth,c),tipHeight:y(u.tipHeight,c),animation:j(u.animation,c)}});break;case"stretchableImage":n=Object(i.a)(Object(i.a)({},l),{type:"stretchableImage",style:t.style});break;case"raster":u=Object(o.m)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{opacity:y(u.opacity,c)}});break;case"circle":u=Object(o.c)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{color:y(u.color,c),strokeColor:y(u.strokeColor,c),strokeColor2:y(u.strokeColor2,c),width:y(u.width,c),strokeWidth:y(u.strokeWidth,c),strokeWidth2:y(u.strokeWidth2,c)}});break;case"heatmap":u=Object(o.e)(t.style),n=Object(i.a)(Object(i.a)({},l),{type:t.type,style:{color:y(u.color,c),radius:y(u.radius,c),opacity:y(u.opacity,c),intensity:y(u.intensity,c),weight:y(u.weight,c),downscale:u.downscale}})}}catch(e){if(e instanceof _)return void console.warn("Problem with layer #"+t.id+": "+e);throw e}if(n){n.dataKeys=function(t){var e=[];for(var n in t){var i=n.split(":"),r=i[0],o=i.slice(1);e[t[n]]={type:r,key:o.join(":")}}return e}(c.getIndexedKeys());for(var d=0,f=null!=e?e:[];d<f.length;d++){var h=f[d];n.dataKeys[h.dataIndex]={type:h.type,key:h.property}}}return n}}function M(t,e){return"number"!=typeof t||Number.isNaN(t)?e:t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var i=n(17),r=n(4),o=n(3),a=n(15),s=n(7);function c(t,e,n){var i=new s.a(n);i.drawType=s.a.StaticDraw,i.prepare(t.getRenderingContext());var r=[];return e.forEach((function(e){var n=t.getShaderProgram(e.programName);r.push(e.vaoCreator(i,n))})),{buffer:i,vaos:r}}var l=n(6),u=n(14),d=0,f=function(){function t(t,e,n,r,o){void 0===r&&(r=[0,0,0,0]),this.tickerName="tile-fade-"+t+"-"+d++,this.readiness=1,this.purpose=t,this.dynamicObject=o,this.mvpMatrix=new Float32Array(i.b()),this.setTileCoords(r);var s=function(t,e,n){for(var i=[],r=[],o=[],s=0;s<e.length;s++){var l=e[s],u=l.symbol,d=l.sink,f=l.generatedObjects,h=l.buffer,p=t.symbolSettingsList[u];if(void 0!==p){var m=p[d];if(void 0!==m){var v=c(t,m,h),_=v.buffer,y=v.vaos;i.push(_);for(var g=0;g<f.length;g++)for(var b=f[g],x=b.rangeStart,w=b.rangeEnd,S=b.attributes,I=Object(a.f)(u,d,S),j=0;j<m.length;j++){var O=m[j],M=O.uniformSet||"fill",P={layerSettings:O,stride:Object(a.e)(u,d),rangeStart:x,rangeEnd:w,attributes:I,attributesHash:JSON.stringify(S)+"_"+M+"_"+n.detailLevel,vao:y[j],tile:n,symbol:u,sink:d};O.identify?o.push(P):r.push(P)}}}}return{buffers:i,objects:r,identifyObjects:o}}(n,e,this),l=s.buffers,u=s.objects,f=s.identifyObjects;this.buffers=l,this.children=u,this.identifyChildren=f}return t.prototype.setTileCoords=function(t){var e=t[2],n=t[3],a=Object(o.r)(e);this.size=a,this.zoomLevel=e,this.detailLevel=n,this.modelMatrix=i.d(i.b(),Object(o.o)(t),r.i(a,a,l.l))},t.prototype.updateMvpMatrix=function(t){i.g(this.mvpMatrix,t,this.modelMatrix)},t.prototype.startTicker=function(t,e,n,i,r){u.c(this.tickerName,{easing:e},t,i,r,n)},t.prototype.updateTicker=function(t){var e=this;u.e(this.tickerName,{step:function(t,n){e.readiness=n}},t)},t.prototype.tickerFinished=function(t){return!u.a(this.tickerName,t)},t.prototype.clean=function(t){for(var e=0,n=this.buffers;e<n.length;e++)n[e].remove();this.buffers=[],this.children=[],this.identifyChildren=[],u.d(this.tickerName,t)},t}()},function(t,e,n){"use strict";function i(t,e,n,i,r){for(var o=0,a=e.length;o<a;o++){var s=e[o],c=0;"get"===s.type?c=i[n[s.key]]:r&&"sourceAttr"===s.type&&(c=r[s.key]),t.push(c)}return t}function r(t,e){for(var n=0,i=e.length;n<i;n++)t.push(e[n]);return t}function o(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++){var i=t[n],r=e[n];if(Array.isArray(i))return!!Array.isArray(r)&&o(i,r);if(!(i===r||"number"==typeof i&&"number"==typeof r&&Number.isNaN(i)&&Number.isNaN(r)))return!1}return!0}n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"l",(function(){return r})),n.d(e,"k",(function(){return o})),n.d(e,"h",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"g",(function(){return c})),n.d(e,"f",(function(){return l})),n.d(e,"i",(function(){return u})),n.d(e,"d",(function(){return d})),n.d(e,"n",(function(){return f})),n.d(e,"c",(function(){return h})),n.d(e,"j",(function(){return p})),n.d(e,"a",(function(){return m})),n.d(e,"m",(function(){return v})),n.d(e,"e",(function(){return _})),n.d(e,"r",(function(){return y})),n.d(e,"o",(function(){return g})),n.d(e,"p",(function(){return b})),n.d(e,"q",(function(){return x}));var i=n(2);function r(t){var e={color:"#000000",strokeColor:"#000000",strokeWidth:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.color),e}function o(t){var e={topColor:"#000000",strokeColor:"#000000",strokeWidth:1,sideColor:"#000000",visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.topColor),void 0===t.sideColor&&(e.sideColor=e.topColor),e}function a(t){var e={color:"#000000",width:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function s(t){var e={color:"#000000",strokeColor:"#000000",strokeWidth:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.color),e}function c(t){var e={sideColor:"#000000",strokeColor:"#000000",strokeWidth:1,height:0,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return void 0===t.strokeColor&&(e.strokeColor=e.sideColor),e}function l(t){var e={textField:["get","db_label"],textFont:"Noto_Sans",textColor:"#000000",textFontSize:16,textLetterSpacing:0,textHaloColor:"rgba(0, 0, 0, 0)",textHaloWidth:0,textPriority:0,textLabelingSideMargin:0,textDuplicationSpacing:0,lineEndingOffsets:0,visibility:"visible",labelingGroup:b};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function u(t){var e={color:"#000000",lineWidth:2,lineLength:10,tipWidth:1.5,tipHeight:2,priority:0,duplicationSpacing:0,endingOffsets:0,visibility:"visible",labelingGroup:b};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function d(t){var e={color:"#000000",gapColor:"#00000000",width:1,gapLength:1,dashLength:1,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function f(t){var e={color:"#000000",width:1,shift:0,visibility:"visible"};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function h(t){var e={color:"#ffffff",strokeColor:"#3388ff",strokeColor2:"#00000000",width:20,strokeWidth:3,strokeWidth2:0};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function p(t){var e={allowOverlap:!1,allowElevation:!1,iconOpacity:1,iconImage:"",iconAnchor:[.5,.5],iconWidth:16,iconTextField:["get","db_label2"],iconTextFont:"",iconTextColor:"#000000",iconTextFontSize:16,iconTextLineHeight:1.2,iconTextLetterSpacing:0,iconTextPadding:[0,0,0,0],iconTextHaloWidth:0,iconTextHaloColor:"rgba(0, 0, 0, 0)",iconPriority:0,iconRotation:0,iconLabelingGroup:b,iconLabelingMargin:{topBottom:0,leftRight:0},textField:[["get","db_label"],["get","db_label2"]],textFont:"",textColor:"#000000",textFontSize:16,textLineHeight:1.2,textLetterSpacing:0,textPlacement:"bottomCenter",textOffset:0,textHaloColor:"rgba(0, 0, 0, 0)",textHaloWidth:0,textLabelingMargin:{topBottom:0,leftRight:0},textPriority:0,textMaxLengthPerLine:30,visibility:"visible",textLabelingGroup:b};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function m(t){var e={color:"#000000",strokeColor:"#000000",lineWidth:1,strokeWidth:0,tipWidth:1,tipHeight:1,animation:{type:"appearence",tipMovementAmplitude:0}};for(var n in void 0===t.strokeColor&&(e.strokeColor=e.color),t)void 0!==t[n]&&(e[n]=t[n]);return e}function v(t){var e={opacity:1};for(var n in t)void 0!==t[n]&&(e[n]=t[n]);return e}function _(t){return Object(i.b)(t,{color:["interpolate",["linear"],["heatmap-density"],0,"rgba(53, 136, 253, 0)",.2,"rgba(53, 136, 253, 0.2)",.4,"rgb(255, 201, 77)",.6,"rgb(255, 202, 20)",.75,"rgb(245, 0, 7)",1,"rgb(255, 0, 0)"],radius:30,opacity:1,intensity:1,weight:1,downscale:1})}var y="__overlapped",g="__commercial",b="default",x={groups:[b,y,g],overlay:[[b,y]],intersect:[[]]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return d}));var i=1e5;function r(t){return[t%i,Math.floor(t/i)%i,0,0]}function o(t){for(var e=0,n=0;n<4;n++){var r=4294967296*t[n]+e;e=Math.floor(r/i),t[n]=r%i}}function a(t,e){for(var n=4294967296,r=4,o=0;--r>=0;){var a=o*i+e[r],s=Math.floor(a/n);o=a-s*n,t[r]=s}}function s(t,e){for(var n=0,r=0;r<4;r++){var o=t[r]+e[r]+n;n=Math.floor(o/i),t[r]=o%i}}function c(t,e){for(var n=0,r=0;r<4;r++){var o=t[r]-e[r]-n;o<0?(o+=i,n=1):n=0,t[r]=o}}function l(t){for(var e=4,n=0;--e>=0;)n=n*i+t[e];return n}function u(t,e){var n=r(t),i=r(e);return o(i),s(i,n),function(t){for(var e=!0,n=4,i="";--n>=0;){var r=String(t[n]);e?0!==t[n]&&(i+=r,e=!1):i+="00000".slice(r.length)+r}return i.length||(i="0"),i}(i)}function d(t){var e=function(t){t="00000000000000000000".slice(t.length)+t;for(var e=[0,0,0,0],n=0;n<4;n++){var i=parseInt(t.slice(5*n,5*(n+1)),10);e[3-n]=i}return e}(t),n=r(0);a(n,e);var i=l(n);return o(n),c(e,n),[l(e),i]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return d})),n.d(e,"l",(function(){return f})),n.d(e,"g",(function(){return p})),n.d(e,"b",(function(){return m})),n.d(e,"f",(function(){return v})),n.d(e,"i",(function(){return _})),n.d(e,"h",(function(){return y})),n.d(e,"j",(function(){return g})),n.d(e,"k",(function(){return b})),n.d(e,"m",(function(){return w})),n.d(e,"c",(function(){return S})),n.d(e,"e",(function(){return I}));var i,r=n(29),o=n(41),a=n(9),s=n(22),c=n(0),l=n(83),u=n(12);function d(t,e,n){return{type:t,sourceId:n,key:Object(a.c)(e),labelsKey:t+"_"+n,coords:e,zoomLevel:e[2],detailLevel:e[3],needFetch:!1,needAbortFetch:!1,needGenerate:!1,status:i.Initial,oldHoverTileObjects:[]}}function f(t,e,n,i,r){var o=[];n.oldHoverTileObjects.forEach((function(n){n.tickerFinished(e)?(t.tileManager.removeObject(n),n.clean(e)):o.push(n)})),n.oldHoverTileObjects=o,void 0!==i?e.performanceCaveatEmitted||!r&&n.hover&&n.hover.id[0]===i[0]&&n.hover.id[1]===i[1]||function(t,e,n,i){n.idSet&&n.idSet.has(i)&&function(t,e){return Math.min(Math.floor(t.styleZoom),c.tiles.maxDetailLevel)===e.coords[3]}(e,n)?function(t,e,n){var i=e.newMod||e.currentMod,r=t.map.state,o={tileInfo:Object(a.e)(e.coords),pixelRatio:self.devicePixelRatio,selectedIds:(null==i?void 0:i.params.get("selectedIds"))||[],styleId:r.handyStyleId,styleState:r.styleState,floorsEnabled:t.map.state.floorsEnabled,disableCommercialPoi:t.map.state.disableCommercialPoi,hoverId:n};return t.workers.parser.generateTile(o)}(t,n,i).then((function(r){h(t,n,e);var o={id:i,tileObjects:[],generatedData:[]},a=[];r.results.forEach((function(i){var r=new s.a("hover",i.collectorOutput.data,t.renderer,n.coords),l=i.collectorOutput,u=l.packedRasters,d=l.rastersToLoad;void 0!==u&&t.assetManager.prepareRasters(i.styleId,u),t.assetManager.loadRasters(d),o.tileObjects.push(r),t.tileManager.addObject(r),r.startTicker(e,c.houseHover.inAnimationType,c.houseHover.inAnimationTime,0,1),i.collectorOutput.labels.length&&a.push({metatileHash:i.metatileHash,labels:i.collectorOutput.labels,styleId:i.styleId})})),o.generatedData=r.results,t.labeler.addLabels("label_hover",u.c.Tile,a),t.identifier.debouncedFillCache(),n.hover=o})):h(t,n,e)}(t,e,n,i):h(t,n,e)}function h(t,e,n){e.hover&&(e.hover.tileObjects.forEach((function(t){e.oldHoverTileObjects.push(t),t.startTicker(n,c.houseHover.outAnimationType,c.houseHover.outAnimationTime,1,0)})),e.hover=void 0,t.labeler.removeLabels("label_hover"),t.identifier.debouncedFillCache())}function p(t){if(t.newMod&&t.newMod.needGenerate)return t.newMod.needGenerate=!1,t.newMod}function m(t){return(!t.currentMod||Object(o.b)(t.currentMod))&&(!t.newMod||Object(o.b)(t.newMod))}function v(t,e){t.currentMod&&Object(o.d)(t.currentMod,e),t.newMod&&Object(o.d)(t.newMod,e)}function _(t){t.currentMod=void 0}function y(t){return t.currentMod&&t.currentMod.useful?t.currentMod:t.newMod&&t.newMod.useful?t.newMod:void 0}function g(t){t.currentMod&&(t.currentMod.useful=!1),t.newMod&&(t.newMod.useful=!1)}function b(t,e,n){if(t.idSet&&e.setTileIds(t.idSet),t.currentMod||t.newMod){if(t.currentMod&&l.a.equal(t.currentMod.params,e))return t.currentMod.useful=!0,void(t.newMod=void 0);t.newMod&&l.a.equal(t.newMod.params,e)?t.newMod.useful=!0:x(t,e,n)}else x(t,e,n)}function x(t,e,n){var i=Object(a.i)(t.coords,e),r=n.get(i);r?(t.newMod=r,t.newMod.useful=!0):(t.newMod=Object(o.c)(t,i,e),t.idSet&&t.newMod.params.setTileIds(t.idSet))}function w(t,e,n,r){switch(t.status){case i.Initial:t.newMod&&t.newMod.useful&&(t.status=i.Loading,t.needFetch=!0);break;case i.Loading:t.newMod&&t.newMod.useful?t.serverMetadata&&(t.status=i.Loaded):(t.status=i.Initial,t.needAbortFetch=!0);break;case i.Loaded:}t.currentMod&&Object(o.f)(t.currentMod,e,n,r),t.newMod&&(Object(o.f)(t.newMod,e,n,r),t.newMod.needGenerate&&(t.needGenerate=!0))}function S(t){t.newMod&&t.newMod.ready&&(t.currentMod=t.newMod,t.newMod=void 0)}function I(t){var e=new r.a;return t.forEach((function(t){e.addFromFlatArray(t.collectorOutput.geoIds)})),e}!function(t){t[t.Initial=0]="Initial",t[t.Loading=1]="Loading",t[t.Loaded=2]="Loaded"}(i||(i={}))},function(t,e,n){"use strict";n.d(e,"i",(function(){return d})),n.d(e,"j",(function(){return f})),n.d(e,"d",(function(){return h})),n.d(e,"c",(function(){return p})),n.d(e,"e",(function(){return m})),n.d(e,"f",(function(){return v})),n.d(e,"a",(function(){return _})),n.d(e,"b",(function(){return y})),n.d(e,"g",(function(){return g})),n.d(e,"h",(function(){return b}));var i=n(2),r=n(26),o=n(9),a=n(69),s=n(32),c=n(41),l=n(0),u=n(83);function d(t){var e,n=t.viewportTiles;for(var i in t.tiles)Object(r.j)(t.tiles[i]);for(var a=new u.a(t.selectedIds,null===(e=t.mapState)||void 0===e?void 0:e.styleState),s=0;s<n.length;s++){i=n[s];var c=t.tiles[i];c||(c=t.tiles[i]=Object(r.d)(t.type,Object(o.o)(i),t.sourceId)),Object(r.k)(c,a,t.tileModsCache)}}function f(t,e){for(var n=0;n<e.length;n++){var i=t[e[n]],o=Object(r.h)(i);if(!o||!o.ready)return!1}return!0}function h(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needFetch&&(i.needFetch=!1,e.push(i))}return e}function p(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needAbortFetch&&(i.needAbortFetch=!1,e.push(i))}return e}function m(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needGenerate&&(i.needGenerate=!1,e.push(i))}return e}function v(t){var e=new Set(t.viewportTiles),n=new Set(t.tileModsCache.getData().map((function(t){return t.tile}))),i=[];for(var o in t.tiles){var a=t.tiles[o];!Object(r.b)(a)||e.has(o)||t.zoomDirection!==s.b.Stationary||n.has(a)||i.push(a)}return i}function _(t,e,n,i,r,o,l,u){return{type:t,sourceId:e,minZoomLevel:n,maxZoomLevel:i,minDetailLevel:r,maxDetailLevel:o,tiles:{},viewportTiles:[],zoomLevel:y(t,u.zoom,u.styleZoom),zoomDirection:s.b.Stationary,zoomStartZoom:0,tileModsCache:new a.a(0,(function(t,e){l.labeler.removeLabels(e.labelsKey),Object(c.d)(e,u)})),tileModsCacheMaxCount:0,selectedIds:[],displayedMods:{},tilesAppearance:s.a.ByOne,mapState:u}}function y(t,e,n){return"raster"===t?Math.round(e):Math.floor(n)}function g(t){for(var e in t.tiles)Object(r.f)(t.tiles[e],t.mapState);t.tiles={},t.viewportTiles=[],t.zoomDirection=s.b.Stationary,t.tileModsCache.reset(),t.displayedMods={},t.tilesAppearance=s.a.ByOne}function b(t,e,n,r){var a=n.displayedMods,s=Object(i.H)(a,r);s.forEach((function(n){if(void 0!==n.objects){var i=!0;for(var a in r)if(Object(o.l)(n.tile,r[a].tile)){i=!1;break}n.objects.forEach((function(n){t.addObject(n),i&&n.startTicker(e,l.tileAnimation.type,l.tileAnimation.time,0,1)}))}}));var c=Object(i.H)(r,a);c.forEach((function(e){var n;void 0!==e.objects&&(e.objects.forEach((function(e){return t.removeObject(e)})),null===(n=e.tile.hover)||void 0===n||n.tileObjects.forEach((function(e){return t.removeObject(e)})))}));var u=s.length>0||c.length>0;return u&&(e.needLabeling=!0,e.needRerender=!0),u}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"g",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"l",(function(){return c})),n.d(e,"a",(function(){return l})),n.d(e,"k",(function(){return u})),n.d(e,"h",(function(){return d})),n.d(e,"m",(function(){return f})),n.d(e,"j",(function(){return h})),n.d(e,"d",(function(){return p})),n.d(e,"i",(function(){return m})),n.d(e,"f",(function(){return v})),n.d(e,"e",(function(){return _}));var i,r=n(11);function o(t){var e=new r.a(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function a(t,e,n,i){var o=new r.a(4);return o[0]=t,o[1]=e,o[2]=n,o[3]=i,o}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function c(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function u(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function d(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.sqrt(e*e+n*n+i*i+r*r)}function f(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r}function h(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=i*a,t[2]=r*a,t[3]=o*a),t}function p(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function m(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t[3]=s+i*(n[3]-s),t}function v(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function _(t,e){var n=t[0],i=t[1],o=t[2],a=t[3],s=e[0],c=e[1],l=e[2],u=e[3];return Math.abs(n-s)<=r.b*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-c)<=r.b*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(o-l)<=r.b*Math.max(1,Math.abs(o),Math.abs(l))&&Math.abs(a-u)<=r.b*Math.max(1,Math.abs(a),Math.abs(u))}(i=new r.a(4))[0]=0,i[1]=0,i[2]=0,i[3]=0},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(t){void 0===t&&(t=[]),this.map={};for(var e=0;e<t.length;e++)this.add(t[e])}return t.prototype.has=function(t){var e=this.map[t[1]];return void 0!==e&&void 0!==e[t[0]]},t.prototype.add=function(t){var e=this.map[t[1]];e||(e=this.map[t[1]]={}),e[t[0]]=!0},t.prototype.addFromFlatArray=function(t){for(var e=this.map,n=0;n<t.length/2;n++){var i=t[2*n+1],r=e[i];r||(r=e[i]={}),r[t[2*n]]=!0}},t.prototype.toFlatArray=function(){var t=this.map,e=[];for(var n in t){var i=t[n];for(var r in i)e.push(Number(r),Number(n))}return e},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a}));var i,r=n(5);function o(t,e){return Number.isNaN(t)?e:t}function a(t,e){if(!t)return"";var n=Object(r.h)(t,e);return Number.isNaN(n)||!n&&0!==n?"":String(n)}!function(t){t[t.Point=0]="Point",t[t.Line=1]="Line",t[t.OneWayLine=2]="OneWayLine"}(i||(i={}))},function(t,e,n){"use strict";var i,r,o,a;n.d(e,"b",(function(){return i})),n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return a})),function(t){t[t.Striped=0]="Striped",t[t.Entrance=1]="Entrance"}(i||(i={})),function(t){t[t.Line=0]="Line",t[t.Arrow=1]="Arrow",t[t.StartBorder=2]="StartBorder",t[t.LineEnding=3]="LineEnding"}(r||(r={})),function(t){t[t.TileCut=0]="TileCut",t[t.ObjectEnding=1]="ObjectEnding"}(o||(o={})),function(t){t[t.Flat=0]="Flat",t[t.Circle=1]="Circle"}(a||(a={}))},function(t,e,n){"use strict";var i,r;n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),function(t){t[t.Stationary=0]="Stationary",t[t.ZoomingIn=1]="ZoomingIn",t[t.ZoomingOut=2]="ZoomingOut"}(i||(i={})),function(t){t[t.ByOne=0]="ByOne",t[t.WaitingAll=1]="WaitingAll"}(r||(r={}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return d}));var i=n(0),r=n(6),o=n(19);function a(t){for(var e=0;e<i.styleMaxDpi.length;e++)if(t<=i.styleMaxDpi[e])return e;return i.styleMaxDpi.length}function s(t){return r.p*t}function c(t){return t/r.p}function l(t){if("group"===t.type)return t.layers.some(l);if(!t.filter)return!1;var e=new Set;return Object(o.a)(t.filter,e),i.commercialSublayers.some((function(t){return e.has(t)}))}function u(t){return t.layers.some(l)}function d(t){return!!t.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return u})),n.d(e,"f",(function(){return d})),n.d(e,"e",(function(){return f}));var i=n(0),r=new Set(i.commercialSublayers),o=new Set(i.personalSublayers),a=(new Set(i.branchPoiSublayers),new Set(i.transportPoiSublayers),new Set(i.cityNameSublayers),new Set(i.landmarkPoiSublayers)),s={NoLabel:0,BottomCenter:1,BottomRight:2,BottomLeft:4,CircleBottomRight:8,RightBottom:16,RightCenter:32,RightTop:64,CircleTopRight:128,TopCenter:256,TopRight:512,TopLeft:1024,CircleTopLeft:2048,LeftTop:4096,LeftCenter:8192,LeftBottom:16384,CircleBottomLeft:32768,CenterCenter:65536};function c(t,e,n,i){var r=n?.5:t.anchorX,o=n?.5:t.anchorY;return[(.5-r)*e[0]+(n&&i?(i[1]-i[3])/2:0),(.5-o)*e[1]+(n&&i?(i[2]-i[0])/2:0)]}function l(t,e,n,i,r){var o=e[0],a=e[1],s=n[0],c=n[1],l=0,u=0,d=c/2+a/2,f=c/2-a/2,h=-d,p=-f,m=s/2+o/2,v=s/2-o/2,_=-m,y=-v;switch(t){case"bottomCenter":u=d+r;break;case"rightCenter":l=m+r;break;case"topCenter":u=h-r;break;case"leftCenter":l=_-r;break;case"bottomRight":l=v,u=d+r;break;case"topRight":l=v,u=h-r;break;case"bottomLeft":l=y,u=d+r;break;case"rightBottom":l=m+r,u=p;break;case"rightTop":l=m+r,u=f;break;case"topLeft":l=y,u=h-r;break;case"leftTop":l=_-r,u=f;break;case"leftBottom":l=_-r,u=p}return[l+i[0],u+i[1]]}function u(t){return r.has(t)}function d(t){return o.has(t)}function f(t){return a.has(t)}},function(t,e,n){"use strict";n.r(e),n.d(e,"LabelIndex",(function(){return h})),n.d(e,"sinks",(function(){return P})),n.d(e,"processElement",(function(){return L})),n.d(e,"getLabelingInfo",(function(){return T})),n.d(e,"generateTextElement",(function(){return k})),n.d(e,"generateNotStretchableIconElement",(function(){return z}));var i=n(38),r=n(6);function o(t,e){var n=t.reduce((function(t,e){return t.concat(e)}),[0]).concat(e),i=n.length-1;return{coords:n.slice(n[0]===n[1]?1:0,n[i-1]===n[i]?i:i+1),isOddStretchable:a(t)}}function a(t){var e;return!(null===(e=null==t?void 0:t[0])||void 0===e?void 0:e[0])}function s(t,e,n,i){if(t.coords.length<2)throw new Error("The source coords array must have at least two coordinates");return t.coords.map((function(r,o){return(e+r+i*(0===o?-1:o===t.coords.length-1?1:0))/n}))}function c(t,e){for(var n=function(t){var e=t.coords,n=t.isOddStretchable;if(e.length<2)throw new Error("An axis must have at least two coordinates");if(2===e.length)return{stretchSize:e[e.length-1],fixSize:0};for(var i=0,r=n?0:1;r<e.length-1;r+=2)i+=e[r+1]-e[r];return{stretchSize:i,fixSize:e[e.length-1]-i}}(t),i=n.stretchSize,r=n.fixSize,o=t.coords,a=t.isOddStretchable,s=e<r?r:e,c=[o[0]],l=1;l<o.length;l++){var u=o[l-1],d=o[l],f=l%2==(a?1:0),h=c[c.length-1];f?c.push(Math.round((s-r)*(d-u)/i)+h):c.push(h+d-u)}return c}function l(t,e,n){void 0===n&&(n=0);var i=t[t.length-1]-t[0],r=t.map((function(t){return Math.round(t-i/2+n)}));return 2===r.length?r[r.length-1]+=2*e:(r[0]-=e,r[r.length-1]+=e),r}function u(t,e,n,i,a,u,d,f,h){var p=function(t,e,n,i){return void 0===n&&(n=[]),void 0===i&&(i=[]),{x:o(n,t),y:o(i,e)}}(n.w,n.h,f,h),m=function(t,e,n,i,r){return[s(t.x,e,i[0],r),s(t.y,n,i[1],r)]}(p,n.x,n.y,e,r.e),v=function(t,e,n,i,r,o){return void 0===r&&(r=0),void 0===o&&(o=0),[l(c(t.x,e),i,r),l(c(t.y,n),i,o)]}(p,i,a,r.e,u,d);t.set(v,m)}function d(t,e,n,r,o,a,s,c,l,u,d){var f=12*t.elements.offset;t.position[f]=e,t.position[f+1]=n,t.position[f+2]=r,t.cornerOffset[f]=o,t.cornerOffset[f+1]=-a,t.texCoords[f]=Object(i.c)(s),t.texCoords[f+1]=Object(i.c)(c),t.scales[f]=Object(i.b)(l),t.scales[f+1]=Object(i.a)(u),f>>=1,t.localID[f]=d,t.elements.offset++}function f(t,e,n,i,r,o,a){var s=t.elements,c=t.indices,l=c.buffer,u=c.offset,d=s.offset;l[u]=d+e,l[u+1]=d+n,l[u+2]=d+i,l[u+3]=d+r,l[u+4]=d+o,l[u+5]=d+a,c.offset=u+6}var h,p=function(){function t(){this.countX=0,this.countY=0,this.textureX=[],this.textureY=[],this.stretchedX=[],this.stretchedY=[]}return t.prototype.reset=function(){this.countX=0,this.countY=0},t.prototype.set=function(t,e){this.countX=e[0].length,this.countY=e[1].length,this.textureX=e[0],this.textureY=e[1],this.stretchedX=t[0],this.stretchedY=t[1]},t.prototype.isEmpty=function(){return 0===this.countX||0===this.countY},t}(),m=n(67),v=n(75),_=n(34),y=n(0),g=n(3),b=n(10),x=n(12),w=n(5),S=n(19),I=n(60),j=n(23);!function(t){t[t.Icon=0]="Icon",t[t.First=1]="First",t[t.Second=2]="Second"}(h||(h={}));var O=new p,M=[0,0,0],P={raster:{stride:24,binder:function(t,e){t.position=new Uint16Array(e),t.cornerOffset=new Int16Array(e,8),t.texCoords=new Uint16Array(e,12),t.scales=new Int16Array(e,16),t.localID=new Uint32Array(e,20)},packObjectAttributes:function(t,e,n){return Object(j.b)([t.styleId,t.layer.innerId,e,n],t.tileData)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],atlasIndex:t[3],tileData:t.slice(5)}}},text:{stride:20,binder:function(t,e){t.position=new Uint16Array(e),t.cornerOffset=new Int16Array(e,8),t.texCoords=new Uint16Array(e,12),t.localID=new Uint32Array(e,16)},packObjectAttributes:function(t,e,n,i,r,o){return Object(j.b)([t.styleId,t.layer.innerId,e,n,i[0],-i[1],r,o],t.tileData)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],animDirection:t[2],range:t[3],offsetX:t[4],offsetY:t[5],labelIndex:t[6],fontIndex:t[7],tileData:t.slice(8)}}}},L=function(t,e,n,i,o,a,s){var c,l,u=n.layer,d=n.label;if("point"===u.type){var f=[0,0],p=[0,0],m=Object(w.f)(a.styleZoom,a.styleState,!0,d.tileData),v=E(m,t,o,d);if(v&&(f=A(v,o,u,m,d.iconTextMetrics),p=Object(_.b)(v,f,d.iconTextMetrics,u.style.iconTextPadding),n.type===x.d.Icon)){if(Object(g.k)(M,d.anchorWorld,s),!Object(b.h)(M))return;var S=t.icons[Object(w.j)(u.style.iconImage,m)];return C(e,d,M,i,v,f[0]*o,f[1]*o,p[0]*o,p[1]*o,null===(c=null==S?void 0:S.stretchX)||void 0===c?void 0:c.map((function(t){var e=t[0],n=t[1];return[e*o,n*o]})),null===(l=null==S?void 0:S.stretchY)||void 0===l?void 0:l.map((function(t){var e=t[0],n=t[1];return[e*o,n*o]}))),void function(t,e,n,i,o,a,s){var c,l=n.iconTextMetrics;if(l&&s.style.iconTextFont){var u=Object(w.f)(i.styleZoom,i.styleState,!1,n.tileData),d=Object(w.j)(s.style.iconTextFont,u),f=null!==(c=t.fontNameToIndex[d])&&void 0!==c?c:t.fontNameToIndex[r.b];k(e,n,h.Icon,l,M,o,[0,0],s,f)}}(t,e,n.label,a,i,0,u)}switch(n.type){case x.d.PoiText:!function(t,e,n,i,o,a,s,c,l){var u,d=n.label,f=d.textMetrics;if(Object(g.k)(M,d.anchorWorld,a),Object(b.h)(M)){var p=Object(w.f)(o.styleZoom,o.styleState,!1,d.tileData),m=Object(w.j)(l.style.textFont,p);if(m.length){var v=null!==(u=t.fontNameToIndex[m])&&void 0!==u?u:t.fontNameToIndex[r.b],x=Object(w.i)(l.style.textFontSize,p),S=x/y.fonts.baseSize,I=l.style.textLineHeight*x*f.lines.length,j=f.maxWidth*S,O=n.parent?l.style.textPlacement:"centerCenter",P=Object(w.i)(l.style.textOffset,p),L=Object(_.c)(O,i,[j,I],c,P);k(e,d,h.First,d.textMetrics,M,s,L,l,v)}}}(t,e,n,f,a,s,i,p,u);break;case x.d.PoiText2:!function(t,e,n,i,o,a,s,c,l){var u,d=n.label,f=d.textMetrics,p=d.textMetrics2;if(p&&l.style.textFont2&&(Object(g.k)(M,d.anchorWorld,a),Object(b.h)(M))){var m=Object(w.f)(o.styleZoom,o.styleState,!1,d.tileData),v=Object(w.i)(l.style.textFontSize,m),x=v/y.fonts.baseSize,S=l.style.textLineHeight*v*p.lines.length,I=p.maxWidth*x,j=Object(w.j)(l.style.textFont2,m),O=null!==(u=t.fontNameToIndex[j])&&void 0!==u?u:t.fontNameToIndex[r.b],P=Object(w.i)(l.style.textFontSize,m),L=l.style.textLineHeight*P*f.lines.length,T=Object(w.i)(l.style.textOffset,m),z=Object(_.c)(l.style.textPlacement,i,[I,L],c,T);z[1]+=L/2+S/2+0,k(e,d,h.Second,p,M,s,z,l,O)}}(t,e,n,f,a,s,i,p,u)}}},T=function(t,e,n,i,r){var o=t.layer;if("point"===o.type){t.labelingElements.length=0;var a=[0,0],s=[0,0],c=Object(w.f)(n.styleZoom,n.styleState,!0,t.tileData),l=E(c,e,r,t);if(l){a=A(l,r,o,c,t.iconTextMetrics),s=Object(_.b)(l,a,t.iconTextMetrics,o.style.iconTextPadding);var u=new v.a(t,x.d.Icon,t.anchorWorld,n,i,e);u.boxes.push([-a[0]/2+s[0],-a[1]/2+s[1],a[0]/2+s[0],a[1]/2+s[1]]),t.labelingElements.push(u)}var d=Object(w.j)(o.style.textFont,c);t.label.length>0&&d.length&&(function(t,e,n,i,r,o,a){var s=t.textMetrics;if(s){var c=Object(w.f)(i.styleZoom,i.styleState,!1,t.tileData),l=Object(w.i)(a.style.textFontSize,c),u=l/y.fonts.baseSize,d=Object(w.i)(a.style.textOffset,c),f=a.style.textLineHeight*l*s.lines.length,h=s.maxWidth*u,p=new v.a(t,x.d.PoiText,t.anchorWorld,i,r,e);t.labelingElements.length>0&&(p.parent=t.labelingElements[0]);var m=p.parent?a.style.textPlacement:"centerCenter",g=Object(_.c)(m,n,[h,f],o,d);p.boxes.push([g[0]-h/2,g[1]-f/2,g[0]+h/2,g[1]+f/2]),t.labelingElements.push(p)}}(t,e,a,n,i,s,o),t.label2&&function(t,e,n,i,r,o,a){var s=t.textMetrics,c=t.textMetrics2;if(c){var l=Object(w.f)(i.styleZoom,i.styleState,!1,t.tileData),u=Object(w.i)(a.style.textFontSize,l),d=u/y.fonts.baseSize,f=Object(w.i)(a.style.textOffset,l),h=a.style.textLineHeight*u*c.lines.length,p=c.maxWidth*d,m=10*a.style.textLineHeight*s.lines.length,g=new v.a(t,x.d.PoiText2,t.anchorWorld,i,r,e);t.labelingElements.length>1?(g.parent=t.labelingElements[0],g.firstLabel=t.labelingElements[1]):t.labelingElements.length>0&&(g.parent=t.labelingElements[0],g.firstLabel=t.labelingElements[0]);var b=Object(_.c)(a.style.textPlacement,n,[p,m],o,f);b[1]+=m/2+h/2+0,g.boxes.push([b[0]-p/2,b[1]-h/2,b[0]+p/2,b[1]+h/2]),t.labelingElements.push(g)}}(t,e,a,n,i,s,o))}};function k(t,e,n,i,r,o,a,s,c){for(var l={},u=0,d=e.ranges;u<d.length;u++){var f=d[u];l[f]=t.getBucket("point","text",P.text.packObjectAttributes(e,o,f,a,n,c),P.text.binder)}Object(m.c)(l,e,r,i,s,n)}function z(t,e,n,i,r){return C(t,e,n,i,r,r.w,r.h,r.w*(.5-r.anchorX),r.h*(.5-r.anchorY),void 0,void 0)}function C(t,e,n,i,o,a,s,c,l,h,p){if(!(a<=0||s<=0)&&"point"===e.layer.type){u(O,y.atlasSize,o,a,s,c,l,h,p),t.atlasPacker.addRastersToLoad(e.styleId,o);var m=t.getBucket("point","raster",P.raster.packObjectAttributes(e,i,o.atlasIndex),P.raster.binder);!function(t,e,n,i,o,a,s,c){for(var l=i.textureX,u=i.textureY,h=i.stretchedX,p=i.stretchedY,m=i.countX,v=i.countY,_=r.d,y=r.c,g=0;g<m-1;g++)for(var b=l[g],x=l[g+1],w=h[g],S=h[g+1],I=0;I<v-1;I++){var j=u[I],O=u[I+1],M=p[I],P=p[I+1];f(o,0,2,1,1,2,3),d(o,t,e,n,w,M,b,j,_,y,c),d(o,t,e,n,S,M,x,j,_,y,c),d(o,t,e,n,w,P,b,O,_,y,c),d(o,t,e,n,S,P,x,O,_,y,c)}}(n[0],n[1],n[2],O,m,0,0,e.identifyIndex)}}function E(t,e,n,i){var r=e.rasterSets,o=i.layer;if("point"===o.type){var a;if(i.pointType===x.b.Commercial||i.pointType===x.b.Landmark)a=r.byKey[Object(S.d)(i.idLo,i.idHi)];else{var s=Object(w.j)(o.style.iconImage,t);s.length&&(a=r.byKey[Object(S.c)(s,o.style.iconAnchor[0],o.style.iconAnchor[1])])}if(a){var c=Object(w.i)(o.style.iconWidth,t),l=Object(I.c)(a.rasters,c*n,!0);if(void 0!==l)return a.rasters[l]}}}function A(t,e,n,i,r){if(!r)return[t.w/e,t.h/e];var o=n.style.iconTextPadding,a=o[0],s=o[1],c=o[2],l=o[3],u=Object(w.i)(n.style.iconTextFontSize,i),d=Object(w.i)(n.style.iconTextLineHeight,i);return[l+s+u/y.fonts.baseSize*r.maxWidth,a+c+u*d*r.lines.length]}},function(t,e,n){"use strict";function i(t,e){return 0===t?0:Math.min(2*t-1,2*(e-t))}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return a}));var i=n(49);function r(t,e){a("No glyph for character "+t+" (code = "+e+", range = "+Object(i.b)(e)+")")}var o=new Set;function a(t){o.has(t)||(console.log(t),o.add(t))}},function(t,e,n){"use strict";function i(t){var e=256*Math.log(t);return e+(e<0?-.5:.5)<<16>>16}function r(t){return 32768*t+.5<<16>>>16}function o(t){return 256*Math.log(t)+.5<<16>>16}n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return o}))},function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return i})),function(t){t[t.Static=0]="Static",t[t.Unique=1]="Unique",t[t.Loaded=2]="Loaded"}(i||(i={}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){this.events={}}return t.prototype.on=function(t,e){var n=this.events[t];return n||(n=this.events[t]=[]),n.push(e),this},t.prototype.once=function(t,e){var n=this,i=function(r){n.off(t,i),e.call(n,r)};return this.on(t,i),this},t.prototype.off=function(t,e){var n=this.events[t];if(!n)return this;var i=n.indexOf(e);return-1!==i&&n.splice(i,1),this},t.prototype.emit=function(t,e){var n=this.events[t];if(!n)return this;for(var i=n.slice(),r=0;r<i.length;r++)i[r].call(this,e);return this},t}()},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"e",(function(){return c})),n.d(e,"d",(function(){return l})),n.d(e,"b",(function(){return u})),n.d(e,"f",(function(){return d}));var i,r=n(22),o=n(0);function a(t,e,n){return{key:e,labelsKey:t.labelsKey+"_"+e,useful:!0,ready:!1,needGenerate:!1,tile:t,status:i.Initial,params:n.clone()}}function s(t,e,n){t.status===i.Generating&&(t.generatedData=e),n&&t.params.setTileIds(n)}function c(t){var e=t.generatedData,n=[];if(!e)return n;for(var i=0;i<e.length;i++){var r=e[i];r.collectorOutput.labels&&n.push({metatileHash:r.metatileHash,labels:r.collectorOutput.labels,styleId:r.styleId})}return n}function l(t,e){t.status=i.Initial,t.generatedData=void 0,void 0!==t.objects&&t.objects.forEach((function(t){return t.clean(e)})),t.objects=void 0,t.ready=!1,t.tile.currentMod===t&&(t.tile.currentMod=void 0)}function u(t){return t.status===i.Initial}function d(t,e,n,a){var s=a.renderer;switch(t.status){case i.Initial:t.useful&&(t.status=i.Loading);break;case i.Loading:t.useful?t.tile.serverMetadata&&(t.status=i.Loaded):t.status=i.Initial;break;case i.Loaded:(function(t,e,n){switch(t.tile.type){case"terrain":return Boolean(t.useful&&t.tile.serverMetadata&&function(t,e,n){for(var i=n.assetManager,r=n.modelManager,a=0;a<t.length;a++){var s=t[a],c=s.regionId,l=s.metatileHash;if(!i.getMetatile(l)||e.styleZoom>o.loadModelsInfoStyleZoom&&!r.isModelsInfoLoaded(c))return!1}return!0}(t.tile.serverMetadata,e,n));case"traffic":return Boolean(t.useful&&t.tile.serverMetadata);case"raster":case"geojson":return Boolean(t.useful);default:return!1}})(t,n,a)&&(t.status=i.Generating,t.needGenerate=!0);break;case i.Generating:t.generatedData&&(t.status=i.Generated,t.ready=!0,t.objects=t.generatedData.map((function(e){var n=e.collectorOutput.data;return new r.a(t.tile.type,n,s,t.tile.coords)})),e.add(t.key,t))}}!function(t){t[t.Initial=0]="Initial",t[t.Loading=1]="Loading",t[t.Loaded=2]="Loaded",t[t.Generating=3]="Generating",t[t.Generated=4]="Generated"}(i||(i={}))},function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"d",(function(){return s})),n.d(e,"f",(function(){return l})),n.d(e,"a",(function(){return h}));var i=n(50),r=function(t){return t},o=null,a=!1,s=new Promise((function(t){o=function(){a=!0,t()}})),c=new Set(["ar"]);function l(t,e,n){var r=e.workers.labeling;"always-off"===t||"depends-on-language"===t&&!c.has(n)?r.markRtlPluginLoaded().then((function(){null!==o&&o()})):fetch(i.f,{integrity:i.e}).then((function(t){return t.text()})).then((function(t){return Promise.all([r.loadRtlPlugin(t),Promise.resolve(h(t))])}))}var u,d,f,h=(u=function(t){new Function(t)(),r=globalThis.mapglRtlPlugin.processRtl,o&&o()},f=!1,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return f?d:(f=!0,d=u.apply(this,t))})},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return l})),n.d(e,"d",(function(){return f})),n.d(e,"f",(function(){return h}));var i=n(1),r=n(58),o=n(91),a=n(0),s=15,c=256,l=17,u=function(){function t(t,e,n){var i,c;this.type="geojson",this.modules=t.modules,this.mapglApiSource=n,this.sourceCore=new o.a(this.modules,e);var u=null!==(i=e.minZoom)&&void 0!==i?i:a.MAP_DEFAULTS.minZoom,d=Math.min(null!==(c=e.maxZoom)&&void 0!==c?c:s,l);this.layer=new r.a(u,d,u,l,this.modules,t.state,this.sourceCore),this.modules.tileManager.addTileLayer(this.layer)}return t.prototype.destroy=function(){this.modules.tileManager.removeTileLayer(this.layer),this.layer.destroy(),this.modules.sourceStorage.removeSource(this.getId()),this.sourceCore.destroy()},t.prototype.setAttributes=function(t){this.sourceCore.setAttributes(t),this.layer.redraw()},t.prototype.getAttributes=function(){return this.sourceCore.getAttributes()},t.prototype.getId=function(){return this.sourceCore.id},t}(),d={type:"FeatureCollection",features:[]},f=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.subtype="internal",r.data=n.data,r.modules.sourceStorage.addSource(r),r}return Object(i.c)(e,t),e.prototype.getFeatureById=function(t){return"FeatureCollection"===this.data.type?this.data.features[t[0]]:this.data},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.data=d},e}(u),h=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.subtype="external",r.modules.sourceStorage.addSource(r),r}return Object(i.c)(e,t),e.prototype.getObjectAttributes=function(t,e){return this.sourceCore.getObjectAttributes(t,e)},e}(u)},function(t,e,n){"use strict";function i(t,e,n){var i,r,o,a,s=function(){var c=Date.now()-o;c<e&&c>=0?i=setTimeout(s,e-c):(i=null,n||(a=t.apply(void 0,r),i||(r=null)))};return function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];r=c,o=Date.now();var u=n&&!i;return i||(i=setTimeout(s,e)),u&&(a=t.apply(void 0,r),r=null),a}}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";n.d(e,"c",(function(){return b})),n.d(e,"a",(function(){return x})),n.d(e,"b",(function(){return w})),n.d(e,"d",(function(){return S}));var i=n(64),r=n.n(i),o=n(76),a=n(49),s=function(){this.name="",this.range="",this.glyphs={}},c=function(){this.id=0,this.range=0,this.bitmap=null,this.top=0,this.left=0,this.advance=0,this.x=0,this.y=0,this.width=0,this.height=0,this.texTop=0,this.texLeft=0,this.texRight=0,this.texBottom=0},l=function(t,e){this.stacks=t.readFields(u,[],e)};function u(t,e,n){if(1===t){var i=n.readMessage(d,new s);e.push(i)}}function d(t,e,n){switch(t){case 1:e.name=n.readString();break;case 2:e.range=n.readString();break;case 3:var i=n.readMessage(f,new c);e.glyphs[i.id]=i}}function f(t,e,n){switch(t){case 1:e.id=n.readVarint(),e.range=Object(a.b)(e.id);break;case 2:e.bitmap=n.readBytes();break;case 3:e.width=n.readVarint()+6;break;case 4:e.height=n.readVarint()+6;break;case 5:e.left=n.readSVarint()-3;break;case 6:e.top=n.readSVarint()+17+3;break;case 7:e.advance=n.readVarint()}}var h=n(38),p=n(2),m=n(0),v=n(37),_=n(5),y=n(6),g=function(t,e,n){for(var i=[],r=0,o=0;o<t.length;o++){var a=t.charCodeAt(o),s=e&&e[a];s?(i.push(s),r+=s.advance):a!==m.fonts.bomCharCode&&Object(v.b)(t[o],a)}this.glyphs=i,this.width=r+m.fonts.baseSize*n*(t.length-1)};function b(t,e,n){for(var i={lines:[],maxWidth:0},r=t.split("\n"),o=0;o<r.length;o++){var a=new g(r[o],n,e);i.lines.push(a),a.width>i.maxWidth&&(i.maxWidth=a.width)}return i}function x(t,e,n){for(var i=0,r=e;i<r.length;i++){var o=r[i];if(!n.has(t,o))return!1}return!0}function w(t,e,n){if(void 0!==t){var i=Object(_.j)(t,e);if(""!==i)return void 0===n.fontNameToIndex[i]?y.b:i}}function S(t){var e=new l(new r.a(new Uint8Array(t))).stacks[0].glyphs,n=function(t){for(var e=[],n=new o.a(512,512,{autoResize:!0}),i=Object.keys(t),r=0;r<i.length;r++)(a=t[i[r]]).bitmap&&e.push({glyph:a,width:a.width,height:a.height});for(n.pack(e,{inPlace:!0}),n.shrink(),r=0;r<e.length;r++){var a;(a=e[r].glyph).x=e[r].x,a.y=e[r].y}return{width:Object(p.w)(n.w),height:Object(p.w)(n.h)}}(e),i=n.width,a=n.height;return function(t,e,n){for(var i=Object.keys(t),r=0;r<i.length;r++){var o=t[i[r]];o.bitmap&&(o.texTop=Object(h.c)(o.y/n),o.texLeft=Object(h.c)(o.x/e),o.texBottom=Object(h.c)((o.y+o.height)/n),o.texRight=Object(h.c)((o.x+o.width)/e))}}(e,i,a),{glyphData:e,bitmap:function(t,e,n){for(var i=new Uint8Array(e*n),r=Object.keys(t),o=0;o<r.length;o++){var a=t[r[o]];if(a.bitmap)for(var s=0;s<a.height;s++)for(var c=e*(a.y+s)+a.x,l=a.width*s,u=0;u<a.width;u++)i[c+u]=a.bitmap[l+u]}return i.buffer}(e,i,a),width:i,height:a}}},function(t,e,n){"use strict";n.r(e),n.d(e,"sinks",(function(){return a})),n.d(e,"generateLine",(function(){return s}));var i=n(85),r=n(23);function o(t,e,n,i,o){return Object(r.c)([t,e],n,i,o)}var a={solid:{stride:12,binder:function(t,e){t.position=new Uint16Array(e),t.extender=new Int8Array(e,4),t.normal=new Int8Array(e,6),t.localID=new Uint32Array(e,8)},packObjectAttributes:o,unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},s=function(t,e,n,r,s,c){var l=!Number.isNaN(s[r.beginningIsCut])&&0!==s[r.beginningIsCut],u=!Number.isNaN(s[r.endingIsCut])&&0!==s[r.endingIsCut],d=t.idIndexer.getIndex(s[r.id],e,n,s[r.db_sublayer]),f=t.getBucket(n.type,"solid",o(e,n.innerId,n.dataKeys,r,s),a.solid.binder);Object(i.a)(f,c[0],c[1],c[0].length,!l,!u,d)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return c}));var i=Math.pow(2,32)-1,r=i-1,o={},a=["main","parser","labeling"],s=0;a.forEach((function(t){var e=s+Math.floor(r/a.length);o[t]={min:s,max:e-1e6},s=e}));var c=function(){function t(t){this.minIdentifyIndex=o[t].min,this.maxIdentifyIndex=o[t].max,this.index=this.minIdentifyIndex,this.ids=[],this.phases=[],this.sublayers=[],this.styleIds=[],this.layerIds=[],this.instanceIds=[],this.objectClasses=[],this.strings={}}return t.prototype.getIndex=function(t,e,n,r,o,a,s){var c,l,u;if(void 0===a&&(a=0),!Array.isArray(t))return i;var d=this.index+this.ids.length/2;if(this.ids.push(t[0],t[1]),this.phases.push(n.renderIndex),this.sublayers.push(null!==(l=null===(c=null==s?void 0:s.dictionaries.db_sublayer)||void 0===c?void 0:c[r])&&void 0!==l?l:NaN),this.styleIds.push(e),this.layerIds.push(n.innerId),this.instanceIds.push(a),"string"==typeof o){var f=null===(u=null==s?void 0:s.dictionaries.db_object_class)||void 0===u?void 0:u[o];f?this.objectClasses.push(f):(this.objectClasses.push(0),this.strings[d]={objectClass:o})}else this.objectClasses.push(i);return d},t.prototype.getPacked=function(){var t=new Uint32Array(this.ids).buffer,e=new Float32Array(this.phases).buffer,n=new Uint32Array(this.sublayers).buffer,i=new Uint16Array(this.styleIds).buffer,r=new Uint32Array(this.layerIds).buffer,o=new Uint8Array(this.instanceIds).buffer,a=new Uint32Array(this.objectClasses).buffer,s=this.index,c=this.index+this.ids.length-1;this.index=this.index+this.ids.length,this.index>this.maxIdentifyIndex&&(this.index=this.minIdentifyIndex);var l=this.strings;return this.ids=[],this.phases=[],this.sublayers=[],this.styleIds=[],this.layerIds=[],this.instanceIds=[],this.objectClasses=[],this.strings={},{idBuffer:t,startIndex:s,endIndex:c,phaseBuffer:e,sublayerBuffer:n,styleIdBuffer:i,layerIdBuffer:r,instanceIdBuffer:o,objectClassBuffer:a,strings:l}},t}()},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return a}));var i=[255,0,0,255];function r(t){return"string"==typeof t&&/(#(?:[0-9a-f]{2}){2,4}|#[0-9a-f]{3}|(?:rgba?|hsla?)\((?:\d+%?(?:,|\s)+){2,3}[\s\/]*[\d\.]+%?\))/i.test(t)}function o(t){return t instanceof Array&&4===t.length&&"number"==typeof t[0]}function a(t){var e=t.toLowerCase(),n=i;switch(e[0]){case"#":n=function(t){if(!new RegExp("^#[a-f0-9]{"+(t.length-1)+"}$").test(t)||![4,5,7,9].includes(t.length))return i;var e=function(t){return t.length<7?t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(5===t.length?t[4]+t[4]:"ff"):7===t.length?t+"ff":t}(t);return[parseInt(e[1]+e[2],16),parseInt(e[3]+e[4],16),parseInt(e[5]+e[6],16),parseInt(e[7]+e[8],16)]}(e);break;case"h":n=function(t){var e=s(t);e[0]/=360,e[1]/=100,e[2]/=100;var n=function(t,e,n){if(0===e)return[255*n,255*n,255*n];var i=n<.5?n*(1+e):n+e-n*e,r=2*n-i;return[255*c(r,i,t+1/3),255*c(r,i,t),255*c(r,i,t-1/3)]}(e[0],e[1],e[2]),i=n[0],r=n[1],o=n[2],a=void 0!==e[3]?255*e[3]:255;return[Math.round(i),Math.round(r),Math.round(o),Math.round(a)]}(e);break;case"r":n=function(t){var e=s(t),n=e[0],i=e[1],r=e[2],o=e[3],a=void 0!==o?255*o:255;return[Math.round(n),Math.round(i),Math.round(r),Math.round(a)]}(e)}return n}function s(t){return t.split("(")[1].split(")")[0].split(",").map((function(t){return parseFloat(t)}))}function c(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s}));var i=n(0);function r(t){for(var e="",n=0;n<t.length;){var i=t[n++];if(i>127){if(i>191&&i<224){if(n>=t.length)return console.error("Incomplete 2-byte sequence"),e;i=(31&i)<<6|63&t[n]}else if(i>223&&i<240){if(n+1>=t.length)return console.error("Incomplete 3-byte sequence"),e;i=(15&i)<<12|(63&t[n])<<6|63&t[++n]}else{if(!(i>239&&i<248))return console.error("Unknown multibyte start 0x"+i.toString(16)+" at index "+(n-1)),e;if(n+2>=t.length)return console.error("Incomplete 4-byte sequence"),e;i=(7&i)<<18|(63&t[n])<<12|(63&t[++n])<<6|63&t[++n]}++n}if(i<=65535)e+=String.fromCharCode(i);else{if(!(i<=1114111))return console.error("Code point 0x"+i.toString(16)+" exceeds UTF-16 reach"),e;i-=65536,e+=String.fromCharCode(i>>10|55296),e+=String.fromCharCode(1023&i|56320)}}return e}function o(t,e){if(t.length<=e||-1!==t.indexOf("\n"))return t;var n=[];return t.split(" ").forEach((function(t){var i=n.length-1;0===n.length||n[i].length+t.length>=e?n.push(t):n[i]+=" "+t})),n.join("\n")}function a(t){return Math.floor(t/256)}function s(t){var e=new Set;return t.forEach((function(t){if(void 0!==t)for(var n=0;n<t.length;n++){var r=t.charCodeAt(n);r!==i.fonts.bomCharCode&&e.add(a(r))}})),Array.from(e)}},function(t,e,n){"use strict";n.d(e,"h",(function(){return i})),n.d(e,"i",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"g",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return c})),n.d(e,"d",(function(){return l})),n.d(e,"f",(function(){return u})),n.d(e,"e",(function(){return d}));var i="tile{subdomain}.maps.2gis.com",r="traffic0.edromaps.2gis.com",o="https://floors.api.2gis.ru",a="https://styles.api.2gis.com",s="https://mapgl.2gis.com/api/fonts",c="https://disk.2gis.com/styles/{id}",l="https://keys.api.2gis.com/public/v1/keys/{keyID}/services/mapgl-js-api",u="https://mapgl.2gis.com/api/js/plugins/rtl-v1.0.0.js",d="sha512-YAPPEl+Atvsm/cMkrfWefmlQLAlKTGaqFjIkI6urAnDgam2uTVEVVnZZEhHCa91JjYYxa5yr4Ndb4Vl3NUovfA=="},function(t,e,n){"use strict";n.d(e,"b",(function(){return f})),n.d(e,"a",(function(){return h}));var i=n(49),r=n(25),o=n(12),a=n(3),s=n(9),c=n(30),l=n(10),u=n(47);function d(t){return"labelLine"===t.type||"point"===t.type||"oneWayLine"===t.type}function f(t,e,n,i,r){for(var o=[],a=0,s=t;a<s.length;a++)for(var l=s[a],u=0,f=l.labels;u<f.length;u++){var p=f[u],m=n.getStyle(p.styleId);if(m){var v=m.layersById[p.layerId];if(v&&d(v)){var _=new h(p,v,e,l.metatileHash);switch(p.type){case c.a.Point:_.setSpecificPointAttributes(p,i,r);break;case c.a.Line:_.setSpecificLineAttributes(p,i,r);break;case c.a.OneWayLine:_.setSpecificOneWayAttributes(p)}o.push(_)}else console.error("Not found layer: "+p.layerId+" in style "+p.styleId+" in unpackPreLabelingResult")}else console.error("Not found style "+p.styleId+" in unpackPreLabelingResult")}return o}var h=function(){function t(t,e,n,i){this.ready=!1,this.rtlProcessed=!1,this.labelingElements=[],this.id="",this.idLo=0,this.idHi=0,this.detailLevel=0,this.labelPriority=0,this.label="",this.ranges=[],this.pointType=o.b.Common,this.iconPriority=0,this.identifyIndex=u.b,this.identifyPoiLabelIndex=u.b,this.hovered=0,this.label2Priority=0,this.anchorWorld=[0,0,0],this.componentDistanceStartWorld=0,this.componentDistanceEnd=0,this.componentDistanceStart=0,this.objectLengthWorld=0,this.layer=e,this.styleId=t.styleId,this.source=n,this.metatileHash=i,this.tileData=t.tileData,this.labelPriority=t.labelPriority,this.detailLevel=t.tileCoords[2],this.idLo=t.id[0],this.idHi=t.id[1],this.id=Object(r.a)(this.idLo,this.idHi)}return t.prototype.setSpecificPointAttributes=function(t,e,n){if("point"!==this.layer.type)throw new Error("Label: layer type is not a point");var r=this.layer.style;this.pointType=t.pointType,this.label2Priority=t.label2Priority,this.iconPriority=t.iconPriority,this.identifyIndex=t.identifyIndex,this.identifyPoiLabelIndex=t.identifyPoiLabelIndex,this.hovered=t.hovered;var o={type:"labeling",interpolateExpressionAsStep:!0,tileData:t.tileData,styleState:e,styleZoom:n};this.label=Object(i.d)(Object(c.c)(r.textField,o),r.textMaxLengthPerLine),r.textField2&&(this.label2=Object(i.d)(Object(c.c)(r.textField2,o),r.textMaxLengthPerLine)),"point"===this.layer.type&&r.iconTextField&&(this.iconLabel=Object(i.d)(Object(c.c)(r.iconTextField,o),r.textMaxLengthPerLine));var l=Object(s.e)(t.tileCoords);Object(a.q)(this.anchorWorld,t.vertex,l),"point"!==this.layer.type||this.layer.style.allowElevation||(this.anchorWorld[2]=0)},t.prototype.setSpecificLineAttributes=function(t,e,n){if("labelLine"!==this.layer.type)throw new Error("Label: layer type is not a labelLine");var i={type:"labeling",interpolateExpressionAsStep:!0,tileData:t.tileData,styleState:e,styleZoom:n};this.label=Object(c.c)(this.layer.style.textField,i);var r=Object(s.e)(t.tileCoords);this.anchorWorld=[];for(var o=[0,0,0],u=[0,0,0],d=0;d<t.vertices[0].length;d++)o[0]=t.vertices[0][d],o[1]=t.vertices[1][d],Object(a.q)(u,o,r),this.anchorWorld.push(u[0],u[1],u[2]);this.componentDistanceStart=t.componentDistanceStart,this.componentDistanceEnd=t.componentDistanceEnd,this.componentDistanceStartWorld=Object(l.m)(this.componentDistanceStart,t.tileCoords[2]),this.objectLengthWorld=Object(l.m)(t.objectLength,t.tileCoords[2])},t.prototype.setSpecificOneWayAttributes=function(t){var e=Object(s.e)(t.tileCoords);this.anchorWorld=[];for(var n=[0,0,0],i=[0,0,0],r=0;r<t.vertices[0].length;r++)n[0]=t.vertices[0][r],n[1]=t.vertices[1][r],Object(a.q)(i,n,e),this.anchorWorld.push(i[0],i[1],i[2]);this.componentDistanceStart=t.componentDistanceStart,this.componentDistanceEnd=t.componentDistanceEnd,this.componentDistanceStartWorld=Object(l.m)(this.componentDistanceStart,t.tileCoords[2]),this.objectLengthWorld=Object(l.m)(t.objectLength,t.tileCoords[2])},t.prototype.updateRanges=function(){this.ranges=Object(i.c)([this.label,this.label2,this.iconLabel])},t}()},function(t,e,n){"use strict";function i(t,e){var n=new XMLHttpRequest;if(n.open("GET",t.url,!0),n.responseType="arraybuffer",t.headers)for(var i in t.headers)n.setRequestHeader(i,t.headers[i]);return n.onerror=function(){e({status:0,message:"Network error"},new ArrayBuffer(0))},n.onload=function(){n.status>=200&&n.status<300&&n.response?e(void 0,n.response):e({status:n.status,message:n.statusText},new ArrayBuffer(0))},n.send(),n}function r(t,e){var n=new XMLHttpRequest;if(n.open("GET",t.url,!0),t.headers)for(var i in t.headers)n.setRequestHeader(i,t.headers[i]);return n.onerror=function(){e({status:0,message:"Network error"},{})},n.onload=function(){if(0===n.response.byteLength&&200===n.status)return e({status:0,message:"No content"},{});if(n.status>=200&&n.status<300&&n.response&&n.response.length){var t=void 0;try{t=JSON.parse(n.response),e(void 0,t)}catch(t){e({status:0,message:"Json parse error"},{})}}else e({status:n.status,message:n.statusText},{})},n.send(),n}n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var i=n(34),r=n(0),o=n(60),a=n(19),s=n(33),c=n(5),l=n(47),u=n(23),d=n(12),f=n(30),h=function(t,e,n,h,p,m,v,_,y,g,b){var x=m.tileProps;if(function(t,e,n,l,u,d,f,h){var p=l.tileProps,m=e.rasterSets,v=e.icons,_=Object(s.b)(f),y=Object(c.a)(n.style.iconWidth),g=Object(i.d)(u[p.db_sublayer]),b=Object(i.e)(u[p.db_sublayer]);if(g||b){if(h)return;var x=g?r.commercialRasterSizes:r.landmarkRasterSizes,w=Object(o.b)(u[p.id],x,d);t.atlasPacker.addNewRasterSet(e.id,w),t.atlasPacker.pack(w,y,_)}else Object(c.a)(n.style.iconImage).forEach((function(i){if(i.length){var r=n.style.iconAnchor,o=m.byKey[Object(a.c)(i,r[0],r[1])];if(!o)throw new Error("Not found raster set with image "+i+", anchorX: "+r[0]+", anchorY: "+r[1]);if(o.isSvg){var s=v[i],c=s?[{w:s.width,h:s.height}]:y.map((function(t){return{w:t,h:t}}));t.atlasPacker.packSvg(o,c,_),h&&o.rasters.forEach((function(n){return t.atlasPacker.addRastersToLoad(e.id,n)}))}}}))}(t,e,n,m,v,y,g,b),!b){var w=v[x.id],S=l.b,I=l.b;Number.isNaN(w)||(S=t.idIndexer.getIndex(w,e.id,n,v[x.db_sublayer],v[x.db_object_class],0,m),I=t.idIndexer.getIndex(w,e.id,n,v[x.db_sublayer],v[x.db_object_class],1,m));var j=d.b.Common;Object(i.d)(v[x.db_sublayer])?j=d.b.Commercial:Object(i.e)(v[x.db_sublayer])&&(j=d.b.Landmark);var O={type:f.a.Point,pointType:j,styleId:e.id,layerId:n.innerId,tileCoords:h,id:v[x.id],identifyIndex:S,identifyPoiLabelIndex:I,labelPriority:Object(f.b)(v[x.labelPriority],0),label2Priority:Object(f.b)(v[x.label2Priority],0),iconPriority:Object(f.b)(v[x.iconPriority],0),hovered:Object(f.b)(v[x.hovered],0),vertex:[_[0][0],_[1][0],3===_.length?_[2][0]:0],tileData:Object(u.c)([],n.dataKeys,x,v,p)};t.addLabel(O)}}},function(t,e,n){"use strict";n.r(e),n.d(e,"generatorType",(function(){return d})),n.d(e,"sinks",(function(){return f})),n.d(e,"generatePolygon",(function(){return h}));var i=n(25),r=n(36),o=n(59),a=n(47),s=n(23),c=[NaN,NaN];function l(t,e,n,i,r,o){return Object(s.c)([t,e,n[0],n[1]],i,r,o)}function u(t){return{styleId:t[0],layerId:t[1],hiddenObjectId:Number.isNaN(t[2])?void 0:Object(i.a)(t[2],t[3]),tileData:t.slice(4)}}var d="polygon",f={fill:{stride:8,binder:function(t,e){t.position=new Uint16Array(e),t.localID=new Uint32Array(e,4)},packObjectAttributes:l,unpackObjectAttributes:u},stroke:{stride:8,binder:function(t,e){t.position=new Uint16Array(e),t.directionDistance=new Int8Array(e,4)},packObjectAttributes:l,unpackObjectAttributes:u}},h=function(t,e,n,i,s,u,d){var h=u[0],v=u[1],_=u[2],y=s[i.id],g=!Number.isNaN(y)&&d&&d.has(y)?y:c,b=s[i.hovered]?a.b:t.idIndexer.getIndex(y,e.id,n,s[i.db_sublayer]);!function(t,e,n,i,r){var o=t.indices.buffer,a=t.indices.offset,s=t.elements.offset,c=s;p(t,s++,n[0],i[0],r),p(t,s++,n[1],i[1],r);for(var l=2;l<e;l++)m(o,a,c,l),p(t,s++,n[l],i[l],r),a+=3;t.elements.offset=s,t.indices.offset=a}(t.getBucket(n.type,"fill",l(e.id,n.innerId,g,n.dataKeys,i,s),f.fill.binder),h.length,h,v,b),function(t,e,n,i,a){for(var s=0;s<e;s++){var c=Object(r.a)(s,e);if(1===a[c]){var l=Object(r.a)((s+1)%e,e);Object(o.a)(t,n[c],i[c],0,n[l],i[l],0)}}}(t.getBucket(n.type,"stroke",l(e.id,n.innerId,g,n.dataKeys,i,s),f.stroke.binder),h.length,h,v,_)};function p(t,e,n,i,r){e*=4,t.position[e]=n,t.position[e+1]=i,e>>=1,t.localID[e]=r}function m(t,e,n,i){i%2==0?(t[e]=n+i-2,t[e+1]=n+i-1,t[e+2]=n+i):(t[e]=n+i-1,t[e+1]=n+i-2,t[e+2]=n+i)}},function(t,e,n){"use strict";n.r(e),n.d(e,"sinks",(function(){return r})),n.d(e,"generateHeatmapTexture",(function(){return o})),n.d(e,"generateHeatmapPoints",(function(){return a}));var i=n(5),r={fill:{stride:8,binder:function(t,e){t.position=new Float32Array(e)},packObjectAttributes:function(t,e,n,i){return[t,e,n,i]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],textureIndex:t[2],rampTextureIndex:t[3]}}},framebuffer:{stride:12,binder:function(t,e){t.position=new Uint16Array(e),t.weight=new Float32Array(e,4),t.widen=new Int8Array(e,8)},packObjectAttributes:function(t,e){return[t,e]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1]}}}},o=function(t,e,n,i,o){var a=[-1,1,1,-1],c=[-1,-1,1,1],l=t.getBucket(n.type,"fill",r.fill.packObjectAttributes(e,n.innerId,i,o),r.fill.binder),u=l.elements.offset;!function(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+0,c[l+1]=e+1,c[l+2]=e+2,c[l+3]=e+0,c[l+4]=e+2,c[l+5]=e+3,t.offset=l+6}(l.indices,u),s(l,u++,a[0],c[0]),s(l,u++,a[1],c[1]),s(l,u++,a[2],c[2]),s(l,u++,a[3],c[3]),l.elements.offset=u},a=function(t,e,n,o,a){var s=o[0],u=o[1],d=Number(Object(i.h)(n.style.weight,a));if(Number.isNaN(d))console.error("Can't resolve style.weight to number");else for(var f=t.getBucket(n.type,"framebuffer",r.framebuffer.packObjectAttributes(e,n.innerId),r.framebuffer.binder),h=0;h<s.length;h++)l(f,0,1,2,2,1,3),c(f,s[h],u[h],-1,-1,d),c(f,s[h],u[h],1,-1,d),c(f,s[h],u[h],-1,1,d),c(f,s[h],u[h],1,1,d)};function s(t,e,n,i){var r=2*e;t.position[r]=n,t.position[r+1]=i}function c(t,e,n,i,r,o){var a=t.elements.offset*t.elements.stride,s=a>>1,c=s>>1;t.position[s]=e,t.position[s+1]=n,t.weight[c]=o,t.widen[a]=i,t.widen[a+1]=r,t.elements.offset++}function l(t,e,n,i,r,o,a){var s=t.elements,c=t.indices,l=c.buffer,u=c.offset,d=s.offset;l[u]=d+e,l[u+1]=d+n,l[u+2]=d+i,l[u+3]=d+r,l[u+4]=d+o,l[u+5]=d+a,c.offset=u+6}},function(t,e,n){"use strict";function i(t,e,n){n=n||2;var i,s,c,l,u,h,p,v=e&&e.length,_=v?e[0]*n:t.length,y=r(t,0,_,n,!0),g=[];if(!y||y.next===y.prev)return g;if(v&&(y=function(t,e,n,i){var a,s,c,l=[];for(a=0,s=e.length;a<s;a++)(c=r(t,e[a]*i,a<s-1?e[a+1]*i:t.length,i,!1))===c.next&&(c.steiner=!0),l.push(m(c));for(l.sort(d),a=0;a<l.length;a++)n=o(n=f(l[a],n),n.next);return n}(t,e,y,n)),t.length>80*n){i=c=t[0],s=l=t[1];for(var b=n;b<_;b+=n)(u=t[b])<i&&(i=u),(h=t[b+1])<s&&(s=h),u>c&&(c=u),h>l&&(l=h);p=0!==(p=Math.max(c-i,l-s))?1/p:0}return a(y,g,n,i,s,p),g}function r(t,e,n,i,r){var o,a;if(r===P(t,e,n,i)>0)for(o=e;o<n;o+=i)a=j(o,t[o],t[o+1],a);else for(o=n-i;o>=e;o-=i)a=j(o,t[o],t[o+1],a);return a&&g(a,a.next)&&(O(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!g(i,i.next)&&0!==y(i.prev,i,i.next))i=i.next;else{if(O(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function a(t,e,n,i,r,d,f){if(t){!f&&d&&function(t,e,n,i){var r=t;do{null===r.z&&(r.z=p(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,a,s,c,l=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,i=n,s=0,e=0;e<l&&(s++,i=i.nextZ);e++);for(c=l;s>0||c>0&&i;)0!==s&&(0===c||!i||n.z<=i.z)?(r=n,n=n.nextZ,s--):(r=i,i=i.nextZ,c--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,l*=2}while(a>1)}(r)}(t,i,r,d);for(var h,m,v=t;t.prev!==t.next;)if(h=t.prev,m=t.next,d?c(t,i,r,d):s(t))e.push(h.i/n),e.push(t.i/n),e.push(m.i/n),O(t),t=m.next,v=m.next;else if((t=m)===v){f?1===f?a(t=l(o(t),e,n),e,n,i,r,d,2):2===f&&u(t,e,n,i,r,d):a(o(t),e,n,i,r,d,1);break}}}function s(t){var e=t.prev,n=t,i=t.next;if(y(e,n,i)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(v(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&y(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function c(t,e,n,i){var r=t.prev,o=t,a=t.next;if(y(r,o,a)>=0)return!1;for(var s=r.x<o.x?r.x<a.x?r.x:a.x:o.x<a.x?o.x:a.x,c=r.y<o.y?r.y<a.y?r.y:a.y:o.y<a.y?o.y:a.y,l=r.x>o.x?r.x>a.x?r.x:a.x:o.x>a.x?o.x:a.x,u=r.y>o.y?r.y>a.y?r.y:a.y:o.y>a.y?o.y:a.y,d=p(s,c,e,n,i),f=p(l,u,e,n,i),h=t.prevZ,m=t.nextZ;h&&h.z>=d&&m&&m.z<=f;){if(h!==t.prev&&h!==t.next&&v(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&y(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,m!==t.prev&&m!==t.next&&v(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;h&&h.z>=d;){if(h!==t.prev&&h!==t.next&&v(r.x,r.y,o.x,o.y,a.x,a.y,h.x,h.y)&&y(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;m&&m.z<=f;){if(m!==t.prev&&m!==t.next&&v(r.x,r.y,o.x,o.y,a.x,a.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function l(t,e,n){var i=t;do{var r=i.prev,a=i.next.next;!g(r,a)&&b(r,i,i.next,a)&&S(r,a)&&S(a,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(a.i/n),O(i),O(i.next),i=t=a),i=i.next}while(i!==t);return o(i)}function u(t,e,n,i,r,s){var c=t;do{for(var l=c.next.next;l!==c.prev;){if(c.i!==l.i&&_(c,l)){var u=I(c,l);return c=o(c,c.next),u=o(u,u.next),a(c,e,n,i,r,s),void a(u,e,n,i,r,s)}l=l.next}c=c.next}while(c!==t)}function d(t,e){return t.x-e.x}function f(t,e){var n=function(t,e){var n,i=e,r=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=r&&s>a){if(a=s,s===r){if(o===i.y)return i;if(o===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!n)return null;if(r===a)return n;var c,l=n,u=n.x,d=n.y,f=1/0;i=n;do{r>=i.x&&i.x>=u&&r!==i.x&&v(o<d?r:a,o,u,d,o<d?a:r,o,i.x,i.y)&&(c=Math.abs(o-i.y)/(r-i.x),S(i,t)&&(c<f||c===f&&(i.x>n.x||i.x===n.x&&h(n,i)))&&(n=i,f=c)),i=i.next}while(i!==l);return n}(t,e);if(!n)return e;var i=I(n,t),r=o(n,n.next);return o(i,i.next),e===n?r:e}function h(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function p(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function m(t){var 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 v(t,e,n,i,r,o,a,s){return(r-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(r-a)*(i-s)>=0}function _(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(S(t,e)&&S(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||g(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function g(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,i){var r=w(y(t,e,n)),o=w(y(t,e,i)),a=w(y(n,i,t)),s=w(y(n,i,e));return r!==o&&a!==s||!(0!==r||!x(t,n,e))||!(0!==o||!x(t,i,e))||!(0!==a||!x(n,t,i))||!(0!==s||!x(n,e,i))}function x(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 w(t){return t>0?1:t<0?-1:0}function S(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function I(t,e){var n=new M(t.i,t.x,t.y),i=new M(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function j(t,e,n,i){var r=new M(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function O(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)}function M(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function P(t,e,n,i){for(var r=0,o=e,a=n-i;o<n;o+=i)r+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return r}t.exports=i,t.exports.default=i,i.deviation=function(t,e,n,i){var r=e&&e.length,o=r?e[0]*n:t.length,a=Math.abs(P(t,0,o,n));if(r)for(var s=0,c=e.length;s<c;s++){var l=e[s]*n,u=s<c-1?e[s+1]*n:t.length;a-=Math.abs(P(t,l,u,n))}var d=0;for(s=0;s<i.length;s+=3){var f=i[s]*n,h=i[s+1]*n,p=i[s+2]*n;d+=Math.abs((t[f]-t[p])*(t[h+1]-t[f+1])-(t[f]-t[h])*(t[p+1]-t[f+1]))}return 0===a&&0===d?0:Math.abs((d-a)/a)},i.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r<t.length;r++){for(var o=0;o<t[r].length;o++)for(var a=0;a<e;a++)n.vertices.push(t[r][o][a]);r>0&&(i+=t[r-1].length,n.holes.push(i))}return n}},function(t,e,n){"use strict";function i(t){return!!t&&"line"===t.type}function r(t){return t.reduce((function(t,e,n){return t[e]=n,t}),{})}function o(t){if(void 0===t||"boolean"==typeof t)return Boolean(t);var e=JSON.stringify(t);return Boolean(e.match(/\["get","(db_)?sublayer"]/))}n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var i=n(1),r=n(9),o=n(77),a=n(26),s=n(41),c=n(90),l=n(12),u=n(27),d=n(96),f=n(32);function h(t,e,n,i){if(!e.disableHoverStyles){for(var r in n.tiles){var o=n.tiles[r];Object(a.l)(t,e,o,i)}t.labeler.disableThrottleUpdateOnce()}}var p=function(){function t(t,e,n,i,r,o,a){this.modules=r,this.mapState=o,this.prevStyleState=o.styleState,this.sourceCore=a,this.gridState=Object(u.a)(a.type,a.id,t,e,n,i,r,this.mapState)}return t.prototype.destroy=function(){Object(u.g)(this.gridState)},t.prototype.redraw=function(){Object(u.g)(this.gridState),Object(o.a)(this.gridState,this.mapState,this.modules.tileManager.getViewportVertices())},t.prototype.getDisplayedIdentifyData=function(){var t,e,n=[],i=function(i){var o=r.gridState.displayedMods[i];null===(t=o.generatedData)||void 0===t||t.concat((null===(e=o.tile.hover)||void 0===e?void 0:e.generatedData)||[]).forEach((function(t){return n.push({ids:t.collectorOutput.identifyIds,metatileHash:t.metatileHash,sourceId:o.tile.sourceId,tileKey:o.tile.key})}))},r=this;for(var o in this.gridState.displayedMods)i(o);return n},t.prototype.getDisplayedLabelsKeys=function(){var t=[];for(var e in this.gridState.displayedMods){var n=this.gridState.displayedMods[e];t.push(n.labelsKey)}return t},t.prototype.getViewportTiles=function(){for(var t=[],e=this.gridState.viewportTiles,n=0;n<e.length;n++){var i=this.gridState.tiles[e[n]];i&&t.push(i)}return t},t.prototype.viewportTilesReady=function(){return Object(u.j)(this.gridState.tiles,this.gridState.viewportTiles)},t.prototype.displayedTilesAnimationFinished=function(){for(var t in this.gridState.displayedMods){var e=this.gridState.displayedMods[t];if(e.objects)for(var n=0,i=e.objects;n<i.length;n++)if(!i[n].tickerFinished(this.mapState))return!1}return!0},t.prototype.setSelectedIds=function(t){void 0===t&&(t=[]),function(t,e,n,i){var r;for(var o in n.selectedIds=i,n.tilesAppearance=f.a.WaitingAll,Object(u.i)(n),n.tiles){var s=n.tiles[o];Object(a.l)(t,e,s,null===(r=s.hover)||void 0===r?void 0:r.id,!0)}}(this.modules,this.mapState,this.gridState,t)},t.prototype.setHoverId=function(t){h(this.modules,this.mapState,this.gridState,t)},t.prototype.resetHoverId=function(){h(this.modules,this.mapState,this.gridState)},t.prototype.getTileCount=function(){var t=0;for(var e in this.gridState.displayedMods){var n=this.gridState.displayedMods[e].objects;void 0!==n&&(t+=n.length)}return t},t.prototype.isBlank=function(){for(var t=0,e=this.gridState.viewportTiles;t<e.length;t++){var n=e[t],i=this.gridState.tiles[n],r=i.serverMetadata;if(void 0!==r&&0!==r.length){var o=Object(a.h)(i);if(o&&o.ready)return!1}}return!0},t.prototype.updateViewport=function(t){Object(o.a)(this.gridState,this.mapState,t)},t.prototype.update=function(){var t=Object(i.a)({},this.gridState.displayedMods);this.mapState.styleState!==this.prevStyleState&&(Object(u.i)(this.gridState),this.prevStyleState=this.mapState.styleState),Object(d.a)(this.gridState,this.mapState,this.modules),this.fetch(Object(u.d)(this.gridState)),this.abortFetch(Object(u.c)(this.gridState)),this.generate(Object(u.e)(this.gridState)),this.clearTiles(Object(u.f)(this.gridState)),Object(u.h)(this.modules.tileManager,this.mapState,this.gridState,t)},t.prototype.fetch=function(t){var e=this;t.sort((function(t,n){return Object(r.a)(e.mapState.center,t,n)})).forEach((function(t){e.sourceCore.fetchTile(t.coords,e.mapState).then((function(e){t.status===a.a.Loading&&(t.serverMetadata=e)}))}))},t.prototype.abortFetch=function(t){var e=this;t.forEach((function(t){return e.sourceCore.abortTileFetch(t.coords)}))},t.prototype.generate=function(t){var e=this,n=[];t.sort((function(t,n){return Object(r.a)(e.mapState.center,t,n)})).forEach((function(t){var i=Object(a.g)(t);if(i){var r={tileCoords:t.coords,selectedIds:i.params.get("selectedIds")||[]};n.push(r),e.sourceCore.generateTile(e.mapState,r.tileCoords,r.selectedIds,devicePixelRatio).then((function(n){var r=n.results;r.forEach((function(t){var n=t.styleId,i=t.metatileHash,r=t.regionId,o=t.collectorOutput,a=o.packedRasters,s=o.rastersToLoad,l=o.floorHidingMap;void 0!==a&&e.modules.assetManager.prepareRasters(n,a),e.modules.assetManager.loadRasters(s),e.modules.floorManager.prepareFloors(r,i,new c.a(l),e.sourceCore.type)})),t.idSet||(t.idSet=Object(a.e)(r)),Object(s.a)(i,r,t.idSet),e.modules.labeler.addTileLabels(i.labelsKey,l.c.Tile,Object(s.e)(i))}))}})),"terrain"===this.sourceCore.type&&(n.forEach((function(t){e.sourceCore.generateTile(e.mapState,t.tileCoords,t.selectedIds,devicePixelRatio,{generateOnlySelectedPoi:!0}).then((function(t){t.results.forEach((function(t){var n=t.collectorOutput,i=t.styleId,r=n.packedRasters,o=n.rastersToLoad;void 0!==r&&e.modules.assetManager.prepareRasters(i,r),e.modules.assetManager.loadRasters(o)}))}))})),n.forEach((function(t){e.sourceCore.generateTile(e.mapState,t.tileCoords,t.selectedIds,devicePixelRatio,{generateOnlyHoveredPoi:!0}).then((function(t){t.results.forEach((function(t){var n=t.collectorOutput,i=t.styleId,r=n.packedRasters,o=n.rastersToLoad;void 0!==r&&e.modules.assetManager.prepareRasters(i,r),e.modules.assetManager.loadRasters(o)}))}))})))},t.prototype.clearTiles=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this.sourceCore.deleteTile(i.coords),delete this.gridState.tiles[i.key]}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(4),r=i.d(),o=i.d(),a=i.d();function s(t,e,n,s,l,u,d){i.q(r,e,n,s),i.q(o,l,u,d),i.r(a,o,r),i.h(o,r)||(i.n(a,a),i.o(a,a,127)),function(t,e,n,i,r,o,a){var s=t.indices.buffer,c=t.indices.offset,l=t.elements.offset;s[c]=l+0,s[c+1]=l+1,s[c+2]=l+3,s[c+3]=l+3,s[c+4]=l+1,s[c+5]=l+2,t.indices.offset=c+6}(t),c(t,r,a,1),c(t,r,a,-1),c(t,o,a,-1),c(t,o,a,1)}function c(t,e,n,i){var r=t.elements.offset*t.elements.stride,o=r>>1;t.position[o]=e[0],t.position[o+1]=e[1],t.position[o+2]=e[2],t.directionDistance[r]=n[0],t.directionDistance[r+1]=n[1],t.directionDistance[r+2]=n[2],t.directionDistance[r+3]=i,t.elements.offset++}},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return u})),n.d(e,"c",(function(){return d}));var i=n(1),r=n(39),o=n(19),a=10001,s={w:0,h:0,anchorX:.5,anchorY:.5,x:0,y:0,atlasIndex:0,isPacked:!1},c={};function l(t,e,n){var l=Object(o.d)(t[0],t[1]);if(!c[l]){var u=a++;c[l]={type:r.b.Unique,isSvg:!1,index:u,key:l,name:"",fileName:"",id:t,regionId:n,rasters:e.map((function(t,e){return Object(i.a)(Object(i.a)({},s),{rasterSetIndex:u,rasterIndex:e,w:t,h:t})}))}}return c[l]}function u(t){var e=a++;return{type:r.b.Loaded,isSvg:!1,index:e,key:"loaded-"+e,name:"",fileName:"",rasters:t.map((function(t,n){return Object(i.a)(Object(i.a)({},t),{rasterIndex:n,rasterSetIndex:e})}))}}function d(t,e,n){for(var i,r=1/0,o=0;o<t.length;o++){var a=t[o];if(!n||a.isPacked){var s=Math.abs(a.w-e);s<r&&(i=o,r=s)}}return i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return c}));var i=n(36),r=n(10),o=[.5,.5],a=[.5,.5];function s(t,e,n,o,s){for(var c=t.elements.offset,l=Object(i.a)(e-1,e),h=n[l],p=o[l],m=s?s[l]:0,_=c,y=0;y<e;y++){var g=Object(i.a)(y,e),b=y===e-1,x=n[g],w=o[g],S=s?s[g]:b?0:1;0!==m&&(Object(r.c)(a,h,p,x,w),v(t,c,S,b?_:c+4),u(t.position,t.distance,c,h,p,x,w),d(t.normals,c,Object(r.i)(a[1],-a[0])),f(t.direction,c,Object(r.j)(a)),c+=4),h=x,p=w,m=S}t.elements.offset=c}function c(t,e,n,s,c,u){var d=t.elements.offset,f=Object(i.a)(e-2,e),_=Object(i.a)(e-1,e),y=n[_],g=s[_],b=c?c[f]:1,x=c?c[_]:0;Object(r.f)(o,n[f],s[f],y,g);for(var w=o[0],S=o[1],I=0;I<e;I++){var j=Object(i.a)(I,e),O=I===e-1,M=n[j],P=s[j],L=c?c[j]:O?0:1;Object(r.c)(a,y,g,M,P);var T=a[1],k=-a[0];0!==b&&(0===x?(o[0]=w,o[1]=S):l(o,w,S,T,k),Object(r.a)(a,w,S,o[0],o[1]),v(t,d,0,0),h(t.position,t.distance,d,y,g,u),p(t.normals,d,Object(r.j)(o),Object(r.j)(a)),m(t.direction,d),d+=4),y=M,g=P,b=x,x=L,w=T,S=k}t.elements.offset=d}function l(t,e,n,i,r){var o,a,s;e*i+n*r>0?(o=e+i,a=n+r,s=1/Math.sqrt(o*o+a*a),t[0]=o*s,t[1]=a*s):(a=e-i,0!=(o=r-n)&&0!==a?(s=1/Math.sqrt(o*o+a*a),t[0]=o*s,t[1]=a*s):(t[0]=0,t[1]=0))}function u(t,e,n,i,r,o,a){t[n*=8]=i,t[n+1]=r,t[n+2]=0,e[n]=0,t[n+8]=i,t[n+9]=r,t[n+10]=0,e[n+8]=-32767,t[n+16]=o,t[n+17]=a,t[n+18]=0,e[n+16]=-32767,t[n+24]=o,t[n+25]=a,t[n+26]=0,e[n+24]=0}function d(t,e,n){t[e*=8]=n,t[e+1]=127,t[e+8]=n,t[e+9]=127,t[e+16]=n,t[e+17]=127,t[e+24]=n,t[e+25]=127}function f(t,e,n){t[e*=8]=n,t[e+1]=0,t[e+8]=n,t[e+9]=0,t[e+16]=n,t[e+17]=0,t[e+24]=n,t[e+25]=0}function h(t,e,n,i,r,o){t[n*=8]=i,t[n+1]=r,t[n+2]=0,e[n]=32767,t[n+8]=i,t[n+9]=r,t[n+10]=0,e[n+8]=-32767,t[n+16]=i,t[n+17]=r,t[n+18]=o,e[n+16]=-32767,t[n+24]=i,t[n+25]=r,t[n+26]=o,e[n+24]=32767}function p(t,e,n,i){t[e*=8]=n,t[e+1]=i,t[e+8]=n,t[e+9]=i,t[e+16]=n,t[e+17]=i,t[e+24]=n,t[e+25]=i}function m(t,e){t[e*=8]=0,t[e+1]=127,t[e+8]=0,t[e+9]=127,t[e+16]=0,t[e+17]=127,t[e+24]=0,t[e+25]=127}function v(t,e,n,i){var r=t.indices.buffer,o=t.indices.offset;r[o++]=e,r[o++]=e+1,r[o++]=e+3,r[o++]=e+3,r[o++]=e+1,r[o++]=e+2,0!==n&&(r[o++]=e+2,r[o++]=i+1,r[o++]=i+0),t.indices.offset=o}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(t){void 0===t&&(t=0),this.index=t,this.keysMap={}}return t.prototype.getIndex=function(){var t=this.index;return this.index+=1,t},t.prototype.getUniqueIndex=function(t){return void 0===this.keysMap[t]&&(this.keysMap[t]=this.index,this.index+=1),this.keysMap[t]},t.prototype.getIndexedKeys=function(){return this.keysMap},t}()},function(t,e,n){"use strict";n.d(e,"d",(function(){return s})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return d})),n.d(e,"a",(function(){return f}));var i=n(1),r=n(9),o=n(68),a={db_id:"id",db_hidden_by_plan_building_id:"hiddenByPlanBuildingId",tech_db_beginning_is_cut:"beginningIsCut",tech_db_ending_is_cut:"endingIsCut",tech_db_previous_point_x:"previousPointX",tech_db_previous_point_y:"previousPointY",tech_db_next_point_x:"nextPointX",tech_db_next_point_y:"nextPointY",tech_db_object_length:"objectLength",tech_db_component_distance_start:"componentDistanceStart",db_label_priority:"labelPriority",db_label2_priority:"label2Priority",db_icon_priority:"iconPriority",tech_db_component_distance_end:"componentDistanceEnd"},s=function(t){var e;return null!==(e=a[t])&&void 0!==e?e:t},c={objectClass:"db_object_class",sublayer:"db_sublayer"};function l(t){var e;return null!==(e=c[t])&&void 0!==e?e:t}var u={Class:"db_class",DisputePosition:"db_dispute_position",ObjectClass:"db_object_class",ParkingType:"db_parking_type",Sublayer:"db_sublayer",Subsublayer:"db_subsublayer"},d=function(t){var e,n,i;t.enumerationValues?t.enumerationValues=Object.keys(t.enumerationValues).reduce((function(e,n){return e[function(t){var e;return null!==(e=u[t])&&void 0!==e?e:t}(n)]=t.enumerationValues[n],e}),{}):t.enumerationValues={db_class:null!==(e=t.classes)&&void 0!==e?e:{},db_object_class:null!==(n=t.objectClasses)&&void 0!==n?n:{},db_sublayer:null!==(i=t.sublayers)&&void 0!==i?i:{}}},f=function(){function t(t,e){this.modules=t,this.options=e,this.id=Object(o.a)(),this.type="terrain",this.sourceAttrs={}}return t.prototype.fetchTile=function(t,e){var n=this.modules,i=n.assetManager,o=n.map;return n.workers.parser.fetchTile({coords:t,tileServer:this.options.tileServer,tileSet:this.options.tileSet,tileProtocol:this.options.tileProtocol,subdomains:this.options.subdomains,tileKey:this.options.tileKey,appId:this.options.appId,lang:e.lang,defaultLang:this.options.defaultLang,sessionId:this.options.sessionId}).then((function(n){if(n){var a=n.metadata,s=n.invalidTileKey;return a.forEach((function(n){i.loadMetatile(n.metatileHash,n.regionId),o.emit("tileload",{tileCoords:t,regionId:n.regionId}),Object(r.m)(n.regionId)&&e.shownRegionIds.add(n.regionId)})),s&&o.emit("invalidtilekey"),a}}))},t.prototype.generateTile=function(t,e,n,o,a){return void 0===a&&(a={}),this.modules.workers.parser.generateTile(Object(i.a)({styleId:t.handyStyleId,tileInfo:Object(r.e)(e),pixelRatio:o,selectedIds:n,styleState:t.styleState,floorsEnabled:t.floorsEnabled,disableCommercialPoi:t.disableCommercialPoi},a))},t.prototype.abortTileFetch=function(t){this.modules.workers.parser.abortTileRequest(Object(r.c)(t))},t.prototype.deleteTile=function(t){this.modules.workers.parser.deleteTile(Object(r.c)(t))},t.prototype.setAttributes=function(t){this.sourceAttrs=t},t.prototype.getAttributes=function(){return this.sourceAttrs},t.prototype.destroy=function(){},t}()},function(t,e,n){"use strict";t.exports=r;var i=n(102);function r(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}r.Varint=0,r.Fixed64=1,r.Bytes=2,r.Fixed32=5;var o="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function a(t){return t.type===r.Bytes?t.readVarint()+t.pos:t.pos+1}function s(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function c(t,e,n){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(i);for(var r=n.pos-1;r>=t;r--)n.buf[r+i]=n.buf[r]}function l(t,e){for(var n=0;n<t.length;n++)e.writeVarint(t[n])}function u(t,e){for(var n=0;n<t.length;n++)e.writeSVarint(t[n])}function d(t,e){for(var n=0;n<t.length;n++)e.writeFloat(t[n])}function f(t,e){for(var n=0;n<t.length;n++)e.writeDouble(t[n])}function h(t,e){for(var n=0;n<t.length;n++)e.writeBoolean(t[n])}function p(t,e){for(var n=0;n<t.length;n++)e.writeFixed32(t[n])}function m(t,e){for(var n=0;n<t.length;n++)e.writeSFixed32(t[n])}function v(t,e){for(var n=0;n<t.length;n++)e.writeFixed64(t[n])}function _(t,e){for(var n=0;n<t.length;n++)e.writeSFixed64(t[n])}function y(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function g(t,e,n){t[n]=e,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function b(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}r.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){for(n=n||this.length;this.pos<n;){var i=this.readVarint(),r=i>>3,o=this.pos;this.type=7&i,t(r,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=y(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=b(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=y(this.buf,this.pos)+4294967296*y(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=y(this.buf,this.pos)+4294967296*b(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=i.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=i.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,i=this.buf;return e=127&(n=i[this.pos++]),n<128?e:(e|=(127&(n=i[this.pos++]))<<7,n<128?e:(e|=(127&(n=i[this.pos++]))<<14,n<128?e:(e|=(127&(n=i[this.pos++]))<<21,n<128?e:function(t,e,n){var i,r,o=n.buf;if(i=(112&(r=o[n.pos++]))>>4,r<128)return s(t,i,e);if(i|=(127&(r=o[n.pos++]))<<3,r<128)return s(t,i,e);if(i|=(127&(r=o[n.pos++]))<<10,r<128)return s(t,i,e);if(i|=(127&(r=o[n.pos++]))<<17,r<128)return s(t,i,e);if(i|=(127&(r=o[n.pos++]))<<24,r<128)return s(t,i,e);if(i|=(1&(r=o[n.pos++]))<<31,r<128)return s(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(n=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&o?function(t,e,n){return o.decode(t.subarray(e,n))}(this.buf,e,t):function(t,e,n){for(var i="",r=e;r<n;){var o,a,s,c=t[r],l=null,u=c>239?4:c>223?3:c>191?2:1;if(r+u>n)break;1===u?c<128&&(l=c):2===u?128==(192&(o=t[r+1]))&&(l=(31&c)<<6|63&o)<=127&&(l=null):3===u?(o=t[r+1],a=t[r+2],128==(192&o)&&128==(192&a)&&((l=(15&c)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===u&&(o=t[r+1],a=t[r+2],s=t[r+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,u=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),r+=u}return i}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==r.Bytes)return t.push(this.readVarint(e));var n=a(this);for(t=t||[];this.pos<n;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==r.Bytes)return t.push(this.readSVarint());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==r.Bytes)return t.push(this.readBoolean());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==r.Bytes)return t.push(this.readFloat());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==r.Bytes)return t.push(this.readDouble());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed32());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed32());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed64());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed64());var e=a(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===r.Varint)for(;this.buf[this.pos++]>127;);else if(e===r.Bytes)this.pos=this.readVarint()+this.pos;else if(e===r.Fixed32)this.pos+=4;else{if(e!==r.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var n=new Uint8Array(e);n.set(this.buf),this.buf=n,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),g(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),g(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),g(this.buf,-1&t,this.pos),g(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),g(this.buf,-1&t,this.pos),g(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var n,i;if(t>=0?(n=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(n=~(-t%4294967296))?n=n+1|0:(n=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}(n,0,e),function(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,n){for(var i,r,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!r){i>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):r=i;continue}if(i<56320){t[n++]=239,t[n++]=191,t[n++]=189,r=i;continue}i=r-55296<<10|i-56320|65536,r=null}else r&&(t[n++]=239,t[n++]=191,t[n++]=189,r=null);i<128?t[n++]=i:(i<2048?t[n++]=i>>6|192:(i<65536?t[n++]=i>>12|224:(t[n++]=i>>18|240,t[n++]=i>>12&63|128),t[n++]=i>>6&63|128),t[n++]=63&i|128)}return n}(this.buf,t,this.pos);var n=this.pos-e;n>=128&&c(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),i.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),i.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n<e;n++)this.buf[this.pos++]=t[n]},writeRawMessage:function(t,e){this.pos++;var n=this.pos;t(e,this);var i=this.pos-n;i>=128&&c(n,i,this),this.pos=n-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,n){this.writeTag(t,r.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,l,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,u,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,d,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,f,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,p,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,_,e)},writeBytesField:function(t,e){this.writeTag(t,r.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,r.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,r.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,r.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(t,e,n){"use strict";n.r(e),n.d(e,"sinks",(function(){return d})),n.d(e,"generateStretchableImage",(function(){return f}));var i=n(38),r=n(6);function o(t,e){var n=t.reduce((function(t,e){return t.concat(e)}),[0]).concat(e),i=n.length-1;return{coords:n.slice(n[0]===n[1]?1:0,n[i-1]===n[i]?i:i+1),isOddStretchable:a(t)}}function a(t){var e;return!(null===(e=null==t?void 0:t[0])||void 0===e?void 0:e[0])}function s(t){var e=t.coords;if(e.length<2)throw new Error("The source coords array must have at least two coordinates");var n=e[e.length-1]+2*r.a;return e.map((function(t,i){return(t+r.a*(0===i?0:i===e.length-1?2:1))/n}))}function c(t,e){for(var n=function(t){var e=t.coords,n=t.isOddStretchable;if(e.length<2)throw new Error("An axis must have at least two coordinates");if(2===e.length)return{stretchSize:e[e.length-1],fixSize:0};for(var i=0,r=n?0:1;r<e.length-1;r+=2)i+=e[r+1]-e[r];return{stretchSize:i,fixSize:e[e.length-1]-i}}(t),i=n.stretchSize,r=n.fixSize,o=t.coords,a=t.isOddStretchable,s=e<r?r:e,c=[o[0]],l=1;l<o.length;l++){var u=o[l-1],d=o[l],f=l%2==(a?1:0),h=c[c.length-1];f?c.push(Math.round((s-r)*(d-u)/i)+h):c.push(h+d-u)}return c}function l(t,e){void 0===e&&(e=0);var n=t[t.length-1]-t[0];return t.map((function(t){return Math.round(t-n/2+e)}))}function u(t){return t.map((function(t){return t*window.devicePixelRatio}))}var d={fill:{stride:16,binder:function(t,e){t.position=new Uint16Array(e),t.vrtxOffset=new Int16Array(e,4),t.txtrCoords=new Uint16Array(e,8),t.localID=new Uint32Array(e,12)},packObjectAttributes:function(t,e,n){return[n,t,e]},unpackObjectAttributes:function(t){return{textureIndex:t[0],styleId:t[1],layerId:t[2]}}}};function f(t,e,n,i,r,a,f){var m=n.style,v=m.offset,_=m.stretchX,y=m.stretchY,g=m.sourceSize,b=m.targetSize,x=t.idIndexer.getIndex(r[i.id],e,n,r[i.db_sublayer]),w=t.getBucket("stretchableImage","fill",d.fill.packObjectAttributes(e,n.innerId,a),d.fill.binder),S=function(t,e,n){var i=t[0],r=t[1];return void 0===e&&(e=[]),void 0===n&&(n=[]),{x:o(e,i),y:o(n,r)}}(g,_,y);!function(t,e,n,i,r){for(var o=e[0],a=e[1],s=n[0],c=n[1],l=i[0],u=i[1],d=t.elements.offset,f=o.length,m=a.length,v=0;v<f-1;v++)for(var _=o[v],y=o[v+1],g=s[v],b=s[v+1],x=0;x<m-1;x++){var w=a[x],S=a[x+1],I=c[x],j=c[x+1];p(t.indices,d,0,1,2,2,1,3),h(t,d++,l,u,g,I,_,w,r),h(t,d++,l,u,b,I,y,w,r),h(t,d++,l,u,g,j,_,S,r),h(t,d++,l,u,b,j,y,S,r)}t.elements.offset=d}(w,function(t){var e=t.x,n=t.y;return[s(e),s(n)]}(S),function(t,e){var n=t.x,i=t.y,r=e.targetSize,o=r[0],a=r[1],s=e.offset;return[u(l(c(n,o),s&&s[0])),u(l(c(i,a),s&&s[1]))]}(S,{targetSize:b,offset:v}),f,x)}function h(t,e,n,r,o,a,s,c,l){e*=8,t.position[e]=n,t.position[e+1]=r,t.vrtxOffset[e]=o,t.vrtxOffset[e+1]=-a,t.txtrCoords[e]=Object(i.c)(s),t.txtrCoords[e+1]=Object(i.c)(c),e>>=1,t.localID[e]=l}function p(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+n,c[l+1]=e+i,c[l+2]=e+r,c[l+3]=e+o,c[l+4]=e+a,c[l+5]=e+s,t.offset=l+6}},function(t,e,n){"use strict";n.r(e),n.d(e,"sinks",(function(){return r})),n.d(e,"generateRectWithTexture",(function(){return o}));var i=n(38),r={fill:{stride:8,binder:function(t,e){t.position=new Uint16Array(e),t.txtrCoords=new Uint16Array(e,4)},packObjectAttributes:function(t,e,n){return[t,e,n]},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],textureIndex:t[2]}}}},o=function(t,e,n,i,o){var s=e[0],c=e[1],l=t.getBucket(i.type,"fill",r.fill.packObjectAttributes(n,i.innerId,o),r.fill.binder),u=l.elements.offset;!function(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+0,c[l+1]=e+1,c[l+2]=e+2,c[l+3]=e+2,c[l+4]=e+1,c[l+5]=e+3,t.offset=l+6}(l.indices,u),a(l,u++,s[0],c[0],0,1),a(l,u++,s[1],c[1],1,1),a(l,u++,s[2],c[2],0,0),a(l,u++,s[3],c[3],1,0),l.elements.offset=u};function a(t,e,n,r,o,a){e*=4,t.position[e]=n,t.position[e+1]=r,t.txtrCoords[e]=Object(i.c)(o),t.txtrCoords[e+1]=Object(i.c)(a)}},function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return c}));var i=n(0),r=n(35),o=[0,0];function a(t,e,n,a,s,c){var u=s.style,d=u.textLineHeight,f=u.textLetterSpacing;c===r.LabelIndex.Icon&&(d=s.style.iconTextLineHeight,f=s.style.iconTextLetterSpacing);for(var h=e.identifyPoiLabelIndex,p=a.lines,m=(a.maxWidth,d*i.fonts.baseSize),v=function(t,e,n){return 1&n?e*(n>>1):e/2+e*(n-1>>1)}(0,m,p.length),_=0;_<p.length;_++){var y;y=-p[_].width/2,o[0]=y,o[1]=v;for(var g=p[_].glyphs,b=0;b<g.length;b++){var x=g[b];void 0!==x.bitmap&&l(t[x.range],n,o,x,h),o[0]+=x.advance+i.fonts.baseSize*f}v-=m}}function s(t,e,n,i,r,o,a){var s=n[1]+i.top,c=n[0]+i.left,l=s-i.height,u=c+i.width,f=Math.sin(r),p=Math.cos(r),m=c*p-s*f,v=c*f+s*p,_=u*p-s*f,y=u*f+s*p,g=c*p-l*f,b=c*f+l*p,x=u*p-l*f,w=u*f+l*p,S=t.elements.offset;d(t,e,m,v,i.texLeft,i.texTop,o,a),d(t,e,_,y,i.texRight,i.texTop,o,a),d(t,e,g,b,i.texLeft,i.texBottom,o,a),d(t,e,x,w,i.texRight,i.texBottom,o,a),h(t.indices,S,1,0,3,2,3,0)}function c(t,e,n){var i=t.elements.offset,r=127*Math.cos(n),o=127*Math.sin(n);f(t,e,r,o,-1,-1),f(t,e,r,o,1,-1),f(t,e,r,o,1,1),f(t,e,r,o,-1,1),h(t.indices,i,0,1,2,2,3,0)}function l(t,e,n,i,r){var o=n[1]+i.top,a=n[0]+i.left,s=o-i.height,c=a+i.width,l=t.elements.offset;u(t,e,a,o,i.texLeft,i.texTop,r),u(t,e,c,o,i.texRight,i.texTop,r),u(t,e,a,s,i.texLeft,i.texBottom,r),u(t,e,c,s,i.texRight,i.texBottom,r),h(t.indices,l,1,0,3,2,3,0)}function u(t,e,n,i,r,o,a){var s=t.elements,c=s.stride*s.offset>>1,l=c>>1;t.position[c]=e[0],t.position[c+1]=e[1],t.position[c+2]=e[2],t.cornerOffset[c]=n,t.cornerOffset[c+1]=i,t.texCoords[c]=r,t.texCoords[c+1]=o,t.localID[l]=a,s.offset++}function d(t,e,n,i,r,o,a,s){var c=t.elements,l=c.stride*c.offset>>1;t.position[l]=e[0],t.position[l+1]=e[1],t.position[l+2]=e[2],t.texCoords[l]=r,t.texCoords[l+1]=o,l>>=1,t.cornerOffset[l]=n,t.cornerOffset[l+1]=i,t.styleZoomLimits[l]=a,t.styleZoomLimits[l+1]=s,c.offset++}function f(t,e,n,i,r,o){var a=t.elements,s=a.stride*a.offset/2;t.position[s]=e[0],t.position[s+1]=e[1],t.direction[s]=n,t.direction[s+1]=i,t.widenDirection[s]=r,t.widenDirection[s+1]=o,a.offset++}function h(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+n,c[l+1]=e+i,c[l+2]=e+r,c[l+3]=e+o,c[l+4]=e+a,c[l+5]=e+s,t.offset=l+6}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=1;function r(){return i++}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=function(){},r=function(){function t(t,e){void 0===e&&(e=i),this.queue=[],this.data={},this.size=t,this.onRemove=e}return t.prototype.add=function(t,e){this.data[t]||(this.queue.push(t),this.data[t]=e,this.shrink(this.size))},t.prototype.remove=function(t){this.data[t]&&(this.queue.splice(this.queue.indexOf(t),1),delete this.data[t])},t.prototype.get=function(t){var e=this.data[t];return e&&(this.queue.splice(this.queue.indexOf(t),1),this.queue.push(t)),e},t.prototype.reset=function(){this.shrink(0)},t.prototype.setSize=function(t){this.size=t,this.shrink(t)},t.prototype.getSize=function(){return this.size},t.prototype.keys=function(){return this.queue},t.prototype.getData=function(){var t=this;return Object.keys(this.data).map((function(e){return t.data[e]}))},t.prototype.shrink=function(t){for(;this.queue.length>t;){var e=this.queue.shift(),n=this.data[e];delete this.data[e],this.onRemove(e,n)}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s}));var i=n(1),r=n(18),o=n(40),a=function(t){function e(){var e=t.call(this)||this;return e.workers=new Map,e}return Object(i.c)(e,t),e.prototype.addWorker=function(t,e){var n=this;this.workers.set(t,e),e.addEventListener("message",(function(e){var i=e.data,r=i.to,o=i.msg,a=i.transferable,s={from:t,to:r,msg:o,transferable:a};n.routeMessage(s)}))},e.prototype.send=function(t,e,n){var i=this.workers.get(t);if(i){var o={to:t,from:r.b.Main,msg:e,transferable:n};void 0!==n?i.postMessage(o,n):i.postMessage(o)}},e.prototype.broadcast=function(t){this.workers.forEach((function(e,n){var i={to:n,from:r.b.Main,msg:t};e.postMessage(i)}))},e.prototype.routeMessage=function(t){var e=t.from,n=t.to,i=t.transferable,o=t.msg.type;if(n===r.b.Main)this.emit("message",t);else if(n===r.b.All)e!==r.b.Main&&this.emit(o,t),this.workers.forEach((function(n,r){r!==e&&(void 0!==i?n.postMessage(t,i):n.postMessage(t))}));else{var a=this.workers.get(n);a&&(void 0!==i?a.postMessage(t,i):a.postMessage(t))}},e}(o.a),s=function(t){function e(e){var n=t.call(this)||this;return n.worker=e,e.addEventListener("message",(function(t){var e=t.data;n.emit("message",e)})),n}return Object(i.c)(e,t),e.prototype.send=function(t,e,n){var i={to:t,msg:e,transferable:n};this.worker.postMessage(i,n)},e.prototype.broadcast=function(t){var e={to:r.b.All,msg:t};this.worker.postMessage(e)},e}(o.a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(18),r=function(){function t(t){var e=this;this.onMessage=function(t){var n=t.from,r=t.msg;switch(r.type){case i.a.FunctionUse:e.onFunctionUse(r,n);break;case i.a.FunctionResult:e.onFunctionResult(r)}},this.connector=t,this.functions=new Map,this.functionIdCounter=0,this.pendingFunctions=new Map,t.on("message",this.onMessage)}return t.prototype.set=function(t,e){this.functions.set(t,e)},t.prototype.get=function(t,e){var n=this;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var a=n.functionIdCounter++,s=new Promise((function(t){n.pendingFunctions.set(a,t)})),c={type:i.a.FunctionUse,data:{id:a,name:e,args:r}};return n.connector.send(t,c),s}},t.prototype.onFunctionUse=function(t,e){var n=this,i=t.data,r=i.name,o=i.args,a=i.id,s=this.functions.get(r);if(s){var c=s.apply(void 0,o);c&&c.then?Promise.resolve(c).then((function(t){return n.sendFunctionResult(e,a,t)})):this.sendFunctionResult(e,a,c)}else console.error("FnRegistry#onFunctionUse: function "+r+" not found")},t.prototype.sendFunctionResult=function(t,e,n){var r={type:i.a.FunctionResult,data:{id:e,result:n}};n&&n.transferable?this.connector.send(t,r,n.transferable):this.connector.send(t,r)},t.prototype.onFunctionResult=function(t){var e=t.data,n=e.id,i=e.result,r=this.pendingFunctions.get(n);r?(r(i),this.pendingFunctions.delete(n)):console.error("FnRegistry#onFunctionResult: pending function "+n+" not found")},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(9),r=n(52),o=function(){function t(t){this.dataType=t,this.pendingRequests=new Map}return t.prototype.fetch=function(t,e){var n=this;return new Promise((function(o){var a=e(t),s=Object(i.c)(t),c=("json"===n.dataType?r.b:r.a)({url:a},(function(t,e){if(n.pendingRequests.delete(s),void 0!==t)return 204!==t.status&&console.error(t),void o(void 0);o(e)}));n.pendingRequests.set(s,{xhr:c,resolve:o})}))},t.prototype.destroy=function(){var t=this;this.pendingRequests.forEach((function(e,n){t.abortRequest(n)}))},t.prototype.abortRequest=function(t){var e=this.pendingRequests.get(t);void 0!==e&&(e.xhr.abort(),e.resolve(void 0),this.pendingRequests.delete(t))},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var i=n(15),r=function(){function t(t,e){this.offset=0,this.stride=e,this.buffer=new ArrayBuffer(t),this.view=new Int32Array(this.buffer),this.comittedOffsets=0,this.watermark=t/e*.8}return t.prototype.extend=function(){var t=2*this.buffer.byteLength;this.watermark=t/this.stride*.8;var e=new ArrayBuffer(t),n=new Int32Array(e);return n.set(this.view),this.buffer=e,this.view=n,e},t}(),o=function(){function t(t){this.offset=0,this.buffer=new Int32Array(t),this.comittedOffsets=0,this.watermark=.8*t}return t.prototype.extend=function(){var t=2*this.buffer.length;this.watermark=.8*t;var e=new Int32Array(t);e.set(this.buffer),this.buffer=e},t}(),a=function(){function t(t,e,n,a){var s="buildingModel"!==t?67200:336e3,c=Object(i.e)(t,e);this.elements=new r(s,c),this.indices=new o(2*s/c),this.binder=a,a(this,this.elements.buffer),this.attributes=n}return t.prototype.resetOffsets=function(){this.elements.offset=0,this.elements.comittedOffsets=0,this.indices.offset=0,this.indices.comittedOffsets=0},t.prototype.commit=function(){this.elements.comittedOffsets=this.elements.offset,this.indices.comittedOffsets=this.indices.offset},t.prototype.rollback=function(){this.elements.offset=this.elements.comittedOffsets,this.indices.offset=this.indices.comittedOffsets},t.prototype.checkWatermarks=function(){var t=0,e=this.elements;e.offset>e.watermark&&(e.offset>=e.buffer.byteLength/e.stride&&(t=1),this.binder(this,e.extend()));var n=this.indices;return n.offset>n.watermark&&(n.offset>=n.buffer.length&&(t=1),n.extend()),t},t}(),s=n(47),c=n(76),l=n(0),u=n(60),d=function(){function t(){this.packer=new c.a(l.atlasSize[0],l.atlasSize[1]),this.currentAtlasIndex=0,this.packedRasters=[],this.rastersToLoad=[],this.newRasterSets=new Map}return t.prototype.addNewRasterSet=function(t,e){var n=this.newRasterSets.get(t);n||(n=[],this.newRasterSets.set(t,n)),n.push(e)},t.prototype.pack=function(t,e,n){t.isSvg?this.packSvg(t,e.map((function(t){return{w:t,h:t}})),n):this.packPng(t,e,n)},t.prototype.packSvg=function(t,e,n){for(var i=t.rasters,r=new Set,o=0,a=i;o<a.length;o++){var s=a[o],u=s.w,d=s.h;r.add(u+"_"+d)}for(var f=0,h=e;f<h.length;f++){var p=h[f];if(u=p.w*n,d=p.h*n,!r.has(u+"_"+d)){var m=this.packer.packOne(u+2,d+2);null===m&&(this.packer=new c.a(l.atlasSize[0],l.atlasSize[1]),this.currentAtlasIndex++,m=this.packer.packOne(u+2,d+2));var v=i.length,_={rasterSetIndex:t.index,rasterIndex:v,w:u,h:d,x:m.x+1,y:m.y+1,anchorX:t.anchorX,anchorY:t.anchorY,atlasIndex:this.currentAtlasIndex,isPacked:!0};i.push(_),this.packedRasters.push(t.index,v,_.x,_.y,_.w,_.h,this.currentAtlasIndex)}}},t.prototype.addRastersToLoad=function(t,e){this.rastersToLoad.push(t,e.rasterSetIndex,e.rasterIndex)},t.prototype.getNewRasterSets=function(){var t=this.newRasterSets;return this.newRasterSets=new Map,t},t.prototype.getPackedRasters=function(){if(0!==this.packedRasters.length){var t=new Uint16Array(this.packedRasters);return this.packedRasters=[],t}},t.prototype.getRastersToLoad=function(){var t=new Float64Array(this.rastersToLoad);return this.rastersToLoad=[],t},t.prototype.packPng=function(t,e,n){for(var i=t.rasters,r=0,o=e;r<o.length;r++){var a=o[r]*n,s=Object(u.c)(i,a,!1);if(void 0!==s){var d=t.rasters[s];if(!d.isPacked){var f=this.packer.packOne(d.w+2,d.h+2);null===f&&(this.packer=new c.a(l.atlasSize[0],l.atlasSize[1]),this.currentAtlasIndex++,f=this.packer.packOne(d.w+2,d.h+2)),d.x=f.x+1,d.y=f.y+1,d.atlasIndex=this.currentAtlasIndex,d.isPacked=!0,this.packedRasters.push(t.index,s,d.x,d.y,d.w,d.h,this.currentAtlasIndex)}}}},t}(),f=n(23),h=n(90),p=function(){function t(t){this.atlasPacker=new d,this.geoIds=new Uint32Array(0),this.floorHidingMap=new h.a,this.buckets={},this.addedBuckets=[],this.labels=[],this.idIndexer=new s.a(t),this.reset()}return t.prototype.reset=function(){this.buckets={},this.addedBuckets=[],this.geoIds=new Uint32Array(0),this.floorHidingMap.clear(),this.labels=[]},t.prototype.addLabel=function(t){this.labels.push(t)},t.prototype.getBucket=function(t,e,n,i){var r=this.buckets[t];void 0===r&&(r=this.buckets[t]={});var o=r[e];void 0===o&&(o=r[e]=[]);for(var s=o.length-1;s>=0;s--){var c=o[s];if(Object(f.a)(n,c.attributes))return this.addedBuckets.push(c),c}var l=new a(t,e,n,i);return o.push(l),this.addedBuckets.push(l),l},t.prototype.isOverloaded=function(){for(var t=this.addedBuckets,e=0,n=0;n<t.length;)e+=t[n++].checkWatermarks();var i=e>0;if(i)for(;n--;)t[n].rollback();else for(;n--;)t[n].commit();return t.length=0,i},t.prototype.setGeoIds=function(t){this.geoIds=t},t.prototype.addFloorHidingMap=function(t,e){var n=this.floorHidingMap.get(e);void 0===n&&(n=[]),n.push(t[0],t[1]),this.floorHidingMap.set(e,n)},t.prototype.getAccumulatedData=function(){var t=this.buckets,e=[],n=[];for(var r in t){var o=r,a=t[o];if(a)for(var s in a){var c=s,l=a[c];if(l){for(var u=Object(i.e)(o,c)/4,d=0,f=0;f<l.length;f++)d+=l[f].indices.offset;if(0!==d){var h=[],p=new Int32Array(d*u),m=0;for(f=0;f<l.length;f++){var v=l[f],_=v.elements,y=v.indices,g=v.attributes,b=_.view,x=y.buffer;if(0!==_.offset){for(var w=m,S=0;S<y.offset;S++)for(var I=x[S]*u,j=0;j<u;j++)p[m++]=b[I+j];h.push({attributes:g,rangeStart:4*w,rangeEnd:4*m}),v.resetOffsets()}}e.push({symbol:o,sink:c,buffer:p.buffer,generatedObjects:h}),n.push(p.buffer)}}}}var O=this.idIndexer.getPacked();n.push(O.idBuffer,O.phaseBuffer);var M=this.atlasPacker.getPackedRasters();void 0!==M&&n.push(M.buffer);var P=this.atlasPacker.getRastersToLoad();n.push(P.buffer);var L=new Uint32Array(this.geoIds);n.push(L.buffer);var T=this.floorHidingMap.serialize();this.floorHidingMap.clear();var k=this.labels;return this.labels=[],{data:e,labels:k,geoIds:L,floorHidingMap:T,packedRasters:M,rastersToLoad:P,identifyIds:O,transferable:n}},t}()},function(t,e,n){"use strict";n.r(e),n.d(e,"sinks",(function(){return p})),n.d(e,"generatePolygonExtrusion",(function(){return m}));var i=n(36),r=n(10),o=n(25),a=n(86),s=n(61),c=n(59),l=n(47),u=n(23),d=[NaN,NaN],f=function(t,e,n,i,r,o,a){return Object(u.c)([t,e,n[0],n[1]],i,r,o,a)};function h(t){return{styleId:t[0],layerId:t[1],hiddenObjectId:Number.isNaN(t[2])?void 0:Object(o.a)(t[2],t[3]),tileData:t.slice(4)}}var p={sideFill:{stride:16,binder:function(t,e){t.position=new Uint16Array(e),t.normal=new Uint16Array(e,8),t.localID=new Uint32Array(e,12)},packObjectAttributes:f,unpackObjectAttributes:h},topFill:{stride:16,binder:function(t,e){t.position=new Uint16Array(e),t.normal=new Uint16Array(e,8),t.localID=new Uint32Array(e,12)},packObjectAttributes:f,unpackObjectAttributes:h},sideStroke:{stride:16,binder:function(t,e){t.position=new Uint16Array(e),t.distance=new Int16Array(e,6),t.normals=new Uint16Array(e,8),t.direction=new Uint16Array(e,12)},packObjectAttributes:f,unpackObjectAttributes:h},topStroke:{stride:12,binder:function(t,e){t.position=new Uint16Array(e),t.directionDistance=new Int8Array(e,8)},packObjectAttributes:f,unpackObjectAttributes:h}},m=function(t,e,n,o,u,h,m,y,g,b,x){var w,S=g[0],I=g[1],j=g[2],O=S.length,M=y[m.hovered],P=Math.round(Object(r.o)(y[m.db_height])),L=y[m.id],T=M?l.b:t.idIndexer.getIndex(L,e,n,y[m.db_sublayer]),k=!Number.isNaN(L)&&x&&x.has(L)?L:d,z=f(e,n.innerId,k,n.dataKeys,m,y,h);P>0&&(w=t.getBucket("polygonExtrusion","sideFill",z,p.sideFill.binder),Object(a.a)(w,O,S,I,j,P,T),w=t.getBucket("polygonExtrusion","sideStroke",z,p.sideStroke.binder),b&&(Object(s.a)(w,O,S,I,j),Object(s.b)(w,O,S,I,j,P))),function(t,e,n,i,r,o){var a=t.elements.offset,s=a;v(t,a++,n[0],i[0],r,o),v(t,a++,n[1],i[1],r,o);for(var c=2;c<e;c++)_(t,s,c),v(t,a++,n[c],i[c],r,o);t.elements.offset=a}(w=t.getBucket("polygonExtrusion","topFill",z,p.topFill.binder),O,S,I,P,T),function(t,e,n,r,o,a){for(var s=0;s<e;s++){var l=Object(i.a)(s,e);if(o&&1===o[l]){var u=Object(i.a)((s+1)%e,e);Object(c.a)(t,n[l],r[l],a,n[u],r[u],a)}}}(w=t.getBucket("polygonExtrusion","topStroke",z,p.topStroke.binder),O,S,I,j,P)};function v(t,e,n,i,r,o){e*=8,t.position[e]=n,t.position[e+1]=i,t.position[e+2]=r,t.normal[e]=0,t.normal[e+1]=127,e>>=1,t.localID[e]=o}function _(t,e,n){var i=t.indices.buffer,r=t.indices.offset;n%2==0?(i[r++]=e+n-2,i[r++]=e+n-1,i[r++]=e+n):(i[r++]=e+n-1,i[r++]=e+n-2,i[r++]=e+n),t.indices.offset=r}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(28),r=n(2),o=n(12),a=n(24),s=new Map,c=function(t,e,n,c,l,u){switch(this.groupPriority=0,this.labelingGroup=a.p,this.marginTopBottom=0,this.marginLeftRight=0,this.type=e,this.label=t,this.layer=t.layer,this.id=t.id+"_"+e+"_"+Math.floor(n[0]/1e3)+"_"+Math.floor(n[1]/1e3),this.anchorWorld=i.b(n),this.anchorWorld[2]*=c.buildingHeight,this.anchorScreen=[0,0],Object(r.y)(this.anchorScreen,this.anchorWorld,l,c.size,c.viewport),this.anchorPosition=0,this.anchorSegmentIndex=0,this.halfLabelWidth=0,this.itemPriority=e===o.d.Icon?t.iconPriority:t.labelPriority,t.pointType===o.b.Commercial&&(s.has(this.id)?this.commercialPriority=s.get(this.id):(this.commercialPriority=Math.random(),s.set(this.id,this.commercialPriority))),this.layer.type){case"labelLine":this.labelingGroup=this.layer.style.labelingGroup,this.groupPriority=this.layer.style.textPriority;break;case"oneWayLine":this.labelingGroup=this.layer.style.labelingGroup,this.groupPriority=this.layer.style.priority;break;case"point":e===o.d.PoiText?(this.labelingGroup=this.layer.style.allowOverlap?a.r:this.layer.style.textLabelingGroup,this.groupPriority=this.layer.style.iconImage?Math.min(this.layer.style.textPriority,this.layer.style.iconPriority):this.layer.style.textPriority,this.marginTopBottom=this.layer.style.textLabelingMargin.topBottom,this.marginLeftRight=this.layer.style.textLabelingMargin.leftRight):e===o.d.PoiText2?(this.labelingGroup=this.layer.style.allowOverlap?a.r:this.layer.style.textLabelingGroup2,this.groupPriority=Math.min(this.layer.style.textPriority,this.layer.style.iconPriority),this.marginTopBottom=this.layer.style.textLabelingMargin.topBottom,this.marginLeftRight=this.layer.style.textLabelingMargin.leftRight):(this.labelingGroup=this.layer.style.allowOverlap?a.r:this.layer.style.iconLabelingGroup,this.groupPriority=this.layer.style.iconPriority,this.marginTopBottom=this.layer.style.iconLabelingMargin.topBottom,this.marginLeftRight=this.layer.style.iconLabelingMargin.leftRight)}this.labelingGroupTable=u.labelingGroups.table,this.overflowStyleZoom=-1/0,this.boxes=[],this.placementIndex=0}},function(t,e,n){"use strict";function i(t,e,n){n=n||{},this.w=t||64,this.h=e||64,this.autoResize=!!n.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function r(t,e,n){this.x=0,this.y=t,this.w=this.free=e,this.h=n}function o(t,e,n,i,r,o,a){this.id=t,this.x=e,this.y=n,this.w=i,this.h=r,this.maxw=o||i,this.maxh=a||r,this.refcount=0}e.a=i,i.prototype.pack=function(t,e){t=[].concat(t),e=e||{};for(var n,i,r,o,a=[],s=0;s<t.length;s++)if(n=t[s].w||t[s].width,i=t[s].h||t[s].height,r=t[s].id,n&&i){if(!(o=this.packOne(n,i,r)))continue;e.inPlace&&(t[s].x=o.x,t[s].y=o.y,t[s].id=o.id),a.push(o)}return this.shrink(),a},i.prototype.packOne=function(t,e,n){var i,o,a,s,c,l,u,d,f={freebin:-1,shelf:-1,waste:1/0},h=0;if("string"==typeof n||"number"==typeof n){if(i=this.getBin(n))return this.ref(i),i;"number"==typeof n&&(this.maxId=Math.max(n,this.maxId))}else n=++this.maxId;for(s=0;s<this.freebins.length;s++){if(e===(i=this.freebins[s]).maxh&&t===i.maxw)return this.allocFreebin(s,t,e,n);e>i.maxh||t>i.maxw||e<=i.maxh&&t<=i.maxw&&(a=i.maxw*i.maxh-t*e)<f.waste&&(f.waste=a,f.freebin=s)}for(s=0;s<this.shelves.length;s++)if(h+=(o=this.shelves[s]).h,!(t>o.free)){if(e===o.h)return this.allocShelf(s,t,e,n);e>o.h||e<o.h&&(a=(o.h-e)*t)<f.waste&&(f.freebin=-1,f.waste=a,f.shelf=s)}return-1!==f.freebin?this.allocFreebin(f.freebin,t,e,n):-1!==f.shelf?this.allocShelf(f.shelf,t,e,n):e<=this.h-h&&t<=this.w?(o=new r(h,this.w,e),this.allocShelf(this.shelves.push(o)-1,t,e,n)):this.autoResize?(c=l=this.h,((u=d=this.w)<=c||t>u)&&(d=2*Math.max(t,u)),(c<u||e>c)&&(l=2*Math.max(e,c)),this.resize(d,l),this.packOne(t,e,n)):null},i.prototype.allocFreebin=function(t,e,n,i){var r=this.freebins.splice(t,1)[0];return r.id=i,r.w=e,r.h=n,r.refcount=0,this.bins[i]=r,this.ref(r),r},i.prototype.allocShelf=function(t,e,n,i){var r=this.shelves[t].alloc(e,n,i);return this.bins[i]=r,this.ref(r),r},i.prototype.shrink=function(){if(this.shelves.length>0){for(var t=0,e=0,n=0;n<this.shelves.length;n++){var i=this.shelves[n];e+=i.h,t=Math.max(i.w-i.free,t)}this.resize(t,e)}},i.prototype.getBin=function(t){return this.bins[t]},i.prototype.ref=function(t){if(1==++t.refcount){var e=t.h;this.stats[e]=1+(0|this.stats[e])}return t.refcount},i.prototype.unref=function(t){return 0===t.refcount?0:(0==--t.refcount&&(this.stats[t.h]--,delete this.bins[t.id],this.freebins.push(t)),t.refcount)},i.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},i.prototype.resize=function(t,e){this.w=t,this.h=e;for(var n=0;n<this.shelves.length;n++)this.shelves[n].resize(t);return!0},r.prototype.alloc=function(t,e,n){if(t>this.free||e>this.h)return null;var i=this.x;return this.x+=t,this.free-=t,new o(n,i,this.y,t,e,t,this.h)},r.prototype.resize=function(t){return this.free+=t-this.w,this.w=t,!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n(32),r=n(2),o=n(9),a=n(0),s=n(27);function c(t,e,n){(function(t,e,n){var r=Object(s.b)(t.type,n,e),o=r-t.zoomLevel;t.zoomDirection===i.b.Stationary&&(o>0?(t.zoomDirection=i.b.ZoomingIn,t.zoomStartZoom=t.zoomLevel):o<0&&(t.zoomDirection=i.b.ZoomingOut,t.zoomStartZoom=t.zoomLevel)),t.zoomLevel=r})(t,e.styleZoom,e.zoom),function(t,e){if(t.zoomLevel<t.minZoomLevel)t.viewportTiles=[];else{var n=Object(r.d)(t.zoomLevel,t.minZoomLevel,t.maxZoomLevel),i=Object(r.d)(t.zoomLevel,t.minDetailLevel,t.maxDetailLevel);t.viewportTiles=Object(o.h)(e,n,i)}}(t,n),function(t){var e=Math.round((Object.keys(t.displayedMods).length+t.viewportTiles.length)*a.tiles.cacheRatio);t.tileModsCacheMaxCount<e&&(t.tileModsCacheMaxCount=e),e>t.tileModsCacheMaxCount/2&&t.tileModsCache.setSize(e)}(t),Object(s.i)(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){this.map={}}return t.prototype.set=function(t,e,n){void 0===this.map[t]&&(this.map[t]={}),this.map[t][e]=n},t.prototype.get=function(t,e){var n=this.map[t];if(void 0!==n)return n[e]},t.prototype.has=function(t,e){var n=this.map[t];return void 0!==n&&void 0!==n[e]},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n(7),n(0);var i=n(20),r=(n(12),n(16)),o=n(15),a=n(46);function s(t,e){var n=[new Uint16Array([0,65535,65535,0,0]),new Uint16Array([0,0,65535,65535,0])],s=Object(i.c)({});Object(o.b)({collector:t,generator:a.generateLine,args:[i.a,e,r.d,s,n]})}},function(t,e,n){"use strict";n.r(e),n.d(e,"sinks",(function(){return c})),n.d(e,"generateDashedLine",(function(){return l}));var i=n(87),r=n(31),o=n(23),a={type:r.b.Striped,cDist:0,oLen:0,localID:0,offsetMultiplier:14};function s(t,e,n){return a.cDist=t,a.oLen=e,a.localID=n,a}var c={stroke:{stride:28,binder:function(t,e){t.position=new Uint16Array(e),t.extender=new Int16Array(e,4),t.texExtender=new Uint16Array(e,8),t.vertexDistance=new Float32Array(e,12),t.componentDistance=new Float32Array(e,16),t.objectLength=new Float32Array(e,20),t.localID=new Uint32Array(e,24)},packObjectAttributes:function(t,e,n,i,r){return Object(o.c)([t,e],n,i,r)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}},l=function(t,e,n,o,a,l){var u=t.getBucket(n.type,"stroke",c.stroke.packObjectAttributes(e,n.innerId,n.dataKeys,o,a),c.stroke.binder),d=t.idIndexer.getIndex(a[o.id],e,n,a[o.db_sublayer]),f=s(a[o.componentDistanceStart]/65536,a[o.objectLength]/65536,d),h=!Number.isNaN(a[o.beginningIsCut])&&0!==a[o.beginningIsCut],p=!Number.isNaN(a[o.endingIsCut])&&0!==a[o.endingIsCut];Object(i.a)(l[0],l[1],l[0].length,r.c.Flat,h?r.a.TileCut:r.a.ObjectEnding,p?r.a.TileCut:r.a.ObjectEnding,a[o.previousPointX],a[o.previousPointY],a[o.nextPointX],a[o.nextPointY],f,u)}},function(t,e,n){"use strict";n.r(e),n.d(e,"sinks",(function(){return a})),n.d(e,"processSubmesh",(function(){return s})),n.d(e,"processOuterEdge",(function(){return c}));var i=n(59),r=n(25),o=n(23),a={fill:{stride:16,binder:function(t,e){t.position=new Uint16Array(e),t.texCoords=new Uint16Array(e,8),t.localID=new Uint32Array(e,12)},packObjectAttributes:function(t,e,n,i,r,a,s,c,l,u){return Object(o.c)([t,e,n,i,r,s[0],s[1],a],c,l,u)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],texture:t[2],primitiveType:t[3],modelIndex:t[4],id:Number.isNaN(t[5])?void 0:Object(r.a)(t[5],t[6]),matrix:t[7],tileData:t.slice(8)}}},stroke:{stride:12,binder:function(t,e){t.position=new Uint16Array(e),t.directionDistance=new Int8Array(e,8)},packObjectAttributes:function(t,e,n,i,r,a,s){return Object(o.c)([t,e,i[0],i[1],n],r,a,s)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],id:Number.isNaN(t[2])?void 0:Object(r.a)(t[2],t[3]),matrix:t[4],tileData:t.slice(5)}}}},s=function(t,e,n,i,r,o,s,c,u,d,f){var h=n.tileProps,p=r[h.id],m=i.idIndexer.getIndex(p,t,e,r[h.db_sublayer]),v=i.getBucket(e.type,"fill",a.fill.packObjectAttributes(t,e.innerId,u,c,f,d,p,e.dataKeys,h,r),a.fill.binder);!function(t,e){for(var n=t.elements.offset,i=t.indices.offset,r=0;r<e.length;r++)t.indices.buffer[i++]=n+e[r];t.indices.offset=i}(v,s);for(var _=0;_<o.length;_++)l(v,o,_,m)},c=function(t,e,n,r,o,s,c,l){for(var u=n.tileProps,d=o[u.id],f=r.getBucket(e.type,"stroke",a.stroke.packObjectAttributes(t,e.innerId,l,d,e.dataKeys,u,o),a.stroke.binder),h=0;h<c.length;h+=2){var p=5*c[h],m=5*c[h+1];Object(i.a)(f,s[p],s[p+1],s[p+2],s[m],s[m+1],s[m+2])}};function l(t,e,n,i){var r=t.elements.offset,o=5*n,a=r<<3,s=r<<2;t.position[a]=e[o],t.position[a+1]=e[o+1],t.position[a+2]=e[o+2],t.texCoords[a]=e[o+3],t.texCoords[a+1]=e[o+4],t.localID[s]=i,t.elements.offset++}},function(t,e,n){"use strict";n.r(e),n.d(e,"sinks",(function(){return p})),n.d(e,"generateArrow",(function(){return m}));var i=n(6),r=n(8),o=n(10),a=n(87),s=n(31),c=n(23),l=r.d(),u=r.d(),d={type:s.b.Entrance,offsetMultiplier:18,cDist:0,oLen:0,px:[],py:[],count:0,localID:0};function f(t,e,n,i){return d.px=t[0],d.py=t[1],d.oLen=n/65536,d.count=e,d.localID=i,d}var h=function(t,e,n,i,r,o){return Object(c.c)([t,e,n>2?1:0],i,r,o)},p={stroke:{stride:36,binder:function(t,e){t.position=new Uint16Array(e),t.segmentEnd=new Uint16Array(e,4),t.texExtender=new Uint16Array(e,8),t.arrowExtender=new Uint16Array(e,10),t.extender=new Int16Array(e,12),t.direction=new Int16Array(e,16),t.vertexDistance=new Float32Array(e,20),t.objectLength=new Float32Array(e,24),t.type=new Float32Array(e,28),t.localID=new Uint32Array(e,32)},packObjectAttributes:h,unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],isLongArrow:t[2],tileData:t.slice(3)}}}},m=function(t,e,n,i,r,o){var c=o[0],l=o[1],u=o[0].length,d=function(t,e,n){for(var i=0,r=1;r<n;r++){var o=t[r]-t[r-1],a=e[r]-e[r-1];i+=Math.sqrt(o*o+a*a)}return i}(c,l,u),m=t.getBucket(n.type,"stroke",h(e,n.innerId,u,n.dataKeys,i,r),p.stroke.binder),_=t.idIndexer.getIndex(r[i.id],e,n,r[i.db_sublayer]),y=f(o,u,d,_);Object(a.a)(o[0],o[1],u,s.c.Flat,s.a.ObjectEnding,s.a.ObjectEnding,0,0,0,0,y,m);var g=0;v(m,s.d.StartBorder,c[0],l[0],c[1],l[1],0,0,g,d,_);for(var b=0;b<u-1;b++){if(0!==b){var x=c[b]-c[b-1],w=l[b]-l[b-1];g+=Math.sqrt(x*x+w*w)}v(m,s.d.Arrow,c[b],l[b],c[b+1],l[b+1],-1,0,g,d,_)}};function v(t,e,n,i,r,o,a,s,c,l,u){!function(t,e,n,i,r,o,a){var s=t.elements,c=t.indices,l=c.buffer,u=c.offset,d=s.offset;l[u]=d+1,l[u+1]=d+2,l[u+2]=d+0,l[u+3]=d+0,l[u+4]=d+2,l[u+5]=d+3,c.offset=u+6}(t),_(t,e,n,i,r,o,a,s,-1,-1,c,l,!0,u),_(t,e,n,i,r,o,a,s,1,-1,c,l,!1,u),_(t,e,n,i,r,o,a,s,1,1,c,l,!1,u),_(t,e,n,i,r,o,a,s,-1,1,c,l,!0,u)}function _(t,e,n,r,a,s,c,d,f,h,p,m,v,_){var y=t.elements,g=y.stride*y.offset>>1,b=g>>1;Object(o.c)(l,n,r,a,s),Object(o.n)(u,l),t.position[g]=n,t.position[g+1]=r,t.segmentEnd[g]=a,t.segmentEnd[g+1]=s,t.texExtender[g]=Object(o.i)(u[0]*h*(v?-1:1)*i.h,u[1]*h*(v?-1:1)*i.h),t.arrowExtender[g]=Object(o.i)(f*i.h,h*i.h);var x=f+c,w=h+d,S=l[0]*x+u[0]*w,I=l[1]*x+u[1]*w;t.extender[g]=Math.round(S*i.h*127),t.extender[g+1]=Math.round(I*i.h*127),t.direction[g]=Math.round(127*l[0]),t.direction[g+1]=Math.round(127*l[1]),t.vertexDistance[b]=p/65536,t.objectLength[b]=m/65536,t.type[b]=e,t.localID[b]=_,t.elements.offset++}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(1),r=n(2),o=n(9),a=function(){function t(t,e){for(var n in void 0===t&&(t=[]),void 0===e&&(e={}),this.params={},this.params.selectedIds=Object(i.e)([],t),e)this.params["__style_state_"+n]=e[n]}return t.equal=function(t,e){return Object(r.f)(t.params,e.params)},t.prototype.clone=function(){var e=new t;for(var n in this.params)e.params[n]=this.get(n);return e},t.prototype.stringify=function(){var t=[];for(var e in this.params)t.push(e+"="+this.get(e));return t.join(";")},t.prototype.get=function(t){var e=this.params[t];return Array.isArray(e)?this.tileIds&&"selectedIds"===t?Object(o.g)(e,this.tileIds):e.slice():"object"==typeof e?Object(i.a)({},e):e},t.prototype.setTileIds=function(t){this.tileIds=t},t}()},function(t,e){!function(){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=new Uint8Array(256),i=0;i<t.length;i++)n[t.charCodeAt(i)]=i;e.encode=function(e){var n,i=new Uint8Array(e),r=i.length,o="";for(n=0;n<r;n+=3)o+=t[i[n]>>2],o+=t[(3&i[n])<<4|i[n+1]>>4],o+=t[(15&i[n+1])<<2|i[n+2]>>6],o+=t[63&i[n+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o},e.decode=function(t){var e,i,r,o,a,s=.75*t.length,c=t.length,l=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var u=new ArrayBuffer(s),d=new Uint8Array(u);for(e=0;e<c;e+=4)i=n[t.charCodeAt(e)],r=n[t.charCodeAt(e+1)],o=n[t.charCodeAt(e+2)],a=n[t.charCodeAt(e+3)],d[l++]=i<<2|r>>4,d[l++]=(15&r)<<4|o>>2,d[l++]=(3&o)<<6|63&a;return u}}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return _}));var i=n(6),r=n(8),o=n(2),a=n(10),s=r.d(),c=r.d(),l=r.d(),u=r.d(),d=r.d(),f=r.d(),h=r.d(),p=r.d(),m=0,v=0;function _(t,e,n,i,r,o,c,l,u){if(!(i<2)){if(Object(a.c)(s,e[0],n[0],e[1],n[1]),m=0,r){var d=void 0!==l?l[0]:0,f=void 0!==u?u[0]:0;g(t,e[0],n[0],-s[0],-s[1],d,f,c)}for(var h=1;h<i;h++)y(t,e,n,h,i,c,l,u);o&&(d=void 0!==l?l[i-1]:0,f=void 0!==u?u[i-1]:0,g(t,e[i-1],n[i-1],s[0],s[1],d,f,c))}}function y(t,e,n,_,y,x,w,S){var I=_===y-1;if(r.o(d,e[_-1],n[_-1]),r.o(f,e[_],n[_]),void 0!==w&&void 0!==S?(r.o(l,w[_-1],S[_-1]),r.o(u,w[_],S[_])):(r.o(l,0,0),r.o(u,0,0)),Object(a.n)(p,s),I)v=0;else{r.o(h,e[_+1],n[_+1]),Object(a.c)(c,f[0],f[1],h[0],h[1]);var j=Object(o.d)(r.g(s,c),-1,1);if(j<=0)v=0,g(t,f[0],f[1],s[0],s[1],u[0],u[1],x);else{var O=Math.sqrt((1-j)/(1+j)),M=Object(o.G)(r.g(p,c));v=O*M}}!function(t,e,n,i,r,o,a){var s=t.indices.buffer,c=t.indices.offset,l=t.elements.offset;s[c]=l+0,s[c+1]=l+1,s[c+2]=l+3,s[c+3]=l+3,s[c+4]=l+1,s[c+5]=l+2,t.indices.offset=c+6}(t);var P=p[0]*i.h,L=p[1]*i.h;b(t,d[0],d[1],(p[0]+s[0]*m)*i.h,(p[1]+s[1]*m)*i.h,P,L,l[0],l[1],x),b(t,d[0],d[1],(-p[0]-s[0]*m)*i.h,(-p[1]-s[1]*m)*i.h,-P,-L,l[0],l[1],x),b(t,f[0],f[1],(-p[0]+s[0]*v)*i.h,(-p[1]+s[1]*v)*i.h,-P,-L,u[0],u[1],x),b(t,f[0],f[1],(p[0]-s[0]*v)*i.h,(p[1]-s[1]*v)*i.h,P,L,u[0],u[1],x),I||(r.c(s,c),m=v)}function g(t,e,n,i,r,o,a,s){!function(t,e,n,i){var r=t.indices.buffer,o=t.indices.offset,a=t.elements.offset;r[o]=a+0,r[o+1]=a+1,r[o+2]=a+2,t.indices.offset=o+3}(t);var c=.01*-i,l=.01*-r;b(t,e,n,i+c,r+l,i,r,o,a,s),b(t,e,n,-r+c,i+l,-r,i,o,a,s),b(t,e,n,r+c,-i+l,r,-i,o,a,s)}function b(t,e,n,i,r,o,a,s,c,l){var u=t.elements.offset*t.elements.stride,d=u>>1,f=u>>2;t.position[d]=e,t.position[d+1]=n,t.extender[u]=127*i,t.extender[u+1]=127*r,t.normal[u]=127*o,t.normal[u+1]=127*a,void 0!==t.shift&&(t.shift[f]=s,t.shift[f+1]=c),void 0!==t.localID&&(t.localID[f]=l),t.elements.offset++}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(10),r=n(36);function o(t,e,n,o,u,d,f){for(var h=t.elements.offset,p=0;p<e;p++){var m=Object(r.a)(p,e),v=p===e-1;if(u&&1===u[m]||!u&&!v){var _=n[m],y=o[m],g=(p+1)%e,b=Object(r.a)(g,e),x=n[b],w=o[b];l(t,h),a(t.position,h,_,y,x,w,d),s(t.normal,h,Object(i.g)(_,y,x,w)),void 0!==f&&c(t.localID,h,f),h+=4}}t.elements.offset=h}function a(t,e,n,i,r,o,a){t[e*=8]=n,t[e+1]=i,t[e+2]=0,t[e+8]=n,t[e+9]=i,t[e+10]=a,t[e+16]=r,t[e+17]=o,t[e+18]=0,t[e+24]=r,t[e+25]=o,t[e+26]=a}function s(t,e,n){t[e*=8]=n,t[e+1]=0,t[e+8]=n,t[e+9]=0,t[e+16]=n,t[e+17]=0,t[e+24]=n,t[e+25]=0}function c(t,e,n){t[e*=4]=n,t[e+4]=n,t[e+8]=n,t[e+12]=n}function l(t,e){var n=t.indices.buffer,i=t.indices.offset;n[i++]=e,n[i++]=e+3,n[i++]=e+1,n[i++]=e,n[i++]=e+2,n[i++]=e+3,t.indices.offset=i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var i,r,o=n(10),a=n(31),s=n(6),c=[.5,.5],l=[.5,.5],u=[.5,.5],d=[.5,.5],f=[0,0],h=null,p=0,m=0,v=0,_=0,y={x:0,y:0,xn2:0,yn2:0,xn1:0,yn1:0,noTurn:!0,leftTurn:!1,sharpTurn:!1,reverseTurn:!1,extender:[.5,.5],faExtender:[.5,.5],saExtender:[.5,.5]};function g(t,e,n,s,l,d,f,y,g,x,M,L){var T,k,z,C,E,A,D,F,R,B;if(0!==n)if(h=M,i=(r=L).indices,m=r.elements.offset,p=0,v=0,_=0,1===n)T=t[0],k=e[0],B=0,P(i,m,0,2,1,1,2,3),O(r,h,0,T,k,1,-1,1,-1,B,!1),O(r,h,0,T,k,-1,-1,-1,-1,B,!1),O(r,h,0,T,k,1,1,1,1,B,!1),O(r,h,0,T,k,-1,1,-1,1,B,!1),p+=4;else{switch(z=t[0],C=e[0],E=t[1],A=e[1],B=0,l){case a.a.TileCut:Object(o.f)(c,z,C,f,y),Object(o.f)(u,E,A,z,C),(R=b(E,A,c[0],c[1],u[0],u[1])).noTurn?S(z,C,u[0],u[1],B):w(0,z,C,c[0],c[1],u[0],u[1],B);break;case a.a.ObjectEnding:Object(o.f)(u,E,A,z,C),s===a.c.Flat?S(z,C,u[0],u[1],B):(S(z,C,-u[0],-u[1],B),w(0,z,C,-u[0],-u[1],u[0],u[1],B));break;default:throw new Error("LoftedLine: unknown Ending Type")}for(var N=n-1,U=1;U<N;U++){z=t[U-1],C=e[U-1],E=t[U],A=e[U],D=t[U+1],F=e[U+1];var H=E-z,Z=A-C;B+=Math.sqrt(H*H+Z*Z)/65536,Object(o.f)(c,E,A,z,C),Object(o.f)(u,D,F,E,A),w(U,E,A,c[0],c[1],u[0],u[1],B)}z=t[n-2],C=e[n-2];var G=(E=t[N])-z,W=(A=e[N])-C;switch(B+=Math.sqrt(G*G+W*W)/65536,d){case a.a.TileCut:Object(o.f)(c,E,A,z,C),Object(o.f)(u,g,x,E,A),(R=b(E,A,c[0],c[1],u[0],u[1])).noTurn?I(N,E,A,u[0],u[1],B):j(N,B,R);break;case a.a.ObjectEnding:Object(o.f)(u,E,A,z,C),I(N,E,A,u[0],u[1],B),s===a.c.Circle&&w(N,E,A,u[0],u[1],-u[0],-u[1],B);break;default:throw new Error("LoftedLine: unknown Ending Type")}}}function b(t,e,n,i,r,a){var s=function(t,e,n,i,r,o){var a=y;a.x=t,a.y=e,a.xn2=n,a.yn2=i,a.xn1=r,a.yn1=o;var s=n*r+i*o;return a.noTurn=s>.9999,a.leftTurn=n*-o+i*r<0,a.sharpTurn=s<0,a.reverseTurn=s<-.9999,a}(t,e,n,i,r,a);if(s.noTurn||s.reverseTurn)s.extender[0]=0,s.extender[1]=0,s.faExtender[0]=0,s.faExtender[1]=0,s.saExtender[0]=0,s.saExtender[1]=0;else{Object(o.d)(l,n,i,r,a);var c=l[0],u=l[1];s.extender[0]=c,s.extender[1]=u,s.faExtender[0]=c-2*n,s.faExtender[1]=u-2*i,s.saExtender[0]=c-2*r,s.saExtender[1]=u-2*a}return s}function x(t,e,n,i,a,s,c,u){Object(o.d)(l,i,a,s,c),i*-c+a*s<0?O(r,h,t,e,n,-l[0],-l[1],-l[0],-l[1],u,!1):O(r,h,t,e,n,l[0],l[1],l[0],l[1],u,!1),p++}function w(t,e,n,a,s,c,l,u){var f=b(e,n,a,s,c,l);j(t,u,f),function(t,e,n){if(!n.noTurn){var a,s,c=n.sharpTurn?2:1;n.reverseTurn?(a=_,s=v):n.leftTurn?(a=v,s=p+c):(a=p+c,s=_);var l=p;if(n.leftTurn,M(i,m,v,_,l),n.sharpTurn){var u=p+1;n.leftTurn?P(i,m,l,u,a,a,u,s):P(i,m,l,s,u,u,s,a)}else n.leftTurn,M(i,m,l,s,a);n.sharpTurn?(n.leftTurn?Object(o.f)(d,n.xn2,n.yn2,n.xn1,n.yn1):Object(o.f)(d,n.xn1,n.yn1,n.xn2,n.yn2),x(t,n.x,n.y,n.xn2,n.yn2,d[0],d[1],e),x(t,n.x,n.y,d[0],d[1],n.xn1,n.yn1,e)):x(t,n.x,n.y,n.xn2,n.yn2,n.xn1,n.yn1,e),n.reverseTurn||(n.leftTurn?O(r,h,t,n.x,n.y,-n.xn1,-n.yn1,-n.xn1,-n.yn1,e,!1):O(r,h,t,n.x,n.y,n.xn1,n.yn1,n.xn1,n.yn1,e,!1),p++),_=s,v=a}}(t,u,f),function(t,e,n){if(!n.noTurn&&!n.reverseTurn){var o=p+1,a=p;n.leftTurn?(O(r,h,t,n.x,n.y,-n.xn1,-n.yn1,n.saExtender[0],n.saExtender[1],e,!1),O(r,h,t,n.x,n.y,n.xn1,n.yn1,n.extender[0],n.extender[1],e,!1)):(O(r,h,t,n.x,n.y,-n.xn1,-n.yn1,-n.extender[0],-n.extender[1],e,!1),O(r,h,t,n.x,n.y,n.xn1,n.yn1,-n.saExtender[0],-n.saExtender[1],e,!1)),p+=2,n.leftTurn?P(i,m,_,a,v,v,a,o):P(i,m,v,_,o,o,_,a),_=a,v=o}}(t,u,f)}function S(t,e,n,i,o){O(r,h,0,t,e,-n,-i,-n,-i,o,!1),O(r,h,0,t,e,n,i,n,i,o,!1),p+=2,v=1,_=0}function I(t,e,n,o,a,s){var c=p+1,l=p;O(r,h,t,e,n,-o,-a,-o,-a,s,!1),O(r,h,t,e,n,o,a,o,a,s,!1),p+=2,P(i,m,_,l,v,v,l,c),v=c,_=l}function j(t,e,n){if(!n.noTurn){var o=p+1,a=p;if(n.reverseTurn?(O(r,h,t,n.x,n.y,-n.xn2,-n.yn2,-n.xn2,-n.yn2,e,!1),O(r,h,t,n.x,n.y,n.xn2,n.yn2,n.xn2,n.yn2,e,!1)):n.leftTurn?(O(r,h,t,n.x,n.y,-n.xn2,-n.yn2,n.faExtender[0],n.faExtender[1],e,!0),O(r,h,t,n.x,n.y,n.xn2,n.yn2,n.extender[0],n.extender[1],e,!0)):(O(r,h,t,n.x,n.y,-n.xn2,-n.yn2,-n.extender[0],-n.extender[1],e,!0),O(r,h,t,n.x,n.y,n.xn2,n.yn2,-n.faExtender[0],-n.faExtender[1],e,!0)),p+=2,P(i,m,_,a,v,v,a,o),_=a,v=o,!n.reverseTurn){var s=p+1,c=p;n.leftTurn?(O(r,h,t,n.x,n.y,-n.xn2,-n.yn2,-n.xn2,-n.yn2,e,!1),O(r,h,t,n.x,n.y,0,0,0,0,e,!1),P(i,m,o,a,s,s,a,c)):(O(r,h,t,n.x,n.y,0,0,0,0,e,!1),O(r,h,t,n.x,n.y,n.xn2,n.yn2,n.xn2,n.yn2,e,!1),P(i,m,a,c,o,o,c,s)),p+=2,_=c,v=s}}}function O(t,e,n,i,r,c,l,u,d,h,p){var m=t.elements.offset*e.offsetMultiplier,v=m>>1;if(t.position[m]=i,t.position[m+1]=r,t.extender[m]=Math.floor(u*s.h*127+.5),t.extender[m+1]=Math.floor(d*s.h*127+.5),e.type===a.b.Striped)t.vertexDistance[v]=h,t.objectLength[v]=e.oLen,t.texExtender[m]=Object(o.i)(c*s.h,l*s.h),t.componentDistance[v]=e.cDist;else if(e.type===a.b.Entrance){var _=e.px,y=e.py,g=0===n,b=n===e.count-1,x=g?n:n-1,w=g?n+1:n;Object(o.c)(f,_[x],y[x],_[w],y[w]),t.direction[m]=Math.round(127*f[0]),t.direction[m+1]=Math.round(127*f[1]),t.texExtender[m]=Object(o.i)(c*(p||b?-1:1)*s.h,l*(p||b?-1:1)*s.h),t.type[v]=b?a.d.LineEnding:a.d.Line,t.vertexDistance[v]=h,t.objectLength[v]=e.oLen}t.localID[v]=e.localID,t.elements.offset++}function M(t,e,n,i,r){var o=t.buffer,a=t.offset;o[a]=e+n,o[a+1]=e+i,o[a+2]=e+r,t.offset=a+3}function P(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+n,c[l+1]=e+i,c[l+2]=e+r,c[l+3]=e+o,c[l+4]=e+a,c[l+5]=e+s,t.offset=l+6}},function(t,e,n){"use strict";n.r(e),n.d(e,"sinks",(function(){return r})),n.d(e,"generateCircleMarker",(function(){return o}));var i=n(23),r={fill:{stride:12,binder:function(t,e){t.position=new Uint16Array(e),t.extender=new Int16Array(e,4),t.localID=new Uint32Array(e,8)},packObjectAttributes:function(t,e,n,r,o){return Object(i.c)([t,e],n,r,o)},unpackObjectAttributes:function(t){return{styleId:t[0],layerId:t[1],tileData:t.slice(2)}}}};function o(t,e,n,i,o,s){var c=t.getBucket(n.type,"fill",r.fill.packObjectAttributes(e,n.innerId,n.dataKeys,i,o),r.fill.binder),l=t.idIndexer.getIndex(o[i.id],e,n,o[i.db_sublayer]),u=s[0][0],d=s[1][0];!function(t,e,n,i,r,o,a){var s=t.elements,c=t.indices,l=c.buffer,u=c.offset,d=s.offset;l[u]=d+0,l[u+1]=d+2,l[u+2]=d+1,l[u+3]=d+0,l[u+4]=d+3,l[u+5]=d+2,c.offset=u+6}(c),a(c,u,d,-1,-1,l),a(c,u,d,-1,1,l),a(c,u,d,1,1,l),a(c,u,d,1,-1,l)}function a(t,e,n,i,r,o){var a=t.elements.offset*t.elements.stride>>1,s=a>>1;t.position[a]=e,t.position[a+1]=n,t.extender[a]=i,t.extender[a+1]=r,t.localID[s]=o,t.elements.offset++}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(24),r=[{id:"__2gis_comm_poi",type:"point",style:{textFont:["Noto_Sans_Semibold",["step",["zoom"],"Noto_Sans",16,"Noto_Sans"]],iconImage:"peak",iconWidth:["interpolate",["linear"],["zoom"],15,22,16.8,30],textColor:"#3A3A3A",visibility:"visible",textFontSize:[["interpolate",["linear"],["zoom"],15.5,11,18,13],["interpolate",["linear"],["zoom"],15.5,10,18,12]],textHaloColor:"rgba(255,255,255,0.5)",textHaloWidth:.9,iconLabelingGroup:i.o,iconLabelingMargin:{leftRight:6,topBottom:6}},filter:["match",["get","sublayer"],["Commercial_poi_default","Commercial_poi_navi","Commercial_poi_custom"],!0,!1],minzoom:15.1},{id:"__2gis_comm_poi_UAE",type:"point",style:{textFont:["Noto_Sans_Semibold",["step",["zoom"],"Noto_Sans",16,"Noto_Sans"]],iconImage:"peak",iconWidth:["interpolate",["linear"],["zoom"],15,22,16.8,30],textColor:"#3A3A3A",visibility:"visible",textFontSize:[["interpolate",["linear"],["zoom"],15.5,11,18,13],["interpolate",["linear"],["zoom"],15.5,10,18,12]],textHaloColor:"rgba(255,255,255,0.5)",textHaloWidth:.9,iconLabelingGroup:i.o,iconLabelingMargin:{leftRight:6,topBottom:6}},filter:["all",["match",["get","sublayer"],["Commercial_poi_default","Commercial_poi_navi","Commercial_poi_custom"],!0,!1],["match",["get","db_region"],[99],!0,!1]],minzoom:14.1}]},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(t){void 0===t&&(t={}),this.map=t}return t.prototype.set=function(t,e){var n=this.map[t[0]];void 0===n&&(n=this.map[t[0]]={}),n[t[1]]=e},t.prototype.get=function(t){if(void 0!==this.map[t[0]])return this.map[t[0]][t[1]]},t.prototype.serialize=function(){return this.map},t.prototype.forEach=function(t){for(var e in this.map)for(var n in this.map[e])t(this.map[e][n],Number(e),Number(n))},t.prototype.clear=function(){this.map={}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(1),r=n(68),o=function(){function t(t,e){this.modules=t,this.options=e,this.id=Object(r.a)(),this.type="geojson",this.worker=new this.modules.workers.parser.GeoJsonSource(this.options,this.id),this.attributes=e.attributes||{}}return t.prototype.fetchTile=function(t){return this.worker.fetchTile(t).then((function(){return[{regionId:0,metatileHash:-2}]}))},t.prototype.generateTile=function(t,e,n,i){return this.worker.generateTile(t,e,n,i)},t.prototype.getObjectAttributes=function(t,e){return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(n){return[2,this.worker.getObjectAttributes(t,e)]}))}))},t.prototype.abortTileFetch=function(t){this.worker.abortTileFetch(t)},t.prototype.deleteTile=function(t){this.worker.deleteTile(t)},t.prototype.setAttributes=function(t){this.worker.setSourceAttrs(t),this.attributes=t},t.prototype.getAttributes=function(){return this.attributes},t.prototype.destroy=function(){this.worker.destroy()},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n(16),r=n(6),o=n(2),a=function(){this.dictionaries={},this.reverseDictionaries={},this.version="",this.defaultProps={},this.tileProps=i.d,this.tilePropsByIndex=Object(o.D)(i.d),this.hash=r.k}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(1),r=function(){function t(t){var e=this;this.fnRegistry=t,this.onClassCreate=function(t){var n,r,o=t.id,a=t.name,s=t.args,c=e.classes.get(a);if(c){var l=c.scope?new((n=c.ClassConstructor).bind.apply(n,Object(i.e)([void 0,c.scope],s))):new((r=c.ClassConstructor).bind.apply(r,Object(i.e)([void 0],s)));c.hosts.set(o,l)}else console.error("ClassRegistry#onClassCreate: class "+a+" not found")},this.onMethodUse=function(t){var n=t.id,i=t.name,r=t.method,o=t.args,a=e.classes.get(i);if(a){var s=a.hosts.get(n);if(s){if(s[r])return"destroy"===r&&a.hosts.delete(n),s[r].apply(s,o);console.error("ClassRegistry#onMethodUse: method "+r+" in instance "+n+" in class "+i+" not found")}else console.error("ClassRegistry#onMethodUse: instance "+n+" in class "+i+" not found")}else console.error("ClassRegistry#onMethodUse: class "+i+" not found")},this.classes=new Map,this.idCounter=0,this.fnRegistry.set("createClass",this.onClassCreate),this.fnRegistry.set("classMethodUse",this.onMethodUse)}return t.prototype.set=function(t,e,n){var i=this,r={ClassConstructor:e,hosts:new Map,proxies:new Map,scope:n};return this.classes.set(t,r),{get:function(n){var r=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.id=i.idCounter++,i.fnRegistry.get(n,"createClass")({id:this.id,args:e,name:t})};return Object.getOwnPropertyNames(e.prototype).forEach((function(e){"constructor"!==e&&(r.prototype[e]=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return i.fnRegistry.get(n,"classMethodUse")({id:this.id,name:t,method:e,args:r})})})),r}}},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return ct}));var i=n(15),r=n(9),o=n(16),a=n(33),s=n(29),c={point:{point:!0,heatmap:!0},polygon:{polygon:!0},line:{line:!0,lineExtrusion:!0,labelLine:!0,dashedLine:!0,oneWayLine:!0}};function l(t,e){var n=new Set(e[0].map((function(n,i){return e[0][i]===t[0]&&t[1]===e[1][i]?i:-1})));return Array.from(n)}function u(t,e){var n=l([t[0][0],t[1][0]],e),i=l([t[0][1],t[1][1]],e),r=l([t[0][2],t[1][2]],e);n.forEach((function(e){return i.forEach((function(n){return r.forEach((function(i){!function(t,e,n,i){e>=0&&n>=0&&1===Math.abs(e-n)&&(t[2][0]=1),n>=0&&i>=0&&1===Math.abs(n-i)&&(t[2][1]=1),e>=0&&i>=0&&1===Math.abs(e-i)&&(t[2][2]=1)}(t,e,n,i)}))}))}))}var d=n(1),f=n(43);function h(t,e,n,i,r,o){var a=r-n,s=o-i;if(0!==a||0!==s){var c=((t-n)*a+(e-i)*s)/(a*a+s*s);c>1?(n=r,i=o):c>0&&(n+=a*c,i+=s*c)}return(a=t-n)*a+(s=e-i)*s}function p(t,e,n,i,r){var o={id:null==t?null:t,index:r,type:e,geometry:n,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===e||"MultiPoint"===e||"LineString"===e)m(o,n);else if("Polygon"===e)m(o,n[0]);else if("MultiLineString"===e)for(var a=0,s=n;a<s.length;a++)m(o,s[a]);else if("MultiPolygon"===e)for(var c=0,l=n;c<l.length;c++)m(o,l[c][0]);return o}function m(t,e){for(var n=0;n<e.length;n+=3)t.minX=Math.min(t.minX,e[n]),t.minY=Math.min(t.minY,e[n+1]),t.maxX=Math.max(t.maxX,e[n]),t.maxY=Math.max(t.maxY,e[n+1])}function v(t,e,n,i){if(e.geometry){var r=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(n.tolerance/((1<<n.maxZoom)*n.extent),2),s=[],c=e.id;if(n.promoteId?c=e.properties[n.promoteId]:n.generateId&&(c=i||0),"Point"===o)_(r,s);else if("MultiPoint"===o)for(var l=0,u=r;l<u.length;l++)_(u[l],s);else if("LineString"===o)y(r,s,a,!1);else if("MultiLineString"===o){if(n.lineMetrics){for(var d=0,f=r;d<f.length;d++)y(f[d],s=[],a,!1),t.push(p(c,"LineString",s,e.properties,i));return}g(r,s,a,!1)}else if("Polygon"===o)g(r,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(var h=0,m=e.geometry.geometries;h<m.length;h++)v(t,{id:c,geometry:m[h],properties:e.properties},n,i);return}throw new Error("Input data is not a valid GeoJSON object.")}for(var b=0,x=r;b<x.length;b++){var w=[];g(x[b],w,a,!0),s.push(w)}}t.push(p(c,o,s,e.properties,i))}}function _(t,e){e.push(b(t[0]),x(t[1]),0)}function y(t,e,n,i){for(var r,o,a=0,s=0;s<t.length;s++){var c=b(t[s][0]),l=x(t[s][1]);e.push(c,l,0),s>0&&(a+=i?(r*l-c*o)/2:Math.sqrt(Math.pow(c-r,2)+Math.pow(l-o,2))),r=c,o=l}var u=e.length-3;e[2]=1,function t(e,n,i,r){for(var o,a=r,s=i-n>>1,c=i-n,l=e[n],u=e[n+1],d=e[i],f=e[i+1],p=n+3;p<i;p+=3){var m=h(e[p],e[p+1],l,u,d,f);if(m>a)o=p,a=m;else if(m===a){var v=Math.abs(p-s);v<c&&(o=p,c=v)}}a>r&&(o-n>3&&t(e,n,o,r),e[o+2]=a,i-o>3&&t(e,o,i,r))}(e,0,u,n),e[u+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function g(t,e,n,i){for(var r=0;r<t.length;r++){var o=[];y(t[r],o,n,i),e.push(o)}}function b(t){return t/360+.5}function x(t){var e=Math.sin(t*Math.PI/180),n=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return n<0?0:n>1?1:n}function w(t,e,n,i,r,o,a,s){if(i/=e,o>=(n/=e)&&a<i)return t;if(a<n||o>=i)return null;for(var c=[],l=0,u=t;l<u.length;l++){var d=u[l],f=d.geometry,h=d.type,m=0===r?d.minX:d.minY,v=0===r?d.maxX:d.maxY;if(m>=n&&v<i)c.push(d);else if(!(v<n||m>=i)){var _=[];if("Point"===h||"MultiPoint"===h)S(f,_,n,i,r);else if("LineString"===h)I(f,_,n,i,r,!1,s.lineMetrics);else if("MultiLineString"===h)O(f,_,n,i,r,!1);else if("Polygon"===h)O(f,_,n,i,r,!0);else if("MultiPolygon"===h)for(var y=0,g=f;y<g.length;y++){var b=[];O(g[y],b,n,i,r,!0),b.length&&_.push(b)}if(_.length){if(s.lineMetrics&&"LineString"===h){for(var x=0,w=_;x<w.length;x++){var j=w[x];c.push(p(d.id,h,j,d.tags,d.index))}continue}"LineString"!==h&&"MultiLineString"!==h||(1===_.length?(h="LineString",_=_[0]):h="MultiLineString"),"Point"!==h&&"MultiPoint"!==h||(h=3===_.length?"Point":"MultiPoint"),c.push(p(d.id,h,_,d.tags,d.index))}}}return c.length?c:null}function S(t,e,n,i,r){for(var o=0;o<t.length;o+=3){var a=t[o+r];a>=n&&a<=i&&M(e,t[o],t[o+1],t[o+2])}}function I(t,e,n,i,r,o,a){for(var s,c,l=j(t),u=0===r?P:L,d=t.start,f=0;f<t.length-3;f+=3){var h=t[f],p=t[f+1],m=t[f+2],v=t[f+3],_=t[f+4],y=0===r?h:p,g=0===r?v:_,b=!1;a&&(s=Math.sqrt(Math.pow(h-v,2)+Math.pow(p-_,2))),y<n?g>n&&(c=u(l,h,p,v,_,n),a&&(l.start=d+s*c)):y>i?g<i&&(c=u(l,h,p,v,_,i),a&&(l.start=d+s*c)):M(l,h,p,m),g<n&&y>=n&&(c=u(l,h,p,v,_,n),b=!0),g>i&&y<=i&&(c=u(l,h,p,v,_,i),b=!0),!o&&b&&(a&&(l.end=d+s*c),e.push(l),l=j(t)),a&&(d+=s)}var x=t.length-3,w=t[x],S=t[x+1],I=t[x+2],O=0===r?w:S;O>=n&&O<=i&&M(l,w,S,I),x=l.length-3,o&&x>=3&&(l[x]!==l[0]||l[x+1]!==l[1])&&M(l,l[0],l[1],l[2]),l.length&&e.push(l)}function j(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function O(t,e,n,i,r,o){for(var a=0,s=t;a<s.length;a++)I(s[a],e,n,i,r,o,!1)}function M(t,e,n,i){t.push(e,n,i)}function P(t,e,n,i,r,o){var a=(o-e)/(i-e);return M(t,o,n+(r-n)*a,1),a}function L(t,e,n,i,r,o){var a=(o-n)/(r-n);return M(t,e+(i-e)*a,o,1),a}function T(t,e){for(var n=[],i=0;i<t.length;i++){var r=t[i],o=r.type,a=void 0;if("Point"===o||"MultiPoint"===o||"LineString"===o)a=k(r.geometry,e);else if("MultiLineString"===o||"Polygon"===o){a=[];for(var s=0,c=r.geometry;s<c.length;s++){var l=c[s];a.push(k(l,e))}}else if("MultiPolygon"===o){a=[];for(var u=0,d=r.geometry;u<d.length;u++){for(var f=[],h=0,m=d[u];h<m.length;h++){var v=m[h];f.push(k(v,e))}a.push(f)}}n.push(p(r.id,o,a,r.tags,r.index))}return n}function k(t,e){var n=[];n.size=t.size,void 0!==t.start&&(n.start=t.start,n.end=t.end);for(var i=0;i<t.length;i+=3)n.push(t[i]+e,t[i+1],t[i+2]);return n}function z(t,e){if(t.transformed)return t;for(var n=1<<t.z,i=t.x,r=t.y,o=0,a=t.features;o<a.length;o++){var s=a[o],c=s.geometry,l=s.type;if(s.geometry=[],1===l)for(var u=0;u<c.length;u+=2)s.geometry.push(E(c[u],c[u+1],e,n,i,r));else if(2===l)s.geometry=C(c,e,n,i,r);else for(var d=0;d<c.length;d++)s.geometry.push(C(c[d],e,n,i,r))}return t.transformed=!0,t}function C(t,e,n,i,r){for(var o=[],a=0;a<t.length;a++){for(var s=[],c=0;c<t[a].length;c+=2)s.push(E(t[a][c],t[a][c+1],e,n,i,r));o.push(s)}return o}function E(t,e,n,i,r,o){return[Math.round(n*(t*i-r)),Math.round(n*(e*i-o))]}function A(t,e,n,i,r){for(var o=e===r.maxZoom?0:r.tolerance/((1<<e)*r.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:t.length,source:null,x:n,y:i,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0,c=t;s<c.length;s++)D(a,c[s],o,r);return a}function D(t,e,n,i){var r=e.geometry,o=e.type,a=[];if(t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),"Point"===o||"MultiPoint"===o)for(var s=0;s<r.length;s+=3)a.push(r[s],r[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)F(a,r,t,n,!1,!1);else if("MultiLineString"===o||"Polygon"===o){for(var c=0;c<r.length;c++)F(a,r[c],t,n,"Polygon"===o,0===c);"Polygon"===o&&a.length&&(a=[a])}else if("MultiPolygon"===o)for(var l=0;l<r.length;l++){for(var u=r[l],d=[],f=0;f<u.length;f++)F(d,u[f],t,n,!0,0===f);d.length&&a.push(d)}if(a.length){var h=e.tags||null;if("LineString"===o&&i.lineMetrics){for(var p in h={},e.tags)h[p]=e.tags[p];h.mapbox_clip_start=r.start/r.size,h.mapbox_clip_end=r.end/r.size}var m={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:h};null!==e.id&&(m.id=e.id),i.generateIndex&&(m.index=e.index),t.features.push(m)}}function F(t,e,n,i,r,o){var a=i*i;if(i>0&&e.size<(r?a:i))n.numPoints+=e.length/3;else{for(var s=[],c=0;c<e.length;c+=3)(0===i||e[c+2]>a)&&(n.numSimplified++,s.push(e[c],e[c+1])),n.numPoints++;r&&function(t,e){for(var n=0,i=0,r=t.length,o=r-2;i<r;o=i,i+=2)n+=(t[i]-t[o])*(t[i+1]+t[o+1]);if(n>0===e)for(var a=0,s=t.length;a<s/2;a+=2){var c=t[a],l=t[a+1];t[a]=t[s-2-a],t[a+1]=t[s-1-a],t[s-2-a]=c,t[s-1-a]=l}}(s,o),t.push(s)}}var R={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,generateIndex:!1,debug:0},B=function(){function t(t,e){var n=(e=this.options=function(t,e){for(var n in e)t[n]=e[n];return t}(Object.create(R),e)).debug;if(n&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var i=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var i=0;i<t.features.length;i++)v(n,t.features[i],e,i);else"Feature"===t.type?v(n,t,e,0):v(n,{geometry:t},e,0);return n}(t,e);this.tiles={},this.tileCoords=[],n&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(i=function(t,e){var n=e.buffer/e.extent,i=t,r=w(t,1,-1-n,n,0,-1,2,e),o=w(t,1,1-n,2+n,0,-1,2,e);return(r||o)&&(i=w(t,1,-n,1+n,0,-1,2,e)||[],r&&(i=T(r,1).concat(i)),o&&(i=i.concat(T(o,-1)))),i}(i,e)).length&&this.splitTile(i,0,0,0),n&&(i.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}return t.prototype.splitTile=function(t,e,n,i,r,o,a){for(var s=[t,e,n,i],c=this.options,l=c.debug;s.length;){i=s.pop(),n=s.pop(),e=s.pop(),t=s.pop();var u=1<<e,d=N(e,n,i),f=this.tiles[d];if(!f&&(l>1&&console.time("creation"),f=this.tiles[d]=A(t,e,n,i,c),this.tileCoords.push({z:e,x:n,y:i}),l)){l>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,i,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var h="z"+e;this.stats[h]=(this.stats[h]||0)+1,this.total++}if(f.source=t,null==r){if(e===c.indexMaxZoom||f.numPoints<=c.indexMaxPoints)continue}else{if(e===c.maxZoom||e===r)continue;if(null!=r){var p=r-e;if(n!==o>>p||i!==a>>p)continue}}if(f.source=null,0!==t.length){l>1&&console.time("clipping");var m=.5*c.buffer/c.extent,v=.5-m,_=.5+m,y=1+m,g=null,b=null,x=null,S=null,I=w(t,u,n-m,n+_,0,f.minX,f.maxX,c),j=w(t,u,n+v,n+y,0,f.minX,f.maxX,c);t=null,I&&(g=w(I,u,i-m,i+_,1,f.minY,f.maxY,c),b=w(I,u,i+v,i+y,1,f.minY,f.maxY,c),I=null),j&&(x=w(j,u,i-m,i+_,1,f.minY,f.maxY,c),S=w(j,u,i+v,i+y,1,f.minY,f.maxY,c),j=null),l>1&&console.timeEnd("clipping"),s.push(g||[],e+1,2*n,2*i),s.push(b||[],e+1,2*n,2*i+1),s.push(x||[],e+1,2*n+1,2*i),s.push(S||[],e+1,2*n+1,2*i+1)}}},t.prototype.getTile=function(t,e,n){t=+t,e=+e,n=+n;var i=this.options,r=i.extent,o=i.debug;if(t<0||t>24)return null;var a=1<<t,s=N(t,e=e+a&a-1,n);if(this.tiles[s])return z(this.tiles[s],r);o>1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var c,l=t,u=e,d=n;!c&&l>0;)l--,u>>=1,d>>=1,c=this.tiles[N(l,u,d)];return c&&c.source?(o>1&&(console.log("found parent tile z%d-%d-%d",l,u,d),console.time("drilling down")),this.splitTile(c.source,l,u,d,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?z(this.tiles[s],r):null):null},t}();function N(t,e,n){return 32*((1<<t)*n+e)+t}var U=n(4),H=n(56),Z=n(6),G=n(2);function W(t,e){var n=[];return t.geometry.forEach((function(i){var r=[],o=[],a=[];i.forEach((function(t){a.push.apply(a,function(t,e){for(var n=[],i=[],r=0;r<t.length;r++){var o=t[r];if(i.push(X(o,e)),K(o,e)){var a=t[r+1];if(!a)break;J(o,a,e)&&(i.length>1&&n.push(i),i=[])}}return i.length>1&&n.push(i),n}(t,e)),r.length&&o.push(r.length),r.push.apply(r,t)}));for(var s=[],c=0;c<r.length;c++)s.push(r[c][0]),s.push(r[c][1]);var l=H(s,o),d=U.d(),f=function(i){for(var o=[[],[],[]],s=0;s<3;s++)Y(d,r[l[i+2-s]],e),o[0][s]=d[0],o[1][s]=d[1],o[2][s]=0;a.forEach((function(t){var e=[[],[],[]];t.forEach((function(t,n){e[0][n]=t[0],e[1][n]=t[1]})),u(o,e)})),n.push({tags:t.tags,id:t.id,index:t.index,type:"polygon",vertices:o})};for(c=0;c<l.length;c+=3)f(c)})),n}function V(t,e){var n=U.d();return t.geometry.map((function(i){var r=[[],[]];return i.forEach((function(t,i){Y(n,t,e),r[0][i]=n[0],r[1][i]=n[1]})),{tags:t.tags,id:t.id,index:t.index,type:"line",vertices:r}}))}function q(t,e){var n=U.d();return t.geometry.map((function(i){return Y(n,i,e),{tags:t.tags,id:t.id,index:t.index,type:"point",vertices:[[n[0]],[n[1]]]}}))}function Y(t,e,n){var i=X(e,n);t[0]=i[0],t[1]=i[1],t[2]=e[2]}function X(t,e){return[Object(G.d)(t[0]/e*Z.i,0,Z.i),Object(G.d)((e-t[1])/e*Z.i,0,Z.i)]}function K(t,e){return t[0]<0||t[0]>e||t[1]<0||t[1]>e}function J(t,e,n){return t[0]>n&&e[0]>n||t[0]<0&&e[0]<0||t[1]>n&&e[1]>n||t[1]<0&&e[1]<0}var Q=n(3),$={maxZoom:f.b,tolerance:3,extent:4096,buffer:1,debug:0,lineMetrics:!1,promoteId:null,generateId:!1,generateIndex:!0,indexMaxZoom:0,indexMaxPoints:1e5},tt=function(){function t(t){this.options=t}return t.prototype.fetchTile=function(t){var e=Object(Q.p)(t),n=e[0],i=e[1],r=e[2],o={components:[]},a=this.geoJsonVtInstance.getTile(r,n,i);if(!a)return Promise.resolve(o);for(var s=0,c=a.features;s<c.length;s++){var l=c[s];switch(l.type){case 1:o.components=o.components.concat(q(l,4096));break;case 2:o.components=o.components.concat(V(l,4096));break;case 3:o.components=o.components.concat(W(l,4096));break;default:console.warn("unsupported type ",a)}}return Promise.resolve(o)},t.prototype.destroy=function(){this.geoJsonVT=void 0},Object.defineProperty(t.prototype,"geoJsonVtInstance",{get:function(){var t,e,n;return this.geoJsonVT||(this.geoJsonVT=(e=this.options.data,n=Object(d.a)(Object(d.a)({},$),{maxZoom:null!==(t=this.options.maxZoom)&&void 0!==t?t:$.maxZoom}),new B(e,n))),this.geoJsonVT},enumerable:!1,configurable:!0}),t}();function et(t,e){switch(t.type){case"Point":e(t.coordinates);break;case"LineString":case"MultiPoint":t.coordinates.forEach(e);break;case"Polygon":case"MultiLineString":t.coordinates.forEach((function(t){return t.forEach(e)}));break;case"MultiPolygon":t.coordinates.forEach((function(t){return t.forEach((function(t){return t.forEach(e)}))}))}}function nt(t,e){var n=[0,0,0];return Object(Q.k)(n,Object(Q.l)(t),e),{type:"point",vertices:[[n[0]],[n[1]]]}}function it(t,e){var n=[[],[]],i=[0,0,0];return t.forEach((function(t,r){Object(Q.k)(i,Object(Q.l)(t),e),n[0][r]=i[0],n[1][r]=i[1]})),{type:"line",vertices:n}}function rt(t,e){var n=[],i=[],r=[],o=[],a=[];t.forEach((function(t){var n=t.map((function(t){return Object(Q.k)(a,Object(Q.l)(t),e),[Math.max(Math.min(a[0],65535),0),Math.max(Math.min(a[1],65535),0)]}));o.push(n),i.length&&r.push(i.length),i.push.apply(i,n)}));for(var s=[],c=0;c<i.length;c++)s.push(i[c][0]),s.push(i[c][1]);var l=H(s,r),d=function(t){for(var e=[[],[],[]],r=0;r<3;r++)e[0][r]=i[l[t+r]][0],e[1][r]=i[l[t+r]][1],e[2][r]=0;o.forEach((function(t){var n=[[],[],[]];t.forEach((function(t,e){n[0][e]=t[0],n[1][e]=t[1]})),u(e,n)})),n.push({type:"polygon",vertices:e})};for(c=0;c<l.length;c+=3)d(c);return n}var ot=n(72),at=n(0),st=function(){function t(t){var e=this;this.tileLoader=new ot.a("json"),this.options=t,this.url=function(t){var n=Object(Q.p)(t),i=n[0],r=n[1],o=n[2];return Object(G.q)(e.options.url,{x:i.toString(),y:r.toString(),z:o.toString(),subdomain:at.tiles.subdomains[Math.abs(i+r)%at.tiles.subdomains.length]})}}return t.prototype.fetchTile=function(t){var e=this;return this.tileLoader.fetch(t,this.url).then((function(n){if(!n)return{components:[]};if(e.options.hillshadeEncoded){var i=Object(Q.p)(t),o=i[0],a=i[1],s=i[2],c=0,l=0;u=function(t){var e,n;c-=t[0],l-=t[1],t[0]=(e=o+c/f.c,n=s,e/Math.pow(2,n)*360-180),t[1]=function(t,e){var n=Math.PI-2*Math.PI*t/Math.pow(2,e);return 180/Math.PI*Math.atan(.5*(Math.exp(n)-Math.exp(-n)))}(a+l/f.c,s)},n.features.forEach((function(t){"GeometryCollection"===t.geometry.type?t.geometry.geometries.forEach((function(t){return et(t,u)})):et(t.geometry,u)}))}var u;return function(t,e){var n={components:[]};return t.features.forEach((function(t,i){var r;(r=n.components).push.apply(r,function t(e,n){switch(e.type){case"GeometryCollection":return t(e,n);case"Point":case"MultiPoint":return function(t,e){return"Point"===t.type?[nt(t.coordinates,e)]:t.coordinates.map((function(t){return nt(t,e)}))}(e,n);case"LineString":case"MultiLineString":return function(t,e){return"LineString"===t.type?[it(t.coordinates,e)]:t.coordinates.map((function(t){return it(t,e)}))}(e,n);case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?rt(t.coordinates,e):t.coordinates.reduce((function(t,n){return t.concat(rt(n,e))}),[])}(e,n)}}(t.geometry,e).map((function(e){return Object(d.a)(Object(d.a)({},e),{index:i,id:t.id,tags:t.properties||{}})})))})),n}(n,Object(r.e)(t))}))},t.prototype.abortTile=function(t){this.tileLoader.abortRequest(Object(r.c)(t))},t.prototype.destroy=function(){this.tileLoader.destroy()},t}(),ct=function(){function t(t,e,n){this.scope=t,this.options=e,this.id=n,t.sources[n]=this,this.tileData={},this.styleManager=t.styleManager,this.collector=t.collector,this.sourceAttrs=this.options.attributes||{},this.metatile=Object(o.a)(["id","db_label","db_label2","selected","hovered","componentDistanceStart","objectLength","beginningIsCut","endingIsCut"]),this.tileServer="url"in e?new st(e):new tt(e)}return t.prototype.fetchTile=function(t){var e=this,n=Object(r.c)(t);return this.tileData[n]?Promise.resolve(this.tileData[n]):this.tileServer.fetchTile(t).then((function(t){return e.tileData[n]=t,t}))},t.prototype.abortTileFetch=function(t){this.tileServer instanceof st&&this.tileServer.abortTile(t)},t.prototype.generateTile=function(t,e,n,l){var u=this,d=Object(r.c)(e),f=this.tileData[d],h=Object(r.e)(e),p=[],m=[],v=this.styleManager.getStyle(t.handyStyleId),_=new s.a,y=new s.a(n);if(!v)return Promise.resolve({results:p,transferable:m});f&&f.components.forEach((function(e){var n=u.metatile.tileProps,r=[],d=Object.keys(e.tags);Object(o.b)(u.metatile,d);for(var f=0,p=d;f<p.length;f++)r[n[x=p[f]]]=e.tags[x];var m=Object.keys(u.sourceAttrs);Object(o.b)(u.metatile,m);for(var g=0,b=m;g<b.length;g++){var x;r[n[x=b[g]]]=u.sourceAttrs[x]}var w="url"in u.options&&u.options.preventInteractions?NaN:[e.index,u.id];if(Array.isArray(w)){var S=y.has(w);r[n.selected]=S?1:0,_.add(w)}var I=h.coords,j=I[3],O=Object(a.e)(l),M=u.styleManager.getLayers(v.id,n,r).filter((function(t){return n=e.type,i=t.type,!!c[n][i];var n,i}));r[n.id]=w,"point"!==e.type&&"line"!==e.type||(void 0===r[n.db_label]&&(r[n.db_label]=NaN),void 0===r[n.db_label2]&&(r[n.db_label2]=NaN)),"line"===e.type&&(r[n.componentDistanceStart]=0,r[n.objectLength]=function(t){for(var e=t.vertices[0],n=t.vertices[1],i=0,r=0;r<e.length-1;r++)i+=Math.hypot(e[r]-e[r+1],n[r]-n[r+1]);return i}(e),r[n.beginningIsCut]=0,r[n.endingIsCut]=0),Object(i.a)(u.collector,v,M,j,u.metatile,n,r,u.sourceAttrs,t.styleState,I,1,O,e.vertices,new s.a)})),this.collector.setGeoIds(new Uint32Array(_.toFlatArray()));var g=this.collector.getAccumulatedData();return p.push({regionId:0,metatileHash:0,collectorOutput:g,styleId:v.id}),m.push.apply(m,g.transferable),Promise.resolve({results:p,transferable:m})},t.prototype.getObjectAttributes=function(t,e){var n=this.tileData[e];if(n){var i=n.components.find((function(e){return e.index===t}));if(i)return i.tags}},t.prototype.deleteTile=function(t){delete this.tileData[Object(r.c)(t)]},t.prototype.setSourceAttrs=function(t){this.sourceAttrs=t},t.prototype.destroy=function(){delete this.scope.sources[this.id],this.tileData={},this.sourceAttrs={},this.tileServer.destroy()},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n(1),r=n(19);function o(t){return"boolean"!=typeof t&&"attrs"===t.type}function a(t){return"boolean"!=typeof t&&"unextractable"===t.type}function s(t){if(Object(r.e)(t))return[Boolean(t)];var e=[],n=[];switch(t.type){case"all":for(var i=0,l=t.array.map(s);i<l.length;i++){for(var u=[],d=0,f=l[i];d<f.length;d++){var h=f[d];if(!1===h)return[!1];o(h)?u.push(h):a(h)&&n.push(h)}u.length>0&&(e=0===e.length?u:c(e,u))}break;case"match":if(Object(r.e)(t.input)||"get"!==t.input.type&&"sourceAttr"!==t.input.type)return[{type:"unextractable",exp:t}];for(var p=t.input.property,m=function(t){var i=s(t.output),r=[];t.values.forEach((function(t){var e;r.push({type:"attrs",attrs:(e={},e[p]=t,e)})}));for(var l=0,u=i;l<u.length;l++){var d=u[l];if(o(d))for(var f=0,h=c([d],r);f<h.length;f++){var m=h[f];e.push(m)}else if(a(d)){n.push(d);for(var v=0,_=r;v<_.length;v++){var y=_[v];e.push(y)}}else if(!0===d)for(var g=0,b=r;g<b.length;g++)y=b[g],e.push(y)}},v=0,_=t.cases;v<_.length;v++)m(_[v]);break;default:return[{type:"unextractable",exp:t}]}return e.concat(n)}function c(t,e){for(var n=[],r=0,o=t;r<o.length;r++)for(var a=o[r],s=0,c=e;s<c.length;s++){var l=c[s];n.push({type:"attrs",attrs:Object(i.a)(Object(i.a)({},a.attrs),l.attrs)})}return n}var l=function(){function t(){this.layers=[],this.keyStat={},this.orderedKeys=[],this.tree=null,this.treeNodesCount=0,this.traverseCount=0,this.traverseIterations=0}return t.prototype.addLayers=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];i.filter&&(this.layers.push(i),this.statLayerKeys(i))}this.buildTree()},t.prototype.getLayers=function(t,e){var n=this,i=[],r=function(o,a){if(n.traverseIterations+=1,o){for(var s=0,c=o.leafs;s<c.length;s++){var l=c[s];i.push(l)}var u=n.orderedKeys[a];if(u){var d=e[t[u]];void 0!==d?(r(o.children[d],a+1),r(o.novalue,a+1)):r(o.novalue,a+1)}}};return this.traverseCount+=1,r(this.tree,0),i},t.prototype.stat=function(){var t=this.traverseIterations/this.traverseCount||0;return{tree:this.tree,treeNodes:this.treeNodesCount,layers:this.layers.length,keyStat:this.keyStat,itersPerTraverse:t}},t.prototype.statLayerKeys=function(t){var e=s(t.filter).filter((function(t){return o(t)}))[0];if(e&&o(e))for(var n in e.attrs)void 0===this.keyStat[n]&&(this.keyStat[n]=0),this.keyStat[n]+=1},t.prototype.getOrderedKeys=function(){return Object.entries(this.keyStat).sort((function(t,e){t[0];var n=t[1];return e[0],e[1]-n})).map((function(t){var e=t[0];return t[1],e}))},t.prototype.buildTree=function(){this.orderedKeys=this.getOrderedKeys();for(var t=[],e=0,n=this.layers;e<n.length;e++){var i=n[e],r=s(i.filter).filter(o);0===r.length&&t.push(i);for(var a=0,c=r;a<c.length;a++)for(var l=c[a],u=new Set(Object.keys(l.attrs)),d=0,f=l.attrs,h=this.tree,p=0;p<=this.orderedKeys.length;p++){if(d===u.size){null==h||h.leafs.push(i);break}var m=this.orderedKeys[p],v=this.orderedKeys[p+1]||"";if(h||(h=this.makeTreeNode(m),null===this.tree&&(this.tree=h)),u.has(m)){var _=f[m];h.children[_]||(h.children[_]=this.makeTreeNode(v)),h=h.children[_],d+=1}else h.novalue||(h.novalue=this.makeTreeNode(v)),h=h.novalue}}t.length>0&&(this.tree||(this.tree=this.makeTreeNode("")),this.tree.leafs=t)},t.prototype.makeTreeNode=function(t){return this.treeNodesCount+=1,{key:t,children:{},novalue:null,leafs:[]}},t}(),u=function(){function t(){this.metaStyles=new Map,this.layerTrees=new Map}return t.prototype.proxySyncStyle=function(t){var e=new l;e.addLayers(t.layers),this.layerTrees.set(t.id,e),this.metaStyles.set(t.id,t)},t.prototype.getStyle=function(t){return this.metaStyles.get(t)},t.prototype.getLayers=function(t,e,n){var i=this.layerTrees.get(t);return i?i.getLayers(e,n):[]},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n(32),r=n(27),o=n(9);function a(t){var e=t.currentMod;return void 0!==e&&e.ready}function s(t,e){var n=t.currentMod;return void 0!==n&&void 0!==e[n.key]}function c(t,e){var n=e.currentMod;void 0!==n&&(t[n.key]=n)}function l(t,e,n){for(var i=0,r=e;i<r.length;i++)for(var a=r[i],s=0,c=Object(o.p)(n,a);s<c.length;s++)l=t,void 0!==(u=c[s].currentMod)&&delete l[u.key];var l,u}var u=n(26);function d(t,e,n){for(var i in function(t,e,n){for(var i in t.tiles)Object(u.m)(t.tiles[i],t.tileModsCache,e,n)}(t,e,n),f(t),p(t),t.displayedMods)t.tileModsCache.get(i);(function(t){var e=t.tiles,n=t.displayedMods,i=t.viewportTiles;for(var r in e)if(!i.includes(r)){var o=e[r],a=o.currentMod;a&&!n[a.key]&&Object(u.i)(o)}})(t),m(t)}function f(t){var e=t.tilesAppearance,n=t.tiles,o=t.viewportTiles;switch(e){case i.a.ByOne:h(n,o);break;case i.a.WaitingAll:Object(r.j)(n,o)&&(t.tilesAppearance=i.a.ByOne,h(n,o))}}function h(t,e){for(var n=0;n<e.length;n++){var i=e[n];Object(u.c)(t[i])}}function p(t){var e=t.tiles,n=t.viewportTiles,r=t.zoomDirection,u=t.zoomStartZoom,d=t.maxZoomLevel,f=t.zoomLevel,h=t.displayedMods;switch(r){case i.b.Stationary:t.displayedMods=function(t,e){for(var n={},i=0,r=e;i<r.length;i++){var o=t[r[i]];a(o)&&c(n,o)}return n}(e,n);break;case i.b.ZoomingIn:t.displayedMods=function(t,e,n,i,r){for(var u={},d=[],f=0,h=e;f<h.length;f++){var p=t[h[f]];if(a(p))c(u,p);else for(var m=p.detailLevel-1;m>=i;m--){var v=Object(o.q)(t,p,m,r);if(void 0!==v&&!d.includes(v)&&a(v)&&s(v,n)){c(u,v),d.push(v);break}}}return l(u,d,t),u}(e,n,h,u,d);break;case i.b.ZoomingOut:t.displayedMods=function(t,e,n,i,r,u){var d={},f=[],h=new Set(e);for(var p in t){var m=t[p];h.has(m.key)?a(m)&&(c(d,m),f.push(m)):m.detailLevel>r||m.detailLevel<i||h.has(Object(o.j)(m,i,u))&&a(m)&&s(m,n)&&(c(d,m),m.detailLevel<r&&f.push(m))}return l(d,f,t),d}(e,n,h,f,u,d)}}function m(t){switch(t.zoomDirection){case i.b.ZoomingIn:(t.zoomLevel<=t.zoomStartZoom||v(t))&&(t.zoomDirection=i.b.Stationary,t.zoomStartZoom=t.zoomLevel);break;case i.b.ZoomingOut:(t.zoomLevel>=t.zoomStartZoom||v(t))&&(t.zoomDirection=i.b.Stationary,t.zoomStartZoom=t.zoomLevel)}}function v(t){for(var e=t.tiles,n=t.viewportTiles,i=t.displayedMods,r=0;r<n.length;r++){var o=e[n[r]],a=Object(u.h)(o);if(!a)return!1;if(void 0===i[a.key])return!1}return!0}},function(t,e,n){"use strict";var i=e.TileRequestUrl={};i.read=function(t,e){return t.readFields(i._readField,{tiles:[]},e)},i._readField=function(t,e,n){1===t&&e.tiles.push(i.Tile.read(n,n.readVarint()+n.pos))},i.write=function(t,e){if(t.tiles)for(var n=0;n<t.tiles.length;n++)e.writeMessage(1,i.Tile.write,t.tiles[n])},i.Tile={},i.Tile.read=function(t,e){return t.readFields(i.Tile._readField,{x:0,y:0,zoom:0},e)},i.Tile._readField=function(t,e,n){1===t?e.x=n.readVarint():2===t?e.y=n.readVarint():3===t&&(e.zoom=n.readVarint())},i.Tile.write=function(t,e){t.x&&e.writeVarintField(1,t.x),t.y&&e.writeVarintField(2,t.y),t.zoom&&e.writeVarintField(3,t.zoom)};var r=e.TileResponseData={};r.read=function(t,e){return t.readFields(r._readField,{tileGroups:[]},e)},r._readField=function(t,e,n){1===t&&e.tileGroups.push(r.TileGroup.read(n,n.readVarint()+n.pos))},r.write=function(t,e){if(t.tileGroups)for(var n=0;n<t.tileGroups.length;n++)e.writeMessage(1,r.TileGroup.write,t.tileGroups[n])},r.TileGroup={},r.TileGroup.read=function(t,e){return t.readFields(r.TileGroup._readField,{x:0,y:0,zoom:0,tiles:[]},e)},r.TileGroup._readField=function(t,e,n){1===t?e.x=n.readVarint():2===t?e.y=n.readVarint():3===t?e.zoom=n.readVarint():4===t&&e.tiles.push(r.TileGroup.Tile.read(n,n.readVarint()+n.pos))},r.TileGroup.write=function(t,e){if(t.x&&e.writeVarintField(1,t.x),t.y&&e.writeVarintField(2,t.y),t.zoom&&e.writeVarintField(3,t.zoom),t.tiles)for(var n=0;n<t.tiles.length;n++)e.writeMessage(4,r.TileGroup.Tile.write,t.tiles[n])},r.TileGroup.Tile={},r.TileGroup.Tile.read=function(t,e){return t.readFields(r.TileGroup.Tile._readField,{regionId:0,hash:null,data:null},e)},r.TileGroup.Tile._readField=function(t,e,n){1===t?e.regionId=n.readVarint():2===t?e.hash=n.readBytes():3===t&&(e.data=n.readBytes())},r.TileGroup.Tile.write=function(t,e){t.regionId&&e.writeVarintField(1,t.regionId),t.hash&&e.writeBytesField(2,t.hash),t.data&&e.writeBytesField(3,t.data)}},function(t,e,n){function i(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n.oe=function(t){throw console.error(t),t};var i=n(n.s=ENTRY_MODULE);return i.default||i}function r(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(t,e,i){var o={};o[i]=[];var a=e.toString(),s=a.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return o;for(var c,l=s[1],u=new RegExp("(\\\\n|\\W)"+r(l)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");c=u.exec(a);)"dll-reference"!==c[3]&&o[i].push(c[3]);for(u=new RegExp("\\("+r(l)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");c=u.exec(a);)t[c[2]]||(o[i].push(c[1]),t[c[2]]=n(c[1]).m),o[c[2]]=o[c[2]]||[],o[c[2]].push(c[4]);for(var d,f=Object.keys(o),h=0;h<f.length;h++)for(var p=0;p<o[f[h]].length;p++)d=o[f[h]][p],isNaN(1*d)||(o[f[h]][p]=1*o[f[h]][p]);return o}function a(t){return Object.keys(t).reduce((function(e,n){return e||t[n].length>0}),!1)}t.exports=function(t,e){e=e||{};var r={main:n.m},s=e.all?{main:Object.keys(r.main)}:function(t,e){for(var n={main:[e]},i={main:[]},r={main:{}};a(n);)for(var s=Object.keys(n),c=0;c<s.length;c++){var l=s[c],u=n[l].pop();if(r[l]=r[l]||{},!r[l][u]&&t[l][u]){r[l][u]=!0,i[l]=i[l]||[],i[l].push(u);for(var d=o(t,t[l][u],l),f=Object.keys(d),h=0;h<f.length;h++)n[f[h]]=n[f[h]]||[],n[f[h]]=n[f[h]].concat(d[f[h]])}}return i}(r,t),c="";Object.keys(s).filter((function(t){return"main"!==t})).forEach((function(t){for(var e=0;s[t][e];)e++;s[t].push(e),r[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",c=c+"var "+t+" = ("+i.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s[t].map((function(e){return JSON.stringify(e)+": "+r[t][e].toString()})).join(",")+"});\n"})),c=c+"new (("+i.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s.main.map((function(t){return JSON.stringify(t)+": "+r.main[t].toString()})).join(",")+"}))(self);";var l=new window.Blob([c],{type:"text/javascript"});if(e.bare)return l;var u=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(l),d=new window.Worker(u);return d.objectURL=u,d}},function(t,e){var n="function"==typeof Float32Array;function i(t,e){return 1-3*e+3*t}function r(t,e){return 3*e-6*t}function o(t){return 3*t}function a(t,e,n){return((i(e,n)*t+r(e,n))*t+o(e))*t}function s(t,e,n){return 3*i(e,n)*t*t+2*r(e,n)*t+o(e)}function c(t){return t}t.exports=function(t,e,i,r){if(!(0<=t&&t<=1&&0<=i&&i<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&i===r)return c;for(var o=n?new Float32Array(11):new Array(11),l=0;l<11;++l)o[l]=a(.1*l,t,i);function u(e){for(var n=0,r=1;10!==r&&o[r]<=e;++r)n+=.1;--r;var c=n+(e-o[r])/(o[r+1]-o[r])*.1,l=s(c,t,i);return l>=.001?function(t,e,n,i){for(var r=0;r<4;++r){var o=s(e,n,i);if(0===o)return e;e-=(a(e,n,i)-t)/o}return e}(e,c,t,i):0===l?c:function(t,e,n,i,r){var o,s,c=0;do{(o=a(s=e+(n-e)/2,i,r)-t)>0?n=s:e=s}while(Math.abs(o)>1e-7&&++c<10);return s}(e,n,n+.1,t,i)}return function(t){return 0===t?0:1===t?1:a(u(t),e,r)}}},function(t,e,n){"use strict";var i=e.Complex={};i.read=function(t,e){return t.readFields(i._readField,{id:"",name:"",address:"",type:0,regionId:0,branchId:"",branchCount:0,buildings:[],hull:[],tileCoords:[],center:[],centroid:[],scaleFactor:0,viewAngle:0,bound:null,floorCount:0,defaultFloor:0,floorNames:[],entities:[],floorGeometries:[],outdoors:[],metaRubrics:[],version:0,hybrids:[]},e)},i._readField=function(t,e,n){1===t?e.id=n.readString():2===t?e.name=n.readString():3===t?e.address=n.readString():4===t?e.type=n.readVarint():5===t?e.regionId=n.readVarint():6===t?e.branchId=n.readString():7===t?e.branchCount=n.readVarint():8===t?e.buildings.push(n.readString()):9===t?n.readPackedSVarint(e.hull):10===t?n.readPackedDouble(e.tileCoords):11===t?n.readPackedSVarint(e.center):12===t?n.readPackedDouble(e.centroid):13===t?e.scaleFactor=n.readDouble():14===t?e.viewAngle=n.readDouble():15===t?e.bound=i.Bound.read(n,n.readVarint()+n.pos):16===t?e.floorCount=n.readVarint():17===t?e.defaultFloor=n.readVarint():18===t?e.floorNames.push(n.readString()):19===t?e.entities.push(i.Entity.read(n,n.readVarint()+n.pos)):20===t?e.floorGeometries.push(i.Floor.read(n,n.readVarint()+n.pos)):21===t?e.outdoors.push(i.OutdoorObject.read(n,n.readVarint()+n.pos)):22===t?e.metaRubrics.push(i.Metarubric.read(n,n.readVarint()+n.pos)):23===t?e.version=n.readVarint():24===t&&e.hybrids.push(n.readString())},i.write=function(t,e){if(t.id&&e.writeStringField(1,t.id),t.name&&e.writeStringField(2,t.name),t.address&&e.writeStringField(3,t.address),t.type&&e.writeVarintField(4,t.type),t.regionId&&e.writeVarintField(5,t.regionId),t.branchId&&e.writeStringField(6,t.branchId),t.branchCount&&e.writeVarintField(7,t.branchCount),t.buildings)for(var n=0;n<t.buildings.length;n++)e.writeStringField(8,t.buildings[n]);if(t.hull&&e.writePackedSVarint(9,t.hull),t.tileCoords&&e.writePackedDouble(10,t.tileCoords),t.center&&e.writePackedSVarint(11,t.center),t.centroid&&e.writePackedDouble(12,t.centroid),t.scaleFactor&&e.writeDoubleField(13,t.scaleFactor),t.viewAngle&&e.writeDoubleField(14,t.viewAngle),t.bound&&e.writeMessage(15,i.Bound.write,t.bound),t.floorCount&&e.writeVarintField(16,t.floorCount),t.defaultFloor&&e.writeVarintField(17,t.defaultFloor),t.floorNames)for(n=0;n<t.floorNames.length;n++)e.writeStringField(18,t.floorNames[n]);if(t.entities)for(n=0;n<t.entities.length;n++)e.writeMessage(19,i.Entity.write,t.entities[n]);if(t.floorGeometries)for(n=0;n<t.floorGeometries.length;n++)e.writeMessage(20,i.Floor.write,t.floorGeometries[n]);if(t.outdoors)for(n=0;n<t.outdoors.length;n++)e.writeMessage(21,i.OutdoorObject.write,t.outdoors[n]);if(t.metaRubrics)for(n=0;n<t.metaRubrics.length;n++)e.writeMessage(22,i.Metarubric.write,t.metaRubrics[n]);if(t.version&&e.writeVarintField(23,t.version),t.hybrids)for(n=0;n<t.hybrids.length;n++)e.writeStringField(24,t.hybrids[n])},i.ComplexType={mall:{value:0,options:{}},other:{value:1,options:{}},office:{value:2,options:{}}},i.Metarubric={},i.Metarubric.read=function(t,e){return t.readFields(i.Metarubric._readField,{id:"",orgCount:0},e)},i.Metarubric._readField=function(t,e,n){1===t?e.id=n.readString():2===t&&(e.orgCount=n.readVarint())},i.Metarubric.write=function(t,e){t.id&&e.writeStringField(1,t.id),t.orgCount&&e.writeVarintField(2,t.orgCount)},i.Bound={},i.Bound.read=function(t,e){return t.readFields(i.Bound._readField,{min:[],max:[]},e)},i.Bound._readField=function(t,e,n){1===t?n.readPackedSVarint(e.min):2===t&&n.readPackedSVarint(e.max)},i.Bound.write=function(t,e){t.min&&e.writePackedSVarint(1,t.min),t.max&&e.writePackedSVarint(2,t.max)},i.Entity={},i.Entity.read=function(t,e){return t.readFields(i.Entity._readField,{id:"",sublayer:"",coordinates:[],iconId:0,areaId:0,firmId:"",floorIndex:0,floorName:"",text:"",layer:"",priority:0,textPriority:0,type:0,text2:"",humanReadableIconId:""},e)},i.Entity._readField=function(t,e,n){1===t?e.id=n.readString():2===t?e.sublayer=n.readString():3===t?n.readPackedVarint(e.coordinates):4===t?e.iconId=n.readVarint():5===t?e.areaId=n.readVarint():6===t?e.firmId=n.readString():7===t?e.floorIndex=n.readVarint():8===t?e.floorName=n.readString():9===t?e.text=n.readString():10===t?e.layer=n.readString():11===t?e.priority=n.readVarint(!0):12===t?e.textPriority=n.readVarint(!0):13===t?e.type=n.readVarint():14===t?e.text2=n.readString():15===t&&(e.humanReadableIconId=n.readString())},i.Entity.write=function(t,e){t.id&&e.writeStringField(1,t.id),t.sublayer&&e.writeStringField(2,t.sublayer),t.coordinates&&e.writePackedVarint(3,t.coordinates),t.iconId&&e.writeVarintField(4,t.iconId),t.areaId&&e.writeVarintField(5,t.areaId),t.firmId&&e.writeStringField(6,t.firmId),t.floorIndex&&e.writeVarintField(7,t.floorIndex),t.floorName&&e.writeStringField(8,t.floorName),t.text&&e.writeStringField(9,t.text),t.layer&&e.writeStringField(10,t.layer),t.priority&&e.writeVarintField(11,t.priority),t.textPriority&&e.writeVarintField(12,t.textPriority),t.type&&e.writeVarintField(13,t.type),t.text2&&e.writeStringField(14,t.text2),t.humanReadableIconId&&e.writeStringField(15,t.humanReadableIconId)},i.Floor={},i.Floor.read=function(t,e){return t.readFields(i.Floor._readField,{name:"",rooms:[]},e)},i.Floor._readField=function(t,e,n){1===t?e.name=n.readString():2===t&&e.rooms.push(i.Room.read(n,n.readVarint()+n.pos))},i.Floor.write=function(t,e){if(t.name&&e.writeStringField(1,t.name),t.rooms)for(var n=0;n<t.rooms.length;n++)e.writeMessage(2,i.Room.write,t.rooms[n])},i.Room={},i.Room.read=function(t,e){return t.readFields(i.Room._readField,{id:0,type:0,sublayer:"",isIsland:!1,firmIds:[],area:[],wallSide:[],wallTop:[],areaSublayer:"",wallSublayer:""},e)},i.Room._readField=function(t,e,n){1===t?e.id=n.readVarint():2===t?e.type=n.readVarint():3===t?e.sublayer=n.readString():4===t?e.isIsland=n.readBoolean():5===t?e.firmIds.push(n.readString()):6===t?e.area.push(n.readBytes()):7===t?e.wallSide.push(n.readBytes()):8===t?e.wallTop.push(n.readBytes()):9===t?e.areaSublayer=n.readString():10===t&&(e.wallSublayer=n.readString())},i.Room.write=function(t,e){if(t.id&&e.writeVarintField(1,t.id),t.type&&e.writeVarintField(2,t.type),t.sublayer&&e.writeStringField(3,t.sublayer),t.isIsland&&e.writeBooleanField(4,t.isIsland),t.firmIds)for(var n=0;n<t.firmIds.length;n++)e.writeStringField(5,t.firmIds[n]);if(t.area)for(n=0;n<t.area.length;n++)e.writeBytesField(6,t.area[n]);if(t.wallSide)for(n=0;n<t.wallSide.length;n++)e.writeBytesField(7,t.wallSide[n]);if(t.wallTop)for(n=0;n<t.wallTop.length;n++)e.writeBytesField(8,t.wallTop[n]);t.areaSublayer&&e.writeStringField(9,t.areaSublayer),t.wallSublayer&&e.writeStringField(10,t.wallSublayer)},i.OutdoorObject={},i.OutdoorObject.read=function(t,e){return t.readFields(i.OutdoorObject._readField,{type:"",vertices:[],width:0},e)},i.OutdoorObject._readField=function(t,e,n){1===t?e.type=n.readString():2===t?e.vertices.push(n.readBytes()):3===t&&(e.width=n.readDouble())},i.OutdoorObject.write=function(t,e){if(t.type&&e.writeStringField(1,t.type),t.vertices)for(var n=0;n<t.vertices.length;n++)e.writeBytesField(2,t.vertices[n]);t.width&&e.writeDoubleField(3,t.width)}},function(t,e,n){"use strict";t.exports=r,t.exports.default=r;var i=n(103);function r(t,e){if(!(this instanceof r))return new r(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i<e.length;i++)if(n(t,e[i]))return i;return-1}function a(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,i,r){r||(r=m(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=e;a<n;a++)o=t.children[a],c(r,t.leaf?i(o):o);return r}function c(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function h(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,n,r,o){for(var a,s=[e,n];s.length;)(n=s.pop())-(e=s.pop())<=r||(a=e+Math.ceil((n-e)/r/2)*r,i(t,a,e,n,o),s.push(e,a,a,n))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],i=this.toBBox;if(!p(t,e))return n;for(var r,o,a,s,c=[];e;){for(r=0,o=e.children.length;r<o;r++)a=e.children[r],p(t,s=e.leaf?i(a):a)&&(e.leaf?n.push(a):h(t,s)?this._all(a,n):c.push(a));e=c.pop()}return n},collides:function(t){var e=this.data,n=this.toBBox;if(!p(t,e))return!1;for(var i,r,o,a,s=[];e;){for(i=0,r=e.children.length;i<r;i++)if(o=e.children[i],p(t,a=e.leaf?n(o):o)){if(e.leaf||h(t,a))return!0;s.push(o)}e=s.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var r=this.data;this.data=i,i=r}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(t,e){if(!t)return this;for(var n,i,r,a,s=this.data,c=this.toBBox(t),l=[],u=[];s||l.length;){if(s||(s=l.pop(),i=l[l.length-1],n=u.pop(),a=!0),s.leaf&&-1!==(r=o(t,s.children,e)))return s.children.splice(r,1),l.push(s),this._condense(l),this;a||s.leaf||!h(s,c)?i?(n++,s=i.children[n],a=!1):s=null:(l.push(s),u.push(n),n=0,i=s,s=s.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n,i){var r,o=n-e+1,s=this._maxEntries;if(o<=s)return a(r=m(t.slice(e,n+1)),this.toBBox),r;i||(i=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,i-1))),(r=m([])).leaf=!1,r.height=i;var c,l,u,d,f=Math.ceil(o/s),h=f*Math.ceil(Math.sqrt(s));for(v(t,e,n,h,this.compareMinX),c=e;c<=n;c+=h)for(v(t,c,u=Math.min(c+h-1,n),f,this.compareMinY),l=c;l<=u;l+=f)d=Math.min(l+f-1,u),r.children.push(this._build(t,l,d,i-1));return a(r,this.toBBox),r},_chooseSubtree:function(t,e,n,i){for(var r,o,a,s,c,l,u,f,h,p;i.push(e),!e.leaf&&i.length-1!==n;){for(u=f=1/0,r=0,o=e.children.length;r<o;r++)c=d(a=e.children[r]),h=t,p=a,(l=(Math.max(p.maxX,h.maxX)-Math.min(p.minX,h.minX))*(Math.max(p.maxY,h.maxY)-Math.min(p.minY,h.minY))-c)<f?(f=l,u=c<u?c:u,s=a):l===f&&c<u&&(u=c,s=a);e=s||e.children[0]}return e},_insert:function(t,e,n){var i=this.toBBox,r=n?t:i(t),o=[],a=this._chooseSubtree(r,this.data,e,o);for(a.children.push(t),c(a,r);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)},_split:function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),s=m(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,a(n,this.toBBox),a(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var i,r,o,a,c,l,u,f,h,p,m,v,_,y;for(l=u=1/0,i=e;i<=n-e;i++)h=r=s(t,0,i,this.toBBox),p=o=s(t,i,n,this.toBBox),m=Math.max(h.minX,p.minX),v=Math.max(h.minY,p.minY),_=Math.min(h.maxX,p.maxX),y=Math.min(h.maxY,p.maxY),a=Math.max(0,_-m)*Math.max(0,y-v),c=d(r)+d(o),a<l?(l=a,f=i,u=c<u?c:u):a===l&&c<u&&(u=c,f=i);return f},_chooseSplitAxis:function(t,e,n){var i=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)},_allDistMargin:function(t,e,n,i){t.children.sort(i);var r,o,a=this.toBBox,l=s(t,0,e,a),u=s(t,n-e,n,a),d=f(l)+f(u);for(r=e;r<n-e;r++)o=t.children[r],c(l,t.leaf?a(o):o),d+=f(l);for(r=n-e-1;r>=e;r--)o=t.children[r],c(u,t.leaf?a(o):o),d+=f(u);return d},_adjustParentBBoxes:function(t,e,n){for(var i=n;i>=0;i--)c(e[i],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():a(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},function(t,e){e.read=function(t,e,n,i,r){var o,a,s=8*r-i-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?r-1:0,f=n?-1:1,h=t[e+d];for(d+=f,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+t[e+d],d+=f,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=i;u>0;a=256*a+t[e+d],d+=f,u-=8);if(0===o)o=1-l;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,i),o-=l}return(h?-1:1)*a*Math.pow(2,o-i)},e.write=function(t,e,n,i,r,o){var a,s,c,l=8*o-r-1,u=(1<<l)-1,d=u>>1,f=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:o-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-a))<1&&(a--,c*=2),(e+=a+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(e*c-1)*Math.pow(2,r),a+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,r),a=0));r>=8;t[n+h]=255&s,h+=p,s/=256,r-=8);for(a=a<<r|s,l+=r;l>0;t[n+h]=255&a,h+=p,a/=256,l-=8);t[n+h-p]|=128*m}},function(t,e,n){t.exports=function(){"use strict";function t(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function e(t,e){return t<e?-1:t>e?1:0}return function(n,i,r,o,a){!function e(n,i,r,o,a){for(;o>r;){if(o-r>600){var s=o-r+1,c=i-r+1,l=Math.log(s),u=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*u*(s-u)/s)*(c-s/2<0?-1:1);e(n,i,Math.max(r,Math.floor(i-c*u/s+d)),Math.min(o,Math.floor(i+(s-c)*u/s+d)),a)}var f=n[i],h=r,p=o;for(t(n,r,i),a(n[o],f)>0&&t(n,r,o);h<p;){for(t(n,h,p),h++,p--;a(n[h],f)<0;)h++;for(;a(n[p],f)>0;)p--}0===a(n[r],f)?t(n,r,p):t(n,++p,o),p<=i&&(r=p+1),i<=p&&(o=p-1)}}(n,i,r||0,o||n.length-1,a||e)}}()},function(t,e,n){var i=n(105),r=n(106);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]),i(r,{insert:"head",singleton:!1}),t.exports=r.locals||{}},function(t,e,n){"use strict";var i,r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),o=[];function a(t){for(var e=-1,n=0;n<o.length;n++)if(o[n].identifier===t){e=n;break}return e}function s(t,e){for(var n={},i=[],r=0;r<t.length;r++){var s=t[r],c=e.base?s[0]+e.base:s[0],l=n[c]||0,u="".concat(c," ").concat(l);n[c]=l+1;var d=a(u),f={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(o[d].references++,o[d].updater(f)):o.push({identifier:u,updater:m(f,e),references:1}),i.push(u)}return i}function c(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var o=n.nc;o&&(i.nonce=o)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var a=r(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var l,u=(l=[],function(t,e){return l[t]=e,l.filter(Boolean).join("\n")});function d(t,e,n,i){var r=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=u(e,r);else{var o=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function f(t,e,n){var i=n.css,r=n.media,o=n.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var h=null,p=0;function m(t,e){var n,i,r;if(e.singleton){var o=p++;n=h||(h=c(e)),i=d.bind(null,n,o,!1),r=d.bind(null,n,o,!0)}else n=c(e),i=f.bind(null,n,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i));var n=s(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<n.length;i++){var r=a(n[i]);o[r].references--}for(var c=s(t,e),l=0;l<n.length;l++){var u=a(n[l]);0===o[u].references&&(o[u].updater(),o.splice(u,1))}n=c}}}},function(t,e,n){(e=n(107)(!1)).push([t.i,".mapgl-hover {\n    cursor: pointer;\n}\n\n.mapgl-dragging {\n    cursor: grabbing;\n}\n\n.mapgl-rotating {\n    cursor: move;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,i,r,o=t[1]||"",a=t[3];if(!a)return o;if(e&&"function"==typeof btoa){var s=(n=a,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(r," */")),c=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[o].concat(c).concat([s]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(r[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);i&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},function(t,e,n){"use strict";n.r(e),n.d(e,"config",(function(){return o})),n.d(e,"utils",(function(){return i})),n.d(e,"mapglUtils",(function(){return r})),n.d(e,"DynamicObject",(function(){return j})),n.d(e,"CircleMarker",(function(){return R})),n.d(e,"Map",(function(){return Yo})),n.d(e,"MapClass",(function(){return Yo})),n.d(e,"Entrance",(function(){return Ur})),n.d(e,"Polyline",(function(){return ra})),n.d(e,"DashedPolyline",(function(){return aa})),n.d(e,"Polygon",(function(){return la})),n.d(e,"Circle",(function(){return ua})),n.d(e,"StretchableImage",(function(){return xa})),n.d(e,"StretchableImageOptions",(function(){})),n.d(e,"StretchableImageSource",(function(){})),n.d(e,"Rect",(function(){return Aa})),n.d(e,"RectOptions",(function(){})),n.d(e,"PointLabel",(function(){return ja})),n.d(e,"PointLabelOptions",(function(){})),n.d(e,"HtmlMarker",(function(){return ar})),n.d(e,"Placement",(function(){return L.a})),n.d(e,"Marker",(function(){return La})),n.d(e,"MarkerOptions",(function(){})),n.d(e,"MarkerLabelOptions",(function(){})),n.d(e,"MarkerIconOptions",(function(){})),n.d(e,"Heatmap",(function(){return ga})),n.d(e,"GeoJsonSource",(function(){return de.d})),n.d(e,"GeoJsonSourceOptions",(function(){return de.GeoJsonSourceOptions})),n.d(e,"GeoJsonTileSource",(function(){return de.f})),n.d(e,"GeoJsonTileSourceOptions",(function(){return de.GeoJsonTileSourceOptions})),n.d(e,"RasterTileSource",(function(){return Ba})),n.d(e,"RasterTileSourceOptions",(function(){})),n.d(e,"OnlineMarker",(function(){return Na})),n.d(e,"OnlineMarkerIcon",(function(){})),n.d(e,"OnlineMarkerOptions",(function(){})),n.d(e,"MapEvent",(function(){})),n.d(e,"MapPointerEvent",(function(){})),n.d(e,"DynamicObjectPointerEvent",(function(){})),n.d(e,"DraggablePointerEvent",(function(){})),n.d(e,"TileLoadEvent",(function(){})),n.d(e,"FloorComplexHideEvent",(function(){})),n.d(e,"FloorComplexShowEvent",(function(){})),n.d(e,"InteractionEvent",(function(){})),n.d(e,"InteractionTarget",(function(){})),n.d(e,"RulerChangeEvent",(function(){})),n.d(e,"TrafficScoreEvent",(function(){})),n.d(e,"HTMLMarkerShownEvent",(function(){})),n.d(e,"CommPoiEvent",(function(){})),n.d(e,"IconTransformerParams",(function(){})),n.d(e,"PolylineOptions",(function(){})),n.d(e,"DashedPolylineOptions",(function(){})),n.d(e,"CircleMarkerOptions",(function(){})),n.d(e,"PolygonOptions",(function(){})),n.d(e,"CircleOptions",(function(){})),n.d(e,"EntranceOptions",(function(){})),n.d(e,"HtmlMarkerOptions",(function(){})),n.d(e,"HeatmapPoint",(function(){})),n.d(e,"HeatmapOptions",(function(){})),n.d(e,"HeatmapPalette",(function(){})),n.d(e,"FontName",(function(){return Mi.FontName})),n.d(e,"SourceMetatile",(function(){return Mi.SourceMetatile})),n.d(e,"TileCoords",(function(){})),n.d(e,"Viewport",(function(){})),n.d(e,"MapOptions",(function(){})),n.d(e,"Stats",(function(){})),n.d(e,"PersonalPoi",(function(){})),n.d(e,"Padding",(function(){})),n.d(e,"FirmsToFloorIndexMap",(function(){})),n.d(e,"DataTileLayer",(function(){return Ha})),n.d(e,"DataTileLayerOptions",(function(){}));var i={};n.r(i),n.d(i,"getCenterZoomByPoints",(function(){return h})),n.d(i,"getMousePositionInContainer",(function(){return p})),n.d(i,"projectMapToScreen",(function(){return a.x})),n.d(i,"projectGeoToMap",(function(){return s.l})),n.d(i,"projectMapToGeo",(function(){return s.m})),n.d(i,"geoToMapDistance",(function(){return s.b})),n.d(i,"projectGeoToScreen",(function(){return _})),n.d(i,"projectScreenToGeo",(function(){return y})),n.d(i,"getMetersFromPixels",(function(){return g}));var r={};n.r(r),n.d(r,"projectScreenToMap",(function(){return a.z})),n.d(r,"projectMapToScreen",(function(){return a.x})),n.d(r,"setVPMatrix",(function(){return a.F})),n.d(r,"getUrl",(function(){return a.p})),n.d(r,"projectGeoToMap",(function(){return s.l})),n.d(r,"projectMapToGeo",(function(){return s.m})),n.d(r,"getBounds",(function(){return s.c})),n.d(r,"hashToString",(function(){return b.f}));var o=n(0),a=n(2),s=n(3),c=n(4),l=n(13),u=n(10);function d(t,e,n){if(0!==t.length){for(var i=Object(a.g)(e),r=l.e(),o=0,d=t;o<d.length;o++){var h=d[o],p=Object(s.l)(h);Object(u.l)(p,-i),l.f(r,p)}var m=c.d();return l.a(m,r),Object(u.l)(m,i),{center:m,zoom:f(r,n)}}}function f(t,e){return Math.min(Object(u.p)(e[0],Math.abs(t.max[0]-t.min[0])),Object(u.p)(e[1],Math.abs(t.max[1]-t.min[1])))}function h(t,e,n){var i=d(t,e,n);if(i)return{zoom:i.zoom,center:Object(s.m)(i.center)}}function p(t,e,n){var i=t.getBoundingClientRect();return[e-i.left-t.clientLeft,n-i.top-t.clientTop]}function m(t,e){for(var n=[],i=0;i<t.length;i++)n[i]=p(e,t[i].clientX,t[i].clientY);return n}function v(t){return t.touches.length>1}function _(t,e,n,i,r,o,c,l){void 0===c&&(c={top:0,right:0,bottom:0,left:0}),void 0===l&&(l={top:0,right:0,bottom:0,left:0});var u={center:Object(s.l)(t),zoom:e,rotation:Object(a.g)(n),size:i,pitch:Object(a.g)(r),viewport:c,padding:l};return Object(a.x)(u,Object(s.l)(o))}function y(t,e,n,i,r,o,c,l){void 0===c&&(c={top:0,right:0,bottom:0,left:0}),void 0===l&&(l={top:0,right:0,bottom:0,left:0});var u={center:Object(s.l)(t),zoom:e,rotation:Object(a.g)(n),size:i,pitch:Object(a.g)(r),viewport:c,padding:l};return Object(s.m)(Object(a.z)(u,o))}function g(t,e,n,i,r,o,c,l,u){void 0===c&&(c={top:0,right:0,bottom:0,left:0}),void 0===l&&(l={top:0,right:0,bottom:0,left:0});var d={center:Object(s.l)(t),zoom:e,rotation:Object(a.g)(n),size:i,pitch:Object(a.g)(r),viewport:c,padding:l},f=Object(s.m)(Object(a.z)(d,o)),h=Object(s.m)(Object(a.z)(d,[o[0]+u,o[1]+u]));return Math.max(1,Object(s.a)(f,h))}var b=n(16),x=n(1),w=n(40),S=1;function I(){return S++}var j=function(t){function e(e){var n=t.call(this)||this;return n.uniqId=I(),n.modules=e.modules,n.mapState=e.state,n.tileObjects=[],n.identifyIds=[],n}return Object(x.c)(e,t),e.prototype.update=function(){},e.prototype.destroy=function(){var t=this,e=this.modules;this.tileObjects.forEach((function(n){n.clean(t.mapState),e.tileManager.removeObject(n)})),this.tileObjects=[],e.layers.removeLayer(this),this.mapState.needRerender=!0},e.prototype.getIdentifyData=function(){var t=this;return this.identifyIds.map((function(e){return{dynamicObjectId:t.uniqId,metatileHash:-1,ids:e}}))},e}(w.a),O=n(8),M=n(22),P=n(25),L=n(34);function T(t,e){if(void 0!==e){if(e.sourceId){var n=t.getSourceById(e.sourceId);if("default"!==(null==n?void 0:n.type))return}var i={id:Object(P.a)(e.id[0],e.id[1]),symbol:e.symbol};return"point"===e.symbol&&(i.isText=1===e.instanceId),e.sublayer&&(i.isCommercial=Object(L.d)(e.sublayer),i.isPersonal=Object(L.f)(e.sublayer),"point"!==e.symbol||i.isCommercial||(i.sysCode=e.objectClass)),i}}function k(t,e){if(void 0!==e){if(e.sourceId){var n=t.getSourceById(e.sourceId);if(n&&"geojson"===n.type)return"internal"===n.subtype?{type:"geojson",id:Object(P.a)(e.id[0],e.id[1]),feature:n.getFeatureById(e.id),source:n}:{type:"geojsonTile",getFeatureProperties:function(){var t;return n.getObjectAttributes(e.id[0],null!==(t=e.tileKey)&&void 0!==t?t:"")},source:n}}return{type:"default",id:Object(P.a)(e.id[0],e.id[1])}}}var z=function(t){function e(e,n){var i=t.call(this,e)||this;return i.start=function(t){var e=i,n=e.mapState,r=e.modules,o=e.container;if(0===t.button){var s=p(o,t.clientX,t.clientY);i.contains(s)&&r.handler.block()&&(r.mouseMoveHandler.block(),i.dragStartCursorPoint=s,i.dragStartAnchorPoint=Object(a.x)(n,i.getPosition()),document.addEventListener("mouseup",i.stop),document.addEventListener("mousemove",i.move),i.emitEvent("dragstart",t,n))}},i.move=function(t){var e=i,n=e.dragStartAnchorPoint,r=e.dragStartCursorPoint,o=e.mapState,s=e.container;if(void 0!==n&&void 0!==r){var c=p(s,t.clientX,t.clientY),l=O.b(n);O.a(l,l,c),O.p(l,l,r),i.setPosition(Object(a.z)(o,l)),i.emitEvent("drag",t,o)}},i.stop=function(t){if(0===t.button){i.dragStartCursorPoint=void 0,i.dragStartAnchorPoint=void 0,document.removeEventListener("mouseup",i.stop),document.removeEventListener("mousemove",i.move);var e=i,n=e.modules,r=e.mapState;n.handler.unblock(),n.mouseMoveHandler.unblock(),i.emitEvent("dragend",t,r),i.isInteractive()&&n.identifier.resetCache()}},i.container=e.modules.layout.mapContainer,n&&i.container.addEventListener("mousedown",i.start,!0),i}return Object(x.c)(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.container.removeEventListener("mousedown",this.start,!0),document.removeEventListener("mouseup",this.stop),document.removeEventListener("mousemove",this.move)},e.prototype.emitEvent=function(t,e,n){var i=this.getPosition(),r=Object(s.m)(i),o=Object(a.x)(n,i),c=this.modules.identifier.searchSync(o),l=void 0!==c&&void 0===c.dynamicObjectId?T(this.modules.sourceStorage,c):void 0;this.emit(t,{originalEvent:e,target:l,targetData:this,lngLat:r,point:o})},e}(j),C=n(15),E=n(20),A=n(21),D=n(88),F=n(5),R=function(t){function e(e,n){var i,r,o=t.call(this,e,null!==(i=n.draggable)&&void 0!==i&&i)||this;o.options=n,o.interactive=null===(r=o.options.interactive)||void 0===r||r,o.center=Object(s.l)(o.options.coordinates);var a=o.modules,c=a.dynamicStyle,l=a.collector,u=a.renderer,d=a.tileManager,f=a.identifier,h=a.layers;if(o.layer=Object(A.d)({type:"circle",id:"dynamic-circleMarker-"+o.uniqId,minzoom:o.options.minZoom,maxzoom:o.options.maxZoom,style:{color:o.options.color,strokeColor:o.options.borderColor,strokeColor2:o.options.border2Color,width:o.options.width,strokeWidth:o.options.borderWidth,strokeWidth2:o.options.border2Width}}),!o.layer)return o;c.addLayer(o.layer,o.options.zIndex);var p=Object(s.j)(o.center),m=Object(E.c)({id:o.interactive?[0,0]:NaN});Object(C.b)({collector:l,generator:D.generateCircleMarker,args:[c.getStyle().id,o.layer,b.d,m,[[0],[0]]]});var v=l.getAccumulatedData(),_=new M.a("dynamicObject",v.data,u,p);return d.addObject(_),o.tileObjects.push(_),o.interactive&&o.identifyIds.push(v.identifyIds),h.addLayer(o),l.reset(),o.mapState.needRerender=!0,o.interactive&&f.resetCache(),o}return Object(x.c)(e,t),e.prototype.remove=function(){this.layer&&this.modules.dynamicStyle.removeLayer(this.layer.innerId),this.interactive&&this.modules.identifier.resetCache(),t.prototype.destroy.call(this)},e.prototype.setPosition=function(t){var e=this.mapState,n=this.tileObjects[0];void 0!==n&&(this.center=t,n.setTileCoords(Object(s.j)(t)),e.needRerender=!0)},e.prototype.getPosition=function(){return this.center},e.prototype.isInteractive=function(){return this.interactive},e.prototype.contains=function(t){if(!this.layer)return!1;var e=this.mapState,n=this.layer,i=Object(a.x)(e,this.center),r=Object(F.i)(n.style.width,Object(F.c)(this.mapState.styleZoom,this.mapState.styleState,[]))/2+Object(F.i)(n.style.strokeWidth,Object(F.c)(this.mapState.styleZoom,this.mapState.styleState,[]));return O.e(i,t)<=r},e}(z),B=n(14);function N(t,e,n){var i=t.viewport,r=i.top,o=i.right,a=i.bottom,s=i.left,c=e.clientWidth,l=e.clientHeight;t.size=[Math.max(1,c-s-o),Math.max(1,l-r-a)],n.updateIdentifySize()}function U(t,e){var n=t.padding,i=n.top,r=n.right,o=n.bottom,a=n.left;t.padding={top:i,right:r,bottom:o,left:a},t.needRerender=!0,e.updateIdentifySize()}var H=B.d.bind(null,"inertia"),Z=function(t,e){B.e("inertia",{step:function(t,n,i){var r=i.startPoint,a=i.startSpeed,u=i.startTime,d=i.direction,f=c.b(d);c.o(f,f,n),c.a(f,f,r),l.c(t.maxBounds,f)||G(e,t),t.center=f,"zoom"===t.zoomTypePreserving?t.styleZoom=Object(s.f)(t.zoom,f):t.zoom=Object(s.h)(t.styleZoom,f);var h=function(t,e,n){return t*Math.pow(1-(n-e)/o.inertia.duration,o.inertia.nonLinearity)}(a,u,t.time);Object(s.t)(h,t.zoom)<o.inertia.minSpeed&&G(e,t)}},t)},G=function(t,e){B.d("inertia",e),t.classList.remove("mapgl-inertia")},W=function(t,e,n){void 0===n&&(n={}),B.d("center",t),H(t);var i=c.d();if(l.b(i,t.maxBounds,e),!1===n.animate)t.center=i,"zoom"===t.zoomTypePreserving?t.styleZoom=Object(s.f)(t.zoom,e):t.zoom=Object(s.h)(t.styleZoom,e);else{var r=void 0!==n.easing?n.easing:"linear",o=void 0!==n.duration?n.duration:250;B.c("center",{easing:r},t,t.center,i,o)}},V=B.d.bind(null,"center"),q=B.e.bind(null,"center",{step:function(t,e){t.center=e,"zoom"===t.zoomTypePreserving?t.styleZoom=Object(s.f)(t.zoom,e):t.zoom=Object(s.h)(t.styleZoom,e)}});function Y(t,e){return(t-=e)>=Math.PI?t=(t+Math.PI)%(2*Math.PI)-Math.PI:t<-Math.PI&&(t=Math.PI-(Math.PI-t)%(2*Math.PI)),t+e}function X(t,e,n){if(void 0===n&&(n={}),B.d("rotation",t),!1===n.animate)t.rotation=Y(e,0);else{var i=void 0===n.normalize||n.normalize;B.c("rotation",{easing:n.easing||"linear"},t,t.rotation,i?Y(e,t.rotation):e,n.duration||250)}}var K=B.d.bind(null,"rotation"),J=B.e.bind(null,"rotation",{step:function(t,e){return t.rotation=Y(e,0)}});function Q(t,e,n){void 0===n&&(n={}),B.d("pitch",t);var i=Object(a.d)(e,t.minPitch,t.maxPitch);!1===n.animate?t.pitch=i:B.c("pitch",{easing:n.easing||"linear"},t,t.pitch,i,n.duration||300)}var $=B.d.bind(null,"pitch"),tt=B.e.bind(null,"pitch",{step:function(t,e){return t.pitch=e}}),et=function(t,e,n){void 0===n&&(n={}),B.d("zoom",t);var i=Object(a.d)(e,t.minZoom,t.maxZoom);if(i!==t.zoom)if(!1===n.animate)n.zoomPoint&&(c.a(t.center,t.center,Object(a.k)(t,n.zoomPoint,{zoom:i})),l.b(t.center,t.maxBounds,t.center)),t.zoom=i,t.styleZoom=Object(s.f)(i,t.center);else{var r=n.animateHeight?Object(s.u)(t.zoom,t.size):t.zoom,o=n.animateHeight?Object(s.u)(i,t.size):i,u=void 0!==n.easing?n.easing:"easeOutCubic",d=void 0!==n.duration?n.duration:250;B.c("zoom",{easing:u},t,r,o,d,{zoomPoint:n.zoomPoint,animateHeight:!!n.animateHeight,blockBuildingAnimation:!!n.blockBuildingAnimation})}},nt=B.d.bind(null,"zoom"),it=B.e.bind(null,"zoom",{step:function(t,e,n){void 0===n&&(n={});var i=n&&n.animateHeight?Object(s.i)(e,t.size):e;n&&n.zoomPoint&&(c.a(t.center,t.center,Object(a.k)(t,n.zoomPoint,{zoom:i})),l.b(t.center,t.maxBounds,t.center)),t.zoom=i,t.styleZoom=Object(s.f)(i,t.center)}}),rt=navigator.msPointerEnabled&&navigator.msMaxTouchPoints&&!window.PointerEvent,ot=window.PointerEvent&&navigator.pointerEnabled&&navigator.maxTouchPoints||rt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,at=dt("webkit"),st=dt("chrome")||dt("crios"),ct=(window,!st&&dt("safari")),lt=(dt("gecko")&&!at&&window.opera,navigator.platform.toUpperCase().indexOf("MAC")>=0),ut=dt("firefox");function dt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}function ft(t,e){var n=Object(x.a)({hitType:"event",eventCategory:"Metrics"},t);window.ga&&window.ga(o.analytics.gaName+".send",n)}function ht(t,e){var n,i;function r(){n=!1,i&&(o.apply(void 0,i),i=!1)}function o(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];n?i=o:(t.apply(void 0,o),setTimeout(r,e),n=!0)}return o}function pt(t){nt(t),V(t),K(t),$(t),H(t)}var mt=function(){function t(t,e){var n=this;this.onWheelScroll=function(t){t.preventDefault(),void 0===t.deltaMode&&void 0===t.deltaY||(n.state.userHasInteracted=!0,n.screenPoint=p(n.container,t.clientX,t.clientY),t.ctrlKey?n.deltaAccumulator-=10*t.deltaY:1===t.deltaMode?n.deltaAccumulator-=20*t.deltaY:n.deltaAccumulator-=t.deltaY,n.eventCount+=1)},this.startZooming=function(){var t,e=n.state;t=lt?n.getDelta()*o.zoom.macTouchDelta:Object(a.G)(n.getDelta())*o.zoom.mouseDelta;var i=e.zoom+t,r=Object(a.d)(i,e.minZoom,e.maxZoom);r!==e.zoom&&(pt(e),et(e,r,{duration:o.zoom.animDuration,animate:!lt,zoomPoint:n.screenPoint,blockBuildingAnimation:!0}))},this.stop=function(){n.state.userHasInteracted=!0,nt(n.state)},this.state=t,this.container=e,lt||(this.startZooming=ht(this.startZooming,o.zoom.throttleDelay)),this.deltaAccumulator=0,this.eventCount=0,this.screenPoint=[0,0],this.container.addEventListener("wheel",this.onWheelScroll),this.container.addEventListener("mousedown",this.stop)}return t.prototype.destroy=function(){this.container.removeEventListener("wheel",this.onWheelScroll),this.container.removeEventListener("mousedown",this.stop)},t.prototype.update=function(){0!==this.eventCount&&(this.startZooming(),this.state.needRerender=!0)},t.prototype.getDelta=function(){var t=this.deltaAccumulator/this.eventCount;return this.deltaAccumulator=0,this.eventCount=0,t},t}(),vt=function(){function t(t){this.defs=t.map((function(t){return new _t(t)}))}return t.prototype.check=function(t){for(var e=this.defs,n=!1,i=0;i<e.length;i++)n?e[i].update(t):n=!e[i].equal(t);return n},t}(),_t=function(){function t(t){this.path=Array.isArray(t.path)?t.path:[t.path],this.type=t.type,"number"===this.type?(this.last=NaN,this.compare=this.primitive,this.updateFn=this.primitiveUpdate):"vec2"===this.type?(this.last=[NaN,NaN],this.compare=this.vec2,this.updateFn=this.vec2Update):"string"===this.type?(this.last="",this.compare=this.primitive,this.updateFn=this.primitiveUpdate):"padding"===this.type&&(this.last={left:0,right:0,bottom:0,top:0},this.compare=this.padding,this.updateFn=this.paddingUpdate)}return t.prototype.equal=function(t){var e=this.take(t),n=this.compare(this.last,e);return this.updateFn(e),n},t.prototype.update=function(t){this.updateFn(this.take(t))},t.prototype.take=function(t){var e=this.path,n=0;do{t=t[e[n++]]}while(n<e.length);return t},t.prototype.primitive=function(t,e){return t===e},t.prototype.padding=function(t,e){return t.top===e.top&&t.bottom===e.bottom&&t.left===e.left&&t.right===e.right},t.prototype.paddingUpdate=function(t){this.last.top=t.top,this.last.bottom=t.bottom,this.last.right=t.right,this.last.left=t.left},t.prototype.vec2=function(t,e){return t[0]===e[0]&&t[1]===e[1]},t.prototype.primitiveUpdate=function(t){this.last=t},t.prototype.vec2Update=function(t){this.last[0]=t[0],this.last[1]=t[1]},t}(),yt=function(){function t(t,e){var n=this;this.onMouseUp=function(t){1===t.which&&n.start()},this.onTouchEnd=function(t){0===t.touches.length&&n.start()},this.start=function(){var t=n.state;t.userHasInteracted=!0;var e=n.getCurrentSpeed(t.time),i=c.k(e);if(!(Object(s.t)(i,t.zoom)<=o.inertia.minSpeed)){var r=Object(s.x)(o.inertia.maxSpeed,t.zoom),a=Math.min(i,r),l=n.calcDistanceByStartSpeed(a),u=c.b(t.center),d=c.d();c.n(d,e),function(t,e,n,i,r){B.c("inertia",{easing:"inertia"},t,0,r,o.inertia.duration,{startPoint:e,startSpeed:n,direction:i,startTime:t.time})}(t,u,a,d,l),n.container.classList.add("mapgl-inertia")}},this.stop=function(){H(n.state),n.container.classList.remove("mapgl-inertia"),n.times=[],n.positions=[]},this.state=t,this.container=e,this.container.addEventListener("mouseup",this.onMouseUp),this.container.addEventListener("mousedown",this.stop),ot&&(this.container.addEventListener("touchend",this.onTouchEnd),this.container.addEventListener("touchstart",this.stop)),this.zoomDiffer=new vt([{path:"zoom",type:"number"}]),this.styleZoomDiffer=new vt([{path:"styleZoom",type:"number"}]),this.centerDiffer=new vt([{path:"center",type:"vec2"}]),this.times=[],this.positions=[]}return t.prototype.destroy=function(){this.container.removeEventListener("mouseup",this.onMouseUp),this.container.removeEventListener("mousedown",this.stop),this.container.removeEventListener("touchend",this.onTouchEnd),this.container.removeEventListener("touchstart",this.stop)},t.prototype.update=function(){var t=this.state;this.centerDiffer.check(t)&&this.rememberTimeAndPosition(t),("zoom"===t.zoomTypePreserving?this.zoomDiffer.check(t):this.styleZoomDiffer.check(t))&&this.stop()},t.prototype.removeOldRecords=function(t){for(;t-this.times[0]>100&&this.times.length;)this.times.shift(),this.positions.shift()},t.prototype.rememberTimeAndPosition=function(t){var e=t.time;this.removeOldRecords(e),this.times.push(e),this.positions.push(c.b(t.center))},t.prototype.getCurrentSpeed=function(t){if(this.removeOldRecords(t),this.times.length<2)return c.d();var e=c.b(this.positions[this.positions.length-1]);return c.r(e,e,this.positions[0]),c.o(e,e,1/(this.times[this.times.length-1]-this.times[0])),e},t.prototype.calcDistanceByStartSpeed=function(t){return t*o.inertia.duration/(o.inertia.nonLinearity+1)},t}();function gt(t,e,n,i,r){var o=Object(s.m)(Object(a.z)(r.map.state,i));if(e&&void 0!==e.dynamicObjectId){var c=t,l=r.layers.getDynamicObjectLayers().find((function(t){return t.uniqId===e.dynamicObjectId}));if(!l)return;var u={lngLat:o,originalEvent:n,point:i,targetData:l};l.emit(c,u)}else{var d={lngLat:o,originalEvent:n,point:i,target:T(r.sourceStorage,e),targetData:k(r.sourceStorage,e)},f=t;r.map.emit(f,d)}}var bt=function(){function t(t){var e=this;this.emitMouseEvent=function(t){var n=p(e.container,t.clientX,t.clientY);e.emitEvent(t,n)},this.emitTouchEvent=function(t){var n=p(e.container,t.changedTouches[0].clientX,t.changedTouches[0].clientY);e.emitEvent(t,n)},this.container=t.layout.mapContainer,this.modules=t,this.container.addEventListener("mousedown",this.emitMouseEvent),this.container.addEventListener("mouseup",this.emitMouseEvent),this.container.addEventListener("touchstart",this.emitTouchEvent),this.container.addEventListener("touchend",this.emitTouchEvent)}return t.prototype.destroy=function(){this.container.removeEventListener("mousedown",this.emitMouseEvent),this.container.removeEventListener("mouseup",this.emitMouseEvent),this.container.removeEventListener("touchstart",this.emitTouchEvent),this.container.removeEventListener("touchend",this.emitTouchEvent)},t.prototype.update=function(){},t.prototype.emitEvent=function(t,e){var n=this;if(this.modules.layout.isActionWithCanvas(t)){var i=t.type;this.modules.identifier.search(i,e).then((function(r){gt(i,r,t,e,n.modules)}))}},t}(),xt=function(){function t(t,e,n){var i=this;this.rotationDetected=!1,this.onGestureStart=function(t){t.preventDefault(),i.startRotation=i.state.rotation,i.rotationDetected=!1,i.gestureRotation=0,i.isGestureStart=!0,i.startZoom=i.state.zoom,i.screenPoint=p(i.container,t.clientX,t.clientY),i.state.userHasInteracted=!0,i.state.disableRotationByUserInteraction||i.container.classList.add("mapgl-rotating"),i.map.emit("interactionstart",{target:"zoom/rotation"})},this.onGestureEnd=function(t){t.preventDefault(),i.isGestureStart&&(i.isGestureStart=!1,i.state.userHasInteracted=!0,i.container.classList.remove("mapgl-rotating"),i.map.emit("interactionend",{target:"zoom/rotation"}))},this.onGestureChange=function(t){t.preventDefault(),i.state.userHasInteracted=!0;var e=t.rotation/40;!i.rotationDetected&&Math.abs(e)>i.state.touchRotationThreshold&&(i.rotationDetected=!0,i.startRotation=i.state.rotation-e),i.rotationDetected&&(i.gestureRotation=e),t.scale>1?i.gestureZoom=t.scale-1:i.gestureZoom=-1/t.scale+1},this.state=t,this.container=e,this.map=n,this.isGestureStart=!1,this.gestureRotation=0,this.gestureZoom=0,this.screenPoint=[0,0],this.startRotation=0,this.startZoom=0,this.container.addEventListener("gesturestart",this.onGestureStart),this.container.addEventListener("gestureend",this.onGestureEnd),this.container.addEventListener("gesturechange",this.onGestureChange)}return t.prototype.destroy=function(){this.container.removeEventListener("gesturestart",this.onGestureStart),this.container.removeEventListener("gestureend",this.onGestureEnd),this.container.removeEventListener("gesturechange",this.onGestureChange)},t.prototype.update=function(){if(0!==this.gestureRotation||0!==this.gestureZoom){var t=this.state,e=this.startZoom+this.gestureZoom,n=this.startRotation+this.gestureRotation,i=c.d();c.a(i,t.center,Object(a.k)(t,this.screenPoint,{zoom:e,rotation:n})),pt(t),W(t,i,{animate:!1}),et(t,e,{animate:!1}),t.disableRotationByUserInteraction||X(t,n,{animate:!1}),this.gestureRotation=0,this.gestureZoom=0}},t}(),wt=function(t){function e(e){var n=t.call(this)||this;return n.durations=[],n.earlyTimes=[],n.countToCheck=75,n.mayCountMetrics=!1,n.startRenderTime=0,n.catchNextUpdate=!1,n.mapState=e,setTimeout((function(){n.mayCountMetrics=!0}),1e4),n}return Object(x.c)(e,t),e.prototype.update=function(){var t=this.mapState,e=t.time,n=t.needRerender;this.mayCountMetrics?(this.catchNextUpdate&&(this.durations.push(e-this.startRenderTime),this.catchNextUpdate=!1),n&&(this.startRenderTime=e,this.catchNextUpdate=!0),this.durations.length>this.countToCheck&&this.check()):this.earlyTimes.push(e)},e.prototype.getEarlyFps=function(){if(!this.mayCountMetrics){for(var t=[],e=1;e<this.earlyTimes.length;e++)t.push(this.earlyTimes[e]-this.earlyTimes[e-1]);return St(t)}},e.prototype.check=function(){var t=St(this.durations);this.emit("fps",t),t<o.performanceCheck.fpsCaveat&&(this.mapState.performanceCaveatEmitted=!0,this.emit("performancecaveat")),this.durations=[],this.countToCheck=Math.min(1e3,2*this.countToCheck)},e}(w.a);function St(t){t.sort((function(t,e){return t-e}));var e=t[Math.floor(3*t.length/4)];return Math.round(1e3/e)}var It=n(44),jt=function(){function t(){this.differ=new vt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"rotation",type:"number"},{path:"pitch",type:"number"}]),this.debouncedSet=Object(It.a)((function(t){B.c("stillness",{},t,t.stillness,1,400)}),100,!1),this.stillnessTickerUpdate=B.e.bind(null,"stillness",{step:function(t,e){t.stillness=e}})}return t.prototype.update=function(t){this.differ.check(t)&&(t.stillness=0,B.d("stillness",t),this.debouncedSet(t)),this.stillnessTickerUpdate(t)},t}(),Ot=function(){function t(t){var e=this;this.onTouchStart=function(){e.isTouchStartEmitted=!0},this.onMouseOut=function(t){if(e.prevGeo){var n=p(e.container,t.clientX,t.clientY);gt("mouseout",e.prevGeo,t,n,e.modules),e.prevGeo=void 0,e.skipIdentifyEvents=!0,e.modules.defaultSource.resetHoverId(),e.container.classList.remove("mapgl-hover")}},this.onMouseMove=function(t){if(e.isTouchStartEmitted)e.isTouchStartEmitted=!1;else if(e.skipIdentifyEvents=!1,!e.isBlocked){var n=p(e.container,t.clientX,t.clientY);Promise.resolve().then((function(){return e.modules.layout.isActionWithCanvas(t)?e.modules.identifier.search("mouseMove",n):void 0})).then((function(i){if(!e.skipIdentifyEvents){var r=i&&e.prevGeo&&(!O.i(i.id,e.prevGeo.id)||i.instanceId!==e.prevGeo.instanceId||i.dynamicObjectId!==e.prevGeo.dynamicObjectId||i.symbol!==e.prevGeo.symbol);!e.prevGeo||i&&!r||(gt("mouseout",e.prevGeo,t,n,e.modules),e.prevGeo=void 0,e.container.classList.remove("mapgl-hover"),e.modules.defaultSource.resetHoverId()),!i||e.prevGeo&&!r||(e.prevGeo=i,e.container.classList.add("mapgl-hover"),gt("mouseover",i,t,n,e.modules),e.modules.defaultSource.setHoverId(i.id)),gt("mousemove",i,t,n,e.modules)}}))}},this.modules=t,this.isTouchStartEmitted=!1,this.skipIdentifyEvents=!1,this.isBlocked=!1,this.prevGeo=void 0,this.container=this.modules.layout.mapContainer,this.container.addEventListener("touchstart",this.onTouchStart),this.container.addEventListener("mousemove",this.onMouseMove),this.container.addEventListener("mouseout",this.onMouseOut)}return t.prototype.destroy=function(){this.container.removeEventListener("touchstart",this.onTouchStart),this.container.removeEventListener("mousemove",this.onMouseMove),this.container.removeEventListener("mouseout",this.onMouseOut)},t.prototype.update=function(){},t.prototype.block=function(){this.isBlocked=!0},t.prototype.unblock=function(){this.isBlocked=!1},t}(),Mt=function(t,e,n,i){B.d("buildingHeight"+i,t),!1===n.animate?(e.set(i,n.to),t.needLabeling=!0):B.c("buildingHeight"+i,{easing:n.easing},t,n.from,n.to,n.duration)},Pt=function(){function t(t,e){this.state=t,this.modules=e,this.differ=new vt([{path:"styleZoom",type:"number"}]),this.buildingHeights=new Map,this.minZoomBuildingHeight=1/0}return t.prototype.getBuildingHeight=function(t){return void 0!==t?(this.buildingHeights.has(t)||this.addBuildingHeightZoom(t),this.buildingHeights.get(t)||0):this.getDefaultBuildingHeight()},t.prototype.update=function(){var t=this;this.buildingHeights.forEach((function(e,n){var i,r,o;t.updateByZoom(n,e),t.isAnimating()&&(i=t.state,r=t.buildingHeights,o=n,B.e.call(null,"buildingHeight"+o,{step:function(t,e){return r.set(o,e)},complete:function(t){return t.needLabeling=!0}},i))}))},t.prototype.isAnimating=function(){var t=this;return Array.from(this.buildingHeights.keys()).some((function(e){return void 0!==B.b("buildingHeight"+e,t.state)}))},t.prototype.clearBuildingHeights=function(){this.buildingHeights.clear(),this.minZoomBuildingHeight=1/0},t.prototype.getDefaultBuildingHeight=function(){var t=this.minZoomBuildingHeight!==1/0?this.minZoomBuildingHeight:16;return this.state.styleZoom<t?0:1},t.prototype.updateByZoom=function(t,e){var n=this.state,i=B.b("zoom",n),r=B.b("buildingHeight"+t,n),a=void 0!==r?r.to:e,s=void 0!==i?i.attributes.blockBuildingAnimation:this.differ.check(n);n.styleZoom>=t&&this.modules.tileManager.viewportTilesReady()&&1!==a&&!s?Mt(n,this.buildingHeights,{animate:!0,easing:o.buildingAnimation.easing,from:e,to:1,duration:o.buildingAnimation.duration*(1-e)},t):n.styleZoom<t&&0!==a&&Mt(n,this.buildingHeights,{animate:!1,to:0},t)},t.prototype.addBuildingHeightZoom=function(t){var e=t<this.state.styleZoom?0:1;this.buildingHeights.set(t,e),this.minZoomBuildingHeight>t&&(this.minZoomBuildingHeight=t)},t}(),Lt=n(73),Tt=function(){function t(){this._objects=[],this.type=0}return t.prototype.render=function(){return this._objects=[],this},t.prototype.addObject=function(t){return this._objects.push(t),this},t.prototype.hasObjects=function(){return this._objects.length>0},t}(),kt=function(t){function e(){var e=t.call(this)||this;return e.type=17,e}return Object(x.c)(e,t),e.prototype.render=function(t){return this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this},e}(Tt),zt=function(){function t(t){if((t=t||{}).canvas){this._canvasElement="string"==typeof t.canvas?document.getElementById(t.canvas):t.canvas;var e={antialias:void 0===t.antialias||t.antialias,stencil:void 0!==t.stencil&&t.stencil,failIfMajorPerformanceCaveat:void 0!==t.failIfMajorPerformanceCaveat&&t.failIfMajorPerformanceCaveat,preserveDrawingBuffer:void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer};this._gl=2===t.version?this._canvasElement.getContext("webgl2",e):this._canvasElement.getContext("webgl",e)||this._canvasElement.getContext("experimental-webgl",e)}else this._gl=t.gl;this._pixelRatio=t.pixelRatio||1,this.autoClear=void 0===t.autoClear||t.autoClear,this.clearColor=t.clearColor||[1,1,1,1],this.sortObjects=!0,this._plugins=[],this._pluginsByType={},this._maxPluginOrder=0,this.addPlugin(new kt,0),this.webGlExtensions={}}return t.prototype.addPlugin=function(t,e){return void 0===e&&(e=this._maxPluginOrder+1),this._plugins.push({plugin:t,order:e}),this._plugins.sort((function(t,e){return t.order-e.order})),this._pluginsByType[t.type]=t,this._maxPluginOrder=Math.max.apply(Math,this._plugins.map((function(t){return t.order}))),this},t.prototype.removePlugin=function(t){var e=this;return this._plugins.some((function(n,i){return n.plugin instanceof t&&(delete e._pluginsByType[e._plugins[i].plugin.type],e._plugins.splice(i,1),!0)})),this},t.prototype.setPixelRatio=function(t){return this._pixelRatio=t,this},t.prototype.getPixelRatio=function(){return this._pixelRatio},t.prototype.setSize=function(t,e){return this._size=[t*this._pixelRatio,e*this._pixelRatio],this._canvasElement&&(this._canvasElement.width=this._size[0],this._canvasElement.height=this._size[1],this._canvasElement.style.width=t+"px",this._canvasElement.style.height=e+"px"),this.setViewport(),this},t.prototype.setViewport=function(t,e){return void 0!==t&&void 0!==e?this._gl.viewport(0,0,t,e):this._gl.viewport(0,0,this._size[0],this._size[1]),this},t.prototype.getSize=function(){return this._size},t.prototype.setRenderTarget=function(t){return this._renderTarget=t,this},t.prototype.readPixels=function(t,e,n,i,r){var o=this._gl;return this._renderTarget?(this._renderTarget.bind(o),o.readPixels(t,e,n,i,o.RGBA,o.UNSIGNED_BYTE,r),this._renderTarget.unbind(o)):o.readPixels(t,e,n,i,o.RGBA,o.UNSIGNED_BYTE,r),this},t.prototype.clear=function(){var t=this._gl;return t.clearColor.apply(t,this.clearColor),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this},t.prototype.render=function(t,e,n){var i=this._gl;t.typifyForRender(this._pluginsByType),this._renderTarget&&this._renderTarget.bind(i),i.clearDepth(1),i.clearStencil(0),this.autoClear&&this.clear(),e.updateLocalMatrix(),e.updateWorldMatrix();for(var r={renderer:this,extensions:this.webGlExtensions,scene:t,camera:e,gl:i,userData:n},o=this._plugins.map((function(t){return t.plugin})).filter((function(t){return t.hasObjects()})),a=0;a<o.length;a++)o[a].render(r,o[a-1],o[a+1]);return this._renderTarget&&this._renderTarget.unbind(i),this},t.prototype.addExtension=function(t){return this.webGlExtensions[t]=this._gl.getExtension(t),this},t}(),Ct=function(){function t(e,n){void 0===n&&(n={}),this._src=e||null,this.options=Object.assign({},t.defaultOptions,n),this._glContext=null}return t.prototype.enable=function(t,e){var n=void 0!==e?e:this.options.unit;return void 0!==n&&t.activeTexture(t.TEXTURE0+n),this._texture||this.prepare(t),t.bindTexture(t.TEXTURE_2D,this._texture),this},t.prototype.remove=function(){return this._texture&&(this._glContext.deleteTexture(this._texture),this._glContext=null,this._texture=null),this},t.prototype.getTexture=function(){return this._texture},t.prototype.subImage=function(t,e,n,i){return t.bindTexture(t.TEXTURE_2D,this._texture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,this.options.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.options.premultiplyAlpha),t.texSubImage2D(t.TEXTURE_2D,0,n,i,this._toGlParam(t,this.options.format),t.UNSIGNED_BYTE,e),this},t.prototype.prepare=function(e){return this._glContext=e,this._texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this._texture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,this.options.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.options.premultiplyAlpha),this.options.size?e.texImage2D(e.TEXTURE_2D,0,this._toGlParam(e,this.options.format),this.options.size[0],this.options.size[1],0,this._toGlParam(e,this.options.format),e.UNSIGNED_BYTE,this._src):e.texImage2D(e.TEXTURE_2D,0,this._toGlParam(e,this.options.format),this._toGlParam(e,this.options.format),e.UNSIGNED_BYTE,this._src),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,this._toGlParam(e,this.options.wrapS)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,this._toGlParam(e,this.options.wrapT)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,this._toGlParam(e,this.options.magFilter)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,this._toGlParam(e,this.options.minFilter)),this.options.generateMipmaps&&this.options.minFilter!==t.NearestFilter&&this.options.minFilter!==t.LinearFilter&&e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null),this},t.prototype._toGlParam=function(e,n){return n===t.ClampToEdgeWrapping?e.CLAMP_TO_EDGE:n===t.Repeat?e.REPEAT:n===t.MirroredRepeat?e.MIRRORED_REPEAT:n===t.NearestFilter?e.NEAREST:n===t.NearestMipMapNearestFilter?e.NEAREST_MIPMAP_NEAREST:n===t.NearestMipMapLinearFilter?e.NEAREST_MIPMAP_LINEAR:n===t.LinearFilter?e.LINEAR:n===t.LinearMipMapNearestFilter?e.LINEAR_MIPMAP_NEAREST:n===t.LinearMipMapLinearFilter?e.LINEAR_MIPMAP_LINEAR:n===t.RgbaFormat?e.RGBA:n===t.AlphaFormat?e.ALPHA:n===t.RgbFormat?e.RGB:null},t}();Ct.ClampToEdgeWrapping=8,Ct.Repeat=9,Ct.MirroredRepeat=10,Ct.NearestFilter=1,Ct.NearestMipMapNearestFilter=2,Ct.NearestMipMapLinearFilter=3,Ct.LinearFilter=4,Ct.LinearMipMapNearestFilter=5,Ct.LinearMipMapLinearFilter=6,Ct.RgbaFormat=11,Ct.AlphaFormat=12,Ct.RgbFormat=13,Ct.defaultOptions={magFilter:Ct.LinearFilter,minFilter:Ct.LinearMipMapLinearFilter,wrapS:Ct.ClampToEdgeWrapping,wrapT:Ct.ClampToEdgeWrapping,format:Ct.RgbaFormat,generateMipmaps:!0,flipY:!0,premultiplyAlpha:!0};var Et=Ct,At=function(){function t(e){void 0===e&&(e={}),this.options=Object.assign({},t.defaultOptions,e),this._texture=new Et(null,this.options),this._glContext=null}return t.prototype.bind=function(t){return this._frameBuffer||this._prepare(t),t.bindFramebuffer(t.FRAMEBUFFER,this._frameBuffer),this},t.prototype.unbind=function(t){return t.bindFramebuffer(t.FRAMEBUFFER,null),this},t.prototype.remove=function(){return this._unprepare(),this},t.prototype.setSize=function(t){return this.options.size=t,this._unprepare(),this},t.prototype.getTexture=function(){return this._texture},t.prototype._prepare=function(t){this._glContext=t,this._texture||(this._texture=new Et(null,this.options)),this._texture.prepare(t),this._frameBuffer=t.createFramebuffer(),t.bindFramebuffer(t.FRAMEBUFFER,this._frameBuffer),this._renderBuffer=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this._renderBuffer),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,this.options.size[0],this.options.size[1]),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this._texture.getTexture(),0),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,this._renderBuffer),this._checkComplete(t),t.bindRenderbuffer(t.RENDERBUFFER,null),t.bindFramebuffer(t.FRAMEBUFFER,null)},t.prototype._unprepare=function(){this._texture&&(this._texture.remove(this._glContext),this._texture=null),this._frameBuffer&&(this._glContext.deleteFramebuffer(this._frameBuffer),this._glContext.deleteRenderbuffer(this._renderBuffer),this._frameBuffer=null,this._renderBuffer=null)},t.prototype._checkComplete=function(t){var e=t.checkFramebufferStatus(t.FRAMEBUFFER);e!==t.FRAMEBUFFER_COMPLETE&&(e===t.FRAMEBUFFER_UNSUPPORTED?console.log("Framebuffer is unsupported"):e===t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT?console.log("Framebuffer incomplete attachment"):e===t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS?console.log("Framebuffer incomplete dimensions"):e===t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT?console.log("Framebuffer incomplete missing attachment"):console.log("Unexpected framebuffer status: "+e))},t}();At.defaultOptions=Object.assign({},Et.defaultOptions,{size:[0,0],generateMipmaps:!1});var Dt=At,Ft=n(17),Rt=n(6),Bt=(o.floors.wallMinBrightness,o.floors.wallMaxBrightness,o.fences.lightIntensity),Nt=[Bt,Bt,Bt],Ut=[.05,.05,.05],Ht=[1,0,0],Zt=[1,1,1],Gt=function(){},Wt=function(t,e,n){var i=n.size,r=window.devicePixelRatio;e.bind(t,{u_vec2_vpt_size:[i[0]*r,i[1]*r]})},Vt=function(t,e,n){var i=Object(s.v)(n.zoom);e.bind(t,{u_vec3_projection_scale_style_scale_dpi:[i,i,Rt.p*window.devicePixelRatio]})},qt=function(t,e,n){var i=Object(s.v)(n.styleZoom);e.bind(t,{u_vec3_projection_scale_style_scale_dpi:[i,i,Rt.p*window.devicePixelRatio]})},Yt=function(t,e,n,i){e.bind(t,{u_float_height_factor:i.buildingHeightAnimator.getDefaultBuildingHeight()})},Xt=function(t,e,n){e.bind(t,{u_float_height_limitation:Object(s.u)(n.zoom,n.size)*Math.cos(n.pitch)*.75,u_float_tile_height:Rt.l})},Kt=function(t,e){e.bind(t,{u_float_height_limitation:Rt.l,u_float_tile_height:Rt.l})},Jt=function(t,e){e.bind(t,{u_vec3_light_color:Ut,u_vec3_light_direction:Ht,u_vec3_ambient_color:Zt})},Qt=function(t,e){e.bind(t,{u_vec3_light_color:Nt,u_vec3_light_direction:Ht,u_vec3_ambient_color:Zt})},$t=function(t,e,n){e.bind(t,{u_float_rounding_factor:n.stillness})},te=function(t,e){e.bind(t,{u_float_border_width_offset:1/window.devicePixelRatio})},ee=function(t,e){e.bind(t,{u_float_z_offset:0})},ne=function(t,e){e.bind(t,{u_float_z_offset:-1e-5})},ie=function(t,e){e.bind(t,{u_sr2d_texture:0})},re=function(t,e){e.bind(t,{u_vec2_scale_limits:[0,Rt.o]})},oe=function(t,e){e.bind(t,{u_vec4_border_color:[0,0,0,0]})},ae=function(t,e){e.bind(t,{u_vec4_space_color:[0,0,0,0]})},se=function(t,e,n,i){i.assetManager.textures.forEach((function(e){return e.enable(t)}))};function ce(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e,n,i,r){t.forEach((function(t){return t(e,n,i,r)}))}}var le=n(28),ue=n(35),de=n(43);function fe(t,e){return 0===e||void 0===e?1:1===e?t.labelingOpacity:1-t.labelingOpacity}var he=function(t,e,n,i,r,o,a){var s=Object(F.g)(o.style.color,$e(n,r));return le.c(a,s),!0},pe=function(t,e,n,i,r,o,a){var s=Object(F.g)(o.style.topColor,$e(n,r));return le.c(a,s),!0},me=function(t,e,n,i,r,o,a){var s=Object(F.g)(o.style.sideColor,$e(n,r));return le.c(a,s),!0},ve=function(t,e,n,i,r,o,a){var s=Object(F.g)(o.style.strokeColor,$e(n,r));return le.c(a,s),!0},_e=function(t,e,n,i,r,o,a){var s=Object(F.g)(o.style.strokeColor2,$e(n,r));return le.c(a,s),!0},ye=function(t,e,n,i,r,o,a){return a[3]*=i.modelManager.getOpacity(r.attributes.id,o.minzoom),!0},ge=function(t,e,n,i,r,o,a){var s=i.modelManager;if(!s.hasModel(r.attributes.hiddenObjectId))return!0;var c=s.getVisibleModelData(r.attributes.hiddenObjectId);if(!c)return!0;var l=1-c.opacity;return!(l<.5||(a[3]*=l,0))},be=function(t,e){return e.bind(t,{u_float_opacity:1}),!0},xe=function(t,e,n,i,r,o,a){var s=$e(n,r),c=Object(F.g)(o.style.strokeColor,s),l=Object(F.i)(o.style.strokeWidth,s);return le.e(a,c)&&1===a[3]&&l<=1&&(a[3]*=n.stillness),!0},we=function(t,e,n,i,r,o,a){var s=$e(n,r),c=Object(F.g)(o.style.topColor,s),l=Object(F.i)(o.style.strokeWidth,s);return le.e(a,c)&&1===a[3]&&l<=1&&(a[3]*=n.stillness),!0},Se=function(t,e,n,i,r,o,a){return a[3]*=n.stillness,!0},Ie=function(t,e,n,i,r,o,a){var s=Object(F.b)(a);return le.k(s,s,r.tile.readiness),0!==a[3]&&(e.bind(t,{u_vec4_color:s}),!0)},je=function(t,e,n,i,r,o){var a=Object(F.i)(o.style.width,$e(n,r));return 0!==a&&(e.bind(t,{u_float_width:a*window.devicePixelRatio}),!0)},Oe=function(t,e,n,i,r,o){var a=Object(F.i)(o.style.strokeWidth,$e(n,r));return 0!==a&&(e.bind(t,{u_float_width:a*window.devicePixelRatio}),!0)},Me=function(t,e,n,i,r,o){var a=$e(n,r),s=Object(F.i)(o.style.strokeWidth,a);if(0===s)return!1;var c=Object(F.i)(o.style.width,a)+2*s;return e.bind(t,{u_float_width:c*window.devicePixelRatio}),!0},Pe=function(t,e,n,i,r,o){var a=$e(n,r),s=Object(F.i)(o.style.strokeWidth2,a);if(0===s)return!1;var c=Object(F.i)(o.style.width,a)+2*Object(F.i)(o.style.strokeWidth,a)+2*s;return e.bind(t,{u_float_width:c*window.devicePixelRatio}),!0},Le=function(t,e,n,i,r,o){var a=$e(n,r),s=Object(F.i)(o.style.width,a)+2*Object(F.i)(o.style.strokeWidth,a)+2*Object(F.i)(o.style.strokeWidth2,a);return 0!==s&&(e.bind(t,{u_float_width:s*window.devicePixelRatio}),!0)},Te=function(t,e,n,i,r,o){var a=$e(n,r);return!(Object(F.i)(o.style.iconWidth,a)<=0)},ke=function(t,e,n,i,r,o){return e.bind(t,{u_float_shift:Object(F.i)(o.style.shift,$e(n,r))*window.devicePixelRatio}),!0},ze=function(t,e,n,i,r,o){return 0!==fe(n,r.attributes.animDirection)},Ce=function(t,e,n,i,r,o){var a=fe(n,r.attributes.animDirection);return 0!==a&&(e.bind(t,{u_float_opacity:a}),!0)},Ee=function(t,e,n,i,r,o){var a=Object(F.i)(o.style.iconRotation,$e(n,r));return e.bind(t,{u_vec2_rotation:[Math.cos(a),Math.sin(a)]}),!0},Ae=function(t,e,n,i,r,o){var a=Object(F.i)(o.style.opacity,$e(n,r));return e.bind(t,{u_float_opacity:r.tile.readiness*a}),!0},De=function(t,e,n,i,r,o){var a=Object(F.i)(o.style.opacity,$e(n,r));return e.bind(t,{u_float_opacity:a}),!0},Fe=function(t,e,n,i,r){return!i.floorManager.hasDisplayedFloorBuilding(r.attributes.hiddenObjectId)},Re=function(t,e,n,i,r){var o=i.modelManager;if(!o.hasModel(r.attributes.hiddenObjectId))return!0;var a=o.getVisibleModelData(r.attributes.hiddenObjectId);return!a||1!==a.opacity},Be=function(t,e,n,i,r){return e.bind(t,{u_sr2d_texture:r.attributes.atlasIndex}),!0},Ne=function(t,e,n,i,r){var o=r.attributes,a=o.range,s=o.fontIndex,c=o.styleId,l=i.styleManager.getStyle(c);if(!l)return!1;var u=l.fonts[s],d=i.assetManager.getFontTextureByName(u,a);return void 0!==d&&(d.enable(t),!0)},Ue=function(t,e,n,i,r){var o=i.imageManager.getTexture(r.attributes.textureIndex);return void 0!==o&&(o.enable(t,0),e.bind(t,{u_sr2d_texture:0}),!0)},He=function(t,e,n,i,r){var o=i.imageManager.getTexture(r.attributes.rampTextureIndex);return void 0!==o&&(o.enable(t,1),e.bind(t,{u_sr2d_ramp_texture:1}),!0)},Ze=function(t,e,n,i,r,o){var a=r.tile,s=Object(F.g)(o.style.gapColor,$e(n,r));if(!s)return!0;var c=Object(F.b)(Object(F.g)(s,$e(n,r)));return le.k(c,c,a.readiness),e.bind(t,{u_vec4_space_color:c}),!0},Ge=function(t,e,n,i,r,o){var c=n.styleZoom,l=$e(n,r),u=r.tile,d=Object(F.b)(Object(F.g)(o.style.color,l));le.k(d,d,u.readiness),l.styleZoom=Math.floor(c);var f=Math.pow(2,Object(a.l)(c)),h=Object(F.i)(o.style.dashLength,l)*f,p=Object(F.i)(o.style.gapLength,l)*f;return e.bind(t,{u_vec4_dash_color:d,u_vec2_scaler_params:[0,Rt.o],u_float_dash_length:Object(s.w)(h,u.size),u_float_dash2_length:Object(s.w)(h,u.size),u_float_space_length:Object(s.w)(p,u.size)}),!0},We=function(t,e,n,i,r,o){var a=$e(n,r),c=Object(F.i)(o.style.tipWidth,a),l=Object(F.i)(o.style.tipHeight,a),u=c,d=O.j(-u,-0);O.n(d,d);var f=O.j(c,l);return O.n(f,f),e.bind(t,{u_vec2_wing_normal:d,u_vec2_tip_normal:f,u_float_tip_height_multiplier:l,u_float_wing_height_multiplier:0,u_float_wing_width_multiplier:u,u_float_size_factor:Object(s.w)(1,r.tile.size)/2}),!0},Ve=function(t,e,n,i,r,o){var a=$e(n,r),s=Object(F.i)(o.style.lineLength,a),c=Object(F.i)(o.style.lineWidth,a);return e.bind(t,{u_float_length:s,u_float_width:c,u_float_border_width:0}),!0},qe=function(t,e,n,i,r,o){var a=$e(n,r),c=r.tile,l=r.attributes.isLongArrow,u=r.tile.dynamicObject,d=0,f=1;u&&(l?f=u.growPosition:d=u.bouncePosition);var h=0;return"appearence"===o.style.animation.type&&(h=Object(F.i)(o.style.animation.tipMovementAmplitude,a)),e.bind(t,{u_float_width_zpt:Object(F.i)(o.style.lineWidth,a),u_float_border_width_zpt:Object(F.i)(o.style.strokeWidth,a),u_float_tip_movement_amplitude:Object(s.w)(h,c.size),u_float_vertex_shift:d,u_float_relative_end_position:f}),!0},Ye=function(t,e,n,i,r){var o=i.modelManager,a=r.attributes,s=a.texture,c=a.modelIndex,l=o.getTexture(c,s);return void 0!==l&&(l.enable(t,0),e.bind(t,{u_sr2d_texture:0}),!0)},Xe=function(t,e,n,i,r,o){var a=i.modelManager.getOpacity(r.attributes.id,o.minzoom),s=1===i.modelManager.getBuildingHeight(r.attributes.id)?1:a;return e.bind(t,{u_float_height_factor:s}),!0},Ke=function(t,e,n,i,r,o){var a=$e(n,r),s=Object(F.i)(o.style.height,a);return e.bind(t,{u_float_height_factor:Object(u.o)(s)}),!0},Je=function(t,e,n,i,r,o){var a=i.buildingHeightAnimator.getBuildingHeight(o.minzoom);return r.attributes.hiddenObjectId&&i.modelManager.setBuildingHeight(r.attributes.hiddenObjectId,a),e.bind(t,{u_float_height_factor:a}),!0},Qe=function(t,e,n,i,r){var o=i.modelManager,a=i.buildingHeightAnimator,s=a.getBuildingHeight(r.attributes.minStyleZoom);if(o.hasModel(r.attributes.hiddenObjectId)){var c=o.getVisibleModelData(r.attributes.hiddenObjectId);c&&(s=s-a.getBuildingHeight(c.minStyleZoom)>.5?s:0)}return 0!==s};function $e(t,e){return Object(F.c)(t.styleZoom,t.styleState,e.attributes.tileData)}var tn=function(t,e,n,i,r,s){var c=r.tile,l=c.purpose,u=c.detailLevel,d=n.styleZoom;switch(l){case"terrain":case"traffic":case"geojson":var f=u<function(t){switch(t){case"terrain":return o.tiles.maxDetailLevel;case"traffic":return o.traffic.maxDetailLevel;case"geojson":return de.a}}(l)?Object(a.d)(d,u,u+.99999):d;return s.minzoom<=f&&f<s.maxzoom;case"dynamicObject":return s.minzoom<=d&&d<=s.maxzoom;default:return s.minzoom<=d&&d<s.maxzoom}},en=function(t,e,n,i,r){var a=n.styleZoom;return!("terrain"===r.tile.purpose&&a<=o.tiles.maxUniverseZoom)},nn=function(t,e,n,i,r,o){var a=n.styleZoom;return a>=o.minzoom&&a<o.maxzoom},rn=function(t,e,n,i,r,o){var a=r.tile,c=Object(F.i)(o.style.width,$e(n,r));return 0!==c&&(e.bind(t,{u_float_width:Object(s.w)(c,a.size)/2,u_float_width_offset:Object(s.w)(1/window.devicePixelRatio,a.size)/2}),!0)},on=function(t,e,n,i,r,o){var a=Object(F.i)(o.style.radius,$e(n,r));return!(a<=0||(e.bind(t,{u_float_radius:a*window.devicePixelRatio}),0))},an=function(t,e,n,i,r,o){var a=Object(F.i)(o.style.intensity,$e(n,r));return e.bind(t,{u_float_intensity:a}),!0},sn=function(t,e,n,i,r,a){var s=$e(n,r),c=r.attributes.labelIndex,l=Object(F.i)(a.style.textFontSize,s);return c===ue.LabelIndex.Second&&a.style.textFontSize2?l=Object(F.i)(a.style.textFontSize2,s):c===ue.LabelIndex.Icon&&a.style.iconTextFontSize&&(l=Object(F.i)(a.style.iconTextFontSize,s)),e.bind(t,{u_float_scale:l*window.devicePixelRatio/o.fonts.baseSize}),!0},cn=function(t,e,n,i,r,o){var a,s,c=o.style;switch(r.attributes.labelIndex){case ue.LabelIndex.Second:return(null!==(a=c.textHaloWidth2)&&void 0!==a?a:0)>0&&!!c.textHaloColor2;case ue.LabelIndex.Icon:return(null!==(s=c.iconTextHaloWidth)&&void 0!==s?s:0)>0&&!!c.iconTextHaloColor;case ue.LabelIndex.First:default:return c.textHaloWidth>0&&!!c.textHaloColor}},ln=function(t,e,n,i,r,o){return dn(t,e,n,r,o.style.textFontSize,o.style.textColor,o.style.textHaloWidth,o.style.textHaloColor,r.layerSettings.uniformSet)},un=function(t,e,n,i,r,o){var a=r.layerSettings.uniformSet,s=r.attributes.labelIndex,c=o.style,l=c.textFontSize,u=c.textHaloWidth,d=c.textColor,f=c.textHaloColor;switch(s){case ue.LabelIndex.Icon:l=c.iconTextFontSize,u=c.iconTextHaloWidth,d=c.iconTextColor,f=c.iconTextHaloColor;break;case ue.LabelIndex.Second:l=c.textFontSize2,u=c.textHaloWidth2,d=c.textColor2,f=c.textHaloColor2}return dn(t,e,n,r,l,d,u,f,a)},dn=function(t,e,n,i,r,a,s,c,l){var u,d=$e(n,i),f=Object(F.i)(r,d)/o.fonts.baseSize,h=f*window.devicePixelRatio,p=o.fonts.gamma/h;if("fontHalo"===l){if(!c)return!1;u=Object(F.b)(Object(F.g)(c,d))}else u=Object(F.b)(Object(F.g)(a,d));var m="fontHalo"===l?(6-Object(F.i)(s,d)/f)/8:.75;return e.bind(t,{u_float_buffer:m,u_float_gamma:p,u_vec4_color:u}),!0},fn=function(t,e,n,i,r){var o=r.attributes,a=o.offsetX,s=o.offsetY,c=window.devicePixelRatio;return e.bind(t,{u_vec2_offset:[a*c,s*c]}),!0},hn=function(t,e,n){return e.bind(t,{u_float_style_zoom:n.styleZoom}),!0},pn=function(t,e,n,i,r){var o=r.tile,a=n.zoom,s=Rt.m*Math.pow(2,a-o.zoomLevel)*window.devicePixelRatio;return e.bind(t,{u_float_tile_to_pixel_ratio:1/s}),!0};function mn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=[0,0,0,0];return function(e,i,r,o,a,s){for(var c=0;c<t.length;c++)if(!t[c](e,i,r,o,a,s,n))return!1;return!0}}var vn=function(t){t.depthMask(!0),t.enable(t.DEPTH_TEST),t.depthFunc(t.LESS),t.enable(t.CULL_FACE),t.cullFace(t.BACK),t.disable(t.BLEND),t.blendFunc(t.ONE,t.ZERO),t.colorMask(!0,!0,!0,!0),t.disable(t.POLYGON_OFFSET_FILL)},_n=function(t){vn(t),t.depthMask(!1),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},yn=function(t){vn(t),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),t.disable(t.CULL_FACE)},gn=function(t){vn(t),t.disable(t.DEPTH_TEST),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},bn=function(t){vn(t),t.disable(t.DEPTH_TEST)},xn=function(t){vn(t),t.depthMask(!1)},wn=function(t){vn(t),t.colorMask(!1,!1,!1,!1)},Sn=function(t){vn(t),t.depthFunc(t.EQUAL),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},In=function(t){vn(t),t.disable(t.DEPTH_TEST),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},jn=function(t){vn(t),t.polygonOffset(1,2),t.enable(t.POLYGON_OFFSET_FILL),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},On=function(t){vn(t),t.disable(t.DEPTH_TEST),t.cullFace(t.FRONT),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA)},Mn=function(t){t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE)},Pn=n(7),Ln=function(){function t(t,e){void 0===e&&(e={}),this._buffer=t,this.options=Object.assign({},Pn.a.defaultOptions,e)}return t.prototype.bind=function(t,e){this._buffer.bind(t,e,this.options)},t}(),Tn=function(){function t(t,e){void 0===e&&(e={}),this._vao=null,this._attributes=e,this._shaderProgram=t,this._ext=null}return t.prototype.bind=function(t){var e=t.extensions.OES_vertex_array_object;return e?this._bind(t.gl,e):this._shaderProgram.bind(t.gl,null,this._attributes),this},t.prototype.unbind=function(){return this._ext&&this._ext.bindVertexArrayOES(null),this},t.prototype.remove=function(){return this._vao&&this._ext.deleteVertexArrayOES(this._vao),this},t.prototype._bind=function(t,e){this._vao?e.bindVertexArrayOES(this._vao):this._prepare(t,e)},t.prototype._prepare=function(t,e){this._ext=e,this._vao=e.createVertexArrayOES(),e.bindVertexArrayOES(this._vao);var n=this._shaderProgram.attributes,i=this._attributes;for(var r in i){var o=n[r];!0!==o.index&&t.enableVertexAttribArray(o.location),i[r].bind(t,o.location)}},t}(),kn=n(65),zn=n(66),Cn=n(55),En=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:8,offset:0,normalized:!0});return new Tn(e,{a_vec2_vertex:n})},An=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:8,offset:0,normalized:!0}),i=new Ln(t,{itemSize:4,dataType:Pn.a.UnsignedByte,stride:8,offset:4,normalized:!0});return new Tn(e,{a_vec2_vertex:n,a_vec4_identifier:i})},Dn=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new Ln(t,{itemSize:4,dataType:Pn.a.Byte,stride:12,offset:4,normalized:!1});return new Tn(e,{a_vec2_vertex:n,a_vec4_normals:i})},Fn=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new Ln(t,{itemSize:4,dataType:Pn.a.Byte,stride:16,offset:4,normalized:!1}),r=new Ln(t,{itemSize:2,dataType:Pn.a.Float,stride:16,offset:8,normalized:!1});return new Tn(e,{a_vec2_vertex:n,a_vec4_normals:i,a_vec2_shift:r})},Rn=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new Ln(t,{itemSize:4,dataType:Pn.a.Byte,stride:12,offset:4,normalized:!1}),r=new Ln(t,{itemSize:4,dataType:Pn.a.UnsignedByte,stride:12,offset:8,normalized:!0});return new Tn(e,{a_vec2_vertex:n,a_vec4_normals:i,a_vec4_identifier:r})},Bn=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:28,offset:0,normalized:!0}),i=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:28,offset:4,normalized:!1}),r=new Ln(t,{itemSize:2,dataType:Pn.a.Byte,stride:28,offset:8,normalized:!1}),o=new Ln(t,{itemSize:1,dataType:Pn.a.Float,stride:28,offset:12,normalized:!1}),a=new Ln(t,{itemSize:1,dataType:Pn.a.Float,stride:28,offset:16,normalized:!1}),s=new Ln(t,{itemSize:1,dataType:Pn.a.Float,stride:28,offset:20,normalized:!1}),c=new Ln(t,{itemSize:4,dataType:Pn.a.UnsignedByte,stride:28,offset:24,normalized:!0});return new Tn(e,{a_vec2_vertex:n,a_vec2_texture_widen:r,a_vec2_widen:i,a_float_vertex_distance:o,a_float_component_distance:a,a_float_object_length:s,a_vec4_identifier:c})},Nn=function(t,e){var n=new Ln(t,{itemSize:3,dataType:Pn.a.UnsignedShort,stride:20,offset:0,normalized:!0}),i=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:20,offset:8,normalized:!1}),r=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:20,offset:12,normalized:!1});return new Tn(e,{a_vec4_position:n,a_vec2_offset:i,a_vec2_texcoord:r})},Un=function(t,e){var n=new Ln(t,{itemSize:3,dataType:Pn.a.UnsignedShort,stride:20,offset:0,normalized:!0}),i=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:20,offset:8,normalized:!1}),r=new Ln(t,{itemSize:4,dataType:Pn.a.UnsignedByte,stride:20,offset:16,normalized:!0});return new Tn(e,{a_vec4_position:n,a_vec2_offset:i,a_vec4_identifier:r})},Hn=function(t,e){var n=new Ln(t,{itemSize:3,dataType:Pn.a.UnsignedShort,stride:28,offset:0,normalized:!0}),i=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:28,offset:8,normalized:!1}),r=new Ln(t,{itemSize:2,dataType:Pn.a.Float,stride:28,offset:12,normalized:!1}),o=new Ln(t,{itemSize:2,dataType:Pn.a.Float,stride:28,offset:20,normalized:!1});return new Tn(e,{a_vec4_position:n,a_vec2_offset:r,a_vec2_texcoord:i,a_vec2_style_zoom_limits:o})},Zn=function(t,e){var n=new Ln(t,{itemSize:3,dataType:Pn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new Ln(t,{itemSize:3,dataType:Pn.a.Byte,stride:16,offset:8,normalized:!1});return new Tn(e,{a_vec3_vertex:n,a_vec3_normal:i})},Gn=function(t,e){var n=new Ln(t,{itemSize:3,dataType:Pn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new Ln(t,{itemSize:4,dataType:Pn.a.UnsignedByte,stride:16,offset:12,normalized:!0});return new Tn(e,{a_vec3_vertex:n,a_vec4_identifier:i})},Wn=function(t,e){var n=new Ln(t,{itemSize:3,dataType:Pn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new Ln(t,{itemSize:1,dataType:Pn.a.Short,stride:16,offset:6,normalized:!0}),r=new Ln(t,{itemSize:2,dataType:Pn.a.Byte,stride:16,offset:8,normalized:!1}),o=new Ln(t,{itemSize:2,dataType:Pn.a.Byte,stride:16,offset:10,normalized:!1}),a=new Ln(t,{itemSize:3,dataType:Pn.a.Byte,stride:16,offset:12,normalized:!1});return new Tn(e,{a_vec4_vertex:n,a_vec2_normal:r,a_vec2_normal_delta:o,a_vec3_direction:a,a_float_distance:i})},Vn=function(t,e){var n=new Ln(t,{itemSize:3,dataType:Pn.a.UnsignedShort,stride:24,offset:0,normalized:!0}),i=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:24,offset:8,normalized:!1}),r=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:24,offset:12,normalized:!1}),o=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:24,offset:16,normalized:!1});return new Tn(e,{a_vec3_position:n,a_vec2_offset:i,a_vec2_texcoord:r,a_vec2_range:o})},qn=function(t,e){var n=new Ln(t,{itemSize:3,dataType:Pn.a.UnsignedShort,stride:24,offset:0,normalized:!0}),i=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:24,offset:8,normalized:!1}),r=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:24,offset:12,normalized:!1}),o=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:24,offset:16,normalized:!1}),a=new Ln(t,{itemSize:4,dataType:Pn.a.UnsignedByte,stride:24,offset:20,normalized:!0});return new Tn(e,{a_vec3_position:n,a_vec2_offset:i,a_vec2_texcoord:r,a_vec2_range:o,a_vec4_identifier:a})},Yn=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:16,offset:8,normalized:!1}),r=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:16,offset:12,normalized:!1});return new Tn(e,{a_vec2_position:n,a_vec2_direction:i,a_vec2_widen_direction:r})},Xn=function(t,e){var n=new Ln(t,{itemSize:3,dataType:Pn.a.UnsignedShort,stride:16,offset:0,normalized:!0}),i=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:16,offset:8,normalized:!1});return new Tn(e,{a_vec3_vertex:n,a_vec2_texcoord:i})},Kn=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:8,offset:0,normalized:!0}),i=new Ln(t,{itemSize:4,dataType:Pn.a.Byte,stride:8,offset:4,normalized:!1});return new Tn(e,{a_vec3_vertex:n,a_vec4_direction_distance:i})},Jn=function(t,e){var n=new Ln(t,{itemSize:3,dataType:Pn.a.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new Ln(t,{itemSize:4,dataType:Pn.a.Byte,stride:12,offset:8,normalized:!1});return new Tn(e,{a_vec3_vertex:n,a_vec4_direction_distance:i})},Qn=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:36,offset:0,normalized:!0}),i=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:36,offset:4,normalized:!0}),r=new Ln(t,{itemSize:4,dataType:Pn.a.Byte,stride:36,offset:8,normalized:!1}),o=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:36,offset:12,normalized:!1}),a=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:36,offset:16,normalized:!1}),s=new Ln(t,{itemSize:1,dataType:Pn.a.Float,stride:36,offset:20,normalized:!1}),c=new Ln(t,{itemSize:1,dataType:Pn.a.Float,stride:36,offset:24,normalized:!1}),l=new Ln(t,{itemSize:1,dataType:Pn.a.Float,stride:36,offset:28,normalized:!1}),u=new Ln(t,{itemSize:4,dataType:Pn.a.UnsignedByte,stride:36,offset:32,normalized:!0});return new Tn(e,{a_vec2_vertex:n,a_vec2_segment_end:i,a_vec4_texture_widen_arrow_widen:r,a_vec2_widen:o,a_vec2_direction:a,a_float_distance_from_start:s,a_float_object_length:c,a_float_type:l,a_vec4_identifier:u})},$n=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:12,offset:4,normalized:!1});return new Tn(e,{a_vec4_vertex:n,a_vec2_widen:i})},ti=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:12,offset:0,normalized:!0}),i=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:12,offset:4,normalized:!1}),r=new Ln(t,{itemSize:4,dataType:Pn.a.UnsignedByte,stride:12,offset:8,normalized:!0});return new Tn(e,{a_vec4_vertex:n,a_vec2_widen:i,a_vec4_identifier:r})},ei=function(t,e){var n=kn.sinks.fill.stride,i=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:n,offset:0,normalized:!1}),r=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:n,offset:4,normalized:!1}),o=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:n,offset:8,normalized:!1});return new Tn(e,{a_vec2_position:i,a_vec2_offset:r,a_vec2_texcoord:o})},ni=function(t,e){var n=kn.sinks.fill.stride,i=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:n,offset:0,normalized:!1}),r=new Ln(t,{itemSize:2,dataType:Pn.a.Short,stride:n,offset:4,normalized:!1}),o=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:n,offset:8,normalized:!1}),a=new Ln(t,{itemSize:4,dataType:Pn.a.UnsignedByte,stride:n,offset:12,normalized:!0});return new Tn(e,{a_vec2_position:i,a_vec2_offset:r,a_vec2_texcoord:o,a_vec4_identifier:a})},ii=function(t,e){var n=zn.sinks.fill.stride,i=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:n,offset:0,normalized:!0}),r=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:n,offset:4,normalized:!1});return new Tn(e,{a_vec2_vertex:i,a_vec2_texcoord:r})},ri=function(t,e){var n=Cn.sinks.framebuffer.stride,i=new Ln(t,{itemSize:2,dataType:Pn.a.UnsignedShort,stride:n,offset:0,normalized:!0}),r=new Ln(t,{itemSize:1,dataType:Pn.a.Float,stride:n,offset:4,normalized:!1}),o=new Ln(t,{itemSize:2,dataType:Pn.a.Byte,stride:n,offset:8,normalized:!1});return new Tn(e,{a_vec2_position:i,a_vec2_widen:o,a_float_weight:r})},oi=function(t,e){var n=new Ln(t,{itemSize:2,dataType:Pn.a.Float,stride:0,offset:0,normalized:!1});return new Tn(e,{a_vec2_position:n})},ai=function(){function t(t){this.gl=t,this.ext=t.getExtension("EXT_disjoint_timer_query"),this.queries=[]}return t.prototype.addTimer=function(){if(this.ext){var t=this.ext.createQueryEXT();this.queries.push(t),this.ext.beginQueryEXT(this.ext.TIME_ELAPSED_EXT,t)}},t.prototype.stopTimer=function(){this.ext&&this.queries.length&&this.ext.endQueryEXT(this.ext.TIME_ELAPSED_EXT)},t.prototype.tryToGetFirstTimerValue=function(){if(this.ext){var t=this.queries[0];if(t){var e=this.ext,n=e.getQueryObjectEXT(t,e.QUERY_RESULT_AVAILABLE_EXT),i=this.gl.getParameter(e.GPU_DISJOINT_EXT);if(n&&!i){var r=e.getQueryObjectEXT(t,e.QUERY_RESULT_EXT);return e.deleteQueryEXT(t),this.queries.shift(),Number(r)}}}},t}(),si=function(){function t(t){this.name=t.name,this.index=t.index,this.location=void 0!==t.location?t.location:-1,this._enable=!1}return t.prototype.bindLocation=function(t,e){return-1!==this.location&&!0!==this.index&&t.bindAttribLocation(e,this.location,this.name),this},t.prototype.getLocation=function(t,e){return-1===this.location&&!0!==this.index&&(this.location=t.getAttribLocation(e,this.name)),this},t.prototype.bind=function(t,e){return this._enable||!0===this.index||(t.enableVertexAttribArray(this.location),this._enable=!0),e.bind(t,this.location),this},t.prototype.disable=function(t){return this._enable&&!0!==this.index&&(t.disableVertexAttribArray(this.location),this._enable=!1),this},t}(),ci=function(){function t(t){this.name=t.name,this.type=t.type,this.location=-1}return t.prototype.getLocation=function(t,e){return this.location=t.getUniformLocation(e,this.name),this},t.prototype.bind=function(t,e){var n=this.type;return"mat2"===n?t.uniformMatrix2fv(this.location,!1,e):"mat3"===n?t.uniformMatrix3fv(this.location,!1,e):"mat4"===n?t.uniformMatrix4fv(this.location,!1,e):"2f"===n?t.uniform2f(this.location,e[0],e[1]):"3f"===n?t.uniform3f(this.location,e[0],e[1],e[2]):"4f"===n?t.uniform4f(this.location,e[0],e[1],e[2],e[3]):"2i"===n?t.uniform2i(this.location,e[0],e[1]):"3i"===n?t.uniform3i(this.location,e[0],e[1],e[2]):"4i"===n?t.uniform4i(this.location,e[0],e[1],e[2],e[3]):t["uniform"+n](this.location,e),this},t}(),li=function(){function t(t){var e=this;t=t||{},this._vertexShader=t.vertex,this._fragmentShader=t.fragment,this.uniforms={},t.uniforms=t.uniforms||[],t.uniforms.forEach((function(t){e.uniforms[t.name]=new ci(t)})),this.attributes={},t.attributes=t.attributes||[],t.attributes.forEach((function(t){e.attributes[t.name]=new si(t)})),this._linked=!1,this._located=!1,this._error=!1}return t.prototype.enable=function(t){return this._error||(this.link(t),this.locate(t),this._error||t.useProgram(this._webglProgram)),this},t.prototype.bind=function(t,e,n){if(this._error)return this;if(e)for(var i in e)this.uniforms[i].bind(t,e[i]);if(n)for(var i in n)this.attributes[i].bind(t,n[i]);return this},t.prototype.disable=function(t){if(this._error)return this;for(var e in this.attributes)this.attributes[e].disable(t);return this},t.prototype.link=function(t){if(this._linked||this._error)return this;try{for(var e in this._webglProgram=t.createProgram(),this._vertexShader&&t.attachShader(this._webglProgram,this._vertexShader.get(t)),this._fragmentShader&&t.attachShader(this._webglProgram,this._fragmentShader.get(t)),this.attributes)this.attributes[e].bindLocation(t,this._webglProgram);if(t.linkProgram(this._webglProgram),!t.getProgramParameter(this._webglProgram,t.LINK_STATUS))throw new Error(t.getProgramInfoLog(this._webglProgram));this._linked=!0}catch(t){throw this._error=!0,t}return this},t.prototype.locate=function(t){if(this._located||this._error)return this;for(var e in this.attributes)this.attributes[e].getLocation(t,this._webglProgram);for(var e in this.uniforms)this.uniforms[e].getLocation(t,this._webglProgram);return this._located=!0,this},t}(),ui="vec4 apply_opacity(const vec4 color, const float opacity)\n{\nreturn color * opacity;\n}\n",di={affine_step:"\nfloat affine_step(const float edge0, const float edge1, const float x)\n{\nreturn clamp((x - edge0) / (edge1 - edge0), 0., 1.);\n}\n",apply_opacity:ui,color:"varying vec4 v_vec4_color;\nvoid main()\n{\ngl_FragColor = v_vec4_color;\n}\n",line:"varying vec4 v_vec4_color;\nvarying float v_float_distance;\nvoid main()\n{\ngl_FragColor = v_vec4_color * (1. - abs(v_float_distance * gl_FragCoord.w));\n}\n",lowp_float:"precision lowp float;\n",mediump_float:"precision mediump float;\n",highp_float:"precision highp float;\n",pointsprite:"uniform sampler2D u_sr2d_texture;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\ngl_FragColor = apply_opacity(texture2D(u_sr2d_texture, v_vec2_texcoord), u_float_opacity);\n}\n",striped_line:"varying vec4 v_vec4_dash_color;\nvarying vec4 v_vec4_space_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvarying float v_float_part_color_swap_threshold;\nvarying float v_float_distance_in_parts;\nvec4 distance_func_smooth(in vec4 main_color, in vec4 border_color, in vec2 circle)\n{\nfloat circle_length = length(circle);\nfloat distance = circle_length - v_float_width;\nmat2 derivatives = mat2(dFdx(v_vec2_circle), dFdy(v_vec2_circle));\nvec2 circle_dx = derivatives[0];\nvec2 circle_dy = derivatives[1];\nfloat distance_dx = dot(v_vec2_circle, circle_dx);\nfloat distance_dy = dot(v_vec2_circle, circle_dy);\nfloat derivative_denominator = circle_length;\nfloat width = max(abs(distance_dx), abs(distance_dy));\nvec4 from_main_to_border = mix(\nmain_color,\nborder_color,\naffine_step(-width, 0., distance * derivative_denominator));\nvec4 from_color_to_fade = mix(\nfrom_main_to_border,\nvec4(0.),\naffine_step(0., +width, distance * derivative_denominator));\nreturn from_color_to_fade;\n}\nfloat calculate_segment_color_factor(in float distance_in_parts, in float threshold)\n{\nfloat color_factor = abs(fract(distance_in_parts + 0.5 - 0.5 * threshold) - 0.5);\nfloat parts_affine_step_width = fwidth(distance_in_parts);\nfloat smoothed_color_factor = affine_step(\n0.5 * threshold - 0.5 * parts_affine_step_width,\n0.5 * threshold + 0.5 * parts_affine_step_width,\ncolor_factor);\nreturn smoothed_color_factor;\n}\nvoid main()\n{\nvec4 current_segment_color = mix(\nv_vec4_dash_color,\nv_vec4_space_color,\ncalculate_segment_color_factor(\nv_float_distance_in_parts,\nv_float_part_color_swap_threshold));\nvec4 final_border_color = (1.0 - v_vec4_border_color.a) * current_segment_color + v_vec4_border_color;\ngl_FragColor = distance_func_smooth(current_segment_color, final_border_color, v_vec2_circle);\n}\n",label:"uniform sampler2D u_sr2d_texture;\nuniform float u_float_buffer;\nuniform float u_float_gamma;\nuniform vec4 u_vec4_color;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_texcoord;\nvoid main() {\n    float dist = texture2D(u_sr2d_texture, v_vec2_texcoord).a;\n    float alpha = smoothstep(\n        u_float_buffer - u_float_gamma,\n        u_float_buffer + u_float_gamma,\n        dist\n    );\n    gl_FragColor = apply_opacity(u_vec4_color * alpha, u_float_opacity);\n}\n",one_way_line:"uniform vec2 u_vec2_wing_normal;\nuniform vec2 u_vec2_tip_normal;\nuniform float u_float_width;\nuniform float u_float_length;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_tip_height_multiplier;\nuniform float u_float_wing_height_multiplier;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_texcoord;\nvarying float v_float_border_width;\nvarying float v_float_zpt_to_texcoord_factor;\nvarying float v_float_outer_width;\nvarying float v_float_opacity;\nfloat one_way_line_distance(const ArrowDistances ad)\n{\nreturn max(max(max(ad.top_tip_cut, ad.bottom_tip_cut), max(ad.top_left_wing, ad.top_right_wing)), min(ad.line, min(ad.bottom_left_wing, ad.bottom_right_wing)));\n}\nvoid main()\n{\nmat2 derivatives = mat2(dFdx(v_vec2_texcoord), dFdy(v_vec2_texcoord));\nArrowDistanceParameters arrow_parameters = calculate_arrow_distance_parameters(\nu_vec2_wing_normal,\nu_vec2_tip_normal,\nu_float_width * v_float_zpt_to_texcoord_factor,\nu_float_length * v_float_zpt_to_texcoord_factor,\nu_float_tip_height_multiplier,\nu_float_wing_height_multiplier);\nfloat border_clipping = (abs(v_vec2_texcoord.y) - v_float_outer_width) / max(abs(derivatives[0].y), abs(derivatives[1].y));\nfloat fill_factor = affine_step(-1., 0., one_way_line_distance(calculate_arrow_distances(arrow_parameters, v_vec2_texcoord, 0., derivatives)));\nfloat border_factor = max(border_clipping, affine_step(0., 1., one_way_line_distance(calculate_arrow_distances(arrow_parameters, v_vec2_texcoord, v_float_border_width, derivatives))));\ngl_FragColor = apply_opacity(mix(mix(v_vec4_color, v_vec4_border_color, fill_factor), vec4(0.), border_factor), v_float_opacity);\n}\n",color_identify:"varying vec4 v_vec4_identifier;\nvoid main()\n{\ngl_FragColor = v_vec4_identifier;\n}\n",pointsprite_identify:"uniform sampler2D u_sr2d_texture;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nvec4 color = texture2D(u_sr2d_texture, v_vec2_texcoord);\nif (color.a < 0.3) {\ndiscard;\n} else {\ngl_FragColor = v_vec4_identifier;\n}\n}\n",model:"uniform sampler2D u_sr2d_texture;\nuniform vec4 u_vec4_color;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\ngl_FragColor = texture2D(u_sr2d_texture, v_vec2_texcoord) * u_vec4_color;\n}\n",simple_line:"uniform vec4 u_vec4_color;\nvarying float v_float_distance;\nvarying float v_float_distance_offset;\nvoid main()\n{\nvec4 color = u_vec4_color;\ngl_FragColor = color * clamp(\n1. + v_float_distance_offset - abs(v_float_distance * gl_FragCoord.w),\n0.,\n1.);\n}\n",enable_standard_derivatives:"#extension GL_OES_standard_derivatives: enable\n",arrow_functions:"struct ArrowDistanceParameters\n{\nvec2 wing_normal;\nvec2 tip_normal;\nvec2 mirrored_wing_normal;\nvec2 mirrored_tip_normal;\nfloat width;\nfloat full_length;\nfloat arrow_height;\n};\nArrowDistanceParameters calculate_arrow_distance_parameters(\nconst vec2 wing_normal,\nconst vec2 tip_normal,\nconst float width_zpt,\nconst float length_zpt,\nconst float tip_height_multiplier,\nconst float wing_height_multiplier)\n{\nvec2 mirrored_wing_normal = vec2(wing_normal.x, -wing_normal.y);\nvec2 mirrored_tip_normal = vec2(tip_normal.x, -tip_normal.y);\nfloat width = 0.5 * width_zpt;\nfloat length = 0.5 * length_zpt;\nfloat arrow_height = width_zpt * (tip_height_multiplier - wing_height_multiplier);\nreturn ArrowDistanceParameters(\nwing_normal,\ntip_normal,\nmirrored_wing_normal,\nmirrored_tip_normal,\nwidth,\nlength,\narrow_height);\n}\nstruct ArrowDistances\n{\nfloat top_tip_cut;\nfloat bottom_tip_cut;\nfloat line;\nfloat bottom_left_wing;\nfloat bottom_right_wing;\nfloat top_left_wing;\nfloat top_right_wing;\n};\nArrowDistances calculate_arrow_distances(\nconst ArrowDistanceParameters arrow_parameters,\nconst vec2 texcoord,\nconst float offset,\nconst mat2 derivatives)\n{\nfloat derivatives_x_multiplier = 1. / max(abs(derivatives[0].x), abs(derivatives[1].x));\nfloat dt = ( texcoord.x - arrow_parameters.full_length - offset) * derivatives_x_multiplier;\nfloat d0 = (-texcoord.x - arrow_parameters.full_length - offset) * derivatives_x_multiplier;\nfloat d1 = (abs(texcoord.y) - arrow_parameters.width - offset) / max(abs(derivatives[0].y), abs(derivatives[1].y));\nfloat d2 = (dot(texcoord - vec2(arrow_parameters.full_length - arrow_parameters.arrow_height, 0.), arrow_parameters.wing_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.wing_normal)), abs(dot(derivatives[1], arrow_parameters.wing_normal)));\nfloat d3 = (dot(texcoord - vec2(arrow_parameters.full_length - arrow_parameters.arrow_height, 0.), arrow_parameters.mirrored_wing_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.mirrored_wing_normal)), abs(dot(derivatives[1], arrow_parameters.mirrored_wing_normal)));\nfloat d4 = (dot(texcoord - vec2(arrow_parameters.full_length, 0.), arrow_parameters.tip_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.tip_normal)), abs(dot(derivatives[1], arrow_parameters.tip_normal)));\nfloat d5 = (dot(texcoord - vec2(arrow_parameters.full_length, 0.), arrow_parameters.mirrored_tip_normal) - offset) / max(abs(dot(derivatives[0], arrow_parameters.mirrored_tip_normal)), abs(dot(derivatives[1], arrow_parameters.mirrored_tip_normal)));\nreturn ArrowDistances(dt, d0, d1, d2, d3, d4, d5);\n}\n",circle_functions:"\nconst float g_distance_precision_limit = 1e-4;\nstruct CircleDistance\n{\nfloat distance;\nfloat width;\n};\nCircleDistance circle_color_distance(\nconst mat2 derivatives,\nconst vec2 circle,\nconst float circle_width)\n{\nfloat circle_length = length(circle);\nfloat distance = circle_length - circle_width;\nvec2 circle_dx = derivatives[0];\nvec2 circle_dy = derivatives[1];\nfloat distance_dx = dot(circle, circle_dx);\nfloat distance_dy = dot(circle, circle_dy);\nfloat derivative_denominator = circle_length;\nfloat width = max(abs(distance_dx), abs(distance_dy));\nreturn CircleDistance(\ndistance * derivative_denominator,\nwidth);\n}\nvec4 distance_to_color(\nconst float fill_distance,\nconst float border_distance,\nconst vec4 fill_color,\nconst vec4 border_color)\n{\nfloat fill_factor = affine_step(-1., 0., fill_distance);\nfloat border_factor = affine_step(0., 1., border_distance);\nreturn\nmix(mix(fill_color, border_color, fill_factor), vec4(.0), border_factor);\n}\nvec4 distance_to_color(\nconst CircleDistance circle_distance,\nconst vec4 fill_color)\n{\nfloat fill_factor = circle_distance.distance < g_distance_precision_limit\n? 0.\n: affine_step(0., circle_distance.width, circle_distance.distance);\nreturn mix(fill_color, vec4(0.), fill_factor);\n}\n",arrow_line:"uniform vec2 u_vec2_wing_normal;\nuniform vec2 u_vec2_tip_normal;\nuniform float u_float_tip_height_multiplier;\nuniform float u_float_wing_height_multiplier;\nvarying vec2 v_vec2_line_type_arrow_tail;\nvarying vec4 v_vec4_arrow_width_length_border_outer;\nvarying vec4 v_vec4_texcoord_arrow_line;\nvarying vec4 v_vec4_distance_vertex_hiding;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nconst float g_type_arrow = 1.;\nconst float g_type_start_border = 2.;\nbool lookalike(const float a, const float b)\n{\nreturn abs(a - b) < 1e-4;\n}\nfloat filter_border(const float start, const float value)\n{\nreturn step(start, value) * 2. - 1.;\n}\nfloat arrow_distance(\nconst ArrowDistanceParameters arrow_parameters,\nconst vec2 texcoord,\nconst float offset,\nconst mat2 derivatives,\nconst float line_distance,\nconst float line_distance_no_offset)\n{\nArrowDistances ad = calculate_arrow_distances(arrow_parameters, texcoord, offset, derivatives);\nfloat derivatives_x_multiplier = 1. / max(abs(derivatives[0].x), abs(derivatives[1].x));\nfloat intersection_point = arrow_parameters.full_length - arrow_parameters.arrow_height - arrow_parameters.width * u_vec2_wing_normal.y / u_vec2_wing_normal.x;\nfloat tail_arrow_intersection = filter_border(-1., (texcoord.x - intersection_point) * derivatives_x_multiplier);\nfloat tail_hide_part = v_vec2_line_type_arrow_tail.y;\nfloat tail_hide_mask = (-texcoord.x - tail_hide_part) * derivatives_x_multiplier;\nfloat clipped_tail = max(tail_hide_mask, max(line_distance, max(ad.top_left_wing, ad.top_right_wing)));\nfloat line_without_offset = filter_border(0., line_distance_no_offset);\nfloat wings_with_tail = max(min(min(ad.bottom_left_wing, ad.bottom_right_wing), line_without_offset), max(ad.top_left_wing, ad.top_right_wing));\nreturn (v_vec4_distance_vertex_hiding.x < v_vec4_distance_vertex_hiding.y)\n? max(ad.top_tip_cut, max(-max(tail_arrow_intersection, line_without_offset), wings_with_tail))\n: max(ad.top_tip_cut, min(clipped_tail, max(-max(tail_arrow_intersection, line_without_offset), wings_with_tail)));\n}\nvec4 distance_to_arrow_line_color(\nconst float fill_distance,\nconst float border_distance)\n{\nreturn distance_to_color(fill_distance, border_distance, v_vec4_color, v_vec4_border_color);\n}\nvec4 arrow_color(\nconst vec2 texcoord,\nconst ArrowDistanceParameters arrow_parameters,\nconst float line_fill_distance,\nconst float line_border_distance)\n{\nmat2 derivatives = mat2(dFdx(texcoord), dFdy(texcoord));\nfloat border_clipping = (abs(texcoord.y) - v_vec4_arrow_width_length_border_outer.w) / max(abs(derivatives[0].y), abs(derivatives[1].y));\nfloat arrow_border_distance = arrow_distance(\narrow_parameters,\ntexcoord,\nv_vec4_arrow_width_length_border_outer.z,\nderivatives,\nline_border_distance,\nline_fill_distance);\nfloat border_factor = max(border_clipping, affine_step(0., 1., arrow_border_distance));\nreturn distance_to_arrow_line_color(\narrow_distance(arrow_parameters, texcoord, 0., derivatives, line_fill_distance, line_fill_distance),\nborder_factor);\n}\nfloat line_start_distance(\nconst vec2 texcoord,\nconst float offset,\nconst mat2 derivatives,\nconst float line_distance)\n{\nfloat tail_hide_part = v_vec2_line_type_arrow_tail.y;\nfloat d0 = (-texcoord.x - offset) / max(abs(derivatives[0].x), abs(derivatives[1].x));\nfloat dh = (texcoord.x - tail_hide_part) / max(abs(derivatives[0].x), abs(derivatives[1].x));\nreturn max(d0, max(line_distance, dh));\n}\nvec4 line_color(const float line_fill_distance, const float line_border_distance)\n{\nfloat type = v_vec2_line_type_arrow_tail.x;\nfloat fill_distance = line_fill_distance;\nfloat border_distance = line_border_distance;\nif (lookalike(type, g_type_start_border))\n{\nvec2 texcoord = v_vec4_texcoord_arrow_line.xy;\nmat2 derivatives = mat2(dFdx(texcoord), dFdy(texcoord));\nfill_distance = line_start_distance(texcoord, 0., derivatives, line_fill_distance);\nborder_distance = line_start_distance(texcoord, v_vec4_arrow_width_length_border_outer.z, derivatives, line_border_distance);\n}\nreturn distance_to_arrow_line_color(fill_distance, border_distance);\n}\nvec4 arrow_line_color()\n{\nif (lookalike(min(v_vec4_distance_vertex_hiding.y, 1.), 1.)\n|| lookalike(v_vec4_distance_vertex_hiding.w, 1.)\n|| !lookalike(v_vec2_line_type_arrow_tail.x, g_type_arrow) && (v_vec4_distance_vertex_hiding.x < v_vec4_distance_vertex_hiding.y || v_vec4_distance_vertex_hiding.x > v_vec4_distance_vertex_hiding.z))\n{\ndiscard;\n}\nArrowDistanceParameters arrow_parameters = calculate_arrow_distance_parameters(\nu_vec2_wing_normal,\nu_vec2_tip_normal,\nv_vec4_arrow_width_length_border_outer.x,\nv_vec4_arrow_width_length_border_outer.y,\nu_float_tip_height_multiplier,\nu_float_wing_height_multiplier);\nfloat line_width = arrow_parameters.width;\nfloat line_border = v_vec4_arrow_width_length_border_outer.z;\nvec2 line_texcoord = v_vec4_texcoord_arrow_line.zw;\nmat2 line_derivatives = mat2(dFdx(line_texcoord), dFdy(line_texcoord));\nCircleDistance circle_fill_distance = circle_color_distance(line_derivatives, line_texcoord, line_width);\nCircleDistance circle_border_distance = circle_color_distance(line_derivatives, line_texcoord, line_width + line_border);\nfloat line_fill_distance = affine_step(-1., 0., circle_fill_distance.distance / circle_fill_distance.width) - 1.;\nfloat line_border_distance = affine_step(0., circle_border_distance.width, circle_border_distance.distance);\nreturn lookalike(v_vec2_line_type_arrow_tail.x, g_type_arrow)\n? arrow_color(v_vec4_texcoord_arrow_line.xy, arrow_parameters, line_fill_distance, line_border_distance)\n: line_color(line_fill_distance, line_border_distance);\n}\nvoid main()\n{\ngl_FragColor = arrow_line_color();\n}\n",arrow_line_identify:"\nvarying vec2 v_vec2_line_type_arrow_tail;\nvarying vec4 v_vec4_distance_vertex_hiding;\nvarying vec4 v_vec4_identifier;\nconst float g_type_arrow = 1.;\nbool lookalike(const float a, const float b)\n{\nreturn abs(a - b) < 1e-5;\n}\nvoid main()\n{\nif (lookalike(min(v_vec4_distance_vertex_hiding.y, 1.), 1.)\n|| lookalike(v_vec4_distance_vertex_hiding.w, 1.)\n|| !lookalike(v_vec2_line_type_arrow_tail.x, g_type_arrow) && (v_vec4_distance_vertex_hiding.x < v_vec4_distance_vertex_hiding.y || v_vec4_distance_vertex_hiding.x > v_vec4_distance_vertex_hiding.z))\n{\ndiscard;\n}\n    gl_FragColor = v_vec4_identifier;\n}\n",circle_marker:"uniform vec4 u_vec4_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvoid main() {\n    float center_distance = dot(v_vec2_circle, v_vec2_circle);\n    gl_FragColor = u_vec4_color * affine_step(1.0, 1.0 - 4.0 / v_float_width, center_distance);\n}\n",road:"uniform vec4 u_vec4_color;\nvarying vec2 v_vec2_normal;\nvarying float v_float_half_width;\nvoid main()\n{\n    \n    float opacity = 1.0 - affine_step(\n        v_float_half_width - length(fwidth(v_vec2_normal)),\n        v_float_half_width,\n        length(v_vec2_normal)\n    );\n    gl_FragColor = u_vec4_color * opacity;\n}\n",road_identify:"varying vec4 v_vec4_identifier;\nvarying vec2 v_vec2_normal;\nvarying float v_float_half_width;\nvoid main()\n{\n    if (dot(v_vec2_normal, v_vec2_normal) > v_float_half_width * v_float_half_width) {\n        discard;\n    }\n    gl_FragColor = v_vec4_identifier;\n}\n",stretchable_image:"uniform sampler2D u_sr2d_texture;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\n  gl_FragColor = texture2D(u_sr2d_texture, v_vec2_texcoord);\n}\n",stretchable_image_identify:"uniform sampler2D u_sr2d_texture;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\n  vec4 color = texture2D(u_sr2d_texture, v_vec2_texcoord);\n  if (color.a < 0.1) {\n    discard;\n  } else {\n    gl_FragColor = v_vec4_identifier;\n  }\n}\n",rect:"uniform vec4 u_vec4_color;\nvoid main()\n{\ngl_FragColor = u_vec4_color;\n}\n",rect_with_texture:"uniform sampler2D u_sr2d_texture;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\n  gl_FragColor = apply_opacity(texture2D(u_sr2d_texture, v_vec2_texcoord), u_float_opacity);\n}\n",heatmap:"uniform highp float u_float_intensity;\nvarying float v_float_weight;\nvarying vec2 v_vec2_extrude;\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n    float d = -0.5 * 3.0 * 3.0 * dot(v_vec2_extrude, v_vec2_extrude);\n    float val = v_float_weight * u_float_intensity * GAUSS_COEF * exp(d);\n    gl_FragColor = vec4(val, 1.0, 1.0, 1.0);\n}",heatmap_texture:"uniform sampler2D u_sr2d_texture;\nuniform sampler2D u_sr2d_ramp_texture;\nuniform float u_float_opacity;\nvarying vec2 v_vec2_position;\nvoid main() {\n    float t = texture2D(u_sr2d_texture, v_vec2_position).r;\n    vec4 color = texture2D(u_sr2d_ramp_texture, vec2(t, 0.5));\n    gl_FragColor = color * u_float_opacity;\n}"},fi={apply_height_factor:"vec4 apply_z_limitation(vec4 vertex, float tile_height, float height_limitation)\n{\nvertex.z = min(vertex.z, height_limitation / tile_height);\nreturn vertex;\n}\nvec4 apply_height_factor(const vec3 vertex, const float height_factor)\n{\nvec3 result_vertex = vertex;\nresult_vertex.z *= height_factor;\nreturn vec4(result_vertex, 1.0);\n}\n",apply_opacity:ui,color:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_color;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nvarying vec4 v_vec4_color;\nvoid main()\n{\nv_vec4_color = apply_opacity(u_vec4_color, u_float_opacity);\ngl_Position = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0);\n}\n",diffuse:"uniform mat4 u_mat4_mvp;\nuniform vec3 u_vec3_light_direction;\nuniform vec3 u_vec3_light_color;\nuniform vec3 u_vec3_ambient_color;\nuniform vec4 u_vec4_color;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_height_factor;\nuniform float u_float_opacity;\nattribute vec3 a_vec3_vertex;\nattribute vec3 a_vec3_normal;\nvarying vec4 v_vec4_color;\nconst float g_wall_offset_isometric = .001;\nconst float g_wall_offset_perspective = 8.;\nvoid main()\n{\nv_vec4_color = apply_opacity(\nvec4(\nu_vec4_color.rgb * (u_vec3_ambient_color + u_vec3_light_color * abs(dot(u_vec3_light_direction, normalize_s08(a_vec3_normal)))),\nu_vec4_color.a),\nu_float_opacity);\nvec4 vertex_hf = apply_height_factor(a_vec3_vertex, u_float_height_factor);\ngl_Position = u_mat4_mvp * apply_z_limitation(vertex_hf, u_float_tile_height, u_float_height_limitation);\nif (normalize_s08(a_vec3_normal).z < .5)\n{\nif ((u_mat4_mvp[0][3] == 0.) && (u_mat4_mvp[1][3] == 0.) && (u_mat4_mvp[2][3] == 0.))\n{\ngl_Position.z += g_wall_offset_isometric;\n}\nelse\n{\ngl_Position.z += g_wall_offset_perspective;\n}\n}\n}\n",line:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_light_direction;\nuniform vec3 u_vec3_light_color;\nuniform vec3 u_vec3_ambient_color;\nuniform vec4 u_vec4_color;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_height_factor;\nuniform float u_float_opacity;\nattribute vec4 a_vec4_vertex;\nattribute vec2 a_vec2_normal;\nattribute vec2 a_vec2_normal_delta;\nattribute vec3 a_vec3_direction;\nattribute float a_float_distance;\nvarying vec4 v_vec4_color;\nvarying float v_float_distance;\nconst float g_shift_pixels = 1.;\nconst float g_min_denominator = 1e-4;\nconst float g_w_factor = 1e-6;\nvec2 multiply_complex(vec2 lhs, vec2 rhs)\n{\nreturn vec2(lhs.x * rhs.x - lhs.y * rhs.y, lhs.x * rhs.y + lhs.y * rhs.x);\n}\nvoid main()\n{\nvec2 half_viewport = u_vec2_vpt_size / vec2(2.);\nvec4 clip_space_direction = u_mat4_mvp * vec4(normalize_s08(a_vec3_direction), 0.);\nvec4 vertex_hf = apply_height_factor(a_vec4_vertex.xyz, u_float_height_factor);\nvec4 clip_space_vertex = u_mat4_mvp * apply_z_limitation(vertex_hf, u_float_tile_height, u_float_height_limitation);\nvec2 screen_space_direction = (clip_space_direction.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_direction.w) * half_viewport;\nvec2 screen_space_perp = vec2(-screen_space_direction.y, screen_space_direction.x);\nfloat denominator = max(g_min_denominator, length(screen_space_perp));\nvec2 bevel_normal = normalize_s08(a_vec2_normal);\nvec2 normal_delta = normalize_s08(a_vec2_normal_delta);\nvec4 clip_space_bevel_normal = u_mat4_mvp * vec4(bevel_normal, 0., 0.);\nvec2 screen_space_bevel_normal = (clip_space_bevel_normal.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_bevel_normal.w) * half_viewport;\nfloat bevel_denominator = max(g_min_denominator, length(screen_space_bevel_normal));\nfloat normal_factor = -dot(screen_space_bevel_normal, screen_space_perp) / denominator / bevel_denominator;\nvec2 wall_normal = multiply_complex(bevel_normal, vec2(normal_delta.x, sign(normal_factor) * normal_delta.y));\nfloat bevel_diffuse = abs(dot(u_vec3_light_direction.xy, bevel_normal));\nfloat wall_diffuse = abs(dot(u_vec3_light_direction.xy, wall_normal));\nfloat diffuse = mix(bevel_diffuse, wall_diffuse, abs(normal_factor));\ngl_Position = g_w_factor * (clip_space_vertex + vec4(screen_space_perp / half_viewport, 0., 0.) * g_shift_pixels * a_float_distance / denominator * clip_space_vertex.w);\nv_vec4_color = vec4(u_vec4_color.rgb * (u_vec3_ambient_color + u_vec3_light_color * diffuse), u_vec4_color.a);\nv_float_distance = a_float_distance * gl_Position.w;\n}\n",packed_attributes:"\nvec2 normalize_s08(vec2 value)\n{\nreturn value * (1. / 127.);\n}\nvec3 normalize_s08(vec3 value)\n{\nreturn value * (1. / 127.);\n}\nfloat normalize_s16(float value)\n{\nreturn value * (1. / 32767.);\n}\nvec2 normalize_s16(vec2 value)\n{\nreturn value * (1. / 32767.);\n}\nvec3 normalize_s16(vec3 value)\n{\nreturn value * (1. / 32767.);\n}\nvec2 unpack_widen(vec2 widen_packed)\n{\nreturn normalize_s08(widen_packed) * sqrt(2.);\n}\nvec2 unpack_texcoord(vec2 texcoord)\n{\nreturn texcoord * (1. / 32768.);\n}\nvec2 unpack_model_texcoord(vec2 texcoord)\n{\nconst float min_value = -3.0;\nconst float max_value = 5.0;\nreturn texcoord * (max_value - min_value) / 65536.0 + min_value;\n}\n",pixel_offset:"\nconst float g_min_denominator = 1e-7;\nconst float g_max_factor = 10000.;\nfloat calculate_multiplication_factor(\nvec2 half_viewport,\nvec4 clip_space_widen,\nvec4 clip_space_widen_perp,\nvec4 clip_space_vertex,\nfloat shift_pixels)\n{\nfloat limited_factor = 0.;\n{\nvec2 screen_space_widen = (clip_space_widen.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_widen.w) * half_viewport;\nvec2 screen_space_widen_perp = (clip_space_widen_perp.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_widen_perp.w) * half_viewport;\nvec2 perp = vec2(screen_space_widen_perp.y, -screen_space_widen_perp.x);\nfloat perp_length = length(perp);\nvec4 v = clip_space_vertex;\nvec4 n = clip_space_widen;\nfloat denominator = dot(perp, screen_space_widen) / shift_pixels - n.w * v.w * perp_length;\nif (abs(denominator) > g_min_denominator)\n{\nfloat factor = v.w * v.w * perp_length / denominator;\nlimited_factor = sign(factor) * min(g_max_factor, abs(factor));\n}\n}\nreturn limited_factor;\n}\n",pointsprite:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_height_factor;\nuniform float u_float_rounding_factor;\nuniform vec2 u_vec2_rotation; \nattribute vec3 a_vec3_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec2 a_vec2_range;\nattribute vec2 a_vec2_rescale;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\nmat2 rotation_matrix = mat2(\nu_vec2_rotation.x, -u_vec2_rotation.y,\nu_vec2_rotation.y, u_vec2_rotation.x\n);\nvec2 inv_half_size = 2.0 / u_vec2_vpt_size;\nvec4 anchor = u_mat4_mvp * apply_height_factor(a_vec3_position, u_float_height_factor);\nvec2 offset = rescale(rotation_matrix * a_vec2_offset, a_vec2_rescale, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y);\nvec2 pos_2d = anchor.xy + overlay_transform(offset, inv_half_size) * anchor.w;\nvec2 corner = make_position(pos_2d, anchor.w, inv_half_size, u_float_rounding_factor);\ngl_Position = vec4(corner, anchor.z, clipw(anchor.w, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y));\nv_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",precision_constants:"\nconst float g_circle_scale_precision_factor = 1e8;\n",striped_line:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_dash_color;\nuniform vec4 u_vec4_space_color;\nuniform vec4 u_vec4_border_color;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_width;\nuniform float u_float_width_offset;\nuniform vec2 u_vec2_scaler_params;\nuniform float u_float_dash_length;\nuniform float u_float_space_length;\nuniform float u_float_dash2_length;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_texture_widen;\nattribute vec2 a_vec2_widen;\nattribute float a_float_vertex_distance;\nattribute float a_float_component_distance;\nattribute float a_float_object_length;\nvarying vec4 v_vec4_dash_color;\nvarying vec4 v_vec4_space_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvarying float v_float_part_color_swap_threshold;\nvarying float v_float_distance_in_parts;\nconst float g_shift_pixels = 2.;\nconst float g_w_factor = 1e-7;\nPolylineDistance decode_line_distance()\n{\nreturn PolylineDistance(\na_float_vertex_distance,\na_float_component_distance,\na_float_object_length);\n}\nStripedLineInParams decode_line_params(const Scale scale)\n{\nfloat width = calculate_final_width(scale, u_float_width, u_float_width_offset);\nfloat dash_length  = scale.calculation * u_float_dash_length;\nfloat space_length = scale.calculation * u_float_space_length;\nfloat dash2_length = scale.calculation * u_float_dash2_length;\nreturn StripedLineInParams(\ndash_length,\nspace_length,\ndash2_length,\nwidth);\n}\nvoid main()\n{\nScale scale = calculate_scale(u_vec3_projection_scale_style_scale_dpi, u_vec2_scaler_params);\nStripedLineInParams params = decode_line_params(scale);\nvec2 widen = unpack_widen(a_vec2_widen);\nvec2 widen_perp = vec2(-widen.y, widen.x);\nvec4 clip_space_widen = u_mat4_mvp * vec4(widen, 0., 0.);\nvec4 clip_space_widen_perp = u_mat4_mvp * vec4(widen_perp, 0., 0.);\nvec4 clip_space_vertex = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0) + clip_space_widen * params.line_width;\nvec2 half_viewport = 0.5 * u_vec2_vpt_size;\nfloat limited_factor = calculate_multiplication_factor(\nhalf_viewport,\nclip_space_widen,\nclip_space_widen_perp,\nclip_space_vertex,\ng_shift_pixels);\nPolylineDistance distance_decoded = decode_line_distance();\nStripedLineOutParams output_params;\ncalculate_line_params(distance_decoded, params, output_params);\nvec2 texture_widen_with_shift_sign = unpack_widen(a_vec2_texture_widen);\nfloat shift_sign = sign(dot(widen, texture_widen_with_shift_sign));\nvec2 texture_widen = shift_sign * texture_widen_with_shift_sign;\nvec2 texture_widen_perp = vec2(-texture_widen.y, texture_widen.x);\nfloat distance_shift = shift_sign * abs(dot(widen, texture_widen_perp)) * params.line_width;\nfloat circle_factor = g_circle_scale_precision_factor / scale.calculation;\nv_vec2_circle = texture_widen * (params.line_width + limited_factor) * circle_factor;\nv_float_width = params.line_width * circle_factor;\nv_float_part_color_swap_threshold = output_params.part_color_swap_threshold;\nv_float_distance_in_parts = output_params.distance_in_parts;\nv_vec4_dash_color = apply_opacity(u_vec4_dash_color, u_float_opacity);\nv_vec4_space_color = apply_opacity(u_vec4_space_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\ngl_Position = (clip_space_vertex + clip_space_widen * limited_factor) * g_w_factor;\n}\n",striped_line_identify:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_dash_color;\nuniform vec4 u_vec4_space_color;\nuniform vec4 u_vec4_border_color;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_width;\nuniform float u_float_width_offset;\nuniform vec2 u_vec2_scaler_params;\nuniform float u_float_dash_length;\nuniform float u_float_space_length;\nuniform float u_float_dash2_length;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_texture_widen;\nattribute vec2 a_vec2_widen;\nattribute float a_float_vertex_distance;\nattribute float a_float_component_distance;\nattribute float a_float_object_length;\nattribute vec4 a_vec4_identifier;\nvarying vec4 v_vec4_identifier;\nvarying vec4 v_vec4_dash_color;\nvarying vec4 v_vec4_space_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvarying float v_float_part_color_swap_threshold;\nvarying float v_float_distance_in_parts;\nconst float g_shift_pixels = 2.;\nconst float g_w_factor = 1e-7;\nPolylineDistance decode_line_distance()\n{\nreturn PolylineDistance(\na_float_vertex_distance,\na_float_component_distance,\na_float_object_length);\n}\nStripedLineInParams decode_line_params(const Scale scale)\n{\nfloat width = calculate_final_width(scale, u_float_width, u_float_width_offset);\nfloat dash_length  = scale.calculation * u_float_dash_length;\nfloat space_length = scale.calculation * u_float_space_length;\nfloat dash2_length = scale.calculation * u_float_dash2_length;\nreturn StripedLineInParams(\ndash_length,\nspace_length,\ndash2_length,\nwidth);\n}\nvoid main()\n{\nScale scale = calculate_scale(u_vec3_projection_scale_style_scale_dpi, u_vec2_scaler_params);\nStripedLineInParams params = decode_line_params(scale);\nvec2 widen = unpack_widen(a_vec2_widen);\nvec2 widen_perp = vec2(-widen.y, widen.x);\nvec4 clip_space_widen = u_mat4_mvp * vec4(widen, 0., 0.);\nvec4 clip_space_widen_perp = u_mat4_mvp * vec4(widen_perp, 0., 0.);\nvec4 clip_space_vertex = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0) + clip_space_widen * params.line_width;\nvec2 half_viewport = 0.5 * u_vec2_vpt_size;\nfloat limited_factor = calculate_multiplication_factor(\nhalf_viewport,\nclip_space_widen,\nclip_space_widen_perp,\nclip_space_vertex,\ng_shift_pixels);\nPolylineDistance distance_decoded = decode_line_distance();\nStripedLineOutParams output_params;\ncalculate_line_params(distance_decoded, params, output_params);\nvec2 texture_widen_with_shift_sign = unpack_widen(a_vec2_texture_widen);\nfloat shift_sign = sign(dot(widen, texture_widen_with_shift_sign));\nvec2 texture_widen = shift_sign * texture_widen_with_shift_sign;\nvec2 texture_widen_perp = vec2(-texture_widen.y, texture_widen.x);\nfloat distance_shift = shift_sign * abs(dot(widen, texture_widen_perp)) * params.line_width;\nfloat circle_factor = g_circle_scale_precision_factor / scale.calculation;\nv_vec2_circle = texture_widen * (params.line_width + limited_factor) * circle_factor;\nv_float_width = params.line_width * circle_factor;\nv_float_part_color_swap_threshold = output_params.part_color_swap_threshold;\nv_float_distance_in_parts = output_params.distance_in_parts;\nv_vec4_dash_color = apply_opacity(u_vec4_dash_color, u_float_opacity);\nv_vec4_space_color = apply_opacity(u_vec4_space_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\ngl_Position = (clip_space_vertex + clip_space_widen * limited_factor) * g_w_factor;\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",striped_line_functions:"struct PolylineDistance\n{\nfloat vertex_distance_from_start;\nfloat segment_distance_from_start;\nfloat total_length;\n};\nstruct StripedLineInParams\n{\nfloat dash_length;\nfloat space_length;\nfloat dash2_length;\nfloat line_width;\n};\nstruct StripedLineOutParams\n{\nfloat part_color_swap_threshold;\nfloat distance_in_parts;\n};\nvoid calculate_line_params(in PolylineDistance polyline_distance, in StripedLineInParams striped_line_params, out StripedLineOutParams line_params)\n{\nfloat requested_part_length =\nstriped_line_params.dash_length\n+ striped_line_params.space_length;\nfloat space2_length = requested_part_length - striped_line_params.dash2_length;\nfloat min_part_length =\nrequested_part_length\n- 0.5 * min(striped_line_params.space_length, space2_length);\nfloat part_count = max(\nfloor(polyline_distance.total_length / requested_part_length + 0.5),\n1.0);\nfloat part_length = polyline_distance.total_length / part_count;\nfloat dash_length = (part_length / requested_part_length) * striped_line_params.dash2_length;\nfloat part_color_swap_threshold;\nif (polyline_distance.total_length < min_part_length)\n{\ndash_length = part_length;\npart_color_swap_threshold = 1.0;\n}\nelse\n{\npart_color_swap_threshold = dash_length / part_length;\n}\nfloat segment_start = fract((polyline_distance.segment_distance_from_start + 0.5 * dash_length) / part_length);\nfloat vertex_normalized_distance = segment_start + polyline_distance.vertex_distance_from_start / part_length;\nline_params = StripedLineOutParams(\npart_color_swap_threshold,\nvertex_normalized_distance);\n}\n",label_fixed_anchor:"uniform mat4 u_mat4_mvp;\nattribute vec4 a_vec4_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nuniform vec2 u_vec2_offset;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_scale;\nuniform float u_float_height_factor;\nvarying vec2 v_vec2_texcoord;\nvoid main() {\n    vec4 ndcPosition = u_mat4_mvp * apply_height_factor(a_vec4_position.xyz, u_float_height_factor);\n    ndcPosition.xyz = ndcPosition.xyz / ndcPosition.w;\n    ndcPosition.w = 1.0;\n    ndcPosition.xy += (a_vec2_offset * u_float_scale + u_vec2_offset) / u_vec2_vpt_size * 2.0;\n    gl_Position = ndcPosition;\n    v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",label_fixed_anchor_identify:"uniform mat4 u_mat4_mvp;\nattribute vec4 a_vec4_position;\nattribute vec2 a_vec2_offset;\nattribute vec4 a_vec4_identifier;\nuniform vec2 u_vec2_offset;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_scale;\nvarying vec4 v_vec4_identifier;\nvoid main() {\n    v_vec4_identifier = a_vec4_identifier;\n    if (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n    {\n        vec4 ndcPosition = u_mat4_mvp * a_vec4_position;\n        ndcPosition.xyz = ndcPosition.xyz / ndcPosition.w;\n        ndcPosition.w = 1.0;\n        ndcPosition.xy += (a_vec2_offset * u_float_scale + u_vec2_offset) / u_vec2_vpt_size * 2.0;\n        gl_Position = ndcPosition;\n    }\n    else\n    {\n        gl_Position = vec4(1., 1., 1., 1.);\n    }\n}\n",label_directional:"uniform mat4 u_mat4_mvp;\nattribute vec4 a_vec4_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec2 a_vec2_style_zoom_limits;\nuniform float u_float_style_zoom;\nuniform float u_float_scale;\nuniform float u_float_tile_to_pixel_ratio;\nvarying vec2 v_vec2_texcoord;\nfloat clipw(const float w, const vec2 range, const float zoom) {\n    return w * (step(range.x, zoom) - step(range.y, zoom));\n}\nvoid main() {\n    vec4 newPosition = a_vec4_position;\n    newPosition.xy += a_vec2_offset * u_float_scale * u_float_tile_to_pixel_ratio;\n    newPosition = u_mat4_mvp * newPosition;\n    gl_Position = vec4(newPosition.xyz, clipw(newPosition.w, a_vec2_style_zoom_limits, u_float_style_zoom));\n    v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",one_way_line:"uniform vec4 u_vec4_color;\nuniform vec4 u_vec4_border_color;\nuniform mat4 u_mat4_mvp;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform vec2 u_vec2_scale_limits;\nuniform float u_float_border_width;\nuniform float u_float_border_width_offset;\nuniform float u_float_size_factor;\nuniform mediump float u_float_width;\nuniform mediump float u_float_length;\nuniform float u_float_wing_width_multiplier;\nuniform float u_float_opacity;\nattribute vec2 a_vec2_position;\nattribute vec2 a_vec2_direction;\nattribute vec2 a_vec2_widen_direction;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nvarying vec2 v_vec2_texcoord;\nvarying float v_float_border_width;\nvarying float v_float_zpt_to_texcoord_factor;\nvarying float v_float_outer_width;\nvarying float v_float_opacity;\nconst float g_shift_pixels = 2.;\nconst float g_w_factor = 1e-7;\nvoid main()\n{\nfloat style_scale_clamped = clamp(u_vec3_projection_scale_style_scale_dpi.y, u_vec2_scale_limits.x, u_vec2_scale_limits.y);\nfloat scale_ratio = u_vec3_projection_scale_style_scale_dpi.x / u_vec3_projection_scale_style_scale_dpi.y;\nfloat calculation_scale = style_scale_clamped * scale_ratio;\nArrowParameters arrow_parameters = calculate_arrow_parameters(\ncalculation_scale,\nu_float_width,\nu_float_border_width,\nu_float_length,\nu_float_wing_width_multiplier,\nu_float_size_factor);\nv_float_zpt_to_texcoord_factor = arrow_parameters.zpt_to_texcoord_factor;\nv_float_outer_width = arrow_parameters.outer_width;\nvec2 direction = normalize_s08(a_vec2_direction);\nvec2 untransformed_widen = a_vec2_widen_direction * arrow_parameters.widen_size;\nvec2 widen = multiply_complex(untransformed_widen * arrow_parameters.final_size, direction);\nfloat shift_pixels = g_shift_pixels * sqrt(2.) / min(abs(untransformed_widen.x), abs(untransformed_widen.y));\nVertexShiftParameters shift_parameters = calculate_vertex_shift_parameters(\nu_mat4_mvp,\nu_vec2_vpt_size,\na_vec2_position,\nwiden,\nshift_pixels);\ngl_Position = shift_parameters.clip_space_vertex / arrow_parameters.final_size * g_w_factor;\nv_vec2_texcoord = untransformed_widen * (1. + shift_parameters.limited_factor);\nfloat border_width = u_float_border_width * v_float_zpt_to_texcoord_factor;\nfloat border_width_offset = u_float_border_width_offset * v_float_zpt_to_texcoord_factor;\nv_float_border_width = max(0., border_width - u_vec3_projection_scale_style_scale_dpi.y / style_scale_clamped * border_width_offset);\nv_vec4_color = apply_opacity(u_vec4_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\nv_float_opacity = u_float_opacity;\n}\n",round_position:"\nvec4 round_position(const vec4 position, const vec2 half_viewport)\n{\nif (\nposition.w < 0.\n|| position.x < -position.w\n|| position.x > position.w\n|| position.y < -position.w\n|| position.y > position.w\n|| position.z < -position.w\n|| position.z > position.w)\n{\nreturn position;\n}\nelse\n{\nreturn vec4(\nsign(position.xy) * floor(abs(position.xy) * half_viewport / position.w + .5)\n* position.w / half_viewport,\nposition.zw);\n}\n}\n",color_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nattribute vec2 a_vec2_vertex;\nattribute vec4 a_vec4_identifier;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\ngl_Position = round_position(u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.), .5 * u_vec2_vpt_size);\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",model_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nattribute vec3 a_vec3_vertex;\nattribute vec4 a_vec4_identifier;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\ngl_Position = round_position(u_mat4_mvp * vec4(a_vec3_vertex, 1.), .5 * u_vec2_vpt_size);\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",pointsprite_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform float u_float_height_factor;\nuniform vec2 u_vec2_rotation; \nattribute vec3 a_vec3_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec2 a_vec2_range;\nattribute vec2 a_vec2_rescale;\nattribute vec4 a_vec4_identifier;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\nmat2 rotation_matrix = mat2(\nu_vec2_rotation.x, -u_vec2_rotation.y,\nu_vec2_rotation.y, u_vec2_rotation.x\n);\nvec2 inv_half_size = 2.0 / u_vec2_vpt_size;\nvec4 anchor = u_mat4_mvp * apply_height_factor(a_vec3_position, u_float_height_factor);\nvec2 offset = rescale(rotation_matrix * a_vec2_offset, a_vec2_rescale, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y);\nvec2 pos_2d = anchor.xy + overlay_transform(offset, inv_half_size) * anchor.w;\nvec2 corner = make_position(pos_2d, anchor.w, inv_half_size, 1.0);\ngl_Position = vec4(corner, anchor.z, clipw(anchor.w, a_vec2_range, u_vec3_projection_scale_style_scale_dpi.y));\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\nv_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\nv_vec4_identifier = a_vec4_identifier;\n}\n",model:"uniform mat4 u_mat4_mvp;\nuniform float u_float_height_factor;\nattribute vec3 a_vec3_vertex;\nattribute vec2 a_vec2_texcoord;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\nv_vec2_texcoord = unpack_model_texcoord(a_vec2_texcoord);\ngl_Position = u_mat4_mvp * apply_height_factor(a_vec3_vertex, u_float_height_factor);\n}\n",simple_line:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_width;\nuniform float u_float_height_factor;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_z_offset;\nattribute vec3 a_vec3_vertex;\nattribute vec4 a_vec4_direction_distance;\nvarying float v_float_distance;\nvarying float v_float_distance_offset;\nconst float g_smooth_width = 1.;\nconst float g_min_denominator = 1e-4;\nconst float g_w_factor = 1e-6;\nvoid main()\n{\nfloat shift_pixels = 0.5 * max(u_float_width - 1., 0.);\nfloat shift_pixels_added = shift_pixels + g_smooth_width;\nvec3 direction = a_vec4_direction_distance.xyz;\nfloat distance = a_vec4_direction_distance.w;\nvec2 half_viewport = u_vec2_vpt_size / vec2(2.);\nvec4 clip_space_direction = normalize(u_mat4_mvp * vec4(normalize_s08(direction), 0.));\nvec4 clip_space_vertex = u_mat4_mvp * apply_z_limitation(\napply_height_factor(a_vec3_vertex, u_float_height_factor),\nu_float_tile_height, u_float_height_limitation\n);\nvec2 screen_space_direction =\n(clip_space_direction.xy * clip_space_vertex.w - clip_space_vertex.xy * clip_space_direction.w) * half_viewport;\nvec2 screen_space_perp = vec2(-screen_space_direction.y, screen_space_direction.x);\nfloat denominator = max(g_min_denominator, length(screen_space_perp));\ngl_Position = g_w_factor * (clip_space_vertex + vec4(screen_space_perp / half_viewport, 0., 0.)\n* distance * shift_pixels_added / denominator * clip_space_vertex.w);\ngl_Position.z += u_float_z_offset;\nv_float_distance = shift_pixels_added * distance * gl_Position.w;\nv_float_distance_offset = shift_pixels;\n}\n",arrow_line_entrance:"uniform vec4 u_vec4_color;\nuniform vec4 u_vec4_border_color;\nuniform mat4 u_mat4_mvp;\nuniform mediump vec2 u_vec2_vpt_size;\nuniform vec3 u_vec3_projection_scale_style_scale_dpi;\nuniform vec2 u_vec2_scale_limits;\nuniform float u_float_width_zpt;\nuniform float u_float_wing_width_multiplier;\nuniform float u_float_border_width_zpt;\nuniform float u_float_size_factor;\nuniform float u_float_border_width_offset;\nuniform float u_float_tip_height_multiplier;\nuniform float u_float_relative_end_position;\nuniform float u_float_tip_movement_amplitude;\nuniform float u_float_vertex_shift; \nuniform float u_float_opacity;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_segment_end;\nattribute vec4 a_vec4_texture_widen_arrow_widen;\nattribute vec2 a_vec2_widen;\nattribute vec2 a_vec2_direction; \nattribute float a_float_distance_from_start;\nattribute float a_float_object_length;\nattribute float a_float_type;\nattribute vec4 a_vec4_identifier; \nvarying vec2 v_vec2_line_type_arrow_tail;\nvarying vec4 v_vec4_arrow_width_length_border_outer;\nvarying vec4 v_vec4_texcoord_arrow_line;\nvarying vec4 v_vec4_distance_vertex_hiding;\nvarying vec4 v_vec4_identifier;\nvarying vec4 v_vec4_color;\nvarying vec4 v_vec4_border_color;\nconst float g_w_factor = 1e-7;\nconst float g_type_line = 0.;\nconst float g_type_arrow = 1.;\nconst float g_type_start_border = 2.;\nconst float g_type_line_ending = 3.;\nconst float g_type_line_cut = 4.;\nconst float g_shift_pixels = 2.;\nconst float g_line_overlapping_part = .2;\nstruct ArrowLineViewParameters\n{\nfloat vertex_type;\nfloat width_zpt;\nfloat border_width_zpt;\nfloat border_width_offset;\nfloat arrow_segment_length_zpt;\nfloat wing_width_multiplier;\nfloat size_factor;\nvec2 vertex_position;\nvec2 vertex_widen;\nvec2 line_texture_widen;\nvec2 arrow_texture_widen;\nvec2 segment_direction;\nfloat segment_length;\nfloat distance_to_end;\n};\nstruct DistanceShiftParameters\n{\nfloat shift;\nbool invisible;\n};\nvec2 perp(const vec2 vector)\n{\nreturn vec2(-vector.y, vector.x);\n}\nvec2 vertex_shift(const Scale scale)\n{\nreturn u_float_vertex_shift * u_float_tip_movement_amplitude * normalize_s08(a_vec2_direction) * scale.calculation;\n}\nvec2 arrow_shift(const ArrowLineViewParameters view)\n{\nreturn view.segment_direction * view.distance_to_end;\n}\nfloat erase_length_end()\n{\nreturn clamp(u_float_relative_end_position, 0., 1.) * a_float_object_length;\n}\nvoid set_texcoord_varyings(const vec2 arrow_texcoord, const vec2 line_texcoord)\n{\nv_vec4_texcoord_arrow_line = vec4(arrow_texcoord, line_texcoord);\n}\nvoid set_arrow_varyings(\nconst float arrow_width,\nconst float arrow_length,\nconst float arrow_border,\nconst float arrow_outer_width,\nconst float arrow_tail_hide_part)\n{\nv_vec4_arrow_width_length_border_outer = vec4(\narrow_width,\narrow_length,\narrow_border,\narrow_outer_width);\nv_vec2_line_type_arrow_tail = vec2(\na_float_type,\narrow_tail_hide_part);\n}\nDistanceShiftParameters calculate_entrance_arrow_distances(\nconst ArrowLineViewParameters view,\nconst float signed_distance_shift,\nconst float arrow_final_size,\nconst float entrance_arrow_distance_shift)\n{\nDistanceShiftParameters line_distance_parameters = DistanceShiftParameters(\nsigned_distance_shift + entrance_arrow_distance_shift,\nfalse);\nif (a_float_type == g_type_arrow)\n{\nbool outside_of_current_segment = view.distance_to_end > view.segment_length + entrance_arrow_distance_shift;\nbool inside_end_hide = a_float_distance_from_start + entrance_arrow_distance_shift > erase_length_end();\nreturn DistanceShiftParameters(\nline_distance_parameters.shift + view.distance_to_end,\noutside_of_current_segment || inside_end_hide\n);\n}\nelse\n{\nreturn line_distance_parameters;\n}\n}\nvoid set_distance_varyings(\nconst ArrowLineViewParameters view,\nconst float arrow_final_size,\nconst float signed_shift_distance)\n{\nfloat entrance_arrow_distance_shift = arrow_final_size * (2. - g_line_overlapping_part);\nDistanceShiftParameters distance_shift_parameters = calculate_entrance_arrow_distances(\nview,\nsigned_shift_distance,\narrow_final_size,\nentrance_arrow_distance_shift);\nv_vec4_distance_vertex_hiding =\nvec4(\na_float_distance_from_start + distance_shift_parameters.shift,\n0.,\nerase_length_end(),\ndistance_shift_parameters.invisible\n? a_float_object_length\n: 0.\n) / a_float_object_length;\n}\nArrowLineViewParameters decode_arrow_line_view_parameters()\n{\nfloat width_zpt = u_float_width_zpt;\nfloat border_width_zpt = u_float_border_width_zpt;\nfloat arrow_segment_length_zpt = width_zpt * u_float_tip_height_multiplier + border_width_zpt;\nfloat vertex_type = a_float_type;\nvec2 segment_direction = (vertex_type == g_type_line_ending || vertex_type == g_type_line_cut)\n? normalize(a_vec2_vertex - a_vec2_segment_end)\n: normalize(a_vec2_segment_end - a_vec2_vertex);\nfloat segment_length = length(a_vec2_segment_end - a_vec2_vertex);\nfloat distance_to_end = erase_length_end() - a_float_distance_from_start;\nreturn ArrowLineViewParameters(\nvertex_type,\nwidth_zpt,\nborder_width_zpt,\nu_float_border_width_offset,\narrow_segment_length_zpt,\nu_float_wing_width_multiplier,\nu_float_size_factor,\na_vec2_vertex,\nunpack_widen(a_vec2_widen),\nunpack_widen(a_vec4_texture_widen_arrow_widen.xy),\nunpack_widen(a_vec4_texture_widen_arrow_widen.zw),\nsegment_direction,\nsegment_length,\ndistance_to_end);\n}\nvec4 process_arrow_line_vertex(const Scale scale, const mat4 mvp, const vec2 vpt_size)\n{\nArrowLineViewParameters view = decode_arrow_line_view_parameters();\nArrowParameters arrow_parameters = calculate_arrow_parameters(\nscale.calculation,\nview.width_zpt,\nview.border_width_zpt,\nview.arrow_segment_length_zpt,\nview.wing_width_multiplier,\nview.size_factor);\nvec2 vertex_widen = view.vertex_widen;\nvec2 texture_widen_with_sign = view.line_texture_widen;\nfloat shift_sign = sign(dot(vertex_widen, texture_widen_with_sign));\nvec2 line_texture_widen = shift_sign * texture_widen_with_sign;\nfloat line_final_size = (view.width_zpt + 2. * view.border_width_zpt) * view.size_factor * scale.calculation;\nfloat final_size = (view.vertex_type == g_type_arrow)\n? arrow_parameters.final_size\n: line_final_size;\nvec2 line_texture_widen_perp = perp(line_texture_widen);\nfloat shift_distance = abs(dot(vertex_widen, line_texture_widen_perp)) * final_size;\nvec2 shift_direction = line_texture_widen_perp * sign(dot(vertex_widen, line_texture_widen_perp));\nvec2 line_vertex_shift = vertex_widen * final_size - shift_direction * max(0., shift_distance - .5 * view.segment_length);\nvec2 arrow_vertex_widen = vertex_widen * arrow_parameters.final_size;\nvec2 scene_vertex_shift = (view.vertex_type == g_type_arrow)\n? arrow_vertex_widen\n: line_vertex_shift;\nvec2 arrow_position_shift = (view.vertex_type == g_type_arrow)\n? arrow_shift(view)\n: vec2(0.);\nfloat shift_pixels = g_shift_pixels * sqrt(2.);\nVertexShiftParameters line_shift_parameters = calculate_vertex_shift_parameters(\nmvp,\nvpt_size,\nview.vertex_position + (vertex_shift(scale) + arrow_position_shift),\nscene_vertex_shift,\nshift_pixels);\nfloat arrow_line_texcoord_scale = line_final_size / arrow_parameters.final_size;\nfloat line_texcoord_scale = (view.vertex_type != g_type_arrow)\n? arrow_line_texcoord_scale\n: 1.;\nvec2 line_texcoord = line_texture_widen * (1. + line_shift_parameters.limited_factor) * line_texcoord_scale;\nfloat arrow_texcoord_scale = (view.vertex_type == g_type_start_border)\n? arrow_line_texcoord_scale\n: 1.;\nvec2 arrow_texcoord = view.arrow_texture_widen * (1. + line_shift_parameters.limited_factor) * arrow_texcoord_scale;\nset_texcoord_varyings(arrow_texcoord, line_texcoord);\nfloat arrow_width = view.width_zpt * arrow_parameters.zpt_to_texcoord_factor;\nfloat arrow_length = view.arrow_segment_length_zpt * arrow_parameters.zpt_to_texcoord_factor;\nfloat texcoord_border_width = view.border_width_zpt * arrow_parameters.zpt_to_texcoord_factor;\nfloat border_width_texcoord_offset = view.border_width_offset * arrow_parameters.zpt_to_texcoord_factor;\nfloat arrow_border = max(0., texcoord_border_width - scale.style / scale.style_clamped * border_width_texcoord_offset);\nfloat tail_shift_direction = (view.vertex_type == g_type_line_ending || view.vertex_type == g_type_start_border) ? 1. : -1.;\nfloat tail_hide_shift = dot(arrow_vertex_widen, tail_shift_direction * view.segment_direction);\nfloat arrow_tail_hide_part = (view.distance_to_end - tail_hide_shift) * arrow_parameters.zpt_to_texcoord_factor / view.size_factor;\nset_arrow_varyings(\narrow_width,\narrow_length,\narrow_border,\narrow_parameters.outer_width,\narrow_tail_hide_part);\nset_distance_varyings(\nview,\narrow_parameters.final_size,\nshift_sign * shift_distance);\nreturn line_shift_parameters.clip_space_vertex / final_size;\n}\nvoid main()\n{\nv_vec4_identifier = a_vec4_identifier; \nScale scale = calculate_scale(u_vec3_projection_scale_style_scale_dpi, u_vec2_scale_limits);\nvec4 processed_vertex = process_arrow_line_vertex(scale, u_mat4_mvp, u_vec2_vpt_size);\ngl_Position = processed_vertex * g_w_factor;\nv_vec4_color = apply_opacity(u_vec4_color, u_float_opacity);\nv_vec4_border_color = apply_opacity(u_vec4_border_color, u_float_opacity);\n}\n",diffuse_identify:"uniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_height_limitation;\nuniform float u_float_tile_height;\nuniform float u_float_height_factor;\nattribute vec3 a_vec3_vertex;\nattribute vec4 a_vec4_identifier;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\nv_vec4_identifier = a_vec4_identifier;\nif (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n{\nvec4 vertex_hf = apply_height_factor(a_vec3_vertex, u_float_height_factor);\ngl_Position = round_position(\nu_mat4_mvp * apply_z_limitation(vertex_hf, u_float_tile_height, u_float_height_limitation),\n.5 * u_vec2_vpt_size);\n}\nelse\n{\ngl_Position = vec4(1., 1., 1., 1.);\n}\n}\n",calculate_scale:"struct Scale\n{\nfloat projection;\nfloat style;\nfloat style_clamped;\nfloat calculation;\n};\nScale calculate_scale(const vec3 projection_scale_style_scale_dpi, const vec2 scale_limits)\n{\nfloat style_scale_clamped = clamp(projection_scale_style_scale_dpi.y, scale_limits.x, scale_limits.y);\nfloat scale_ratio = projection_scale_style_scale_dpi.x / projection_scale_style_scale_dpi.y;\nfloat calculation_scale = style_scale_clamped * scale_ratio;\nreturn Scale(\nprojection_scale_style_scale_dpi.x,\nprojection_scale_style_scale_dpi.y,\nstyle_scale_clamped,\ncalculation_scale);\n}\nconst float g_min_scale_factor = 1e-2;\nconst float g_max_scale_factor = 1e2;\nconst float g_base_scale_numerator = 1e2;\nfloat normalize_scale_to_tile(const float scale, const float tile_size)\n{\nreturn clamp(\n    (scale - g_min_scale_factor) / (tile_size - g_min_scale_factor),\n    g_min_scale_factor,\n    g_max_scale_factor);\n}",line_width:"float calculate_final_width(\nconst Scale scale,\nconst float width,\nconst float width_offset)\n{\nfloat final_width = max(0., scale.calculation * width - scale.projection * width_offset);\nreturn final_width;\n}\n",arrow_functions:"\nvec2 multiply_complex(const vec2 lhs, const vec2 rhs)\n{\nreturn vec2(lhs.x * rhs.x - lhs.y * rhs.y, lhs.x * rhs.y + lhs.y * rhs.x);\n}\nstruct ArrowParameters\n{\nfloat zpt_to_texcoord_factor;\nfloat final_size;\nfloat outer_width;\nvec2 widen_size;\n};\nArrowParameters calculate_arrow_parameters(\nconst float calculation_scale,\nconst float width_zpt,\nconst float border_width_zpt,\nconst float segment_length_zpt,\nconst float wing_width_multiplier,\nconst float size_factor)\n{\nfloat quad_width = 2.0 * border_width_zpt + 2.0 * wing_width_multiplier * width_zpt;\nfloat quad_height = 2.0 * border_width_zpt + segment_length_zpt;\nfloat max_quad_dimension = max(quad_width, quad_height);\nfloat zpt_to_texcoord_factor = 2.0 / max_quad_dimension;\nfloat final_size = calculation_scale * size_factor * max_quad_dimension;\nvec2 widen_size = 0.5 * vec2(quad_height, quad_width) * zpt_to_texcoord_factor;\nfloat outer_width = (width_zpt * wing_width_multiplier + border_width_zpt) * zpt_to_texcoord_factor;\nreturn ArrowParameters(\nzpt_to_texcoord_factor,\nfinal_size,\nouter_width,\nwiden_size);\n}\nstruct VertexShiftParameters\n{\nvec4 clip_space_vertex;\nfloat limited_factor;\n};\nVertexShiftParameters calculate_vertex_shift_parameters(\nconst mat4 mvp,\nconst vec2 vpt_size,\nconst vec2 vertex,\nconst vec2 widen,\nconst float shift_pixels)\n{\nvec2 widen_perp = vec2(-widen.y, widen.x);\nvec4 clip_space_widen = mvp * vec4(widen, 0., 0.);\nvec4 clip_space_widen_perp = mvp * vec4(widen_perp, 0., 0.);\nvec2 half_viewport = vpt_size / 2.;\nvec4 clip_space_vertex = mvp * vec4(vertex, 0.0, 1.0) + clip_space_widen;\nfloat limited_factor = calculate_multiplication_factor(\nhalf_viewport,\nclip_space_widen,\nclip_space_widen_perp,\nclip_space_vertex,\nshift_pixels);\nreturn VertexShiftParameters(\nclip_space_vertex + clip_space_widen * limited_factor,\nlimited_factor);\n}\n",circle_marker:"attribute vec4 a_vec4_vertex;\nattribute vec2 a_vec2_widen;\nuniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_width;\nvarying vec2 v_vec2_circle;\nvarying float v_float_width;\nvoid main() {\n    vec4 clip_space_position = u_mat4_mvp * a_vec4_vertex;\n    vec4 ndc_position = clip_space_position / clip_space_position.w;\n    ndc_position.xy += a_vec2_widen * u_float_width / u_vec2_vpt_size;\n    gl_Position = ndc_position;\n    v_vec2_circle = a_vec2_widen;\n    v_float_width = u_float_width;\n}\n",circle_marker_identify:"attribute vec4 a_vec4_vertex;\nattribute vec2 a_vec2_widen;\nattribute vec4 a_vec4_identifier;\nuniform mat4 u_mat4_mvp;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_width;\nvarying vec2 v_vec2_circle;\nvarying vec4 v_vec4_identifier;\nvoid main() {\n    v_vec2_circle = a_vec2_widen;\n    v_vec4_identifier = a_vec4_identifier;\n    if (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n    {\n        vec4 clip_space_position = u_mat4_mvp * a_vec4_vertex;\n        vec4 ndc_position = clip_space_position / clip_space_position.w;\n        ndc_position.xy += a_vec2_widen * u_float_width / u_vec2_vpt_size;\n        gl_Position = ndc_position;\n    }\n    else\n    {\n        gl_Position = vec4(1., 1., 1., 1.);\n    }\n}\n",raster_functions:"\nfloat unpack_scale(float value)\n{\nreturn exp(abs(value) / 256.) * sign(value);\n}\nfloat unpack_positive_value(float value)\n{\nreturn exp(value / 256.);\n}\nvec2 make_position(const vec2 position, const float w, const vec2 inv_half_size, const float rounding_factor)\n{\nvec2 non_rounded_position = (position + w) / (w * inv_half_size);\nvec2 rounded_position = floor(non_rounded_position + 0.5);\nvec2 rounding_delta = rounded_position - non_rounded_position;\nvec2 pixel_coord = non_rounded_position + rounding_factor * rounding_delta - 0.5;\nreturn (pixel_coord * inv_half_size) * w - w;\n}\nvec2 overlay_transform(const vec2 position, const vec2 inv_half_size)\n{\nreturn position * inv_half_size;\n}\nfloat clipw(const float w, const vec2 range, const float scale)\n{\nreturn w * (step(unpack_scale(range.x), scale) - step(unpack_positive_value(range.y), scale));\n}\nvec2 rescale(const vec2 corner, const vec2 rescale, const vec2 scale_range, const float style_scale)\n{\nif (scale_range.x < 0.)\n{\nfloat default_scale_denominator = unpack_positive_value(rescale.x);\nfloat rescale_coeff = unpack_positive_value(rescale.y);\nfloat min_scale = unpack_positive_value(-scale_range.x);\nfloat stretch_exponent = floor(0.5 + log2(\nmax(1., 1. + rescale_coeff * (1. / max(min_scale, style_scale) - default_scale_denominator))));\nreturn corner.xy * exp2(stretch_exponent);\n}\nreturn corner;\n}\n",road:"attribute vec2 a_vec2_vertex;\nattribute vec4 a_vec4_normals;\nattribute vec2 a_vec2_shift;\nuniform mat4 u_mat4_mvp;\nuniform float u_float_width;\nuniform float u_float_tile_to_pixel_ratio;\nuniform float u_float_shift;\nvarying vec2 v_vec2_normal;\nvarying float v_float_half_width;\nconst float g_w_factor = 1e-6;\nconst float normal_unpack_multiplier = 0.011135539861205473;\nvoid main()\n{\n    \n    float half_width = 0.5 * (u_float_width + 1.0);\n    \n    vec4 normals = a_vec4_normals * normal_unpack_multiplier * half_width;\n    vec2 extender = normals.xy;\n    vec2 normal = normals.zw;\n    vec2 shift = a_vec2_shift * u_float_shift;\n    \n    vec4 shifted_vertex = vec4(a_vec2_vertex + (shift + extender) * u_float_tile_to_pixel_ratio, 0.0, 1.0);\n    gl_Position = g_w_factor * u_mat4_mvp * shifted_vertex;\n    v_vec2_normal = normal;\n    v_float_half_width = half_width;\n}\n",road_identify:"attribute vec2 a_vec2_vertex;\nattribute vec4 a_vec4_normals;\nattribute vec4 a_vec4_identifier;\nuniform mat4 u_mat4_mvp;\nuniform float u_float_width;\nuniform float u_float_tile_to_pixel_ratio;\nvarying vec2 v_vec2_normal;\nvarying vec4 v_vec4_identifier;\nvarying float v_float_half_width;\nconst float g_w_factor = 1e-6;\nconst float normal_unpack_multiplier = 0.011135539861205473;\nvoid main()\n{\n    \n    float half_width = 0.5 * (u_float_width + 1.0);\n    \n    vec4 normals = a_vec4_normals * normal_unpack_multiplier * half_width;\n    vec2 extender = normals.xy;\n    vec2 normal = normals.zw;\n    if (vec4(1., 1., 1., 1.) != a_vec4_identifier) {\n        \n        vec4 shifted_vertex = vec4(a_vec2_vertex + extender * u_float_tile_to_pixel_ratio, 0.0, 1.0);\n        gl_Position = g_w_factor * u_mat4_mvp * shifted_vertex;\n    } else {\n        gl_Position = vec4(1., 1., 1., 1.);\n    }\n    v_vec2_normal = normal;\n    v_vec4_identifier = a_vec4_identifier;\n    v_float_half_width = half_width;\n}\n",stretchable_image:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_color;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_rounding_factor;\nattribute vec2 a_vec2_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\n  vec2 inv_half_size = 2.0 / u_vec2_vpt_size;\n  vec4 anchor = u_mat4_mvp * vec4(a_vec2_position, 0.0, 1.0);\n  vec2 pos_2d = anchor.xy + overlay_transform(a_vec2_offset, inv_half_size) * anchor.w;\nvec2 pos_2d_rounded = make_position(pos_2d, anchor.w, inv_half_size, u_float_rounding_factor);\n  gl_Position = vec4(pos_2d_rounded, anchor.z, anchor.w);\n  v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",stretchable_image_identify:"uniform mat4 u_mat4_mvp;\nuniform vec4 u_vec4_color;\nuniform vec2 u_vec2_vpt_size;\nuniform float u_float_rounding_factor;\nattribute vec2 a_vec2_position;\nattribute vec2 a_vec2_offset;\nattribute vec2 a_vec2_texcoord;\nattribute vec4 a_vec4_identifier;\nvarying vec2 v_vec2_texcoord;\nvarying vec4 v_vec4_identifier;\nvoid main()\n{\n  if (vec4(1., 1., 1., 1.) != a_vec4_identifier)\n  {\n    vec2 inv_half_size = 2.0 / u_vec2_vpt_size;\n    vec4 anchor = u_mat4_mvp * vec4(a_vec2_position, 0.0, 1.0);\n    vec2 pos_2d = anchor.xy + overlay_transform(a_vec2_offset, inv_half_size) * anchor.w;\n  vec2 pos_2d_rounded = make_position(pos_2d, anchor.w, inv_half_size, u_float_rounding_factor);\n    gl_Position = vec4(pos_2d_rounded, anchor.z, anchor.w);\n  }\n  else\n  {\n    gl_Position = vec4(1., 1., 1., 1.);\n  }\n  v_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n  v_vec4_identifier = a_vec4_identifier;\n}\n",rect:"uniform mat4 u_mat4_mvp;\nattribute vec2 a_vec2_vertex;\nvoid main()\n{\ngl_Position = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0);\n}\n",rect_with_texture:"uniform mat4 u_mat4_mvp;\nattribute vec2 a_vec2_vertex;\nattribute vec2 a_vec2_texcoord;\nvarying vec2 v_vec2_texcoord;\nvoid main()\n{\ngl_Position = u_mat4_mvp * vec4(a_vec2_vertex, 0.0, 1.0);\nv_vec2_texcoord = unpack_texcoord(a_vec2_texcoord);\n}\n",heatmap:"attribute vec2 a_vec2_position;\nattribute vec2 a_vec2_widen;\nattribute float a_float_weight;\nvarying vec2 v_vec2_extrude;\nvarying float v_float_weight;\nuniform mat4 u_mat4_mvp;\nuniform float u_float_radius;\nuniform float u_float_intensity;\nuniform float u_float_tile_to_pixel_ratio;\nconst highp float ZERO = 1.0 / 255.0 / 16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n    float S = sqrt(-2.0 * log(ZERO / a_float_weight / u_float_intensity / GAUSS_COEF)) / 3.0;\n    v_vec2_extrude = S * a_vec2_widen;\n    v_float_weight = a_float_weight;\n    vec2 pos = a_vec2_position + a_vec2_widen * u_float_radius * u_float_tile_to_pixel_ratio;\n    gl_Position = u_mat4_mvp * vec4(pos, 0.0, 1.0);\n}",heatmap_texture:"attribute vec2 a_vec2_position;\nvarying vec2 v_vec2_position;\nvoid main() {\n    gl_Position = vec4(a_vec2_position, 0.0, 1.0);\n    v_vec2_position = clamp(a_vec2_position, vec2(0,0), vec2(1,1));\n}"},hi={color:["apply_opacity","color"],diffuse:["packed_attributes","apply_height_factor","apply_opacity","diffuse"],line:["packed_attributes","apply_height_factor","apply_opacity","line"],pointSprite:["packed_attributes","apply_height_factor","raster_functions","pointsprite"],labelPoint:["packed_attributes","apply_height_factor","label_fixed_anchor"],labelPointIdentify:["label_fixed_anchor_identify"],labelLine:["packed_attributes","label_directional"],stripedLine:["packed_attributes","pixel_offset","calculate_scale","line_width","apply_opacity","precision_constants","striped_line_functions","striped_line"],stripedLineIdentify:["packed_attributes","pixel_offset","calculate_scale","line_width","apply_opacity","precision_constants","striped_line_functions","striped_line_identify"],oneWayLine:["packed_attributes","pixel_offset","arrow_functions","apply_opacity","one_way_line"],colorIdentify:["round_position","color_identify"],modelIdentify:["round_position","model_identify"],buildingIdentify:["round_position","apply_height_factor","diffuse_identify"],pointSpriteIdentify:["packed_attributes","apply_height_factor","raster_functions","pointsprite_identify"],model:["packed_attributes","apply_height_factor","model"],simpleLine:["packed_attributes","apply_height_factor","simple_line"],entranceArrow:["packed_attributes","pixel_offset","arrow_functions","calculate_scale","apply_opacity","arrow_line_entrance"],circleMarker:["circle_marker"],circleMarkerIdentify:["circle_marker_identify"],rect:["rect"],road:["road"],roadIdentify:["road_identify"],rectWithTexture:["packed_attributes","apply_opacity","raster_functions","rect_with_texture"],stretchableImage:["packed_attributes","raster_functions","stretchable_image"],stretchableImageIdentify:["packed_attributes","raster_functions","stretchable_image_identify"],heatmap:["heatmap"],heatmapTexture:["heatmap_texture"]},pi={color:["lowp_float","color"],line:["mediump_float","line"],pointSprite:["mediump_float","apply_opacity","pointsprite"],label:["mediump_float","apply_opacity","label"],stripedLine:["enable_standard_derivatives","mediump_float","affine_step","striped_line"],oneWayLine:["enable_standard_derivatives","mediump_float","affine_step","apply_opacity","arrow_functions","one_way_line"],colorIdentify:["lowp_float","color_identify"],pointSpriteIdentify:["mediump_float","pointsprite_identify"],model:["lowp_float","model"],simpleLine:["lowp_float","simple_line"],entranceArrow:["enable_standard_derivatives","highp_float","affine_step","arrow_functions","circle_functions","arrow_line"],entranceArrowIdentify:["lowp_float","arrow_line_identify"],circleMarker:["mediump_float","affine_step","circle_marker"],rect:["lowp_float","rect"],road:["enable_standard_derivatives","mediump_float","affine_step","road"],roadIdentify:["enable_standard_derivatives","lowp_float","road_identify"],stretchableImage:["mediump_float","stretchable_image"],rectWithTexture:["mediump_float","apply_opacity","rect_with_texture"],stretchableImageIdentify:["mediump_float","stretchable_image_identify"],heatmap:["mediump_float","heatmap"],heatmapTexture:["mediump_float","heatmap_texture"]},mi=function(){function t(e,n,i){void 0===i&&(i=[]),this.type="vertex"===e?t.Vertex:t.Fragment,this._code=Array.isArray(n)?n.join("\n"):n||"",this._code=i.map((function(t){return void 0!==t.value?"#define "+t.type+" "+t.value:"#define "+t.type})).join("\n")+"\n"+this._code}return t.prototype.get=function(t){return this._shader||this._compile(t),this._shader},t.prototype.remove=function(t){this._shader&&t.deleteShader(this._shader)},t.prototype._compile=function(e){var n=this.type===t.Vertex?e.VERTEX_SHADER:e.FRAGMENT_SHADER,i=this._shader=e.createShader(n);if(!i||e.isContextLost())throw new Error("[2gl] Failed to create shader. Shader is null: "+!i+". Context is lost: "+e.isContextLost());if(e.shaderSource(i,this._code),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(i))},t}();mi.Vertex=1,mi.Fragment=2;var vi=mi,_i={},yi={};for(var gi in hi){var bi=hi[gi].map((function(t){return fi[t]}));yi[gi]=bi}for(var gi in pi)bi=pi[gi].map((function(t){return di[t]})),_i[gi]=bi;function xi(t){return new vi("vertex",yi[t])}function wi(t){return new vi("fragment",_i[t])}var Si=n(48),Ii=function(t){function e(e,n){var i=t.call(this,{canvas:n.layout.canvas,antialias:!1,stencil:!0,clearColor:Object(F.b)(Object(Si.a)(e.defaultBackgroundColor)),preserveDrawingBuffer:e.preserveDrawingBuffer})||this;return i.trackContextLost=function(t){t.preventDefault(),i.modules.map.destroy(),ft({eventAction:"WebGlContext",eventLabel:"webglcontextlost"}),ft({eventCategory:"WebGlContext",eventAction:"webglcontextlost",eventLabel:t.statusMessage||""})},i.vpMatrix=Ft.b(),i.state=e,i.modules=n,i.identifyBuffer=new Dt,i.framebuffers=[],i.shaderPrograms={diffuse:new li({vertex:xi("diffuse"),fragment:wi("color"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec3_light_direction",type:"3fv"},{name:"u_vec3_light_color",type:"3fv"},{name:"u_vec3_ambient_color",type:"3fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec3_normal",location:1}]}),labelLine:new li({vertex:xi("labelLine"),fragment:wi("label"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_tile_to_pixel_ratio",type:"1f"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_buffer",type:"1f"},{name:"u_float_gamma",type:"1f"},{name:"u_float_scale",type:"1f"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_style_zoom",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec4_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec2_style_zoom_limits",location:3}]}),labelPoint:new li({vertex:xi("labelPoint"),fragment:wi("label"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_buffer",type:"1f"},{name:"u_float_gamma",type:"1f"},{name:"u_float_scale",type:"1f"},{name:"u_vec4_color",type:"4fv"},{name:"u_vec2_offset",type:"2f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec4_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2}]}),labelPointIdentify:new li({vertex:xi("labelPointIdentify"),fragment:wi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_float_scale",type:"1f"},{name:"u_vec2_offset",type:"2f"}],attributes:[{name:"a_vec4_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec4_identifier",location:2}]}),line:new li({vertex:xi("line"),fragment:wi("line"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_light_direction",type:"3fv"},{name:"u_vec3_light_color",type:"3fv"},{name:"u_vec3_ambient_color",type:"3fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec4_vertex",location:0},{name:"a_vec2_normal",location:1},{name:"a_vec2_normal_delta",location:2},{name:"a_vec3_direction",location:3},{name:"a_float_distance",location:4}]}),pointSprite:new li({vertex:xi("pointSprite"),fragment:wi("pointSprite"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_rounding_factor",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_opacity",type:"1f"},{name:"u_vec2_rotation",type:"2fv"}],attributes:[{name:"a_vec3_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec2_range",location:3},{name:"a_vec2_rescale",location:4}]}),pointSpriteIdentify:new li({vertex:xi("pointSpriteIdentify"),fragment:wi("pointSpriteIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_height_factor",type:"1f"},{name:"u_vec2_rotation",type:"2fv"}],attributes:[{name:"a_vec3_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec2_range",location:3},{name:"a_vec2_rescale",location:4},{name:"a_vec4_identifier",location:5}]}),stripedLine:new li({vertex:xi("stripedLine"),fragment:wi("stripedLine"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scaler_params",type:"2fv"},{name:"u_float_dash_length",type:"1f"},{name:"u_float_space_length",type:"1f"},{name:"u_float_dash2_length",type:"1f"},{name:"u_vec4_dash_color",type:"4fv"},{name:"u_vec4_space_color",type:"4fv"},{name:"u_vec4_border_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_width_offset",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_texture_widen",location:1},{name:"a_vec2_widen",location:2},{name:"a_float_vertex_distance",location:3},{name:"a_float_component_distance",location:4},{name:"a_float_object_length",location:5},{name:"a_vec4_identifier",location:6}]}),stripedLineIdentify:new li({vertex:xi("stripedLineIdentify"),fragment:wi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scaler_params",type:"2fv"},{name:"u_float_dash_length",type:"1f"},{name:"u_float_space_length",type:"1f"},{name:"u_float_dash2_length",type:"1f"},{name:"u_vec4_dash_color",type:"4fv"},{name:"u_vec4_space_color",type:"4fv"},{name:"u_vec4_border_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_width_offset",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_texture_widen",location:1},{name:"a_vec2_widen",location:2},{name:"a_float_vertex_distance",location:3},{name:"a_float_component_distance",location:4},{name:"a_float_object_length",location:5},{name:"a_vec4_identifier",location:6}]}),vtxColor:new li({vertex:xi("color"),fragment:wi("color"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0}]}),vtxColorIdentify:new li({vertex:xi("colorIdentify"),fragment:wi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec4_identifier",location:1}]}),modelIdentify:new li({vertex:xi("modelIdentify"),fragment:wi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"}],attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec4_identifier",location:1}]}),buildingIdentify:new li({vertex:xi("buildingIdentify"),fragment:wi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_height_factor",type:"1f"}],attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec4_identifier",location:1}]}),oneWayLine:new li({vertex:xi("oneWayLine"),fragment:wi("oneWayLine"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec4_color",type:"4f"},{name:"u_vec4_border_color",type:"4f"},{name:"u_vec2_wing_normal",type:"2f"},{name:"u_vec2_tip_normal",type:"2f"},{name:"u_float_width",type:"1f"},{name:"u_float_length",type:"1f"},{name:"u_float_border_width",type:"1f"},{name:"u_float_border_width_offset",type:"1f"},{name:"u_float_size_factor",type:"1f"},{name:"u_vec2_scale_limits",type:"2fv"},{name:"u_float_tip_height_multiplier",type:"1f"},{name:"u_float_wing_height_multiplier",type:"1f"},{name:"u_float_wing_width_multiplier",type:"1f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_direction",location:1},{name:"a_vec2_widen_direction",location:2}]}),model:new li({vertex:xi("model"),fragment:wi("model"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_height_factor",type:"1f"}],attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec2_texcoord",location:1}]}),simpleLine:new li({vertex:xi("simpleLine"),fragment:wi("simpleLine"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_height_factor",type:"1f"},{name:"u_float_height_limitation",type:"1f"},{name:"u_float_tile_height",type:"1f"},{name:"u_float_z_offset",type:"1f"}],attributes:[{name:"a_vec3_vertex",location:0},{name:"a_vec4_direction_distance",location:1}]}),road:new li({vertex:xi("road"),fragment:wi("road"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_width",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"},{name:"u_float_shift",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec4_normals",location:1},{name:"a_vec2_shift",location:2}]}),roadIdentify:new li({vertex:xi("roadIdentify"),fragment:wi("roadIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_width",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec4_normals",location:1},{name:"a_vec4_identifier",location:2}]}),entrance:new li({vertex:xi("entranceArrow"),fragment:wi("entranceArrow"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scale_limits",type:"2fv"},{name:"u_vec4_color",type:"4f"},{name:"u_vec4_border_color",type:"4f"},{name:"u_vec2_wing_normal",type:"2f"},{name:"u_vec2_tip_normal",type:"2f"},{name:"u_float_width_zpt",type:"1f"},{name:"u_float_tip_height_multiplier",type:"1f"},{name:"u_float_wing_width_multiplier",type:"1f"},{name:"u_float_wing_height_multiplier",type:"1f"},{name:"u_float_border_width_zpt",type:"1f"},{name:"u_float_size_factor",type:"1f"},{name:"u_float_border_width_offset",type:"1f"},{name:"u_float_total_line_length",type:"1f"},{name:"u_float_relative_end_position",type:"1f"},{name:"u_float_vertex_shift",type:"1f"},{name:"u_float_tip_movement_amplitude",type:"1f"},{name:"u_vec2_bounce_direction",type:"2f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_segment_end",location:1},{name:"a_vec4_texture_widen_arrow_widen",location:2},{name:"a_vec2_widen",location:3},{name:"a_vec2_direction",location:4},{name:"a_float_distance_from_start",location:5},{name:"a_float_object_length",location:6},{name:"a_float_type",location:7},{name:"a_vec4_identifier",location:8}]}),entranceIdentify:new li({vertex:xi("entranceArrow"),fragment:wi("entranceArrowIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2f"},{name:"u_vec3_projection_scale_style_scale_dpi",type:"3fv"},{name:"u_vec2_scale_limits",type:"2fv"},{name:"u_vec4_color",type:"4f"},{name:"u_vec4_border_color",type:"4f"},{name:"u_vec2_wing_normal",type:"2f"},{name:"u_vec2_tip_normal",type:"2f"},{name:"u_float_width_zpt",type:"1f"},{name:"u_float_tip_height_multiplier",type:"1f"},{name:"u_float_wing_width_multiplier",type:"1f"},{name:"u_float_wing_height_multiplier",type:"1f"},{name:"u_float_border_width_zpt",type:"1f"},{name:"u_float_size_factor",type:"1f"},{name:"u_float_border_width_offset",type:"1f"},{name:"u_float_total_line_length",type:"1f"},{name:"u_float_relative_end_position",type:"1f"},{name:"u_float_vertex_shift",type:"1f"},{name:"u_float_tip_movement_amplitude",type:"1f"},{name:"u_vec2_bounce_direction",type:"2f"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_segment_end",location:1},{name:"a_vec4_texture_widen_arrow_widen",location:2},{name:"a_vec2_widen",location:3},{name:"a_vec2_direction",location:4},{name:"a_float_distance_from_start",location:5},{name:"a_float_object_length",location:6},{name:"a_float_type",location:7},{name:"a_vec4_identifier",location:8}]}),circleMarker:new li({vertex:xi("circleMarker"),fragment:wi("circleMarker"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_vec4_color",type:"4fv"},{name:"u_float_width",type:"1f"}],attributes:[{name:"a_vec4_vertex",location:0},{name:"a_vec2_widen",location:1}]}),rect:new li({vertex:xi("rect"),fragment:wi("rect"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec4_color",type:"4fv"}],attributes:[{name:"a_vec2_vertex",location:0}]}),rectWithTexture:new li({vertex:xi("rectWithTexture"),fragment:wi("rectWithTexture"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_vertex",location:0},{name:"a_vec2_texcoord",location:1}]}),circleMarkerIdentify:new li({vertex:xi("circleMarkerIdentify"),fragment:wi("colorIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_float_width",type:"1f"}],attributes:[{name:"a_vec4_vertex",location:0},{name:"a_vec2_widen",location:1},{name:"a_vec4_identifier",location:2}]}),stretchableImage:new li({vertex:xi("stretchableImage"),fragment:wi("stretchableImage"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_rounding_factor",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2}]}),stretchableImageIdentify:new li({vertex:xi("stretchableImageIdentify"),fragment:wi("stretchableImageIdentify"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_vec2_vpt_size",type:"2fv"},{name:"u_sr2d_texture",type:"1i"},{name:"u_float_rounding_factor",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_offset",location:1},{name:"a_vec2_texcoord",location:2},{name:"a_vec4_identifier",location:3}]}),heatmap:new li({vertex:xi("heatmap"),fragment:wi("heatmap"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_radius",type:"1f"},{name:"u_float_intensity",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_widen",location:1},{name:"a_float_weight",location:2}]}),heatmapTexture:new li({vertex:xi("heatmapTexture"),fragment:wi("heatmapTexture"),uniforms:[{name:"u_sr2d_texture",type:"1i"},{name:"u_sr2d_ramp_texture",type:"1i"},{name:"u_float_opacity",type:"1f"}],attributes:[{name:"a_vec2_position",location:0}]})},n.map.once("idle",(function(){return function(t,e){if(window.requestIdleCallback){var n=function(n){var i=t[n];window.requestIdleCallback((function(){i.link(e),setTimeout((function(){window.requestIdleCallback((function(){return i.locate(e)}))}),2e3)}))};for(var i in t)n(i)}}(i.shaderPrograms,i._gl)})),i.symbolSettingsList={line:{solid:[{programName:"road",vaoCreator:Dn,stateBinder:gn,globalBinder:Gt,objectBinder:mn(tn,he,Ie,pn,je)},{identify:!0,programName:"roadIdentify",vaoCreator:Rn,stateBinder:xn,globalBinder:Gt,objectBinder:mn(tn,pn,je)}]},polygon:{fill:[{programName:"vtxColor",vaoCreator:En,stateBinder:gn,globalBinder:Gt,objectBinder:mn(tn,Fe,he,Ie,be)},{identify:!0,programName:"vtxColorIdentify",vaoCreator:An,stateBinder:bn,globalBinder:Wt,objectBinder:mn(tn,Fe)}],stroke:[{programName:"simpleLine",vaoCreator:Kn,stateBinder:gn,globalBinder:ce(Wt,Kt,ee),objectBinder:mn(en,tn,Fe,ve,xe,Ie,Oe),subRenderIndex:1}]},polygonExtrusion:{sideFill:[{programName:"diffuse",vaoCreator:Zn,stateBinder:wn,globalBinder:ce(Jt,Xt),objectBinder:mn(tn,Fe,me,ge,Ie,Je,be)},{programName:"diffuse",vaoCreator:Zn,stateBinder:Sn,globalBinder:ce(Jt,Xt),objectBinder:mn(tn,Fe,me,ge,Ie,Je,be),subRenderIndex:1},{identify:!0,programName:"buildingIdentify",vaoCreator:Gn,stateBinder:vn,globalBinder:ce(Xt,Wt),objectBinder:mn(tn,Fe,Re,Je)}],topFill:[{programName:"diffuse",vaoCreator:Zn,stateBinder:wn,globalBinder:ce(Jt,Xt),objectBinder:mn(tn,Fe,pe,ge,Ie,Je,be)},{programName:"diffuse",vaoCreator:Zn,stateBinder:Sn,globalBinder:ce(Jt,Xt),objectBinder:mn(tn,Fe,pe,ge,Ie,Je,be),subRenderIndex:1},{identify:!0,programName:"buildingIdentify",vaoCreator:Gn,stateBinder:vn,globalBinder:ce(Xt,Wt),objectBinder:mn(tn,Fe,Re,Je)}],sideStroke:[{programName:"line",vaoCreator:Wn,stateBinder:_n,globalBinder:ce(Jt,Xt,Wt),objectBinder:mn(tn,Fe,Qe,me,Se,ge,Ie,Je,be),subRenderIndex:3}],topStroke:[{programName:"simpleLine",vaoCreator:Jn,stateBinder:_n,globalBinder:ce(Wt,Xt,ne),objectBinder:mn(tn,Fe,ve,we,ge,Ie,Oe,Je),subRenderIndex:4}]},labelLine:{raster:[{programName:"labelLine",vaoCreator:Hn,stateBinder:In,globalBinder:ce(ie,Yt),objectBinder:mn(nn,cn,Ce,Ne,sn,ln,pn,hn),uniformSet:"fontHalo"},{programName:"labelLine",vaoCreator:Hn,stateBinder:In,globalBinder:ce(ie,Yt),objectBinder:mn(nn,Ce,Ne,sn,ln,pn,hn),uniformSet:"fontFill",subRenderIndex:1}]},dashedLine:{stroke:[{programName:"stripedLine",vaoCreator:Bn,stateBinder:gn,globalBinder:ce(Wt,Vt,oe,ae),objectBinder:mn(tn,Ge,rn,Ze,be),uniformSet:"fill"},{identify:!0,programName:"stripedLineIdentify",vaoCreator:Bn,stateBinder:xn,globalBinder:ce(Wt,Vt,oe,ae),objectBinder:mn(tn,Ge,rn,be,Ze)}]},oneWayLine:{raster:[{programName:"oneWayLine",vaoCreator:Yn,stateBinder:gn,globalBinder:ce(Wt,Vt,re,te),objectBinder:mn(nn,Ce,he,Ie,We,Ve)}]},point:{raster:[{programName:"pointSprite",vaoCreator:Vn,stateBinder:In,globalBinder:ce(se,Wt,qt,$t,Yt),objectBinder:mn(nn,Te,Ce,Be,Ee)},{identify:!0,programName:"pointSpriteIdentify",vaoCreator:qn,stateBinder:bn,globalBinder:ce(se,Wt,qt,Yt),objectBinder:mn(nn,Te,Be,Ee)}],text:[{programName:"labelPoint",vaoCreator:Nn,stateBinder:In,globalBinder:ce(ie,Yt,Wt),objectBinder:mn(nn,cn,Ce,Ne,sn,un,fn),uniformSet:"fontHalo",subRenderIndex:1},{programName:"labelPoint",vaoCreator:Nn,stateBinder:In,globalBinder:ce(ie,Yt,Wt),objectBinder:mn(nn,Ce,Ne,sn,un,fn),uniformSet:"fontFill",subRenderIndex:2},{identify:!0,programName:"labelPointIdentify",vaoCreator:Un,stateBinder:bn,globalBinder:Wt,objectBinder:mn(nn,ze,sn,fn),subRenderIndex:1}]},buildingModel:{fill:[{programName:"model",vaoCreator:Xn,stateBinder:jn,globalBinder:Gt,objectBinder:mn(tn,he,ye,Ie,Xe,Ye),subRenderIndex:2},{programName:"modelIdentify",vaoCreator:Gn,stateBinder:vn,globalBinder:Wt,objectBinder:mn(tn),subRenderIndex:2,identify:!0}],stroke:[{programName:"simpleLine",vaoCreator:Jn,stateBinder:_n,globalBinder:ce(Wt,Kt,ee),objectBinder:mn(tn,ve,ye,Ie,Oe,Xe),subRenderIndex:5}]},shiftedLine:{solid:[{programName:"road",vaoCreator:Fn,stateBinder:gn,globalBinder:Gt,objectBinder:mn(tn,he,Ie,je,pn,ke)}]},circle:{fill:[{programName:"circleMarker",vaoCreator:$n,stateBinder:gn,globalBinder:ce(Wt),objectBinder:mn(tn,he,Ie,je),subRenderIndex:2},{programName:"circleMarker",vaoCreator:$n,stateBinder:gn,globalBinder:ce(Wt),objectBinder:mn(tn,ve,Ie,Me),subRenderIndex:1},{programName:"circleMarker",vaoCreator:$n,stateBinder:gn,globalBinder:ce(Wt),objectBinder:mn(tn,_e,Ie,Pe)},{identify:!0,programName:"circleMarkerIdentify",vaoCreator:ti,stateBinder:bn,globalBinder:ce(Wt),objectBinder:mn(tn,Le)}]},arrow:{stroke:[{programName:"entrance",vaoCreator:Qn,stateBinder:gn,globalBinder:ce(Wt,Vt,re,te),objectBinder:mn(tn,he,Ie,We,qe,be)},{identify:!0,programName:"entranceIdentify",vaoCreator:Qn,stateBinder:bn,globalBinder:ce(Wt,Vt,re,te),objectBinder:mn(tn,We,qe,be)}]},lineExtrusion:{fill:[{programName:"diffuse",vaoCreator:Zn,stateBinder:yn,globalBinder:ce(Qt,Xt),objectBinder:mn(tn,Ke,me,Ie,be),subRenderIndex:9}],sideStroke:[{programName:"line",vaoCreator:Wn,stateBinder:_n,globalBinder:ce(Qt,Wt,Xt),objectBinder:mn(tn,Ke,me,Se,Ie,be),subRenderIndex:10}],topStroke:[{programName:"simpleLine",vaoCreator:Jn,stateBinder:_n,globalBinder:ce(Wt,Xt,ee),objectBinder:mn(tn,Ke,ve,Ie,Oe),subRenderIndex:11}]},stretchableImage:{fill:[{programName:"stretchableImage",vaoCreator:ei,stateBinder:On,globalBinder:ce(Wt,$t),objectBinder:mn(tn,Ue)},{identify:!0,programName:"stretchableImageIdentify",vaoCreator:ni,stateBinder:xn,globalBinder:ce(Wt,$t),objectBinder:mn(tn,Ue)}]},raster:{fill:[{programName:"rectWithTexture",vaoCreator:ii,stateBinder:gn,globalBinder:Gt,objectBinder:mn(tn,Ue,Ae)}]},heatmap:{framebuffer:[{programName:"heatmap",vaoCreator:ri,stateBinder:Mn,globalBinder:Gt,objectBinder:mn(tn,on,an,pn)}],fill:[{programName:"heatmapTexture",vaoCreator:oi,stateBinder:gn,globalBinder:Gt,objectBinder:mn(tn,Ue,He,De),subRenderIndex:1}]}},i.addExtension("OES_vertex_array_object").addExtension("OES_element_index_uint").addExtension("OES_standard_derivatives"),i.setPixelRatio(window.devicePixelRatio).setSize(n.layout.mapContainer.clientWidth,n.layout.mapContainer.clientHeight),e.collectStats&&(i.timers=new ai(i._gl)),n.layout.canvas.addEventListener("webglcontextlost",i.trackContextLost),i}return Object(x.c)(e,t),e.prototype.setClearColor=function(t){return this.clearColor=Object(F.b)(t),this.state.needRerender=!0,this},e.prototype.setSize=function(t,e){return this.modules.layout.setCanvasSize(t,e),this.framebuffers.forEach((function(n){n&&n.resize(t,e)})),this.updateIdentifySize(),this},e.prototype.updateIdentifySize=function(){var t=window.devicePixelRatio,e=this.state.size;return this.identifyBuffer.setSize([Math.ceil(e[0]*o.identify.pixelDensity*t),Math.ceil(e[1]*o.identify.pixelDensity*t)]),this},e.prototype.clear=function(){var t=this._gl;return t.depthMask(!0),t.clearDepth(1),t.clearColor.apply(t,this.clearColor),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this},e.prototype.render=function(t){Object(a.F)(this.vpMatrix,this.state);var e=this._gl,n=this.state,i=n.size,r=n.viewport,o=window.devicePixelRatio;if(e.viewport(r.left*o,r.bottom*o,i[0]*o,i[1]*o),this.clear(),this.state.collectStats&&this.timers&&this.timers.addTimer(),t.render(e,this.webGlExtensions,this.vpMatrix,!1),this.state.collectStats&&this.timers){this.timers.stopTimer();var s=this.timers.tryToGetFirstTimerValue();s&&this.modules.map.emit("gpuRenderTime",s)}return this},e.prototype.renderIdentify=function(t){var e=this._gl,n=this.identifyBuffer.options.size;this.identifyBuffer.bind(e),e.viewport(0,0,n[0],n[1]),e.depthMask(!0),e.clearColor(1,1,1,1),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT|e.STENCIL_BUFFER_BIT),e.clearDepth(1),e.clearStencil(0),t.render(e,this.webGlExtensions,this.vpMatrix,!0),this.identifyBuffer.unbind(e),this.state.needRerender=!0},e.prototype.getPixels=function(){var t=this._gl,e=this.identifyBuffer.options.size,n=new Uint8Array(e[0]*e[1]*4);return this.identifyBuffer.bind(t),t.readPixels(0,0,e[0],e[1],t.RGBA,t.UNSIGNED_BYTE,n),this.identifyBuffer.unbind(t),n},e.prototype.getRenderingContext=function(){return this._gl},e.prototype.getShaderProgram=function(t){return this.shaderPrograms[t]},e.prototype.destroy=function(){this.modules.layout.canvas.removeEventListener("webglcontextlost",this.trackContextLost);var t=this._gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),this.modules.layout.destroy()},e.prototype.addFramebuffer=function(t,e){return this.framebuffers.push({framebuffer:t,resize:e}),this.framebuffers.length-1},e.prototype.getFramebuffer=function(t){var e;return null===(e=this.framebuffers[t])||void 0===e?void 0:e.framebuffer},e.prototype.removeFramebuffer=function(t){this.framebuffers[t]=void 0},e}(zt),ji=n(79),Oi=function(){function t(t,e){var n=this;this.state=t,this.modules=e,this.identifyData=[],this.needsUpdate=!1,this.forceUpdate=!1,this.searchQueue=new Map,this.stateDiffer=new vt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}]),this.debouncedFillCache=Object(It.a)((function(){n.needsUpdate=!0}),o.identify.cacheDebounceTime)}return t.prototype.resetCache=function(){this.colorBuffer=void 0,this.debouncedFillCache()},t.prototype.search=function(t,e,n){var i=this;return void 0===n&&(n=!1),void 0===this.colorBuffer&&n&&(this.needsUpdate=!0),this.forceUpdate=n,new Promise((function(n){i.searchQueue.set(t,{point:e,resolve:n})}))},t.prototype.searchSync=function(t){return this.searchHigherPriority(t)},t.prototype.update=function(){var t=this;this.stateDiffer.check(this.state)&&(this.resetCache(),this.searchQueue.size>0&&this.searchQueue.clear()),this.needsUpdate&&(this.modules.tileManager.isIdle()&&this.modules.labeler.isIdle()&&this.modules.assetManager.isIdle()||this.forceUpdate)&&(this.fillCache(),this.needsUpdate=!1,this.forceUpdate=!1),void 0!==this.colorBuffer&&this.searchQueue.size>0&&(this.searchQueue.forEach((function(e){e.resolve(t.searchHigherPriority(e.point))})),this.searchQueue.clear())},t.prototype.searchHigherPriority=function(t){var e,n=this.state.viewport,i=O.j(t[0]-n.left,t[1]-n.top),r=this.state.identifyPickDistance*window.devicePixelRatio,o=1/0,a=!1,s=O.d();for(s[0]=i[0]-r;s[0]<i[0]+r;s[0]++)for(s[1]=i[1]-r;s[1]<i[1]+r;s[1]++){var c=this.searchPointInCache(s);if(c){var l=void 0!==c.dynamicObjectId;if(!a||l){var u=O.f(i,s);(!e||!a&&l||c.phase>e.phase||c.phase===e.phase&&u<o)&&(e=c,o=u,l&&(a=!0))}}}return e},t.prototype.searchPointInCache=function(t){if(void 0!==this.colorBuffer){var e=o.identify.pixelDensity*window.devicePixelRatio,n=this.modules.renderer.identifyBuffer.options.size,i=this.state.size;if(!(t[0]<0||t[0]>i[0]-1||t[1]<0||t[1]>i[1]-1)){var r=Math.floor(t[0]*e),a=4*((n[1]-1-Math.floor(t[1]*e))*n[0]+r),s=(this.colorBuffer[a+3]<<24|this.colorBuffer[a+2]<<16|this.colorBuffer[a+1]<<8|this.colorBuffer[a])>>>0;return this.indexToIdentifierResponse(s)}}},t.prototype.fillCache=function(){var t=this;this.modules.renderer.renderIdentify(this.modules.tileManager),this.colorBuffer=this.modules.renderer.getPixels(),this.identifyData=this.modules.tileManager.getDisplayedIdentifyData(),this.modules.modelManager.getDisplayedIdentifyData().forEach((function(e){return t.identifyData.push(e)})),this.modules.floorManager.getDisplayedIdentifyData().forEach((function(e){return t.identifyData.push(e)}));var e=this.modules.personalPoiManager.getIdentifyDataChunk();void 0!==e&&this.identifyData.push(e),this.modules.layers.getDynamicObjectLayers().forEach((function(e){e.getIdentifyData().forEach((function(e){return t.identifyData.push(e)}))}))},t.prototype.indexToIdentifierResponse=function(t){for(var e,n,i,r,o=0;o<this.identifyData.length;o++){var a=this.identifyData[o],s=a.dynamicObjectId,c=a.ids,l=a.metatileHash,u=a.sourceId,d=a.tileKey,f=c.startIndex,h=c.endIndex,p=c.idBuffer,m=c.phaseBuffer,v=c.sublayerBuffer,_=c.styleIdBuffer,y=c.layerIdBuffer,g=c.instanceIdBuffer,b=c.objectClassBuffer,x=c.strings;if(!(t<f||t>h)){var w=t-f,S=new Uint32Array(p,4*w*2,2),I=new Uint32Array(v)[w],j=new Uint8Array(g)[w],O=new Uint32Array(b)[w],M=void 0,P="",L=this.modules.assetManager.getMetatile(l);if(L){(null===(e=L.reverseDictionaries.db_sublayer)||void 0===e?void 0:e[I])&&(M=L.reverseDictionaries.db_sublayer[I]);var T=x[t];P=void 0!==T?T.objectClass:null!==(i=null===(n=null==L?void 0:L.reverseDictionaries.db_object_class)||void 0===n?void 0:n[O])&&void 0!==i?i:""}var k=new Uint16Array(_)[w],z=new Uint32Array(y)[w],C=null===(r=this.modules.styleManager.getStyle(k))||void 0===r?void 0:r.layersById[z];if(!C)return;return{id:new Uint32Array(S),phase:new Float32Array(m)[w],dynamicObjectId:s,sourceId:u,tileKey:d,sublayer:M,symbol:C.type,instanceId:j,objectClass:P}}}},t}(),Mi=n(39),Pi=n(78),Li=n(45),Ti=n(9),ki=function(t){function e(e){var n=t.call(this)||this;return n.sync=function(t){var e=t.dictionaries,i=t.reverseDictionaries;n.dictionaries=e,n.reverseDictionaries=i},e.set("syncMetatile",n.sync),n}return Object(x.c)(e,t),e}(n(92).a),zi=n(63);function Ci(t,e,n){return Object(a.q)(n.fontUrlTemplate,{name:t,range:String(e)})}function Ei(t,e,n){return Object(a.q)(Ri(e.iconBaseUrl,e.iconNameTemplate),{name:t,subdomain:n})}function Ai(t){return Fi(t.stylePath)?t.stylePath:Ri(t.rootUrl,t.stylePath)}var Di=new RegExp("^(?:[a-z]+:)?//","i");function Fi(t){return Di.test(t)}function Ri(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t[0],i=1;i<t.length;i++){"/"!==n[n.length-1]&&(n+="/");var r=t[i];"/"===r[0]?n+=r.slice(1):n+=r}return n}var Bi=n(62),Ni=n(37);function Ui(t){for(var e,n=new Bi.a,i=0,r=t.layers;i<r.length;i++){var o=r[i];void 0!==o.groupId&&e&&o.groupId===e.groupId?o.renderIndex=e.renderIndex:o.renderIndex=n.getIndex(),e=o}for(var a in t.groupsById){var s=t.groupsById[a];s&&s.layers[0]&&(s.renderIndex=s.layers[0].renderIndex)}}var Hi=n(89);function Zi(t,e,n){var i,r=n.map.state,o=n.collector,a=n.imageManager,s=n.renderer,c=n.tileManager,l=n.styleManager;try{i=function(t,e,n){var i,r=Object(F.c)(t.styleZoom,t.styleState,[]),o=e.style.color,a=[];if("object"!=typeof(i=o.argument)||"heatmap-density"!==i.type)throw new Error("Heatmap color must be interpolate expression with 'heatmap-density' argument in layer "+e.id);for(var s=0;s<256;s++){var c=s/255,l=Object(F.k)(o,c,r);a.push.apply(a,l)}return new Et(new Uint8Array(a),{size:[256,1]})}(r,t)}catch(t){return void console.error(t)}var u=a.addPreparedTexture(i),d=s.getRenderingContext(),f=t.style.downscale,h=r.size,p=new Dt({size:[Math.ceil(h[0]*window.devicePixelRatio/f),Math.ceil(h[1]*window.devicePixelRatio/f)],magFilter:Et.LinearFilter,minFilter:Et.LinearFilter,wrapS:Et.ClampToEdgeWrapping,wrapT:Et.ClampToEdgeWrapping}),m=a.addPreparedTexture(p.getTexture()),v=s.addFramebuffer(p,(function(t,e){p.setSize([Math.ceil(t*window.devicePixelRatio/f),Math.ceil(e*window.devicePixelRatio/f)]),p.bind(d),p.unbind(d),a.updatePreparedTexture(m,p.getTexture())}));Object(C.b)({collector:o,generator:Cn.generateHeatmapTexture,args:[e,t,m,u]});var _=o.getAccumulatedData(),y=new M.a("dynamicObject",_.data,s);c.addObject(y),o.reset(),l.addRemoveLayerHook(t.id,(function(t){y.clean(t),c.removeObject(y),p.remove(d),s.removeFramebuffer(v),a.deleteTexture(m),a.deleteTexture(u)})),t.framebufferIndex=v}var Gi=function(){function t(t){this.modules=t,this.styleIndex=1,this.handyStylesMap=new Map,this.waitingStyleRequests=new Map,this.onRemoveLayerHooks=new Map}return t.prototype.createStyle=function(t,e,n){var i=this,r=this.modules.map.state;if(!Number.isNaN(r.handyStyleId)){var o=this.getStyle(r.handyStyleId);o&&(o.layers.forEach((function(t){var e=i.onRemoveLayerHooks.get(t.id);e&&e(r)})),this.onRemoveLayerHooks.clear())}var a=this.styleIndex++,s=Object(A.c)(t,a,n);!function(t,e){var n=Fi(e.fontsPath)?e.fontsPath:Ri(e.rootUrl,e.fontsPath);t.fontUrlTemplate=Ri(n,"{name}_{range}.pbf"),t.iconBaseUrl=Fi(e.iconsPath)?e.iconsPath:Ri(e.rootUrl,e.iconsPath),t.iconNameTemplate=e.iconNameTemplate}(s,e),this.handyStylesMap.set(s.id,s);var c=this.waitingStyleRequests.get(a);return c&&c.resolve(s),this.modules.workers.parser.syncStyle(s),this.modules.workers.labeling.syncStyle(s),s.layers.forEach((function(t){"heatmap"===t.type&&Zi(t,s.id,i.modules)})),s},t.prototype.addLayer=function(t,e,n){var i=this.getStyle(e);if(i){var r=Object(A.a)(t);r&&(function(t,e,n){var i,r;if(e.layerIdToInnerId[t.id])throw new Error("The layer with id «"+t.id+"» already exists in the map style.");var o=-1;if(n){var a=Object.values(e.groupsById).find((function(t){return t&&t.id===n}));if(a)o=e.layers.findIndex((function(t){return t.groupId===a.innerId}));else{o=e.layers.findIndex((function(t){return t.id===n}));var s=null===(r=e.layers[o])||void 0===r?void 0:r.groupId;if(void 0!==s&&"group"===t.type)throw new Error("Group layer with id «"+t.id+"» can't be added before layer with id «"+n+"» in group with innerId «"+s+"». Layer groups doesn't support nesting.")}}else o=e.layers.length;if(-1===o)throw new Error("The layer with beforeId «"+n+"» doesn't exist in the map style.");var c=[];if("group"!==t.type){c=[t];var l=o!==e.layers.length?e.layers[o]:void 0;if(l&&void 0!==l.groupId){var u=e.groupsById[l.groupId];if(!u)return void Object(Ni.a)("Для слоя с id «"+l.id+"» находящегося в группе с groupId «"+l.groupId+"» отсутствует группа id в стиле c id «"+e.id+"»");var d=u.layers.findIndex((function(t){return t.id===l.id}));if(-1===d)return void Object(Ni.a)("Слой с id «"+l.id+"» и groupId «"+l.groupId+"» отсутствует группе в стиле c id «"+e.id+"»");t.groupId=u.innerId,u.layers.splice(d,0,t),u.layers.forEach((function(t,e){return t.groupIndex=e}))}}else e.groupsById[t.innerId]=t,e.layerIdToInnerId[t.id]=t.innerId,c=t.layers;(i=e.layers).splice.apply(i,Object(x.e)([o,0],c)),c.forEach((function(t){if(e.layersById[t.innerId]=t,e.layerIdToInnerId[t.id]=t.innerId,"point"===t.type){var n=Math.max.apply(Math,Object.keys(e.rasterSets.byIndex).map((function(t){return Number(t)}))),i=new Bi.a(n+1);Object(A.b)(t,i).forEach((function(t){e.rasterSets.byKey[t.key]||(e.rasterSets.byIndex[t.index]=t,e.rasterSets.byKey[t.key]=t)}))}})),Ui(e)}(r,i,n),"heatmap"===r.type&&Zi(r,i.id,this.modules),this.modules.workers.parser.syncStyle(i),this.modules.workers.labeling.syncStyle(i))}},t.prototype.removeLayer=function(t,e){var n=this.getStyle(e);n&&(Hi.a.some((function(e){return e.id===t}))||(function(t,e,n){var i=e.layerIdToInnerId[t];if(void 0===i)throw new Error("The layer with id «"+t+"» doesn't exist in the map style and can't be removed.");var r=[],o=e.groupsById[i];if(o){if(r=o.layers,delete e.groupsById[i],delete e.layerIdToInnerId[o.id],0===r.length)return}else{var a=e.layersById[i];if(!a)return void Object(Ni.a)("Слоя с id «"+t+"» есть в мапе идентификаторов слоев стиля, но при этом отсутствует в стиле c id «"+e.id+"»");if(void 0!==a.groupId&&void 0!==a.groupIndex){var s=e.groupsById[a.groupId];s&&s.layers.splice(a.groupIndex,1)}r=[a]}var c=e.layers.findIndex((function(t){return t.id===r[0].id}));-1!==c&&(r.forEach((function(t){var i=n.styleManager,r=n.map.state,o=i.getRemoveLayerHook(t.id);o&&(o(r),i.clearRemoveLayerHook(t.id)),delete e.layersById[t.innerId],delete e.layerIdToInnerId[t.id]})),e.layers.splice(c,r.length),Ui(e))}(t,n,this.modules),this.modules.workers.parser.syncStyle(n),this.modules.workers.labeling.syncStyle(n)))},t.prototype.setDynamicStyle=function(t){this.handyStylesMap.set(E.a,t),this.modules.workers.parser.syncStyle(t),this.modules.workers.labeling.syncStyle(t)},t.prototype.getStyle=function(t){return this.handyStylesMap.get(t)},t.prototype.waitForStyle=function(t){var e=this.handyStylesMap.get(t);if(e)return Promise.resolve(e);var n=this.waitingStyleRequests.get(t);if(n)return n.promise;var i={resolve:void 0,promise:void 0};return i.promise=new Promise((function(t){i.resolve=t})),this.waitingStyleRequests.set(t,i),i.promise},t.prototype.addRemoveLayerHook=function(t,e){this.onRemoveLayerHooks.set(t,e)},t.prototype.getRemoveLayerHook=function(t){return this.onRemoveLayerHooks.get(t)},t.prototype.clearRemoveLayerHook=function(t){this.onRemoveLayerHooks.delete(t)},t}(),Wi=function(){function t(t,e){var n=this;this.loadFont=function(t,e){var i=n.requestFontRanges.get(t,e);return i||(i=n.createLoadFontRequest(t,e),n.requestFontRanges.set(t,e,i)),i},this.state=t,this.modules=e,this.requestedMetatiles=new Set,this.metatiles={},this.loadedRasters={},this.failedRasters={},this.requestedRasters={},this.requestedSvgs={},this.disableIconCache=t.disableIconCache,this.textures=[],this.fontGlyphs={},this.fontTextures=new Pi.a,this.requestFontRanges=new Pi.a,this.pendingFontRanges=0,this.loadedFontRanges=0,this.metatileLoader=function(e,i){var r=Object(b.f)(e),o=Object(a.p)("metatile",{host:t.tileServer,tileSet:t.tileSet,protocol:t.tileProtocol,subdomain:t.subdomains[0],hash:r});fetch(o).then((function(t){if(!t.ok)throw new Error('Failed to load metatile "'+r+'"');return t.json()})).then((function(t){return n.setMetatile(e,i,t)})).catch((function(t){return console.error(t)}))};var i=this.modules.workers.fnRegistry;i.set("addNewRasterSets",(function(t,e){var i=n.modules.styleManager.getStyle(t);if(i){var r=i.rasterSets;e.forEach((function(t){r.byIndex[t.index]=t,r.byKey[t.key]=t}))}else console.error("Not found style "+t+" in AssetManager#addNewRasterSets")})),i.set("loadFont",this.loadFont),this.setPreparedMetatile(-1,b.c),this.metatiles[Rt.k]=new ki(i)}return t.prototype.loadMetatile=function(t,e){this.requestedMetatiles.has(t)||(this.requestedMetatiles.add(t),this.metatileLoader(t,e))},t.prototype.setMetatile=function(t,e,n){Object(zi.c)(n),n.tileProps=n.tileProps.map(zi.d);var i=Object(b.g)(n);this.setPreparedMetatile(t,i),void 0===this.projectMetatileMetadata&&Object(Ti.m)(e)&&(this.projectMetatileMetadata={regionId:e,metatileHash:t})},t.prototype.setPreparedMetatile=function(t,e){this.metatiles[t]=e,this.modules.workers.parser.setMetatile(t,e)},t.prototype.prepareRasters=function(t,e,n){var i,r,s=this,c=this.modules.styleManager.getStyle(t);if(c){for(var l=c.rasterSets,u=this.modules.renderer.getRenderingContext(),d=e.length/7,f=function(t){var d=e[7*t],f=e[7*t+1],p=e[7*t+6],m=e[7*t+2],v=e[7*t+3],_=e[7*t+4],y=e[7*t+5],g=l.byIndex[d];if(g.isSvg){var b={rasterIndex:f,rasterSetIndex:d,x:m,y:v,w:_,h:y,anchorX:g.anchorX,anchorY:g.anchorY,atlasIndex:p,isPacked:!0};g.rasters[f]=b,null===(r=null===(i=h.requestedSvgs[c.id])||void 0===i?void 0:i[d])||void 0===r||r.then((function(t){var e=s.textures[b.atlasIndex];Object(a.I)(t,b.w,b.h).then((function(t){e.subImage(u,t,b.x,b.y),s.state.needRerender=!0}))}))}else{var x=g.rasters[f];x.x=m,x.y=v,x.atlasIndex=p,x.isPacked=!0}void 0===h.textures[p]&&(h.textures[p]=new Et(void 0,{size:o.atlasSize,flipY:!1,premultiplyAlpha:!ut||!g.isSvg,unit:p,magFilter:Et.LinearFilter,minFilter:Et.LinearFilter}).prepare(h.modules.renderer.getRenderingContext()));var w=h.textures[p],S=n&&n[t];if(void 0!==S)return w.subImage(u,S,m,v),h.state.needRerender=!0,"continue"},h=this,p=0;p<d;p++)f(p);this.modules.workers.labeling.updatePackingInfo(t,e)}else console.error("Not found style "+t+" in AssetManager#prepareRasters")},t.prototype.loadRasters=function(t){for(var e=t.length/3,n=0;n<e;n++){var i=t[3*n],r=t[3*n+1],o=t[3*n+2],a=r<<16|o,s=this.modules.styleManager.getStyle(i);if(s){if(this.loadedRasters[i]||(this.loadedRasters[i]=new Set,this.failedRasters[i]=new Set,this.requestedRasters[i]=new Set),!this.requestedRasters[i].has(a)){var c=s.rasterSets.byIndex[r];!1!==c.rasters[o].isPacked?(this.requestedRasters[i].add(a),c.isSvg?this.loadSvg(a,s,r):this.loadPng(a,s,r,o)):console.error("Try to load not packed raster "+c.key)}}else console.error("Not found style "+i+" in AssetManager#loadRasters")}},t.prototype.getMetatile=function(t){return this.metatiles[t]},t.prototype.getProjectMetadata=function(){return this.projectMetatileMetadata},t.prototype.getFontGlyphs=function(t){return this.fontGlyphs[t]||{}},t.prototype.getFontTextureByName=function(t,e){return this.fontTextures.get(t,e)},t.prototype.isIdle=function(){var t=0,e=0;for(var n in this.requestedRasters)t+=this.requestedRasters[n].size,e+=this.loadedRasters[n].size+this.failedRasters[n].size;return t===e&&this.pendingFontRanges===this.loadedFontRanges},t.prototype.dangerouslySetMetatiles=function(t){this.metatiles=t},t.prototype.dangerouslySetRasters=function(t,e){this.loadedRasters=t,this.failedRasters=e},t.prototype.createLoadFontRequest=function(t,e){return Object(x.b)(this,void 0,void 0,(function(){var n,i,r,o,a;return Object(x.d)(this,(function(s){switch(s.label){case 0:this.pendingFontRanges+=1,n=Number.isNaN(this.state.handyStyleId)?1:this.state.handyStyleId,s.label=1;case 1:return s.trys.push([1,4,,5]),[4,this.modules.styleManager.waitForStyle(n)];case 2:return i=s.sent(),[4,fetch(Ci(t,e,i)).then((function(t){if(!t.ok)throw new Error;return t})).catch((function(){return console.error("Could not load font "+t+" for range "+e+" fallback to the default font "+Rt.b),fetch(Ci(Rt.b,e,i)).then((function(t){if(!t.ok)throw new Error("Could not load default font "+Rt.b+" for range "+e);return t}))})).then((function(t){return t.arrayBuffer()}))];case 3:return r=s.sent(),o=Object(Li.d)(r),this.prepareFontAtlas(t,e,o),this.modules.workers.labeling.appendFont(t,o.glyphData),this.loadedFontRanges+=1,[2,this.modules.workers.labeling.markFontAsLoaded(t,e)];case 4:return a=s.sent(),console.error(a),this.loadedFontRanges+=1,[2,this.modules.workers.labeling.markFontAsLoaded(t,e)];case 5:return[2]}}))}))},t.prototype.prepareFontAtlas=function(t,e,n){var i=n.bitmap,r=n.width,o=n.height,a=n.glyphData;for(var s in this.fontGlyphs[t]||(this.fontGlyphs[t]={}),a)this.fontGlyphs[t][s]=a[s];var c=new Et(new Uint8Array(i),{size:[r,o],magFilter:Et.LinearFilter,minFilter:Et.LinearFilter,format:Et.AlphaFormat,premultiplyAlpha:!1,flipY:!1,unit:0});this.fontTextures.set(t,e,c),this.state.needLabeling=!0},t.prototype.loadPng=function(t,e,n,i){var r=this,o=this.modules.renderer.getRenderingContext(),s=e.rasterSets.byIndex[n],c=s.rasters[i],l=this.textures[c.atlasIndex],u="";if(s.type===Mi.b.Unique){var d=Object(P.a)(s.id[0],s.id[1]);u=Object(a.p)("dynamicPoi",{host:this.state.tileServer,tileSet:this.state.tileSet,protocol:this.state.tileProtocol,subdomain:Object(a.n)(this.state.subdomains,d),id:d,width:c.w.toString(),height:c.h.toString(),regionId:String(s.regionId)})}else s.type===Mi.b.Static&&(u=Ei(s.name,e,Object(a.n)(this.state.subdomains,s.name)));this.modules.workers.parser.prepareAtlas(u).then((function(n){n?(n.isBitmap?(l.subImage(o,n.data[0],c.x,c.y),r.state.needRerender=!0):Object(a.c)(n.data[0]).then((function(t){l.subImage(o,t,c.x,c.y),r.state.needRerender=!0})),r.loadedRasters[e.id].add(t)):r.failedRasters[e.id].add(t)}))},t.prototype.loadSvg=function(t,e,n){var i=this,r=this.modules.renderer.getRenderingContext(),o=e.rasterSets.byIndex[n];if(!e.iconBaseUrl)return console.error("Attempt to load svg without existing style"),void this.failedRasters[e.id].add(t);var s=Ei(o.name,e,Object(a.n)(this.state.subdomains,o.name));this.requestedSvgs[e.id]||(this.requestedSvgs[e.id]={});var c=this.requestedSvgs[e.id][n];c&&!this.disableIconCache||(c=this.requestedSvgs[e.id][n]=fetch(s,{cache:this.disableIconCache?"no-cache":"default"}).then((function(t){if(!t.ok)throw new Error("Not 2xx response");return t.text()}))),c.then((function(n){for(var s=function(t){if(t.w<=0&&t.h<=0)return"continue";var e=i.textures[t.atlasIndex];Object(a.I)(n,t.w,t.h).then((function(n){e.subImage(r,n,t.x,t.y),i.state.needRerender=!0}))},c=0,l=o.rasters;c<l.length;c++)s(l[c]);i.loadedRasters[e.id].add(t)})).catch((function(n){console.error(n),i.failedRasters[e.id].add(t)}))},t}(),Vi=n(29),qi=n(69),Yi=function(t){return"model-readiness-"+t},Xi=function(){function t(t,e){var n=this;this.state=t,this.modules=e,this.cache=new qi.a(o.modelCacheSize,(function(t,e){return n.clearMod(e)})),this.selectedIds=new Vi.a(this.modules.tileManager.getSelectedIds()),this.modelIds=new Set,this.viewportModelIds=new Set,this.requestedModelsInfo=new Set,this.loadedModelsInfo=new Set,this.readiness={},this.modelCount=0,this.textures={},this.objects=[],this.models=new Map,this.buildingsHeight=new Map,this.mods=[],this.animatingModelCount=0}return t.prototype.appendModelsInfo=function(t,e,n){var i=this;n.forEach((function(n){var r=Object(x.a)(Object(x.a)({},n),{regionId:t,metatileHash:e,index:i.modelCount++,idLoHi:Object(P.b)(n.id)}),o={key:r.index+"_false",status:"initial",model:r,selected:!1,object:void 0,identifyIds:void 0,minStyleZoom:-1/0,maxStyleZoom:1/0},a={key:r.index+"_true",status:"initial",model:r,selected:!0,object:void 0,identifyIds:void 0,minStyleZoom:-1/0,maxStyleZoom:1/0};r.nonSelectedMod=o,r.selectedMod=a,i.mods.push(o,a),i.models.set(r.id,r),i.modelIds.add(r.id)})),this.findViewportModels()},t.prototype.loadModelsInfo=function(t,e){var n=this;if(0!==t&&!this.requestedModelsInfo.has(t)){this.requestedModelsInfo.add(t);var i=Object(a.p)("modelInfo",{host:this.state.tileServer,tileSet:this.state.tileSet,protocol:this.state.tileProtocol,subdomain:this.state.subdomains[0],regionId:t.toString()});fetch(i).then((function(e){if(!e.ok)throw new Error("Failed to load models info for region "+t);return e.json()})).then((function(i){n.modules.workers.parser.appendHiddenObjectIds(i.map((function(t){return Object(P.b)(t.id)}))),n.appendModelsInfo(t,e,i),n.loadedModelsInfo.add(t)})).catch((function(e){n.loadedModelsInfo.add(t),console.error(e)}))}},t.prototype.resetCache=function(){var t=this;this.models.forEach((function(e){t.clearMod(e.selectedMod),t.clearMod(e.nonSelectedMod),t.cache.remove(e.selectedMod.key),t.cache.remove(e.nonSelectedMod.key),B.d(Yi(e.id),t.state)})),this.animatingModelCount=0,this.objects.length=0},t.prototype.isModelsInfoLoaded=function(t){return this.loadedModelsInfo.has(t)},t.prototype.getTexture=function(t,e){return this.textures[t+"_"+e]},t.prototype.findViewportModels=function(){var t=this,e=this.state.styleZoom,n=this.modules.tileManager.getViewportVertices();this.viewportModelIds.clear(),this.models.forEach((function(i){var r=i.bound,o=i.minZoom,s=i.maxZoom;Object(a.B)(r,n)&&e>=o&&e<s&&t.viewportModelIds.add(i.id)}))},t.prototype.getDisplayedIdentifyData=function(){return this.mods.filter((function(t){return"displayed"===t.status})).map((function(t){return{ids:t.identifyIds,metatileHash:t.model.metatileHash}}))},t.prototype.update=function(){var t=this,e=this.mods,n=this.models,i=this.state.styleZoom;this.selectedIds=new Vi.a(this.modules.tileManager.getSelectedIds()),i>o.loadModelsInfoStyleZoom&&this.modules.tileManager.getViewportTiles().forEach((function(e){var n=e.serverMetadata;n&&n.forEach((function(e){t.loadModelsInfo(e.regionId,e.metatileHash)}))}));for(var r=0;r<e.length;r++){var a=e[r],s=this.checkModUsefulness(a,this.selectedIds),c=this.modules.floorManager.hasDisplayedFloorBuilding(a.model.id),l=!!this.modules.assetManager.getMetatile(a.model.metatileHash),u=this.modules.buildingHeightAnimator.isAnimating(),d=s&&!c,f=a.status;"initial"===a.status&&d&&l?(this.loadModel(a),f="loading"):"ready"===a.status&&d?(this.addObject(a.object),this.state.needRerender=!0,this.modules.identifier.debouncedFillCache(),f="displayed"):"ready"!==a.status||d?"cached"===a.status&&d?(this.addObject(a.object),this.state.needRerender=!0,this.modules.identifier.debouncedFillCache(),this.cache.get(a.key),f="displayed"):"displayed"!==a.status||(s||u)&&!c||(this.removeObject(a.object),this.state.needRerender=!0,this.modules.identifier.debouncedFillCache(),this.cache.add(a.key,a),f="cached"):(this.cache.add(a.key,a),f="cached"),a.status=f}n.forEach((function(e){var n=e.id;B.e(Yi(e.id),{step:function(e,i){return t.readiness[n]=i},complete:function(){return t.animatingModelCount--}},t.state)}))},t.prototype.getOpacity=function(t,e){return(void 0!==this.readiness[t]?this.readiness[t]:0)*this.modules.buildingHeightAnimator.getBuildingHeight(e)},t.prototype.hasModel=function(t){return this.modelIds.has(t)},t.prototype.setBuildingHeight=function(t,e){this.buildingsHeight.set(t,e)},t.prototype.getBuildingHeight=function(t){return this.buildingsHeight.get(t)||0},t.prototype.getVisibleModelData=function(t){var e=this.models.get(t);if(e){var n=this.getModelCurrentMod(t);if(n){var i=Math.max(e.minZoom,n.minStyleZoom),r=Math.min(e.maxZoom,n.maxStyleZoom),o=this.state.styleZoom;if(!(o<i||o>=r))return{minStyleZoom:i,maxStyleZoom:r,opacity:this.getOpacity(t,i)}}}},t.prototype.isAnimating=function(){return this.animatingModelCount>0},t.prototype.getModelCurrentMod=function(t){var e=this.models.get(t);if(e)return this.checkModUsefulness(e.selectedMod,this.selectedIds)?e.selectedMod:this.checkModUsefulness(e.nonSelectedMod,this.selectedIds)?e.nonSelectedMod:void 0},t.prototype.loadModel=function(t){var e=this,n=t.model,i=n.regionId,r=n.metatileHash,o=n.fileName,s=n.index,c=n.matrix,l=n.offset,u=n.idLoHi,d={fileName:o,offset:l,matrix:c,regionId:i,metatileHash:r,selected:t.selected,id:u,modelIndex:s,pixelRatio:window.devicePixelRatio,tileServer:this.state.tileServer,tileSet:this.state.tileSet,tileProtocol:this.state.tileProtocol,subdomain:Object(a.n)(this.state.subdomains,o),styleState:this.state.styleState,styleId:this.state.handyStyleId};this.modules.workers.parser.generateModel(d).then((function(n){var i=n.objects,r=i.data,o=i.identifyIds,a=n.textures;t.object&&e.removeObject(t.object),t.object=new M.a("model",r,e.modules.renderer),t.minStyleZoom=Math.min.apply(Math,t.object.children.map((function(t){var n=t.attributes,i=n.styleId,r=n.layerId,o=e.modules.styleManager.getStyle(i);if(o){var a=o.layersById[r];if(a)return a.minzoom}return-1/0}))),t.maxStyleZoom=Math.max.apply(Math,t.object.children.map((function(t){var n=t.attributes,i=n.styleId,r=n.layerId,o=e.modules.styleManager.getStyle(i);if(o){var a=o.layersById[r];if(a)return a.maxzoom}return 1/0}))),t.identifyIds=o;var s=t.model;s.texturesLoaded?t.status="ready":(s.texturesLoaded=!0,s.textureCount=a.data.length,a.isBitmap?e.prepareImageBitmapTextures(t,a.data):e.prepareRawTextures(t,a.data),e.startReadinessTicker(s))}))},t.prototype.prepareImageBitmapTextures=function(t,e){var n=this;e.forEach((function(e,i){n.textures[t.model.index+"_"+i]=new Et(e,{flipY:!1})})),t.status="ready"},t.prototype.prepareRawTextures=function(t,e){var n=this,i=e.length;e.forEach((function(e,r){Object(a.c)(e).then((function(e){n.textures[t.model.index+"_"+r]=new Et(e,{flipY:!1}),0==--i&&(t.status="ready")}))}))},t.prototype.clearMod=function(t){var e=t.model;if(t.status="initial",void 0!==t.object&&(t.object.clean(this.state),t.object=void 0),"initial"===this.getSiblingMod(t).status){for(var n=0;n<e.textureCount;n++)delete this.textures[e.index+"_"+n];e.texturesLoaded=!1}},t.prototype.addObject=function(t){this.objects.push(t)},t.prototype.removeObject=function(t){var e=this.objects.indexOf(t);-1!==e&&this.objects.splice(e,1)},t.prototype.getSiblingMod=function(t){return t.selected?t.model.nonSelectedMod:t.model.selectedMod},t.prototype.checkModUsefulness=function(t,e){var n=t.model;if(!this.viewportModelIds.has(n.id))return!1;var i=e.has(n.idLoHi);return i===t.selected||!(!i||t.selected||void 0!==this.getSiblingMod(t).object||void 0===t.object)},t.prototype.startReadinessTicker=function(t){this.readiness[t.id]=0,B.c(Yi(t.id),{easing:o.buildingAnimation.easing},this.state,0,1,o.buildingAnimation.duration),this.animatingModelCount++},t}(),Ki=n(12),Ji=function(){function t(t){this.modules=t,this.modCache=new Map,this.isGenerating=!1,this.currentPois=[],this.currentIdSet=new Vi.a,this.currentTrafficState=!1,this.currentSelectedIds=[],this.currentModKey="ppoi_false_"}return t.prototype.setPersonalPoi=function(t){this.currentPois=t;for(var e=new Vi.a,n=0,i=t;n<i.length;n++){var r=i[n];e.add(Object(P.b)(r.id))}this.currentIdSet=e,this.modCache.clear(),this.displayedModKey=void 0},t.prototype.redraw=function(){this.modCache.clear(),this.displayedModKey=void 0},t.prototype.getIdentifyDataChunk=function(){return this.identifyDataChunk},t.prototype.update=function(){if(void 0===this.regionMetadata&&(this.regionMetadata=this.modules.assetManager.getProjectMetadata()),void 0!==this.regionMetadata){this.updateModKey();var t=this.currentModKey,e=this.modCache.get(t);void 0!==e||this.isGenerating||this.generate(t,this.currentPois,this.regionMetadata),void 0!==e&&t!==this.displayedModKey&&this.show(t,e,this.regionMetadata)}},t.prototype.generate=function(t,e,n){var i=this,r=n.regionId,o=n.metatileHash,a=this.modules.map.state;this.isGenerating=!0,this.modules.workers.parser.generatePersonalPoi(e,r,o,window.devicePixelRatio,this.modules.tileManager.getSelectedIds(),a.handyStyleId,a.styleState).then((function(e){if(void 0!==e){var n=e.collectorOutput,r=e.styleId,o=n.packedRasters,a=n.rastersToLoad;void 0!==o&&i.modules.assetManager.prepareRasters(r,o),i.modules.assetManager.loadRasters(a),i.modCache.set(t,e),i.isGenerating=!1}else i.isGenerating=!1}))},t.prototype.show=function(t,e,n){var i=n.metatileHash,r=e.collectorOutput,o=r.labels,a=r.identifyIds,s=e.styleId;this.modules.labeler.removeLabels("ppoi"),o.length&&this.modules.labeler.addLabels("ppoi",Ki.c.PersonalPoi,[{metatileHash:i,labels:o,styleId:s}]),this.identifyDataChunk={metatileHash:i,ids:a},this.modules.identifier.resetCache(),this.displayedModKey=t},t.prototype.updateModKey=function(){var t=Object(Ti.g)(this.modules.tileManager.getSelectedIds(),this.currentIdSet),e=this.modules.trafficTileLayer.isEnabled();Object(Ti.f)(this.currentSelectedIds,t)&&this.currentTrafficState===e||(this.currentTrafficState=e,this.currentSelectedIds=t,this.currentModKey="ppoi_"+e+"_"+t)},t}(),Qi=n(98),$i=n.n(Qi),tr=n(70),er=n(71),nr=n(18),ir=n(93),rr=n(94),or=function(){function t(){var t,e;this.connector=new tr.a,this.fnRegistry=new er.a(this.connector),this.classRegistry=new ir.a(this.fnRegistry),this.parserWorker=$i()(109),this.connector.addWorker(nr.b.Parser,this.parserWorker),this.labelingWorker=$i()(110),this.connector.addWorker(nr.b.Labeling,this.labelingWorker),this.parser=(t=this.fnRegistry,e=this.classRegistry,{setMetatile:t.get(nr.b.Parser,"setMetatile"),fetchTile:t.get(nr.b.Parser,"fetchTile"),deleteTile:t.get(nr.b.Parser,"deleteTile"),abortTileRequest:t.get(nr.b.Parser,"abortTileRequest"),generateTile:t.get(nr.b.Parser,"generateTile"),generateFloor:t.get(nr.b.Parser,"generateFloor"),loadFloor:t.get(nr.b.Parser,"loadFloor"),generateModel:t.get(nr.b.Parser,"generateModel"),appendHiddenObjectIds:t.get(nr.b.Parser,"appendHiddenObjectIds"),prepareAtlas:t.get(nr.b.Parser,"prepareAtlas"),packRasters:t.get(nr.b.Parser,"packRasters"),fetchTrafficTile:t.get(nr.b.Parser,"fetchTrafficTile"),deleteTrafficTile:t.get(nr.b.Parser,"deleteTrafficTile"),abortTrafficTileRequest:t.get(nr.b.Parser,"abortTrafficTileRequest"),generateTrafficTile:t.get(nr.b.Parser,"generateTrafficTile"),generatePersonalPoi:t.get(nr.b.Parser,"generatePersonalPoi"),syncStyle:t.get(nr.b.Parser,"syncStyle"),GeoJsonSource:e.set("GeoJsonSource",rr.a).get(nr.b.Parser)}),this.labeling=function(t){return{appendFont:t.get(nr.b.Labeling,"appendFont"),markFontAsLoaded:t.get(nr.b.Labeling,"markFontAsLoaded"),addNewRasterSets:t.get(nr.b.Labeling,"addNewRasterSets"),updatePackingInfo:t.get(nr.b.Labeling,"updatePackingInfo"),syncStyle:t.get(nr.b.Labeling,"syncStyle"),loadRtlPlugin:t.get(nr.b.Labeling,"loadRtlPlugin"),markRtlPluginLoaded:t.get(nr.b.Labeling,"markRtlPluginLoaded")}}(this.fnRegistry)}return t.prototype.destroy=function(){this.parserWorker.terminate(),this.labelingWorker.terminate()},t}(),ar=function(t){function e(n,i){var r=t.call(this)||this;r.options=Object(a.b)(i,e.options),r.uniqId=I(),r.labelKey="html-"+r.uniqId,r.mapPoint=Object(s.l)(r.options.coordinates),r.screenPoint=[0,0],r.html=function(t){var e=document.createElement("div");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.zIndex=String(t.zIndex),t.interactive||(e.style.pointerEvents="none"),t.animate&&(e.style.opacity="0",e.style.transition="opacity "+t.duration+"ms",e.style["will-change"]="opacity");var n=document.createElement("div");return"string"==typeof t.html?n.innerHTML=t.html:n.append(t.html),e.append(n),e}(r.options),r.isHidden=!0,r.targetOpacity=0,r.modules=n.modules,r.modules.layers.addLayer(r),r.mapState=n.state,r.rounder=r.options.disableRounding?cr:sr;var o=r.options,c=o.offset,l=o.labeling;return"none"!==l.type&&r.modules.labeler.addLabelBox(r.labelKey,{id:r.uniqId,width:l.width,height:l.height,position:r.mapPoint,offset:c,labelingGroup:r.getLabelingGroup(),parentPoiId:"pinnedToPoi"===l.type?l.poiId:void 0}),r}return Object(x.c)(e,t),e.prototype.destroy=function(){this.removeHtml(),this.modules.labeler.removeLabels(this.labelKey),this.modules.layers.removeLayer(this)},e.prototype.update=function(){var t=this.checkZoom(),e=!this.isInvolvedInLabeling()||this.modules.labeler.isLabelBoxSurvived(this.uniqId);t&&e?this.show():this.hide(),this.updatePosition()},e.prototype.setContent=function(t){this.options.html=t,this.html.innerHTML="";var e=document.createElement("div");"string"==typeof t?e.innerHTML=t:e.append(t),this.html.append(e)},e.prototype.setLabelingSize=function(t,e){"none"!==this.options.labeling.type&&(this.options.labeling.width=t,this.options.labeling.height=e,this.updateLabelBox())},e.prototype.setPosition=function(t){this.mapPoint=Object(s.l)(t),this.updateLabelBox()},e.prototype.setOffset=function(t){this.options.offset=[t[0],t[1]],this.updateLabelBox()},e.prototype.setMinZoom=function(t){this.options.minZoom=t},e.prototype.setMaxZoom=function(t){this.options.maxZoom=t},e.prototype.getZIndex=function(){return this.options.zIndex},e.prototype.getOffset=function(){return this.options.offset},e.prototype.getPosition=function(){return Object(s.m)(this.mapPoint)},e.prototype.getHtmlElement=function(){return this.html.firstChild},e.prototype.dangerouslyGetRootElement=function(){return this.html},e.prototype.isShown=function(){return!this.isHidden},e.prototype.show=function(){var t=this;if(this.isHidden&&(this.isHidden=!1,this.appendHtml(),this.emit("shown",{id:this.uniqId.toString(),point:[this.screenPoint[0],this.screenPoint[1]],object:this}),this.options.animate)){if(this.showAnimationTimer)return;this.hideAnimationTimer&&(clearTimeout(this.hideAnimationTimer),this.hideAnimationTimer=void 0),1!==this.targetOpacity&&(this.showAnimationTimer=window.setTimeout((function(){t.setHtmlOpacity(1),t.showAnimationTimer=void 0}),0))}},e.prototype.hide=function(){var t=this;if(!this.isHidden)if(this.isHidden=!0,this.options.animate){if(this.hideAnimationTimer)return;this.showAnimationTimer&&(clearTimeout(this.showAnimationTimer),this.showAnimationTimer=void 0),this.setHtmlOpacity(0),this.hideAnimationTimer=window.setTimeout((function(){t.removeHtml(),t.hideAnimationTimer=void 0}),this.options.duration)}else this.removeHtml()},e.prototype.setHtmlOpacity=function(t){this.html.style.opacity=String(t),this.targetOpacity=t},e.prototype.removeHtml=function(){this.html.remove(),this.screenPoint=[0,0]},e.prototype.appendHtml=function(){this.getMarkerContainer().appendChild(this.html)},e.prototype.getMarkerContainer=function(){return this.options.preventMapInteractions?this.modules.layout.htmlContainerOutMap:this.modules.layout.htmlContainerInMap},e.prototype.updatePosition=function(){var t=Object(a.x)(this.mapState,this.mapPoint);this.rounder(t,t[0]+this.options.offset[0],t[1]+this.options.offset[1],this.mapState.stillness),O.h(this.screenPoint,t)||(this.html.style.transform="translate3d("+t[0]+"px, "+t[1]+"px, 0px)",this.screenPoint=t)},e.prototype.updateLabelBox=function(){if("none"!==this.options.labeling.type){var t=this.options,e=t.labeling,n=e.width,i=e.height,r=t.offset;this.modules.labeler.removeLabels(this.labelKey),this.modules.labeler.addLabelBox(this.labelKey,{id:this.uniqId,width:n,height:i,position:this.mapPoint,offset:r,labelingGroup:this.getLabelingGroup(),parentPoiId:"pinnedToPoi"===this.options.labeling.type?this.options.labeling.poiId:void 0})}},e.prototype.getLabelingGroup=function(){return this.isInvolvedInLabeling()?"markerText":"htmlLabel"},e.prototype.checkZoom=function(){var t=this.mapState.zoom,e=this.options,n=e.minZoom,i=e.maxZoom;return t>=n&&t<i},e.prototype.isInvolvedInLabeling=function(){return"full"===this.options.labeling.type||"pinnedToPoi"===this.options.labeling.type},e.options={coordinates:[0,0],html:"",offset:[0,0],animate:!0,duration:500,labeling:{type:"none"},interactive:!0,preventMapInteractions:!1,zIndex:0,minZoom:-1/0,maxZoom:1/0,disableRounding:!1},e}(w.a),sr=function(t,e,n,i){var r=Math.round(e)-e,o=Math.round(n)-n;t[0]=e+i*r,t[1]=n+i*o},cr=function(t,e,n){t[0]=e,t[1]=n},lr=function(){function t(t){this.state=t,this.layers=[]}return t.prototype.addLayer=function(t){this.layers.push(t),this.state.needRerender=!0},t.prototype.removeLayer=function(t){var e=this.layers.indexOf(t);-1!==e&&(this.layers.splice(e,1),this.state.needRerender=!0)},t.prototype.getLayers=function(){return this.layers},t.prototype.getDynamicObjectLayers=function(){return this.layers.filter((function(t){return t instanceof j}))},t.prototype.getHtmlMarkers=function(){return this.layers.filter((function(t){return t instanceof ar}))},t}(),ur=n(60),dr=function(){return""},fr=[.5,.5],hr=function(){function t(t){this.modules=t,this.cache={}}return t.prototype.getRasterSet=function(t,e,n,i){var r=this.getKey(t,n,i),o=this.getFromCache(r,e);if(o)return o;var a=this.loadIcon(t,e,n,i);return this.storeInCache(a,r,e),a},t.prototype.loadIcon=function(t,e,n,i){return Object(x.b)(this,void 0,Promise,(function(){var r,o,s,c,l,u;return Object(x.d)(this,(function(d){switch(d.label){case 0:return r=this.modules,o=r.dynamicStyle,s=r.workers,c=r.assetManager,l=t,e?[4,this.loadImageForTransformer(t).then((function(t){return e(t)})).catch((function(){return t}))]:[3,2];case 1:l=d.sent(),d.label=2;case 2:return[4,this.loadImage(l)];case 3:return u=d.sent(),[2,Promise.resolve().then((function(){n=void 0!==n?n:[u.width,u.height];var t=void 0!==i?[i[0]/n[0],i[1]/n[1]]:fr,e=[n[0]*window.devicePixelRatio,n[1]*window.devicePixelRatio],r=Object(ur.a)([{w:e[0],h:e[1],x:0,y:0,atlasIndex:0,isPacked:!1,anchorX:t[0],anchorY:t[1]}]);o.appendRasterSet(r),s.labeling.addNewRasterSets(o.getStyle().id,[r]);var a=new Uint16Array(3);return a[0]=e[0],a[1]=e[1],a[2]=r.index,s.parser.packRasters(a).then((function(t){return{packedRasters:t.packedRasters,rasterSet:r,scaledSize:e}}))})).then((function(t){var e=t.packedRasters,n=t.rasterSet,i=t.scaledSize;return void 0!==e&&c.prepareRasters(o.getStyle().id,e,[Object(a.C)(u,i)]),n}))]}}))}))},t.prototype.getFromCache=function(t,e){var n=this.cache[t];if(n)return n.get(e||dr)},t.prototype.storeInCache=function(t,e,n){this.cache[e]||(this.cache[e]=new Map),this.cache[e].set(n||dr,t)},t.prototype.getKey=function(t,e,n){return t+"_"+(void 0!==e?e[0]+","+e[1]:"")+"_"+(void 0!==n?n[0]+","+n[1]:"")},t.prototype.loadImage=function(t){return new Promise((function(e){var n=new Image;n.crossOrigin="Anonymous",n.src=t,n.onload=function(){e(n)}}))},t.prototype.loadImageForTransformer=function(t){return-1===t.indexOf(".svg")?new Promise((function(e){var n=new Image;n.crossOrigin="Anonymous",n.src=t,n.onload=function(){e({type:"raster",source:n})},n.onerror=function(){e({type:"unknown"})}})):new Promise((function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onload=function(){200===n.status&&0!==n.response.byteLength?e({type:"vector",source:n.response}):e({type:"unknown"})},n.onerror=function(){e({type:"unknown"})},n.send()}))},t}(),pr=function(){function t(t,e,n,i,r,o,a,s,c,l,u){this.key=n,this.id=i,this.object=void 0,this.ready=!1,this.modules=t,this.mapState=e,this.status="initial",this.regionId=r,this.metatileHash=Rt.k,this.styleId=o,this.floorIndex=a,this.cache=s,this.onGenerated=u,this.useful=!0,this.selectedIds=c.slice(0),this.needFilterIds=l}return t.prototype.update=function(){var t=this;switch(this.status){case"initial":this.useful&&(this.modules.workers.parser.generateFloor(this.id,this.regionId,window.devicePixelRatio,this.floorIndex,this.selectedIds,this.modules.map.state.disableCommercialPoi,this.styleId,this.mapState.styleState).then((function(e){var n=e.collectorOutput.packedRasters,i=e.styleId;n&&t.modules.assetManager.prepareRasters(i,n),t.processResponse=e})),this.status="generating");break;case"generating":if(this.useful&&this.processResponse){var e=this.processResponse,n=e.collectorOutput.data,i=e.tileCoords;this.object=new M.a("floor",n,this.modules.renderer,i),this.status="generated",this.ready=!0,this.cache.add(this.key,this),this.onGenerated(this)}}},t.prototype.getLabels=function(){return this.processResponse&&this.processResponse.collectorOutput.labels.length?[{metatileHash:this.metatileHash,labels:this.processResponse.collectorOutput.labels,styleId:this.processResponse.styleId}]:[]},t.prototype.getGeoIds=function(){if(this.processResponse)return this.processResponse.collectorOutput.geoIds},t.prototype.canBeRemoved=function(){return"initial"===this.status},t.prototype.remove=function(){"generated"===this.status&&this.cache.remove(this.key),this.status="initial",this.object&&this.object.clean(this.mapState),this.ready=!1},t.prototype.getIdentifyIds=function(){if(this.processResponse){var t={};return t[this.metatileHash]=this.processResponse.collectorOutput.identifyIds,t}},t.prototype.isDataEmpty=function(){return!this.processResponse||0===this.processResponse.collectorOutput.data.length},t}(),mr=function(){function t(t,e,n,i,r,o,a){var s=this;this.onModGenerated=function(t){var e=s.idSetByFloorIndex.get(t.floorIndex);if(!e){e=new Vi.a;var n=t.getGeoIds();n&&e.addFromFlatArray(n),s.idSetByFloorIndex.set(t.floorIndex,e)}t.needFilterIds&&(t.needFilterIds=!1,t.selectedIds=Object(Ti.g)(t.selectedIds,e))},this.modules=t,this.mapState=e,this.id=n,this.regionId=i,this.styleId=e.handyStyleId,this.idSetByFloorIndex=new Map,this.cache=r,this.floorIndex=o,this.createNewMod(o,a)}return t.prototype.update=function(){this.currentMod&&this.currentMod.useful&&this.currentMod.update(),this.newMod&&this.newMod.useful&&this.newMod.update()},t.prototype.getCurrentMod=function(){return this.currentMod},t.prototype.commitMod=function(){this.newMod&&this.newMod.ready&&(this.currentMod=this.newMod,this.newMod=void 0)},t.prototype.setUsefulMod=function(t,e){this.floorIndex=t;var n=this.idSetByFloorIndex.get(t);if(n&&(e=Object(Ti.g)(e,n)),this.currentMod||this.newMod){if(this.currentMod&&Object(Ti.f)(this.currentMod.selectedIds,e)&&this.currentMod.floorIndex===t)return this.currentMod.useful=!0,void(this.newMod=void 0);this.newMod&&Object(Ti.f)(this.newMod.selectedIds,e)&&this.newMod.floorIndex===t?this.newMod.useful=!0:this.createNewMod(t,e)}else this.createNewMod(t,e)},t.prototype.getUsefulMod=function(){return this.currentMod&&this.currentMod.useful?this.currentMod:this.newMod&&this.newMod.useful?this.newMod:void 0},t.prototype.setAllModsNeedless=function(){this.currentMod&&(this.currentMod.useful=!1),this.newMod&&(this.newMod.useful=!1)},t.prototype.canBeRemoved=function(){return(!this.currentMod||this.currentMod.canBeRemoved())&&(!this.newMod||this.newMod.canBeRemoved())},t.prototype.remove=function(){this.currentMod&&this.currentMod.remove(),this.newMod&&this.newMod.remove()},t.prototype.createNewMod=function(t,e){var n=function(t,e,n){return"floor_plan_"+t+"_"+e+"_"+n}(this.id,t,e),i=this.cache.get(n);if(i)this.newMod=i,this.newMod.useful=!0;else{if(void 0===this.styleId)return;var r=!this.idSetByFloorIndex.has(t);this.newMod=new pr(this.modules,this.mapState,n,this.id,this.regionId,this.styleId,t,this.cache,e,r,this.onModGenerated)}},t}(),vr=function(){function t(t,e){this.state=t,this.modules=e,this.floors=new Map,this.complexDescriptors=new Map,this.hiddenObjectIds=new Map,this.displayedMods=new Map,this.requestedFloors=new Set,this.needUpdate=!1,this.cache=new qi.a(10,(function(t,e){return e.remove()})),this.stateDiffer=new vt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}])}return t.prototype.update=function(){var t=this;if(this.stateDiffer.check(this.state)||this.needUpdate){this.needUpdate=!1;var e=this.findActiveFloor();if(this.activeFloor!==e){if(this.activeFloor&&this.modules.map.emit("floorcomplexhide",{id:this.activeFloor}),e){var n=this.complexDescriptors.get(e);if(n){var i=n.id,r=n.regionId,o=n.defaultFloor,a=n.floorNames,s=this.floors.get(e);s?s.setUsefulMod(s.floorIndex,this.modules.tileManager.getSelectedIds()):(s=new mr(this.modules,this.state,i,r,this.cache,o,this.modules.tileManager.getSelectedIds()),this.floors.set(e,s));var c=s.getUsefulMod();this.modules.map.emit("floorcomplexshow",{id:i,currentFloor:c?c.floorIndex:o,floorNames:a,firmsToFloorIndexMap:n.firmsToFloorIndexMap})}}this.activeFloor=e}}if(this.floors.forEach((function(t){return t.setAllModsNeedless()})),this.activeFloor){var l=this.floors.get(this.activeFloor);l&&l.setUsefulMod(l.floorIndex,this.modules.tileManager.getSelectedIds())}this.floors.forEach((function(e,n){e.update(),e.canBeRemoved()&&t.floors.delete(n)})),this.updateScene(),this.commitMods()},t.prototype.getActiveFloorHiddenIds=function(){var t=[];if(!this.activeFloor)return t;var e=this.complexDescriptors.get(this.activeFloor),n=this.floors.get(this.activeFloor);if(!e||!n)return t;var i=n.getCurrentMod();if(!i)return t;if(i.isDataEmpty())return t;for(var r=0;r<e.buildings.length;r++){var o=this.hiddenObjectIds.get(e.buildings[r]);o&&o.forEach((function(e){return t.push(e)}))}return t},t.prototype.prepareFloors=function(t,e,n,i){var r=this;"terrain"===i&&n.forEach((function(n,i,o){var a=Object(P.a)(i,o),s=r.hiddenObjectIds.get(a);void 0===s&&(s=new Set,r.hiddenObjectIds.set(a,s));for(var c=0;c<n.length;c+=2)s.add(Object(P.a)(n[c],n[c+1]));r.loadFloor(a,t,e)}))},t.prototype.changeFloorNumber=function(t,e){var n=this.floors.get(t),i=this.complexDescriptors.get(t);n&&i&&(n.setUsefulMod(e,this.modules.tileManager.getSelectedIds()),this.modules.map.emit("floorcomplexlevelchange",{id:t,floorIndex:e,floorName:i.floorNames[e]}))},t.prototype.resetCache=function(){var t=this;this.floors.forEach((function(e,n){e.remove(),t.floors.delete(n)})),this.cache.reset(),this.activeFloor=void 0,this.needUpdate=!0},t.prototype.getDisplayedIdentifyData=function(){var t=[];return this.displayedMods.forEach((function(e){var n=e.getIdentifyIds();n&&Object.keys(n).forEach((function(e){t.push({ids:n[e],metatileHash:Number(e)})}))})),t},t.prototype.hasDisplayedFloorBuilding=function(t){if(!this.activeFloor)return!1;var e=this.complexDescriptors.get(this.activeFloor),n=this.floors.get(this.activeFloor);if(!e||!n)return!1;var i=n.getCurrentMod();if(!i||!i.ready)return!1;if(i.isDataEmpty())return!1;for(var r=0;r<e.buildings.length;r++){var o=this.hiddenObjectIds.get(e.buildings[r]);if(o&&o.has(t))return!0}return!1},t.prototype.loadFloor=function(t,e,n){var i=this;this.requestedFloors.has(t)||(this.requestedFloors.add(t),this.modules.workers.parser.loadFloor(t,this.state.floorsUrl).then((function(r){"error"!==r.type?(i.complexDescriptors.set(t,{id:t,regionId:e,metatileHash:n,center:r.center,defaultFloor:r.defaultFloor,floorNames:r.floorNames,buildings:r.buildings,bound:r.bound,firmsToFloorIndexMap:r.firmsToFloorIndexMap}),i.needUpdate=!0):404!==r.errorStatus&&console.error("Loading floor "+t+" failed")})))},t.prototype.updateScene=function(){var t=this,e=!1,n=new Map;if(this.activeFloor){var i=this.floors.get(this.activeFloor);if(!i)return;var r=i.getCurrentMod();r&&r.ready&&n.set(r.key,r)}this.displayedMods.forEach((function(i,r){n.has(r)||(t.removeFloorMod(i),e=!0)})),n.forEach((function(n,i){t.displayedMods.has(i)||(t.addFloorMod(n),e=!0),t.cache.get(i)})),e&&(this.displayedMods=n,this.state.needLabeling=!0,this.state.needRerender=!0,this.modules.identifier.resetCache())},t.prototype.addFloorMod=function(t){t.object&&(this.modules.tileManager.addObject(t.object),this.modules.labeler.addLabels(t.key,Ki.c.Floor,t.getLabels()))},t.prototype.removeFloorMod=function(t){t.object&&(this.modules.tileManager.removeObject(t.object),this.modules.labeler.removeLabels(t.key))},t.prototype.commitMods=function(){if(this.activeFloor){var t=this.floors.get(this.activeFloor);t&&t.commitMod()}},t.prototype.findActiveFloor=function(){var t=this.complexDescriptors,e=this.state,n=e.center,i=e.zoom,r=e.styleZoom,c=e.rotation,l=e.size,u=e.pitch,d=e.viewport,f=e.padding;if(!(r<o.floors.displayStyleZoom)){var h,p=Object(s.e)({center:n,zoom:i,rotation:c,size:[Math.floor(l[0]*(1-o.floors.viewportPadding)),Math.floor(l[1]*(1-o.floors.viewportPadding))],pitch:u,viewport:d,padding:f}),m=1/0;return t.forEach((function(t){var e=O.f(n,t.center);m>e&&Object(a.B)(t.bound,p)&&(m=e,h=t)})),h?h.id:void 0}},t}(),_r=new Float32Array(Ft.b()),yr=function(t,e,n,i,r){return function(o,a){var s=o[0],c=s.layerSettings,l=c.objectBinder,u=c.programName,d=i.renderer.getShaderProgram(u);l(t,d,n,i,s,a)&&o.forEach((function(i){"buildingModel"===i.symbol?(Ft.g(_r,r,i.attributes.matrix),d.bind(t,{u_mat4_mvp:_r})):"heatmap"===i.symbol&&"framebuffer"!==i.sink||d.bind(t,{u_mat4_mvp:i.tile.mvpMatrix}),i.vao.bind({gl:t,extensions:e});var o=i.rangeStart/i.stride,a=(i.rangeEnd-i.rangeStart)/i.stride,s=1===i.attributes.primitiveType?t.TRIANGLE_STRIP:t.TRIANGLES;t.drawArrays(s,o,a),n.collectStats&&!i.layerSettings.identify&&(n.stats.drawCount++,n.stats.vertexCount+=a)}))}},gr={fill:{phase:"phase",color:"color",width:"width",dashColor:"dashColor",spaceColor:"spaceColor",zIndexAmplifier:"zIndexAmplifier"},border:{phase:"phase2",color:"color2",width:"width2",dashColor:"dash2Color"},border2:{phase:"phase3",color:"color3",width:"width3"},fontFill:{color:"fontColor",phase:"phase"},fontHalo:{color:"haloColor",phase:"phase"}},br=function(t,e,n,i){var r=Or(e.styleManager,n[0]);if(r){var o=function(n,a){a>=r.orderBy.length?kr(e.styleManager,n,t).forEach((function(n){return wr(t,e,n,i)})):Er(r.orderBy[a],n,t).forEach((function(t,e){return o(t,e+1)}))};o(n,0)}},xr=function(t,e,n,i){kr(e.styleManager,n,t).forEach((function(n){return wr(t,e,n,i)}))},wr=function(t,e,n,i){Cr(n,t).forEach((function(n){return Sr(t,e,n,i)}))},Sr=function(t,e,n,i){Ar(n,t).forEach((function(n){return Ir(t,e,n,i)}))},Ir=function(t,e,n,i){i.useProgram(n),Dr(n,t).forEach((function(n){jr(t,e,n,i)}))},jr=function(t,e,n,i){i.useState(n);var r=n[0],o=function(t,e){var n=t.getStyle(e.attributes.styleId);if(n){var i=n.layersById[e.attributes.layerId];return i&&i.type!==e.symbol&&Object(Ni.a)("Expecting layer with type '"+e.symbol+"' but got '"+i.type+"'"),i}}(e.styleManager,r);if(o)if("heatmap"===r.symbol&&"framebuffer"===r.sink&&"heatmap"===o.type){if(void 0!==o.framebufferIndex){var a=e.renderer.getFramebuffer(o.framebufferIndex);if(a){var s=e.renderer.getRenderingContext();(function(t,e,n,i){var r=i.size;e.viewport(0,0,Math.ceil(r[0]*window.devicePixelRatio/n.style.downscale),Math.ceil(r[1]*window.devicePixelRatio/n.style.downscale)),t.bind(e),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)})(a,s,o,t),Fr(n,t).forEach((function(t){i.drawSymbol(t,o)})),function(t,e,n){var i=n.size,r=n.viewport;t.unbind(e),e.viewport(r.left*window.devicePixelRatio,r.bottom*window.devicePixelRatio,i[0]*window.devicePixelRatio,i[1]*window.devicePixelRatio)}(a,s,t)}}}else Fr(n,t).forEach((function(t){i.drawSymbol(t,o)}))};function Or(t,e){var n=t.getStyle(e.attributes.styleId);if(n){var i=n.layersById[e.attributes.layerId];if(i&&void 0!==i.groupId){var r=n.groupsById[i.groupId];if(!r||"group"===r.type)return r;Object(Ni.a)("Expecting layer with type 'group' but got '"+r.type+"'")}}}var Mr=function(t,e){return Number(t)-Number(e)},Pr=function(t){return function(e,n){for(var i={},r=0;r<e.length;r++){var o=e[r],a=t(o,n),s=i[a];void 0===s?i[a]=[o]:s.push(o)}var c=Object.keys(i);c.sort(Mr);var l=[];for(r=0;r<c.length;r++)l.push(i[c[r]]);return l}},Lr=function(t){return function(e,n){for(var i=new Map,r=0;r<e.length;r++){var o=e[r],a=t(o,n);i.has(a)?i.get(a).push(o):i.set(a,[o])}return i}},Tr=Pr((function(t){return t.attributes.styleId===E.a?1:0})),kr=function(t,e,n){return Pr((function(e){return function(t,e,n){var i=t.getStyle(e);if(!i)return Object(Ni.a)("Cannot get style with id="+e+" for renderIndex"),NaN;var r=i.layersById[n];return r?r.groupIndex||0:NaN}(t,e.attributes.styleId,e.attributes.layerId)}))(e,n)},zr=function(t,e,n){return Pr((function(e){return function(t,e,n){var i=t.getStyle(e);if(!i)return Object(Ni.a)("Cannot get style with id="+e+" for renderIndex"),NaN;var r=i.layersById[n];return r?r.renderIndex:NaN}(t,e.attributes.styleId,e.attributes.layerId)}))(e,n)},Cr=Pr((function(t){return(t.attributes[gr.fill.zIndexAmplifier]||0)+(t.layerSettings.subRenderIndex||0)})),Er=function(t,e,n){return Pr((function(e,n){var i,r=Object(F.c)(n.styleZoom,n.styleState,null!==(i=e.attributes.tileData)&&void 0!==i?i:[]);return Object(F.i)(t,r,0)}))(e,n)},Ar=Lr((function(t){return t.layerSettings.programName})),Dr=Lr((function(t){return t.layerSettings.stateBinder})),Fr=Lr((function(t){return t.sink+"_"+t.attributesHash+"_"+t.tile.readiness})),Rr=function(t,e,n,i,r,o){var a=function(t,e,n,i,r){return{drawSymbol:yr(t,e,n,i,r),useProgram:function(e){var r=e[0].layerSettings,o=r.globalBinder,a=r.programName,s=i.renderer.getShaderProgram(a);s.enable(t),o(t,s,n,i)},useState:function(e){e[0].layerSettings.stateBinder(t)}}}(t,e,n,i,r);!function(t,e,n,i){Tr(n,t).forEach((function(n){return function(t,e,n,i){zr(e.styleManager,n,t).forEach((function(n){Or(e.styleManager,n[0])?br(t,e,n,i):xr(t,e,n,i)}))}(t,e,n,i)}))}(n,i,o,a)},Br=n(82),Nr=c.d(),Ur=function(t){function e(e,n){var i,r,a,c,l,u,d,f=t.call(this,e)||this;f.options=n,f.vectors=f.options.coordinates.map((function(t){return t.map(s.l)})),f.bouncePosition=0,f.growPosition=1;var h=f.modules,p=h.renderer,m=h.tileManager,v=h.dynamicStyle,_=h.collector,y=h.layers,g=Object(A.d)({type:"arrow",id:"dynamic-entrance-"+f.uniqId,minzoom:f.options.minZoom,maxzoom:f.options.maxZoom,style:{color:null!==(i=f.options.color)&&void 0!==i?i:"#0085a0",strokeColor:null!==(r=f.options.borderColor)&&void 0!==r?r:"#ffffff",lineWidth:null!==(a=f.options.width)&&void 0!==a?a:3,strokeWidth:null!==(c=f.options.borderWidth)&&void 0!==c?c:1,tipWidth:null!==(l=f.options.wingWidthMultiplier)&&void 0!==l?l:2,tipHeight:null!==(u=f.options.tipHeightMultiplier)&&void 0!==u?u:4,animation:null===(d=f.options.animate)||void 0===d||d?{type:"appearence",tipMovementAmplitude:f.options.tipMovementAmplitude||20}:void 0}});if(!g)return f;v.addLayer(g,f.options.zIndex),f.layerId=g.innerId;for(var x=f.getTileInfo(),w=0;w<f.vectors.length;w++){var S=f.vectors[w],I=f.getVertices(S,x),j=Object(E.c)({id:[w,0]});Object(C.b)({collector:_,generator:Br.generateArrow,args:[v.getStyle().id,g,b.d,j,I]})}var O=_.getAccumulatedData(),P=new M.a("dynamicObject",O.data,p,x.coords,f);if(f.tileObjects.push(P),m.addObject(P),f.identifyIds.push(O.identifyIds),f.options.animate){var L="entrance-bounce-"+f.uniqId,T="entrance-grow-"+f.uniqId;f.bounceTickerUpdate=B.e.bind(null,L,{step:function(t,e){return f.bouncePosition=e},complete:function(){f.bounceTickerUpdate=void 0}},f.mapState),f.growTickerUpdate=B.e.bind(null,T,{step:function(t,e){return f.growPosition=e},complete:function(){f.growTickerUpdate=void 0}},f.mapState),B.c(L,{easing:o.entranceAnimation.bounceType},f.mapState,-1,0,o.entranceAnimation.bounceTime),B.c(T,{easing:o.entranceAnimation.growType},f.mapState,0,1,o.entranceAnimation.growTime)}else f.bouncePosition=0,f.growPosition=1;return y.addLayer(f),_.reset(),f.mapState.needRerender=!0,f}return Object(x.c)(e,t),e.prototype.update=function(){this.bounceTickerUpdate&&this.bounceTickerUpdate(),this.growTickerUpdate&&this.growTickerUpdate()},e.prototype.entranceAnimationInProgress=function(){return void 0!==this.bounceTickerUpdate||void 0!==this.growTickerUpdate},e.prototype.remove=function(){void 0!==this.layerId&&this.modules.dynamicStyle.removeLayer(this.layerId),t.prototype.destroy.call(this)},e.prototype.getTileInfo=function(){for(var t=l.e(),e=0;e<this.vectors.length;e++)for(var n=this.vectors[e],i=0;i<n.length;i++)l.f(t,n[i]);return Object(Ti.e)(Object(s.d)(t))},e.prototype.getVertices=function(t,e){for(var n=[[],[],[]],i=0;i<t.length;i++)Object(s.k)(Nr,t[i],e),n[0][i]=Nr[0],n[1][i]=Nr[1];return n},e}(j),Hr=function(){function t(t,e){this.objects=[],this.state=t,this.modules=e,this.tileLayers=[],this.stateDiffer=new vt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}]),this.viewportVertices=Object(s.e)(t),this.selectedIds=[]}return t.prototype.addTileLayer=function(t){-1===this.tileLayers.indexOf(t)&&(this.tileLayers.push(t),t.redraw(),this.modules.identifier.resetCache(),this.state.needLabeling=!0,this.state.needRerender=!0)},t.prototype.removeTileLayer=function(t){Object(a.j)(this.tileLayers,t)&&(t.resetHoverId(),this.modules.identifier.resetCache(),this.state.needLabeling=!0,this.state.needRerender=!0)},t.prototype.redraw=function(){this.modules.labeler.clearPreviousLabels();for(var t=0,e=this.tileLayers;t<e.length;t++){var n=e[t];n.resetHoverId(),n.redraw()}this.state.needRerender=!0},t.prototype.setSelectedIds=function(t){void 0===t&&(t=[]),t.sort(Ti.b),this.selectedIds=t;for(var e=0,n=this.tileLayers;e<n.length;e++)n[e].setSelectedIds(t)},t.prototype.getSelectedIds=function(){return this.selectedIds},t.prototype.getViewportVertices=function(){return this.viewportVertices},t.prototype.getViewportTiles=function(){for(var t=[],e=0,n=this.tileLayers;e<n.length;e++){var i=n[e];t.push.apply(t,i.getViewportTiles())}return t},t.prototype.viewportTilesReady=function(){return this.tileLayers.every((function(t){return t.viewportTilesReady()}))},t.prototype.displayedTilesAnimationFinished=function(){return this.tileLayers.every((function(t){return t.displayedTilesAnimationFinished()}))},t.prototype.getDisplayedIdentifyData=function(){for(var t=[],e=0,n=this.tileLayers;e<n.length;e++){var i=n[e];t.push.apply(t,i.getDisplayedIdentifyData())}return t},t.prototype.isIdle=function(){return!this.state.needRerender&&this.viewportTilesReady()&&this.displayedTilesAnimationFinished()&&!this.modules.buildingHeightAnimator.isAnimating()&&!this.modules.modelManager.isAnimating()&&!this.checkEntranceAnimation()},t.prototype.update=function(){var t=this.state;if(this.stateDiffer.check(t)){this.viewportVertices=Object(s.e)(t);for(var e=0,n=this.tileLayers;e<n.length;e++)(c=n[e]).updateViewport(this.viewportVertices);this.modules.modelManager.findViewportModels(),t.needLabeling=!0}for(var i=0,r=this.tileLayers;i<r.length;i++)(c=r[i]).update();if(this.updateTickers(),this.modules.modelManager.update(),t.collectStats){this.state.stats.tileCount=0;for(var o=0,a=this.tileLayers;o<a.length;o++){var c=a[o];this.state.stats.tileCount+=c.getTileCount()}this.state.stats.dynamicTileCount=this.objects.filter((function(t){return"dynamicObject"===t.purpose||"floor"===t.purpose})).length}},t.prototype.render=function(t,e,n,i){for(var r=[],o=this.objects,a=0;a<o.length;a++){var s=o[a],c=i?s.identifyChildren:s.children;r.push.apply(r,c),s.updateMvpMatrix(n)}var l=this.modules.modelManager.objects;for(a=0;a<l.length;a++)c=i?l[a].identifyChildren:l[a].children,r.push.apply(r,c);Rr(t,e,this.state,this.modules,n,r)},t.prototype.addObject=function(t){-1===this.objects.indexOf(t)&&(this.objects.push(t),this.state.needRerender=!0)},t.prototype.removeObject=function(t){Object(a.j)(this.objects,t)&&(this.state.needRerender=!0)},t.prototype.destroy=function(){for(var t=this,e=0,n=this.tileLayers;e<n.length;e++)n[e].destroy();this.objects.forEach((function(e){return e.clean(t.state)}))},t.prototype.updateTickers=function(){var t=this;this.objects.forEach((function(e){return e.updateTicker(t.state)}))},t.prototype.checkEntranceAnimation=function(){return this.modules.layers.getLayers().some((function(t){return t instanceof Ur&&t.entranceAnimationInProgress()}))},t}(),Zr=B.e.bind(null,"labelingOpacity",{step:function(t,e){return t.labelingOpacity=e}}),Gr=function(){function t(t,e){var n;this.state=t,this.modules=e,this.useThrottleUpdate=!0,this.isLabelingInProgress=!1,this.skipHysteresisInNextLabeling=!1,this.activeLabelKeys=[],this.survivedLabelBoxes=new Set,this.prevSurvivedCommPoiIds=new Set,this.worker={appendLabels:(n=this.modules.workers.fnRegistry).get(nr.b.Labeling,"appendLabels"),appendLabelBox:n.get(nr.b.Labeling,"appendLabelBox"),removeLabels:n.get(nr.b.Labeling,"removeLabels"),processLabels:n.get(nr.b.Labeling,"processLabels"),clearPreviousLabels:n.get(nr.b.Labeling,"clearPreviousLabels")},this.setLabelingInterval(o.labeling.interval)}return t.prototype.disableThrottleUpdateOnce=function(){this.useThrottleUpdate=!1},t.prototype.update=function(){Zr(this.state),this.state.needLabeling&&!this.isLabelingInProgress&&(this.state.needLabeling=!1,this.isLabelingInProgress=!0,this.useThrottleUpdate?this.throttledUpdateLabeling():(this.useThrottleUpdate=!0,this.generateLabelingTile()))},t.prototype.isIdle=function(){return void 0===this.state.tickers.labelingOpacity&&!this.isLabelingInProgress&&!this.state.needLabeling},t.prototype.setLabelingInterval=function(t){var e=this;this.throttledUpdateLabeling=ht((function(){e.generateLabelingTile()}),t)},t.prototype.addLabels=function(t,e,n){this.worker.appendLabels(t,e,n,this.state.styleState,this.state.styleZoom),this.activeLabelKeys.push(t),this.state.needLabeling=!0},t.prototype.addTileLabels=function(t,e,n){this.worker.appendLabels(t,e,n,this.state.styleState,this.state.styleZoom),this.state.needLabeling=!0},t.prototype.addLabelBox=function(t,e){this.worker.appendLabelBox(t,e),this.state.needLabeling=!0},t.prototype.removeLabels=function(t){this.worker.removeLabels(t);var e=this.activeLabelKeys.indexOf(t);-1!==e&&this.activeLabelKeys.splice(e,1),this.state.needLabeling=!0},t.prototype.isLabelBoxSurvived=function(t){return this.survivedLabelBoxes.has(t)},t.prototype.clearPreviousLabels=function(){this.worker.clearPreviousLabels()},t.prototype.resetHysteresis=function(){this.skipHysteresisInNextLabeling=!0,this.state.needLabeling=!0},t.prototype.generateLabelingTile=function(){var t=this,e=Object(s.d)(Object(s.c)(this.state),o.labeling.tileMultiplier),n=this.modules.floorManager.getActiveFloorHiddenIds(),i=[];this.modules.tileManager.tileLayers.forEach((function(t){i.push.apply(i,t.getDisplayedLabelsKeys())})),i.push.apply(i,this.activeLabelKeys);var r={center:this.state.center,zoom:this.state.zoom,styleZoom:this.state.styleZoom,rotation:this.state.rotation,size:this.state.size,pitch:this.state.pitch,promoMode:this.state.promoMode,viewport:this.state.viewport,padding:this.state.padding,styleState:this.state.styleState,buildingHeight:this.modules.buildingHeightAnimator.getDefaultBuildingHeight()};this.worker.processLabels(i,r,Object(Ti.e)(e),window.devicePixelRatio,n,o.labeling.commercialMargins,this.skipHysteresisInNextLabeling).then((function(n){t.survivedLabelBoxes.clear(),n.survivedLabelBoxIds.forEach((function(e){return t.survivedLabelBoxes.add(e)})),t.processSurvivedCommPoiIds(n.survivedCommPoiIds),t.labelTile&&(t.modules.tileManager.removeObject(t.labelTile),t.labelTile.clean(t.state)),t.modules.assetManager.loadRasters(n.collectorOutput.rastersToLoad),t.labelTile=new M.a("labeling",n.collectorOutput.data,t.modules.renderer,e),t.modules.tileManager.addObject(t.labelTile);var i,r,a,s=o.labeling,c=s.animationTime,l=s.animationType,u=s.interval;i=t.state,r=l,a=Math.min(c,u),B.c("labelingOpacity",{easing:r},i,0,1,a),t.state.needRerender=!0,t.isLabelingInProgress=!1})),this.skipHysteresisInNextLabeling=!1},t.prototype.processSurvivedCommPoiIds=function(t){var e=this;if(0!==t.length){var n=t.filter((function(t){return!e.prevSurvivedCommPoiIds.has(t)}));0!==n.length&&this.modules.map.emit("commpoishow",{commPoiIds:n}),this.prevSurvivedCommPoiIds=new Set(t)}else this.prevSurvivedCommPoiIds.clear()},t}(),Wr={start:{en:"Start",ru:"Старт"},addPoint:{en:"Add point",ru:"Добавить точку"},meter:{en:"m",ru:"м"},kilometer:{en:"km",ru:"км"}};function Vr(t,e,n){return e?Wr.start[n]||Wr.start.en:t<1e3?t+" "+(Wr.meter[n]||Wr.meter.en):(t/1e3).toFixed(1)+" "+(Wr.kilometer[n]||Wr.kilometer.en)}function qr(t,e){return'\n        <div style="font-size: '+e+'px;\n            color: #667799;\n            user-select: none;\n            font-family: SuisseIntl, Helvetica, Arial, sans-serif;\n            text-shadow: 1px 0px 1px #fff, -1px 0px 1px #fff, 0px 1px 1px #fff, 0px -1px 1px #fff;\n            white-space: nowrap;\n            cursor: pointer;\n        ">\n            '+t+"\n        </div>\n    "}function Yr(t,e,n,i){return new R(i,{coordinates:t,interactive:n,draggable:n,width:e?7:0,borderWidth:e?3:4,border2Width:2,color:"#ffffff",borderColor:"#667799",border2Color:"#ffffff",zIndex:10})}function Xr(t,e,n){return new ra(n,{coordinates:t,zIndex:5,zIndex2:4,zIndex3:3,width:4,width2:e?0:8,width3:e?0:10,color:e?"#66779966":"#667799",color2:"#ffffff",color3:"#00000026",interactive:!e})}var Kr=function(t){function e(e,n,i,r){var o=t.call(this)||this;o.markerOrLabelMouseover=function(){o.markerOrLabelHovered||(o.markerOrLabelHovered=!0,void 0===o.hoverTimer&&o.emit("mouseover"))},o.markerOrLabelMouseout=function(){o.markerOrLabelHovered&&(o.markerOrLabelHovered=!1,o.hoverTimer=window.setTimeout((function(){o.markerOrLabelHovered||(o.emit("mouseout"),o.hoverTimer=void 0)}),100))},o.onClick=function(){return o.emit("click")},o.labelText=Vr(r,i,e.state.lang),o.point=n,o.distance=r,o.label=function(t,e,n){var i=qr(e,13),r=function(t,e){return 7.15*t.length}(e);return new ar(n,{coordinates:t,html:i,offset:[8,-8.5],labeling:{type:"full",width:r,height:13},animate:!1,zIndex:6})}(n,o.labelText,e),o.marker=Yr(n,i,!0,e),o.markerOrLabelHovered=!1;var a=o.label.dangerouslyGetRootElement();return a.addEventListener("mouseover",o.markerOrLabelMouseover),a.addEventListener("mouseout",o.markerOrLabelMouseout),a.addEventListener("click",o.onClick),o.marker.on("mouseover",(function(){return o.markerOrLabelMouseover()})),o.marker.on("mouseout",(function(){return o.markerOrLabelMouseout()})),o.marker.on("dragstart",(function(t){var e=t.lngLat,n=t.originalEvent,i=t.point,r=t.target;o.emit("dragstart",{lngLat:e,originalEvent:n,point:i,targetData:o,target:r})})),o.marker.on("dragend",(function(t){var e=t.lngLat,n=t.originalEvent,i=t.point,r=t.target;o.emit("dragend",{lngLat:e,originalEvent:n,point:i,targetData:o,target:r})})),o}return Object(x.c)(e,t),e.prototype.getDistance=function(){return this.distance},e.prototype.getPoint=function(){return this.point},e.prototype.getMarkerUniqId=function(){return this.marker.uniqId},e.prototype.getLabelUniqId=function(){return this.label.uniqId},e.prototype.setPoint=function(t){this.point=t},e.prototype.remove=function(){this.marker.remove();var t=this.label.dangerouslyGetRootElement();t.removeEventListener("mouseover",this.markerOrLabelMouseover),t.removeEventListener("mouseout",this.markerOrLabelMouseout),t.removeEventListener("click",this.onClick),this.label.destroy()},e.prototype.activateHover=function(){this.label.setContent('\n        <img style="\n            user-select: none;\n            width: 24px;\n            height: 24px;\n            margin-top: -4px;\n            cursor: pointer;\n        " src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjIiIGhlaWdodD0iMjIiPjxkZWZzPjxwYXRoIGlkPSJBIiBkPSJNMTIgMTAuNTg2bDMuNzkzLTMuNzkzIDEuNDE0IDEuNDE0TDEzLjQxNCAxMmwzLjc5MyAzLjc5My0xLjQxNCAxLjQxNEwxMiAxMy40MTRsLTMuNzkzIDMuNzkzLTEuNDE0LTEuNDE0TDEwLjU4NiAxMiA2Ljc5MyA4LjIwN2wxLjQxNC0xLjQxNEwxMiAxMC41ODZ6Ii8+PC9kZWZzPjxnIGZpbGwtcnVsZT0iZXZlbm9kZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEgLTEpIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMC41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiMwMDAiIHN0cm9rZS1vcGFjaXR5PSIuMTUiLz48bWFzayBpZD0iQiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjQSIvPjwvbWFzaz48dXNlIGZpbGw9IiMwMDAiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI0EiLz48ZyBmaWxsPSIjMjYyNjI2IiBtYXNrPSJ1cmwoI0IpIj48cGF0aCBkPSJNMCAwaDI0djI0SDB6Ii8+PC9nPjwvZz48L3N2Zz4=" alt="close">\n    ')},e.prototype.deactivateHover=function(){this.label.setContent(qr(this.labelText,13))},e}(w.a),Jr=function(){function t(t,e){var n=this;this.onDocumentMouseMove=function(t){n.mousePos=p(n.modules.layout.rootContainer,t.clientX,t.clientY),n.needsUpdate=!0},this.modules=e,this.state=t,this.joints=[],this.enabled=!1,this.needsUpdate=!1,this.hidePreviewLine=!1,this.hideMouseElem=!1,this.mousePos=[0,0],document.addEventListener("mousemove",this.onDocumentMouseMove),this.langDiffer=new vt([{path:"lang",type:"string"}])}return t.prototype.destroy=function(){document.removeEventListener("mousemove",this.onDocumentMouseMove)},t.prototype.enable=function(){this.enabled||(this.enabled=!0,this.state.identifyPickDistance=2*o.identify.pickDistance,this.popup=new ar(this.modules.map,{coordinates:[0,0],html:"",interactive:!1,animate:!1,zIndex:1}))},t.prototype.disable=function(){this.enabled=!1,this.reset(),void 0!==this.mouseElem&&(this.mouseElem.remove(),this.mouseElem=void 0),this.state.identifyPickDistance=o.identify.pickDistance,this.popup&&(this.popup.destroy(),this.popup=void 0)},t.prototype.update=function(){this.enabled&&(this.langDiffer.check(this.state)&&this.recalculate(),this.needsUpdate&&(this.needsUpdate=!1,this.drawMousePoint(),this.drawPreviewLine()))},t.prototype.setPoints=function(t){var e=this;this.reset(),t.forEach((function(t){return e.addPointToEnd(t)})),this.drawPolyline(),this.sendRulerChangeEvent(!1)},t.prototype.handleClick=function(t,e){var n=this.getJointByUniqId(e&&e.dynamicObjectId);if(n){var i=this.getJointIndexByReferer(n);void 0!==i&&(n.remove(),this.joints.splice(i,1),this.recalculate(),this.hidePreviewLine=!1,this.hideMouseElem=!1),this.popup&&this.popup.setContent("")}else if(e&&this.polyline&&this.polyline.uniqId===e.dynamicObjectId){var r=this.polyline.snapPoint(t),o=this.getJointIndexByDistance(r.distance),c=this.createJoint(r.point,!1,r.distance);this.joints.splice(o,0,c),this.hidePreviewLine=!0,this.hideMouseElem=!0,this.drawPolyline(),this.sendRulerChangeEvent(!0),this.popup&&this.popup.setContent("")}else{var l=Object(s.m)(Object(a.z)(this.modules.map.state,t));this.addPointToEnd(l),this.drawPolyline(),this.sendRulerChangeEvent(!0)}},t.prototype.recalculate=function(){var t=this,e=[];this.joints.forEach((function(n,i){n.remove();var r=0===i,o=0;if(!r){var a=e[i-1];o=a.getDistance()+Object(s.a)(a.getPoint(),n.getPoint())}var c=t.createJoint(n.getPoint(),r,o);e.push(c)})),this.joints=e,this.drawPolyline(),this.sendRulerChangeEvent(!0)},t.prototype.sendRulerChangeEvent=function(t){this.modules.map.emit("rulerchange",{points:this.getPoints(),isUser:t})},t.prototype.getJointByUniqId=function(t){if(void 0!==t)for(var e=0,n=this.joints;e<n.length;e++){var i=n[e];if(t===i.getMarkerUniqId()||t===i.getLabelUniqId())return i}},t.prototype.getJointIndexByDistance=function(t){for(var e=0,n=0,i=this.joints;n<i.length&&!(t<i[n].getDistance());n++)e++;return e},t.prototype.getJointIndexByReferer=function(t){for(var e=0,n=0,i=this.joints;n<i.length;n++){if(i[n]===t)return e;e++}},t.prototype.getPoints=function(){return this.joints.map((function(t){return t.getPoint()}))},t.prototype.reset=function(){this.joints.forEach((function(t){return t.remove()})),this.joints=[],void 0!==this.polyline&&(this.polyline.remove(),this.polyline=void 0),void 0!==this.previewLine&&(this.previewLine.remove(),this.previewLine=void 0),this.hidePreviewLine=!1,this.hideMouseElem=!1,this.popup&&this.popup.setContent("")},t.prototype.createJoint=function(t,e,n){var i=this,r=new Kr(this.modules.map,t,e,n);return r.on("mouseover",(function(){void 0===i.draggableJointIndex&&(i.requestUpdate(!0,!0),r.activateHover())})),r.on("mouseout",(function(){void 0===i.draggableJointIndex&&(i.requestUpdate(!1,!0),r.deactivateHover())})),r.on("dragstart",(function(){i.requestUpdate(!1,!0),i.draggableJointIndex=i.getJointIndexByReferer(r)})),r.on("dragend",(function(t){i.requestUpdate(!1,!0),i.draggableJointIndex=void 0,r.setPoint(t.lngLat),i.recalculate()})),r.on("click",(function(){var t=i.getJointIndexByReferer(r);void 0!==t&&(r.remove(),i.joints.splice(t,1),i.recalculate(),i.hidePreviewLine=!1,i.hideMouseElem=!1),i.popup&&i.popup.setContent("")})),r},t.prototype.addPointToEnd=function(t){var e=!0,n=0;if(this.joints.length>0){e=!1;var i=this.joints[this.joints.length-1];n=i.getDistance()+Object(s.a)(i.getPoint(),t)}var r=this.createJoint(t,e,n);this.joints.push(r)},t.prototype.drawPolyline=function(){var t=this;void 0!==this.polyline&&(this.polyline.remove(),this.polyline=void 0);var e=this.getPoints();if(!(e.length<2)){var n=Xr(e,!1,this.modules.map);n.on("mousemove",(function(e){if(void 0===t.draggableJointIndex){if(t.popup){var i=n.snapPoint(e.point),r=Vr(i.distance,!1,t.state.lang);t.popup.setPosition(i.point),t.popup.setContent(function(t,e){return'\n        <div style="text-shadow: 1px 0px 1px #fff, -1px 0px 1px #fff, 0px 1px 1px #fff, 0px -1px 1px #fff;\n            user-select: none;\n            color: #667799;\n            font-family: SuisseIntl, Helvetica, Arial, sans-serif;\n            font-size: 13px;\n            margin: -12px 0 0 12px; /** отступы от точки наведения */\n            white-space: nowrap;\n            cursor: pointer;\n        ">\n            '+t+"\n            <br>\n            "+function(t){return Wr.addPoint[t]||Wr.addPoint.en}(e)+"\n        </div>\n    "}(r,t.state.lang)),t.snapPoint=i.point}t.requestUpdate(!0,!1)}})),n.on("mouseout",(function(){void 0===t.draggableJointIndex&&(t.popup&&t.popup.setContent(""),t.requestUpdate(!1,!0))})),this.polyline=n}},t.prototype.requestUpdate=function(t,e){this.hidePreviewLine=t,this.hideMouseElem=e,this.needsUpdate=!0},t.prototype.getPreviewPoints=function(){var t=this.getPoints();if(this.hidePreviewLine||t.length<1)return[];var e=this.draggableJointIndex,n=Object(s.m)(Object(a.z)(this.state,this.mousePos));if(void 0===e||1===t.length)return[];if(e===this.joints.length-1)return[t[t.length-2],n];if(0===e)return[t[1],n];var i=this.joints[e-1],r=this.joints[e+1];return[i.getPoint(),n,r.getPoint()]},t.prototype.drawPreviewLine=function(){void 0!==this.previewLine&&(this.previewLine.remove(),this.previewLine=void 0);var t=this.getPreviewPoints();t.length<1||(this.previewLine=Xr(t,!0,this.modules.map))},t.prototype.drawMousePoint=function(){void 0!==this.mouseElem&&(this.mouseElem.remove(),this.mouseElem=void 0),this.hideMouseElem||void 0===this.snapPoint||(this.mouseElem=Yr(this.snapPoint,!0,!1,this.modules.map))},t}(),Qr=function(){function t(t,e,n){this.type=t,this.handler=n,this.mouseDownPoint=e,this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionstart",{target:"pitch/rotation"})}return t.prototype.processAction=function(t){switch(t.type){case"mousemove":return this.processMouseMoveAction(t);case"mouseup":return this.processMouseUpAction(t);case"keyup":return this.processKeyUpAction(t);default:return this}},t.prototype.processMouseMoveAction=function(t){var e=p(this.handler.container,t.clientX,t.clientY);return new $r(this.type,this.mouseDownPoint,e,this.handler)},t.prototype.processMouseUpAction=function(t){var e=this;switch(this.type){case"keyPrimary":if(0===t.button&&(t.ctrlKey||t.metaKey))return this.returnToInitialState();break;case"secondary":if(2===t.button){var n=p(this.handler.container,t.clientX,t.clientY);return this.handler.modules.identifier.search("contextmenu",n,!0).then((function(i){gt("contextmenu",i,t,n,e.handler.modules)})),this.returnToInitialState()}break;case"auxiliary":if(1===t.button)return this.returnToInitialState()}return this},t.prototype.processKeyUpAction=function(t){return"keyPrimary"!==this.type||"Control"!==t.key&&"Meta"!==t.key?this:(this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new to(this.mouseDownPoint,this.handler))},t.prototype.returnToInitialState=function(){return this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new co(this.handler)},t}(),$r=function(){function t(t,e,n,i){this.type=t,this.mouseDownPoint=e,this.mouseMovePoint=n,this.handler=i,this.handler.mapState.userHasInteracted=!0,this.handler.mapState.disablePitchByUserInteraction&&this.handler.mapState.disableRotationByUserInteraction||this.handler.container.classList.add("mapgl-rotating"),this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"mousemove":return this.processMouseMoveAction(t);case"mouseleave":return this.returnToInitialState();case"mouseup":return this.processMouseUpAction(t);case"keyup":return this.processKeyUpAction(t);default:return this}},t.prototype.update=function(t){0===this.mouseDownPoint[0]&&0===this.mouseDownPoint[1]&&(this.mouseDownPoint=this.mouseMovePoint);var e=Object(a.u)(t.size,this.mouseDownPoint),n=Object(a.u)(t.size,this.mouseMovePoint),i=(e[0]-n[0])*o.zoom.mouseRotateDelta,r=(n[1]-e[1])*o.zoom.mousePitchDelta;pt(t),t.disableRotationByUserInteraction||X(t,t.rotation+i,{animate:!1}),t.disablePitchByUserInteraction||Q(t,Object(a.d)(t.pitch+r,t.minPitch,t.maxPitch),{animate:!1}),this.mouseDownPoint=this.mouseMovePoint,t.needRerender=!0},t.prototype.processMouseMoveAction=function(t){return this.mouseMovePoint=p(this.handler.container,t.clientX,t.clientY),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processMouseUpAction=function(t){switch(this.type){case"keyPrimary":if(0===t.button&&(t.ctrlKey||t.metaKey))return this.returnToInitialState();break;case"secondary":if(2===t.button)return this.returnToInitialState();break;case"auxiliary":if(1===t.button)return this.returnToInitialState()}return this},t.prototype.processKeyUpAction=function(t){return"keyPrimary"!==this.type||"Control"!==t.key&&"Meta"!==t.key?this:(this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new to(this.mouseMovePoint,this.handler))},t.prototype.returnToInitialState=function(){return this.handler.mapState.userHasInteracted=!0,this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/rotation"}),new co(this.handler)},t}(),to=function(){function t(t,e){this.handler=e,this.toInitialOnMouseUp=!1,this.mouseDownPoint=t,this.dragStartPoint=t,this.isTimerStarted=void 0!==this.handler.dblClickTimer,this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionstart",{target:"center"}),this.isTimerStarted&&(window.clearTimeout(this.handler.dblClickTimer),this.handler.dblClickTimer=void 0)}return t.prototype.processAction=function(t){switch(t.type){case"mousedown":return this.toInitialOnMouseUp=!0,this;case"mouseup":return this.processMouseUpAction(t);case"mousemove":return this.processMouseMoveAction(t);case"click":return this.processMouseClickAction(t);case"keydown":return this.processKeyDownAction(t);default:return this}},t.prototype.processMouseUpAction=function(t){return 0!==t.button||!this.toInitialOnMouseUp&&this.handler.modules.layout.isActionWithCanvas(t)?this:(this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"center"}),new co(this.handler))},t.prototype.processMouseMoveAction=function(t){var e=p(this.handler.container,t.clientX,t.clientY);return O.f(this.mouseDownPoint,e)<o.events.dragThreshold?(this.dragStartPoint=e,this):new eo(e,this.dragStartPoint,this.handler)},t.prototype.processMouseClickAction=function(t){var e=this;if(!this.handler.modules.layout.isActionWithCanvas(t))return this;if(this.isTimerStarted){if(this.handler.mapState.zoom<this.handler.mapState.maxZoom){var n=this.handler.mapState,i=Math.min(n.zoom+1,n.maxZoom),r=p(this.handler.container,t.clientX,t.clientY);pt(n),et(n,i,{duration:o.zoom.animDuration,zoomPoint:r,blockBuildingAnimation:!0}),this.handler.mapState.needRerender=!0}}else{var a=p(this.handler.container,t.clientX,t.clientY);this.handler.modules.identifier.search("mouseClick",a,!0).then((function(n){var i=e.handler.modules.ruler;i.enabled?i.handleClick(a,n):e.handler.dblClickTimer||(e.handler.dblClickTimer=window.setTimeout((function(){gt("click",n,t,a,e.handler.modules),e.handler.dblClickTimer=void 0}),o.events.doubleClickTime))}))}return this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"center"}),new co(this.handler)},t.prototype.processKeyDownAction=function(t){return"Control"===t.key||"Meta"===t.key?(this.handler.modules.map.emit("interactionend",{target:"center"}),new Qr("keyPrimary",this.mouseDownPoint,this.handler)):this},t}(),eo=function(){function t(t,e,n){this.mouseMovePoint=t,this.dragStartPoint=e,this.handler=n,this.handler.container.classList.add("mapgl-dragging"),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"mousemove":return this.processMouseMoveAction(t);case"mouseup":return this.processMouseUpAction(t);case"keydown":return this.processKeyDownAction(t);default:return this}},t.prototype.update=function(t){var e=Object(a.z)(t,this.dragStartPoint),n=Object(a.z)(t,this.mouseMovePoint),i=c.b(t.center);c.a(i,i,e),c.r(i,i,n),pt(t),W(t,i,{animate:!1}),this.dragStartPoint=this.mouseMovePoint,t.needRerender=!0},t.prototype.processMouseMoveAction=function(t){return this.mouseMovePoint=p(this.handler.container,t.clientX,t.clientY),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processMouseUpAction=function(t){return 0===t.button?this.returnToInitialState():this},t.prototype.processKeyDownAction=function(t){return"Control"===t.key||"Meta"===t.key?(this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),new Qr("keyPrimary",this.mouseMovePoint,this.handler)):this},t.prototype.returnToInitialState=function(){return this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),this.handler.mapState.userHasInteracted=!0,new co(this.handler)},t}(),no=function(){function t(t,e,n){this.handler=n,this.touchStartPoints=e,this.touchMovePoints=t,this.handler.mapState.userHasInteracted=!0,this.handler.mapState.disablePitchByUserInteraction||this.handler.container.classList.add("mapgl-rotating"),this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction(t);default:return this}},t.prototype.processTouchStartAction=function(t){return this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/zoom/rotation"}),new oo(t,this.handler,!1)},t.prototype.processTouchMoveAction=function(t){return t.preventDefault(),this.touchMovePoints=m(t.touches,this.handler.container),this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processTouchEndAction=function(t){return this.handler.container.classList.remove("mapgl-rotating"),this.handler.modules.map.emit("interactionend",{target:"pitch/zoom/rotation"}),0===t.touches.length?(this.handler.mapState.userHasInteracted=!0,new co(this.handler)):new oo(t,this.handler,!1)},t}(),io=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.startPxAngle=0,r.rotationDetected=!1,n.length>1&&(r.startPxAngle=Object(u.b)(n[0],n[1])),r}return Object(x.c)(e,t),e.prototype.update=function(t){if(!(this.touchStartPoints.length<2||this.touchMovePoints.length<2)){var e=Object(u.e)(this.touchMovePoints[0],this.touchMovePoints[1]),n=O.e(this.touchMovePoints[0],this.touchMovePoints[1])/O.e(this.touchStartPoints[0],this.touchStartPoints[1]),i=t.zoom+Math.log(n)/Math.log(2)*o.zoom.mobilePinchDelta,r=0,s=0;if(!this.rotationDetected){var l=Object(u.b)(this.touchMovePoints[0],this.touchMovePoints[1]);(s=Math.abs(this.startPxAngle-l))>Math.PI&&(s=2*Math.PI-s),s>=this.handler.mapState.touchRotationThreshold&&(this.rotationDetected=!0)}if(this.rotationDetected){var d=Object(a.z)(t,this.touchStartPoints[0]),f=Object(a.z)(t,this.touchStartPoints[1]),h=Object(a.z)(t,this.touchMovePoints[0]),p=Object(a.z)(t,this.touchMovePoints[1]);d&&f&&h&&p&&(r=Object(u.b)(d,f)-Object(u.b)(h,p))}var m=t.rotation+r,v=c.d();c.a(v,t.center,Object(a.k)(t,e,{zoom:i,rotation:m})),pt(t),W(t,v,{animate:!1}),et(t,i,{animate:!1}),this.handler.mapState.disableRotationByUserInteraction||X(t,m,{animate:!1}),this.touchStartPoints=this.touchMovePoints,t.needRerender=!0}},e}(no),ro=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return Object(x.c)(e,t),e.prototype.update=function(t){var e=this.touchStartPoints.map((function(e){return Object(a.u)(t.size,e)})),n=this.touchMovePoints.map((function(e){return Object(a.u)(t.size,e)})),i=Object(u.e)(e[0],e[1]),r=(Object(u.e)(n[0],n[1])[1]-i[1])*o.zoom.mousePitchDelta;pt(t),Q(t,Object(a.d)(t.pitch+r,t.minPitch,t.maxPitch),{animate:!1}),this.touchStartPoints=this.touchMovePoints,t.needRerender=!0},e}(no),oo=function(){function t(t,e,n){this.handler=e,this.needClickOnTouchEnd=n,this.toZoomRotate=!1,this.touchStartPoints=m(t.touches,this.handler.container),this.handler.mapState.userHasInteracted=!0,this.isTimerStarted=void 0!==this.handler.dblClickTimer,v(t)?this.handler.modules.map.emit("interactionstart",{target:"pitch/zoom/rotation"}):this.isTimerStarted?(this.handler.modules.map.emit("interactionstart",{target:"zoom/rotation"}),window.clearTimeout(this.handler.dblClickTimer),this.handler.dblClickTimer=void 0):this.handler.modules.map.emit("interactionstart",{target:"center"})}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction(t);default:return this}},t.prototype.processTouchStartAction=function(t){return t.preventDefault(),1===this.touchStartPoints.length&&(this.needClickOnTouchEnd=!1,this.handler.modules.map.emit("interactionend",{target:"center"}),this.handler.modules.map.emit("interactionstart",{target:"pitch/zoom/rotation"}),this.handler.mapState.userHasInteracted=!0),this.touchStartPoints=m(t.touches,this.handler.container),this},t.prototype.processTouchMoveAction=function(t){var e=this;t.preventDefault();var n=m(t.touches,this.handler.container);if(!v(t))return O.f(this.touchStartPoints[0],n[0])<o.events.dragThreshold?(this.touchStartPoints=n,this):this.isTimerStarted?new so(n[0],this.touchStartPoints[0],this.handler):new ao(n[0],this.touchStartPoints[0],this.handler);if(this.touchStartPoints.length<2)return this.processTouchStartAction(t);var i=O.d(),r=O.d();O.p(i,n[0],this.touchStartPoints[0]),O.p(r,n[1],this.touchStartPoints[1]);var a=O.g(i,r);if(a>0){var s=O.f(this.touchStartPoints[0],n[0]),c=O.f(this.touchStartPoints[1],n[1]);return s<o.events.pitchThreshold||c<o.events.pitchThreshold?(this.touchStartPoints=n,this):this.handler.mapState.disablePitchByUserInteraction?this:new ro(n,this.touchStartPoints,this.handler)}return a<0?new io(n,this.touchStartPoints,this.handler):Object(u.k)(i)||Object(u.k)(r)?this.pitchWaitingTimer?this:this.toZoomRotate?(this.toZoomRotate=!1,new io(n,this.touchStartPoints,this.handler)):(this.pitchWaitingTimer=window.setTimeout((function(){e.toZoomRotate=!0,e.pitchWaitingTimer=void 0}),o.events.pitchWaitingTime),this):new io(n,this.touchStartPoints,this.handler)},t.prototype.processTouchEndAction=function(t){return t.cancelable&&t.preventDefault(),0===t.touches.length?1===t.changedTouches.length&&this.needClickOnTouchEnd?this.processTouchClickAction(this.touchStartPoints[0],t):(this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:t.changedTouches.length>1?"pitch/zoom/rotation":"center"}),new co(this.handler)):(v(t)||(this.handler.modules.map.emit("interactionend",{target:"pitch/zoom/rotation"}),this.handler.modules.map.emit("interactionstart",{target:"center"}),this.handler.mapState.userHasInteracted=!0),this.touchStartPoints=m(t.touches,this.handler.container),this)},t.prototype.processTouchClickAction=function(t,e){var n=this;if(this.isTimerStarted){if(this.handler.mapState.zoom<this.handler.mapState.maxZoom){var i=this.handler.mapState,r=Math.min(i.zoom+1,i.maxZoom),a=t;pt(i),et(i,r,{duration:o.zoom.animDuration,zoomPoint:a,blockBuildingAnimation:!0}),this.handler.mapState.needRerender=!0}}else if(this.handler.modules.layout.isActionWithCanvas(e))this.handler.modules.identifier.search("mouseClick",t,!0).then((function(i){var r=n.handler.modules.ruler;r.enabled?r.handleClick(t,i):n.handler.dblClickTimer||(n.handler.dblClickTimer=window.setTimeout((function(){gt("click",i,e,t,n.handler.modules),n.handler.dblClickTimer=void 0}),o.events.doubleClickTime))}));else{var s=e.changedTouches[0];e.target&&s&&e.target.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,clientX:s.clientX,clientY:s.clientY}))}return this.handler.mapState.userHasInteracted=!0,this.handler.modules.map.emit("interactionend",{target:"center"}),new co(this.handler)},t}(),ao=function(){function t(t,e,n){this.handler=n,this.touchMovePoint=t,this.touchStartPoint=e,this.handler.mapState.userHasInteracted=!0,this.handler.container.classList.add("mapgl-dragging"),this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction();default:return this}},t.prototype.update=function(t){var e=Object(a.z)(t,this.touchStartPoint),n=Object(a.z)(t,this.touchMovePoint),i=c.b(t.center);c.a(i,i,e),c.r(i,i,n),pt(t),W(t,i,{animate:!1}),this.touchStartPoint=this.touchMovePoint,t.needRerender=!0},t.prototype.processTouchStartAction=function(t){return this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),new oo(t,this.handler,!1)},t.prototype.processTouchMoveAction=function(t){t.preventDefault();var e=m(t.touches,this.handler.container);return this.touchMovePoint=e[0],this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processTouchEndAction=function(){return this.handler.container.classList.remove("mapgl-dragging"),this.handler.modules.map.emit("interactionend",{target:"center"}),this.handler.mapState.userHasInteracted=!0,new co(this.handler)},t}(),so=function(){function t(t,e,n){this.handler=n,this.mapHeight=n.mapState.size[1],this.startZoom=n.mapState.zoom,this.touchMovePointY=t[1],this.touchStartPoint=e,this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState)}return t.prototype.processAction=function(t){switch(t.type){case"touchstart":return this.processTouchStartAction(t);case"touchmove":return this.processTouchMoveAction(t);case"touchend":return this.processTouchEndAction();default:return this}},t.prototype.update=function(t){var e=this.touchMovePointY-this.touchStartPoint[1];if(0!==e){var n=e/this.mapHeight,i=Object(a.d)(this.startZoom+n*o.zoom.mobileTapDelta,t.minZoom,t.maxZoom),r=c.d();c.a(r,t.center,Object(a.k)(t,this.touchStartPoint,{zoom:i})),pt(t),W(t,r,{animate:!1}),et(t,i,{animate:!1}),t.needRerender=!0}},t.prototype.processTouchStartAction=function(t){return this.handler.modules.map.emit("interactionend",{target:"zoom/rotation"}),new oo(t,this.handler,!1)},t.prototype.processTouchMoveAction=function(t){t.preventDefault();var e=m(t.touches,this.handler.container);return this.touchMovePointY=e[0][1],this.handler.mapState.userHasInteracted=!0,this.update(this.handler.mapState),this},t.prototype.processTouchEndAction=function(){return this.handler.modules.map.emit("interactionend",{target:"zoom/rotation"}),this.handler.mapState.userHasInteracted=!0,new co(this.handler)},t}(),co=function(){function t(t){this.handler=t}return t.prototype.processAction=function(t){switch(t.type){case"mousedown":return this.processMouseDownAction(t);case"touchstart":return this.processTouchStartAction(t);default:return this}},t.prototype.processMouseDownAction=function(t){var e=p(this.handler.container,t.clientX,t.clientY);switch(t.button){case 0:return t.ctrlKey||t.metaKey?new Qr("keyPrimary",e,this.handler):new to(e,this.handler);case 1:return new Qr("auxiliary",e,this.handler);case 2:return new Qr("secondary",e,this.handler);default:return this}},t.prototype.processTouchStartAction=function(t){return t.preventDefault(),t.touches?new oo(t,this.handler,1===t.touches.length):this},t}(),lo=function(){function t(){}return t.prototype.processAction=function(){return this},t}(),uo=function(){function t(t,e){var n=this;this.preventDefault=function(t){t.preventDefault()},this.onMouseMove=function(t){n.dblClickTimer&&(n.dblClickTimer=void 0),n.switchState(t)},this.onTouchStart=function(t){n.modules.layout.isActionWithMap(t)&&n.switchState(t)},this.switchState=function(t){n.state,n.state=n.state.processAction(t)},this.state=new co(this),this.mapState=t,this.modules=e,this.container=e.layout.mapContainer,document.addEventListener("mouseup",this.switchState),document.addEventListener("keydown",this.switchState),document.addEventListener("keyup",this.switchState),document.addEventListener("mouseleave",this.switchState),document.addEventListener("mousemove",this.onMouseMove),this.container.addEventListener("click",this.switchState),this.container.addEventListener("mousedown",this.switchState),this.container.addEventListener("mouseout",this.switchState),document.addEventListener("touchstart",this.onTouchStart),document.addEventListener("touchend",this.switchState),document.addEventListener("touchmove",this.switchState),this.container.addEventListener("dragstart",this.preventDefault),this.container.addEventListener("drag",this.preventDefault),this.container.addEventListener("dragend",this.preventDefault),this.container.addEventListener("contextmenu",this.preventDefault)}return t.prototype.destroy=function(){document.removeEventListener("mouseup",this.switchState),document.removeEventListener("keydown",this.switchState),document.removeEventListener("keyup",this.switchState),document.removeEventListener("mouseleave",this.switchState),document.removeEventListener("mousemove",this.onMouseMove),this.container.removeEventListener("click",this.switchState),this.container.removeEventListener("mousedown",this.switchState),this.container.removeEventListener("mouseout",this.switchState),document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchend",this.switchState),document.removeEventListener("touchmove",this.switchState),this.container.removeEventListener("dragstart",this.preventDefault),this.container.removeEventListener("drag",this.preventDefault),this.container.removeEventListener("dragend",this.preventDefault),this.container.removeEventListener("contextmenu",this.preventDefault)},t.prototype.block=function(){return this.state instanceof lo||this.state instanceof co&&(this.state=new lo,!0)},t.prototype.unblock=function(){return this.state instanceof co||this.state instanceof lo&&(this.state=new co(this),!0)},t}(),fo=n(77),ho=n(96),po=n(27),mo=n(26),vo=n(41),_o=function(){function t(t,e){this.mapState=t,this.modules=e,this.enabled=!1,this.justEnabled=!1,this.isMetaLoading=!1,this.lastUpdateTime=-1/0,this.regionIds=new Set,this.gridState=Object(po.a)("traffic",0,o.traffic.minZoom,o.traffic.maxZoom,o.traffic.minZoom,o.traffic.maxDetailLevel,e,t),this.viewportDiffer=new vt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"}])}return t.prototype.show=function(){this.enabled||(this.enabled=!0,this.justEnabled=!0,this.modules.map.emit("trafficshow"))},t.prototype.hide=function(){this.enabled&&(Object(po.g)(this.gridState),this.enabled=!1,this.modules.map.emit("traffichide"))},t.prototype.isEnabled=function(){return this.enabled},t.prototype.destroy=function(){Object(po.g)(this.gridState)},t.prototype.redraw=function(){this.enabled&&(Object(po.g)(this.gridState),Object(fo.a)(this.gridState,this.mapState,Object(s.e)(this.mapState)))},t.prototype.update=function(){if(this.enabled&&(Object(a.i)(this.regionIds,this.mapState.shownRegionIds)||(this.regionIds=new Set(this.mapState.shownRegionIds),this.fetchMeta()),Date.now()-this.lastUpdateTime>o.traffic.updateInterval&&this.fetchMeta(),void 0!==this.timestamp)){(this.viewportDiffer.check(this.mapState)||this.justEnabled)&&(this.justEnabled=!1,Object(fo.a)(this.gridState,this.mapState,Object(s.e)(this.mapState)),this.mapState.needRerender=!0);var t=Object(x.a)({},this.gridState.displayedMods);Object(ho.a)(this.gridState,this.mapState,this.modules),this.fetch(Object(po.d)(this.gridState),this.timestamp),this.abortFetch(Object(po.c)(this.gridState)),this.generate(Object(po.e)(this.gridState)),this.clearTiles(Object(po.f)(this.gridState)),Object(po.h)(this.modules.tileManager,this.mapState,this.gridState,t)}},t.prototype.isIdle=function(){return Object(po.j)(this.gridState.tiles,this.gridState.viewportTiles)},t.prototype.fetch=function(t,e){var n=this;t.sort((function(t,e){return Object(Ti.a)(n.mapState.center,t,e)})).forEach((function(t){return function(t,e,n,i,r){i.size&&e.workers.parser.fetchTrafficTile({coords:t.coords,tileServer:n.trafficServer,tileProtocol:n.trafficProtocol||n.tileProtocol,regionIds:Array.from(i),timestamp:r}).then((function(){t.status===mo.a.Loading&&(t.serverMetadata=[{regionId:0,metatileHash:-2}])}))}(t,n.modules,n.mapState,n.regionIds,e)}))},t.prototype.abortFetch=function(t){var e=this;t.forEach((function(t){return e.modules.workers.parser.abortTrafficTileRequest(t.key)}))},t.prototype.generate=function(t){var e=this;t.sort((function(t,n){return Object(Ti.a)(e.mapState.center,t,n)})).forEach((function(t){var n=Object(mo.g)(t);n&&e.modules.workers.parser.generateTrafficTile({styleId:e.mapState.handyStyleId,coords:t.coords,pixelRatio:window.devicePixelRatio,styleState:e.mapState.styleState}).then((function(t){var e=t.results;return Object(vo.a)(n,e)}))}))},t.prototype.clearTiles=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];this.modules.workers.parser.deleteTrafficTile(i.key),delete this.gridState.tiles[i.key]}},t.prototype.fetchMeta=function(){var t=this;if(!this.isMetaLoading&&this.regionIds.size){this.isMetaLoading=!0;var e=this.mapState,n=Object(a.J)(o.traffic.timestampUrl,{host:e.trafficServer,protocol:e.trafficProtocol||e.tileProtocol,regions:Array.from(this.regionIds).join(",")});fetch(n).then((function(t){if(t.ok)return t.json();throw new Error("Request traffic timestamp error with status "+t.status)})).then((function(e){var n,i;if(!e.length||void 0===(null===(n=e[0])||void 0===n?void 0:n.time)||void 0===(null===(i=e[0])||void 0===i?void 0:i.score))throw new Error("Bad traffic timestamp and score response "+e);var r=0;e.forEach((function(t){return r+=t.score})),r=Math.round(r/e.length),t.modules.map.emit("trafficscore",{score:r}),t.timestamp=e[0].time,t.isMetaLoading=!1,t.lastUpdateTime=Date.now(),t.redraw()})).catch((function(t){return console.error(t)}))}},t}(),yo=function(){function t(t){this.externalContainer=t,this.rootContainer=document.createElement("div"),this.rootContainer.style.position="relative",this.rootContainer.style.height="100%",this.rootContainer.style.width="100%",this.rootContainer.style.overflow="hidden",this.externalContainer.appendChild(this.rootContainer),this.mapContainer=document.createElement("div"),this.mapContainer.style.position="relative",this.mapContainer.style.height="100%",this.mapContainer.style.width="100%",this.mapContainer.style.touchAction="none",this.mapContainer.style.webkitUserSelect="none",this.mapContainer.style.userSelect="none",this.rootContainer.appendChild(this.mapContainer),this.canvas=document.createElement("canvas"),this.mapContainer.appendChild(this.canvas),this.htmlContainerInMap=document.createElement("div"),this.htmlContainerInMap.style.position="absolute",this.htmlContainerInMap.style.left="0",this.htmlContainerInMap.style.top="0",this.htmlContainerInMap.style.width="100%",this.htmlContainerInMap.style.height="0",this.htmlContainerInMap.style.webkitUserSelect="auto",this.htmlContainerInMap.style.userSelect="auto",this.mapContainer.appendChild(this.htmlContainerInMap),this.htmlContainerOutMap=document.createElement("div"),this.htmlContainerOutMap.style.position="absolute",this.htmlContainerOutMap.style.left="0",this.htmlContainerOutMap.style.top="0",this.htmlContainerOutMap.style.width="100%",this.htmlContainerOutMap.style.height="0",this.mapContainer.after(this.htmlContainerOutMap)}return t.prototype.setCanvasSize=function(t,e){var n=window.devicePixelRatio;return this.canvas.width=t*n,this.canvas.height=e*n,this.canvas.style.width=t+"px",this.canvas.style.height=e+"px",this},t.prototype.destroy=function(){for(;this.externalContainer.lastChild;)this.externalContainer.removeChild(this.externalContainer.lastChild)},t.prototype.isActionWithCanvas=function(t){return t.target===this.canvas},t.prototype.isActionWithMap=function(t){var e=this;return t instanceof MouseEvent||t instanceof KeyboardEvent?this.isTargetInMap(t.target):Array.from(t.touches).map((function(t){return t.target})).some((function(t){return e.isTargetInMap(t)}))},t.prototype.isTargetInMap=function(t){return!!(t&&t instanceof Node)&&this.mapContainer.contains(t)},t}(),go=n(11);function bo(){var t=new go.a(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function xo(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function wo(){var t=new go.a(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}le.b,le.g,le.c,le.l,le.a,le.k,le.d,le.i,le.h,le.m,le.j;var So=(le.f,le.e,c.d(),c.i(1,0,0),c.i(0,1,0),wo(),wo(),bo(),function(){function t(){this.children=[],this.parent=null,this.visible=!0,this.scale=c.i(1,1,1),this.position=c.d(),this.quaternion=wo(),this.localMatrix=Ft.b(),this.worldMatrix=Ft.b(),this.worldMatrixNeedsUpdate=!1,this.type=12}return t.prototype.add=function(t){return t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),this},t.prototype.remove=function(t){var e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1)),this},t.prototype.render=function(){return this.visible?(this.worldMatrixNeedsUpdate&&this.updateWorldMatrix(),this):this},t.prototype.updateLocalMatrix=function(){return Ft.c(this.localMatrix,this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0,this},t.prototype.updateWorldMatrix=function(){return this.parent?Ft.g(this.worldMatrix,this.parent.worldMatrix,this.localMatrix):Ft.a(this.worldMatrix,this.localMatrix),this.children.forEach((function(t){return t.updateWorldMatrix()})),this.worldMatrixNeedsUpdate=!1,this},t.prototype.getWorldPosition=function(){return c.i(this.worldMatrix[12],this.worldMatrix[13],this.worldMatrix[14])},t.prototype.traverse=function(t){return t(this),this.children.forEach((function(e){return e.traverse(t)})),this},t.prototype.traverseVisible=function(t){return this.visible?(t(this),this.children.forEach((function(e){return e.traverseVisible(t)})),this):this},t.prototype.typifyForRender=function(t){return this.visible?(t[17].addObject(this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this},t}()),Io=function(t){function e(e){var n=t.call(this)||this;return n.color=e,n}return Object(x.c)(e,t),e}(So),jo=(function(t){Object(x.c)((function(e){var n=t.call(this,e)||this;return n.type=3,n}),t)}(Io),{texture:"USE_TEXTURE",directionLights:"DIR_LIGHT_NUM"}),Oo={},Mo=function(){function t(){this._attributes=[],this._uniforms=[{name:"uColorAlpha",type:"1f"}],this._definitions=[],this._shader=null,this.opacity=1}return t.prototype.enable=function(t){return this._shaderProgram||this._prepare(t),this._shaderProgram.enable(t.gl),this._shaderProgramBind(t),this},t.prototype.disable=function(t){return this._shaderProgram&&this._shaderProgram.disable(t),this},t.prototype.define=function(t,e){return jo[t]&&this._definitions.push({type:jo[t],value:e}),this},t.prototype.typifyForRender=function(t,e){1===this.opacity?t[13].addObject(e):t[14].addObject(e)},t.prototype._getCachedProgramKey=function(){var t=this.constructor.name;return this._definitions.forEach((function(e){t+=":"+e.type+":"+(e.value||"")})),t},t.prototype._getCachedProgram=function(){return Oo[this._getCachedProgramKey()]},t.prototype._prepare=function(t){var e=this._getCachedProgram();e&&t===e.glContext?this._shaderProgram=e.program:(this._shaderProgram=new li({vertex:new vi("vertex",this._shader.vertex,this._definitions),fragment:new vi("fragment",this._shader.fragment,this._definitions),uniforms:this._uniforms,attributes:this._attributes}),Oo[this._getCachedProgramKey()]={glContext:t,program:this._shaderProgram})},t.prototype._shaderProgramBind=function(t){var e=t.gl,n=t.object,i={};this._attributes.forEach((function(t){i[t.name]=n.geometry.getBuffer(t.name)}));var r={uColorAlpha:this.opacity};this._shaderProgram.bind(e,r,i)},t}(),Po={fragment:"\nprecision mediump float;\n\nuniform float uColorAlpha;\nvarying vec3 vColor;\n\nvoid main(void) {\n    gl_FragColor = vec4(vColor.rgb, uColorAlpha);\n}\n",vertex:"\nattribute vec3 position;\n\nuniform mat4 uPosition;\nuniform mat4 uCamera;\nuniform vec3 uColor;\nuniform vec3 uEmissive;\n\nvarying vec3 vColor;\n\nvoid main(void) {\n    vColor = uColor;\n\n    gl_Position = uCamera * uPosition * vec4(position, 1.0);\n}\n"},Lo=(function(t){function e(){var e=t.call(this)||this;return e._attributes=[{name:"position"}],e._uniforms=[{name:"uColorAlpha",type:"1f"},{name:"uCamera",type:"mat4"},{name:"uPosition",type:"mat4"},{name:"uColor",type:"3fv"}],e._shader=Po,e.color=[0,0,0],e.type=5,e}Object(x.c)(e,t),e.prototype._shaderProgramBind=function(t){var e=t.gl,n=t.object,i=t.camera,r={};this._attributes.forEach((function(t){r[t.name]=n.geometry.getBuffer(t.name)}));var o={uColorAlpha:this.opacity,uPosition:new Float32Array(n.worldMatrix),uCamera:new Float32Array(i.modelViewMatrix),uColor:this.color};this._shaderProgram.bind(e,o,r)}}(Mo),function(t){function e(e,n){var i=t.call(this,e,n)||this;return i._array=e,i.length=e.length/i.options.itemSize,i}return Object(x.c)(e,t),e.prototype.getArray=function(){return this._array},e.prototype.getElement=function(t){return this._array.subarray(t*this.options.itemSize,(t+1)*this.options.itemSize)},e.prototype.getTriangle=function(t){return t*=3,[this.getElement(t),this.getElement(t+1),this.getElement(t+2)]},e.prototype.concat=function(t){var e=t.getArray(),n=new this._array.constructor(this._array.length+e.length);return n.set(this._array,0),n.set(e,this._array.length),this._array=n,this.length=n.length/this.options.itemSize,this},e}(Pn.a)),To=function(){function t(t,e){this.min=t||c.d(),this.max=e||c.d()}return t.prototype.containsPoint=function(t){return t[0]>this.min[0]&&t[0]<this.max[0]&&t[1]>this.min[1]&&t[1]<this.max[1]&&t[2]>this.min[2]&&t[2]<this.max[2]},t.prototype.expandByPoint=function(t){return c.m(this.min,this.min,t),c.l(this.max,this.max,t),this},t}(),ko=(function(t){function e(){var e=t.call(this)||this;return e.type=13,e}Object(x.c)(e,t),e.prototype.render=function(t){var e=t.gl;return e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.frontFace(e.CCW),e.cullFace(e.BACK),e.enable(e.CULL_FACE),e.disable(e.BLEND),t.renderer.sortObjects&&this._objects.sort(this._renderOrderSort),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this},e.prototype._renderOrderSort=function(t,e){return t.renderOrder-e.renderOrder}}(Tt),{fragment:"\nprecision mediump float;\n\n#ifdef USE_TEXTURE\n    uniform sampler2D uTexture;\n    varying vec2 vTextureCoord;\n    varying float vTextureEnable;\n#endif\n\nuniform float uColorAlpha;\nvarying vec3 vLightWeighting;\nvarying vec3 vColor;\nvarying vec3 vEmissive;\n\nvoid main(void) {\n    vec4 color = vec4(vColor.rgb, uColorAlpha);\n\n    #ifdef USE_TEXTURE\n        if (vTextureEnable > 0.5) {\n            vec4 textureColor = texture2D(uTexture, vec2(vTextureCoord.s, vTextureCoord.t));\n            color = vec4(textureColor.rgb * color.rgb, color.a);\n        }\n    #endif\n\n    gl_FragColor = vec4(color.rgb * vLightWeighting + vEmissive, color.a);\n}\n",vertex:"\nattribute vec3 position;\nattribute vec3 color;\nattribute vec3 emissive;\n\n#ifdef USE_TEXTURE\n    attribute vec2 texture;\n    attribute float textureEnable;\n    varying vec2 vTextureCoord;\n    varying float vTextureEnable;\n#endif\n\n#if DIR_LIGHT_NUM > 0\n    attribute vec3 normal;\n    uniform vec3 uDirectionLightColors[DIR_LIGHT_NUM];\n    uniform vec3 uDirectionLightPositions[DIR_LIGHT_NUM];\n    uniform mat3 uNormalMatrix;\n#endif\n\nuniform mat4 uPosition;\nuniform vec3 uAmbientLightColor;\nuniform mat4 uCamera;\n\nvarying vec3 vColor;\nvarying vec3 vEmissive;\nvarying vec3 vLightWeighting;\n\nvoid main(void) {\n    vColor = color;\n    vEmissive = emissive;\n\n    #ifdef USE_TEXTURE\n        vTextureCoord = texture;\n        vTextureEnable = textureEnable;\n    #endif\n\n    vec3 vLightTemp = vec3(0.0);\n\n    #if DIR_LIGHT_NUM > 0\n        vec3 transformedNormal = uNormalMatrix * normal;\n\n        for(int i = 0; i < DIR_LIGHT_NUM; i++) {\n            float dotProduct = dot(transformedNormal, uDirectionLightPositions[i]);\n            vec3 directionalLightWeighting = vec3(max(dotProduct, 0.0));\n            vLightTemp += uDirectionLightColors[i] * directionalLightWeighting;\n        }\n    #endif\n\n    vLightWeighting = uAmbientLightColor + vLightTemp;\n\n    gl_Position = uCamera * uPosition * vec4(position, 1.0);\n}\n"}),zo=(function(t){function e(){var e=t.call(this)||this;return e._attributes=[{name:"position"},{name:"color"},{name:"emissive"}],e._uniforms=[{name:"uColorAlpha",type:"1f"},{name:"uCamera",type:"mat4"},{name:"uPosition",type:"mat4"},{name:"uAmbientLightColor",type:"3fv"}],e._shader=ko,e._texture=null,e.type=6,e}Object(x.c)(e,t),e.prototype.setTexture=function(t){return this._texture=t,this},e.prototype.getTexture=function(){return this._texture},e.prototype._prepare=function(e){this._enableLight(e),this._texture&&this._enableTexture(),t.prototype._prepare.call(this,e)},e.prototype._enableLight=function(t){var e=t.scene,n=0;e.getLights().forEach((function(t){4===t.type&&n++})),this.define("directionLights",n),n>0&&(this._attributes.push({name:"normal"}),this._uniforms.push({name:"uDirectionLightColors",type:"3fv"},{name:"uDirectionLightPositions",type:"3fv"},{name:"uNormalMatrix",type:"mat3"}))},e.prototype._enableTexture=function(){this.define("texture"),this._attributes.push({name:"texture"},{name:"textureEnable"}),this._uniforms.push({name:"uTexture",type:"1i"})},e.prototype._shaderProgramBind=function(t){var e=t.gl,n=t.scene,i=t.camera,r=t.object,o={},a={};this._texture&&(this._texture.enable(e,0),o.uTexture=0);var s,l,u,d,f,h,p,m,v,_,y,g,b,x,w,S=n.getLights();if(S.length){var I=[],j=[];if(S.forEach((function(t){if(3===t.type)o.uAmbientLightColor=t.color;else if(4===t.type){I=I.concat(t.color);var e=c.d();c.o(e,t.position,-1),j=j.concat(Array.prototype.slice.call(e))}})),I.length&&j.length){var O=bo();xo(O,r.worldMatrix),s=O,u=(l=O)[0],d=l[1],f=l[2],h=l[3],p=l[4],m=l[5],v=l[6],_=l[7],(w=u*(g=(y=l[8])*p-m*_)+d*(b=-y*h+m*v)+f*(x=_*h-p*v))&&(w=1/w,s[0]=g*w,s[1]=(-y*d+f*_)*w,s[2]=(m*d-f*p)*w,s[3]=b*w,s[4]=(y*u-f*v)*w,s[5]=(-m*u+f*h)*w,s[6]=x*w,s[7]=(-_*u+d*v)*w,s[8]=(p*u-d*h)*w),function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8]}(O,O),o.uNormalMatrix=new Float32Array(O),a.normal=r.geometry.getBuffer("normal")}o.uDirectionLightColors=new Float32Array(I),o.uDirectionLightPositions=new Float32Array(j)}this._attributes.forEach((function(t){"normal"!==t.name&&(a[t.name]=r.geometry.getBuffer(t.name))})),o.uPosition=new Float32Array(r.worldMatrix),o.uCamera=new Float32Array(i.modelViewMatrix),o.uColorAlpha=this.opacity,this._shaderProgram.bind(e,o,a)}}(Mo),function(t){Object(x.c)((function(e){var n=t.call(this,e)||this;return n.type=4,n}),t)}(Io),function(){function t(t,e){this.normal=t||c.d(),this.constant=e||0}return t.prototype.distanceToPoint=function(t){return c.g(this.normal,t)+this.constant},t.prototype.setComponents=function(t,e,n,i){return c.q(this.normal,t,e,n),this.constant=i,this},t.prototype.normalize=function(){var t=1/c.j(this.normal);return c.o(this.normal,this.normal,t),this.constant*=t,this},t}()),Co=(function(){function t(t){this.planes=t,this.planes&&6===this.planes.length||(this.planes=[new zo,new zo,new zo,new zo,new zo,new zo]),this._v1=c.d(),this._v2=c.d()}t.prototype.setFromMatrix=function(t){var e=this.planes;return e[0].setComponents(t[3]-t[0],t[7]-t[4],t[11]-t[8],t[15]-t[12]).normalize(),e[1].setComponents(t[3]+t[0],t[7]+t[4],t[11]+t[8],t[15]+t[12]).normalize(),e[2].setComponents(t[3]+t[1],t[7]+t[5],t[11]+t[9],t[15]+t[13]).normalize(),e[3].setComponents(t[3]-t[1],t[7]-t[5],t[11]-t[9],t[15]-t[13]).normalize(),e[4].setComponents(t[3]-t[2],t[7]-t[6],t[11]-t[10],t[15]-t[14]).normalize(),e[5].setComponents(t[3]+t[2],t[7]+t[6],t[11]+t[10],t[15]+t[14]).normalize(),this},t.prototype.intersectsBox=function(t){for(var e=this._v1,n=this._v2,i=this.planes,r=t.min,o=t.max,a=0;a<6;a++){var s=i[a],c=s.normal;e[0]=c[0]>0?r[0]:o[0],n[0]=c[0]>0?o[0]:r[0],e[1]=c[1]>0?r[1]:o[1],n[1]=c[1]>0?o[1]:r[1],e[2]=c[2]>0?r[2]:o[2],n[2]=c[2]>0?o[2]:r[2];var l=s.distanceToPoint(e),u=s.distanceToPoint(n);if(l<0&&u<0)return!1}return!0}}(),function(){function t(){this.buffers={},this._boundingBox=null}return t.prototype.setBuffer=function(t,e){return this.buffers[t]=e,this},t.prototype.getBuffer=function(t){return this.buffers[t]},t.prototype.computeNormals=function(){var t=this.buffers.position;if(!t)return this;for(var e=new Float32Array(t.length*t.options.itemSize),n=c.d(),i=c.d(),r=c.d(),o=0;o<t.length;o+=3){var a=t.getTriangle(o/3);c.r(n,a[0],a[1]),c.r(i,a[2],a[1]),c.e(r,n,i),c.n(r,r),e.set(r,3*o),e.set(r,3*(o+1)),e.set(r,3*(o+2))}return this.setBuffer("normal",new Lo(e,{itemSize:3})),this},t.prototype.getBoundingBox=function(){return this._boundingBox||this.computeBoundingBox(),this._boundingBox},t.prototype.computeBoundingBox=function(){var t=this._boundingBox=new To,e=this.buffers.position;if(e)for(var n=0;n<e.length;n++)t.expandByPoint(e.getElement(n))},t.prototype.concat=function(t){for(var e in this.buffers)this.buffers[e].concat(t.buffers[e])},t}());!function(t){function e(e,n){var i=t.call(this)||this;return i.geometry=e,i.material=n,i.renderOrder=0,i.type=9,i}Object(x.c)(e,t),e.prototype.render=function(t){var e=t.gl;return this.visible?(this.worldMatrixNeedsUpdate&&this.updateWorldMatrix(),t.object=this,this.material.enable(t),e.drawArrays(e.TRIANGLES,0,this.geometry.getBuffer("position").length),this.material.disable(e),this):this},e.prototype.typifyForRender=function(t){return this.visible?(this.material.typifyForRender(t,this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this}}(So),function(){function t(t,e){this.start=t||c.d(),this.end=e||c.d()}t.prototype.closestPointToPointParameter=function(t,e){var n=c.d(),i=c.d();c.r(n,t,this.start),c.r(i,this.end,this.start);var r,o=c.g(i,i),a=c.g(i,n)/o;return e&&(a=(r=a)<0?0:r>1?1:r),a},t.prototype.closestPointToPoint=function(t,e,n){var i=this.closestPointToPointParameter(t,e),r=n||c.d();return r=this.delta(r),c.o(r,r,i),c.a(r,r,this.start),r},t.prototype.delta=function(t){var e=t||c.d();return c.r(e,this.end,this.start),e}}(),function(t){function e(e,n){var i=t.call(this)||this;return i.material=n,i.type=11,i._initArrays(e),i._initGeometry(),i}Object(x.c)(e,t),e.prototype.setOpacity=function(t,e){var n=this._data.colorAlpha.array,i=6*t;return n[i]=e,n[i+1]=e,n[i+2]=e,n[i+3]=e,n[i+4]=e,n[i+5]=e,this._data.colorAlpha.dirty=!0,this},e.prototype.setPosition=function(t,e){var n=this._data.position.array,i=18*t;return n[i]=e[0],n[i+1]=e[1],n[i+3]=e[0],n[i+4]=e[1],n[i+6]=e[0],n[i+7]=e[1],n[i+9]=e[0],n[i+10]=e[1],n[i+12]=e[0],n[i+13]=e[1],n[i+15]=e[0],n[i+16]=e[1],this._data.position.dirty=!0,this},e.prototype.setElevation=function(t,e){var n=this._data.position.array,i=18*t;return n[i+2]=e,n[i+5]=e,n[i+8]=e,n[i+11]=e,n[i+14]=e,n[i+17]=e,this._data.position.dirty=!0,this},e.prototype.setSize=function(t,e){var n=this._data.scale.array,i=12*t;return n[i]=e[0],n[i+1]=e[1],n[i+2]=e[0],n[i+3]=e[1],n[i+4]=e[0],n[i+5]=e[1],n[i+6]=e[0],n[i+7]=e[1],n[i+8]=e[0],n[i+9]=e[1],n[i+10]=e[0],n[i+11]=e[1],this._data.scale.dirty=!0,this},e.prototype.setOffset=function(t,e){var n=this._data.offset.array,i=12*t;return n[i]=e[0],n[i+1]=e[1],n[i+2]=e[0],n[i+3]=e[1],n[i+4]=e[0],n[i+5]=e[1],n[i+6]=e[0],n[i+7]=e[1],n[i+8]=e[0],n[i+9]=e[1],n[i+10]=e[0],n[i+11]=e[1],this._data.offset.dirty=!0,this},e.prototype.setUV=function(t,e){var n=this._data.texture.array,i=12*t;return n[i]=e[2],n[i+1]=1-e[3],n[i+2]=e[2],n[i+3]=1-e[1],n[i+4]=e[0],n[i+5]=1-e[3],n[i+6]=e[0],n[i+7]=1-e[1],n[i+8]=e[0],n[i+9]=1-e[3],n[i+10]=e[2],n[i+11]=1-e[1],this._data.texture.dirty=!0,this},e.prototype.render=function(t){var e=t.gl,n=t.shaderProgram,i=this._geometry;for(var r in n.bind(e,null,{texture:i.getBuffer("texture"),position:i.getBuffer("position"),colorAlpha:i.getBuffer("colorAlpha"),scale:i.getBuffer("scale"),offset:i.getBuffer("offset"),disposition:i.getBuffer("disposition")}),this._data)this._data[r].dirty&&(this._geometry.getBuffer(r).subData(e,0,this._data[r].array),this._data[r].dirty=!1);return this.material.enable(t),e.drawArrays(e.TRIANGLES,0,this._geometry.getBuffer("disposition").length),this.material.disable(),this},e.prototype.typifyForRender=function(t){return this.visible&&this.material.getTexture()?(t[16].addObject(this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this},e.prototype._initArrays=function(t){var e=t.length,n=[.5,-.5,0,.5,.5,0,-.5,-.5,0,-.5,.5,0,-.5,-.5,0,.5,.5,0],i=new Float32Array(18*e),r=new Float32Array(12*e),o=new Float32Array(18*e),a=new Float32Array(12*e),s=new Float32Array(12*e),c=new Float32Array(6*e);this._data={disposition:{array:i,dirty:!1},texture:{array:r,dirty:!1},position:{array:o,dirty:!1},scale:{array:a,dirty:!1},offset:{array:s,dirty:!1},colorAlpha:{array:c,dirty:!1}};for(var l=0;l<e;l++){var u=t[l];i.set(n,18*l),this.setUV(l,u.uv||[0,0,1,1]),this.setSize(l,u.size||[0,0]),this.setOffset(l,u.offset||[0,0]),this.setOpacity(l,void 0!==u.opacity?u.opacity:1),this.setPosition(l,u.position),this.setElevation(l,u.elevation||0)}},e.prototype._initGeometry=function(){this._geometry=new Co;var t=new Lo(this._data.texture.array,{itemSize:2});t.drawType=Lo.DynamicDraw;var e=new Lo(this._data.position.array,{itemSize:3});e.drawType=Lo.DynamicDraw;var n=new Lo(this._data.scale.array,{itemSize:2});n.drawType=Lo.DynamicDraw;var i=new Lo(this._data.offset.array,{itemSize:2});i.drawType=Lo.DynamicDraw;var r=new Lo(this._data.colorAlpha.array,{itemSize:1});r.drawType=Lo.DynamicDraw;var o=new Lo(this._data.disposition.array,{itemSize:3});this._geometry.setBuffer("disposition",o).setBuffer("texture",t).setBuffer("position",e).setBuffer("scale",n).setBuffer("offset",i).setBuffer("colorAlpha",r)}}(So),function(){function t(){this.smoothing=1,this._texture=null,this.type=8}t.prototype.setTexture=function(t){return this._texture=t,this},t.prototype.getTexture=function(){return this._texture},t.prototype.enable=function(t){var e=t.gl;t.shaderProgram.bind(e,{uSmoothing:this.smoothing}),this._texture&&this._texture.enable(e)},t.prototype.disable=function(){}}(),function(t){function e(){var e=t.call(this)||this;return e._shaderProgram=new li({vertex:new vi("vertex","\nattribute vec2 disposition;\nattribute vec2 texture;\n\nattribute vec3 position;\nattribute vec2 scale;\nattribute vec2 offset;\nattribute float colorAlpha;\n\nuniform float uSmoothing;\nuniform mat4 uPCamera;\nuniform vec2 uHalfSize;\n\nvarying vec2 vTextureCoord;\nvarying float vColorAlpha;\n\nvoid main(void) {\n    vTextureCoord = texture;\n    vColorAlpha = colorAlpha;\n\n    vec2 alignedPosition = disposition * scale;\n    alignedPosition += offset;\n    alignedPosition /= uHalfSize;\n\n    vec4 ndcPosition = uPCamera * vec4(position, 1.0);\n    ndcPosition.xyz = ndcPosition.xyz / ndcPosition.w;\n    ndcPosition.w = 1.0;\n    ndcPosition.xy += alignedPosition.xy;\n\n    vec2 roundedPosition = floor((ndcPosition.xy + 1.0) * uHalfSize.xy + 0.5) / uHalfSize.xy - 1.0;\n    vec2 roundingDelta = roundedPosition - ndcPosition.xy;\n\n    if (vColorAlpha == 0.0) {\n        ndcPosition.xy = vec2(-2.0, -2.0);\n    } else {\n        ndcPosition.xy = ndcPosition.xy + roundingDelta * uSmoothing;\n    }\n\n    gl_Position = ndcPosition;\n}\n"),fragment:new vi("fragment","\nprecision mediump float;\n\nuniform sampler2D uTexture;\n\nvarying vec2 vTextureCoord;\nvarying float vColorAlpha;\n\nvoid main(void) {\n    vec4 textureColor = texture2D(uTexture, vec2(vTextureCoord.s, vTextureCoord.t));\n\n    gl_FragColor = textureColor * vColorAlpha;\n}\n"),uniforms:[{name:"uPCamera",type:"mat4"},{name:"uHalfSize",type:"2f"},{name:"uTexture",type:"1i"},{name:"uSmoothing",type:"1f"}],attributes:[{name:"disposition"},{name:"texture"},{name:"position"},{name:"colorAlpha"},{name:"scale"},{name:"offset"}]}),e.type=16,e}Object(x.c)(e,t),e.prototype.render=function(t){var e=t.gl,n=t.camera,i=t.renderer.getSize();return t.shaderProgram=this._shaderProgram,e.disable(e.DEPTH_TEST),e.enable(e.BLEND),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this._shaderProgram.enable(e).bind(e,{uPCamera:new Float32Array(n.modelViewMatrix),uHalfSize:[i[0]/2,i[1]/2],uTexture:0}),e.activeTexture(e.TEXTURE0),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this._shaderProgram.disable(e),this}}(Tt);var Eo=function(t){function e(){var e=t.call(this)||this;return e.up=c.i(0,1,0),e.projectionMatrix=Ft.b(),e.modelViewMatrix=Ft.b(),e.worldInverseMatrix=Ft.b(),e._mat3=bo(),e._mat4a=Ft.b(),e._mat4b=Ft.b(),e}return Object(x.c)(e,t),e.prototype.updateProjectionMatrix=function(){},e.prototype.updateWorldMatrix=function(){t.prototype.updateWorldMatrix.call(this),Ft.e(this.worldInverseMatrix,this.worldMatrix),Ft.h(this.modelViewMatrix,this.projectionMatrix,this.worldInverseMatrix)},e.prototype.project=function(t){var e=c.d();return c.t(e,t,this.modelViewMatrix),e},e.prototype.unproject=function(t){var e=this._mat4a,n=this._mat4b,i=c.d();return Ft.e(n,this.projectionMatrix),Ft.g(e,this.worldMatrix,n),c.t(i,t,e),i},e.prototype.lookAt=function(t){var e=this._mat4a,n=this._mat3;return Ft.f(e,this.position,t,this.up),Ft.m(e,e),xo(n,e),function(t,e){var n,i=e[0]+e[4]+e[8];if(i>0)n=Math.sqrt(i+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*a+a]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[a]=(e[3*a+r]+e[3*r+a])*n}}(this.quaternion,n),this},e}(So),Ao=(function(t){function e(e,n,i,r,o,a){var s=t.call(this)||this;return s.left=e,s.right=n,s.top=i,s.bottom=r,s.near=o,s.far=a,s.type=1,s}Object(x.c)(e,t),e.prototype.updateProjectionMatrix=function(){Ft.i(this.projectionMatrix,this.left,this.right,this.bottom,this.top,this.near,this.far)}}(Eo),function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.fov=e,o.aspect=n,o.near=i,o.far=r,o.type=2,o}Object(x.c)(e,t),e.prototype.updateProjectionMatrix=function(){Ft.j(this.projectionMatrix,this.fov*Math.PI/180,this.aspect,this.near,this.far)}}(Eo),function(t){function e(){var e=t.call(this)||this;return e._lights=[],e}Object(x.c)(e,t),e.prototype.addLight=function(t){return this._lights.push(t),this},e.prototype.getLights=function(){return this._lights}}(So),function(t){function e(e){var n=t.call(this)||this;return n.material=e,n.offset=O.d(),n.type=10,n}Object(x.c)(e,t),e.prototype.render=function(t){if(!this.visible||!this.material.getTexture())return this;this.worldMatrixNeedsUpdate&&this.updateWorldMatrix();var e=t.gl;return t.object=this,this.material.enable(t),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),this.material.disable(t.gl),this},e.prototype.typifyForRender=function(t){return this.visible?(t[15].addObject(this),this.children.forEach((function(e){return e.typifyForRender(t)})),this):this}}(So),function(){function t(){this.opacity=1,this.smoothing=0,this._texture=null,this.type=7}t.prototype.setTexture=function(t){return this._texture=t,this},t.prototype.getTexture=function(){return this._texture},t.prototype.enable=function(t){var e=t.gl,n=t.object,i=t.shaderProgram,r=t.renderer.getSize();i.bind(e,{uColorAlpha:this.opacity,uSmoothing:this.smoothing,uHalfSize:[r[0]/2,r[1]/2],uOffset:n.offset,uScale:n.scale,uPosition:[n.worldMatrix[12],n.worldMatrix[13],n.worldMatrix[14]]}),this._texture&&this._texture.enable(e)},t.prototype.disable=function(){}}(),function(t){function e(){var e=t.call(this)||this;return e._geometry=new Co,e._geometry.setBuffer("position",new Lo(new Float32Array([-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0]))).setBuffer("texture",new Lo(new Float32Array([0,0,1,0,1,1,0,1]),{itemSize:2})).setBuffer("index",new Lo(new Uint16Array([1,2,0,3,0,2]),{itemSize:1})),e._geometry.getBuffer("index").type=Lo.ElementArrayBuffer,e._shaderProgram=new li({vertex:new vi("vertex","\nattribute vec2 position;\nattribute vec2 texture;\n\nuniform vec3 uPosition;\nuniform mat4 uPCamera;\nuniform vec2 uScale;\nuniform vec2 uHalfSize;\nuniform vec2 uOffset;\nuniform float uSmoothing;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void) {\n    vTextureCoord = texture;\n\n    vec2 alignedPosition = position * uScale;\n    alignedPosition += uOffset;\n    alignedPosition /= uHalfSize;\n\n    vec4 ndcPosition = uPCamera * vec4(uPosition, 1.0);\n    ndcPosition.xyz = ndcPosition.xyz / ndcPosition.w;\n    ndcPosition.w = 1.0;\n    ndcPosition.xy += alignedPosition.xy;\n\n    vec2 roundedPosition = floor((ndcPosition.xy + 1.0) * uHalfSize.xy + 0.5) / uHalfSize.xy - 1.0;\n    vec2 roundingDelta = roundedPosition - ndcPosition.xy;\n\n    ndcPosition.xy = ndcPosition.xy + roundingDelta * uSmoothing;\n\n    gl_Position = ndcPosition;\n}\n"),fragment:new vi("fragment","\nprecision mediump float;\n\nuniform float uColorAlpha;\nuniform sampler2D uTexture;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void) {\n    vec4 textureColor = texture2D(uTexture, vec2(vTextureCoord.s, vTextureCoord.t));\n\n    gl_FragColor = textureColor * uColorAlpha;\n}\n"),uniforms:[{name:"uPCamera",type:"mat4"},{name:"uPosition",type:"3f"},{name:"uColorAlpha",type:"1f"},{name:"uScale",type:"2f"},{name:"uTexture",type:"1i"},{name:"uHalfSize",type:"2f"},{name:"uOffset",type:"2f"},{name:"uSmoothing",type:"1f"}],attributes:[{name:"position"},{name:"texture"},{name:"index",index:!0}]}),e.type=15,e}Object(x.c)(e,t),e.prototype.render=function(t){var e=t.gl,n=t.camera;return t.shaderProgram=this._shaderProgram,e.disable(e.DEPTH_TEST),e.enable(e.BLEND),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ONE_MINUS_SRC_ALPHA),this._shaderProgram.enable(e).bind(e,{uPCamera:new Float32Array(n.modelViewMatrix),uTexture:0},{position:this._geometry.getBuffer("position"),texture:this._geometry.getBuffer("texture"),index:this._geometry.getBuffer("index")}),e.activeTexture(e.TEXTURE0),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this._shaderProgram.disable(e),this}}(Tt),function(){function t(t,e){this.origin=t||c.d(),this.direction=e||c.d()}return t.prototype.clone=function(){return new t(c.b(this.origin),c.b(this.direction))},t.prototype.at=function(t){var e=c.d();return c.p(e,this.origin,this.direction,t),e},t.prototype.intersectBox=function(t){var e,n,i,r,o,a,s=1/this.direction[0],c=1/this.direction[1],l=1/this.direction[2],u=this.origin;return s>=0?(e=(t.min[0]-u[0])*s,n=(t.max[0]-u[0])*s):(e=(t.max[0]-u[0])*s,n=(t.min[0]-u[0])*s),c>=0?(i=(t.min[1]-u[1])*c,r=(t.max[1]-u[1])*c):(i=(t.max[1]-u[1])*c,r=(t.min[1]-u[1])*c),e>r||i>n?null:((i>e||e!=e)&&(e=i),(r<n||n!=n)&&(n=r),l>=0?(o=(t.min[2]-u[2])*l,a=(t.max[2]-u[2])*l):(o=(t.max[2]-u[2])*l,a=(t.min[2]-u[2])*l),e>a||o>n?null:((o>e||e!=e)&&(e=o),(a<n||n!=n)&&(n=a),n<0?null:this.at(e>=0?e:n)))},t.prototype.applyMatrix4=function(t){return c.a(this.direction,this.direction,this.origin),c.t(this.direction,this.direction,t),c.t(this.origin,this.origin,t),c.r(this.direction,this.direction,this.origin),c.n(this.direction,this.direction),this},t.prototype.intersectTriangle=function(t,e){var n=c.d(),i=c.d(),r=c.d();c.r(n,t[1],t[0]),c.r(i,t[2],t[0]),c.e(r,n,i);var o,a=c.g(this.direction,r);if(a>0){if(e)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}var s=c.d();c.r(s,this.origin,t[0]);var l=c.d();c.e(l,s,i);var u=o*c.g(this.direction,l);if(u<0)return null;var d=c.d();c.e(d,n,s);var f=o*c.g(this.direction,d);if(f<0)return null;if(u+f>a)return null;var h=-o*c.g(s,r);return h<0?null:this.at(h/a)},t.prototype.distanceToPlane=function(t){var e=c.g(t.normal,this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var n=-(c.g(this.origin,t.normal)+t.constant)/e;return n>=0?n:null},t.prototype.intersectPlane=function(t){var e=this.distanceToPlane(t);return null===e?null:this.at(e)},t}()),Do=(function(){function t(t,e,n,i){var r;this.precision=1e-4,this.ray=new Ao(t,e),this.near=n||0,this.far=i||1/0,this.intersectMethodsByType=((r={})[9]="intersectMesh",r),this._vec3=c.d(),this._mat3=bo()}t.prototype.setFromCamera=function(t,e){if(2===e.type){c.c(this.ray.origin,e.position);var n=c.q(this._vec3,t[0],t[1],.5);n=e.unproject(n),c.r(n,n,e.position),c.n(n,n),this.ray.direction=n}else if(1===e.type){var i=c.q(this._vec3,t[0],t[1],-1);this.ray.origin=e.unproject(i),c.q(this.ray.direction,0,0,-1),xo(this._mat3,e.worldMatrix),c.s(this.ray.direction,this.ray.direction,this._mat3),c.n(this.ray.direction,this.ray.direction)}},t.prototype.intersectObject=function(t,e,n){n=n||[];var i=this.intersectMethodsByType[t.type];return i&&this[i]?this[i](t,e,n):e&&this.intersectObjects(t.children,e,n),n.sort(this._descSort),n},t.prototype.intersectObjects=function(t,e,n){var i=this;return n=n||[],t.forEach((function(t){return i.intersectObject(t,e,n)})),n},t.prototype.intersectMesh=function(t,e,n){n=n||[];var i=Ft.b();Ft.e(i,t.worldMatrix);var r=this.ray.clone();r.applyMatrix4(i);var o=t.geometry.getBoundingBox();if(!r.intersectBox(o))return t;for(var a=t.geometry.buffers.position,s=0;s<a.length;s+=3){var l=a.getTriangle(s/3),u=r.intersectTriangle(l,!1);if(u){c.t(u,u,t.worldMatrix);var d=c.f(this.ray.origin,u);d<this.precision||d<this.near||d>this.far||n.push({distance:d,point:u,object:t})}}return e&&this.intersectObjects(t.children,e,n),n},t.prototype._descSort=function(t,e){return t.distance-e.distance}}(),function(t){function e(){var e=t.call(this)||this;return e.type=14,e}Object(x.c)(e,t),e.prototype.render=function(t){var e=t.gl;return e.enable(e.BLEND),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e.blendEquationSeparate(e.FUNC_ADD,e.FUNC_ADD),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA),t.renderer.sortObjects&&this._sortObjects(t),this._objects.forEach((function(e){return e.render(t)})),this._objects=[],this},e.prototype._sortObjects=function(t){var e=t.camera,n=this._reversePainterSortStable.bind(this,e);this._objects.sort(n)},e.prototype._reversePainterSortStable=function(t,e,n){if(e.renderOrder!==n.renderOrder)return e.renderOrder-n.renderOrder;var i=t.project(e.getWorldPosition())[2];return t.project(n.getWorldPosition())[2]-i}}(Tt),function(){function t(t,e){this.state=t,this.modules=e,this.textureKeys=[],this.texturesMap=new Map}return t.prototype.addTexture=function(t,e){return Object(x.b)(this,void 0,Promise,(function(){var n;return Object(x.d)(this,(function(i){switch(i.label){case 0:return[4,Object(a.c)(t)];case 1:return n=i.sent(),[4,this.storeTexture(n,e)];case 2:return[2,i.sent()]}}))}))},t.prototype.addPreparedTexture=function(t){var e="prepared-"+I();return this.textureKeys.push(e),this.texturesMap.set(e,t),this.textureKeys.length-1},t.prototype.updatePreparedTexture=function(t,e){this.texturesMap.set(this.textureKeys[t],e)},t.prototype.loadTexture=function(t,e){return Object(x.b)(this,void 0,Promise,(function(){var n;return Object(x.d)(this,(function(i){switch(i.label){case 0:return[4,this.loadImage(t)];case 1:return(n=i.sent())?[4,this.storeTexture(n,e)]:[2];case 2:return[2,i.sent()]}}))}))},t.prototype.getTexture=function(t){return this.texturesMap.get(this.textureKeys[t])},t.prototype.destroy=function(){this.textureKeys=[],this.texturesMap.clear()},t.prototype.deleteTexture=function(t){var e,n=this.textureKeys[t];return null===(e=this.texturesMap.get(n))||void 0===e||e.remove(),this.texturesMap.delete(n)},t.prototype.storeTexture=function(t,e){var n,i;return Object(x.b)(this,void 0,void 0,(function(){var r,s,c,l,u,d,f,h,p,m,v;return Object(x.d)(this,(function(_){if(r=null==e?void 0:e.size,s=null!==(n=null==e?void 0:e.pixelRatio)&&void 0!==n?n:window.devicePixelRatio,c=null!==(i=null==e?void 0:e.imagePadding)&&void 0!==i?i:1,l=t.getAttribute("src")||t.currentSrc,u=function(t,e){return t+(void 0!==e?"_"+e[0]+","+e[1]:"")}(l,r),(d=this.textureKeys.indexOf(u))>-1&&this.texturesMap.has(u))return[2,d];if(f=this.modules.renderer.getRenderingContext(),h=(r||[t.width,t.height]).map((function(t){return t*s})),p=Object(a.C)(t,h),(m=h.map((function(t){return t+2*c})))[0]>o.atlasSize[0]||m[1]>o.atlasSize[1])throw new Error("Image texture dimensions "+m+" are larger than the maximum possible "+o.atlasSize);return(v=new Et(void 0,{size:m,flipY:!1,magFilter:Et.LinearFilter,minFilter:Et.LinearFilter}).prepare(f)).subImage(f,p,c,c),this.texturesMap.set(u,v),this.textureKeys.push(u),this.state.needRerender=!0,[2,this.textureKeys.length-1]}))}))},t.prototype.loadImage=function(t){return Object(x.b)(this,void 0,Promise,(function(){return Object(x.d)(this,(function(e){return[2,new Promise((function(e){var n=new Image;n.crossOrigin="Anonymous",n.src=t,n.onload=function(){return e(n)},n.onerror=function(){return e(void 0)}}))]}))}))},t}()),Fo=n(50),Ro=function(t){var e=this;this.getKeyInfo=function(){return Object(x.b)(e,void 0,Promise,(function(){return Object(x.d)(this,(function(t){switch(t.label){case 0:return[4,this.request];case 1:return[2,t.sent()]}}))}))};var n=t.tileKey;if(n===o.tiles.tileKey)this.request=Promise.resolve({showCommPoi:!1,showSberLogo:!1});else{var i=Object(a.q)(Fo.d,{keyID:n});this.request=fetch(i).then((function(t){if(t.ok)return t.json()}),(function(){console.error("Could not load tile key info. A style layers with commercial POI will be added to applied styles.")})).then((function(t){if(!t||!t.result||200!==t.meta.code)return{showCommPoi:!0,showSberLogo:!1};var e=t.result.service.properties.payload,n=e.showCommPoi,i=e.showSberLogo;return{showCommPoi:null==n||n,showSberLogo:null!=i&&i}}))}},Bo=function(){function t(){this.sources=[]}return t.prototype.addSource=function(t){this.sources.push(t)},t.prototype.removeSource=function(t){this.sources=this.sources.filter((function(e){return e.getId()!==t}))},t.prototype.getSourceById=function(t){return this.sources.find((function(e){return e.getId()===t}))},t}(),No=n(58),Uo=n(91),Ho=function(){function t(t,e){var n=this;this.state=t,this.modules=e,this.type="default",this.zenithSource=new zi.a(this.modules,{tileServer:t.tileServer,tileSet:t.tileSet,tileProtocol:t.tileProtocol,tileKey:t.tileKey,subdomains:t.subdomains,appId:t.appId,defaultLang:t.tileServerDefaultLang,sessionId:t.sessionId}),this.universeTileLayer=new No.a(0,o.tiles.maxUniverseZoom,0,o.tiles.maxUniverseZoom,this.modules,t,this.zenithSource),this.universeTileLayer.getDisplayedLabelsKeys=function(){return n.regionalTileLayer.isBlank()?No.a.prototype.getDisplayedLabelsKeys.call(n.universeTileLayer):[]},this.modules.tileManager.addTileLayer(this.universeTileLayer),this.regionalTileLayer=new No.a(o.tiles.maxUniverseZoom+1,o.tiles.maxRegionalZoom,o.tiles.maxUniverseZoom+1,o.tiles.maxDetailLevel,this.modules,t,this.zenithSource),this.modules.tileManager.addTileLayer(this.regionalTileLayer),this.modules.sourceStorage.addSource(this)}return t.prototype.destroy=function(){var t;this.modules.tileManager.removeTileLayer(this.universeTileLayer),this.universeTileLayer.destroy(),this.modules.tileManager.removeTileLayer(this.regionalTileLayer),this.regionalTileLayer.destroy(),this.modules.sourceStorage.removeSource(this.getId()),this.zenithSource.destroy(),this.hillshadeTileLayer&&(this.modules.tileManager.removeTileLayer(this.hillshadeTileLayer),this.hillshadeTileLayer.destroy()),null===(t=this.hillshadeTileLayer)||void 0===t||t.destroy()},t.prototype.setAttributes=function(t){var e,n;this.zenithSource.setAttributes(t),this.universeTileLayer.redraw(),this.regionalTileLayer.redraw(),null===(e=this.hillshadeSource)||void 0===e||e.setAttributes(t),null===(n=this.hillshadeTileLayer)||void 0===n||n.redraw()},t.prototype.getAttributes=function(){return this.zenithSource.getAttributes()},t.prototype.getId=function(){return this.zenithSource.id},t.prototype.setHoverId=function(t){this.regionalTileLayer.setHoverId(t)},t.prototype.resetHoverId=function(){this.regionalTileLayer.resetHoverId()},t.prototype.enableHillshade=function(t){var e,n,i,r={url:null!==(e=t.url)&&void 0!==e?e:this.state.tileProtocol+"://"+this.state.tileServer+"/v2/ald?ts=hillshade&x={x}&y={y}&z={z}",minZoom:null!==(n=t.minZoom)&&void 0!==n?n:o.hillshade.minZoom,maxZoom:null!==(i=t.maxZoom)&&void 0!==i?i:o.hillshade.maxZoom};this.hillshadeSource=new Uo.a(this.modules,{url:r.url,hillshadeEncoded:!0}),this.hillshadeTileLayer=new No.a(r.minZoom,r.maxZoom,r.minZoom,de.a,this.modules,this.state,this.hillshadeSource),this.modules.tileManager.addTileLayer(this.hillshadeTileLayer)},t}(),Zo=function(){function t(t,e,n){this.map=n,this.layout=new yo(e),this.collector=new Lt.a("main"),this.workers=new or,this.styleManager=new Gi(this),this.assetManager=new Wi(t,this),this.imageManager=new Do(t,this),this.floorManager=new vr(t,this),this.personalPoiManager=new Ji(this),this.buildingHeightAnimator=new Pt(t,this),this.renderer=new Ii(t,this),this.layers=new lr(t),this.sourceStorage=new Bo,this.tileManager=new Hr(t,this),this.modelManager=new Xi(t,this),this.dynamicStyle=new E.b,this.imageCache=new hr(this),this.identifier=new Oi(t,this),this.labeler=new Gr(t,this),this.ruler=new Jr(t,this),this.trafficTileLayer=new _o(t,this),this.handler=new uo(t,this),this.mouseMoveHandler=new Ot(this),this.tileKeyInfo=new Ro(t),this.defaultSource=new Ho(t,this)}return t.prototype.destroy=function(){this.imageManager.destroy(),this.trafficTileLayer.destroy(),this.tileManager.destroy(),this.workers.destroy(),this.renderer.destroy(),this.handler.destroy(),this.mouseMoveHandler.destroy(),this.ruler.destroy(),this.layout.destroy()},t}(),Go=function(){function t(e,n,i){var r,c,u=this;void 0===n&&(n={}),this.renderLoop=function(){u.requestedFrame=requestAnimationFrame(u.renderLoop),u.modules.map.emit("framestart");var t=u.state;t.time=Date.now(),t.collectStats&&(t.stats.drawCount=0,t.stats.vertexCount=0,t.stats.tileCount=0),u.modules.mouseMoveHandler.update(),u.handlers.forEach((function(t){return t.update()})),it(t),q(t),J(t),tt(t),u.stillnessUpdater.update(t),Z(t,u.modules.layout.rootContainer),function(t,e,n){B.e("viewport",{step:function(t,i){t.viewport={top:i[0],right:i[1],bottom:i[2],left:i[3]},N(t,e,n)}},t)}(t,u.modules.layout.rootContainer,u.modules.renderer),function(t,e){B.e("padding",{step:function(t,n){t.padding={top:n[0],right:n[1],bottom:n[2],left:n[3]},U(t,e)}},t)}(t,u.modules.renderer),u.modules.buildingHeightAnimator.update(),u.modules.trafficTileLayer.update(),u.modules.layers.getLayers().forEach((function(t){void 0!==t.update&&t.update()})),u.modules.tileManager.update(),u.modules.floorManager.update(),u.modules.personalPoiManager.update(),u.modules.ruler.update(),u.modules.dynamicStyle.update(),u.modules.map.emit("update"),u.modules.labeler.update(),u.performanceChecker.update(),u.modules.identifier.update(),(o.render.alwaysRerender||t.needRerender)&&(u.modules.renderer.render(u.modules.tileManager),t.needRerender=!1,t.collectStats&&u.modules.map.emit("stats",t.stats)),u.modules.map.update(),u.modules.map.emit("frameend")},this.onWindowUnload=function(){var t=u.performanceChecker.getEarlyFps();void 0!==t&&ft({eventAction:"FPS",eventLabel:"Early",eventValue:t})};var d=Object(x.a)(Object(x.a)({},t.options),n),f=Object(x.a)(Object(x.a)({},t.options.padding),d.padding),h=Object(x.a)(Object(x.a)({},t.options.viewport),d.viewport),p=d.maxBounds?l.g(d.maxBounds):s.s,m=Object(s.l)(d.center);l.b(m,p,m);var v,_,y,g,b,w=this.state={time:Date.now(),center:m,zoom:void 0!==d.styleZoom?Object(s.h)(d.styleZoom,m):d.zoom,styleZoom:void 0!==d.styleZoom?d.styleZoom:Object(s.f)(d.zoom,m),zoomTypePreserving:void 0!==d.styleZoom?"styleZoom":"zoom",minZoom:d.minZoom,maxZoom:d.maxZoom,maxBounds:p,rotation:Object(a.g)(d.rotation),touchRotationThreshold:Object(a.g)(d.touchRotationThreshold),pitch:Object(a.g)(d.pitch),minPitch:Object(a.g)(d.minPitch),maxPitch:Object(a.g)(d.maxPitch),size:[Math.max(1,e.clientWidth-h.left-h.right),Math.max(1,e.clientHeight-h.top-h.bottom)],tickers:{},stillness:1,needRerender:!0,needLabeling:!1,userHasInteracted:!1,viewport:h,padding:f,labelingOpacity:0,tileServer:d.tileServer,tileSet:d.tileSet,tileProtocol:d.tileProtocol,subdomains:d.subdomains.split(""),floorsEnabled:d.floorsEnabled,floorsUrl:d.floorsUrl,collectStats:d.collectStats,stats:{tileCount:0,dynamicTileCount:0,drawCount:0,vertexCount:0},promoMode:d.promoMode,trafficServer:d.trafficServer,trafficProtocol:d.trafficProtocol,identifyPickDistance:o.identify.pickDistance,lang:d.lang,tileServerDefaultLang:d.tileServerDefaultLang,tileKey:d.key,appId:d.appId,disableCommercialPoi:d.disableCommercialPoi,disableHoverStyles:d.disableHoverStyles,disableRotationByUserInteraction:!!d.disableRotationByUserInteraction,disablePitchByUserInteraction:!!d.disablePitchByUserInteraction,performanceCaveatEmitted:!1,sessionId:d.sessionId,shownRegionIds:new Set,preserveDrawingBuffer:!!d.preserveDrawingBuffer,defaultBackgroundColor:d.defaultBackgroundColor,handyStyleId:NaN,styleState:null!==(r=d.styleState)&&void 0!==r?r:{},disableIconCache:d.disableIconCache,rtlPluginScenario:null!==(c=d.useRtlTextPlugin)&&void 0!==c?c:"depends-on-language"};this.modules=new Zo(w,e,i),this.modules.styleManager.setDynamicStyle(this.modules.dynamicStyle.getStyle()),this.handlers=[new yt(w,this.modules.layout.mapContainer),new bt(this.modules)],d.disableZoomOnScroll||this.handlers.push(new mt(w,this.modules.layout.mapContainer)),ct&&lt&&this.handlers.push(new xt(w,e,i)),this.performanceChecker=new wt(w),this.stillnessUpdater=new jt,this.requestedFrame=requestAnimationFrame(this.renderLoop),d.sendAnalytics&&(v=window,_=document,y="script",v.GoogleAnalyticsObject="ga",v.ga=v.ga||function(){(v.ga.q=v.ga.q||[]).push(arguments)},v.ga.l=Date.now(),g=_.createElement(y),b=_.getElementsByTagName(y)[0],g.async=1,g.src="https://www.google-analytics.com/analytics.js",b.parentNode.insertBefore(g,b),window.ga&&(window.ga("create",o.analytics.gaCode,{storage:"none",name:o.analytics.gaName,sampleRate:80}),window.ga(o.analytics.gaName+".set","anonymizeIp",!0),window.ga(o.analytics.gaName+".send","pageview")),window.addEventListener("unload",this.onWindowUnload))}return t.prototype.destroy=function(){cancelAnimationFrame(this.requestedFrame),this.modules.destroy(),this.handlers.forEach((function(t){return t.destroy()})),window.removeEventListener("unload",this.onWindowUnload)},t.prototype.isIdle=function(){return this.modules.tileManager.isIdle()&&this.modules.assetManager.isIdle()&&this.modules.trafficTileLayer.isIdle()&&this.modules.labeler.isIdle()},t.prototype.redrawMap=function(){this.modules.tileManager.redraw(),this.modules.trafficTileLayer.redraw(),this.modules.modelManager.resetCache(),this.modules.floorManager.resetCache(),this.modules.personalPoiManager.redraw()},t.options={center:[0,0],zoom:0,minZoom:o.MAP_DEFAULTS.minZoom,maxZoom:o.MAP_DEFAULTS.maxZoom,rotation:0,touchRotationThreshold:10,pitch:0,minPitch:0,maxPitch:45,viewport:{top:0,right:0,bottom:0,left:0},padding:{top:0,right:0,bottom:0,left:0},tileServer:o.tiles.server,tileSet:o.tiles.tileSet,tileProtocol:o.tiles.protocol,key:o.tiles.tileKey,subdomains:o.tiles.subdomains,floorsEnabled:o.floors.enabled,floorsUrl:o.floors.url,trafficProtocol:o.traffic.protocol,trafficServer:o.traffic.host,collectStats:!1,style:"",styleState:{},styleOptions:{rootUrl:"",iconsPath:"",fontsPath:"",stylePath:""},promoMode:!1,sendAnalytics:!0,lang:o.defaultLang,appId:o.tiles.appId,disableCommercialPoi:!1,disableHoverStyles:!1,disableZoomOnScroll:!1,disableRotationByUserInteraction:!1,disablePitchByUserInteraction:!1,defaultBackgroundColor:"#f6f2de",disableIconCache:!1},t}(),Wo=(n(104),n(33)),Vo=n(42),qo=["zoom","rotation","pitch","center"],Yo=function(t){function e(e,n){var i,r=t.call(this)||this,o=r.core=new Go(e,n,r);return r.state=o.state,r.modules=o.modules,r.performanceChecker=o.performanceChecker,r.values={isMoveChanging:!1,isIdle:!1},qo.forEach((function(t){r.cloneFromStateToValues(t,t+"1"),r.cloneFromStateToValues(t,t+"2"),r.cloneFromStateToValues(t,t+"End1"),r.cloneFromStateToValues(t,t+"End2"),r.values[t+"EndTime"]=0,r.values["is"+t+"Changing"]=!1})),r.cloneFromStateToValues("size","size"),r.performanceChecker.on("performancecaveat",(function(){r.emit("performancecaveat"),ft({eventAction:"FPS",eventLabel:"performancecaveat"})})),r.performanceChecker.on("fps",(function(t){return ft({eventAction:"FPS",eventLabel:"Average",eventValue:t})})),(null==n?void 0:n.defaultBackgroundColor)&&r.setBackgroundColor(n.defaultBackgroundColor),r.setStyle(null!==(i=null==n?void 0:n.style)&&void 0!==i?i:"eb10e2c3-3c28-4b81-b74b-859c9c4cf47e",null==n?void 0:n.styleOptions).catch((function(t){if(t instanceof Error)throw t})),Object(Vo.f)(r.state.rtlPluginScenario,r.modules,r.state.lang),(null==n?void 0:n.hillshade)&&r.modules.defaultSource.enableHillshade(n.hillshade),r}return Object(x.c)(e,t),e.prototype.setCenter=function(t,e){if(!Object(a.s)(t))return this;this.state.userHasInteracted=!1;var n=Object(s.l)(t);return W(this.state,n,e),this},e.prototype.setZoom=function(t,e){return Object(a.r)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)?(this.state.zoomTypePreserving="zoom",this.state.userHasInteracted=!1,et(this.state,t,e),this):this},e.prototype.setStyleZoom=function(t,e){if(!Object(a.r)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER))return this;var n=Object(s.h)(t,this.state.center);return this.state.zoomTypePreserving="styleZoom",this.state.userHasInteracted=!1,et(this.state,n,e),this},e.prototype.setMinZoom=function(t,e){return this.state.minZoom=t,this.setZoom(this.state.zoom,e),this},e.prototype.setMaxZoom=function(t,e){return this.state.maxZoom=t,this.setZoom(this.state.zoom,e),this},e.prototype.setRotation=function(t,e){return Object(a.r)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)?(this.state.userHasInteracted=!1,X(this.state,Object(a.g)(t),e),this):this},e.prototype.setPitch=function(t,e){return Object(a.r)(t,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)?(this.state.userHasInteracted=!1,Q(this.state,Object(a.g)(t),e),this):this},e.prototype.setMinPitch=function(t,e){return this.state.minPitch=Object(a.g)(t),this.setPitch(Object(a.A)(this.state.pitch),e),this},e.prototype.setMaxPitch=function(t,e){return this.state.maxPitch=Object(a.g)(t),this.setPitch(Object(a.A)(this.state.pitch),e),this},e.prototype.setViewport=function(t,e){return this.state.userHasInteracted=!1,function(t,e,n,i,r){void 0===r&&(r={});var o=Object(x.a)({top:0,right:0,bottom:0,left:0},i);if(!1===r.animate)t.viewport=o,N(t,e,n);else{var a=t.viewport,s=void 0!==r.easing?r.easing:"easeOutCubic",c=void 0!==r.duration?r.duration:300;B.c("viewport",{easing:s},t,[a.top,a.right,a.bottom,a.left],[o.top,o.right,o.bottom,o.left],c)}}(this.state,this.modules.layout.rootContainer,this.modules.renderer,t,e),this},e.prototype.setMaxBounds=function(t){return this.state.maxBounds=Object(l.g)(t),this},e.prototype.setPadding=function(t,e){var n=Object(x.a)({top:0,left:0,right:0,bottom:0},t);return this.state.userHasInteracted=!1,function(t,e,n,i){void 0===i&&(i={});var r=function(t,e){return function(t,e){return{top:Math.min(t.top,e[1]),bottom:Math.min(t.bottom,e[1]),left:Math.min(t.left,e[0]),right:Math.min(t.right,e[0])}}(function(t){return{top:Math.max(t.top,0),bottom:Math.max(t.bottom,0),left:Math.max(t.left,0),right:Math.max(t.right,0)}}(t),e)}(n,t.size);if(!1===i.animate)t.padding=r,U(t,e);else{var o=t.padding,a=void 0!==i.easing?i.easing:"easeOutCubic",s=void 0!==i.duration?i.duration:300;B.c("padding",{easing:a},t,[o.top,o.right,o.bottom,o.left],[r.top,r.right,r.bottom,r.left],s)}}(this.state,this.modules.renderer,n,e),this},e.prototype.getPadding=function(){return this.state.padding},e.prototype.getCenter=function(){return Object(s.m)(this.state.center)},e.prototype.getZoom=function(){return this.state.zoom},e.prototype.getStyleZoom=function(){return this.state.styleZoom},e.prototype.getMinZoom=function(){return this.state.minZoom},e.prototype.getMaxZoom=function(){return this.state.maxZoom},e.prototype.getRotation=function(){return Object(a.A)(this.state.rotation)},e.prototype.getPitch=function(){return Object(a.A)(this.state.pitch)},e.prototype.getViewport=function(){return this.state.viewport},e.prototype.getSize=function(){return[this.state.size[0],this.state.size[1]]},e.prototype.getWebGLContext=function(){return this.modules.renderer.getRenderingContext()},e.prototype.getCanvas=function(){return this.modules.layout.canvas},e.prototype.enableRuler=function(){this.modules.ruler.enable()},e.prototype.setRulerPoints=function(t){this.modules.ruler.enabled||this.modules.ruler.enable(),this.modules.ruler.setPoints(t)},e.prototype.disableRuler=function(){this.modules.ruler.disable()},e.prototype.showTraffic=function(){this.modules.trafficTileLayer.show()},e.prototype.hideTraffic=function(){this.modules.trafficTileLayer.hide()},e.prototype.setPersonalPoi=function(t){this.modules.personalPoiManager.setPersonalPoi(t)},e.prototype.setSelectedIds=function(t){return void 0===t&&(t=[]),this.modules.tileManager.setSelectedIds(t.map(P.b).filter((function(t){return!Number.isNaN(t[0])&&!Number.isNaN(t[1])}))),this.modules.identifier.debouncedFillCache(),this},e.prototype.invalidateSize=function(){this.state.userHasInteracted=!1;var t=window.devicePixelRatio,e=this.state.viewport,n=this.modules.layout.rootContainer,i=n.clientWidth,r=n.clientHeight;return this.state.size=[Math.max(1,i-e.left-e.right),Math.max(1,r-e.top-e.bottom)],this.modules.renderer.setPixelRatio(t),this.modules.renderer.setSize(i,r),this.state.needRerender=!0,this},e.prototype.destroy=function(){this.core.destroy()},e.prototype.refresh=function(){return this.state.needRerender=!0,this.state.needLabeling=!0,this.modules.identifier.resetCache(),this},e.prototype.changeFloorNumber=function(t,e){return this.modules.floorManager.changeFloorNumber(t,e),this},e.prototype.setPromoMode=function(t){return this.state.promoMode=t,this.modules.labeler.resetHysteresis(),this},e.prototype.setBackgroundColor=function(t){return"string"==typeof t&&(t=Object(Si.a)(t)),this.modules.renderer.setClearColor(t),this},e.prototype.addLayer=function(t,e){return this.modules.styleManager.addLayer(t,this.state.handyStyleId,e),this.core.redrawMap(),this},e.prototype.removeLayer=function(t){return this.modules.styleManager.removeLayer(t,this.state.handyStyleId),this.core.redrawMap(),this},e.prototype.setStyle=function(t,e){return Object(x.b)(this,void 0,Promise,(function(){var n;return Object(x.d)(this,(function(i){switch(i.label){case 0:return"string"!=typeof t?[3,5]:Object(Wo.d)(t)?[4,this.setCustomStyleById(t,e)]:[3,2];case 1:return n=i.sent(),[3,4];case 2:return[4,this.setCustomStyleFromUrl(t,e)];case 3:n=i.sent(),i.label=4;case 4:return[3,7];case 5:return[4,this.setCustomStyleDirectly(t,e)];case 6:i.sent(),n=t,i.label=7;case 7:return this.emit("styleload",{style:n}),[2,n]}}))}))},e.prototype.useOldStyles=function(t){return this.setCustomStyleById("eb10e2c3-3c28-4b81-b74b-859c9c4cf47e",t),this},e.prototype.waitForGpuToFinishDrawing=function(){return this.modules.renderer.getPixels(),this},e.prototype.setLang=function(t){this.state.lang=t,Object(Vo.f)(this.state.rtlPluginScenario,this.modules,t),this.modules.tileManager.redraw()},e.prototype.getContainer=function(){return this.modules.layout.mapContainer},e.prototype.getExternalContainer=function(){return this.modules.layout.externalContainer},e.prototype.fitBounds=function(t,e){var n,i,r=t.northEast,o=t.southWest,s=Object(x.a)({top:0,left:0,right:0,bottom:0},(null==e?void 0:e.padding)?e.padding:{}),c=this.getViewport(),l=this.getPadding(),u=(null==e?void 0:e.skipMapPadding)?s:(i=s,{top:(n=l).top+i.top,bottom:n.bottom+i.bottom,left:n.left+i.left,right:n.right+i.right}),f=this.getSize(),h=(null==e?void 0:e.considerRotation)?this.getRotation():0;if(f[0]-u.left-u.right<=0||f[1]-u.top-u.bottom<=0)return console.warn("Map cannot fit within canvas with the given bounds and padding."),this;(null==e?void 0:e.considerRotation)||X(this.state,h,{animate:!1});var p=d([[o[0],r[1]],r,[r[0],o[1]],o],h,[f[0]-u.left-u.right,f[1]-u.top-u.bottom]);if(!p)return console.warn("Map cannot fit within canvas with the given bounds and padding."),this;var m=[(f[0]-u.left-u.right)/2+u.left+c.left,(f[1]-u.top-u.bottom)/2+u.top+c.top],v=Object(a.z)(Object(x.a)(Object(x.a)({},this.state),{center:p.center,zoom:Object(a.d)(p.zoom,this.state.minZoom,this.state.maxZoom),pitch:0}),m),_=[0,0];O.p(_,p.center,v);var y=[0,0,0];return O.a(y,p.center,_),W(this.state,y,null==e?void 0:e.animation),et(this.state,p.zoom,null==e?void 0:e.animation),Q(this.state,0,null==e?void 0:e.animation),this},e.prototype.update=function(){var t=this,e=this.state,n=e.time,i=e.userHasInteracted,r=this.values,o={};qo.forEach((function(i){var a=e[i];"zoom"===i&&"styleZoom"===e.zoomTypePreserving&&(a=e.styleZoom),o[i+"start"]=!r["is"+i+"Changing"]&&!t.areEqual(a,r[i+"1"])&&t.areEqual(r[i+"1"],r[i+"2"]),o[i+"start"]&&(r["is"+i+"Changing"]=!0),r["is"+i+"Changing"]&&(o[i]=!t.areEqual(a,r[i+"1"]),n-r[i+"EndTime"]>150&&(o[i+"end"]=t.areEqual(a,r[i+"End1"])&&!t.areEqual(r[i+"End1"],r[i+"End2"]),o[i+"end"]&&(r["is"+i+"Changing"]=!1),t.copyFromValuesToValues(i+"End2",i+"End1"),t.copyFromStateToValues(a,i+"End1"),r[i+"EndTime"]=n)),t.copyFromValuesToValues(i+"2",i+"1"),t.copyFromStateToValues(a,i+"1")})),o.resize=!this.areEqual(e.size,r.size),this.copyFromStateToValues(e.size,"size"),o.movestart=(o.zoomstart||o.rotationstart||o.centerstart||o.pitchstart)&&!r.isMoveChanging,o.movestart&&(r.isMoveChanging=!0),o.move=r.iszoomChanging||r.isrotationChanging||r.iscenterChanging||r.ispitchChanging,o.moveend=(o.zoomend||o.rotationend||o.centerend||o.pitchend)&&!o.move,o.moveend&&(r.isMoveChanging=!1);var a=r.isIdle;for(var s in r.isIdle=!r.isMoveChanging&&this.core.isIdle(),o.idle=!a&&r.isIdle,o){var c=s;o[c]&&this.emit(c,{isUser:i})}},e.prototype.setAutoHoverMode=function(t){this.modules.defaultSource.resetHoverId(),this.state.disableHoverStyles=!t},e.prototype.setStyleState=function(t){this.state.styleState=t},e.prototype.patchStyleState=function(t){var e=this.state;e.styleState=Object(x.a)(Object(x.a)({},e.styleState),t)},e.prototype.setCustomStyleById=function(t,e){return Object(x.b)(this,void 0,Promise,(function(){var n,i,r,s;return Object(x.d)(this,(function(c){switch(c.label){case 0:return this.currentPendingStyle=t,n=Object(a.b)(e||{},{rootUrl:o.styles.url,stylePath:o.styles.path,iconsPath:"",fontsPath:o.fonts.defaultUrl,iconNameTemplate:"{name}"}),[4,this.fetchStyleById(Ai(n),t,"eb10e2c3-3c28-4b81-b74b-859c9c4cf47e")];case 1:if(!(i=c.sent()))throw new Error("There is no correct style with id «"+t+"»");return r=i.style,s=i.loadedId,n.iconsPath=function(t,e){return t.replace("{id}",e)}(o.icons.defaultUrl,s),this.currentPendingStyle!==t?[2,Promise.reject("Cancel setting the style «"+t+"», there is a newer style was set")]:[4,this.setCustomStyle(r,n)];case 2:return c.sent(),[2,t]}}))}))},e.prototype.setCustomStyleFromUrl=function(t,e){return Object(x.b)(this,void 0,Promise,(function(){var n,i;return Object(x.d)(this,(function(r){switch(r.label){case 0:return this.currentPendingStyle=t,[4,Xo(Ai(n=Object(a.b)(e||{},{rootUrl:t,iconsPath:"",fontsPath:"",stylePath:"style.json",iconNameTemplate:"{name}.svg"})))];case 1:if(!(i=r.sent()))throw new Error("There are no correct styles by url «"+t+"»");return t!==this.currentPendingStyle?[2,Promise.reject("Cancel setting the style «"+t+"», there is a newer style was set")]:[4,this.setCustomStyle(i,n)];case 2:return r.sent(),[2,t]}}))}))},e.prototype.setCustomStyleDirectly=function(t,e){var n=window.location.host,i=Object(a.b)(e||{},{rootUrl:"//"+n,stylePath:"",iconsPath:"",fontsPath:"",iconNameTemplate:"{name}.svg"});return this.setCustomStyle(t,i)},e.prototype.setCustomStyle=function(t,e){return Object(x.b)(this,void 0,void 0,(function(){var n,i;return Object(x.d)(this,(function(r){switch(r.label){case 0:return this.currentPendingStyle=void 0,this.setBackgroundColor(t.background.color),[4,this.modules.tileKeyInfo.getKeyInfo()];case 1:return n=r.sent().showCommPoi,(Object(Wo.c)(t)||n)&&(this.state.disableCommercialPoi=!1),i=this.modules.styleManager.createStyle(t,e,n),this.state.handyStyleId=i.id,this.core.redrawMap(),[2]}}))}))},e.prototype.copyFromStateToValues=function(t,e){Ko(t)?O.c(this.values[e],t):this.values[e]=t},e.prototype.cloneFromStateToValues=function(t,e){var n=this.state[t];Ko(n)?this.values[e]=O.b(n):this.values[e]=n},e.prototype.copyFromValuesToValues=function(t,e){var n=this.values[e];Ko(n)?O.c(this.values[t],n):this.values[t]=n},e.prototype.areEqual=function(t,e){return Ko(t)&&Ko(e)?O.i(t,e):t===e},e.prototype.fetchStyleById=function(t,e,n){return Object(x.b)(this,void 0,Promise,(function(){var i,r,o;return Object(x.d)(this,(function(s){switch(s.label){case 0:return(i=new URL(Object(a.J)(t,{id:e}))).searchParams.append("key",this.state.tileKey),[4,fetch(i.toString())];case 1:return 404===(r=s.sent()).status&&n&&Number.isNaN(this.state.handyStyleId)?(console.warn("No access to style with id «"+e+"». Fallback to default style «"+n+"»."),[2,this.fetchStyleById(t,n)]):r.ok?[4,r.json()]:[2,void 0];case 2:return(o=s.sent())&&o.result?[2,{loadedId:e,style:o.result}]:[2]}}))}))},e}(w.a);function Xo(t){return fetch(t).then((function(t){if(t.ok)return t.json()}))}function Ko(t){return void 0!==t.length}function Jo(t,e,n){var i=Object(a.m)(t,e),r=i.a,o=i.b,s=i.c;return c.i(-(o*n+s)/r,n,0)}var Qo=l.e(),$o=l.e();function ta(t,e){var n=t[0];l.h(Qo),l.f(Qo,n);for(var i,r,o,s,u,d,f,h=[n],p=[h],m=1;m<t.length;){var v=t[m],_=!1,y=v;l.d($o,Qo),l.f($o,y),$o.max[0]-$o.min[0]>e&&(i=n,r=y,o=$o.max[0]===y[0]?$o.min[0]+e:$o.max[0]-e,u=(s=Object(a.m)(i,r)).a,d=s.b,f=s.c,y=c.i(o,-(u*o+f)/d,0),_=!0),_&&(l.d($o,Qo),l.f($o,y)),$o.max[1]-$o.min[1]>e&&(y=Jo(n,y,$o.max[1]===y[1]?$o.min[1]+e:$o.max[1]-e),_=!0),_?(h.push(y),l.h(Qo),l.f(Qo,y),h=[y],p.push(h),n=y):(h.push(v),l.f(Qo,v),n=v,m++)}return p}function ea(t,e,n){var i=t[0]-e[0],r=t[1]-e[1],o=n[0]-e[0],a=n[1]-e[1],s=o*o+a*a,c=0!==s?(i*o+r*a)/s:0;return c<0?e:c>1?n:[e[0]+c*o,e[1]+c*a]}var na=n(57),ia=n(46),ra=function(t){function e(e,n){var i,r,o,c,l,u,d,f,h,p,m=t.call(this,e)||this;m.removed=!1,m.options=n,m.isInteractive=null===(i=n.interactive)||void 0===i||i,m.geoPoints=m.options.coordinates.filter((function(t,e,n){return 0===e||!Object(a.h)(n[e],n[e-1])})),m.points=m.geoPoints.map(s.l);var v=0;m.distances=[],m.distances.push(v);for(var _=1;_<m.geoPoints.length;_++)v+=Object(s.a)(m.geoPoints[_-1],m.geoPoints[_]),m.distances.push(v);m.stateDiffer=new vt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}]),m.debouncedGenerate=Object(It.a)((function(){m.generate()}),200),m.tileAttrs=Object(E.c)({id:m.isInteractive?[0,0]:NaN,beginningIsCut:0,endingIsCut:0});var y=m.modules,g=y.dynamicStyle,b=y.layers;if(0!==m.options.width){m.rawStyleLayer={type:"line",id:"dynamic-polyline-"+m.uniqId,minzoom:m.options.minZoom,maxzoom:m.options.maxZoom,style:{color:null!==(r=m.options.color)&&void 0!==r?r:"#3388ff",width:null!==(o=m.options.width)&&void 0!==o?o:3}};var x=Object(A.d)(m.rawStyleLayer);x&&(m.styleLayerId=x.innerId,g.addLayer(x,null!==(c=m.options.zIndex)&&void 0!==c?c:0))}if(m.options.width2){m.rawStyleLayer2={type:"line",id:"dynamic-polyline2-"+m.uniqId,minzoom:m.options.minZoom,maxzoom:m.options.maxZoom,style:{color:null!==(l=m.options.color2)&&void 0!==l?l:"#00000000",width:null!==(u=m.options.width2)&&void 0!==u?u:0}};var w=Object(A.d)(m.rawStyleLayer2);w&&(m.styleLayer2Id=w.innerId,g.addLayer(w,null!==(d=m.options.zIndex2)&&void 0!==d?d:-1))}if(m.options.width3){m.rawStyleLayer3={type:"line",id:"dynamic-polyline3-"+m.uniqId,minzoom:m.options.minZoom,maxzoom:m.options.maxZoom,style:{color:null!==(f=m.options.color3)&&void 0!==f?f:"#00000000",width:null!==(h=m.options.width3)&&void 0!==h?h:0}};var S=Object(A.d)(m.rawStyleLayer3);S&&(m.styleLayer3Id=S.innerId,g.addLayer(S,null!==(p=m.options.zIndex3)&&void 0!==p?p:-2))}return void 0===m.styleLayerId&&void 0===m.styleLayer2Id&&void 0===m.styleLayer3Id||(b.addLayer(m),m.generate()),m}return Object(x.c)(e,t),e.prototype.update=function(){this.stateDiffer.check(this.mapState)&&this.debouncedGenerate()},e.prototype.remove=function(){this.removed=!0,this.isInteractive&&this.modules.identifier.resetCache(),void 0!==this.styleLayerId&&this.modules.dynamicStyle.removeLayer(this.styleLayerId),void 0!==this.styleLayer2Id&&this.modules.dynamicStyle.removeLayer(this.styleLayer2Id),void 0!==this.styleLayer3Id&&this.modules.dynamicStyle.removeLayer(this.styleLayer3Id),t.prototype.destroy.call(this)},e.prototype.snapPoint=function(t){for(var e=this.mapState,n=this.points.map((function(t){return Object(a.x)(e,t)})),i=1/0,r=n[0],o=0,c=0;c<n.length-1;c++){var l=ea(t,n[c],n[c+1]),u=l[0]-t[0],d=l[1]-t[1],f=u*u+d*d;f<i&&(i=f,r=l,o=c)}var h=Object(s.m)(Object(a.z)(e,r));return{point:h,distance:this.distances[o]+Object(s.a)(h,this.geoPoints[o])}},e.prototype.setStyle=function(t){this.setSubLayerStyle(this.styleLayerId,this.rawStyleLayer,t.color),this.setSubLayerStyle(this.styleLayer2Id,this.rawStyleLayer2,t.color2),this.setSubLayerStyle(this.styleLayer3Id,this.rawStyleLayer3,t.color3)},e.prototype.setSubLayerStyle=function(t,e,n){if(void 0!==t&&n&&e&&n!==e.style.color){var i=this.modules.dynamicStyle;e.style.color=n;var r=Object(A.d)(e);r&&(i.updateLayerStyle(t,r),this.mapState.needRerender=!0)}},e.prototype.generate=function(){var t=this;if(!(this.points.length<2||this.removed)){var e=this.modules,n=e.dynamicStyle,i=e.collector,r=e.renderer,o=e.tileManager,a=e.identifier,u=e.map,d=b.c.tileProps,f=Math.min(Math.floor(u.getZoom()),12),h=Object(s.r)(f),p=ta(this.points,h),m=c.d(),v=l.e();this.tileObjects.forEach((function(e){e.clean(t.mapState),o.removeObject(e)})),this.tileObjects=[];for(var _=0;_<p.length;_++){var y=p[_];l.h(v);for(var g=0;g<y.length;g++)l.f(v,y[g]);l.a(m,v);var x=Object(s.g)(m,f);if(Object(Ti.n)(x,o.getViewportVertices())){if(this.options.displayTileBounds){var w=n.getStyle().layers.find((function(t){return"debug-tile-bounds"===t.id}));Object(ji.a)(i,w);var S=i.getAccumulatedData(),I=new M.a("dynamicObject",S.data,r,x);this.tileObjects.push(I),o.addObject(I)}var j=Object(Ti.e)(x),O=[[],[]];for(g=0;g<y.length;g++)Object(s.k)(m,y[g],j),O[0][g]=m[0],O[1][g]=m[1];if(this.tileAttrs[d.beginningIsCut]=0,this.tileAttrs[d.endingIsCut]=0,0!==_&&(this.tileAttrs[d.beginningIsCut]=1),_+1!==p.length&&(this.tileAttrs[d.endingIsCut]=1),void 0!==this.styleLayerId){var P=n.getStyle().layersById[this.styleLayerId];Object(na.b)(P)&&Object(C.b)({collector:i,generator:ia.generateLine,args:[n.getStyle().id,P,b.d,this.tileAttrs,O]})}void 0!==this.styleLayer2Id&&(P=n.getStyle().layersById[this.styleLayer2Id],Object(na.b)(P)&&Object(C.b)({collector:i,generator:ia.generateLine,args:[n.getStyle().id,P,b.d,this.tileAttrs,O]})),void 0!==this.styleLayer3Id&&(P=n.getStyle().layersById[this.styleLayer3Id],Object(na.b)(P)&&Object(C.b)({collector:i,generator:ia.generateLine,args:[n.getStyle().id,P,b.d,this.tileAttrs,O]}));var L=i.getAccumulatedData(),T=new M.a("dynamicObject",L.data,r,j.coords);o.addObject(T),this.tileObjects.push(T),this.isInteractive&&this.identifyIds.push(L.identifyIds)}}this.isInteractive&&a.resetCache(),i.reset(),this.mapState.needRerender=!0}},e}(j),oa=n(80),aa=function(t){function e(e,n){var i,r,o,a,c,l,u=t.call(this,e)||this;return u.removed=!1,u.options=n,u.interactive=null===(i=n.interactive)||void 0===i||i,u.points=u.options.coordinates.map(s.l),u.stateDiffer=new vt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}]),u.debouncedGenerate=Object(It.a)((function(){u.generate()}),200),u.tileAttrs=Object(E.c)({previousPointX:0,previousPointY:0,nextPointX:0,nextPointY:0,beginningIsCut:0,endingIsCut:0,componentDistanceStart:0,objectLength:0,id:u.interactive?[0,0]:NaN}),u.modules.layers.addLayer(u),u.dashLayerRaw={type:"dashedLine",id:"dynamic-dashed-polyline-dash-"+u.uniqId,minzoom:u.options.minZoom,maxzoom:u.options.maxZoom,style:{color:u.options.dashColor||"#2480ff",dashLength:null!==(r=u.options.dashLength)&&void 0!==r?r:6,gapColor:u.options.gapColor||"#ffffff00",gapLength:null!==(o=u.options.gapLength)&&void 0!==o?o:20,width:null!==(a=u.options.width)&&void 0!==a?a:8}},u.baseLayerRaw={type:"line",id:"dynamic-dashed-polyline-base-"+u.uniqId,minzoom:u.options.minZoom,maxzoom:u.options.maxZoom,style:{color:u.options.dash2Color||"#ffffff",width:null!==(l=null===(c=u.options)||void 0===c?void 0:c.width2)&&void 0!==l?l:12}},u.dashLayer=Object(A.d)(u.dashLayerRaw),u.baseLayer=Object(A.d)(u.baseLayerRaw),u.generate(),u}return Object(x.c)(e,t),e.prototype.update=function(){this.stateDiffer.check(this.mapState)&&this.debouncedGenerate()},e.prototype.remove=function(){this.removed=!0,this.interactive&&this.modules.identifier.resetCache(),this.baseLayer&&this.modules.dynamicStyle.removeLayer(this.baseLayer.innerId),this.dashLayer&&this.modules.dynamicStyle.removeLayer(this.dashLayer.innerId),t.prototype.destroy.call(this)},e.prototype.setStyle=function(t){var e,n=t.dashColor,i=t.dash2Color,r=t.gapColor,o=this.modules.dynamicStyle;this.dashLayer&&(void 0!==n&&(this.dashLayerRaw.style.color=n),void 0!==r&&(this.dashLayerRaw.style.gapColor=r),(e=Object(A.d)(this.dashLayerRaw))&&o.updateLayerStyle(this.dashLayer.innerId,e)),this.baseLayer&&(void 0!==i&&(this.baseLayerRaw.style.color=i),(e=Object(A.d)(this.baseLayerRaw))&&o.updateLayerStyle(this.baseLayer.innerId,e)),this.mapState.needRerender=!0},e.prototype.generate=function(){var t=this;if(!(this.points.length<2||this.removed)){var e=this.modules,n=e.dynamicStyle,i=e.collector,r=e.renderer,o=e.tileManager,a=e.map,u=e.identifier,d=b.c.tileProps,f=Math.min(Math.floor(a.getZoom()),12),h=Object(s.r)(f),p=ta(this.points,h),m=c.d(),v=l.e();this.tileObjects.forEach((function(e){e.clean(t.mapState),o.removeObject(e)})),this.tileObjects=[];for(var _=[],y=0,g=0,x=p;g<x.length;g++){var w=x[g];l.h(v);for(var S=0;S<w.length;S++)l.f(v,w[S]);l.a(m,v);var I=Object(s.g)(m,f),j=Object(Ti.e)(I),O=[[],[]],P=0;for(S=0;S<w.length;S++)if(Object(s.k)(m,w[S],j),O[0][S]=m[0],O[1][S]=m[1],0!==S){var L=O[0][S]-O[0][S-1],T=O[1][S]-O[1][S-1];P+=Math.sqrt(L*L+T*T)}y+=P,_.push({vertices:O,tileInfo:j,distance:P})}var k=0;_.forEach((function(e,a){var c,l,u,f=e.tileInfo,h=e.distance,v=e.vertices;if(t.tileAttrs[d.beginningIsCut]=0,t.tileAttrs[d.endingIsCut]=0,t.tileAttrs[d.previousPointX]=0,t.tileAttrs[d.previousPointY]=0,t.tileAttrs[d.nextPointX]=0,t.tileAttrs[d.nextPointY]=0,t.tileAttrs[d.componentDistanceStart]=k,k+=h,t.tileAttrs[d.objectLength]=y,0!==a){var g=(u=p[a-1])[u.length-2];Object(s.k)(m,g,f),t.tileAttrs[d.beginningIsCut]=1,t.tileAttrs[d.previousPointX]=m[0],t.tileAttrs[d.previousPointY]=m[1]}if(a!==_.length-1&&(g=(u=p[a+1])[1],Object(s.k)(m,g,f),t.tileAttrs[d.endingIsCut]=1,t.tileAttrs[d.nextPointX]=m[0],t.tileAttrs[d.nextPointY]=m[1]),Object(Ti.n)(f.coords,o.getViewportVertices())){t.dashLayer&&(n.addLayer(t.dashLayer,null!==(c=t.options.zIndex)&&void 0!==c?c:0),Object(C.b)({collector:i,generator:oa.generateDashedLine,args:[n.getStyle().id,t.dashLayer,b.d,t.tileAttrs,v]})),t.baseLayer&&(n.addLayer(t.baseLayer,null!==(l=t.options.zIndex2)&&void 0!==l?l:-1),Object(C.b)({collector:i,generator:ia.generateLine,args:[n.getStyle().id,t.baseLayer,b.d,t.tileAttrs,v]}));var x=i.getAccumulatedData(),w=new M.a("dynamicObject",x.data,r,f.coords);o.addObject(w),t.tileObjects.push(w),t.interactive&&t.identifyIds.push(x.identifyIds)}})),this.interactive&&u.resetCache(),i.reset(),this.mapState.needRerender=!0}},e}(j),sa=n(56),ca=n(54),la=function(t){function e(e,n){var i,r=t.call(this,e)||this;r.options=n,r.isInteractive=null===(i=n.interactive)||void 0===i||i;var o=r.options.coordinates.map((function(t){var e=t.map(s.l);if(e.length>1){var n=e[0],i=e[e.length-1];n[0]===i[0]&&n[1]===i[1]||e.push(n)}return e})),a=[],u=[],d=r.modules,f=d.dynamicStyle,h=d.collector,p=d.renderer,m=d.tileManager,v=d.identifier,_=d.layers;o.forEach((function(t){a.length&&u.push(a.length),a=a.concat(t)}));var y=Object(A.d)({type:"polygon",id:"dynamic-polygon-"+r.uniqId,minzoom:r.options.minZoom,maxzoom:r.options.maxZoom,style:{color:r.options.color||"#3388ff33"}});if(!y)return r;f.addLayer(y,r.options.zIndex),r.fillLayerId=y.innerId;for(var g=Object(E.c)({id:r.isInteractive?[0,0]:NaN}),x=l.e(),w=0;w<a.length;w++)l.f(x,a[w]);for(var S=Object(s.d)(x),I=Object(Ti.e)(S),j=[],O=0;O<a.length;O++)j.push(a[O][0]),j.push(a[O][1]);var P=sa(j,u),L=c.d(),T=[[],[],[]];for(O=0;O<P.length;O+=3){for(w=0;w<3;w++)Object(s.k)(L,a[P[O+w]],I),T[0][w]=L[0],T[1][w]=L[1],T[2][w]=0;Object(C.b)({collector:h,generator:ca.generatePolygon,args:[f.getStyle(),y,b.d,g,T]})}if(0!==r.options.strokeWidth){var k=Object(A.d)({type:"line",id:"dynamic-polygon-stroke-"+r.uniqId,minzoom:r.options.minZoom,maxzoom:r.options.maxZoom,style:{color:r.options.strokeColor||"#3388ff",width:r.options.strokeWidth||3}});if(k){f.addLayer(k,r.options.zIndex),r.borderLayerId=k.innerId;var z=Object(E.c)({id:r.isInteractive?[0,0]:NaN,beginningIsCut:0,endingIsCut:0});o.forEach((function(t){var e=[[],[],[]];t.forEach((function(t,n){Object(s.k)(L,t,I),e[0][n]=L[0],e[1][n]=L[1]})),Object(C.b)({collector:h,generator:ia.generateLine,args:[f.getStyle().id,k,b.d,z,e]})}))}}var D=h.getAccumulatedData(),F=new M.a("dynamicObject",D.data,p,I.coords);return m.addObject(F),r.tileObjects.push(F),r.isInteractive&&r.identifyIds.push(D.identifyIds),_.addLayer(r),h.reset(),r.mapState.needRerender=!0,r.isInteractive&&v.resetCache(),r}return Object(x.c)(e,t),e.prototype.remove=function(){this.isInteractive&&this.modules.identifier.resetCache(),this.fillLayerId&&this.modules.dynamicStyle.removeLayer(this.fillLayerId),this.borderLayerId&&this.modules.dynamicStyle.removeLayer(this.borderLayerId),t.prototype.destroy.call(this)},e}(j),ua=function(t){function e(e,n){var i,r,o,a,u,d=t.call(this,e)||this;if(d.options=n,d.isInteractive=null===(i=n.interactive)||void 0===i||i,n.segments&&n.segments<=0)return d;var f=d.modules,h=f.dynamicStyle,p=f.collector,m=f.renderer,v=f.tileManager,_=f.identifier,y=f.layers,g=function(t,e,n){var i=[];if(n>0){i.push(c.i(t[0]+e,t[1],t[2]));for(var r=Math.PI/Math.ceil(n/2),o=r;o<Math.PI;o+=r){var a=e*Math.cos(o),s=e*Math.sin(o);i.push(c.i(t[0]+a,t[1]+s,t[2]),c.i(t[0]+a,t[1]-s,t[2]))}i.push(c.i(t[0]-e,t[1],t[2]))}return i}(Object(s.l)(d.options.coordinates),Object(s.b)(d.options.coordinates,d.options.radius),null!==(r=d.options.segments)&&void 0!==r?r:150),x=Object(A.d)({type:"polygon",id:"dynamic-circle-"+d.uniqId,minzoom:d.options.minZoom,maxzoom:d.options.maxZoom,style:{color:null!==(o=d.options.color)&&void 0!==o?o:"#3388ff33",strokeWidth:null!==(a=d.options.borderWidth)&&void 0!==a?a:1,strokeColor:null!==(u=d.options.borderColor)&&void 0!==u?u:"#3388ff"}});if(!x)return d;h.addLayer(x,d.options.zIndex),d.layerId=x.innerId;for(var w=Object(E.c)({id:d.isInteractive?[0,0]:NaN}),S=l.e(),I=0;I<g.length;I++)l.f(S,g[I]);var j=Object(s.d)(S),O=Object(Ti.e)(j),P=[[],[],[]],L=c.d(),T=0!==d.options.borderWidth?1:0;for(I=0;I<g.length;I++)Object(s.k)(L,g[I],O),P[0][I]=L[0],P[1][I]=L[1],P[2][I]=T;Object(C.b)({collector:p,generator:ca.generatePolygon,args:[h.getStyle(),x,b.d,w,P]});var k=p.getAccumulatedData(),z=new M.a("dynamicObject",k.data,m,O.coords);return v.addObject(z),d.tileObjects.push(z),d.isInteractive&&d.identifyIds.push(k.identifyIds),y.addLayer(d),p.reset(),d.mapState.needRerender=!0,d.isInteractive&&_.resetCache(),d}return Object(x.c)(e,t),e.prototype.remove=function(){this.isInteractive&&this.modules.identifier.resetCache(),this.layerId&&this.modules.dynamicStyle.removeLayer(this.layerId),t.prototype.destroy.call(this)},e}(j);function da(t,e,n,i){fa(t,n,i),fa(e,2*n,2*i),fa(e,2*n+1,2*i+1)}function fa(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function ha(t,e,n,i){var r=t-n,o=e-i;return r*r+o*o}var pa=function(t){return t[0]},ma=function(t){return t[1]},va=function(){function t(t,e,n,i,r){void 0===e&&(e=pa),void 0===n&&(n=ma),void 0===i&&(i=64),void 0===r&&(r=Float64Array),this.nodeSize=i,this.points=t;for(var o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new r(2*t.length),c=0;c<t.length;c++)a[c]=c,s[2*c]=e(t[c]),s[2*c+1]=n(t[c]);!function t(e,n,i,r,o,a){if(!(o-r<=i)){var s=r+o>>1;!function t(e,n,i,r,o,a){for(;o>r;){if(o-r>600){var s=o-r+1,c=i-r+1,l=Math.log(s),u=.5*Math.exp(2*l/3),d=.5*Math.sqrt(l*u*(s-u)/s)*(c-s/2<0?-1:1);t(e,n,i,Math.max(r,Math.floor(i-c*u/s+d)),Math.min(o,Math.floor(i+(s-c)*u/s+d)),a)}var f=n[2*i+a],h=r,p=o;for(da(e,n,r,i),n[2*o+a]>f&&da(e,n,r,o);h<p;){for(da(e,n,h,p),h++,p--;n[2*h+a]<f;)h++;for(;n[2*p+a]>f;)p--}n[2*r+a]===f?da(e,n,r,p):da(e,n,++p,o),p<=i&&(r=p+1),i<=p&&(o=p-1)}}(e,n,s,r,o,a%2),t(e,n,i,r,s-1,a+1),t(e,n,i,s+1,o,a+1)}}(a,s,i,0,a.length-1,0)}return t.prototype.range=function(t,e,n,i){return function(t,e,n,i,r,o,a){for(var s,c,l=[0,t.length-1,0],u=[];l.length;){var d=l.pop(),f=l.pop(),h=l.pop();if(f-h<=a)for(var p=h;p<=f;p++)s=e[2*p],c=e[2*p+1],s>=n&&s<=r&&c>=i&&c<=o&&u.push(t[p]);else{var m=Math.floor((h+f)/2);s=e[2*m],c=e[2*m+1],s>=n&&s<=r&&c>=i&&c<=o&&u.push(t[m]);var v=(d+1)%2;(0===d?n<=s:i<=c)&&(l.push(h),l.push(m-1),l.push(v)),(0===d?r>=s:o>=c)&&(l.push(m+1),l.push(f),l.push(v))}}return u}(this.ids,this.coords,t,e,n,i,this.nodeSize)},t.prototype.within=function(t,e,n){return function(t,e,n,i,r,o){for(var a=[0,t.length-1,0],s=[],c=r*r;a.length;){var l=a.pop(),u=a.pop(),d=a.pop();if(u-d<=o)for(var f=d;f<=u;f++)ha(e[2*f],e[2*f+1],n,i)<=c&&s.push(t[f]);else{var h=Math.floor((d+u)/2),p=e[2*h],m=e[2*h+1];ha(p,m,n,i)<=c&&s.push(t[h]);var v=(l+1)%2;(0===l?n-r<=p:i-r<=m)&&(a.push(d),a.push(h-1),a.push(v)),(0===l?n+r>=p:i+r>=m)&&(a.push(h+1),a.push(u),a.push(v))}}return s}(this.ids,this.coords,t,e,n,this.nodeSize)},t}();function _a(t,e,n){return t*(1-n)+e*n}var ya={0:"rgba(89, 0, 89, 0)",.25:"rgba(0, 0, 89, 0.78)",.5:"rgba(0, 198, 68, 1)",.7:"rgba(198, 186, 0, 1)",.8:"rgba(249, 152, 0, 1)",1:"rgba(200, 0, 0, 1)"},ga=function(t){function e(e,n){void 0===n&&(n={});var i=t.call(this,e)||this;i.fillBuffers=function(){if(i.tree){var t=Object(s.c)(i.mapState),e=Object(s.d)(t);if(!i.tileCoords||(n=e,r=i.tileCoords,!n.every((function(t,e){return t===r[e]})))){var n,r;i.resetBuffers(),i.tileCoords=e;var o=Object(s.r)(e[2]),a=Object(s.o)(e);Ft.d(i.matrix,a,c.i(o,o,Rt.l));var l=i.tree.range(a[0],a[1],a[0]+o,a[1]+o).map((function(t){return i.points[t]})),u=Object(Ti.e)(e);i.buffers=function(t,e){var n=[],i=[],r=[],o=c.d();return t.forEach((function(t){var a=t.mapCoords,c=t.weight;Object(s.k)(o,a,e);for(var l=o[0],u=o[1],d=0;d<6;d++)n.push(l,u),r.push(c);i.push(-1,-1,1,-1,-1,1,-1,1,1,-1,1,1)})),{vertices:new Pn.a(new Uint16Array(n),{itemSize:2,dataType:Pn.a.UnsignedShort,stride:0,offset:0,normalized:!0}),widens:new Pn.a(new Int8Array(i),{itemSize:2,dataType:Pn.a.Byte,stride:0,offset:0,normalized:!1}),weights:new Pn.a(new Float32Array(r),{itemSize:1,dataType:Pn.a.Float,stride:0,offset:0,normalized:!1})}}(l,u),i.vertexCount=6*l.length,i.vao=new Tn(i.offscreenProgram,{a_vec2_position:i.buffers.vertices,a_vec2_widen:i.buffers.widens,a_float_weight:i.buffers.weights})}}},i.resizeFrameBuffer=function(){i.frameBuffer.setSize([Math.ceil(i.mapState.size[0]*window.devicePixelRatio/i.downscale),Math.ceil(i.mapState.size[1]*window.devicePixelRatio/i.downscale)]),i.frameBuffer.bind(i.gl),i.frameBuffer.unbind(i.gl),i.modules.imageManager.updatePreparedTexture(i.offscreenTextureIndex,i.frameBuffer.getTexture()),i.needRerender=!0,i.mapState.needRerender=!0};var r=n.downscale,o=n.palette,a=n.points,l=n.minZoom,u=n.maxZoom,d=n.zIndex,f=n.pointRadius,h=n.intensity,p=n.opacity;i.rampTextureIndex=i.modules.imageManager.addPreparedTexture(function(t,e){var n=function(t,e){for(var n=Object.keys(t).map((function(t){return Number(t)})).sort((function(t,e){return t-e})),i=0,r=[],o=e-1,a=0;a<e;a++){var s=a/o;s>n[i+1]&&i++;for(var c=n[i],l=n[i+1],u=(s-c)/(l-c),d=0;d<4;d++)r[4*a+d]=_a(t[c][d],t[l][d],u)}return r.map((function(t){return Math.round(t)}))}(function(t){var e=new Error("The palette is not valid. The heatmap won't be rendered."),n=Object.getOwnPropertyNames(t);if(0===n.length)throw e;var i=n.map((function(t){return Number(t)}));if(i.some((function(t){return Number.isNaN(t)||t<0||t>1})))throw e;var r={};i.forEach((function(n){if("string"!=typeof t[n])throw e;r[n]=Object(Si.a)(t[n])}));var o=Math.min.apply(Math,i),a=Math.max.apply(Math,i);return o>0&&(r[0]=r[o]),a<1&&(r[1]=r[a]),r}(t),256);return new Et(new Uint8Array(n),{size:[256,1]})}(null!=o?o:ya)),i.gl=i.modules.renderer.getRenderingContext(),i.downscale=null!=r?r:1,i.frameBuffer=new Dt({size:[Math.ceil(i.mapState.size[0]*window.devicePixelRatio/i.downscale),Math.ceil(i.mapState.size[1]*window.devicePixelRatio/i.downscale)],magFilter:Et.LinearFilter,minFilter:Et.LinearFilter,wrapS:Et.ClampToEdgeWrapping,wrapT:Et.ClampToEdgeWrapping}),i.offscreenTextureIndex=i.modules.imageManager.addPreparedTexture(i.frameBuffer.getTexture()),i.offscreenProgram=new li({vertex:xi("heatmap"),fragment:wi("heatmap"),uniforms:[{name:"u_mat4_mvp",type:"mat4"},{name:"u_float_radius",type:"1f"},{name:"u_float_intensity",type:"1f"},{name:"u_float_tile_to_pixel_ratio",type:"1f"}],attributes:[{name:"a_vec2_position",location:0},{name:"a_vec2_widen",location:1},{name:"a_float_weight",location:2}]}),i.points=[],i.vertexCount=0,i.isDestroyed=!1,i.needRerender=!1,i.matrix=Ft.b(),i.vpMatrix=Ft.b(),i.mvpMatrix=Ft.b(),i.viewDiffer=new vt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"rotation",type:"number"},{path:"pitch",type:"number"},{path:"padding",type:"padding"}]),i.sizeDiffer=new vt([{path:"size",type:"vec2"}]),i.debouncedResize=Object(It.a)((function(){i.resizeFrameBuffer()}),200),i.throttledFillBuffer=ht(i.fillBuffers,50);var m=Object(A.d)({type:"heatmap",id:"dynamic-heatmap-"+i.uniqId,minzoom:l,maxzoom:u,style:{opacity:null!=p?p:.5,intensity:null!=h?h:3,radius:null!=f?f:10}});if(!m)throw new Error("There is no correct style layer for heatmap");return i.layer=m,i.modules.dynamicStyle.addLayer(m,d),a&&i.setPoints(a),i}return Object(x.c)(e,t),e.prototype.setPoints=function(t){if(!this.isDestroyed){if(this.points=t.map((function(t){var e=t.coordinates,n=t.weight;return{mapCoords:Object(s.l)(e),weight:null!=n?n:1}})),this.tree=new va(this.points,(function(t){return t.mapCoords[0]}),(function(t){return t.mapCoords[1]})),this.tileCoords=void 0,!this.tileObjects.length){var e=this.modules,n=e.layers,i=e.collector,r=e.dynamicStyle,o=e.renderer,a=e.tileManager;Object(C.b)({collector:i,generator:Cn.generateHeatmapTexture,args:[r.getStyle().id,this.layer,this.offscreenTextureIndex,this.rampTextureIndex]});var c=i.getAccumulatedData(),l=new M.a("dynamicObject",c.data,o);a.addObject(l),this.tileObjects.push(l),n.addLayer(this),i.reset()}this.mapState.needRerender=!0,this.needRerender=!0}},e.prototype.update=function(){if(this.sizeDiffer.check(this.mapState)&&this.debouncedResize(),(this.needRerender||this.viewDiffer.check(this.mapState))&&this.tree){var t=this.mapState,e=t.zoom,n=t.styleZoom,i=t.styleState,r=this.gl;if(Object(a.F)(this.vpMatrix,this.mapState),this.throttledFillBuffer(),this.vao&&this.buffers&&this.tree&&this.tileCoords){var o=Object(F.c)(n,i,[]),s=Object(F.i)(this.layer.style.radius,o),c=Object(F.i)(this.layer.style.intensity,o),l=Rt.m*Math.pow(2,e-this.tileCoords[2])*window.devicePixelRatio;this.offscreenProgram.enable(r),this.offscreenProgram.bind(r,{u_mat4_mvp:Ft.g(this.mvpMatrix,this.vpMatrix,this.matrix),u_float_radius:s*window.devicePixelRatio,u_float_intensity:c,u_float_tile_to_pixel_ratio:1/l}),this.vao.bind({gl:r,extensions:this.modules.renderer.webGlExtensions}),this.gl.viewport(0,0,Math.ceil(this.mapState.size[0]*window.devicePixelRatio/this.downscale),Math.ceil(this.mapState.size[1]*window.devicePixelRatio/this.downscale)),this.frameBuffer.bind(r),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.blendFunc(r.ONE,r.ONE),r.enable(r.BLEND),r.drawArrays(r.TRIANGLES,0,this.vertexCount),this.frameBuffer.unbind(r),this.needRerender=!1}}},e.prototype.destroy=function(){if(!this.isDestroyed){t.prototype.destroy.call(this),this.points=[],this.tree=void 0,this.isDestroyed=!0,this.resetBuffers(),this.layer&&this.modules.dynamicStyle.removeLayer(this.layer.innerId),this.frameBuffer.remove(this.gl);var e=this.modules.imageManager;e.deleteTexture(this.offscreenTextureIndex),e.deleteTexture(this.rampTextureIndex)}},e.prototype.resetBuffers=function(){if(this.buffers){for(var t in this.buffers)this.buffers[t].remove();this.buffers=void 0}this.vao&&(this.vao.remove(),this.vao=void 0)},e}(j),ba=n(51),xa=function(t){function e(e,n){var i=t.call(this,e)||this;i.options=n,i.isHidden=!1,i.isInteractive=!!i.options.interactive,i.position=Object(s.l)(i.options.coordinates),i.isDestroyed=!1;var r=i.modules,o=r.dynamicStyle,a=r.collector,c=r.renderer,l=r.tileManager,u=r.identifier,d=r.layers,f=r.imageManager;return Promise.resolve().then((function(){var t=i.options.image,e=t.url,n=t.size,r=t.pixelRatio;return f.loadTexture(e,{size:n,pixelRatio:r,imagePadding:Rt.a})})).then((function(t){if(void 0!==t&&!i.isDestroyed){var e=i.options,n=e.image,r=e.targetSize,f=e.offset,h=Object(A.d)({type:"stretchableImage",id:"dynamic-polygon-"+i.uniqId,minzoom:i.options.minZoom,maxzoom:i.options.maxZoom,style:{sourceSize:n.size,targetSize:r,offset:f,stretchX:n.stretchX,stretchY:n.stretchY,pixelRatio:n.pixelRatio}});if(h){o.addLayer(h,i.options.zIndex),i.styleLayerId=h.innerId,Object(C.b)({collector:a,generator:kn.generateStretchableImage,args:[o.getStyle().id,h,b.d,Object(E.c)({id:i.isInteractive?[0,0]:void 0}),t,[0,0]]});var p=a.getAccumulatedData(),m=new M.a("dynamicObject",p.data,c,Object(s.j)(i.position));i.isInteractive&&i.identifyIds.push(p.identifyIds),l.addObject(m),i.tileObjects.push(m),d.addLayer(i),a.reset(),i.mapState.needRerender=!0,i.isInteractive&&u.resetCache()}}})),i}return Object(x.c)(e,t),e.prototype.destroy=function(){this.isDestroyed=!0,this.isInteractive&&this.modules&&this.modules.identifier.resetCache(),this.styleLayerId&&this.modules.dynamicStyle.removeLayer(this.styleLayerId),t.prototype.destroy.call(this)},e.prototype.hide=function(){var t=this;this.isHidden||(this.isHidden=!0,this.tileObjects.length&&this.tileObjects.forEach((function(e){t.modules.tileManager.removeObject(e)})))},e.prototype.show=function(){var t=this;this.isHidden&&(this.isHidden=!1,this.tileObjects.length&&this.tileObjects.forEach((function(e){t.modules.tileManager.addObject(e)})))},e.prototype.setCoordinates=function(t){var e=this;this.position=Object(s.l)(t),this.tileObjects.forEach((function(t){t.setTileCoords(Object(s.j)(e.position))})),0===this.tileObjects.length||this.isHidden||(this.mapState.needRerender=!0)},e}(j),wa=n(53),Sa=[0,0],Ia=[0,0,0,0],ja=function(t){function e(e,n){var i,r,c,l,u,d,f,h,p,m=t.call(this,e)||this;m.status="visible",m.options=n;var v=null!==(i=n.font)&&void 0!==i?i:"Open_Sans",_=null!==(r=n.fontSize)&&void 0!==r?r:o.fonts.baseSize,y=null!==(c=n.letterSpacing)&&void 0!==c?c:0,g=null!==(l=n.lineHeight)&&void 0!==l?l:o.fonts.baseLineHeight,x=null!==(u=m.options.offset)&&void 0!==u?u:Sa,w=Object(A.d)({type:"point",id:"dynamic-pointLabel-"+m.uniqId,minzoom:m.options.minZoom,maxzoom:m.options.maxZoom,style:{textFont:v,textFontSize:_,textColor:null!==(d=n.color)&&void 0!==d?d:"#000000",textHaloWidth:null!==(f=n.haloRadius)&&void 0!==f?f:0,textHaloColor:null!==(h=n.haloColor)&&void 0!==h?h:"#ffffff",textLetterSpacing:y,textLineHeight:g,textOffset:x}});if(m.position=Object(s.l)(m.options.coordinates),!w)return m;var S=m.modules,I=S.dynamicStyle,j=S.collector,O=S.assetManager,P=S.styleManager,L=S.renderer,T=S.tileManager,k=S.layers,z=null!==(p=m.options.zIndex)&&void 0!==p?p:0;I.addLayer(w,z+(m.options.image?1e-5:0));var D=Object(E.c)({db_label:m.options.text}),F=Object(s.j)(m.position);Object(C.b)({collector:j,generator:wa.a,args:[I.getStyle(),w,F,{},b.c,D,[[0],[0]],-1,Object(Wo.e)(window.devicePixelRatio)]});var R=j.getAccumulatedData();if(!R.labels.length)return m;var B=[{metatileHash:-1,labels:R.labels,styleId:I.getStyle().id}],N=Object(ba.b)(B,Ki.c.DynamicObject,P,m.mapState.styleState,m.mapState.styleZoom);if(1!==N.length)return m;var U=N[0];return Vo.d.then((function(){var t;U.label=null!==(t=Object(Vo.c)(U.label))&&void 0!==t?t:"",U.updateRanges()})).then((function(){return Promise.all(U.ranges.map((function(t){return O.loadFont(v,t)})))})).then((function(){if("destroyed"!==m.status){U.textMetrics=Object(Li.c)(U.label,y,O.getFontGlyphs(v));var t=m.options.image,i=function(t){return[t&&void 0!==t[0]?Object(a.d)(t[0],0,1):.5,t&&void 0!==t[1]?Object(a.d)(t[1],0,1):.5]}(n.anchor),r=_/o.fonts.baseSize,c=_*g*U.textMetrics.lines.length,l=r*U.textMetrics.maxWidth,u=[-l*(i[0]-.5),-c*(i[1]-.5)],d=x[0],f=x[1];Object(C.b)({collector:j,generator:ue.generateTextElement,args:[U,1,U.textMetrics,[0,0,0],0,[d+u[0],f+u[1]],w,I.getStyle().fontNameToIndex[v]]});var h=j.getAccumulatedData();if(m.tileObject=new M.a("dynamicObject",h.data,L,Object(s.j)(m.position)),"visible"===m.status&&T.addObject(m.tileObject),k.addLayer(m),m.tileObjects.push(m.tileObject),j.reset(),m.mapState.needRerender=!0,t){var p=t.padding||Ia,b=p[0],S=p[1],P=p[2],E=p[3];m.backgroundImage=new xa(e,{image:t,coordinates:m.options.coordinates,targetSize:[l+E+S,c+b+P],offset:[(S-E)/2+d+u[0],(P-b)/2+f+u[1]],zIndex:z,minZoom:m.options.minZoom,maxZoom:m.options.maxZoom})}}})),m}return Object(x.c)(e,t),e.prototype.hide=function(){"visible"===this.status&&(this.status="hidden",this.tileObject&&this.modules.tileManager.removeObject(this.tileObject),this.backgroundImage&&this.backgroundImage.hide())},e.prototype.show=function(){"hidden"===this.status&&(this.status="visible",this.tileObject&&this.modules.tileManager.addObject(this.tileObject),this.backgroundImage&&this.backgroundImage.show())},e.prototype.remove=function(){"destroyed"!==this.status&&(t.prototype.destroy.call(this),this.backgroundImage&&this.backgroundImage.destroy(),this.status="destroyed")},e.prototype.setCoordinates=function(t){var e=this;"destroyed"!==this.status&&(this.position=Object(s.l)(t),this.tileObjects.forEach((function(t){t.setTileCoords(Object(s.j)(e.position))})),this.backgroundImage&&this.backgroundImage.setCoordinates(t),0!==this.tileObjects.length&&"visible"===this.status&&(this.mapState.needRerender=!0))},e.prototype.getCoordinates=function(){return Object(s.m)(this.position)},e}(j),Oa=n(19),Ma=[.5,.5],Pa=[0,18],La=function(t){function e(e,n){var i=t.call(this,e,n.draggable)||this;i.map=e;var r=n.coordinates,c=n.size,l=n.zIndex,u=n.minZoom,d=n.maxZoom,f=n.interactive,h=n.hoverIcon,p=n.hoverSize,m=n.hoverAnchor,v=n.label,_=n.rotation;i.status="normal",i.position=Object(s.l)(r),i.rotation=Object(a.g)(null!=_?_:0),i.zIndex=void 0!==l?l:0,i.minZoom=null!=u?u:-1/0,i.maxZoom=null!=d?d:1/0,i.interactive=void 0===f||f;var y=void 0!==n.icon?n.icon:o.defaultMarkerIcon,g=void 0!==n.icon?n.anchor:o.defaultMarkerAnchor;return i.on("mouseover",i.switchToHoveredStyle),i.on("mouseout",i.switchToNormalStyle),i.modules.layers.addLayer(i),i.setIcon({icon:y,anchor:g,size:c}),void 0!==h&&i.setHoverIcon({icon:h,anchor:m,size:p}),i.setLabel(v),i}return Object(x.c)(e,t),e.prototype.destroy=function(){var e;"destroyed"!==this.status&&(this.status="destroyed",null===(e=this.label)||void 0===e||e.remove(),this.interactive&&this.modules.identifier.resetCache(),this.off("mouseover",this.switchToHoveredStyle),this.off("mouseout",this.switchToNormalStyle),t.prototype.destroy.call(this))},e.prototype.setRotation=function(t){"destroyed"!==this.status&&(this.rotation=Object(a.g)(t),this.normalStateData&&(this.normalStateData.styleLayer.style.iconRotation=this.rotation,this.mapState.needRerender=!0),this.hoverStateData&&(this.hoverStateData.styleLayer.style.iconRotation=this.rotation,this.mapState.needRerender=!0))},e.prototype.getRotation=function(){return Object(a.A)(this.rotation)},e.prototype.setIcon=function(t){var e=this;"destroyed"!==this.status&&this.modules.imageCache.getRasterSet(t.icon,void 0,t.size,t.anchor).then((function(n){if("destroyed"!==e.status){var i=e.normalStateData,r=e.getMarkerStateData(n,t);"normal"===e.status&&(i&&e.modules.tileManager.removeObject(i.tileObject),e.modules.tileManager.addObject(r.tileObject),e.mapState.needRerender=!0,e.interactive&&e.modules.identifier.resetCache()),i&&(Object(a.j)(e.tileObjects,i.tileObject),Object(a.j)(e.identifyIds,i.identifyIds),i.tileObject.clean(e.mapState)),e.tileObjects.push(r.tileObject),e.interactive&&e.identifyIds.push(r.identifyIds),e.normalStateData=r}}))},e.prototype.setHoverIcon=function(t){var e=this;if("destroyed"!==this.status)return t?void this.modules.imageCache.getRasterSet(t.icon,void 0,t.size,t.anchor).then((function(n){if("destroyed"!==e.status){var i=e.hoverStateData,r=e.getMarkerStateData(n,t);"hover"===e.status&&(i&&e.modules.tileManager.removeObject(i.tileObject),e.modules.tileManager.addObject(r.tileObject),e.mapState.needRerender=!0,e.interactive&&e.modules.identifier.resetCache()),i&&(Object(a.j)(e.tileObjects,i.tileObject),Object(a.j)(e.identifyIds,i.identifyIds),i.tileObject.clean(e.mapState)),e.tileObjects.push(r.tileObject),e.interactive&&e.identifyIds.push(r.identifyIds),e.hoverStateData=r}})):("hover"===this.status&&this.switchToNormalStyle(),void(this.hoverStateData&&(Object(a.j)(this.tileObjects,this.hoverStateData.tileObject),Object(a.j)(this.identifyIds,this.hoverStateData.identifyIds),this.hoverStateData.tileObject.clean(this.mapState),this.hoverStateData=void 0)))},e.prototype.setLabel=function(t){var e,n,i,r,o;"destroyed"!==this.status&&(null===(e=this.label)||void 0===e||e.remove(),t&&(this.label=new ja(this.map,Object(x.a)(Object(x.a)({coordinates:this.getCoordinates()},t),{minZoom:Math.max(null!==(n=t.minZoom)&&void 0!==n?n:this.minZoom,this.minZoom),maxZoom:Math.min(null!==(i=t.maxZoom)&&void 0!==i?i:this.maxZoom,this.maxZoom),fontSize:null!==(r=t.fontSize)&&void 0!==r?r:18,anchor:t.anchor||Ma,offset:t.offset||Pa,zIndex:null!==(o=t.zIndex)&&void 0!==o?o:this.zIndex+1e-5}))))},e.prototype.setCoordinates=function(t){var e;this.setPosition(Object(s.l)(t)),null===(e=this.label)||void 0===e||e.setCoordinates(t)},e.prototype.getCoordinates=function(){return Object(s.m)(this.getPosition())},e.prototype.show=function(){var t;"hidden"===this.status&&(null===(t=this.label)||void 0===t||t.show(),this.normalStateData&&(this.modules.tileManager.addObject(this.normalStateData.tileObject),this.mapState.needRerender=!0,this.interactive&&this.modules.identifier.resetCache()),this.status="normal")},e.prototype.hide=function(){var t,e,n;if("destroyed"!==this.status&&"hidden"!==this.status){null===(t=this.label)||void 0===t||t.hide();var i="normal"===this.status?null===(e=this.normalStateData)||void 0===e?void 0:e.tileObject:null===(n=this.hoverStateData)||void 0===n?void 0:n.tileObject;i&&(this.modules.tileManager.removeObject(i),this.mapState.needRerender=!0,this.interactive&&this.modules.identifier.resetCache()),this.status="hidden"}},e.prototype.setPosition=function(t){this.position=t,this.tileObjects.length&&(this.tileObjects.forEach((function(e){e.setTileCoords(Object(s.j)(t))})),"hidden"!==this.status&&(this.mapState.needRerender=!0))},e.prototype.getPosition=function(){return this.position},e.prototype.isInteractive=function(){return this.interactive},e.prototype.contains=function(t){if(!this.normalStateData)return!1;var e=this.mapState,n=this.hoverStateData,i=this.normalStateData,r=void 0!==n?n.size:i.size,o=void 0!==n?n.anchor:i.anchor,s=Object(a.x)(e,this.position),c=s[0]-r[0]*o[0],l=s[0]+r[0]*(1-o[0]),u=s[1]-r[1]*o[1],d=s[1]+r[1]*(1-o[1]);return t[0]>c&&t[0]<l&&t[1]>u&&t[1]<d},e.prototype.switchToHoveredStyle=function(){if("normal"===this.status&&this.hoverStateData&&this.normalStateData){var t=this.modules.tileManager;t.removeObject(this.normalStateData.tileObject),t.addObject(this.hoverStateData.tileObject),this.status="hover",this.mapState.needRerender=!0}},e.prototype.switchToNormalStyle=function(){if("hover"===this.status&&this.normalStateData&&this.hoverStateData){var t=this.modules.tileManager;t.removeObject(this.hoverStateData.tileObject),t.addObject(this.normalStateData.tileObject),this.status="normal",this.mapState.needRerender=!0}},e.prototype.getMarkerStateData=function(t,e){var n=e.icon,i=e.anchor,r=e.size,o=this.zIndex,a=this.interactive,c=this.position,l=this.modules,u=l.collector,d=l.renderer,f=l.dynamicStyle,h=l.styleManager,p=Object(E.c)({id:a?[0,0]:NaN,dpi:96*window.devicePixelRatio}),m=Object(s.j)(c),v=Object(A.d)({type:"point",id:"dynamic-marker-"+this.uniqId,minzoom:this.minZoom,maxzoom:this.maxZoom,style:{iconImage:n,iconAnchor:i,iconRotation:this.rotation}});if(!v)throw new Error("Marker with icon "+n+" was created with null style layer");f.addLayer(v,o),f.appendRasterSet(t,Object(Oa.c)(n,v.style.iconAnchor[0],v.style.iconAnchor[1])),Object(C.b)({collector:u,generator:wa.a,args:[f.getStyle(),v,m,{},b.c,p,[[0],[0]],-1,Object(Wo.e)(window.devicePixelRatio)]});var _=u.getAccumulatedData(),y=_.identifyIds,g=_.labels;if(!g.length)throw new Error("Marker with icon "+n+" was created with empty labels");var x=[{metatileHash:-1,labels:g,styleId:f.getStyle().id}],w=Object(ba.b)(x,Ki.c.DynamicObject,h,this.mapState.styleState,this.mapState.styleZoom);if(1!==w.length)throw new Error("Marker with icon "+n+" has empty unpacked labels");var S=w[0];Object(ue.generateNotStretchableIconElement)(u,S,[0,0,0],0,t.rasters[0]);var I=u.getAccumulatedData().data;return u.reset(),{styleLayer:v,tileObject:new M.a("dynamicObject",I,d,m,this),identifyIds:y,icon:n,anchor:[t.rasters[0].anchorX,t.rasters[0].anchorY],size:r||[t.rasters[0].w/window.devicePixelRatio,t.rasters[0].h/window.devicePixelRatio]}},e}(z),Ta=n(23),ka=function(t,e){t.position=new Uint16Array(e),t.localID=new Uint32Array(e,4)},za=function(t,e,n,i,r){return Object(Ta.c)([t,e],n,i,r)},Ca=function(t,e,n,i,r,o){var a=o[0],s=o[1],c=t.idIndexer.getIndex(r[i.id],e,n,r[i.db_sublayer]),l=t.getBucket(n.type,"fill",za(e,n.innerId,n.dataKeys,i,r),ka),u=l.elements.offset;!function(t,e,n,i,r,o,a,s){var c=t.buffer,l=t.offset;c[l]=e+0,c[l+1]=e+1,c[l+2]=e+2,c[l+3]=e+2,c[l+4]=e+1,c[l+5]=e+3,t.offset=l+6}(l.indices,u),Ea(l,u++,a[0],s[0],c),Ea(l,u++,a[1],s[1],c),Ea(l,u++,a[2],s[2],c),Ea(l,u++,a[3],s[3],c),l.elements.offset=u};function Ea(t,e,n,i,r){var o=4*e;t.position[o]=n,t.position[o+1]=i;var a=2*e;t.localID[a]=r}var Aa=function(t){function e(e,n){var i=t.call(this,e)||this,r=i.modules,o=r.dynamicStyle,a=r.collector,u=r.renderer,d=r.tileManager,f=r.identifier,h=r.layers;i.options=n,i.points=[];var p=Object(A.d)({type:"polygon",id:"dynamic-polygon-"+i.uniqId,minzoom:i.options.minZoom,maxzoom:i.options.maxZoom,style:{color:i.options.color||"#0085a0"}});if(!p)return i;o.addLayer(p,i.options.zIndex),i.layerId=p.innerId;var m,v,_,y,g,x,w=Object(E.c)({id:i.options.interactive?[0,i.uniqId]:NaN});i.points=(m=Object(s.l)(i.options.center),v=Object(s.b)(i.options.center,i.options.width)/2,_=Object(s.b)(i.options.center,i.options.height)/2,[[(y=m[0])-v,(g=m[1])-_,x=m[2]],[y+v,g-_,x],[y-v,g+_,x],[y+v,g+_,x]]);for(var S=l.e(),I=0;I<i.points.length;I++)l.f(S,i.points[I]);var j=Object(s.d)(S),O=Object(Ti.e)(j),P=[[],[]],L=c.d();for(I=0;I<i.points.length;I++)Object(s.k)(L,i.points[I],O),P[0][I]=L[0],P[1][I]=L[1];Object(C.b)({collector:a,generator:Ca,args:[o.getStyle().id,p,b.d,w,P]});var T=a.getAccumulatedData(),k=new M.a("dynamicObject",T.data,u,j);return d.addObject(k),i.tileObjects.push(k),i.options.interactive&&i.identifyIds.push(T.identifyIds),h.addLayer(i),a.reset(),i.mapState.needRerender=!0,i.options.interactive&&f.resetCache(),i}return Object(x.c)(e,t),e.prototype.destroy=function(){void 0!==this.layerId&&this.modules.dynamicStyle.removeLayer(this.layerId),this.options.interactive&&this.modules&&this.modules.identifier.resetCache(),t.prototype.destroy.call(this)},e}(j),Da=n(68),Fa=n(72),Ra=function(){function t(t,e){var n=this;this.modules=t,this.options=e,this.id=Object(Da.a)(),this.type="raster",this.textureIndices={},this.tileLoader=new Fa.a("arrayBuffer"),this.attributes={},this.tiles=new Map,this.sourceAttrs=e.attributes||{},this.url=function(t){var e=Object(s.p)(t),i=e[0],r=e[1],o=e[2];return n.options.url(i,r,o)}}return t.prototype.deleteTextures=function(){for(var t in this.textureIndices)this.modules.imageManager.deleteTexture(this.textureIndices[t]);this.textureIndices={}},t.prototype.abortTileFetch=function(t){this.tileLoader.abortRequest(Object(Ti.c)(t))},t.prototype.deleteTile=function(t){var e=Object(Ti.c)(t);this.tiles.delete(e)},t.prototype.fetchTile=function(t){var e=this,n=Object(Ti.c)(t),i=this.url(t);return this.tileLoader.fetch(t,(function(){return i})).then((function(t){return e.tiles.set(n,t),[{regionId:0,metatileHash:-1}]}))},t.prototype.generateTile=function(t,e,n,i){return Object(x.b)(this,void 0,void 0,(function(){var n,i,r,o,a,l,u,d,f,h,p,m,v,_=this;return Object(x.d)(this,(function(y){switch(y.label){case 0:return n=[],i=[],r=this.modules.styleManager.getStyle(t.handyStyleId),o=Object(Ti.c)(e),(a=this.tiles.get(o))&&r?[4,this.modules.imageManager.addTexture(a,{imagePadding:0})]:[2,Promise.resolve({results:n,transferable:i})];case 1:if(void 0===(l=y.sent()))return[2,Promise.resolve({results:n,transferable:i})];for(this.textureIndices[o]=l,u=[[],[]],d=c.d(),f=function(t,e){var n=t[0],i=t[1],r=t[2];return[[n,i,r],[n+e,i,r],[n,i+e,r],[n+e,i+e,r]]}(Object(s.o)(e),Object(s.r)(e[2])),h=Object(Ti.e)(e),p=0;p<f.length;p++)Object(s.k)(d,f[p],h),u[0][p]=d[0],u[1][p]=d[1];return m=Object(F.d)(Object(b.a)([]),t.styleState,this.sourceAttrs,{},[]),r.layers.filter((function(t){return"raster"===t.type&&Object(F.h)(t.filter,m)})).forEach((function(t){"raster"===t.type&&Object(C.b)({collector:_.modules.collector,generator:zn.generateRectWithTexture,args:[u,r.id,t,l]})})),v=this.modules.collector.getAccumulatedData(),n.push({regionId:0,metatileHash:0,styleId:r.id,collectorOutput:v}),i.push.apply(i,v.transferable),[2,Promise.resolve({results:n,transferable:i})]}}))}))},t.prototype.getAttributes=function(){return this.attributes},t.prototype.setAttributes=function(t){this.attributes=t},t.prototype.destroy=function(){this.tileLoader.destroy()},t}(),Ba=function(){function t(t,e){var n,i;this.type="raster",this.modules=t.modules,this.source=new Ra(this.modules,e);var r=null!==(n=e.minZoom)&&void 0!==n?n:o.MAP_DEFAULTS.minZoom,a=null!==(i=e.maxZoom)&&void 0!==i?i:o.MAP_DEFAULTS.maxZoom;this.layer=new No.a(r,a,r,a,this.modules,t.state,this.source),this.modules.tileManager.addTileLayer(this.layer)}return t.prototype.destroy=function(){this.source.deleteTextures(),this.modules.tileManager.removeTileLayer(this.layer),this.layer.destroy()},t.prototype.getAttributes=function(){return this.source.getAttributes()},t.prototype.getId=function(){return this.source.id},t.prototype.setAttributes=function(t){this.source.setAttributes(t),this.layer.redraw()},t}(),Na=function(t){function e(e,n){var i,r=t.call(this,e)||this;return r.position=Object(s.l)(n.coordinates),r.zIndex=null!==(i=n.zIndex)&&void 0!==i?i:0,r.isDestroyed=!1,r.labelKey="onlineMarker-"+r.uniqId,r.setIcon(n.icon),r}return Object(x.c)(e,t),e.prototype.destroy=function(){this.isDestroyed=!0,this.modules.identifier.resetCache(),this.modules.labeler.removeLabels(this.labelKey),t.prototype.destroy.call(this)},e.prototype.setIcon=function(t){var e=this,n=t.url,i=t.transformer,r=t.size,o=t.anchor;this.modules.imageCache.getRasterSet(n,i,r,o).then((function(t){if(!e.isDestroyed){e.removeIcon();var i=Object(A.d)({type:"point",id:"dynamic-onlineMarker-"+e.uniqId,minzoom:-1/0,maxzoom:1/0,style:{iconImage:n,iconAnchor:o}}),a=Object(E.c)({id:[0,0]}),c=e.modules,l=c.collector,u=c.dynamicStyle,d=c.styleManager,f=e.zIndex;if(i){u.addLayer(i,f),u.appendRasterSet(t,Object(Oa.c)(n,i.style.iconAnchor[0],i.style.iconAnchor[1]));var h=Object(s.j)(e.position);Object(C.b)({collector:l,generator:wa.a,args:[u.getStyle(),i,h,{},b.c,a,[[0],[0]],-1,Object(Wo.e)(window.devicePixelRatio)]});var p=l.getAccumulatedData(),m=p.identifyIds,v=p.labels;if(v.length){var _=[{metatileHash:-1,labels:v,styleId:u.getStyle().id}],y=Object(ba.b)(_,Ki.c.DynamicObject,d,e.mapState.styleState,e.mapState.styleZoom);if(1===y.length){var g=y[0];Object(ue.generateNotStretchableIconElement)(l,g,[0,0,0],0,t.rasters[0]);var x=l.getAccumulatedData();l.reset();var w=new M.a("dynamicObject",x.data,e.modules.renderer,Object(s.j)(e.position),e);e.tileObjects.push(w),e.identifyIds=[m],e.modules.tileManager.addObject(w),e.modules.layers.addLayer(e),e.modules.identifier.debouncedFillCache(),e.modules.labeler.removeLabels(e.labelKey),e.modules.labeler.addLabelBox(e.labelKey,{id:e.uniqId,width:r[0],height:r[1],position:e.position,offset:[-o[0],-o[1]],labelingGroup:"marker"}),e.mapState.needRerender=!0}}}}}))},e.prototype.removeIcon=function(){var t=this.tileObjects[0];t&&(t.clean(this.mapState),this.modules.tileManager.removeObject(t),this.tileObjects=[])},e}(j);function Ua(t){return{type:"data",key:Object(Ti.c)(t),coords:t,zoomLevel:t[2],detailLevel:t[3],needFetch:!1,needAbortFetch:!1,status:mo.a.Initial}}var Ha=function(t){function e(e,n,i){var r=t.call(this)||this;return r.prevZoomLevel=0,r.update=function(){var t=!0;if(r.viewportDiffer.check(r.mapState)){var e=Math.floor(r.mapState.styleZoom);e!==r.prevZoomLevel&&(t=!1),r.prevZoomLevel=e,r.gridState.zoomLevel=e,function(t,e,n){if(t.zoomLevel<t.minZoomLevel)t.viewportTiles=[];else{var i=Object(a.d)(t.zoomLevel,t.minZoomLevel,t.maxZoomLevel),r=Object(a.d)(t.zoomLevel,t.minDetailLevel,t.maxDetailLevel);t.viewportTiles=Object(Ti.h)(e,i,r);for(var o=0;o<t.viewportTiles.length;o++){var s=t.viewportTiles[o],c=t.tiles[s];c||(c=t.tiles[s]=n(Object(Ti.o)(s)))}}}(r.gridState,Object(s.e)(r.mapState),Ua),r.emit("tilesSetChanged",{tileIds:r.gridState.viewportTiles})}for(var n in r.gridState.tiles)r.gridState.viewportTiles.includes(n)?r.gridState.tiles[n].status===mo.a.Initial&&(r.gridState.tiles[n].needFetch=!0,r.gridState.tiles[n].status=mo.a.Loading):r.gridState.tiles[n].status===mo.a.Loading&&(r.gridState.tiles[n].needAbortFetch=!0);t&&(r.fetch(function(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needFetch&&(i.needFetch=!1,e.push(i))}return e}(r.gridState)),r.abortFetch(function(t){var e=[];for(var n in t.tiles){var i=t.tiles[n];i.needAbortFetch&&(i.needAbortFetch=!1,e.push(i))}return e}(r.gridState)),r.clearTiles(function(t,e){var n=new Set(t.viewportTiles),i=[];for(var r in t.tiles){var o=t.tiles[r];!n.has(r)&&i.push(o)}return i}(r.gridState)))},r.mapState=e,r.modules=n,r.config=i,r.gridState=function(t,e,n,i,r){return function(t,e,n,i,r,o){return{type:"data",maxDetailLevel:o,minDetailLevel:r,maxZoomLevel:i,minZoomLevel:n,zoomLevel:Math.floor(e),tiles:{},viewportTiles:[]}}(0,t,e,n,i,r)}(e.styleZoom,i.minZoom,i.maxZoom,i.minZoom,i.maxZoom),r.viewportDiffer=new vt([{path:"center",type:"vec2"},{path:"zoom",type:"number"},{path:"size",type:"vec2"},{path:"rotation",type:"number"},{path:"pitch",type:"number"}]),r.dataTileLoader=new Fa.a("json"),r.modules.layers.addLayer(r),r}return Object(x.c)(e,t),e.prototype.destroy=function(){var t;(t=this.gridState).tiles={},t.viewportTiles=[],this.modules.layers.removeLayer(this)},e.prototype.fetch=function(t){var e=this;t.sort((function(t,n){return Object(Ti.a)(e.mapState.center,t,n)})).forEach((function(t){return e.fetchTile(t)}))},e.prototype.abortFetch=function(t){var e=this;t.forEach((function(t){e.dataTileLoader.abortRequest(t.key)}))},e.prototype.clearTiles=function(t){for(var e=0,n=t;e<n.length;e++){var i=n[e];delete this.gridState.tiles[i.key],this.emit("dataTileCleared",{tileId:i.key})}},e.prototype.fetchTile=function(t){var e=this,n=this.config.tsURLTemplate;this.dataTileLoader.fetch(t.coords,n).then((function(n){e.emit("dataTileLoaded",{tileId:t.key,data:n})}))},e}(w.a)},function(t,e,n){"use strict";n.r(e);var i=n(1),r=n(64),o=n.n(r),a=n(0),s=n(6),c=n(2),l=n(44),u=n(56),d=n(74),f=n(34),h=n(25),p=n(29),m=n(36),v=n(5),_=n(54),y=n(53),g=n(33),b=[[0],[0],[0]],x=[[0],[0],[0]],w={};function S(t,e,n,i,r,o,s,c){var l=n.tileProps;e[l.db_height]=a.floors.islandHeight,e[l.db_sublayer]=t.areaSublayer,e[l.selected]=c?1:0,e[l.db_region]=s,i.layers.forEach((function(a){if("polygonExtrusion"===a.type&&Object(v.h)(a.filter,Object(v.d)(n,r,w,l,e)))for(var s=0;s<t.area.length;s++){var c=M(t.area[s]),f=O(c),h=f.x,p=f.y,m=u(c);b[0].length=0,b[1].length=0,b[2].length=0;for(var _=0;_<m.length;_+=3){for(var y=0;y<3;y++)b[0][y]=h[m[_+y]],b[1][y]=p[m[_+y]],b[2][y]=1;do{Object(d.generatePolygonExtrusion)(o,i.id,a,n,r,w,l,e,b,!1)}while(o.isOverloaded())}}}))}function I(t,e,n,i,r,o,a,s){var c=n.tileProps;e[c.db_sublayer]=t.areaSublayer,e[c.selected]=s?1:0,e[c.db_region]=a,i.layers.forEach((function(a){if("polygon"===a.type&&Object(v.h)(a.filter,Object(v.d)(n,r,w,c,e)))for(var s=0;s<t.area.length;s++){var l=M(t.area[s]),d=O(l),f=d.x,h=d.y,p=u(l);b[0].length=0,b[1].length=0,b[2].length=0;for(var m=0;m<p.length;m+=3){for(var y=0;y<3;y++)b[0][y]=f[p[m+y]],b[1][y]=h[p[m+y]],b[2][y]=0;do{Object(_.generatePolygon)(o,i,a,c,e,b)}while(o.isOverloaded())}}}))}function j(t,e,n,i,r,o,s,c){if(t.wallSublayer){var l=n.tileProps;e[l.db_height]=a.floors.wallHeight,e[l.db_sublayer]=t.wallSublayer,e[l.selected]=c?1:0,e[l.db_region]=s,i.layers.forEach((function(a){if("polygonExtrusion"===a.type&&Object(v.h)(a.filter,Object(v.d)(n,r,w,l,e)))for(var s=0;s<t.wallTop.length;s++){var c=O(M(t.wallTop[s])),u=c.x,f=c.y,h=c.count;b[0].length=0,b[1].length=0,b[2].length=0;for(var p=0;p<h;p++){var _=Object(m.a)(p,h);b[0][_]=u[p],b[1][_]=f[p],b[2][_]=1}do{Object(d.generatePolygonExtrusion)(o,i.id,a,n,r,w,l,e,b,!1)}while(o.isOverloaded())}}))}}function O(t){for(var e=[],n=[],i=0;i<t.length/2;i++)e[i]=t[2*i],n[i]=t[2*i+1];return{x:e,y:n,count:e.length}}function M(t){for(var e=new Uint16Array(t.length/2),n=0;n<t.length/2;n++)e[n]=t[2*n]|t[2*n+1]<<8;return e}var P=n(4),L=n(17),T=n(81),k={1:function(t){for(var e=0,n=0;n<t.length;n++)e=e+t[n]&255,t[n]=e},2:function(t){for(var e=0,n=0;n<t.length;n++)e=e+t[n]&65535,t[n]=e},4:function(t){for(var e=0,n=0;n<t.length;n++)e=e+t[n]>>>0,t[n]=e},8:function(t){for(var e=0,n=0,i=0,r=0;r<t.length;r+=2)n=(i=n+t[r])>>>0,t[r]=n,e=e+t[r+1]+(i>4294967295?1:0)>>>0,t[r+1]=e}},z=function(){function t(t){this.offset=0,this.buffer=t,this.u8=new Uint8Array(t),this.u16=new Uint16Array(t),this.u32=new Uint32Array(t),this.s8=new Int8Array(t),this.s16=new Int16Array(t),this.s32=new Int32Array(t),this.f32=new Float32Array(t)}return t.prototype.readS8=function(){return this.s8[this.offset++]},t.prototype.readU16=function(){var t=this.u16[this.offset>>1];return this.offset+=2,t},t.prototype.readU32=function(){var t=this.u32[this.offset>>2];return this.offset+=4,t},t.prototype.readF32=function(){var t=this.f32[this.offset>>2];return this.offset+=4,t},t.prototype.readU8Vector=function(t){void 0===t&&(t=1);var e=this.readU32()*t,n=3&-e,i=this.u8.subarray(this.offset,this.offset+e);return this.offset+=e+n,i},t.prototype.readU16Vector=function(t){void 0===t&&(t=1);var e=this.readU32()*t*2,n=3&-e,i=this.u16.subarray(this.offset>>1,this.offset+e>>1);return this.offset+=e+n,i},t}();function C(t,e,n,i){var r=e.BYTES_PER_ELEMENT;t.offset+=-t.offset&r-1;var o=new e(t.buffer,t.offset,n);return t.offset+=r*n,i&&k[r](o),o}function E(t,e,n){t.offset+=7&-t.offset;var i=new Uint32Array(t.buffer,t.offset,2*e);return t.offset+=8*e,n&&k[8](i),i}function A(t,e,n){t.offset+=3&-t.offset;var i,r=new Uint32Array(t.buffer,t.offset,e),o=new Float32Array(t.buffer,t.offset,e);if(t.offset+=4*e,n){var a=0;for(i=0;i<e;i++)a=a+r[i]>>>0,o[i]=a/1e3}else for(i=0;i<e;i++)o[i]=r[i]/1e3;return o}function D(t,e,n){t.offset+=3&-t.offset;var i,r=new Int32Array(t.buffer,t.offset,e),o=new Float32Array(t.buffer,t.offset,e);if(t.offset+=4*e,n){var a=0;for(i=0;i<e;i++)a=a+r[i]>>>0,o[i]=(0|a)/1e3}else for(i=0;i<e;i++)o[i]=r[i]/1e3;return o}function F(t,e,n){switch(n){case 2:return C(t,Uint8Array,e);case 3:return C(t,Uint8Array,e,!0);case 4:return C(t,Uint16Array,e);case 5:return C(t,Uint16Array,e,!0);case 6:return C(t,Uint32Array,e);case 7:return C(t,Uint32Array,e,!0);case 8:return E(t,e);case 9:return E(t,e,!0);case 10:return C(t,Uint8Array,e);case 11:return function(t,e){for(var n=t.offset,i=t.u8,r=t.buffer,o=[];e--;)o.push(0|i[n++]);for(var a=[];++e<o.length;){var s=o[e];255===s&&(s=i[n++]|i[n++]<<8|i[n++]<<16|0),a.push(new Uint8Array(r,n,s)),n+=s}return t.offset=n,a}(t,e);case 12:return function(t,e){t.offset+=3&-t.offset;for(var n=t.offset,i=t.u32,r=t.buffer,o=[],a=0;a<e;a++)o.push(i[n>>2]),n+=4;var s=[];for(a=0;a<e;a++){var c=o[a];n+=7&-n,s.push(new Uint8Array(r,n,c)),n+=c}return t.offset=n,s}(t,e);case 13:return C(t,Int8Array,e);case 14:return C(t,Int8Array,e,!0);case 15:return C(t,Int16Array,e);case 16:return C(t,Int16Array,e,!0);case 17:return C(t,Int32Array,e);case 18:return C(t,Int32Array,e,!0);case 19:return E(t,e);case 20:return E(t,e,!0);case 21:return A(t,e);case 22:return A(t,e,!0);case 23:return D(t,e);case 24:return D(t,e,!0);case 25:return C(t,Uint32Array,e);default:throw new Error("Unknown stream type "+n)}}function R(t){for(var e=0,n=0;n<t.length;n++)e+=t[n];return e}function B(t,e,n){return new t.constructor(t.buffer,t.byteOffset+e*t.BYTES_PER_ELEMENT,n)}function N(t,e,n,i,r,o,a){var s=r.modelIndex,c=r.matrix,l=r.offset,u=r.id,d=r.selected,f=new z(i),h=[],p={};if(!t)return{objects:n.getAccumulatedData(),textures:h};if(1296191066!==f.readU32()||1!==f.readU16())return{objects:n.getAccumulatedData(),textures:[]};f.readU16();for(var m=f.readU32(),_=0;_<m;_++)h.push(f.readU8Vector());var y=o.tileProps,g=[],b=Object.keys(y).length;for(_=0;_<b;_++)g[_]=NaN;g[y.db_sublayer]="Building_model",g[y.id]=u,g[y.selected]=d?1:0,g[y.db_region]=a,n.setGeoIds(new Uint32Array(u));var x=f.offset;return t.layers.forEach((function(i){"buildingModel"===i.type&&Object(v.h)(i.filter,Object(v.d)(o,e,p,y,g))&&(f.offset=x,function(t,e,n,i,r,o,a,s,c){for(var l=i.readU32(),u=0;u<l;u++){var d=i.readU32(),f=P.i(i.readF32(),i.readF32(),i.readF32()),h=P.i(i.readF32(),i.readF32(),i.readF32()),p=P.r(P.d(),h,f),m=L.b();L.l(m,r,f),L.k(m,m,p),m[12]+=o[0],m[13]+=o[1];for(var v=i.readU16Vector(5),_=i.readU32(),y=0;y<_;y++){var g=i.readU32(),b=i.readU16Vector();do{T.processSubmesh(t.id,e,a,n,s,v,b,g,d,m,c)}while(n.isOverloaded())}var x=i.readU16Vector();do{T.processOuterEdge(t.id,e,a,n,s,v,x,m)}while(n.isOverloaded())}}(t,i,n,f,c,l,o,g,s))})),{objects:n.getAccumulatedData(),textures:h}}var U,H=n(15),Z=n(9),G=n(49),W=[],V=new Int32Array(256),q=[],Y=[],X=[0,0,0,0,0],K=0,J=0,Q=0,$=[];function tt(t,e,n,i,r,o,a,s,c,l){var u=r.tileInfo,d=r.pixelRatio,f=r.selectedIds,h=r.floorsEnabled,m=r.disableCommercialPoi,v=r.hoverId,_=r.generateOnlySelectedPoi,y=r.generateOnlyHoveredPoi,b=(o.metatileHash,o.data),x=new p.a(f),w=Object(Z.d)(b);if(w.byteLength<8)return i.getAccumulatedData();W.length=0;var S=new z(w);if(1279676242!==S.readU32())return i.getAccumulatedData();if(2!==S.readU16())return console.error("Unsupported tile format version"),i.getAccumulatedData();S.readU16();var I=u.coords,j=Object(g.e)(d);return Object(g.a)(j),function(t){var e=t.u8,n=t.offset,i=t.u32[n>>2];for(K=i,J=n+=4;i--;)n=2*e[n++]+n,n=e[n++]+n;t.offset=n+(3&-n)}(S),function(t){var e=t.u32[t.offset>>2];t.offset+=4,U=C(t,Uint8Array,e);for(var n=C(t,Uint32Array,e),i=0;i<e;i++){var r=U[i];W[i]=F(t,n[i],r),V[i]=0}}(S),function(t,e,n,i,r,o,a,s,c,l,u,d,f,h,p,m,v,_,y){for(var g=K,b=C(r,Int32Array,g),x=R(b),w=C(r,Uint8Array,x,!0),S=C(r,Uint8Array,R(w),!0),I=C(r,Uint8Array,x,!0),j=C(r,Uint8Array,R(I),!0),O=C(r,Uint16Array,x,!0),M=0,P=0,L=0,T=0;T<g;T++){var k=b[T];if(rt(r,c,l),0===T){var z=W[Y[1]];i.setGeoIds(z)}for(var E=0;E<k;E++){var A=w[M];A>0&&(et(l,A,S,P,c),P+=A);var D=I[M];D>0&&(nt(l,D,j,L),L+=D);var F=O[M];F>0&&it(t,e,n,i,F,o,a,s,c,l,0,d,f,0,p,m,v,_,y),M++}}ot()}(t,e,n,i,S,I,j,x,a,s,0,l,c,0,h,m,v,_,y),i.getAccumulatedData()}function et(t,e,n,i,r){for(var o;e--;){var a=n[i++],s=Y[a],c=q[a],l=U[s];if(8===l||9===l||19===l||20===l)t[c]=[W[s][V[s]],W[s][V[s]+1]],V[s]+=2;else{var u=W[s][V[s]];switch(c){case r.tileProps.db_label:case r.tileProps.db_label2:t[c]=Object(G.a)(u);break;default:var d=r.tilePropsByIndex[c];d&&r.reverseDictionaries[d]?t[c]=null!==(o=r.reverseDictionaries[d][u])&&void 0!==o?o:u:t[c]=u}V[s]++}}}function nt(t,e,n,i){for(;e--;){var r=n[i++];t[q[r]]=NaN}}function it(t,e,n,i,r,o,s,c,l,u,d,h,p,m,_,y,g,b,x){var w=l.tileProps,S=l.defaultProps,I=o[3],j={};if(!y||void 0===w.db_sublayer||Number.isNaN(u[w.db_sublayer])||!Object(f.d)(u[w.db_sublayer])){for(var O=0;O<Q;O++){var M=X[O];$[O]=B(W[M],V[M],r),V[M]=V[M]+r}var P=u[w.id],L=!Number.isNaN(P)&&c.has(P);b&&(L=!0);var T=!!x;if(!T&&void 0!==g){if(g[0]!==P[0]||g[1]!==P[1])return;T=!0}for(var k in u[w.selected]=L?1:0,u[w.hovered]=T?1:0,S){var z=S[k];Number.isNaN(u[z.index])&&(u[z.index]=z.value)}_&&u[w.hiddenByPlanBuildingId]&&I>=Math.floor(a.floors.displayStyleZoom)&&(p.add(P),i.addFloorHidingMap(P,u[w.hiddenByPlanBuildingId]));var C=Object(v.d)(l,n,j,w,u),E=e.getLayers(t.id,w,u).filter((function(t){return Object(v.h)(t.filter,C)}));Object(H.a)(i,t,E,I,l,w,u,j,n,o,h,s,$,p,b||x)}}function rt(t,e,n){var i,r,o=Object.keys(e.tileProps).length,a=t.u8,s=J;for(r=1;r<o;r++)n[r]=NaN;for(i=a[s++],r=0;r<i;r++)q[r]=a[s++],Y[r]=a[s++];for(i=a[s++],r=0;r<i;r++)X[r]=a[s++];Q=i,J=s,ot()}function ot(){$.length=0}var at=n(73),st=n(52),ct=n(100),lt=n(39),ut=n(70),dt=n(71),ft=n(18),ht=function(){function t(){this.cache=new Map,this.pendingRequests=new Map}return t.prototype.fetch=function(t){var e=this,n=t.coords,i=t.tileServer,r=t.tileSet,o=t.tileProtocol,a=t.subdomains,s=t.tileKey,c=t.appId,l=t.lang,u=t.defaultLang,d=t.sessionId;return new Promise((function(t){var f=Object(Z.k)(i,r,o,a,n,s,c,l,u,d),h=Object(Z.c)(n),p=Object(st.a)({url:f},(function(n,i){var r=!1;if(e.pendingRequests.delete(h),void 0!==n||0===i.byteLength)return void 0!==n&&(console.error(n),403===n.status&&(r=!0)),e.cache.set(h,[]),void t({metadata:[],invalidTileKey:r});var o=Object(Z.r)(i),a=Object(Z.s)(o);e.cache.set(h,o),t({metadata:a,invalidTileKey:r})}));e.pendingRequests.set(h,{xhr:p,resolve:t})}))},t.prototype.get=function(t){return this.cache.get(t)||[]},t.prototype.delete=function(t){this.cache.delete(t)},t.prototype.abortRequest=function(t){var e=this.pendingRequests.get(t);void 0!==e&&(e.xhr.abort(),e.resolve(),this.pendingRequests.delete(t))},t}(),pt=n(13),mt=n(3),vt=[],_t=function(){function t(){this.cache=new Map,this.pendingRequests=new Map}return t.prototype.fetch=function(t,e,n,i,r){var o=this;return new Promise((function(s){var l=function(t,e,n,i,r){var o=Math.pow(2,t[2])-1,s=t[0],l=(o-t[1]&16777215)*(1<<24)+(16777215&s);return Object(c.J)(a.traffic.url,{protocol:r,host:i,z:String(t[2]),tiles:String(l),regions:e.join(","),time:String(n)})}(t,i,r,e,n),u=Object(Z.c)(t),d=Object(st.b)({url:l},(function(t,e){if(o.pendingRequests.delete(u),void 0!==t)return 204!==t.status&&console.error(t),o.cache.set(u,void 0),void s();var n=e[0];n?o.cache.set(u,n):o.cache.set(u,void 0),s()}));o.pendingRequests.set(u,{xhr:d,resolve:s})}))},t.prototype.get=function(t){return this.cache.get(t)},t.prototype.delete=function(t){this.cache.delete(t)},t.prototype.abortRequest=function(t){var e=this.pendingRequests.get(t);void 0!==e&&(e.xhr.abort(),e.resolve(),this.pendingRequests.delete(t))},t}(),yt=n(95),gt=function(t){function e(e){var n=t.call(this)||this;return n.obClassEnumIndex=0,n.sublayerEnumIndex=0,n.workerParserSyncMetatile=e.get(ft.b.Main,"syncMetatile"),n}return Object(i.c)(e,t),e.prototype.addData=function(t){var e=this;this.dictionaries.db_sublayer||(this.dictionaries.db_sublayer={},this.reverseDictionaries.db_sublayer={}),t.sublayers.forEach((function(t){if(void 0===e.dictionaries.db_sublayer[t]){var n=e.sublayerEnumIndex++;e.dictionaries.db_sublayer[t]=n,e.reverseDictionaries.db_sublayer[n]=t}})),this.dictionaries.db_object_class||(this.dictionaries.db_object_class={},this.reverseDictionaries.db_object_class={}),t.objectClasses.forEach((function(t){if(void 0===e.dictionaries.db_object_class[t]){var n=e.obClassEnumIndex++;e.dictionaries.db_object_class[t]=n,e.reverseDictionaries.db_object_class[n]=t}})),this.workerParserSyncMetatile({dictionaries:this.dictionaries,reverseDictionaries:this.reverseDictionaries})},e}(n(92).a),bt=(n(79),n(20),n(16)),xt=n(93),wt=n(94);e.default=function(t){var e=new ut.b(t),n=new dt.a(e),r=new xt.a(n),u=new ht,d=new _t,m=new yt.a,_={main:{addNewRasterSets:n.get(ft.b.Main,"addNewRasterSets")},labeling:{addNewRasterSets:n.get(ft.b.Labeling,"addNewRasterSets")}},b={},O=new p.a,M={},L=new at.a("parser"),T=[],k=function(){var t=L.atlasPacker.getNewRasterSets();t.size&&t.forEach((function(t,e){_.main.addNewRasterSets(e,t),_.labeling.addNewRasterSets(e,t)}))},z=Object(l.a)((function(){return L.reset()}),a.workerResetDebounceTime);r.set("GeoJsonSource",wt.a,{sources:{},collector:L,styleManager:m});var C=function(t,e){b[t]=e};n.set("setMetatile",C);var E=new gt(n);C(s.k,E),n.set("appendHiddenObjectIds",(function(t){t.forEach((function(t){return O.add(t)}))})),n.set("prepareAtlas",(function(e){return new Promise((function(n){Object(st.a)({url:e},(function(e,i){if(e||0===i.byteLength)n(void 0);else if(t.createImageBitmap){var r=new Blob([i],{type:"image/png"});createImageBitmap(r).then((function(t){n({isBitmap:!0,data:[t],transferable:[t]})}))}else n({isBitmap:!1,data:[i],transferable:[i]})}))}))})),n.set("fetchTile",(function(t){return u.fetch(t)})),n.set("deleteTile",(function(t){u.delete(t)})),n.set("abortTileRequest",(function(t){u.abortRequest(t)})),n.set("generateTile",(function(t){var e=t.tileInfo.coords,n=Object(Z.c)(e),i=u.get(n),r=[],o=[];return i.forEach((function(e){var n=e.regionId,i=e.metatileHash,a=m.getStyle(t.styleId);if(a){var s=tt(a,m,t.styleState,L,t,e,b[i],T,O,n);r.push({regionId:n,metatileHash:i,collectorOutput:s,styleId:a.id}),o.push.apply(o,s.transferable)}})),z(),k(),{results:r,transferable:o}})),n.set("fetchTrafficTile",(function(t){return d.fetch(t.coords,t.tileServer,t.tileProtocol,t.regionIds,t.timestamp)})),n.set("deleteTrafficTile",(function(t){d.delete(t)})),n.set("abortTrafficTileRequest",(function(t){d.abortRequest(t)}));var A=Object(bt.a)(["db_sublayer","traffic_road_class","traffic_color","traffic_road_z_level"],["Traffic_jams"]);n.set("generateTrafficTile",(function(t){var e=t.coords,n=t.pixelRatio,i=t.styleState,r=t.styleId,o=Object(Z.c)(e),a=[],s=[],c=m.getStyle(r);if(!c)return{results:a,transferable:s};var l=d.get(o);if(l){var u=function(t,e,n,i,r,o,a){if(!n)return t.getAccumulatedData();for(var s=a[3],c=e.tileProps,l=Object.keys(c).length,u=[],d=Object(g.e)(r),f={},h=0,m=o.tile;h<m.length;h++){for(var _=m[h],y=_.color,b=void 0===y?0:y,x=_.geo,w=_.road,S=_.normals,I=_.zLevel,j=void 0===I?0:I,O=0;O<l;O++)u[O]=NaN;u[c.db_sublayer]="Traffic_jams",u[c.traffic_color]=b,u[c.traffic_road_class]=w,u[c.traffic_road_z_level]=j,u[c.beginningIsCut]=0,u[c.endingIsCut]=0;var M=function(r){for(var o=x[r],l=S[r],h=[[],[],[],[]],m=0;m<o.length;m++)h[0][m]=o[m][0],h[1][m]=o[m][1],h[2][m]=l[m][0],h[3][m]=l[m][1];var _=Object(v.d)(e,i,f,c,u),y=n.layers.filter((function(t){return Object(v.h)(t.filter,_)}));Object(H.a)(t,n,y,s,e,c,u,f,i,a,0,d,h,new p.a)};for(O=0;O<x.length;O++)M(O)}return t.getAccumulatedData()}(L,A,c,i,n,l,e);a.push({regionId:1,metatileHash:0,styleId:c.id,collectorOutput:u})}return{results:a,transferable:s}})),n.set("packRasters",(function(t){for(var e=0;e<t.length;e+=3){var n=t[e+2],i={type:lt.b.Loaded,isSvg:!1,index:n,key:"loaded-"+n,name:"",fileName:"",rasters:[{rasterSetIndex:n,rasterIndex:0,w:t[e],h:t[e+1],atlasIndex:0,x:0,y:0,isPacked:!1,anchorX:0,anchorY:0}]};L.atlasPacker.pack(i,[t[e]],1)}var r=L.atlasPacker.getPackedRasters(),o=[];return void 0!==r&&o.push(r.buffer),{packedRasters:r,transferable:o}})),n.set("generateModel",(function(e){var n=e.regionId,r=e.metatileHash,o=e.fileName,a=e.tileServer,s=e.tileProtocol,l=e.tileSet,u=e.subdomain,d=e.styleId,f=Object(c.p)("model",{host:a,tileSet:l,protocol:s,subdomain:u,regionId:n.toString(),name:o});return new Promise((function(o){Object(st.a)({url:f},(function(a,s){if(a||0===s.byteLength)o({objects:L.getAccumulatedData(),textures:{isBitmap:!1,data:[]}});else{var c=m.getStyle(d);if(c){var l=N(c,e.styleState,L,s,e,b[r],n),u=l.objects,f=l.textures;if(t.createImageBitmap){var h=f.map((function(t){var e=new Blob([t],{type:"image/png"});return createImageBitmap(e)}));Promise.all(h).then((function(t){o({objects:u,textures:{isBitmap:!0,data:t},transferable:Object(i.e)(Object(i.e)([],u.transferable),t)}),z()}))}else o({objects:u,textures:{isBitmap:!1,data:f},transferable:Object(i.e)(Object(i.e)([],u.transferable),[s])}),z()}else o({objects:L.getAccumulatedData(),textures:{isBitmap:!1,data:[]}})}}))}))})),n.set("loadFloor",(function(t,e){return new Promise((function(n){Object(st.a)({url:e+"/complexes/"+t+"?fields=floorGeometries&format=pbf"},(function(e,r){if(e||0===r.byteLength)n({type:"error",errorStatus:e?e.status:0});else{var a=new o.a(r),s=ct.Complex.read(a),c=s.tileCoords;M[t]=Object(i.a)(Object(i.a)({},s),{tileCoords:[c[0],c[1],c[2],c[2]]}),E.addData(function(t){for(var e=new Set,n=new Set,i=t.floorGeometries,r=t.entities,o=0;o<i.length;o++)for(var a=i[o].rooms,s=0;s<a.length;s++){var c=a[s],l=c.sublayer,u=c.areaSublayer,d=c.wallSublayer;e.add(l),d&&e.add(d),e.add(u)}for(o=0;o<r.length;o++){var f=r[o],h=f.humanReadableIconId;l=f.sublayer,e.add(l),h&&n.add(h)}return{sublayers:e,objectClasses:n}}(M[t]));var l={};s.entities.forEach((function(t){t.firmId&&(l[t.firmId]=t.floorIndex)})),n({type:"success",center:s.center,bound:s.bound,defaultFloor:s.defaultFloor,floorNames:s.floorNames,buildings:s.buildings.concat(s.hybrids),firmsToFloorIndexMap:l})}}))}))})),n.set("generateFloor",(function(t,e,n,i,r,o,s,c){var l={tileCoords:M[t].tileCoords,collectorOutput:L.getAccumulatedData(),styleId:0},u=m.getStyle(s);if(!u)return l;var d=function(t,e,n,i,r,o,s,c,l,u){var d,m=i.floorGeometries,_=i.defaultFloor,b=i.tileCoords,O=i.entities,M=r.tileProps,P=Object(g.e)(s),L=new p.a,T=new p.a(l),k=[],z=Object.keys(M).length;Number.isNaN(c)&&(c=_);for(var C=m[c],E=0;E<C.rooms.length;E++){for(var A=C.rooms[E],D=0;D<z;D++)k[D]=NaN;var F=!1;if(A.firmIds.length){var R=Object(h.b)(A.firmIds[0]);L.add(R),F=T.has(R),k[M.id]=R}A.isIsland?S(A,k,r,t,e,n,o,F):(I(A,k,r,t,e,n,o,F),j(A,k,r,t,e,n,o,F))}for(E=0;E<O.length;E++){var B=O[E],N=B.sublayer;if(B.floorIndex===c){for(var U=0;U<z;U++)k[U]=NaN;x[0]=[B.coordinates[0]],x[1]=[B.coordinates[1]];for(var H=0;H<z;H++)k[H]=NaN;u&&Object(f.d)(N)&&(N=a.floorsDefaultPoiSublayer),k[M.db_sublayer]=N,F=!1;var Z=B.firmId||B.id;Z&&(R=Object(h.b)(Z),F=T.has(R),L.add(R),k[M.id]=R),k[M.selected]=F?1:0,k[M.db_region]=o,Object(f.d)(N)||(k[M.db_object_class]=null!==(d=B.humanReadableIconId)&&void 0!==d?d:r.reverseDictionaries.db_object_class[B.iconId]),k[M.db_label]=B.text,k[M.db_label2]=B.text2,k[M.iconPriority]=B.priority,k[M.labelPriority]=B.textPriority,t.layers.forEach((function(i){"point"===i.type&&Object(v.h)(i.filter,Object(v.d)(r,e,w,M,k))&&Object(y.a)(n,t,i,b,w,r,k,x,o,P)}))}}return n.setGeoIds(new Uint32Array(L.toFlatArray())),n.getAccumulatedData()}(u,c,L,M[t],E,e,n,i,r,o);return z(),k(),{tileCoords:M[t].tileCoords,collectorOutput:d,transferable:d.transferable,styleId:u.id}})),n.set("generatePersonalPoi",(function(t,e,n,i,r,o,a){var s=m.getStyle(o);if(s){var c=function(t,e,n,i,r,o,a,s){var c,l,u,d=i.tileProps,f=i.dictionaries,m=Object.keys(d).length,_=new p.a(a),y=[],b={};if(void 0===(null===(c=f.db_sublayer)||void 0===c?void 0:c.s_personal_poi))return t.getAccumulatedData();for(var x=0;x<m;x++)y[x]=NaN;for(var w=Object(g.e)(o),S=pt.e(),I=[],j=0,O=s;j<O.length;j++){var M=O[j],L=Object(mt.l)(M.point);pt.f(S,L),I.push(L)}var T=Object(mt.d)(S),k=Object(Z.e)(T),z=function(o){var a=s[o],c=P.d();Object(mt.k)(c,I[o],k);for(var f=Object(h.b)(a.id),g=[[c[0]],[c[1]]],x=0;x<m;x++)y[x]=NaN;y[d.id]=Object(h.b)(a.id),y[d.db_sublayer]="s_personal_poi",y[d.db_object_class]=null!==(l=a.humanReadableClassId)&&void 0!==l?l:null===(u=i.reverseDictionaries.db_object_class)||void 0===u?void 0:u[a.classId],y[d.db_label]=a.name,y[d.iconPriority]=1,y[d.labelPriority]=0,y[d.selected]=_.has(f)?1:0,y[d.db_region]=r;var S=Object(v.d)(i,n,b,d,y);vt=e.layers.filter((function(t){return Object(v.h)(t.filter,S)}));var j=new p.a;Object(H.a)(t,e,vt,void 0,i,d,y,b,n,T,r,w,g,j)};for(x=0;x<s.length;x++)z(x);return t.getAccumulatedData()}(L,s,a,b[n],e,i,r,t);return z(),k(),{collectorOutput:c,transferable:c.transferable,styleId:s.id}}})),n.set("syncStyle",(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return m.proxySyncStyle.apply(m,t)}))}},function(t,e,n){"use strict";n.r(e);var i=n(1),r=n(0),o=n(15),a=n(44),s=n(51),c=n(12);function l(t,e,n){var i=t[e];if(void 0!==i)return i[n]}var u=n(101);function d(t,e,n,i){var r=t.anchorScreen,o=t.boxes[e];return{element:t,minX:r[0]+o[0]-n|0,maxX:r[0]+o[2]+n|0,minY:r[1]+o[1]-i|0,maxY:r[1]+o[3]+i|0}}function f(t,e){if(t.parent===e||t.firstLabel===e||e.parent===t||e.firstLabel===t)return!1;var n=t.labelingGroup,i=e.labelingGroup;return function(t,e,n,i){var r=l(t,n,i),o=l(e,n,i);return void 0===r&&void 0===o||(void 0===r?void 0===o||o:void 0===o?void 0===r||r:r||o)}(t.labelingGroupTable,e.labelingGroupTable,n,i)}function h(t,e,n,i,r,o){var a=d(e,n,i,r);if(a.minX>o.maxX||a.maxX<o.minX||a.minY>o.maxY||a.maxY<o.minY)return!0;for(var s=t.search(a),c=0;c<s.length;c++)if(f(e,s[c].element))return!0;return!1}function p(t,e,n,i,r){for(var o=!0,a=0;a<t.boxes.length;a++)if(h(e,t,a,t.marginLeftRight,t.marginTopBottom,n)){o=!1;break}if(o)for(a=0;a<t.boxes.length;a++){var s=d(t,a,t.marginLeftRight,t.marginTopBottom);e.insert(s)}t.placementIndex=o?0:-1}function m(t,e,n,i,r){t.placementIndex=-1;for(var o=0;o<t.boxes.length;o++)if(!(t.firstLabel&&t.firstLabel.placementIndex!==o||h(e,t,o,t.marginLeftRight,t.marginTopBottom,n))){var a=d(t,o,t.marginLeftRight,t.marginTopBottom);e.insert(a),t.placementIndex=o;break}}function v(t){return t.type!==c.d.Box&&void 0!==t.commercialPriority}function _(t,e,n,i){var o=e.size,a=e.viewport,l=o[0],f=o[1],_=(r.labeling.tileMultiplier-1)/2,y=Math.round(l*_),g=Math.round(f*_),b={minX:a.left-y,maxX:a.left+l+y,minY:a.top-g,maxY:a.top+f+g},x=u();t.filter(v).sort((function(t,e){return(n.has(e.id)?1:0)-(n.has(t.id)?1:0)||t.commercialPriority-e.commercialPriority})).forEach((function(t){!function(t,e,n,i,r,o){var a,s;if(i.has(t.id)?(a=r.visibleLeftRight,s=r.visibleTopBottom):(a=r.appearLeftRight,s=r.appearTopBottom),h(e,t,0,a,s,n))t.placementIndex=-1;else{t.placementIndex=0;var c=d(t,0,r.visibleLeftRight,r.visibleTopBottom);e.insert(c)}}(t,x,b,n,i)})),x.clear();for(var w=t.sort((function(t,e){var i=t.label instanceof s.a?t.label.hovered:0,r=e.label instanceof s.a?e.label.hovered:0;return e.groupPriority-t.groupPriority||(v(e)?1:0)-(v(t)?1:0)||(n.has(e.id)?1:0)-(n.has(t.id)?1:0)||r-i||e.itemPriority-t.itemPriority||e.label.idHi-t.label.idHi||e.label.idLo-t.label.idLo||e.label.layer.innerId-t.label.layer.innerId||e.anchorWorld[0]-t.anchorWorld[0]||e.anchorWorld[1]-t.anchorWorld[1]})),S=0;S<w.length;S++){var I=w[S];if(-1!==I.placementIndex)switch(I.type){case c.d.LineText:case c.d.Icon:p(I,x,b);break;case c.d.Box:if(!I.parent||I.parent&&-1!==I.parent.placementIndex){p(I,x,b);break}I.placementIndex=-1;break;case c.d.PoiText:case c.d.PoiText2:I.parent&&-1===I.parent.placementIndex||I.firstLabel&&-1===I.firstLabel.placementIndex?I.placementIndex=-1:m(I,x,b)}}return[]}var y=n(73),g=n(4),b=n(17),x=function(){function t(t,e,n){this.line=t,this.lengths=[],this.angles=[];for(var i=e,r=t[0],o=t[1],a=t.length/3,s=0;s<a;s++){var c=t[3*s]-r,l=t[3*s+1]-o;i+=Math.sqrt(c*c+l*l),this.lengths.push(i),r+=c,o+=l}for(this.finishLength=this.lengths[this.lengths.length-1],this.startLength=this.lengths[0],this.midLength=n/2,this.vertexCount=a,this.angles.push(0),s=1;s<a;s++){var u=this.line[3*(s-1)],d=this.line[3*s],f=this.line[3*(s-1)+1],h=this.line[3*s+1];this.angles.push(Math.atan2(h-f,d-u))}}return t.prototype.interpolate=function(t,e){var n=e,i=n-1,r=this.lengths[i],o=(t-r)/(this.lengths[n]-r);return[(1-o)*this.line[3*i]+o*this.line[3*n],(1-o)*this.line[3*i+1]+o*this.line[3*n+1],0,this.angles[e]]},t.prototype.getSegmentIndex=function(t){for(var e=0;e<this.lengths.length;e++)if(t<this.lengths[e])return e;return this.lengths.length},t}(),w=function(){function t(){this.labels={}}return t.prototype.add=function(t){var e=t.id,n=t.componentDistanceStart;void 0===this.labels[e]&&(this.labels[e]={});var i=this.labels[e];void 0===i[n]&&(i[n]=[]),i[n].push(t)},t.prototype.merge=function(){var t=[];for(var e in this.labels)for(var n=this.labels[e],i=Object.keys(n).sort((function(t,e){return Number(t)-Number(e)})),r=0;r<i.length;){var o=i[r];if(0!==n[o].length){for(var a=[],s=n[o].pop();void 0!==s;)a.push(s),s=0===s.componentDistanceStart&&0===s.componentDistanceEnd||void 0===n[s.componentDistanceEnd]?void 0:n[s.componentDistanceEnd].pop();if(1===a.length){var c=a[0];c.axis=new x(c.anchorWorld,c.componentDistanceStartWorld,c.objectLengthWorld),t.push(c)}else a.length>1&&t.push(this.stitch(a))}else r++}return t},t.prototype.stitch=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].anchorWorld.length;e-=3*(t.length-1);var i=new Int32Array(e),r=0;for(n=0;n<t.length;n++)for(var o=t[n].anchorWorld,a=n>0?3:0;a<o.length;a++)i[r++]=o[a];var s=t[0];return s.axis=new x(i,s.componentDistanceStartWorld,s.objectLengthWorld),t[0]},t}(),S=n(75),I=n(8),j=n(2),O=n(6),M=function(t,e,n,i,r,o,a,s,l,u,d,f){this.type=c.d.Box,this.marginTopBottom=0,this.marginLeftRight=0,this.id=String(t),this.label={layer:{innerId:0},styleId:-100,idLo:t,idHi:0,symbol:"nevermind",phase:NaN},this.groupPriority=null!=f?f:O.j,this.itemPriority=null!=d?d:1,this.parent=u,this.placementIndex=0,this.labelingGroup=l,this.labelingGroupTable=s.labelingGroups.table,this.anchorWorld=g.d(),g.c(this.anchorWorld,i),this.anchorWorld[2]*=o.buildingHeight,this.anchorScreen=[0,0],Object(j.y)(this.anchorScreen,this.anchorWorld,a,o.size,o.viewport),I.a(this.anchorScreen,this.anchorScreen,r),this.boxes=[[0,0,e,n]]},P=n(10),L=n(3),T=n(45),k=n(5),z=n(20),C=n(24),E=n(42),A=Object(j.g)(r.labeling.axisAngleToleranceDeg),D=r.labeling.axisCheckDistancePx,F=Object(j.g)(r.labeling.lineLabelsHidePitchDeg),R=b.b(),B=g.d();function N(t,e,n,i,r,o,a,s,l,u){var d=[],f=[],h=[],p=[],m={},v=function(t,e){for(var n={personalPoi:new Set,commercialPoi:new Set},i=0,r=t;i<r.length;i++){var o=r[i],a=e.get(o);if(void 0!==a)for(var s=0,l=a;s<l.length;s++){var u=l[s];u.source===c.c.PersonalPoi?n.personalPoi.add(u.id):u.pointType===c.b.Commercial&&n.commercialPoi.add(u.id)}}return n}(t,i);Object(j.F)(R,e),Object(j.E)(B,e);for(var _=new w,y=0;y<t.length;y++){var g=t[y],b=i.get(g);if(void 0!==b)for(var x=0;x<b.length;x++){var S=b[x];if(O=n.getStyle(S.styleId)){if(!(S.source===c.c.Tile&&l.has(S.id)||S.source!==c.c.PersonalPoi&&v.personalPoi.has(S.id)&&S.pointType!==c.b.Commercial||S.source===c.c.PersonalPoi&&v.commercialPoi.has(S.id)))switch(S.layer.type){case"point":U(S,o,a,e.styleState,e.styleZoom,O,u),S.ready&&Y(S,e.styleZoom)&&H(p,h,m,S,R,e,O,s);break;case"labelLine":U(S,o,a,e.styleState,e.styleZoom,O,u),S.ready&&Y(S,e.styleZoom)&&_.add(S);break;case"oneWayLine":Y(S,e.styleZoom)&&_.add(S)}}else console.error("Not found style "+S.styleId+" in labeling#collectLabelingElements")}}var I=_.merge();for(y=0;y<I.length;y++){var O;S=I[y],(O=n.getStyle(S.styleId))?Z(f,p,S,O,R,B,e):console.error("Not found style "+S.styleId+" in labeling#collectLabelingElements")}return r.forEach((function(t){var i,r=t.id,o=t.width,a=t.height,s=t.position,c=t.offset,l=t.labelingGroup,u=t.parentPoiId;if(!u||(i=m[u])){var f=n.getStyle(z.a);if(f){var h=new M(r,o,a,s,c,e,R,f,l,i,null==i?void 0:i.itemPriority,null==i?void 0:i.groupPriority);d.push(h)}else console.error("Not found style "+z.a+" in labeling#collectLabelingElements")}})),{boxElements:d,oneWayTileElements:f,noLabelingElements:h,otherTileElements:p}}function U(t,e,n,i,r,o,a){var s;if(!t.ready){var c=t.layer;if("point"===c.type||"labelLine"===c.type){t.ready=!1;var l=Object(k.f)(r,i,!1,t.tileData);if(E.e&&!t.rtlProcessed&&(t.label=null!==(s=Object(E.c)(t.label))&&void 0!==s?s:"",t.label2=Object(E.c)(t.label2),t.iconLabel=Object(E.c)(t.iconLabel),t.updateRanges(),a(O.b,t.ranges),Object(k.a)(c.style.textFont).forEach((function(e){e.length&&a(e,t.ranges)})),"point"===c.type&&c.style.textFont2&&Object(k.a)(c.style.textFont2).forEach((function(e){e.length&&a(e,t.ranges)})),"point"===c.type&&c.style.iconTextFont&&Object(k.a)(c.style.iconTextFont).forEach((function(e){e.length&&a(e,t.ranges)})),t.rtlProcessed=!0),t.rtlProcessed){var u,d=t.ranges,f=Object(T.b)(c.style.textFont,l,o);if(f&&t.label&&Object(T.a)(f,d,n)&&(u=Object(T.c)(t.label,c.style.textLetterSpacing,e[f]),t.textMetrics=u),"labelLine"!==c.type){var h=Object(T.b)(c.style.iconTextFont,l,o);h&&t.iconLabel&&Object(T.a)(h,d,n)&&(t.iconTextMetrics=Object(T.c)(t.iconLabel,c.style.iconTextLetterSpacing,e[h]));var p=Object(T.b)(c.style.textFont2,l,o);f&&t.label&&p&&t.label2&&Object(T.a)(p,d,n)&&(t.textMetrics2=Object(T.c)(t.label2,c.style.textLetterSpacing,e[p])),f&&t.label?!u||h&&t.iconLabel&&!t.iconTextMetrics||p&&t.label2&&!t.textMetrics2||(t.ready=!0):h&&t.iconLabel&&!t.iconTextMetrics||(t.ready=!0)}else f&&!u||(t.ready=!0)}}}}function H(t,e,n,i,r,a,s,l){var u;Object(o.c)(i,s,i.layer,a,r,l);for(var d=0;d<i.labelingElements.length;d++){var f=i.labelingElements[d];f.labelingGroup!==C.r&&(null===(u=f.parent)||void 0===u?void 0:u.labelingGroup)!==C.r?(t.push(f),f.type===c.d.Icon&&(n[f.label.id]=f)):e.push(f)}}function Z(t,e,n,i,o,a,s){var c=n.layer;if("labelLine"===c.type||"oneWayLine"===c.type){var l,u,d,f,h=s.zoom,p=s.styleZoom,m=Math.floor(p),v=h+(m-p),_=n.axis,y=_.startLength,g=_.midLength,b=_.finishLength,x=Object(k.f)(p,s.styleState,!1,n.tileData),w=Object(k.f)(m,s.styleState,!1,n.tileData);if("labelLine"===c.type){var S=Object(k.i)(c.style.textFontSize,x)/r.fonts.baseSize,I=Object(k.i)(c.style.textFontSize,w)/r.fonts.baseSize;l=n.textMetrics.maxWidth*S,u=n.textMetrics.maxWidth*I,d=Object(P.q)(Object(k.i)(c.style.textDuplicationSpacing,w),v),f=Object(P.q)(c.style.lineEndingOffsets,h)}else l=Object(k.i)(c.style.lineLength,x),u=Object(k.i)(c.style.lineLength,w),d=Object(P.q)(Object(k.i)(c.style.duplicationSpacing,w),v),f=Object(P.q)(c.style.endingOffsets,h);for(var j=Object(P.q)(u,v),O=Object(P.q)(l,h)/2,M=d+j,L=y+(g-y)%M,T=y+O+f,z=b-O-f,C="labelLine"!==c.type?t:e,E=L;E<z;E+=M)E>T&&G(C,n,E,O,l,o,a,s,i)}}function G(t,e,n,i,o,a,s,l,u){var d=e.axis,f=l.zoom,h=l.styleZoom,p=d.startLength,m=d.finishLength,v=d.getSegmentIndex(n),_=d.interpolate(n,v);if(!(Object(j.t)(s,_,l)>F)&&function(t,e,n,i,o,a){if("oneWayLine"===t.layer.type)return!0;for(var s=t.axis,c=Object(k.f)(o,a,!1,t.tileData),l=Object(k.i)(t.layer.style.textFontSize,c)/r.fonts.baseSize,u=s.getSegmentIndex(e-n),d=s.getSegmentIndex(e+n),f=Object(P.q)(D*l,i),h=u;h<d;h++){if(W(s.angles[h-1],s.angles[h])>A)return!1;if(W(s.angles[s.getSegmentIndex(s.lengths[h]-f)],s.angles[s.getSegmentIndex(s.lengths[h]+f)])>A)return!1}return!0}(e,n,i,f,h,l.styleState)){var y=c.d.LineText,g=new S.a(e,y,_,l,a,u);g.anchorPosition=n,g.anchorSegmentIndex=v,g.halfLabelWidth=i,g.overflowStyleZoom=Object(L.f)(Object(P.p)(o,m-p),_),function(t,e,n,i,r,o){var a=e.axis,s=e.layer;if("labelLine"===s.type){for(var c=r.zoom,l=r.styleZoom,u=Object(k.f)(l,r.styleState,!1,e.tileData),d=Object(k.i)(s.style.textFontSize,u),f=d/2,h=Object(P.q)(d,c),p=Object(P.q)(s.style.textLabelingSideMargin,c),m=n-i+h/2-p,v=n+i-h/2+p,_=a.getSegmentIndex(m),y=m;y<v;y+=h){for(;a.lengths[_]<y;)_++;q(t,a,y,_,o,r,f)}for(;a.lengths[_]<v;)_++;q(t,a,v,_,o,r,f)}}(g,e,n,i,l,a),t.push(g)}}function W(t,e){var n=Math.abs(t-e);return n>Math.PI?2*Math.PI-n:n}var V=[0,0];function q(t,e,n,i,r,o,a){Object(j.y)(V,e.interpolate(n,i),r,o.size,o.viewport),V[0]=V[0]-t.anchorScreen[0],V[1]=V[1]-t.anchorScreen[1],t.boxes.push([V[0]-a,V[1]-a,V[0]+a,V[1]+a])}function Y(t,e){var n=t.source,i=t.detailLevel,o=t.layer,a=o.minzoom,s=o.maxzoom,l=n===c.c.PersonalPoi,u=l||a>i,d=l||s<i+1||i===r.tiles.maxDetailLevel;return(!u||e>=a)&&(!d||e<s)}var X=n(70),K=n(71),J=n(78),Q=n(18),$=n(95),tt=n(13),et=new Map;e.default=function(t){var e=new X.b(t),n=new K.a(e),l=new y.a("labeling"),u=new $.a,d=n.get(Q.b.Main,"loadFont"),f=new Map,h=new Map,p=[],m=new Map,g=new J.a,b=new J.a,x={},w=Object(a.a)((function(){return l.reset()}),r.workerResetDebounceTime);function S(t,e){for(var n=0,i=e;n<i.length;n++){var r=i[n];g.has(t,r)||(d(t,r),g.set(t,r,!0))}}function I(t,e){var n=t.get(e.id);return void 0===n||void 0===n.placementIndex||n.type===c.d.Icon&&n.layer.innerId!==e.layer.innerId?1:n.placementIndex===e.placementIndex?0:1}n.set("appendLabels",(function(t,e,n,i,r){var o=Object(s.b)(n,e,u,i,r);f.set(t,o)})),n.set("appendLabelBox",(function(t,e){h.set(t,e)})),n.set("removeEmptyBoxLabel",(function(t){h.delete(t)})),n.set("removeLabels",(function(t){f.delete(t),h.delete(t)})),n.set("processLabels",(function(t,e,n,r,a,s,d){for(var y=new Set(a),g=N(t,e,u,f,h,x,b,r,y,S),O=g.boxElements,M=g.oneWayTileElements,P=g.otherTileElements,T=g.noLabelingElements,k=(_(Object(i.e)(Object(i.e)([],P),O),e,d?et:m,s),Object(i.e)(Object(i.e)(Object(i.e)([],T),M),P)),z=new Map,C=0;C<k.length;C++)-1!==($=k[C]).placementIndex&&z.set($.id,$);for(C=0;C<k.length;C++){var E=($=k[C]).label,A=E.styleId,D=E.layer;if(-1!==$.placementIndex){var F=I(m,$);(R=u.getStyle(A))?Object(o.d)(R,D,l,$,F,r,e,n):console.error("Not found style "+A+" in labeling#processLabels")}}for(C=0;C<p.length;C++){var R,B=p[C],U=B.id,H=B.label;if(D=B.layer,A=H.styleId,R=u.getStyle(A)){var Z=B.placementIndex,G=z.get(U);-1!==Z&&(B.placementIndex!==(null==G?void 0:G.placementIndex)||B.type===c.d.Icon&&B.layer.innerId!==(null==G?void 0:G.layer.innerId))&&(e.styleZoom<B.overflowStyleZoom||e.styleZoom<D.minzoom||e.styleZoom>=D.maxzoom||Object(o.d)(R,D,l,B,-1,r,e,n))}else console.error("Not found style "+A+" in labeling#processLabels")}p=k,m=z;for(var W=l.getAccumulatedData(),V=[],q=0,Y=O;q<Y.length;q++)-1!==($=Y[q]).placementIndex&&V.push($.label.idLo);for(var X=new Set,K=Object(j.o)(Object(L.e)(e)),J=0,Q=P;J<Q.length;J++){var $;-1!==($=Q[J]).placementIndex&&v($)&&tt.c(K,$.label.anchorWorld)&&X.add($.label.id)}var nt={survivedLabelBoxIds:V,survivedCommPoiIds:Array.from(X),collectorOutput:W,transferable:W.transferable};return w(),nt})),n.set("appendFont",(function(t,e){x[t]||(x[t]={});var n=x[t];for(var i in e)n[i]=e[i]})),n.set("markFontAsLoaded",(function(t,e){b.set(t,e,!0)})),n.set("addNewRasterSets",(function(t,e){var n=u.getStyle(t);if(n){var i=n.rasterSets;e.forEach((function(t){i.byIndex[t.index]=t,i.byKey[t.key]=t}))}else console.error("Not found style "+t+" in labeling#addNewRasterSets")})),n.set("updatePackingInfo",(function(t,e){var n=u.getStyle(t);if(n)for(var i=n.rasterSets,r=e.length/7,o=0;o<r;o++){var a=e[7*o],s=e[7*o+1],c=e[7*o+6],l=e[7*o+2],d=e[7*o+3],f=e[7*o+4],h=e[7*o+5],p=i.byIndex[a];if(void 0!==p)if(p.isSvg)p.rasters[s]={rasterIndex:s,rasterSetIndex:a,x:l,y:d,w:f,h:h,anchorX:p.anchorX,anchorY:p.anchorY,atlasIndex:c,isPacked:!0};else{var m=p.rasters[s];if(void 0===m){console.error("Not found raster with index "+s+" and raster set index "+a);continue}m.x=l,m.y=d,m.atlasIndex=c,m.isPacked=!0}else console.error("Not found raster set with index "+a)}else console.error("Not found style "+t+" in labeling#updatePackingInfo")})),n.set("clearPreviousLabels",(function(){p=[],m.clear()})),n.set("syncStyle",(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return u.proxySyncStyle.apply(u,t)})),n.set("loadRtlPlugin",E.a),n.set("markRtlPluginLoaded",(function(){E.b&&Object(E.b)()}))}}])},function(t,e,n){var i=n(4),r=n(14);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){var i=n(4),r=n(10);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){var i=n(4),r=n(11);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){"use strict";var i,r=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},o=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n<a.length;n++)if(a[n].identifier===t){e=n;break}return e}function c(t,e){for(var n={},i=[],r=0;r<t.length;r++){var o=t[r],c=e.base?o[0]+e.base:o[0],l=n[c]||0,u="".concat(c," ").concat(l);n[c]=l+1;var d=s(u),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:u,updater:v(f,e),references:1}),i.push(u)}return i}function l(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var r=n.nc;r&&(i.nonce=r)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var a=o(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var u,d=(u=[],function(t,e){return u[t]=e,u.filter(Boolean).join("\n")});function f(t,e,n,i){var r=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=d(e,r);else{var o=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function h(t,e,n){var i=n.css,r=n.media,o=n.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var p=null,m=0;function v(t,e){var n,i,r;if(e.singleton){var o=m++;n=p||(p=l(e)),i=f.bind(null,n,o,!1),r=f.bind(null,n,o,!0)}else n=l(e),i=h.bind(null,n,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=r());var n=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<n.length;i++){var r=s(n[i]);a[r].references--}for(var o=c(t,e),l=0;l<n.length;l++){var u=s(n[l]);0===a[u].references&&(a[u].updater(),a.splice(u,1))}n=o}}}},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=(a=i,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),o=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[n].concat(o).concat([r]).join("\n")}var a,s,c;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(r[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);i&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},function(t,e,n){var i=n(4),r=n(12);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){var i=n(4),r=n(15);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){var i=n(4),r=n(13);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){var i=n(4),r=n(16);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var o={insert:"head",singleton:!1};i(r,o);t.exports=r.locals||{}},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_v40Pms0--hwyOQ8UjPcWr {\n    width: 32px;\n    box-shadow: 0 1px 3px 0 rgba(38, 38, 38, 0.5);\n    border-radius: 4px;\n    display: flex;\n    flex-direction: column;\n    overflow: hidden;\n    background: #fff;\n}\n\n.mapgl_100uyFkiYndX6GvJkrNTro {\n    padding: 0;\n    outline: 0;\n    border: none;\n    cursor: pointer;\n\n    background: #fff;\n    width: 32px;\n    height: 32px;\n    color: #262626;\n    box-sizing: border-box;\n}\n\n.mapgl_100uyFkiYndX6GvJkrNTro:hover {\n    opacity: 0.7;\n}\n\n.mapgl_100uyFkiYndX6GvJkrNTro:active {\n    color: #028eff;\n}\n\n.mapgl_100uyFkiYndX6GvJkrNTro:disabled {\n    background: #f2f2f2;\n    color: #929292;\n    cursor: default;\n}\n\n.mapgl_1VMXd7ruCY-OWQf4wLOXlX {\n    border-bottom: 1px solid #e6e6e6;\n}\n\n.mapgl_3VR3BMH_pT81tH5FCB4UKu {\n    border-bottom: none;\n}\n",""]),e.locals={root:"mapgl_v40Pms0--hwyOQ8UjPcWr",button:"mapgl_100uyFkiYndX6GvJkrNTro",zoomIn:"mapgl_1VMXd7ruCY-OWQf4wLOXlX",zoomOut:"mapgl_3VR3BMH_pT81tH5FCB4UKu"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_1dJRjtTADjfrWEBK1VP-yH {\n    background: #fff;\n    box-shadow: 0 1px 3px 0 rgba(38, 38, 38, 0.5);\n    border-radius: 4px;\n    width: 32px;\n    overflow: hidden;\n}\n\n.mapgl_3zhJcxK1WUkZT4OIb0F0ju {\n    padding: 0;\n    outline: 0;\n    border: none;\n    cursor: pointer;\n    box-sizing: border-box;\n    font-size: 18px;\n    font-weight: 400;\n    width: 32px;\n    height: 32px;\n    color: #262626;\n    background: #fff;\n}\n\n.mapgl_xj2Lg9Z4A-XYFDPMCk-2-:hover {\n    opacity: 0.7;\n}\n\n.mapgl_hvKpkuZ-HybGjVfMvZkJB {\n    background: #299400;\n    color: #fff;\n}\n.mapgl_2MVzHnca_pzo15AMUqLG1Y {\n    background: #ffb81c;\n    color: #fff;\n}\n.mapgl_2Lex5zOJIAmz1em4-jc3kD {\n    background: #fe5000;\n    color: #fff;\n}\n\n.mapgl_hvKpkuZ-HybGjVfMvZkJB:hover,\n.mapgl_2MVzHnca_pzo15AMUqLG1Y:hover,\n.mapgl_2Lex5zOJIAmz1em4-jc3kD:hover {\n    color: rgba(38, 38, 38, 0.7);\n}\n",""]),e.locals={root:"mapgl_1dJRjtTADjfrWEBK1VP-yH",button:"mapgl_3zhJcxK1WUkZT4OIb0F0ju",none:"mapgl_xj2Lg9Z4A-XYFDPMCk-2-",easy:"mapgl_hvKpkuZ-HybGjVfMvZkJB",medium:"mapgl_2MVzHnca_pzo15AMUqLG1Y",hard:"mapgl_2Lex5zOJIAmz1em4-jc3kD"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_1mf4dGW5YwpxRisgDjNvYa {\n    font-family: Helvetica, Arial, sans-serif !important;\n    font-size: 8px !important;\n    line-height: 8px !important;\n    text-align: right !important;\n    display: flex;\n    flex-direction: column;\n    align-items: flex-end;\n    color: #6d7173 !important;\n}\n\n.mapgl_1evexfkL98VWP7vg3WdM_n {\n    display: flex;\n    flex-direction: column;\n    padding-right: 4px;\n}\n\n.mapgl_1-ZxJHDJR4_0HjgadmGoyz {\n    display: flex;\n    flex-direction: row;\n}\n\n.mapgl_2rKXcK6rBLVDts2nY7Soj8 {\n    animation: mapgl_1V_Npc20wdT6RNVr-h_CuO 5s forwards;\n}\n\na.mapgl_B9UnieOsCT3RFtxHKh-re {\n    color: #6d7173 !important;\n    text-decoration: none !important;\n}\n\na.mapgl_B9UnieOsCT3RFtxHKh-re:hover {\n    color: #929292 !important;\n}\n@keyframes mapgl_1V_Npc20wdT6RNVr-h_CuO {\n    85% {\n        opacity: 1;\n    }\n    100% {\n        opacity: 0;\n    }\n}\n",""]),e.locals={container:"mapgl_1mf4dGW5YwpxRisgDjNvYa",text:"mapgl_1evexfkL98VWP7vg3WdM_n",copyrights:"mapgl_1-ZxJHDJR4_0HjgadmGoyz",autoHide:"mapgl_2rKXcK6rBLVDts2nY7Soj8",hideAnimation:"mapgl_1V_Npc20wdT6RNVr-h_CuO",link:"mapgl_B9UnieOsCT3RFtxHKh-re"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_F_tU1ilxWO8LMOuimXOaK {\n    pointer-events: none;\n    position: absolute;\n    top: 0px;\n    left: 0px;\n    width: 100%;\n    height: 100%;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    padding: 10px;\n    background-color: rgba(0, 0, 0, 0.2);\n    cursor: default;\n}\n\n.mapgl_38fZM-7XxSI9BVB93wwLZS {\n    text-align: center;\n    font-size: 24px;\n    font-family: Helvetica, Arial, sans-serif;\n    font-weight: bold;\n    color: white;\n}\n",""]),e.locals={wrap:"mapgl_F_tU1ilxWO8LMOuimXOaK",container:"mapgl_38fZM-7XxSI9BVB93wwLZS"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_39boxHsSrpYLUd1Q_TLWNE {\n    position: relative;\n}\n\n.mapgl_XndZ8Gq86AwHiI9OL2rrI {\n    display: flex;\n    max-height: 40vh;\n    background: #ffffff;\n    width: 32px;\n    overflow: hidden;\n    border-radius: 4px;\n    box-shadow: 0 1px 3px 0 rgba(38, 38, 38, 0.5);\n}\n\n.mapgl_1KjXIyKXx3cKlGOuH7iOqm {\n    width: 100%;\n    overflow-x: hidden;\n    overflow-y: auto;\n    -moz-padding-end: 17px;\n    -webkit-padding-end: 17px;\n    -webkit-margin-end: -17px;\n}\n\n.mapgl_3YmAJvPYAFZnAd-ueoYpoZ {\n    display: flex;\n    flex-direction: column-reverse;\n}\n\n.mapgl_1Q3q5ldrXhqbptc76FSJrD {\n    padding: 0;\n\n    border: none;\n    background: #ffffff;\n    height: 32px;\n    width: 32px;\n    color: #262626;\n    cursor: pointer;\n    border-bottom: 1px solid #e6e6e6;\n    box-sizing: border-box;\n    flex-shrink: 0;\n}\n.mapgl_1Q3q5ldrXhqbptc76FSJrD:focus {\n    outline: 0;\n}\n.mapgl_1Q3q5ldrXhqbptc76FSJrD:first-child {\n    border-bottom: none;\n}\n.mapgl_1Q3q5ldrXhqbptc76FSJrD:hover {\n    color: rgba(38, 38, 38, 0.7);\n}\n.mapgl_1Q3q5ldrXhqbptc76FSJrD:active {\n    color: #028eff;\n}\n.mapgl_1Q3q5ldrXhqbptc76FSJrD:disabled {\n    background: #f2f2f2;\n    color: #929292;\n    cursor: default;\n}\n\n.mapgl_vtN8BO05QrwsIJqLj2gQP {\n    font-size: 18px;\n    line-height: 32px;\n    font-weight: 400;\n    overflow-wrap: break-word;\n\n    position: relative;\n    text-align: center;\n    height: 100%;\n}\n\n.mapgl_26bMfdsaLACTmUYdHiXRmw:after {\n    content: '';\n    position: absolute;\n    top: 4px;\n    bottom: 4px;\n    width: 4px;\n    height: 4px;\n    border-radius: 50%;\n    background: #028eff;\n}\n",""]),e.locals={root:"mapgl_39boxHsSrpYLUd1Q_TLWNE",container:"mapgl_XndZ8Gq86AwHiI9OL2rrI",scroller:"mapgl_1KjXIyKXx3cKlGOuH7iOqm",content:"mapgl_3YmAJvPYAFZnAd-ueoYpoZ",control:"mapgl_1Q3q5ldrXhqbptc76FSJrD",label:"mapgl_vtN8BO05QrwsIJqLj2gQP",_hasResult:"mapgl_26bMfdsaLACTmUYdHiXRmw"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_1PC1ZGStC6bB0pqh8mPrBT {\n    position: absolute;\n    pointer-events: none;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n}\n\n.mapgl_13_0_l_fgoZs8PolTXDK9q {\n    position: absolute;\n    display: flex;\n    z-index: 50;\n    pointer-events: none;\n    width: 100%;\n    height: 100%;\n}\n\n.mapgl_13_0_l_fgoZs8PolTXDK9q > div > * {\n    pointer-events: auto;\n}\n\n.mapgl_186oqA-9eJdlWMmD3_Vnns {\n    flex-direction: column;\n    align-items: flex-start;\n}\n\n.mapgl_13LsKgkregIL3d-3t3GQiq {\n    flex-direction: row;\n    justify-content: center;\n    align-items: flex-start;\n}\n\n.mapgl_1iEkksZSQRNvmX99mxScKc {\n    flex-direction: column;\n    align-items: flex-end;\n}\n\n.mapgl_sp6tcU3LneOLa7JFJ5wiU {\n    flex-direction: column;\n    justify-content: center;\n    align-items: flex-start;\n}\n\n.mapgl_16f6kGlZuehI1tEVgwVCXg {\n    flex-direction: column;\n    justify-content: center;\n    align-items: flex-end;\n}\n\n.mapgl_3c-t8gKvFcwFVSxrVi0pX5 {\n    flex-direction: column-reverse;\n    align-items: flex-start;\n}\n\n.mapgl_3FJuGkEeU60U5245GJ2Q_O {\n    flex-direction: row;\n    justify-content: center;\n    align-items: flex-end;\n}\n\n.mapgl_WDfwMCZeDIyXvL0vySrTy {\n    flex-direction: column-reverse;\n    align-items: flex-end;\n}\n\n.mapgl_186oqA-9eJdlWMmD3_Vnns > div + div,\n.mapgl_1iEkksZSQRNvmX99mxScKc > div + div,\n.mapgl_sp6tcU3LneOLa7JFJ5wiU > div + div,\n.mapgl_16f6kGlZuehI1tEVgwVCXg > div + div {\n    margin-top: 10px;\n}\n\n.mapgl_3c-t8gKvFcwFVSxrVi0pX5 > div + div,\n.mapgl_WDfwMCZeDIyXvL0vySrTy > div + div {\n    margin-bottom: 10px;\n}\n\n.mapgl_13LsKgkregIL3d-3t3GQiq > div + div,\n.mapgl_3FJuGkEeU60U5245GJ2Q_O > div + div {\n    margin-left: 10px;\n}\n",""]),e.locals={controlPane:"mapgl_1PC1ZGStC6bB0pqh8mPrBT",container:"mapgl_13_0_l_fgoZs8PolTXDK9q",topLeft:"mapgl_186oqA-9eJdlWMmD3_Vnns",topCenter:"mapgl_13LsKgkregIL3d-3t3GQiq",topRight:"mapgl_1iEkksZSQRNvmX99mxScKc",centerLeft:"mapgl_sp6tcU3LneOLa7JFJ5wiU",centerRight:"mapgl_16f6kGlZuehI1tEVgwVCXg",bottomLeft:"mapgl_3c-t8gKvFcwFVSxrVi0pX5",bottomCenter:"mapgl_3FJuGkEeU60U5245GJ2Q_O",bottomRight:"mapgl_WDfwMCZeDIyXvL0vySrTy"},t.exports=e},function(t,e,n){(e=n(5)(!1)).push([t.i,".mapgl_303VEzN1YZR5wQM-AHJ-V0 {\n    font-family: Helvetica, Arial, sans-serif !important;\n    font-size: 8px !important;\n    line-height: 8px !important;\n    text-align: right !important;\n    display: flex;\n    align-items: flex-start;\n    color: #6d7173 !important;\n}\n\n.mapgl_1xadlWulQiYFq0wxrj-jwO {\n    display: block;\n}\n\na.mapgl_1UVT7li_KfnZFAKhyNBrXr {\n    color: #6d7173 !important;\n    text-decoration: none !important;\n}\n\na.mapgl_1UVT7li_KfnZFAKhyNBrXr:hover {\n    color: #929292 !important;\n}\n",""]),e.locals={container:"mapgl_303VEzN1YZR5wQM-AHJ-V0",text:"mapgl_1xadlWulQiYFq0wxrj-jwO",link:"mapgl_1UVT7li_KfnZFAKhyNBrXr"},t.exports=e},function(t,e){setTimeout((function(){if("__mapglPlugins"in window)for(var t in window.__mapglPlugins)window.mapgl[t]=window.__mapglPlugins[t]}),0)},function(t,e,n){"use strict";n.r(e),n.d(e,"Map",(function(){return V})),n.d(e,"Marker",(function(){return K})),n.d(e,"Label",(function(){return $})),n.d(e,"HtmlMarker",(function(){return et})),n.d(e,"Control",(function(){return d})),n.d(e,"ZoomControl",(function(){return m})),n.d(e,"TrafficControl",(function(){return y})),n.d(e,"FloorControl",(function(){return C})),n.d(e,"CircleMarker",(function(){return ot})),n.d(e,"Circle",(function(){return it})),n.d(e,"Polygon",(function(){return lt})),n.d(e,"Polyline",(function(){return st})),n.d(e,"GeoJsonSource",(function(){return dt})),n.d(e,"RasterTileSource",(function(){return vt})),n.d(e,"LngLatBounds",(function(){})),n.d(e,"LngLatBoundsClass",(function(){return L})),n.d(e,"AnimationOptions",(function(){})),n.d(e,"RotationAnimationOptions",(function(){})),n.d(e,"Easing",(function(){})),n.d(e,"MapOptions",(function(){})),n.d(e,"MarkerOptions",(function(){})),n.d(e,"MarkerIconOptions",(function(){})),n.d(e,"LabelOptions",(function(){})),n.d(e,"ControlOptions",(function(){})),n.d(e,"ControlPosition",(function(){})),n.d(e,"Padding",(function(){})),n.d(e,"HtmlMarkerOptions",(function(){})),n.d(e,"CircleMarkerOptions",(function(){})),n.d(e,"CircleOptions",(function(){})),n.d(e,"PolygonOptions",(function(){})),n.d(e,"PolylineOptions",(function(){})),n.d(e,"GeoJsonSourceOptions",(function(){})),n.d(e,"MapSupportOptions",(function(){})),n.d(e,"MapEventTable",(function(){})),n.d(e,"DynamicObjectEventTable",(function(){})),n.d(e,"DynamicObjectPointerEvent",(function(){})),n.d(e,"MapEvent",(function(){})),n.d(e,"MapPointerEvent",(function(){})),n.d(e,"EventTarget",(function(){})),n.d(e,"isSupported",(function(){return _t})),n.d(e,"notSupportedReason",(function(){return yt}));var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function s(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function s(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}Object.create;function c(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}Object.create;var l=n(0),u=function(){function t(){this.events={}}return t.prototype.on=function(t,e){var n=this.events[t];return n||(n=this.events[t]=[]),n.push(e),this},t.prototype.once=function(t,e){var n=this,i=function(r){n.off(t,i),e.call(n,r)};return this.on(t,i),this},t.prototype.off=function(t,e){var n=this.events[t];if(!n)return this;var i=n.indexOf(e);return-1!==i&&n.splice(i,1),this},t.prototype.emit=function(t,e){var n=this.events[t];if(!n)return this;for(var i=n.slice(),r=0;r<i.length;r++)i[r].call(this,e);return this},t}(),d=function(){function t(t,e,n){var i,r=n.position;this._wrap=document.createElement("div"),this._wrap.style.userSelect="none",this._wrap.innerHTML=e,this._position=r,this._controlPane=t._controlPane,this._container=this._controlPane.getContainerByPosition(r),null===(i=this._container)||void 0===i||i.append(this._wrap)}return t.prototype.destroy=function(){this._wrap.remove()},t.prototype.getPosition=function(){return this._position},t.prototype.setPosition=function(t){this._container.removeChild(this._wrap),this._container=this._controlPane.getContainerByPosition(t),this._container.append(this._wrap),this._position=t},t.prototype.getContainer=function(){return this._wrap},t}(),f=n(2),h=n.n(f),p='\n    <div class="'+h.a.root+'">\n        <button class="'+h.a.button+" "+h.a.zoomIn+'">\n            <svg\n                xmlns="http://www.w3.org/2000/svg"\n                viewBox="0 0 32 32"\n                width="32"\n                height="32"\n                fill="currentColor"\n            >\n                <path d="M24 15h-7V8h-2v7H8v2h7v7h2v-7h7v-2z"></path>\n            </svg>\n        </button>\n        <button class="'+h.a.button+" "+h.a.zoomOut+'">\n            <svg\n                xmlns="http://www.w3.org/2000/svg"\n                viewBox="0 0 32 32"\n                fill="currentColor"\n                width="32"\n                height="32"\n            >\n                <path d="M8 15h16v2H8z"></path>\n            </svg>\n        </button>\n    </div>\n',m=function(t){function e(e,n){var i=t.call(this,e,p,n)||this;return i._zoomIn=function(){i._map.setZoom(i._map.getZoom()+1,{duration:400})},i._zoomOut=function(){i._map.setZoom(i._map.getZoom()-1,{duration:400})},i._checkZoom=function(){var t=i._map.getZoom();t<=i._map.getMinZoom()?i._zoomOutButton.disabled=!0:i._zoomOutButton.disabled=!1,t>=i._map.getMaxZoom()?i._zoomInButton.disabled=!0:i._zoomInButton.disabled=!1},i._map=e,i._zoomInButton=i._wrap.querySelector("."+h.a.zoomIn),i._zoomOutButton=i._wrap.querySelector("."+h.a.zoomOut),i._zoomInButton.addEventListener("click",i._zoomIn),i._zoomOutButton.addEventListener("click",i._zoomOut),i._map.on("zoom",i._checkZoom),i}return r(e,t),e.prototype.destroy=function(){this._map.off("zoom",this._checkZoom),this._zoomInButton.removeEventListener("click",this._zoomIn),this._zoomOutButton.removeEventListener("click",this._zoomOut),t.prototype.destroy.call(this)},e}(d),v=n(3),_=n.n(v),y=function(t){function e(e,n){var i=t.call(this,e,"",n)||this;return i._onClick=function(){i._trafficVisible?(i._map.hideTraffic(),i._map.patchStyleState({trafficOn:!1})):(i._map.showTraffic(),i._map.patchStyleState({trafficOn:!0}))},i._map=e,i._trafficVisible=!1,i._render(),e.on("trafficscore",(function(t){var e=t.score;i._score=e,i._render()})),e.on("trafficshow",(function(){i._trafficVisible=!0,i._render()})),e.on("traffichide",(function(){i._trafficVisible=!1,i._render()})),i}return r(e,t),e.prototype._render=function(){var t=this._trafficVisible?function(t){if(void 0===t)return"";if(t>6)return _.a.hard;if(t>3)return _.a.medium;return _.a.easy}(this._score):_.a.none,e='\n            <div class="'+_.a.root+'">\n                <button class="'+_.a.button+" "+t+'">\n                    '+(this._trafficVisible&&void 0!==this._score?this._score:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="14" viewBox="0 0 20 14" style="margin-top: 4px">\n    <path d="M 18,5 C 18,4 17,1 15,1 H 12 10 C 8,1 7,4 7,5 H 5 v 2 h 1 v 4 c 0,0.6 0,1 1,1 v 2 h 2 v -2 h 7 v 2 h 2 v -2 c 1,0 1,-0.4 1,-1 V 7 h 1 V 5 H 18 z M 10,3 h 2 3 c 2,0 2,1 2,3 H 8 C 8,4 8,3 10,3 z M 9,10 H 8 C 7.4,10 7,9.6 7,9 7,8.4 7.4,8 8,8 h 1 c 0.6,0 1,0.4 1,1 0,0.6 -0.4,1 -1,1 z m 8,0 H 16 C 15.4,10 15,9.6 15,9 15,8.4 15.4,8 16,8 h 1 c 0.6,0 1,0.4 1,1 0,0.6 -0.4,1 -1,1 z M 4,4 H 6 V 3 H 4 C 1,3 1,6 1,7 H 0 v 1 h 1 v 4 H 3 V 11 H 5 V 7 H 2 C 2,6 2,4 4,4 z M 3,9 4,10 H 2 V 9 h 1 z" fill="#616161" fill-rule="evenodd"/>\n    <g fill="#fff">\n        <path d="m 16,8 h 1 c 0.4,0 0.7,0.2 0.8,0.5 C 17.9,8.4 18,8.2 18,8 18,7.4 17.6,7 17,7 h -1 c -0.6,0 -1,0.4 -1,1 0,0.2 0.1,0.4 0.2,0.5 C 15.3,8.2 15.6,8 16,8 z"/>\n        <path d="M 8,8 H 9 C 9.4,8 9.7,8.2 9.8,8.5 9.9,8.4 10,8.2 10,8 10,7.4 9.6,7 9,7 H 8 C 7.4,7 7,7.4 7,8 7,8.2 7.1,8.4 7.2,8.5 7.3,8.2 7.6,8 8,8 z"/>\n        <path d="M 6,3 H 4 C 4,3 4,3 4,3 2,3 2,5 2,6 H 2 C 2.1,5 2.5,4 4,4 H 5 6 V 3 z"/>\n        <path d="M0 7H1V8H0z"/>\n        <path d="M 15,2 H 12 10 C 8,2 8,3 8,5 H 8 C 8,3.7 8.3,3 10,3 h 2 3 c 1.7,0 1.9,0.7 2,2 h 0 C 17,3 17,2 15,2 z"/>\n        <path d="M3 9L4 9 3 8 2 8 2 9 2 9 2 9 3 9z"/>\n        <path d="M 7,11 C 6,11 6,10.6 6,10 v 1 c 0,0.6 0,1 1,1 v -1 z"/>\n        <path d="m 18,11 v 1 c 1,0 1,-0.4 1,-1 v -1 c 0,0.6 0,1 -1,1 z"/>\n        <path d="M19 6H20V7H19z"/>\n        <path d="M3 11L1 11 1 12 3 12 3 11 5 11 5 7 5 7 5 10 3 10z"/>\n        <path d="M16 13H18V14H16z"/>\n        <path d="M5 6H6V7H5z"/>\n        <path d="M9 13L7 13 7 14 9 14 9 12 16 12 16 11 9 11z"/>\n    </g>\n    <g fill="#444">\n        <path d="M 2,6 C 2,6.4 2,6.7 2,7 H 5 V 6 H 2 z"/>\n        <path d="M2 9L2 10 4 10 3 9z"/>\n        <path d="M 4,3 H 6 V 2 H 4 C 1,2 1,5 1,6 H 0 V 7 H 1 C 1,6 1,3 4,3 z"/>\n        <path d="M 18,4 C 18,3 17,0 15,0 H 12 10 C 8,0 7,3 7,4 H 6 5 V 5 H 7 C 7,4 8,1 10,1 h 2 3 c 2,0 3,3 3,4 h 2 V 4 h -2 z"/>\n        <path d="M 8,10 H 9 C 9.6,10 10,9.6 10,9 10,8.8 9.9,8.6 9.8,8.5 9.7,8.8 9.4,9 9,9 H 8 C 7.6,9 7.3,8.8 7.2,8.5 7.1,8.6 7,8.8 7,9 c 0,0.6 0.4,1 1,1 z"/>\n        <path d="M 17,6 C 17,5.6 17,5.3 17,5 H 8 c 0,0.3 0,0.6 0,1 h 9 z"/>\n        <path d="M 17.8,8.5 C 17.7,8.8 17.4,9 17,9 H 16 C 15.6,9 15.3,8.8 15.2,8.5 15.1,8.6 15,8.8 15,9 c 0,0.6 0.4,1 1,1 h 1 c 0.6,0 1,-0.4 1,-1 0,-0.2 -0.1,-0.4 -0.2,-0.5 z"/>\n    </g>\n</svg>\n')+"\n                </button>\n            </div>\n        ";this._wrap.innerHTML=e,this._wrap.querySelector("."+_.a.button).addEventListener("click",this._onClick)},e}(d);var g,b=n(6),x=n.n(b);!function(t){t.osm="osm",t.api="api",t.license="license"}(g||(g={}));var w=function(t){function e(e,n){var i,r,o=t.call(this,e,(i=!0===n.autoHide,r=!0===n.showSberLogo,"\n    <div class="+x.a.container+'>\n        <div>\n            <a href="https://dev.2gis.ru" target="_blank">\n                <svg xmlns="http://www.w3.org/2000/svg" width="45" height="14">\n                    <path\n                        fill-rule="evenodd"\n                        clip-rule="evenodd"\n                        fill="#6D7173"\n                        d="M6.964 0c3.865 0 6.99 3.144 6.99 6.994 0 3.862-3.125 7.006-6.99 7.006C3.136 14 0 10.856 0 6.994 0 3.144 3.136 0 6.964 0zm.025 2.45c-2.297 0-3.85 1.805-3.85 3.735 0 .772.172 1.457.575 2.304 2.33.012 2.794 1.446 2.943 2.712l.014.126.061.573h.501l.061-.573.014-.126c.15-1.266.605-2.7 3.017-2.712.416-.847.489-1.532.489-2.291 0-1.955-1.528-3.748-3.825-3.748zm34.142-.21c2.094 0 3.6 1.04 3.869 3.017h-2.12c-.14-.735-.753-1.305-1.775-1.305-.88 0-1.404.418-1.404 1.102 0 .778.884.942 1.757 1.074l.196.029c1.367.203 3.32.596 3.32 2.776 0 2.029-1.698 2.967-3.767 2.967-2.234 0-3.754-1.116-3.881-3.195h2.094c.179.964.894 1.496 1.966 1.496.869 0 1.482-.355 1.482-1.077 0-1.065-1.226-1.09-2.478-1.332-.97-.19-2.796-.659-2.796-2.623 0-1.851 1.417-2.929 3.537-2.929zm-12.365.21c2.174 0 4.013 1.217 4.374 3.338h-2.1c-.323-.941-1.168-1.468-2.299-1.468-1.85 0-2.646 1.443-2.646 2.861 0 1.406.845 2.824 2.659 2.824 1.031 0 1.926-.464 2.323-1.443H28.53V7.006h4.61v.74c0 2.535-1.926 4.154-4.386 4.154-2.498 0-4.684-1.744-4.684-4.694 0-2.911 2.013-4.756 4.696-4.756zm-9.156 0c2.12 0 3.574 1.217 3.574 3.148 0 1.574-.966 2.496-2.658 3.234-1.116.48-1.225.548-2.386.898h5.232v1.82h-7.599V8.845c1.09-.37 2.157-.787 3.65-1.44 1.09-.479 1.68-.921 1.68-1.709 0-.787-.59-1.475-1.593-1.475-1.154 0-1.806.922-1.78 1.93h-2.032C15.685 3.84 17.353 2.45 19.61 2.45zm16.764 0v9.1h-1.978v-9.1h1.978z"\n                    /></svg\n            ></a>\n\n            '+(r?'\n                    <a href="https://dev.2gis.ru" target="_blank">\n                    <svg xmlns="http://www.w3.org/2000/svg" width="54" height="16">\n                        <path\n                            fill="#6D7173"\n                            fill-rule="evenodd"\n                            d="M14.888 6.746a7 7 0 11-2.492-4.193l-1.361 1.004A5.35 5.35 0 008 2.617C5.032 2.617 2.617 5.032 2.617 8S5.032 13.383 8 13.383 13.383 10.968 13.383 8c0-.048 0-.096-.002-.144l1.507-1.11zm-9.553-.613L8 7.803l5.54-4.082c.33.427.613.894.838 1.391L8 9.812l-2.665-1.67v-2.01zm36.44-.942l1.902-1.403h-6.37v8.424h6.37V10.81h-4.552V8.652h3.883V7.25h-3.883V5.19h2.65zM30.287 7.072H32.5c2.01 0 3.115.886 3.115 2.494 0 1.682-1.22 2.646-3.35 2.646h-3.794V3.788h7.251L33.82 5.191h-3.53v1.881zm0 3.737h1.896c1.122 0 1.69-.373 1.691-1.167 0-.777-.537-1.168-1.691-1.168h-1.896v2.335zm18.55-7.02h-3.469v8.423h1.818V9.826h1.65c2.213 0 3.588-1.164 3.588-3.023 0-1.86-1.374-3.015-3.588-3.015zm-.04 4.634h-1.61V5.191h1.61c1.165 0 1.806.574 1.806 1.616 0 1.042-.64 1.616-1.806 1.616zM23.78 10.782c.56 0 1.103-.136 1.57-.393l.402-.22 1.176.866c-.775.832-1.92 1.288-3.23 1.288-1.253 0-2.395-.442-3.217-1.245-.819-.8-1.27-1.91-1.27-3.124 0-1.208.453-2.301 1.275-3.078.817-.773 1.962-1.198 3.224-1.198 1.162 0 2.18.353 2.94 1.022l.087.076-1.304.96a2.77 2.77 0 00-1.653-.517c-1.638 0-2.828 1.17-2.828 2.781 0 1.612 1.19 2.782 2.828 2.782z"\n                        ></path></svg\n                    ></a>\n                ':"")+"\n        </div>\n\n        <div class="+x.a.text+">\n            <div class="+(i?x.a.autoHide:"")+'>\n                ©\n                <a\n                    href="https://www.openstreetmap.org/copyright"\n                    target="_blank"\n                    class='+x.a.link+"\n                    data-type="+g.osm+"\n                    >&nbsp;2GIS, OpenStreetMap contributors\n                </a>\n            </div>\n        </div>\n    </div>\n"),n)||this;return o._onClick=function(t){if(t.target&&((n=t.target)&&"href"in n&&"dataset"in n)){var e=t.target.dataset.type;e&&function(t){return t in g}(e)&&o._map.emit("copyrightclick",{type:e,href:t.target.href,originalEvent:t})}var n},o._map=e,!1===n.interactive&&(o._wrap.style.pointerEvents="none"),o._wrap.querySelector("."+x.a.container).addEventListener("click",o._onClick),o}return r(e,t),e.prototype.destroy=function(){this._wrap.querySelector("."+x.a.container).removeEventListener("click",this._onClick),t.prototype.destroy.call(this)},e}(d);var S=n(8),I=n.n(S),j=function(){function t(t,e){this.rootContainer=t._impl.modules.layout.rootContainer,this.content=e,this.isShown=!1}return t.prototype.display=function(){this.isShown||(this.wrap||(this.wrap=this.initWrap()),this.rootContainer.appendChild(this.wrap),this.isShown=!0)},t.prototype.hide=function(){this.isShown&&(this.wrap&&this.rootContainer.removeChild(this.wrap),this.isShown=!1)},t.prototype.isDisplayed=function(){return this.isShown},t}(),O="\n    <div class="+I.a.container+">\n        Your MapGL key is invalid. Please contact api@2gis.com to get MapGL key.\n    </div>\n",M=function(t){function e(e){var n=t.call(this,e,O)||this;return e._impl.on("invalidtilekey",(function(){n.isDisplayed()||n.display()})),n}return r(e,t),e.prototype.initWrap=function(){var t=document.createElement("div");return t.classList.add(""+I.a.wrap),t.innerHTML=this.content,t},e}(j),P=function(){for(var t,e="",n=0;n<32;n++)t=16*Math.random()|0,n>4&&n<21&&!(n%4)&&(e+="-"),e+=(12===n?4:16===n?3&t|8:t).toString(16);return e},L=function(){function t(t){this.northEast=t.northEast,this.southWest=t.southWest}return t.prototype.extend=function(t){return this.southWest=[Math.min(this.southWest[0],t[0]),Math.min(this.southWest[1],t[1])],this.northEast=[Math.max(this.northEast[0],t[0]),Math.max(this.northEast[1],t[1])],this},t}(),T=n(1),k=n.n(T),z='\n    <div class="'+k.a.root+'">\n        <div class="'+k.a.container+'">\n            <div class="'+k.a.scroller+'">\n                <div class="'+k.a.content+'" />\n            </div>\n        </div>\n    </div>\n',C=function(t){function e(e,n){var i=t.call(this,e,z,n)||this;return i._removeButtonsEventListeners=function(){i._content&&i._content.childNodes.forEach((function(t){if(i._handlers.has(t)){var e=i._handlers.get(t);void 0!==e&&t.removeEventListener("click",e)}}))},i._showControl=function(t){var e,n,r=t.currentFloorLevelIndex,o=t.floorPlanId,a=t.floorLevels;if(i._floor={currentFloorLevelIndex:r,floorPlanId:o},i._root.style.display="block",i._content.innerHTML="",a.forEach((function(t){var e=t.floorLevelIndex,o=t.floorLevelName,a=document.createElement("button");a.className=k.a.control,a.innerHTML='<div class="'+k.a.label+'">'+o+"</div>",a.name=e.toLocaleString(),r===e&&(a.disabled=!0,n=a);var s=i._controlHandler(e);a.addEventListener("click",s),i._handlers.set(a,s),i._content.append(a)})),n&&n.offsetTop){var s=null===(e=n.parentElement)||void 0===e?void 0:e.parentElement;s&&(s.scrollTop=n.offsetTop)}},i._hideControl=function(){i._removeButtonsEventListeners(),i._floor=void 0,i._root.style.display="none"},i._onLevelChange=function(t){i._switchCurrentFloorLevel(t.floorLevelIndex)},i._controlHandler=function(t){return function(){i._switchCurrentFloorLevel(t),i._floor&&i._map.setFloorPlanLevel(i._floor.floorPlanId,t)}},i._switchCurrentFloorLevel=function(t){i._floor&&(i._wrap.querySelector("."+k.a.control+'[name="'+i._floor.currentFloorLevelIndex+'"]').disabled=!1,i._wrap.querySelector("."+k.a.control+'[name="'+t+'"]').disabled=!0,i._floor.currentFloorLevelIndex=t)},i._map=e,i._root=i._wrap.querySelector("."+k.a.root),i._content=i._wrap.querySelector("."+k.a.content),i._handlers=new WeakMap,i._root.style.display="none",e.on("floorplanshow",i._showControl),e.on("floorplanhide",i._hideControl),e.on("floorlevelchange",i._onLevelChange),i}return r(e,t),e.prototype.destroy=function(){this._map.off("floorplanshow",this._showControl),this._map.off("floorplanhide",this._hideControl),this._map.off("floorlevelchange",this._onLevelChange),this._removeButtonsEventListeners(),t.prototype.destroy.call(this)},e}(d),E=n(7),A=n.n(E),D=function(){function t(t,e){this.wrap=document.createElement("div"),this.wrap.className=A.a.controlPane,this.containers={},t._impl.modules.layout.rootContainer.appendChild(this.wrap),this.padding={top:10,right:10,bottom:10,left:10},this.setPadding(e.padding||{})}return t.prototype.setPadding=function(t){var e=this;Object.keys(this.padding).forEach((function(n){e.padding[n]=void 0!==t[n]?t[n]:10,e.wrap.style["margin"+n.replace(/^\w/,(function(t){return t.toUpperCase()}))]=e.padding[n]+"px"}))},t.prototype.getPadding=function(){return o({},this.padding)},t.prototype.destroy=function(){this.wrap.remove()},t.prototype.getContainerByPosition=function(t){var e=this.containers[t];return e||(e=this.containers[t]=this._initControlContainer(t)),e},t.prototype._initControlContainer=function(t){var e=document.createElement("div");return e.classList.add(A.a.container,A.a[t]),this.wrap.appendChild(e),e},t}(),F=function(){function t(t){var e,n,i,r,o=this;this.commPoiQueue=[],this.msgOrderNumber=0,this.utcOffset=(e=(new Date).getTimezoneOffset(),n=e>0?"-":"+",i=""+Math.floor(Math.abs(e)/60),r=""+Math.abs(e)%60,n+(i.length>1?i:"0"+i)+":"+(r.length>1?r:"0"+r)),this.unsentMessages=[],this.onEvent=function(t){var e,n=t.commPoiIds,i=Date.now();(e=o.commPoiQueue).push.apply(e,n.map((function(t){return{id:t,timestamp:i}}))),o.timer||(o.timer=window.setTimeout(o.sendMessages,5e3))},this.onSendFail=function(t){var e;(e=o.unsentMessages).push.apply(e,t),o.timer||(o.timer=window.setTimeout(o.sendMessages,5e3))},this.sendMessages=function(){o.timer=void 0;var t=o.map._impl.state,e=t.tileKey,n=t.sessionId,i=c(c([],o.unsentMessages),o.commPoiQueue.map((function(t){return function(t,e,n,i,r,o){var a={type:302,eventType:"view",eventId:P(),eventOrdinal:n,uiElement:{name:"POI",ownerName:"map"},timestamp:e,utcOffset:r,payload:{POI:{adsHighlight:!0,entity:{id:t,type:"branch"}}},common:{formatVersion:3,appVersion:"v1",product:44,apikey:i}};o&&(a.common.sessionId=o);return a}(t.id,t.timestamp,o.msgOrderNumber++,e,o.utcOffset,n)})));o.commPoiQueue=[],o.unsentMessages=[],i.length&&fetch("https://s1.bss.2gis.com/bss/3",{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}}).then((function(t){t.ok||o.onSendFail(i)}),(function(){return o.onSendFail(i)}))},this.map=t,t._impl.on("commpoishow",this.onEvent)}return t.prototype.destroy=function(){clearTimeout(this.timer),this.commPoiQueue=[],this.timer=void 0,this.map._impl.off("commpoishow",this.onEvent)},t}();var R=2,B=20,N=l.mapglUtils.getBounds,U=l.mapglUtils.projectMapToGeo,H=l.mapglUtils.projectGeoToMap,Z=l.mapglUtils.projectMapToScreen,G=l.mapglUtils.projectScreenToMap,W=l.mapglUtils.setVPMatrix,V=function(t){function e(e,n){var i,r,a,s=t.call(this)||this;if("string"==typeof e){var c=document.getElementById(e);if(!c)throw new Error("Could not found html element with id: "+e);a=c}else a=e;var u=o(o({},n),{disableHoverStyles:!0,tileServer:n.tileServer||"tile{subdomain}-sdk.maps.2gis.com",sendAnalytics:!n.disableAnalytics,style:n.style||"c080bb6a-8134-4993-93a1-5b4d8c36a59b",styleOptions:n.styleOptions,styleState:n.styleState,minZoom:null!==(i=n.minZoom)&&void 0!==i?i:R,maxZoom:null!==(r=n.maxZoom)&&void 0!==r?r:B,sessionId:P(),hillshade:n.hillshade?{}:void 0});if(n.floorsServerUrl&&(u.floorsUrl=n.floorsServerUrl),n.trafficServerUrl){var d=new URL(n.trafficServerUrl);u.trafficServer=d.host,u.trafficProtocol=d.protocol.slice(0,-1)}if(n.tileServerUrl){d=new URL(n.tileServerUrl);u.tileProtocol=d.protocol.slice(0,-1),u.tileServer=d.host}return s._impl=new l.Map(a,u),s._impl.on("idle",(function(){return s._emitMapEvent("idle")})).on("resize",(function(){return s._emitMapEvent("resize")})).on("move",(function(){return s._emitMapEvent("move")})).on("movestart",(function(){return s._emitMapEvent("movestart")})).on("moveend",(function(){return s._emitMapEvent("moveend")})).on("center",(function(){return s._emitMapEvent("center")})).on("centerstart",(function(){return s._emitMapEvent("centerstart")})).on("centerend",(function(){return s._emitMapEvent("centerend")})).on("zoom",(function(){return s._emitMapEvent("zoom")})).on("zoomstart",(function(){return s._emitMapEvent("zoomstart")})).on("zoomend",(function(){return s._emitMapEvent("zoomend")})).on("rotation",(function(){return s._emitMapEvent("rotation")})).on("rotationstart",(function(){return s._emitMapEvent("rotationstart")})).on("rotationend",(function(){return s._emitMapEvent("rotationend")})).on("pitch",(function(){return s._emitMapEvent("pitch")})).on("pitchstart",(function(){return s._emitMapEvent("pitchstart")})).on("pitchend",(function(){return s._emitMapEvent("pitchend")})).on("trafficshow",(function(){return s._emitMapEvent("trafficshow")})).on("traffichide",(function(){return s._emitMapEvent("traffichide")})).on("floorcomplexshow",(function(t){var e=t.id,n=t.currentFloor,i=t.floorNames;return s.emit("floorplanshow",{floorPlanId:e,currentFloorLevelIndex:n,floorLevels:i.map((function(t,e){return{floorLevelIndex:e,floorLevelName:t}}))})})).on("floorcomplexhide",(function(t){return s.emit("floorplanhide",{floorPlanId:t.id})})).on("floorcomplexlevelchange",(function(t){return s.emit("floorlevelchange",{floorLevelName:t.floorName,floorLevelIndex:t.floorIndex,floorPlanId:t.id})})),s._impl.on("click",(function(t){return s._emitMapPointerEvent("click",t)})).on("dblclick",(function(t){return s._emitMapPointerEvent("dblclick",t)})).on("contextmenu",(function(t){return s._emitMapPointerEvent("contextmenu",t)})).on("mousemove",(function(t){return s._emitMapPointerEvent("mousemove",t)})).on("mouseover",(function(t){return s._emitMapPointerEvent("mouseover",t)})).on("mouseout",(function(t){return s._emitMapPointerEvent("mouseout",t)})).on("mousedown",(function(t){return s._emitMapPointerEvent("mousedown",t)})).on("mouseup",(function(t){return s._emitMapPointerEvent("mouseup",t)})).on("touchstart",(function(t){return s._emitMapPointerEvent("touchstart",t)})).on("touchend",(function(t){return s._emitMapPointerEvent("touchend",t)})),s._impl.on("trafficscore",(function(t){var e=t.score;return s.emit("trafficscore",{score:e})})),s._impl.on("styleload",(function(t){var e=t.style;return s.emit("styleload",{style:e})})),s._controlPane=new D(s,{padding:n.controlsLayoutPadding}),s._initControls(n),n.disableBssStatistics||(s._commPoiShowDispatcher=new F(s)),new M(s),s}return r(e,t),e.prototype.setCenter=function(t,e){return this._impl.setCenter(t,e),this},e.prototype.getCenter=function(){return this._impl.getCenter()},e.prototype.setZoom=function(t,e){return this._impl.setZoom(t,e),this},e.prototype.getZoom=function(){return this._impl.getZoom()},e.prototype.getStyleZoom=function(){return this._impl.getStyleZoom()},e.prototype.setStyleZoom=function(t,e){return this._impl.setStyleZoom(t,e),this},e.prototype.setRotation=function(t,e){return this._impl.setRotation(t,e),this},e.prototype.getRotation=function(){return this._impl.getRotation()},e.prototype.setPitch=function(t,e){return this._impl.setPitch(t,e),this},e.prototype.getPitch=function(){return this._impl.getPitch()},e.prototype.setMinZoom=function(t,e){return this._impl.setMinZoom(t,e),this},e.prototype.getMinZoom=function(){return this._impl.getMinZoom()},e.prototype.getMaxZoom=function(){return this._impl.getMaxZoom()},e.prototype.setMaxZoom=function(t,e){return this._impl.setMaxZoom(t,e),this},e.prototype.setMinPitch=function(t,e){return this._impl.setMinPitch(t,e),this},e.prototype.setMaxPitch=function(t,e){return this._impl.setMaxPitch(t,e),this},e.prototype.getSize=function(){return this._impl.getSize()},e.prototype.getBounds=function(){var t=N(this._impl.state);return new L({southWest:U(t.min),northEast:U(t.max)})},e.prototype.project=function(t){return Z(this._impl.state,H(t))},e.prototype.unproject=function(t){var e=G(this._impl.state,t);return U(e)},e.prototype.getProjectionMatrix=function(){var t=[];return W(t,this._impl.state),t},e.prototype.getWebGLContext=function(){return this._impl.getWebGLContext()},e.prototype.getCanvas=function(){return this._impl.getCanvas()},e.prototype.getContainer=function(){return this._impl.getExternalContainer()},e.prototype.invalidateSize=function(){return this._impl.invalidateSize(),this},e.prototype.showTraffic=function(){return this._impl.showTraffic(),this},e.prototype.hideTraffic=function(){return this._impl.hideTraffic(),this},e.prototype.setSelectedObjects=function(t){return void 0===t&&(t=[]),this._impl.setSelectedIds(t),this},e.prototype.setStyleById=function(t){return a(this,void 0,Promise,(function(){return s(this,(function(e){return[2,this._impl.setStyle(t)]}))}))},e.prototype.setLanguage=function(t){return this._impl.setLang(t),this},e.prototype.getLanguage=function(){return this._impl.state.lang},e.prototype.setFloorPlanLevel=function(t,e){this._impl.changeFloorNumber(t,e)},e.prototype.setMaxBounds=function(t){return this._impl.setMaxBounds(t),this},e.prototype.getPadding=function(){return this._impl.getPadding()},e.prototype.setPadding=function(t,e){return this._impl.setPadding(t,e),this},e.prototype.setStyle=function(t,e){return this._impl.setStyle(t,e)},e.prototype.addLayer=function(t,e){return this._impl.addLayer(t,e),this},e.prototype.removeLayer=function(t){return this._impl.removeLayer(t),this},e.prototype.setAutoHoverMode=function(t){return this._impl.setAutoHoverMode(t),this},e.prototype.fitBounds=function(t,e){return this._impl.fitBounds(t,e),this},e.prototype.setStyleState=function(t){return this._impl.setStyleState(t),this},e.prototype.setStyleOptions=function(t){return this._impl.patchStyleState({trafficOn:t.traffic}),this},e.prototype.patchStyleState=function(t){return this._impl.patchStyleState(t),this},e.prototype.destroy=function(){var t;null===(t=this._commPoiShowDispatcher)||void 0===t||t.destroy(),this._controlPane.destroy(),this._impl.destroy()},e.prototype.setControlsLayoutPadding=function(t){this._controlPane.setPadding(t)},e.prototype.getControlsLayoutPadding=function(){return this._controlPane.getPadding()},e.prototype._emitMapEvent=function(t){this.emit(t,{})},e.prototype._emitMapPointerEvent=function(t,e){var n,i=e.originalEvent,r=e.lngLat,o=e.point,a=e.target,s=e.targetData;if(void 0!==s)switch(s.type){case"geojson":n={type:s.type,source:s.source.mapglApiSource,feature:s.feature};break;case"default":n={type:s.type,id:s.id}}this.emit(t,{originalEvent:i,lngLat:r,point:o,target:void 0!==a?{id:a.id}:void 0,targetData:n})},e.prototype._initControls=function(t){var e=this;if(!1!==t.copyright&&this._impl.modules.tileKeyInfo.getKeyInfo().then((function(n){var i=n.showSberLogo;new w(e,{position:"string"==typeof t.copyright?t.copyright:"bottomRight",interactive:t.interactiveCopyright,autoHide:t.autoHideOSMCopyright,showSberLogo:i})})),!1!==t.zoomControl){var n="string"==typeof t.zoomControl?t.zoomControl:"topRight";new m(this,{position:n})}if(t.trafficControl){n="string"==typeof t.trafficControl?t.trafficControl:"topRight";new y(this,{position:n})}if(t.floorControl){n="string"==typeof t.floorControl?t.floorControl:"topRight";new C(this,{position:n})}},e}(u);function q(t,e){var n=o({},t);for(var i in e)void 0===n[i]&&(n[i]=e[i]);return n}var Y={minZoom:-1/0,maxZoom:1/0,anchor:[.5,.5],offset:[0,18],relativeAnchor:[0,0],zIndex:0,lineHeight:1.2,letterSpacing:0,haloRadius:0,fontSize:18,color:"#000000",haloColor:"#ffffff"},X={minZoom:-1/0,maxZoom:1/0,zIndex:0,icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSI0OHB4IiB2aWV3Qm94PSIwIDAgMzAgNDgiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PCEtLSBHZW5lcmF0b3I6IFNrZXRjaCA1MS4yICg1NzUxOSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+PHRpdGxlPlBhZ2UgMSBDb3B5PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjUwJSIgeTE9IjUwJSIgeDI9IjUwJSIgeTI9IjAlIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+PHN0b3Agc3RvcC1jb2xvcj0iIzFCODlFRSIgb2Zmc2V0PSIwJSI+PC9zdG9wPjxzdG9wIHN0b3AtY29sb3I9IiMzMTk4RUMiIG9mZnNldD0iMTAwJSI+PC9zdG9wPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGlkPSJSZWNvdmVyeS0wMSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTgzOS4wMDAwMDAsIC00MjUuMDAwMDAwKSI+PGcgaWQ9IlBhZ2UtMS1Db3B5IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg4MzkuMDAwMDAwLCA0MjUuMDAwMDAwKSI+PGVsbGlwc2UgaWQ9Ik92YWwtMyIgZmlsbD0iIzAwMDAwMCIgb3BhY2l0eT0iMC4wMzYzODA1OTciIGN4PSIxNSIgY3k9IjQ1LjUiIHJ4PSIzIiByeT0iMS41Ij48L2VsbGlwc2U+PGVsbGlwc2UgaWQ9Ik92YWwtMy1Db3B5IiBmaWxsPSIjMDAwMDAwIiBvcGFjaXR5PSIwLjAzNjM4MDU5NyIgY3g9IjE1IiBjeT0iNDUuNSIgcng9IjQuNSIgcnk9IjIuNSI+PC9lbGxpcHNlPjxwYXRoIGQ9Ik0xNSw0NS44ODM2MzUzIEwxNS44ODIzNTI5LDQ1Ljg4MzYzNTMgQzE1Ljg4MjM1MjksMjkuMjE3NzUyOSAyMC43NzY3NjQ3LDIzLjc5NzQ1ODggMjcuOTg3MzUyOSwyMy43OTc0NTg4IEwyOC4zMjk3MDU5LDIzLjc5NzQ1ODggQzI5LjA3Nzk0MTIsMjEuNTkwNjk0MSAzMCwxNy45OTE1NzY1IDMwLDE1LjAwMDQgQzMwLDcuMTQzOTI5NDEgMjMuNzY3OTQxMiwwLjAwMDQgMTUsMC4wMDA0IEM2LjIzMjA1ODgyLDAuMDAwNCAwLDcuMTQzOTI5NDEgMCwxNS4wMDA0IEMwLDE3Ljk5MTU3NjUgMC45MjIwNTg4MjQsMjEuNTkwNjk0MSAxLjY3MDI5NDEyLDIzLjc5NzQ1ODggTDIuMDEyNjQ3MDYsMjMuNzk3NDU4OCBDOS4yMjQxMTc2NSwyMy43OTc0NTg4IDE0LjExNzY0NzEsMjkuMjE3NzUyOSAxNC4xMTc2NDcxLDQ1Ljg4MzYzNTMgTDE1LDQ1Ljg4MzYzNTMgWiIgaWQ9IkZpbGwtMSIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudC0xKSI+PC9wYXRoPjwvZz48L2c+PC9nPjwvc3ZnPg==",interactive:!0,hoverSize:[15,43],rotation:0,userData:void 0},K=function(t){function e(e,n){var i=t.call(this)||this;n.icon||(n.anchor=[15,43]);var r=q(n,X);return i.userData=r.userData,i.rootOptions={zIndex:r.zIndex,minZoom:r.minZoom,maxZoom:r.maxZoom},i._impl=new l.Marker(e._impl,{coordinates:r.coordinates,icon:r.icon,zIndex:r.zIndex,minZoom:r.minZoom,maxZoom:r.maxZoom,interactive:r.interactive,label:J(i.rootOptions,n.label),anchor:n.anchor,size:n.size,rotation:n.rotation,hoverIcon:n.hoverIcon,hoverSize:n.hoverSize,hoverAnchor:n.hoverAnchor}),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return r(e,t),e.prototype.setIcon=function(t){return this._impl.setIcon(t),this},e.prototype.setHoverIcon=function(t){return this._impl.setHoverIcon(t),this},e.prototype.setRotation=function(t){return this._impl.setRotation(t),this},e.prototype.setLabel=function(t){return this._impl.setLabel(J(this.rootOptions,t)),this},e.prototype.setCoordinates=function(t){return this._impl.setCoordinates(t),this},e.prototype.getCoordinates=function(){return this._impl.getCoordinates()},e.prototype.show=function(){return this._impl.show(),this},e.prototype.hide=function(){return this._impl.hide(),this},e.prototype.destroy=function(){this._impl.destroy()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(u);function J(t,e){var n,i,r,o,a;if(e){e.minZoom=Math.max(null!==(n=e.minZoom)&&void 0!==n?n:t.minZoom,t.minZoom),e.maxZoom=Math.min(null!==(i=e.maxZoom)&&void 0!==i?i:t.maxZoom,t.maxZoom),e.zIndex=null!==(r=e.zIndex)&&void 0!==r?r:t.zIndex+1e-5;var s=q(e,Y);return void 0===e.offset&&void 0!==e.anchor&&(s.offset=e.anchor.map((function(t){return-t}))),{text:e.text,image:e.image,minZoom:e.minZoom,maxZoom:e.maxZoom,color:e.color,fontSize:e.fontSize,haloRadius:e.haloRadius,haloColor:e.haloColor,letterSpacing:e.letterSpacing,lineHeight:e.lineHeight,zIndex:e.zIndex,offset:null!==(o=e.offset)&&void 0!==o?o:null===(a=e.anchor)||void 0===a?void 0:a.map((function(t){return-t})),anchor:e.relativeAnchor,font:"Open_Sans"}}}var Q={anchor:[0,0],offset:[0,0],fontSize:24,color:"#000000",haloColor:"#ffffff",haloRadius:0,minZoom:-1/0,maxZoom:1/0,zIndex:0,letterSpacing:0,lineHeight:1.2,relativeAnchor:[.5,.5],userData:void 0},$=function(){function t(t,e){this.userData=e.userData;var n=q(e,Q);void 0===e.offset&&void 0!==e.anchor&&(n.offset=e.anchor.map((function(t){return-t}))),this._impl=new l.PointLabel(t._impl,{coordinates:n.coordinates,text:n.text,minZoom:n.minZoom,maxZoom:n.maxZoom,color:n.color,fontSize:n.fontSize,haloRadius:n.haloRadius,haloColor:n.haloColor,letterSpacing:n.letterSpacing,lineHeight:n.lineHeight,zIndex:n.zIndex,offset:n.offset,anchor:n.relativeAnchor,image:e.image,font:"Open_Sans"})}return t.prototype.destroy=function(){this._impl.remove()},t.prototype.show=function(){return this._impl.show(),this},t.prototype.hide=function(){return this._impl.hide(),this},t.prototype.setCoordinates=function(t){return this._impl.setCoordinates(t),this},t.prototype.getCoordinates=function(){return this._impl.getCoordinates()},t}(),tt={minZoom:-1/0,maxZoom:1/0,zIndex:0,anchor:[-0,-0],preventMapInteractions:!0,userData:void 0},et=function(){function t(t,e){this.userData=e.userData;var n=q(e,tt);this._impl=new l.HtmlMarker(t._impl,{coordinates:n.coordinates,html:n.html,offset:[-n.anchor[0],-n.anchor[1]],minZoom:n.minZoom,maxZoom:n.maxZoom,zIndex:n.zIndex,preventMapInteractions:n.preventMapInteractions,animate:!1,interactive:!0})}return t.prototype.destroy=function(){this._impl.destroy()},t.prototype.setCoordinates=function(t){return this._impl.setPosition(t),this},t.prototype.setAnchor=function(t){return this._impl.setOffset([-t[0],-t[1]]),this},t.prototype.setContent=function(t){return this._impl.setContent(t),this},t.prototype.getCoordinates=function(){return this._impl.getPosition()},t.prototype.getAnchor=function(){var t=this._impl.getOffset();return[-t[0],-t[1]]},t.prototype.getContent=function(){return this._impl.getHtmlElement()},t}(),nt={zIndex:0,minZoom:-1/0,maxZoom:1/0,color:"#3388ff33",strokeColor:"#3388ff",strokeWidth:1,interactive:!0,userData:void 0},it=function(t){function e(e,n){var i=t.call(this)||this;i.userData=n.userData,i.options=q(n,nt);var r={coordinates:i.options.coordinates,radius:i.options.radius,minZoom:i.options.minZoom,maxZoom:i.options.maxZoom,interactive:i.options.interactive,color:i.options.color,zIndex:i.options.zIndex,borderWidth:i.options.strokeWidth,borderColor:i.options.strokeColor,segments:150};return i._impl=new l.Circle(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return r(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(u),rt={interactive:!0,maxZoom:1/0,minZoom:-1/0,color:"#ffffff",radius:20,diameter:NaN,zIndex:0,strokeWidth:3,stroke2Width:0,strokeColor:"#3388ff",stroke2Color:"#00000000",userData:void 0},ot=function(t){function e(e,n){var i=t.call(this)||this;i.userData=n.userData,i.options=q(n,rt);var r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,color:i.options.color,width:Number.isNaN(i.options.diameter)?i.options.radius:i.options.diameter,zIndex:i.options.zIndex,borderWidth:i.options.strokeWidth,borderColor:i.options.strokeColor,border2Width:i.options.stroke2Width,border2Color:i.options.stroke2Color,draggable:!1};return i._impl=new l.CircleMarker(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return r(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(u),at={interactive:!0,maxZoom:1/0,minZoom:-1/0,width:3,width2:0,width3:0,color:"#3388ff",color2:"#00000000",color3:"#00000000",zIndex:0,zIndex2:-1,zIndex3:-2,dashLength:0,gapLength:0,gapColor:"#ffffff00",userData:void 0},st=function(t){function e(e,n){var i=t.call(this)||this;if(i.userData=n.userData,i.options=q(n,at),n.dashLength){var r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,width:i.options.width,width2:i.options.width2,dashColor:i.options.color,dash2Color:i.options.color,gapColor:i.options.gapColor,dashLength:i.options.dashLength,dash2Length:0,zIndex:i.options.zIndex,zIndex2:i.options.zIndex2,gapLength:i.options.gapLength>0?i.options.gapLength:i.options.dashLength,displayTileBounds:!1};i._impl=new l.DashedPolyline(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)}))}else{r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,width:i.options.width,width2:i.options.width2,width3:i.options.width3,color:i.options.color,color2:i.options.color2,color3:i.options.color3,zIndex:i.options.zIndex,zIndex2:i.options.zIndex2,zIndex3:i.options.zIndex3,displayTileBounds:!1};i._impl=new l.Polyline(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)}))}return i}return r(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(u),ct={interactive:!0,maxZoom:1/0,minZoom:-1/0,color:"#3388ff33",zIndex:0,strokeWidth:3,strokeColor:"#3388ff",userData:void 0},lt=function(t){function e(e,n){var i=t.call(this)||this;i.userData=n.userData,i.options=q(n,ct);var r={coordinates:i.options.coordinates,interactive:i.options.interactive,maxZoom:i.options.maxZoom,minZoom:i.options.minZoom,color:i.options.color,zIndex:i.options.zIndex,strokeWidth:i.options.strokeWidth,strokeColor:i.options.strokeColor};return i._impl=new l.Polygon(e._impl,r),i._impl.on("click",(function(t){return i._emitPointerEvent("click",t)})).on("dblclick",(function(t){return i._emitPointerEvent("dblclick",t)})).on("mousemove",(function(t){return i._emitPointerEvent("mousemove",t)})).on("mouseover",(function(t){return i._emitPointerEvent("mouseover",t)})).on("mouseout",(function(t){return i._emitPointerEvent("mouseout",t)})).on("mousedown",(function(t){return i._emitPointerEvent("mousedown",t)})).on("mouseup",(function(t){return i._emitPointerEvent("mouseup",t)})).on("touchstart",(function(t){return i._emitPointerEvent("touchstart",t)})).on("touchend",(function(t){return i._emitPointerEvent("touchend",t)})),i}return r(e,t),e.prototype.destroy=function(){this._impl.remove()},e.prototype._emitPointerEvent=function(t,e){var n=e.originalEvent,i=e.lngLat,r=e.point;this.emit(t,{originalEvent:n,lngLat:i,point:r,targetData:this})},e}(u),ut={attributes:{},maxZoom:17},dt=function(){function t(t,e){this.options=q(e,ut),this._impl=new l.GeoJsonSource(t._impl,this.options,this)}return t.prototype.destroy=function(){this._impl.destroy()},t.prototype.setAttributes=function(t){return this._impl.setAttributes(t),this},t.prototype.getAttributes=function(){return this._impl.getAttributes()},t}(),ft=n(9),ht=n.n(ft),pt=function(t){function e(e,n){return t.call(this,e,function(t){return"\n    <div class="+ht.a.container+">\n        <div class="+ht.a.text+">\n            "+t+"\n        </div>\n    </div>\n"}(n),{position:"bottomLeft"})||this}return r(e,t),e}(d),mt={attributes:{},attribution:"",minZoom:R,maxZoom:B},vt=function(){function t(t,e){this.options=q(e,mt),this._impl=new l.RasterTileSource(t._impl,this.options),this._attribution=new pt(t,this.options.attribution)}return t.prototype.destroy=function(){this._impl.destroy(),this._attribution.destroy()},t.prototype.setAttributes=function(t){return this._impl.setAttributes(t),this},t.prototype.getAttributes=function(){return this._impl.getAttributes()},t}();function _t(t){return!yt(t)}function yt(t){if("undefined"==typeof window||"undefined"==typeof document)return"not a browser";if(!Boolean(Function.prototype&&Function.prototype.bind))return"insufficient Function support";if(!("JSON"in window&&"parse"in JSON&&"stringify"in JSON))return"insufficient JSON support";if(!function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e=new Blob([""],{type:"text/javascript"}),n=URL.createObjectURL(e),i=null;try{i=new Worker(n),t=!0}catch(e){t=!1}i&&i.terminate();return URL.revokeObjectURL(n),t}())return"insufficient worker support";if(!ArrayBuffer.isView)return"insufficient ArrayBuffer support";if(!function(){var t=document.createElement("canvas");t.width=t.height=1;var e=t.getContext("2d");if(!e)return!1;var n=e.getImageData(0,0,1,1);return n&&n.width===t.width}())return"insufficient Canvas/getImageData support";var e,n=function(t){var e=String(t);void 0===gt[e]&&(gt[e]=function(t){var e,n=function(t){var e=document.createElement("canvas"),n={antialias:!1,stencil:!0,failIfMajorPerformanceCaveat:t};if(!("WebGLRenderingContext"in window))return!1;return e.getContext("webgl",n)||e.getContext("experimental-webgl",n)}(t);if(!n)return{ok:!1,msg:"error on get context"};for(var i=0,r=["OES_element_index_uint","OES_standard_derivatives","OES_vertex_array_object"];i<r.length;i++){var o=r[i];if(!n.getExtension(o))return{ok:!1,msg:o+" extension is not supported"}}try{e=n.createShader(n.VERTEX_SHADER)}catch(t){return{ok:!1,msg:"browser block shader API"}}if(!e||n.isContextLost())return{ok:!1};return n.shaderSource(e,"void main() {}"),n.compileShader(e),{ok:!0===n.getShaderParameter(e,n.COMPILE_STATUS)}}(t));return gt[e]}(t&&t.failIfMajorPerformanceCaveat||!1);return n.ok?Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.isArray?Boolean(Object.keys&&Object.assign&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.freeze)?(e=document.createElement("div"))&&"function"==typeof e.after?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient DOM support":"insufficient Object support":"insufficient Array support":"insufficient WebGL support"+(n.msg?": "+n.msg:"")}var gt={};setTimeout((function(){var t=Array.from(document.querySelectorAll("script")).find((function(t){return t.src.match("https://mapgl.2gis.com/api/js")}));if(t){var e=function(t){var e=t.split("?")[1];if(e){var n=e.split("&").map((function(t){return t.split("=")})).find((function(t){return"callback"===t[0]}));if(n)return n[1]}}(t.src);if(e){if("function"!=typeof window[e])throw new Error('Not found callback function with name "'+e+'"');window[e]()}}}),0);n(17)}])}));
//# sourceMappingURL=index.js.map