Skip to content

Instantly share code, notes, and snippets.

@samtux
Created November 20, 2018 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samtux/25ac68280631e9472e4199163e6160f3 to your computer and use it in GitHub Desktop.
Save samtux/25ac68280631e9472e4199163e6160f3 to your computer and use it in GitHub Desktop.
olStyleParser.js
var GeoStylerOpenlayersParser=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=225)}([function(t,e,i){"use strict";var n={ASSUME_TOUCH:!1,DEFAULT_MAX_ZOOM:42,DEFAULT_MIN_ZOOM:0,DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD:.5,DEFAULT_TILE_SIZE:256,DEFAULT_WMS_VERSION:"1.3.0",ENABLE_CANVAS:!0,ENABLE_PROJ4JS:!0,ENABLE_RASTER_REPROJECTION:!0,ENABLE_WEBGL:!0,DEBUG_WEBGL:!0,INITIAL_ATLAS_SIZE:256,MAX_ATLAS_SIZE:-1,MOUSEWHEELZOOM_MAXDELTA:1,OVERVIEWMAP_MAX_RATIO:.75,OVERVIEWMAP_MIN_RATIO:.1,RASTER_REPROJECTION_MAX_SOURCE_TILES:100,RASTER_REPROJECTION_MAX_SUBDIVISION:10,RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH:.25,SIMPLIFY_TOLERANCE:.5,WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK:1024,VERSION:"v4.6.5"};n.WEBGL_MAX_TEXTURE_SIZE,n.WEBGL_EXTENSIONS,n.inherits=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},n.nullFunction=function(){},n.getUid=function(t){return t.ol_uid||(t.ol_uid=++n.uidCounter_)},n.uidCounter_=0,e.a=n},function(t,e,i){"use strict";var n=i(12),r=i(86),o=i(29),a={boundingExtent:function(t){for(var e=a.createEmpty(),i=0,n=t.length;i<n;++i)a.extendCoordinate(e,t[i]);return e},boundingExtentXYs_:function(t,e,i){var n=Math.min.apply(null,t),r=Math.min.apply(null,e),o=Math.max.apply(null,t),s=Math.max.apply(null,e);return a.createOrUpdate(n,r,o,s,i)},buffer:function(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]},clone:function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()},closestSquaredDistanceXY:function(t,e,i){var n,r;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(r=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*r},containsCoordinate:function(t,e){return a.containsXY(t,e[0],e[1])},containsExtent:function(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]},containsXY:function(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]},coordinateRelationship:function(t,e){var i=t[0],n=t[1],r=t[2],a=t[3],s=e[0],l=e[1],u=o.a.UNKNOWN;return s<i?u|=o.a.LEFT:s>r&&(u|=o.a.RIGHT),l<n?u|=o.a.BELOW:l>a&&(u|=o.a.ABOVE),u===o.a.UNKNOWN&&(u=o.a.INTERSECTING),u},createEmpty:function(){return[1/0,1/0,-1/0,-1/0]},createOrUpdate:function(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]},createOrUpdateEmpty:function(t){return a.createOrUpdate(1/0,1/0,-1/0,-1/0,t)},createOrUpdateFromCoordinate:function(t,e){var i=t[0],n=t[1];return a.createOrUpdate(i,n,i,n,e)},createOrUpdateFromCoordinates:function(t,e){var i=a.createOrUpdateEmpty(e);return a.extendCoordinates(i,t)},createOrUpdateFromFlatCoordinates:function(t,e,i,n,r){var o=a.createOrUpdateEmpty(r);return a.extendFlatCoordinates(o,t,e,i,n)},createOrUpdateFromRings:function(t,e){var i=a.createOrUpdateEmpty(e);return a.extendRings(i,t)},equals:function(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]},extend:function(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t},extendCoordinate:function(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])},extendCoordinates:function(t,e){var i,n;for(i=0,n=e.length;i<n;++i)a.extendCoordinate(t,e[i]);return t},extendFlatCoordinates:function(t,e,i,n,r){for(;i<n;i+=r)a.extendXY(t,e[i],e[i+1]);return t},extendRings:function(t,e){var i,n;for(i=0,n=e.length;i<n;++i)a.extendCoordinates(t,e[i]);return t},extendXY:function(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)},forEachCorner:function(t,e,i){var n;return(n=e.call(i,a.getBottomLeft(t)))?n:(n=e.call(i,a.getBottomRight(t)))?n:(n=e.call(i,a.getTopRight(t)))?n:(n=e.call(i,a.getTopLeft(t)))||!1},getArea:function(t){var e=0;return a.isEmpty(t)||(e=a.getWidth(t)*a.getHeight(t)),e},getBottomLeft:function(t){return[t[0],t[1]]},getBottomRight:function(t){return[t[2],t[1]]},getCenter:function(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]},getCorner:function(t,e){var i;return e===r.a.BOTTOM_LEFT?i=a.getBottomLeft(t):e===r.a.BOTTOM_RIGHT?i=a.getBottomRight(t):e===r.a.TOP_LEFT?i=a.getTopLeft(t):e===r.a.TOP_RIGHT?i=a.getTopRight(t):n.a.assert(!1,13),i},getEnlargedArea:function(t,e){var i=Math.min(t[0],e[0]),n=Math.min(t[1],e[1]);return(Math.max(t[2],e[2])-i)*(Math.max(t[3],e[3])-n)},getForViewAndSize:function(t,e,i,n,r){var o=e*n[0]/2,s=e*n[1]/2,l=Math.cos(i),u=Math.sin(i),h=o*l,c=o*u,f=s*l,p=s*u,d=t[0],g=t[1],_=d-h+p,v=d-h-p,y=d+h-p,m=d+h+p,x=g-c-f,E=g-c+f,S=g+c+f,T=g+c-f;return a.createOrUpdate(Math.min(_,v,y,m),Math.min(x,E,S,T),Math.max(_,v,y,m),Math.max(x,E,S,T),r)},getHeight:function(t){return t[3]-t[1]},getIntersectionArea:function(t,e){var i=a.getIntersection(t,e);return a.getArea(i)},getIntersection:function(t,e,i){var n=i||a.createEmpty();return a.intersects(t,e)&&(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]),n},getMargin:function(t){return a.getWidth(t)+a.getHeight(t)},getSize:function(t){return[t[2]-t[0],t[3]-t[1]]},getTopLeft:function(t){return[t[0],t[3]]},getTopRight:function(t){return[t[2],t[3]]},getWidth:function(t){return t[2]-t[0]},intersects:function(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]},isEmpty:function(t){return t[2]<t[0]||t[3]<t[1]},returnOrUpdate:function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t},scaleFromCenter:function(t,e){var i=(t[2]-t[0])/2*(e-1),n=(t[3]-t[1])/2*(e-1);t[0]-=i,t[2]+=i,t[1]-=n,t[3]+=n},intersectsSegment:function(t,e,i){var n=!1,r=a.coordinateRelationship(t,e),s=a.coordinateRelationship(t,i);if(r===o.a.INTERSECTING||s===o.a.INTERSECTING)n=!0;else{var l,u,h=t[0],c=t[1],f=t[2],p=t[3],d=e[0],g=e[1],_=i[0],v=i[1],y=(v-g)/(_-d);s&o.a.ABOVE&&!(r&o.a.ABOVE)&&(n=(l=_-(v-p)/y)>=h&&l<=f),n||!(s&o.a.RIGHT)||r&o.a.RIGHT||(n=(u=v-(_-f)*y)>=c&&u<=p),n||!(s&o.a.BELOW)||r&o.a.BELOW||(n=(l=_-(v-c)/y)>=h&&l<=f),n||!(s&o.a.LEFT)||r&o.a.LEFT||(n=(u=v-(_-h)*y)>=c&&u<=p)}return n},applyTransform:function(t,e,i){var n=[t[0],t[1],t[0],t[3],t[2],t[1],t[2],t[3]];e(n,n,2);var r=[n[0],n[2],n[4],n[6]],o=[n[1],n[3],n[5],n[7]];return a.boundingExtentXYs_(r,o,i)}};e.a=a},function(t,e,i){"use strict";var n=i(11),r={bindListener_:function(t){var e=function(e){var i=t.listener,n=t.bindTo||t.target;return t.callOnce&&r.unlistenByKey(t),i.call(n,e)};return t.boundListener=e,e},findListener_:function(t,e,i,n){for(var r,o=0,a=t.length;o<a;++o)if((r=t[o]).listener===e&&r.bindTo===i)return n&&(r.deleteIndex=o),r},getListeners:function(t,e){var i=t.ol_lm;return i?i[e]:void 0},getListenerMap_:function(t){var e=t.ol_lm;return e||(e=t.ol_lm={}),e},removeListeners_:function(t,e){var i=r.getListeners(t,e);if(i){for(var o=0,a=i.length;o<a;++o)t.removeEventListener(e,i[o].boundListener),n.a.clear(i[o]);i.length=0;var s=t.ol_lm;s&&(delete s[e],0===Object.keys(s).length&&delete t.ol_lm)}},listen:function(t,e,i,n,o){var a=r.getListenerMap_(t),s=a[e];s||(s=a[e]=[]);var l=r.findListener_(s,i,n,!1);return l?o||(l.callOnce=!1):(l={bindTo:n,callOnce:!!o,listener:i,target:t,type:e},t.addEventListener(e,r.bindListener_(l)),s.push(l)),l},listenOnce:function(t,e,i,n){return r.listen(t,e,i,n,!0)},unlisten:function(t,e,i,n){var o=r.getListeners(t,e);if(o){var a=r.findListener_(o,i,n,!0);a&&r.unlistenByKey(a)}},unlistenByKey:function(t){if(t&&t.target){t.target.removeEventListener(t.type,t.boundListener);var e=r.getListeners(t.target,t.type);if(e){var i="deleteIndex"in t?t.deleteIndex:e.indexOf(t);-1!==i&&e.splice(i,1),0===e.length&&r.removeListeners_(t.target,t.type)}n.a.clear(t)}},unlistenAll:function(t){var e=r.getListenerMap_(t);for(var i in e)r.removeListeners_(t,i)}};e.a=r},function(t,e,i){"use strict";var n=i(12),r={};r.tmp_=new Array(6),r.create=function(){return[1,0,0,1,0,0]},r.reset=function(t){return r.set(t,1,0,0,1,0,0)},r.multiply=function(t,e){var i=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=e[0],u=e[1],h=e[2],c=e[3],f=e[4],p=e[5];return t[0]=i*l+r*u,t[1]=n*l+o*u,t[2]=i*h+r*c,t[3]=n*h+o*c,t[4]=i*f+r*p+a,t[5]=n*f+o*p+s,t},r.set=function(t,e,i,n,r,o,a){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=o,t[5]=a,t},r.setFromArray=function(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},r.apply=function(t,e){var i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e},r.rotate=function(t,e){var i=Math.cos(e),n=Math.sin(e);return r.multiply(t,r.set(r.tmp_,i,n,-n,i,0,0))},r.scale=function(t,e,i){return r.multiply(t,r.set(r.tmp_,e,0,0,i,0,0))},r.translate=function(t,e,i){return r.multiply(t,r.set(r.tmp_,1,0,0,1,e,i))},r.compose=function(t,e,i,n,r,o,a,s){var l=Math.sin(o),u=Math.cos(o);return t[0]=n*u,t[1]=r*l,t[2]=-n*l,t[3]=r*u,t[4]=a*n*u-s*n*l+e,t[5]=a*r*l+s*r*u+i,t},r.invert=function(t){var e=r.determinant(t);n.a.assert(0!==e,32);var i=t[0],o=t[1],a=t[2],s=t[3],l=t[4],u=t[5];return t[0]=s/e,t[1]=-o/e,t[2]=-a/e,t[3]=i/e,t[4]=(a*u-s*l)/e,t[5]=-(i*u-o*l)/e,t},r.determinant=function(t){return t[0]*t[3]-t[1]*t[2]},e.a=r},function(t,e,i){"use strict";var n={ONE:1,SRC_ALPHA:770,COLOR_ATTACHMENT0:36064,COLOR_BUFFER_BIT:16384,TRIANGLES:4,TRIANGLE_STRIP:5,ONE_MINUS_SRC_ALPHA:771,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,CULL_FACE:2884,BLEND:3042,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126,RGBA:6408,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,LINK_STATUS:35714,LINEAR:9729,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE0:33984,CLAMP_TO_EDGE:33071,COMPILE_STATUS:35713,FRAMEBUFFER:36160,CONTEXT_IDS_:["experimental-webgl","webgl","webkit-3d","moz-webgl"],getContext:function(t,e){var i,r,o=n.CONTEXT_IDS_.length;for(r=0;r<o;++r)try{if(i=t.getContext(n.CONTEXT_IDS_[r],e))return i}catch(t){}return null}};e.a=n},function(t,e,i){var n=i(20),r=i(37),o=i(44),a=i(41),s=i(59),l=function(t,e,i){var u,h,c,f,p=t&l.F,d=t&l.G,g=t&l.S,_=t&l.P,v=t&l.B,y=d?n:g?n[e]||(n[e]={}):(n[e]||{}).prototype,m=d?r:r[e]||(r[e]={}),x=m.prototype||(m.prototype={});for(u in d&&(i=e),i)c=((h=!p&&y&&void 0!==y[u])?y:i)[u],f=v&&h?s(c,n):_&&"function"==typeof c?s(Function.call,c):c,y&&a(y,u,c,t&l.U),m[u]!=c&&o(m,u,f),_&&x[u]!=c&&(x[u]=c)};n.core=r,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},function(t,e,i){"use strict";e.a={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"}},function(t,e,i){"use strict";var n,r,o=i(33),a=i(15),s=i(11),l=i(80),u=i(3),h={defaultFont:"10px sans-serif",defaultFillStyle:[0,0,0,1],defaultLineCap:"round",defaultLineDash:[],defaultLineDashOffset:0,defaultLineJoin:"round",defaultMiterLimit:10,defaultStrokeStyle:[0,0,0,1],defaultTextAlign:"center",defaultTextBaseline:"middle",defaultPadding:[0,0,0,0],defaultLineWidth:1};h.labelCache=new l.a,h.checkedFonts_={},h.measureContext_=null,h.textHeights_={},h.checkFont=function(){var t,e,i=60,n=h.checkedFonts_,r=h.labelCache,a="32px monospace",l="wmytzilWMYTZIL@#/&?$%10";function u(t){var i=h.getMeasureContext();i.font=a,e=i.measureText(l).width;var n=!0;return"monospace"!=t&&(i.font="32px "+t+",monospace",n=i.measureText(l).width!=e),n}function c(){var e=!0;for(var o in n)n[o]<i&&(u(o)?(n[o]=i,s.a.clear(h.textHeights_),h.measureContext_=null,r.clear()):(++n[o],e=!1));e&&(window.clearInterval(t),t=void 0)}return function(e){var r=o.a.getFontFamilies(e);if(r)for(var a=0,s=r.length;a<s;++a){var l=r[a];l in n||(n[l]=i,u(l)||(n[l]=0,void 0===t&&(t=window.setInterval(c,32))))}}}(),h.getMeasureContext=function(){var t=h.measureContext_;return t||(t=h.measureContext_=a.a.createCanvasContext2D(1,1)),t},h.measureTextHeight=(r=h.textHeights_,function(t){var e=r[t];return null==e&&(n||((n=document.createElement("span")).textContent="M",n.style.margin=n.style.padding="0 !important",n.style.position="absolute !important",n.style.left="-99999px !important"),n.style.font=t,document.body.appendChild(n),e=r[t]=n.offsetHeight,document.body.removeChild(n)),e}),h.measureTextWidth=function(t,e){var i=h.getMeasureContext();return t!=i.font&&(i.font=t),i.measureText(e).width},h.rotateAtOffset=function(t,e,i,n){0!==e&&(t.translate(i,n),t.rotate(e),t.translate(-i,-n))},h.resetTransform_=u.a.create(),h.drawImage=function(t,e,i,n,r,o,a,s,l,u,c){var f;1!=i&&(f=t.globalAlpha,t.globalAlpha=f*i),e&&t.setTransform.apply(t,e),t.drawImage(n,r,o,a,s,l,u,a*c,s*c),f&&(t.globalAlpha=f),e&&t.setTransform.apply(t,h.resetTransform_)},e.a=h},function(t,e,i){"use strict";e.a={CHANGE:"change",CLEAR:"clear",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",ERROR:"error",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",MOUSEDOWN:"mousedown",MOUSEMOVE:"mousemove",MOUSEOUT:"mouseout",MOUSEUP:"mouseup",MOUSEWHEEL:"mousewheel",MSPOINTERDOWN:"MSPointerDown",RESIZE:"resize",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",WHEEL:"wheel"}},function(t,e,i){"use strict";var n=i(12),r={clamp:function(t,e,i){return Math.min(Math.max(t,e),i)}};r.cosh="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},r.roundUpToPowerOfTwo=function(t){return n.a.assert(0<t,29),Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},r.squaredSegmentDistance=function(t,e,i,n,o,a){var s=o-i,l=a-n;if(0!==s||0!==l){var u=((t-i)*s+(e-n)*l)/(s*s+l*l);u>1?(i=o,n=a):u>0&&(i+=s*u,n+=l*u)}return r.squaredDistance(t,e,i,n)},r.squaredDistance=function(t,e,i,n){var r=i-t,o=n-e;return r*r+o*o},r.solveLinearSystem=function(t){for(var e=t.length,i=0;i<e;i++){for(var n=i,r=Math.abs(t[i][i]),o=i+1;o<e;o++){var a=Math.abs(t[o][i]);a>r&&(r=a,n=o)}if(0===r)return null;var s=t[n];t[n]=t[i],t[i]=s;for(var l=i+1;l<e;l++)for(var u=-t[l][i]/t[i][i],h=i;h<e+1;h++)i==h?t[l][h]=0:t[l][h]+=u*t[i][h]}for(var c=new Array(e),f=e-1;f>=0;f--){c[f]=t[f][e]/t[f][f];for(var p=f-1;p>=0;p--)t[p][e]-=t[p][f]*c[f]}return c},r.toDegrees=function(t){return 180*t/Math.PI},r.toRadians=function(t){return t*Math.PI/180},r.modulo=function(t,e){var i=t%e;return i*e<0?i+e:i},r.lerp=function(t,e,i){return t+i*(e-t)},e.a=r},function(t,e,i){"use strict";e.a={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4,ABORT:5}},function(t,e,i){"use strict";var n={};n.assign="function"==typeof Object.assign?Object.assign:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),n=1,r=arguments.length;n<r;++n){var o=arguments[n];if(null!=o)for(var a in o)o.hasOwnProperty(a)&&(i[a]=o[a])}return i},n.clear=function(t){for(var e in t)delete t[e]},n.getValues=function(t){var e=[];for(var i in t)e.push(t[i]);return e},n.isEmpty=function(t){var e;for(e in t)return!1;return!e},e.a=n},function(t,e,i){"use strict";var n=i(122),r={assert:function(t,e){if(!t)throw new n.a(e)}};e.a=r},function(t,e,i){"use strict";e.a={IDLE:0,LOADING:1,LOADED:2,ERROR:3}},function(t,e,i){"use strict";var n={binarySearch:function(t,e,i){for(var r,o,a=i||n.numberSafeCompareFunction,s=0,l=t.length,u=!1;s<l;)(o=+a(t[r=s+(l-s>>1)],e))<0?s=r+1:(l=r,u=!o);return u?s:~s},numberSafeCompareFunction:function(t,e){return t>e?1:t<e?-1:0},includes:function(t,e){return t.indexOf(e)>=0},linearFindNearest:function(t,e,i){var n,r=t.length;if(t[0]<=e)return 0;if(e<=t[r-1])return r-1;if(i>0){for(n=1;n<r;++n)if(t[n]<e)return n-1}else if(i<0){for(n=1;n<r;++n)if(t[n]<=e)return n}else for(n=1;n<r;++n){if(t[n]==e)return n;if(t[n]<e)return t[n-1]-e<e-t[n]?n-1:n}return r-1},reverseSubArray:function(t,e,i){for(;e<i;){var n=t[e];t[e]=t[i],t[i]=n,++e,--i}},extend:function(t,e){var i,n=Array.isArray(e)?e:[e],r=n.length;for(i=0;i<r;i++)t[t.length]=n[i]},remove:function(t,e){var i=t.indexOf(e),n=i>-1;return n&&t.splice(i,1),n},find:function(t,e){for(var i,n=t.length>>>0,r=0;r<n;r++)if(e(i=t[r],r,t))return i;return null},equals:function(t,e){var i=t.length;if(i!==e.length)return!1;for(var n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0},stableSort:function(t,e){var i,n=t.length,r=Array(t.length);for(i=0;i<n;i++)r[i]={index:i,value:t[i]};for(r.sort(function(t,i){return e(t.value,i.value)||t.index-i.index}),i=0;i<t.length;i++)t[i]=r[i].value},findIndex:function(t,e){var i;return t.every(function(n,r){return i=r,!e(n,r,t)})?-1:i},isSorted:function(t,e,i){var r=e||n.numberSafeCompareFunction;return t.every(function(e,n){if(0===n)return!0;var o=r(t[n-1],e);return!(o>0||i&&0===o)})}};e.a=n},function(t,e,i){"use strict";var n={createCanvasContext2D:function(t,e){var i=document.createElement("CANVAS");return t&&(i.width=t),e&&(i.height=e),i.getContext("2d")},outerWidth:function(t){var e=t.offsetWidth,i=getComputedStyle(t);return e+(parseInt(i.marginLeft,10)+parseInt(i.marginRight,10))},outerHeight:function(t){var e=t.offsetHeight,i=getComputedStyle(t);return e+(parseInt(i.marginTop,10)+parseInt(i.marginBottom,10))},replaceNode:function(t,e){var i=e.parentNode;i&&i.replaceChild(t,e)},removeNode:function(t){return t&&t.parentNode?t.parentNode.removeChild(t):null},removeChildren:function(t){for(;t.lastChild;)t.removeChild(t.lastChild)}};e.a=n},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i(9),o=i(6),a=function(t){this.radius=t};a.prototype.geodesicArea=function(t){return a.getArea_(t,this.radius)},a.prototype.haversineDistance=function(t,e){return a.getDistance_(t,e,this.radius)},a.prototype.offset=function(t,e,i){var n=r.a.toRadians(t[1]),o=r.a.toRadians(t[0]),a=e/this.radius,s=Math.asin(Math.sin(n)*Math.cos(a)+Math.cos(n)*Math.sin(a)*Math.cos(i)),l=o+Math.atan2(Math.sin(i)*Math.sin(a)*Math.cos(n),Math.cos(a)-Math.sin(n)*Math.sin(s));return[r.a.toDegrees(l),r.a.toDegrees(s)]},a.DEFAULT_RADIUS=6371008.8,a.getLength=function(t,e){var i,n,r,s,l,u,h=e||{},c=h.radius||a.DEFAULT_RADIUS,f=h.projection||"EPSG:3857",p=(t=t.clone().transform(f,"EPSG:4326")).getType(),d=0;switch(p){case o.a.POINT:case o.a.MULTI_POINT:break;case o.a.LINE_STRING:case o.a.LINEAR_RING:i=t.getCoordinates(),d=a.getLength_(i,c);break;case o.a.MULTI_LINE_STRING:case o.a.POLYGON:for(r=0,s=(i=t.getCoordinates()).length;r<s;++r)d+=a.getLength_(i[r],c);break;case o.a.MULTI_POLYGON:for(r=0,s=(i=t.getCoordinates()).length;r<s;++r)for(l=0,u=(n=i[r]).length;l<u;++l)d+=a.getLength_(n[l],c);break;case o.a.GEOMETRY_COLLECTION:var g=t.getGeometries();for(r=0,s=g.length;r<s;++r)d+=a.getLength(g[r],e);break;default:throw new Error("Unsupported geometry type: "+p)}return d},a.getLength_=function(t,e){for(var i=0,n=0,r=t.length;n<r-1;++n)i+=a.getDistance_(t[n],t[n+1],e);return i},a.getDistance_=function(t,e,i){var n=r.a.toRadians(t[1]),o=r.a.toRadians(e[1]),a=(o-n)/2,s=r.a.toRadians(e[0]-t[0])/2,l=Math.sin(a)*Math.sin(a)+Math.sin(s)*Math.sin(s)*Math.cos(n)*Math.cos(o);return 2*i*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))},a.getArea=function(t,e){var i,n,r,s,l,u,h=e||{},c=h.radius||a.DEFAULT_RADIUS,f=h.projection||"EPSG:3857",p=(t=t.clone().transform(f,"EPSG:4326")).getType(),d=0;switch(p){case o.a.POINT:case o.a.MULTI_POINT:case o.a.LINE_STRING:case o.a.MULTI_LINE_STRING:case o.a.LINEAR_RING:break;case o.a.POLYGON:for(i=t.getCoordinates(),d=Math.abs(a.getArea_(i[0],c)),r=1,s=i.length;r<s;++r)d-=Math.abs(a.getArea_(i[r],c));break;case o.a.MULTI_POLYGON:for(r=0,s=(i=t.getCoordinates()).length;r<s;++r)for(n=i[r],d+=Math.abs(a.getArea_(n[0],c)),l=1,u=n.length;l<u;++l)d-=Math.abs(a.getArea_(n[l],c));break;case o.a.GEOMETRY_COLLECTION:var g=t.getGeometries();for(r=0,s=g.length;r<s;++r)d+=a.getArea(g[r],e);break;default:throw new Error("Unsupported geometry type: "+p)}return d},a.getArea_=function(t,e){for(var i=0,n=t.length,o=t[n-1][0],a=t[n-1][1],s=0;s<n;s++){var l=t[s][0],u=t[s][1];i+=r.a.toRadians(l-o)*(2+Math.sin(r.a.toRadians(a))+Math.sin(r.a.toRadians(u))),o=l,a=u}return i*e*e/2};var s=a,l=i(1),u=i(32),h={cache_:null,set:function(t){h.cache_=t},get:function(){return h.cache_||window.proj4}},c=h,f=function(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit;var e=t.code;if(n.a.ENABLE_PROJ4JS){var i=c.get();if("function"==typeof i){var r=i.defs(e);void 0!==r&&(void 0!==r.axis&&void 0===t.axisOrientation&&(this.axisOrientation_=r.axis),void 0===t.metersPerUnit&&(this.metersPerUnit_=r.to_meter),void 0===t.units&&(this.units_=r.units))}}};f.prototype.canWrapX=function(){return this.canWrapX_},f.prototype.getCode=function(){return this.code_},f.prototype.getExtent=function(){return this.extent_},f.prototype.getUnits=function(){return this.units_},f.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||u.a.METERS_PER_UNIT[this.units_]},f.prototype.getWorldExtent=function(){return this.worldExtent_},f.prototype.getAxisOrientation=function(){return this.axisOrientation_},f.prototype.isGlobal=function(){return this.global_},f.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},f.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},f.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},f.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},f.prototype.setWorldExtent=function(t){this.worldExtent_=t},f.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},f.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_};var p=f,d={Projection_:function(t){p.call(this,{code:t,units:u.a.METERS,extent:d.EXTENT,global:!0,worldExtent:d.WORLD_EXTENT,getPointResolution:function(t,e){return t/r.a.cosh(e[1]/d.RADIUS)}})}};n.a.inherits(d.Projection_,p),d.RADIUS=6378137,d.HALF_SIZE=Math.PI*d.RADIUS,d.EXTENT=[-d.HALF_SIZE,-d.HALF_SIZE,d.HALF_SIZE,d.HALF_SIZE],d.WORLD_EXTENT=[-180,-85,180,85],d.PROJECTIONS=[new d.Projection_("EPSG:3857"),new d.Projection_("EPSG:102100"),new d.Projection_("EPSG:102113"),new d.Projection_("EPSG:900913"),new d.Projection_("urn:ogc:def:crs:EPSG:6.18:3:3857"),new d.Projection_("urn:ogc:def:crs:EPSG::3857"),new d.Projection_("http://www.opengis.net/gml/srs/epsg.xml#3857")],d.fromEPSG4326=function(t,e,i){var n=t.length,r=i>1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var a=d.HALF_SIZE,s=0;s<n;s+=r){o[s]=a*t[s]/180;var l=d.RADIUS*Math.log(Math.tan(Math.PI*(t[s+1]+90)/360));l>a?l=a:l<-a&&(l=-a),o[s+1]=l}return o},d.toEPSG4326=function(t,e,i){var n=t.length,r=i>1?i:2,o=e;void 0===o&&(o=r>2?t.slice():new Array(n));for(var a=0;a<n;a+=r)o[a]=180*t[a]/d.HALF_SIZE,o[a+1]=360*Math.atan(Math.exp(t[a+1]/d.RADIUS))/Math.PI-90;return o};var g=d,_={Projection_:function(t,e){p.call(this,{code:t,units:u.a.DEGREES,extent:_.EXTENT,axisOrientation:e,global:!0,metersPerUnit:_.METERS_PER_UNIT,worldExtent:_.EXTENT})}};n.a.inherits(_.Projection_,p),_.RADIUS=6378137,_.EXTENT=[-180,-90,180,90],_.METERS_PER_UNIT=Math.PI*_.RADIUS/180,_.PROJECTIONS=[new _.Projection_("CRS:84"),new _.Projection_("EPSG:4326","neu"),new _.Projection_("urn:ogc:def:crs:EPSG::4326","neu"),new _.Projection_("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new _.Projection_("urn:ogc:def:crs:OGC:1.3:CRS84"),new _.Projection_("urn:ogc:def:crs:OGC:2:84"),new _.Projection_("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new _.Projection_("urn:x-ogc:def:crs:EPSG:4326","neu")];var v=_,y={cache_:{},clear:function(){y.cache_={}},get:function(t){return y.cache_[t]||null},add:function(t,e){y.cache_[t]=e}},m=y,x=i(11),E={cache_:{},clear:function(){E.cache_={}},add:function(t,e,i){var n=t.getCode(),r=e.getCode(),o=E.cache_;n in o||(o[n]={}),o[n][r]=i},remove:function(t,e){var i=t.getCode(),n=e.getCode(),r=E.cache_,o=r[i][n];return delete r[i][n],x.a.isEmpty(r[i])&&delete r[i],o},get:function(t,e){var i,n=E.cache_;return t in n&&e in n[t]&&(i=n[t][e]),i}},S=E,T={};T.METERS_PER_UNIT=u.a.METERS_PER_UNIT,T.SPHERE_=new s(s.DEFAULT_RADIUS),n.a.ENABLE_PROJ4JS&&(T.setProj4=function(t){c.set(t)}),T.getPointResolution=function(t,e,i,n){var r,o=(t=T.get(t)).getPointResolutionFunc();if(o)r=o(e,i);else if(t.getUnits()==u.a.DEGREES&&!n||n==u.a.DEGREES)r=e;else{var a=T.getTransformFromProjections(t,T.get("EPSG:4326")),s=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];s=a(s,s,2),r=(T.SPHERE_.haversineDistance(s.slice(0,2),s.slice(2,4))+T.SPHERE_.haversineDistance(s.slice(4,6),s.slice(6,8)))/2;var l=n?u.a.METERS_PER_UNIT[n]:t.getMetersPerUnit();void 0!==l&&(r/=l)}return r},T.addEquivalentProjections=function(t){T.addProjections(t),t.forEach(function(e){t.forEach(function(t){e!==t&&S.add(e,t,T.cloneTransform)})})},T.addEquivalentTransforms=function(t,e,i,n){t.forEach(function(t){e.forEach(function(e){S.add(t,e,i),S.add(e,t,n)})})},T.addProjection=function(t){m.add(t.getCode(),t),S.add(t,t,T.cloneTransform)},T.addProjections=function(t){t.forEach(T.addProjection)},T.clearAllProjections=function(){m.clear(),S.clear()},T.createProjection=function(t,e){return t?"string"==typeof t?T.get(t):t:T.get(e)},T.addCoordinateTransforms=function(t,e,i,n){var r=T.get(t),o=T.get(e);S.add(r,o,T.createTransformFromCoordinateTransform(i)),S.add(o,r,T.createTransformFromCoordinateTransform(n))},T.createTransformFromCoordinateTransform=function(t){return function(e,i,n){var r,o,a,s=e.length,l=void 0!==n?n:2,u=void 0!==i?i:new Array(s);for(o=0;o<s;o+=l)for(r=t([e[o],e[o+1]]),u[o]=r[0],u[o+1]=r[1],a=l-1;a>=2;--a)u[o+a]=e[o+a];return u}},T.fromLonLat=function(t,e){return T.transform(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")},T.toLonLat=function(t,e){var i=T.transform(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),n=i[0];return(n<-180||n>180)&&(i[0]=r.a.modulo(n+180,360)-180),i},T.get=function(t){var e=null;if(t instanceof p)e=t;else if("string"==typeof t){var i=t;if(e=m.get(i),n.a.ENABLE_PROJ4JS&&!e){var r=c.get();"function"==typeof r&&void 0!==r.defs(i)&&(e=new p({code:i}),T.addProjection(e))}}return e},T.equivalent=function(t,e){if(t===e)return!0;var i=t.getUnits()===e.getUnits();return t.getCode()===e.getCode()?i:T.getTransformFromProjections(t,e)===T.cloneTransform&&i},T.getTransform=function(t,e){var i=T.get(t),n=T.get(e);return T.getTransformFromProjections(i,n)},T.getTransformFromProjections=function(t,e){var i=t.getCode(),r=e.getCode(),o=S.get(i,r);if(n.a.ENABLE_PROJ4JS&&!o){var a=c.get();if("function"==typeof a){var s=a.defs(i),l=a.defs(r);if(void 0!==s&&void 0!==l){if(s===l)T.addEquivalentProjections([e,t]);else{var u=a(r,i);T.addCoordinateTransforms(e,t,u.forward,u.inverse)}o=S.get(i,r)}}}return o||(o=T.identityTransform),o},T.identityTransform=function(t,e,i){if(void 0!==e&&t!==e){for(var n=0,r=t.length;n<r;++n)e[n]=t[n];t=e}return t},T.cloneTransform=function(t,e,i){var n;if(void 0!==e){for(var r=0,o=t.length;r<o;++r)e[r]=t[r];n=e}else n=t.slice();return n},T.transform=function(t,e,i){return T.getTransform(e,i)(t,void 0,t.length)},T.transformExtent=function(t,e,i){var n=T.getTransform(e,i);return l.a.applyTransform(t,n)},T.transformWithProjections=function(t,e,i){return T.getTransformFromProjections(e,i)(t)},T.addCommon=function(){T.addEquivalentProjections(g.PROJECTIONS),T.addEquivalentProjections(v.PROJECTIONS),T.addEquivalentTransforms(v.PROJECTIONS,g.PROJECTIONS,g.fromEPSG4326,g.toEPSG4326)},T.addCommon(),e.default=T},function(t,e,i){"use strict";var n=i(0),r=i(69),o=i(96),a=i(22),s=i(11),l=function(t){o.a.call(this),n.a.getUid(this),this.values_={},void 0!==t&&this.setProperties(t)};n.a.inherits(l,o.a),l.changeEventTypeCache_={},l.getChangeEventType=function(t){return l.changeEventTypeCache_.hasOwnProperty(t)?l.changeEventTypeCache_[t]:l.changeEventTypeCache_[t]="change:"+t},l.prototype.get=function(t){var e;return this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},l.prototype.getKeys=function(){return Object.keys(this.values_)},l.prototype.getProperties=function(){return s.a.assign({},this.values_)},l.prototype.notify=function(t,e){var i;i=l.getChangeEventType(t),this.dispatchEvent(new l.Event(i,t,e)),i=r.a.PROPERTYCHANGE,this.dispatchEvent(new l.Event(i,t,e))},l.prototype.set=function(t,e,i){if(i)this.values_[t]=e;else{var n=this.values_[t];this.values_[t]=e,n!==e&&this.notify(t,n)}},l.prototype.setProperties=function(t,e){var i;for(i in t)this.set(i,t[i],e)},l.prototype.unset=function(t,e){if(t in this.values_){var i=this.values_[t];delete this.values_[t],e||this.notify(t,i)}},l.Event=function(t,e,i){a.a.call(this,t),this.key=e,this.oldValue=i},n.a.inherits(l.Event,a.a),e.a=l},function(t,e,i){"use strict";var n=i(0),r=i(4),o={},a="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"";o.FIREFOX=-1!==a.indexOf("firefox"),o.SAFARI=-1!==a.indexOf("safari")&&-1==a.indexOf("chrom"),o.WEBKIT=-1!==a.indexOf("webkit")&&-1==a.indexOf("edge"),o.MAC=-1!==a.indexOf("macintosh"),o.DEVICE_PIXEL_RATIO=window.devicePixelRatio||1,o.CANVAS_LINE_DASH=!1,o.CANVAS=n.a.ENABLE_CANVAS&&function(){if(!("HTMLCanvasElement"in window))return!1;try{var t=document.createElement("CANVAS").getContext("2d");return!!t&&(void 0!==t.setLineDash&&(o.CANVAS_LINE_DASH=!0),!0)}catch(t){return!1}}(),o.DEVICE_ORIENTATION="DeviceOrientationEvent"in window,o.GEOLOCATION="geolocation"in navigator,o.TOUCH=n.a.ASSUME_TOUCH||"ontouchstart"in window,o.POINTER="PointerEvent"in window,o.MSPOINTER=!!navigator.msPointerEnabled,o.WEBGL,function(){if(n.a.ENABLE_WEBGL){var t,e=!1,i=[];if("WebGLRenderingContext"in window)try{var a=document.createElement("CANVAS"),s=r.a.getContext(a,{failIfMajorPerformanceCaveat:!0});s&&(e=!0,t=s.getParameter(s.MAX_TEXTURE_SIZE),i=s.getSupportedExtensions())}catch(t){}o.WEBGL=e,n.a.WEBGL_EXTENSIONS=i,n.a.WEBGL_MAX_TEXTURE_SIZE=t}}(),e.a=o},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var i=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=i)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,i){"use strict";var n=function(t){this.propagationStopped,this.type=t,this.target=null};n.prototype.preventDefault=n.prototype.stopPropagation=function(){this.propagationStopped=!0},n.stopPropagation=function(t){t.stopPropagation()},n.preventDefault=function(t){t.preventDefault()},e.a=n},function(t,e,i){var n=i(21);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,i){var n=i(131)("wks"),r=i(71),o=i(20).Symbol,a="function"==typeof o;(t.exports=function(t){return n[t]||(n[t]=a&&o[t]||(a?o:r)("Symbol."+t))}).store=n},function(t,e,i){"use strict";var n=i(0),r=i(55),o=i(2),a=i(22),s=function(){r.a.call(this),this.pendingRemovals_={},this.dispatching_={},this.listeners_={}};n.a.inherits(s,r.a),s.prototype.addEventListener=function(t,e){var i=this.listeners_[t];i||(i=this.listeners_[t]=[]),-1===i.indexOf(e)&&i.push(e)},s.prototype.dispatchEvent=function(t){var e="string"==typeof t?new a.a(t):t,i=e.type;e.target=this;var r,o=this.listeners_[i];if(o){i in this.dispatching_||(this.dispatching_[i]=0,this.pendingRemovals_[i]=0),++this.dispatching_[i];for(var s=0,l=o.length;s<l;++s)if(!1===o[s].call(this,e)||e.propagationStopped){r=!1;break}if(--this.dispatching_[i],0===this.dispatching_[i]){var u=this.pendingRemovals_[i];for(delete this.pendingRemovals_[i];u--;)this.removeEventListener(i,n.a.nullFunction);delete this.dispatching_[i]}return r}},s.prototype.disposeInternal=function(){o.a.unlistenAll(this)},s.prototype.getListeners=function(t){return this.listeners_[t]},s.prototype.hasListener=function(t){return t?t in this.listeners_:Object.keys(this.listeners_).length>0},s.prototype.removeEventListener=function(t,e){var i=this.listeners_[t];if(i){var r=i.indexOf(e);t in this.pendingRemovals_?(i[r]=n.a.nullFunction,++this.pendingRemovals_[t]):(i.splice(r,1),0===i.length&&delete this.listeners_[t])}},e.a=s},function(t,e,i){"use strict";e.a={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",SOURCE:"source"}},function(t,e,i){"use strict";var n={buffer:function(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*e,i[1]=t[1]+2*e,i},hasArea:function(t){return t[0]>0&&t[1]>0},scale:function(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i},toSize:function(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:e[0]=e[1]=t,e)}};e.a=n},function(t,e,i){"use strict";var n={easeIn:function(t){return Math.pow(t,3)},easeOut:function(t){return 1-n.easeIn(1-t)},inAndOut:function(t){return 3*t*t-2*t*t*t},linear:function(t){return t},upAndDown:function(t){return t<.5?n.inAndOut(2*t):1-n.inAndOut(2*(t-.5))}};e.a=n},function(t,e,i){"use strict";e.a={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},function(t,e,i){var n=i(23),r=i(169),o=i(65),a=Object.defineProperty;e.f=i(36)?Object.defineProperty:function(t,e,i){if(n(t),e=o(e,!0),n(i),r)try{return a(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(t[e]=i.value),t}},function(t,e,i){"use strict";var n,r,o=i(12),a=i(9),s={HEX_COLOR_RE_:/^#(?:[0-9a-f]{3,4}){1,2}$/i,NAMED_COLOR_RE_:/^([a-z]*)$/i,asArray:function(t){return Array.isArray(t)?t:s.fromString(t)},asString:function(t){return"string"==typeof t?t:s.toString(t)},fromNamed:function(t){var e=document.createElement("div");e.style.color=t,document.body.appendChild(e);var i=getComputedStyle(e).color;return document.body.removeChild(e),i}};s.fromString=(n={},r=0,function(t){var e;if(n.hasOwnProperty(t))e=n[t];else{if(r>=1024){var i,o=0;for(i in n)0==(3&o++)&&(delete n[i],--r)}e=s.fromStringInternal_(t),n[t]=e,++r}return e}),s.fromStringInternal_=function(t){var e,i,n,r,a,l;if(s.NAMED_COLOR_RE_.exec(t)&&(t=s.fromNamed(t)),s.HEX_COLOR_RE_.exec(t)){var u,h=t.length-1;u=h<=4?1:2;var c=4===h||8===h;e=parseInt(t.substr(1+0*u,u),16),i=parseInt(t.substr(1+1*u,u),16),n=parseInt(t.substr(1+2*u,u),16),r=c?parseInt(t.substr(1+3*u,u),16):255,1==u&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,c&&(r=(r<<4)+r)),a=[e,i,n,r/255]}else 0==t.indexOf("rgba(")?(l=t.slice(5,-1).split(",").map(Number),a=s.normalize(l)):0==t.indexOf("rgb(")?((l=t.slice(4,-1).split(",").map(Number)).push(1),a=s.normalize(l)):o.a.assert(!1,14);return a},s.normalize=function(t,e){var i=e||[];return i[0]=a.a.clamp(t[0]+.5|0,0,255),i[1]=a.a.clamp(t[1]+.5|0,0,255),i[2]=a.a.clamp(t[2]+.5|0,0,255),i[3]=a.a.clamp(t[3],0,1),i},s.toString=function(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:t[3])+")"},e.a=s},function(t,e,i){"use strict";var n={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft",METERS_PER_UNIT:{}};n.METERS_PER_UNIT[n.DEGREES]=2*Math.PI*6370997/360,n.METERS_PER_UNIT[n.FEET]=.3048,n.METERS_PER_UNIT[n.METERS]=1,n.METERS_PER_UNIT[n.USFEET]=1200/3937,e.a=n},function(t,e,i){"use strict";var n,r,o={CLASS_HIDDEN:"ol-hidden",CLASS_SELECTABLE:"ol-selectable",CLASS_UNSELECTABLE:"ol-unselectable",CLASS_UNSUPPORTED:"ol-unsupported",CLASS_CONTROL:"ol-control"};o.getFontFamilies=(r={},function(t){if(n||(n=document.createElement("div").style),!(t in r)){n.font=t;var e=n.fontFamily;if(n.font="",!e)return null;r[t]=e.split(/,\s?/)}return r[t]}),e.a=o},function(t,e,i){"use strict";var n={createOrUpdate:function(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]},getKeyZXY:function(t,e,i){return t+"/"+e+"/"+i},getKey:function(t){return n.getKeyZXY(t[0],t[1],t[2])},fromKey:function(t){return t.split("/").map(Number)},hash:function(t){return(t[1]<<t[0])+t[2]},quadKey:function(t){var e,i,n=t[0],r=new Array(n),o=1<<n-1;for(e=0;e<n;++e)i=48,t[1]&o&&(i+=1),t[2]&o&&(i+=2),r[e]=String.fromCharCode(i),o>>=1;return r.join("")},withinExtentAndZ:function(t,e){var i=t[0],n=t[1],r=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;var o,a=e.getExtent();return!(o=a?e.getTileRangeForExtentAndZ(a,i):e.getFullTileRange(i))||o.containsXY(n,r)}};e.a=n},function(t,e,i){"use strict";var n=i(0),r=i(122),o=i(40),a=i(17),s=i(22),l=function(t,e){a.a.call(this);var i=e||{};if(this.unique_=!!i.unique,this.array_=t||[],this.unique_)for(var n=0,r=this.array_.length;n<r;++n)this.assertUnique_(this.array_[n],n);this.updateLength_()};n.a.inherits(l,a.a),l.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},l.prototype.extend=function(t){var e,i;for(e=0,i=t.length;e<i;++e)this.push(t[e]);return this},l.prototype.forEach=function(t,e){for(var i=e?t.bind(e):t,n=this.array_,r=0,o=n.length;r<o;++r)i(n[r],r,n)},l.prototype.getArray=function(){return this.array_},l.prototype.item=function(t){return this.array_[t]},l.prototype.getLength=function(){return this.get(l.Property_.LENGTH)},l.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new l.Event(o.a.ADD,e))},l.prototype.pop=function(){return this.removeAt(this.getLength()-1)},l.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},l.prototype.remove=function(t){var e,i,n=this.array_;for(e=0,i=n.length;e<i;++e)if(n[e]===t)return this.removeAt(e)},l.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new l.Event(o.a.REMOVE,e)),e},l.prototype.setAt=function(t,e){var i=this.getLength();if(t<i){this.unique_&&this.assertUnique_(e,t);var n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new l.Event(o.a.REMOVE,n)),this.dispatchEvent(new l.Event(o.a.ADD,e))}else{var r;for(r=i;r<t;++r)this.insertAt(r,void 0);this.insertAt(t,e)}},l.prototype.updateLength_=function(){this.set(l.Property_.LENGTH,this.array_.length)},l.prototype.assertUnique_=function(t,e){for(var i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new r.a(58)},l.Property_={LENGTH:"length"},l.Event=function(t,e){s.a.call(this,t),this.element=e},n.a.inherits(l.Event,s.a),e.a=l},function(t,e,i){t.exports=!i(19)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){var i=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=i)},function(t,e,i){var n=i(63),r=Math.min;t.exports=function(t){return t>0?r(n(t),9007199254740991):0}},function(t,e,i){"use strict";var n=i(31),r={asColorLike:function(t){return r.isColorLike(t)?t:n.a.asString(t)},isColorLike:function(t){return"string"==typeof t||t instanceof CanvasPattern||t instanceof CanvasGradient}};e.a=r},function(t,e,i){"use strict";e.a={ADD:"add",REMOVE:"remove"}},function(t,e,i){var n=i(20),r=i(44),o=i(43),a=i(71)("src"),s=Function.toString,l=(""+s).split("toString");i(37).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,i,s){var u="function"==typeof i;u&&(o(i,"name")||r(i,"name",e)),t[e]!==i&&(u&&(o(i,a)||r(i,a,t[e]?""+t[e]:l.join(String(e)))),t===n?t[e]=i:s?t[e]?t[e]=i:r(t,e,i):(delete t[e],r(t,e,i)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,i){var n=i(5),r=i(19),o=i(62),a=/"/g,s=function(t,e,i,n){var r=String(o(t)),s="<"+e;return""!==i&&(s+=" "+i+'="'+String(n).replace(a,"&quot;")+'"'),s+">"+r+"</"+e+">"};t.exports=function(t,e){var i={};i[t]=e(s),n(n.P+n.F*r(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",i)}},function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},function(t,e,i){var n=i(30),r=i(70);t.exports=i(36)?function(t,e,i){return n.f(t,e,r(1,i))}:function(t,e,i){return t[e]=i,t}},function(t,e,i){var n=i(98),r=i(62);t.exports=function(t){return n(r(t))}},function(t,e,i){var n=i(62);t.exports=function(t){return Object(n(t))}},function(t,e,i){"use strict";e.a={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"}},function(t,e,i){"use strict";var n=i(19);t.exports=function(t,e){return!!t&&n(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,i){"use strict";var n=function(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n};n.createOrUpdate=function(t,e,i,r,o){return void 0!==o?(o.minX=t,o.maxX=e,o.minY=i,o.maxY=r,o):new n(t,e,i,r)},n.prototype.contains=function(t){return this.containsXY(t[1],t[2])},n.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},n.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},n.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},n.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},n.prototype.getHeight=function(){return this.maxY-this.minY+1},n.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},n.prototype.getWidth=function(){return this.maxX-this.minX+1},n.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},e.a=n},function(t,e,i){var n=i(99),r=i(70),o=i(45),a=i(65),s=i(43),l=i(169),u=Object.getOwnPropertyDescriptor;e.f=i(36)?u:function(t,e){if(t=o(t),e=a(e,!0),l)try{return u(t,e)}catch(t){}if(s(t,e))return r(!n.f.call(t,e),t[e])}},function(t,e,i){var n=i(5),r=i(37),o=i(19);t.exports=function(t,e){var i=(r.Object||{})[t]||Object[t],a={};a[t]=e(i),n(n.S+n.F*o(function(){i(1)}),"Object",a)}},function(t,e,i){var n=i(59),r=i(98),o=i(46),a=i(38),s=i(319);t.exports=function(t,e){var i=1==t,l=2==t,u=3==t,h=4==t,c=6==t,f=5==t||c,p=e||s;return function(e,s,d){for(var g,_,v=o(e),y=r(v),m=n(s,d,3),x=a(y.length),E=0,S=i?p(e,x):l?p(e,0):void 0;x>E;E++)if((f||E in y)&&(_=m(g=y[E],E,v),t))if(i)S[E]=_;else if(_)switch(t){case 3:return!0;case 5:return g;case 6:return E;case 2:S.push(g)}else if(h)return!1;return c?-1:u||h?h:S}}},function(t,e,i){var n=i(199),r="object"==typeof self&&self&&self.Object===Object&&self,o=n||r||Function("return this")();t.exports=o},function(t,e){var i=Array.isArray;t.exports=i},function(t,e,i){"use strict";var n=i(0),r=function(){};r.prototype.disposed_=!1,r.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},r.prototype.disposeInternal=n.a.nullFunction,e.a=r},function(t,e,i){"use strict";var n=i(15),r=i(1),o=i(9),a=i(16),s={calculateSourceResolution:function(t,e,i,n){var o=a.default.transform(i,e,t),s=a.default.getPointResolution(e,n,i),l=e.getMetersPerUnit();void 0!==l&&(s*=l);var u=t.getMetersPerUnit();void 0!==u&&(s/=u);var h=t.getExtent();if(!h||r.a.containsCoordinate(h,o)){var c=a.default.getPointResolution(t,s,o)/s;isFinite(c)&&c>0&&(s/=c)}return s},enlargeClipPoint_:function(t,e,i,n){var r=i-t,o=n-e,a=Math.sqrt(r*r+o*o);return[Math.round(i+r/a),Math.round(n+o/a)]},render:function(t,e,i,a,l,u,h,c,f,p,d){var g=n.a.createCanvasContext2D(Math.round(i*t),Math.round(i*e));if(0===f.length)return g.canvas;g.scale(i,i);var _=r.a.createEmpty();f.forEach(function(t,e,i){r.a.extend(_,t.extent)});var v=r.a.getWidth(_),y=r.a.getHeight(_),m=n.a.createCanvasContext2D(Math.round(i*v/a),Math.round(i*y/a)),x=i/a;f.forEach(function(t,e,i){var n=t.extent[0]-_[0],o=-(t.extent[3]-_[3]),a=r.a.getWidth(t.extent),s=r.a.getHeight(t.extent);m.drawImage(t.image,p,p,t.image.width-2*p,t.image.height-2*p,n*x,o*x,a*x,s*x)});var E=r.a.getTopLeft(h);return c.getTriangles().forEach(function(t,e,n){var r=t.source,l=t.target,h=r[0][0],c=r[0][1],f=r[1][0],p=r[1][1],d=r[2][0],v=r[2][1],y=(l[0][0]-E[0])/u,x=-(l[0][1]-E[1])/u,S=(l[1][0]-E[0])/u,T=-(l[1][1]-E[1])/u,C=(l[2][0]-E[0])/u,R=-(l[2][1]-E[1])/u,I=h,b=c;h=0,c=0;var w=[[f-=I,p-=b,0,0,S-y],[d-=I,v-=b,0,0,C-y],[0,0,f,p,T-x],[0,0,d,v,R-x]],L=o.a.solveLinearSystem(w);if(L){g.save(),g.beginPath();var O=(y+S+C)/3,A=(x+T+R)/3,P=s.enlargeClipPoint_(O,A,y,x),F=s.enlargeClipPoint_(O,A,S,T),M=s.enlargeClipPoint_(O,A,C,R);g.moveTo(F[0],F[1]),g.lineTo(P[0],P[1]),g.lineTo(M[0],M[1]),g.clip(),g.transform(L[0],L[2],L[1],L[3],y,x),g.translate(_[0]-I,_[3]-b),g.scale(a/i,-a/i),g.drawImage(m.canvas,0,0),g.restore()}}),d&&(g.save(),g.strokeStyle="black",g.lineWidth=1,c.getTriangles().forEach(function(t,e,i){var n=t.target,r=(n[0][0]-E[0])/u,o=-(n[0][1]-E[1])/u,a=(n[1][0]-E[0])/u,s=-(n[1][1]-E[1])/u,l=(n[2][0]-E[0])/u,h=-(n[2][1]-E[1])/u;g.beginPath(),g.moveTo(a,s),g.lineTo(r,o),g.lineTo(l,h),g.closePath(),g.stroke()}),g.restore()),g.canvas}};e.a=s},function(t,e,i){"use strict";var n=i(0),r=i(25),o=i(8),a=function(t,e,i,n){r.a.call(this),this.extent=t,this.pixelRatio_=i,this.resolution=e,this.state=n};n.a.inherits(a,r.a),a.prototype.changed=function(){this.dispatchEvent(o.a.CHANGE)},a.prototype.getExtent=function(){return this.extent},a.prototype.getImage=function(){},a.prototype.getPixelRatio=function(){return this.pixelRatio_},a.prototype.getResolution=function(){return this.resolution},a.prototype.getState=function(){return this.state},a.prototype.load=function(){},e.a=a},function(t,e,i){"use strict";e.a={CARMENTA_SERVER:"carmentaserver",GEOSERVER:"geoserver",MAPSERVER:"mapserver",QGIS:"qgis"}},function(t,e,i){var n=i(60);t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,r){return t.call(e,i,n,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var i=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:i)(t)}},function(t,e,i){"use strict";if(i(36)){var n=i(72),r=i(20),o=i(19),a=i(5),s=i(112),l=i(154),u=i(59),h=i(91),c=i(70),f=i(44),p=i(92),d=i(63),g=i(38),_=i(194),v=i(74),y=i(65),m=i(43),x=i(104),E=i(21),S=i(46),T=i(147),C=i(75),R=i(77),I=i(76).f,b=i(149),w=i(71),L=i(24),O=i(52),A=i(102),P=i(109),F=i(151),M=i(88),D=i(106),k=i(90),N=i(150),U=i(186),G=i(30),j=i(50),B=G.f,W=j.f,z=r.RangeError,X=r.TypeError,V=r.Uint8Array,Y=Array.prototype,H=l.ArrayBuffer,K=l.DataView,q=O(0),Z=O(2),J=O(3),Q=O(4),$=O(5),tt=O(6),et=A(!0),it=A(!1),nt=F.values,rt=F.keys,ot=F.entries,at=Y.lastIndexOf,st=Y.reduce,lt=Y.reduceRight,ut=Y.join,ht=Y.sort,ct=Y.slice,ft=Y.toString,pt=Y.toLocaleString,dt=L("iterator"),gt=L("toStringTag"),_t=w("typed_constructor"),vt=w("def_constructor"),yt=s.CONSTR,mt=s.TYPED,xt=s.VIEW,Et=O(1,function(t,e){return It(P(t,t[vt]),e)}),St=o(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),Tt=!!V&&!!V.prototype.set&&o(function(){new V(1).set({})}),Ct=function(t,e){var i=d(t);if(i<0||i%e)throw z("Wrong offset!");return i},Rt=function(t){if(E(t)&&mt in t)return t;throw X(t+" is not a typed array!")},It=function(t,e){if(!(E(t)&&_t in t))throw X("It is not a typed array constructor!");return new t(e)},bt=function(t,e){return wt(P(t,t[vt]),e)},wt=function(t,e){for(var i=0,n=e.length,r=It(t,n);n>i;)r[i]=e[i++];return r},Lt=function(t,e,i){B(t,e,{get:function(){return this._d[i]}})},Ot=function(t){var e,i,n,r,o,a,s=S(t),l=arguments.length,h=l>1?arguments[1]:void 0,c=void 0!==h,f=b(s);if(null!=f&&!T(f)){for(a=f.call(s),n=[],e=0;!(o=a.next()).done;e++)n.push(o.value);s=n}for(c&&l>2&&(h=u(h,arguments[2],2)),e=0,i=g(s.length),r=It(this,i);i>e;e++)r[e]=c?h(s[e],e):s[e];return r},At=function(){for(var t=0,e=arguments.length,i=It(this,e);e>t;)i[t]=arguments[t++];return i},Pt=!!V&&o(function(){pt.call(new V(1))}),Ft=function(){return pt.apply(Pt?ct.call(Rt(this)):Rt(this),arguments)},Mt={copyWithin:function(t,e){return U.call(Rt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return Q(Rt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(Rt(this),arguments)},filter:function(t){return bt(this,Z(Rt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return $(Rt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){q(Rt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return it(Rt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Rt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ut.apply(Rt(this),arguments)},lastIndexOf:function(t){return at.apply(Rt(this),arguments)},map:function(t){return Et(Rt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Rt(this),arguments)},reduceRight:function(t){return lt.apply(Rt(this),arguments)},reverse:function(){for(var t,e=Rt(this).length,i=Math.floor(e/2),n=0;n<i;)t=this[n],this[n++]=this[--e],this[e]=t;return this},some:function(t){return J(Rt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return ht.call(Rt(this),t)},subarray:function(t,e){var i=Rt(this),n=i.length,r=v(t,n);return new(P(i,i[vt]))(i.buffer,i.byteOffset+r*i.BYTES_PER_ELEMENT,g((void 0===e?n:v(e,n))-r))}},Dt=function(t,e){return bt(this,ct.call(Rt(this),t,e))},kt=function(t){Rt(this);var e=Ct(arguments[1],1),i=this.length,n=S(t),r=g(n.length),o=0;if(r+e>i)throw z("Wrong length!");for(;o<r;)this[e+o]=n[o++]},Nt={entries:function(){return ot.call(Rt(this))},keys:function(){return rt.call(Rt(this))},values:function(){return nt.call(Rt(this))}},Ut=function(t,e){return E(t)&&t[mt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Gt=function(t,e){return Ut(t,e=y(e,!0))?c(2,t[e]):W(t,e)},jt=function(t,e,i){return!(Ut(t,e=y(e,!0))&&E(i)&&m(i,"value"))||m(i,"get")||m(i,"set")||i.configurable||m(i,"writable")&&!i.writable||m(i,"enumerable")&&!i.enumerable?B(t,e,i):(t[e]=i.value,t)};yt||(j.f=Gt,G.f=jt),a(a.S+a.F*!yt,"Object",{getOwnPropertyDescriptor:Gt,defineProperty:jt}),o(function(){ft.call({})})&&(ft=pt=function(){return ut.call(this)});var Bt=p({},Mt);p(Bt,Nt),f(Bt,dt,Nt.values),p(Bt,{slice:Dt,set:kt,constructor:function(){},toString:ft,toLocaleString:Ft}),Lt(Bt,"buffer","b"),Lt(Bt,"byteOffset","o"),Lt(Bt,"byteLength","l"),Lt(Bt,"length","e"),B(Bt,gt,{get:function(){return this[mt]}}),t.exports=function(t,e,i,l){var u=t+((l=!!l)?"Clamped":"")+"Array",c="get"+t,p="set"+t,d=r[u],v=d||{},y=d&&R(d),m=!d||!s.ABV,S={},T=d&&d.prototype,b=function(t,i){B(t,i,{get:function(){return function(t,i){var n=t._d;return n.v[c](i*e+n.o,St)}(this,i)},set:function(t){return function(t,i,n){var r=t._d;l&&(n=(n=Math.round(n))<0?0:n>255?255:255&n),r.v[p](i*e+r.o,n,St)}(this,i,t)},enumerable:!0})};m?(d=i(function(t,i,n,r){h(t,d,u,"_d");var o,a,s,l,c=0,p=0;if(E(i)){if(!(i instanceof H||"ArrayBuffer"==(l=x(i))||"SharedArrayBuffer"==l))return mt in i?wt(d,i):Ot.call(d,i);o=i,p=Ct(n,e);var v=i.byteLength;if(void 0===r){if(v%e)throw z("Wrong length!");if((a=v-p)<0)throw z("Wrong length!")}else if((a=g(r)*e)+p>v)throw z("Wrong length!");s=a/e}else s=_(i),o=new H(a=s*e);for(f(t,"_d",{b:o,o:p,l:a,e:s,v:new K(o)});c<s;)b(t,c++)}),T=d.prototype=C(Bt),f(T,"constructor",d)):o(function(){d(1)})&&o(function(){new d(-1)})&&D(function(t){new d,new d(null),new d(1.5),new d(t)},!0)||(d=i(function(t,i,n,r){var o;return h(t,d,u),E(i)?i instanceof H||"ArrayBuffer"==(o=x(i))||"SharedArrayBuffer"==o?void 0!==r?new v(i,Ct(n,e),r):void 0!==n?new v(i,Ct(n,e)):new v(i):mt in i?wt(d,i):Ot.call(d,i):new v(_(i))}),q(y!==Function.prototype?I(v).concat(I(y)):I(v),function(t){t in d||f(d,t,v[t])}),d.prototype=T,n||(T.constructor=d));var w=T[dt],L=!!w&&("values"==w.name||null==w.name),O=Nt.values;f(d,_t,!0),f(T,mt,u),f(T,xt,!0),f(T,vt,d),(l?new d(1)[gt]==u:gt in T)||B(T,gt,{get:function(){return u}}),S[u]=d,a(a.G+a.W+a.F*(d!=v),S),a(a.S,u,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*o(function(){v.of.call(d,1)}),u,{from:Ot,of:At}),"BYTES_PER_ELEMENT"in T||f(T,"BYTES_PER_ELEMENT",e),a(a.P,u,Mt),k(u),a(a.P+a.F*Tt,u,{set:kt}),a(a.P+a.F*!L,u,Nt),n||T.toString==ft||(T.toString=ft),a(a.P+a.F*o(function(){new d(1).slice()}),u,{slice:Dt}),a(a.P+a.F*(o(function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()})||!o(function(){T.toLocaleString.call([1,2])})),u,{toLocaleString:Ft}),M[u]=L?w:O,n||L||f(T,dt,O)}}else t.exports=function(){}},function(t,e,i){var n=i(21);t.exports=function(t,e){if(!n(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!n(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e,i){var n=i(71)("meta"),r=i(21),o=i(43),a=i(30).f,s=0,l=Object.isExtensible||function(){return!0},u=!i(19)(function(){return l(Object.preventExtensions({}))}),h=function(t){a(t,n,{value:{i:"O"+ ++s,w:{}}})},c=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,n)){if(!l(t))return"F";if(!e)return"E";h(t)}return t[n].i},getWeak:function(t,e){if(!o(t,n)){if(!l(t))return!0;if(!e)return!1;h(t)}return t[n].w},onFreeze:function(t){return u&&c.NEED&&l(t)&&!o(t,n)&&h(t),t}}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,i){"use strict";i.r(e);var n=i(0),r=function(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width,this.checksum_=void 0};r.prototype.clone=function(){var t=this.getColor();return new r({color:t&&t.slice?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},r.prototype.getColor=function(){return this.color_},r.prototype.getLineCap=function(){return this.lineCap_},r.prototype.getLineDash=function(){return this.lineDash_},r.prototype.getLineDashOffset=function(){return this.lineDashOffset_},r.prototype.getLineJoin=function(){return this.lineJoin_},r.prototype.getMiterLimit=function(){return this.miterLimit_},r.prototype.getWidth=function(){return this.width_},r.prototype.setColor=function(t){this.color_=t,this.checksum_=void 0},r.prototype.setLineCap=function(t){this.lineCap_=t,this.checksum_=void 0},r.prototype.setLineDash=function(t){this.lineDash_=t,this.checksum_=void 0},r.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t,this.checksum_=void 0},r.prototype.setLineJoin=function(t){this.lineJoin_=t,this.checksum_=void 0},r.prototype.setMiterLimit=function(t){this.miterLimit_=t,this.checksum_=void 0},r.prototype.setWidth=function(t){this.width_=t,this.checksum_=void 0},r.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.checksum_="s",this.color_?"string"==typeof this.color_?this.checksum_+=this.color_:this.checksum_+=n.a.getUid(this.color_).toString():this.checksum_+="-",this.checksum_+=","+(void 0!==this.lineCap_?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(void 0!==this.lineDashOffset_?this.lineDashOffset_:"-")+","+(void 0!==this.lineJoin_?this.lineJoin_:"-")+","+(void 0!==this.miterLimit_?this.miterLimit_.toString():"-")+","+(void 0!==this.width_?this.width_.toString():"-")),this.checksum_},e.default=r},function(t,e,i){"use strict";e.a={PROPERTYCHANGE:"propertychange"}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var i=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++i+n).toString(36))}},function(t,e){t.exports=!1},function(t,e,i){var n=i(171),r=i(134);t.exports=Object.keys||function(t){return n(t,r)}},function(t,e,i){var n=i(63),r=Math.max,o=Math.min;t.exports=function(t,e){return(t=n(t))<0?r(t+e,0):o(t,e)}},function(t,e,i){var n=i(23),r=i(172),o=i(134),a=i(133)("IE_PROTO"),s=function(){},l=function(){var t,e=i(130)("iframe"),n=o.length;for(e.style.display="none",i(136).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;n--;)delete l.prototype[o[n]];return l()};t.exports=Object.create||function(t,e){var i;return null!==t?(s.prototype=n(t),i=new s,s.prototype=null,i[a]=t):i=l(),void 0===e?i:r(i,e)}},function(t,e,i){var n=i(171),r=i(134).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,r)}},function(t,e,i){var n=i(43),r=i(46),o=i(133)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),n(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,i){var n=i(417),r=i(422);t.exports=function(t,e){var i=r(t,e);return n(i)?i:void 0}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,i){"use strict";var n=i(0),r=i(12),o=i(25),a=i(8),s=function(t){o.a.call(this),this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null};n.a.inherits(s,o.a),s.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},s.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent(a.a.CLEAR)},s.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},s.prototype.forEach=function(t,e){for(var i=this.oldest_;i;)t.call(e,i.value_,i.key_,this),i=i.newer},s.prototype.get=function(t){var e=this.entries_[t];return r.a.assert(void 0!==e,15),e===this.newest_?e.value_:(e===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(e.newer.older=e.older,e.older.newer=e.newer),e.newer=null,e.older=this.newest_,this.newest_.newer=e,this.newest_=e,e.value_)},s.prototype.remove=function(t){var e=this.entries_[t];return r.a.assert(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},s.prototype.getCount=function(){return this.count_},s.prototype.getKeys=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e},s.prototype.getValues=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e},s.prototype.peekLast=function(){return this.oldest_.value_},s.prototype.peekLastKey=function(){return this.oldest_.key_},s.prototype.peekFirstKey=function(){return this.newest_.key_},s.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},s.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},s.prototype.set=function(t,e){r.a.assert(!(t in this.entries_),16);var i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_},s.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},e.a=s},function(t,e,i){"use strict";i.r(e);var n=function(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.snapToPixel_=t.snapToPixel};n.prototype.getOpacity=function(){return this.opacity_},n.prototype.getRotateWithView=function(){return this.rotateWithView_},n.prototype.getRotation=function(){return this.rotation_},n.prototype.getScale=function(){return this.scale_},n.prototype.getSnapToPixel=function(){return this.snapToPixel_},n.prototype.getAnchor=function(){},n.prototype.getImage=function(t){},n.prototype.getHitDetectionImage=function(t){},n.prototype.getImageState=function(){},n.prototype.getImageSize=function(){},n.prototype.getHitDetectionImageSize=function(){},n.prototype.getOrigin=function(){},n.prototype.getSize=function(){},n.prototype.setOpacity=function(t){this.opacity_=t},n.prototype.setRotateWithView=function(t){this.rotateWithView_=t},n.prototype.setRotation=function(t){this.rotation_=t},n.prototype.setScale=function(t){this.scale_=t},n.prototype.setSnapToPixel=function(t){this.snapToPixel_=t},n.prototype.listenImageChange=function(t,e){},n.prototype.load=function(){},n.prototype.unlistenImageChange=function(t,e){},e.default=n},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i(31),o=function(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.checksum_=void 0};o.prototype.clone=function(){var t=this.getColor();return new o({color:t&&t.slice?t.slice():t||void 0})},o.prototype.getColor=function(){return this.color_},o.prototype.setColor=function(t){this.color_=t,this.checksum_=void 0},o.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.color_ instanceof CanvasPattern||this.color_ instanceof CanvasGradient?this.checksum_=n.a.getUid(this.color_).toString():this.checksum_="f"+(this.color_?r.a.asString(this.color_):"-")),this.checksum_},e.default=o},function(t,e,i){"use strict";var n={padNumber:function(t,e,i){var n=void 0!==i?t.toFixed(i):""+t,r=n.indexOf(".");return(r=-1===r?n.length:r)>e?n:new Array(1+e-r).join("0")+n},compareVersions:function(t,e){for(var i=(""+t).split("."),n=(""+e).split("."),r=0;r<Math.max(i.length,n.length);r++){var o=parseInt(i[r]||"0",10),a=parseInt(n[r]||"0",10);if(o>a)return 1;if(a>o)return-1}return 0}};e.a=n},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i(17),o=i(26),a=i(9),s=i(11),l=function(t){r.a.call(this);var e=s.a.assign({},t);e[o.a.OPACITY]=void 0!==t.opacity?t.opacity:1,e[o.a.VISIBLE]=void 0===t.visible||t.visible,e[o.a.Z_INDEX]=void 0!==t.zIndex?t.zIndex:0,e[o.a.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0,e[o.a.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0,this.setProperties(e),this.state_={layer:this,managed:!0},this.type};n.a.inherits(l,r.a),l.prototype.getType=function(){return this.type},l.prototype.getLayerState=function(){return this.state_.opacity=a.a.clamp(this.getOpacity(),0,1),this.state_.sourceState=this.getSourceState(),this.state_.visible=this.getVisible(),this.state_.extent=this.getExtent(),this.state_.zIndex=this.getZIndex(),this.state_.maxResolution=this.getMaxResolution(),this.state_.minResolution=Math.max(this.getMinResolution(),0),this.state_},l.prototype.getLayersArray=function(t){},l.prototype.getLayerStatesArray=function(t){},l.prototype.getExtent=function(){return this.get(o.a.EXTENT)},l.prototype.getMaxResolution=function(){return this.get(o.a.MAX_RESOLUTION)},l.prototype.getMinResolution=function(){return this.get(o.a.MIN_RESOLUTION)},l.prototype.getOpacity=function(){return this.get(o.a.OPACITY)},l.prototype.getSourceState=function(){},l.prototype.getVisible=function(){return this.get(o.a.VISIBLE)},l.prototype.getZIndex=function(){return this.get(o.a.Z_INDEX)},l.prototype.setExtent=function(t){this.set(o.a.EXTENT,t)},l.prototype.setMaxResolution=function(t){this.set(o.a.MAX_RESOLUTION,t)},l.prototype.setMinResolution=function(t){this.set(o.a.MIN_RESOLUTION,t)},l.prototype.setOpacity=function(t){this.set(o.a.OPACITY,t)},l.prototype.setVisible=function(t){this.set(o.a.VISIBLE,t)},l.prototype.setZIndex=function(t){this.set(o.a.Z_INDEX,t)},e.default=l},function(t,e,i){"use strict";var n=i(0),r=i(27),o=i(1),a=i(86),s=i(11),l=i(16),u=i(32),h=i(12),c=i(49),f=i(14),p=i(9),d=i(34),g=function(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,h.a.assert(f.a.isSorted(this.resolutions_,function(t,e){return e-t},!0),17),!t.origins)for(var i=0,r=this.resolutions_.length-1;i<r;++i)if(e){if(this.resolutions_[i]/this.resolutions_[i+1]!==e){e=void 0;break}}else e=this.resolutions_[i]/this.resolutions_[i+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,h.a.assert(this.origins_.length==this.resolutions_.length,20));var a=t.extent;void 0===a||this.origin_||this.origins_||(this.origin_=o.a.getTopLeft(a)),h.a.assert(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,h.a.assert(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:n.a.DEFAULT_TILE_SIZE,h.a.assert(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==a?a:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map(function(t,e){return new c.a(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1))},this):a&&this.calculateTileRanges_(a)};g.tmpTileCoord_=[0,0,0],g.prototype.forEachTileCoord=function(t,e,i){for(var n=this.getTileRangeForExtentAndZ(t,e),r=n.minX,o=n.maxX;r<=o;++r)for(var a=n.minY,s=n.maxY;a<=s;++a)i([e,r,a])},g.prototype.forEachTileCoordParentTileRange=function(t,e,i,n,r){var o,a,s,l=null,u=t[0]-1;for(2===this.zoomFactor_?(a=t[1],s=t[2]):l=this.getTileCoordExtent(t,r);u>=this.minZoom;){if(2===this.zoomFactor_?(a=Math.floor(a/2),s=Math.floor(s/2),o=c.a.createOrUpdate(a,a,s,s,n)):o=this.getTileRangeForExtentAndZ(l,u,n),e.call(i,u,o))return!0;--u}return!1},g.prototype.getExtent=function(){return this.extent_},g.prototype.getMaxZoom=function(){return this.maxZoom},g.prototype.getMinZoom=function(){return this.minZoom},g.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},g.prototype.getResolution=function(t){return this.resolutions_[t]},g.prototype.getResolutions=function(){return this.resolutions_},g.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],r=2*t[2];return c.a.createOrUpdate(n,n+1,r,r+1,e)}var o=this.getTileCoordExtent(t,i);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},g.prototype.getTileRangeExtent=function(t,e,i){var n=this.getOrigin(t),a=this.getResolution(t),s=r.a.toSize(this.getTileSize(t),this.tmpSize_),l=n[0]+e.minX*s[0]*a,u=n[0]+(e.maxX+1)*s[0]*a,h=n[1]+e.minY*s[1]*a,c=n[1]+(e.maxY+1)*s[1]*a;return o.a.createOrUpdate(l,h,u,c,i)},g.prototype.getTileRangeForExtentAndZ=function(t,e,i){var n=g.tmpTileCoord_;this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n);var r=n[1],o=n[2];return this.getTileCoordForXYAndZ_(t[2],t[3],e,!0,n),c.a.createOrUpdate(r,n[1],o,n[2],i)},g.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=r.a.toSize(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]+(t[2]+.5)*n[1]*i]},g.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),n=this.getResolution(t[0]),a=r.a.toSize(this.getTileSize(t[0]),this.tmpSize_),s=i[0]+t[1]*a[0]*n,l=i[1]+t[2]*a[1]*n,u=s+a[0]*n,h=l+a[1]*n;return o.a.createOrUpdate(s,l,u,h,e)},g.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},g.prototype.getTileCoordForXYAndResolution_=function(t,e,i,n,o){var a=this.getZForResolution(i),s=i/this.getResolution(a),l=this.getOrigin(a),u=r.a.toSize(this.getTileSize(a),this.tmpSize_),h=n?.5:0,c=n?0:.5,f=Math.floor((t-l[0])/i+h),p=Math.floor((e-l[1])/i+c),g=s*f/u[0],_=s*p/u[1];return n?(g=Math.ceil(g)-1,_=Math.ceil(_)-1):(g=Math.floor(g),_=Math.floor(_)),d.a.createOrUpdate(a,g,_,o)},g.prototype.getTileCoordForXYAndZ_=function(t,e,i,n,o){var a=this.getOrigin(i),s=this.getResolution(i),l=r.a.toSize(this.getTileSize(i),this.tmpSize_),u=n?.5:0,h=n?0:.5,c=Math.floor((t-a[0])/s+u),f=Math.floor((e-a[1])/s+h),p=c/l[0],g=f/l[1];return n?(p=Math.ceil(p)-1,g=Math.ceil(g)-1):(p=Math.floor(p),g=Math.floor(g)),d.a.createOrUpdate(i,p,g,o)},g.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},g.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},g.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},g.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:null},g.prototype.getZForResolution=function(t,e){var i=f.a.linearFindNearest(this.resolutions_,t,e||0);return p.a.clamp(i,this.minZoom,this.maxZoom)},g.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,i=new Array(e),n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i};var _=g,v={getForProjection:function(t){var e=t.getDefaultTileGrid();return e||(e=v.createForProjection(t),t.setDefaultTileGrid(e)),e},wrapX:function(t,e,i){var n=e[0],r=t.getTileCoordCenter(e),a=v.extentFromProjection(i);if(o.a.containsCoordinate(a,r))return e;var s=o.a.getWidth(a),l=Math.ceil((a[0]-r[0])/s);return r[0]+=s*l,t.getTileCoordForCoordAndZ(r,n)},createForExtent:function(t,e,i,n){var r=void 0!==n?n:a.a.TOP_LEFT,s=v.resolutionsFromExtent(t,e,i);return new _({extent:t,origin:o.a.getCorner(t,r),resolutions:s,tileSize:i})},createXYZ:function(t){var e={};return s.a.assign(e,void 0!==t?t:{}),void 0===e.extent&&(e.extent=l.default.get("EPSG:3857").getExtent()),e.resolutions=v.resolutionsFromExtent(e.extent,e.maxZoom,e.tileSize),delete e.maxZoom,new _(e)},resolutionsFromExtent:function(t,e,i){for(var a=void 0!==e?e:n.a.DEFAULT_MAX_ZOOM,s=o.a.getHeight(t),l=o.a.getWidth(t),u=r.a.toSize(void 0!==i?i:n.a.DEFAULT_TILE_SIZE),h=Math.max(l/u[0],s/u[1]),c=a+1,f=new Array(c),p=0;p<c;++p)f[p]=h/Math.pow(2,p);return f},createForProjection:function(t,e,i,n){var r=v.extentFromProjection(t);return v.createForExtent(r,e,i,n)},extentFromProjection:function(t){var e=(t=l.default.get(t)).getExtent();if(!e){var i=180*l.default.METERS_PER_UNIT[u.a.DEGREES]/t.getMetersPerUnit();e=o.a.createOrUpdate(-i,-i,i,i)}return e}};e.a=v},function(t,e,i){"use strict";e.a={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"}},function(t,e,i){var n=i(30).f,r=i(43),o=i(24)("toStringTag");t.exports=function(t,e,i){t&&!r(t=i?t:t.prototype,o)&&n(t,o,{configurable:!0,value:e})}},function(t,e){t.exports={}},function(t,e,i){var n=i(24)("unscopables"),r=Array.prototype;null==r[n]&&i(44)(r,n,{}),t.exports=function(t){r[n][t]=!0}},function(t,e,i){"use strict";var n=i(20),r=i(30),o=i(36),a=i(24)("species");t.exports=function(t){var e=n[t];o&&e&&!e[a]&&r.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,i,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(i+": incorrect invocation!");return t}},function(t,e,i){var n=i(41);t.exports=function(t,e,i){for(var r in e)n(t,r,e[r],i);return t}},function(t,e,i){var n=i(21);t.exports=function(t,e){if(!n(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,i){var n=i(100),r=i(418),o=i(419),a=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?r(t):o(t)}},function(t,e,i){"use strict";t.exports=r;var n=i(397);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,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function a(t,e){s(t,0,t.children.length,e,t)}function s(t,e,i,n,r){r||(r=g(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o,a=e;a<i;a++)o=t.children[a],l(r,t.leaf?n(o):o);return r}function l(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 u(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function d(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(t,e,i,r,o){for(var a,s=[e,i];s.length;)(i=s.pop())-(e=s.pop())<=r||(a=e+Math.ceil((i-e)/r/2)*r,n(t,a,e,i,o),s.push(e,a,a,i))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!d(t,e))return i;for(var r,o,a,s,l=[];e;){for(r=0,o=e.children.length;r<o;r++)a=e.children[r],d(t,s=e.leaf?n(a):a)&&(e.leaf?i.push(a):p(t,s)?this._all(a,i):l.push(a));e=l.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!d(t,e))return!1;for(var n,r,o,a,s=[];e;){for(n=0,r=e.children.length;n<r;n++)if(o=e.children[n],d(t,a=e.leaf?i(o):o)){if(e.leaf||p(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,i=t.length;e<i;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=g([]),this},remove:function(t,e){if(!t)return this;for(var i,n,r,a,s=this.data,l=this.toBBox(t),u=[],h=[];s||u.length;){if(s||(s=u.pop(),n=u[u.length-1],i=h.pop(),a=!0),s.leaf&&-1!==(r=o(t,s.children,e)))return s.children.splice(r,1),u.push(s),this._condense(u),this;a||s.leaf||!p(s,l)?n?(i++,s=n.children[i],a=!1):s=null:(u.push(s),h.push(i),i=0,n=s,s=s.children[0])}return this},toBBox:function(t){return t},compareMinX:u,compareMinY:h,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},_build:function(t,e,i,n){var r,o=i-e+1,s=this._maxEntries;if(o<=s)return a(r=g(t.slice(e,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(s)),s=Math.ceil(o/Math.pow(s,n-1))),(r=g([])).leaf=!1,r.height=n;var l,u,h,c,f=Math.ceil(o/s),p=f*Math.ceil(Math.sqrt(s));for(_(t,e,i,p,this.compareMinX),l=e;l<=i;l+=p)for(_(t,l,h=Math.min(l+p-1,i),f,this.compareMinY),u=l;u<=h;u+=f)c=Math.min(u+f-1,h),r.children.push(this._build(t,u,c,n-1));return a(r,this.toBBox),r},_chooseSubtree:function(t,e,i,n){for(var r,o,a,s,l,u,h,f,p,d;n.push(e),!e.leaf&&n.length-1!==i;){for(h=f=1/0,r=0,o=e.children.length;r<o;r++)l=c(a=e.children[r]),p=t,d=a,(u=(Math.max(d.maxX,p.maxX)-Math.min(d.minX,p.minX))*(Math.max(d.maxY,p.maxY)-Math.min(d.minY,p.minY))-l)<f?(f=u,h=l<h?l:h,s=a):u===f&&l<h&&(h=l,s=a);e=s||e.children[0]}return e},_insert:function(t,e,i){var n=this.toBBox,r=i?t:n(t),o=[],a=this._chooseSubtree(r,this.data,e,o);for(a.children.push(t),l(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 i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var o=this._chooseSplitIndex(i,r,n),s=g(i.children.splice(o,i.children.length-o));s.height=i.height,s.leaf=i.leaf,a(i,this.toBBox),a(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(i,s)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,r,o,a,l,u,h,f,p,d,g,_,v,y;for(u=h=1/0,n=e;n<=i-e;n++)p=r=s(t,0,n,this.toBBox),d=o=s(t,n,i,this.toBBox),g=Math.max(p.minX,d.minX),_=Math.max(p.minY,d.minY),v=Math.min(p.maxX,d.maxX),y=Math.min(p.maxY,d.maxY),a=Math.max(0,v-g)*Math.max(0,y-_),l=c(r)+c(o),a<u?(u=a,f=n,h=l<h?l:h):a===u&&l<h&&(h=l,f=n);return f},_chooseSplitAxis:function(t,e,i){var n=t.leaf?this.compareMinX:u,r=t.leaf?this.compareMinY:h;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)},_allDistMargin:function(t,e,i,n){t.children.sort(n);var r,o,a=this.toBBox,u=s(t,0,e,a),h=s(t,i-e,i,a),c=f(u)+f(h);for(r=e;r<i-e;r++)o=t.children[r],l(u,t.leaf?a(o):o),c+=f(u);for(r=i-e-1;r>=e;r--)o=t.children[r],l(h,t.leaf?a(o):o),c+=f(h);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)l(e[n],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():a(t[i],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,i){"use strict";var n=i(0),r=i(2),o=i(25),a=i(8),s=function(){o.a.call(this),this.revision_=0};n.a.inherits(s,o.a),s.unByKey=function(t){if(Array.isArray(t))for(var e=0,i=t.length;e<i;++e)r.a.unlistenByKey(t[e]);else r.a.unlistenByKey(t)},s.prototype.changed=function(){++this.revision_,this.dispatchEvent(a.a.CHANGE)},s.prototype.dispatchEvent,s.prototype.getRevision=function(){return this.revision_},s.prototype.on=function(t,e,i){if(Array.isArray(t)){for(var n=t.length,o=new Array(n),a=0;a<n;++a)o[a]=r.a.listen(this,t[a],e,i);return o}return r.a.listen(this,t,e,i)},s.prototype.once=function(t,e,i){if(Array.isArray(t)){for(var n=t.length,o=new Array(n),a=0;a<n;++a)o[a]=r.a.listenOnce(this,t[a],e,i);return o}return r.a.listenOnce(this,t,e,i)},s.prototype.un=function(t,e,i){if(Array.isArray(t))for(var n=0,o=t.length;n<o;++n)r.a.unlisten(this,t[n],e,i);else r.a.unlisten(this,t,e,i)},e.a=s},function(t,e,i){"use strict";var n=i(0),r=i(49),o=i(9),a=i(85),s=function(t){this.html_=t.html,this.tileRanges_=t.tileRanges?t.tileRanges:null};s.prototype.getHTML=function(){return this.html_},s.prototype.intersectsAnyTileRange=function(t,e,i){if(!this.tileRanges_)return!0;var n,s,l,u;for(u in t){var h;if(u in this.tileRanges_)for(l=t[u],n=0,s=this.tileRanges_[u].length;n<s;++n){if((h=this.tileRanges_[u][n]).intersects(l))return!0;var c=e.getTileRangeForExtentAndZ(a.a.extentFromProjection(i),parseInt(u,10)),f=c.getWidth();if(l.minX<c.minX||l.maxX>c.maxX){if(h.intersects(new r.a(o.a.modulo(l.minX,f),o.a.modulo(l.maxX,f),l.minY,l.maxY)))return!0;if(l.getWidth()>f&&h.intersects(c))return!0}}}return!1};var l=s,u=i(17),h=i(16),c=i(47),f=function(t){u.a.call(this),this.projection_=h.default.get(t.projection),this.attributions_=null,this.attributions2_=this.adaptAttributions_(t.attributions),this.logo_=t.logo,this.state_=void 0!==t.state?t.state:c.a.READY,this.wrapX_=void 0!==t.wrapX&&t.wrapX};n.a.inherits(f,u.a),f.prototype.adaptAttributions_=function(t){if(!t)return null;if(t instanceof l)return this.attributions_=[t],function(e){return[t.getHTML()]};if(Array.isArray(t)){if(t[0]instanceof l){this.attributions_=t;var e=t.map(function(t){return t.getHTML()});return function(t){return e}}return this.attributions_=t.map(function(t){return new l({html:t})}),function(e){return t}}return"function"==typeof t?t:(this.attributions_=[new l({html:t})],function(e){return[t]})},f.prototype.forEachFeatureAtCoordinate=n.a.nullFunction,f.prototype.getAttributions=function(){return this.attributions_},f.prototype.getAttributions2=function(){return this.attributions2_},f.prototype.getLogo=function(){return this.logo_},f.prototype.getProjection=function(){return this.projection_},f.prototype.getResolutions=function(){},f.prototype.getState=function(){return this.state_},f.prototype.getWrapX=function(){return this.wrapX_},f.prototype.refresh=function(){this.changed()},f.prototype.setAttributions=function(t){this.attributions2_=this.adaptAttributions_(t),this.changed()},f.prototype.setLogo=function(t){this.logo_=t},f.prototype.setState=function(t){this.state_=t,this.changed()},e.a=f},function(t,e,i){var n=i(61);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,i){var n=i(53).Symbol;t.exports=n},function(t,e){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){var n=i(45),r=i(38),o=i(74);t.exports=function(t){return function(e,i,a){var s,l=n(e),u=r(l.length),h=o(a,u);if(t&&i!=i){for(;u>h;)if((s=l[h++])!=s)return!0}else for(;u>h;h++)if((t||h in l)&&l[h]===i)return t||h||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,i){var n=i(61),r=i(24)("toStringTag"),o="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,i,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?i:o?n(e):"Object"==(a=n(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,i){var n=i(5),r=i(62),o=i(19),a=i(138),s="["+a+"]",l=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),h=function(t,e,i){var r={},s=o(function(){return!!a[t]()||"​…"!="​…"[t]()}),l=r[t]=s?e(c):a[t];i&&(r[i]=l),n(n.P+n.F*s,"String",r)},c=h.trim=function(t,e){return t=String(r(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(u,"")),t};t.exports=h},function(t,e,i){var n=i(24)("iterator"),r=!1;try{var o=[7][n]();o.return=function(){r=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var i=!1;try{var o=[7],a=o[n]();a.next=function(){return{done:i=!0}},o[n]=function(){return a},t(o)}catch(t){}return i}},function(t,e,i){"use strict";var n=i(44),r=i(41),o=i(19),a=i(62),s=i(24);t.exports=function(t,e,i){var l=s(t),u=i(a,l,""[t]),h=u[0],c=u[1];o(function(){var e={};return e[l]=function(){return 7},7!=""[t](e)})&&(r(String.prototype,t,h),n(RegExp.prototype,l,2==e?function(t,e){return c.call(t,this,e)}:function(t){return c.call(t,this)}))}},function(t,e,i){var n=i(59),r=i(184),o=i(147),a=i(23),s=i(38),l=i(149),u={},h={};(e=t.exports=function(t,e,i,c,f){var p,d,g,_,v=f?function(){return t}:l(t),y=n(i,c,e?2:1),m=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(o(v)){for(p=s(t.length);p>m;m++)if((_=e?y(a(d=t[m])[0],d[1]):y(t[m]))===u||_===h)return _}else for(g=v.call(t);!(d=g.next()).done;)if((_=r(g,y,d.value,e))===u||_===h)return _}).BREAK=u,e.RETURN=h},function(t,e,i){var n=i(23),r=i(60),o=i(24)("species");t.exports=function(t,e){var i,a=n(t).constructor;return void 0===a||null==(i=n(a)[o])?e:r(i)}},function(t,e,i){var n=i(20).navigator;t.exports=n&&n.userAgent||""},function(t,e,i){"use strict";var n=i(20),r=i(5),o=i(41),a=i(92),s=i(66),l=i(108),u=i(91),h=i(21),c=i(19),f=i(106),p=i(87),d=i(139);t.exports=function(t,e,i,g,_,v){var y=n[t],m=y,x=_?"set":"add",E=m&&m.prototype,S={},T=function(t){var e=E[t];o(E,t,"delete"==t?function(t){return!(v&&!h(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(v&&!h(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!h(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,i){return e.call(this,0===t?0:t,i),this})};if("function"==typeof m&&(v||E.forEach&&!c(function(){(new m).entries().next()}))){var C=new m,R=C[x](v?{}:-0,1)!=C,I=c(function(){C.has(1)}),b=f(function(t){new m(t)}),w=!v&&c(function(){for(var t=new m,e=5;e--;)t[x](e,e);return!t.has(-0)});b||((m=e(function(e,i){u(e,m,t);var n=d(new y,e,m);return null!=i&&l(i,_,n[x],n),n})).prototype=E,E.constructor=m),(I||w)&&(T("delete"),T("has"),_&&T("get")),(w||R)&&T(x),v&&E.clear&&delete E.clear}else m=g.getConstructor(e,t,_,x),a(m.prototype,i),s.NEED=!0;return p(m,t),S[t]=m,r(r.G+r.W+r.F*(m!=y),S),v||g.setStrong(m,t,_),m}},function(t,e,i){for(var n,r=i(20),o=i(44),a=i(71),s=a("typed_array"),l=a("view"),u=!(!r.ArrayBuffer||!r.DataView),h=u,c=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");c<9;)(n=r[f[c++]])?(o(n.prototype,s,!0),o(n.prototype,l,!0)):h=!1;t.exports={ABV:u,CONSTR:h,TYPED:s,VIEW:l}},function(t,e,i){var n=i(407),r=i(408),o=i(409),a=i(410),s=i(411);function l(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l},function(t,e,i){var n=i(156);t.exports=function(t,e){for(var i=t.length;i--;)if(n(t[i][0],e))return i;return-1}},function(t,e,i){var n=i(78)(Object,"create");t.exports=n},function(t,e,i){var n=i(431);t.exports=function(t,e){var i=t.__data__;return n(e)?i["string"==typeof e?"string":"hash"]:i.map}},function(t,e,i){var n=i(201),r=i(202);t.exports=function(t,e,i,o){var a=!i;i||(i={});for(var s=-1,l=e.length;++s<l;){var u=e[s],h=o?o(i[u],t[u],u,i,t):void 0;void 0===h&&(h=t[u]),a?r(i,u,h):n(i,u,h)}return i}},function(t,e,i){var n=i(203),r=i(442),o=i(208);t.exports=function(t){return o(t)?n(t):r(t)}},function(t,e,i){var n=i(453),r=i(157),o=i(454),a=i(455),s=i(456),l=i(94),u=i(200),h=u(n),c=u(r),f=u(o),p=u(a),d=u(s),g=l;(n&&"[object DataView]"!=g(new n(new ArrayBuffer(1)))||r&&"[object Map]"!=g(new r)||o&&"[object Promise]"!=g(o.resolve())||a&&"[object Set]"!=g(new a)||s&&"[object WeakMap]"!=g(new s))&&(g=function(t){var e=l(t),i="[object Object]"==e?t.constructor:void 0,n=i?u(i):"";if(n)switch(n){case h:return"[object DataView]";case c:return"[object Map]";case f:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=g},function(t,e,i){var n=i(94),r=i(67);t.exports=function(t){return"symbol"==typeof t||r(t)&&"[object Symbol]"==n(t)}},function(t,e,i){var n=i(120);t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,i){"use strict";var n=i(0),r=function(t){var e=n.a.VERSION?n.a.VERSION.split("-")[0]:"latest";this.message="Assertion failed. See https://openlayers.org/en/"+e+"/doc/errors/#"+t+" for details.",this.code=t,this.name="AssertionError"};n.a.inherits(r,Error),e.a=r},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i(124),o=function(t){var e=t||{};r.default.call(this,{points:1/0,fill:e.fill,radius:e.radius,snapToPixel:e.snapToPixel,stroke:e.stroke,atlasManager:e.atlasManager})};n.a.inherits(o,r.default),o.prototype.clone=function(){var t=new o({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),snapToPixel:this.getSnapToPixel(),atlasManager:this.atlasManager_});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},o.prototype.setRadius=function(t){this.radius_=t,this.render_(this.atlasManager_)},e.default=o},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i(39),o=i(15),a=i(18),s=i(13),l=i(7),u=i(81),h=function(t){this.checksums_=null,this.canvas_=null,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=void 0!==t.radius?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.anchor_=null,this.size_=null,this.imageSize_=null,this.hitDetectionImageSize_=null,this.atlasManager_=t.atlasManager,this.render_(this.atlasManager_);var e=void 0===t.snapToPixel||t.snapToPixel,i=void 0!==t.rotateWithView&&t.rotateWithView;u.default.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==t.rotation?t.rotation:0,scale:1,snapToPixel:e})};n.a.inherits(h,u.default),h.prototype.clone=function(){var t=new h({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),snapToPixel:this.getSnapToPixel(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),atlasManager:this.atlasManager_});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},h.prototype.getAnchor=function(){return this.anchor_},h.prototype.getAngle=function(){return this.angle_},h.prototype.getFill=function(){return this.fill_},h.prototype.getHitDetectionImage=function(t){return this.hitDetectionCanvas_},h.prototype.getImage=function(t){return this.canvas_},h.prototype.getImageSize=function(){return this.imageSize_},h.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},h.prototype.getImageState=function(){return s.a.LOADED},h.prototype.getOrigin=function(){return this.origin_},h.prototype.getPoints=function(){return this.points_},h.prototype.getRadius=function(){return this.radius_},h.prototype.getRadius2=function(){return this.radius2_},h.prototype.getSize=function(){return this.size_},h.prototype.getStroke=function(){return this.stroke_},h.prototype.listenImageChange=function(t,e){},h.prototype.load=function(){},h.prototype.unlistenImageChange=function(t,e){},h.prototype.render_=function(t){var e,i,n="",s="",u=0,h=null,c=0,f=0;this.stroke_&&(null===(i=this.stroke_.getColor())&&(i=l.a.defaultStrokeStyle),i=r.a.asColorLike(i),void 0===(f=this.stroke_.getWidth())&&(f=l.a.defaultLineWidth),h=this.stroke_.getLineDash(),c=this.stroke_.getLineDashOffset(),a.a.CANVAS_LINE_DASH||(h=null,c=0),void 0===(s=this.stroke_.getLineJoin())&&(s=l.a.defaultLineJoin),void 0===(n=this.stroke_.getLineCap())&&(n=l.a.defaultLineCap),void 0===(u=this.stroke_.getMiterLimit())&&(u=l.a.defaultMiterLimit));var p=2*(this.radius_+f)+1,d={strokeStyle:i,strokeWidth:f,size:p,lineCap:n,lineDash:h,lineDashOffset:c,lineJoin:s,miterLimit:u};if(void 0===t){var g=o.a.createCanvasContext2D(p,p);this.canvas_=g.canvas,e=p=this.canvas_.width,this.draw_(d,g,0,0),this.createHitDetectionCanvas_(d)}else{p=Math.round(p);var _,v=!this.fill_;v&&(_=this.drawHitDetectionCanvas_.bind(this,d));var y=this.getChecksum(),m=t.add(y,p,p,this.draw_.bind(this,d),_);this.canvas_=m.image,this.origin_=[m.offsetX,m.offsetY],e=m.image.width,v?(this.hitDetectionCanvas_=m.hitImage,this.hitDetectionImageSize_=[m.hitImage.width,m.hitImage.height]):(this.hitDetectionCanvas_=this.canvas_,this.hitDetectionImageSize_=[e,e])}this.anchor_=[p/2,p/2],this.size_=[p,p],this.imageSize_=[e,e]},h.prototype.draw_=function(t,e,i,n){var o,a,s;e.setTransform(1,0,0,1,0,0),e.translate(i,n),e.beginPath();var u=this.points_;if(u===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var h=void 0!==this.radius2_?this.radius2_:this.radius_;for(h!==this.radius_&&(u*=2),o=0;o<=u;o++)a=2*o*Math.PI/u-Math.PI/2+this.angle_,s=o%2==0?this.radius_:h,e.lineTo(t.size/2+s*Math.cos(a),t.size/2+s*Math.sin(a))}if(this.fill_){var c=this.fill_.getColor();null===c&&(c=l.a.defaultFillStyle),e.fillStyle=r.a.asColorLike(c),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},h.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionImageSize_=[t.size,t.size],this.fill_)this.hitDetectionCanvas_=this.canvas_;else{var e=o.a.createCanvasContext2D(t.size,t.size);this.hitDetectionCanvas_=e.canvas,this.drawHitDetectionCanvas_(t,e,0,0)}},h.prototype.drawHitDetectionCanvas_=function(t,e,i,n){e.setTransform(1,0,0,1,0,0),e.translate(i,n),e.beginPath();var r=this.points_;if(r===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var o,a,s,u=void 0!==this.radius2_?this.radius2_:this.radius_;for(u!==this.radius_&&(r*=2),o=0;o<=r;o++)s=2*o*Math.PI/r-Math.PI/2+this.angle_,a=o%2==0?this.radius_:u,e.lineTo(t.size/2+a*Math.cos(s),t.size/2+a*Math.sin(s))}e.fillStyle=l.a.defaultFillStyle,e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},h.prototype.getChecksum=function(){var t=this.stroke_?this.stroke_.getChecksum():"-",e=this.fill_?this.fill_.getChecksum():"-";if(!this.checksums_||t!=this.checksums_[1]||e!=this.checksums_[2]||this.radius_!=this.checksums_[3]||this.radius2_!=this.checksums_[4]||this.angle_!=this.checksums_[5]||this.points_!=this.checksums_[6]){var i="r"+t+e+(void 0!==this.radius_?this.radius_.toString():"-")+(void 0!==this.radius2_?this.radius2_.toString():"-")+(void 0!==this.angle_?this.angle_.toString():"-")+(void 0!==this.points_?this.points_.toString():"-");this.checksums_=[i,t,e,this.radius_,this.radius2_,this.angle_,this.points_]}return this.checksums_[0]},e.default=h},function(t,e,i){"use strict";e.a={POINT:"point",LINE:"line"}},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i(35),o=i(40),a=i(17),s=i(69),l=i(12),u=i(2),h=i(8),c=i(1),f=i(84),p=i(11),d=i(47),g=function(t){var e=t||{},i=p.a.assign({},e);delete i.layers;var n=e.layers;f.default.call(this,i),this.layersListenerKeys_=[],this.listenerKeys_={},u.a.listen(this,a.a.getChangeEventType(g.Property_.LAYERS),this.handleLayersChanged_,this),n?Array.isArray(n)?n=new r.a(n.slice(),{unique:!0}):(l.a.assert(n instanceof r.a,43),n=n):n=new r.a(void 0,{unique:!0}),this.setLayers(n)};n.a.inherits(g,f.default),g.prototype.handleLayerChange_=function(){this.changed()},g.prototype.handleLayersChanged_=function(t){this.layersListenerKeys_.forEach(u.a.unlistenByKey),this.layersListenerKeys_.length=0;var e=this.getLayers();for(var i in this.layersListenerKeys_.push(u.a.listen(e,o.a.ADD,this.handleLayersAdd_,this),u.a.listen(e,o.a.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[i].forEach(u.a.unlistenByKey);p.a.clear(this.listenerKeys_);var r,a,l,c=e.getArray();for(r=0,a=c.length;r<a;r++)l=c[r],this.listenerKeys_[n.a.getUid(l).toString()]=[u.a.listen(l,s.a.PROPERTYCHANGE,this.handleLayerChange_,this),u.a.listen(l,h.a.CHANGE,this.handleLayerChange_,this)];this.changed()},g.prototype.handleLayersAdd_=function(t){var e=t.element,i=n.a.getUid(e).toString();this.listenerKeys_[i]=[u.a.listen(e,s.a.PROPERTYCHANGE,this.handleLayerChange_,this),u.a.listen(e,h.a.CHANGE,this.handleLayerChange_,this)],this.changed()},g.prototype.handleLayersRemove_=function(t){var e=t.element,i=n.a.getUid(e).toString();this.listenerKeys_[i].forEach(u.a.unlistenByKey),delete this.listenerKeys_[i],this.changed()},g.prototype.getLayers=function(){return this.get(g.Property_.LAYERS)},g.prototype.setLayers=function(t){this.set(g.Property_.LAYERS,t)},g.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach(function(t){t.getLayersArray(e)}),e},g.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],i=e.length;this.getLayers().forEach(function(t){t.getLayerStatesArray(e)});var n,r,o,a=this.getLayerState();for(n=i,r=e.length;n<r;n++)(o=e[n]).opacity*=a.opacity,o.visible=o.visible&&a.visible,o.maxResolution=Math.min(o.maxResolution,a.maxResolution),o.minResolution=Math.max(o.minResolution,a.minResolution),void 0!==a.extent&&(void 0!==o.extent?o.extent=c.a.getIntersection(o.extent,a.extent):o.extent=a.extent);return e},g.prototype.getSourceState=function(){return d.a.READY},g.Property_={LAYERS:"layers"},e.default=g},function(t,e,i){"use strict";var n=i(0),r=i(1),o=i(9),a=i(16),s=function(t,e,i,o,s){this.sourceProj_=t,this.targetProj_=e;var l={},u=a.default.getTransform(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return l[e]||(l[e]=u(t)),l[e]},this.maxSourceExtent_=o,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!o&&!!this.sourceProj_.getExtent()&&r.a.getWidth(o)==r.a.getWidth(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?r.a.getWidth(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?r.a.getWidth(this.targetProj_.getExtent()):null;var h=r.a.getTopLeft(i),c=r.a.getTopRight(i),f=r.a.getBottomRight(i),p=r.a.getBottomLeft(i),d=this.transformInv_(h),g=this.transformInv_(c),_=this.transformInv_(f),v=this.transformInv_(p);if(this.addQuad_(h,c,f,p,d,g,_,v,n.a.RASTER_REPROJECTION_MAX_SUBDIVISION),this.wrapsXInSource_){var y=1/0;this.triangles_.forEach(function(t,e,i){y=Math.min(y,t.source[0][0],t.source[1][0],t.source[2][0])}),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-y>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-y>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-y>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-y>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var i=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-i<this.sourceWorldWidth_/2&&(t.source=e)}},this)}l={}};s.prototype.addTriangle_=function(t,e,i,n,r,o){this.triangles_.push({source:[n,r,o],target:[t,e,i]})},s.prototype.addQuad_=function(t,e,i,a,s,l,u,h,c){var f=r.a.boundingExtent([s,l,u,h]),p=this.sourceWorldWidth_?r.a.getWidth(f)/this.sourceWorldWidth_:null,d=this.sourceWorldWidth_,g=this.sourceProj_.canWrapX()&&p>.5&&p<1,_=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var v=r.a.boundingExtent([t,e,i,a]);_|=r.a.getWidth(v)/this.targetWorldWidth_>n.a.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH}!g&&this.sourceProj_.isGlobal()&&p&&(_|=p>n.a.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH)}if(_||!this.maxSourceExtent_||r.a.intersects(f,this.maxSourceExtent_)){if(!(_||isFinite(s[0])&&isFinite(s[1])&&isFinite(l[0])&&isFinite(l[1])&&isFinite(u[0])&&isFinite(u[1])&&isFinite(h[0])&&isFinite(h[1]))){if(!(c>0))return;_=!0}if(c>0){if(!_){var y,m=[(t[0]+i[0])/2,(t[1]+i[1])/2],x=this.transformInv_(m);y=g?(o.a.modulo(s[0],d)+o.a.modulo(u[0],d))/2-o.a.modulo(x[0],d):(s[0]+u[0])/2-x[0];var E=(s[1]+u[1])/2-x[1];_=y*y+E*E>this.errorThresholdSquared_}if(_){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var S=[(e[0]+i[0])/2,(e[1]+i[1])/2],T=this.transformInv_(S),C=[(a[0]+t[0])/2,(a[1]+t[1])/2],R=this.transformInv_(C);this.addQuad_(t,e,S,C,s,l,T,R,c-1),this.addQuad_(C,S,i,a,R,T,u,h,c-1)}else{var I=[(t[0]+e[0])/2,(t[1]+e[1])/2],b=this.transformInv_(I),w=[(i[0]+a[0])/2,(i[1]+a[1])/2],L=this.transformInv_(w);this.addQuad_(t,I,w,a,s,b,L,h,c-1),this.addQuad_(I,e,i,w,b,l,u,L,c-1)}return}}if(g){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}this.addTriangle_(t,i,a,s,u,h),this.addTriangle_(t,e,i,s,l,u)}},s.prototype.calculateSourceExtent=function(){var t=r.a.createEmpty();return this.triangles_.forEach(function(e,i,n){var o=e.source;r.a.extendCoordinate(t,o[0]),r.a.extendCoordinate(t,o[1]),r.a.extendCoordinate(t,o[2])}),t},s.prototype.getTriangles=function(){return this.triangles_},e.a=s},function(t,e,i){"use strict";var n={appendParams:function(t,e){var i=[];Object.keys(e).forEach(function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))});var n=i.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+n}};e.a=n},function(t,e,i){"use strict";var n=i(31),r=function(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32};r.getKey=function(t,e,i){return e+":"+t+":"+(i?n.a.asString(i):"null")},r.prototype.clear=function(){this.cache_={},this.cacheSize_=0},r.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var t,e,i=0;for(t in this.cache_)e=this.cache_[t],0!=(3&i++)||e.hasListener()||(delete this.cache_[t],--this.cacheSize_)}},r.prototype.get=function(t,e,i){var n=r.getKey(t,e,i);return n in this.cache_?this.cache_[n]:null},r.prototype.set=function(t,e,i,n){var o=r.getKey(t,e,i);this.cache_[o]=n,++this.cacheSize_},r.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()};var o=r,a={};a.iconImageCache=new o,e.a=a},function(t,e,i){var n=i(21),r=i(20).document,o=n(r)&&n(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,i){var n=i(37),r=i(20),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:i(72)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,i){e.f=i(24)},function(t,e,i){var n=i(131)("keys"),r=i(71);t.exports=function(t){return n[t]||(n[t]=r(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,i){var n=i(61);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,i){var n=i(20).document;t.exports=n&&n.documentElement},function(t,e,i){var n=i(21),r=i(23),o=function(t,e){if(r(t),!n(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,n){try{(n=i(59)(Function.call,i(50).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,i){return o(t,i),e?t.__proto__=i:n(t,i),t}}({},!1):void 0),check:o}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,i){var n=i(21),r=i(137).set;t.exports=function(t,e,i){var o,a=e.constructor;return a!==i&&"function"==typeof a&&(o=a.prototype)!==i.prototype&&n(o)&&r&&r(t,o),t}},function(t,e,i){"use strict";var n=i(63),r=i(62);t.exports=function(t){var e=String(r(this)),i="",o=n(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(i+=e);return i}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var i=Math.expm1;t.exports=!i||i(10)>22025.465794806718||i(10)<22025.465794806718||-2e-17!=i(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:i},function(t,e,i){"use strict";var n=i(72),r=i(5),o=i(41),a=i(44),s=i(88),l=i(183),u=i(87),h=i(77),c=i(24)("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,i,d,g,_,v){l(i,e,d);var y,m,x,E=function(t){if(!f&&t in R)return R[t];switch(t){case"keys":case"values":return function(){return new i(this,t)}}return function(){return new i(this,t)}},S=e+" Iterator",T="values"==g,C=!1,R=t.prototype,I=R[c]||R["@@iterator"]||g&&R[g],b=I||E(g),w=g?T?E("entries"):b:void 0,L="Array"==e&&R.entries||I;if(L&&(x=h(L.call(new t)))!==Object.prototype&&x.next&&(u(x,S,!0),n||"function"==typeof x[c]||a(x,c,p)),T&&I&&"values"!==I.name&&(C=!0,b=function(){return I.call(this)}),n&&!v||!f&&!C&&R[c]||a(R,c,b),s[e]=b,s[S]=p,g)if(y={values:T?b:E("values"),keys:_?b:E("keys"),entries:w},v)for(m in y)m in R||o(R,m,y[m]);else r(r.P+r.F*(f||C),e,y);return y}},function(t,e,i){var n=i(145),r=i(62);t.exports=function(t,e,i){if(n(e))throw TypeError("String#"+i+" doesn't accept regex!");return String(r(t))}},function(t,e,i){var n=i(21),r=i(61),o=i(24)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==r(t))}},function(t,e,i){var n=i(24)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(i){try{return e[n]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,i){var n=i(88),r=i(24)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(n.Array===t||o[r]===t)}},function(t,e,i){"use strict";var n=i(30),r=i(70);t.exports=function(t,e,i){e in t?n.f(t,e,r(0,i)):t[e]=i}},function(t,e,i){var n=i(104),r=i(24)("iterator"),o=i(88);t.exports=i(37).getIteratorMethod=function(t){if(null!=t)return t[r]||t["@@iterator"]||o[n(t)]}},function(t,e,i){"use strict";var n=i(46),r=i(74),o=i(38);t.exports=function(t){for(var e=n(this),i=o(e.length),a=arguments.length,s=r(a>1?arguments[1]:void 0,i),l=a>2?arguments[2]:void 0,u=void 0===l?i:r(l,i);u>s;)e[s++]=t;return e}},function(t,e,i){"use strict";var n=i(89),r=i(187),o=i(88),a=i(45);t.exports=i(143)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,i=this._i++;return!t||i>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?i:"values"==e?t[i]:[i,t[i]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(t,e,i){"use strict";var n=i(23);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,i){var n,r,o,a=i(59),s=i(176),l=i(136),u=i(130),h=i(20),c=h.process,f=h.setImmediate,p=h.clearImmediate,d=h.MessageChannel,g=h.Dispatch,_=0,v={},y=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},m=function(t){y.call(t.data)};f&&p||(f=function(t){for(var e=[],i=1;arguments.length>i;)e.push(arguments[i++]);return v[++_]=function(){s("function"==typeof t?t:Function(t),e)},n(_),_},p=function(t){delete v[t]},"process"==i(61)(c)?n=function(t){c.nextTick(a(y,t,1))}:g&&g.now?n=function(t){g.now(a(y,t,1))}:d?(o=(r=new d).port2,r.port1.onmessage=m,n=a(o.postMessage,o,1)):h.addEventListener&&"function"==typeof postMessage&&!h.importScripts?(n=function(t){h.postMessage(t+"","*")},h.addEventListener("message",m,!1)):n="onreadystatechange"in u("script")?function(t){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:f,clear:p}},function(t,e,i){"use strict";var n=i(20),r=i(36),o=i(72),a=i(112),s=i(44),l=i(92),u=i(19),h=i(91),c=i(63),f=i(38),p=i(194),d=i(76).f,g=i(30).f,_=i(150),v=i(87),y="prototype",m="Wrong index!",x=n.ArrayBuffer,E=n.DataView,S=n.Math,T=n.RangeError,C=n.Infinity,R=x,I=S.abs,b=S.pow,w=S.floor,L=S.log,O=S.LN2,A=r?"_b":"buffer",P=r?"_l":"byteLength",F=r?"_o":"byteOffset";function M(t,e,i){var n,r,o,a=new Array(i),s=8*i-e-1,l=(1<<s)-1,u=l>>1,h=23===e?b(2,-24)-b(2,-77):0,c=0,f=t<0||0===t&&1/t<0?1:0;for((t=I(t))!=t||t===C?(r=t!=t?1:0,n=l):(n=w(L(t)/O),t*(o=b(2,-n))<1&&(n--,o*=2),(t+=n+u>=1?h/o:h*b(2,1-u))*o>=2&&(n++,o/=2),n+u>=l?(r=0,n=l):n+u>=1?(r=(t*o-1)*b(2,e),n+=u):(r=t*b(2,u-1)*b(2,e),n=0));e>=8;a[c++]=255&r,r/=256,e-=8);for(n=n<<e|r,s+=e;s>0;a[c++]=255&n,n/=256,s-=8);return a[--c]|=128*f,a}function D(t,e,i){var n,r=8*i-e-1,o=(1<<r)-1,a=o>>1,s=r-7,l=i-1,u=t[l--],h=127&u;for(u>>=7;s>0;h=256*h+t[l],l--,s-=8);for(n=h&(1<<-s)-1,h>>=-s,s+=e;s>0;n=256*n+t[l],l--,s-=8);if(0===h)h=1-a;else{if(h===o)return n?NaN:u?-C:C;n+=b(2,e),h-=a}return(u?-1:1)*n*b(2,h-e)}function k(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function N(t){return[255&t]}function U(t){return[255&t,t>>8&255]}function G(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function j(t){return M(t,52,8)}function B(t){return M(t,23,4)}function W(t,e,i){g(t[y],e,{get:function(){return this[i]}})}function z(t,e,i,n){var r=p(+i);if(r+e>t[P])throw T(m);var o=t[A]._b,a=r+t[F],s=o.slice(a,a+e);return n?s:s.reverse()}function X(t,e,i,n,r,o){var a=p(+i);if(a+e>t[P])throw T(m);for(var s=t[A]._b,l=a+t[F],u=n(+r),h=0;h<e;h++)s[l+h]=u[o?h:e-h-1]}if(a.ABV){if(!u(function(){x(1)})||!u(function(){new x(-1)})||u(function(){return new x,new x(1.5),new x(NaN),"ArrayBuffer"!=x.name})){for(var V,Y=(x=function(t){return h(this,x),new R(p(t))})[y]=R[y],H=d(R),K=0;H.length>K;)(V=H[K++])in x||s(x,V,R[V]);o||(Y.constructor=x)}var q=new E(new x(2)),Z=E[y].setInt8;q.setInt8(0,2147483648),q.setInt8(1,2147483649),!q.getInt8(0)&&q.getInt8(1)||l(E[y],{setInt8:function(t,e){Z.call(this,t,e<<24>>24)},setUint8:function(t,e){Z.call(this,t,e<<24>>24)}},!0)}else x=function(t){h(this,x,"ArrayBuffer");var e=p(t);this._b=_.call(new Array(e),0),this[P]=e},E=function(t,e,i){h(this,E,"DataView"),h(t,x,"DataView");var n=t[P],r=c(e);if(r<0||r>n)throw T("Wrong offset!");if(r+(i=void 0===i?n-r:f(i))>n)throw T("Wrong length!");this[A]=t,this[F]=r,this[P]=i},r&&(W(x,"byteLength","_l"),W(E,"buffer","_b"),W(E,"byteLength","_l"),W(E,"byteOffset","_o")),l(E[y],{getInt8:function(t){return z(this,1,t)[0]<<24>>24},getUint8:function(t){return z(this,1,t)[0]},getInt16:function(t){var e=z(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=z(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return k(z(this,4,t,arguments[1]))},getUint32:function(t){return k(z(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return D(z(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return D(z(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){X(this,1,t,N,e)},setUint8:function(t,e){X(this,1,t,N,e)},setInt16:function(t,e){X(this,2,t,U,e,arguments[2])},setUint16:function(t,e){X(this,2,t,U,e,arguments[2])},setInt32:function(t,e){X(this,4,t,G,e,arguments[2])},setUint32:function(t,e){X(this,4,t,G,e,arguments[2])},setFloat32:function(t,e){X(this,4,t,B,e,arguments[2])},setFloat64:function(t,e){X(this,8,t,j,e,arguments[2])}});v(x,"ArrayBuffer"),v(E,"DataView"),s(E[y],a.VIEW,!0),e.ArrayBuffer=x,e.DataView=E},function(t,e,i){var n=i(113),r=i(412),o=i(413),a=i(414),s=i(415),l=i(416);function u(t){var e=this.__data__=new n(t);this.size=e.size}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=l,t.exports=u},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,i){var n=i(78)(i(53),"Map");t.exports=n},function(t,e,i){var n=i(423),r=i(430),o=i(432),a=i(433),s=i(434);function l(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l},function(t,e,i){(function(t){var n=i(53),r=i(440),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?n.Buffer:void 0,l=(s?s.isBuffer:void 0)||r;t.exports=l}).call(this,i(160)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,i){(function(t){var n=i(199),r=e&&!e.nodeType&&e,o=r&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===r&&n.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,i(160)(t))},function(t,e){var i=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},function(t,e,i){var n=i(450),r=i(210),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),n(a(t),function(e){return o.call(t,e)}))}:r;t.exports=s},function(t,e,i){var n=i(216);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.default=function(t){if(!("string"==typeof t||t instanceof String)){var e=void 0;throw e=null===t?"null":"object"===(e=void 0===t?"undefined":n(t))&&t.constructor&&t.constructor.hasOwnProperty("name")?t.constructor.name:"a "+e,new TypeError("Expected string but received "+e+".")}},t.exports=e.default},function(t,e,i){var n=i(54),r=i(120),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!r(t))||a.test(t)||!o.test(t)||null!=e&&t in Object(e)}},function(t,e,i){t.exports=!i(36)&&!i(19)(function(){return 7!=Object.defineProperty(i(130)("div"),"a",{get:function(){return 7}}).a})},function(t,e,i){var n=i(20),r=i(37),o=i(72),a=i(132),s=i(30).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,i){var n=i(43),r=i(45),o=i(102)(!1),a=i(133)("IE_PROTO");t.exports=function(t,e){var i,s=r(t),l=0,u=[];for(i in s)i!=a&&n(s,i)&&u.push(i);for(;e.length>l;)n(s,i=e[l++])&&(~o(u,i)||u.push(i));return u}},function(t,e,i){var n=i(30),r=i(23),o=i(73);t.exports=i(36)?Object.defineProperties:function(t,e){r(t);for(var i,a=o(e),s=a.length,l=0;s>l;)n.f(t,i=a[l++],e[i]);return t}},function(t,e,i){var n=i(45),r=i(76).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return r(t)}catch(t){return a.slice()}}(t):r(n(t))}},function(t,e,i){"use strict";var n=i(73),r=i(103),o=i(99),a=i(46),s=i(98),l=Object.assign;t.exports=!l||i(19)(function(){var t={},e={},i=Symbol(),n="abcdefghijklmnopqrst";return t[i]=7,n.split("").forEach(function(t){e[t]=t}),7!=l({},t)[i]||Object.keys(l({},e)).join("")!=n})?function(t,e){for(var i=a(t),l=arguments.length,u=1,h=r.f,c=o.f;l>u;)for(var f,p=s(arguments[u++]),d=h?n(p).concat(h(p)):n(p),g=d.length,_=0;g>_;)c.call(p,f=d[_++])&&(i[f]=p[f]);return i}:l},function(t,e,i){"use strict";var n=i(60),r=i(21),o=i(176),a=[].slice,s={};t.exports=Function.bind||function(t){var e=n(this),i=a.call(arguments,1),l=function(){var n=i.concat(a.call(arguments));return this instanceof l?function(t,e,i){if(!(e in s)){for(var n=[],r=0;r<e;r++)n[r]="a["+r+"]";s[e]=Function("F,a","return new F("+n.join(",")+")")}return s[e](t,i)}(e,n.length,n):o(e,n,t)};return r(e.prototype)&&(l.prototype=e.prototype),l}},function(t,e){t.exports=function(t,e,i){var n=void 0===i;switch(e.length){case 0:return n?t():t.call(i);case 1:return n?t(e[0]):t.call(i,e[0]);case 2:return n?t(e[0],e[1]):t.call(i,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(i,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(i,e[0],e[1],e[2],e[3])}return t.apply(i,e)}},function(t,e,i){var n=i(20).parseInt,r=i(105).trim,o=i(138),a=/^[-+]?0[xX]/;t.exports=8!==n(o+"08")||22!==n(o+"0x16")?function(t,e){var i=r(String(t),3);return n(i,e>>>0||(a.test(i)?16:10))}:n},function(t,e,i){var n=i(20).parseFloat,r=i(105).trim;t.exports=1/n(i(138)+"-0")!=-1/0?function(t){var e=r(String(t),3),i=n(e);return 0===i&&"-"==e.charAt(0)?-0:i}:n},function(t,e,i){var n=i(61);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=n(t))throw TypeError(e);return+t}},function(t,e,i){var n=i(21),r=Math.floor;t.exports=function(t){return!n(t)&&isFinite(t)&&r(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,i){var n=i(63),r=i(62);t.exports=function(t){return function(e,i){var o,a,s=String(r(e)),l=n(i),u=s.length;return l<0||l>=u?t?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):o:t?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}}},function(t,e,i){"use strict";var n=i(75),r=i(70),o=i(87),a={};i(44)(a,i(24)("iterator"),function(){return this}),t.exports=function(t,e,i){t.prototype=n(a,{next:r(1,i)}),o(t,e+" Iterator")}},function(t,e,i){var n=i(23);t.exports=function(t,e,i,r){try{return r?e(n(i)[0],i[1]):e(i)}catch(e){var o=t.return;throw void 0!==o&&n(o.call(t)),e}}},function(t,e,i){var n=i(60),r=i(46),o=i(98),a=i(38);t.exports=function(t,e,i,s,l){n(e);var u=r(t),h=o(u),c=a(u.length),f=l?c-1:0,p=l?-1:1;if(i<2)for(;;){if(f in h){s=h[f],f+=p;break}if(f+=p,l?f<0:c<=f)throw TypeError("Reduce of empty array with no initial value")}for(;l?f>=0:c>f;f+=p)f in h&&(s=e(s,h[f],f,u));return s}},function(t,e,i){"use strict";var n=i(46),r=i(74),o=i(38);t.exports=[].copyWithin||function(t,e){var i=n(this),a=o(i.length),s=r(t,a),l=r(e,a),u=arguments.length>2?arguments[2]:void 0,h=Math.min((void 0===u?a:r(u,a))-l,a-s),c=1;for(l<s&&s<l+h&&(c=-1,l+=h-1,s+=h-1);h-- >0;)l in i?i[s]=i[l]:delete i[s],s+=c,l+=c;return i}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,i){i(36)&&"g"!=/./g.flags&&i(30).f(RegExp.prototype,"flags",{configurable:!0,get:i(152)})},function(t,e,i){"use strict";var n,r,o,a,s=i(72),l=i(20),u=i(59),h=i(104),c=i(5),f=i(21),p=i(60),d=i(91),g=i(108),_=i(109),v=i(153).set,y=i(340)(),m=i(190),x=i(341),E=i(110),S=i(191),T=l.TypeError,C=l.process,R=C&&C.versions,I=R&&R.v8||"",b=l.Promise,w="process"==h(C),L=function(){},O=r=m.f,A=!!function(){try{var t=b.resolve(1),e=(t.constructor={})[i(24)("species")]=function(t){t(L,L)};return(w||"function"==typeof PromiseRejectionEvent)&&t.then(L)instanceof e&&0!==I.indexOf("6.6")&&-1===E.indexOf("Chrome/66")}catch(t){}}(),P=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},F=function(t,e){if(!t._n){t._n=!0;var i=t._c;y(function(){for(var n=t._v,r=1==t._s,o=0,a=function(e){var i,o,a,s=r?e.ok:e.fail,l=e.resolve,u=e.reject,h=e.domain;try{s?(r||(2==t._h&&k(t),t._h=1),!0===s?i=n:(h&&h.enter(),i=s(n),h&&(h.exit(),a=!0)),i===e.promise?u(T("Promise-chain cycle")):(o=P(i))?o.call(i,l,u):l(i)):u(n)}catch(t){h&&!a&&h.exit(),u(t)}};i.length>o;)a(i[o++]);t._c=[],t._n=!1,e&&!t._h&&M(t)})}},M=function(t){v.call(l,function(){var e,i,n,r=t._v,o=D(t);if(o&&(e=x(function(){w?C.emit("unhandledRejection",r,t):(i=l.onunhandledrejection)?i({promise:t,reason:r}):(n=l.console)&&n.error&&n.error("Unhandled promise rejection",r)}),t._h=w||D(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},D=function(t){return 1!==t._h&&0===(t._a||t._c).length},k=function(t){v.call(l,function(){var e;w?C.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})})},N=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),F(e,!0))},U=function(t){var e,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===t)throw T("Promise can't be resolved itself");(e=P(t))?y(function(){var n={_w:i,_d:!1};try{e.call(t,u(U,n,1),u(N,n,1))}catch(t){N.call(n,t)}}):(i._v=t,i._s=1,F(i,!1))}catch(t){N.call({_w:i,_d:!1},t)}}};A||(b=function(t){d(this,b,"Promise","_h"),p(t),n.call(this);try{t(u(U,this,1),u(N,this,1))}catch(t){N.call(this,t)}},(n=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=i(92)(b.prototype,{then:function(t,e){var i=O(_(this,b));return i.ok="function"!=typeof t||t,i.fail="function"==typeof e&&e,i.domain=w?C.domain:void 0,this._c.push(i),this._a&&this._a.push(i),this._s&&F(this,!1),i.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n;this.promise=t,this.resolve=u(U,t,1),this.reject=u(N,t,1)},m.f=O=function(t){return t===b||t===a?new o(t):r(t)}),c(c.G+c.W+c.F*!A,{Promise:b}),i(87)(b,"Promise"),i(90)("Promise"),a=i(37).Promise,c(c.S+c.F*!A,"Promise",{reject:function(t){var e=O(this);return(0,e.reject)(t),e.promise}}),c(c.S+c.F*(s||!A),"Promise",{resolve:function(t){return S(s&&this===a?b:this,t)}}),c(c.S+c.F*!(A&&i(106)(function(t){b.all(t).catch(L)})),"Promise",{all:function(t){var e=this,i=O(e),n=i.resolve,r=i.reject,o=x(function(){var i=[],o=0,a=1;g(t,!1,function(t){var s=o++,l=!1;i.push(void 0),a++,e.resolve(t).then(function(t){l||(l=!0,i[s]=t,--a||n(i))},r)}),--a||n(i)});return o.e&&r(o.v),i.promise},race:function(t){var e=this,i=O(e),n=i.reject,r=x(function(){g(t,!1,function(t){e.resolve(t).then(i.resolve,n)})});return r.e&&n(r.v),i.promise}})},function(t,e,i){"use strict";var n=i(60);t.exports.f=function(t){return new function(t){var e,i;this.promise=new t(function(t,n){if(void 0!==e||void 0!==i)throw TypeError("Bad Promise constructor");e=t,i=n}),this.resolve=n(e),this.reject=n(i)}(t)}},function(t,e,i){var n=i(23),r=i(21),o=i(190);t.exports=function(t,e){if(n(t),r(e)&&e.constructor===t)return e;var i=o.f(t);return(0,i.resolve)(e),i.promise}},function(t,e,i){"use strict";var n=i(30).f,r=i(75),o=i(92),a=i(59),s=i(91),l=i(108),u=i(143),h=i(187),c=i(90),f=i(36),p=i(66).fastKey,d=i(93),g=f?"_s":"size",_=function(t,e){var i,n=p(e);if("F"!==n)return t._i[n];for(i=t._f;i;i=i.n)if(i.k==e)return i};t.exports={getConstructor:function(t,e,i,u){var h=t(function(t,n){s(t,h,e,"_i"),t._t=e,t._i=r(null),t._f=void 0,t._l=void 0,t[g]=0,null!=n&&l(n,i,t[u],t)});return o(h.prototype,{clear:function(){for(var t=d(this,e),i=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete i[n.i];t._f=t._l=void 0,t[g]=0},delete:function(t){var i=d(this,e),n=_(i,t);if(n){var r=n.n,o=n.p;delete i._i[n.i],n.r=!0,o&&(o.n=r),r&&(r.p=o),i._f==n&&(i._f=r),i._l==n&&(i._l=o),i[g]--}return!!n},forEach:function(t){d(this,e);for(var i,n=a(t,arguments.length>1?arguments[1]:void 0,3);i=i?i.n:this._f;)for(n(i.v,i.k,this);i&&i.r;)i=i.p},has:function(t){return!!_(d(this,e),t)}}),f&&n(h.prototype,"size",{get:function(){return d(this,e)[g]}}),h},def:function(t,e,i){var n,r,o=_(t,e);return o?o.v=i:(t._l=o={i:r=p(e,!0),k:e,v:i,p:n=t._l,n:void 0,r:!1},t._f||(t._f=o),n&&(n.n=o),t[g]++,"F"!==r&&(t._i[r]=o)),t},getEntry:_,setStrong:function(t,e,i){u(t,e,function(t,i){this._t=d(t,e),this._k=i,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?h(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,h(1))},i?"entries":"values",!i,!0),c(e)}}},function(t,e,i){"use strict";var n=i(92),r=i(66).getWeak,o=i(23),a=i(21),s=i(91),l=i(108),u=i(52),h=i(43),c=i(93),f=u(5),p=u(6),d=0,g=function(t){return t._l||(t._l=new _)},_=function(){this.a=[]},v=function(t,e){return f(t.a,function(t){return t[0]===e})};_.prototype={get:function(t){var e=v(this,t);if(e)return e[1]},has:function(t){return!!v(this,t)},set:function(t,e){var i=v(this,t);i?i[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,i,o){var u=t(function(t,n){s(t,u,e,"_i"),t._t=e,t._i=d++,t._l=void 0,null!=n&&l(n,i,t[o],t)});return n(u.prototype,{delete:function(t){if(!a(t))return!1;var i=r(t);return!0===i?g(c(this,e)).delete(t):i&&h(i,this._i)&&delete i[this._i]},has:function(t){if(!a(t))return!1;var i=r(t);return!0===i?g(c(this,e)).has(t):i&&h(i,this._i)}}),u},def:function(t,e,i){var n=r(o(e),!0);return!0===n?g(t).set(e,i):n[t._i]=i,t},ufstore:g}},function(t,e,i){var n=i(63),r=i(38);t.exports=function(t){if(void 0===t)return 0;var e=n(t),i=r(e);if(e!==i)throw RangeError("Wrong length!");return i}},function(t,e,i){var n=i(76),r=i(103),o=i(23),a=i(20).Reflect;t.exports=a&&a.ownKeys||function(t){var e=n.f(o(t)),i=r.f;return i?e.concat(i(t)):e}},function(t,e,i){var n=i(38),r=i(140),o=i(62);t.exports=function(t,e,i,a){var s=String(o(t)),l=s.length,u=void 0===i?" ":String(i),h=n(e);if(h<=l||""==u)return s;var c=h-l,f=r.call(u,Math.ceil(c/u.length));return f.length>c&&(f=f.slice(0,c)),a?f+s:s+f}},function(t,e,i){var n=i(73),r=i(45),o=i(99).f;t.exports=function(t){return function(e){for(var i,a=r(e),s=n(a),l=s.length,u=0,h=[];l>u;)o.call(a,i=s[u++])&&h.push(t?[i,a[i]]:a[i]);return h}}},function(t,e,i){var n=i(94),r=i(79);t.exports=function(t){if(!r(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,i){(function(e){var i="object"==typeof e&&e&&e.Object===Object&&e;t.exports=i}).call(this,i(101))},function(t,e){var i=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,i){var n=i(202),r=i(156),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,i){var a=t[e];o.call(t,e)&&r(a,i)&&(void 0!==i||e in t)||n(t,e,i)}},function(t,e,i){var n=i(436);t.exports=function(t,e,i){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}},function(t,e,i){var n=i(438),r=i(204),o=i(54),a=i(159),s=i(205),l=i(206),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var i=o(t),h=!i&&r(t),c=!i&&!h&&a(t),f=!i&&!h&&!c&&l(t),p=i||h||c||f,d=p?n(t.length,String):[],g=d.length;for(var _ in t)!e&&!u.call(t,_)||p&&("length"==_||c&&("offset"==_||"parent"==_)||f&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||s(_,g))||d.push(_);return d}},function(t,e,i){var n=i(439),r=i(67),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(t){return r(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=l},function(t,e){var i=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&i.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,i){var n=i(441),r=i(162),o=i(163),a=o&&o.isTypedArray,s=a?r(a):n;t.exports=s},function(t,e){t.exports=function(t,e){return function(i){return t(e(i))}}},function(t,e,i){var n=i(198),r=i(161);t.exports=function(t){return null!=t&&r(t.length)&&!n(t)}},function(t,e,i){var n=i(203),r=i(445),o=i(208);t.exports=function(t){return o(t)?n(t,!0):r(t)}},function(t,e){t.exports=function(){return[]}},function(t,e,i){var n=i(212),r=i(213),o=i(165),a=i(210),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,o(t)),t=r(t);return e}:a;t.exports=s},function(t,e){t.exports=function(t,e){for(var i=-1,n=e.length,r=t.length;++i<n;)t[r+i]=e[i];return t}},function(t,e,i){var n=i(207)(Object.getPrototypeOf,Object);t.exports=n},function(t,e,i){var n=i(215),r=i(165),o=i(118);t.exports=function(t){return n(t,o,r)}},function(t,e,i){var n=i(212),r=i(54);t.exports=function(t,e,i){var o=e(t);return r(t)?o:n(o,i(t))}},function(t,e,i){var n=i(53).Uint8Array;t.exports=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];for(var i in e)void 0===t[i]&&(t[i]=e[i]);return t},t.exports=e.default},function(t,e,i){var n=i(482),r=i(67);t.exports=function t(e,i,o,a,s){return e===i||(null==e||null==i||!r(e)&&!r(i)?e!=e&&i!=i:n(e,i,o,a,t,s))}},function(t,e,i){var n=i(483),r=i(486),o=i(487);t.exports=function(t,e,i,a,s,l){var u=1&i,h=t.length,c=e.length;if(h!=c&&!(u&&c>h))return!1;var f=l.get(t);if(f&&l.get(e))return f==e;var p=-1,d=!0,g=2&i?new n:void 0;for(l.set(t,e),l.set(e,t);++p<h;){var _=t[p],v=e[p];if(a)var y=u?a(v,_,p,e,t,l):a(_,v,p,t,e,l);if(void 0!==y){if(y)continue;d=!1;break}if(g){if(!r(e,function(t,e){if(!o(g,e)&&(_===t||s(_,t,i,a,l)))return g.push(e)})){d=!1;break}}else if(_!==v&&!s(_,v,i,a,l)){d=!1;break}}return l.delete(t),l.delete(e),d}},function(t,e,i){var n=i(79);t.exports=function(t){return t==t&&!n(t)}},function(t,e){t.exports=function(t,e){return function(i){return null!=i&&i[t]===e&&(void 0!==e||t in Object(i))}}},function(t,e,i){var n=i(223);t.exports=function(t,e,i){var r=null==t?void 0:n(t,e);return void 0===r?i:r}},function(t,e,i){var n=i(224),r=i(121);t.exports=function(t,e){for(var i=0,o=(e=n(e,t)).length;null!=t&&i<o;)t=t[r(e[i++])];return i&&i==o?t:void 0}},function(t,e,i){var n=i(54),r=i(168),o=i(494),a=i(497);t.exports=function(t,e){return n(t)?t:r(t,e)?[t]:o(a(t))}},function(t,e,i){i(226),t.exports=i(392)},function(t,e,i){"use strict";(function(t){i(227),i(371),i(373),i(375),i(377),i(379),i(381),i(383),i(385),i(387),i(391),t._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),t._babelPolyfill=!0}).call(this,i(101))},function(t,e,i){i(228),i(230),i(231),i(232),i(233),i(234),i(235),i(236),i(237),i(238),i(239),i(240),i(241),i(242),i(243),i(244),i(246),i(247),i(248),i(249),i(250),i(251),i(252),i(253),i(254),i(255),i(256),i(257),i(258),i(259),i(260),i(261),i(262),i(263),i(264),i(265),i(266),i(267),i(268),i(269),i(270),i(271),i(272),i(274),i(275),i(276),i(277),i(278),i(279),i(280),i(281),i(282),i(283),i(284),i(285),i(286),i(287),i(288),i(289),i(290),i(291),i(292),i(293),i(294),i(295),i(296),i(297),i(298),i(299),i(300),i(301),i(302),i(303),i(304),i(305),i(306),i(307),i(309),i(310),i(312),i(313),i(314),i(315),i(316),i(317),i(318),i(321),i(322),i(323),i(324),i(325),i(326),i(327),i(328),i(329),i(330),i(331),i(332),i(333),i(151),i(334),i(335),i(188),i(336),i(337),i(338),i(339),i(189),i(342),i(343),i(344),i(345),i(346),i(347),i(348),i(349),i(350),i(351),i(352),i(353),i(354),i(355),i(356),i(357),i(358),i(359),i(360),i(361),i(362),i(363),i(364),i(365),i(366),i(367),i(368),i(369),i(370),t.exports=i(37)},function(t,e,i){"use strict";var n=i(20),r=i(43),o=i(36),a=i(5),s=i(41),l=i(66).KEY,u=i(19),h=i(131),c=i(87),f=i(71),p=i(24),d=i(132),g=i(170),_=i(229),v=i(135),y=i(23),m=i(21),x=i(45),E=i(65),S=i(70),T=i(75),C=i(173),R=i(50),I=i(30),b=i(73),w=R.f,L=I.f,O=C.f,A=n.Symbol,P=n.JSON,F=P&&P.stringify,M=p("_hidden"),D=p("toPrimitive"),k={}.propertyIsEnumerable,N=h("symbol-registry"),U=h("symbols"),G=h("op-symbols"),j=Object.prototype,B="function"==typeof A,W=n.QObject,z=!W||!W.prototype||!W.prototype.findChild,X=o&&u(function(){return 7!=T(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a})?function(t,e,i){var n=w(j,e);n&&delete j[e],L(t,e,i),n&&t!==j&&L(j,e,n)}:L,V=function(t){var e=U[t]=T(A.prototype);return e._k=t,e},Y=B&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},H=function(t,e,i){return t===j&&H(G,e,i),y(t),e=E(e,!0),y(i),r(U,e)?(i.enumerable?(r(t,M)&&t[M][e]&&(t[M][e]=!1),i=T(i,{enumerable:S(0,!1)})):(r(t,M)||L(t,M,S(1,{})),t[M][e]=!0),X(t,e,i)):L(t,e,i)},K=function(t,e){y(t);for(var i,n=_(e=x(e)),r=0,o=n.length;o>r;)H(t,i=n[r++],e[i]);return t},q=function(t){var e=k.call(this,t=E(t,!0));return!(this===j&&r(U,t)&&!r(G,t))&&(!(e||!r(this,t)||!r(U,t)||r(this,M)&&this[M][t])||e)},Z=function(t,e){if(t=x(t),e=E(e,!0),t!==j||!r(U,e)||r(G,e)){var i=w(t,e);return!i||!r(U,e)||r(t,M)&&t[M][e]||(i.enumerable=!0),i}},J=function(t){for(var e,i=O(x(t)),n=[],o=0;i.length>o;)r(U,e=i[o++])||e==M||e==l||n.push(e);return n},Q=function(t){for(var e,i=t===j,n=O(i?G:x(t)),o=[],a=0;n.length>a;)!r(U,e=n[a++])||i&&!r(j,e)||o.push(U[e]);return o};B||(s((A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(i){this===j&&e.call(G,i),r(this,M)&&r(this[M],t)&&(this[M][t]=!1),X(this,t,S(1,i))};return o&&z&&X(j,t,{configurable:!0,set:e}),V(t)}).prototype,"toString",function(){return this._k}),R.f=Z,I.f=H,i(76).f=C.f=J,i(99).f=q,i(103).f=Q,o&&!i(72)&&s(j,"propertyIsEnumerable",q,!0),d.f=function(t){return V(p(t))}),a(a.G+a.W+a.F*!B,{Symbol:A});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;$.length>tt;)p($[tt++]);for(var et=b(p.store),it=0;et.length>it;)g(et[it++]);a(a.S+a.F*!B,"Symbol",{for:function(t){return r(N,t+="")?N[t]:N[t]=A(t)},keyFor:function(t){if(!Y(t))throw TypeError(t+" is not a symbol!");for(var e in N)if(N[e]===t)return e},useSetter:function(){z=!0},useSimple:function(){z=!1}}),a(a.S+a.F*!B,"Object",{create:function(t,e){return void 0===e?T(t):K(T(t),e)},defineProperty:H,defineProperties:K,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:Q}),P&&a(a.S+a.F*(!B||u(function(){var t=A();return"[null]"!=F([t])||"{}"!=F({a:t})||"{}"!=F(Object(t))})),"JSON",{stringify:function(t){for(var e,i,n=[t],r=1;arguments.length>r;)n.push(arguments[r++]);if(i=e=n[1],(m(e)||void 0!==t)&&!Y(t))return v(e)||(e=function(t,e){if("function"==typeof i&&(e=i.call(this,t,e)),!Y(e))return e}),n[1]=e,F.apply(P,n)}}),A.prototype[D]||i(44)(A.prototype,D,A.prototype.valueOf),c(A,"Symbol"),c(Math,"Math",!0),c(n.JSON,"JSON",!0)},function(t,e,i){var n=i(73),r=i(103),o=i(99);t.exports=function(t){var e=n(t),i=r.f;if(i)for(var a,s=i(t),l=o.f,u=0;s.length>u;)l.call(t,a=s[u++])&&e.push(a);return e}},function(t,e,i){var n=i(5);n(n.S,"Object",{create:i(75)})},function(t,e,i){var n=i(5);n(n.S+n.F*!i(36),"Object",{defineProperty:i(30).f})},function(t,e,i){var n=i(5);n(n.S+n.F*!i(36),"Object",{defineProperties:i(172)})},function(t,e,i){var n=i(45),r=i(50).f;i(51)("getOwnPropertyDescriptor",function(){return function(t,e){return r(n(t),e)}})},function(t,e,i){var n=i(46),r=i(77);i(51)("getPrototypeOf",function(){return function(t){return r(n(t))}})},function(t,e,i){var n=i(46),r=i(73);i(51)("keys",function(){return function(t){return r(n(t))}})},function(t,e,i){i(51)("getOwnPropertyNames",function(){return i(173).f})},function(t,e,i){var n=i(21),r=i(66).onFreeze;i(51)("freeze",function(t){return function(e){return t&&n(e)?t(r(e)):e}})},function(t,e,i){var n=i(21),r=i(66).onFreeze;i(51)("seal",function(t){return function(e){return t&&n(e)?t(r(e)):e}})},function(t,e,i){var n=i(21),r=i(66).onFreeze;i(51)("preventExtensions",function(t){return function(e){return t&&n(e)?t(r(e)):e}})},function(t,e,i){var n=i(21);i(51)("isFrozen",function(t){return function(e){return!n(e)||!!t&&t(e)}})},function(t,e,i){var n=i(21);i(51)("isSealed",function(t){return function(e){return!n(e)||!!t&&t(e)}})},function(t,e,i){var n=i(21);i(51)("isExtensible",function(t){return function(e){return!!n(e)&&(!t||t(e))}})},function(t,e,i){var n=i(5);n(n.S+n.F,"Object",{assign:i(174)})},function(t,e,i){var n=i(5);n(n.S,"Object",{is:i(245)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,i){var n=i(5);n(n.S,"Object",{setPrototypeOf:i(137).set})},function(t,e,i){"use strict";var n=i(104),r={};r[i(24)("toStringTag")]="z",r+""!="[object z]"&&i(41)(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)},function(t,e,i){var n=i(5);n(n.P,"Function",{bind:i(175)})},function(t,e,i){var n=i(30).f,r=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in r||i(36)&&n(r,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e,i){"use strict";var n=i(21),r=i(77),o=i(24)("hasInstance"),a=Function.prototype;o in a||i(30).f(a,o,{value:function(t){if("function"!=typeof this||!n(t))return!1;if(!n(this.prototype))return t instanceof this;for(;t=r(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,i){var n=i(5),r=i(177);n(n.G+n.F*(parseInt!=r),{parseInt:r})},function(t,e,i){var n=i(5),r=i(178);n(n.G+n.F*(parseFloat!=r),{parseFloat:r})},function(t,e,i){"use strict";var n=i(20),r=i(43),o=i(61),a=i(139),s=i(65),l=i(19),u=i(76).f,h=i(50).f,c=i(30).f,f=i(105).trim,p=n.Number,d=p,g=p.prototype,_="Number"==o(i(75)(g)),v="trim"in String.prototype,y=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var i,n,r,o=(e=v?e.trim():f(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(i=e.charCodeAt(2))||120===i)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+e}for(var a,l=e.slice(2),u=0,h=l.length;u<h;u++)if((a=l.charCodeAt(u))<48||a>r)return NaN;return parseInt(l,n)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,i=this;return i instanceof p&&(_?l(function(){g.valueOf.call(i)}):"Number"!=o(i))?a(new d(y(e)),i,p):y(e)};for(var m,x=i(36)?u(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;x.length>E;E++)r(d,m=x[E])&&!r(p,m)&&c(p,m,h(d,m));p.prototype=g,g.constructor=p,i(41)(n,"Number",p)}},function(t,e,i){"use strict";var n=i(5),r=i(63),o=i(179),a=i(140),s=1..toFixed,l=Math.floor,u=[0,0,0,0,0,0],h="Number.toFixed: incorrect invocation!",c=function(t,e){for(var i=-1,n=e;++i<6;)n+=t*u[i],u[i]=n%1e7,n=l(n/1e7)},f=function(t){for(var e=6,i=0;--e>=0;)i+=u[e],u[e]=l(i/t),i=i%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==u[t]){var i=String(u[t]);e=""===e?i:e+a.call("0",7-i.length)+i}return e},d=function(t,e,i){return 0===e?i:e%2==1?d(t,e-1,i*t):d(t*t,e/2,i)};n(n.P+n.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!i(19)(function(){s.call({})})),"Number",{toFixed:function(t){var e,i,n,s,l=o(this,h),u=r(t),g="",_="0";if(u<0||u>20)throw RangeError(h);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(g="-",l=-l),l>1e-21)if(i=(e=function(t){for(var e=0,i=l*d(2,69,1);i>=4096;)e+=12,i/=4096;for(;i>=2;)e+=1,i/=2;return e}()-69)<0?l*d(2,-e,1):l/d(2,e,1),i*=4503599627370496,(e=52-e)>0){for(c(0,i),n=u;n>=7;)c(1e7,0),n-=7;for(c(d(10,n,1),0),n=e-1;n>=23;)f(1<<23),n-=23;f(1<<n),c(1,1),f(2),_=p()}else c(0,i),c(1<<-e,0),_=p()+a.call("0",u);return u>0?g+((s=_.length)<=u?"0."+a.call("0",u-s)+_:_.slice(0,s-u)+"."+_.slice(s-u)):g+_}})},function(t,e,i){"use strict";var n=i(5),r=i(19),o=i(179),a=1..toPrecision;n(n.P+n.F*(r(function(){return"1"!==a.call(1,void 0)})||!r(function(){a.call({})})),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,i){var n=i(5);n(n.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,i){var n=i(5),r=i(20).isFinite;n(n.S,"Number",{isFinite:function(t){return"number"==typeof t&&r(t)}})},function(t,e,i){var n=i(5);n(n.S,"Number",{isInteger:i(180)})},function(t,e,i){var n=i(5);n(n.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,i){var n=i(5),r=i(180),o=Math.abs;n(n.S,"Number",{isSafeInteger:function(t){return r(t)&&o(t)<=9007199254740991}})},function(t,e,i){var n=i(5);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,i){var n=i(5);n(n.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,i){var n=i(5),r=i(178);n(n.S+n.F*(Number.parseFloat!=r),"Number",{parseFloat:r})},function(t,e,i){var n=i(5),r=i(177);n(n.S+n.F*(Number.parseInt!=r),"Number",{parseInt:r})},function(t,e,i){var n=i(5),r=i(181),o=Math.sqrt,a=Math.acosh;n(n.S+n.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:r(t-1+o(t-1)*o(t+1))}})},function(t,e,i){var n=i(5),r=Math.asinh;n(n.S+n.F*!(r&&1/r(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,i){var n=i(5),r=Math.atanh;n(n.S+n.F*!(r&&1/r(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,i){var n=i(5),r=i(141);n(n.S,"Math",{cbrt:function(t){return r(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,i){var n=i(5);n(n.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,i){var n=i(5),r=Math.exp;n(n.S,"Math",{cosh:function(t){return(r(t=+t)+r(-t))/2}})},function(t,e,i){var n=i(5),r=i(142);n(n.S+n.F*(r!=Math.expm1),"Math",{expm1:r})},function(t,e,i){var n=i(5);n(n.S,"Math",{fround:i(273)})},function(t,e,i){var n=i(141),r=Math.pow,o=r(2,-52),a=r(2,-23),s=r(2,127)*(2-a),l=r(2,-126);t.exports=Math.fround||function(t){var e,i,r=Math.abs(t),u=n(t);return r<l?u*(r/l/a+1/o-1/o)*l*a:(i=(e=(1+a/o)*r)-(e-r))>s||i!=i?u*(1/0):u*i}},function(t,e,i){var n=i(5),r=Math.abs;n(n.S,"Math",{hypot:function(t,e){for(var i,n,o=0,a=0,s=arguments.length,l=0;a<s;)l<(i=r(arguments[a++]))?(o=o*(n=l/i)*n+1,l=i):o+=i>0?(n=i/l)*n:i;return l===1/0?1/0:l*Math.sqrt(o)}})},function(t,e,i){var n=i(5),r=Math.imul;n(n.S+n.F*i(19)(function(){return-5!=r(4294967295,5)||2!=r.length}),"Math",{imul:function(t,e){var i=+t,n=+e,r=65535&i,o=65535&n;return 0|r*o+((65535&i>>>16)*o+r*(65535&n>>>16)<<16>>>0)}})},function(t,e,i){var n=i(5);n(n.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,i){var n=i(5);n(n.S,"Math",{log1p:i(181)})},function(t,e,i){var n=i(5);n(n.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,i){var n=i(5);n(n.S,"Math",{sign:i(141)})},function(t,e,i){var n=i(5),r=i(142),o=Math.exp;n(n.S+n.F*i(19)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(r(t)-r(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,i){var n=i(5),r=i(142),o=Math.exp;n(n.S,"Math",{tanh:function(t){var e=r(t=+t),i=r(-t);return e==1/0?1:i==1/0?-1:(e-i)/(o(t)+o(-t))}})},function(t,e,i){var n=i(5);n(n.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,i){var n=i(5),r=i(74),o=String.fromCharCode,a=String.fromCodePoint;n(n.S+n.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,i=[],n=arguments.length,a=0;n>a;){if(e=+arguments[a++],r(e,1114111)!==e)throw RangeError(e+" is not a valid code point");i.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return i.join("")}})},function(t,e,i){var n=i(5),r=i(45),o=i(38);n(n.S,"String",{raw:function(t){for(var e=r(t.raw),i=o(e.length),n=arguments.length,a=[],s=0;i>s;)a.push(String(e[s++])),s<n&&a.push(String(arguments[s]));return a.join("")}})},function(t,e,i){"use strict";i(105)("trim",function(t){return function(){return t(this,3)}})},function(t,e,i){"use strict";var n=i(182)(!0);i(143)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,i=this._i;return i>=e.length?{value:void 0,done:!0}:(t=n(e,i),this._i+=t.length,{value:t,done:!1})})},function(t,e,i){"use strict";var n=i(5),r=i(182)(!1);n(n.P,"String",{codePointAt:function(t){return r(this,t)}})},function(t,e,i){"use strict";var n=i(5),r=i(38),o=i(144),a="".endsWith;n(n.P+n.F*i(146)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),i=arguments.length>1?arguments[1]:void 0,n=r(e.length),s=void 0===i?n:Math.min(r(i),n),l=String(t);return a?a.call(e,l,s):e.slice(s-l.length,s)===l}})},function(t,e,i){"use strict";var n=i(5),r=i(144);n(n.P+n.F*i(146)("includes"),"String",{includes:function(t){return!!~r(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,i){var n=i(5);n(n.P,"String",{repeat:i(140)})},function(t,e,i){"use strict";var n=i(5),r=i(38),o=i(144),a="".startsWith;n(n.P+n.F*i(146)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),i=r(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),n=String(t);return a?a.call(e,n,i):e.slice(i,i+n.length)===n}})},function(t,e,i){"use strict";i(42)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,i){"use strict";i(42)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,i){"use strict";i(42)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,i){"use strict";i(42)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,i){"use strict";i(42)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,i){"use strict";i(42)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,i){"use strict";i(42)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,i){"use strict";i(42)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,i){"use strict";i(42)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,i){"use strict";i(42)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,i){"use strict";i(42)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,i){"use strict";i(42)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,i){"use strict";i(42)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,i){var n=i(5);n(n.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,i){"use strict";var n=i(5),r=i(46),o=i(65);n(n.P+n.F*i(19)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=r(this),i=o(e);return"number"!=typeof i||isFinite(i)?e.toISOString():null}})},function(t,e,i){var n=i(5),r=i(308);n(n.P+n.F*(Date.prototype.toISOString!==r),"Date",{toISOString:r})},function(t,e,i){"use strict";var n=i(19),r=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=n(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!n(function(){o.call(new Date(NaN))})?function(){if(!isFinite(r.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),i=t.getUTCMilliseconds(),n=e<0?"-":e>9999?"+":"";return n+("00000"+Math.abs(e)).slice(n?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(i>99?i:"0"+a(i))+"Z"}:o},function(t,e,i){var n=Date.prototype,r=n.toString,o=n.getTime;new Date(NaN)+""!="Invalid Date"&&i(41)(n,"toString",function(){var t=o.call(this);return t==t?r.call(this):"Invalid Date"})},function(t,e,i){var n=i(24)("toPrimitive"),r=Date.prototype;n in r||i(44)(r,n,i(311))},function(t,e,i){"use strict";var n=i(23),r=i(65);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return r(n(this),"number"!=t)}},function(t,e,i){var n=i(5);n(n.S,"Array",{isArray:i(135)})},function(t,e,i){"use strict";var n=i(59),r=i(5),o=i(46),a=i(184),s=i(147),l=i(38),u=i(148),h=i(149);r(r.S+r.F*!i(106)(function(t){Array.from(t)}),"Array",{from:function(t){var e,i,r,c,f=o(t),p="function"==typeof this?this:Array,d=arguments.length,g=d>1?arguments[1]:void 0,_=void 0!==g,v=0,y=h(f);if(_&&(g=n(g,d>2?arguments[2]:void 0,2)),null==y||p==Array&&s(y))for(i=new p(e=l(f.length));e>v;v++)u(i,v,_?g(f[v],v):f[v]);else for(c=y.call(f),i=new p;!(r=c.next()).done;v++)u(i,v,_?a(c,g,[r.value,v],!0):r.value);return i.length=v,i}})},function(t,e,i){"use strict";var n=i(5),r=i(148);n(n.S+n.F*i(19)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,i=new("function"==typeof this?this:Array)(e);e>t;)r(i,t,arguments[t++]);return i.length=e,i}})},function(t,e,i){"use strict";var n=i(5),r=i(45),o=[].join;n(n.P+n.F*(i(98)!=Object||!i(48)(o)),"Array",{join:function(t){return o.call(r(this),void 0===t?",":t)}})},function(t,e,i){"use strict";var n=i(5),r=i(136),o=i(61),a=i(74),s=i(38),l=[].slice;n(n.P+n.F*i(19)(function(){r&&l.call(r)}),"Array",{slice:function(t,e){var i=s(this.length),n=o(this);if(e=void 0===e?i:e,"Array"==n)return l.call(this,t,e);for(var r=a(t,i),u=a(e,i),h=s(u-r),c=new Array(h),f=0;f<h;f++)c[f]="String"==n?this.charAt(r+f):this[r+f];return c}})},function(t,e,i){"use strict";var n=i(5),r=i(60),o=i(46),a=i(19),s=[].sort,l=[1,2,3];n(n.P+n.F*(a(function(){l.sort(void 0)})||!a(function(){l.sort(null)})||!i(48)(s)),"Array",{sort:function(t){return void 0===t?s.call(o(this)):s.call(o(this),r(t))}})},function(t,e,i){"use strict";var n=i(5),r=i(52)(0),o=i(48)([].forEach,!0);n(n.P+n.F*!o,"Array",{forEach:function(t){return r(this,t,arguments[1])}})},function(t,e,i){var n=i(320);t.exports=function(t,e){return new(n(t))(e)}},function(t,e,i){var n=i(21),r=i(135),o=i(24)("species");t.exports=function(t){var e;return r(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!r(e.prototype)||(e=void 0),n(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,i){"use strict";var n=i(5),r=i(52)(1);n(n.P+n.F*!i(48)([].map,!0),"Array",{map:function(t){return r(this,t,arguments[1])}})},function(t,e,i){"use strict";var n=i(5),r=i(52)(2);n(n.P+n.F*!i(48)([].filter,!0),"Array",{filter:function(t){return r(this,t,arguments[1])}})},function(t,e,i){"use strict";var n=i(5),r=i(52)(3);n(n.P+n.F*!i(48)([].some,!0),"Array",{some:function(t){return r(this,t,arguments[1])}})},function(t,e,i){"use strict";var n=i(5),r=i(52)(4);n(n.P+n.F*!i(48)([].every,!0),"Array",{every:function(t){return r(this,t,arguments[1])}})},function(t,e,i){"use strict";var n=i(5),r=i(185);n(n.P+n.F*!i(48)([].reduce,!0),"Array",{reduce:function(t){return r(this,t,arguments.length,arguments[1],!1)}})},function(t,e,i){"use strict";var n=i(5),r=i(185);n(n.P+n.F*!i(48)([].reduceRight,!0),"Array",{reduceRight:function(t){return r(this,t,arguments.length,arguments[1],!0)}})},function(t,e,i){"use strict";var n=i(5),r=i(102)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;n(n.P+n.F*(a||!i(48)(o)),"Array",{indexOf:function(t){return a?o.apply(this,arguments)||0:r(this,t,arguments[1])}})},function(t,e,i){"use strict";var n=i(5),r=i(45),o=i(63),a=i(38),s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0;n(n.P+n.F*(l||!i(48)(s)),"Array",{lastIndexOf:function(t){if(l)return s.apply(this,arguments)||0;var e=r(this),i=a(e.length),n=i-1;for(arguments.length>1&&(n=Math.min(n,o(arguments[1]))),n<0&&(n=i+n);n>=0;n--)if(n in e&&e[n]===t)return n||0;return-1}})},function(t,e,i){var n=i(5);n(n.P,"Array",{copyWithin:i(186)}),i(89)("copyWithin")},function(t,e,i){var n=i(5);n(n.P,"Array",{fill:i(150)}),i(89)("fill")},function(t,e,i){"use strict";var n=i(5),r=i(52)(5),o=!0;"find"in[]&&Array(1).find(function(){o=!1}),n(n.P+n.F*o,"Array",{find:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),i(89)("find")},function(t,e,i){"use strict";var n=i(5),r=i(52)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),n(n.P+n.F*a,"Array",{findIndex:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),i(89)(o)},function(t,e,i){i(90)("Array")},function(t,e,i){var n=i(20),r=i(139),o=i(30).f,a=i(76).f,s=i(145),l=i(152),u=n.RegExp,h=u,c=u.prototype,f=/a/g,p=/a/g,d=new u(f)!==f;if(i(36)&&(!d||i(19)(function(){return p[i(24)("match")]=!1,u(f)!=f||u(p)==p||"/a/i"!=u(f,"i")}))){u=function(t,e){var i=this instanceof u,n=s(t),o=void 0===e;return!i&&n&&t.constructor===u&&o?t:r(d?new h(n&&!o?t.source:t,e):h((n=t instanceof u)?t.source:t,n&&o?l.call(t):e),i?this:c,u)};for(var g=function(t){t in u||o(u,t,{configurable:!0,get:function(){return h[t]},set:function(e){h[t]=e}})},_=a(h),v=0;_.length>v;)g(_[v++]);c.constructor=u,u.prototype=c,i(41)(n,"RegExp",u)}i(90)("RegExp")},function(t,e,i){"use strict";i(188);var n=i(23),r=i(152),o=i(36),a=/./.toString,s=function(t){i(41)(RegExp.prototype,"toString",t,!0)};i(19)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?s(function(){var t=n(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?r.call(t):void 0)}):"toString"!=a.name&&s(function(){return a.call(this)})},function(t,e,i){i(107)("match",1,function(t,e,i){return[function(i){"use strict";var n=t(this),r=null==i?void 0:i[e];return void 0!==r?r.call(i,n):new RegExp(i)[e](String(n))},i]})},function(t,e,i){i(107)("replace",2,function(t,e,i){return[function(n,r){"use strict";var o=t(this),a=null==n?void 0:n[e];return void 0!==a?a.call(n,o,r):i.call(String(o),n,r)},i]})},function(t,e,i){i(107)("search",1,function(t,e,i){return[function(i){"use strict";var n=t(this),r=null==i?void 0:i[e];return void 0!==r?r.call(i,n):new RegExp(i)[e](String(n))},i]})},function(t,e,i){i(107)("split",2,function(t,e,n){"use strict";var r=i(145),o=n,a=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var s=void 0===/()??/.exec("")[1];n=function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return o.call(i,t,e);var n,l,u,h,c,f=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,g=void 0===e?4294967295:e>>>0,_=new RegExp(t.source,p+"g");for(s||(n=new RegExp("^"+_.source+"$(?!\\s)",p));(l=_.exec(i))&&!((u=l.index+l[0].length)>d&&(f.push(i.slice(d,l.index)),!s&&l.length>1&&l[0].replace(n,function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(l[c]=void 0)}),l.length>1&&l.index<i.length&&a.apply(f,l.slice(1)),h=l[0].length,d=u,f.length>=g));)_.lastIndex===l.index&&_.lastIndex++;return d===i.length?!h&&_.test("")||f.push(""):f.push(i.slice(d)),f.length>g?f.slice(0,g):f}}else"0".split(void 0,0).length&&(n=function(t,e){return void 0===t&&0===e?[]:o.call(this,t,e)});return[function(i,r){var o=t(this),a=null==i?void 0:i[e];return void 0!==a?a.call(i,o,r):n.call(String(o),i,r)},n]})},function(t,e,i){var n=i(20),r=i(153).set,o=n.MutationObserver||n.WebKitMutationObserver,a=n.process,s=n.Promise,l="process"==i(61)(a);t.exports=function(){var t,e,i,u=function(){var n,r;for(l&&(n=a.domain)&&n.exit();t;){r=t.fn,t=t.next;try{r()}catch(n){throw t?i():e=void 0,n}}e=void 0,n&&n.enter()};if(l)i=function(){a.nextTick(u)};else if(!o||n.navigator&&n.navigator.standalone)if(s&&s.resolve){var h=s.resolve(void 0);i=function(){h.then(u)}}else i=function(){r.call(n,u)};else{var c=!0,f=document.createTextNode("");new o(u).observe(f,{characterData:!0}),i=function(){f.data=c=!c}}return function(n){var r={fn:n,next:void 0};e&&(e.next=r),t||(t=r,i()),e=r}}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,i){"use strict";var n=i(192),r=i(93);t.exports=i(111)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=n.getEntry(r(this,"Map"),t);return e&&e.v},set:function(t,e){return n.def(r(this,"Map"),0===t?0:t,e)}},n,!0)},function(t,e,i){"use strict";var n=i(192),r=i(93);t.exports=i(111)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return n.def(r(this,"Set"),t=0===t?0:t,t)}},n)},function(t,e,i){"use strict";var n,r=i(52)(0),o=i(41),a=i(66),s=i(174),l=i(193),u=i(21),h=i(19),c=i(93),f=a.getWeak,p=Object.isExtensible,d=l.ufstore,g={},_=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(t){if(u(t)){var e=f(t);return!0===e?d(c(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return l.def(c(this,"WeakMap"),t,e)}},y=t.exports=i(111)("WeakMap",_,v,l,!0,!0);h(function(){return 7!=(new y).set((Object.freeze||Object)(g),7).get(g)})&&(s((n=l.getConstructor(_,"WeakMap")).prototype,v),a.NEED=!0,r(["delete","has","get","set"],function(t){var e=y.prototype,i=e[t];o(e,t,function(e,r){if(u(e)&&!p(e)){this._f||(this._f=new n);var o=this._f[t](e,r);return"set"==t?this:o}return i.call(this,e,r)})}))},function(t,e,i){"use strict";var n=i(193),r=i(93);i(111)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return n.def(r(this,"WeakSet"),t,!0)}},n,!1,!0)},function(t,e,i){"use strict";var n=i(5),r=i(112),o=i(154),a=i(23),s=i(74),l=i(38),u=i(21),h=i(20).ArrayBuffer,c=i(109),f=o.ArrayBuffer,p=o.DataView,d=r.ABV&&h.isView,g=f.prototype.slice,_=r.VIEW;n(n.G+n.W+n.F*(h!==f),{ArrayBuffer:f}),n(n.S+n.F*!r.CONSTR,"ArrayBuffer",{isView:function(t){return d&&d(t)||u(t)&&_ in t}}),n(n.P+n.U+n.F*i(19)(function(){return!new f(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==g&&void 0===e)return g.call(a(this),t);for(var i=a(this).byteLength,n=s(t,i),r=s(void 0===e?i:e,i),o=new(c(this,f))(l(r-n)),u=new p(this),h=new p(o),d=0;n<r;)h.setUint8(d++,u.getUint8(n++));return o}}),i(90)("ArrayBuffer")},function(t,e,i){var n=i(5);n(n.G+n.W+n.F*!i(112).ABV,{DataView:i(154).DataView})},function(t,e,i){i(64)("Int8",1,function(t){return function(e,i,n){return t(this,e,i,n)}})},function(t,e,i){i(64)("Uint8",1,function(t){return function(e,i,n){return t(this,e,i,n)}})},function(t,e,i){i(64)("Uint8",1,function(t){return function(e,i,n){return t(this,e,i,n)}},!0)},function(t,e,i){i(64)("Int16",2,function(t){return function(e,i,n){return t(this,e,i,n)}})},function(t,e,i){i(64)("Uint16",2,function(t){return function(e,i,n){return t(this,e,i,n)}})},function(t,e,i){i(64)("Int32",4,function(t){return function(e,i,n){return t(this,e,i,n)}})},function(t,e,i){i(64)("Uint32",4,function(t){return function(e,i,n){return t(this,e,i,n)}})},function(t,e,i){i(64)("Float32",4,function(t){return function(e,i,n){return t(this,e,i,n)}})},function(t,e,i){i(64)("Float64",8,function(t){return function(e,i,n){return t(this,e,i,n)}})},function(t,e,i){var n=i(5),r=i(60),o=i(23),a=(i(20).Reflect||{}).apply,s=Function.apply;n(n.S+n.F*!i(19)(function(){a(function(){})}),"Reflect",{apply:function(t,e,i){var n=r(t),l=o(i);return a?a(n,e,l):s.call(n,e,l)}})},function(t,e,i){var n=i(5),r=i(75),o=i(60),a=i(23),s=i(21),l=i(19),u=i(175),h=(i(20).Reflect||{}).construct,c=l(function(){function t(){}return!(h(function(){},[],t)instanceof t)}),f=!l(function(){h(function(){})});n(n.S+n.F*(c||f),"Reflect",{construct:function(t,e){o(t),a(e);var i=arguments.length<3?t:o(arguments[2]);if(f&&!c)return h(t,e,i);if(t==i){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return n.push.apply(n,e),new(u.apply(t,n))}var l=i.prototype,p=r(s(l)?l:Object.prototype),d=Function.apply.call(t,p,e);return s(d)?d:p}})},function(t,e,i){var n=i(30),r=i(5),o=i(23),a=i(65);r(r.S+r.F*i(19)(function(){Reflect.defineProperty(n.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,i){o(t),e=a(e,!0),o(i);try{return n.f(t,e,i),!0}catch(t){return!1}}})},function(t,e,i){var n=i(5),r=i(50).f,o=i(23);n(n.S,"Reflect",{deleteProperty:function(t,e){var i=r(o(t),e);return!(i&&!i.configurable)&&delete t[e]}})},function(t,e,i){"use strict";var n=i(5),r=i(23),o=function(t){this._t=r(t),this._i=0;var e,i=this._k=[];for(e in t)i.push(e)};i(183)(o,"Object",function(){var t,e=this._k;do{if(this._i>=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),n(n.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,i){var n=i(50),r=i(77),o=i(43),a=i(5),s=i(21),l=i(23);a(a.S,"Reflect",{get:function t(e,i){var a,u,h=arguments.length<3?e:arguments[2];return l(e)===h?e[i]:(a=n.f(e,i))?o(a,"value")?a.value:void 0!==a.get?a.get.call(h):void 0:s(u=r(e))?t(u,i,h):void 0}})},function(t,e,i){var n=i(50),r=i(5),o=i(23);r(r.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return n.f(o(t),e)}})},function(t,e,i){var n=i(5),r=i(77),o=i(23);n(n.S,"Reflect",{getPrototypeOf:function(t){return r(o(t))}})},function(t,e,i){var n=i(5);n(n.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,i){var n=i(5),r=i(23),o=Object.isExtensible;n(n.S,"Reflect",{isExtensible:function(t){return r(t),!o||o(t)}})},function(t,e,i){var n=i(5);n(n.S,"Reflect",{ownKeys:i(195)})},function(t,e,i){var n=i(5),r=i(23),o=Object.preventExtensions;n(n.S,"Reflect",{preventExtensions:function(t){r(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,i){var n=i(30),r=i(50),o=i(77),a=i(43),s=i(5),l=i(70),u=i(23),h=i(21);s(s.S,"Reflect",{set:function t(e,i,s){var c,f,p=arguments.length<4?e:arguments[3],d=r.f(u(e),i);if(!d){if(h(f=o(e)))return t(f,i,s,p);d=l(0)}if(a(d,"value")){if(!1===d.writable||!h(p))return!1;if(c=r.f(p,i)){if(c.get||c.set||!1===c.writable)return!1;c.value=s,n.f(p,i,c)}else n.f(p,i,l(0,s));return!0}return void 0!==d.set&&(d.set.call(p,s),!0)}})},function(t,e,i){var n=i(5),r=i(137);r&&n(n.S,"Reflect",{setPrototypeOf:function(t,e){r.check(t,e);try{return r.set(t,e),!0}catch(t){return!1}}})},function(t,e,i){i(372),t.exports=i(37).Array.includes},function(t,e,i){"use strict";var n=i(5),r=i(102)(!0);n(n.P,"Array",{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),i(89)("includes")},function(t,e,i){i(374),t.exports=i(37).String.padStart},function(t,e,i){"use strict";var n=i(5),r=i(196),o=i(110);n(n.P+n.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(o),"String",{padStart:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,i){i(376),t.exports=i(37).String.padEnd},function(t,e,i){"use strict";var n=i(5),r=i(196),o=i(110);n(n.P+n.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(o),"String",{padEnd:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,i){i(378),t.exports=i(132).f("asyncIterator")},function(t,e,i){i(170)("asyncIterator")},function(t,e,i){i(380),t.exports=i(37).Object.getOwnPropertyDescriptors},function(t,e,i){var n=i(5),r=i(195),o=i(45),a=i(50),s=i(148);n(n.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,i,n=o(t),l=a.f,u=r(n),h={},c=0;u.length>c;)void 0!==(i=l(n,e=u[c++]))&&s(h,e,i);return h}})},function(t,e,i){i(382),t.exports=i(37).Object.values},function(t,e,i){var n=i(5),r=i(197)(!1);n(n.S,"Object",{values:function(t){return r(t)}})},function(t,e,i){i(384),t.exports=i(37).Object.entries},function(t,e,i){var n=i(5),r=i(197)(!0);n(n.S,"Object",{entries:function(t){return r(t)}})},function(t,e,i){"use strict";i(189),i(386),t.exports=i(37).Promise.finally},function(t,e,i){"use strict";var n=i(5),r=i(37),o=i(20),a=i(109),s=i(191);n(n.P+n.R,"Promise",{finally:function(t){var e=a(this,r.Promise||o.Promise),i="function"==typeof t;return this.then(i?function(i){return s(e,t()).then(function(){return i})}:t,i?function(i){return s(e,t()).then(function(){throw i})}:t)}})},function(t,e,i){i(388),i(389),i(390),t.exports=i(37)},function(t,e,i){var n=i(20),r=i(5),o=i(110),a=[].slice,s=/MSIE .\./.test(o),l=function(t){return function(e,i){var n=arguments.length>2,r=!!n&&a.call(arguments,2);return t(n?function(){("function"==typeof e?e:Function(e)).apply(this,r)}:e,i)}};r(r.G+r.B+r.F*s,{setTimeout:l(n.setTimeout),setInterval:l(n.setInterval)})},function(t,e,i){var n=i(5),r=i(153);n(n.G+n.B,{setImmediate:r.set,clearImmediate:r.clear})},function(t,e,i){for(var n=i(151),r=i(73),o=i(41),a=i(20),s=i(44),l=i(88),u=i(24),h=u("iterator"),c=u("toStringTag"),f=l.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=r(p),g=0;g<d.length;g++){var _,v=d[g],y=p[v],m=a[v],x=m&&m.prototype;if(x&&(x[h]||s(x,h,f),x[c]||s(x,c,v),l[v]=f,y))for(_ in n)x[_]||o(x,_,n[_],!0)}},function(t,e){!function(e){"use strict";var i,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag",u="object"==typeof t,h=e.regeneratorRuntime;if(h)u&&(t.exports=h);else{(h=e.regeneratorRuntime=u?t.exports:{}).wrap=x;var c="suspendedStart",f="suspendedYield",p="executing",d="completed",g={},_={};_[a]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(A([])));y&&y!==n&&r.call(y,a)&&(_=y);var m=C.prototype=S.prototype=Object.create(_);T.prototype=m.constructor=C,C.constructor=T,C[l]=T.displayName="GeneratorFunction",h.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===T||"GeneratorFunction"===(e.displayName||e.name))},h.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,l in t||(t[l]="GeneratorFunction")),t.prototype=Object.create(m),t},h.awrap=function(t){return{__await:t}},R(I.prototype),I.prototype[s]=function(){return this},h.AsyncIterator=I,h.async=function(t,e,i,n){var r=new I(x(t,e,i,n));return h.isGeneratorFunction(e)?r:r.next().then(function(t){return t.done?t.value:r.next()})},R(m),m[l]="Generator",m[a]=function(){return this},m.toString=function(){return"[object Generator]"},h.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){for(;e.length;){var n=e.pop();if(n in t)return i.value=n,i.done=!1,i}return i.done=!0,i}},h.values=A,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=i)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=i),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),L(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;L(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:A(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=i),g}}}function x(t,e,i,n){var r=e&&e.prototype instanceof S?e:S,o=Object.create(r.prototype),a=new O(n||[]);return o._invoke=function(t,e,i){var n=c;return function(r,o){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===r)throw o;return P()}for(i.method=r,i.arg=o;;){var a=i.delegate;if(a){var s=b(a,i);if(s){if(s===g)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(n===c)throw n=d,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n=p;var l=E(t,e,i);if("normal"===l.type){if(n=i.done?d:f,l.arg===g)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n=d,i.method="throw",i.arg=l.arg)}}}(t,i,a),o}function E(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}function S(){}function T(){}function C(){}function R(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function I(t){var e;this._invoke=function(i,n){function o(){return new Promise(function(e,o){!function e(i,n,o,a){var s=E(t[i],t,n);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(u).then(function(t){l.value=t,o(l)},a)}a(s.arg)}(i,n,e,o)})}return e=e?e.then(o,o):o()}}function b(t,e){var n=t.iterator[e.method];if(n===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=i,b(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var r=E(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,g;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=i),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function A(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=i,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:i,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,i){"use strict";var n=this&&this.__assign||Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t};Object.defineProperty(e,"__esModule",{value:!0});var r=i(393),o=i(81),a=i(82),s=i(68),l=i(394),u=i(123),h=i(516),c=i(124),f=i(395),p=i(396),d=i(510),g=i(222),_=function(){function t(t){this.OlStyleConstructor=r.default,this.OlStyleImageConstructor=o.default,this.OlStyleFillConstructor=a.default,this.OlStyleStrokeConstructor=s.default,this.OlStyleTextConstructor=l.default,this.OlStyleCircleConstructor=u.default,this.OlStyleIconConstructor=h.default,this.OlStyleRegularshapeConstructor=c.default,this.isOlParserStyleFct=function(t){return"function"==typeof t},t&&(this.OlStyleConstructor=t.style.Style,this.OlStyleImageConstructor=t.style.Image,this.OlStyleFillConstructor=t.style.Fill,this.OlStyleStrokeConstructor=t.style.Stroke,this.OlStyleTextConstructor=t.style.Text,this.OlStyleCircleConstructor=t.style.Circle,this.OlStyleIconConstructor=t.style.Icon,this.OlStyleRegularshapeConstructor=t.style.RegularShape)}return t.prototype.getPointSymbolizerFromOlStyle=function(t){var e;if(t.getImage()instanceof this.OlStyleCircleConstructor){var i=t.getImage(),n=i.getFill(),r=i.getStroke();e={kind:"Mark",wellKnownName:"Circle",color:n?f.default.getHexColor(n.getColor()):void 0,opacity:n?f.default.getOpacity(n.getColor()):void 0,radius:0!==i.getRadius()?i.getRadius():5,strokeColor:r?r.getColor():void 0,strokeOpacity:r?f.default.getOpacity(r.getColor()):void 0,strokeWidth:r?r.getWidth():void 0}}else if(t.getImage()instanceof this.OlStyleRegularshapeConstructor){var o=t.getImage(),a=(n=o.getFill(),r=o.getStroke(),o.getRadius()),s=o.getRadius2(),l=o.getPoints(),u=o.getAngle(),h={kind:"Mark",color:n?f.default.getHexColor(n.getColor()):void 0,opacity:n?f.default.getOpacity(n.getColor()):void 0,strokeColor:r?r.getColor():void 0,strokeOpacity:r?f.default.getOpacity(r.getColor()):void 0,strokeWidth:r?r.getWidth():void 0,radius:0!==a?a:5,rotate:o.getRotation()/Math.PI*180};switch(l){case 2:switch(u){case 0:h.wellKnownName="shape://vertline";break;case Math.PI/2:h.wellKnownName="shape://horline";break;case Math.PI/4:h.wellKnownName="shape://slash";break;case 2*Math.PI-Math.PI/4:h.wellKnownName="shape://backslash"}break;case 3:switch(u){case 0:h.wellKnownName="Triangle";break;case Math.PI/2:h.wellKnownName="shape://carrow"}break;case 4:d.isNumber(s)?0===o.getAngle()?h.wellKnownName="Cross":h.wellKnownName="X":h.wellKnownName="Square";break;case 5:h.wellKnownName="Star";break;default:throw new Error("Could not parse OlStyle. Only 2, 3, 4 or 5 point regular shapes are allowed")}e=h}else{var c=t.getImage();e={kind:"Icon",image:c.getSrc()?c.getSrc():void 0,opacity:c.getOpacity(),size:0!==c.getScale()?c.getScale():5,rotate:c.getRotation()/Math.PI*180}}return e},t.prototype.getLineSymbolizerFromOlStyle=function(t){var e=t.getStroke();return{kind:"Line",color:e?f.default.getHexColor(e.getColor()):void 0,opacity:e?f.default.getOpacity(e.getColor()):void 0,width:e?e.getWidth():void 0,cap:e?e.getLineCap():"butt",join:e?e.getLineJoin():"miter",dasharray:e?e.getLineDash():void 0,dashOffset:e?e.getLineDashOffset():void 0}},t.prototype.getFillSymbolizerFromOlStyle=function(t){var e=t.getFill(),i=t.getStroke();return{kind:"Fill",color:e?f.default.getHexColor(e.getColor()):void 0,opacity:e?f.default.getOpacity(e.getColor()):void 0,outlineColor:i?i.getColor():void 0,outlineWidth:i?i.getWidth():void 0}},t.prototype.getTextSymbolizerFromOlStyle=function(t){var e,i=t.getText(),n=i.getFill(),r=i.getStroke(),o=i.getOffsetX(),a=i.getOffsetY(),s=i.getFont(),l=i.getRotation(),u=i.getText(),h=1/0,c=void 0;if(s){var p=s.split("px");e=p[0].trim().split(" "),h=parseInt(e[e.length-1],10),c=(2===p.length?p[1]:p[2]).split(",").map(function(t){return t.startsWith(" ")?t.slice(1):t})}return{kind:"Text",label:u,color:n?f.default.getHexColor(n.getColor()):void 0,size:isFinite(h)?h:void 0,font:c,offset:void 0!==o&&void 0!==a?[o,a]:[0,0],haloColor:r&&r.getColor()?f.default.getHexColor(r.getColor()):void 0,haloWidth:r?r.getWidth():void 0,rotate:void 0!==l?l/Math.PI*180:void 0}},t.prototype.getSymbolizersFromOlStyle=function(t){var e=this,i=[];return t.forEach(function(t){var n;switch(e.getStyleTypeFromOlStyle(t)){case"Point":n=t.getText()?e.getTextSymbolizerFromOlStyle(t):e.getPointSymbolizerFromOlStyle(t);break;case"Line":n=e.getLineSymbolizerFromOlStyle(t);break;case"Fill":n=e.getFillSymbolizerFromOlStyle(t);break;default:throw new Error("Failed to parse SymbolizerKind from OpenLayers Style")}i.push(n)}),i},t.prototype.getRuleFromOlStyle=function(t){return{name:"OL Style Rule 0",symbolizers:Array.isArray(t)?this.getSymbolizersFromOlStyle(t):this.getSymbolizersFromOlStyle([t])}},t.prototype.getStyleTypeFromOlStyle=function(t){var e;if(t.getImage()instanceof this.OlStyleImageConstructor)e="Point";else if(t.getText()instanceof this.OlStyleTextConstructor)e="Point";else if(t.getFill()instanceof this.OlStyleFillConstructor)e="Fill";else{if(!t.getStroke()||t.getFill())throw new Error("StyleType could not be detected");e="Line"}return e},t.prototype.olStyleToGeoStylerStyle=function(t){return{name:"OL Style",rules:[this.getRuleFromOlStyle(t)]}},t.prototype.readStyle=function(t){var e=this;return new Promise(function(i,n){try{e.isOlParserStyleFct(t)?i(t.__geoStylerStyle):i(e.olStyleToGeoStylerStyle(t))}catch(t){n(t)}})},t.prototype.writeStyle=function(t){var e=this;return new Promise(function(i,n){try{i(e.getOlStyleTypeFromGeoStylerStyle(t))}catch(t){n(t)}})},t.prototype.getOlStyleTypeFromGeoStylerStyle=function(t){var e=t.rules;if(1===e.length){var i=void 0!==g(t,"rules[0].filter"),n=void 0!==g(t,"rules[0].scaleDenominator.min"),r=void 0!==g(t,"rules[0].scaleDenominator.max"),o=!(!n&&!r),a=t.rules[0].symbolizers.length,s=e[0].symbolizers.some(function(t){return"Text"===t.kind});return i||o||s?this.geoStylerStyleToOlParserStyleFct(t):1===a?this.geoStylerStyleToOlStyle(t):this.geoStylerStyleToOlStyleArray(t)}return this.geoStylerStyleToOlParserStyleFct(t)},t.prototype.geoStylerStyleToOlStyle=function(t){var e=t.rules[0].symbolizers[0];return this.getOlSymbolizerFromSymbolizer(e)},t.prototype.geoStylerStyleToOlStyleArray=function(t){var e=this,i=[];return t.rules[0].symbolizers.forEach(function(t){var n=e.getOlSymbolizerFromSymbolizer(t);i.push(n)}),i},t.prototype.geoStylerStyleToOlParserStyleFct=function(t){var e=this,i=t.rules,n=function(t,n){var r=[],o=p.default.getScaleForResolution(n,"m");return i.forEach(function(i){var a=g(i,"scaleDenominator.min"),s=g(i,"scaleDenominator.max"),l=!0;void 0===a&&void 0===s||(void 0!==a&&o<a&&(l=!1),void 0!==s&&o>=s&&(l=!1));var u=!1;if(i.filter)try{u=e.geoStylerFilterToOlParserFilter(t,i.filter)}catch(t){u=!1}else u=!0;l&&u&&i.symbolizers.forEach(function(i){var o=e.getOlSymbolizerFromSymbolizer(i);if("function"!=typeof o)r.push(o);else{var a=o(t,n);r.push(a)}})}),r};return n.__geoStylerStyle=t,n},t.prototype.geoStylerFilterToOlParserFilter=function(t,e){var i=this,n=!0,r=!1;({"&&":!0,"||":!0,"!":!0})[e[0]]&&(r=!0);try{if(r)switch(e[0]){case"&&":var o=!0,a=e.slice(1);a.forEach(function(e){i.geoStylerFilterToOlParserFilter(t,e)||(o=!1)}),n=o;break;case"||":o=!1,(a=e.slice(1)).forEach(function(e){i.geoStylerFilterToOlParserFilter(t,e)&&(o=!0)}),n=o;break;case"!":n=!this.geoStylerFilterToOlParserFilter(t,e[1]);break;default:throw new Error("Cannot parse Filter. Unknown combination or negation operator.")}else{var s=t.get(e[1]);switch(e[0]){case"==":n=s===e[2];break;case"*=":"string"==typeof e[2]&&"string"==typeof s&&(n=!(e[2].length>s.length)&&-1!==s.indexOf(e[2]));break;case"!=":n=s!==e[2];break;case"<":typeof s==typeof e[2]&&(n=s<e[2]);break;case"<=":typeof s==typeof e[2]&&(n=s<=e[2]);break;case">":typeof s==typeof e[2]&&(n=s>e[2]);break;case">=":typeof s==typeof e[2]&&(n=s>=e[2]);break;default:throw new Error("Cannot parse Filter. Unknown comparison operator.")}}}catch(t){throw new Error("Cannot parse Filter. Invalid structure.")}return n},t.prototype.getOlSymbolizerFromSymbolizer=function(t){var e;switch(t.kind){case"Mark":e=this.getOlPointSymbolizerFromMarkSymbolizer(t);break;case"Icon":e=this.getOlIconSymbolizerFromIconSymbolizer(t);break;case"Text":e=this.getOlTextSymbolizerFromTextSymbolizer(t);break;case"Line":e=this.getOlLineSymbolizerFromLineSymbolizer(t);break;case"Fill":e=this.getOlPolygonSymbolizerFromFillSymbolizer(t);break;default:var i=new this.OlStyleFillConstructor({color:"rgba(255,255,255,0.4)"}),n=new this.OlStyleStrokeConstructor({color:"#3399CC",width:1.25});e=new this.OlStyleConstructor({image:new this.OlStyleCircleConstructor({fill:i,stroke:n,radius:5}),fill:i,stroke:n})}return e},t.prototype.getOlPointSymbolizerFromMarkSymbolizer=function(t){var e;(t.strokeColor||void 0!==t.strokeWidth)&&(e=new this.OlStyleStrokeConstructor({color:t.strokeColor&&void 0!==t.strokeOpacity?f.default.getRgbaColor(t.strokeColor,t.strokeOpacity):t.strokeColor,width:t.strokeWidth}));var i,n={fill:new this.OlStyleFillConstructor({color:t.color&&void 0!==t.opacity?f.default.getRgbaColor(t.color,t.opacity):t.color}),opacity:t.opacity||1,radius:t.radius||5,rotation:t.rotate?t.rotate*Math.PI/180:void 0,stroke:e};switch(t.wellKnownName){case"shape://dot":case"Circle":i=new this.OlStyleConstructor({image:new this.OlStyleCircleConstructor(n)});break;case"Square":n.points=4,n.angle=45*Math.PI/180,i=new this.OlStyleConstructor({image:new this.OlStyleRegularshapeConstructor(n)});break;case"Triangle":n.points=3,n.angle=0,i=new this.OlStyleConstructor({image:new this.OlStyleRegularshapeConstructor(n)});break;case"Star":n.points=5,n.radius2=n.radius/2.5,n.angle=0,i=new this.OlStyleConstructor({image:new this.OlStyleRegularshapeConstructor(n)});break;case"shape://plus":case"Cross":n.points=4,n.radius2=0,n.angle=0,void 0===n.stroke&&(n.stroke=new this.OlStyleStrokeConstructor({color:"#000"})),i=new this.OlStyleConstructor({image:new this.OlStyleRegularshapeConstructor(n)});break;case"shape://times":case"X":n.points=4,n.radius2=0,n.angle=45*Math.PI/180,void 0===n.stroke&&(n.stroke=new this.OlStyleStrokeConstructor({color:"#000"})),i=new this.OlStyleConstructor({image:new this.OlStyleRegularshapeConstructor(n)});break;case"shape://backslash":n.points=2,n.angle=2*Math.PI-Math.PI/4,void 0===n.stroke&&(n.stroke=new this.OlStyleStrokeConstructor({color:"#000"})),i=new this.OlStyleConstructor({image:new this.OlStyleRegularshapeConstructor(n)});break;case"shape://horline":n.points=2,n.angle=Math.PI/2,void 0===n.stroke&&(n.stroke=new this.OlStyleStrokeConstructor({color:"#000"})),i=new this.OlStyleConstructor({image:new this.OlStyleRegularshapeConstructor(n)});break;case"shape://oarrow":case"shape://carrow":n.points=3,n.angle=Math.PI/2,i=new this.OlStyleConstructor({image:new this.OlStyleRegularshapeConstructor(n)});break;case"shape://slash":n.points=2,n.angle=Math.PI/4,void 0===n.stroke&&(n.stroke=new this.OlStyleStrokeConstructor({color:"#000"})),i=new this.OlStyleConstructor({image:new this.OlStyleRegularshapeConstructor(n)});break;case"shape://vertline":n.points=2,n.angle=0,void 0===n.stroke&&(n.stroke=new this.OlStyleStrokeConstructor({color:"#000"})),i=new this.OlStyleConstructor({image:new this.OlStyleRegularshapeConstructor(n)});break;default:throw new Error("MarkSymbolizer cannot be parsed. Unsupported WellKnownName.")}return i},t.prototype.getOlIconSymbolizerFromIconSymbolizer=function(t){return new this.OlStyleConstructor({image:new this.OlStyleIconConstructor({src:t.image,crossOrigin:"anonymous",opacity:t.opacity,scale:t.size||1,rotation:t.rotate?t.rotate*Math.PI/180:void 0})})},t.prototype.getOlLineSymbolizerFromLineSymbolizer=function(t){return new this.OlStyleConstructor({stroke:new this.OlStyleStrokeConstructor({color:t.color&&t.opacity?f.default.getRgbaColor(t.color,t.opacity):t.color,width:t.width,lineCap:t.cap,lineJoin:t.join,lineDash:t.dasharray,lineDashOffset:t.dashOffset})})},t.prototype.getOlPolygonSymbolizerFromFillSymbolizer=function(t){return new this.OlStyleConstructor({stroke:new this.OlStyleStrokeConstructor({color:t.outlineColor,width:t.outlineWidth}),fill:new this.OlStyleFillConstructor({color:t.color&&t.opacity?f.default.getRgbaColor(t.color,t.opacity):t.color})})},t.prototype.getOlTextSymbolizerFromTextSymbolizer=function(t){var e=this,i={font:f.default.getTextFont(t),fill:new this.OlStyleFillConstructor({color:t.color&&t.opacity?f.default.getRgbaColor(t.color,t.opacity):t.color}),stroke:new this.OlStyleStrokeConstructor({color:t.haloColor&&t.opacity?f.default.getRgbaColor(t.haloColor,t.opacity):t.haloColor,width:t.haloWidth?t.haloWidth:0}),offsetX:t.offset?t.offset[0]:0,offsetY:t.offset?t.offset[1]:0,rotation:t.rotate?t.rotate*Math.PI/180:void 0},r=new RegExp("\\{\\{.*?\\}\\}","g");return t.label&&t.label.match(r)?function(r,o){var a=new e.OlStyleTextConstructor(n({text:f.default.resolveAttributeTemplate(r,t.label,"")},i));return new e.OlStyleConstructor({text:a})}:new this.OlStyleConstructor({text:new this.OlStyleTextConstructor(n({text:t.label},i))})},t.title="OpenLayers Style Parser",t}();e.OlStyleParser=_,e.default=_},function(t,e,i){"use strict";i.r(e);var n=i(12),r=i(6),o=i(123),a=i(82),s=i(68),l=function(t){var e=t||{};this.geometry_=null,this.geometryFunction_=l.defaultGeometryFunction,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex};l.prototype.clone=function(){var t=this.getGeometry();return t&&t.clone&&(t=t.clone()),new l({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},l.prototype.getRenderer=function(){return this.renderer_},l.prototype.setRenderer=function(t){this.renderer_=t},l.prototype.getGeometry=function(){return this.geometry_},l.prototype.getGeometryFunction=function(){return this.geometryFunction_},l.prototype.getFill=function(){return this.fill_},l.prototype.setFill=function(t){this.fill_=t},l.prototype.getImage=function(){return this.image_},l.prototype.setImage=function(t){this.image_=t},l.prototype.getStroke=function(){return this.stroke_},l.prototype.setStroke=function(t){this.stroke_=t},l.prototype.getText=function(){return this.text_},l.prototype.setText=function(t){this.text_=t},l.prototype.getZIndex=function(){return this.zIndex_},l.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=l.defaultGeometryFunction,this.geometry_=t},l.prototype.setZIndex=function(t){this.zIndex_=t},l.createFunction=function(t){var e,i;return"function"==typeof t?e=t:(Array.isArray(t)?i=t:(n.a.assert(t instanceof l,41),i=[t]),e=function(){return i}),e},l.default_=null,l.defaultFunction=function(t,e){if(!l.default_){var i=new a.default({color:"rgba(255,255,255,0.4)"}),n=new s.default({color:"#3399CC",width:1.25});l.default_=[new l({image:new o.default({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return l.default_},l.createDefaultEditing=function(){var t={},e=[255,255,255,1],i=[0,153,255,1];return t[r.a.POLYGON]=[new l({fill:new a.default({color:[255,255,255,.5]})})],t[r.a.MULTI_POLYGON]=t[r.a.POLYGON],t[r.a.LINE_STRING]=[new l({stroke:new s.default({color:e,width:5})}),new l({stroke:new s.default({color:i,width:3})})],t[r.a.MULTI_LINE_STRING]=t[r.a.LINE_STRING],t[r.a.CIRCLE]=t[r.a.POLYGON].concat(t[r.a.LINE_STRING]),t[r.a.POINT]=[new l({image:new o.default({radius:6,fill:new a.default({color:i}),stroke:new s.default({color:e,width:1.5})}),zIndex:1/0})],t[r.a.MULTI_POINT]=t[r.a.POINT],t[r.a.GEOMETRY_COLLECTION]=t[r.a.POLYGON].concat(t[r.a.LINE_STRING],t[r.a.POINT]),t},l.defaultGeometryFunction=function(t){return t.getGeometry()},e.default=l},function(t,e,i){"use strict";i.r(e);var n=i(82),r=i(125),o=function(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new n.default({color:o.DEFAULT_FILL_COLOR_}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:r.a.POINT;var i=void 0===e.overflow?e.exceedLength:e.overflow;this.overflow_=void 0!==i&&i,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding};o.DEFAULT_FILL_COLOR_="#333",o.prototype.clone=function(){return new o({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:this.getScale(),text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY()})},o.prototype.getOverflow=function(){return this.overflow_},o.prototype.getFont=function(){return this.font_},o.prototype.getMaxAngle=function(){return this.maxAngle_},o.prototype.getPlacement=function(){return this.placement_},o.prototype.getOffsetX=function(){return this.offsetX_},o.prototype.getOffsetY=function(){return this.offsetY_},o.prototype.getFill=function(){return this.fill_},o.prototype.getRotateWithView=function(){return this.rotateWithView_},o.prototype.getRotation=function(){return this.rotation_},o.prototype.getScale=function(){return this.scale_},o.prototype.getStroke=function(){return this.stroke_},o.prototype.getText=function(){return this.text_},o.prototype.getTextAlign=function(){return this.textAlign_},o.prototype.getTextBaseline=function(){return this.textBaseline_},o.prototype.getBackgroundFill=function(){return this.backgroundFill_},o.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},o.prototype.getPadding=function(){return this.padding_},o.prototype.setOverflow=function(t){this.overflow_=t},o.prototype.setFont=function(t){this.font_=t},o.prototype.setMaxAngle=function(t){this.maxAngle_=t},o.prototype.setOffsetX=function(t){this.offsetX_=t},o.prototype.setOffsetY=function(t){this.offsetY_=t},o.prototype.setPlacement=function(t){this.placement_=t},o.prototype.setFill=function(t){this.fill_=t},o.prototype.setRotation=function(t){this.rotation_=t},o.prototype.setScale=function(t){this.scale_=t},o.prototype.setStroke=function(t){this.stroke_=t},o.prototype.setText=function(t){this.text_=t},o.prototype.setTextAlign=function(t){this.textAlign_=t},o.prototype.setTextBaseline=function(t){this.textBaseline_=t},o.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},o.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},o.prototype.setPadding=function(t){this.padding_=t},e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.getRgbaColor=function(t,e){return e<0&&(e=1),"rgba("+parseInt(t.slice(1,3),16)+", "+parseInt(t.slice(3,5),16)+", "+parseInt(t.slice(5,7),16)+", "+e+")"},t.splitRgbaColor=function(t){var e=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(/,\s*/);return[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10),parseFloat(e[3])]},t.getHexColor=function(e){return e.startsWith("#")?e:e.startsWith("rgb")?"#"+t.splitRgbaColor(e).map(function(t,e){var i=t.toString(16);return e<3?1===i.length?"0"+i:i:""}).join(""):void 0},t.getOpacity=function(e){if(e.startsWith("rgba(")){var i=t.splitRgbaColor(e);return 4===i.length?i[3]:void 0}},t.getTextFont=function(t){return"Normal "+t.size+"px "+t.font},t.resolveAttributeTemplate=function(t,e,i,n){void 0===i&&(i="n.v."),void 0===n&&(n=function(t,e){return e});var r=new RegExp("\\{\\{(.*?)\\}\\}","g"),o=e.match(r);return o&&o.forEach(function(r){for(var o=0,a=0,s=Object.entries(t.getProperties());a<s.length;a++){var l=s[a],u=l[0],h=l[1];if(r.slice(2,r.length-2).toLowerCase()===u.toLowerCase()){e=e.replace(r,n(u,h));break}o++}o===Object.keys(t.getProperties()).length&&(e=e.replace(r,i))}),e},t}();e.default=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MapUtil=void 0;var n=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),r=d(i(514)),o=d(i(515)),a=d(i(517)),s=d(i(126)),l=d(i(84)),u=d(i(16)),h=d(i(398)),c=d(i(472)),f=d(i(474)),p=d(i(477));function d(t){return t&&t.__esModule?t:{default:t}}var g=e.MapUtil=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,null,[{key:"getInteractionsByName",value:function(t,e){var i=[];return t instanceof r.default?(t.getInteractions().forEach(function(t){t.get("name")===e&&i.push(t)}),i):(c.default.debug("Input parameter map must be from type `ol.Map`."),i)}},{key:"getInteractionsByClass",value:function(t,e){var i=[];return t instanceof r.default?(t.getInteractions().forEach(function(t){t instanceof e&&i.push(t)}),i):(c.default.debug("Input parameter map must be from type `ol.Map`."),i)}},{key:"getResolutionForScale",value:function(t,e){var i=u.default.METERS_PER_UNIT[e];return parseFloat(t)/(39.37*i*(25.4/.28))}},{key:"getScaleForResolution",value:function(t,e){var i=u.default.METERS_PER_UNIT[e];return parseFloat(t)*i*39.37*(25.4/.28)}},{key:"getAllLayers",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(!(e instanceof r.default||e instanceof s.default))return c.default.error("Input parameter collection must be from type `ol.Map`or `ol.layer.Group`."),[];var n=[];return e.getLayers().getArray().forEach(function(e){e instanceof s.default&&t.getAllLayers(e).forEach(function(t){i(t)&&n.push(t)}),i(e)&&n.push(e)}),n}},{key:"getLayerByName",value:function(e,i){return t.getAllLayers(e).filter(function(t){return t.get("name")===i})[0]}},{key:"getLayerByNameParam",value:function(e,i){var n=t.getAllLayers(e),r=void 0,o=!0,a=!1,s=void 0;try{for(var l,u=n[Symbol.iterator]();!(o=(l=u.next()).done);o=!0){var h=l.value;if(h.getSource&&h.getSource().getParams&&h.getSource().getParams().LAYERS===i){r=h;break}}}catch(t){a=!0,s=t}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}return r}},{key:"getLayerByFeature",value:function(e,i,n){var r=f.default.getFeatureTypeName(i),o=void 0,a=!0,s=!1,l=void 0;try{for(var u,h=n[Symbol.iterator]();!(a=(u=h.next()).done);a=!0){var c=u.value+":"+r,p=t.getLayerByNameParam(e,c);if(p){o=p;break}}}catch(t){s=!0,l=t}finally{try{!a&&h.return&&h.return()}finally{if(s)throw l}}return o}},{key:"getLayersByGroup",value:function(e,i){var n=[];return i.getLayers().forEach(function(i){i instanceof s.default?n.push.apply(n,function(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}(t.getLayersByGroup(e,i))):n.push(i)}),n}},{key:"getLayersByProperty",value:function(e,i,n){if(e&&i)return t.getAllLayers(e).filter(function(t){return t.get(i)===n})}},{key:"getLayerPositionInfo",value:function(e,i){var n=i instanceof s.default?i:i.getLayerGroup(),r=n.getLayers().getArray(),o={};return r.indexOf(e)<0?r.forEach(function(i){i instanceof s.default&&!o.groupLayer&&(o=t.getLayerPositionInfo(e,i))}):(o.position=r.indexOf(e),o.groupLayer=n),o}},{key:"getLegendGraphicUrl",value:function(t,e){if(t){var i=t.getSource();if(t instanceof l.default&&i){var n=i instanceof o.default,r=i instanceof a.default;if(n||r){var s=t.getSource(),u=n?s.getUrls()?s.getUrls()[0]:"":s.getUrl(),f={LAYER:s.getParams().LAYERS,VERSION:"1.3.0",SERVICE:"WMS",REQUEST:"getLegendGraphic",FORMAT:"image/png"},p=h.default.objectToRequestString(Object.assign(f,e));return/\?/.test(u)?u+"&"+p:u+"?"+p}c.default.warn('Source of "'+t.get("name")+'" is currently not supported by MapUtil.getLegendGraphicUrl.')}else c.default.error("Invalid layer passed to MapUtil.getLegendGraphicUrl.")}else c.default.error("No layer passed to MapUtil.getLegendGraphicUrl.")}},{key:"layerInResolutionRange",value:function(t,e){var i=e&&e.getView(),n=i&&i.getResolution();if(!t||!i||!n)return!1;var r=t.getMinResolution(),o=t.getMaxResolution();return n>=r&&n<o}},{key:"roundScale",value:function(t){var e=void 0;return t<100&&(e=Math.round(t,10)),t>=100&&t<1e4&&(e=10*Math.round(t/10)),t>=1e4&&t<1e6&&(e=100*Math.round(t/100)),t>=1e6&&(e=1e3*Math.round(t/1e3)),e}},{key:"getZoomForScale",value:function(e,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"m";if(Number.isNaN(Number(e)))return 0;if(e<0)return 0;var r=t.getResolutionForScale(e,n),o=i.reduce(function(t,e){return Math.abs(e-r)<Math.abs(t-r)?e:t});return(0,p.default)(i,function(t){return Math.abs(t-o)<=1e-10})}}]),t}();g.getLayerByOlUid=function(t,e){return g.getAllLayers(t).find(function(t){return e===t.ol_uid.toString()})},e.default=g},function(t,e,i){t.exports=function(){"use strict";function t(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function e(t,e){return t<e?-1:t>e?1:0}return function(i,n,r,o,a){!function e(i,n,r,o,a){for(;o>r;){if(o-r>600){var s=o-r+1,l=n-r+1,u=Math.log(s),h=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*h*(s-h)/s)*(l-s/2<0?-1:1);e(i,n,Math.max(r,Math.floor(n-l*h/s+c)),Math.min(o,Math.floor(n+(s-l)*h/s+c)),a)}var f=i[n],p=r,d=o;for(t(i,r,n),a(i[o],f)>0&&t(i,r,o);p<d;){for(t(i,p,d),p++,d--;a(i[p],f)<0;)p++;for(;a(i[d],f)>0;)d--}0===a(i[r],f)?t(i,r,d):t(i,++d,o),d<=n&&(r=d+1),n<=d&&(o=d-1)}}(i,n,r||0,o||i.length-1,a||e)}}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UrlUtil=void 0;var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),o=u(i(399)),a=u(i(402)),s=u(i(405)),l=u(i(469));function u(t){return t&&t.__esModule?t:{default:t}}var h=e.UrlUtil=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return r(t,null,[{key:"read",value:function(t){return new o.default(t,null,a.default.parse)}},{key:"write",value:function(t){return t.toString()}},{key:"getBasePath",value:function(e){var i=t.read(e);return i.protocol+"//"+i.host+i.pathname}},{key:"getQueryParams",value:function(e){return t.read(e).query}},{key:"getQueryParam",value:function(e,i){var n=t.getQueryParams(e);return n[Object.keys(n).filter(function(t){return t.toLowerCase()===i.toLowerCase()})[0]]}},{key:"joinQueryParams",value:function(t,e,i){var n=(0,s.default)(t);return i.forEach(function(t){n[t]&&(n[t]=n[t].split(",").concat(e[t].split(",")).join(","))}),n}},{key:"hasQueryParam",value:function(e,i){var n=t.getQueryParams(e);return!!Object.keys(n).some(function(t){return t.toLowerCase()===i.toLowerCase()})}},{key:"createValidGetCapabilitiesRequest",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"WMS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"1.3.0",r=t.getBasePath(e),o=t.getQueryParams(e);return t.hasQueryParam(e,"SERVICE")||(o.SERVICE=i),t.hasQueryParam(e,"REQUEST")||(o.REQUEST="GetCapabilities"),t.hasQueryParam(e,"VERSION")||(o.VERSION=n),r+"?"+t.objectToRequestString(o)}},{key:"bundleOgcRequests",value:function(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["LAYERS","QUERY_LAYERS","STYLES"],o={};e.forEach(function(e){var i=t.getQueryParams(e),n=t.getBasePath(e);if(o[n]){var a=o[n],s=i;o[n]=t.joinQueryParams(a,s,r)}else o[n]=i});var a=[];if(i){var s=!0,l=!1,u=void 0;try{for(var h,c=Object.entries(o)[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value,p=n(f,2),d=p[0],g=p[1],_=t.read(d);_.set("query",g),a.push(t.write(_))}}catch(t){l=!0,u=t}finally{try{!s&&c.return&&c.return()}finally{if(l)throw u}}return a}return o}},{key:"objectToRequestString",value:function(t){return Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&")}},{key:"isValid",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{protocols:["http","https","ftp"],require_tld:!1,require_protocol:!0,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,host_whitelist:!1,host_blacklist:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1};return(0,l.default)(t,e)}}]),t}();e.default=h},function(t,e,i){"use strict";(function(e){var n=i(400),r=i(401),o=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,s=[["#","hash"],["?","query"],function(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function u(t){var i,n=e&&e.location||{},r={},o=typeof(t=t||n);if("blob:"===t.protocol)r=new c(unescape(t.pathname),{});else if("string"===o)for(i in r=new c(t,{}),l)delete r[i];else if("object"===o){for(i in t)i in l||(r[i]=t[i]);void 0===r.slashes&&(r.slashes=a.test(t.href))}return r}function h(t){var e=o.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function c(t,e,i){if(!(this instanceof c))return new c(t,e,i);var o,a,l,f,p,d,g=s.slice(),_=typeof e,v=this,y=0;for("object"!==_&&"string"!==_&&(i=e,e=null),i&&"function"!=typeof i&&(i=r.parse),e=u(e),o=!(a=h(t||"")).protocol&&!a.slashes,v.slashes=a.slashes||o&&e.slashes,v.protocol=a.protocol||e.protocol||"",t=a.rest,a.slashes||(g[3]=[/(.*)/,"pathname"]);y<g.length;y++)"function"!=typeof(f=g[y])?(l=f[0],d=f[1],l!=l?v[d]=t:"string"==typeof l?~(p=t.indexOf(l))&&("number"==typeof f[2]?(v[d]=t.slice(0,p),t=t.slice(p+f[2])):(v[d]=t.slice(p),t=t.slice(0,p))):(p=l.exec(t))&&(v[d]=p[1],t=t.slice(0,p.index)),v[d]=v[d]||o&&f[3]&&e[d]||"",f[4]&&(v[d]=v[d].toLowerCase())):t=f(t);i&&(v.query=i(v.query)),o&&e.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==e.pathname)&&(v.pathname=function(t,e){for(var i=(e||"/").split("/").slice(0,-1).concat(t.split("/")),n=i.length,r=i[n-1],o=!1,a=0;n--;)"."===i[n]?i.splice(n,1):".."===i[n]?(i.splice(n,1),a++):a&&(0===n&&(o=!0),i.splice(n,1),a--);return o&&i.unshift(""),"."!==r&&".."!==r||i.push(""),i.join("/")}(v.pathname,e.pathname)),n(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(f=v.auth.split(":"),v.username=f[0]||"",v.password=f[1]||""),v.origin=v.protocol&&v.host&&"file:"!==v.protocol?v.protocol+"//"+v.host:"null",v.href=v.toString()}c.prototype={set:function(t,e,i){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(i||r.parse)(e)),o[t]=e;break;case"port":o[t]=e,n(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,/:\d+$/.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!i;break;case"pathname":case"hash":if(e){var a="pathname"===t?"/":"#";o[t]=e.charAt(0)!==a?a+e:e}else o[t]=e;break;default:o[t]=e}for(var l=0;l<s.length;l++){var u=s[l];u[4]&&(o[u[1]]=o[u[1]].toLowerCase())}return o.origin=o.protocol&&o.host&&"file:"!==o.protocol?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=r.stringify);var e,i=this,n=i.protocol;n&&":"!==n.charAt(n.length-1)&&(n+=":");var o=n+(i.slashes?"//":"");return i.username&&(o+=i.username,i.password&&(o+=":"+i.password),o+="@"),o+=i.host+i.pathname,(e="object"==typeof i.query?t(i.query):i.query)&&(o+="?"!==e.charAt(0)?"?"+e:e),i.hash&&(o+=i.hash),o}},c.extractProtocol=h,c.location=u,c.qs=r,t.exports=c}).call(this,i(101))},function(t,e,i){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty;function r(t){return decodeURIComponent(t.replace(/\+/g," "))}e.stringify=function(t,e){e=e||"";var i,r,o=[];for(r in"string"!=typeof e&&(e="?"),t)n.call(t,r)&&((i=t[r])||null!=i&&!isNaN(i)||(i=""),o.push(encodeURIComponent(r)+"="+encodeURIComponent(i)));return o.length?e+o.join("&"):""},e.parse=function(t){for(var e,i=/([^=?&]+)=?([^&]*)/g,n={};e=i.exec(t);){var o=r(e[1]),a=r(e[2]);o in n||(n[o]=a)}return n}},function(t,e,i){"use strict";const n=i(403),r=i(404);function o(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function a(t,e){return e.decode?r(t):t}function s(t){const e=t.indexOf("?");return-1===e?"":t.slice(e+1)}function l(t,e){const i=function(t){let e;switch(t.arrayFormat){case"index":return(t,i,n)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=i):n[t]=i};case"bracket":return(t,i,n)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],i):n[t]=[i]:n[t]=i};default:return(t,e,i)=>{void 0!==i[t]?i[t]=[].concat(i[t],e):i[t]=e}}}(e=Object.assign({decode:!0,arrayFormat:"none"},e)),n=Object.create(null);if("string"!=typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const r of t.split("&")){let[t,o]=r.replace(/\+/g," ").split("=");o=void 0===o?null:a(o,e),i(a(t,e),o,n)}return Object.keys(n).sort().reduce((t,e)=>{const i=n[e];return Boolean(i)&&"object"==typeof i&&!Array.isArray(i)?t[e]=function t(e){return Array.isArray(e)?e.sort():"object"==typeof e?t(Object.keys(e)).sort((t,e)=>Number(t)-Number(e)).map(t=>e[t]):e}(i):t[e]=i,t},Object.create(null))}e.extract=s,e.parse=l,e.stringify=((t,e)=>{if(!t)return"";const i=function(t){switch(t.arrayFormat){case"index":return(e,i,n)=>null===i?[o(e,t),"[",n,"]"].join(""):[o(e,t),"[",o(n,t),"]=",o(i,t)].join("");case"bracket":return(e,i)=>null===i?[o(e,t),"[]"].join(""):[o(e,t),"[]=",o(i,t)].join("");default:return(e,i)=>null===i?o(e,t):[o(e,t),"=",o(i,t)].join("")}}(e=Object.assign({encode:!0,strict:!0,arrayFormat:"none"},e)),n=Object.keys(t);return!1!==e.sort&&n.sort(e.sort),n.map(n=>{const r=t[n];if(void 0===r)return"";if(null===r)return o(n,e);if(Array.isArray(r)){const t=[];for(const e of r.slice())void 0!==e&&t.push(i(n,e,t.length));return t.join("&")}return o(n,e)+"="+o(r,e)}).filter(t=>t.length>0).join("&")}),e.parseUrl=((t,e)=>{const i=t.indexOf("#");return-1!==i&&(t=t.slice(0,i)),{url:t.split("?")[0]||"",query:l(s(t),e)}})},function(t,e,i){"use strict";t.exports=(t=>encodeURIComponent(t).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`))},function(t,e,i){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),r=new RegExp("(%[a-f0-9]{2})+","gi");function o(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var i=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],o(i),o(n))}function a(t){try{return decodeURIComponent(t)}catch(r){for(var e=t.match(n),i=1;i<e.length;i++)e=(t=o(e,i).join("")).match(n);return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},i=r.exec(t);i;){try{e[i[0]]=decodeURIComponent(i[0])}catch(t){var n=a(i[0]);n!==i[0]&&(e[i[0]]=n)}i=r.exec(t)}e["%C2"]="�";for(var o=Object.keys(e),s=0;s<o.length;s++){var l=o[s];t=t.replace(new RegExp(l,"g"),e[l])}return t}(t)}}},function(t,e,i){var n=i(406);t.exports=function(t){return n(t,4)}},function(t,e,i){var n=i(155),r=i(435),o=i(201),a=i(437),s=i(444),l=i(447),u=i(448),h=i(449),c=i(451),f=i(214),p=i(452),d=i(119),g=i(457),_=i(458),v=i(463),y=i(54),m=i(159),x=i(465),E=i(79),S=i(467),T=i(118),C="[object Arguments]",R="[object Function]",I="[object Object]",b={};b[C]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object DataView]"]=b["[object Boolean]"]=b["[object Date]"]=b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Map]"]=b["[object Number]"]=b[I]=b["[object RegExp]"]=b["[object Set]"]=b["[object String]"]=b["[object Symbol]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b["[object Error]"]=b[R]=b["[object WeakMap]"]=!1,t.exports=function t(e,i,w,L,O,A){var P,F=1&i,M=2&i,D=4&i;if(w&&(P=O?w(e,L,O,A):w(e)),void 0!==P)return P;if(!E(e))return e;var k=y(e);if(k){if(P=g(e),!F)return u(e,P)}else{var N=d(e),U=N==R||"[object GeneratorFunction]"==N;if(m(e))return l(e,F);if(N==I||N==C||U&&!O){if(P=M||U?{}:v(e),!F)return M?c(e,s(P,e)):h(e,a(P,e))}else{if(!b[N])return O?e:{};P=_(e,N,F)}}A||(A=new n);var G=A.get(e);if(G)return G;if(A.set(e,P),S(e))return e.forEach(function(n){P.add(t(n,i,w,n,e,A))}),P;if(x(e))return e.forEach(function(n,r){P.set(r,t(n,i,w,r,e,A))}),P;var j=D?M?p:f:M?keysIn:T,B=k?void 0:j(e);return r(B||e,function(n,r){B&&(n=e[r=n]),o(P,r,t(n,i,w,r,e,A))}),P}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,i){var n=i(114),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,i=n(e,t);return!(i<0||(i==e.length-1?e.pop():r.call(e,i,1),--this.size,0))}},function(t,e,i){var n=i(114);t.exports=function(t){var e=this.__data__,i=n(e,t);return i<0?void 0:e[i][1]}},function(t,e,i){var n=i(114);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,i){var n=i(114);t.exports=function(t,e){var i=this.__data__,r=n(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this}},function(t,e,i){var n=i(113);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,i){var n=i(113),r=i(157),o=i(158);t.exports=function(t,e){var i=this.__data__;if(i instanceof n){var a=i.__data__;if(!r||a.length<199)return a.push([t,e]),this.size=++i.size,this;i=this.__data__=new o(a)}return i.set(t,e),this.size=i.size,this}},function(t,e,i){var n=i(198),r=i(420),o=i(79),a=i(200),s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,c=u.hasOwnProperty,f=RegExp("^"+h.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||r(t))&&(n(t)?f:s).test(a(t))}},function(t,e,i){var n=i(100),r=Object.prototype,o=r.hasOwnProperty,a=r.toString,s=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),i=t[s];try{t[s]=void 0;var n=!0}catch(t){}var r=a.call(t);return n&&(e?t[s]=i:delete t[s]),r}},function(t,e){var i=Object.prototype.toString;t.exports=function(t){return i.call(t)}},function(t,e,i){var n,r=i(421),o=(n=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!o&&o in t}},function(t,e,i){var n=i(53)["__core-js_shared__"];t.exports=n},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,i){var n=i(424),r=i(113),o=i(157);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||r),string:new n}}},function(t,e,i){var n=i(425),r=i(426),o=i(427),a=i(428),s=i(429);function l(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l},function(t,e,i){var n=i(115);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,i){var n=i(115),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return r.call(e,t)?e[t]:void 0}},function(t,e,i){var n=i(115),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:r.call(e,t)}},function(t,e,i){var n=i(115);t.exports=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,i){var n=i(116);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,i){var n=i(116);t.exports=function(t){return n(this,t).get(t)}},function(t,e,i){var n=i(116);t.exports=function(t){return n(this,t).has(t)}},function(t,e,i){var n=i(116);t.exports=function(t,e){var i=n(this,t),r=i.size;return i.set(t,e),this.size+=i.size==r?0:1,this}},function(t,e){t.exports=function(t,e){for(var i=-1,n=null==t?0:t.length;++i<n&&!1!==e(t[i],i,t););return t}},function(t,e,i){var n=i(78),r=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=r},function(t,e,i){var n=i(117),r=i(118);t.exports=function(t,e){return t&&n(e,r(e),t)}},function(t,e){t.exports=function(t,e){for(var i=-1,n=Array(t);++i<t;)n[i]=e(i);return n}},function(t,e,i){var n=i(94),r=i(67);t.exports=function(t){return r(t)&&"[object Arguments]"==n(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,i){var n=i(94),r=i(161),o=i(67),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&r(t.length)&&!!a[n(t)]}},function(t,e,i){var n=i(164),r=i(443),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return r(t);var e=[];for(var i in Object(t))o.call(t,i)&&"constructor"!=i&&e.push(i);return e}},function(t,e,i){var n=i(207)(Object.keys,Object);t.exports=n},function(t,e,i){var n=i(117),r=i(209);t.exports=function(t,e){return t&&n(e,r(e),t)}},function(t,e,i){var n=i(79),r=i(164),o=i(446),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=r(t),i=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&i.push(s);return i}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}},function(t,e,i){(function(t){var n=i(53),r=e&&!e.nodeType&&e,o=r&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===r?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var i=t.length,n=s?s(i):new t.constructor(i);return t.copy(n),n}}).call(this,i(160)(t))},function(t,e){t.exports=function(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i<n;)e[i]=t[i];return e}},function(t,e,i){var n=i(117),r=i(165);t.exports=function(t,e){return n(t,r(t),e)}},function(t,e){t.exports=function(t,e){for(var i=-1,n=null==t?0:t.length,r=0,o=[];++i<n;){var a=t[i];e(a,i,t)&&(o[r++]=a)}return o}},function(t,e,i){var n=i(117),r=i(211);t.exports=function(t,e){return n(t,r(t),e)}},function(t,e,i){var n=i(215),r=i(211),o=i(209);t.exports=function(t){return n(t,o,r)}},function(t,e,i){var n=i(78)(i(53),"DataView");t.exports=n},function(t,e,i){var n=i(78)(i(53),"Promise");t.exports=n},function(t,e,i){var n=i(78)(i(53),"Set");t.exports=n},function(t,e,i){var n=i(78)(i(53),"WeakMap");t.exports=n},function(t,e){var i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&i.call(t,"index")&&(n.index=t.index,n.input=t.input),n}},function(t,e,i){var n=i(166),r=i(459),o=i(460),a=i(461),s=i(462);t.exports=function(t,e,i){var l=t.constructor;switch(e){case"[object ArrayBuffer]":return n(t);case"[object Boolean]":case"[object Date]":return new l(+t);case"[object DataView]":return r(t,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,i);case"[object Map]":return new l;case"[object Number]":case"[object String]":return new l(t);case"[object RegExp]":return o(t);case"[object Set]":return new l;case"[object Symbol]":return a(t)}}},function(t,e,i){var n=i(166);t.exports=function(t,e){var i=e?n(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}},function(t,e){var i=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,i.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,i){var n=i(100),r=n?n.prototype:void 0,o=r?r.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e,i){var n=i(166);t.exports=function(t,e){var i=e?n(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}},function(t,e,i){var n=i(464),r=i(213),o=i(164);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:n(r(t))}},function(t,e,i){var n=i(79),r=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(r)return r(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}();t.exports=o},function(t,e,i){var n=i(466),r=i(162),o=i(163),a=o&&o.isMap,s=a?r(a):n;t.exports=s},function(t,e,i){var n=i(119),r=i(67);t.exports=function(t){return r(t)&&"[object Map]"==n(t)}},function(t,e,i){var n=i(468),r=i(162),o=i(163),a=o&&o.isSet,s=a?r(a):n;t.exports=s},function(t,e,i){var n=i(119),r=i(67);t.exports=function(t){return r(t)&&"[object Set]"==n(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if((0,n.default)(t),!t||t.length>=2083||/[\s<>]/.test(t))return!1;if(0===t.indexOf("mailto:"))return!1;e=(0,a.default)(e,l);var i=void 0,s=void 0,c=void 0,f=void 0,p=void 0,d=void 0,g=void 0,_=void 0;if(g=t.split("#"),t=g.shift(),g=t.split("?"),t=g.shift(),(g=t.split("://")).length>1){if(i=g.shift().toLowerCase(),e.require_valid_protocol&&-1===e.protocols.indexOf(i))return!1}else{if(e.require_protocol)return!1;if("//"===t.substr(0,2)){if(!e.allow_protocol_relative_urls)return!1;g[0]=t.substr(2)}}if(""===(t=g.join("://")))return!1;if(g=t.split("/"),""===(t=g.shift())&&!e.require_host)return!0;if((g=t.split("@")).length>1&&(s=g.shift()).indexOf(":")>=0&&s.split(":").length>2)return!1;d=null,_=null;var v=(f=g.join("@")).match(u);return v?(c="",_=v[1],d=v[2]||null):(c=(g=f.split(":")).shift(),g.length&&(d=g.join(":"))),!(null!==d&&(p=parseInt(d,10),!/^[0-9]+$/.test(d)||p<=0||p>65535))&&(!!((0,o.default)(c)||(0,r.default)(c,e)||_&&(0,o.default)(_,6))&&(c=c||_,!(e.host_whitelist&&!h(c,e.host_whitelist))&&(!e.host_blacklist||!h(c,e.host_blacklist))))};var n=s(i(167)),r=s(i(470)),o=s(i(471)),a=s(i(217));function s(t){return t&&t.__esModule?t:{default:t}}var l={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},u=/^\[([^\]]+)\](?::([0-9]+))?$/;function h(t,e){for(var i=0;i<e.length;i++){var n=e[i];if(t===n||(r=n,"[object RegExp]"===Object.prototype.toString.call(r)&&n.test(t)))return!0}var r;return!1}t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,n.default)(t),(e=(0,r.default)(e,a)).allow_trailing_dot&&"."===t[t.length-1]&&(t=t.substring(0,t.length-1));for(var i=t.split("."),o=0;o<i.length;o++)if(i[o].length>63)return!1;if(e.require_tld){var s=i.pop();if(!i.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(s))return!1;if(/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(s))return!1}for(var l,u=0;u<i.length;u++){if(l=i[u],e.allow_underscores&&(l=l.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(l))return!1;if(/[\uff01-\uff5e]/.test(l))return!1;if("-"===l[0]||"-"===l[l.length-1])return!1}return!0};var n=o(i(167)),r=o(i(217));function o(t){return t&&t.__esModule?t:{default:t}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,r.default)(e),!(i=String(i)))return t(e,4)||t(e,6);if("4"===i)return!!o.test(e)&&e.split(".").sort(function(t,e){return t-e})[3]<=255;if("6"===i){var n=e.split(":"),s=!1,l=t(n[n.length-1],4),u=l?7:8;if(n.length>u)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(n.shift(),n.shift(),s=!0):"::"===e.substr(e.length-2)&&(n.pop(),n.pop(),s=!0);for(var h=0;h<n.length;++h)if(""===n[h]&&h>0&&h<n.length-1){if(s)return!1;s=!0}else if(l&&h===n.length-1);else if(!a.test(n[h]))return!1;return s?n.length>=1:n.length===u}return!1};var n,r=(n=i(167))&&n.__esModule?n:{default:n},o=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,a=/^[0-9A-F]{1,4}$/i;t.exports=e.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(473)).getLogger("app-logger");n.setLevel("DEBUG"),e.default=n},function(t,e,i){var n,r;!function(o,a){"use strict";void 0===(r="function"==typeof(n=function(){var t=function(){},e="undefined",i=["trace","debug","info","warn","error"];function n(t,e){var i=t[e];if("function"==typeof i.bind)return i.bind(t);try{return Function.prototype.bind.call(i,t)}catch(e){return function(){return Function.prototype.apply.apply(i,[t,arguments])}}}function r(e,n){for(var r=0;r<i.length;r++){var o=i[r];this[o]=r<e?t:this.methodFactory(o,e,n)}this.log=this.debug}function o(i,o,a){return function(i){return"debug"===i&&(i="log"),typeof console!==e&&(void 0!==console[i]?n(console,i):void 0!==console.log?n(console,"log"):t)}(i)||function(t,i,n){return function(){typeof console!==e&&(r.call(this,i,n),this[t].apply(this,arguments))}}.apply(this,arguments)}function a(t,n,a){var s,l=this,u="loglevel";function h(){var t;if(typeof window!==e){try{t=window.localStorage[u]}catch(t){}if(typeof t===e)try{var i=window.document.cookie,n=i.indexOf(encodeURIComponent(u)+"=");-1!==n&&(t=/^([^;]+)/.exec(i.slice(n))[1])}catch(t){}return void 0===l.levels[t]&&(t=void 0),t}}t&&(u+=":"+t),l.name=t,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=a||o,l.getLevel=function(){return s},l.setLevel=function(n,o){if("string"==typeof n&&void 0!==l.levels[n.toUpperCase()]&&(n=l.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=l.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(s=n,!1!==o&&function(t){var n=(i[t]||"silent").toUpperCase();if(typeof window!==e){try{return void(window.localStorage[u]=n)}catch(t){}try{window.document.cookie=encodeURIComponent(u)+"="+n+";"}catch(t){}}}(n),r.call(l,n,t),typeof console===e&&n<l.levels.SILENT)return"No console available for logging"},l.setDefaultLevel=function(t){h()||l.setLevel(t,!1)},l.enableAll=function(t){l.setLevel(l.levels.TRACE,t)},l.disableAll=function(t){l.setLevel(l.levels.SILENT,t)};var c=h();null==c&&(c=null==n?"WARN":n),l.setLevel(c,!1)}var s=new a,l={};s.getLogger=function(t){if("string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=l[t];return e||(e=l[t]=new a(t,s.getLevel(),s.methodFactory)),e};var u=typeof window!==e?window.log:void 0;return s.noConflict=function(){return typeof window!==e&&window.log===s&&(window.log=u),s},s.getLoggers=function(){return l},s})?n.call(e,i,e,t):n)||(t.exports=r)}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),o=s(i(475)),a=s(i(476));function s(t){return t&&t.__esModule?t:{default:t}}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return r(t,null,[{key:"getFeatureTypeName",value:function(t){var e=t.getId(),i=e?e.split("."):e;return Array.isArray(i)?i[0]:void 0}},{key:"resolveAttributeTemplate",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"n.v.",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(t,e){return e},s="",l=new RegExp("\\{\\{(.*?)\\}\\}","g"),u=(0,o.default)(e)?e.match(l):null;return u&&u.forEach(function(o){var a=0,s=!0,l=!1,u=void 0;try{for(var h,c=Object.entries(t.getProperties())[Symbol.iterator]();!(s=(h=c.next()).done);s=!0){var f=h.value,p=n(f,2),d=p[0],g=p[1];if(o.slice(2,o.length-2).toLowerCase()===d.toLowerCase()){e=e.replace(o,r(d,g));break}a++}}catch(t){l=!0,u=t}finally{try{!s&&c.return&&c.return()}finally{if(l)throw u}}a===Object.keys(t.getProperties()).length&&(e=e.replace(o,i))}),(s=e)||(s=t.getId()),(s=a.default.urlify(s)).replace(/\n/g,"<br>")}}]),t}();e.default=l},function(t,e,i){var n=i(94),r=i(54),o=i(67);t.exports=function(t){return"string"==typeof t||!r(t)&&o(t)&&"[object String]"==n(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,null,[{key:"urlify",value:function(t){return t.replace(/(https?:\/\/[^\s]+)/g,'<a href="$1" target="_blank">$1</a>')}},{key:"coerce",value:function(e){if(!(e instanceof String||"string"==typeof e))return e;if("true"===e.toLowerCase())return!0;if("false"===e.toLowerCase())return!1;if(/^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/.test(e))return parseFloat(e);if(e.startsWith("["))return JSON.parse(e).map(function(e){return t.coerce(e)});if(e.startsWith("{")){var i=JSON.parse(e),n={};return Object.keys(i).forEach(function(e){n[e]=t.coerce(i[e])}),n}return e}},{key:"stringDivider",value:function(e,i,n){var r=0,o=i;if(e.length>i){for(var a=i,s=void 0,l=void 0;a>0&&" "!==e[a]&&"-"!==e[a];)a--;return a>0?(s="-"===e.substring(a,a+1)?e.substring(0,a+1):e.substring(0,a),l=e.substring(a+1),s+n+t.stringDivider(l,i,n)):(s=e.substring(r,o+1)+"-",l=e.substring(o+1),r=o,o+=i,s+n+t.stringDivider(l,i,n))}return e}},{key:"stripHTMLTags",value:function(t){var e=void 0;return DOMParser&&(e=(new DOMParser).parseFromString(t,"text/html").body.textContent||""),e}}]),t}();e.default=r},function(t,e,i){var n=i(478),r=i(479),o=i(507),a=Math.max;t.exports=function(t,e,i){var s=null==t?0:t.length;if(!s)return-1;var l=null==i?0:o(i);return l<0&&(l=a(s+l,0)),n(t,r(e,3),l)}},function(t,e){t.exports=function(t,e,i,n){for(var r=t.length,o=i+(n?1:-1);n?o--:++o<r;)if(e(t[o],o,t))return o;return-1}},function(t,e,i){var n=i(480),r=i(493),o=i(503),a=i(54),s=i(504);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?r(t[0],t[1]):n(t):s(t)}},function(t,e,i){var n=i(481),r=i(492),o=i(221);t.exports=function(t){var e=r(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(i){return i===t||n(i,t,e)}}},function(t,e,i){var n=i(155),r=i(218);t.exports=function(t,e,i,o){var a=i.length,s=a,l=!o;if(null==t)return!s;for(t=Object(t);a--;){var u=i[a];if(l&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a<s;){var h=(u=i[a])[0],c=t[h],f=u[1];if(l&&u[2]){if(void 0===c&&!(h in t))return!1}else{var p=new n;if(o)var d=o(c,f,h,t,e,p);if(!(void 0===d?r(f,c,3,o,p):d))return!1}}return!0}},function(t,e,i){var n=i(155),r=i(219),o=i(488),a=i(491),s=i(119),l=i(54),u=i(159),h=i(206),c="[object Arguments]",f="[object Array]",p="[object Object]",d=Object.prototype.hasOwnProperty;t.exports=function(t,e,i,g,_,v){var y=l(t),m=l(e),x=y?f:s(t),E=m?f:s(e),S=(x=x==c?p:x)==p,T=(E=E==c?p:E)==p,C=x==E;if(C&&u(t)){if(!u(e))return!1;y=!0,S=!1}if(C&&!S)return v||(v=new n),y||h(t)?r(t,e,i,g,_,v):o(t,e,x,i,g,_,v);if(!(1&i)){var R=S&&d.call(t,"__wrapped__"),I=T&&d.call(e,"__wrapped__");if(R||I){var b=R?t.value():t,w=I?e.value():e;return v||(v=new n),_(b,w,i,g,v)}}return!!C&&(v||(v=new n),a(t,e,i,g,_,v))}},function(t,e,i){var n=i(158),r=i(484),o=i(485);function a(t){var e=-1,i=null==t?0:t.length;for(this.__data__=new n;++e<i;)this.add(t[e])}a.prototype.add=a.prototype.push=r,a.prototype.has=o,t.exports=a},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var i=-1,n=null==t?0:t.length;++i<n;)if(e(t[i],i,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,i){var n=i(100),r=i(216),o=i(156),a=i(219),s=i(489),l=i(490),u=n?n.prototype:void 0,h=u?u.valueOf:void 0;t.exports=function(t,e,i,n,u,c,f){switch(i){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!c(new r(t),new r(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=s;case"[object Set]":var d=1&n;if(p||(p=l),t.size!=e.size&&!d)return!1;var g=f.get(t);if(g)return g==e;n|=2,f.set(t,e);var _=a(p(t),p(e),n,u,c,f);return f.delete(t),_;case"[object Symbol]":if(h)return h.call(t)==h.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,i=Array(t.size);return t.forEach(function(t,n){i[++e]=[n,t]}),i}},function(t,e){t.exports=function(t){var e=-1,i=Array(t.size);return t.forEach(function(t){i[++e]=t}),i}},function(t,e,i){var n=i(214),r=Object.prototype.hasOwnProperty;t.exports=function(t,e,i,o,a,s){var l=1&i,u=n(t),h=u.length;if(h!=n(e).length&&!l)return!1;for(var c=h;c--;){var f=u[c];if(!(l?f in e:r.call(e,f)))return!1}var p=s.get(t);if(p&&s.get(e))return p==e;var d=!0;s.set(t,e),s.set(e,t);for(var g=l;++c<h;){var _=t[f=u[c]],v=e[f];if(o)var y=l?o(v,_,f,e,t,s):o(_,v,f,t,e,s);if(!(void 0===y?_===v||a(_,v,i,o,s):y)){d=!1;break}g||(g="constructor"==f)}if(d&&!g){var m=t.constructor,x=e.constructor;m!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof x&&x instanceof x)&&(d=!1)}return s.delete(t),s.delete(e),d}},function(t,e,i){var n=i(220),r=i(118);t.exports=function(t){for(var e=r(t),i=e.length;i--;){var o=e[i],a=t[o];e[i]=[o,a,n(a)]}return e}},function(t,e,i){var n=i(218),r=i(222),o=i(500),a=i(168),s=i(220),l=i(221),u=i(121);t.exports=function(t,e){return a(t)&&s(e)?l(u(t),e):function(i){var a=r(i,t);return void 0===a&&a===e?o(i,t):n(e,a,3)}}},function(t,e,i){var n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,o=i(495)(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(n,function(t,i,n,o){e.push(n?o.replace(r,"$1"):i||t)}),e});t.exports=o},function(t,e,i){var n=i(496);t.exports=function(t){var e=n(t,function(t){return 500===i.size&&i.clear(),t}),i=e.cache;return e}},function(t,e,i){var n=i(158),r="Expected a function";function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(r);var i=function(){var n=arguments,r=e?e.apply(this,n):n[0],o=i.cache;if(o.has(r))return o.get(r);var a=t.apply(this,n);return i.cache=o.set(r,a)||o,a};return i.cache=new(o.Cache||n),i}o.Cache=n,t.exports=o},function(t,e,i){var n=i(498);t.exports=function(t){return null==t?"":n(t)}},function(t,e,i){var n=i(100),r=i(499),o=i(54),a=i(120),s=n?n.prototype:void 0,l=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return r(e,t)+"";if(a(e))return l?l.call(e):"";var i=e+"";return"0"==i&&1/e==-1/0?"-0":i}},function(t,e){t.exports=function(t,e){for(var i=-1,n=null==t?0:t.length,r=Array(n);++i<n;)r[i]=e(t[i],i,t);return r}},function(t,e,i){var n=i(501),r=i(502);t.exports=function(t,e){return null!=t&&r(t,e,n)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,i){var n=i(224),r=i(204),o=i(54),a=i(205),s=i(161),l=i(121);t.exports=function(t,e,i){for(var u=-1,h=(e=n(e,t)).length,c=!1;++u<h;){var f=l(e[u]);if(!(c=null!=t&&i(t,f)))break;t=t[f]}return c||++u!=h?c:!!(h=null==t?0:t.length)&&s(h)&&a(f,h)&&(o(t)||r(t))}},function(t,e){t.exports=function(t){return t}},function(t,e,i){var n=i(505),r=i(506),o=i(168),a=i(121);t.exports=function(t){return o(t)?n(a(t)):r(t)}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,i){var n=i(223);t.exports=function(t){return function(e){return n(e,t)}}},function(t,e,i){var n=i(508);t.exports=function(t){var e=n(t),i=e%1;return e==e?i?e-i:e:0}},function(t,e,i){var n=i(509);t.exports=function(t){return t?(t=n(t))===1/0||t===-1/0?1.7976931348623157e308*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,i){var n=i(79),r=i(120),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var i=s.test(t);return i||l.test(t)?u(t.slice(2),i?2:8):a.test(t)?NaN:+t}},function(t,e,i){(function(t,n){var r=/%[sdj%]/g;e.format=function(t){if(!v(t)){for(var e=[],i=0;i<arguments.length;i++)e.push(s(arguments[i]));return e.join(" ")}i=1;for(var n=arguments,o=n.length,a=String(t).replace(r,function(t){if("%%"===t)return"%";if(i>=o)return t;switch(t){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(t){return"[Circular]"}default:return t}}),l=n[i];i<o;l=n[++i])g(l)||!x(l)?a+=" "+l:a+=" "+s(l);return a},e.deprecate=function(i,r){if(y(t.process))return function(){return e.deprecate(i,r).apply(this,arguments)};if(!0===n.noDeprecation)return i;var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),o=!0}return i.apply(this,arguments)}};var o,a={};function s(t,i){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(i)?n.showHidden=i:i&&e._extend(n,i),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),h(n,t,n.depth)}function l(t,e){var i=s.styles[e];return i?"["+s.colors[i][0]+"m"+t+"["+s.colors[i][1]+"m":t}function u(t,e){return t}function h(t,i,n){if(t.customInspect&&i&&T(i.inspect)&&i.inspect!==e.inspect&&(!i.constructor||i.constructor.prototype!==i)){var r=i.inspect(n,t);return v(r)||(r=h(t,r,n)),r}var o=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(v(e)){var i="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(i,"string")}return _(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}(t,i);if(o)return o;var a=Object.keys(i),s=function(t){var e={};return a.forEach(function(t,i){e[t]=!0}),e}();if(t.showHidden&&(a=Object.getOwnPropertyNames(i)),S(i)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(i);if(0===a.length){if(T(i)){var l=i.name?": "+i.name:"";return t.stylize("[Function"+l+"]","special")}if(m(i))return t.stylize(RegExp.prototype.toString.call(i),"regexp");if(E(i))return t.stylize(Date.prototype.toString.call(i),"date");if(S(i))return c(i)}var u,x="",C=!1,R=["{","}"];return p(i)&&(C=!0,R=["[","]"]),T(i)&&(x=" [Function"+(i.name?": "+i.name:"")+"]"),m(i)&&(x=" "+RegExp.prototype.toString.call(i)),E(i)&&(x=" "+Date.prototype.toUTCString.call(i)),S(i)&&(x=" "+c(i)),0!==a.length||C&&0!=i.length?n<0?m(i)?t.stylize(RegExp.prototype.toString.call(i),"regexp"):t.stylize("[Object]","special"):(t.seen.push(i),u=C?function(t,e,i,n,r){for(var o=[],a=0,s=e.length;a<s;++a)b(e,String(a))?o.push(f(t,e,i,n,String(a),!0)):o.push("");return r.forEach(function(r){r.match(/^\d+$/)||o.push(f(t,e,i,n,r,!0))}),o}(t,i,n,s,a):a.map(function(e){return f(t,i,n,s,e,C)}),t.seen.pop(),function(t,e,i){return t.reduce(function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?i[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+i[1]:i[0]+e+" "+t.join(", ")+" "+i[1]}(u,x,R)):R[0]+x+R[1]}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,i,n,r,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(e,r)||{value:e[r]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),b(n,r)||(a="["+r+"]"),s||(t.seen.indexOf(l.value)<0?(s=g(i)?h(t,l.value,null):h(t,l.value,i-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),y(a)){if(o&&r.match(/^\d+$/))return s;(a=JSON.stringify(""+r)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function _(t){return"number"==typeof t}function v(t){return"string"==typeof t}function y(t){return void 0===t}function m(t){return x(t)&&"[object RegExp]"===C(t)}function x(t){return"object"==typeof t&&null!==t}function E(t){return x(t)&&"[object Date]"===C(t)}function S(t){return x(t)&&("[object Error]"===C(t)||t instanceof Error)}function T(t){return"function"==typeof t}function C(t){return Object.prototype.toString.call(t)}function R(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(y(o)&&(o=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!a[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var i=n.pid;a[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,i,n)}}else a[t]=function(){};return a[t]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=_,e.isString=v,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=y,e.isRegExp=m,e.isObject=x,e.isDate=E,e.isError=S,e.isFunction=T,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=i(512);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function b(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,i;console.log("%s - %s",(i=[R((t=new Date).getHours()),R(t.getMinutes()),R(t.getSeconds())].join(":"),[t.getDate(),I[t.getMonth()],i].join(" ")),e.format.apply(e,arguments))},e.inherits=i(513),e._extend=function(t,e){if(!e||!x(e))return t;for(var i=Object.keys(e),n=i.length;n--;)t[i[n]]=e[i[n]];return t}}).call(this,i(101),i(511))},function(t,e){var i,n,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(i===setTimeout)return setTimeout(t,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(t){i=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var l,u=[],h=!1,c=-1;function f(){h&&l&&(h=!1,l.length?u=l.concat(u):c=-1,u.length&&p())}function p(){if(!h){var t=s(f);h=!0;for(var e=u.length;e;){for(l=u,u=[];++c<e;)l&&l[c].run();c=-1,e=u.length}l=null,h=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function g(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];u.push(new d(t,e)),1!==u.length||h||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i(35),o=i(40),a=i(22),s=function(t,e,i){a.a.call(this,t),this.map=e,this.frameState=void 0!==i?i:null};n.a.inherits(s,a.a);var l=s,u=function(t,e,i,n,r){l.call(this,t,e,r),this.originalEvent=i,this.pixel=e.getEventPixel(i),this.coordinate=e.getCoordinateFromPixel(this.pixel),this.dragging=void 0!==n&&n};n.a.inherits(u,l),u.prototype.preventDefault=function(){l.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},u.prototype.stopPropagation=function(){l.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()};var h=u,c=i(18),f=i(8),p={SINGLECLICK:"singleclick",CLICK:f.a.CLICK,DBLCLICK:f.a.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},d=function(t,e,i,n,r){h.call(this,t,e,i.originalEvent,n,r),this.pointerEvent=i};n.a.inherits(d,h);var g=d,_=i(2),v=i(25),y="pointermove",m="pointerdown",x="pointerup",E="pointerover",S="pointerout",T="pointerenter",C="pointerleave",R="pointercancel",I=function(t,e){this.dispatcher=t,this.mapping_=e};I.prototype.getEvents=function(){return Object.keys(this.mapping_)},I.prototype.getHandlerForEvent=function(t){return this.mapping_[t]};var b=I,w=function(t){var e={mousedown:this.mousedown,mousemove:this.mousemove,mouseup:this.mouseup,mouseover:this.mouseover,mouseout:this.mouseout};b.call(this,t,e),this.pointerMap=t.pointerMap,this.lastTouches=[]};n.a.inherits(w,b),w.POINTER_ID=1,w.POINTER_TYPE="mouse",w.DEDUP_DIST=25,w.prototype.isEventSimulatedFromTouch_=function(t){for(var e,i=this.lastTouches,n=t.clientX,r=t.clientY,o=0,a=i.length;o<a&&(e=i[o]);o++){var s=Math.abs(n-e[0]),l=Math.abs(r-e[1]);if(s<=w.DEDUP_DIST&&l<=w.DEDUP_DIST)return!0}return!1},w.prepareEvent=function(t,e){var i=e.cloneEvent(t,t),n=i.preventDefault;return i.preventDefault=function(){t.preventDefault(),n()},i.pointerId=w.POINTER_ID,i.isPrimary=!0,i.pointerType=w.POINTER_TYPE,i},w.prototype.mousedown=function(t){if(!this.isEventSimulatedFromTouch_(t)){w.POINTER_ID.toString()in this.pointerMap&&this.cancel(t);var e=w.prepareEvent(t,this.dispatcher);this.pointerMap[w.POINTER_ID.toString()]=t,this.dispatcher.down(e,t)}},w.prototype.mousemove=function(t){if(!this.isEventSimulatedFromTouch_(t)){var e=w.prepareEvent(t,this.dispatcher);this.dispatcher.move(e,t)}},w.prototype.mouseup=function(t){if(!this.isEventSimulatedFromTouch_(t)){var e=this.pointerMap[w.POINTER_ID.toString()];if(e&&e.button===t.button){var i=w.prepareEvent(t,this.dispatcher);this.dispatcher.up(i,t),this.cleanupMouse()}}},w.prototype.mouseover=function(t){if(!this.isEventSimulatedFromTouch_(t)){var e=w.prepareEvent(t,this.dispatcher);this.dispatcher.enterOver(e,t)}},w.prototype.mouseout=function(t){if(!this.isEventSimulatedFromTouch_(t)){var e=w.prepareEvent(t,this.dispatcher);this.dispatcher.leaveOut(e,t)}},w.prototype.cancel=function(t){var e=w.prepareEvent(t,this.dispatcher);this.dispatcher.cancel(e,t),this.cleanupMouse()},w.prototype.cleanupMouse=function(){delete this.pointerMap[w.POINTER_ID.toString()]};var L=w,O=function(t){var e={MSPointerDown:this.msPointerDown,MSPointerMove:this.msPointerMove,MSPointerUp:this.msPointerUp,MSPointerOut:this.msPointerOut,MSPointerOver:this.msPointerOver,MSPointerCancel:this.msPointerCancel,MSGotPointerCapture:this.msGotPointerCapture,MSLostPointerCapture:this.msLostPointerCapture};b.call(this,t,e),this.pointerMap=t.pointerMap,this.POINTER_TYPES=["","unavailable","touch","pen","mouse"]};n.a.inherits(O,b),O.prototype.prepareEvent_=function(t){var e=t;return"number"==typeof t.pointerType&&((e=this.dispatcher.cloneEvent(t,t)).pointerType=this.POINTER_TYPES[t.pointerType]),e},O.prototype.cleanup=function(t){delete this.pointerMap[t.toString()]},O.prototype.msPointerDown=function(t){this.pointerMap[t.pointerId.toString()]=t;var e=this.prepareEvent_(t);this.dispatcher.down(e,t)},O.prototype.msPointerMove=function(t){var e=this.prepareEvent_(t);this.dispatcher.move(e,t)},O.prototype.msPointerUp=function(t){var e=this.prepareEvent_(t);this.dispatcher.up(e,t),this.cleanup(t.pointerId)},O.prototype.msPointerOut=function(t){var e=this.prepareEvent_(t);this.dispatcher.leaveOut(e,t)},O.prototype.msPointerOver=function(t){var e=this.prepareEvent_(t);this.dispatcher.enterOver(e,t)},O.prototype.msPointerCancel=function(t){var e=this.prepareEvent_(t);this.dispatcher.cancel(e,t),this.cleanup(t.pointerId)},O.prototype.msLostPointerCapture=function(t){var e=this.dispatcher.makeEvent("lostpointercapture",t,t);this.dispatcher.dispatchEvent(e)},O.prototype.msGotPointerCapture=function(t){var e=this.dispatcher.makeEvent("gotpointercapture",t,t);this.dispatcher.dispatchEvent(e)};var A=O,P=function(t){var e={pointerdown:this.pointerDown,pointermove:this.pointerMove,pointerup:this.pointerUp,pointerout:this.pointerOut,pointerover:this.pointerOver,pointercancel:this.pointerCancel,gotpointercapture:this.gotPointerCapture,lostpointercapture:this.lostPointerCapture};b.call(this,t,e)};n.a.inherits(P,b),P.prototype.pointerDown=function(t){this.dispatcher.fireNativeEvent(t)},P.prototype.pointerMove=function(t){this.dispatcher.fireNativeEvent(t)},P.prototype.pointerUp=function(t){this.dispatcher.fireNativeEvent(t)},P.prototype.pointerOut=function(t){this.dispatcher.fireNativeEvent(t)},P.prototype.pointerOver=function(t){this.dispatcher.fireNativeEvent(t)},P.prototype.pointerCancel=function(t){this.dispatcher.fireNativeEvent(t)},P.prototype.lostPointerCapture=function(t){this.dispatcher.fireNativeEvent(t)},P.prototype.gotPointerCapture=function(t){this.dispatcher.fireNativeEvent(t)};var F=P,M=function(t,e,i){a.a.call(this,t),this.originalEvent=e;var n=i||{};this.buttons=this.getButtons_(n),this.pressure=this.getPressure_(n,this.buttons),this.bubbles="bubbles"in n&&n.bubbles,this.cancelable="cancelable"in n&&n.cancelable,this.view="view"in n?n.view:null,this.detail="detail"in n?n.detail:null,this.screenX="screenX"in n?n.screenX:0,this.screenY="screenY"in n?n.screenY:0,this.clientX="clientX"in n?n.clientX:0,this.clientY="clientY"in n?n.clientY:0,this.ctrlKey="ctrlKey"in n&&n.ctrlKey,this.altKey="altKey"in n&&n.altKey,this.shiftKey="shiftKey"in n&&n.shiftKey,this.metaKey="metaKey"in n&&n.metaKey,this.button="button"in n?n.button:0,this.relatedTarget="relatedTarget"in n?n.relatedTarget:null,this.pointerId="pointerId"in n?n.pointerId:0,this.width="width"in n?n.width:0,this.height="height"in n?n.height:0,this.tiltX="tiltX"in n?n.tiltX:0,this.tiltY="tiltY"in n?n.tiltY:0,this.pointerType="pointerType"in n?n.pointerType:"",this.hwTimestamp="hwTimestamp"in n?n.hwTimestamp:0,this.isPrimary="isPrimary"in n&&n.isPrimary,e.preventDefault&&(this.preventDefault=function(){e.preventDefault()})};n.a.inherits(M,a.a),M.prototype.getButtons_=function(t){var e;if(t.buttons||M.HAS_BUTTONS)e=t.buttons;else switch(t.which){case 1:e=1;break;case 2:e=4;break;case 3:e=2;break;default:e=0}return e},M.prototype.getPressure_=function(t,e){return t.pressure?t.pressure:e?.5:0},M.HAS_BUTTONS=!1,function(){try{var t=new MouseEvent("click",{buttons:1});M.HAS_BUTTONS=1===t.buttons}catch(t){}}();var D=M,k=i(14),N=function(t,e){var i={touchstart:this.touchstart,touchmove:this.touchmove,touchend:this.touchend,touchcancel:this.touchcancel};b.call(this,t,i),this.pointerMap=t.pointerMap,this.mouseSource=e,this.firstTouchId_=void 0,this.clickCount_=0,this.resetId_=void 0};n.a.inherits(N,b),N.DEDUP_TIMEOUT=2500,N.CLICK_COUNT_TIMEOUT=200,N.POINTER_TYPE="touch",N.prototype.isPrimaryTouch_=function(t){return this.firstTouchId_===t.identifier},N.prototype.setPrimaryTouch_=function(t){var e=Object.keys(this.pointerMap).length;(0===e||1===e&&L.POINTER_ID.toString()in this.pointerMap)&&(this.firstTouchId_=t.identifier,this.cancelResetClickCount_())},N.prototype.removePrimaryPointer_=function(t){t.isPrimary&&(this.firstTouchId_=void 0,this.resetClickCount_())},N.prototype.resetClickCount_=function(){this.resetId_=setTimeout(this.resetClickCountHandler_.bind(this),N.CLICK_COUNT_TIMEOUT)},N.prototype.resetClickCountHandler_=function(){this.clickCount_=0,this.resetId_=void 0},N.prototype.cancelResetClickCount_=function(){void 0!==this.resetId_&&clearTimeout(this.resetId_)},N.prototype.touchToPointer_=function(t,e){var i=this.dispatcher.cloneEvent(t,e);return i.pointerId=e.identifier+2,i.bubbles=!0,i.cancelable=!0,i.detail=this.clickCount_,i.button=0,i.buttons=1,i.width=e.webkitRadiusX||e.radiusX||0,i.height=e.webkitRadiusY||e.radiusY||0,i.pressure=e.webkitForce||e.force||.5,i.isPrimary=this.isPrimaryTouch_(e),i.pointerType=N.POINTER_TYPE,i.clientX=e.clientX,i.clientY=e.clientY,i.screenX=e.screenX,i.screenY=e.screenY,i},N.prototype.processTouches_=function(t,e){var i,n,r=Array.prototype.slice.call(t.changedTouches),o=r.length;function a(){t.preventDefault()}for(i=0;i<o;++i)(n=this.touchToPointer_(t,r[i])).preventDefault=a,e.call(this,t,n)},N.prototype.findTouch_=function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].identifier===e)return!0;return!1},N.prototype.vacuumTouches_=function(t){var e=t.touches,i=Object.keys(this.pointerMap),n=i.length;if(n>=e.length){var r,o,a,s=[];for(r=0;r<n;++r)o=i[r],a=this.pointerMap[o],o==L.POINTER_ID||this.findTouch_(e,o-2)||s.push(a.out);for(r=0;r<s.length;++r)this.cancelOut_(t,s[r])}},N.prototype.touchstart=function(t){this.vacuumTouches_(t),this.setPrimaryTouch_(t.changedTouches[0]),this.dedupSynthMouse_(t),this.clickCount_++,this.processTouches_(t,this.overDown_)},N.prototype.overDown_=function(t,e){this.pointerMap[e.pointerId]={target:e.target,out:e,outTarget:e.target},this.dispatcher.over(e,t),this.dispatcher.enter(e,t),this.dispatcher.down(e,t)},N.prototype.touchmove=function(t){t.preventDefault(),this.processTouches_(t,this.moveOverOut_)},N.prototype.moveOverOut_=function(t,e){var i=e,n=this.pointerMap[i.pointerId];if(n){var r=n.out,o=n.outTarget;this.dispatcher.move(i,t),r&&o!==i.target&&(r.relatedTarget=i.target,i.relatedTarget=o,r.target=o,i.target?(this.dispatcher.leaveOut(r,t),this.dispatcher.enterOver(i,t)):(i.target=o,i.relatedTarget=null,this.cancelOut_(t,i))),n.out=i,n.outTarget=i.target}},N.prototype.touchend=function(t){this.dedupSynthMouse_(t),this.processTouches_(t,this.upOut_)},N.prototype.upOut_=function(t,e){this.dispatcher.up(e,t),this.dispatcher.out(e,t),this.dispatcher.leave(e,t),this.cleanUpPointer_(e)},N.prototype.touchcancel=function(t){this.processTouches_(t,this.cancelOut_)},N.prototype.cancelOut_=function(t,e){this.dispatcher.cancel(e,t),this.dispatcher.out(e,t),this.dispatcher.leave(e,t),this.cleanUpPointer_(e)},N.prototype.cleanUpPointer_=function(t){delete this.pointerMap[t.pointerId],this.removePrimaryPointer_(t)},N.prototype.dedupSynthMouse_=function(t){var e=this.mouseSource.lastTouches,i=t.changedTouches[0];if(this.isPrimaryTouch_(i)){var n=[i.clientX,i.clientY];e.push(n),setTimeout(function(){k.a.remove(e,n)},N.DEDUP_TIMEOUT)}};var U=N,G=function(t){v.a.call(this),this.element_=t,this.pointerMap={},this.eventMap_={},this.eventSourceList_=[],this.registerSources()};n.a.inherits(G,v.a),G.prototype.registerSources=function(){if(c.a.POINTER)this.registerSource("native",new F(this));else if(c.a.MSPOINTER)this.registerSource("ms",new A(this));else{var t=new L(this);this.registerSource("mouse",t),c.a.TOUCH&&this.registerSource("touch",new U(this,t))}this.register_()},G.prototype.registerSource=function(t,e){var i=e,n=i.getEvents();n&&(n.forEach(function(t){var e=i.getHandlerForEvent(t);e&&(this.eventMap_[t]=e.bind(i))},this),this.eventSourceList_.push(i))},G.prototype.register_=function(){for(var t,e=this.eventSourceList_.length,i=0;i<e;i++)t=this.eventSourceList_[i],this.addEvents_(t.getEvents())},G.prototype.unregister_=function(){for(var t,e=this.eventSourceList_.length,i=0;i<e;i++)t=this.eventSourceList_[i],this.removeEvents_(t.getEvents())},G.prototype.eventHandler_=function(t){var e=t.type,i=this.eventMap_[e];i&&i(t)},G.prototype.addEvents_=function(t){t.forEach(function(t){_.a.listen(this.element_,t,this.eventHandler_,this)},this)},G.prototype.removeEvents_=function(t){t.forEach(function(t){_.a.unlisten(this.element_,t,this.eventHandler_,this)},this)},G.prototype.cloneEvent=function(t,e){for(var i,n={},r=0,o=G.CLONE_PROPS.length;r<o;r++)n[i=G.CLONE_PROPS[r][0]]=t[i]||e[i]||G.CLONE_PROPS[r][1];return n},G.prototype.down=function(t,e){this.fireEvent(m,t,e)},G.prototype.move=function(t,e){this.fireEvent(y,t,e)},G.prototype.up=function(t,e){this.fireEvent(x,t,e)},G.prototype.enter=function(t,e){t.bubbles=!1,this.fireEvent(T,t,e)},G.prototype.leave=function(t,e){t.bubbles=!1,this.fireEvent(C,t,e)},G.prototype.over=function(t,e){t.bubbles=!0,this.fireEvent(E,t,e)},G.prototype.out=function(t,e){t.bubbles=!0,this.fireEvent(S,t,e)},G.prototype.cancel=function(t,e){this.fireEvent(R,t,e)},G.prototype.leaveOut=function(t,e){this.out(t,e),this.contains_(t.target,t.relatedTarget)||this.leave(t,e)},G.prototype.enterOver=function(t,e){this.over(t,e),this.contains_(t.target,t.relatedTarget)||this.enter(t,e)},G.prototype.contains_=function(t,e){return!(!t||!e)&&t.contains(e)},G.prototype.makeEvent=function(t,e,i){return new D(t,i,e)},G.prototype.fireEvent=function(t,e,i){var n=this.makeEvent(t,e,i);this.dispatchEvent(n)},G.prototype.fireNativeEvent=function(t){var e=this.makeEvent(t.type,t,t);this.dispatchEvent(e)},G.prototype.wrapMouseEvent=function(t,e){return this.makeEvent(t,L.prepareEvent(e,this),e)},G.prototype.disposeInternal=function(){this.unregister_(),v.a.prototype.disposeInternal.call(this)},G.CLONE_PROPS=[["bubbles",!1],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",!1],["type",""],["target",null],["currentTarget",null],["which",0]];var j=G,B=function(t,e){v.a.call(this),this.map_=t,this.clickTimeoutId_=0,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=e?e*c.a.DEVICE_PIXEL_RATIO:c.a.DEVICE_PIXEL_RATIO,this.down_=null;var i=this.map_.getViewport();this.activePointers_=0,this.trackedTouches_={},this.pointerEventHandler_=new j(i),this.documentPointerEventHandler_=null,this.pointerdownListenerKey_=_.a.listen(this.pointerEventHandler_,m,this.handlePointerDown_,this),this.relayedListenerKey_=_.a.listen(this.pointerEventHandler_,y,this.relayEvent_,this)};n.a.inherits(B,v.a),B.prototype.emulateClick_=function(t){var e=new g(p.CLICK,this.map_,t);this.dispatchEvent(e),0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=0,e=new g(p.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=0;var e=new g(p.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},B.prototype.updateActivePointers_=function(t){var e=t;e.type==p.POINTERUP||e.type==p.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==p.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},B.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new g(p.POINTERUP,this.map_,t);this.dispatchEvent(e),e.propagationStopped||this.dragging_||!this.isMouseActionButton_(t)||this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(_.a.unlistenByKey),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null,this.documentPointerEventHandler_.dispose(),this.documentPointerEventHandler_=null)},B.prototype.isMouseActionButton_=function(t){return 0===t.button},B.prototype.handlePointerDown_=function(t){this.updateActivePointers_(t);var e=new g(p.POINTERDOWN,this.map_,t);this.dispatchEvent(e),this.down_=t,0===this.dragListenerKeys_.length&&(this.documentPointerEventHandler_=new j(document),this.dragListenerKeys_.push(_.a.listen(this.documentPointerEventHandler_,p.POINTERMOVE,this.handlePointerMove_,this),_.a.listen(this.documentPointerEventHandler_,p.POINTERUP,this.handlePointerUp_,this),_.a.listen(this.pointerEventHandler_,p.POINTERCANCEL,this.handlePointerUp_,this)))},B.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new g(p.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}t.preventDefault()},B.prototype.relayEvent_=function(t){var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new g(t.type,this.map_,t,e))},B.prototype.isMoving_=function(t){return Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},B.prototype.disposeInternal=function(){this.relayedListenerKey_&&(_.a.unlistenByKey(this.relayedListenerKey_),this.relayedListenerKey_=null),this.pointerdownListenerKey_&&(_.a.unlistenByKey(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(_.a.unlistenByKey),this.dragListenerKeys_.length=0,this.documentPointerEventHandler_&&(this.documentPointerEventHandler_.dispose(),this.documentPointerEventHandler_=null),this.pointerEventHandler_&&(this.pointerEventHandler_.dispose(),this.pointerEventHandler_=null),v.a.prototype.disposeInternal.call(this)};var W=B,z="postrender",X="movestart",V="moveend",Y="layergroup",H="size",K="target",q="view",Z=i(17),J=i(69),Q=i(10),$=i(12),tt=i(11),et=function(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}};et.DROP=1/0,et.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,tt.a.clear(this.queuedElements_)},et.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var n=this.keyFunction_(i);return delete this.queuedElements_[n],i},et.prototype.enqueue=function(t){$.a.assert(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=et.DROP&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},et.prototype.getCount=function(){return this.elements_.length},et.prototype.getLeftChildIndex_=function(t){return 2*t+1},et.prototype.getRightChildIndex_=function(t){return 2*t+2},et.prototype.getParentIndex_=function(t){return t-1>>1},et.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},et.prototype.isEmpty=function(){return 0===this.elements_.length},et.prototype.isKeyQueued=function(t){return t in this.queuedElements_},et.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},et.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,r=e[t],o=i[t],a=t;t<n>>1;){var s=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),u=l<n&&i[l]<i[s]?l:s;e[t]=e[u],i[t]=i[u],t=u}e[t]=r,i[t]=o,this.siftDown_(a,t)},et.prototype.siftDown_=function(t,e){for(var i=this.elements_,n=this.priorities_,r=i[e],o=n[e];e>t;){var a=this.getParentIndex_(e);if(!(n[a]>o))break;i[e]=i[a],n[e]=n[a],e=a}i[e]=r,n[e]=o},et.prototype.reprioritize=function(){var t,e,i,n=this.priorityFunction_,r=this.elements_,o=this.priorities_,a=0,s=r.length;for(e=0;e<s;++e)(i=n(t=r[e]))==et.DROP?delete this.queuedElements_[this.keyFunction_(t)]:(o[a]=i,r[a++]=t);r.length=a,o.length=a,this.heapify_()};var it=et,nt=function(t,e){it.call(this,function(e){return t.apply(null,e)},function(t){return t[0].getKey()}),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}};n.a.inherits(nt,it),nt.prototype.enqueue=function(t){var e=it.prototype.enqueue.call(this,t);if(e){var i=t[0];_.a.listen(i,f.a.CHANGE,this.handleTileChange,this)}return e},nt.prototype.getTilesLoading=function(){return this.tilesLoading_},nt.prototype.handleTileChange=function(t){var e=t.target,i=e.getState();if(i===Q.a.LOADED||i===Q.a.ERROR||i===Q.a.EMPTY||i===Q.a.ABORT){_.a.unlisten(e,f.a.CHANGE,this.handleTileChange,this);var n=e.getKey();n in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[n],--this.tilesLoading_),this.tileChangeCallback_()}},nt.prototype.loadMoreTiles=function(t,e){for(var i,n,r,o=0,a=!1;this.tilesLoading_<t&&o<e&&this.getCount()>0;)r=(n=this.dequeue()[0]).getKey(),(i=n.getState())===Q.a.ABORT?a=!0:i!==Q.a.IDLE||r in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++o,n.load());0===o&&a&&this.tileChangeCallback_()};var rt=nt,ot=i(9),at={createExtent:function(t){return function(e){return e?[ot.a.clamp(e[0],t[0],t[2]),ot.a.clamp(e[1],t[1],t[3])]:void 0}},none:function(t){return t}},st={createSnapToResolutions:function(t){return function(e,i,n){if(void 0!==e){var r=k.a.linearFindNearest(t,e,n);r=ot.a.clamp(r+i,0,t.length-1);var o=Math.floor(r);if(r!=o&&o<t.length-1){var a=t[o]/t[o+1];return t[o]/Math.pow(a,r-o)}return t[o]}}},createSnapToPower:function(t,e,i){return function(n,r,o){if(void 0!==n){var a=-o/2+.5,s=Math.floor(Math.log(e/n)/Math.log(t)+a),l=Math.max(s+r,0);return void 0!==i&&(l=Math.min(l,i)),e/Math.pow(t,l)}}}},lt={disable:function(t,e){return void 0!==t?0:void 0},none:function(t,e){return void 0!==t?t+e:void 0},createSnapToN:function(t){var e=2*Math.PI/t;return function(t,i){return void 0!==t?t=Math.floor((t+i)/e+.5)*e:void 0}},createSnapToZero:function(t){var e=t||ot.a.toRadians(5);return function(t,i){return void 0!==t?Math.abs(t+i)<=e?0:t+i:void 0}}},ut=0,ht=1,ct="center",ft="resolution",pt="rotation",dt=i(83),gt={add:function(t,e){return t[0]+=e[0],t[1]+=e[1],t},closestOnCircle:function(t,e){var i=e.getRadius(),n=e.getCenter(),r=n[0],o=n[1],a=t[0]-r,s=t[1]-o;0===a&&0===s&&(a=1);var l=Math.sqrt(a*a+s*s);return[r+i*a/l,o+i*s/l]},closestOnSegment:function(t,e){var i,n,r=t[0],o=t[1],a=e[0],s=e[1],l=a[0],u=a[1],h=s[0],c=s[1],f=h-l,p=c-u,d=0===f&&0===p?0:(f*(r-l)+p*(o-u))/(f*f+p*p||0);return d<=0?(i=l,n=u):d>=1?(i=h,n=c):(i=l+d*f,n=u+d*p),[i,n]},createStringXY:function(t){return function(e){return gt.toStringXY(e,t)}},degreesToStringHDMS:function(t,e,i){var n=ot.a.modulo(e+180,360)-180,r=Math.abs(3600*n),o=i||0,a=Math.pow(10,o),s=Math.floor(r/3600),l=Math.floor((r-3600*s)/60),u=r-3600*s-60*l;return(u=Math.ceil(u*a)/a)>=60&&(u=0,l+=1),l>=60&&(l=0,s+=1),s+"° "+dt.a.padNumber(l,2)+"′ "+dt.a.padNumber(u,2,o)+"″"+(0==n?"":" "+t.charAt(n<0?1:0))},format:function(t,e,i){return t?e.replace("{x}",t[0].toFixed(i)).replace("{y}",t[1].toFixed(i)):""},equals:function(t,e){for(var i=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i},rotate:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=t[0]*i-t[1]*n,o=t[1]*i+t[0]*n;return t[0]=r,t[1]=o,t},scale:function(t,e){return t[0]*=e,t[1]*=e,t},sub:function(t,e){return t[0]-=e[0],t[1]-=e[1],t},squaredDistance:function(t,e){var i=t[0]-e[0],n=t[1]-e[1];return i*i+n*n},distance:function(t,e){return Math.sqrt(gt.squaredDistance(t,e))},squaredDistanceToSegment:function(t,e){return gt.squaredDistance(t,gt.closestOnSegment(t,e))},toStringHDMS:function(t,e){return t?gt.degreesToStringHDMS("NS",t[1],e)+" "+gt.degreesToStringHDMS("EW",t[0],e):""},toStringXY:function(t,e){return gt.format(t,"{x}, {y}",e)}},_t=gt,vt=i(28),yt=i(1),mt=i(6),xt="XY",Et="XYZ",St="XYM",Tt="XYZM",Ct={TRUE:function(){return!0},FALSE:function(){return!1}},Rt={transform2D:function(t,e,i,n,r,o){var a,s=o||[],l=0;for(a=e;a<i;a+=n){var u=t[a],h=t[a+1];s[l++]=r[0]*u+r[2]*h+r[4],s[l++]=r[1]*u+r[3]*h+r[5]}return o&&s.length!=l&&(s.length=l),s},rotate:function(t,e,i,n,r,o,a){for(var s=a||[],l=Math.cos(r),u=Math.sin(r),h=o[0],c=o[1],f=0,p=e;p<i;p+=n){var d=t[p]-h,g=t[p+1]-c;s[f++]=h+d*l-g*u,s[f++]=c+d*u+g*l;for(var _=p+2;_<p+n;++_)s[f++]=t[_]}return a&&s.length!=f&&(s.length=f),s},scale:function(t,e,i,n,r,o,a,s){for(var l=s||[],u=a[0],h=a[1],c=0,f=e;f<i;f+=n){var p=t[f]-u,d=t[f+1]-h;l[c++]=u+r*p,l[c++]=h+o*d;for(var g=f+2;g<f+n;++g)l[c++]=t[g]}return s&&l.length!=c&&(l.length=c),l},translate:function(t,e,i,n,r,o,a){var s,l,u=a||[],h=0;for(s=e;s<i;s+=n)for(u[h++]=t[s]+r,u[h++]=t[s+1]+o,l=s+2;l<s+n;++l)u[h++]=t[l];return a&&u.length!=h&&(u.length=h),u}},It=i(16),bt=i(32),wt=i(3),Lt=function(){Z.a.call(this),this.extent_=yt.a.createEmpty(),this.extentRevision_=-1,this.simplifiedGeometryCache={},this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.tmpTransform_=wt.a.create()};n.a.inherits(Lt,Z.a),Lt.prototype.clone=function(){},Lt.prototype.closestPointXY=function(t,e,i,n){},Lt.prototype.getClosestPoint=function(t,e){var i=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},Lt.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},Lt.prototype.computeExtent=function(t){},Lt.prototype.containsXY=Ct.FALSE,Lt.prototype.getExtent=function(t){return this.extentRevision_!=this.getRevision()&&(this.extent_=this.computeExtent(this.extent_),this.extentRevision_=this.getRevision()),yt.a.returnOrUpdate(this.extent_,t)},Lt.prototype.rotate=function(t,e){},Lt.prototype.scale=function(t,e,i){},Lt.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},Lt.prototype.getSimplifiedGeometry=function(t){},Lt.prototype.getType=function(){},Lt.prototype.applyTransform=function(t){},Lt.prototype.intersectsExtent=function(t){},Lt.prototype.translate=function(t,e){},Lt.prototype.transform=function(t,e){var i=this.tmpTransform_,n=(t=It.default.get(t)).getUnits()==bt.a.TILE_PIXELS?function(n,r,o){var a=t.getExtent(),s=t.getWorldExtent(),l=yt.a.getHeight(s)/yt.a.getHeight(a);return wt.a.compose(i,s[0],s[3],l,-l,0,0,0),Rt.transform2D(n,0,n.length,o,i,r),It.default.getTransform(t,e)(n,r,o)}:It.default.getTransform(t,e);return this.applyTransform(n),this};var Ot=Lt,At=function(){Ot.call(this),this.layout=xt,this.stride=2,this.flatCoordinates=null};n.a.inherits(At,Ot),At.getLayoutForStride_=function(t){var e;return 2==t?e=xt:3==t?e=Et:4==t&&(e=Tt),e},At.getStrideForLayout=function(t){var e;return t==xt?e=2:t==Et||t==St?e=3:t==Tt&&(e=4),e},At.prototype.containsXY=Ct.FALSE,At.prototype.computeExtent=function(t){return yt.a.createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},At.prototype.getCoordinates=function(){},At.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},At.prototype.getFlatCoordinates=function(){return this.flatCoordinates},At.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},At.prototype.getLayout=function(){return this.layout},At.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!=this.getRevision()&&(tt.a.clear(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=t.toString();if(this.simplifiedGeometryCache.hasOwnProperty(e))return this.simplifiedGeometryCache[e];var i=this.getSimplifiedGeometryInternal(t);return i.getFlatCoordinates().length<this.flatCoordinates.length?(this.simplifiedGeometryCache[e]=i,i):(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},At.prototype.getSimplifiedGeometryInternal=function(t){return this},At.prototype.getStride=function(){return this.stride},At.prototype.setFlatCoordinatesInternal=function(t,e){this.stride=At.getStrideForLayout(t),this.layout=t,this.flatCoordinates=e},At.prototype.setCoordinates=function(t,e){},At.prototype.setLayout=function(t,e,i){var n;if(t)n=At.getStrideForLayout(t);else{var r;for(r=0;r<i;++r){if(0===e.length)return this.layout=xt,void(this.stride=2);e=e[0]}n=e.length,t=At.getLayoutForStride_(n)}this.layout=t,this.stride=n},At.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},At.prototype.rotate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();Rt.rotate(i,0,i.length,n,t,e,i),this.changed()}},At.prototype.scale=function(t,e,i){var n=e;void 0===n&&(n=t);var r=i;r||(r=yt.a.getCenter(this.getExtent()));var o=this.getFlatCoordinates();if(o){var a=this.getStride();Rt.scale(o,0,o.length,a,t,n,r,o),this.changed()}},At.prototype.translate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();Rt.translate(i,0,i.length,n,t,e,i),this.changed()}},At.transform2D=function(t,e,i){var n=t.getFlatCoordinates();if(n){var r=t.getStride();return Rt.transform2D(n,0,n.length,r,e,i)}return null};var Pt=At,Ft={linearRing:function(t,e,i,n){for(var r=0,o=t[i-n],a=t[i-n+1];e<i;e+=n){var s=t[e],l=t[e+1];r+=a*s-o*l,o=s,a=l}return r/2},linearRings:function(t,e,i,n){var r,o,a=0;for(r=0,o=i.length;r<o;++r){var s=i[r];a+=Ft.linearRing(t,e,s,n),e=s}return a},linearRingss:function(t,e,i,n){var r,o,a=0;for(r=0,o=i.length;r<o;++r){var s=i[r];a+=Ft.linearRings(t,e,s,n),e=s[s.length-1]}return a}},Mt=Ft,Dt={point:function(t,e,i,n,r,o,a){var s,l,u=t[e],h=t[e+1],c=t[i]-u,f=t[i+1]-h;if(0===c&&0===f)l=e;else{var p=((r-u)*c+(o-h)*f)/(c*c+f*f);if(p>1)l=i;else{if(p>0){for(s=0;s<n;++s)a[s]=ot.a.lerp(t[e+s],t[i+s],p);return void(a.length=n)}l=e}}for(s=0;s<n;++s)a[s]=t[l+s];a.length=n},getMaxSquaredDelta:function(t,e,i,n,r){var o=t[e],a=t[e+1];for(e+=n;e<i;e+=n){var s=t[e],l=t[e+1],u=ot.a.squaredDistance(o,a,s,l);u>r&&(r=u),o=s,a=l}return r},getsMaxSquaredDelta:function(t,e,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o){var s=i[o];r=Dt.getMaxSquaredDelta(t,e,s,n,r),e=s}return r},getssMaxSquaredDelta:function(t,e,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o){var s=i[o];r=Dt.getsMaxSquaredDelta(t,e,s,n,r),e=s[s.length-1]}return r},getClosestPoint:function(t,e,i,n,r,o,a,s,l,u,h){if(e==i)return u;var c,f;if(0===r){if((f=ot.a.squaredDistance(a,s,t[e],t[e+1]))<u){for(c=0;c<n;++c)l[c]=t[e+c];return l.length=n,f}return u}for(var p=h||[NaN,NaN],d=e+n;d<i;)if(Dt.point(t,d-n,d,n,a,s,p),(f=ot.a.squaredDistance(a,s,p[0],p[1]))<u){for(u=f,c=0;c<n;++c)l[c]=p[c];l.length=n,d+=n}else d+=n*Math.max((Math.sqrt(f)-Math.sqrt(u))/r|0,1);if(o&&(Dt.point(t,i-n,e,n,a,s,p),(f=ot.a.squaredDistance(a,s,p[0],p[1]))<u)){for(u=f,c=0;c<n;++c)l[c]=p[c];l.length=n}return u},getsClosestPoint:function(t,e,i,n,r,o,a,s,l,u,h){var c,f,p=h||[NaN,NaN];for(c=0,f=i.length;c<f;++c){var d=i[c];u=Dt.getClosestPoint(t,e,d,n,r,o,a,s,l,u,p),e=d}return u},getssClosestPoint:function(t,e,i,n,r,o,a,s,l,u,h){var c,f,p=h||[NaN,NaN];for(c=0,f=i.length;c<f;++c){var d=i[c];u=Dt.getsClosestPoint(t,e,d,n,r,o,a,s,l,u,p),e=d[d.length-1]}return u}},kt=Dt,Nt={coordinate:function(t,e,i,n){var r,o;for(r=0,o=i.length;r<o;++r)t[e++]=i[r];return e},coordinates:function(t,e,i,n){var r,o;for(r=0,o=i.length;r<o;++r){var a,s=i[r];for(a=0;a<n;++a)t[e++]=s[a]}return e},coordinatess:function(t,e,i,n,r){var o,a,s=r||[],l=0;for(o=0,a=i.length;o<a;++o){var u=Nt.coordinates(t,e,i[o],n);s[l++]=u,e=u}return s.length=l,s},coordinatesss:function(t,e,i,n,r){var o,a,s=r||[],l=0;for(o=0,a=i.length;o<a;++o){var u=Nt.coordinatess(t,e,i[o],n,s[l]);s[l++]=u,e=u[u.length-1]}return s.length=l,s}},Ut=Nt,Gt={coordinates:function(t,e,i,n,r){var o,a=void 0!==r?r:[],s=0;for(o=e;o<i;o+=n)a[s++]=t.slice(o,o+n);return a.length=s,a},coordinatess:function(t,e,i,n,r){var o,a,s=void 0!==r?r:[],l=0;for(o=0,a=i.length;o<a;++o){var u=i[o];s[l++]=Gt.coordinates(t,e,u,n,s[l]),e=u}return s.length=l,s},coordinatesss:function(t,e,i,n,r){var o,a,s=void 0!==r?r:[],l=0;for(o=0,a=i.length;o<a;++o){var u=i[o];s[l++]=Gt.coordinatess(t,e,u,n,s[l]),e=u[u.length-1]}return s.length=l,s}},jt=Gt,Bt={lineString:function(t,e,i,n,r,o,a){var s=void 0!==a?a:[];return o||(i=Bt.radialDistance(t,e,i,n,r,s,0),t=s,e=0,n=2),s.length=Bt.douglasPeucker(t,e,i,n,r,s,0),s},douglasPeucker:function(t,e,i,n,r,o,a){var s=(i-e)/n;if(s<3){for(;e<i;e+=n)o[a++]=t[e],o[a++]=t[e+1];return a}var l=new Array(s);l[0]=1,l[s-1]=1;for(var u,h=[e,i-n],c=0;h.length>0;){var f=h.pop(),p=h.pop(),d=0,g=t[p],_=t[p+1],v=t[f],y=t[f+1];for(u=p+n;u<f;u+=n){var m=t[u],x=t[u+1],E=ot.a.squaredSegmentDistance(m,x,g,_,v,y);E>d&&(c=u,d=E)}d>r&&(l[(c-e)/n]=1,p+n<c&&h.push(p,c),c+n<f&&h.push(c,f))}for(u=0;u<s;++u)l[u]&&(o[a++]=t[e+u*n],o[a++]=t[e+u*n+1]);return a},douglasPeuckers:function(t,e,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var h=i[l];a=Bt.douglasPeucker(t,e,h,n,r,o,a),s.push(a),e=h}return a},douglasPeuckerss:function(t,e,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var h=i[l],c=[];a=Bt.douglasPeuckers(t,e,h,n,r,o,a,c),s.push(c),e=h[h.length-1]}return a},radialDistance:function(t,e,i,n,r,o,a){if(i<=e+n){for(;e<i;e+=n)o[a++]=t[e],o[a++]=t[e+1];return a}var s=t[e],l=t[e+1];o[a++]=s,o[a++]=l;var u=s,h=l;for(e+=n;e<i;e+=n)u=t[e],h=t[e+1],ot.a.squaredDistance(s,l,u,h)>r&&(o[a++]=u,o[a++]=h,s=u,l=h);return u==s&&h==l||(o[a++]=u,o[a++]=h),a},snap:function(t,e){return e*Math.round(t/e)},quantize:function(t,e,i,n,r,o,a){if(e==i)return a;var s,l,u=Bt.snap(t[e],r),h=Bt.snap(t[e+1],r);e+=n,o[a++]=u,o[a++]=h;do{if(s=Bt.snap(t[e],r),l=Bt.snap(t[e+1],r),(e+=n)==i)return o[a++]=s,o[a++]=l,a}while(s==u&&l==h);for(;e<i;){var c,f;if(c=Bt.snap(t[e],r),f=Bt.snap(t[e+1],r),e+=n,c!=s||f!=l){var p=s-u,d=l-h,g=c-u,_=f-h;p*_==d*g&&(p<0&&g<p||p==g||p>0&&g>p)&&(d<0&&_<d||d==_||d>0&&_>d)?(s=c,l=f):(o[a++]=s,o[a++]=l,u=s,h=l,s=c,l=f)}}return o[a++]=s,o[a++]=l,a},quantizes:function(t,e,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var h=i[l];a=Bt.quantize(t,e,h,n,r,o,a),s.push(a),e=h}return a},quantizess:function(t,e,i,n,r,o,a,s){var l,u;for(l=0,u=i.length;l<u;++l){var h=i[l],c=[];a=Bt.quantizes(t,e,h,n,r,o,a,c),s.push(c),e=h[h.length-1]}return a}},Wt=Bt,zt=function(t,e){Pt.call(this),this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.setCoordinates(t,e)};n.a.inherits(zt,Pt),zt.prototype.clone=function(){var t=new zt(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),t},zt.prototype.closestPointXY=function(t,e,i,n){return n<yt.a.closestSquaredDistanceXY(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(kt.getMaxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),kt.getClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))},zt.prototype.getArea=function(){return Mt.linearRing(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},zt.prototype.getCoordinates=function(){return jt.coordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},zt.prototype.getSimplifiedGeometryInternal=function(t){var e=[];e.length=Wt.douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0);var i=new zt(null);return i.setFlatCoordinates(xt,e),i},zt.prototype.getType=function(){return mt.a.LINEAR_RING},zt.prototype.intersectsExtent=function(t){},zt.prototype.setCoordinates=function(t,e){t?(this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ut.coordinates(this.flatCoordinates,0,t,this.stride),this.changed()):this.setFlatCoordinates(xt,null)},zt.prototype.setFlatCoordinates=function(t,e){this.setFlatCoordinatesInternal(t,e),this.changed()};var Xt=zt,Vt=function(t,e){Pt.call(this),this.setCoordinates(t,e)};n.a.inherits(Vt,Pt),Vt.prototype.clone=function(){var t=new Vt(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice()),t},Vt.prototype.closestPointXY=function(t,e,i,n){var r=this.flatCoordinates,o=ot.a.squaredDistance(t,e,r[0],r[1]);if(o<n){var a,s=this.stride;for(a=0;a<s;++a)i[a]=r[a];return i.length=s,o}return n},Vt.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},Vt.prototype.computeExtent=function(t){return yt.a.createOrUpdateFromCoordinate(this.flatCoordinates,t)},Vt.prototype.getType=function(){return mt.a.POINT},Vt.prototype.intersectsExtent=function(t){return yt.a.containsXY(t,this.flatCoordinates[0],this.flatCoordinates[1])},Vt.prototype.setCoordinates=function(t,e){t?(this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Ut.coordinate(this.flatCoordinates,0,t,this.stride),this.changed()):this.setFlatCoordinates(xt,null)},Vt.prototype.setFlatCoordinates=function(t,e){this.setFlatCoordinatesInternal(t,e),this.changed()};var Yt=Vt,Ht={linearRingContainsExtent:function(t,e,i,n,r){return!yt.a.forEachCorner(r,function(r){return!Ht.linearRingContainsXY(t,e,i,n,r[0],r[1])})},linearRingContainsXY:function(t,e,i,n,r,o){for(var a=0,s=t[i-n],l=t[i-n+1];e<i;e+=n){var u=t[e],h=t[e+1];l<=o?h>o&&(u-s)*(o-l)-(r-s)*(h-l)>0&&a++:h<=o&&(u-s)*(o-l)-(r-s)*(h-l)<0&&a--,s=u,l=h}return 0!==a},linearRingsContainsXY:function(t,e,i,n,r,o){if(0===i.length)return!1;if(!Ht.linearRingContainsXY(t,e,i[0],n,r,o))return!1;var a,s;for(a=1,s=i.length;a<s;++a)if(Ht.linearRingContainsXY(t,i[a-1],i[a],n,r,o))return!1;return!0},linearRingssContainsXY:function(t,e,i,n,r,o){if(0===i.length)return!1;var a,s;for(a=0,s=i.length;a<s;++a){var l=i[a];if(Ht.linearRingsContainsXY(t,e,l,n,r,o))return!0;e=l[l.length-1]}return!1}},Kt=Ht,qt={linearRings:function(t,e,i,n,r,o,a){for(var s,l,u,h,c,f,p,d=r[o+1],g=[],_=0,v=i.length;_<v;++_){var y=i[_];for(h=t[y-n],f=t[y-n+1],s=e;s<y;s+=n)c=t[s],p=t[s+1],(d<=f&&p<=d||f<=d&&d<=p)&&(u=(d-f)/(p-f)*(c-h)+h,g.push(u)),h=c,f=p}var m=NaN,x=-1/0;for(g.sort(k.a.numberSafeCompareFunction),h=g[0],s=1,l=g.length;s<l;++s){c=g[s];var E=Math.abs(c-h);E>x&&(u=(h+c)/2,Kt.linearRingsContainsXY(t,e,i,n,u,d)&&(m=u,x=E)),h=c}return isNaN(m)&&(m=r[o]),a?(a.push(m,d,x),a):[m,d,x]},linearRingss:function(t,e,i,n,r){var o,a,s=[];for(o=0,a=i.length;o<a;++o){var l=i[o];s=qt.linearRings(t,e,l,n,r,2*o,s),e=l[l.length-1]}return s}},Zt=qt,Jt={forEach:function(t,e,i,n,r,o){for(var a,s=[t[e],t[e+1]],l=[];e+n<i;e+=n){if(l[0]=t[e+n],l[1]=t[e+n+1],a=r.call(o,s,l))return a;s[0]=l[0],s[1]=l[1]}return!1}},Qt={lineString:function(t,e,i,n,r){var o=yt.a.extendFlatCoordinates(yt.a.createEmpty(),t,e,i,n);return!!yt.a.intersects(r,o)&&(!!yt.a.containsExtent(r,o)||o[0]>=r[0]&&o[2]<=r[2]||o[1]>=r[1]&&o[3]<=r[3]||Jt.forEach(t,e,i,n,function(t,e){return yt.a.intersectsSegment(r,t,e)}))},lineStrings:function(t,e,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o){if(Qt.lineString(t,e,i[o],n,r))return!0;e=i[o]}return!1},linearRing:function(t,e,i,n,r){return!!(Qt.lineString(t,e,i,n,r)||Kt.linearRingContainsXY(t,e,i,n,r[0],r[1])||Kt.linearRingContainsXY(t,e,i,n,r[0],r[3])||Kt.linearRingContainsXY(t,e,i,n,r[2],r[1])||Kt.linearRingContainsXY(t,e,i,n,r[2],r[3]))},linearRings:function(t,e,i,n,r){if(!Qt.linearRing(t,e,i[0],n,r))return!1;if(1===i.length)return!0;var o,a;for(o=1,a=i.length;o<a;++o)if(Kt.linearRingContainsExtent(t,i[o-1],i[o],n,r))return!1;return!0},linearRingss:function(t,e,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o){var s=i[o];if(Qt.linearRings(t,e,s,n,r))return!0;e=s[s.length-1]}return!1}},$t=Qt,te={coordinates:function(t,e,i,n){for(;e<i-n;){var r;for(r=0;r<n;++r){var o=t[e+r];t[e+r]=t[i-n+r],t[i-n+r]=o}e+=n,i-=n}}},ee={linearRingIsClockwise:function(t,e,i,n){for(var r=0,o=t[i-n],a=t[i-n+1];e<i;e+=n){var s=t[e],l=t[e+1];r+=(s-o)*(l+a),o=s,a=l}return r>0},linearRingsAreOriented:function(t,e,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=ee.linearRingIsClockwise(t,e,l,n);if(0===o){if(s&&u||!s&&!u)return!1}else if(s&&!u||!s&&u)return!1;e=l}return!0},linearRingssAreOriented:function(t,e,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)if(!ee.linearRingsAreOriented(t,e,i[o],n,r))return!1;return!0},orientLinearRings:function(t,e,i,n,r){var o,a,s=void 0!==r&&r;for(o=0,a=i.length;o<a;++o){var l=i[o],u=ee.linearRingIsClockwise(t,e,l,n);(0===o?s&&u||!s&&!u:s&&!u||!s&&u)&&te.coordinates(t,e,l,n),e=l}return e},orientLinearRingss:function(t,e,i,n,r){var o,a;for(o=0,a=i.length;o<a;++o)e=ee.orientLinearRings(t,e,i[o],n,r);return e}},ie=ee,ne=function(t,e){Pt.call(this),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,this.setCoordinates(t,e)};n.a.inherits(ne,Pt),ne.prototype.appendLinearRing=function(t){this.flatCoordinates?k.a.extend(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},ne.prototype.clone=function(){var t=new ne(null);return t.setFlatCoordinates(this.layout,this.flatCoordinates.slice(),this.ends_.slice()),t},ne.prototype.closestPointXY=function(t,e,i,n){return n<yt.a.closestSquaredDistanceXY(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(kt.getsMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),kt.getsClosestPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))},ne.prototype.containsXY=function(t,e){return Kt.linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},ne.prototype.getArea=function(){return Mt.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},ne.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),ie.orientLinearRings(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,jt.coordinatess(e,0,this.ends_,this.stride)},ne.prototype.getEnds=function(){return this.ends_},ne.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=yt.a.getCenter(this.getExtent());this.flatInteriorPoint_=Zt.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},ne.prototype.getInteriorPoint=function(){return new Yt(this.getFlatInteriorPoint(),St)},ne.prototype.getLinearRingCount=function(){return this.ends_.length},ne.prototype.getLinearRing=function(t){if(t<0||this.ends_.length<=t)return null;var e=new Xt(null);return e.setFlatCoordinates(this.layout,this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t])),e},ne.prototype.getLinearRings=function(){var t,e,i=this.layout,n=this.flatCoordinates,r=this.ends_,o=[],a=0;for(t=0,e=r.length;t<e;++t){var s=r[t],l=new Xt(null);l.setFlatCoordinates(i,n.slice(a,s)),o.push(l),a=s}return o},ne.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;ie.linearRingsAreOriented(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=ie.orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},ne.prototype.getSimplifiedGeometryInternal=function(t){var e=[],i=[];e.length=Wt.quantizes(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i);var n=new ne(null);return n.setFlatCoordinates(xt,e,i),n},ne.prototype.getType=function(){return mt.a.POLYGON},ne.prototype.intersectsExtent=function(t){return $t.linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},ne.prototype.setCoordinates=function(t,e){if(t){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=Ut.coordinatess(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}else this.setFlatCoordinates(xt,null,this.ends_)},ne.prototype.setFlatCoordinates=function(t,e,i){this.setFlatCoordinatesInternal(t,e),this.ends_=i,this.changed()},ne.circular=function(t,e,i,n){var r,o=n||32,a=[];for(r=0;r<o;++r)k.a.extend(a,t.offset(e,i,2*Math.PI*r/o));a.push(a[0],a[1]);var s=new ne(null);return s.setFlatCoordinates(xt,a,[a.length]),s},ne.fromExtent=function(t){var e=t[0],i=t[1],n=t[2],r=t[3],o=[e,i,e,r,n,r,n,i,e,i],a=new ne(null);return a.setFlatCoordinates(xt,o,[o.length]),a},ne.fromCircle=function(t,e,i){for(var n=e||32,r=t.getStride(),o=t.getLayout(),a=new ne(null,o),s=r*(n+1),l=new Array(s),u=0;u<s;u++)l[u]=0;var h=[l.length];return a.setFlatCoordinates(o,l,h),ne.makeRegular(a,t.getCenter(),t.getRadius(),i),a},ne.makeRegular=function(t,e,i,n){for(var r,o,a=t.getFlatCoordinates(),s=t.getLayout(),l=t.getStride(),u=t.getEnds(),h=a.length/l-1,c=n||0,f=0;f<=h;++f)o=f*l,r=c+2*ot.a.modulo(f,h)*Math.PI/h,a[o]=e[0]+i*Math.cos(r),a[o+1]=e[1]+i*Math.sin(r);t.setFlatCoordinates(s,a,u)};var re=ne,oe=function(t){Z.a.call(this);var e=tt.a.assign({},t);this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.updateAnimations_=this.updateAnimations_.bind(this),this.projection_=It.default.createProjection(e.projection,"EPSG:3857"),this.applyOptions_(e)};n.a.inherits(oe,Z.a),oe.prototype.applyOptions_=function(t){var e={};e[ct]=void 0!==t.center?t.center:null;var i=oe.createResolutionConstraint_(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.minZoom_=i.minZoom;var n=oe.createCenterConstraint_(t),r=i.constraint,o=oe.createRotationConstraint_(t);this.constraints_={center:n,resolution:r,rotation:o},void 0!==t.resolution?e[ft]=t.resolution:void 0!==t.zoom&&(e[ft]=this.constrainResolution(this.maxResolution_,t.zoom-this.minZoom_),this.resolutions_&&(e[ft]=ot.a.clamp(Number(this.getResolution()||e[ft]),this.minResolution_,this.maxResolution_))),e[pt]=void 0!==t.rotation?t.rotation:0,this.setProperties(e),this.options_=t},oe.prototype.getUpdatedOptions_=function(t){var e=tt.a.assign({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenter(),e.rotation=this.getRotation(),tt.a.assign({},e,t)},oe.prototype.animate=function(t){var e,i=arguments.length;if(i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i),!this.isDef()){var n=arguments[i-1];return n.center&&this.setCenter(n.center),void 0!==n.zoom&&this.setZoom(n.zoom),void 0!==n.rotation&&this.setRotation(n.rotation),void(e&&e(!0))}for(var r=Date.now(),o=this.getCenter().slice(),a=this.getResolution(),s=this.getRotation(),l=[],u=0;u<i;++u){var h=arguments[u],c={start:r,complete:!1,anchor:h.anchor,duration:void 0!==h.duration?h.duration:1e3,easing:h.easing||vt.a.inAndOut};if(h.center&&(c.sourceCenter=o,c.targetCenter=h.center,o=c.targetCenter),void 0!==h.zoom?(c.sourceResolution=a,c.targetResolution=this.constrainResolution(this.maxResolution_,h.zoom-this.minZoom_,0),a=c.targetResolution):h.resolution&&(c.sourceResolution=a,c.targetResolution=h.resolution,a=c.targetResolution),void 0!==h.rotation){c.sourceRotation=s;var f=ot.a.modulo(h.rotation-s+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=s+f,s=c.targetRotation}c.callback=e,oe.isNoopAnimation(c)?c.complete=!0:r+=c.duration,l.push(c)}this.animations_.push(l),this.setHint(ut,1),this.updateAnimations_()},oe.prototype.getAnimating=function(){return this.hints_[ut]>0},oe.prototype.getInteracting=function(){return this.hints_[ht]>0},oe.prototype.cancelAnimations=function(){this.setHint(ut,-this.hints_[ut]);for(var t=0,e=this.animations_.length;t<e;++t){var i=this.animations_[t];i[0].callback&&i[0].callback(!1)}this.animations_.length=0},oe.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,i=this.animations_.length-1;i>=0;--i){for(var n=this.animations_[i],r=!0,o=0,a=n.length;o<a;++o){var s=n[o];if(!s.complete){var l=t-s.start,u=s.duration>0?l/s.duration:1;u>=1?(s.complete=!0,u=1):r=!1;var h=s.easing(u);if(s.sourceCenter){var c=s.sourceCenter[0],f=s.sourceCenter[1],p=c+h*(s.targetCenter[0]-c),d=f+h*(s.targetCenter[1]-f);this.set(ct,[p,d])}if(s.sourceResolution&&s.targetResolution){var g=1===h?s.targetResolution:s.sourceResolution+h*(s.targetResolution-s.sourceResolution);s.anchor&&this.set(ct,this.calculateCenterZoom(g,s.anchor)),this.set(ft,g)}if(void 0!==s.sourceRotation&&void 0!==s.targetRotation){var _=1===h?ot.a.modulo(s.targetRotation+Math.PI,2*Math.PI)-Math.PI:s.sourceRotation+h*(s.targetRotation-s.sourceRotation);s.anchor&&this.set(ct,this.calculateCenterRotate(_,s.anchor)),this.set(pt,_)}if(e=!0,!s.complete)break}}if(r){this.animations_[i]=null,this.setHint(ut,-1);var v=n[0].callback;v&&v(!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_))}},oe.prototype.calculateCenterRotate=function(t,e){var i,n=this.getCenter();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],_t.rotate(i,t-this.getRotation()),_t.add(i,e)),i},oe.prototype.calculateCenterZoom=function(t,e){var i,n=this.getCenter(),r=this.getResolution();return void 0!==n&&void 0!==r&&(i=[e[0]-t*(e[0]-n[0])/r,e[1]-t*(e[1]-n[1])/r]),i},oe.prototype.getSizeFromViewport_=function(){var t=[100,100],e='.ol-viewport[data-view="'+n.a.getUid(this)+'"]',i=document.querySelector(e);if(i){var r=getComputedStyle(i);t[0]=parseInt(r.width,10),t[1]=parseInt(r.height,10)}return t},oe.prototype.constrainCenter=function(t){return this.constraints_.center(t)},oe.prototype.constrainResolution=function(t,e,i){var n=e||0,r=i||0;return this.constraints_.resolution(t,n,r)},oe.prototype.constrainRotation=function(t,e){var i=e||0;return this.constraints_.rotation(t,i)},oe.prototype.getCenter=function(){return this.get(ct)},oe.prototype.getConstraints=function(){return this.constraints_},oe.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},oe.prototype.calculateExtent=function(t){var e=t||this.getSizeFromViewport_(),i=this.getCenter();$.a.assert(i,1);var n=this.getResolution();$.a.assert(void 0!==n,2);var r=this.getRotation();return $.a.assert(void 0!==r,3),yt.a.getForViewAndSize(i,n,r,e)},oe.prototype.getMaxResolution=function(){return this.maxResolution_},oe.prototype.getMinResolution=function(){return this.minResolution_},oe.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},oe.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},oe.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},oe.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},oe.prototype.getProjection=function(){return this.projection_},oe.prototype.getResolution=function(){return this.get(ft)},oe.prototype.getResolutions=function(){return this.resolutions_},oe.prototype.getResolutionForExtent=function(t,e){var i=e||this.getSizeFromViewport_(),n=yt.a.getWidth(t)/i[0],r=yt.a.getHeight(t)/i[1];return Math.max(n,r)},oe.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.maxResolution_,n=this.minResolution_,r=Math.log(i/n)/Math.log(e);return function(t){return i/Math.pow(e,t*r)}},oe.prototype.getRotation=function(){return this.get(pt)},oe.prototype.getValueForResolutionFunction=function(t){var e=t||2,i=this.maxResolution_,n=this.minResolution_,r=Math.log(i/n)/Math.log(e);return function(t){return Math.log(i/t)/Math.log(e)/r}},oe.prototype.getState=function(){var t=this.getCenter(),e=this.getProjection(),i=this.getResolution(),n=this.getRotation();return{center:t.slice(),projection:void 0!==e?e:null,resolution:i,rotation:n,zoom:this.getZoom()}},oe.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},oe.prototype.getZoomForResolution=function(t){var e,i,n=this.minZoom_||0;if(this.resolutions_){var r=k.a.linearFindNearest(this.resolutions_,t,1);n=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)},oe.prototype.getResolutionForZoom=function(t){return this.constrainResolution(this.maxResolution_,t-this.minZoom_,0)},oe.prototype.fit=function(t,e){var i,r=e||{},o=r.size;o||(o=this.getSizeFromViewport_()),t instanceof Pt?t.getType()===mt.a.CIRCLE?(t=t.getExtent(),(i=re.fromExtent(t)).rotate(this.getRotation(),yt.a.getCenter(t))):i=t:($.a.assert(Array.isArray(t),24),$.a.assert(!yt.a.isEmpty(t),25),i=re.fromExtent(t));var a,s=void 0!==r.padding?r.padding:[0,0,0,0],l=void 0===r.constrainResolution||r.constrainResolution,u=void 0!==r.nearest&&r.nearest;a=void 0!==r.minResolution?r.minResolution:void 0!==r.maxZoom?this.constrainResolution(this.maxResolution_,r.maxZoom-this.minZoom_,0):0;for(var h=i.getFlatCoordinates(),c=this.getRotation(),f=Math.cos(-c),p=Math.sin(-c),d=1/0,g=1/0,_=-1/0,v=-1/0,y=i.getStride(),m=0,x=h.length;m<x;m+=y){var E=h[m]*f-h[m+1]*p,S=h[m]*p+h[m+1]*f;d=Math.min(d,E),g=Math.min(g,S),_=Math.max(_,E),v=Math.max(v,S)}var T=this.getResolutionForExtent([d,g,_,v],[o[0]-s[1]-s[3],o[1]-s[0]-s[2]]);if(T=isNaN(T)?a:Math.max(T,a),l){var C=this.constrainResolution(T,0,0);!u&&C<T&&(C=this.constrainResolution(C,-1,0)),T=C}p=-p;var R=(d+_)/2,I=(g+v)/2,b=[(R+=(s[1]-s[3])/2*T)*f-(I+=(s[0]-s[2])/2*T)*p,I*f+R*p],w=r.callback?r.callback:n.a.nullFunction;void 0!==r.duration?this.animate({resolution:T,center:b,duration:r.duration,easing:r.easing},w):(this.setResolution(T),this.setCenter(b),setTimeout(w.bind(void 0,!0),0))},oe.prototype.centerOn=function(t,e,i){var n=this.getRotation(),r=Math.cos(-n),o=Math.sin(-n),a=t[0]*r-t[1]*o,s=t[1]*r+t[0]*o,l=this.getResolution(),u=(a+=(e[0]/2-i[0])*l)*r-(s+=(i[1]-e[1]/2)*l)*(o=-o),h=s*r+a*o;this.setCenter([u,h])},oe.prototype.isDef=function(){return!!this.getCenter()&&void 0!==this.getResolution()},oe.prototype.rotate=function(t,e){if(void 0!==e){var i=this.calculateCenterRotate(t,e);this.setCenter(i)}this.setRotation(t)},oe.prototype.setCenter=function(t){this.set(ct,t),this.getAnimating()&&this.cancelAnimations()},oe.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},oe.prototype.setResolution=function(t){this.set(ft,t),this.getAnimating()&&this.cancelAnimations()},oe.prototype.setRotation=function(t){this.set(pt,t),this.getAnimating()&&this.cancelAnimations()},oe.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},oe.createCenterConstraint_=function(t){return void 0!==t.extent?at.createExtent(t.extent):at.none},oe.createResolutionConstraint_=function(t){var e,i,r,o=void 0!==t.minZoom?t.minZoom:n.a.DEFAULT_MIN_ZOOM,a=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2;if(void 0!==t.resolutions){var l=t.resolutions;i=l[o],r=void 0!==l[a]?l[a]:l[l.length-1],e=st.createSnapToResolutions(l)}else{var u=It.default.createProjection(t.projection,"EPSG:3857"),h=u.getExtent(),c=(h?Math.max(yt.a.getWidth(h),yt.a.getHeight(h)):360*It.default.METERS_PER_UNIT[bt.a.DEGREES]/u.getMetersPerUnit())/n.a.DEFAULT_TILE_SIZE/Math.pow(2,n.a.DEFAULT_MIN_ZOOM),f=c/Math.pow(2,28-n.a.DEFAULT_MIN_ZOOM);void 0!==(i=t.maxResolution)?o=0:i=c/Math.pow(s,o),void 0===(r=t.minResolution)&&(r=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(s,a):c/Math.pow(s,a):f),a=o+Math.floor(Math.log(i/r)/Math.log(s)),r=i/Math.pow(s,a-o),e=st.createSnapToPower(s,i,a-o)}return{constraint:e,maxResolution:i,minResolution:r,minZoom:o,zoomFactor:s}},oe.createRotationConstraint_=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?lt.createSnapToZero():!1===e?lt.none:"number"==typeof e?lt.createSnapToN(e):lt.none}return lt.disable},oe.isNoopAnimation=function(t){return!(t.sourceCenter&&t.targetCenter&&!_t.equals(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation};var ae=oe,se=i(15),le=i(126),ue="MAP_RENDERER",he="LAYER_RENDERER",ce={mapRendererPlugins_:[],getMapRendererPlugins:function(){return ce.mapRendererPlugins_},layerRendererPlugins_:[],getLayerRendererPlugins:function(){return ce.layerRendererPlugins_},register:function(t,e){switch(t){case ue:ce.mapRendererPlugins_.push(e);break;case he:ce.layerRendererPlugins_.push(e);break;default:throw new Error("Unsupported plugin type: "+t)}},registerMultiple:function(t,e){for(var i=0,n=e.length;i<n;++i)ce.register(t,e[i])}},fe=ce,pe="canvas",de="webgl",ge=i(27),_e=function(t){Z.a.call(this);var e=_e.createOptionsInternal(t);this.loadTilesWhileAnimating_=void 0!==t.loadTilesWhileAnimating&&t.loadTilesWhileAnimating,this.loadTilesWhileInteracting_=void 0!==t.loadTilesWhileInteracting&&t.loadTilesWhileInteracting,this.pixelRatio_=void 0!==t.pixelRatio?t.pixelRatio:c.a.DEVICE_PIXEL_RATIO,this.logos_=e.logos,this.animationDelayKey_,this.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_.call(this,Date.now())}.bind(this),this.coordinateToPixelTransform_=wt.a.create(),this.pixelToCoordinateTransform_=wt.a.create(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("DIV"),this.viewport_.className="ol-viewport"+(c.a.TOUCH?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.viewport_.style.msTouchAction="none",this.viewport_.style.touchAction="none",this.overlayContainer_=document.createElement("DIV"),this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("DIV"),this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent";for(var i=[f.a.CLICK,f.a.DBLCLICK,f.a.MOUSEDOWN,f.a.TOUCHSTART,f.a.MSPOINTERDOWN,p.POINTERDOWN,f.a.MOUSEWHEEL,f.a.WHEEL],n=0,s=i.length;n<s;++n)_.a.listen(this.overlayContainerStopEvent_,i[n],a.a.stopPropagation);for(var l in this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=new W(this,t.moveTolerance),p)_.a.listen(this.mapBrowserEventHandler_,p[l],this.handleMapBrowserEvent,this);this.keyboardEventTarget_=e.keyboardEventTarget,this.keyHandlerKeys_=null,_.a.listen(this.viewport_,f.a.WHEEL,this.handleBrowserEvent,this),_.a.listen(this.viewport_,f.a.MOUSEWHEEL,this.handleBrowserEvent,this),this.controls=e.controls||new r.a,this.interactions=e.interactions||new r.a,this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=e.mapRendererPlugin.create(this.viewport_,this),this.handleResize_,this.focus_=null,this.postRenderFunctions_=[],this.tileQueue_=new rt(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.skippedFeatureUids_={},_.a.listen(this,Z.a.getChangeEventType(Y),this.handleLayerGroupChanged_,this),_.a.listen(this,Z.a.getChangeEventType(q),this.handleViewChanged_,this),_.a.listen(this,Z.a.getChangeEventType(H),this.handleSizeChanged_,this),_.a.listen(this,Z.a.getChangeEventType(K),this.handleTargetChanged_,this),this.setProperties(e.values),this.controls.forEach(function(t){t.setMap(this)},this),_.a.listen(this.controls,o.a.ADD,function(t){t.element.setMap(this)},this),_.a.listen(this.controls,o.a.REMOVE,function(t){t.element.setMap(null)},this),this.interactions.forEach(function(t){t.setMap(this)},this),_.a.listen(this.interactions,o.a.ADD,function(t){t.element.setMap(this)},this),_.a.listen(this.interactions,o.a.REMOVE,function(t){t.element.setMap(null)},this),this.overlays_.forEach(this.addOverlayInternal_,this),_.a.listen(this.overlays_,o.a.ADD,function(t){this.addOverlayInternal_(t.element)},this),_.a.listen(this.overlays_,o.a.REMOVE,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)},this)};n.a.inherits(_e,Z.a),_e.prototype.addControl=function(t){this.getControls().push(t)},_e.prototype.addInteraction=function(t){this.getInteractions().push(t)},_e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},_e.prototype.addOverlay=function(t){this.getOverlays().push(t)},_e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},_e.prototype.disposeInternal=function(){this.mapBrowserEventHandler_.dispose(),_.a.unlisten(this.viewport_,f.a.WHEEL,this.handleBrowserEvent,this),_.a.unlisten(this.viewport_,f.a.MOUSEWHEEL,this.handleBrowserEvent,this),void 0!==this.handleResize_&&(window.removeEventListener(f.a.RESIZE,this.handleResize_,!1),this.handleResize_=void 0),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0),this.setTarget(null),Z.a.prototype.disposeInternal.call(this)},_e.prototype.forEachFeatureAtPixel=function(t,e,i){if(this.frameState_){var n=this.getCoordinateFromPixel(t),r=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance*this.frameState_.pixelRatio:0,o=void 0!==i.layerFilter?i.layerFilter:Ct.TRUE;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,r,e,null,o,null)}},_e.prototype.getFeaturesAtPixel=function(t,e){var i=null;return this.forEachFeatureAtPixel(t,function(t){i||(i=[]),i.push(t)},e),i},_e.prototype.forEachLayerAtPixel=function(t,e,i,n,r){if(this.frameState_){var o=void 0!==i?i:null,a=void 0!==n?n:Ct.TRUE,s=void 0!==r?r:null;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,e,o,a,s)}},_e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var i=this.getCoordinateFromPixel(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:Ct.TRUE,r=void 0!==e.hitTolerance?e.hitTolerance*this.frameState_.pixelRatio:0;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,n,null)},_e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},_e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),i=t.changedTouches?t.changedTouches[0]:t;return[i.clientX-e.left,i.clientY-e.top]},_e.prototype.getTarget=function(){return this.get(K)},_e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},_e.prototype.getCoordinateFromPixel=function(t){var e=this.frameState_;return e?wt.a.apply(e.pixelToCoordinateTransform,t.slice()):null},_e.prototype.getControls=function(){return this.controls},_e.prototype.getOverlays=function(){return this.overlays_},_e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},_e.prototype.getInteractions=function(){return this.interactions},_e.prototype.getLayerGroup=function(){return this.get(Y)},_e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},_e.prototype.getPixelFromCoordinate=function(t){var e=this.frameState_;return e?wt.a.apply(e.coordinateToPixelTransform,t.slice(0,2)):null},_e.prototype.getRenderer=function(){return this.renderer_},_e.prototype.getSize=function(){return this.get(H)},_e.prototype.getView=function(){return this.get(q)},_e.prototype.getViewport=function(){return this.viewport_},_e.prototype.getOverlayContainer=function(){return this.overlayContainer_},_e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},_e.prototype.getTilePriority=function(t,e,i,n){var r=this.frameState_;if(!(r&&e in r.wantedTiles))return it.DROP;if(!r.wantedTiles[e][t.getKey()])return it.DROP;var o=i[0]-r.focus[0],a=i[1]-r.focus[1];return 65536*Math.log(n)+Math.sqrt(o*o+a*a)/n},_e.prototype.handleBrowserEvent=function(t,e){var i=e||t.type,n=new h(i,this,t);this.handleMapBrowserEvent(n)},_e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){this.focus_=t.coordinate,t.frameState=this.frameState_;var e,i=this.getInteractions().getArray();if(!1!==this.dispatchEvent(t))for(e=i.length-1;e>=0;e--){var n=i[e];if(n.getActive()&&!n.handleEvent(t))break}}},_e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=16,n=i;if(t){var r=t.viewHints;r[ut]&&(i=this.loadTilesWhileAnimating_?8:0,n=2),r[ht]&&(i=this.loadTilesWhileInteracting_?8:0,n=2)}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}var o,a,s=this.postRenderFunctions_;for(o=0,a=s.length;o<a;++o)s[o](this,t);s.length=0},_e.prototype.handleSizeChanged_=function(){this.render()},_e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.keyHandlerKeys_){for(var e=0,i=this.keyHandlerKeys_.length;e<i;++e)_.a.unlistenByKey(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null}if(t){t.appendChild(this.viewport_);var n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[_.a.listen(n,f.a.KEYDOWN,this.handleBrowserEvent,this),_.a.listen(n,f.a.KEYPRESS,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(f.a.RESIZE,this.handleResize_,!1))}else this.renderer_.removeLayerRenderers(),se.a.removeNode(this.viewport_),void 0!==this.handleResize_&&(window.removeEventListener(f.a.RESIZE,this.handleResize_,!1),this.handleResize_=void 0);this.updateSize()},_e.prototype.handleTileChange_=function(){this.render()},_e.prototype.handleViewPropertyChanged_=function(){this.render()},_e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(_.a.unlistenByKey(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(_.a.unlistenByKey(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.viewport_.setAttribute("data-view",n.a.getUid(t)),this.viewPropertyListenerKey_=_.a.listen(t,J.a.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=_.a.listen(t,f.a.CHANGE,this.handleViewPropertyChanged_,this)),this.render()},_e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(_.a.unlistenByKey),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[_.a.listen(t,J.a.PROPERTYCHANGE,this.render,this),_.a.listen(t,f.a.CHANGE,this.render,this)]),this.render()},_e.prototype.isRendered=function(){return!!this.frameState_},_e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},_e.prototype.render=function(){void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},_e.prototype.removeControl=function(t){return this.getControls().remove(t)},_e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},_e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},_e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},_e.prototype.renderFrame_=function(t){var e,i,r,o=this.getSize(),a=this.getView(),s=yt.a.createEmpty(),u=this.frameState_,h=null;if(void 0!==o&&ge.a.hasArea(o)&&a&&a.isDef()){var c=a.getHints(this.frameState_?this.frameState_.viewHints:void 0),f=this.getLayerGroup().getLayerStatesArray(),p={};for(e=0,i=f.length;e<i;++e)p[n.a.getUid(f[e].layer)]=f[e];var d=(r=a.getState()).center,g=r.resolution/this.pixelRatio_;d[0]=Math.round(d[0]/g)*g,d[1]=Math.round(d[1]/g)*g,h={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,extent:s,focus:this.focus_?this.focus_:d,index:this.frameIndex_++,layerStates:p,layerStatesArray:f,logos:tt.a.assign({},this.logos_),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:o,skippedFeatureUids:this.skippedFeatureUids_,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:r,viewHints:c,wantedTiles:{}}}h&&(h.extent=yt.a.getForViewAndSize(r.center,r.resolution,r.rotation,h.size,s)),this.frameState_=h,this.renderer_.renderFrame(h),h&&(h.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,h.postRenderFunctions),u&&(!this.previousExtent_||!yt.a.isEmpty(this.previousExtent_)&&!yt.a.equals(h.extent,this.previousExtent_))&&(this.dispatchEvent(new l(X,this,u)),this.previousExtent_=yt.a.createOrUpdateEmpty(this.previousExtent_)),this.previousExtent_&&!h.viewHints[ut]&&!h.viewHints[ht]&&!yt.a.equals(h.extent,this.previousExtent_)&&(this.dispatchEvent(new l(V,this,h)),yt.a.clone(h.extent,this.previousExtent_))),this.dispatchEvent(new l(z,this,h)),setTimeout(this.handlePostRender.bind(this),0)},_e.prototype.setLayerGroup=function(t){this.set(Y,t)},_e.prototype.setSize=function(t){this.set(H,t)},_e.prototype.setTarget=function(t){this.set(K,t)},_e.prototype.setView=function(t){this.set(q,t)},_e.prototype.skipFeature=function(t){var e=n.a.getUid(t).toString();this.skippedFeatureUids_[e]=!0,this.render()},_e.prototype.updateSize=function(){var t=this.getTargetElement();if(t){var e=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth)])}else this.setSize(void 0)},_e.prototype.unskipFeature=function(t){var e=n.a.getUid(t).toString();delete this.skippedFeatureUids_[e],this.render()},_e.DEFAULT_RENDERER_TYPES=[pe,de],_e.LOGO_URL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszWWMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvYasvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvXH1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1VkbMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLPVcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqTacrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaarldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+HizeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDnBAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSFhYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJREFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxCBrb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7ahgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCnB3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDgq82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC",_e.createOptionsInternal=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i={},o={};if(void 0===t.logo||"boolean"==typeof t.logo&&t.logo)o[_e.LOGO_URL]="https://openlayers.org/";else{var a=t.logo;"string"==typeof a?o[a]="":a instanceof HTMLElement?o[n.a.getUid(a).toString()]=a:a&&($.a.assert("string"==typeof a.href,44),$.a.assert("string"==typeof a.src,45),o[a.src]=a.href)}var s,l,u=t.layers instanceof le.default?t.layers:new le.default({layers:t.layers});i[Y]=u,i[K]=t.target,i[q]=void 0!==t.view?t.view:new ae,void 0!==t.renderer?(Array.isArray(t.renderer)?s=t.renderer:"string"==typeof t.renderer?s=[t.renderer]:$.a.assert(!1,46),s.indexOf("dom")>=0&&(s=s.concat(_e.DEFAULT_RENDERER_TYPES))):s=_e.DEFAULT_RENDERER_TYPES;var h,c,f,p=fe.getMapRendererPlugins();t:for(var d=0,g=s.length;d<g;++d)for(var _=s[d],v=0,y=p.length;v<y;++v){var m=p[v];if(m.handles(_)){l=m;break t}}if(!l)throw new Error("Unable to create a map renderer for types: "+s.join(", "));return void 0!==t.controls&&(Array.isArray(t.controls)?h=new r.a(t.controls.slice()):($.a.assert(t.controls instanceof r.a,47),h=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?c=new r.a(t.interactions.slice()):($.a.assert(t.interactions instanceof r.a,48),c=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?f=new r.a(t.overlays.slice()):($.a.assert(t.overlays instanceof r.a,49),f=t.overlays):f=new r.a,{controls:h,interactions:c,keyboardEventTarget:e,logos:o,overlays:f,mapRendererPlugin:l,values:i}};var ve=_e,ye=function(t){Z.a.call(this),this.element=t.element?t.element:null,this.target_=null,this.map_=null,this.listenerKeys=[],this.render=t.render?t.render:n.a.nullFunction,t.target&&this.setTarget(t.target)};n.a.inherits(ye,Z.a),ye.prototype.disposeInternal=function(){se.a.removeNode(this.element),Z.a.prototype.disposeInternal.call(this)},ye.prototype.getMap=function(){return this.map_},ye.prototype.setMap=function(t){this.map_&&se.a.removeNode(this.element);for(var e=0,i=this.listenerKeys.length;e<i;++e)_.a.unlistenByKey(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,this.map_&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==n.a.nullFunction&&this.listenerKeys.push(_.a.listen(t,z,this.render,this)),t.render())},ye.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t};var me=ye,xe=i(33),Ee=i(84),Se=i(26),Te="postcompose",Ce="precompose",Re="render",Ie=i(47),be=function(t){var e=tt.a.assign({},t);delete e.source,Ee.default.call(this,e),this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,t.map&&this.setMap(t.map),_.a.listen(this,Z.a.getChangeEventType(Se.a.SOURCE),this.handleSourcePropertyChange_,this);var i=t.source?t.source:null;this.setSource(i)};n.a.inherits(be,Ee.default),be.visibleAtResolution=function(t,e){return t.visible&&e>=t.minResolution&&e<t.maxResolution},be.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},be.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},be.prototype.getSource=function(){return this.get(Se.a.SOURCE)||null},be.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():Ie.a.UNDEFINED},be.prototype.handleSourceChange_=function(){this.changed()},be.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(_.a.unlistenByKey(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=_.a.listen(t,f.a.CHANGE,this.handleSourceChange_,this)),this.changed()},be.prototype.setMap=function(t){this.mapPrecomposeKey_&&(_.a.unlistenByKey(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(_.a.unlistenByKey(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=_.a.listen(t,Ce,function(t){var e=this.getLayerState();e.managed=!1,e.zIndex=1/0,t.frameState.layerStatesArray.push(e),t.frameState.layerStates[n.a.getUid(this)]=e},this),this.mapRenderKey_=_.a.listen(this,f.a.CHANGE,t.render,t),this.changed())},be.prototype.setSource=function(t){this.set(Se.a.SOURCE,t)};var we=be,Le=function(t){var e=t||{};this.ulElement_=document.createElement("UL"),this.logoLi_=document.createElement("LI"),this.ulElement_.appendChild(this.logoLi_),this.logoLi_.style.display="none",this.collapsed_=void 0===e.collapsed||e.collapsed,this.collapsible_=void 0===e.collapsible||e.collapsible,this.collapsible_||(this.collapsed_=!1);var i=void 0!==e.className?e.className:"ol-attribution",n=void 0!==e.tipLabel?e.tipLabel:"Attributions",r=void 0!==e.collapseLabel?e.collapseLabel:"»";"string"==typeof r?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=r):this.collapseLabel_=r;var o=void 0!==e.label?e.label:"i";"string"==typeof o?(this.label_=document.createElement("span"),this.label_.textContent=o):this.label_=o;var a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,s=document.createElement("button");s.setAttribute("type","button"),s.title=n,s.appendChild(a),_.a.listen(s,f.a.CLICK,this.handleClick_,this);var l=i+" "+xe.a.CLASS_UNSELECTABLE+" "+xe.a.CLASS_CONTROL+(this.collapsed_&&this.collapsible_?" ol-collapsed":"")+(this.collapsible_?"":" ol-uncollapsible"),u=document.createElement("div");u.className=l,u.appendChild(this.ulElement_),u.appendChild(s);var h=e.render?e.render:Le.render;me.call(this,{element:u,render:h,target:e.target}),this.renderedAttributions_=[],this.renderedVisible_=!0,this.logoElements_={}};n.a.inherits(Le,me),Le.prototype.getSourceAttributions_=function(t){for(var e={},i=[],n=t.layerStatesArray,r=t.viewState.resolution,o=0,a=n.length;o<a;++o){var s=n[o];if(we.visibleAtResolution(s,r)){var l=s.layer.getSource();if(l){var u=l.getAttributions2();if(u){var h=u(t);if(h)if(Array.isArray(h))for(var c=0,f=h.length;c<f;++c)h[c]in e||(i.push(h[c]),e[h[c]]=!0);else h in e||(i.push(h),e[h]=!0)}}}}return i},Le.render=function(t){this.updateElement_(t.frameState)},Le.prototype.updateElement_=function(t){if(t){var e=this.getSourceAttributions_(t);if(!k.a.equals(e,this.renderedAttributions_)){for(;this.ulElement_.lastChild!==this.logoLi_;)this.ulElement_.removeChild(this.ulElement_.lastChild);for(var i=0,n=e.length;i<n;++i){var r=document.createElement("LI");r.innerHTML=e[i],this.ulElement_.appendChild(r)}0===e.length&&this.renderedAttributions_.length>0?this.element.classList.add("ol-logo-only"):0===this.renderedAttributions_.length&&e.length>0&&this.element.classList.remove("ol-logo-only");var o=e.length>0||!tt.a.isEmpty(t.logos);this.renderedVisible_!=o&&(this.element.style.display=o?"":"none",this.renderedVisible_=o),this.renderedAttributions_=e,this.insertLogos_(t)}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},Le.prototype.insertLogos_=function(t){var e,i,n,r,o=t.logos,a=this.logoElements_;for(e in a)e in o||(se.a.removeNode(a[e]),delete a[e]);for(r in o){var s=o[r];s instanceof HTMLElement&&(this.logoLi_.appendChild(s),a[r]=s),r in a||((i=new Image).src=r,""===s?n=i:((n=document.createElement("a")).href=s,n.appendChild(i)),this.logoLi_.appendChild(n),a[r]=n)}this.logoLi_.style.display=tt.a.isEmpty(o)?"none":""},Le.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},Le.prototype.handleToggle_=function(){this.element.classList.toggle("ol-collapsed"),this.collapsed_?se.a.replaceNode(this.collapseLabel_,this.label_):se.a.replaceNode(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_},Le.prototype.getCollapsible=function(){return this.collapsible_},Le.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},Le.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},Le.prototype.getCollapsed=function(){return this.collapsed_};var Oe=Le,Ae=function(t){var e=t||{},i=void 0!==e.className?e.className:"ol-rotate",n=void 0!==e.label?e.label:"⇧";this.label_=null,"string"==typeof n?(this.label_=document.createElement("span"),this.label_.className="ol-compass",this.label_.textContent=n):(this.label_=n,this.label_.classList.add("ol-compass"));var r=e.tipLabel?e.tipLabel:"Reset rotation",o=document.createElement("button");o.className=i+"-reset",o.setAttribute("type","button"),o.title=r,o.appendChild(this.label_),_.a.listen(o,f.a.CLICK,Ae.prototype.handleClick_,this);var a=i+" "+xe.a.CLASS_UNSELECTABLE+" "+xe.a.CLASS_CONTROL,s=document.createElement("div");s.className=a,s.appendChild(o);var l=e.render?e.render:Ae.render;this.callResetNorth_=e.resetNorth?e.resetNorth:void 0,me.call(this,{element:s,render:l,target:e.target}),this.duration_=void 0!==e.duration?e.duration:250,this.autoHide_=void 0===e.autoHide||e.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(xe.a.CLASS_HIDDEN)};n.a.inherits(Ae,me),Ae.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},Ae.prototype.resetNorth_=function(){var t=this.getMap().getView();t&&void 0!==t.getRotation()&&(this.duration_>0?t.animate({rotation:0,duration:this.duration_,easing:vt.a.easeOut}):t.setRotation(0))},Ae.render=function(t){var e=t.frameState;if(e){var i=e.viewState.rotation;if(i!=this.rotation_){var n="rotate("+i+"rad)";if(this.autoHide_){var r=this.element.classList.contains(xe.a.CLASS_HIDDEN);r||0!==i?r&&0!==i&&this.element.classList.remove(xe.a.CLASS_HIDDEN):this.element.classList.add(xe.a.CLASS_HIDDEN)}this.label_.style.msTransform=n,this.label_.style.webkitTransform=n,this.label_.style.transform=n}this.rotation_=i}};var Pe=Ae,Fe=function(t){var e=t||{},i=void 0!==e.className?e.className:"ol-zoom",n=void 0!==e.delta?e.delta:1,r=void 0!==e.zoomInLabel?e.zoomInLabel:"+",o=void 0!==e.zoomOutLabel?e.zoomOutLabel:"−",a=void 0!==e.zoomInTipLabel?e.zoomInTipLabel:"Zoom in",s=void 0!==e.zoomOutTipLabel?e.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=i+"-in",l.setAttribute("type","button"),l.title=a,l.appendChild("string"==typeof r?document.createTextNode(r):r),_.a.listen(l,f.a.CLICK,Fe.prototype.handleClick_.bind(this,n));var u=document.createElement("button");u.className=i+"-out",u.setAttribute("type","button"),u.title=s,u.appendChild("string"==typeof o?document.createTextNode(o):o),_.a.listen(u,f.a.CLICK,Fe.prototype.handleClick_.bind(this,-n));var h=i+" "+xe.a.CLASS_UNSELECTABLE+" "+xe.a.CLASS_CONTROL,c=document.createElement("div");c.className=h,c.appendChild(l),c.appendChild(u),me.call(this,{element:c,target:e.target}),this.duration_=void 0!==e.duration?e.duration:250};n.a.inherits(Fe,me),Fe.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},Fe.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getResolution();if(i){var n=e.constrainResolution(i,t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({resolution:n,duration:this.duration_,easing:vt.a.easeOut})):e.setResolution(n)}}};var Me=Fe,De={defaults:function(t){var e=t||{},i=new r.a;return(void 0===e.zoom||e.zoom)&&i.push(new Me(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new Pe(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new Oe(e.attributionOptions)),i}},ke=function(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0};ke.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},ke.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},ke.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var i=e-3;i>0&&this.points_[i+2]>t;)i-=3;var n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;var r=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/n,this.initialVelocity_>this.minVelocity_},ke.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},ke.prototype.getAngle=function(){return this.angle_};var Ne=ke,Ue="active",Ge=function(t){Z.a.call(this),this.map_=null,this.setActive(!0),this.handleEvent=t.handleEvent};n.a.inherits(Ge,Z.a),Ge.prototype.getActive=function(){return this.get(Ue)},Ge.prototype.getMap=function(){return this.map_},Ge.prototype.setActive=function(t){this.set(Ue,t)},Ge.prototype.setMap=function(t){this.map_=t},Ge.pan=function(t,e,i){var n=t.getCenter();if(n){var r=t.constrainCenter([n[0]+e[0],n[1]+e[1]]);i?t.animate({duration:i,easing:vt.a.linear,center:r}):t.setCenter(r)}},Ge.rotate=function(t,e,i,n){e=t.constrainRotation(e,0),Ge.rotateWithoutConstraints(t,e,i,n)},Ge.rotateWithoutConstraints=function(t,e,i,n){if(void 0!==e){var r=t.getRotation(),o=t.getCenter();void 0!==r&&o&&n>0?t.animate({rotation:e,anchor:i,duration:n,easing:vt.a.easeOut}):t.rotate(e,i)}},Ge.zoom=function(t,e,i,n,r){e=t.constrainResolution(e,0,r),Ge.zoomWithoutConstraints(t,e,i,n)},Ge.zoomByDelta=function(t,e,i,n){var r=t.getResolution(),o=t.constrainResolution(r,e,0);if(void 0!==o){var a=t.getResolutions();o=ot.a.clamp(o,t.getMinResolution()||a[a.length-1],t.getMaxResolution()||a[0])}if(i&&void 0!==o&&o!==r){var s=t.getCenter(),l=t.calculateCenterZoom(o,i);l=t.constrainCenter(l),i=[(o*s[0]-r*l[0])/(o-r),(o*s[1]-r*l[1])/(o-r)]}Ge.zoomWithoutConstraints(t,o,i,n)},Ge.zoomWithoutConstraints=function(t,e,i,n){if(e){var r=t.getResolution(),o=t.getCenter();if(void 0!==r&&o&&e!==r&&n)t.animate({resolution:e,anchor:i,duration:n,easing:vt.a.easeOut});else{if(i){var a=t.calculateCenterZoom(e,i);t.setCenter(a)}t.setResolution(e)}}};var je=Ge,Be=function(t){var e=t||{};this.delta_=e.delta?e.delta:1,je.call(this,{handleEvent:Be.handleEvent}),this.duration_=void 0!==e.duration?e.duration:250};n.a.inherits(Be,je),Be.handleEvent=function(t){var e=!1,i=t.originalEvent;if(t.type==p.DBLCLICK){var n=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_,a=n.getView();je.zoomByDelta(a,o,r,this.duration_),t.preventDefault(),e=!0}return!e};var We=Be,ze={altKeyOnly:function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},altShiftKeysOnly:function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey}};ze.always=Ct.TRUE,ze.click=function(t){return t.type==p.CLICK},ze.mouseActionButton=function(t){var e=t.originalEvent;return 0==e.button&&!(c.a.WEBKIT&&c.a.MAC&&e.ctrlKey)},ze.never=Ct.FALSE,ze.pointerMove=function(t){return"pointermove"==t.type},ze.singleClick=function(t){return t.type==p.SINGLECLICK},ze.doubleClick=function(t){return t.type==p.DBLCLICK},ze.noModifierKeys=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},ze.platformModifierKeyOnly=function(t){var e=t.originalEvent;return!e.altKey&&(c.a.MAC?e.metaKey:e.ctrlKey)&&!e.shiftKey},ze.shiftKeyOnly=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ze.targetNotEditable=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},ze.mouseOnly=function(t){return $.a.assert(t.pointerEvent,56),"mouse"==t.pointerEvent.pointerType},ze.primaryAction=function(t){var e=t.pointerEvent;return e.isPrimary&&0===e.button};var Xe=ze,Ve=function(t){var e=t||{},i=e.handleEvent?e.handleEvent:Ve.handleEvent;je.call(this,{handleEvent:i}),this.handleDownEvent_=e.handleDownEvent?e.handleDownEvent:Ve.handleDownEvent,this.handleDragEvent_=e.handleDragEvent?e.handleDragEvent:Ve.handleDragEvent,this.handleMoveEvent_=e.handleMoveEvent?e.handleMoveEvent:Ve.handleMoveEvent,this.handleUpEvent_=e.handleUpEvent?e.handleUpEvent:Ve.handleUpEvent,this.handlingDownUpSequence=!1,this.trackedPointers_={},this.targetPointers=[]};n.a.inherits(Ve,je),Ve.centroid=function(t){for(var e=t.length,i=0,n=0,r=0;r<e;r++)i+=t[r].clientX,n+=t[r].clientY;return[i/e,n/e]},Ve.prototype.isPointerDraggingEvent_=function(t){var e=t.type;return e===p.POINTERDOWN||e===p.POINTERDRAG||e===p.POINTERUP},Ve.prototype.updateTrackedPointers_=function(t){if(this.isPointerDraggingEvent_(t)){var e=t.pointerEvent,i=e.pointerId.toString();t.type==p.POINTERUP?delete this.trackedPointers_[i]:t.type==p.POINTERDOWN?this.trackedPointers_[i]=e:i in this.trackedPointers_&&(this.trackedPointers_[i]=e),this.targetPointers=tt.a.getValues(this.trackedPointers_)}},Ve.handleDragEvent=n.a.nullFunction,Ve.handleUpEvent=Ct.FALSE,Ve.handleDownEvent=Ct.FALSE,Ve.handleMoveEvent=n.a.nullFunction,Ve.handleEvent=function(t){if(!(t instanceof g))return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==p.POINTERDRAG)this.handleDragEvent_(t);else if(t.type==p.POINTERUP){var i=this.handleUpEvent_(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==p.POINTERDOWN){var n=this.handleDownEvent_(t);this.handlingDownUpSequence=n,e=this.shouldStopEvent(n)}else t.type==p.POINTERMOVE&&this.handleMoveEvent_(t);return!e},Ve.prototype.shouldStopEvent=function(t){return t};var Ye=Ve,He=function(t){Ye.call(this,{handleDownEvent:He.handleDownEvent_,handleDragEvent:He.handleDragEvent_,handleUpEvent:He.handleUpEvent_});var e=t||{};this.kinetic_=e.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.condition_=e.condition?e.condition:Xe.noModifierKeys,this.noKinetic_=!1};n.a.inherits(He,Ye),He.handleDragEvent_=function(t){var e=this.targetPointers,i=Ye.centroid(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){var n=this.lastCentroid[0]-i[0],r=i[1]-this.lastCentroid[1],o=t.map.getView(),a=o.getState(),s=[n,r];_t.scale(s,a.resolution),_t.rotate(s,a.rotation),_t.add(s,a.center),s=o.constrainCenter(s),o.setCenter(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=e.length},He.handleUpEvent_=function(t){var e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var n=this.kinetic_.getDistance(),r=this.kinetic_.getAngle(),o=i.getCenter(),a=e.getPixelFromCoordinate(o),s=e.getCoordinateFromPixel([a[0]-n*Math.cos(r),a[1]-n*Math.sin(r)]);i.animate({center:i.constrainCenter(s),duration:500,easing:vt.a.easeOut})}return i.setHint(ht,-1),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},He.handleDownEvent_=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,this.handlingDownUpSequence||e.setHint(ht,1),e.getAnimating()&&e.setCenter(t.frameState.viewState.center),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},He.prototype.shouldStopEvent=Ct.FALSE;var Ke=He,qe=function(t){var e=t||{};Ye.call(this,{handleDownEvent:qe.handleDownEvent_,handleDragEvent:qe.handleDragEvent_,handleUpEvent:qe.handleUpEvent_}),this.condition_=e.condition?e.condition:Xe.altShiftKeysOnly,this.lastAngle_=void 0,this.duration_=void 0!==e.duration?e.duration:250};n.a.inherits(qe,Ye),qe.handleDragEvent_=function(t){if(Xe.mouseOnly(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==lt.disable){var n=e.getSize(),r=t.pixel,o=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);if(void 0!==this.lastAngle_){var a=o-this.lastAngle_,s=i.getRotation();je.rotateWithoutConstraints(i,s-a)}this.lastAngle_=o}}},qe.handleUpEvent_=function(t){if(!Xe.mouseOnly(t))return!0;var e=t.map.getView();e.setHint(ht,-1);var i=e.getRotation();return je.rotate(e,i,void 0,this.duration_),!1},qe.handleDownEvent_=function(t){return!(!Xe.mouseOnly(t)||!Xe.mouseActionButton(t)||!this.condition_(t)||(t.map.getView().setHint(ht,1),this.lastAngle_=void 0,0))},qe.prototype.shouldStopEvent=Ct.FALSE;var Ze=qe,Je=i(55),Qe=function(t){this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null};n.a.inherits(Qe,Je.a),Qe.prototype.disposeInternal=function(){this.setMap(null)},Qe.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i=this.element_.style;i.left=Math.min(t[0],e[0])+"px",i.top=Math.min(t[1],e[1])+"px",i.width=Math.abs(e[0]-t[0])+"px",i.height=Math.abs(e[1]-t[1])+"px"},Qe.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left=e.top=e.width=e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},Qe.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},Qe.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixel,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new re([i])},Qe.prototype.getGeometry=function(){return this.geometry_};var $e=Qe,ti=function(t){Ye.call(this,{handleDownEvent:ti.handleDownEvent_,handleDragEvent:ti.handleDragEvent_,handleUpEvent:ti.handleUpEvent_});var e=t||{};this.box_=new $e(e.className||"ol-dragbox"),this.minArea_=void 0!==e.minArea?e.minArea:64,this.startPixel_=null,this.condition_=e.condition?e.condition:Xe.always,this.boxEndCondition_=e.boxEndCondition?e.boxEndCondition:ti.defaultBoxEndCondition};n.a.inherits(ti,Ye),ti.defaultBoxEndCondition=function(t,e,i){var n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_},ti.handleDragEvent_=function(t){Xe.mouseOnly(t)&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new ti.Event(ti.EventType_.BOXDRAG,t.coordinate,t)))},ti.prototype.getGeometry=function(){return this.box_.getGeometry()},ti.prototype.onBoxEnd=n.a.nullFunction,ti.handleUpEvent_=function(t){return!Xe.mouseOnly(t)||(this.box_.setMap(null),this.boxEndCondition_(t,this.startPixel_,t.pixel)&&(this.onBoxEnd(t),this.dispatchEvent(new ti.Event(ti.EventType_.BOXEND,t.coordinate,t))),!1)},ti.handleDownEvent_=function(t){return!(!Xe.mouseOnly(t)||!Xe.mouseActionButton(t)||!this.condition_(t)||(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new ti.Event(ti.EventType_.BOXSTART,t.coordinate,t)),0))},ti.EventType_={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend"},ti.Event=function(t,e,i){a.a.call(this,t),this.coordinate=e,this.mapBrowserEvent=i},n.a.inherits(ti.Event,a.a);var ei=ti,ii=function(t){var e=t||{},i=e.condition?e.condition:Xe.shiftKeyOnly;this.duration_=void 0!==e.duration?e.duration:200,this.out_=void 0!==e.out&&e.out,ei.call(this,{condition:i,className:e.className||"ol-dragzoom"})};n.a.inherits(ii,ei),ii.prototype.onBoxEnd=function(){var t=this.getMap(),e=t.getView(),i=t.getSize(),n=this.getGeometry().getExtent();if(this.out_){var r=e.calculateExtent(i),o=yt.a.createOrUpdateFromCoordinates([t.getPixelFromCoordinate(yt.a.getBottomLeft(n)),t.getPixelFromCoordinate(yt.a.getTopRight(n))]),a=e.getResolutionForExtent(o,i);yt.a.scaleFromCenter(r,1/a),n=r}var s=e.constrainResolution(e.getResolutionForExtent(n,i)),l=yt.a.getCenter(n);l=e.constrainCenter(l),e.animate({resolution:s,center:l,duration:this.duration_,easing:vt.a.easeOut})};var ni=ii,ri=37,oi=38,ai=39,si=40,li=function(t){je.call(this,{handleEvent:li.handleEvent});var e=t||{};this.defaultCondition_=function(t){return Xe.noModifierKeys(t)&&Xe.targetNotEditable(t)},this.condition_=void 0!==e.condition?e.condition:this.defaultCondition_,this.duration_=void 0!==e.duration?e.duration:100,this.pixelDelta_=void 0!==e.pixelDelta?e.pixelDelta:128};n.a.inherits(li,je),li.handleEvent=function(t){var e=!1;if(t.type==f.a.KEYDOWN){var i=t.originalEvent.keyCode;if(this.condition_(t)&&(i==si||i==ri||i==ai||i==oi)){var n=t.map.getView(),r=n.getResolution()*this.pixelDelta_,o=0,a=0;i==si?a=-r:i==ri?o=-r:i==ai?o=r:a=r;var s=[o,a];_t.rotate(s,n.getRotation()),je.pan(n,s,this.duration_),t.preventDefault(),e=!0}}return!e};var ui=li,hi=function(t){je.call(this,{handleEvent:hi.handleEvent});var e=t||{};this.condition_=e.condition?e.condition:Xe.targetNotEditable,this.delta_=e.delta?e.delta:1,this.duration_=void 0!==e.duration?e.duration:100};n.a.inherits(hi,je),hi.handleEvent=function(t){var e=!1;if(t.type==f.a.KEYDOWN||t.type==f.a.KEYPRESS){var i=t.originalEvent.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var n=t.map,r=i=="+".charCodeAt(0)?this.delta_:-this.delta_,o=n.getView();je.zoomByDelta(o,r,void 0,this.duration_),t.preventDefault(),e=!0}}return!e};var ci=hi,fi=function(t){je.call(this,{handleEvent:fi.handleEvent});var e=t||{};this.delta_=0,this.duration_=void 0!==e.duration?e.duration:250,this.timeout_=void 0!==e.timeout?e.timeout:80,this.useAnchor_=void 0===e.useAnchor||e.useAnchor,this.constrainResolution_=e.constrainResolution||!1,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_=void 0,this.trackpadDeltaPerZoom_=300,this.trackpadZoomBuffer_=1.5};n.a.inherits(fi,je),fi.handleEvent=function(t){var e=t.type;if(e!==f.a.WHEEL&&e!==f.a.MOUSEWHEEL)return!0;t.preventDefault();var i,n=t.map,r=t.originalEvent;if(this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==f.a.WHEEL?(i=r.deltaY,c.a.FIREFOX&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(i/=c.a.DEVICE_PIXEL_RATIO),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(i*=40)):t.type==f.a.MOUSEWHEEL&&(i=-r.wheelDeltaY,c.a.SAFARI&&(i/=3)),0===i)return!1;var o=Date.now();if(void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(i)<4?fi.Mode_.TRACKPAD:fi.Mode_.WHEEL),this.mode_===fi.Mode_.TRACKPAD){var a=n.getView();this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):a.setHint(ht,1),this.trackpadTimeoutId_=setTimeout(this.decrementInteractingHint_.bind(this),this.trackpadEventGap_);var s=a.getResolution()*Math.pow(2,i/this.trackpadDeltaPerZoom_),l=a.getMinResolution(),u=a.getMaxResolution(),h=0;if(s<l?(s=Math.max(s,l/this.trackpadZoomBuffer_),h=1):s>u&&(s=Math.min(s,u*this.trackpadZoomBuffer_),h=-1),this.lastAnchor_){var p=a.calculateCenterZoom(s,this.lastAnchor_);a.setCenter(a.constrainCenter(p))}return a.setResolution(s),0===h&&this.constrainResolution_&&a.animate({resolution:a.constrainResolution(s,i>0?-1:1),easing:vt.a.easeOut,anchor:this.lastAnchor_,duration:this.duration_}),h>0?a.animate({resolution:l,easing:vt.a.easeOut,anchor:this.lastAnchor_,duration:500}):h<0&&a.animate({resolution:u,easing:vt.a.easeOut,anchor:this.lastAnchor_,duration:500}),this.startTime_=o,!1}this.delta_+=i;var d=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),d),!1},fi.prototype.decrementInteractingHint_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().setHint(ht,-1)},fi.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var i=n.a.MOUSEWHEELZOOM_MAXDELTA,r=ot.a.clamp(this.delta_,-i,i);je.zoomByDelta(e,-r,this.lastAnchor_,this.duration_),this.mode_=void 0,this.delta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},fi.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},fi.Mode_={TRACKPAD:"trackpad",WHEEL:"wheel"};var pi=fi,di=function(t){Ye.call(this,{handleDownEvent:di.handleDownEvent_,handleDragEvent:di.handleDragEvent_,handleUpEvent:di.handleUpEvent_});var e=t||{};this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==e.threshold?e.threshold:.3,this.duration_=void 0!==e.duration?e.duration:250};n.a.inherits(di,Ye),di.handleDragEvent_=function(t){var e=0,i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){var o=r-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=r;var a=t.map,s=a.getView();if(s.getConstraints().rotation!==lt.disable){var l=a.getViewport().getBoundingClientRect(),u=Ye.centroid(this.targetPointers);if(u[0]-=l.left,u[1]-=l.top,this.anchor_=a.getCoordinateFromPixel(u),this.rotating_){var h=s.getRotation();a.render(),je.rotateWithoutConstraints(s,h+e,this.anchor_)}}},di.handleUpEvent_=function(t){if(this.targetPointers.length<2){var e=t.map.getView();if(e.setHint(ht,-1),this.rotating_){var i=e.getRotation();je.rotate(e,i,this.anchor_,this.duration_)}return!1}return!0},di.handleDownEvent_=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().setHint(ht,1),!0}return!1},di.prototype.shouldStopEvent=Ct.FALSE;var gi=di,_i=function(t){Ye.call(this,{handleDownEvent:_i.handleDownEvent_,handleDragEvent:_i.handleDragEvent_,handleUpEvent:_i.handleUpEvent_});var e=t||{};this.constrainResolution_=e.constrainResolution||!1,this.anchor_=null,this.duration_=void 0!==e.duration?e.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1};n.a.inherits(_i,Ye),_i.handleDragEvent_=function(t){var e=1,i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,o=i.clientY-n.clientY,a=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/a),this.lastDistance_=a;var s=t.map,l=s.getView(),u=l.getResolution(),h=l.getMaxResolution(),c=l.getMinResolution(),f=u*e;f>h?(e=h/u,f=h):f<c&&(e=c/u,f=c),1!=e&&(this.lastScaleDelta_=e);var p=s.getViewport().getBoundingClientRect(),d=Ye.centroid(this.targetPointers);d[0]-=p.left,d[1]-=p.top,this.anchor_=s.getCoordinateFromPixel(d),s.render(),je.zoomWithoutConstraints(l,f,this.anchor_)},_i.handleUpEvent_=function(t){if(this.targetPointers.length<2){var e=t.map.getView();e.setHint(ht,-1);var i=e.getResolution();if(this.constrainResolution_||i<e.getMinResolution()||i>e.getMaxResolution()){var n=this.lastScaleDelta_-1;je.zoom(e,i,this.anchor_,this.duration_,n)}return!1}return!0},_i.handleDownEvent_=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().setHint(ht,1),!0}return!1},_i.prototype.shouldStopEvent=Ct.FALSE;var vi=_i,yi={defaults:function(t){var e=t||{},i=new r.a,n=new Ne(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new Ze),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new We({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new Ke({kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new gi),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new vi({constrainResolution:e.constrainResolution,duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new ui),i.push(new ci({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new pi({constrainResolution:e.constrainResolution,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new ni({duration:e.zoomDuration})),i}},mi=i(57),xi=i(13),Ei=function(t,e,i,n,r){this.loader_=void 0!==r?r:null;var o=void 0!==r?xi.a.IDLE:xi.a.LOADED;mi.a.call(this,t,e,i,o),this.canvas_=n,this.error_=null};n.a.inherits(Ei,mi.a),Ei.prototype.getError=function(){return this.error_},Ei.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=xi.a.ERROR):this.state=xi.a.LOADED,this.changed()},Ei.prototype.load=function(){this.state==xi.a.IDLE&&(this.state=xi.a.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))},Ei.prototype.getImage=function(){return this.canvas_};var Si=Ei,Ti="IMAGE",Ci="TILE",Ri="VECTOR_TILE",Ii="VECTOR",bi="image",wi=function(t,e,i,n,r){a.a.call(this,t),this.vectorContext=e,this.frameState=i,this.context=n,this.glContext=r};n.a.inherits(wi,a.a);var Li=wi,Oi=i(7),Ai=i(39),Pi=function(){};Pi.prototype.drawCustom=function(t,e,i){},Pi.prototype.drawGeometry=function(t){},Pi.prototype.setStyle=function(t){},Pi.prototype.drawCircle=function(t,e){},Pi.prototype.drawFeature=function(t,e){},Pi.prototype.drawGeometryCollection=function(t,e){},Pi.prototype.drawLineString=function(t,e){},Pi.prototype.drawMultiLineString=function(t,e){},Pi.prototype.drawMultiPoint=function(t,e){},Pi.prototype.drawMultiPolygon=function(t,e){},Pi.prototype.drawPoint=function(t,e){},Pi.prototype.drawPolygon=function(t,e){},Pi.prototype.drawText=function(t,e){},Pi.prototype.setFillStrokeStyle=function(t,e){},Pi.prototype.setImageStyle=function(t,e){},Pi.prototype.setTextStyle=function(t,e){};var Fi=Pi,Mi=function(t,e,i,n,r){Fi.call(this),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.viewRotation_=r,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=0,this.imageSnapToPixel_=!1,this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=0,this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=wt.a.create()};n.a.inherits(Mi,Fi),Mi.prototype.drawImages_=function(t,e,i,n){if(this.image_){var r=Rt.transform2D(t,e,i,2,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.tmpLocalTransform_,s=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=s*this.imageOpacity_);var l,u,h=this.imageRotation_;for(this.imageRotateWithView_&&(h+=this.viewRotation_),l=0,u=r.length;l<u;l+=2){var c=r[l]-this.imageAnchorX_,f=r[l+1]-this.imageAnchorY_;if(this.imageSnapToPixel_&&(c=Math.round(c),f=Math.round(f)),0!==h||1!=this.imageScale_){var p=c+this.imageAnchorX_,d=f+this.imageAnchorY_;wt.a.compose(a,p,d,this.imageScale_,this.imageScale_,h,-p,-d),o.setTransform.apply(o,a)}o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,f,this.imageWidth_,this.imageHeight_)}0===h&&1==this.imageScale_||o.setTransform(1,0,0,1,0,0),1!=this.imageOpacity_&&(o.globalAlpha=s)}},Mi.prototype.drawText_=function(t,e,i,n){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var r=Rt.transform2D(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,a=this.textRotation_;for(this.textRotateWithView_&&(a+=this.viewRotation_);e<i;e+=n){var s=r[e]+this.textOffsetX_,l=r[e+1]+this.textOffsetY_;if(0!==a||1!=this.textScale_){var u=wt.a.compose(this.tmpLocalTransform_,s,l,this.textScale_,this.textScale_,a,-s,-l);o.setTransform.apply(o,u)}this.textStrokeState_&&o.strokeText(this.text_,s,l),this.textFillState_&&o.fillText(this.text_,s,l)}0===a&&1==this.textScale_||o.setTransform(1,0,0,1,0,0)}},Mi.prototype.moveToLineTo_=function(t,e,i,n,r){var o=this.context_,a=Rt.transform2D(t,e,i,n,this.transform_,this.pixelCoordinates_);o.moveTo(a[0],a[1]);var s=a.length;r&&(s-=2);for(var l=2;l<s;l+=2)o.lineTo(a[l],a[l+1]);return r&&o.closePath(),i},Mi.prototype.drawRings_=function(t,e,i,n){var r,o;for(r=0,o=i.length;r<o;++r)e=this.moveToLineTo_(t,e,i[r],n,!0);return e},Mi.prototype.drawCircle=function(t){if(yt.a.intersects(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=Pt.transform2D(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],r=Math.sqrt(i*i+n*n),o=this.context_;o.beginPath(),o.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},Mi.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},Mi.prototype.drawGeometry=function(t){switch(t.getType()){case mt.a.POINT:this.drawPoint(t);break;case mt.a.LINE_STRING:this.drawLineString(t);break;case mt.a.POLYGON:this.drawPolygon(t);break;case mt.a.MULTI_POINT:this.drawMultiPoint(t);break;case mt.a.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case mt.a.MULTI_POLYGON:this.drawMultiPolygon(t);break;case mt.a.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case mt.a.CIRCLE:this.drawCircle(t)}},Mi.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&yt.a.intersects(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},Mi.prototype.drawGeometryCollection=function(t){var e,i,n=t.getGeometriesArray();for(e=0,i=n.length;e<i;++e)this.drawGeometry(n[e])},Mi.prototype.drawPoint=function(t){var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},Mi.prototype.drawMultiPoint=function(t){var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},Mi.prototype.drawLineString=function(t){if(yt.a.intersects(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var n=t.getFlatMidpoint();this.drawText_(n,0,2,2)}}},Mi.prototype.drawMultiLineString=function(t){var e=t.getExtent();if(yt.a.intersects(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i,n,r=this.context_,o=t.getFlatCoordinates(),a=0,s=t.getEnds(),l=t.getStride();for(r.beginPath(),i=0,n=s.length;i<n;++i)a=this.moveToLineTo_(o,a,s[i],l,!1);r.stroke()}if(""!==this.text_){var u=t.getFlatMidpoints();this.drawText_(u,0,u.length,2)}}},Mi.prototype.drawPolygon=function(t){if(yt.a.intersects(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},Mi.prototype.drawMultiPolygon=function(t){if(yt.a.intersects(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e,i,n=this.context_,r=t.getOrientedFlatCoordinates(),o=0,a=t.getEndss(),s=t.getStride();for(n.beginPath(),e=0,i=a.length;e<i;++e){var l=a[e];o=this.drawRings_(r,o,l,s)}this.fillState_&&n.fill(),this.strokeState_&&n.stroke()}if(""!==this.text_){var u=t.getFlatInteriorPoints();this.drawText_(u,0,u.length,2)}}},Mi.prototype.setContextFillState_=function(t){var e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},Mi.prototype.setContextStrokeState_=function(t){var e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=e.lineCap=t.lineCap),c.a.CANVAS_LINE_DASH&&(k.a.equals(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=e.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,c.a.CANVAS_LINE_DASH&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},Mi.prototype.setContextTextState_=function(t){var e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:Oi.a.defaultTextAlign;i?(i.font!=t.font&&(i.font=e.font=t.font),i.textAlign!=n&&(i.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})},Mi.prototype.setFillStrokeStyle=function(t,e){if(t){var i=t.getColor();this.fillState_={fillStyle:Ai.a.asColorLike(i||Oi.a.defaultFillStyle)}}else this.fillState_=null;if(e){var n=e.getColor(),r=e.getLineCap(),o=e.getLineDash(),a=e.getLineDashOffset(),s=e.getLineJoin(),l=e.getWidth(),u=e.getMiterLimit();this.strokeState_={lineCap:void 0!==r?r:Oi.a.defaultLineCap,lineDash:o||Oi.a.defaultLineDash,lineDashOffset:a||Oi.a.defaultLineDashOffset,lineJoin:void 0!==s?s:Oi.a.defaultLineJoin,lineWidth:this.pixelRatio_*(void 0!==l?l:Oi.a.defaultLineWidth),miterLimit:void 0!==u?u:Oi.a.defaultMiterLimit,strokeStyle:Ai.a.asColorLike(n||Oi.a.defaultStrokeStyle)}}else this.strokeState_=null},Mi.prototype.setImageStyle=function(t){if(t){var e=t.getAnchor(),i=t.getImage(1),n=t.getOrigin(),r=t.getSize();this.imageAnchorX_=e[0],this.imageAnchorY_=e[1],this.imageHeight_=r[1],this.image_=i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=n[0],this.imageOriginY_=n[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScale()*this.pixelRatio_,this.imageSnapToPixel_=t.getSnapToPixel(),this.imageWidth_=r[0]}else this.image_=null},Mi.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var i=e.getColor();this.textFillState_={fillStyle:Ai.a.asColorLike(i||Oi.a.defaultFillStyle)}}else this.textFillState_=null;var n=t.getStroke();if(n){var r=n.getColor(),o=n.getLineCap(),a=n.getLineDash(),s=n.getLineDashOffset(),l=n.getLineJoin(),u=n.getWidth(),h=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:Oi.a.defaultLineCap,lineDash:a||Oi.a.defaultLineDash,lineDashOffset:s||Oi.a.defaultLineDashOffset,lineJoin:void 0!==l?l:Oi.a.defaultLineJoin,lineWidth:void 0!==u?u:Oi.a.defaultLineWidth,miterLimit:void 0!==h?h:Oi.a.defaultMiterLimit,strokeStyle:Ai.a.asColorLike(r||Oi.a.defaultStrokeStyle)}}else this.textStrokeState_=null;var c=t.getFont(),f=t.getOffsetX(),p=t.getOffsetY(),d=t.getRotateWithView(),g=t.getRotation(),_=t.getScale(),v=t.getText(),y=t.getTextAlign(),m=t.getTextBaseline();this.textState_={font:void 0!==c?c:Oi.a.defaultFont,textAlign:void 0!==y?y:Oi.a.defaultTextAlign,textBaseline:void 0!==m?m:Oi.a.defaultTextBaseline},this.text_=void 0!==v?v:"",this.textOffsetX_=void 0!==f?this.pixelRatio_*f:0,this.textOffsetY_=void 0!==p?this.pixelRatio_*p:0,this.textRotateWithView_=void 0!==d&&d,this.textRotation_=void 0!==g?g:0,this.textScale_=this.pixelRatio_*(void 0!==_?_:1)}else this.text_=""};var Di=Mi,ki=i(96),Ni=function(t){ki.a.call(this),this.layer_=t};n.a.inherits(Ni,ki.a),Ni.prototype.forEachFeatureAtCoordinate=n.a.nullFunction,Ni.prototype.hasFeatureAtCoordinate=Ct.FALSE,Ni.prototype.createLoadedTileFinder=function(t,e,i){return function(n,r){return t.forEachLoadedTile(e,n,r,function(t){i[n]||(i[n]={}),i[n][t.tileCoord.toString()]=t})}},Ni.prototype.getLayer=function(){return this.layer_},Ni.prototype.handleImageChange_=function(t){t.target.getState()===xi.a.LOADED&&this.renderIfReadyAndVisible()},Ni.prototype.loadImage=function(t){var e=t.getState();return e!=xi.a.LOADED&&e!=xi.a.ERROR&&_.a.listen(t,f.a.CHANGE,this.handleImageChange_,this),e==xi.a.IDLE&&(t.load(),e=t.getState()),e==xi.a.LOADED},Ni.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Ie.a.READY&&this.changed()},Ni.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var i=function(t,e,i){var r=n.a.getUid(t).toString();r in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[r])}.bind(null,e);t.postRenderFunctions.push(i)}},Ni.prototype.updateLogos=function(t,e){var i=e.getLogo();void 0!==i&&("string"==typeof i?t.logos[i]="":i&&($.a.assert("string"==typeof i.href,44),$.a.assert("string"==typeof i.src,45),t.logos[i.src]=i.href))},Ni.prototype.updateUsedTiles=function(t,e,i,r){var o=n.a.getUid(e).toString(),a=i.toString();o in t?a in t[o]?t[o][a].extend(r):t[o][a]=r:(t[o]={},t[o][a]=r)},Ni.prototype.manageTilePyramid=function(t,e,i,r,o,a,s,l,u,h){var c=n.a.getUid(e).toString();c in t.wantedTiles||(t.wantedTiles[c]={});var f,p,d,g,_,v,y=t.wantedTiles[c],m=t.tileQueue;for(v=i.getMinZoom();v<=s;++v)for(p=i.getTileRangeForExtentAndZ(a,v,p),d=i.getResolution(v),g=p.minX;g<=p.maxX;++g)for(_=p.minY;_<=p.maxY;++_)s-v<=l?((f=e.getTile(v,g,_,r,o)).getState()==Q.a.IDLE&&(y[f.getKey()]=!0,m.isKeyQueued(f.getKey())||m.enqueue([f,c,i.getTileCoordCenter(f.tileCoord),d])),void 0!==u&&u.call(h,f)):e.useTile(v,g,_,o)};var Ui=Ni,Gi=function(t){Ui.call(this,t),this.renderedResolution,this.transform_=wt.a.create()};n.a.inherits(Gi,Ui),Gi.prototype.clip=function(t,e,i){var n=e.pixelRatio,r=e.size[0]*n,o=e.size[1]*n,a=e.viewState.rotation,s=yt.a.getTopLeft(i),l=yt.a.getTopRight(i),u=yt.a.getBottomRight(i),h=yt.a.getBottomLeft(i);wt.a.apply(e.coordinateToPixelTransform,s),wt.a.apply(e.coordinateToPixelTransform,l),wt.a.apply(e.coordinateToPixelTransform,u),wt.a.apply(e.coordinateToPixelTransform,h),t.save(),Oi.a.rotateAtOffset(t,-a,r/2,o/2),t.beginPath(),t.moveTo(s[0]*n,s[1]*n),t.lineTo(l[0]*n,l[1]*n),t.lineTo(u[0]*n,u[1]*n),t.lineTo(h[0]*n,h[1]*n),t.clip(),Oi.a.rotateAtOffset(t,a,r/2,o/2)},Gi.prototype.dispatchComposeEvent_=function(t,e,i,n){var r=this.getLayer();if(r.hasListener(t)){var o=i.size[0]*i.pixelRatio,a=i.size[1]*i.pixelRatio,s=i.viewState.rotation;Oi.a.rotateAtOffset(e,-s,o/2,a/2);var l=void 0!==n?n:this.getTransform(i,0),u=new Di(e,i.pixelRatio,i.extent,l,i.viewState.rotation),h=new Li(t,u,i,e,null);r.dispatchEvent(h),Oi.a.rotateAtOffset(e,s,o/2,a/2)}},Gi.prototype.forEachLayerAtCoordinate=function(t,e,i,n){return this.forEachFeatureAtCoordinate(t,e,0,Ct.TRUE,this)?i.call(n,this.getLayer(),null):void 0},Gi.prototype.postCompose=function(t,e,i,n){this.dispatchComposeEvent_(Te,t,e,n)},Gi.prototype.preCompose=function(t,e,i){this.dispatchComposeEvent_(Ce,t,e,i)},Gi.prototype.dispatchRenderEvent=function(t,e,i){this.dispatchComposeEvent_(Re,t,e,i)},Gi.prototype.getTransform=function(t,e){var i=t.viewState,n=t.pixelRatio,r=n*t.size[0]/2,o=n*t.size[1]/2,a=n/i.resolution,s=-a,l=-i.rotation,u=-i.center[0]+e,h=-i.center[1];return wt.a.compose(this.transform_,r,o,a,s,l,u,h)},Gi.prototype.composeFrame=function(t,e,i){},Gi.prototype.prepareFrame=function(t,e){};var ji=Gi,Bi=function(t){ji.call(this,t),this.coordinateToCanvasPixelTransform=wt.a.create(),this.hitCanvasContext_=null};n.a.inherits(Bi,ji),Bi.prototype.composeFrame=function(t,e,i){this.preCompose(i,t);var n=this.getImage();if(n){var r=e.extent,o=void 0!==r&&!yt.a.containsExtent(r,t.extent)&&yt.a.intersects(r,t.extent);o&&this.clip(i,t,r);var a=this.getImageTransform(),s=i.globalAlpha;i.globalAlpha=e.opacity;var l=a[4],u=a[5],h=n.width*a[0],c=n.height*a[3];i.drawImage(n,0,0,+n.width,+n.height,Math.round(l),Math.round(u),Math.round(h),Math.round(c)),i.globalAlpha=s,o&&i.restore()}this.postCompose(i,t,e)},Bi.prototype.getImage=function(){},Bi.prototype.getImageTransform=function(){},Bi.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){var o=this.getLayer(),a=o.getSource(),s=e.viewState.resolution,l=e.viewState.rotation,u=e.skippedFeatureUids;return a.forEachFeatureAtCoordinate(t,s,l,i,u,function(t){return n.call(r,t,o)})},Bi.prototype.forEachLayerAtCoordinate=function(t,e,i,r){if(this.getImage()){if(this.getLayer().getSource().forEachFeatureAtCoordinate!==n.a.nullFunction)return ji.prototype.forEachLayerAtCoordinate.apply(this,arguments);var o=wt.a.apply(this.coordinateToCanvasPixelTransform,t.slice());_t.scale(o,e.viewState.resolution/this.renderedResolution),this.hitCanvasContext_||(this.hitCanvasContext_=se.a.createCanvasContext2D(1,1)),this.hitCanvasContext_.clearRect(0,0,1,1),this.hitCanvasContext_.drawImage(this.getImage(),o[0],o[1],1,1,0,0,1,1);var a=this.hitCanvasContext_.getImageData(0,0,1,1).data;return a[3]>0?i.call(r,this.getLayer(),a):void 0}};var Wi=Bi,zi=function(t){Wi.call(this,t),this.image_=null,this.imageTransform_=wt.a.create(),this.skippedFeatures_=[],this.vectorRenderer_=null};n.a.inherits(zi,Wi),zi.handles=function(t,e){return t===pe&&(e.getType()===Ti||e.getType()===Ii&&e.getRenderMode()===bi)},zi.create=function(t,e){var i=new zi(e);if(e.getType()===Ii)for(var n=fe.getLayerRendererPlugins(),r=0,o=n.length;r<o;++r){var a=n[r];a!==zi&&a.handles(pe,e)&&i.setVectorRenderer(a.create(t,e))}return i},zi.prototype.getImage=function(){return this.image_?this.image_.getImage():null},zi.prototype.getImageTransform=function(){return this.imageTransform_},zi.prototype.prepareFrame=function(t,e){var i,r=t.pixelRatio,o=t.size,a=t.viewState,s=a.center,l=a.resolution,u=this.getLayer().getSource(),h=t.viewHints,c=t.extent;if(void 0!==e.extent&&(c=yt.a.getIntersection(c,e.extent)),!h[ut]&&!h[ht]&&!yt.a.isEmpty(c)){var f=a.projection;if(!n.a.ENABLE_RASTER_REPROJECTION){var p=u.getProjection();p&&(f=p)}var d=this.vectorRenderer_;if(d){var g=d.context,_=tt.a.assign({},t,{size:[yt.a.getWidth(c)/l,yt.a.getHeight(c)/l],viewState:tt.a.assign({},t.viewState,{rotation:0})}),v=Object.keys(_.skippedFeatureUids).sort();!d.prepareFrame(_,e)||!d.replayGroupChanged&&k.a.equals(v,this.skippedFeatures_)||(g.canvas.width=_.size[0]*r,g.canvas.height=_.size[1]*r,d.composeFrame(_,e,g),this.image_=new Si(c,l,r,g.canvas),this.skippedFeatures_=v)}else(i=u.getImage(c,l,r,f))&&this.loadImage(i)&&(this.image_=i)}if(this.image_){var y=(i=this.image_).getExtent(),m=i.getResolution(),x=i.getPixelRatio(),E=r*m/(l*x),S=wt.a.compose(this.imageTransform_,r*o[0]/2,r*o[1]/2,E,E,0,x*(y[0]-s[0])/m,x*(s[1]-y[3])/m);wt.a.compose(this.coordinateToCanvasPixelTransform,r*o[0]/2-S[4],r*o[1]/2-S[5],r/l,-r/l,0,-s[0],-s[1]),this.updateLogos(t,u),this.renderedResolution=m*r/x}return!!this.image_},zi.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(t,e,i,n,r):Wi.prototype.forEachFeatureAtCoordinate.call(this,t,e,i,n,r)},zi.prototype.setVectorRenderer=function(t){this.vectorRenderer_=t};var Xi=zi,Vi=i(129),Yi=function(t,e){Je.a.call(this),this.map_=e,this.layerRenderers_={},this.layerRendererListeners_={}};n.a.inherits(Yi,Je.a),Yi.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;wt.a.compose(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),wt.a.invert(wt.a.setFromArray(n,i))},Yi.prototype.removeLayerRenderers=function(){for(var t in this.layerRenderers_)this.removeLayerRendererByKey_(t).dispose()},Yi.expireIconCache_=function(t,e){Vi.a.iconImageCache.expire()},Yi.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,o,a,s){var l,u=e.viewState,h=u.resolution;function c(t,i){var a=n.a.getUid(t).toString(),s=e.layerStates[n.a.getUid(i)].managed;if(!(a in e.skippedFeatureUids)||s)return r.call(o,t,s?i:null)}var f=u.projection,p=t;if(f.canWrapX()){var d=f.getExtent(),g=yt.a.getWidth(d),_=t[0];(_<d[0]||_>d[2])&&(p=[_+g*Math.ceil((d[0]-_)/g),t[1]])}var v,y=e.layerStatesArray;for(v=y.length-1;v>=0;--v){var m=y[v],x=m.layer;if(we.visibleAtResolution(m,h)&&a.call(s,x)){var E=this.getLayerRenderer(x);if(x.getSource()&&(l=E.forEachFeatureAtCoordinate(x.getSource().getWrapX()?p:t,e,i,c,o)),l)return l}}},Yi.prototype.forEachLayerAtPixel=function(t,e,i,n,r,o){},Yi.prototype.hasFeatureAtCoordinate=function(t,e,i,n,r){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,Ct.TRUE,this,n,r)},Yi.prototype.getLayerRenderer=function(t){var e=n.a.getUid(t).toString();if(e in this.layerRenderers_)return this.layerRenderers_[e];for(var i,r=fe.getLayerRendererPlugins(),o=this.getType(),a=0,s=r.length;a<s;++a){var l=r[a];if(l.handles(o,t)){i=l.create(this,t);break}}if(!i)throw new Error("Unable to create renderer for layer: "+t.getType());return this.layerRenderers_[e]=i,this.layerRendererListeners_[e]=_.a.listen(i,f.a.CHANGE,this.handleLayerRendererChange_,this),i},Yi.prototype.getLayerRendererByKey=function(t){return this.layerRenderers_[t]},Yi.prototype.getLayerRenderers=function(){return this.layerRenderers_},Yi.prototype.getMap=function(){return this.map_},Yi.prototype.getType=function(){},Yi.prototype.handleLayerRendererChange_=function(){this.map_.render()},Yi.prototype.removeLayerRendererByKey_=function(t){var e=this.layerRenderers_[t];return delete this.layerRenderers_[t],_.a.unlistenByKey(this.layerRendererListeners_[t]),delete this.layerRendererListeners_[t],e},Yi.prototype.renderFrame=n.a.nullFunction,Yi.prototype.removeUnusedLayerRenderers_=function(t,e){var i;for(i in this.layerRenderers_)e&&i in e.layerStates||this.removeLayerRendererByKey_(i).dispose()},Yi.prototype.scheduleExpireIconCache=function(t){t.postRenderFunctions.push(Yi.expireIconCache_)},Yi.prototype.scheduleRemoveUnusedLayerRenderers=function(t){var e;for(e in this.layerRenderers_)if(!(e in t.layerStates))return void t.postRenderFunctions.push(this.removeUnusedLayerRenderers_.bind(this))},Yi.sortByZIndex=function(t,e){return t.zIndex-e.zIndex};var Hi=Yi,Ki=function(t,e){Hi.call(this,t,e),this.context_=se.a.createCanvasContext2D(),this.canvas_=this.context_.canvas,this.canvas_.style.width="100%",this.canvas_.style.height="100%",this.canvas_.style.display="block",this.canvas_.className=xe.a.CLASS_UNSELECTABLE,t.insertBefore(this.canvas_,t.childNodes[0]||null),this.renderedVisible_=!0,this.transform_=wt.a.create()};n.a.inherits(Ki,Hi),Ki.handles=function(t){return t===pe},Ki.create=function(t,e){return new Ki(t,e)},Ki.prototype.dispatchComposeEvent_=function(t,e){var i=this.getMap(),n=this.context_;if(i.hasListener(t)){var r=e.extent,o=e.pixelRatio,a=e.viewState.rotation,s=this.getTransform(e),l=new Di(n,o,r,s,a),u=new Li(t,l,e,n,null);i.dispatchEvent(u)}},Ki.prototype.getTransform=function(t){var e=t.viewState,i=this.canvas_.width/2,n=this.canvas_.height/2,r=t.pixelRatio/e.resolution,o=-r,a=-e.rotation,s=-e.center[0],l=-e.center[1];return wt.a.compose(this.transform_,i,n,r,o,a,s,l)},Ki.prototype.getType=function(){return pe},Ki.prototype.renderFrame=function(t){if(t){var e=this.context_,i=t.pixelRatio,n=Math.round(t.size[0]*i),r=Math.round(t.size[1]*i);this.canvas_.width!=n||this.canvas_.height!=r?(this.canvas_.width=n,this.canvas_.height=r):e.clearRect(0,0,n,r);var o=t.viewState.rotation;this.calculateMatrices2D(t),this.dispatchComposeEvent_(Ce,t);var a=t.layerStatesArray;k.a.stableSort(a,Hi.sortByZIndex),o&&(e.save(),Oi.a.rotateAtOffset(e,o,n/2,r/2));var s,l,u,h,c,f=t.viewState.resolution;for(s=0,l=a.length;s<l;++s)u=(c=a[s]).layer,h=this.getLayerRenderer(u),we.visibleAtResolution(c,f)&&c.sourceState==Ie.a.READY&&h.prepareFrame(t,c)&&h.composeFrame(t,c,e);o&&e.restore(),this.dispatchComposeEvent_(Te,t),this.renderedVisible_||(this.canvas_.style.display="",this.renderedVisible_=!0),this.scheduleRemoveUnusedLayerRenderers(t),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.canvas_.style.display="none",this.renderedVisible_=!1)},Ki.prototype.forEachLayerAtPixel=function(t,e,i,n,r,o){var a,s,l=e.viewState.resolution,u=e.layerStatesArray,h=u.length,c=wt.a.apply(e.pixelToCoordinateTransform,t.slice());for(s=h-1;s>=0;--s){var f=u[s],p=f.layer;if(we.visibleAtResolution(f,l)&&r.call(o,p)&&(a=this.getLayerRenderer(p).forEachLayerAtCoordinate(c,e,i,n)))return a}};var qi=Ki,Zi=i(49),Ji=function(t){Wi.call(this,t),this.context=null===this.context?null:se.a.createCanvasContext2D(),this.oversampling_,this.renderedExtent_=null,this.renderedRevision,this.renderedTiles=[],this.tmpExtent=yt.a.createEmpty(),this.tmpTileRange_=new Zi.a(0,0,0,0),this.imageTransform_=wt.a.create(),this.zDirection=0};n.a.inherits(Ji,Wi),Ji.handles=function(t,e){return t===pe&&e.getType()===Ci},Ji.create=function(t,e){return new Ji(e)},Ji.prototype.isDrawableTile_=function(t){var e=t.getState(),i=this.getLayer().getUseInterimTilesOnError();return e==Q.a.LOADED||e==Q.a.EMPTY||e==Q.a.ERROR&&!i},Ji.prototype.prepareFrame=function(t,e){var i=t.pixelRatio,r=t.size,o=t.viewState,a=o.projection,s=o.resolution,l=o.center,u=this.getLayer(),h=u.getSource(),c=h.getRevision(),f=h.getTileGridForProjection(a),p=f.getZForResolution(s,this.zDirection),d=f.getResolution(p),g=Math.round(s/d)||1,_=t.extent;if(void 0!==e.extent&&(_=yt.a.getIntersection(_,e.extent)),yt.a.isEmpty(_))return!1;var v=f.getTileRangeForExtentAndZ(_,p),y=f.getTileRangeExtent(p,v),m=h.getTilePixelRatio(i),x={};x[p]={};var E,S,T,C=this.createLoadedTileFinder(h,a,x),R=this.tmpExtent,I=this.tmpTileRange_,b=!1;for(S=v.minX;S<=v.maxX;++S)for(T=v.minY;T<=v.maxY;++T){if((E=h.getTile(p,S,T,i,a)).getState()==Q.a.ERROR&&(u.getUseInterimTilesOnError()?u.getPreload()>0&&(b=!0):E.setState(Q.a.LOADED)),this.isDrawableTile_(E)||(E=E.getInterimTile()),this.isDrawableTile_(E)){var w=n.a.getUid(this);if(E.getState()==Q.a.LOADED){x[p][E.tileCoord.toString()]=E;var L=E.inTransition(w);b||!L&&-1!==this.renderedTiles.indexOf(E)||(b=!0)}if(1===E.getAlpha(w,t.time))continue}var O=f.getTileCoordChildTileRange(E.tileCoord,I,R),A=!1;O&&(A=C(p+1,O)),A||f.forEachTileCoordParentTileRange(E.tileCoord,C,null,I,R)}var P=d*i/m*g,F=t.viewHints,M=F[ut]||F[ht];if(!(this.renderedResolution&&Date.now()-t.time>16&&M)&&(b||!this.renderedExtent_||!yt.a.containsExtent(this.renderedExtent_,_)||this.renderedRevision!=c||g!=this.oversampling_||!M&&P!=this.renderedResolution)){var D=this.context;if(D){var k=h.getTilePixelSize(p,i,a),N=Math.round(v.getWidth()*k[0]/g),U=Math.round(v.getHeight()*k[1]/g),G=D.canvas;G.width!=N||G.height!=U?(this.oversampling_=g,G.width=N,G.height=U):(this.renderedExtent_&&!yt.a.equals(y,this.renderedExtent_)&&D.clearRect(0,0,N,U),g=this.oversampling_)}this.renderedTiles.length=0;var j,B,W,z,X,V,Y,H,K,q,Z=Object.keys(x).map(Number);for(Z.sort(function(t,e){return t===p?1:e===p?-1:t>e?1:t<e?-1:0}),z=0,X=Z.length;z<X;++z)for(var J in W=Z[z],B=h.getTilePixelSize(W,i,a),j=f.getResolution(W)/d,Y=m*h.getGutter(a),H=x[W])E=H[J],S=((V=f.getTileCoordExtent(E.getTileCoord(),R))[0]-y[0])/d*m/g,T=(y[3]-V[3])/d*m/g,K=B[0]*j/g,q=B[1]*j/g,this.drawTileImage(E,t,e,S,T,K,q,Y,p===W),this.renderedTiles.push(E);this.renderedRevision=c,this.renderedResolution=d*i/m*g,this.renderedExtent_=y}var $=this.renderedResolution/s,tt=wt.a.compose(this.imageTransform_,i*r[0]/2,i*r[1]/2,$,$,0,(this.renderedExtent_[0]-l[0])/this.renderedResolution*i,(l[1]-this.renderedExtent_[3])/this.renderedResolution*i);return wt.a.compose(this.coordinateToCanvasPixelTransform,i*r[0]/2-tt[4],i*r[1]/2-tt[5],i/s,-i/s,0,-l[0],-l[1]),this.updateUsedTiles(t.usedTiles,h,p,v),this.manageTilePyramid(t,h,f,i,a,_,p,u.getPreload()),this.scheduleExpireCache(t,h),this.updateLogos(t,h),this.renderedTiles.length>0},Ji.prototype.drawTileImage=function(t,e,i,r,o,a,s,l,u){var h=t.getImage(this.getLayer());if(h){var c=n.a.getUid(this),f=u?t.getAlpha(c,e.time):1;1!==f||this.getLayer().getSource().getOpaque(e.viewState.projection)||this.context.clearRect(r,o,a,s);var p=f!==this.context.globalAlpha;p&&(this.context.save(),this.context.globalAlpha=f),this.context.drawImage(h,l,l,h.width-2*l,h.height-2*l,r,o,a,s),p&&this.context.restore(),1!==f?e.animate=!0:u&&t.endTransition(c)}},Ji.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},Ji.prototype.getLayer,Ji.prototype.getImageTransform=function(){return this.imageTransform_};var Qi=Ji,$i=i(95),tn=i.n($i),en=function(){};en.prototype.getReplay=function(t,e){},en.prototype.isEmpty=function(){};var nn=en,rn={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"},on=i(29),an={lineString:function(t,e,i,n){var r,o=t[e],a=t[e+1],s=0;for(r=e+n;r<i;r+=n){var l=t[r],u=t[r+1];s+=Math.sqrt((l-o)*(l-o)+(u-a)*(u-a)),o=l,a=u}return s},linearRing:function(t,e,i,n){var r=an.lineString(t,e,i,n),o=t[i-n]-t[e],a=t[i-n+1]-t[e+1];return r+Math.sqrt(o*o+a*a)}},sn=an,ln={lineString:function(t,e,i,n,r,o,a,s){for(var l,u,h,c=[],f=t[e]>t[i-n],p=r.length,d=t[e],g=t[e+1],_=t[e+=n],v=t[e+1],y=0,m=Math.sqrt(Math.pow(_-d,2)+Math.pow(v-g,2)),x="",E=0,S=0;S<p;++S){u=f?p-S-1:S;var T=r.charAt(u),C=o(x=f?T+x:x+T)-E;E+=C;for(var R=a+C/2;e<i-n&&y+m<R;)d=_,g=v,_=t[e+=n],v=t[e+1],y+=m,m=Math.sqrt(Math.pow(_-d,2)+Math.pow(v-g,2));var I=R-y,b=Math.atan2(v-g,_-d);if(f&&(b+=b>0?-Math.PI:Math.PI),void 0!==h){var w=b-h;if(w+=w>Math.PI?-2*Math.PI:w<-Math.PI?2*Math.PI:0,Math.abs(w)>s)return null}var L=I/m,O=ot.a.lerp(d,_,L),A=ot.a.lerp(g,v,L);h==b?(f&&(l[0]=O,l[1]=A,l[2]=C/2),l[4]=x):(E=C,l=[O,A,C/2,b,x=T],f?c.unshift(l):c.push(l),h=b),a+=C}return c}},un=0,hn=1,cn=2,fn=3,pn=4,dn=5,gn=6,_n=7,vn=8,yn=9,mn=10,xn=11,En=12,Sn={};Sn.ORDER=[rn.POLYGON,rn.CIRCLE,rn.LINE_STRING,rn.IMAGE,rn.TEXT,rn.DEFAULT],Sn.TEXT_ALIGN={},Sn.TEXT_ALIGN.left=0,Sn.TEXT_ALIGN.end=0,Sn.TEXT_ALIGN.center=.5,Sn.TEXT_ALIGN.right=1,Sn.TEXT_ALIGN.start=1,Sn.TEXT_ALIGN.top=0,Sn.TEXT_ALIGN.middle=.5,Sn.TEXT_ALIGN.hanging=.2,Sn.TEXT_ALIGN.alphabetic=.8,Sn.TEXT_ALIGN.ideographic=.8,Sn.TEXT_ALIGN.bottom=1;var Tn=Sn,Cn=function(t,e,i,n,r,o){Fi.call(this),this.declutterTree=o,this.tmpExtent_=yt.a.createEmpty(),this.tolerance=t,this.maxExtent=e,this.overlaps=r,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.fillOrigin_,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.coordinateCache_={},this.renderedTransform_=wt.a.create(),this.hitDetectionInstructions=[],this.pixelCoordinates_=null,this.state={},this.viewRotation_=0,this.tmpLocalTransform_=wt.a.create(),this.resetTransform_=wt.a.create()};n.a.inherits(Cn,Fi),Cn.prototype.replayTextBackground_=function(t,e,i,n,r,o,a){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,e),o&&(this.fillOrigin_=o[2],this.fill_(t)),a&&(this.setStrokeStyle_(t,a),t.stroke())},Cn.prototype.replayImage_=function(t,e,i,n,r,o,a,s,l,u,h,c,f,p,d,g,_,v){var y=_||v,m=this.tmpLocalTransform_;e-=r*=f,i-=o*=f,p&&(e=Math.round(e),i=Math.round(i));var x,E,S,T,C=d+u>n.width?n.width-u:d,R=s+h>n.height?n.height-h:s,I=this.tmpExtent_,b=g[3]+C*f+g[1],w=g[0]+R*f+g[2],L=e-g[3],O=i-g[0];(y||0!==c)&&(x=[L,O],E=[L+b,O],S=[L+b,O+w],T=[L,O+w]);var A=null;if(0!==c){var P=e+r,F=i+o;A=wt.a.compose(m,P,F,1,1,c,-P,-F),yt.a.createOrUpdateEmpty(I),yt.a.extendCoordinate(I,wt.a.apply(m,x)),yt.a.extendCoordinate(I,wt.a.apply(m,E)),yt.a.extendCoordinate(I,wt.a.apply(m,S)),yt.a.extendCoordinate(I,wt.a.apply(m,T))}else yt.a.createOrUpdate(L,O,L+b,O+w,I);var M=t.canvas,D=I[0]<=M.width&&I[2]>=0&&I[1]<=M.height&&I[3]>=0;if(a){if(!D&&1==a[4])return;yt.a.extend(a,I);var k=D?[t,A?A.slice(0):null,l,n,u,h,C,R,e,i,f]:null;k&&y&&k.push(_,v,x,E,S,T),a.push(k)}else D&&(y&&this.replayTextBackground_(t,x,E,S,T,_,v),Oi.a.drawImage(t,A,l,n,u,h,C,R,e,i,f))},Cn.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})},Cn.prototype.appendFlatCoordinates=function(t,e,i,n,r,o){var a=this.coordinates.length,s=this.getBufferedMaxExtent();o&&(e+=n);var l,u,h,c=[t[e],t[e+1]],f=[NaN,NaN],p=!0;for(l=e+n;l<i;l+=n)f[0]=t[l],f[1]=t[l+1],(h=yt.a.coordinateRelationship(s,f))!==u?(p&&(this.coordinates[a++]=c[0],this.coordinates[a++]=c[1]),this.coordinates[a++]=f[0],this.coordinates[a++]=f[1],p=!1):h===on.a.INTERSECTING?(this.coordinates[a++]=f[0],this.coordinates[a++]=f[1],p=!1):p=!0,c[0]=f[0],c[1]=f[1],u=h;return(r&&p||l===e+n)&&(this.coordinates[a++]=c[0],this.coordinates[a++]=c[1]),a},Cn.prototype.drawCustomCoordinates_=function(t,e,i,n,r){for(var o=0,a=i.length;o<a;++o){var s=i[o],l=this.appendFlatCoordinates(t,e,s,n,!1,!1);r.push(l),e=s}return e},Cn.prototype.drawCustom=function(t,e,i){this.beginGeometry(t,e);var n,r,o,a,s,l=t.getType(),u=t.getStride(),h=this.coordinates.length;if(l==mt.a.MULTI_POLYGON){n=(t=t).getOrientedFlatCoordinates(),a=[];var c=t.getEndss();s=0;for(var f=0,p=c.length;f<p;++f){var d=[];s=this.drawCustomCoordinates_(n,s,c[f],u,d),a.push(d)}this.instructions.push([pn,h,a,t,i,jt.coordinatesss])}else l==mt.a.POLYGON||l==mt.a.MULTI_LINE_STRING?(o=[],n=l==mt.a.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),s=this.drawCustomCoordinates_(n,0,t.getEnds(),u,o),this.instructions.push([pn,h,o,t,i,jt.coordinatess])):l==mt.a.LINE_STRING||l==mt.a.MULTI_POINT?(n=t.getFlatCoordinates(),r=this.appendFlatCoordinates(n,0,n.length,u,!1,!1),this.instructions.push([pn,h,r,t,i,jt.coordinates])):l==mt.a.POINT&&(n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),r=this.coordinates.length,this.instructions.push([pn,h,r,t,i]));this.endGeometry(t,e)},Cn.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[un,e,0],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[un,e,0],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},Cn.prototype.fill_=function(t){if(this.fillOrigin_){var e=wt.a.apply(this.renderedTransform_,this.fillOrigin_.slice());t.translate(e[0],e[1]),t.rotate(this.viewRotation_)}t.fill(),this.fillOrigin_&&t.setTransform.apply(t,Oi.a.resetTransform_)},Cn.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],c.a.CANVAS_LINE_DASH&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},Cn.prototype.renderDeclutter_=function(t,e){if(t&&t.length>5){var i=t[4];if(1==i||i==t.length-5){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};if(!this.declutterTree.collides(n)){this.declutterTree.insert(n);for(var r=Oi.a.drawImage,o=5,a=t.length;o<a;++o){var s=t[o];s&&(s.length>11&&this.replayTextBackground_(s[0],s[13],s[14],s[15],s[16],s[11],s[12]),r.apply(void 0,s))}}t.length=5,yt.a.createOrUpdateEmpty(t)}}},Cn.prototype.replay_=function(t,e,i,r,o,a){var s;this.pixelCoordinates_&&k.a.equals(e,this.renderedTransform_)?s=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),s=Rt.transform2D(this.coordinates,0,this.coordinates.length,2,e,this.pixelCoordinates_),wt.a.setFromArray(this.renderedTransform_,e));for(var l,u,h,c,f,p,d,g,_,v=!tt.a.isEmpty(i),y=0,m=r.length,x=0,E=0,S=0,T=null,C=null,R=this.coordinateCache_,I=this.viewRotation_,b={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:I},w=this.instructions!=r||this.overlaps?0:200;y<m;){var L,O,A,P=r[y];switch(P[0]){case un:L=P[1],v&&i[n.a.getUid(L).toString()]||!L.getGeometry()?y=P[2]:void 0===a||yt.a.intersects(a,L.getGeometry().getExtent())?++y:y=P[2]+1;break;case hn:E>w&&(this.fill_(t),E=0),S>w&&(t.stroke(),S=0),E||S||(t.beginPath(),c=f=NaN),++y;break;case cn:var F=s[x=P[1]],M=s[x+1],D=s[x+2]-F,N=s[x+3]-M,U=Math.sqrt(D*D+N*N);t.moveTo(F+U,M),t.arc(F,M,U,0,2*Math.PI,!0),++y;break;case fn:t.closePath(),++y;break;case pn:x=P[1],l=P[2];var G=P[3],j=P[4],B=6==P.length?P[5]:void 0;b.geometry=G,b.feature=L,y in R||(R[y]=[]);var W=R[y];B?B(s,x,l,2,W):(W[0]=s[x],W[1]=s[x+1],W.length=2),j(W,b),++y;break;case gn:x=P[1],l=P[2],_=P[3],u=P[4],h=P[5],g=o?null:P[6];var z,X,V,Y=P[7],H=P[8],K=P[9],q=P[10],Z=P[11],J=P[12],Q=P[13],$=P[14],et=P[15];for(P.length>16?(z=P[16],X=P[17],V=P[18]):(z=Oi.a.defaultPadding,X=V=!1),Z&&(J+=I);x<l;x+=2)this.replayImage_(t,s[x],s[x+1],_,u,h,g,Y,H,K,q,J,Q,$,et,z,X?T:null,V?C:null);this.renderDeclutter_(g,L),++y;break;case dn:var it=P[1],nt=P[2],rt=P[3];g=o?null:P[4];var ot=P[5],at=P[6],st=P[7],lt=P[8],ut=P[9],ht=P[10],ct=P[11],ft=P[12],pt=P[13],dt=P[14],gt=sn.lineString(s,it,nt,2),_t=lt(ft);if(ot||_t<=gt){var vt=this.textStates[pt].textAlign,mt=(gt-_t)*Tn.TEXT_ALIGN[vt],xt=ln.lineString(s,it,nt,2,ft,lt,mt,st);if(xt){var Et,St,Tt,Ct,It;if(ht)for(Et=0,St=xt.length;Et<St;++Et)Tt=(It=xt[Et])[4],Ct=this.getImage(Tt,pt,"",ht),u=It[2]+ct,h=rt*Ct.height+2*(.5-rt)*ct-ut,this.replayImage_(t,It[0],It[1],Ct,u,h,g,Ct.height,1,0,0,It[3],dt,!1,Ct.width,Oi.a.defaultPadding,null,null);if(at)for(Et=0,St=xt.length;Et<St;++Et)Tt=(It=xt[Et])[4],Ct=this.getImage(Tt,pt,at,""),u=It[2],h=rt*Ct.height-ut,this.replayImage_(t,It[0],It[1],Ct,u,h,g,Ct.height,1,0,0,It[3],dt,!1,Ct.width,Oi.a.defaultPadding,null,null)}}this.renderDeclutter_(g,L),++y;break;case _n:if(void 0!==o){var bt=o(L=P[1]);if(bt)return bt}++y;break;case vn:w?E++:this.fill_(t),++y;break;case yn:for(x=P[1],l=P[2],O=s[x],d=(A=s[x+1])+.5|0,(p=O+.5|0)===c&&d===f||(t.moveTo(O,A),c=p,f=d),x+=2;x<l;x+=2)p=(O=s[x])+.5|0,d=(A=s[x+1])+.5|0,x!=l-2&&p===c&&d===f||(t.lineTo(O,A),c=p,f=d);++y;break;case mn:T=P,this.fillOrigin_=P[2],E&&(this.fill_(t),E=0,S&&(t.stroke(),S=0)),t.fillStyle=P[1],++y;break;case xn:C=P,S&&(t.stroke(),S=0),this.setStrokeStyle_(t,P),++y;break;case En:w?S++:t.stroke(),++y;break;default:++y}}E&&this.fill_(t),S&&t.stroke()},Cn.prototype.replay=function(t,e,i,n){this.viewRotation_=i,this.replay_(t,e,n,this.instructions,void 0,void 0)},Cn.prototype.replayHitDetection=function(t,e,i,n,r,o){return this.viewRotation_=i,this.replay_(t,e,n,this.hitDetectionInstructions,r,o)},Cn.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var i,n,r=e.length,o=-1;for(t=0;t<r;++t)(n=(i=e[t])[0])==_n?o=t:n==un&&(i[2]=t,k.a.reverseSubArray(this.hitDetectionInstructions,o,t),o=-1)},Cn.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var n=t.getColor();i.fillStyle=Ai.a.asColorLike(n||Oi.a.defaultFillStyle)}else i.fillStyle=void 0;if(e){var r=e.getColor();i.strokeStyle=Ai.a.asColorLike(r||Oi.a.defaultStrokeStyle);var o=e.getLineCap();i.lineCap=void 0!==o?o:Oi.a.defaultLineCap;var a=e.getLineDash();i.lineDash=a?a.slice():Oi.a.defaultLineDash;var s=e.getLineDashOffset();i.lineDashOffset=s||Oi.a.defaultLineDashOffset;var l=e.getLineJoin();i.lineJoin=void 0!==l?l:Oi.a.defaultLineJoin;var u=e.getWidth();i.lineWidth=void 0!==u?u:Oi.a.defaultLineWidth;var h=e.getMiterLimit();i.miterLimit=void 0!==h?h:Oi.a.defaultMiterLimit,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},Cn.prototype.applyFill=function(t,e){var i=t.fillStyle,n=[mn,i];if("string"!=typeof i){var r=e.getExtent();n.push([r[0],r[3]])}this.instructions.push(n)},Cn.prototype.applyStroke=function(t){this.instructions.push([xn,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio])},Cn.prototype.updateFillStyle=function(t,e,i){var n=t.fillStyle;"string"==typeof n&&t.currentFillStyle==n||(e.call(this,t,i),t.currentFillStyle=n)},Cn.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,r=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,s=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!k.a.equals(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=s||t.currentMiterLimit!=l)&&(e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=s,t.currentMiterLimit=l)},Cn.prototype.endGeometry=function(t,e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var i=[_n,e];this.instructions.push(i),this.hitDetectionInstructions.push(i)},Cn.prototype.finish=n.a.nullFunction,Cn.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=yt.a.clone(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;yt.a.buffer(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_};var Rn=Cn,In=function(t,e,i,n,r,o){Rn.call(this,t,e,i,n,r,o),this.declutterGroup_=null,this.hitDetectionImage_=null,this.image_=null,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.snapToPixel_=void 0,this.width_=void 0};n.a.inherits(In,Rn),In.prototype.drawCoordinates_=function(t,e,i,n){return this.appendFlatCoordinates(t,e,i,n,!1,!1)},In.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([gn,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([gn,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(t,e)}},In.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),r=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([gn,r,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.snapToPixel_,this.width_]),this.hitDetectionInstructions.push([gn,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.snapToPixel_,this.width_]),this.endGeometry(t,e)}},In.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.snapToPixel_=void 0,this.width_=void 0},In.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),n=t.getSize(),r=t.getHitDetectionImage(1),o=t.getImage(1),a=t.getOrigin();this.anchorX_=i[0],this.anchorY_=i[1],this.declutterGroup_=e,this.hitDetectionImage_=r,this.image_=o,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=a[0],this.originY_=a[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScale(),this.snapToPixel_=t.getSnapToPixel(),this.width_=n[0]};var bn=In,wn=function(t,e,i,n,r,o){Rn.call(this,t,e,i,n,r,o)};n.a.inherits(wn,Rn),wn.prototype.drawFlatCoordinates_=function(t,e,i,n){var r=this.coordinates.length,o=this.appendFlatCoordinates(t,e,i,n,!1,!1),a=[yn,r,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),i},wn.prototype.drawLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([xn,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[hn]);var o=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(o,0,o.length,a),this.hitDetectionInstructions.push([En]),this.endGeometry(t,e)}},wn.prototype.drawMultiLineString=function(t,e){var i=this.state,n=i.strokeStyle,r=i.lineWidth;if(void 0!==n&&void 0!==r){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([xn,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],[hn]);var o,a,s=t.getEnds(),l=t.getFlatCoordinates(),u=t.getStride(),h=0;for(o=0,a=s.length;o<a;++o)h=this.drawFlatCoordinates_(l,h,s[o],u);this.hitDetectionInstructions.push([En]),this.endGeometry(t,e)}},wn.prototype.finish=function(){var t=this.state;null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push([En]),this.reverseHitDetectionInstructions(),this.state=null},wn.prototype.applyStroke=function(t){null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push([En]),t.lastStroke=this.coordinates.length),t.lastStroke=0,Rn.prototype.applyStroke.call(this,t),this.instructions.push([hn])};var Ln=wn,On=i(31),An=function(t,e,i,n,r,o){Rn.call(this,t,e,i,n,r,o)};n.a.inherits(An,Rn),An.prototype.drawFlatCoordinatess_=function(t,e,i,n){var r=this.state,o=void 0!==r.fillStyle,a=null!=r.strokeStyle,s=i.length,l=[hn];this.instructions.push(l),this.hitDetectionInstructions.push(l);for(var u=0;u<s;++u){var h=i[u],c=this.coordinates.length,f=this.appendFlatCoordinates(t,e,h,n,!0,!a),p=[yn,c,f];if(this.instructions.push(p),this.hitDetectionInstructions.push(p),a){var d=[fn];this.instructions.push(d),this.hitDetectionInstructions.push(d)}e=h}var g=[vn];if(this.hitDetectionInstructions.push(g),o&&this.instructions.push(g),a){var _=[En];this.instructions.push(_),this.hitDetectionInstructions.push(_)}return e},An.prototype.drawCircle=function(t,e){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(t),this.beginGeometry(t,e),this.hitDetectionInstructions.push([mn,On.a.asString(Oi.a.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([xn,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getFlatCoordinates(),a=t.getStride(),s=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,a,!1,!1);var l=[hn],u=[cn,s];this.instructions.push(l,u),this.hitDetectionInstructions.push(l,u);var h=[vn];if(this.hitDetectionInstructions.push(h),void 0!==i.fillStyle&&this.instructions.push(h),void 0!==i.strokeStyle){var c=[En];this.instructions.push(c),this.hitDetectionInstructions.push(c)}this.endGeometry(t,e)}},An.prototype.drawPolygon=function(t,e){var i=this.state;this.setFillStrokeStyles_(t),this.beginGeometry(t,e),this.hitDetectionInstructions.push([mn,On.a.asString(Oi.a.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([xn,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var n=t.getEnds(),r=t.getOrientedFlatCoordinates(),o=t.getStride();this.drawFlatCoordinatess_(r,0,n,o),this.endGeometry(t,e)},An.prototype.drawMultiPolygon=function(t,e){var i=this.state,n=i.fillStyle,r=i.strokeStyle;if(void 0!==n||void 0!==r){this.setFillStrokeStyles_(t),this.beginGeometry(t,e),this.hitDetectionInstructions.push([mn,On.a.asString(Oi.a.defaultFillStyle)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([xn,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o,a,s=t.getEndss(),l=t.getOrientedFlatCoordinates(),u=t.getStride(),h=0;for(o=0,a=s.length;o<a;++o)h=this.drawFlatCoordinatess_(l,h,s[o],u);this.endGeometry(t,e)}},An.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var t=this.tolerance;if(0!==t){var e,i,n=this.coordinates;for(e=0,i=n.length;e<i;++e)n[e]=Wt.snap(n[e],t)}},An.prototype.setFillStrokeStyles_=function(t){var e=this.state;void 0!==e.fillStyle&&this.updateFillStyle(e,this.applyFill,t),void 0!==e.strokeStyle&&this.updateStrokeStyle(e,this.applyStroke)};var Pn=An,Fn={lineString:function(t,e,i,n,r){var o,a,s,l,u,h,c,f,p,d=i,g=i,_=0,v=0,y=i;for(o=i;o<n;o+=r){var m=e[o],x=e[o+1];void 0!==l&&(f=m-l,p=x-u,s=Math.sqrt(f*f+p*p),void 0!==h&&(v+=a,Math.acos((h*f+c*p)/(a*s))>t&&(v>_&&(_=v,d=y,g=o),v=0,y=o-r)),a=s,h=f,c=p),l=m,u=x}return(v+=s)>_?[y,o]:[d,g]}},Mn=i(125),Dn=function(t,e,i,n,r,o){Rn.call(this,t,e,i,n,r,o),this.declutterGroup_,this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.widths_={},Oi.a.labelCache.prune()};n.a.inherits(Dn,Rn),Dn.measureTextWidths=function(t,e,i){var n,r,o=e.length,a=0;for(r=0;r<o;++r)n=Oi.a.measureTextWidth(t,e[r]),a=Math.max(a,n),i.push(n);return a},Dn.prototype.drawText=function(t,e){var i=this.textFillState_,n=this.textStrokeState_,r=this.textState_;if(""!==this.text_&&r&&(i||n)){var o,a,s=this.coordinates.length,l=t.getType(),u=null,h=2,c=2;if(r.placement===Mn.a.LINE){if(!yt.a.intersects(this.getBufferedMaxExtent(),t.getExtent()))return;var f;if(u=t.getFlatCoordinates(),c=t.getStride(),l==mt.a.LINE_STRING)f=[u.length];else if(l==mt.a.MULTI_LINE_STRING)f=t.getEnds();else if(l==mt.a.POLYGON)f=t.getEnds().slice(0,1);else if(l==mt.a.MULTI_POLYGON){var p=t.getEndss();for(f=[],o=0,a=p.length;o<a;++o)f.push(p[o][0])}this.beginGeometry(t,e);for(var d,g=r.textAlign,_=0,v=0,y=f.length;v<y;++v){if(null==g){var m=Fn.lineString(r.maxAngle,u,_,f[v],c);_=m[0],d=m[1]}else d=f[v];for(o=_;o<d;o+=c)this.coordinates.push(u[o],u[o+1]);h=this.coordinates.length,_=f[v],this.drawChars_(s,h,this.declutterGroup_),s=h}this.endGeometry(t,e)}else{var x=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_),E=x.width/this.pixelRatio;switch(l){case mt.a.POINT:case mt.a.MULTI_POINT:h=(u=t.getFlatCoordinates()).length;break;case mt.a.LINE_STRING:u=t.getFlatMidpoint();break;case mt.a.CIRCLE:u=t.getCenter();break;case mt.a.MULTI_LINE_STRING:h=(u=t.getFlatMidpoints()).length;break;case mt.a.POLYGON:if(u=t.getFlatInteriorPoint(),!r.overflow&&u[2]/this.resolution<E)return;c=3;break;case mt.a.MULTI_POLYGON:var S=t.getFlatInteriorPoints();for(u=[],o=0,a=S.length;o<a;o+=3)(r.overflow||S[o+2]/this.resolution>=E)&&u.push(S[o],S[o+1]);if(0==(h=u.length))return}h=this.appendFlatCoordinates(u,0,h,c,!1,!1),this.beginGeometry(t,e),(r.backgroundFill||r.backgroundStroke)&&(this.setFillStrokeStyle(r.backgroundFill,r.backgroundStroke),this.updateFillStyle(this.state,this.applyFill,t),this.updateStrokeStyle(this.state,this.applyStroke)),this.drawTextImage_(x,s,h),this.endGeometry(t,e)}}},Dn.prototype.getImage=function(t,e,i,n){var r,o=n+e+t+i+this.pixelRatio,a=Oi.a.labelCache;if(!a.containsKey(o)){var s=n?this.strokeStates[n]||this.textStrokeState_:null,l=i?this.fillStates[i]||this.textFillState_:null,u=this.textStates[e]||this.textState_,h=this.pixelRatio,f=u.scale*h,p=Tn.TEXT_ALIGN[u.textAlign||Oi.a.defaultTextAlign],d=n&&s.lineWidth?s.lineWidth:0,g=t.split("\n"),_=g.length,v=[],y=Dn.measureTextWidths(u.font,g,v),m=Oi.a.measureTextHeight(u.font),x=m*_,E=y+d,S=se.a.createCanvasContext2D(Math.ceil(E*f),Math.ceil((x+d)*f));r=S.canvas,a.set(o,r),1!=f&&S.scale(f,f),S.font=u.font,n&&(S.strokeStyle=s.strokeStyle,S.lineWidth=d*(c.a.SAFARI?f:1),S.lineCap=s.lineCap,S.lineJoin=s.lineJoin,S.miterLimit=s.miterLimit,c.a.CANVAS_LINE_DASH&&s.lineDash.length&&(S.setLineDash(s.lineDash),S.lineDashOffset=s.lineDashOffset)),i&&(S.fillStyle=l.fillStyle),S.textBaseline="middle",S.textAlign="center";var T,C=.5-p,R=p*r.width/f+C*d;if(n)for(T=0;T<_;++T)S.strokeText(g[T],R+C*v[T],.5*(d+m)+T*m);if(i)for(T=0;T<_;++T)S.fillText(g[T],R+C*v[T],.5*(d+m)+T*m)}return a.get(o)},Dn.prototype.drawTextImage_=function(t,e,i){var n=this.textState_,r=this.textStrokeState_,o=this.pixelRatio,a=Tn.TEXT_ALIGN[n.textAlign||Oi.a.defaultTextAlign],s=Tn.TEXT_ALIGN[n.textBaseline],l=r&&r.lineWidth?r.lineWidth:0,u=a*t.width/o+2*(.5-a)*l,h=s*t.height/o+2*(.5-s)*l;this.instructions.push([gn,e,i,t,(u-this.textOffsetX_)*o,(h-this.textOffsetY_)*o,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,!0,t.width,n.padding==Oi.a.defaultPadding?Oi.a.defaultPadding:n.padding.map(function(t){return t*o}),!!n.backgroundFill,!!n.backgroundStroke]),this.hitDetectionInstructions.push([gn,e,i,t,(u-this.textOffsetX_)*o,(h-this.textOffsetY_)*o,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/o,!0,t.width,n.padding,!!n.backgroundFill,!!n.backgroundStroke])},Dn.prototype.drawChars_=function(t,e,i){var n=this.textStrokeState_,r=this.textState_,o=this.textFillState_,a=this.strokeKey_;n&&(a in this.strokeStates||(this.strokeStates[a]={strokeStyle:n.strokeStyle,lineCap:n.lineCap,lineDashOffset:n.lineDashOffset,lineWidth:n.lineWidth,lineJoin:n.lineJoin,miterLimit:n.miterLimit,lineDash:n.lineDash}));var s=this.textKey_;this.textKey_ in this.textStates||(this.textStates[this.textKey_]={font:r.font,textAlign:r.textAlign||Oi.a.defaultTextAlign,scale:r.scale});var l=this.fillKey_;o&&(l in this.fillStates||(this.fillStates[l]={fillStyle:o.fillStyle}));var u=this.pixelRatio,h=Tn.TEXT_ALIGN[r.textBaseline],c=this.textOffsetY_*u,f=this.text_,p=r.font,d=r.scale,g=n?n.lineWidth*d/2:0,_=this.widths_[p];_||(this.widths_[p]=_={}),this.instructions.push([dn,t,e,h,i,r.overflow,l,r.maxAngle,function(t){var e=_[t];return e||(e=_[t]=Oi.a.measureTextWidth(p,t)),e*d*u},c,a,g*u,f,s,1]),this.hitDetectionInstructions.push([dn,t,e,h,i,r.overflow,l,r.maxAngle,function(t){var e=_[t];return e||(e=_[t]=Oi.a.measureTextWidth(p,t)),e*d},c,a,g,f,s,1/u])},Dn.prototype.setTextStyle=function(t,e){var i,r,o;if(t){this.declutterGroup_=e;var a=t.getFill();a?((r=this.textFillState_)||(r=this.textFillState_={}),r.fillStyle=Ai.a.asColorLike(a.getColor()||Oi.a.defaultFillStyle)):r=this.textFillState_=null;var s=t.getStroke();if(s){(o=this.textStrokeState_)||(o=this.textStrokeState_={});var l=s.getLineDash(),u=s.getLineDashOffset(),h=s.getWidth(),c=s.getMiterLimit();o.lineCap=s.getLineCap()||Oi.a.defaultLineCap,o.lineDash=l?l.slice():Oi.a.defaultLineDash,o.lineDashOffset=void 0===u?Oi.a.defaultLineDashOffset:u,o.lineJoin=s.getLineJoin()||Oi.a.defaultLineJoin,o.lineWidth=void 0===h?Oi.a.defaultLineWidth:h,o.miterLimit=void 0===c?Oi.a.defaultMiterLimit:c,o.strokeStyle=Ai.a.asColorLike(s.getColor()||Oi.a.defaultStrokeStyle)}else o=this.textStrokeState_=null;i=this.textState_;var f=t.getFont()||Oi.a.defaultFont;Oi.a.checkFont(f);var p=t.getScale();i.overflow=t.getOverflow(),i.font=f,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||Oi.a.defaultTextBaseline,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Oi.a.defaultPadding,i.scale=void 0===p?1:p;var d=t.getOffsetX(),g=t.getOffsetY(),_=t.getRotateWithView(),v=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===d?0:d,this.textOffsetY_=void 0===g?0:g,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0===v?0:v,this.strokeKey_=o?("string"==typeof o.strokeStyle?o.strokeStyle:n.a.getUid(o.strokeStyle))+o.lineCap+o.lineDashOffset+"|"+o.lineWidth+o.lineJoin+o.miterLimit+"["+o.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?"),this.fillKey_=r?"string"==typeof r.fillStyle?r.fillStyle:"|"+n.a.getUid(r.fillStyle):""}else this.text_=""};var kn=Dn,Nn=function(t,e,i,n,r,o,a){nn.call(this),this.declutterTree_=o,this.declutterGroup_=null,this.tolerance_=t,this.maxExtent_=e,this.overlaps_=r,this.pixelRatio_=n,this.resolution_=i,this.renderBuffer_=a,this.replaysByZIndex_={},this.hitDetectionContext_=se.a.createCanvasContext2D(1,1),this.hitDetectionTransform_=wt.a.create()};n.a.inherits(Nn,nn),Nn.circleArrayCache_={0:[[!0]]},Nn.fillCircleArrayRowToMiddle_=function(t,e,i){var n,r=Math.floor(t.length/2);if(e>=r)for(n=r;n<e;n++)t[n][i]=!0;else if(e<r)for(n=e+1;n<r;n++)t[n][i]=!0},Nn.getCircleArray_=function(t){if(void 0!==Nn.circleArrayCache_[t])return Nn.circleArrayCache_[t];for(var e=2*t+1,i=new Array(e),n=0;n<e;n++)i[n]=new Array(e);for(var r=t,o=0,a=0;r>=o;)Nn.fillCircleArrayRowToMiddle_(i,t+r,t+o),Nn.fillCircleArrayRowToMiddle_(i,t+o,t+r),Nn.fillCircleArrayRowToMiddle_(i,t-o,t+r),Nn.fillCircleArrayRowToMiddle_(i,t-r,t+o),Nn.fillCircleArrayRowToMiddle_(i,t-r,t-o),Nn.fillCircleArrayRowToMiddle_(i,t-o,t-r),Nn.fillCircleArrayRowToMiddle_(i,t+o,t-r),Nn.fillCircleArrayRowToMiddle_(i,t+r,t-o),2*((a+=1+2*++o)-r)+1>0&&(a+=1-2*(r-=1));return Nn.circleArrayCache_[t]=i,i},Nn.replayDeclutter=function(t,e,i){for(var n=Object.keys(t).map(Number).sort(k.a.numberSafeCompareFunction),r={},o=0,a=n.length;o<a;++o)for(var s=t[n[o].toString()],l=0,u=s.length;l<u;){var h=s[l++],c=s[l++];h.replay(e,c,i,r)}},Nn.prototype.addDeclutter=function(t){var e=null;return this.declutterTree_&&(t?(e=this.declutterGroup_)[4]++:(e=this.declutterGroup_=yt.a.createEmpty()).push(1)),e},Nn.prototype.clip=function(t,e){var i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()},Nn.prototype.hasReplays=function(t){for(var e in this.replaysByZIndex_)for(var i=this.replaysByZIndex_[e],n=0,r=t.length;n<r;++n)if(t[n]in i)return!0;return!1},Nn.prototype.finish=function(){var t;for(t in this.replaysByZIndex_){var e,i=this.replaysByZIndex_[t];for(e in i)i[e].finish()}},Nn.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,o,a){var s,l=2*(n=Math.round(n))+1,u=wt.a.compose(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),h=this.hitDetectionContext_;h.canvas.width!==l||h.canvas.height!==l?(h.canvas.width=l,h.canvas.height=l):h.clearRect(0,0,l,l),void 0!==this.renderBuffer_&&(s=yt.a.createEmpty(),yt.a.extendCoordinate(s,t),yt.a.buffer(s,e*(this.renderBuffer_+n),s));var c,f,p=Nn.getCircleArray_(n);function d(t){for(var e=h.getImageData(0,0,l,l).data,i=0;i<l;i++)for(var n=0;n<l;n++){var r;if(p[i][n]&&e[4*(n*l+i)+3]>0)return(!c||f!=rn.IMAGE&&f!=rn.TEXT||-1!==c.indexOf(t))&&(r=o(t)),r||void h.clearRect(0,0,l,l)}}this.declutterTree_&&(c=this.declutterTree_.all().map(function(t){return t.value}));var g,_,v,y,m,x=Object.keys(this.replaysByZIndex_).map(Number);for(x.sort(k.a.numberSafeCompareFunction),g=x.length-1;g>=0;--g){var E=x[g].toString();for(v=this.replaysByZIndex_[E],_=Tn.ORDER.length-1;_>=0;--_)if(void 0!==(y=v[f=Tn.ORDER[_]]))if(!a||f!=rn.IMAGE&&f!=rn.TEXT){if(m=y.replayHitDetection(h,u,i,r,d,s))return m}else{var S=a[E];S?S.push(y,u.slice(0)):a[E]=[y,u.slice(0)]}}},Nn.prototype.getClipCoords=function(t){var e=this.maxExtent_,i=e[0],n=e[1],r=e[2],o=e[3],a=[i,n,i,o,r,o,r,n];return Rt.transform2D(a,0,8,2,t,a),a},Nn.prototype.getReplay=function(t,e){var i=void 0!==t?t.toString():"0",n=this.replaysByZIndex_[i];void 0===n&&(n={},this.replaysByZIndex_[i]=n);var r=n[e];return void 0===r&&(r=new(0,Nn.BATCH_CONSTRUCTORS_[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_),n[e]=r),r},Nn.prototype.getReplays=function(){return this.replaysByZIndex_},Nn.prototype.isEmpty=function(){return tt.a.isEmpty(this.replaysByZIndex_)},Nn.prototype.replay=function(t,e,i,n,r,o){var a=Object.keys(this.replaysByZIndex_).map(Number);a.sort(k.a.numberSafeCompareFunction),t.save(),this.clip(t,e);var s,l,u,h,c,f,p=r||Tn.ORDER;for(s=0,l=a.length;s<l;++s){var d=a[s].toString();for(c=this.replaysByZIndex_[d],u=0,h=p.length;u<h;++u){var g=p[u];if(void 0!==(f=c[g]))if(!o||g!=rn.IMAGE&&g!=rn.TEXT)f.replay(t,e,i,n);else{var _=o[d];_?_.push(f,e.slice(0)):o[d]=[f,e.slice(0)]}}}t.restore()},Nn.BATCH_CONSTRUCTORS_={Circle:Pn,Default:Rn,Image:bn,LineString:Ln,Polygon:Pn,Text:kn};var Un=Nn,Gn={defaultOrder:function(t,e){return n.a.getUid(t)-n.a.getUid(e)},getSquaredTolerance:function(t,e){var i=Gn.getTolerance(t,e);return i*i},getTolerance:function(t,e){return n.a.SIMPLIFY_TOLERANCE*t/e},renderCircleGeometry_:function(t,e,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=t.getReplay(i.getZIndex(),rn.CIRCLE);a.setFillStrokeStyle(r,o),a.drawCircle(e,n)}var s=i.getText();if(s){var l=t.getReplay(i.getZIndex(),rn.TEXT);l.setTextStyle(s,t.addDeclutter(!1)),l.drawText(e,n)}},renderFeature:function(t,e,i,n,r,o){var a,s,l=!1;return(a=i.getImage())&&((s=a.getImageState())==xi.a.LOADED||s==xi.a.ERROR?a.unlistenImageChange(r,o):(s==xi.a.IDLE&&a.load(),s=a.getImageState(),a.listenImageChange(r,o),l=!0)),Gn.renderFeature_(t,e,i,n),l},renderFeature_:function(t,e,i,n){var r=i.getGeometryFunction()(e);if(r){var o=r.getSimplifiedGeometry(n);i.getRenderer()?Gn.renderGeometry_(t,o,i,e):(0,Gn.GEOMETRY_RENDERERS_[o.getType()])(t,o,i,e)}},renderGeometry_:function(t,e,i,n){if(e.getType()!=mt.a.GEOMETRY_COLLECTION)t.getReplay(i.getZIndex(),rn.DEFAULT).drawCustom(e,n,i.getRenderer());else for(var r=e.getGeometries(),o=0,a=r.length;o<a;++o)Gn.renderGeometry_(t,r[o],i,n)},renderGeometryCollectionGeometry_:function(t,e,i,n){var r,o,a=e.getGeometriesArray();for(r=0,o=a.length;r<o;++r)(0,Gn.GEOMETRY_RENDERERS_[a[r].getType()])(t,a[r],i,n)},renderLineStringGeometry_:function(t,e,i,n){var r=i.getStroke();if(r){var o=t.getReplay(i.getZIndex(),rn.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawLineString(e,n)}var a=i.getText();if(a){var s=t.getReplay(i.getZIndex(),rn.TEXT);s.setTextStyle(a,t.addDeclutter(!1)),s.drawText(e,n)}},renderMultiLineStringGeometry_:function(t,e,i,n){var r=i.getStroke();if(r){var o=t.getReplay(i.getZIndex(),rn.LINE_STRING);o.setFillStrokeStyle(null,r),o.drawMultiLineString(e,n)}var a=i.getText();if(a){var s=t.getReplay(i.getZIndex(),rn.TEXT);s.setTextStyle(a,t.addDeclutter(!1)),s.drawText(e,n)}},renderMultiPolygonGeometry_:function(t,e,i,n){var r=i.getFill(),o=i.getStroke();if(o||r){var a=t.getReplay(i.getZIndex(),rn.POLYGON);a.setFillStrokeStyle(r,o),a.drawMultiPolygon(e,n)}var s=i.getText();if(s){var l=t.getReplay(i.getZIndex(),rn.TEXT);l.setTextStyle(s,t.addDeclutter(!1)),l.drawText(e,n)}},renderPointGeometry_:function(t,e,i,n){var r=i.getImage();if(r){if(r.getImageState()!=xi.a.LOADED)return;var o=t.getReplay(i.getZIndex(),rn.IMAGE);o.setImageStyle(r,t.addDeclutter(!1)),o.drawPoint(e,n)}var a=i.getText();if(a){var s=t.getReplay(i.getZIndex(),rn.TEXT);s.setTextStyle(a,t.addDeclutter(!!r)),s.drawText(e,n)}},renderMultiPointGeometry_:function(t,e,i,n){var r=i.getImage();if(r){if(r.getImageState()!=xi.a.LOADED)return;var o=t.getReplay(i.getZIndex(),rn.IMAGE);o.setImageStyle(r,t.addDeclutter(!1)),o.drawMultiPoint(e,n)}var a=i.getText();if(a){var s=t.getReplay(i.getZIndex(),rn.TEXT);s.setTextStyle(a,t.addDeclutter(!!r)),s.drawText(e,n)}},renderPolygonGeometry_:function(t,e,i,n){var r=i.getFill(),o=i.getStroke();if(r||o){var a=t.getReplay(i.getZIndex(),rn.POLYGON);a.setFillStrokeStyle(r,o),a.drawPolygon(e,n)}var s=i.getText();if(s){var l=t.getReplay(i.getZIndex(),rn.TEXT);l.setTextStyle(s,t.addDeclutter(!1)),l.drawText(e,n)}}};Gn.GEOMETRY_RENDERERS_={Point:Gn.renderPointGeometry_,LineString:Gn.renderLineStringGeometry_,Polygon:Gn.renderPolygonGeometry_,MultiPoint:Gn.renderMultiPointGeometry_,MultiLineString:Gn.renderMultiLineStringGeometry_,MultiPolygon:Gn.renderMultiPolygonGeometry_,GeometryCollection:Gn.renderGeometryCollectionGeometry_,Circle:Gn.renderCircleGeometry_};var jn=Gn,Bn=function(t){ji.call(this,t),this.declutterTree_=t.getDeclutter()?tn()(9):null,this.dirty_=!1,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=yt.a.createEmpty(),this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.context=se.a.createCanvasContext2D(),_.a.listen(Oi.a.labelCache,f.a.CLEAR,this.handleFontsChanged_,this)};n.a.inherits(Bn,ji),Bn.handles=function(t,e){return t===pe&&e.getType()===Ii},Bn.create=function(t,e){return new Bn(e)},Bn.prototype.disposeInternal=function(){_.a.unlisten(Oi.a.labelCache,f.a.CLEAR,this.handleFontsChanged_,this),ji.prototype.disposeInternal.call(this)},Bn.prototype.composeFrame=function(t,e,i){var n=t.extent,r=t.pixelRatio,o=e.managed?t.skippedFeatureUids:{},a=t.viewState,s=a.projection,l=a.rotation,u=s.getExtent(),h=this.getLayer().getSource(),c=this.getTransform(t,0);this.preCompose(i,t,c);var f=e.extent,p=void 0!==f;p&&this.clip(i,t,f);var d=this.replayGroup_;if(d&&!d.isEmpty()){this.declutterTree_&&this.declutterTree_.clear();var g,_=this.getLayer(),v=0,y=0,m=1!==e.opacity,x=_.hasListener(Re);if(m||x){var E=i.canvas.width,S=i.canvas.height;if(l){var T=Math.round(Math.sqrt(E*E+S*S));v=(T-E)/2,y=(T-S)/2,E=S=T}this.context.canvas.width=E,this.context.canvas.height=S,g=this.context}else g=i;var C=g.globalAlpha;m||(g.globalAlpha=e.opacity),g!=i&&g.translate(v,y);var R=t.size[0]*r,I=t.size[1]*r;if(Oi.a.rotateAtOffset(g,-l,R/2,I/2),d.replay(g,c,l,o),h.getWrapX()&&s.canWrapX()&&!yt.a.containsExtent(u,n)){for(var b,w=n[0],L=yt.a.getWidth(u),O=0;w<u[0];)b=L*--O,c=this.getTransform(t,b),d.replay(g,c,l,o),w+=L;for(O=0,w=n[2];w>u[2];)b=L*++O,c=this.getTransform(t,b),d.replay(g,c,l,o),w-=L;c=this.getTransform(t,0)}if(Oi.a.rotateAtOffset(g,l,R/2,I/2),g!=i){if(x&&this.dispatchRenderEvent(g,t,c),m){var A=i.globalAlpha;i.globalAlpha=e.opacity,i.drawImage(g.canvas,-v,-y),i.globalAlpha=A}else i.drawImage(g.canvas,-v,-y);g.translate(-v,-y)}m||(g.globalAlpha=C)}p&&i.restore(),this.postCompose(i,t,e,c)},Bn.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,o){if(this.replayGroup_){var a=e.viewState.resolution,s=e.viewState.rotation,l=this.getLayer(),u={};return this.replayGroup_.forEachFeatureAtCoordinate(t,a,s,i,{},function(t){var e=n.a.getUid(t).toString();if(!(e in u))return u[e]=!0,r.call(o,t,l)},null)}},Bn.prototype.handleFontsChanged_=function(t){var e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()},Bn.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},Bn.prototype.prepareFrame=function(t,e){var i=this.getLayer(),n=i.getSource();this.updateLogos(t,n);var r=t.viewHints[ut],o=t.viewHints[ht],a=i.getUpdateWhileAnimating(),s=i.getUpdateWhileInteracting();if(!this.dirty_&&!a&&r||!s&&o)return!0;var l=t.extent,u=t.viewState,h=u.projection,c=u.resolution,f=t.pixelRatio,p=i.getRevision(),d=i.getRenderBuffer(),g=i.getRenderOrder();void 0===g&&(g=jn.defaultOrder);var _=yt.a.buffer(l,d*c),v=u.projection.getExtent();if(n.getWrapX()&&u.projection.canWrapX()&&!yt.a.containsExtent(v,t.extent)){var y=yt.a.getWidth(v),m=Math.max(yt.a.getWidth(_)/2,y);_[0]=v[0]-m,_[2]=v[2]+m}if(!this.dirty_&&this.renderedResolution_==c&&this.renderedRevision_==p&&this.renderedRenderOrder_==g&&yt.a.containsExtent(this.renderedExtent_,_))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var x=new Un(jn.getTolerance(c,f),_,c,f,n.getOverlaps(),this.declutterTree_,i.getRenderBuffer());n.loadFeatures(_,c,h);var E=function(t){var e,n=t.getStyleFunction();if(n?e=n.call(t,c):(n=i.getStyleFunction())&&(e=n(t,c)),e){var r=this.renderFeature(t,c,f,e,x);this.dirty_=this.dirty_||r}}.bind(this);if(g){var S=[];n.forEachFeatureInExtent(_,function(t){S.push(t)},this),S.sort(g);for(var T=0,C=S.length;T<C;++T)E(S[T])}else n.forEachFeatureInExtent(_,E,this);return x.finish(),this.renderedResolution_=c,this.renderedRevision_=p,this.renderedRenderOrder_=g,this.renderedExtent_=_,this.replayGroup_=x,this.replayGroupChanged=!0,!0},Bn.prototype.renderFeature=function(t,e,i,n,r){if(!n)return!1;var o=!1;if(Array.isArray(n))for(var a=0,s=n.length;a<s;++a)o=jn.renderFeature(r,t,n[a],jn.getSquaredTolerance(e,i),this.handleStyleImageChange_,this)||o;else o=jn.renderFeature(r,t,n,jn.getSquaredTolerance(e,i),this.handleStyleImageChange_,this);return o};var Wn=Bn,zn="vector",Xn=function(t){this.context=null,Qi.call(this,t),this.declutterTree_=t.getDeclutter()?tn()(9):null,this.dirty_=!1,this.renderedLayerRevision_,this.tmpTransform_=wt.a.create(),this.zDirection=t.getRenderMode()==zn?1:0,_.a.listen(Oi.a.labelCache,f.a.CLEAR,this.handleFontsChanged_,this)};n.a.inherits(Xn,Qi),Xn.handles=function(t,e){return t===pe&&e.getType()===Ri},Xn.create=function(t,e){return new Xn(e)},Xn.IMAGE_REPLAYS={image:[rn.POLYGON,rn.CIRCLE,rn.LINE_STRING,rn.IMAGE,rn.TEXT],hybrid:[rn.POLYGON,rn.LINE_STRING]},Xn.VECTOR_REPLAYS={image:[rn.DEFAULT],hybrid:[rn.IMAGE,rn.TEXT,rn.DEFAULT],vector:Tn.ORDER},Xn.prototype.disposeInternal=function(){_.a.unlisten(Oi.a.labelCache,f.a.CLEAR,this.handleFontsChanged_,this),Qi.prototype.disposeInternal.call(this)},Xn.prototype.prepareFrame=function(t,e){var i=this.getLayer(),n=i.getRevision();if(this.renderedLayerRevision_!=n){this.renderedTiles.length=0;var r=i.getRenderMode();this.context||r==zn||(this.context=se.a.createCanvasContext2D()),this.context&&r==zn&&(this.context=null)}return this.renderedLayerRevision_=n,Qi.prototype.prepareFrame.apply(this,arguments)},Xn.prototype.createReplayGroup_=function(t,e){var i=this.getLayer(),n=e.pixelRatio,r=e.viewState.projection,o=i.getRevision(),a=i.getRenderOrder()||null,s=t.getReplayState(i);if(s.dirty||s.renderedRevision!=o||s.renderedRenderOrder!=a){for(var l=i.getSource(),u=l.getTileGrid(),h=l.getTileGridForProjection(r),c=h.getResolution(t.tileCoord[0]),f=h.getTileCoordExtent(t.wrappedTileCoord),p={},d=0,g=t.tileKeys.length;d<g;++d){var _=t.getTile(t.tileKeys[d]);if(_.getState()!=Q.a.ERROR){var v=_.tileCoord,y=u.getTileCoordExtent(v),m=yt.a.getIntersection(f,y),x=yt.a.equals(y,m)?null:yt.a.buffer(m,i.getRenderBuffer()*c),E=_.getProjection(),S=!1;It.default.equivalent(r,E)||(S=!0,_.setProjection(r)),s.dirty=!1;var T,C=new Un(0,m,c,n,l.getOverlaps(),this.declutterTree_,i.getRenderBuffer()),R=jn.getSquaredTolerance(c,n),I=function(t){var e,n=t.getStyleFunction();if(n?e=n.call(t,c):(n=i.getStyleFunction())&&(e=n(t,c)),e){var r=this.renderFeature(t,R,e,C);this.dirty_=this.dirty_||r,s.dirty=s.dirty||r}},b=_.getFeatures();a&&a!==s.renderedRenderOrder&&b.sort(a);for(var w=0,L=b.length;w<L;++w)T=b[w],S&&(E.getUnits()==bt.a.TILE_PIXELS&&(E.setWorldExtent(y),E.setExtent(_.getExtent())),T.getGeometry().transform(E,r)),x&&!yt.a.intersects(x,T.getGeometry().getExtent())||I.call(this,T);for(var O in C.finish(),C.getReplays())p[O]=!0;_.setReplayGroup(i,t.tileCoord.toString(),C)}}s.renderedRevision=o,s.renderedRenderOrder=a}},Xn.prototype.drawTileImage=function(t,e,i,n,r,o,a,s,l){var u=t;this.createReplayGroup_(u,e),this.context&&(this.renderTileImage_(u,e,i),Qi.prototype.drawTileImage.apply(this,arguments))},Xn.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,o){var a=e.viewState.resolution,s=e.viewState.rotation;i=null==i?0:i;var l,u,h,c,f,p,d,g,_=this.getLayer(),v={},y=this.renderedTiles,m=_.getSource().getTileGridForProjection(e.viewState.projection);for(h=0,c=y.length;h<c;++h)if(d=(p=y[h]).wrappedTileCoord,g=m.getTileCoordExtent(d,this.tmpExtent),l=yt.a.buffer(g,i*a,l),yt.a.containsCoordinate(l,t))for(var x=0,E=p.tileKeys.length;x<E;++x){var S=p.getTile(p.tileKeys[x]);S.getState()!=Q.a.ERROR&&(f=S.getReplayGroup(_,p.tileCoord.toString()),u=u||f.forEachFeatureAtCoordinate(t,a,s,i,{},function(t){var e=n.a.getUid(t).toString();if(!(e in v))return v[e]=!0,r.call(o,t,_)},null))}return u},Xn.prototype.getReplayTransform_=function(t,e){var i=this.getLayer().getSource().getTileGrid(),n=t.tileCoord,r=i.getResolution(n[0]),o=e.viewState,a=e.pixelRatio,s=o.resolution/a,l=i.getTileCoordExtent(n,this.tmpExtent),u=o.center,h=yt.a.getTopLeft(l),c=e.size,f=Math.round(a*c[0]/2),p=Math.round(a*c[1]/2);return wt.a.compose(this.tmpTransform_,f,p,r/s,r/s,o.rotation,(h[0]-u[0])/r,(u[1]-h[1])/r)},Xn.prototype.handleFontsChanged_=function(t){var e=this.getLayer();e.getVisible()&&void 0!==this.renderedLayerRevision_&&e.changed()},Xn.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},Xn.prototype.postCompose=function(t,e,i){var n,r,o=this.getLayer(),a=o.getDeclutter()?{}:null,s=o.getSource(),l=o.getRenderMode(),u=Xn.VECTOR_REPLAYS[l],h=e.pixelRatio,c=e.viewState.rotation,f=e.size;c&&(n=Math.round(h*f[0]/2),r=Math.round(h*f[1]/2),Oi.a.rotateAtOffset(t,-c,n,r)),a&&this.declutterTree_.clear();for(var p=this.renderedTiles,d=s.getTileGridForProjection(e.viewState.projection),g=[],_=[],v=p.length-1;v>=0;--v){var y=p[v];if(y.getState()!=Q.a.ABORT)for(var m=y.tileCoord,x=d.getTileCoordExtent(m)[0]-d.getTileCoordExtent(y.wrappedTileCoord)[0],E=void 0,S=0,T=y.tileKeys.length;S<T;++S){var C=y.getTile(y.tileKeys[S]);if(C.getState()!=Q.a.ERROR){var R=C.getReplayGroup(o,m.toString());if(l==zn||R.hasReplays(u)){E||(E=this.getTransform(e,x));var I=C.tileCoord[0],b=R.getClipCoords(E);t.save(),t.globalAlpha=i.opacity;for(var w=0,L=g.length;w<L;++w){var O=g[w];I<_[w]&&(t.beginPath(),t.moveTo(b[0],b[1]),t.lineTo(b[2],b[3]),t.lineTo(b[4],b[5]),t.lineTo(b[6],b[7]),t.moveTo(O[6],O[7]),t.lineTo(O[4],O[5]),t.lineTo(O[2],O[3]),t.lineTo(O[0],O[1]),t.clip())}R.replay(t,E,c,{},u,a),t.restore(),g.push(b),_.push(I)}}}}a&&Un.replayDeclutter(a,t,c),c&&Oi.a.rotateAtOffset(t,c,n,r),Qi.prototype.postCompose.apply(this,arguments)},Xn.prototype.renderFeature=function(t,e,i,n){if(!i)return!1;var r=!1;if(Array.isArray(i))for(var o=0,a=i.length;o<a;++o)r=jn.renderFeature(n,t,i[o],e,this.handleStyleImageChange_,this)||r;else r=jn.renderFeature(n,t,i,e,this.handleStyleImageChange_,this);return r},Xn.prototype.renderTileImage_=function(t,e,i){var n=this.getLayer(),r=t.getReplayState(n),o=n.getRevision(),a=Xn.IMAGE_REPLAYS[n.getRenderMode()];if(a&&r.renderedTileRevision!==o){r.renderedTileRevision=o;var s=t.wrappedTileCoord,l=s[0],u=e.pixelRatio,h=n.getSource(),c=h.getTileGridForProjection(e.viewState.projection),f=c.getResolution(l),p=t.getContext(n),d=h.getTilePixelSize(l,u,e.viewState.projection);p.canvas.width=d[0],p.canvas.height=d[1];for(var g=c.getTileCoordExtent(s),_=0,v=t.tileKeys.length;_<v;++_){var y=t.getTile(t.tileKeys[_]);if(y.getState()!=Q.a.ERROR){var m=u/f,x=wt.a.reset(this.tmpTransform_);wt.a.scale(x,m,-m),wt.a.translate(x,-g[0],-g[3]),y.getReplayGroup(n,t.tileCoord.toString()).replay(p,x,0,{},a)}}}};var Vn=Xn,Yn=i(4),Hn=function(t){this.source_=t};Hn.prototype.getType=function(){},Hn.prototype.getSource=function(){return this.source_},Hn.prototype.isAnimated=Ct.FALSE;var Kn=Hn,qn=function(t){Kn.call(this,t)};n.a.inherits(qn,Kn),qn.prototype.getType=function(){return Yn.a.FRAGMENT_SHADER};var Zn=qn,Jn=function(t){Kn.call(this,t)};n.a.inherits(Jn,Kn),Jn.prototype.getType=function(){return Yn.a.VERTEX_SHADER};var Qn=Jn,$n={};$n.fragment=new Zn(n.a.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_fillColor;\nuniform vec4 u_strokeColor;\nuniform vec2 u_size;\n\nvoid main(void) {\n vec2 windowCenter = vec2((v_center.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n (v_center.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n vec2 windowOffset = vec2((v_offset.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n (v_offset.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n float radius = length(windowCenter - windowOffset);\n float dist = length(windowCenter - gl_FragCoord.xy);\n if (dist > radius + v_halfWidth) {\n if (u_strokeColor.a == 0.0) {\n gl_FragColor = u_fillColor;\n } else {\n gl_FragColor = u_strokeColor;\n }\n gl_FragColor.a = gl_FragColor.a - (dist - (radius + v_halfWidth));\n } else if (u_fillColor.a == 0.0) {\n // Hooray, no fill, just stroke. We can use real antialiasing.\n gl_FragColor = u_strokeColor;\n if (dist < radius - v_halfWidth) {\n gl_FragColor.a = gl_FragColor.a - (radius - v_halfWidth - dist);\n }\n } else {\n gl_FragColor = u_fillColor;\n float strokeDist = radius - v_halfWidth;\n float antialias = 2.0 * v_pixelRatio;\n if (dist > strokeDist) {\n gl_FragColor = u_strokeColor;\n } else if (dist >= strokeDist - antialias) {\n float step = smoothstep(strokeDist - antialias, strokeDist, dist);\n gl_FragColor = mix(u_fillColor, u_strokeColor, step);\n }\n }\n gl_FragColor.a = gl_FragColor.a * u_opacity;\n if (gl_FragColor.a <= 0.0) {\n discard;\n }\n}\n":"precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}"),$n.vertex=new Qn(n.a.DEBUG_WEBGL?"varying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\nattribute vec2 a_position;\nattribute float a_instruction;\nattribute float a_radius;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n v_center = vec4(u_projectionMatrix * vec4(a_position, 0.0, 1.0)).xy;\n v_pixelRatio = u_pixelRatio;\n float lineWidth = u_lineWidth * u_pixelRatio;\n v_halfWidth = lineWidth / 2.0;\n if (lineWidth == 0.0) {\n lineWidth = 2.0 * u_pixelRatio;\n }\n vec2 offset;\n // Radius with anitaliasing (roughly).\n float radius = a_radius + 3.0 * u_pixelRatio;\n // Until we get gl_VertexID in WebGL, we store an instruction.\n if (a_instruction == 0.0) {\n // Offsetting the edges of the triangle by lineWidth / 2 is necessary, however\n // we should also leave some space for the antialiasing, thus we offset by lineWidth.\n offset = vec2(-1.0, 1.0);\n } else if (a_instruction == 1.0) {\n offset = vec2(-1.0, -1.0);\n } else if (a_instruction == 2.0) {\n offset = vec2(1.0, -1.0);\n } else {\n offset = vec2(1.0, 1.0);\n }\n\n gl_Position = u_projectionMatrix * vec4(a_position + offset * radius, 0.0, 1.0) +\n offsetMatrix * vec4(offset * lineWidth, 0.0, 0.0);\n v_offset = vec4(u_projectionMatrix * vec4(a_position.x + a_radius, a_position.y,\n 0.0, 1.0)).xy;\n\n if (distance(v_center, v_offset) > 20000.0) {\n gl_Position = vec4(v_center, 0.0, 1.0);\n }\n}\n\n\n":"varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;//Until we get gl_VertexID in WebGL,we store an instruction.if(f==0.0){//Offsetting the edges of the triangle by lineWidth/2 is necessary,however//we should also leave some space for the antialiasing,thus we offset by lineWidth.offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}");var tr=$n,er=function(t,e){this.u_projectionMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_projectionMatrix":"h"),this.u_offsetScaleMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_offsetScaleMatrix":"i"),this.u_offsetRotateMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_offsetRotateMatrix":"j"),this.u_lineWidth=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_lineWidth":"k"),this.u_pixelRatio=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_pixelRatio":"l"),this.u_opacity=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_opacity":"m"),this.u_fillColor=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_fillColor":"n"),this.u_strokeColor=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_strokeColor":"o"),this.u_size=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_size":"p"),this.a_position=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_position":"e"),this.a_instruction=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_instruction":"f"),this.a_radius=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_radius":"g")},ir={create:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},fromTransform:function(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}},nr=function(t,e){Fi.call(this),this.tolerance=t,this.maxExtent=e,this.origin=yt.a.getCenter(e),this.projectionMatrix_=wt.a.create(),this.offsetRotateMatrix_=wt.a.create(),this.offsetScaleMatrix_=wt.a.create(),this.tmpMat4_=ir.create(),this.indices=[],this.indicesBuffer=null,this.startIndices=[],this.startIndicesFeature=[],this.vertices=[],this.verticesBuffer=null,this.lineStringReplay=void 0};n.a.inherits(nr,Fi),nr.prototype.getDeleteResourcesFunction=function(t){},nr.prototype.finish=function(t){},nr.prototype.setUpProgram=function(t,e,i,n){},nr.prototype.shutDownProgram=function(t,e){},nr.prototype.drawReplay=function(t,e,i,n){},nr.prototype.drawHitDetectionReplayOneByOne=function(t,e,i,n,r){},nr.prototype.drawHitDetectionReplay=function(t,e,i,n,r,o){return r?this.drawHitDetectionReplayOneByOne(t,e,i,n,o):this.drawHitDetectionReplayAll(t,e,i,n)},nr.prototype.drawHitDetectionReplayAll=function(t,e,i,n){return t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.drawReplay(t,e,i,!0),n(null)||void 0},nr.prototype.replay=function(t,e,i,n,r,o,a,s,l,u,h){var c,f,p,d,g,_,v,y,m=t.getGL();this.lineStringReplay&&(c=m.isEnabled(m.STENCIL_TEST),f=m.getParameter(m.STENCIL_FUNC),p=m.getParameter(m.STENCIL_VALUE_MASK),d=m.getParameter(m.STENCIL_REF),g=m.getParameter(m.STENCIL_WRITEMASK),_=m.getParameter(m.STENCIL_FAIL),v=m.getParameter(m.STENCIL_PASS_DEPTH_PASS),y=m.getParameter(m.STENCIL_PASS_DEPTH_FAIL),m.enable(m.STENCIL_TEST),m.clear(m.STENCIL_BUFFER_BIT),m.stencilMask(255),m.stencilFunc(m.ALWAYS,1,255),m.stencilOp(m.KEEP,m.KEEP,m.REPLACE),this.lineStringReplay.replay(t,e,i,n,r,o,a,s,l,u,h),m.stencilMask(0),m.stencilFunc(m.NOTEQUAL,1,255)),t.bindBuffer(Yn.a.ARRAY_BUFFER,this.verticesBuffer),t.bindBuffer(Yn.a.ELEMENT_ARRAY_BUFFER,this.indicesBuffer);var x=this.setUpProgram(m,t,r,o),E=wt.a.reset(this.projectionMatrix_);wt.a.scale(E,2/(i*r[0]),2/(i*r[1])),wt.a.rotate(E,-n),wt.a.translate(E,-(e[0]-this.origin[0]),-(e[1]-this.origin[1]));var S=wt.a.reset(this.offsetScaleMatrix_);wt.a.scale(S,2/r[0],2/r[1]);var T,C=wt.a.reset(this.offsetRotateMatrix_);return 0!==n&&wt.a.rotate(C,-n),m.uniformMatrix4fv(x.u_projectionMatrix,!1,ir.fromTransform(this.tmpMat4_,E)),m.uniformMatrix4fv(x.u_offsetScaleMatrix,!1,ir.fromTransform(this.tmpMat4_,S)),m.uniformMatrix4fv(x.u_offsetRotateMatrix,!1,ir.fromTransform(this.tmpMat4_,C)),m.uniform1f(x.u_opacity,a),void 0===l?this.drawReplay(m,t,s,!1):T=this.drawHitDetectionReplay(m,t,s,l,u,h),this.shutDownProgram(m,x),this.lineStringReplay&&(c||m.disable(m.STENCIL_TEST),m.clear(m.STENCIL_BUFFER_BIT),m.stencilFunc(f,d,p),m.stencilMask(g),m.stencilOp(_,y,v)),T},nr.prototype.drawElements=function(t,e,i,n){var r=e.hasOESElementIndexUint?Yn.a.UNSIGNED_INT:Yn.a.UNSIGNED_SHORT,o=n-i,a=i*(e.hasOESElementIndexUint?4:2);t.drawElements(Yn.a.TRIANGLES,o,r,a)};var rr=nr,or={defaultFont:"10px sans-serif",defaultFillStyle:[0,0,0,1],defaultLineCap:"round",defaultLineDash:[],defaultLineDashOffset:0,defaultLineJoin:"round",defaultMiterLimit:10,defaultStrokeStyle:[0,0,0,1],defaultTextAlign:.5,defaultTextBaseline:.5,defaultLineWidth:1,triangleIsCounterClockwise:function(t,e,i,n,r,o){var a=(i-t)*(o-e)-(r-t)*(n-e);return a<=or.EPSILON&&a>=-or.EPSILON?void 0:a>0}};or.EPSILON=Number.EPSILON||2.220446049250313e-16;var ar=or,sr=function(t,e){this.arr_=void 0!==t?t:[],this.usage_=void 0!==e?e:sr.Usage_.STATIC_DRAW};sr.prototype.getArray=function(){return this.arr_},sr.prototype.getUsage=function(){return this.usage_},sr.Usage_={STATIC_DRAW:Yn.a.STATIC_DRAW,STREAM_DRAW:Yn.a.STREAM_DRAW,DYNAMIC_DRAW:Yn.a.DYNAMIC_DRAW};var lr=sr,ur=function(t,e){rr.call(this,t,e),this.defaultLocations_=null,this.styles_=[],this.styleIndices_=[],this.radius_=0,this.state_={fillColor:null,strokeColor:null,lineDash:null,lineDashOffset:void 0,lineWidth:void 0,changed:!1}};n.a.inherits(ur,rr),ur.prototype.drawCoordinates_=function(t,e,i,n){var r,o,a=this.vertices.length,s=this.indices.length,l=a/4;for(r=e,o=i;r<o;r+=n)this.vertices[a++]=t[r],this.vertices[a++]=t[r+1],this.vertices[a++]=0,this.vertices[a++]=this.radius_,this.vertices[a++]=t[r],this.vertices[a++]=t[r+1],this.vertices[a++]=1,this.vertices[a++]=this.radius_,this.vertices[a++]=t[r],this.vertices[a++]=t[r+1],this.vertices[a++]=2,this.vertices[a++]=this.radius_,this.vertices[a++]=t[r],this.vertices[a++]=t[r+1],this.vertices[a++]=3,this.vertices[a++]=this.radius_,this.indices[s++]=l,this.indices[s++]=l+1,this.indices[s++]=l+2,this.indices[s++]=l+2,this.indices[s++]=l+3,this.indices[s++]=l,l+=4},ur.prototype.drawCircle=function(t,e){var i=t.getRadius(),n=t.getStride();if(i){this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e),this.state_.changed&&(this.styleIndices_.push(this.indices.length),this.state_.changed=!1),this.radius_=i;var r=t.getFlatCoordinates();r=Rt.translate(r,0,2,n,-this.origin[0],-this.origin[1]),this.drawCoordinates_(r,0,2,n)}else if(this.state_.changed&&(this.styles_.pop(),this.styles_.length)){var o=this.styles_[this.styles_.length-1];this.state_.fillColor=o[0],this.state_.strokeColor=o[1],this.state_.lineWidth=o[2],this.state_.changed=!1}},ur.prototype.finish=function(t){this.verticesBuffer=new lr(this.vertices),this.indicesBuffer=new lr(this.indices),this.startIndices.push(this.indices.length),0===this.styleIndices_.length&&this.styles_.length>0&&(this.styles_=[]),this.vertices=null,this.indices=null},ur.prototype.getDeleteResourcesFunction=function(t){var e=this.verticesBuffer,i=this.indicesBuffer;return function(){t.deleteBuffer(e),t.deleteBuffer(i)}},ur.prototype.setUpProgram=function(t,e,i,n){var r,o;r=tr.fragment,o=tr.vertex;var a,s=e.getProgram(r,o);return this.defaultLocations_?a=this.defaultLocations_:(a=new er(t,s),this.defaultLocations_=a),e.useProgram(s),t.enableVertexAttribArray(a.a_position),t.vertexAttribPointer(a.a_position,2,Yn.a.FLOAT,!1,16,0),t.enableVertexAttribArray(a.a_instruction),t.vertexAttribPointer(a.a_instruction,1,Yn.a.FLOAT,!1,16,8),t.enableVertexAttribArray(a.a_radius),t.vertexAttribPointer(a.a_radius,1,Yn.a.FLOAT,!1,16,12),t.uniform2fv(a.u_size,i),t.uniform1f(a.u_pixelRatio,n),a},ur.prototype.shutDownProgram=function(t,e){t.disableVertexAttribArray(e.a_position),t.disableVertexAttribArray(e.a_instruction),t.disableVertexAttribArray(e.a_radius)},ur.prototype.drawReplay=function(t,e,i,n){var r,o,a,s;if(tt.a.isEmpty(i))for(a=this.startIndices[this.startIndices.length-1],r=this.styleIndices_.length-1;r>=0;--r)o=this.styleIndices_[r],s=this.styles_[r],this.setFillStyle_(t,s[0]),this.setStrokeStyle_(t,s[1],s[2]),this.drawElements(t,e,o,a),a=o;else this.drawReplaySkipping_(t,e,i)},ur.prototype.drawHitDetectionReplayOneByOne=function(t,e,i,r,o){var a,s,l,u,h,c,f;for(f=this.startIndices.length-2,l=this.startIndices[f+1],a=this.styleIndices_.length-1;a>=0;--a)for(u=this.styles_[a],this.setFillStyle_(t,u[0]),this.setStrokeStyle_(t,u[1],u[2]),h=this.styleIndices_[a];f>=0&&this.startIndices[f]>=h;){if(s=this.startIndices[f],c=this.startIndicesFeature[f],void 0===i[n.a.getUid(c).toString()]&&c.getGeometry()&&(void 0===o||yt.a.intersects(o,c.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.drawElements(t,e,s,l);var p=r(c);if(p)return p}f--,l=s}},ur.prototype.drawReplaySkipping_=function(t,e,i){var r,o,a,s,l,u,h,c;for(h=this.startIndices.length-2,a=o=this.startIndices[h+1],r=this.styleIndices_.length-1;r>=0;--r){for(s=this.styles_[r],this.setFillStyle_(t,s[0]),this.setStrokeStyle_(t,s[1],s[2]),l=this.styleIndices_[r];h>=0&&this.startIndices[h]>=l;)c=this.startIndices[h],u=this.startIndicesFeature[h],i[n.a.getUid(u).toString()]&&(o!==a&&this.drawElements(t,e,o,a),a=c),h--,o=c;o!==a&&this.drawElements(t,e,o,a),o=a=l}},ur.prototype.setFillStyle_=function(t,e){t.uniform4fv(this.defaultLocations_.u_fillColor,e)},ur.prototype.setStrokeStyle_=function(t,e,i){t.uniform4fv(this.defaultLocations_.u_strokeColor,e),t.uniform1f(this.defaultLocations_.u_lineWidth,i)},ur.prototype.setFillStrokeStyle=function(t,e){var i,n;if(e){var r=e.getLineDash();this.state_.lineDash=r||ar.defaultLineDash;var o=e.getLineDashOffset();this.state_.lineDashOffset=o||ar.defaultLineDashOffset,i=(i=e.getColor())instanceof CanvasGradient||i instanceof CanvasPattern?ar.defaultStrokeStyle:On.a.asArray(i).map(function(t,e){return 3!=e?t/255:t})||ar.defaultStrokeStyle,n=void 0!==(n=e.getWidth())?n:ar.defaultLineWidth}else i=[0,0,0,0],n=0;var a=t?t.getColor():[0,0,0,0];a=a instanceof CanvasGradient||a instanceof CanvasPattern?ar.defaultFillStyle:On.a.asArray(a).map(function(t,e){return 3!=e?t/255:t})||ar.defaultFillStyle,this.state_.strokeColor&&k.a.equals(this.state_.strokeColor,i)&&this.state_.fillColor&&k.a.equals(this.state_.fillColor,a)&&this.state_.lineWidth===n||(this.state_.changed=!0,this.state_.fillColor=a,this.state_.strokeColor=i,this.state_.lineWidth=n,this.styles_.push([a,i,n]))};var hr=ur,cr={};cr.fragment=new Zn(n.a.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_texCoord;\nvarying float v_opacity;\n\nuniform float u_opacity;\nuniform sampler2D u_image;\n\nvoid main(void) {\n vec4 texColor = texture2D(u_image, v_texCoord);\n gl_FragColor.rgb = texColor.rgb;\n float alpha = texColor.a * v_opacity * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n":"precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"),cr.vertex=new Qn(n.a.DEBUG_WEBGL?"varying vec2 v_texCoord;\nvarying float v_opacity;\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec2 a_offsets;\nattribute float a_opacity;\nattribute float a_rotateWithView;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n if (a_rotateWithView == 1.0) {\n offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n }\n vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n v_texCoord = a_texCoord;\n v_opacity = a_opacity;\n}\n\n\n":"varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}");var fr=cr,pr=function(t,e){this.u_projectionMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_projectionMatrix":"h"),this.u_offsetScaleMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_offsetScaleMatrix":"i"),this.u_offsetRotateMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_offsetRotateMatrix":"j"),this.u_opacity=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_opacity":"k"),this.u_image=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_image":"l"),this.a_position=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_position":"c"),this.a_texCoord=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_texCoord":"d"),this.a_offsets=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_offsets":"e"),this.a_opacity=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_opacity":"f"),this.a_rotateWithView=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_rotateWithView":"g")},dr="webglcontextlost",gr="webglcontextrestored",_r=function(t,e){this.canvas_=t,this.gl_=e,this.bufferCache_={},this.shaderCache_={},this.programCache_={},this.currentProgram_=null,this.hitDetectionFramebuffer_=null,this.hitDetectionTexture_=null,this.hitDetectionRenderbuffer_=null,this.hasOESElementIndexUint=k.a.includes(n.a.WEBGL_EXTENSIONS,"OES_element_index_uint"),this.hasOESElementIndexUint&&e.getExtension("OES_element_index_uint"),_.a.listen(this.canvas_,dr,this.handleWebGLContextLost,this),_.a.listen(this.canvas_,gr,this.handleWebGLContextRestored,this)};n.a.inherits(_r,Je.a),_r.prototype.bindBuffer=function(t,e){var i=this.getGL(),r=e.getArray(),o=String(n.a.getUid(e));if(o in this.bufferCache_){var a=this.bufferCache_[o];i.bindBuffer(t,a.buffer)}else{var s,l=i.createBuffer();i.bindBuffer(t,l),t==Yn.a.ARRAY_BUFFER?s=new Float32Array(r):t==Yn.a.ELEMENT_ARRAY_BUFFER&&(s=this.hasOESElementIndexUint?new Uint32Array(r):new Uint16Array(r)),i.bufferData(t,s,e.getUsage()),this.bufferCache_[o]={buf:e,buffer:l}}},_r.prototype.deleteBuffer=function(t){var e=this.getGL(),i=String(n.a.getUid(t)),r=this.bufferCache_[i];e.isContextLost()||e.deleteBuffer(r.buffer),delete this.bufferCache_[i]},_r.prototype.disposeInternal=function(){_.a.unlistenAll(this.canvas_);var t=this.getGL();if(!t.isContextLost()){var e;for(e in this.bufferCache_)t.deleteBuffer(this.bufferCache_[e].buffer);for(e in this.programCache_)t.deleteProgram(this.programCache_[e]);for(e in this.shaderCache_)t.deleteShader(this.shaderCache_[e]);t.deleteFramebuffer(this.hitDetectionFramebuffer_),t.deleteRenderbuffer(this.hitDetectionRenderbuffer_),t.deleteTexture(this.hitDetectionTexture_)}},_r.prototype.getCanvas=function(){return this.canvas_},_r.prototype.getGL=function(){return this.gl_},_r.prototype.getHitDetectionFramebuffer=function(){return this.hitDetectionFramebuffer_||this.initHitDetectionFramebuffer_(),this.hitDetectionFramebuffer_},_r.prototype.getShader=function(t){var e=String(n.a.getUid(t));if(e in this.shaderCache_)return this.shaderCache_[e];var i=this.getGL(),r=i.createShader(t.getType());return i.shaderSource(r,t.getSource()),i.compileShader(r),this.shaderCache_[e]=r,r},_r.prototype.getProgram=function(t,e){var i=n.a.getUid(t)+"/"+n.a.getUid(e);if(i in this.programCache_)return this.programCache_[i];var r=this.getGL(),o=r.createProgram();return r.attachShader(o,this.getShader(t)),r.attachShader(o,this.getShader(e)),r.linkProgram(o),this.programCache_[i]=o,o},_r.prototype.handleWebGLContextLost=function(){tt.a.clear(this.bufferCache_),tt.a.clear(this.shaderCache_),tt.a.clear(this.programCache_),this.currentProgram_=null,this.hitDetectionFramebuffer_=null,this.hitDetectionTexture_=null,this.hitDetectionRenderbuffer_=null},_r.prototype.handleWebGLContextRestored=function(){},_r.prototype.initHitDetectionFramebuffer_=function(){var t=this.gl_,e=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,e);var i=_r.createEmptyTexture(t,1,1),n=t.createRenderbuffer();t.bindRenderbuffer(t.RENDERBUFFER,n),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,1,1),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,n),t.bindTexture(t.TEXTURE_2D,null),t.bindRenderbuffer(t.RENDERBUFFER,null),t.bindFramebuffer(t.FRAMEBUFFER,null),this.hitDetectionFramebuffer_=e,this.hitDetectionTexture_=i,this.hitDetectionRenderbuffer_=n},_r.prototype.useProgram=function(t){return t!=this.currentProgram_&&(this.getGL().useProgram(t),this.currentProgram_=t,!0)},_r.createTexture_=function(t,e,i){var n=t.createTexture();return t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),void 0!==e&&t.texParameteri(Yn.a.TEXTURE_2D,Yn.a.TEXTURE_WRAP_S,e),void 0!==i&&t.texParameteri(Yn.a.TEXTURE_2D,Yn.a.TEXTURE_WRAP_T,i),n},_r.createEmptyTexture=function(t,e,i,n,r){var o=_r.createTexture_(t,n,r);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,i,0,t.RGBA,t.UNSIGNED_BYTE,null),o},_r.createTexture=function(t,e,i,n){var r=_r.createTexture_(t,i,n);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),r};var vr=_r,yr=function(t,e){rr.call(this,t,e),this.anchorX=void 0,this.anchorY=void 0,this.groupIndices=[],this.hitDetectionGroupIndices=[],this.height=void 0,this.imageHeight=void 0,this.imageWidth=void 0,this.defaultLocations=null,this.opacity=void 0,this.originX=void 0,this.originY=void 0,this.rotateWithView=void 0,this.rotation=void 0,this.scale=void 0,this.width=void 0};n.a.inherits(yr,rr),yr.prototype.getDeleteResourcesFunction=function(t){var e=this.verticesBuffer,i=this.indicesBuffer,n=this.getTextures(!0),r=t.getGL();return function(){var o,a;if(!r.isContextLost())for(o=0,a=n.length;o<a;++o)r.deleteTexture(n[o]);t.deleteBuffer(e),t.deleteBuffer(i)}},yr.prototype.drawCoordinates=function(t,e,i,n){var r,o,a,s,l,u,h=this.anchorX,c=this.anchorY,f=this.height,p=this.imageHeight,d=this.imageWidth,g=this.opacity,_=this.originX,v=this.originY,y=this.rotateWithView?1:0,m=-this.rotation,x=this.scale,E=this.width,S=Math.cos(m),T=Math.sin(m),C=this.indices.length,R=this.vertices.length;for(r=e;r<i;r+=n)l=t[r]-this.origin[0],u=t[r+1]-this.origin[1],o=R/8,a=-x*h,s=-x*(f-c),this.vertices[R++]=l,this.vertices[R++]=u,this.vertices[R++]=a*S-s*T,this.vertices[R++]=a*T+s*S,this.vertices[R++]=_/d,this.vertices[R++]=(v+f)/p,this.vertices[R++]=g,this.vertices[R++]=y,a=x*(E-h),s=-x*(f-c),this.vertices[R++]=l,this.vertices[R++]=u,this.vertices[R++]=a*S-s*T,this.vertices[R++]=a*T+s*S,this.vertices[R++]=(_+E)/d,this.vertices[R++]=(v+f)/p,this.vertices[R++]=g,this.vertices[R++]=y,a=x*(E-h),s=x*c,this.vertices[R++]=l,this.vertices[R++]=u,this.vertices[R++]=a*S-s*T,this.vertices[R++]=a*T+s*S,this.vertices[R++]=(_+E)/d,this.vertices[R++]=v/p,this.vertices[R++]=g,this.vertices[R++]=y,a=-x*h,s=x*c,this.vertices[R++]=l,this.vertices[R++]=u,this.vertices[R++]=a*S-s*T,this.vertices[R++]=a*T+s*S,this.vertices[R++]=_/d,this.vertices[R++]=v/p,this.vertices[R++]=g,this.vertices[R++]=y,this.indices[C++]=o,this.indices[C++]=o+1,this.indices[C++]=o+2,this.indices[C++]=o,this.indices[C++]=o+2,this.indices[C++]=o+3;return R},yr.prototype.createTextures=function(t,e,i,r){var o,a,s,l,u=e.length;for(l=0;l<u;++l)a=e[l],(s=n.a.getUid(a).toString())in i?o=i[s]:(o=vr.createTexture(r,a,Yn.a.CLAMP_TO_EDGE,Yn.a.CLAMP_TO_EDGE),i[s]=o),t[l]=o},yr.prototype.setUpProgram=function(t,e,i,n){var r,o=fr.fragment,a=fr.vertex,s=e.getProgram(o,a);return this.defaultLocations?r=this.defaultLocations:(r=new pr(t,s),this.defaultLocations=r),e.useProgram(s),t.enableVertexAttribArray(r.a_position),t.vertexAttribPointer(r.a_position,2,Yn.a.FLOAT,!1,32,0),t.enableVertexAttribArray(r.a_offsets),t.vertexAttribPointer(r.a_offsets,2,Yn.a.FLOAT,!1,32,8),t.enableVertexAttribArray(r.a_texCoord),t.vertexAttribPointer(r.a_texCoord,2,Yn.a.FLOAT,!1,32,16),t.enableVertexAttribArray(r.a_opacity),t.vertexAttribPointer(r.a_opacity,1,Yn.a.FLOAT,!1,32,24),t.enableVertexAttribArray(r.a_rotateWithView),t.vertexAttribPointer(r.a_rotateWithView,1,Yn.a.FLOAT,!1,32,28),r},yr.prototype.shutDownProgram=function(t,e){t.disableVertexAttribArray(e.a_position),t.disableVertexAttribArray(e.a_offsets),t.disableVertexAttribArray(e.a_texCoord),t.disableVertexAttribArray(e.a_opacity),t.disableVertexAttribArray(e.a_rotateWithView)},yr.prototype.drawReplay=function(t,e,i,n){var r,o,a,s=n?this.getHitDetectionTextures():this.getTextures(),l=n?this.hitDetectionGroupIndices:this.groupIndices;if(tt.a.isEmpty(i))for(r=0,o=s.length,a=0;r<o;++r){t.bindTexture(Yn.a.TEXTURE_2D,s[r]);var u=l[r];this.drawElements(t,e,a,u),a=u}else this.drawReplaySkipping(t,e,i,s,l)},yr.prototype.drawReplaySkipping=function(t,e,i,r,o){var a,s,l=0;for(a=0,s=r.length;a<s;++a){t.bindTexture(Yn.a.TEXTURE_2D,r[a]);for(var u=a>0?o[a-1]:0,h=o[a],c=u,f=u;l<this.startIndices.length&&this.startIndices[l]<=h;){var p=this.startIndicesFeature[l];void 0!==i[n.a.getUid(p).toString()]?(c!==f&&this.drawElements(t,e,c,f),f=c=l===this.startIndices.length-1?h:this.startIndices[l+1]):f=l===this.startIndices.length-1?h:this.startIndices[l+1],l++}c!==f&&this.drawElements(t,e,c,f)}},yr.prototype.drawHitDetectionReplayOneByOne=function(t,e,i,r,o){var a,s,l,u,h,c=this.startIndices.length-1,f=this.getHitDetectionTextures();for(a=f.length-1;a>=0;--a)for(t.bindTexture(Yn.a.TEXTURE_2D,f[a]),s=a>0?this.hitDetectionGroupIndices[a-1]:0,u=this.hitDetectionGroupIndices[a];c>=0&&this.startIndices[c]>=s;){if(l=this.startIndices[c],h=this.startIndicesFeature[c],void 0===i[n.a.getUid(h).toString()]&&h.getGeometry()&&(void 0===o||yt.a.intersects(o,h.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.drawElements(t,e,l,u);var p=r(h);if(p)return p}u=l,c--}},yr.prototype.finish=function(t){this.anchorX=void 0,this.anchorY=void 0,this.height=void 0,this.imageHeight=void 0,this.imageWidth=void 0,this.indices=null,this.opacity=void 0,this.originX=void 0,this.originY=void 0,this.rotateWithView=void 0,this.rotation=void 0,this.scale=void 0,this.vertices=null,this.width=void 0},yr.prototype.getTextures=function(t){},yr.prototype.getHitDetectionTextures=function(){};var mr=yr,xr=function(t,e){mr.call(this,t,e),this.images_=[],this.hitDetectionImages_=[],this.textures_=[],this.hitDetectionTextures_=[]};n.a.inherits(xr,mr),xr.prototype.drawMultiPoint=function(t,e){this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e);var i=t.getFlatCoordinates(),n=t.getStride();this.drawCoordinates(i,0,i.length,n)},xr.prototype.drawPoint=function(t,e){this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e);var i=t.getFlatCoordinates(),n=t.getStride();this.drawCoordinates(i,0,i.length,n)},xr.prototype.finish=function(t){var e=t.getGL();this.groupIndices.push(this.indices.length),this.hitDetectionGroupIndices.push(this.indices.length),this.verticesBuffer=new lr(this.vertices);var i=this.indices;this.indicesBuffer=new lr(i);var n={};this.createTextures(this.textures_,this.images_,n,e),this.createTextures(this.hitDetectionTextures_,this.hitDetectionImages_,n,e),this.images_=null,this.hitDetectionImages_=null,mr.prototype.finish.call(this,t)},xr.prototype.setImageStyle=function(t){var e,i=t.getAnchor(),r=t.getImage(1),o=t.getImageSize(),a=t.getHitDetectionImage(1),s=t.getOpacity(),l=t.getOrigin(),u=t.getRotateWithView(),h=t.getRotation(),c=t.getSize(),f=t.getScale();0===this.images_.length?this.images_.push(r):(e=this.images_[this.images_.length-1],n.a.getUid(e)!=n.a.getUid(r)&&(this.groupIndices.push(this.indices.length),this.images_.push(r))),0===this.hitDetectionImages_.length?this.hitDetectionImages_.push(a):(e=this.hitDetectionImages_[this.hitDetectionImages_.length-1],n.a.getUid(e)!=n.a.getUid(a)&&(this.hitDetectionGroupIndices.push(this.indices.length),this.hitDetectionImages_.push(a))),this.anchorX=i[0],this.anchorY=i[1],this.height=c[1],this.imageHeight=o[1],this.imageWidth=o[0],this.opacity=s,this.originX=l[0],this.originY=l[1],this.rotation=h,this.rotateWithView=u,this.scale=f,this.width=c[0]},xr.prototype.getTextures=function(t){return t?this.textures_.concat(this.hitDetectionTextures_):this.textures_},xr.prototype.getHitDetectionTextures=function(){return this.hitDetectionTextures_};var Er=xr,Sr={lineStringIsClosed:function(t,e,i,n){var r=i-n;return t[e]===t[r]&&t[e+1]===t[r+1]&&(i-e)/n>3&&!!Mt.linearRing(t,e,i,n)}},Tr={};Tr.fragment=new Zn(n.a.DEBUG_WEBGL?"precision mediump float;\nvarying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_color;\nuniform vec2 u_size;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n if (v_round > 0.0) {\n vec2 windowCoords = vec2((v_roundVertex.x + 1.0) / 2.0 * u_size.x * u_pixelRatio,\n (v_roundVertex.y + 1.0) / 2.0 * u_size.y * u_pixelRatio);\n if (length(windowCoords - gl_FragCoord.xy) > v_halfWidth * u_pixelRatio) {\n discard;\n }\n }\n gl_FragColor = u_color;\n float alpha = u_color.a * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n":"precision mediump float;varying float a;varying vec2 aVertex;varying float c;uniform float m;uniform vec4 n;uniform vec2 o;uniform float p;void main(void){if(a>0.0){vec2 windowCoords=vec2((aVertex.x+1.0)/2.0*o.x*p,(aVertex.y+1.0)/2.0*o.y*p);if(length(windowCoords-gl_FragCoord.xy)>c*p){discard;}} gl_FragColor=n;float alpha=n.a*m;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"),Tr.vertex=new Qn(n.a.DEBUG_WEBGL?"varying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\nattribute vec2 a_lastPos;\nattribute vec2 a_position;\nattribute vec2 a_nextPos;\nattribute float a_direction;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_miterLimit;\n\nbool nearlyEquals(in float value, in float ref) {\n float epsilon = 0.000000000001;\n return value >= ref - epsilon && value <= ref + epsilon;\n}\n\nvoid alongNormal(out vec2 offset, in vec2 nextP, in float turnDir, in float direction) {\n vec2 dirVect = nextP - a_position;\n vec2 normal = normalize(vec2(-turnDir * dirVect.y, turnDir * dirVect.x));\n offset = u_lineWidth / 2.0 * normal * direction;\n}\n\nvoid miterUp(out vec2 offset, out float round, in bool isRound, in float direction) {\n float halfWidth = u_lineWidth / 2.0;\n vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 dirVect = a_nextPos - a_position;\n vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n offset = normal * direction * miterLength;\n round = 0.0;\n if (isRound) {\n round = 1.0;\n } else if (miterLength > u_miterLimit + u_lineWidth) {\n offset = halfWidth * tmpNormal * direction;\n }\n}\n\nbool miterDown(out vec2 offset, in vec4 projPos, in mat4 offsetMatrix, in float direction) {\n bool degenerate = false;\n vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n vec2 normal = vec2(-tangent.y, tangent.x);\n vec2 dirVect = a_lastPos - a_position;\n vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n vec2 longOffset, shortOffset, longVertex;\n vec4 shortProjVertex;\n float halfWidth = u_lineWidth / 2.0;\n if (length(a_nextPos - a_position) > length(a_lastPos - a_position)) {\n longOffset = tmpNormal * direction * halfWidth;\n shortOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n longVertex = a_nextPos;\n shortProjVertex = u_projectionMatrix * vec4(a_lastPos, 0.0, 1.0);\n } else {\n shortOffset = tmpNormal * direction * halfWidth;\n longOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n longVertex = a_lastPos;\n shortProjVertex = u_projectionMatrix * vec4(a_nextPos, 0.0, 1.0);\n }\n //Intersection algorithm based on theory by Paul Bourke (http://paulbourke.net/geometry/pointlineplane/).\n vec4 p1 = u_projectionMatrix * vec4(longVertex, 0.0, 1.0) + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n vec4 p2 = projPos + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n vec4 p3 = shortProjVertex + offsetMatrix * vec4(-shortOffset, 0.0, 0.0);\n vec4 p4 = shortProjVertex + offsetMatrix * vec4(shortOffset, 0.0, 0.0);\n float denom = (p4.y - p3.y) * (p2.x - p1.x) - (p4.x - p3.x) * (p2.y - p1.y);\n float firstU = ((p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x)) / denom;\n float secondU = ((p2.x - p1.x) * (p1.y - p3.y) - (p2.y - p1.y) * (p1.x - p3.x)) / denom;\n float epsilon = 0.000000000001;\n if (firstU > epsilon && firstU < 1.0 - epsilon && secondU > epsilon && secondU < 1.0 - epsilon) {\n shortProjVertex.x = p1.x + firstU * (p2.x - p1.x);\n shortProjVertex.y = p1.y + firstU * (p2.y - p1.y);\n offset = shortProjVertex.xy;\n degenerate = true;\n } else {\n float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n offset = normal * direction * miterLength;\n }\n return degenerate;\n}\n\nvoid squareCap(out vec2 offset, out float round, in bool isRound, in vec2 nextP,\n in float turnDir, in float direction) {\n round = 0.0;\n vec2 dirVect = a_position - nextP;\n vec2 firstNormal = normalize(dirVect);\n vec2 secondNormal = vec2(turnDir * firstNormal.y * direction, -turnDir * firstNormal.x * direction);\n vec2 hypotenuse = normalize(firstNormal - secondNormal);\n vec2 normal = vec2(turnDir * hypotenuse.y * direction, -turnDir * hypotenuse.x * direction);\n float length = sqrt(v_halfWidth * v_halfWidth * 2.0);\n offset = normal * length;\n if (isRound) {\n round = 1.0;\n }\n}\n\nvoid main(void) {\n bool degenerate = false;\n float direction = float(sign(a_direction));\n mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n vec2 offset;\n vec4 projPos = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n bool round = nearlyEquals(mod(a_direction, 2.0), 0.0);\n\n v_round = 0.0;\n v_halfWidth = u_lineWidth / 2.0;\n v_roundVertex = projPos.xy;\n\n if (nearlyEquals(mod(a_direction, 3.0), 0.0) || nearlyEquals(mod(a_direction, 17.0), 0.0)) {\n alongNormal(offset, a_nextPos, 1.0, direction);\n } else if (nearlyEquals(mod(a_direction, 5.0), 0.0) || nearlyEquals(mod(a_direction, 13.0), 0.0)) {\n alongNormal(offset, a_lastPos, -1.0, direction);\n } else if (nearlyEquals(mod(a_direction, 23.0), 0.0)) {\n miterUp(offset, v_round, round, direction);\n } else if (nearlyEquals(mod(a_direction, 19.0), 0.0)) {\n degenerate = miterDown(offset, projPos, offsetMatrix, direction);\n } else if (nearlyEquals(mod(a_direction, 7.0), 0.0)) {\n squareCap(offset, v_round, round, a_nextPos, 1.0, direction);\n } else if (nearlyEquals(mod(a_direction, 11.0), 0.0)) {\n squareCap(offset, v_round, round, a_lastPos, -1.0, direction);\n }\n if (!degenerate) {\n vec4 offsets = offsetMatrix * vec4(offset, 0.0, 0.0);\n gl_Position = projPos + offsets;\n } else {\n gl_Position = vec4(offset, 0.0, 1.0);\n }\n}\n\n\n":"varying float a;varying vec2 aVertex;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;aVertex=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}");var Cr=Tr,Rr=function(t,e){this.u_projectionMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_projectionMatrix":"h"),this.u_offsetScaleMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_offsetScaleMatrix":"i"),this.u_offsetRotateMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_offsetRotateMatrix":"j"),this.u_lineWidth=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_lineWidth":"k"),this.u_miterLimit=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_miterLimit":"l"),this.u_opacity=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_opacity":"m"),this.u_color=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_color":"n"),this.u_size=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_size":"o"),this.u_pixelRatio=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_pixelRatio":"p"),this.a_lastPos=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_lastPos":"d"),this.a_position=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_position":"e"),this.a_nextPos=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_nextPos":"f"),this.a_direction=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_direction":"g")},Ir=function(t,e){rr.call(this,t,e),this.defaultLocations_=null,this.styles_=[],this.styleIndices_=[],this.state_={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,changed:!1}};n.a.inherits(Ir,rr),Ir.prototype.drawCoordinates_=function(t,e,i,n){var r,o,a,s,l,u,h,c,f=this.vertices.length,p=this.indices.length,d="bevel"===this.state_.lineJoin?0:"miter"===this.state_.lineJoin?1:2,g="butt"===this.state_.lineCap?0:"square"===this.state_.lineCap?1:2,_=Sr.lineStringIsClosed(t,e,i,n),v=p,y=1;for(r=e,o=i;r<o;r+=n){if(l=f/7,u=h,h=c||[t[r],t[r+1]],r===e){if(c=[t[r+n],t[r+n+1]],i-e==2*n&&k.a.equals(h,c))break;if(!_){g&&(f=this.addVertices_([0,0],h,c,y*Ir.Instruction_.BEGIN_LINE_CAP*g,f),f=this.addVertices_([0,0],h,c,-y*Ir.Instruction_.BEGIN_LINE_CAP*g,f),this.indices[p++]=l+2,this.indices[p++]=l,this.indices[p++]=l+1,this.indices[p++]=l+1,this.indices[p++]=l+3,this.indices[p++]=l+2),f=this.addVertices_([0,0],h,c,y*Ir.Instruction_.BEGIN_LINE*(g||1),f),v=(f=this.addVertices_([0,0],h,c,-y*Ir.Instruction_.BEGIN_LINE*(g||1),f))/7-1;continue}u=[t[i-2*n],t[i-2*n+1]],a=c}else{if(r===i-n){if(_){c=a;break}u=u||[0,0],f=this.addVertices_(u,h,[0,0],y*Ir.Instruction_.END_LINE*(g||1),f),f=this.addVertices_(u,h,[0,0],-y*Ir.Instruction_.END_LINE*(g||1),f),this.indices[p++]=l,this.indices[p++]=v-1,this.indices[p++]=v,this.indices[p++]=v,this.indices[p++]=l+1,this.indices[p++]=l,g&&(f=this.addVertices_(u,h,[0,0],y*Ir.Instruction_.END_LINE_CAP*g,f),f=this.addVertices_(u,h,[0,0],-y*Ir.Instruction_.END_LINE_CAP*g,f),this.indices[p++]=l+2,this.indices[p++]=l,this.indices[p++]=l+1,this.indices[p++]=l+1,this.indices[p++]=l+3,this.indices[p++]=l+2);break}c=[t[r+n],t[r+n+1]]}s=ar.triangleIsCounterClockwise(u[0],u[1],h[0],h[1],c[0],c[1])?-1:1,f=this.addVertices_(u,h,c,s*Ir.Instruction_.BEVEL_FIRST*(d||1),f),f=this.addVertices_(u,h,c,s*Ir.Instruction_.BEVEL_SECOND*(d||1),f),f=this.addVertices_(u,h,c,-s*Ir.Instruction_.MITER_BOTTOM*(d||1),f),r>e&&(this.indices[p++]=l,this.indices[p++]=v-1,this.indices[p++]=v,this.indices[p++]=l+2,this.indices[p++]=l,this.indices[p++]=y*s>0?v:v-1),this.indices[p++]=l,this.indices[p++]=l+2,this.indices[p++]=l+1,v=l+2,y=s,d&&(f=this.addVertices_(u,h,c,s*Ir.Instruction_.MITER_TOP*d,f),this.indices[p++]=l+1,this.indices[p++]=l+3,this.indices[p++]=l)}_&&(l=l||f/7,s=ie.linearRingIsClockwise([u[0],u[1],h[0],h[1],c[0],c[1]],0,6,2)?1:-1,f=this.addVertices_(u,h,c,s*Ir.Instruction_.BEVEL_FIRST*(d||1),f),f=this.addVertices_(u,h,c,-s*Ir.Instruction_.MITER_BOTTOM*(d||1),f),this.indices[p++]=l,this.indices[p++]=v-1,this.indices[p++]=v,this.indices[p++]=l+1,this.indices[p++]=l,this.indices[p++]=y*s>0?v:v-1)},Ir.prototype.addVertices_=function(t,e,i,n,r){return this.vertices[r++]=t[0],this.vertices[r++]=t[1],this.vertices[r++]=e[0],this.vertices[r++]=e[1],this.vertices[r++]=i[0],this.vertices[r++]=i[1],this.vertices[r++]=n,r},Ir.prototype.isValid_=function(t,e,i,n){var r=i-e;if(r<2*n)return!1;if(r===2*n){var o=[t[e],t[e+1]],a=[t[e+n],t[e+n+1]];return!k.a.equals(o,a)}return!0},Ir.prototype.drawLineString=function(t,e){var i=t.getFlatCoordinates(),n=t.getStride();this.isValid_(i,0,i.length,n)&&(i=Rt.translate(i,0,i.length,n,-this.origin[0],-this.origin[1]),this.state_.changed&&(this.styleIndices_.push(this.indices.length),this.state_.changed=!1),this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e),this.drawCoordinates_(i,0,i.length,n))},Ir.prototype.drawMultiLineString=function(t,e){var i=this.indices.length,n=t.getEnds();n.unshift(0);var r,o,a=t.getFlatCoordinates(),s=t.getStride();if(n.length>1)for(r=1,o=n.length;r<o;++r)if(this.isValid_(a,n[r-1],n[r],s)){var l=Rt.translate(a,n[r-1],n[r],s,-this.origin[0],-this.origin[1]);this.drawCoordinates_(l,0,l.length,s)}this.indices.length>i&&(this.startIndices.push(i),this.startIndicesFeature.push(e),this.state_.changed&&(this.styleIndices_.push(i),this.state_.changed=!1))},Ir.prototype.drawPolygonCoordinates=function(t,e,i){var n,r;if(Sr.lineStringIsClosed(t,0,t.length,i)||(t.push(t[0]),t.push(t[1])),this.drawCoordinates_(t,0,t.length,i),e.length)for(n=0,r=e.length;n<r;++n)Sr.lineStringIsClosed(e[n],0,e[n].length,i)||(e[n].push(e[n][0]),e[n].push(e[n][1])),this.drawCoordinates_(e[n],0,e[n].length,i)},Ir.prototype.setPolygonStyle=function(t,e){var i=void 0===e?this.indices.length:e;this.startIndices.push(i),this.startIndicesFeature.push(t),this.state_.changed&&(this.styleIndices_.push(i),this.state_.changed=!1)},Ir.prototype.getCurrentIndex=function(){return this.indices.length},Ir.prototype.finish=function(t){this.verticesBuffer=new lr(this.vertices),this.indicesBuffer=new lr(this.indices),this.startIndices.push(this.indices.length),0===this.styleIndices_.length&&this.styles_.length>0&&(this.styles_=[]),this.vertices=null,this.indices=null},Ir.prototype.getDeleteResourcesFunction=function(t){var e=this.verticesBuffer,i=this.indicesBuffer;return function(){t.deleteBuffer(e),t.deleteBuffer(i)}},Ir.prototype.setUpProgram=function(t,e,i,n){var r,o;r=Cr.fragment,o=Cr.vertex;var a,s=e.getProgram(r,o);return this.defaultLocations_?a=this.defaultLocations_:(a=new Rr(t,s),this.defaultLocations_=a),e.useProgram(s),t.enableVertexAttribArray(a.a_lastPos),t.vertexAttribPointer(a.a_lastPos,2,Yn.a.FLOAT,!1,28,0),t.enableVertexAttribArray(a.a_position),t.vertexAttribPointer(a.a_position,2,Yn.a.FLOAT,!1,28,8),t.enableVertexAttribArray(a.a_nextPos),t.vertexAttribPointer(a.a_nextPos,2,Yn.a.FLOAT,!1,28,16),t.enableVertexAttribArray(a.a_direction),t.vertexAttribPointer(a.a_direction,1,Yn.a.FLOAT,!1,28,24),t.uniform2fv(a.u_size,i),t.uniform1f(a.u_pixelRatio,n),a},Ir.prototype.shutDownProgram=function(t,e){t.disableVertexAttribArray(e.a_lastPos),t.disableVertexAttribArray(e.a_position),t.disableVertexAttribArray(e.a_nextPos),t.disableVertexAttribArray(e.a_direction)},Ir.prototype.drawReplay=function(t,e,i,n){var r,o,a,s,l=t.getParameter(t.DEPTH_FUNC),u=t.getParameter(t.DEPTH_WRITEMASK);if(n||(t.enable(t.DEPTH_TEST),t.depthMask(!0),t.depthFunc(t.NOTEQUAL)),tt.a.isEmpty(i))for(a=this.startIndices[this.startIndices.length-1],r=this.styleIndices_.length-1;r>=0;--r)o=this.styleIndices_[r],s=this.styles_[r],this.setStrokeStyle_(t,s[0],s[1],s[2]),this.drawElements(t,e,o,a),t.clear(t.DEPTH_BUFFER_BIT),a=o;else this.drawReplaySkipping_(t,e,i);n||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(u),t.depthFunc(l))},Ir.prototype.drawReplaySkipping_=function(t,e,i){var r,o,a,s,l,u,h,c;for(h=this.startIndices.length-2,a=o=this.startIndices[h+1],r=this.styleIndices_.length-1;r>=0;--r){for(s=this.styles_[r],this.setStrokeStyle_(t,s[0],s[1],s[2]),l=this.styleIndices_[r];h>=0&&this.startIndices[h]>=l;)c=this.startIndices[h],u=this.startIndicesFeature[h],i[n.a.getUid(u).toString()]&&(o!==a&&(this.drawElements(t,e,o,a),t.clear(t.DEPTH_BUFFER_BIT)),a=c),h--,o=c;o!==a&&(this.drawElements(t,e,o,a),t.clear(t.DEPTH_BUFFER_BIT)),o=a=l}},Ir.prototype.drawHitDetectionReplayOneByOne=function(t,e,i,r,o){var a,s,l,u,h,c,f;for(f=this.startIndices.length-2,l=this.startIndices[f+1],a=this.styleIndices_.length-1;a>=0;--a)for(u=this.styles_[a],this.setStrokeStyle_(t,u[0],u[1],u[2]),h=this.styleIndices_[a];f>=0&&this.startIndices[f]>=h;){if(s=this.startIndices[f],c=this.startIndicesFeature[f],void 0===i[n.a.getUid(c).toString()]&&c.getGeometry()&&(void 0===o||yt.a.intersects(o,c.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.drawElements(t,e,s,l);var p=r(c);if(p)return p}f--,l=s}},Ir.prototype.setStrokeStyle_=function(t,e,i,n){t.uniform4fv(this.defaultLocations_.u_color,e),t.uniform1f(this.defaultLocations_.u_lineWidth,i),t.uniform1f(this.defaultLocations_.u_miterLimit,n)},Ir.prototype.setFillStrokeStyle=function(t,e){var i=e.getLineCap();this.state_.lineCap=void 0!==i?i:ar.defaultLineCap;var n=e.getLineDash();this.state_.lineDash=n||ar.defaultLineDash;var r=e.getLineDashOffset();this.state_.lineDashOffset=r||ar.defaultLineDashOffset;var o=e.getLineJoin();this.state_.lineJoin=void 0!==o?o:ar.defaultLineJoin;var a=e.getColor();a=a instanceof CanvasGradient||a instanceof CanvasPattern?ar.defaultStrokeStyle:On.a.asArray(a).map(function(t,e){return 3!=e?t/255:t})||ar.defaultStrokeStyle;var s=e.getWidth();s=void 0!==s?s:ar.defaultLineWidth;var l=e.getMiterLimit();l=void 0!==l?l:ar.defaultMiterLimit,this.state_.strokeColor&&k.a.equals(this.state_.strokeColor,a)&&this.state_.lineWidth===s&&this.state_.miterLimit===l||(this.state_.changed=!0,this.state_.strokeColor=a,this.state_.lineWidth=s,this.state_.miterLimit=l,this.styles_.push([a,s,l]))},Ir.Instruction_={ROUND:2,BEGIN_LINE:3,END_LINE:5,BEGIN_LINE_CAP:7,END_LINE_CAP:11,BEVEL_FIRST:13,BEVEL_SECOND:17,MITER_BOTTOM:19,MITER_TOP:23};var br=Ir,wr={};wr.fragment=new Zn(n.a.DEBUG_WEBGL?"precision mediump float;\n\n\n\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main(void) {\n gl_FragColor = u_color;\n float alpha = u_color.a * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n":"precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"),wr.vertex=new Qn(n.a.DEBUG_WEBGL?"\n\nattribute vec2 a_position;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n}\n\n\n":"attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}");var Lr=wr,Or=function(t,e){this.u_projectionMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_projectionMatrix":"b"),this.u_offsetScaleMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_offsetScaleMatrix":"c"),this.u_offsetRotateMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_offsetRotateMatrix":"d"),this.u_color=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_color":"e"),this.u_opacity=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_opacity":"f"),this.a_position=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_position":"a")},Ar=i(68),Pr=function(t){this.first_=void 0,this.last_=void 0,this.head_=void 0,this.circular_=void 0===t||t,this.length_=0};Pr.prototype.insertItem=function(t){var e={prev:void 0,next:void 0,data:t},i=this.head_;if(i){var n=i.next;e.prev=i,e.next=n,i.next=e,n&&(n.prev=e),i===this.last_&&(this.last_=e)}else this.first_=e,this.last_=e,this.circular_&&(e.next=e,e.prev=e);this.head_=e,this.length_++},Pr.prototype.removeItem=function(){var t=this.head_;if(t){var e=t.next,i=t.prev;e&&(e.prev=i),i&&(i.next=e),this.head_=e||i,this.first_===this.last_?(this.head_=void 0,this.first_=void 0,this.last_=void 0):this.first_===t?this.first_=this.head_:this.last_===t&&(this.last_=i?this.head_.prev:this.head_),this.length_--}},Pr.prototype.firstItem=function(){if(this.head_=this.first_,this.head_)return this.head_.data},Pr.prototype.lastItem=function(){if(this.head_=this.last_,this.head_)return this.head_.data},Pr.prototype.nextItem=function(){if(this.head_&&this.head_.next)return this.head_=this.head_.next,this.head_.data},Pr.prototype.getNextItem=function(){if(this.head_&&this.head_.next)return this.head_.next.data},Pr.prototype.prevItem=function(){if(this.head_&&this.head_.prev)return this.head_=this.head_.prev,this.head_.data},Pr.prototype.getPrevItem=function(){if(this.head_&&this.head_.prev)return this.head_.prev.data},Pr.prototype.getCurrItem=function(){if(this.head_)return this.head_.data},Pr.prototype.setFirstItem=function(){this.circular_&&this.head_&&(this.first_=this.head_,this.last_=this.head_.prev)},Pr.prototype.concat=function(t){if(t.head_){if(this.head_){var e=this.head_.next;this.head_.next=t.first_,t.first_.prev=this.head_,e.prev=t.last_,t.last_.next=e,this.length_+=t.length_}else this.head_=t.head_,this.first_=t.first_,this.last_=t.last_,this.length_=t.length_;t.head_=void 0,t.first_=void 0,t.last_=void 0,t.length_=0}},Pr.prototype.getLength=function(){return this.length_};var Fr=Pr,Mr=function(t){this.rbush_=tn()(t),this.items_={}};Mr.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[n.a.getUid(e)]=i},Mr.prototype.load=function(t,e){for(var i=new Array(e.length),r=0,o=e.length;r<o;r++){var a=t[r],s=e[r],l={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],value:s};i[r]=l,this.items_[n.a.getUid(s)]=l}this.rbush_.load(i)},Mr.prototype.remove=function(t){var e=n.a.getUid(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},Mr.prototype.update=function(t,e){var i=this.items_[n.a.getUid(e)],r=[i.minX,i.minY,i.maxX,i.maxY];yt.a.equals(r,t)||(this.remove(e),this.insert(t,e))},Mr.prototype.getAll=function(){return this.rbush_.all().map(function(t){return t.value})},Mr.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(t){return t.value})},Mr.prototype.forEach=function(t,e){return this.forEach_(this.getAll(),t,e)},Mr.prototype.forEachInExtent=function(t,e,i){return this.forEach_(this.getInExtent(t),e,i)},Mr.prototype.forEach_=function(t,e,i){for(var n,r=0,o=t.length;r<o;r++)if(n=e.call(i,t[r]))return n;return n},Mr.prototype.isEmpty=function(){return tt.a.isEmpty(this.items_)},Mr.prototype.clear=function(){this.rbush_.clear(),this.items_={}},Mr.prototype.getExtent=function(t){var e=this.rbush_.data;return yt.a.createOrUpdate(e.minX,e.minY,e.maxX,e.maxY,t)},Mr.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[0|e]=t.items_[0|e]};var Dr=Mr,kr=function(t,e){rr.call(this,t,e),this.lineStringReplay=new br(t,e),this.defaultLocations_=null,this.styles_=[],this.styleIndices_=[],this.state_={fillColor:null,changed:!1}};n.a.inherits(kr,rr),kr.prototype.drawCoordinates_=function(t,e,i){var n=new Fr,r=new Dr;this.processFlatCoordinates_(t,i,n,r,!0);var o=this.getMaxCoords_(n);if(e.length){var a,s,l=[];for(a=0,s=e.length;a<s;++a){var u={list:new Fr,maxCoords:void 0,rtree:new Dr};l.push(u),this.processFlatCoordinates_(e[a],i,u.list,u.rtree,!1),this.classifyPoints_(u.list,u.rtree,!0),u.maxCoords=this.getMaxCoords_(u.list)}for(l.sort(function(t,e){return e.maxCoords[0]===t.maxCoords[0]?t.maxCoords[1]-e.maxCoords[1]:e.maxCoords[0]-t.maxCoords[0]}),a=0;a<l.length;++a){var h,c=l[a].list,f=c.firstItem(),p=f;do{if(this.getIntersections_(p,r).length){h=!0;break}p=c.nextItem()}while(f!==p);h||this.bridgeHole_(c,l[a].maxCoords[0],n,o[0],r)&&(r.concat(l[a].rtree),this.classifyPoints_(n,r,!1))}}else this.classifyPoints_(n,r,!1);this.triangulate_(n,r)},kr.prototype.processFlatCoordinates_=function(t,e,i,n,r){var o,a,s,l,u,h=ie.linearRingIsClockwise(t,0,t.length,e),c=this.vertices.length/2,f=[],p=[];if(r===h){for(l=s=this.createPoint_(t[0],t[1],c++),o=e,a=t.length;o<a;o+=e)u=this.createPoint_(t[o],t[o+1],c++),p.push(this.insertItem_(l,u,i)),f.push([Math.min(l.x,u.x),Math.min(l.y,u.y),Math.max(l.x,u.x),Math.max(l.y,u.y)]),l=u;p.push(this.insertItem_(u,s,i)),f.push([Math.min(l.x,u.x),Math.min(l.y,u.y),Math.max(l.x,u.x),Math.max(l.y,u.y)])}else{var d=t.length-e;for(l=s=this.createPoint_(t[d],t[d+1],c++),o=d-e,a=0;o>=a;o-=e)u=this.createPoint_(t[o],t[o+1],c++),p.push(this.insertItem_(l,u,i)),f.push([Math.min(l.x,u.x),Math.min(l.y,u.y),Math.max(l.x,u.x),Math.max(l.y,u.y)]),l=u;p.push(this.insertItem_(u,s,i)),f.push([Math.min(l.x,u.x),Math.min(l.y,u.y),Math.max(l.x,u.x),Math.max(l.y,u.y)])}n.load(f,p)},kr.prototype.getMaxCoords_=function(t){var e=t.firstItem(),i=e,n=[i.p0.x,i.p0.y];do{(i=t.nextItem()).p0.x>n[0]&&(n=[i.p0.x,i.p0.y])}while(i!==e);return n},kr.prototype.classifyPoints_=function(t,e,i){var n=t.firstItem(),r=n,o=t.nextItem(),a=!1;do{var s=i?ar.triangleIsCounterClockwise(o.p1.x,o.p1.y,r.p1.x,r.p1.y,r.p0.x,r.p0.y):ar.triangleIsCounterClockwise(r.p0.x,r.p0.y,r.p1.x,r.p1.y,o.p1.x,o.p1.y);void 0===s?(this.removeItem_(r,o,t,e),a=!0,o===n&&(n=t.getNextItem()),o=r,t.prevItem()):r.p1.reflex!==s&&(r.p1.reflex=s,a=!0),r=o,o=t.nextItem()}while(r!==n);return a},kr.prototype.bridgeHole_=function(t,e,i,n,r){for(var o=t.firstItem();o.p1.x!==e;)o=t.nextItem();var a,s,l,u,h=o.p1,c={x:n,y:h.y,i:-1},f=1/0,p=this.getIntersections_({p0:h,p1:c},r,!0);for(a=0,s=p.length;a<s;++a){var d=p[a],g=this.calculateIntersection_(h,c,d.p0,d.p1,!0),_=Math.abs(h.x-g[0]);_<f&&void 0!==ar.triangleIsCounterClockwise(h.x,h.y,d.p0.x,d.p0.y,d.p1.x,d.p1.y)&&(f=_,u={x:g[0],y:g[1],i:-1},o=d)}if(f===1/0)return!1;if(l=o.p1,f>0){var v=this.getPointsInTriangle_(h,u,o.p1,r);if(v.length){var y=1/0;for(a=0,s=v.length;a<s;++a){var m=v[a],x=Math.atan2(h.y-m.y,c.x-m.x);(x<y||x===y&&m.x<l.x)&&(y=x,l=m)}}}for(o=i.firstItem();o.p1.x!==l.x||o.p1.y!==l.y;)o=i.nextItem();var E={x:h.x,y:h.y,i:h.i,reflex:void 0},S={x:o.p1.x,y:o.p1.y,i:o.p1.i,reflex:void 0};return t.getNextItem().p0=E,this.insertItem_(h,o.p1,t,r),this.insertItem_(S,E,t,r),o.p1=S,t.setFirstItem(),i.concat(t),!0},kr.prototype.triangulate_=function(t,e){for(var i=!1,n=this.isSimple_(t,e);t.getLength()>3;)if(n){if(!this.clipEars_(t,e,n,i)&&!this.classifyPoints_(t,e,i)&&!this.resolveSelfIntersections_(t,e,!0))break}else if(!this.clipEars_(t,e,n,i)&&!this.classifyPoints_(t,e,i)&&!this.resolveSelfIntersections_(t,e)){if(!(n=this.isSimple_(t,e))){this.splitPolygon_(t,e);break}i=!this.isClockwise_(t),this.classifyPoints_(t,e,i)}if(3===t.getLength()){var r=this.indices.length;this.indices[r++]=t.getPrevItem().p0.i,this.indices[r++]=t.getCurrItem().p0.i,this.indices[r++]=t.getNextItem().p0.i}},kr.prototype.clipEars_=function(t,e,i,n){var r,o,a,s=this.indices.length,l=t.firstItem(),u=t.getPrevItem(),h=l,c=t.nextItem(),f=t.getNextItem(),p=!1;do{var d;r=h.p0,o=h.p1,a=c.p1,!1===o.reflex&&(d=i?0===this.getPointsInTriangle_(r,o,a,e,!0).length:n?this.diagonalIsInside_(f.p1,a,o,r,u.p0):this.diagonalIsInside_(u.p0,r,o,a,f.p1),(i||0===this.getIntersections_({p0:r,p1:a},e).length)&&d&&(i||!1===r.reflex||!1===a.reflex||ie.linearRingIsClockwise([u.p0.x,u.p0.y,r.x,r.y,o.x,o.y,a.x,a.y,f.p1.x,f.p1.y],0,10,2)===!n)&&(this.indices[s++]=r.i,this.indices[s++]=o.i,this.indices[s++]=a.i,this.removeItem_(h,c,t,e),c===l&&(l=f),p=!0)),u=t.getPrevItem(),h=t.getCurrItem(),c=t.nextItem(),f=t.getNextItem()}while(h!==l&&t.getLength()>3);return p},kr.prototype.resolveSelfIntersections_=function(t,e,i){var n=t.firstItem();t.nextItem();var r=n,o=t.nextItem(),a=!1;do{var s=this.calculateIntersection_(r.p0,r.p1,o.p0,o.p1,i);if(s){var l,u=!1,h=this.vertices.length,c=this.indices.length,f=h/2,p=t.prevItem();if(t.removeItem(),e.remove(p),u=p===n,i?(s[0]===r.p0.x&&s[1]===r.p0.y?(t.prevItem(),l=r.p0,o.p0=l,e.remove(r),u=u||r===n):(l=o.p1,r.p1=l,e.remove(o),u=u||o===n),t.removeItem()):(l=this.createPoint_(s[0],s[1],f),r.p1=l,o.p0=l,e.update([Math.min(r.p0.x,r.p1.x),Math.min(r.p0.y,r.p1.y),Math.max(r.p0.x,r.p1.x),Math.max(r.p0.y,r.p1.y)],r),e.update([Math.min(o.p0.x,o.p1.x),Math.min(o.p0.y,o.p1.y),Math.max(o.p0.x,o.p1.x),Math.max(o.p0.y,o.p1.y)],o)),this.indices[c++]=p.p0.i,this.indices[c++]=p.p1.i,this.indices[c++]=l.i,a=!0,u)break}r=t.getPrevItem(),o=t.nextItem()}while(r!==n);return a},kr.prototype.isSimple_=function(t,e){var i=t.firstItem(),n=i;do{if(this.getIntersections_(n,e).length)return!1;n=t.nextItem()}while(n!==i);return!0},kr.prototype.isClockwise_=function(t){var e=2*t.getLength(),i=new Array(e),n=t.firstItem(),r=n,o=0;do{i[o++]=r.p0.x,i[o++]=r.p0.y,r=t.nextItem()}while(r!==n);return ie.linearRingIsClockwise(i,0,e,2)},kr.prototype.splitPolygon_=function(t,e){var i=t.firstItem(),n=i;do{var r=this.getIntersections_(n,e);if(r.length){var o=r[0],a=this.vertices.length/2,s=this.calculateIntersection_(n.p0,n.p1,o.p0,o.p1),l=this.createPoint_(s[0],s[1],a),u=new Fr,h=new Dr;this.insertItem_(l,n.p1,u,h),n.p1=l,e.update([Math.min(n.p0.x,l.x),Math.min(n.p0.y,l.y),Math.max(n.p0.x,l.x),Math.max(n.p0.y,l.y)],n);for(var c=t.nextItem();c!==o;)this.insertItem_(c.p0,c.p1,u,h),e.remove(c),t.removeItem(),c=t.getCurrItem();this.insertItem_(o.p0,l,u,h),o.p0=l,e.update([Math.min(o.p1.x,l.x),Math.min(o.p1.y,l.y),Math.max(o.p1.x,l.x),Math.max(o.p1.y,l.y)],o),this.classifyPoints_(t,e,!1),this.triangulate_(t,e),this.classifyPoints_(u,h,!1),this.triangulate_(u,h);break}n=t.nextItem()}while(n!==i)},kr.prototype.createPoint_=function(t,e,i){var n=this.vertices.length;return this.vertices[n++]=t,this.vertices[n++]=e,{x:t,y:e,i:i,reflex:void 0}},kr.prototype.insertItem_=function(t,e,i,n){var r={p0:t,p1:e};return i.insertItem(r),n&&n.insert([Math.min(t.x,e.x),Math.min(t.y,e.y),Math.max(t.x,e.x),Math.max(t.y,e.y)],r),r},kr.prototype.removeItem_=function(t,e,i,n){i.getCurrItem()===e&&(i.removeItem(),t.p1=e.p1,n.remove(e),n.update([Math.min(t.p0.x,t.p1.x),Math.min(t.p0.y,t.p1.y),Math.max(t.p0.x,t.p1.x),Math.max(t.p0.y,t.p1.y)],t))},kr.prototype.getPointsInTriangle_=function(t,e,i,n,r){var o,a,s,l,u=[],h=n.getInExtent([Math.min(t.x,e.x,i.x),Math.min(t.y,e.y,i.y),Math.max(t.x,e.x,i.x),Math.max(t.y,e.y,i.y)]);for(o=0,a=h.length;o<a;++o)for(s in h[o])"object"!=typeof(l=h[o][s])||r&&!l.reflex||l.x===t.x&&l.y===t.y||l.x===e.x&&l.y===e.y||l.x===i.x&&l.y===i.y||-1!==u.indexOf(l)||!Kt.linearRingContainsXY([t.x,t.y,e.x,e.y,i.x,i.y],0,6,2,l.x,l.y)||u.push(l);return u},kr.prototype.getIntersections_=function(t,e,i){var n,r,o=t.p0,a=t.p1,s=e.getInExtent([Math.min(o.x,a.x),Math.min(o.y,a.y),Math.max(o.x,a.x),Math.max(o.y,a.y)]),l=[];for(n=0,r=s.length;n<r;++n){var u=s[n];t!==u&&(i||u.p0!==a||u.p1!==o)&&this.calculateIntersection_(o,a,u.p0,u.p1,i)&&l.push(u)}return l},kr.prototype.calculateIntersection_=function(t,e,i,n,r){var o=(n.y-i.y)*(e.x-t.x)-(n.x-i.x)*(e.y-t.y);if(0!==o){var a=((n.x-i.x)*(t.y-i.y)-(n.y-i.y)*(t.x-i.x))/o,s=((e.x-t.x)*(t.y-i.y)-(e.y-t.y)*(t.x-i.x))/o;if(!r&&a>ar.EPSILON&&a<1-ar.EPSILON&&s>ar.EPSILON&&s<1-ar.EPSILON||r&&a>=0&&a<=1&&s>=0&&s<=1)return[t.x+a*(e.x-t.x),t.y+a*(e.y-t.y)]}},kr.prototype.diagonalIsInside_=function(t,e,i,n,r){if(void 0===e.reflex||void 0===n.reflex)return!1;var o=(i.x-n.x)*(e.y-n.y)>(i.y-n.y)*(e.x-n.x),a=(r.x-n.x)*(e.y-n.y)<(r.y-n.y)*(e.x-n.x),s=(t.x-e.x)*(n.y-e.y)>(t.y-e.y)*(n.x-e.x),l=(i.x-e.x)*(n.y-e.y)<(i.y-e.y)*(n.x-e.x),u=n.reflex?a||o:a&&o,h=e.reflex?l||s:l&&s;return u&&h},kr.prototype.drawMultiPolygon=function(t,e){var i,n,r,o,a=t.getEndss(),s=t.getStride(),l=this.indices.length,u=this.lineStringReplay.getCurrentIndex(),h=t.getFlatCoordinates(),c=0;for(i=0,n=a.length;i<n;++i){var f=a[i];if(f.length>0){var p=Rt.translate(h,c,f[0],s,-this.origin[0],-this.origin[1]);if(p.length){var d,g=[];for(r=1,o=f.length;r<o;++r)f[r]!==f[r-1]&&(d=Rt.translate(h,f[r-1],f[r],s,-this.origin[0],-this.origin[1]),g.push(d));this.lineStringReplay.drawPolygonCoordinates(p,g,s),this.drawCoordinates_(p,g,s)}}c=f[f.length-1]}this.indices.length>l&&(this.startIndices.push(l),this.startIndicesFeature.push(e),this.state_.changed&&(this.styleIndices_.push(l),this.state_.changed=!1)),this.lineStringReplay.getCurrentIndex()>u&&this.lineStringReplay.setPolygonStyle(e,u)},kr.prototype.drawPolygon=function(t,e){var i=t.getEnds(),n=t.getStride();if(i.length>0){var r=t.getFlatCoordinates().map(Number),o=Rt.translate(r,0,i[0],n,-this.origin[0],-this.origin[1]);if(o.length){var a,s,l,u=[];for(a=1,s=i.length;a<s;++a)i[a]!==i[a-1]&&(l=Rt.translate(r,i[a-1],i[a],n,-this.origin[0],-this.origin[1]),u.push(l));this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e),this.state_.changed&&(this.styleIndices_.push(this.indices.length),this.state_.changed=!1),this.lineStringReplay.setPolygonStyle(e),this.lineStringReplay.drawPolygonCoordinates(o,u,n),this.drawCoordinates_(o,u,n)}}},kr.prototype.finish=function(t){this.verticesBuffer=new lr(this.vertices),this.indicesBuffer=new lr(this.indices),this.startIndices.push(this.indices.length),this.lineStringReplay.finish(t),0===this.styleIndices_.length&&this.styles_.length>0&&(this.styles_=[]),this.vertices=null,this.indices=null},kr.prototype.getDeleteResourcesFunction=function(t){var e=this.verticesBuffer,i=this.indicesBuffer,n=this.lineStringReplay.getDeleteResourcesFunction(t);return function(){t.deleteBuffer(e),t.deleteBuffer(i),n()}},kr.prototype.setUpProgram=function(t,e,i,n){var r,o;r=Lr.fragment,o=Lr.vertex;var a,s=e.getProgram(r,o);return this.defaultLocations_?a=this.defaultLocations_:(a=new Or(t,s),this.defaultLocations_=a),e.useProgram(s),t.enableVertexAttribArray(a.a_position),t.vertexAttribPointer(a.a_position,2,Yn.a.FLOAT,!1,8,0),a},kr.prototype.shutDownProgram=function(t,e){t.disableVertexAttribArray(e.a_position)},kr.prototype.drawReplay=function(t,e,i,n){var r,o,a,s,l=t.getParameter(t.DEPTH_FUNC),u=t.getParameter(t.DEPTH_WRITEMASK);if(n||(t.enable(t.DEPTH_TEST),t.depthMask(!0),t.depthFunc(t.NOTEQUAL)),tt.a.isEmpty(i))for(a=this.startIndices[this.startIndices.length-1],r=this.styleIndices_.length-1;r>=0;--r)o=this.styleIndices_[r],s=this.styles_[r],this.setFillStyle_(t,s),this.drawElements(t,e,o,a),a=o;else this.drawReplaySkipping_(t,e,i);n||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(u),t.depthFunc(l))},kr.prototype.drawHitDetectionReplayOneByOne=function(t,e,i,r,o){var a,s,l,u,h,c,f;for(f=this.startIndices.length-2,l=this.startIndices[f+1],a=this.styleIndices_.length-1;a>=0;--a)for(u=this.styles_[a],this.setFillStyle_(t,u),h=this.styleIndices_[a];f>=0&&this.startIndices[f]>=h;){if(s=this.startIndices[f],c=this.startIndicesFeature[f],void 0===i[n.a.getUid(c).toString()]&&c.getGeometry()&&(void 0===o||yt.a.intersects(o,c.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.drawElements(t,e,s,l);var p=r(c);if(p)return p}f--,l=s}},kr.prototype.drawReplaySkipping_=function(t,e,i){var r,o,a,s,l,u,h,c;for(h=this.startIndices.length-2,a=o=this.startIndices[h+1],r=this.styleIndices_.length-1;r>=0;--r){for(s=this.styles_[r],this.setFillStyle_(t,s),l=this.styleIndices_[r];h>=0&&this.startIndices[h]>=l;)c=this.startIndices[h],u=this.startIndicesFeature[h],i[n.a.getUid(u).toString()]&&(o!==a&&(this.drawElements(t,e,o,a),t.clear(t.DEPTH_BUFFER_BIT)),a=c),h--,o=c;o!==a&&(this.drawElements(t,e,o,a),t.clear(t.DEPTH_BUFFER_BIT)),o=a=l}},kr.prototype.setFillStyle_=function(t,e){t.uniform4fv(this.defaultLocations_.u_color,e)},kr.prototype.setFillStrokeStyle=function(t,e){var i=t?t.getColor():[0,0,0,0];if(i=i instanceof CanvasGradient||i instanceof CanvasPattern?ar.defaultFillStyle:On.a.asArray(i).map(function(t,e){return 3!=e?t/255:t})||ar.defaultFillStyle,this.state_.fillColor&&k.a.equals(i,this.state_.fillColor)||(this.state_.fillColor=i,this.state_.changed=!0,this.styles_.push(i)),e)this.lineStringReplay.setFillStrokeStyle(null,e);else{var n=new Ar.default({color:[0,0,0,0],lineWidth:0});this.lineStringReplay.setFillStrokeStyle(null,n)}};var Nr=kr,Ur=function(t,e){this.space_=e,this.emptyBlocks_=[{x:0,y:0,width:t,height:t}],this.entries_={},this.context_=se.a.createCanvasContext2D(t,t),this.canvas_=this.context_.canvas};Ur.prototype.get=function(t){return this.entries_[t]||null},Ur.prototype.add=function(t,e,i,n,r){var o,a,s;for(a=0,s=this.emptyBlocks_.length;a<s;++a)if((o=this.emptyBlocks_[a]).width>=e+this.space_&&o.height>=i+this.space_){var l={offsetX:o.x+this.space_,offsetY:o.y+this.space_,image:this.canvas_};return this.entries_[t]=l,n.call(r,this.context_,o.x+this.space_,o.y+this.space_),this.split_(a,o,e+this.space_,i+this.space_),l}return null},Ur.prototype.split_=function(t,e,i,n){var r,o;e.width-i>e.height-n?(r={x:e.x+i,y:e.y,width:e.width-i,height:e.height},o={x:e.x,y:e.y+n,width:i,height:e.height-n},this.updateBlocks_(t,r,o)):(r={x:e.x+i,y:e.y,width:e.width-i,height:n},o={x:e.x,y:e.y+n,width:e.width,height:e.height-n},this.updateBlocks_(t,r,o))},Ur.prototype.updateBlocks_=function(t,e,i){var n=[t,1];e.width>0&&e.height>0&&n.push(e),i.width>0&&i.height>0&&n.push(i),this.emptyBlocks_.splice.apply(this.emptyBlocks_,n)};var Gr=Ur,jr=function(t){var e=t||{};this.currentSize_=void 0!==e.initialSize?e.initialSize:n.a.INITIAL_ATLAS_SIZE,this.maxSize_=void 0!==e.maxSize?e.maxSize:-1!=n.a.MAX_ATLAS_SIZE?n.a.MAX_ATLAS_SIZE:void 0!==n.a.WEBGL_MAX_TEXTURE_SIZE?n.a.WEBGL_MAX_TEXTURE_SIZE:2048,this.space_=void 0!==e.space?e.space:1,this.atlases_=[new Gr(this.currentSize_,this.space_)],this.currentHitSize_=this.currentSize_,this.hitAtlases_=[new Gr(this.currentHitSize_,this.space_)]};jr.prototype.getInfo=function(t){var e=this.getInfo_(this.atlases_,t);if(!e)return null;var i=this.getInfo_(this.hitAtlases_,t);return this.mergeInfos_(e,i)},jr.prototype.getInfo_=function(t,e){var i,n,r;for(n=0,r=t.length;n<r;++n)if(i=t[n].get(e))return i;return null},jr.prototype.mergeInfos_=function(t,e){return{offsetX:t.offsetX,offsetY:t.offsetY,image:t.image,hitImage:e.image}},jr.prototype.add=function(t,e,i,r,o,a){if(e+this.space_>this.maxSize_||i+this.space_>this.maxSize_)return null;var s=this.add_(!1,t,e,i,r,a);if(!s)return null;var l=void 0!==o?o:n.a.nullFunction,u=this.add_(!0,t,e,i,l,a);return this.mergeInfos_(s,u)},jr.prototype.add_=function(t,e,i,n,r,o){var a,s,l,u,h=t?this.hitAtlases_:this.atlases_;for(l=0,u=h.length;l<u;++l){if(s=(a=h[l]).add(e,i,n,r,o))return s;var c;s||l!==u-1||(t?(c=Math.min(2*this.currentHitSize_,this.maxSize_),this.currentHitSize_=c):(c=Math.min(2*this.currentSize_,this.maxSize_),this.currentSize_=c),a=new Gr(c,this.space_),h.push(a),++u)}return null};var Br=jr,Wr=function(t,e){mr.call(this,t,e),this.images_=[],this.textures_=[],this.measureCanvas_=se.a.createCanvasContext2D(0,0).canvas,this.state_={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:0,miterLimit:void 0,fillColor:null,font:void 0,scale:void 0},this.text_="",this.textAlign_=void 0,this.textBaseline_=void 0,this.offsetX_=void 0,this.offsetY_=void 0,this.atlases_={},this.currAtlas_=void 0,this.scale=1,this.opacity=1};n.a.inherits(Wr,mr),Wr.prototype.drawText=function(t,e){if(this.text_){var i=null,r=2,o=2;switch(t.getType()){case mt.a.POINT:case mt.a.MULTI_POINT:r=(i=t.getFlatCoordinates()).length,o=t.getStride();break;case mt.a.CIRCLE:i=t.getCenter();break;case mt.a.LINE_STRING:i=t.getFlatMidpoint();break;case mt.a.MULTI_LINE_STRING:r=(i=t.getFlatMidpoints()).length;break;case mt.a.POLYGON:i=t.getFlatInteriorPoint();break;case mt.a.MULTI_POLYGON:r=(i=t.getFlatInteriorPoints()).length}this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e);var a,s,l,u,h,c,f,p,d=this.currAtlas_,g=this.text_.split("\n"),_=this.getTextSize_(g),v=Math.round(_[0]*this.textAlign_-this.offsetX_),y=Math.round(_[1]*this.textBaseline_-this.offsetY_),m=this.state_.lineWidth/2*this.state_.scale;for(a=0,s=g.length;a<s;++a)for(h=0,c=d.height*a,l=0,u=(f=g[a].split("")).length;l<u;++l){if(p=d.atlas.getInfo(f[l])){var x,E=p.image;this.anchorX=v-h,this.anchorY=y-c,this.originX=0===l?p.offsetX-m:p.offsetX,this.originY=p.offsetY,this.height=d.height,this.width=0===l||l===f.length-1?d.width[f[l]]+m:d.width[f[l]],this.imageHeight=E.height,this.imageWidth=E.width,0===this.images_.length?this.images_.push(E):(x=this.images_[this.images_.length-1],n.a.getUid(x)!=n.a.getUid(E)&&(this.groupIndices.push(this.indices.length),this.images_.push(E))),this.drawText_(i,0,r,o)}h+=this.width}}},Wr.prototype.getTextSize_=function(t){var e=this,i=this.currAtlas_,n=t.length*i.height;return[t.map(function(t){var n,r,o=0;for(n=0,r=t.length;n<r;++n){var a=t[n];i.width[a]||e.addCharToAtlas_(a),o+=i.width[a]?i.width[a]:0}return o}).reduce(function(t,e){return Math.max(t,e)}),n]},Wr.prototype.drawText_=function(t,e,i,n){var r,o;for(r=e,o=i;r<o;r+=n)this.drawCoordinates(t,e,i,n)},Wr.prototype.addCharToAtlas_=function(t){if(1===t.length){var e=this.currAtlas_,i=this.state_,n=this.measureCanvas_.getContext("2d");n.font=i.font;var r=Math.ceil(n.measureText(t).width*i.scale);e.atlas.add(t,r,e.height,function(e,n,r){e.font=i.font,e.fillStyle=i.fillColor,e.strokeStyle=i.strokeColor,e.lineWidth=i.lineWidth,e.lineCap=i.lineCap,e.lineJoin=i.lineJoin,e.miterLimit=i.miterLimit,e.textAlign="left",e.textBaseline="top",c.a.CANVAS_LINE_DASH&&i.lineDash&&(e.setLineDash(i.lineDash),e.lineDashOffset=i.lineDashOffset),1!==i.scale&&e.setTransform(i.scale,0,0,i.scale,0,0),i.strokeColor&&e.strokeText(t,n,r),i.fillColor&&e.fillText(t,n,r)})&&(e.width[t]=r)}},Wr.prototype.finish=function(t){var e=t.getGL();this.groupIndices.push(this.indices.length),this.hitDetectionGroupIndices=this.groupIndices,this.verticesBuffer=new lr(this.vertices),this.indicesBuffer=new lr(this.indices),this.createTextures(this.textures_,this.images_,{},e),this.state_={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:0,miterLimit:void 0,fillColor:null,font:void 0,scale:void 0},this.text_="",this.textAlign_=void 0,this.textBaseline_=void 0,this.offsetX_=void 0,this.offsetY_=void 0,this.images_=null,this.atlases_={},this.currAtlas_=void 0,mr.prototype.finish.call(this,t)},Wr.prototype.setTextStyle=function(t){var e=this.state_,i=t.getFill(),n=t.getStroke();if(t&&t.getText()&&(i||n)){if(i){var r=i.getColor();e.fillColor=Ai.a.asColorLike(r||ar.defaultFillStyle)}else e.fillColor=null;if(n){var o=n.getColor();e.strokeColor=Ai.a.asColorLike(o||ar.defaultStrokeStyle),e.lineWidth=n.getWidth()||ar.defaultLineWidth,e.lineCap=n.getLineCap()||ar.defaultLineCap,e.lineDashOffset=n.getLineDashOffset()||ar.defaultLineDashOffset,e.lineJoin=n.getLineJoin()||ar.defaultLineJoin,e.miterLimit=n.getMiterLimit()||ar.defaultMiterLimit;var a=n.getLineDash();e.lineDash=a?a.slice():ar.defaultLineDash}else e.strokeColor=null,e.lineWidth=0;e.font=t.getFont()||ar.defaultFont,e.scale=t.getScale()||1,this.text_=t.getText();var s=Tn.TEXT_ALIGN[t.getTextAlign()],l=Tn.TEXT_ALIGN[t.getTextBaseline()];this.textAlign_=void 0===s?ar.defaultTextAlign:s,this.textBaseline_=void 0===l?ar.defaultTextBaseline:l,this.offsetX_=t.getOffsetX()||0,this.offsetY_=t.getOffsetY()||0,this.rotateWithView=!!t.getRotateWithView(),this.rotation=t.getRotation()||0,this.currAtlas_=this.getAtlas_(e)}else this.text_=""},Wr.prototype.getAtlas_=function(t){var e,i=[];for(e in t)(t[e]||0===t[e])&&(Array.isArray(t[e])?i=i.concat(t[e]):i.push(t[e]));var n=this.calculateHash_(i);if(!this.atlases_[n]){var r=this.measureCanvas_.getContext("2d");r.font=t.font;var o=Math.ceil((1.5*r.measureText("M").width+t.lineWidth/2)*t.scale);this.atlases_[n]={atlas:new Br({space:t.lineWidth+1}),width:{},height:o}}return this.atlases_[n]},Wr.prototype.calculateHash_=function(t){var e,i,n="";for(e=0,i=t.length;e<i;++e)n+=t[e];return n},Wr.prototype.getTextures=function(t){return this.textures_},Wr.prototype.getHitDetectionTextures=function(){return this.textures_};var zr=Wr,Xr=function(t,e,i){nn.call(this),this.maxExtent_=e,this.tolerance_=t,this.renderBuffer_=i,this.replaysByZIndex_={}};n.a.inherits(Xr,nn),Xr.prototype.addDeclutter=function(t,e){},Xr.prototype.getDeleteResourcesFunction=function(t){var e,i=[];for(e in this.replaysByZIndex_){var n,r=this.replaysByZIndex_[e];for(n in r)i.push(r[n].getDeleteResourcesFunction(t))}return function(){for(var t,e=i.length,n=0;n<e;n++)t=i[n].apply(this,arguments);return t}},Xr.prototype.finish=function(t){var e;for(e in this.replaysByZIndex_){var i,n=this.replaysByZIndex_[e];for(i in n)n[i].finish(t)}},Xr.prototype.getReplay=function(t,e){var i=void 0!==t?t.toString():"0",n=this.replaysByZIndex_[i];void 0===n&&(n={},this.replaysByZIndex_[i]=n);var r=n[e];return void 0===r&&(r=new(0,Xr.BATCH_CONSTRUCTORS_[e])(this.tolerance_,this.maxExtent_),n[e]=r),r},Xr.prototype.isEmpty=function(){return tt.a.isEmpty(this.replaysByZIndex_)},Xr.prototype.replay=function(t,e,i,n,r,o,a,s){var l,u,h,c,f,p,d=Object.keys(this.replaysByZIndex_).map(Number);for(d.sort(k.a.numberSafeCompareFunction),l=0,u=d.length;l<u;++l)for(f=this.replaysByZIndex_[d[l].toString()],h=0,c=Tn.ORDER.length;h<c;++h)void 0!==(p=f[Tn.ORDER[h]])&&p.replay(t,e,i,n,r,o,a,s,void 0,!1)},Xr.prototype.replayHitDetection_=function(t,e,i,n,r,o,a,s,l,u,h){var c,f,p,d,g,_,v=Object.keys(this.replaysByZIndex_).map(Number);for(v.sort(function(t,e){return e-t}),c=0,f=v.length;c<f;++c)for(d=this.replaysByZIndex_[v[c].toString()],p=Tn.ORDER.length-1;p>=0;--p)if(void 0!==(g=d[Tn.ORDER[p]])&&(_=g.replay(t,e,i,n,r,o,a,s,l,u,h)))return _},Xr.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,o,a,s,l,u){var h,c=e.getGL();return c.bindFramebuffer(c.FRAMEBUFFER,e.getHitDetectionFramebuffer()),void 0!==this.renderBuffer_&&(h=yt.a.buffer(yt.a.createOrUpdateFromCoordinate(t),n*this.renderBuffer_)),this.replayHitDetection_(e,t,n,r,Xr.HIT_DETECTION_SIZE_,a,s,l,function(t){var e=new Uint8Array(4);if(c.readPixels(0,0,1,1,c.RGBA,c.UNSIGNED_BYTE,e),e[3]>0){var i=u(t);if(i)return i}},!0,h)},Xr.prototype.hasFeatureAtCoordinate=function(t,e,i,n,r,o,a,s,l){var u=e.getGL();return u.bindFramebuffer(u.FRAMEBUFFER,e.getHitDetectionFramebuffer()),void 0!==this.replayHitDetection_(e,t,n,r,Xr.HIT_DETECTION_SIZE_,a,s,l,function(t){var e=new Uint8Array(4);return u.readPixels(0,0,1,1,u.RGBA,u.UNSIGNED_BYTE,e),e[3]>0},!1)},Xr.HIT_DETECTION_SIZE_=[1,1],Xr.BATCH_CONSTRUCTORS_={Circle:hr,Image:Er,LineString:br,Polygon:Nr,Text:zr};var Vr=Xr,Yr=function(t,e,i,n,r,o,a){Fi.call(this),this.context_=t,this.center_=e,this.extent_=o,this.pixelRatio_=a,this.size_=r,this.rotation_=n,this.resolution_=i,this.imageStyle_=null,this.fillStyle_=null,this.strokeStyle_=null,this.textStyle_=null};n.a.inherits(Yr,Fi),Yr.prototype.drawText_=function(t,e){var i=this.context_,n=t.getReplay(0,rn.TEXT);n.setTextStyle(this.textStyle_),n.drawText(e,null),n.finish(i),n.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),n.getDeleteResourcesFunction(i)()},Yr.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},Yr.prototype.drawGeometry=function(t){switch(t.getType()){case mt.a.POINT:this.drawPoint(t,null);break;case mt.a.LINE_STRING:this.drawLineString(t,null);break;case mt.a.POLYGON:this.drawPolygon(t,null);break;case mt.a.MULTI_POINT:this.drawMultiPoint(t,null);break;case mt.a.MULTI_LINE_STRING:this.drawMultiLineString(t,null);break;case mt.a.MULTI_POLYGON:this.drawMultiPolygon(t,null);break;case mt.a.GEOMETRY_COLLECTION:this.drawGeometryCollection(t,null);break;case mt.a.CIRCLE:this.drawCircle(t,null)}},Yr.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&yt.a.intersects(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},Yr.prototype.drawGeometryCollection=function(t,e){var i,n,r=t.getGeometriesArray();for(i=0,n=r.length;i<n;++i)this.drawGeometry(r[i])},Yr.prototype.drawPoint=function(t,e){var i=this.context_,n=new Vr(1,this.extent_),r=n.getReplay(0,rn.IMAGE);r.setImageStyle(this.imageStyle_),r.drawPoint(t,e),r.finish(i),r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),r.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(n,t)},Yr.prototype.drawMultiPoint=function(t,e){var i=this.context_,n=new Vr(1,this.extent_),r=n.getReplay(0,rn.IMAGE);r.setImageStyle(this.imageStyle_),r.drawMultiPoint(t,e),r.finish(i),r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),r.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(n,t)},Yr.prototype.drawLineString=function(t,e){var i=this.context_,n=new Vr(1,this.extent_),r=n.getReplay(0,rn.LINE_STRING);r.setFillStrokeStyle(null,this.strokeStyle_),r.drawLineString(t,e),r.finish(i),r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),r.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(n,t)},Yr.prototype.drawMultiLineString=function(t,e){var i=this.context_,n=new Vr(1,this.extent_),r=n.getReplay(0,rn.LINE_STRING);r.setFillStrokeStyle(null,this.strokeStyle_),r.drawMultiLineString(t,e),r.finish(i),r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),r.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(n,t)},Yr.prototype.drawPolygon=function(t,e){var i=this.context_,n=new Vr(1,this.extent_),r=n.getReplay(0,rn.POLYGON);r.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_),r.drawPolygon(t,e),r.finish(i),r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),r.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(n,t)},Yr.prototype.drawMultiPolygon=function(t,e){var i=this.context_,n=new Vr(1,this.extent_),r=n.getReplay(0,rn.POLYGON);r.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_),r.drawMultiPolygon(t,e),r.finish(i),r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),r.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(n,t)},Yr.prototype.drawCircle=function(t,e){var i=this.context_,n=new Vr(1,this.extent_),r=n.getReplay(0,rn.CIRCLE);r.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_),r.drawCircle(t,e),r.finish(i),r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),r.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(n,t)},Yr.prototype.setImageStyle=function(t){this.imageStyle_=t},Yr.prototype.setFillStrokeStyle=function(t,e){this.fillStyle_=t,this.strokeStyle_=e},Yr.prototype.setTextStyle=function(t){this.textStyle_=t};var Hr=Yr,Kr={};Kr.fragment=new Zn(n.a.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform float u_opacity;\nuniform sampler2D u_texture;\n\nvoid main(void) {\n vec4 texColor = texture2D(u_texture, v_texCoord);\n gl_FragColor.rgb = texColor.rgb;\n gl_FragColor.a = texColor.a * u_opacity;\n}\n":"precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}"),Kr.vertex=new Qn(n.a.DEBUG_WEBGL?"varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\n\nuniform mat4 u_texCoordMatrix;\nuniform mat4 u_projectionMatrix;\n\nvoid main(void) {\n gl_Position = u_projectionMatrix * vec4(a_position, 0., 1.);\n v_texCoord = (u_texCoordMatrix * vec4(a_texCoord, 0., 1.)).st;\n}\n\n\n":"varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}");var qr=Kr,Zr=function(t,e){this.u_texCoordMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_texCoordMatrix":"d"),this.u_projectionMatrix=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_projectionMatrix":"e"),this.u_opacity=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_opacity":"f"),this.u_texture=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_texture":"g"),this.a_position=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_position":"b"),this.a_texCoord=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_texCoord":"c")},Jr=function(t,e){Ui.call(this,e),this.mapRenderer=t,this.arrayBuffer_=new lr([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]),this.texture=null,this.framebuffer=null,this.framebufferDimension=void 0,this.texCoordMatrix=wt.a.create(),this.projectionMatrix=wt.a.create(),this.tmpMat4_=ir.create(),this.defaultLocations_=null};n.a.inherits(Jr,Ui),Jr.prototype.bindFramebuffer=function(t,e){var i=this.mapRenderer.getGL();if(void 0===this.framebufferDimension||this.framebufferDimension!=e){var n=function(t,e,i){t.isContextLost()||(t.deleteFramebuffer(e),t.deleteTexture(i))}.bind(null,i,this.framebuffer,this.texture);t.postRenderFunctions.push(n);var r=vr.createEmptyTexture(i,e,e),o=i.createFramebuffer();i.bindFramebuffer(Yn.a.FRAMEBUFFER,o),i.framebufferTexture2D(Yn.a.FRAMEBUFFER,Yn.a.COLOR_ATTACHMENT0,Yn.a.TEXTURE_2D,r,0),this.texture=r,this.framebuffer=o,this.framebufferDimension=e}else i.bindFramebuffer(Yn.a.FRAMEBUFFER,this.framebuffer)},Jr.prototype.composeFrame=function(t,e,i){this.dispatchComposeEvent_(Ce,i,t),i.bindBuffer(Yn.a.ARRAY_BUFFER,this.arrayBuffer_);var n,r=i.getGL(),o=qr.fragment,a=qr.vertex,s=i.getProgram(o,a);this.defaultLocations_?n=this.defaultLocations_:(n=new Zr(r,s),this.defaultLocations_=n),i.useProgram(s)&&(r.enableVertexAttribArray(n.a_position),r.vertexAttribPointer(n.a_position,2,Yn.a.FLOAT,!1,16,0),r.enableVertexAttribArray(n.a_texCoord),r.vertexAttribPointer(n.a_texCoord,2,Yn.a.FLOAT,!1,16,8),r.uniform1i(n.u_texture,0)),r.uniformMatrix4fv(n.u_texCoordMatrix,!1,ir.fromTransform(this.tmpMat4_,this.getTexCoordMatrix())),r.uniformMatrix4fv(n.u_projectionMatrix,!1,ir.fromTransform(this.tmpMat4_,this.getProjectionMatrix())),r.uniform1f(n.u_opacity,e.opacity),r.bindTexture(Yn.a.TEXTURE_2D,this.getTexture()),r.drawArrays(Yn.a.TRIANGLE_STRIP,0,4),this.dispatchComposeEvent_(Te,i,t)},Jr.prototype.dispatchComposeEvent_=function(t,e,i){var n=this.getLayer();if(n.hasListener(t)){var r=i.viewState,o=r.resolution,a=i.pixelRatio,s=i.extent,l=r.center,u=r.rotation,h=i.size,c=new Hr(e,l,o,u,h,s,a),f=new Li(t,c,i,null,e);n.dispatchEvent(f)}},Jr.prototype.getTexCoordMatrix=function(){return this.texCoordMatrix},Jr.prototype.getTexture=function(){return this.texture},Jr.prototype.getProjectionMatrix=function(){return this.projectionMatrix},Jr.prototype.handleWebGLContextLost=function(){this.texture=null,this.framebuffer=null,this.framebufferDimension=void 0},Jr.prototype.prepareFrame=function(t,e,i){},Jr.prototype.forEachLayerAtPixel=function(t,e,i,n){};var Qr=Jr,$r=function(t,e){Qr.call(this,t,e),this.image_=null,this.hitCanvasContext_=null,this.hitTransformationMatrix_=null};n.a.inherits($r,Qr),$r.handles=function(t,e){return t===de&&e.getType()===Ti},$r.create=function(t,e){return new $r(t,e)},$r.prototype.createTexture_=function(t){var e=t.getImage(),i=this.mapRenderer.getGL();return vr.createTexture(i,e,Yn.a.CLAMP_TO_EDGE,Yn.a.CLAMP_TO_EDGE)},$r.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r){var o=this.getLayer(),a=o.getSource(),s=e.viewState.resolution,l=e.viewState.rotation,u=e.skippedFeatureUids;return a.forEachFeatureAtCoordinate(t,s,l,i,u,function(t){return n.call(r,t,o)})},$r.prototype.prepareFrame=function(t,e,i){var r=this.mapRenderer.getGL(),o=t.pixelRatio,a=t.viewState,s=a.center,l=a.resolution,u=a.rotation,h=this.image_,c=this.texture,f=this.getLayer().getSource(),p=t.viewHints,d=t.extent;if(void 0!==e.extent&&(d=yt.a.getIntersection(d,e.extent)),!p[ut]&&!p[ht]&&!yt.a.isEmpty(d)){var g=a.projection;if(!n.a.ENABLE_RASTER_REPROJECTION){var _=f.getProjection();_&&(g=_)}var v=f.getImage(d,l,o,g);if(v&&this.loadImage(v)&&(h=v,c=this.createTexture_(v),this.texture)){var y=function(t,e){t.isContextLost()||t.deleteTexture(e)}.bind(null,r,this.texture);t.postRenderFunctions.push(y)}}if(h){var m=this.mapRenderer.getContext().getCanvas();this.updateProjectionMatrix_(m.width,m.height,o,s,l,u,h.getExtent()),this.hitTransformationMatrix_=null;var x=this.texCoordMatrix;wt.a.reset(x),wt.a.scale(x,1,-1),wt.a.translate(x,0,-1),this.image_=h,this.texture=c,this.updateLogos(t,f)}return!!h},$r.prototype.updateProjectionMatrix_=function(t,e,i,n,r,o,a){var s=t*r,l=e*r,u=this.projectionMatrix;wt.a.reset(u),wt.a.scale(u,2*i/s,2*i/l),wt.a.rotate(u,-o),wt.a.translate(u,a[0]-n[0],a[1]-n[1]),wt.a.scale(u,(a[2]-a[0])/2,(a[3]-a[1])/2),wt.a.translate(u,1,1)},$r.prototype.hasFeatureAtCoordinate=function(t,e){return void 0!==this.forEachFeatureAtCoordinate(t,e,0,Ct.TRUE,this)},$r.prototype.forEachLayerAtPixel=function(t,e,i,r){if(this.image_&&this.image_.getImage()){if(this.getLayer().getSource().forEachFeatureAtCoordinate!==n.a.nullFunction){var o=wt.a.apply(e.pixelToCoordinateTransform,t.slice());return this.forEachFeatureAtCoordinate(o,e,0,Ct.TRUE,this)?i.call(r,this.getLayer(),null):void 0}var a=[this.image_.getImage().width,this.image_.getImage().height];this.hitTransformationMatrix_||(this.hitTransformationMatrix_=this.getHitTransformationMatrix_(e.size,a));var s=wt.a.apply(this.hitTransformationMatrix_,t.slice());if(!(s[0]<0||s[0]>a[0]||s[1]<0||s[1]>a[1])){this.hitCanvasContext_||(this.hitCanvasContext_=se.a.createCanvasContext2D(1,1)),this.hitCanvasContext_.clearRect(0,0,1,1),this.hitCanvasContext_.drawImage(this.image_.getImage(),s[0],s[1],1,1,0,0,1,1);var l=this.hitCanvasContext_.getImageData(0,0,1,1).data;return l[3]>0?i.call(r,this.getLayer(),l):void 0}}},$r.prototype.getHitTransformationMatrix_=function(t,e){var i=wt.a.create();wt.a.translate(i,-1,-1),wt.a.scale(i,2/t[0],2/t[1]),wt.a.translate(i,0,t[1]),wt.a.scale(i,1,-1);var n=wt.a.invert(this.projectionMatrix.slice()),r=wt.a.create();return wt.a.translate(r,0,e[1]),wt.a.scale(r,1,-1),wt.a.scale(r,e[0]/2,e[1]/2),wt.a.translate(r,1,1),wt.a.multiply(r,n),wt.a.multiply(r,i),r};var to=$r,eo=i(80),io=function(t,e){Hi.call(this,t,e),this.canvas_=document.createElement("CANVAS"),this.canvas_.style.width="100%",this.canvas_.style.height="100%",this.canvas_.style.display="block",this.canvas_.className=xe.a.CLASS_UNSELECTABLE,t.insertBefore(this.canvas_,t.childNodes[0]||null),this.clipTileCanvasWidth_=0,this.clipTileCanvasHeight_=0,this.clipTileContext_=se.a.createCanvasContext2D(),this.renderedVisible_=!0,this.gl_=Yn.a.getContext(this.canvas_,{antialias:!0,depth:!0,failIfMajorPerformanceCaveat:!0,preserveDrawingBuffer:!1,stencil:!0}),this.context_=new vr(this.canvas_,this.gl_),_.a.listen(this.canvas_,dr,this.handleWebGLContextLost,this),_.a.listen(this.canvas_,gr,this.handleWebGLContextRestored,this),this.textureCache_=new eo.a,this.focus_=null,this.tileTextureQueue_=new it(function(t){var e=t[1],i=t[2],n=e[0]-this.focus_[0],r=e[1]-this.focus_[1];return 65536*Math.log(i)+Math.sqrt(n*n+r*r)/i}.bind(this),function(t){return t[0].getKey()}),this.loadNextTileTexture_=function(t,e){if(!this.tileTextureQueue_.isEmpty()){this.tileTextureQueue_.reprioritize();var i=this.tileTextureQueue_.dequeue(),n=i[0],r=i[3],o=i[4];this.bindTileTexture(n,r,o,Yn.a.LINEAR,Yn.a.LINEAR)}return!1}.bind(this),this.textureCacheFrameMarkerCount_=0,this.initializeGL_()};n.a.inherits(io,Hi),io.handles=function(t){return c.a.WEBGL&&t===de},io.create=function(t,e){return new io(t,e)},io.prototype.bindTileTexture=function(t,e,i,n,r){var o=this.getGL(),a=t.getKey();if(this.textureCache_.containsKey(a)){var s=this.textureCache_.get(a);o.bindTexture(Yn.a.TEXTURE_2D,s.texture),s.magFilter!=n&&(o.texParameteri(Yn.a.TEXTURE_2D,Yn.a.TEXTURE_MAG_FILTER,n),s.magFilter=n),s.minFilter!=r&&(o.texParameteri(Yn.a.TEXTURE_2D,Yn.a.TEXTURE_MIN_FILTER,r),s.minFilter=r)}else{var l=o.createTexture();if(o.bindTexture(Yn.a.TEXTURE_2D,l),i>0){var u=this.clipTileContext_.canvas,h=this.clipTileContext_;this.clipTileCanvasWidth_!==e[0]||this.clipTileCanvasHeight_!==e[1]?(u.width=e[0],u.height=e[1],this.clipTileCanvasWidth_=e[0],this.clipTileCanvasHeight_=e[1]):h.clearRect(0,0,e[0],e[1]),h.drawImage(t.getImage(),i,i,e[0],e[1],0,0,e[0],e[1]),o.texImage2D(Yn.a.TEXTURE_2D,0,Yn.a.RGBA,Yn.a.RGBA,Yn.a.UNSIGNED_BYTE,u)}else o.texImage2D(Yn.a.TEXTURE_2D,0,Yn.a.RGBA,Yn.a.RGBA,Yn.a.UNSIGNED_BYTE,t.getImage());o.texParameteri(Yn.a.TEXTURE_2D,Yn.a.TEXTURE_MAG_FILTER,n),o.texParameteri(Yn.a.TEXTURE_2D,Yn.a.TEXTURE_MIN_FILTER,r),o.texParameteri(Yn.a.TEXTURE_2D,Yn.a.TEXTURE_WRAP_S,Yn.a.CLAMP_TO_EDGE),o.texParameteri(Yn.a.TEXTURE_2D,Yn.a.TEXTURE_WRAP_T,Yn.a.CLAMP_TO_EDGE),this.textureCache_.set(a,{texture:l,magFilter:n,minFilter:r})}},io.prototype.dispatchComposeEvent_=function(t,e){var i=this.getMap();if(i.hasListener(t)){var n=this.context_,r=e.extent,o=e.size,a=e.viewState,s=e.pixelRatio,l=a.resolution,u=a.center,h=a.rotation,c=new Hr(n,u,l,h,o,r,s),f=new Li(t,c,e,null,n);i.dispatchEvent(f)}},io.prototype.disposeInternal=function(){var t=this.getGL();t.isContextLost()||this.textureCache_.forEach(function(e){e&&t.deleteTexture(e.texture)}),this.context_.dispose(),Hi.prototype.disposeInternal.call(this)},io.prototype.expireCache_=function(t,e){for(var i,r=this.getGL();this.textureCache_.getCount()-this.textureCacheFrameMarkerCount_>n.a.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK;){if(i=this.textureCache_.peekLast())r.deleteTexture(i.texture);else{if(+this.textureCache_.peekLastKey()==e.index)break;--this.textureCacheFrameMarkerCount_}this.textureCache_.pop()}},io.prototype.getContext=function(){return this.context_},io.prototype.getGL=function(){return this.gl_},io.prototype.getTileTextureQueue=function(){return this.tileTextureQueue_},io.prototype.getType=function(){return de},io.prototype.handleWebGLContextLost=function(t){t.preventDefault(),this.textureCache_.clear(),this.textureCacheFrameMarkerCount_=0;var e=this.getLayerRenderers();for(var i in e)e[i].handleWebGLContextLost()},io.prototype.handleWebGLContextRestored=function(){this.initializeGL_(),this.getMap().render()},io.prototype.initializeGL_=function(){var t=this.gl_;t.activeTexture(Yn.a.TEXTURE0),t.blendFuncSeparate(Yn.a.SRC_ALPHA,Yn.a.ONE_MINUS_SRC_ALPHA,Yn.a.ONE,Yn.a.ONE_MINUS_SRC_ALPHA),t.disable(Yn.a.CULL_FACE),t.disable(Yn.a.DEPTH_TEST),t.disable(Yn.a.SCISSOR_TEST),t.disable(Yn.a.STENCIL_TEST)},io.prototype.isTileTextureLoaded=function(t){return this.textureCache_.containsKey(t.getKey())},io.prototype.renderFrame=function(t){var e=this.getContext(),i=this.getGL();if(i.isContextLost())return!1;if(!t)return this.renderedVisible_&&(this.canvas_.style.display="none",this.renderedVisible_=!1),!1;this.focus_=t.focus,this.textureCache_.set((-t.index).toString(),null),++this.textureCacheFrameMarkerCount_,this.dispatchComposeEvent_(Ce,t);var r=[],o=t.layerStatesArray;k.a.stableSort(o,Hi.sortByZIndex);var a,s,l,u=t.viewState.resolution;for(a=0,s=o.length;a<s;++a)l=o[a],we.visibleAtResolution(l,u)&&l.sourceState==Ie.a.READY&&this.getLayerRenderer(l.layer).prepareFrame(t,l,e)&&r.push(l);var h=t.size[0]*t.pixelRatio,c=t.size[1]*t.pixelRatio;for(this.canvas_.width==h&&this.canvas_.height==c||(this.canvas_.width=h,this.canvas_.height=c),i.bindFramebuffer(Yn.a.FRAMEBUFFER,null),i.clearColor(0,0,0,0),i.clear(Yn.a.COLOR_BUFFER_BIT),i.enable(Yn.a.BLEND),i.viewport(0,0,this.canvas_.width,this.canvas_.height),a=0,s=r.length;a<s;++a)l=r[a],this.getLayerRenderer(l.layer).composeFrame(t,l,e);this.renderedVisible_||(this.canvas_.style.display="",this.renderedVisible_=!0),this.calculateMatrices2D(t),this.textureCache_.getCount()-this.textureCacheFrameMarkerCount_>n.a.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK&&t.postRenderFunctions.push(this.expireCache_.bind(this)),this.tileTextureQueue_.isEmpty()||(t.postRenderFunctions.push(this.loadNextTileTexture_),t.animate=!0),this.dispatchComposeEvent_(Te,t),this.scheduleRemoveUnusedLayerRenderers(t),this.scheduleExpireIconCache(t)},io.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,r,o,a){var s;if(this.getGL().isContextLost())return!1;var l,u=e.viewState,h=e.layerStatesArray;for(l=h.length-1;l>=0;--l){var c=h[l],f=c.layer;if(we.visibleAtResolution(c,u.resolution)&&o.call(a,f)&&(s=this.getLayerRenderer(f).forEachFeatureAtCoordinate(t,e,i,n,r)))return s}},io.prototype.hasFeatureAtCoordinate=function(t,e,i,n,r){var o=!1;if(this.getGL().isContextLost())return!1;var a,s=e.viewState,l=e.layerStatesArray;for(a=l.length-1;a>=0;--a){var u=l[a],h=u.layer;if(we.visibleAtResolution(u,s.resolution)&&n.call(r,h)&&(o=this.getLayerRenderer(h).hasFeatureAtCoordinate(t,e)))return!0}return o},io.prototype.forEachLayerAtPixel=function(t,e,i,n,r,o){if(this.getGL().isContextLost())return!1;var a,s,l=e.viewState,u=e.layerStatesArray;for(s=u.length-1;s>=0;--s){var h=u[s],c=h.layer;if(we.visibleAtResolution(h,l.resolution)&&r.call(n,c)&&(a=this.getLayerRenderer(c).forEachLayerAtPixel(t,e,i,n)))return a}};var no=io,ro={};ro.fragment=new Zn(n.a.DEBUG_WEBGL?"precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform sampler2D u_texture;\n\nvoid main(void) {\n gl_FragColor = texture2D(u_texture, v_texCoord);\n}\n":"precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}"),ro.vertex=new Qn(n.a.DEBUG_WEBGL?"varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nuniform vec4 u_tileOffset;\n\nvoid main(void) {\n gl_Position = vec4(a_position * u_tileOffset.xy + u_tileOffset.zw, 0., 1.);\n v_texCoord = a_texCoord;\n}\n\n\n":"varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}");var oo=ro,ao=function(t,e){this.u_tileOffset=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_tileOffset":"d"),this.u_texture=t.getUniformLocation(e,n.a.DEBUG_WEBGL?"u_texture":"e"),this.a_position=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_position":"b"),this.a_texCoord=t.getAttribLocation(e,n.a.DEBUG_WEBGL?"a_texCoord":"c")},so=function(t,e){Qr.call(this,t,e),this.fragmentShader_=oo.fragment,this.vertexShader_=oo.vertex,this.locations_=null,this.renderArrayBuffer_=new lr([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]),this.renderedTileRange_=null,this.renderedFramebufferExtent_=null,this.renderedRevision_=-1,this.tmpSize_=[0,0]};n.a.inherits(so,Qr),so.handles=function(t,e){return t===de&&e.getType()===Ci},so.create=function(t,e){return new so(t,e)},so.prototype.disposeInternal=function(){this.mapRenderer.getContext().deleteBuffer(this.renderArrayBuffer_),Qr.prototype.disposeInternal.call(this)},so.prototype.createLoadedTileFinder=function(t,e,i){var n=this.mapRenderer;return function(r,o){return t.forEachLoadedTile(e,r,o,function(t){var e=n.isTileTextureLoaded(t);return e&&(i[r]||(i[r]={}),i[r][t.tileCoord.toString()]=t),e})}},so.prototype.handleWebGLContextLost=function(){Qr.prototype.handleWebGLContextLost.call(this),this.locations_=null},so.prototype.prepareFrame=function(t,e,i){var n,r=this.mapRenderer,o=i.getGL(),a=t.viewState,s=a.projection,l=this.getLayer(),u=l.getSource(),h=u.getTileGridForProjection(s),c=h.getZForResolution(a.resolution),f=h.getResolution(c),p=u.getTilePixelSize(c,t.pixelRatio,s),d=p[0]/ge.a.toSize(h.getTileSize(c),this.tmpSize_)[0],g=f/d,_=u.getTilePixelRatio(d)*u.getGutter(s),v=a.center,y=t.extent,m=h.getTileRangeForExtentAndZ(y,c);if(this.renderedTileRange_&&this.renderedTileRange_.equals(m)&&this.renderedRevision_==u.getRevision())n=this.renderedFramebufferExtent_;else{var x=m.getSize(),E=Math.max(x[0]*p[0],x[1]*p[1]),S=ot.a.roundUpToPowerOfTwo(E),T=g*S,C=h.getOrigin(c),R=C[0]+m.minX*p[0]*g,I=C[1]+m.minY*p[1]*g;n=[R,I,R+T,I+T],this.bindFramebuffer(t,S),o.viewport(0,0,S,S),o.clearColor(0,0,0,0),o.clear(Yn.a.COLOR_BUFFER_BIT),o.disable(Yn.a.BLEND);var b=i.getProgram(this.fragmentShader_,this.vertexShader_);i.useProgram(b),this.locations_||(this.locations_=new ao(o,b)),i.bindBuffer(Yn.a.ARRAY_BUFFER,this.renderArrayBuffer_),o.enableVertexAttribArray(this.locations_.a_position),o.vertexAttribPointer(this.locations_.a_position,2,Yn.a.FLOAT,!1,16,0),o.enableVertexAttribArray(this.locations_.a_texCoord),o.vertexAttribPointer(this.locations_.a_texCoord,2,Yn.a.FLOAT,!1,16,8),o.uniform1i(this.locations_.u_texture,0);var w={};w[c]={};var L,O,A,P,F,M,D=this.createLoadedTileFinder(u,s,w),N=l.getUseInterimTilesOnError(),U=!0,G=yt.a.createEmpty(),j=new Zi.a(0,0,0,0);for(P=m.minX;P<=m.maxX;++P)for(F=m.minY;F<=m.maxY;++F)if(O=u.getTile(c,P,F,d,s),void 0===e.extent||(M=h.getTileCoordExtent(O.tileCoord,G),yt.a.intersects(M,e.extent))){if((A=O.getState())==Q.a.LOADED||A==Q.a.EMPTY||A==Q.a.ERROR&&!N||(O=O.getInterimTile()),(A=O.getState())==Q.a.LOADED){if(r.isTileTextureLoaded(O)){w[c][O.tileCoord.toString()]=O;continue}}else if(A==Q.a.EMPTY||A==Q.a.ERROR&&!N)continue;U=!1,h.forEachTileCoordParentTileRange(O.tileCoord,D,null,j,G)||(L=h.getTileCoordChildTileRange(O.tileCoord,j,G))&&D(c+1,L)}var B=Object.keys(w).map(Number);B.sort(k.a.numberSafeCompareFunction);var W,z,X,V,Y=new Float32Array(4);for(W=0,z=B.length;W<z;++W)for(X in V=w[B[W]])O=V[X],M=h.getTileCoordExtent(O.tileCoord,G),Y[0]=2*(M[2]-M[0])/T,Y[1]=2*(M[3]-M[1])/T,Y[2]=2*(M[0]-n[0])/T-1,Y[3]=2*(M[1]-n[1])/T-1,o.uniform4fv(this.locations_.u_tileOffset,Y),r.bindTileTexture(O,p,_*d,Yn.a.LINEAR,Yn.a.LINEAR),o.drawArrays(Yn.a.TRIANGLE_STRIP,0,4);U?(this.renderedTileRange_=m,this.renderedFramebufferExtent_=n,this.renderedRevision_=u.getRevision()):(this.renderedTileRange_=null,this.renderedFramebufferExtent_=null,this.renderedRevision_=-1,t.animate=!0)}this.updateUsedTiles(t.usedTiles,u,c,m);var H=r.getTileTextureQueue();this.manageTilePyramid(t,u,h,d,s,y,c,l.getPreload(),function(t){t.getState()!=Q.a.LOADED||r.isTileTextureLoaded(t)||H.isKeyQueued(t.getKey())||H.enqueue([t,h.getTileCoordCenter(t.tileCoord),h.getResolution(t.tileCoord[0]),p,_*d])},this),this.scheduleExpireCache(t,u),this.updateLogos(t,u);var K=this.texCoordMatrix;return wt.a.reset(K),wt.a.translate(K,(Math.round(v[0]/f)*f-n[0])/(n[2]-n[0]),(Math.round(v[1]/f)*f-n[1])/(n[3]-n[1])),0!==a.rotation&&wt.a.rotate(K,a.rotation),wt.a.scale(K,t.size[0]*a.resolution/(n[2]-n[0]),t.size[1]*a.resolution/(n[3]-n[1])),wt.a.translate(K,-.5,-.5),!0},so.prototype.forEachLayerAtPixel=function(t,e,i,n){if(this.framebuffer){var r=[t[0]/e.size[0],(e.size[1]-t[1])/e.size[1]],o=wt.a.apply(this.texCoordMatrix,r.slice()),a=[o[0]*this.framebufferDimension,o[1]*this.framebufferDimension],s=this.mapRenderer.getContext().getGL();s.bindFramebuffer(s.FRAMEBUFFER,this.framebuffer);var l=new Uint8Array(4);return s.readPixels(a[0],a[1],1,1,s.RGBA,s.UNSIGNED_BYTE,l),l[3]>0?i.call(n,this.getLayer(),l):void 0}};var lo=so,uo=function(t,e){Qr.call(this,t,e),this.dirty_=!1,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=yt.a.createEmpty(),this.renderedRenderOrder_=null,this.replayGroup_=null,this.layerState_=null};n.a.inherits(uo,Qr),uo.handles=function(t,e){return t===de&&e.getType()===Ii},uo.create=function(t,e){return new uo(t,e)},uo.prototype.composeFrame=function(t,e,i){this.layerState_=e;var n=t.viewState,r=this.replayGroup_,o=t.size,a=t.pixelRatio,s=this.mapRenderer.getGL();r&&!r.isEmpty()&&(s.enable(s.SCISSOR_TEST),s.scissor(0,0,o[0]*a,o[1]*a),r.replay(i,n.center,n.resolution,n.rotation,o,a,e.opacity,e.managed?t.skippedFeatureUids:{}),s.disable(s.SCISSOR_TEST))},uo.prototype.disposeInternal=function(){var t=this.replayGroup_;if(t){var e=this.mapRenderer.getContext();t.getDeleteResourcesFunction(e)(),this.replayGroup_=null}Qr.prototype.disposeInternal.call(this)},uo.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,o){if(this.replayGroup_&&this.layerState_){var a=this.mapRenderer.getContext(),s=e.viewState,l=this.getLayer(),u=this.layerState_,h={};return this.replayGroup_.forEachFeatureAtCoordinate(t,a,s.center,s.resolution,s.rotation,e.size,e.pixelRatio,u.opacity,{},function(t){var e=n.a.getUid(t).toString();if(!(e in h))return h[e]=!0,r.call(o,t,l)})}},uo.prototype.hasFeatureAtCoordinate=function(t,e){if(this.replayGroup_&&this.layerState_){var i=this.mapRenderer.getContext(),n=e.viewState,r=this.layerState_;return this.replayGroup_.hasFeatureAtCoordinate(t,i,n.center,n.resolution,n.rotation,e.size,e.pixelRatio,r.opacity,e.skippedFeatureUids)}return!1},uo.prototype.forEachLayerAtPixel=function(t,e,i,n){var r=wt.a.apply(e.pixelToCoordinateTransform,t.slice());return this.hasFeatureAtCoordinate(r,e)?i.call(n,this.getLayer(),null):void 0},uo.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},uo.prototype.prepareFrame=function(t,e,i){var n=this.getLayer(),r=n.getSource();this.updateLogos(t,r);var o=t.viewHints[ut],a=t.viewHints[ht],s=n.getUpdateWhileAnimating(),l=n.getUpdateWhileInteracting();if(!this.dirty_&&!s&&o||!l&&a)return!0;var u=t.extent,h=t.viewState,c=h.projection,f=h.resolution,p=t.pixelRatio,d=n.getRevision(),g=n.getRenderBuffer(),_=n.getRenderOrder();void 0===_&&(_=jn.defaultOrder);var v=yt.a.buffer(u,g*f);if(!this.dirty_&&this.renderedResolution_==f&&this.renderedRevision_==d&&this.renderedRenderOrder_==_&&yt.a.containsExtent(this.renderedExtent_,v))return!0;this.replayGroup_&&t.postRenderFunctions.push(this.replayGroup_.getDeleteResourcesFunction(i)),this.dirty_=!1;var y=new Vr(jn.getTolerance(f,p),v,n.getRenderBuffer());r.loadFeatures(v,f,c);var m=function(t){var e,i=t.getStyleFunction();if(i?e=i.call(t,f):(i=n.getStyleFunction())&&(e=i(t,f)),e){var r=this.renderFeature(t,f,p,e,y);this.dirty_=this.dirty_||r}};if(_){var x=[];r.forEachFeatureInExtent(v,function(t){x.push(t)},this),x.sort(_),x.forEach(m,this)}else r.forEachFeatureInExtent(v,m,this);return y.finish(i),this.renderedResolution_=f,this.renderedRevision_=d,this.renderedRenderOrder_=_,this.renderedExtent_=v,this.replayGroup_=y,!0},uo.prototype.renderFeature=function(t,e,i,n,r){if(!n)return!1;var o=!1;if(Array.isArray(n))for(var a=n.length-1;a>=0;--a)o=jn.renderFeature(r,t,n[a],jn.getSquaredTolerance(e,i),this.handleStyleImageChange_,this)||o;else o=jn.renderFeature(r,t,n,jn.getSquaredTolerance(e,i),this.handleStyleImageChange_,this)||o;return o};var ho=uo;n.a.ENABLE_CANVAS&&(fe.register(ue,qi),fe.registerMultiple(he,[Xi,Qi,Wn,Vn])),n.a.ENABLE_WEBGL&&(fe.register(ue,no),fe.registerMultiple(he,[to,lo,ho]));var co=function(t){(t=tt.a.assign({},t)).controls||(t.controls=De.defaults()),t.interactions||(t.interactions=yi.defaults()),ve.call(this,t)};n.a.inherits(co,ve),e.default=co},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i(12),o=i(1),a=i(11),s=i(9),l=i(16),u=i(56),h=i(27),c=i(10),f=i(28),p=i(25),d=i(8),g=function(t,e,i){p.a.call(this);var n=i||{};this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=void 0===n.transition?250:n.transition,this.transitionStarts_={}};n.a.inherits(g,p.a),g.prototype.changed=function(){this.dispatchEvent(d.a.CHANGE)},g.prototype.getKey=function(){return this.key+"/"+this.tileCoord},g.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==c.a.LOADED)return t;t=t.interimTile}while(t);return this},g.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==c.a.LOADED){t.interimTile=null;break}t.getState()==c.a.LOADING?e=t:t.getState()==c.a.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},g.prototype.getTileCoord=function(){return this.tileCoord},g.prototype.getState=function(){return this.state},g.prototype.setState=function(t){this.state=t,this.changed()},g.prototype.load=function(){},g.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;var n=e-i+1e3/60;return n>=this.transition_?1:f.a.easeIn(n/this.transition_)},g.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},g.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)};var _=g,v=i(15),y=i(2),m=function(t,e,i,n,r,o){_.call(this,t,e,o),this.crossOrigin_=n,this.src_=i,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.imageListenerKeys_=null,this.tileLoadFunction_=r};n.a.inherits(m,_),m.prototype.disposeInternal=function(){this.state==c.a.LOADING&&(this.unlistenImage_(),this.image_=m.getBlankImage()),this.interimTile&&this.interimTile.dispose(),this.state=c.a.ABORT,this.changed(),_.prototype.disposeInternal.call(this)},m.prototype.getImage=function(){return this.image_},m.prototype.getKey=function(){return this.src_},m.prototype.handleImageError_=function(){this.state=c.a.ERROR,this.unlistenImage_(),this.image_=m.getBlankImage(),this.changed()},m.prototype.handleImageLoad_=function(){this.image_.naturalWidth&&this.image_.naturalHeight?this.state=c.a.LOADED:this.state=c.a.EMPTY,this.unlistenImage_(),this.changed()},m.prototype.load=function(){this.state==c.a.ERROR&&(this.state=c.a.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==c.a.IDLE&&(this.state=c.a.LOADING,this.changed(),this.imageListenerKeys_=[y.a.listenOnce(this.image_,d.a.ERROR,this.handleImageError_,this),y.a.listenOnce(this.image_,d.a.LOAD,this.handleImageLoad_,this)],this.tileLoadFunction_(this,this.src_))},m.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(y.a.unlistenByKey),this.imageListenerKeys_=null},m.getBlankImage=function(){var t=v.a.createCanvasContext2D(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas};var x=m,E=i(80),S=i(34),T=function(t){E.a.call(this,t)};n.a.inherits(T,E.a),T.prototype.expireCache=function(t){for(var e,i;this.canExpireCache()&&!((i=(e=this.peekLast()).tileCoord[0].toString())in t&&t[i].contains(e.tileCoord));)this.pop().dispose()},T.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey(),e=S.a.fromKey(t)[0];this.forEach(function(t){t.tileCoord[0]!==e&&(this.remove(S.a.getKey(t.tileCoord)),t.dispose())},this)}};var C=T,R=i(127),I=function(t,e,i,r,a,l,h,f,p,d,g){_.call(this,a,c.a.IDLE),this.renderEdges_=void 0!==g&&g,this.pixelRatio_=h,this.gutter_=f,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=r,this.wrappedTileCoord_=l||a,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;var v=r.getTileCoordExtent(this.wrappedTileCoord_),y=this.targetTileGrid_.getExtent(),m=this.sourceTileGrid_.getExtent(),x=y?o.a.getIntersection(v,y):v;if(0!==o.a.getArea(x)){var E=t.getExtent();E&&(m=m?o.a.getIntersection(m,E):E);var S=r.getResolution(this.wrappedTileCoord_[0]),T=o.a.getCenter(x),C=u.a.calculateSourceResolution(t,i,T,S);if(!isFinite(C)||C<=0)this.state=c.a.EMPTY;else{var I=void 0!==d?d:n.a.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD;if(this.triangulation_=new R.a(t,i,x,m,C*I),0!==this.triangulation_.getTriangles().length){this.sourceZ_=e.getZForResolution(C);var b=this.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(b[1]=s.a.clamp(b[1],m[1],m[3]),b[3]=s.a.clamp(b[3],m[1],m[3])):b=o.a.getIntersection(b,m)),o.a.getArea(b)){for(var w=e.getTileRangeForExtentAndZ(b,this.sourceZ_),L=w.minX;L<=w.maxX;L++)for(var O=w.minY;O<=w.maxY;O++){var A=p(this.sourceZ_,L,O,h);A&&this.sourceTiles_.push(A)}0===this.sourceTiles_.length&&(this.state=c.a.EMPTY)}else this.state=c.a.EMPTY}else this.state=c.a.EMPTY}}else this.state=c.a.EMPTY};n.a.inherits(I,_),I.prototype.disposeInternal=function(){this.state==c.a.LOADING&&this.unlistenSources_(),_.prototype.disposeInternal.call(this)},I.prototype.getImage=function(){return this.canvas_},I.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,i,n){e&&e.getState()==c.a.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})},this),this.sourceTiles_.length=0,0===t.length)this.state=c.a.ERROR;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],r="number"==typeof i?i:i[1],o=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),s=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=u.a.render(n,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,s,this.triangulation_,t,this.gutter_,this.renderEdges_),this.state=c.a.LOADED}this.changed()},I.prototype.load=function(){if(this.state==c.a.IDLE){this.state=c.a.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,n){var r,o=e.getState();o!=c.a.IDLE&&o!=c.a.LOADING||(t++,r=y.a.listen(e,d.a.CHANGE,function(i){var n=e.getState();n!=c.a.LOADED&&n!=c.a.ERROR&&n!=c.a.EMPTY||(y.a.unlistenByKey(r),0==--t&&(this.unlistenSources_(),this.reproject_()))},this),this.sourcesListenerKeys_.push(r))},this),this.sourceTiles_.forEach(function(t,e,i){t.getState()==c.a.IDLE&&t.load()}),0===t&&setTimeout(this.reproject_.bind(this),0)}},I.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(y.a.unlistenByKey),this.sourcesListenerKeys_=null};var b=I,w={createFromTemplate:function(t,e){var i=/\{z\}/g,n=/\{x\}/g,o=/\{y\}/g,a=/\{-y\}/g;return function(s,l,u){return s?t.replace(i,s[0].toString()).replace(n,s[1].toString()).replace(o,function(){return(-s[2]-1).toString()}).replace(a,function(){var t=s[0],i=e.getFullTileRange(t);return r.a.assert(i,55),(i.getHeight()+s[2]).toString()}):void 0}},createFromTemplates:function(t,e){for(var i=t.length,n=new Array(i),r=0;r<i;++r)n[r]=w.createFromTemplate(t[r],e);return w.createFromTileUrlFunctions(n)},createFromTileUrlFunctions:function(t){return 1===t.length?t[0]:function(e,i,n){if(e){var r=S.a.hash(e),o=s.a.modulo(r,t.length);return t[o](e,i,n)}}},nullTileUrlFunction:function(t,e,i){},expandUrl:function(t){var e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var n,r=i[1].charCodeAt(0),o=i[2].charCodeAt(0);for(n=r;n<=o;++n)e.push(t.replace(i[0],String.fromCharCode(n)));return e}if(i=i=/\{(\d+)-(\d+)\}/.exec(t)){for(var a=parseInt(i[2],10),s=parseInt(i[1],10);s<=a;s++)e.push(t.replace(i[0],s.toString()));return e}return e.push(t),e}},L=w,O=i(22),A=i(97),P=i(85),F=function(t){A.a.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,state:t.state,wrapX:t.wrapX}),this.opaque_=void 0!==t.opaque&&t.opaque,this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null,this.tileCache=new C(t.cacheSize),this.tmpSize=[0,0],this.key_="",this.tileOptions={transition:t.transition}};n.a.inherits(F,A.a),F.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},F.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);i&&i.expireCache(e)},F.prototype.forEachLoadedTile=function(t,e,i,n){var r=this.getTileCacheForProjection(t);if(!r)return!1;for(var o,a,s,l=!0,u=i.minX;u<=i.maxX;++u)for(var h=i.minY;h<=i.maxY;++h)a=S.a.getKeyZXY(e,u,h),s=!1,r.containsKey(a)&&(s=(o=r.get(a)).getState()===c.a.LOADED)&&(s=!1!==n(o)),s||(l=!1);return l},F.prototype.getGutter=function(t){return 0},F.prototype.getKey=function(){return this.key_},F.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},F.prototype.getOpaque=function(t){return this.opaque_},F.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},F.prototype.getTile=function(t,e,i,n,r){},F.prototype.getTileGrid=function(){return this.tileGrid},F.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:P.a.getForProjection(t)},F.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return e&&!l.default.equivalent(e,t)?null:this.tileCache},F.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},F.prototype.getTilePixelSize=function(t,e,i){var n=this.getTileGridForProjection(i),r=this.getTilePixelRatio(e),o=h.a.toSize(n.getTileSize(t),this.tmpSize);return 1==r?o:h.a.scale(o,r,this.tmpSize)},F.prototype.getTileCoordForTileUrlFunction=function(t,e){var i=void 0!==e?e:this.getProjection(),n=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=P.a.wrapX(n,t,i)),S.a.withinExtentAndZ(t,n)?t:null},F.prototype.refresh=function(){this.tileCache.clear(),this.changed()},F.prototype.useTile=n.a.nullFunction,F.Event=function(t,e){O.a.call(this,t),this.tile=e},n.a.inherits(F.Event,O.a);var M=F,D="tileloadstart",k="tileloadend",N="tileloaderror",U=function(t){M.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition}),this.tileLoadFunction=t.tileLoadFunction,this.tileUrlFunction=this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):L.nullTileUrlFunction,this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),t.tileUrlFunction&&this.setTileUrlFunction(t.tileUrlFunction),this.tileLoadingKeys_={}};n.a.inherits(U,M),U.prototype.fixedTileUrlFunction,U.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},U.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},U.prototype.getUrls=function(){return this.urls},U.prototype.handleTileChange=function(t){var e,i=t.target,r=n.a.getUid(i),o=i.getState();o==c.a.LOADING?(this.tileLoadingKeys_[r]=!0,e=D):r in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[r],e=o==c.a.ERROR?N:o==c.a.LOADED||o==c.a.ABORT?k:void 0),null!=e&&this.dispatchEvent(new M.Event(e,i))},U.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},U.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},U.prototype.setUrl=function(t){var e=this.urls=L.expandUrl(t);this.setTileUrlFunction(this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):L.createFromTemplates(e,this.tileGrid),t)},U.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.setTileUrlFunction(this.fixedTileUrlFunction?this.fixedTileUrlFunction.bind(this):L.createFromTemplates(t,this.tileGrid),e)},U.prototype.useTile=function(t,e,i){var n=S.a.getKeyZXY(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)};var G=U,j=function(t){G.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:j.defaultTileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=void 0!==t.tileClass?t.tileClass:x,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1};n.a.inherits(j,G),j.prototype.canExpireCache=function(){if(!n.a.ENABLE_RASTER_REPROJECTION)return G.prototype.canExpireCache.call(this);if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},j.prototype.expireCache=function(t,e){if(n.a.ENABLE_RASTER_REPROJECTION){var i=this.getTileCacheForProjection(t);for(var r in this.tileCache.expireCache(this.tileCache==i?e:{}),this.tileCacheForProjection){var o=this.tileCacheForProjection[r];o.expireCache(o==i?e:{})}}else G.prototype.expireCache.call(this,t,e)},j.prototype.getGutter=function(t){return n.a.ENABLE_RASTER_REPROJECTION&&this.getProjection()&&t&&!l.default.equivalent(this.getProjection(),t)?0:this.getGutterInternal()},j.prototype.getGutterInternal=function(){return 0},j.prototype.getOpaque=function(t){return!(n.a.ENABLE_RASTER_REPROJECTION&&this.getProjection()&&t&&!l.default.equivalent(this.getProjection(),t))&&G.prototype.getOpaque.call(this,t)},j.prototype.getTileGridForProjection=function(t){if(!n.a.ENABLE_RASTER_REPROJECTION)return G.prototype.getTileGridForProjection.call(this,t);var e=this.getProjection();if(!this.tileGrid||e&&!l.default.equivalent(e,t)){var i=n.a.getUid(t).toString();return i in this.tileGridForProjection||(this.tileGridForProjection[i]=P.a.getForProjection(t)),this.tileGridForProjection[i]}return this.tileGrid},j.prototype.getTileCacheForProjection=function(t){if(!n.a.ENABLE_RASTER_REPROJECTION)return G.prototype.getTileCacheForProjection.call(this,t);var e=this.getProjection();if(!e||l.default.equivalent(e,t))return this.tileCache;var i=n.a.getUid(t).toString();return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new C(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},j.prototype.createTile_=function(t,e,i,n,r,o){var a=[t,e,i],s=this.getTileCoordForTileUrlFunction(a,r),l=s?this.tileUrlFunction(s,n,r):void 0,u=new this.tileClass(a,void 0!==l?c.a.IDLE:c.a.EMPTY,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,y.a.listen(u,d.a.CHANGE,this.handleTileChange,this),u},j.prototype.getTile=function(t,e,i,r,o){var a=this.getProjection();if(n.a.ENABLE_RASTER_REPROJECTION&&a&&o&&!l.default.equivalent(a,o)){var s,u=this.getTileCacheForProjection(o),h=[t,e,i],c=S.a.getKey(h);u.containsKey(c)&&(s=u.get(c));var f=this.getKey();if(s&&s.key==f)return s;var p=this.getTileGridForProjection(a),d=this.getTileGridForProjection(o),g=this.getTileCoordForTileUrlFunction(h,o),_=new b(a,p,o,d,h,g,this.getTilePixelRatio(r),this.getGutterInternal(),function(t,e,i,n){return this.getTileInternal(t,e,i,n,a)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_);return _.key=f,s?(_.interimTile=s,_.refreshInterimChain(),u.replace(c,_)):u.set(c,_),_}return this.getTileInternal(t,e,i,r,a||o)},j.prototype.getTileInternal=function(t,e,i,n,r){var o=null,a=S.a.getKeyZXY(t,e,i),s=this.getKey();if(this.tileCache.containsKey(a)){if((o=this.tileCache.get(a)).key!=s){var l=o;o=this.createTile_(t,e,i,n,r,s),l.getState()==c.a.IDLE?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(a,o)}}else o=this.createTile_(t,e,i,n,r,s),this.tileCache.set(a,o);return o},j.prototype.setRenderReprojectionEdges=function(t){if(n.a.ENABLE_RASTER_REPROJECTION&&this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},j.prototype.setTileGridForProjection=function(t,e){if(n.a.ENABLE_RASTER_REPROJECTION){var i=l.default.get(t);if(i){var r=n.a.getUid(i).toString();r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}}},j.defaultTileLoadFunction=function(t,e){t.getImage().src=e};var B=j,W=i(58),z=i(83),X=i(128),V=function(t){var e=t||{},i=e.params||{},n=!("TRANSPARENT"in i)||i.TRANSPARENT;B.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,logo:e.logo,opaque:!n,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileClass:e.tileClass,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition}),this.gutter_=void 0!==e.gutter?e.gutter:0,this.params_=i,this.v13_=!0,this.serverType_=e.serverType,this.hidpi_=void 0===e.hidpi||e.hidpi,this.tmpExtent_=o.a.createEmpty(),this.updateV13_(),this.setKey(this.getKeyForParams_())};n.a.inherits(V,B),V.prototype.getGetFeatureInfoUrl=function(t,e,i,r){var s=l.default.get(i),c=this.getProjection(),f=this.getTileGrid();f||(f=this.getTileGridForProjection(s));var p=f.getTileCoordForCoordAndResolution(t,e);if(!(f.getResolutions().length<=p[0])){var d=f.getResolution(p[0]),g=f.getTileCoordExtent(p,this.tmpExtent_),_=h.a.toSize(f.getTileSize(p[0]),this.tmpSize),v=this.gutter_;0!==v&&(_=h.a.buffer(_,v,this.tmpSize),g=o.a.buffer(g,d*v,g)),c&&c!==s&&(d=u.a.calculateSourceResolution(c,s,t,d),g=l.default.transformExtent(g,s,c),t=l.default.transform(t,s,c));var y={SERVICE:"WMS",VERSION:n.a.DEFAULT_WMS_VERSION,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};a.a.assign(y,this.params_,r);var m=Math.floor((t[0]-g[0])/d),x=Math.floor((g[3]-t[1])/d);return y[this.v13_?"I":"X"]=m,y[this.v13_?"J":"Y"]=x,this.getRequestUrl_(p,_,g,1,c||s,y)}},V.prototype.getGutterInternal=function(){return this.gutter_},V.prototype.getParams=function(){return this.params_},V.prototype.getRequestUrl_=function(t,e,i,n,o,a){var l=this.urls;if(l){if(a.WIDTH=e[0],a.HEIGHT=e[1],a[this.v13_?"CRS":"SRS"]=o.getCode(),"STYLES"in this.params_||(a.STYLES=""),1!=n)switch(this.serverType_){case W.a.GEOSERVER:var u=90*n+.5|0;"FORMAT_OPTIONS"in a?a.FORMAT_OPTIONS+=";dpi:"+u:a.FORMAT_OPTIONS="dpi:"+u;break;case W.a.MAPSERVER:a.MAP_RESOLUTION=90*n;break;case W.a.CARMENTA_SERVER:case W.a.QGIS:a.DPI=90*n;break;default:r.a.assert(!1,52)}var h,c,f=o.getAxisOrientation(),p=i;return this.v13_&&"ne"==f.substr(0,2)&&(h=i[0],p[0]=i[1],p[1]=h,h=i[2],p[2]=i[3],p[3]=h),a.BBOX=p.join(","),c=1==l.length?l[0]:l[s.a.modulo(S.a.hash(t),l.length)],X.a.appendParams(c,a)}},V.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},V.prototype.getKeyForParams_=function(){var t=0,e=[];for(var i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")},V.prototype.fixedTileUrlFunction=function(t,e,i){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(i)),!(r.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var s=r.getResolution(t[0]),l=r.getTileCoordExtent(t,this.tmpExtent_),u=h.a.toSize(r.getTileSize(t[0]),this.tmpSize),c=this.gutter_;0!==c&&(u=h.a.buffer(u,c,this.tmpSize),l=o.a.buffer(l,s*c,l)),1!=e&&(u=h.a.scale(u,e,this.tmpSize));var f={SERVICE:"WMS",VERSION:n.a.DEFAULT_WMS_VERSION,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return a.a.assign(f,this.params_),this.getRequestUrl_(t,u,l,e,i,f)}},V.prototype.updateParams=function(t){a.a.assign(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},V.prototype.updateV13_=function(){var t=this.params_.VERSION||n.a.DEFAULT_WMS_VERSION;this.v13_=z.a.compareVersions(t,"1.3")>=0},e.default=V},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i(13),o=i(12),a=i(31),s=i(2),l=i(8),u="fraction",h=i(15),c=i(25),f=i(129),p=function(t,e,i,n,o,a){c.a.call(this),this.hitDetectionImage_=null,this.image_=t||new Image,null!==n&&(this.image_.crossOrigin=n),this.canvas_=a?document.createElement("CANVAS"):null,this.color_=a,this.imageListenerKeys_=null,this.imageState_=o,this.size_=i,this.src_=e,this.tainting_=!1,this.imageState_==r.a.LOADED&&this.determineTainting_()};n.a.inherits(p,c.a),p.get=function(t,e,i,n,r,o){var a=f.a.iconImageCache,s=a.get(e,n,o);return s||(s=new p(t,e,i,n,r,o),a.set(e,n,o,s)),s},p.prototype.determineTainting_=function(){var t=h.a.createCanvasContext2D(1,1);try{t.drawImage(this.image_,0,0),t.getImageData(0,0,1,1)}catch(t){this.tainting_=!0}},p.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(l.a.CHANGE)},p.prototype.handleImageError_=function(){this.imageState_=r.a.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},p.prototype.handleImageLoad_=function(){this.imageState_=r.a.LOADED,this.size_&&(this.image_.width=this.size_[0],this.image_.height=this.size_[1]),this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.determineTainting_(),this.replaceColor_(),this.dispatchChangeEvent_()},p.prototype.getImage=function(t){return this.canvas_?this.canvas_:this.image_},p.prototype.getImageState=function(){return this.imageState_},p.prototype.getHitDetectionImage=function(t){if(!this.hitDetectionImage_)if(this.tainting_){var e=this.size_[0],i=this.size_[1],n=h.a.createCanvasContext2D(e,i);n.fillRect(0,0,e,i),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},p.prototype.getSize=function(){return this.size_},p.prototype.getSrc=function(){return this.src_},p.prototype.load=function(){if(this.imageState_==r.a.IDLE){this.imageState_=r.a.LOADING,this.imageListenerKeys_=[s.a.listenOnce(this.image_,l.a.ERROR,this.handleImageError_,this),s.a.listenOnce(this.image_,l.a.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch(t){this.handleImageError_()}}},p.prototype.replaceColor_=function(){if(!this.tainting_&&null!==this.color_){this.canvas_.width=this.image_.width,this.canvas_.height=this.image_.height;var t=this.canvas_.getContext("2d");t.drawImage(this.image_,0,0);for(var e=t.getImageData(0,0,this.image_.width,this.image_.height),i=e.data,n=this.color_[0]/255,r=this.color_[1]/255,o=this.color_[2]/255,a=0,s=i.length;a<s;a+=4)i[a]*=n,i[a+1]*=r,i[a+2]*=o;t.putImageData(e,0,0)}},p.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(s.a.unlistenByKey),this.imageListenerKeys_=null};var d=p,g="bottom-left",_="bottom-right",v="top-left",y="top-right",m=i(81),x=function(t){var e=t||{};this.anchor_=void 0!==e.anchor?e.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==e.anchorOrigin?e.anchorOrigin:v,this.anchorXUnits_=void 0!==e.anchorXUnits?e.anchorXUnits:u,this.anchorYUnits_=void 0!==e.anchorYUnits?e.anchorYUnits:u,this.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null;var i=void 0!==e.img?e.img:null,s=void 0!==e.imgSize?e.imgSize:null,l=e.src;o.a.assert(!(void 0!==l&&i),4),o.a.assert(!i||i&&s,5),void 0!==l&&0!==l.length||!i||(l=i.src||n.a.getUid(i).toString()),o.a.assert(void 0!==l&&l.length>0,6);var h=void 0!==e.src?r.a.IDLE:r.a.LOADED;this.color_=void 0!==e.color?a.a.asArray(e.color):null,this.iconImage_=d.get(i,l,s,this.crossOrigin_,h,this.color_),this.offset_=void 0!==e.offset?e.offset:[0,0],this.offsetOrigin_=void 0!==e.offsetOrigin?e.offsetOrigin:v,this.origin_=null,this.size_=void 0!==e.size?e.size:null;var c=void 0!==e.opacity?e.opacity:1,f=void 0!==e.rotateWithView&&e.rotateWithView,p=void 0!==e.rotation?e.rotation:0,g=void 0!==e.scale?e.scale:1,_=void 0===e.snapToPixel||e.snapToPixel;m.default.call(this,{opacity:c,rotation:p,scale:g,snapToPixel:_,rotateWithView:f})};n.a.inherits(x,m.default),x.prototype.clone=function(){return new x({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),snapToPixel:this.getSnapToPixel(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},x.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==u||this.anchorYUnits_==u){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==u&&(t[0]*=e[0]),this.anchorYUnits_==u&&(t[1]*=e[1])}if(this.anchorOrigin_!=v){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=y&&this.anchorOrigin_!=_||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=g&&this.anchorOrigin_!=_||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},x.prototype.getColor=function(){return this.color_},x.prototype.getImage=function(t){return this.iconImage_.getImage(t)},x.prototype.getImageSize=function(){return this.iconImage_.getSize()},x.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},x.prototype.getImageState=function(){return this.iconImage_.getImageState()},x.prototype.getHitDetectionImage=function(t){return this.iconImage_.getHitDetectionImage(t)},x.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=v){var e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),this.offsetOrigin_!=y&&this.offsetOrigin_!=_||(t[0]=i[0]-e[0]-t[0]),this.offsetOrigin_!=g&&this.offsetOrigin_!=_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_},x.prototype.getSrc=function(){return this.iconImage_.getSrc()},x.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},x.prototype.listenImageChange=function(t,e){return s.a.listen(this.iconImage_,l.a.CHANGE,t,e)},x.prototype.load=function(){this.iconImage_.load()},x.prototype.unlistenImageChange=function(t,e){s.a.unlisten(this.iconImage_,l.a.CHANGE,t,e)},e.default=x},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i(57),o=i(13),a=i(2),s=i(8),l=i(1),u=function(t,e,i,n,a,s){r.a.call(this,t,e,i,o.a.IDLE),this.src_=n,this.image_=new Image,null!==a&&(this.image_.crossOrigin=a),this.imageListenerKeys_=null,this.state=o.a.IDLE,this.imageLoadFunction_=s};n.a.inherits(u,r.a),u.prototype.getImage=function(){return this.image_},u.prototype.handleImageError_=function(){this.state=o.a.ERROR,this.unlistenImage_(),this.changed()},u.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=l.a.getHeight(this.extent)/this.image_.height),this.state=o.a.LOADED,this.unlistenImage_(),this.changed()},u.prototype.load=function(){this.state!=o.a.IDLE&&this.state!=o.a.ERROR||(this.state=o.a.LOADING,this.changed(),this.imageListenerKeys_=[a.a.listenOnce(this.image_,s.a.ERROR,this.handleImageError_,this),a.a.listenOnce(this.image_,s.a.LOAD,this.handleImageLoad_,this)],this.imageLoadFunction_(this,this.src_))},u.prototype.setImage=function(t){this.image_=t},u.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(a.a.unlistenByKey),this.imageListenerKeys_=null};var h=u,c=i(12),f=i(11),p=i(16),d=i(56),g=i(14),_=i(22),v=i(127),y=function(t,e,i,a,s,u){this.targetProj_=e,this.maxSourceExtent_=t.getExtent();var h=e.getExtent(),c=h?l.a.getIntersection(i,h):i,f=l.a.getCenter(c),p=d.a.calculateSourceResolution(t,e,f,a),g=n.a.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD;this.triangulation_=new v.a(t,e,c,this.maxSourceExtent_,p*g),this.targetResolution_=a,this.targetExtent_=i;var _=this.triangulation_.calculateSourceExtent();this.sourceImage_=u(_,p,s),this.sourcePixelRatio_=this.sourceImage_?this.sourceImage_.getPixelRatio():1,this.canvas_=null,this.sourceListenerKey_=null;var y=o.a.LOADED;this.sourceImage_&&(y=o.a.IDLE),r.a.call(this,i,a,this.sourcePixelRatio_,y)};n.a.inherits(y,r.a),y.prototype.disposeInternal=function(){this.state==o.a.LOADING&&this.unlistenSource_(),r.a.prototype.disposeInternal.call(this)},y.prototype.getImage=function(){return this.canvas_},y.prototype.getProjection=function(){return this.targetProj_},y.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==o.a.LOADED){var e=l.a.getWidth(this.targetExtent_)/this.targetResolution_,i=l.a.getHeight(this.targetExtent_)/this.targetResolution_;this.canvas_=d.a.render(e,i,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0)}this.state=t,this.changed()},y.prototype.load=function(){if(this.state==o.a.IDLE){this.state=o.a.LOADING,this.changed();var t=this.sourceImage_.getState();t==o.a.LOADED||t==o.a.ERROR?this.reproject_():(this.sourceListenerKey_=a.a.listen(this.sourceImage_,s.a.CHANGE,function(t){var e=this.sourceImage_.getState();e!=o.a.LOADED&&e!=o.a.ERROR||(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}},y.prototype.unlistenSource_=function(){a.a.unlistenByKey(this.sourceListenerKey_),this.sourceListenerKey_=null};var m=y,x=i(97),E=function(t){x.a.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,state:t.state}),this.resolutions_=void 0!==t.resolutions?t.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0};n.a.inherits(E,x.a),E.prototype.getResolutions=function(){return this.resolutions_},E.prototype.findNearestResolution=function(t){if(this.resolutions_){var e=g.a.linearFindNearest(this.resolutions_,t,0);t=this.resolutions_[e]}return t},E.prototype.getImage=function(t,e,i,r){var o=this.getProjection();if(n.a.ENABLE_RASTER_REPROJECTION&&o&&r&&!p.default.equivalent(o,r)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&p.default.equivalent(this.reprojectedImage_.getProjection(),r)&&this.reprojectedImage_.getResolution()==e&&l.a.equals(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new m(o,r,t,e,i,function(t,e,i){return this.getImageInternal(t,e,i,o)}.bind(this)),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return o&&(r=o),this.getImageInternal(t,e,i,r)},E.prototype.getImageInternal=function(t,e,i,n){},E.prototype.handleImageChange=function(t){var e=t.target;switch(e.getState()){case o.a.LOADING:this.dispatchEvent(new E.Event(E.EventType_.IMAGELOADSTART,e));break;case o.a.LOADED:this.dispatchEvent(new E.Event(E.EventType_.IMAGELOADEND,e));break;case o.a.ERROR:this.dispatchEvent(new E.Event(E.EventType_.IMAGELOADERROR,e))}},E.defaultImageLoadFunction=function(t,e){t.getImage().src=e},E.Event=function(t,e){_.a.call(this,t),this.image=e},n.a.inherits(E.Event,_.a),E.EventType_={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"};var S=E,T=i(58),C=i(83),R=i(128),I=function(t){var e=t||{};S.call(this,{attributions:e.attributions,logo:e.logo,projection:e.projection,resolutions:e.resolutions}),this.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null,this.url_=e.url,this.imageLoadFunction_=void 0!==e.imageLoadFunction?e.imageLoadFunction:S.defaultImageLoadFunction,this.params_=e.params||{},this.v13_=!0,this.updateV13_(),this.serverType_=e.serverType,this.hidpi_=void 0===e.hidpi||e.hidpi,this.image_=null,this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=void 0!==e.ratio?e.ratio:1.5};n.a.inherits(I,S),I.GETFEATUREINFO_IMAGE_SIZE_=[101,101],I.prototype.getGetFeatureInfoUrl=function(t,e,i,r){if(void 0!==this.url_){var o=p.default.get(i),a=this.getProjection();a&&a!==o&&(e=d.a.calculateSourceResolution(a,o,t,e),t=p.default.transform(t,o,a));var s=l.a.getForViewAndSize(t,e,0,I.GETFEATUREINFO_IMAGE_SIZE_),u={SERVICE:"WMS",VERSION:n.a.DEFAULT_WMS_VERSION,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};f.a.assign(u,this.params_,r);var h=Math.floor((t[0]-s[0])/e),c=Math.floor((s[3]-t[1])/e);return u[this.v13_?"I":"X"]=h,u[this.v13_?"J":"Y"]=c,this.getRequestUrl_(s,I.GETFEATUREINFO_IMAGE_SIZE_,1,a||o,u)}},I.prototype.getParams=function(){return this.params_},I.prototype.getImageInternal=function(t,e,i,r){if(void 0===this.url_)return null;e=this.findNearestResolution(e),1==i||this.hidpi_&&void 0!==this.serverType_||(i=1);var o=e/i,u=l.a.getCenter(t),c=Math.ceil(l.a.getWidth(t)/o),p=Math.ceil(l.a.getHeight(t)/o),d=l.a.getForViewAndSize(u,o,0,[c,p]),g=Math.ceil(this.ratio_*l.a.getWidth(t)/o),_=Math.ceil(this.ratio_*l.a.getHeight(t)/o),v=l.a.getForViewAndSize(u,o,0,[g,_]),y=this.image_;if(y&&this.renderedRevision_==this.getRevision()&&y.getResolution()==e&&y.getPixelRatio()==i&&l.a.containsExtent(y.getExtent(),d))return y;var m={SERVICE:"WMS",VERSION:n.a.DEFAULT_WMS_VERSION,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};f.a.assign(m,this.params_),this.imageSize_[0]=Math.round(l.a.getWidth(v)/o),this.imageSize_[1]=Math.round(l.a.getHeight(v)/o);var x=this.getRequestUrl_(v,this.imageSize_,i,r,m);return this.image_=new h(v,e,i,x,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),a.a.listen(this.image_,s.a.CHANGE,this.handleImageChange,this),this.image_},I.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},I.prototype.getRequestUrl_=function(t,e,i,n,r){if(c.a.assert(void 0!==this.url_,9),r[this.v13_?"CRS":"SRS"]=n.getCode(),"STYLES"in this.params_||(r.STYLES=""),1!=i)switch(this.serverType_){case T.a.GEOSERVER:var o=90*i+.5|0;"FORMAT_OPTIONS"in r?r.FORMAT_OPTIONS+=";dpi:"+o:r.FORMAT_OPTIONS="dpi:"+o;break;case T.a.MAPSERVER:r.MAP_RESOLUTION=90*i;break;case T.a.CARMENTA_SERVER:case T.a.QGIS:r.DPI=90*i;break;default:c.a.assert(!1,8)}r.WIDTH=e[0],r.HEIGHT=e[1];var a,s=n.getAxisOrientation();return a=this.v13_&&"ne"==s.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,r.BBOX=a.join(","),R.a.appendParams(this.url_,r)},I.prototype.getUrl=function(){return this.url_},I.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},I.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},I.prototype.updateParams=function(t){f.a.assign(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},I.prototype.updateV13_=function(){var t=this.params_.VERSION||n.a.DEFAULT_WMS_VERSION;this.v13_=C.a.compareVersions(t,"1.3")>=0},e.default=I}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment