liuxiaolong
2019-05-06 71af9c46c24b562acc00a71ec6c97c04eb048d9c
1
webpackJsonp([2],{"/bpg":function(t,e){},"7J5b":function(t,e,i){t.exports=i.p+"static/img/camera_device.bce85d9.png"},"9QFF":function(t,e,i){t.exports=i.p+"static/img/ip_device.4ca9888.png"},ACGT:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get: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="/dist/",i(i.s=93)}({0:function(t,e){t.exports=function(t,e,i,n,o,r){var s,a=t=t||{},h=typeof t.default;"object"!==h&&"function"!==h||(s=t,a=t.default);var l,u="function"==typeof a?a.options:a;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId=o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):n&&(l=n),l){var c=u.functional,p=c?u.render:u.beforeCreate;c?(u._injectStyles=l,u.render=function(t,e){return l.call(e),p(t,e)}):u.beforeCreate=p?[].concat(p,l):[l]}return{esModule:s,exports:a,options:u}}},1:function(t,e){t.exports=i("fPll")},22:function(t,e){t.exports=i("aMwW")},34:function(t,e,i){"use strict";e.__esModule=!0,e.default={inject:["rootMenu"],computed:{indexPath:function(){for(var t=[this.index],e=this.$parent;"ElMenu"!==e.$options.componentName;)e.index&&t.unshift(e.index),e=e.$parent;return t},parentMenu:function(){for(var t=this.$parent;t&&-1===["ElMenu","ElSubmenu"].indexOf(t.$options.componentName);)t=t.$parent;return t},paddingStyle:function(){if("vertical"!==this.rootMenu.mode)return{};var t=20,e=this.$parent;if(this.rootMenu.collapse)t=20;else for(;e&&"ElMenu"!==e.$options.componentName;)"ElSubmenu"===e.$options.componentName&&(t+=20),e=e.$parent;return{paddingLeft:t+"px"}}}}},93:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(94),r=(n=o)&&n.__esModule?n:{default:n};r.default.install=function(t){t.component(r.default.name,r.default)},e.default=r.default},94:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(95),o=i.n(n),r=i(96),s=i(0)(o.a,r.a,!1,null,null,null);e.default=s.exports},95:function(t,e,i){"use strict";e.__esModule=!0;var n=s(i(34)),o=s(i(22)),r=s(i(1));function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"ElMenuItem",componentName:"ElMenuItem",mixins:[n.default,r.default],components:{ElTooltip:o.default},props:{index:{type:String,required:!0},route:[String,Object],disabled:Boolean},computed:{active:function(){return this.index===this.rootMenu.activeIndex},hoverBackground:function(){return this.rootMenu.hoverBackground},backgroundColor:function(){return this.rootMenu.backgroundColor||""},activeTextColor:function(){return this.rootMenu.activeTextColor||""},textColor:function(){return this.rootMenu.textColor||""},mode:function(){return this.rootMenu.mode},itemStyle:function(){var t={color:this.active?this.activeTextColor:this.textColor};return"horizontal"!==this.mode||this.isNested||(t.borderBottomColor=this.active?this.rootMenu.activeTextColor?this.activeTextColor:"":"transparent"),t},isNested:function(){return this.parentMenu!==this.rootMenu}},methods:{onMouseEnter:function(){("horizontal"!==this.mode||this.rootMenu.backgroundColor)&&(this.$el.style.backgroundColor=this.hoverBackground)},onMouseLeave:function(){("horizontal"!==this.mode||this.rootMenu.backgroundColor)&&(this.$el.style.backgroundColor=this.backgroundColor)},handleClick:function(){this.disabled||(this.dispatch("ElMenu","item-click",this),this.$emit("click",this))}},mounted:function(){this.parentMenu.addItem(this),this.rootMenu.addItem(this)},beforeDestroy:function(){this.parentMenu.removeItem(this),this.rootMenu.removeItem(this)}}},96:function(t,e,i){"use strict";var n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("li",{staticClass:"el-menu-item",class:{"is-active":t.active,"is-disabled":t.disabled},style:[t.paddingStyle,t.itemStyle,{backgroundColor:t.backgroundColor}],attrs:{role:"menuitem",tabindex:"-1"},on:{click:t.handleClick,mouseenter:t.onMouseEnter,focus:t.onMouseEnter,blur:t.onMouseLeave,mouseleave:t.onMouseLeave}},["ElMenu"===t.parentMenu.$options.componentName&&t.rootMenu.collapse&&t.$slots.title?i("el-tooltip",{attrs:{effect:"dark",placement:"right"}},[i("div",{attrs:{slot:"content"},slot:"content"},[t._t("title")],2),i("div",{staticStyle:{position:"absolute",left:"0",top:"0",height:"100%",width:"100%",display:"inline-block","box-sizing":"border-box",padding:"0 20px"}},[t._t("default")],2)]):[t._t("default"),t._t("title")]],2)},staticRenderFns:[]};e.a=n}})},LtPi:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});i("GXEp"),i("+BTi");var n=i("mtrD"),o=i.n(n),r=(i("bwiK"),i("SExR")),s=i.n(r),a=(i("wJKS"),i("orbS")),h=i.n(a);function l(){return function(){throw new Error("Unimplemented abstract method.")}()}var u=0;function c(t){return t.ol_uid||(t.ol_uid=String(++u))}var p="5.3.0",d=function(t){function e(e){var i="Assertion failed. See https://openlayers.org/en/"+("latest"===p?p:"v"+p.split("-")[0])+"/doc/errors/#"+e+" for details.";t.call(this,i),this.code=e,this.name="AssertionError",this.message=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),f={ADD:"add",REMOVE:"remove"},_="propertychange",g="function"==typeof Object.assign?Object.assign:function(t,e){var i=arguments;if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),o=1,r=arguments.length;o<r;++o){var s=i[o];if(void 0!==s&&null!==s)for(var a in s)s.hasOwnProperty(a)&&(n[a]=s[a])}return n};function v(t){for(var e in t)delete t[e]}function y(t){var e=[];for(var i in t)e.push(t[i]);return e}function m(t){var e;for(e in t)return!1;return!e}function E(t,e,i,n){for(var o,r=0,s=t.length;r<s;++r)if((o=t[r]).listener===e&&o.bindTo===i)return n&&(o.deleteIndex=r),o}function x(t,e){var i=T(t);return i?i[e]:void 0}function T(t,e){var i=t.ol_lm;return!i&&e&&(i=t.ol_lm={}),i}function S(t,e){var i=x(t,e);if(i){for(var n=0,o=i.length;n<o;++n)t.removeEventListener(e,i[n].boundListener),v(i[n]);i.length=0;var r=T(t);r&&(delete r[e],0===Object.keys(r).length&&function(t){delete t.ol_lm}(t))}}function C(t,e,i,n,o){var r=T(t,!0),s=r[e];s||(s=r[e]=[]);var a=E(s,i,n,!1);return a?o||(a.callOnce=!1):(a={bindTo:n,callOnce:!!o,listener:i,target:t,type:e},t.addEventListener(e,function(t){var e=function(e){var i=t.listener,n=t.bindTo||t.target;return t.callOnce&&I(t),i.call(n,e)};return t.boundListener=e,e}(a)),s.push(a)),a}function R(t,e,i,n){return C(t,e,i,n,!0)}function b(t,e,i,n){var o=x(t,e);if(o){var r=E(o,i,n,!0);r&&I(r)}}function I(t){if(t&&t.target){t.target.removeEventListener(t.type,t.boundListener);var e=x(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&&S(t.target,t.type)}v(t)}}var O=function(){this.disposed_=!1};O.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},O.prototype.disposeInternal=function(){};var w=O;function M(){return!0}function L(){return!1}function P(){}var A=function(t){this.propagationStopped,this.type=t,this.target=null};function F(t){t.stopPropagation()}A.prototype.preventDefault=function(){this.propagationStopped=!0},A.prototype.stopPropagation=function(){this.propagationStopped=!0};var k=A,D=function(t){function e(){t.call(this),this.pendingRemovals_={},this.dispatching_={},this.listeners_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addEventListener=function(t,e){var i=this.listeners_[t];i||(i=this.listeners_[t]=[]),-1===i.indexOf(e)&&i.push(e)},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new k(t):t,i=e.type;e.target=this;var n,o=this.listeners_[i];if(o){i in this.dispatching_||(this.dispatching_[i]=0,this.pendingRemovals_[i]=0),++this.dispatching_[i];for(var r=0,s=o.length;r<s;++r)if(!1===o[r].call(this,e)||e.propagationStopped){n=!1;break}if(--this.dispatching_[i],0===this.dispatching_[i]){var a=this.pendingRemovals_[i];for(delete this.pendingRemovals_[i];a--;)this.removeEventListener(i,P);delete this.dispatching_[i]}return n}},e.prototype.disposeInternal=function(){!function(t){var e=T(t);if(e)for(var i in e)S(t,i)}(this)},e.prototype.getListeners=function(t){return this.listeners_[t]},e.prototype.hasListener=function(t){return t?t in this.listeners_:Object.keys(this.listeners_).length>0},e.prototype.removeEventListener=function(t,e){var i=this.listeners_[t];if(i){var n=i.indexOf(e);t in this.pendingRemovals_?(i[n]=P,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t])}},e}(w),N={CHANGE:"change",CLEAR:"clear",CONTEXTMENU:"contextmenu",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"};var G=function(t){function e(){t.call(this),this.revision_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){++this.revision_,this.dispatchEvent(N.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var i=t.length,n=new Array(i),o=0;o<i;++o)n[o]=C(this,t[o],e);return n}return C(this,t,e)},e.prototype.once=function(t,e){if(Array.isArray(t)){for(var i=t.length,n=new Array(i),o=0;o<i;++o)n[o]=R(this,t[o],e);return n}return R(this,t,e)},e.prototype.un=function(t,e){if(Array.isArray(t))for(var i=0,n=t.length;i<n;++i)b(this,t[i],e);else b(this,t,e)},e}(D),Y=function(t){function e(e,i,n){t.call(this,e),this.key=i,this.oldValue=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k),X={};function z(t){return X.hasOwnProperty(t)?X[t]:X[t]="change:"+t}var j=function(t){function e(e){t.call(this),c(this),this.values_={},void 0!==e&&this.setProperties(e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){var e;return this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return Object.keys(this.values_)},e.prototype.getProperties=function(){return g({},this.values_)},e.prototype.notify=function(t,e){var i;i=z(t),this.dispatchEvent(new Y(i,t,e)),i=_,this.dispatchEvent(new Y(i,t,e))},e.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)}},e.prototype.setProperties=function(t,e){for(var i in t)this.set(i,t[i],e)},e.prototype.unset=function(t,e){if(t in this.values_){var i=this.values_[t];delete this.values_[t],e||this.notify(t,i)}},e}(G),W="length",B=function(t){function e(e,i){t.call(this,e),this.element=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k),U=function(t){function e(e,i){t.call(this);var n=i||{};if(this.unique_=!!n.unique,this.array_=e||[],this.unique_)for(var o=0,r=this.array_.length;o<r;++o)this.assertUnique_(this.array_[o],o);this.updateLength_()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;e<i;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)t(e[i],i,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(W)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new B(f.ADD,e))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new B(f.REMOVE,e)),e},e.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 B(f.REMOVE,n)),this.dispatchEvent(new B(f.ADD,e))}else{for(var o=i;o<t;++o)this.insertAt(o,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(W,this.array_.length)},e.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 d(58)},e}(j),K=function(t){function e(e,i,n){t.call(this,e),this.map=i,this.frameState=void 0!==n?n:null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k),V=function(t){function e(e,i,n,o,r){t.call(this,e,i,r),this.originalEvent=n,this.pixel=i.getEventPixel(n),this.coordinate=i.getCoordinateFromPixel(this.pixel),this.dragging=void 0!==o&&o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()},e}(K),H=["experimental-webgl","webgl","webkit-3d","moz-webgl"];var Z;if("undefined"!=typeof window&&"WebGLRenderingContext"in window)try{var $=function(t,e){for(var i=H.length,n=0;n<i;++n)try{var o=t.getContext(H[n],e);if(o)return o}catch(t){}return null}(document.createElement("canvas"),{failIfMajorPerformanceCaveat:!0});$&&(!0,Z=$.getParameter($.MAX_TEXTURE_SIZE),$.getSupportedExtensions())}catch(t){}var q="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",J=-1!==q.indexOf("firefox"),Q=-1!==q.indexOf("safari")&&-1==q.indexOf("chrom"),tt=-1!==q.indexOf("webkit")&&-1==q.indexOf("edge"),et=-1!==q.indexOf("macintosh"),it=window.devicePixelRatio||1,nt=function(){var t=!1;try{t=!!document.createElement("canvas").getContext("2d").setLineDash}catch(t){}return t}(),ot=(navigator,"ontouchstart"in window),rt="PointerEvent"in window,st=!!navigator.msPointerEnabled,at={SINGLECLICK:"singleclick",CLICK:N.CLICK,DBLCLICK:N.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},ht=function(t){function e(e,i,n,o,r){t.call(this,e,i,n.originalEvent,o,r),this.pointerEvent=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(V),lt={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},ut=function(t,e){this.dispatcher=t,this.mapping_=e};ut.prototype.getEvents=function(){return Object.keys(this.mapping_)},ut.prototype.getHandlerForEvent=function(t){return this.mapping_[t]};var ct=ut,pt=1,dt="mouse";function ft(t){if(!this.isEventSimulatedFromTouch_(t)){pt.toString()in this.pointerMap&&this.cancel(t);var e=mt(t,this.dispatcher);this.pointerMap[pt.toString()]=t,this.dispatcher.down(e,t)}}function _t(t){if(!this.isEventSimulatedFromTouch_(t)){var e=mt(t,this.dispatcher);this.dispatcher.move(e,t)}}function gt(t){if(!this.isEventSimulatedFromTouch_(t)){var e=this.pointerMap[pt.toString()];if(e&&e.button===t.button){var i=mt(t,this.dispatcher);this.dispatcher.up(i,t),this.cleanupMouse()}}}function vt(t){if(!this.isEventSimulatedFromTouch_(t)){var e=mt(t,this.dispatcher);this.dispatcher.enterOver(e,t)}}function yt(t){if(!this.isEventSimulatedFromTouch_(t)){var e=mt(t,this.dispatcher);this.dispatcher.leaveOut(e,t)}}function mt(t,e){var i=e.cloneEvent(t,t),n=i.preventDefault;return i.preventDefault=function(){t.preventDefault(),n()},i.pointerId=pt,i.isPrimary=!0,i.pointerType=dt,i}var Et=function(t){function e(e){var i={mousedown:ft,mousemove:_t,mouseup:gt,mouseover:vt,mouseout:yt};t.call(this,e,i),this.pointerMap=e.pointerMap,this.lastTouches=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isEventSimulatedFromTouch_=function(t){for(var e=this.lastTouches,i=t.clientX,n=t.clientY,o=0,r=e.length,s=void 0;o<r&&(s=e[o]);o++){var a=Math.abs(i-s[0]),h=Math.abs(n-s[1]);if(a<=25&&h<=25)return!0}return!1},e.prototype.cancel=function(t){var e=mt(t,this.dispatcher);this.dispatcher.cancel(e,t),this.cleanupMouse()},e.prototype.cleanupMouse=function(){delete this.pointerMap[pt.toString()]},e}(ct),xt=["","unavailable","touch","pen","mouse"];function Tt(t){this.pointerMap[t.pointerId.toString()]=t;var e=this.prepareEvent_(t);this.dispatcher.down(e,t)}function St(t){var e=this.prepareEvent_(t);this.dispatcher.move(e,t)}function Ct(t){var e=this.prepareEvent_(t);this.dispatcher.up(e,t),this.cleanup(t.pointerId)}function Rt(t){var e=this.prepareEvent_(t);this.dispatcher.leaveOut(e,t)}function bt(t){var e=this.prepareEvent_(t);this.dispatcher.enterOver(e,t)}function It(t){var e=this.prepareEvent_(t);this.dispatcher.cancel(e,t),this.cleanup(t.pointerId)}function Ot(t){var e=this.dispatcher.makeEvent("lostpointercapture",t,t);this.dispatcher.dispatchEvent(e)}function wt(t){var e=this.dispatcher.makeEvent("gotpointercapture",t,t);this.dispatcher.dispatchEvent(e)}var Mt=function(t){function e(e){var i={MSPointerDown:Tt,MSPointerMove:St,MSPointerUp:Ct,MSPointerOut:Rt,MSPointerOver:bt,MSPointerCancel:It,MSGotPointerCapture:wt,MSLostPointerCapture:Ot};t.call(this,e,i),this.pointerMap=e.pointerMap}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvent_=function(t){var e=t;return"number"==typeof t.pointerType&&((e=this.dispatcher.cloneEvent(t,t)).pointerType=xt[t.pointerType]),e},e.prototype.cleanup=function(t){delete this.pointerMap[t.toString()]},e}(ct);function Lt(t){this.dispatcher.fireNativeEvent(t)}function Pt(t){this.dispatcher.fireNativeEvent(t)}function At(t){this.dispatcher.fireNativeEvent(t)}function Ft(t){this.dispatcher.fireNativeEvent(t)}function kt(t){this.dispatcher.fireNativeEvent(t)}function Dt(t){this.dispatcher.fireNativeEvent(t)}function Nt(t){this.dispatcher.fireNativeEvent(t)}function Gt(t){this.dispatcher.fireNativeEvent(t)}var Yt=function(t){function e(e){var i={pointerdown:Lt,pointermove:Pt,pointerup:At,pointerout:Ft,pointerover:kt,pointercancel:Dt,gotpointercapture:Gt,lostpointercapture:Nt};t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ct),Xt=!1,zt=function(t){function e(e,i,n){t.call(this,e),this.originalEvent=i;var o=n||{};this.buttons=function(t){var e;if(t.buttons||Xt)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}(o),this.pressure=function(t,e){var i=0;i=t.pressure?t.pressure:e?.5:0;return i}(o,this.buttons),this.bubbles="bubbles"in o&&o.bubbles,this.cancelable="cancelable"in o&&o.cancelable,this.view="view"in o?o.view:null,this.detail="detail"in o?o.detail:null,this.screenX="screenX"in o?o.screenX:0,this.screenY="screenY"in o?o.screenY:0,this.clientX="clientX"in o?o.clientX:0,this.clientY="clientY"in o?o.clientY:0,this.ctrlKey="ctrlKey"in o&&o.ctrlKey,this.altKey="altKey"in o&&o.altKey,this.shiftKey="shiftKey"in o&&o.shiftKey,this.metaKey="metaKey"in o&&o.metaKey,this.button="button"in o?o.button:0,this.relatedTarget="relatedTarget"in o?o.relatedTarget:null,this.pointerId="pointerId"in o?o.pointerId:0,this.width="width"in o?o.width:0,this.height="height"in o?o.height:0,this.tiltX="tiltX"in o?o.tiltX:0,this.tiltY="tiltY"in o?o.tiltY:0,this.pointerType="pointerType"in o?o.pointerType:"",this.hwTimestamp="hwTimestamp"in o?o.hwTimestamp:0,this.isPrimary="isPrimary"in o&&o.isPrimary,i.preventDefault&&(this.preventDefault=function(){i.preventDefault()})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k);!function(){try{var t=new MouseEvent("click",{buttons:1});Xt=1===t.buttons}catch(t){}}();var jt=zt;function Wt(t,e){return t>e?1:t<e?-1:0}function Bt(t,e){return t.indexOf(e)>=0}function Ut(t,e,i){var n,o=t.length;if(t[0]<=e)return 0;if(e<=t[o-1])return o-1;if(i>0){for(n=1;n<o;++n)if(t[n]<e)return n-1}else if(i<0){for(n=1;n<o;++n)if(t[n]<=e)return n}else for(n=1;n<o;++n){if(t[n]==e)return n;if(t[n]<e)return t[n-1]-e<e-t[n]?n-1:n}return o-1}function Kt(t,e,i){for(;e<i;){var n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function Vt(t,e){for(var i=Array.isArray(e)?e:[e],n=i.length,o=0;o<n;o++)t[t.length]=i[o]}function Ht(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}function Zt(t){this.vacuumTouches_(t),this.setPrimaryTouch_(t.changedTouches[0]),this.dedupSynthMouse_(t),this.clickCount_++,this.processTouches_(t,this.overDown_)}function $t(t){this.processTouches_(t,this.moveOverOut_)}function qt(t){this.dedupSynthMouse_(t),this.processTouches_(t,this.upOut_)}function Jt(t){this.processTouches_(t,this.cancelOut_)}var Qt=function(t){function e(e,i){var n={touchstart:Zt,touchmove:$t,touchend:qt,touchcancel:Jt};t.call(this,e,n),this.pointerMap=e.pointerMap,this.mouseSource=i,this.firstTouchId_=void 0,this.clickCount_=0,this.resetId_,this.dedupTimeout_=2500}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isPrimaryTouch_=function(t){return this.firstTouchId_===t.identifier},e.prototype.setPrimaryTouch_=function(t){var e=Object.keys(this.pointerMap).length;(0===e||1===e&&pt.toString()in this.pointerMap)&&(this.firstTouchId_=t.identifier,this.cancelResetClickCount_())},e.prototype.removePrimaryPointer_=function(t){t.isPrimary&&(this.firstTouchId_=void 0,this.resetClickCount_())},e.prototype.resetClickCount_=function(){this.resetId_=setTimeout(this.resetClickCountHandler_.bind(this),200)},e.prototype.resetClickCountHandler_=function(){this.clickCount_=0,this.resetId_=void 0},e.prototype.cancelResetClickCount_=function(){void 0!==this.resetId_&&clearTimeout(this.resetId_)},e.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.radiusX||0,i.height=e.radiusY||0,i.pressure=e.force||.5,i.isPrimary=this.isPrimaryTouch_(e),i.pointerType="touch",i.clientX=e.clientX,i.clientY=e.clientY,i.screenX=e.screenX,i.screenY=e.screenY,i},e.prototype.processTouches_=function(t,e){var i=Array.prototype.slice.call(t.changedTouches),n=i.length;function o(){t.preventDefault()}for(var r=0;r<n;++r){var s=this.touchToPointer_(t,i[r]);s.preventDefault=o,e.call(this,t,s)}},e.prototype.findTouch_=function(t,e){for(var i=t.length,n=0;n<i;n++){if(t[n].identifier===e)return!0}return!1},e.prototype.vacuumTouches_=function(t){var e=t.touches,i=Object.keys(this.pointerMap),n=i.length;if(n>=e.length){for(var o=[],r=0;r<n;++r){var s=Number(i[r]),a=this.pointerMap[s];s==pt||this.findTouch_(e,s-2)||o.push(a.out)}for(var h=0;h<o.length;++h)this.cancelOut_(t,o[h])}},e.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)},e.prototype.moveOverOut_=function(t,e){var i=e,n=this.pointerMap[i.pointerId];if(n){var o=n.out,r=n.outTarget;this.dispatcher.move(i,t),o&&r!==i.target&&(o.relatedTarget=i.target,i.relatedTarget=r,o.target=r,i.target?(this.dispatcher.leaveOut(o,t),this.dispatcher.enterOver(i,t)):(i.target=r,i.relatedTarget=null,this.cancelOut_(t,i))),n.out=i,n.outTarget=i.target}},e.prototype.upOut_=function(t,e){this.dispatcher.up(e,t),this.dispatcher.out(e,t),this.dispatcher.leave(e,t),this.cleanUpPointer_(e)},e.prototype.cancelOut_=function(t,e){this.dispatcher.cancel(e,t),this.dispatcher.out(e,t),this.dispatcher.leave(e,t),this.cleanUpPointer_(e)},e.prototype.cleanUpPointer_=function(t){delete this.pointerMap[t.pointerId],this.removePrimaryPointer_(t)},e.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(){var t,i,o;i=n,o=(t=e).indexOf(i),o>-1&&t.splice(o,1)},this.dedupTimeout_)}},e}(ct),te=[["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]],ee=function(t){function e(e){t.call(this),this.element_=e,this.pointerMap={},this.eventMap_={},this.eventSourceList_=[],this.registerSources()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.registerSources=function(){if(rt)this.registerSource("native",new Yt(this));else if(st)this.registerSource("ms",new Mt(this));else{var t=new Et(this);this.registerSource("mouse",t),ot&&this.registerSource("touch",new Qt(this,t))}this.register_()},e.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))}.bind(this)),this.eventSourceList_.push(i))},e.prototype.register_=function(){for(var t=this.eventSourceList_.length,e=0;e<t;e++){var i=this.eventSourceList_[e];this.addEvents_(i.getEvents())}},e.prototype.unregister_=function(){for(var t=this.eventSourceList_.length,e=0;e<t;e++){var i=this.eventSourceList_[e];this.removeEvents_(i.getEvents())}},e.prototype.eventHandler_=function(t){var e=t.type,i=this.eventMap_[e];i&&i(t)},e.prototype.addEvents_=function(t){t.forEach(function(t){C(this.element_,t,this.eventHandler_,this)}.bind(this))},e.prototype.removeEvents_=function(t){t.forEach(function(t){b(this.element_,t,this.eventHandler_,this)}.bind(this))},e.prototype.cloneEvent=function(t,e){for(var i={},n=0,o=te.length;n<o;n++){var r=te[n][0];i[r]=t[r]||e[r]||te[n][1]}return i},e.prototype.down=function(t,e){this.fireEvent(lt.POINTERDOWN,t,e)},e.prototype.move=function(t,e){this.fireEvent(lt.POINTERMOVE,t,e)},e.prototype.up=function(t,e){this.fireEvent(lt.POINTERUP,t,e)},e.prototype.enter=function(t,e){t.bubbles=!1,this.fireEvent(lt.POINTERENTER,t,e)},e.prototype.leave=function(t,e){t.bubbles=!1,this.fireEvent(lt.POINTERLEAVE,t,e)},e.prototype.over=function(t,e){t.bubbles=!0,this.fireEvent(lt.POINTEROVER,t,e)},e.prototype.out=function(t,e){t.bubbles=!0,this.fireEvent(lt.POINTEROUT,t,e)},e.prototype.cancel=function(t,e){this.fireEvent(lt.POINTERCANCEL,t,e)},e.prototype.leaveOut=function(t,e){this.out(t,e),this.contains_(t.target,t.relatedTarget)||this.leave(t,e)},e.prototype.enterOver=function(t,e){this.over(t,e),this.contains_(t.target,t.relatedTarget)||this.enter(t,e)},e.prototype.contains_=function(t,e){return!(!t||!e)&&t.contains(e)},e.prototype.makeEvent=function(t,e,i){return new jt(t,i,e)},e.prototype.fireEvent=function(t,e,i){var n=this.makeEvent(t,e,i);this.dispatchEvent(n)},e.prototype.fireNativeEvent=function(t){var e=this.makeEvent(t.type,t,t);this.dispatchEvent(e)},e.prototype.wrapMouseEvent=function(t,e){return this.makeEvent(t,mt(e,this),e)},e.prototype.disposeInternal=function(){this.unregister_(),t.prototype.disposeInternal.call(this)},e}(D),ie=function(t){function e(e,i){t.call(this),this.map_=e,this.clickTimeoutId_,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=i?i*it:it,this.down_=null;var n=this.map_.getViewport();this.activePointers_=0,this.trackedTouches_={},this.pointerEventHandler_=new ee(n),this.documentPointerEventHandler_=null,this.pointerdownListenerKey_=C(this.pointerEventHandler_,lt.POINTERDOWN,this.handlePointerDown_,this),this.relayedListenerKey_=C(this.pointerEventHandler_,lt.POINTERMOVE,this.relayEvent_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.emulateClick_=function(t){var e=new ht(at.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new ht(at.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new ht(at.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==at.POINTERUP||e.type==at.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==at.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new ht(at.POINTERUP,this.map_,t);this.dispatchEvent(e),e.propagationStopped||this.dragging_||!this.isMouseActionButton_(t)||this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(I),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null,this.documentPointerEventHandler_.dispose(),this.documentPointerEventHandler_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.updateActivePointers_(t);var e=new ht(at.POINTERDOWN,this.map_,t);this.dispatchEvent(e),this.down_=t,0===this.dragListenerKeys_.length&&(this.documentPointerEventHandler_=new ee(document),this.dragListenerKeys_.push(C(this.documentPointerEventHandler_,at.POINTERMOVE,this.handlePointerMove_,this),C(this.documentPointerEventHandler_,at.POINTERUP,this.handlePointerUp_,this),C(this.pointerEventHandler_,at.POINTERCANCEL,this.handlePointerUp_,this)))},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new ht(at.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}t.preventDefault()},e.prototype.relayEvent_=function(t){var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new ht(t.type,this.map_,t,e))},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(I(this.relayedListenerKey_),this.relayedListenerKey_=null),this.pointerdownListenerKey_&&(I(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(I),this.dragListenerKeys_.length=0,this.documentPointerEventHandler_&&(this.documentPointerEventHandler_.dispose(),this.documentPointerEventHandler_=null),this.pointerEventHandler_&&(this.pointerEventHandler_.dispose(),this.pointerEventHandler_=null),t.prototype.disposeInternal.call(this)},e}(D),ne="postrender",oe="movestart",re="moveend",se={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},ae={POSTCOMPOSE:"postcompose",PRECOMPOSE:"precompose",RENDER:"render",RENDERCOMPLETE:"rendercomplete"},he={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4,ABORT:5};function le(t,e){if(!t)throw new d(e)}var ue=function(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}};ue.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,v(this.queuedElements_)},ue.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},ue.prototype.enqueue=function(t){le(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=1/0&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},ue.prototype.getCount=function(){return this.elements_.length},ue.prototype.getLeftChildIndex_=function(t){return 2*t+1},ue.prototype.getRightChildIndex_=function(t){return 2*t+2},ue.prototype.getParentIndex_=function(t){return t-1>>1},ue.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},ue.prototype.isEmpty=function(){return 0===this.elements_.length},ue.prototype.isKeyQueued=function(t){return t in this.queuedElements_},ue.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},ue.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,n=e.length,o=e[t],r=i[t],s=t;t<n>>1;){var a=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),l=h<n&&i[h]<i[a]?h:a;e[t]=e[l],i[t]=i[l],t=l}e[t]=o,i[t]=r,this.siftDown_(s,t)},ue.prototype.siftDown_=function(t,e){for(var i=this.elements_,n=this.priorities_,o=i[e],r=n[e];e>t;){var s=this.getParentIndex_(e);if(!(n[s]>r))break;i[e]=i[s],n[e]=n[s],e=s}i[e]=o,n[e]=r},ue.prototype.reprioritize=function(){var t,e,i,n=this.priorityFunction_,o=this.elements_,r=this.priorities_,s=0,a=o.length;for(e=0;e<a;++e)(i=n(t=o[e]))==1/0?delete this.queuedElements_[this.keyFunction_(t)]:(r[s]=i,o[s++]=t);o.length=s,r.length=s,this.heapify_()};var ce=function(t){function e(e,i){t.call(this,function(t){return e.apply(null,t)},function(t){return t[0].getKey()}),this.tileChangeCallback_=i,this.tilesLoading_=0,this.tilesLoadingKeys_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.enqueue=function(e){var i=t.prototype.enqueue.call(this,e);i&&C(e[0],N.CHANGE,this.handleTileChange,this);return i},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,i=e.getState();if(i===he.LOADED||i===he.ERROR||i===he.EMPTY||i===he.ABORT){b(e,N.CHANGE,this.handleTileChange,this);var n=e.getKey();n in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[n],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var i,n,o,r=0,s=!1;this.tilesLoading_<t&&r<e&&this.getCount()>0;)o=(n=this.dequeue()[0]).getKey(),(i=n.getState())===he.ABORT?s=!0:i!==he.IDLE||o in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[o]=!0,++this.tilesLoading_,++r,n.load());0===r&&s&&this.tileChangeCallback_()},e}(ue),pe=42,de=256;function fe(t,e,i){return Math.min(Math.max(t,e),i)}var _e="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2};function ge(t,e,i,n,o,r){var s=o-i,a=r-n;if(0!==s||0!==a){var h=((t-i)*s+(e-n)*a)/(s*s+a*a);h>1?(i=o,n=r):h>0&&(i+=s*h,n+=a*h)}return ve(t,e,i,n)}function ve(t,e,i,n){var o=i-t,r=n-e;return o*o+r*r}function ye(t){return t*Math.PI/180}function me(t,e){var i=t%e;return i*e<0?i+e:i}function Ee(t,e,i){return t+i*(e-t)}function xe(t){return t}function Te(t,e){return void 0!==t?0:void 0}function Se(t,e){return void 0!==t?t+e:void 0}var Ce=0,Re=1,be="center",Ie="resolution",Oe="rotation";function we(t,e){return t[0]+=e[0],t[1]+=e[1],t}function Me(t,e){for(var i=!0,n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function Le(t,e){var i=Math.cos(e),n=Math.sin(e),o=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;return t[0]=o,t[1]=r,t}function Pe(t,e){return t[0]*=e,t[1]*=e,t}function Ae(t){return Math.pow(t,3)}function Fe(t){return 1-Ae(1-t)}function ke(t){return 3*t*t-2*t*t*t}function De(t){return t}var Ne={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},Ge={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Ye(t){for(var e=Ve(),i=0,n=t.length;i<n;++i)ti(e,t[i]);return e}function Xe(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]}function ze(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function je(t,e,i){var n,o;return(n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*n+(o=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*o}function We(t,e){return Ue(t,e[0],e[1])}function Be(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Ue(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function Ke(t,e){var i=t[0],n=t[1],o=t[2],r=t[3],s=e[0],a=e[1],h=Ge.UNKNOWN;return s<i?h|=Ge.LEFT:s>o&&(h|=Ge.RIGHT),a<n?h|=Ge.BELOW:a>r&&(h|=Ge.ABOVE),h===Ge.UNKNOWN&&(h=Ge.INTERSECTING),h}function Ve(){return[1/0,1/0,-1/0,-1/0]}function He(t,e,i,n,o){return o?(o[0]=t,o[1]=e,o[2]=i,o[3]=n,o):[t,e,i,n]}function Ze(t){return He(1/0,1/0,-1/0,-1/0,t)}function $e(t,e){var i=t[0],n=t[1];return He(i,n,i,n,e)}function qe(t,e,i,n,o){return ii(Ze(o),t,e,i,n)}function Je(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Qe(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}function ti(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])}function ei(t,e){for(var i=0,n=e.length;i<n;++i)ti(t,e[i]);return t}function ii(t,e,i,n,o){for(;i<n;i+=o)ni(t,e[i],e[i+1]);return t}function ni(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)}function oi(t,e,i){var n;return(n=e.call(i,si(t)))?n:(n=e.call(i,ai(t)))?n:(n=e.call(i,di(t)))?n:(n=e.call(i,pi(t)))||!1}function ri(t){var e=0;return gi(t)||(e=fi(t)*ui(t)),e}function si(t){return[t[0],t[1]]}function ai(t){return[t[2],t[1]]}function hi(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function li(t,e,i,n,o){var r=e*n[0]/2,s=e*n[1]/2,a=Math.cos(i),h=Math.sin(i),l=r*a,u=r*h,c=s*a,p=s*h,d=t[0],f=t[1],_=d-l+p,g=d-l-p,v=d+l-p,y=d+l+p,m=f-u-c,E=f-u+c,x=f+u+c,T=f+u-c;return He(Math.min(_,g,v,y),Math.min(m,E,x,T),Math.max(_,g,v,y),Math.max(m,E,x,T),o)}function ui(t){return t[3]-t[1]}function ci(t,e,i){var n=i||[1/0,1/0,-1/0,-1/0];return _i(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]):Ze(n),n}function pi(t){return[t[0],t[3]]}function di(t){return[t[2],t[3]]}function fi(t){return t[2]-t[0]}function _i(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function gi(t){return t[2]<t[0]||t[3]<t[1]}function vi(t,e,i){var n=[t[0],t[1],t[0],t[3],t[2],t[1],t[2],t[3]];return e(n,n,2),function(t,e,i){return He(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),i)}([n[0],n[2],n[4],n[6]],[n[1],n[3],n[5],n[7]],i)}var yi={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"},mi={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};function Ei(t,e,i,n,o,r){for(var s=r||[],a=0,h=e;h<i;h+=n){var l=t[h],u=t[h+1];s[a++]=o[0]*l+o[2]*u+o[4],s[a++]=o[1]*l+o[3]*u+o[5]}return r&&s.length!=a&&(s.length=a),s}var xi=6371008.8;function Ti(t,e,i){var n=i||xi,o=ye(t[1]),r=ye(e[1]),s=(r-o)/2,a=ye(e[0]-t[0])/2,h=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(o)*Math.cos(r);return 2*n*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}var Si={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Ci={};Ci[Si.DEGREES]=2*Math.PI*6370997/360,Ci[Si.FEET]=.3048,Ci[Si.METERS]=1,Ci[Si.USFEET]=1200/3937;var Ri=Si,bi=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};bi.prototype.canWrapX=function(){return this.canWrapX_},bi.prototype.getCode=function(){return this.code_},bi.prototype.getExtent=function(){return this.extent_},bi.prototype.getUnits=function(){return this.units_},bi.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Ci[this.units_]},bi.prototype.getWorldExtent=function(){return this.worldExtent_},bi.prototype.getAxisOrientation=function(){return this.axisOrientation_},bi.prototype.isGlobal=function(){return this.global_},bi.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},bi.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},bi.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},bi.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},bi.prototype.setWorldExtent=function(t){this.worldExtent_=t},bi.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},bi.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_};var Ii=bi,Oi=6378137,wi=Math.PI*Oi,Mi=[-wi,-wi,wi,wi],Li=[-180,-85,180,85],Pi=function(t){function e(e){t.call(this,{code:e,units:Ri.METERS,extent:Mi,global:!0,worldExtent:Li,getPointResolution:function(t,e){return t/_e(e[1]/Oi)}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ii),Ai=[new Pi("EPSG:3857"),new Pi("EPSG:102100"),new Pi("EPSG:102113"),new Pi("EPSG:900913"),new Pi("urn:ogc:def:crs:EPSG:6.18:3:3857"),new Pi("urn:ogc:def:crs:EPSG::3857"),new Pi("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Fi(t,e,i){var n=t.length,o=i>1?i:2,r=e;void 0===r&&(r=o>2?t.slice():new Array(n));for(var s=wi,a=0;a<n;a+=o){r[a]=s*t[a]/180;var h=Oi*Math.log(Math.tan(Math.PI*(t[a+1]+90)/360));h>s?h=s:h<-s&&(h=-s),r[a+1]=h}return r}function ki(t,e,i){var n=t.length,o=i>1?i:2,r=e;void 0===r&&(r=o>2?t.slice():new Array(n));for(var s=0;s<n;s+=o)r[s]=180*t[s]/wi,r[s+1]=360*Math.atan(Math.exp(t[s+1]/Oi))/Math.PI-90;return r}var Di=[-180,-90,180,90],Ni=6378137*Math.PI/180,Gi=function(t){function e(e,i){t.call(this,{code:e,units:Ri.DEGREES,extent:Di,axisOrientation:i,global:!0,metersPerUnit:Ni,worldExtent:Di})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ii),Yi=[new Gi("CRS:84"),new Gi("EPSG:4326","neu"),new Gi("urn:ogc:def:crs:EPSG::4326","neu"),new Gi("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Gi("urn:ogc:def:crs:OGC:1.3:CRS84"),new Gi("urn:ogc:def:crs:OGC:2:84"),new Gi("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Gi("urn:x-ogc:def:crs:EPSG:4326","neu")],Xi={};var zi,ji,Wi,Bi={};function Ui(t,e,i){var n=t.getCode(),o=e.getCode();n in Bi||(Bi[n]={}),Bi[n][o]=i}function Ki(t,e,i){var n;if(void 0!==e){for(var o=0,r=t.length;o<r;++o)e[o]=t[o];n=e}else n=t.slice();return n}function Vi(t,e,i){if(void 0!==e&&t!==e){for(var n=0,o=t.length;n<o;++n)e[n]=t[n];t=e}return t}function Hi(t){!function(t,e){Xi[t]=e}(t.getCode(),t),Ui(t,t,Ki)}function Zi(t){return"string"==typeof t?Xi[t]||null:t||null}function $i(t,e,i,n){var o,r=(t=Zi(t)).getPointResolutionFunc();if(r)o=r(e,i);else if(t.getUnits()==Ri.DEGREES&&!n||n==Ri.DEGREES)o=e;else{var s=tn(t,Zi("EPSG:4326")),a=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];o=(Ti((a=s(a,a,2)).slice(0,2),a.slice(2,4))+Ti(a.slice(4,6),a.slice(6,8)))/2;var h=n?Ci[n]:t.getMetersPerUnit();void 0!==h&&(o/=h)}return o}function qi(t){!function(t){t.forEach(Hi)}(t),t.forEach(function(e){t.forEach(function(t){e!==t&&Ui(e,t,Ki)})})}function Ji(t,e){return t?"string"==typeof t?Zi(t):t:Zi(e)}function Qi(t,e){if(t===e)return!0;var i=t.getUnits()===e.getUnits();return t.getCode()===e.getCode()?i:tn(t,e)===Ki&&i}function tn(t,e){var i=function(t,e){var i;return t in Bi&&e in Bi[t]&&(i=Bi[t][e]),i}(t.getCode(),e.getCode());return i||(i=Vi),i}function en(t,e){return tn(Zi(t),Zi(e))}function nn(t,e,i){return en(e,i)(t,void 0,t.length)}qi(Ai),qi(Yi),zi=Ai,ji=Fi,Wi=ki,Yi.forEach(function(t){zi.forEach(function(e){Ui(t,e,ji),Ui(e,t,Wi)})});var on=new Array(6);function rn(t){return an(t,1,0,0,1,0,0)}function sn(t,e){var i=t[0],n=t[1],o=t[2],r=t[3],s=t[4],a=t[5],h=e[0],l=e[1],u=e[2],c=e[3],p=e[4],d=e[5];return t[0]=i*h+o*l,t[1]=n*h+r*l,t[2]=i*u+o*c,t[3]=n*u+r*c,t[4]=i*p+o*d+s,t[5]=n*p+r*d+a,t}function an(t,e,i,n,o,r,s){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t[4]=r,t[5]=s,t}function hn(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}function ln(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}function un(t,e,i){return sn(t,an(on,e,0,0,i,0,0))}function cn(t,e,i){return sn(t,an(on,1,0,0,1,e,i))}function pn(t,e,i,n,o,r,s,a){var h=Math.sin(r),l=Math.cos(r);return t[0]=n*l,t[1]=o*h,t[2]=-n*h,t[3]=o*l,t[4]=s*n*l-a*n*h+e,t[5]=s*o*h+a*o*l+i,t}var dn=[1,0,0,1,0,0];function fn(t){var e;return t==mi.XY?e=2:t==mi.XYZ||t==mi.XYM?e=3:t==mi.XYZM&&(e=4),e}var _n=function(t){function e(){t.call(this),this.layout=mi.XY,this.stride=2,this.flatCoordinates=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeExtent=function(t){return qe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return l()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!=this.getRevision()&&(v(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)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=fn(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){l()},e.prototype.setLayout=function(t,e,i){var n;if(t)n=fn(t);else{for(var o=0;o<i;++o){if(0===e.length)return this.layout=mi.XY,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=mi.XY:3==t?e=mi.XYZ:4==t&&(e=mi.XYZM);return e}(n=e.length)}this.layout=t,this.stride=n},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();!function(t,e,i,n,o,r,s){for(var a=s||[],h=Math.cos(o),l=Math.sin(o),u=r[0],c=r[1],p=0,d=e;d<i;d+=n){var f=t[d]-u,_=t[d+1]-c;a[p++]=u+f*h-_*l,a[p++]=c+f*l+_*h;for(var g=d+2;g<d+n;++g)a[p++]=t[g]}s&&a.length!=p&&(a.length=p)}(i,0,i.length,n,t,e,i),this.changed()}},e.prototype.scale=function(t,e,i){var n=e;void 0===n&&(n=t);var o=i;o||(o=hi(this.getExtent()));var r=this.getFlatCoordinates();if(r){var s=this.getStride();!function(t,e,i,n,o,r,s,a){for(var h=a||[],l=s[0],u=s[1],c=0,p=e;p<i;p+=n){var d=t[p]-l,f=t[p+1]-u;h[c++]=l+o*d,h[c++]=u+r*f;for(var _=p+2;_<p+n;++_)h[c++]=t[_]}a&&h.length!=c&&(h.length=c)}(r,0,r.length,s,t,n,o,r),this.changed()}},e.prototype.translate=function(t,e){var i=this.getFlatCoordinates();if(i){var n=this.getStride();!function(t,e,i,n,o,r,s){for(var a=s||[],h=0,l=e;l<i;l+=n){a[h++]=t[l]+o,a[h++]=t[l+1]+r;for(var u=l+2;u<l+n;++u)a[h++]=t[u]}s&&a.length!=h&&(a.length=h)}(i,0,i.length,n,t,e,i),this.changed()}},e}(function(t){function e(){t.call(this),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryCache={},this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return l()},e.prototype.closestPointXY=function(t,e,i,n){return l()},e.prototype.containsXY=function(t,e){return!1},e.prototype.getClosestPoint=function(t,e){var i=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return l()},e.prototype.getExtent=function(t){return this.extentRevision_!=this.getRevision()&&(this.extent_=this.computeExtent(this.extent_),this.extentRevision_=this.getRevision()),function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){l()},e.prototype.scale=function(t,e,i){l()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return l()},e.prototype.getType=function(){return l()},e.prototype.applyTransform=function(t){l()},e.prototype.intersectsExtent=function(t){return l()},e.prototype.translate=function(t,e){l()},e.prototype.transform=function(t,e){var i=Zi(t),n=i.getUnits()==Ri.TILE_PIXELS?function(t,n,o){var r=i.getExtent(),s=i.getWorldExtent(),a=ui(s)/ui(r);return pn(dn,s[0],s[3],a,-a,0,0,0),Ei(t,0,t.length,o,dn,n),en(i,e)(t,n,o)}:en(i,e);return this.applyTransform(n),this},e}(j));function gn(t,e,i,n){for(var o=0,r=t[i-n],s=t[i-n+1];e<i;e+=n){var a=t[e],h=t[e+1];o+=s*a-r*h,r=a,s=h}return o/2}function vn(t,e,i,n){for(var o=0,r=0,s=i.length;r<s;++r){var a=i[r];o+=gn(t,e,a,n),e=a}return o}function yn(t,e,i,n,o,r,s){var a,h=t[e],l=t[e+1],u=t[i]-h,c=t[i+1]-l;if(0===u&&0===c)a=e;else{var p=((o-h)*u+(r-l)*c)/(u*u+c*c);if(p>1)a=i;else{if(p>0){for(var d=0;d<n;++d)s[d]=Ee(t[e+d],t[i+d],p);return void(s.length=n)}a=e}}for(var f=0;f<n;++f)s[f]=t[a+f];s.length=n}function mn(t,e,i,n,o){var r=t[e],s=t[e+1];for(e+=n;e<i;e+=n){var a=t[e],h=t[e+1],l=ve(r,s,a,h);l>o&&(o=l),r=a,s=h}return o}function En(t,e,i,n,o){for(var r=0,s=i.length;r<s;++r){var a=i[r];o=mn(t,e,a,n,o),e=a}return o}function xn(t,e,i,n,o,r,s,a,h,l,u){if(e==i)return l;var c,p;if(0===o){if((p=ve(s,a,t[e],t[e+1]))<l){for(c=0;c<n;++c)h[c]=t[e+c];return h.length=n,p}return l}for(var d=u||[NaN,NaN],f=e+n;f<i;)if(yn(t,f-n,f,n,s,a,d),(p=ve(s,a,d[0],d[1]))<l){for(l=p,c=0;c<n;++c)h[c]=d[c];h.length=n,f+=n}else f+=n*Math.max((Math.sqrt(p)-Math.sqrt(l))/o|0,1);if(r&&(yn(t,i-n,e,n,s,a,d),(p=ve(s,a,d[0],d[1]))<l)){for(l=p,c=0;c<n;++c)h[c]=d[c];h.length=n}return l}function Tn(t,e,i,n,o,r,s,a,h,l,u){for(var c=u||[NaN,NaN],p=0,d=i.length;p<d;++p){var f=i[p];l=xn(t,e,f,n,o,r,s,a,h,l,c),e=f}return l}function Sn(t,e,i,n){for(var o=0,r=i.length;o<r;++o)t[e++]=i[o];return e}function Cn(t,e,i,n){for(var o=0,r=i.length;o<r;++o)for(var s=i[o],a=0;a<n;++a)t[e++]=s[a];return e}function Rn(t,e,i,n,o){for(var r=o||[],s=0,a=0,h=i.length;a<h;++a){var l=Cn(t,e,i[a],n);r[s++]=l,e=l}return r.length=s,r}function bn(t,e,i,n,o){for(var r=void 0!==o?o:[],s=0,a=e;a<i;a+=n)r[s++]=t.slice(a,a+n);return r.length=s,r}function In(t,e,i,n,o){for(var r=void 0!==o?o:[],s=0,a=0,h=i.length;a<h;++a){var l=i[a];r[s++]=bn(t,e,l,n,r[s]),e=l}return r.length=s,r}function On(t,e,i,n,o){for(var r=void 0!==o?o:[],s=0,a=0,h=i.length;a<h;++a){var l=i[a];r[s++]=In(t,e,l,n,r[s]),e=l[l.length-1]}return r.length=s,r}function wn(t,e,i,n,o,r,s){var a=(i-e)/n;if(a<3){for(;e<i;e+=n)r[s++]=t[e],r[s++]=t[e+1];return s}var h=new Array(a);h[0]=1,h[a-1]=1;for(var l=[e,i-n],u=0;l.length>0;){for(var c=l.pop(),p=l.pop(),d=0,f=t[p],_=t[p+1],g=t[c],v=t[c+1],y=p+n;y<c;y+=n){var m=ge(t[y],t[y+1],f,_,g,v);m>d&&(u=y,d=m)}d>o&&(h[(u-e)/n]=1,p+n<u&&l.push(p,u),u+n<c&&l.push(u,c))}for(var E=0;E<a;++E)h[E]&&(r[s++]=t[e+E*n],r[s++]=t[e+E*n+1]);return s}function Mn(t,e){return e*Math.round(t/e)}function Ln(t,e,i,n,o,r,s){if(e==i)return s;var a,h,l=Mn(t[e],o),u=Mn(t[e+1],o);e+=n,r[s++]=l,r[s++]=u;do{if(a=Mn(t[e],o),h=Mn(t[e+1],o),(e+=n)==i)return r[s++]=a,r[s++]=h,s}while(a==l&&h==u);for(;e<i;){var c=Mn(t[e],o),p=Mn(t[e+1],o);if(e+=n,c!=a||p!=h){var d=a-l,f=h-u,_=c-l,g=p-u;d*g==f*_&&(d<0&&_<d||d==_||d>0&&_>d)&&(f<0&&g<f||f==g||f>0&&g>f)?(a=c,h=p):(r[s++]=a,r[s++]=h,l=a,u=h,a=c,h=p)}}return r[s++]=a,r[s++]=h,s}function Pn(t,e,i,n,o,r,s,a){for(var h=0,l=i.length;h<l;++h){var u=i[h];s=Ln(t,e,u,n,o,r,s),a.push(s),e=u}return s}var An=function(t){function e(e,i){t.call(this),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?this.setCoordinates(e,i):this.setFlatCoordinates(i,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,n){return n<je(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(mn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),xn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.getArea=function(){return gn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return bn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=wn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,mi.XY)},e.prototype.getType=function(){return yi.LINEAR_RING},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Cn(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_n),Fn=function(t){function e(e,i){t.call(this),this.setCoordinates(e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,n){var o=this.flatCoordinates,r=ve(t,e,o[0],o[1]);if(r<n){for(var s=this.stride,a=0;a<s;++a)i[a]=o[a];return i.length=s,r}return n},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return $e(this.flatCoordinates,t)},e.prototype.getType=function(){return yi.POINT},e.prototype.intersectsExtent=function(t){return Ue(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Sn(this.flatCoordinates,0,t,this.stride),this.changed()},e}(_n);function kn(t,e,i,n,o){return!oi(o,function(o){return!Dn(t,e,i,n,o[0],o[1])})}function Dn(t,e,i,n,o,r){for(var s=0,a=t[i-n],h=t[i-n+1];e<i;e+=n){var l=t[e],u=t[e+1];h<=r?u>r&&(l-a)*(r-h)-(o-a)*(u-h)>0&&s++:u<=r&&(l-a)*(r-h)-(o-a)*(u-h)<0&&s--,a=l,h=u}return 0!==s}function Nn(t,e,i,n,o,r){if(0===i.length)return!1;if(!Dn(t,e,i[0],n,o,r))return!1;for(var s=1,a=i.length;s<a;++s)if(Dn(t,i[s-1],i[s],n,o,r))return!1;return!0}function Gn(t,e,i,n,o,r,s){for(var a,h,l,u,c,p,d,f=o[r+1],_=[],g=0,v=i.length;g<v;++g){var y=i[g];for(u=t[y-n],p=t[y-n+1],a=e;a<y;a+=n)c=t[a],d=t[a+1],(f<=p&&d<=f||p<=f&&f<=d)&&(l=(f-p)/(d-p)*(c-u)+u,_.push(l)),u=c,p=d}var m=NaN,E=-1/0;for(_.sort(Wt),u=_[0],a=1,h=_.length;a<h;++a){c=_[a];var x=Math.abs(c-u);x>E&&Nn(t,e,i,n,l=(u+c)/2,f)&&(m=l,E=x),u=c}return isNaN(m)&&(m=o[r]),s?(s.push(m,f,E),s):[m,f,E]}function Yn(t,e,i,n,o,r){for(var s,a=[t[e],t[e+1]],h=[];e+n<i;e+=n){if(h[0]=t[e+n],h[1]=t[e+n+1],s=o.call(r,a,h))return s;a[0]=h[0],a[1]=h[1]}return!1}function Xn(t,e,i,n,o){var r=ii([1/0,1/0,-1/0,-1/0],t,e,i,n);return!!_i(o,r)&&(!!Be(o,r)||(r[0]>=o[0]&&r[2]<=o[2]||(r[1]>=o[1]&&r[3]<=o[3]||Yn(t,e,i,n,function(t,e){return function(t,e,i){var n=!1,o=Ke(t,e),r=Ke(t,i);if(o===Ge.INTERSECTING||r===Ge.INTERSECTING)n=!0;else{var s,a,h=t[0],l=t[1],u=t[2],c=t[3],p=e[0],d=e[1],f=i[0],_=i[1],g=(_-d)/(f-p);r&Ge.ABOVE&&!(o&Ge.ABOVE)&&(n=(s=f-(_-c)/g)>=h&&s<=u),n||!(r&Ge.RIGHT)||o&Ge.RIGHT||(n=(a=_-(f-u)*g)>=l&&a<=c),n||!(r&Ge.BELOW)||o&Ge.BELOW||(n=(s=f-(_-l)/g)>=h&&s<=u),n||!(r&Ge.LEFT)||o&Ge.LEFT||(n=(a=_-(f-h)*g)>=l&&a<=c)}return n}(o,t,e)}))))}function zn(t,e,i,n,o){if(!function(t,e,i,n,o){return!!(Xn(t,e,i,n,o)||Dn(t,e,i,n,o[0],o[1])||Dn(t,e,i,n,o[0],o[3])||Dn(t,e,i,n,o[2],o[1])||Dn(t,e,i,n,o[2],o[3]))}(t,e,i[0],n,o))return!1;if(1===i.length)return!0;for(var r=1,s=i.length;r<s;++r)if(kn(t,i[r-1],i[r],n,o)&&!Xn(t,i[r-1],i[r],n,o))return!1;return!0}function jn(t,e,i,n){for(;e<i-n;){for(var o=0;o<n;++o){var r=t[e+o];t[e+o]=t[i-n+o],t[i-n+o]=r}e+=n,i-=n}}function Wn(t,e,i,n){for(var o=0,r=t[i-n],s=t[i-n+1];e<i;e+=n){var a=t[e],h=t[e+1];o+=(a-r)*(h+s),r=a,s=h}return o>0}function Bn(t,e,i,n,o){for(var r=void 0!==o&&o,s=0,a=i.length;s<a;++s){var h=i[s],l=Wn(t,e,h,n);if(0===s){if(r&&l||!r&&!l)return!1}else if(r&&!l||!r&&l)return!1;e=h}return!0}function Un(t,e,i,n,o){for(var r=void 0!==o&&o,s=0,a=i.length;s<a;++s){var h=i[s],l=Wn(t,e,h,n);(0===s?r&&l||!r&&!l:r&&!l||!r&&l)&&jn(t,e,h,n),e=h}return e}var Kn=function(t){function e(e,i,n){t.call(this),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==i&&n?(this.setFlatCoordinates(i,e),this.ends_=n):this.setCoordinates(e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.appendLinearRing=function(t){this.flatCoordinates?Vt(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice())},e.prototype.closestPointXY=function(t,e,i,n){return n<je(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(En(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Tn(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))},e.prototype.containsXY=function(t,e){return Nn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return vn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Un(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,In(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=hi(this.getExtent());this.flatInteriorPoint_=Gn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new Fn(this.getFlatInteriorPoint(),mi.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new An(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[],o=0,r=0,s=i.length;r<s;++r){var a=i[r],h=new An(e.slice(o,a),t);n.push(h),o=a}return n},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Bn(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Un(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],n=[];return i.length=Pn(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),i,0,n),new e(i,mi.XY,n)},e.prototype.getType=function(){return yi.POLYGON},e.prototype.intersectsExtent=function(t){return zn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=Rn(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(_n),Vn=Kn;function Hn(t){var e=t[0],i=t[1],n=t[2],o=t[3],r=[e,i,e,o,n,o,n,i,e,i];return new Kn(r,mi.XY,[r.length])}var Zn=0;function $n(t,e){setTimeout(function(){t(e)},0)}function qn(t){return!(t.sourceCenter&&t.targetCenter&&!Me(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}var Jn=function(t){function e(e){t.call(this);var i=g({},e);this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.updateAnimations_=this.updateAnimations_.bind(this),this.projection_=Ji(i.projection,"EPSG:3857"),this.applyOptions_(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyOptions_=function(t){var e={};e[be]=void 0!==t.center?t.center:null;var i=function(t){var e,i,n,o=void 0!==t.minZoom?t.minZoom:Zn,r=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2;if(void 0!==t.resolutions){var a=t.resolutions;i=a[o],n=void 0!==a[r]?a[r]:a[a.length-1],e=function(t){return function(e,i,n){if(void 0!==e){var o=Ut(t,e,n);o=fe(o+i,0,t.length-1);var r=Math.floor(o);if(o!=r&&r<t.length-1){var s=t[r]/t[r+1];return t[r]/Math.pow(s,o-r)}return t[r]}}}(a)}else{var h=Ji(t.projection,"EPSG:3857"),l=h.getExtent(),u=l?Math.max(fi(l),ui(l)):360*Ci[Ri.DEGREES]/h.getMetersPerUnit(),c=u/de/Math.pow(2,Zn),p=c/Math.pow(2,28-Zn);void 0!==(i=t.maxResolution)?o=0:i=c/Math.pow(s,o),void 0===(n=t.minResolution)&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(s,r):c/Math.pow(s,r):p),r=o+Math.floor(Math.log(i/n)/Math.log(s)),n=i/Math.pow(s,r-o),e=function(t,e,i){return function(n,o,r){if(void 0!==n){var s=-r/2+.5,a=Math.floor(Math.log(e/n)/Math.log(t)+s),h=Math.max(a+o,0);return void 0!==i&&(h=Math.min(h,i)),e/Math.pow(t,h)}}}(s,i,r-o)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:o,zoomFactor:s}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.minZoom_=i.minZoom;var n=function(t){return void 0!==t.extent?(e=t.extent,function(t){return t?[fe(t[0],e[0],e[2]),fe(t[1],e[1],e[3])]:void 0}):xe;var e}(t),o=i.constraint,r=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?(r=o||ye(5),function(t,e){return void 0!==t?Math.abs(t+e)<=r?0:t+e:void 0}):!1===e?Se:"number"==typeof e?(i=e,n=2*Math.PI/i,function(t,e){return void 0!==t?t=Math.floor((t+e)/n+.5)*n:void 0}):Se}return Te;var i,n;var o,r}(t);this.constraints_={center:n,resolution:o,rotation:r},void 0!==t.resolution?e[Ie]=t.resolution:void 0!==t.zoom&&(e[Ie]=this.constrainResolution(this.maxResolution_,t.zoom-this.minZoom_),this.resolutions_&&(e[Ie]=fe(Number(this.getResolution()||e[Ie]),this.minResolution_,this.maxResolution_))),e[Oe]=void 0!==t.rotation?t.rotation:0,this.setProperties(e),this.options_=t},e.prototype.getUpdatedOptions_=function(t){var e=g({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenter(),e.rotation=this.getRotation(),g({},e,t)},e.prototype.animate=function(t){var e,i=arguments,n=arguments.length;if(n>1&&"function"==typeof arguments[n-1]&&(e=arguments[n-1],--n),!this.isDef()){var o=arguments[n-1];return o.center&&this.setCenter(o.center),void 0!==o.zoom&&this.setZoom(o.zoom),void 0!==o.rotation&&this.setRotation(o.rotation),void(e&&$n(e,!0))}for(var r=Date.now(),s=this.getCenter().slice(),a=this.getResolution(),h=this.getRotation(),l=[],u=0;u<n;++u){var c=i[u],p={start:r,complete:!1,anchor:c.anchor,duration:void 0!==c.duration?c.duration:1e3,easing:c.easing||ke};if(c.center&&(p.sourceCenter=s,p.targetCenter=c.center,s=p.targetCenter),void 0!==c.zoom?(p.sourceResolution=a,p.targetResolution=this.constrainResolution(this.maxResolution_,c.zoom-this.minZoom_,0),a=p.targetResolution):c.resolution&&(p.sourceResolution=a,p.targetResolution=c.resolution,a=p.targetResolution),void 0!==c.rotation){p.sourceRotation=h;var d=me(c.rotation-h+Math.PI,2*Math.PI)-Math.PI;p.targetRotation=h+d,h=p.targetRotation}p.callback=e,qn(p)?p.complete=!0:r+=p.duration,l.push(p)}this.animations_.push(l),this.setHint(Ce,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[Ce]>0},e.prototype.getInteracting=function(){return this.hints_[Re]>0},e.prototype.cancelAnimations=function(){this.setHint(Ce,-this.hints_[Ce]);for(var t=0,e=this.animations_.length;t<e;++t){var i=this.animations_[t];i[0].callback&&$n(i[0].callback,!1)}this.animations_.length=0},e.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],o=!0,r=0,s=n.length;r<s;++r){var a=n[r];if(!a.complete){var h=t-a.start,l=a.duration>0?h/a.duration:1;l>=1?(a.complete=!0,l=1):o=!1;var u=a.easing(l);if(a.sourceCenter){var c=a.sourceCenter[0],p=a.sourceCenter[1],d=c+u*(a.targetCenter[0]-c),f=p+u*(a.targetCenter[1]-p);this.set(be,[d,f])}if(a.sourceResolution&&a.targetResolution){var _=1===u?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);a.anchor&&this.set(be,this.calculateCenterZoom(_,a.anchor)),this.set(Ie,_)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var g=1===u?me(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);a.anchor&&this.set(be,this.calculateCenterRotate(g,a.anchor)),this.set(Oe,g)}if(e=!0,!a.complete)break}}if(o){this.animations_[i]=null,this.setHint(Ce,-1);var v=n[0].callback;v&&$n(v,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_))}},e.prototype.calculateCenterRotate=function(t,e){var i,n=this.getCenter();return void 0!==n&&(Le(i=[n[0]-e[0],n[1]-e[1]],t-this.getRotation()),we(i,e)),i},e.prototype.calculateCenterZoom=function(t,e){var i,n=this.getCenter(),o=this.getResolution();void 0!==n&&void 0!==o&&(i=[e[0]-t*(e[0]-n[0])/o,e[1]-t*(e[1]-n[1])/o]);return i},e.prototype.getSizeFromViewport_=function(){var t=[100,100],e='.ol-viewport[data-view="'+c(this)+'"]',i=document.querySelector(e);if(i){var n=getComputedStyle(i);t[0]=parseInt(n.width,10),t[1]=parseInt(n.height,10)}return t},e.prototype.constrainCenter=function(t){return this.constraints_.center(t)},e.prototype.constrainResolution=function(t,e,i){var n=e||0,o=i||0;return this.constraints_.resolution(t,n,o)},e.prototype.constrainRotation=function(t,e){var i=e||0;return this.constraints_.rotation(t,i)},e.prototype.getCenter=function(){return this.get(be)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var e=t||this.getSizeFromViewport_(),i=this.getCenter();le(i,1);var n=this.getResolution();le(void 0!==n,2);var o=this.getRotation();return le(void 0!==o,3),li(i,n,o,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(Ie)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){var i=e||this.getSizeFromViewport_(),n=fi(t)/i[0],o=ui(t)/i[1];return Math.max(n,o)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.maxResolution_,n=this.minResolution_,o=Math.log(i/n)/Math.log(e);return function(t){return i/Math.pow(e,t*o)}},e.prototype.getRotation=function(){return this.get(Oe)},e.prototype.getValueForResolutionFunction=function(t){var e=t||2,i=this.maxResolution_,n=this.minResolution_,o=Math.log(i/n)/Math.log(e);return function(t){return Math.log(i/t)/Math.log(e)/o}},e.prototype.getState=function(t){var e=this.getCenter(),i=this.getProjection(),n=this.getResolution(),o=n/t,r=this.getRotation();return{center:[Math.round(e[0]/o)*o,Math.round(e[1]/o)*o],projection:void 0!==i?i:null,resolution:n,rotation:r,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,i,n=this.minZoom_||0;if(this.resolutions_){var o=Ut(this.resolutions_,t,1);n=o,e=this.resolutions_[o],i=o==this.resolutions_.length-1?2:e/this.resolutions_[o+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)},e.prototype.getResolutionForZoom=function(t){return this.constrainResolution(this.maxResolution_,t-this.minZoom_,0)},e.prototype.fit=function(t,e){var i,n=e||{},o=n.size;o||(o=this.getSizeFromViewport_()),le(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)?(le(!gi(t),25),i=Hn(t)):t.getType()===yi.CIRCLE?(i=Hn(t=t.getExtent())).rotate(this.getRotation(),hi(t)):i=t;var r,s=void 0!==n.padding?n.padding:[0,0,0,0],a=void 0===n.constrainResolution||n.constrainResolution,h=void 0!==n.nearest&&n.nearest;r=void 0!==n.minResolution?n.minResolution:void 0!==n.maxZoom?this.constrainResolution(this.maxResolution_,n.maxZoom-this.minZoom_,0):0;for(var l=i.getFlatCoordinates(),u=this.getRotation(),c=Math.cos(-u),p=Math.sin(-u),d=1/0,f=1/0,_=-1/0,g=-1/0,v=i.getStride(),y=0,m=l.length;y<m;y+=v){var E=l[y]*c-l[y+1]*p,x=l[y]*p+l[y+1]*c;d=Math.min(d,E),f=Math.min(f,x),_=Math.max(_,E),g=Math.max(g,x)}var T=this.getResolutionForExtent([d,f,_,g],[o[0]-s[1]-s[3],o[1]-s[0]-s[2]]);if(T=isNaN(T)?r:Math.max(T,r),a){var S=this.constrainResolution(T,0,0);!h&&S<T&&(S=this.constrainResolution(S,-1,0)),T=S}p=-p;var C=(d+_)/2,R=(f+g)/2,b=[(C+=(s[1]-s[3])/2*T)*c-(R+=(s[0]-s[2])/2*T)*p,R*c+C*p],I=n.callback?n.callback:P;void 0!==n.duration?this.animate({resolution:T,center:b,duration:n.duration,easing:n.easing},I):(this.setResolution(T),this.setCenter(b),$n(I,!0))},e.prototype.centerOn=function(t,e,i){var n=this.getRotation(),o=Math.cos(-n),r=Math.sin(-n),s=t[0]*o-t[1]*r,a=t[1]*o+t[0]*r,h=this.getResolution(),l=(s+=(e[0]/2-i[0])*h)*o-(a+=(i[1]-e[1]/2)*h)*(r=-r),u=a*o+s*r;this.setCenter([l,u])},e.prototype.isDef=function(){return!!this.getCenter()&&void 0!==this.getResolution()},e.prototype.rotate=function(t,e){if(void 0!==e){var i=this.calculateCenterRotate(t,e);this.setCenter(i)}this.setRotation(t)},e.prototype.setCenter=function(t){this.set(be,t),this.getAnimating()&&this.cancelAnimations()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.set(Ie,t),this.getAnimating()&&this.cancelAnimations()},e.prototype.setRotation=function(t){this.set(Oe,t),this.getAnimating()&&this.cancelAnimations()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e}(j);function Qn(t,e){var i=document.createElement("canvas");return t&&(i.width=t),e&&(i.height=e),i.getContext("2d")}function to(t,e){var i=e.parentNode;i&&i.replaceChild(t,e)}function eo(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function io(t){for(;t.lastChild;)t.removeChild(t.lastChild)}var no={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",SOURCE:"source"},oo=function(t){function e(e){t.call(this);var i=g({},e);i[no.OPACITY]=void 0!==e.opacity?e.opacity:1,i[no.VISIBLE]=void 0===e.visible||e.visible,i[no.Z_INDEX]=e.zIndex,i[no.MAX_RESOLUTION]=void 0!==e.maxResolution?e.maxResolution:1/0,i[no.MIN_RESOLUTION]=void 0!==e.minResolution?e.minResolution:0,this.setProperties(i),this.state_=null,this.type}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getType=function(){return this.type},e.prototype.getLayerState=function(){var t=this.state_||{layer:this,managed:!0};return t.opacity=fe(this.getOpacity(),0,1),t.sourceState=this.getSourceState(),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=this.getZIndex()||0,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),this.state_=t,t},e.prototype.getLayersArray=function(t){return l()},e.prototype.getLayerStatesArray=function(t){return l()},e.prototype.getExtent=function(){return this.get(no.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(no.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(no.MIN_RESOLUTION)},e.prototype.getOpacity=function(){return this.get(no.OPACITY)},e.prototype.getSourceState=function(){return l()},e.prototype.getVisible=function(){return this.get(no.VISIBLE)},e.prototype.getZIndex=function(){return this.get(no.Z_INDEX)},e.prototype.setExtent=function(t){this.set(no.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(no.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(no.MIN_RESOLUTION,t)},e.prototype.setOpacity=function(t){this.set(no.OPACITY,t)},e.prototype.setVisible=function(t){this.set(no.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(no.Z_INDEX,t)},e}(j),ro={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"},so={LAYERS:"layers"},ao=function(t){function e(e){var i=e||{},n=g({},i);delete n.layers;var o=i.layers;t.call(this,n),this.layersListenerKeys_=[],this.listenerKeys_={},C(this,z(so.LAYERS),this.handleLayersChanged_,this),o?Array.isArray(o)?o=new U(o.slice(),{unique:!0}):le("function"==typeof o.getArray,43):o=new U(void 0,{unique:!0}),this.setLayers(o)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(I),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(C(t,f.ADD,this.handleLayersAdd_,this),C(t,f.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(I);v(this.listenerKeys_);for(var i=t.getArray(),n=0,o=i.length;n<o;n++){var r=i[n];this.listenerKeys_[c(r)]=[C(r,_,this.handleLayerChange_,this),C(r,N.CHANGE,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[c(e)]=[C(e,_,this.handleLayerChange_,this),C(e,N.CHANGE,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=c(t.element);this.listenerKeys_[e].forEach(I),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get(so.LAYERS)},e.prototype.setLayers=function(t){this.set(so.LAYERS,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach(function(t){t.getLayersArray(e)}),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],i=e.length;this.getLayers().forEach(function(t){t.getLayerStatesArray(e)});for(var n=this.getLayerState(),o=i,r=e.length;o<r;o++){var s=e[o];s.opacity*=n.opacity,s.visible=s.visible&&n.visible,s.maxResolution=Math.min(s.maxResolution,n.maxResolution),s.minResolution=Math.max(s.minResolution,n.minResolution),void 0!==n.extent&&(void 0!==s.extent?s.extent=ci(s.extent,n.extent):s.extent=n.extent)}return e},e.prototype.getSourceState=function(){return ro.READY},e}(oo);function ho(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*e,i[1]=t[1]+2*e,i}function lo(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}function uo(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:e[0]=e[1]=t,e)}var co=function(t){function e(e){t.call(this);var i=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i,n,o,r={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new ao({layers:t.layers});r[se.LAYERGROUP]=s,r[se.TARGET]=t.target,r[se.VIEW]=void 0!==t.view?t.view:new Jn,void 0!==t.controls&&(Array.isArray(t.controls)?i=new U(t.controls.slice()):(le("function"==typeof t.controls.getArray,47),i=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?n=new U(t.interactions.slice()):(le("function"==typeof t.interactions.getArray,48),n=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?o=new U(t.overlays.slice()):(le("function"==typeof t.overlays.getArray,49),o=t.overlays):o=new U;return{controls:i,interactions:n,keyboardEventTarget:e,overlays:o,values:r}}(e);this.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,this.loadTilesWhileAnimating_=void 0!==e.loadTilesWhileAnimating&&e.loadTilesWhileAnimating,this.loadTilesWhileInteracting_=void 0!==e.loadTilesWhileInteracting&&e.loadTilesWhileInteracting,this.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:it,this.animationDelayKey_,this.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_.call(this,Date.now())}.bind(this),this.coordinateToPixelTransform_=[1,0,0,1,0,0],this.pixelToCoordinateTransform_=[1,0,0,1,0,0],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"+(ot?" 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 n=[N.CLICK,N.DBLCLICK,N.MOUSEDOWN,N.TOUCHSTART,N.MSPOINTERDOWN,at.POINTERDOWN,N.MOUSEWHEEL,N.WHEEL],o=0,r=n.length;o<r;++o)C(this.overlayContainerStopEvent_,n[o],F);for(var s in this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=new ie(this,e.moveTolerance),at)C(this.mapBrowserEventHandler_,at[s],this.handleMapBrowserEvent,this);this.keyboardEventTarget_=i.keyboardEventTarget,this.keyHandlerKeys_=null,C(this.viewport_,N.CONTEXTMENU,this.handleBrowserEvent,this),C(this.viewport_,N.WHEEL,this.handleBrowserEvent,this),C(this.viewport_,N.MOUSEWHEEL,this.handleBrowserEvent,this),this.controls=i.controls||new U,this.interactions=i.interactions||new U,this.overlays_=i.overlays,this.overlayIdIndex_={},this.renderer_=this.createRenderer(),this.handleResize_,this.focus_=null,this.postRenderFunctions_=[],this.tileQueue_=new ce(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.skippedFeatureUids_={},C(this,z(se.LAYERGROUP),this.handleLayerGroupChanged_,this),C(this,z(se.VIEW),this.handleViewChanged_,this),C(this,z(se.SIZE),this.handleSizeChanged_,this),C(this,z(se.TARGET),this.handleTargetChanged_,this),this.setProperties(i.values),this.controls.forEach(function(t){t.setMap(this)}.bind(this)),C(this.controls,f.ADD,function(t){t.element.setMap(this)},this),C(this.controls,f.REMOVE,function(t){t.element.setMap(null)},this),this.interactions.forEach(function(t){t.setMap(this)}.bind(this)),C(this.interactions,f.ADD,function(t){t.element.setMap(this)},this),C(this.interactions,f.REMOVE,function(t){t.element.setMap(null)},this),this.overlays_.forEach(this.addOverlayInternal_.bind(this)),C(this.overlays_,f.ADD,function(t){this.addOverlayInternal_(t.element)},this),C(this.overlays_,f.REMOVE,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)},this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){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(),b(this.viewport_,N.CONTEXTMENU,this.handleBrowserEvent,this),b(this.viewport_,N.WHEEL,this.handleBrowserEvent,this),b(this.viewport_,N.MOUSEWHEEL,this.handleBrowserEvent,this),void 0!==this.handleResize_&&(removeEventListener(N.RESIZE,this.handleResize_,!1),this.handleResize_=void 0),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0),this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,i){if(this.frameState_){var n=this.getCoordinateFromPixel(t),o=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance*this.frameState_.pixelRatio:0,r=void 0!==i.layerFilter?i.layerFilter:M;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,o,e,null,r,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){if(this.frameState_){var n=i||{},o=void 0!==n.hitTolerance?i.hitTolerance*this.frameState_.pixelRatio:0,r=n.layerFilter||M;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,o,e,null,r,null)}},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:M,o=void 0!==e.hitTolerance?e.hitTolerance*this.frameState_.pixelRatio:0;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,o,n,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-e.left,i.clientY-e.top]},e.prototype.getTarget=function(){return this.get(se.TARGET)},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?ln(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(se.LAYERGROUP)},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getPixelFromCoordinate=function(t){var e=this.frameState_;return e?ln(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(se.SIZE)},e.prototype.getView=function(){return this.get(se.VIEW)},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 o=this.frameState_;if(!(o&&e in o.wantedTiles))return 1/0;if(!o.wantedTiles[e][t.getKey()])return 1/0;var r=i[0]-o.focus[0],s=i[1]-o.focus[1];return 65536*Math.log(n)+Math.sqrt(r*r+s*s)/n},e.prototype.handleBrowserEvent=function(t,e){var i=e||t.type,n=new V(i,this,t);this.handleMapBrowserEvent(n)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){this.focus_=t.coordinate,t.frameState=this.frameState_;var e=this.getInteractions().getArray();if(!1!==this.dispatchEvent(t))for(var i=e.length-1;i>=0;i--){var n=e[i];if(n.getActive())if(!n.handleEvent(t))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=this.maxTilesLoading_,n=i;if(t){var o=t.viewHints;o[Ce]&&(i=this.loadTilesWhileAnimating_?8:0,n=2),o[Re]&&(i=this.loadTilesWhileInteracting_?8:0,n=2)}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}!t||!this.hasListener(ae.RENDERCOMPLETE)||t.animate||this.tileQueue_.getTilesLoading()||function t(e){for(var i=0,n=e.length;i<n;++i){var o=e[i];if("function"==typeof o.getLayers)return t(o.getLayers().getArray());var r=o.getSource();if(r&&r.loading)return!0}return!1}(this.getLayers().getArray())||this.renderer_.dispatchRenderEvent(ae.RENDERCOMPLETE,t);for(var r=this.postRenderFunctions_,s=0,a=r.length;s<a;++s)r[s](this,t);r.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)I(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null}if(t){t.appendChild(this.viewport_);var n=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[C(n,N.KEYDOWN,this.handleBrowserEvent,this),C(n,N.KEYPRESS,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),addEventListener(N.RESIZE,this.handleResize_,!1))}else this.renderer_.removeLayerRenderers(),eo(this.viewport_),void 0!==this.handleResize_&&(removeEventListener(N.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_&&(I(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(I(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.viewport_.setAttribute("data-view",c(t)),this.viewPropertyListenerKey_=C(t,_,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=C(t,N.CHANGE,this.handleViewPropertyChanged_,this)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(I),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[C(t,_,this.render,this),C(t,N.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=this.getSize(),n=this.getView(),o=[1/0,1/0,-1/0,-1/0],r=this.frameState_,s=null;if(void 0!==i&&function(t){return t[0]>0&&t[1]>0}(i)&&n&&n.isDef()){for(var a=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),h=this.getLayerGroup().getLayerStatesArray(),l={},u=0,p=h.length;u<p;++u)l[c(h[u].layer)]=h[u];e=n.getState(this.pixelRatio_),s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,extent:o,focus:this.focus_?this.focus_:e.center,index:this.frameIndex_++,layerStates:l,layerStatesArray:h,pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,skippedFeatureUids:this.skippedFeatureUids_,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:e,viewHints:a,wantedTiles:{}}}if(s&&(s.extent=li(e.center,e.resolution,e.rotation,s.size,o)),this.frameState_=s,this.renderer_.renderFrame(s),s){if(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),r)(!this.previousExtent_||!gi(this.previousExtent_)&&!Je(s.extent,this.previousExtent_))&&(this.dispatchEvent(new K(oe,this,r)),this.previousExtent_=Ze(this.previousExtent_));this.previousExtent_&&!s.viewHints[Ce]&&!s.viewHints[Re]&&!Je(s.extent,this.previousExtent_)&&(this.dispatchEvent(new K(re,this,s)),ze(s.extent,this.previousExtent_))}this.dispatchEvent(new K(ne,this,s)),setTimeout(this.handlePostRender.bind(this),0)},e.prototype.setLayerGroup=function(t){this.set(se.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(se.SIZE,t)},e.prototype.setTarget=function(t){this.set(se.TARGET,t)},e.prototype.setView=function(t){this.set(se.VIEW,t)},e.prototype.skipFeature=function(t){this.skippedFeatureUids_[c(t)]=!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){delete this.skippedFeatureUids_[c(t)],this.render()},e}(j);var po,fo,_o=function(t){function e(e){t.call(this),this.element=e.element?e.element:null,this.target_=null,this.map_=null,this.listenerKeys=[],this.render=e.render?e.render:P,e.target&&this.setTarget(e.target)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){eo(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&eo(this.element);for(var e=0,i=this.listenerKeys.length;e<i;++e)I(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==P&&this.listenerKeys.push(C(t,ne,this.render,this)),t.render())},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(j),go="ol-hidden",vo="ol-selectable",yo="ol-unselectable",mo="ol-control",Eo="ol-collapsed",xo=(fo={},function(t){if(po||(po=document.createElement("div").style),!(t in fo)){po.font=t;var e=po.fontFamily;if(po.font="",!e)return null;fo[t]=e.split(/,\s?/)}return fo[t]});function To(t,e){return t.visible&&e>=t.minResolution&&e<t.maxResolution}var So=function(t){function e(e){var i=g({},e);delete i.source,t.call(this,i),this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,e.map&&this.setMap(e.map),C(this,z(no.SOURCE),this.handleSourcePropertyChange_,this);var n=e.source?e.source:null;this.setSource(n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(no.SOURCE)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():ro.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(I(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=C(t,N.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(I(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(I(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=C(t,ae.PRECOMPOSE,function(t){var e=t,i=this.getLayerState();i.managed=!1,void 0===this.getZIndex()&&(i.zIndex=1/0),e.frameState.layerStatesArray.push(i),e.frameState.layerStates[c(this)]=i},this),this.mapRenderKey_=C(this,N.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(no.SOURCE,t)},e}(oo);function Co(t){this.updateElement_(t.frameState)}var Ro=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),render:i.render||Co,target:i.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===i.collapsed||i.collapsed,this.overrideCollapsible_=void 0!==i.collapsible,this.collapsible_=void 0===i.collapsible||i.collapsible,this.collapsible_||(this.collapsed_=!1);var n=void 0!==i.className?i.className:"ol-attribution",o=void 0!==i.tipLabel?i.tipLabel:"Attributions",r=void 0!==i.collapseLabel?i.collapseLabel:"»";"string"==typeof r?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=r):this.collapseLabel_=r;var s=void 0!==i.label?i.label:"i";"string"==typeof s?(this.label_=document.createElement("span"),this.label_.textContent=s):this.label_=s;var a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,h=document.createElement("button");h.setAttribute("type","button"),h.title=o,h.appendChild(a),C(h,N.CLICK,this.handleClick_,this);var l=n+" "+yo+" "+mo+(this.collapsed_&&this.collapsible_?" "+Eo:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=l,u.appendChild(this.ulElement_),u.appendChild(h),this.renderedAttributions_=[],this.renderedVisible_=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.collectSourceAttributions_=function(t){for(var e={},i=[],n=t.layerStatesArray,o=t.viewState.resolution,r=0,s=n.length;r<s;++r){var a=n[r];if(To(a,o)){var h=a.layer.getSource();if(h){var l=h.getAttributions();if(l){var u=l(t);if(u)if(this.overrideCollapsible_||!1!==h.getAttributionsCollapsible()||this.setCollapsible(!1),Array.isArray(u))for(var c=0,p=u.length;c<p;++c)u[c]in e||(i.push(u[c]),e[u[c]]=!0);else u in e||(i.push(u),e[u]=!0)}}}}return i},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Ht(e,this.renderedAttributions_)){io(this.ulElement_);for(var n=0,o=e.length;n<o;++n){var r=document.createElement("li");r.innerHTML=e[n],this.ulElement_.appendChild(r)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle(Eo),this.collapsed_?to(this.collapseLabel_,this.label_):to(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e}(_o);function bo(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 o=this.element.classList.contains(go);o||0!==i?o&&0!==i&&this.element.classList.remove(go):this.element.classList.add(go)}this.label_.style.msTransform=n,this.label_.style.webkitTransform=n,this.label_.style.transform=n}this.rotation_=i}}var Io=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),render:i.render||bo,target:i.target});var n=void 0!==i.className?i.className:"ol-rotate",o=void 0!==i.label?i.label:"⇧";this.label_=null,"string"==typeof o?(this.label_=document.createElement("span"),this.label_.className="ol-compass",this.label_.textContent=o):(this.label_=o,this.label_.classList.add("ol-compass"));var r=i.tipLabel?i.tipLabel:"Reset rotation",s=document.createElement("button");s.className=n+"-reset",s.setAttribute("type","button"),s.title=r,s.appendChild(this.label_),C(s,N.CLICK,this.handleClick_,this);var a=n+" "+yo+" "+mo,h=this.element;h.className=a,h.appendChild(s),this.callResetNorth_=i.resetNorth?i.resetNorth:void 0,this.duration_=void 0!==i.duration?i.duration:250,this.autoHide_=void 0===i.autoHide||i.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(go)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();t&&void 0!==t.getRotation()&&(this.duration_>0?t.animate({rotation:0,duration:this.duration_,easing:Fe}):t.setRotation(0))},e}(_o),Oo=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),target:i.target});var n=void 0!==i.className?i.className:"ol-zoom",o=void 0!==i.delta?i.delta:1,r=void 0!==i.zoomInLabel?i.zoomInLabel:"+",s=void 0!==i.zoomOutLabel?i.zoomOutLabel:"−",a=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",h=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=n+"-in",l.setAttribute("type","button"),l.title=a,l.appendChild("string"==typeof r?document.createTextNode(r):r),C(l,N.CLICK,this.handleClick_.bind(this,o));var u=document.createElement("button");u.className=n+"-out",u.setAttribute("type","button"),u.title=h,u.appendChild("string"==typeof s?document.createTextNode(s):s),C(u,N.CLICK,this.handleClick_.bind(this,-o));var c=n+" "+yo+" "+mo,p=this.element;p.className=c,p.appendChild(l),p.appendChild(u),this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.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:Fe})):e.setResolution(n)}}},e}(_o);var wo=function(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0};wo.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},wo.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},wo.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 o=this.points_[e]-this.points_[i],r=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(r,o),this.initialVelocity_=Math.sqrt(o*o+r*r)/n,this.initialVelocity_>this.minVelocity_},wo.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},wo.prototype.getAngle=function(){return this.angle_};var Mo=wo,Lo={ACTIVE:"active"};function Po(t,e,i,n){Ao(t,e=t.constrainRotation(e,0),i,n)}function Ao(t,e,i,n){if(void 0!==e){var o=t.getRotation(),r=t.getCenter();void 0!==o&&r&&n>0?t.animate({rotation:e,anchor:i,duration:n,easing:Fe}):t.rotate(e,i)}}function Fo(t,e,i,n,o){Do(t,e=t.constrainResolution(e,0,o),i,n)}function ko(t,e,i,n){var o=t.getResolution(),r=t.constrainResolution(o,e,0);if(void 0!==r){var s=t.getResolutions();r=fe(r,t.getMinResolution()||s[s.length-1],t.getMaxResolution()||s[0])}if(i&&void 0!==r&&r!==o){var a=t.getCenter(),h=t.calculateCenterZoom(r,i);h=t.constrainCenter(h),i=[(r*a[0]-o*h[0])/(r-o),(r*a[1]-o*h[1])/(r-o)]}Do(t,r,i,n)}function Do(t,e,i,n){if(e){var o=t.getResolution(),r=t.getCenter();if(void 0!==o&&r&&e!==o&&n)t.animate({resolution:e,anchor:i,duration:n,easing:Fe});else{if(i){var s=t.calculateCenterZoom(e,i);t.setCenter(s)}t.setResolution(e)}}}var No=function(t){function e(e){t.call(this),e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getActive=function(){return this.get(Lo.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Lo.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(j);function Go(t){var e=!1;if(t.type==at.DBLCLICK){var i=t.originalEvent,n=t.map,o=t.coordinate,r=i.shiftKey?-this.delta_:this.delta_;ko(n.getView(),r,o,this.duration_),t.preventDefault(),e=!0}return!e}var Yo=function(t){function e(e){t.call(this,{handleEvent:Go});var i=e||{};this.delta_=i.delta?i.delta:1,this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(No),Xo=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},zo=function(t){return t.target.getTargetElement()===document.activeElement},jo=M,Wo=function(t){var e=t.originalEvent;return 0==e.button&&!(tt&&et&&e.ctrlKey)},Bo=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Uo=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Ko=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},Vo=function(t){var e=t.pointerEvent;return le(void 0!==e,56),"mouse"==e.pointerType};function Ho(t){for(var e=t.length,i=0,n=0,o=0;o<e;o++)i+=t[o].clientX,n+=t[o].clientY;return[i/e,n/e]}var Zo=function(t){function e(e){var i=e||{};t.call(this,i),i.handleDownEvent&&(this.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(this.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(this.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(this.handleUpEvent=i.handleUpEvent),i.stopDown&&(this.stopDown=i.stopDown),this.handlingDownUpSequence=!1,this.trackedPointers_={},this.targetPointers=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.pointerEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==at.POINTERDRAG)this.handleDragEvent(t);else if(t.type==at.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==at.POINTERDOWN){var n=this.handleDownEvent(t);n&&t.preventDefault(),this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==at.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===at.POINTERDOWN||e===at.POINTERDRAG||e===at.POINTERUP}(t)){var e=t.pointerEvent,i=e.pointerId.toString();t.type==at.POINTERUP?delete this.trackedPointers_[i]:t.type==at.POINTERDOWN?this.trackedPointers_[i]=e:i in this.trackedPointers_&&(this.trackedPointers_[i]=e),this.targetPointers=y(this.trackedPointers_)}},e}(No),$o=function(t){function e(e){t.call(this,{stopDown:L});var i=e||{};this.kinetic_=i.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1,this.condition_=i.condition?i.condition:Bo,this.noKinetic_=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().setHint(Re,1));var e=this.targetPointers,i=Ho(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],o=i[1]-this.lastCentroid[1],r=t.map.getView(),s=[n,o];Pe(s,r.getResolution()),Le(s,r.getRotation()),we(s,r.getCenter()),s=r.constrainCenter(s),r.setCenter(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=e.length},e.prototype.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(),o=this.kinetic_.getAngle(),r=i.getCenter(),s=e.getPixelFromCoordinate(r),a=e.getCoordinateFromPixel([s[0]-n*Math.cos(o),s[1]-n*Math.sin(o)]);i.animate({center:i.constrainCenter(a),duration:500,easing:Fe})}return this.panning_&&(this.panning_=!1,i.setHint(Re,-1)),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.setCenter(t.frameState.viewState.center),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(Zo),qo=function(t){function e(e){var i=e||{};t.call(this,{stopDown:L}),this.condition_=i.condition?i.condition:Xo,this.lastAngle_=void 0,this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){if(Vo(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==Te){var n=e.getSize(),o=t.pixel,r=Math.atan2(n[1]/2-o[1],o[0]-n[0]/2);if(void 0!==this.lastAngle_){var s=r-this.lastAngle_;Ao(i,i.getRotation()-s)}this.lastAngle_=r}}},e.prototype.handleUpEvent=function(t){if(!Vo(t))return!0;var e=t.map.getView();return e.setHint(Re,-1),Po(e,e.getRotation(),void 0,this.duration_),!1},e.prototype.handleDownEvent=function(t){return!!Vo(t)&&(!(!Wo(t)||!this.condition_(t))&&(t.map.getView().setHint(Re,1),this.lastAngle_=void 0,!0))},e}(Zo),Jo=function(t){function e(e){t.call(this),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.setMap(null)},e.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"},e.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_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.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 Vn([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(w),Qo="boxstart",tr="boxdrag",er="boxend",ir=function(t){function e(e,i,n){t.call(this,e),this.coordinate=i,this.mapBrowserEvent=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k);function nr(){var t,e,i=this.getMap(),n=i.getView(),o=i.getSize(),r=this.getGeometry().getExtent();if(this.out_){var s=n.calculateExtent(o),a=(t=[i.getPixelFromCoordinate(si(r)),i.getPixelFromCoordinate(di(r))],ei(Ze(e),t));!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}(s,1/n.getResolutionForExtent(a,o)),r=s}var h=n.constrainResolution(n.getResolutionForExtent(r,o)),l=hi(r);l=n.constrainCenter(l),n.animate({resolution:h,center:l,duration:this.duration_,easing:Fe})}var or=function(t){function e(e){var i=e||{},n=i.condition?i.condition:Uo;t.call(this,{condition:n,className:i.className||"ol-dragzoom",onBoxEnd:nr}),this.duration_=void 0!==i.duration?i.duration:200,this.out_=void 0!==i.out&&i.out}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(function(t){function e(e){t.call(this);var i=e||{};this.box_=new Jo(i.className||"ol-dragbox"),this.minArea_=void 0!==i.minArea?i.minArea:64,this.onBoxEnd_=i.onBoxEnd?i.onBoxEnd:P,this.startPixel_=null,this.condition_=i.condition?i.condition:jo,this.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:this.defaultBoxEndCondition}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.defaultBoxEndCondition=function(t,e,i){var n=i[0]-e[0],o=i[1]-e[1];return n*n+o*o>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){Vo(t)&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new ir(tr,t.coordinate,t)))},e.prototype.handleUpEvent=function(t){return!Vo(t)||(this.box_.setMap(null),this.boxEndCondition_(t,this.startPixel_,t.pixel)&&(this.onBoxEnd_(t),this.dispatchEvent(new ir(er,t.coordinate,t))),!1)},e.prototype.handleDownEvent=function(t){return!!Vo(t)&&(!(!Wo(t)||!this.condition_(t))&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new ir(Qo,t.coordinate,t)),!0))},e}(Zo)),rr={LEFT:37,UP:38,RIGHT:39,DOWN:40};function sr(t){var e=!1;if(t.type==N.KEYDOWN){var i=t.originalEvent.keyCode;if(this.condition_(t)&&(i==rr.DOWN||i==rr.LEFT||i==rr.RIGHT||i==rr.UP)){var n=t.map.getView(),o=n.getResolution()*this.pixelDelta_,r=0,s=0;i==rr.DOWN?s=-o:i==rr.LEFT?r=-o:i==rr.RIGHT?r=o:s=o;var a=[r,s];Le(a,n.getRotation()),function(t,e,i){var n=t.getCenter();if(n){var o=t.constrainCenter([n[0]+e[0],n[1]+e[1]]);i?t.animate({duration:i,easing:De,center:o}):t.setCenter(o)}}(n,a,this.duration_),t.preventDefault(),e=!0}}return!e}var ar=function(t){function e(e){t.call(this,{handleEvent:sr});var i=e||{};this.defaultCondition_=function(t){return Bo(t)&&Ko(t)},this.condition_=void 0!==i.condition?i.condition:this.defaultCondition_,this.duration_=void 0!==i.duration?i.duration:100,this.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(No);function hr(t){var e=!1;if(t.type==N.KEYDOWN||t.type==N.KEYPRESS){var i=t.originalEvent.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var n=t.map,o=i=="+".charCodeAt(0)?this.delta_:-this.delta_;ko(n.getView(),o,void 0,this.duration_),t.preventDefault(),e=!0}}return!e}var lr=function(t){function e(e){t.call(this,{handleEvent:hr});var i=e||{};this.condition_=i.condition?i.condition:Ko,this.delta_=i.delta?i.delta:1,this.duration_=void 0!==i.duration?i.duration:100}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(No),ur="trackpad",cr="wheel",pr=function(t){function e(e){var i=e||{};t.call(this,i),this.delta_=0,this.duration_=void 0!==i.duration?i.duration:250,this.timeout_=void 0!==i.timeout?i.timeout:80,this.useAnchor_=void 0===i.useAnchor||i.useAnchor,this.constrainResolution_=i.constrainResolution||!1,this.condition_=i.condition?i.condition:jo,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.trackpadDeltaPerZoom_=300,this.trackpadZoomBuffer_=1.5}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.decrementInteractingHint_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().setHint(Re,-1)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var e=t.type;if(e!==N.WHEEL&&e!==N.MOUSEWHEEL)return!0;t.preventDefault();var i,n=t.map,o=t.originalEvent;if(this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==N.WHEEL?(i=o.deltaY,J&&o.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(i/=it),o.deltaMode===WheelEvent.DOM_DELTA_LINE&&(i*=40)):t.type==N.MOUSEWHEEL&&(i=-o.wheelDeltaY,Q&&(i/=3)),0===i)return!1;var r=Date.now();if(void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(i)<4?ur:cr),this.mode_===ur){var s=n.getView();this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):s.setHint(Re,1),this.trackpadTimeoutId_=setTimeout(this.decrementInteractingHint_.bind(this),this.trackpadEventGap_);var a=s.getResolution()*Math.pow(2,i/this.trackpadDeltaPerZoom_),h=s.getMinResolution(),l=s.getMaxResolution(),u=0;if(a<h?(a=Math.max(a,h/this.trackpadZoomBuffer_),u=1):a>l&&(a=Math.min(a,l*this.trackpadZoomBuffer_),u=-1),this.lastAnchor_){var c=s.calculateCenterZoom(a,this.lastAnchor_);s.setCenter(s.constrainCenter(c))}return s.setResolution(a),0===u&&this.constrainResolution_&&s.animate({resolution:s.constrainResolution(a,i>0?-1:1),easing:Fe,anchor:this.lastAnchor_,duration:this.duration_}),u>0?s.animate({resolution:h,easing:Fe,anchor:this.lastAnchor_,duration:500}):u<0&&s.animate({resolution:l,easing:Fe,anchor:this.lastAnchor_,duration:500}),this.startTime_=r,!1}this.delta_+=i;var p=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),p),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();ko(e,-fe(this.delta_,-1,1),this.lastAnchor_,this.duration_),this.mode_=void 0,this.delta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(No),dr=function(t){function e(e){var i=e||{},n=i;n.stopDown||(n.stopDown=L),t.call(this,n),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==i.threshold?i.threshold:.3,this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],n=this.targetPointers[1],o=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){var r=o-this.lastAngle_;this.rotationDelta_+=r,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=r}this.lastAngle_=o;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Te){var h=s.getViewport().getBoundingClientRect(),l=Ho(this.targetPointers);if(l[0]-=h.left,l[1]-=h.top,this.anchor_=s.getCoordinateFromPixel(l),this.rotating_){var u=a.getRotation();s.render(),Ao(a,u+e,this.anchor_)}}},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView();if(e.setHint(Re,-1),this.rotating_)Po(e,e.getRotation(),this.anchor_,this.duration_);return!1}return!0},e.prototype.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(Re,1),!0}return!1},e}(Zo),fr=function(t){function e(e){var i=e||{},n=i;n.stopDown||(n.stopDown=L),t.call(this,n),this.constrainResolution_=i.constrainResolution||!1,this.anchor_=null,this.duration_=void 0!==i.duration?i.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],n=this.targetPointers[1],o=i.clientX-n.clientX,r=i.clientY-n.clientY,s=Math.sqrt(o*o+r*r);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,h=a.getView(),l=h.getResolution(),u=h.getMaxResolution(),c=h.getMinResolution(),p=l*e;p>u?(e=u/l,p=u):p<c&&(e=c/l,p=c),1!=e&&(this.lastScaleDelta_=e);var d=a.getViewport().getBoundingClientRect(),f=Ho(this.targetPointers);f[0]-=d.left,f[1]-=d.top,this.anchor_=a.getCoordinateFromPixel(f),a.render(),Do(h,p,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView();e.setHint(Re,-1);var i=e.getResolution();if(this.constrainResolution_||i<e.getMinResolution()||i>e.getMaxResolution()){var n=this.lastScaleDelta_-1;Fo(e,i,this.anchor_,this.duration_,n)}return!1}return!0},e.prototype.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(Re,1),!0}return!1},e}(Zo);var _r=function(t){function e(e){if(t.call(this),this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,C(this,z(this.geometryName_),this.handleGeometryChanged_,this),e)if("function"==typeof e.getSimplifiedGeometry){var i=e;this.setGeometry(i)}else{var n=e;this.setProperties(n)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(this.getProperties());t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var n=this.getStyle();return n&&t.setStyle(n),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(I(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=C(t,N.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;var e;if(Array.isArray(t))e=t;else{le("function"==typeof t.getZIndex,41);var i=t;e=[i]}return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){b(this,z(this.geometryName_),this.handleGeometryChanged_,this),this.geometryName_=t,C(this,z(this.geometryName_),this.handleGeometryChanged_,this),this.handleGeometryChanged_()},e}(j),gr=function(t){function e(e,i,n){if(t.call(this),void 0!==n&&void 0===i)this.setFlatCoordinates(n,e);else{var o=i||0;this.setCenterAndRadius(e,o,n)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),void 0,this.layout)},e.prototype.closestPointXY=function(t,e,i,n){var o=this.flatCoordinates,r=t-o[0],s=e-o[1],a=r*r+s*s;if(a<n){if(0===a)for(var h=0;h<this.stride;++h)i[h]=o[h];else{var l=this.getRadius()/Math.sqrt(a);i[0]=o[0]+l*r,i[1]=o[1]+l*s;for(var u=2;u<this.stride;++u)i[u]=o[u]}return i.length=this.stride,a}return n},e.prototype.containsXY=function(t,e){var i=this.flatCoordinates,n=t-i[0],o=e-i[1];return n*n+o*o<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,i=e[this.stride]-e[0];return He(e[0]-i,e[1]-i,e[0]+i,e[1]+i,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return yi.CIRCLE},e.prototype.intersectsExtent=function(t){if(_i(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||oi(t,this.intersectsCoordinate,this))}return!1},e.prototype.setCenter=function(t){var e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],n=t.slice();n[e]=n[0]+i;for(var o=1;o<e;++o)n[e+o]=t[o];this.setFlatCoordinates(this.layout,n),this.changed()},e.prototype.setCenterAndRadius=function(t,e,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var n=this.flatCoordinates,o=Sn(n,0,t,this.stride);n[o++]=n[0]+e;for(var r=1,s=this.stride;r<s;++r)n[o++]=n[r];n.length=o,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e}(_n);gr.prototype.transform;function vr(t,e,i,n){for(var o=t[e],r=t[e+1],s=0,a=e+n;a<i;a+=n){var h=t[a],l=t[a+1];s+=Math.sqrt((h-o)*(h-o)+(l-r)*(l-r)),o=h,r=l}return s}var yr={IMAGE:"IMAGE",TILE:"TILE",VECTOR_TILE:"VECTOR_TILE",VECTOR:"VECTOR"},mr={IMAGE:"image",VECTOR:"vector"},Er=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,xr=/^([a-z]*)$/i;function Tr(t){return"string"==typeof t?t:Rr(t)}var Sr=function(){var t={},e=0;return function(i){var n;if(t.hasOwnProperty(i))n=t[i];else{if(e>=1024){var o=0;for(var r in t)0==(3&o++)&&(delete t[r],--e)}n=function(t){var e,i,n,o,r;xr.exec(t)&&(t=function(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var i=getComputedStyle(e).color;return document.body.removeChild(e),i}return""}(t));if(Er.exec(t)){var s,a=t.length-1;s=a<=4?1:2;var h=4===a||8===a;e=parseInt(t.substr(1+0*s,s),16),i=parseInt(t.substr(1+1*s,s),16),n=parseInt(t.substr(1+2*s,s),16),o=h?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,i=(i<<4)+i,n=(n<<4)+n,h&&(o=(o<<4)+o)),r=[e,i,n,o/255]}else 0==t.indexOf("rgba(")?Cr(r=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((r=t.slice(4,-1).split(",").map(Number)).push(1),Cr(r)):le(!1,14);return r}(i),t[i]=n,++e}return n}}();function Cr(t){return t[0]=fe(t[0]+.5|0,0,255),t[1]=fe(t[1]+.5|0,0,255),t[2]=fe(t[2]+.5|0,0,255),t[3]=fe(t[3],0,1),t}function Rr(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])+")"}function br(t){return Array.isArray(t)?Rr(t):t}var Ir={IDLE:0,LOADING:1,LOADED:2,ERROR:3},Or=function(t){function e(e){t.call(this),this.highWaterMark=void 0!==e?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},e.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent(N.CLEAR)},e.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},e.prototype.forEach=function(t,e){for(var i=this.oldest_;i;)t.call(e,i.value_,i.key_,this),i=i.newer},e.prototype.get=function(t){var e=this.entries_[t];return le(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_)},e.prototype.remove=function(t){var e=this.entries_[t];return le(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_},e.prototype.getCount=function(){return this.count_},e.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},e.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},e.prototype.peekLast=function(){return this.oldest_.value_},e.prototype.peekLastKey=function(){return this.oldest_.key_},e.prototype.peekFirstKey=function(){return this.newest_.key_},e.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_},e.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},e.prototype.set=function(t,e){le(!(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_},e.prototype.setSize=function(t){this.highWaterMark=t},e.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},e}(D),wr=[0,0,0,1],Mr=[],Lr=[0,0,0,1],Pr=[0,0,0,0],Ar=new Or,Fr={},kr=null,Dr={},Nr=function(){var t,e,i=60,n=Fr,o="32px ",r=["monospace","serif"],s=r.length,a="wmytzilWMYTZIL@#/&?$%10";function h(t){for(var i=Gr(),n=100;n<=700;n+=300){for(var h=n+" ",l=!0,u=0;u<s;++u){var c=r[u];if(i.font=h+o+c,e=i.measureText(a).width,t!=c){i.font=h+o+t+","+c;var p=i.measureText(a).width;l=l&&p!=e}}if(l)return!0}return!1}function l(){var e=!0;for(var o in n)n[o]<i&&(h(o)?(n[o]=i,v(Dr),kr=null,Ar.clear()):(++n[o],e=!1));e&&(clearInterval(t),t=void 0)}return function(e){var o=xo(e);if(o)for(var r=0,s=o.length;r<s;++r){var a=o[r];a in n||(n[a]=i,h(a)||(n[a]=0,void 0===t&&(t=setInterval(l,32))))}}}();function Gr(){return kr||(kr=Qn(1,1)),kr}var Yr,Xr,zr=(Xr=Dr,function(t){var e=Xr[t];return void 0==e&&(Yr||((Yr=document.createElement("span")).textContent="M",Yr.style.margin=Yr.style.padding="0 !important",Yr.style.position="absolute !important",Yr.style.left="-99999px !important"),Yr.style.font=t,document.body.appendChild(Yr),e=Xr[t]=Yr.offsetHeight,document.body.removeChild(Yr)),e});function jr(t,e){var i=Gr();return t!=i.font&&(i.font=t),i.measureText(e).width}function Wr(t,e,i,n){0!==e&&(t.translate(i,n),t.rotate(e),t.translate(-i,-n))}var Br=[1,0,0,1,0,0];function Ur(t,e,i,n,o,r,s,a,h,l,u){var c;1!=i&&(c=t.globalAlpha,t.globalAlpha=c*i),e&&t.setTransform.apply(t,e),t.drawImage(n,o,r,s,a,h,l,s*u,a*u),c&&(t.globalAlpha=c),e&&t.setTransform.apply(t,Br)}var Kr=function(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale};Kr.prototype.clone=function(){return new Kr({opacity:this.getOpacity(),scale:this.getScale(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},Kr.prototype.getOpacity=function(){return this.opacity_},Kr.prototype.getRotateWithView=function(){return this.rotateWithView_},Kr.prototype.getRotation=function(){return this.rotation_},Kr.prototype.getScale=function(){return this.scale_},Kr.prototype.getSnapToPixel=function(){return!1},Kr.prototype.getAnchor=function(){return l()},Kr.prototype.getImage=function(t){return l()},Kr.prototype.getHitDetectionImage=function(t){return l()},Kr.prototype.getImageState=function(){return l()},Kr.prototype.getImageSize=function(){return l()},Kr.prototype.getHitDetectionImageSize=function(){return l()},Kr.prototype.getOrigin=function(){return l()},Kr.prototype.getSize=function(){return l()},Kr.prototype.setOpacity=function(t){this.opacity_=t},Kr.prototype.setRotateWithView=function(t){this.rotateWithView_=t},Kr.prototype.setRotation=function(t){this.rotation_=t},Kr.prototype.setScale=function(t){this.scale_=t},Kr.prototype.setSnapToPixel=function(t){},Kr.prototype.listenImageChange=function(t,e){return l()},Kr.prototype.load=function(){l()},Kr.prototype.unlistenImageChange=function(t,e){l()};var Vr=Kr,Hr=function(t){function e(e){var i=e||{};t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,atlasManager:i.atlasManager})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),atlasManager:this.atlasManager_});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.setRadius=function(t){this.radius_=t,this.render_(this.atlasManager_)},e}(function(t){function e(e){var i=void 0!==e.rotateWithView&&e.rotateWithView;t.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:1}),this.checksums_=null,this.canvas_=null,this.hitDetectionCanvas_=null,this.fill_=void 0!==e.fill?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=void 0!==e.radius?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=void 0!==e.angle?e.angle:0,this.stroke_=void 0!==e.stroke?e.stroke:null,this.anchor_=null,this.size_=null,this.imageSize_=null,this.hitDetectionImageSize_=null,this.atlasManager_=e.atlasManager,this.render_(this.atlasManager_)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),atlasManager:this.atlasManager_});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(t){return this.hitDetectionCanvas_},e.prototype.getImage=function(t){return this.canvas_},e.prototype.getImageSize=function(){return this.imageSize_},e.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},e.prototype.getImageState=function(){return Ir.LOADED},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t,e){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t,e){},e.prototype.render_=function(t){var e,i,n="",o="",r=0,s=null,a=0,h=0;this.stroke_&&(null===(i=this.stroke_.getColor())&&(i=Lr),i=br(i),void 0===(h=this.stroke_.getWidth())&&(h=1),s=this.stroke_.getLineDash(),a=this.stroke_.getLineDashOffset(),nt||(s=null,a=0),void 0===(o=this.stroke_.getLineJoin())&&(o="round"),void 0===(n=this.stroke_.getLineCap())&&(n="round"),void 0===(r=this.stroke_.getMiterLimit())&&(r=10));var l=2*(this.radius_+h)+1,u={strokeStyle:i,strokeWidth:h,size:l,lineCap:n,lineDash:s,lineDashOffset:a,lineJoin:o,miterLimit:r};if(void 0===t){var c=Qn(l,l);this.canvas_=c.canvas,e=l=this.canvas_.width,this.draw_(u,c,0,0),this.createHitDetectionCanvas_(u)}else{l=Math.round(l);var p,d=!this.fill_;d&&(p=this.drawHitDetectionCanvas_.bind(this,u));var f=this.getChecksum(),_=t.add(f,l,l,this.draw_.bind(this,u),p);this.canvas_=_.image,this.origin_=[_.offsetX,_.offsetY],e=_.image.width,d?(this.hitDetectionCanvas_=_.hitImage,this.hitDetectionImageSize_=[_.hitImage.width,_.hitImage.height]):(this.hitDetectionCanvas_=this.canvas_,this.hitDetectionImageSize_=[e,e])}this.anchor_=[l/2,l/2],this.size_=[l,l],this.imageSize_=[e,e]},e.prototype.draw_=function(t,e,i,n){var o,r,s;e.setTransform(1,0,0,1,0,0),e.translate(i,n),e.beginPath();var a=this.points_;if(a===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_&&(a*=2),o=0;o<=a;o++)r=2*o*Math.PI/a-Math.PI/2+this.angle_,s=o%2==0?this.radius_:h,e.lineTo(t.size/2+s*Math.cos(r),t.size/2+s*Math.sin(r))}if(this.fill_){var l=this.fill_.getColor();null===l&&(l=wr),e.fillStyle=br(l),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()},e.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionImageSize_=[t.size,t.size],this.fill_)this.hitDetectionCanvas_=this.canvas_;else{var e=Qn(t.size,t.size);this.hitDetectionCanvas_=e.canvas,this.drawHitDetectionCanvas_(t,e,0,0)}},e.prototype.drawHitDetectionCanvas_=function(t,e,i,n){e.setTransform(1,0,0,1,0,0),e.translate(i,n),e.beginPath();var o=this.points_;if(o===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var r,s,a,h=void 0!==this.radius2_?this.radius2_:this.radius_;for(h!==this.radius_&&(o*=2),r=0;r<=o;r++)a=2*r*Math.PI/o-Math.PI/2+this.angle_,s=r%2==0?this.radius_:h,e.lineTo(t.size/2+s*Math.cos(a),t.size/2+s*Math.sin(a))}e.fillStyle=Tr(wr),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()},e.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}(Vr)),Zr=function(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.checksum_=void 0};Zr.prototype.clone=function(){var t=this.getColor();return new Zr({color:Array.isArray(t)?t.slice():t||void 0})},Zr.prototype.getColor=function(){return this.color_},Zr.prototype.setColor=function(t){this.color_=t,this.checksum_=void 0},Zr.prototype.getChecksum=function(){if(void 0===this.checksum_){var t=this.color_;t?Array.isArray(t)||"string"==typeof t?this.checksum_="f"+Tr(t):this.checksum_=c(this.color_):this.checksum_="f-"}return this.checksum_};var $r=Zr,qr=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};qr.prototype.clone=function(){var t=this.getColor();return new qr({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},qr.prototype.getColor=function(){return this.color_},qr.prototype.getLineCap=function(){return this.lineCap_},qr.prototype.getLineDash=function(){return this.lineDash_},qr.prototype.getLineDashOffset=function(){return this.lineDashOffset_},qr.prototype.getLineJoin=function(){return this.lineJoin_},qr.prototype.getMiterLimit=function(){return this.miterLimit_},qr.prototype.getWidth=function(){return this.width_},qr.prototype.setColor=function(t){this.color_=t,this.checksum_=void 0},qr.prototype.setLineCap=function(t){this.lineCap_=t,this.checksum_=void 0},qr.prototype.setLineDash=function(t){this.lineDash_=t,this.checksum_=void 0},qr.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t,this.checksum_=void 0},qr.prototype.setLineJoin=function(t){this.lineJoin_=t,this.checksum_=void 0},qr.prototype.setMiterLimit=function(t){this.miterLimit_=t,this.checksum_=void 0},qr.prototype.setWidth=function(t){this.width_=t,this.checksum_=void 0},qr.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.checksum_="s",this.color_?"string"==typeof this.color_?this.checksum_+=this.color_:this.checksum_+=c(this.color_):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_};var Jr=qr,Qr=function(t){var e=t||{};this.geometry_=null,this.geometryFunction_=is,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};Qr.prototype.clone=function(){var t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new Qr({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()})},Qr.prototype.getRenderer=function(){return this.renderer_},Qr.prototype.setRenderer=function(t){this.renderer_=t},Qr.prototype.getGeometry=function(){return this.geometry_},Qr.prototype.getGeometryFunction=function(){return this.geometryFunction_},Qr.prototype.getFill=function(){return this.fill_},Qr.prototype.setFill=function(t){this.fill_=t},Qr.prototype.getImage=function(){return this.image_},Qr.prototype.setImage=function(t){this.image_=t},Qr.prototype.getStroke=function(){return this.stroke_},Qr.prototype.setStroke=function(t){this.stroke_=t},Qr.prototype.getText=function(){return this.text_},Qr.prototype.setText=function(t){this.text_=t},Qr.prototype.getZIndex=function(){return this.zIndex_},Qr.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_=is,this.geometry_=t},Qr.prototype.setZIndex=function(t){this.zIndex_=t};var ts=null;function es(t,e){if(!ts){var i=new $r({color:"rgba(255,255,255,0.4)"}),n=new Jr({color:"#3399CC",width:1.25});ts=[new Qr({image:new Hr({fill:i,stroke:n,radius:5}),fill:i,stroke:n})]}return ts}function is(t){return t.getGeometry()}var ns=Qr,os="renderOrder",rs=function(t){function e(e){var i=e||{},n=g({},i);delete n.style,delete n.renderBuffer,delete n.updateWhileAnimating,delete n.updateWhileInteracting,t.call(this,n),this.declutter_=void 0!==i.declutter&&i.declutter,this.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(i.style),this.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating,this.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting,this.renderMode_=i.renderMode||mr.VECTOR,this.type=yr.VECTOR}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.setDeclutter=function(t){this.declutter_=t},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(os)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.setRenderOrder=function(t){this.set(os,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:es,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var i;Array.isArray(t)?i=t:(le("function"==typeof t.getZIndex,41),i=[t]),e=function(){return i}}return e}(this.style_),this.changed()},e.prototype.getRenderMode=function(){return this.renderMode_},e}(So);rs.prototype.getSource;var ss=rs,as={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"};function hs(t,e){return function(t,e,i,n){return function(o,r,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(o,r,s):t,!0),e.getType()==as.ARRAY_BUFFER&&(a.responseType="arraybuffer"),a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var o,r=e.getType();r==as.JSON||r==as.TEXT?o=a.responseText:r==as.XML?(o=a.responseXML)||(o=(new DOMParser).parseFromString(a.responseText,"application/xml")):r==as.ARRAY_BUFFER&&(o=a.response),o?i.call(this,e.readFeatures(o,{featureProjection:s}),e.readProjection(o),e.getLastExtent()):n.call(this)}else n.call(this)}.bind(this),a.onerror=function(){n.call(this)}.bind(this),a.send()}}(t,e,function(t,e){"function"==typeof this.addFeatures&&this.addFeatures(t)},P)}function ls(t,e){return[[-1/0,-1/0,1/0,1/0]]}function us(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var cs=function(t){function e(e){t.call(this),this.projection_=Zi(e.projection),this.attributions_=us(e.attributions),this.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,this.loading=!1,this.state_=void 0!==e.state?e.state:ro.READY,this.wrapX_=void 0!==e.wrapX&&e.wrapX}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolutions=function(){return l()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=us(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(j),ps={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature"},ds=i("emf4"),fs=i.n(ds),_s=function(t){this.rbush_=fs()(t,void 0),this.items_={}};_s.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_[c(e)]=i},_s.prototype.load=function(t,e){for(var i=new Array(e.length),n=0,o=e.length;n<o;n++){var r=t[n],s=e[n],a={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3],value:s};i[n]=a,this.items_[c(s)]=a}this.rbush_.load(i)},_s.prototype.remove=function(t){var e=c(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},_s.prototype.update=function(t,e){var i=this.items_[c(e)];Je([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))},_s.prototype.getAll=function(){return this.rbush_.all().map(function(t){return t.value})},_s.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})},_s.prototype.forEach=function(t,e){return this.forEach_(this.getAll(),t,e)},_s.prototype.forEachInExtent=function(t,e,i){return this.forEach_(this.getInExtent(t),e,i)},_s.prototype.forEach_=function(t,e,i){for(var n,o=0,r=t.length;o<r;o++)if(n=e.call(i,t[o]))return n;return n},_s.prototype.isEmpty=function(){return m(this.items_)},_s.prototype.clear=function(){this.rbush_.clear(),this.items_={}},_s.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return He(e.minX,e.minY,e.maxX,e.maxY,t)},_s.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]};var gs=_s,vs=function(t){function e(e,i){t.call(this,e),this.feature=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k),ys=function(t){function e(e){var i=e||{};t.call(this,{attributions:i.attributions,projection:void 0,state:ro.READY,wrapX:void 0===i.wrapX||i.wrapX}),this.loader_=P,this.format_=i.format,this.overlaps_=void 0==i.overlaps||i.overlaps,this.url_=i.url,void 0!==i.loader?this.loader_=i.loader:void 0!==this.url_&&(le(this.format_,7),this.loader_=hs(this.url_,this.format_)),this.strategy_=void 0!==i.strategy?i.strategy:ls;var n,o,r=void 0===i.useSpatialIndex||i.useSpatialIndex;this.featuresRtree_=r?new gs:null,this.loadedExtentsRtree_=new gs,this.nullGeometryFeatures_={},this.idIndex_={},this.undefIdIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(i.features)?o=i.features:i.features&&(o=(n=i.features).getArray()),r||void 0!==n||(n=new U(o)),void 0!==o&&this.addFeaturesInternal(o),void 0!==n&&this.bindFeaturesCollection_(n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=c(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var i=t.getGeometry();if(i){var n=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(n,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new vs(ps.ADDFEATURE,t))}},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[C(e,N.CHANGE,this.handleFeatureChange_,this),C(e,_,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var i=!0,n=e.getId();return void 0!==n?n.toString()in this.idIndex_?i=!1:this.idIndex_[n.toString()]=e:(le(!(t in this.undefIdIndex_),30),this.undefIdIndex_[t]=e),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],i=[],n=[],o=0,r=t.length;o<r;o++){var s=t[o],a=c(s);this.addToIndex_(a,s)&&i.push(s)}for(var h=0,l=i.length;h<l;h++){var u=i[h],p=c(u);this.setupChangeEvents_(p,u);var d=u.getGeometry();if(d){var f=d.getExtent();e.push(f),n.push(u)}else this.nullGeometryFeatures_[p]=u}this.featuresRtree_&&this.featuresRtree_.load(e,n);for(var _=0,g=i.length;_<g;_++)this.dispatchEvent(new vs(ps.ADDFEATURE,i[_]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;C(this,ps.ADDFEATURE,function(i){e||(e=!0,t.push(i.feature),e=!1)}),C(this,ps.REMOVEFEATURE,function(i){e||(e=!0,t.remove(i.feature),e=!1)}),C(t,f.ADD,function(t){e||(e=!0,this.addFeature(t.element),e=!1)},this),C(t,f.REMOVE,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)},this),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(I)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.undefIdIndex_={})}else if(this.featuresRtree_)for(var i in this.featuresRtree_.forEach(this.removeFeatureInternal,this),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.loadedExtentsRtree_.clear(),this.nullGeometryFeatures_={};var n=new vs(ps.CLEAR);this.dispatchEvent(n),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(i){return i.getGeometry().intersectsCoordinate(t)?e(i):void 0})},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,function(i){if(i.getGeometry().intersectsExtent(t)){var n=e(i);if(n)return n}})},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray():this.featuresRtree_&&(t=this.featuresRtree_.getAll(),m(this.nullGeometryFeatures_)||Vt(t,y(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,function(t){e.push(t)}),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_.getInExtent(t)},e.prototype.getClosestFeatureToCoordinate=function(t,e){var i=t[0],n=t[1],o=null,r=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],h=e||M;return this.featuresRtree_.forEachInExtent(a,function(t){if(h(t)){var e=t.getGeometry(),l=s;if((s=e.closestPointXY(i,n,r,s))<l){o=t;var u=Math.sqrt(s);a[0]=i-u,a[1]=n-u,a[2]=i+u,a[3]=n+u}}}),o},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,i=c(e),n=e.getGeometry();if(n){var o=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(o,e)):this.featuresRtree_&&this.featuresRtree_.update(o,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);var r=e.getId();if(void 0!==r){var s=r.toString();i in this.undefIdIndex_?(delete this.undefIdIndex_[i],this.idIndex_[s]=e):this.idIndex_[s]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[s]=e)}else i in this.undefIdIndex_||(this.removeFromIdIndex_(e),this.undefIdIndex_[i]=e);this.changed(),this.dispatchEvent(new vs(ps.CHANGEFEATURE,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:c(t)in this.undefIdIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&m(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,i){var n=this,o=this.loadedExtentsRtree_,r=this.strategy_(t,e);this.loading=!1;for(var s=function(t,s){var a=r[t];o.forEachInExtent(a,function(t){return Be(t.extent,a)})||(n.loader_.call(n,a,e,i),o.insert(a,{extent:a.slice()}),n.loading=n.loader_!==P)},a=0,h=r.length;a<h;++a)s(a)},e.prototype.removeLoadedExtent=function(t){var e,i=this.loadedExtentsRtree_;i.forEachInExtent(t,function(i){if(Je(i.extent,t))return e=i,!0}),e&&i.remove(e)},e.prototype.removeFeature=function(t){var e=c(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var e=c(t);this.featureChangeKeys_[e].forEach(I),delete this.featureChangeKeys_[e];var i=t.getId();void 0!==i?delete this.idIndex_[i.toString()]:delete this.undefIdIndex_[e],this.dispatchEvent(new vs(ps.REMOVEFEATURE,t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e}(cs);var ms=.5,Es=function(t){function e(e,i,n,o,r){var s=void 0!==r?Ir.IDLE:Ir.LOADED;t.call(this,e,i,n,s),this.loader_=void 0!==r?r:null,this.canvas_=o,this.error_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getError=function(){return this.error_},e.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=Ir.ERROR):this.state=Ir.LOADED,this.changed()},e.prototype.load=function(){this.state==Ir.IDLE&&(this.state=Ir.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))},e.prototype.getImage=function(){return this.canvas_},e}(function(t){function e(e,i,n,o){t.call(this),this.extent=e,this.pixelRatio_=n,this.resolution=i,this.state=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){this.dispatchEvent(N.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return l()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){l()},e}(D)),xs=function(t){function e(e,i,n,o,r){t.call(this,e),this.vectorContext=i,this.frameState=n,this.context=o,this.glContext=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k),Ts=function(){};Ts.prototype.drawCustom=function(t,e,i){},Ts.prototype.drawGeometry=function(t){},Ts.prototype.setStyle=function(t){},Ts.prototype.drawCircle=function(t,e){},Ts.prototype.drawFeature=function(t,e){},Ts.prototype.drawGeometryCollection=function(t,e){},Ts.prototype.drawLineString=function(t,e){},Ts.prototype.drawMultiLineString=function(t,e){},Ts.prototype.drawMultiPoint=function(t,e){},Ts.prototype.drawMultiPolygon=function(t,e){},Ts.prototype.drawPoint=function(t,e){},Ts.prototype.drawPolygon=function(t,e){},Ts.prototype.drawText=function(t,e){},Ts.prototype.setFillStrokeStyle=function(t,e){},Ts.prototype.setImageStyle=function(t,e){},Ts.prototype.setTextStyle=function(t,e){};var Ss=Ts,Cs=function(t){function e(e,i,n,o,r){t.call(this),this.context_=e,this.pixelRatio_=i,this.extent_=n,this.transform_=o,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.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_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawImages_=function(t,e,i,n){if(this.image_){var o=Ei(t,e,i,2,this.transform_,this.pixelCoordinates_),r=this.context_,s=this.tmpLocalTransform_,a=r.globalAlpha;1!=this.imageOpacity_&&(r.globalAlpha=a*this.imageOpacity_);var h=this.imageRotation_;this.imageRotateWithView_&&(h+=this.viewRotation_);for(var l=0,u=o.length;l<u;l+=2){var c=o[l]-this.imageAnchorX_,p=o[l+1]-this.imageAnchorY_;if(0!==h||1!=this.imageScale_){var d=c+this.imageAnchorX_,f=p+this.imageAnchorY_;pn(s,d,f,this.imageScale_,this.imageScale_,h,-d,-f),r.setTransform.apply(r,s)}r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,c,p,this.imageWidth_,this.imageHeight_)}0===h&&1==this.imageScale_||r.setTransform(1,0,0,1,0,0),1!=this.imageOpacity_&&(r.globalAlpha=a)}},e.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 o=Ei(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<i;e+=n){var a=o[e]+this.textOffsetX_,h=o[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_){var l=pn(this.tmpLocalTransform_,a,h,this.textScale_,this.textScale_,s,-a,-h);r.setTransform.apply(r,l)}this.textStrokeState_&&r.strokeText(this.text_,a,h),this.textFillState_&&r.fillText(this.text_,a,h)}0===s&&1==this.textScale_||r.setTransform(1,0,0,1,0,0)}},e.prototype.moveToLineTo_=function(t,e,i,n,o){var r=this.context_,s=Ei(t,e,i,n,this.transform_,this.pixelCoordinates_);r.moveTo(s[0],s[1]);var a=s.length;o&&(a-=2);for(var h=2;h<a;h+=2)r.lineTo(s[h],s[h+1]);return o&&r.closePath(),i},e.prototype.drawRings_=function(t,e,i,n){for(var o=0,r=i.length;o<r;++o)e=this.moveToLineTo_(t,e,i[o],n,!0);return e},e.prototype.drawCircle=function(t){if(_i(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,i){var n=t.getFlatCoordinates();if(n){var o=t.getStride();return Ei(n,0,n.length,o,e,i)}return null}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],o=Math.sqrt(i*i+n*n),r=this.context_;r.beginPath(),r.arc(e[0],e[1],o,0,2*Math.PI),this.fillState_&&r.fill(),this.strokeState_&&r.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.drawGeometry=function(t){switch(t.getType()){case yi.POINT:this.drawPoint(t);break;case yi.LINE_STRING:this.drawLineString(t);break;case yi.POLYGON:this.drawPolygon(t);break;case yi.MULTI_POINT:this.drawMultiPoint(t);break;case yi.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case yi.MULTI_POLYGON:this.drawMultiPolygon(t);break;case yi.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case yi.CIRCLE:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&_i(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),i=0,n=e.length;i<n;++i)this.drawGeometry(e[i])},e.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)},e.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)},e.prototype.drawLineString=function(t){if(_i(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)}}},e.prototype.drawMultiLineString=function(t){var e=t.getExtent();if(_i(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,n=t.getFlatCoordinates(),o=0,r=t.getEnds(),s=t.getStride();i.beginPath();for(var a=0,h=r.length;a<h;++a)o=this.moveToLineTo_(n,o,r[a],s,!1);i.stroke()}if(""!==this.text_){var l=t.getFlatMidpoints();this.drawText_(l,0,l.length,2)}}},e.prototype.drawPolygon=function(t){if(_i(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)}}},e.prototype.drawMultiPolygon=function(t){if(_i(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_,i=t.getOrientedFlatCoordinates(),n=0,o=t.getEndss(),r=t.getStride();e.beginPath();for(var s=0,a=o.length;s<a;++s){var h=o[s];n=this.drawRings_(i,n,h,r)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var l=t.getFlatInteriorPoints();this.drawText_(l,0,l.length,2)}}},e.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})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=e.lineCap=t.lineCap),nt&&(Ht(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,nt&&(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})},e.prototype.setContextTextState_=function(t){var e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:"center";i?(i.font!=t.font&&(i.font=e.font=t.font),i.textAlign!=n&&(i.textAlign=e.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})},e.prototype.setFillStrokeStyle=function(t,e){if(t){var i=t.getColor();this.fillState_={fillStyle:br(i||wr)}}else this.fillState_=null;if(e){var n=e.getColor(),o=e.getLineCap(),r=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),h=e.getWidth(),l=e.getMiterLimit();this.strokeState_={lineCap:void 0!==o?o:"round",lineDash:r||Mr,lineDashOffset:s||0,lineJoin:void 0!==a?a:"round",lineWidth:this.pixelRatio_*(void 0!==h?h:1),miterLimit:void 0!==l?l:10,strokeStyle:br(n||Lr)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){if(t){var e=t.getAnchor(),i=t.getImage(1),n=t.getOrigin(),o=t.getSize();this.imageAnchorX_=e[0],this.imageAnchorY_=e[1],this.imageHeight_=o[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.imageWidth_=o[0]}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var i=e.getColor();this.textFillState_={fillStyle:br(i||wr)}}else this.textFillState_=null;var n=t.getStroke();if(n){var o=n.getColor(),r=n.getLineCap(),s=n.getLineDash(),a=n.getLineDashOffset(),h=n.getLineJoin(),l=n.getWidth(),u=n.getMiterLimit();this.textStrokeState_={lineCap:void 0!==r?r:"round",lineDash:s||Mr,lineDashOffset:a||0,lineJoin:void 0!==h?h:"round",lineWidth:void 0!==l?l:1,miterLimit:void 0!==u?u:10,strokeStyle:br(o||Lr)}}else this.textStrokeState_=null;var c=t.getFont(),p=t.getOffsetX(),d=t.getOffsetY(),f=t.getRotateWithView(),_=t.getRotation(),g=t.getScale(),v=t.getText(),y=t.getTextAlign(),m=t.getTextBaseline();this.textState_={font:void 0!==c?c:"10px sans-serif",textAlign:void 0!==y?y:"center",textBaseline:void 0!==m?m:"middle"},this.text_=void 0!==v?v:"",this.textOffsetX_=void 0!==p?this.pixelRatio_*p:0,this.textOffsetY_=void 0!==d?this.pixelRatio_*d:0,this.textRotateWithView_=void 0!==f&&f,this.textRotation_=void 0!==_?_:0,this.textScale_=this.pixelRatio_*(void 0!==g?g:1)}else this.text_=""},e}(Ss),Rs=function(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32};function bs(t,e,i){return e+":"+t+":"+(i?Tr(i):"null")}Rs.prototype.clear=function(){this.cache_={},this.cacheSize_=0},Rs.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var t=0;for(var e in this.cache_){var i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},Rs.prototype.get=function(t,e,i){var n=bs(t,e,i);return n in this.cache_?this.cache_[n]:null},Rs.prototype.set=function(t,e,i,n){var o=bs(t,e,i);this.cache_[o]=n,++this.cacheSize_},Rs.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()};var Is=new Rs;function Os(t,e){Is.expire()}function ws(t,e){return t.zIndex-e.zIndex}var Ms=[],Ls=function(t){function e(e){t.call(this,e);var i=e.getViewport();this.context_=Qn(),this.canvas_=this.context_.canvas,this.canvas_.style.width="100%",this.canvas_.style.height="100%",this.canvas_.style.display="block",this.canvas_.className=yo,i.insertBefore(this.canvas_,i.childNodes[0]||null),this.renderedVisible_=!0,this.transform_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap(),n=this.context_;if(i.hasListener(t)){var o=e.extent,r=e.pixelRatio,s=e.viewState.rotation,a=this.getTransform(e),h=new Cs(n,r,o,a,s),l=new xs(t,h,e,n,null);i.dispatchEvent(l)}},e.prototype.getTransform=function(t){var e=t.viewState,i=this.canvas_.width/2,n=this.canvas_.height/2,o=t.pixelRatio/e.resolution,r=-o,s=-e.rotation,a=-e.center[0],h=-e.center[1];return pn(this.transform_,i,n,o,r,s,a,h)},e.prototype.renderFrame=function(t){if(t){var e=this.context_,i=t.pixelRatio,n=Math.round(t.size[0]*i),o=Math.round(t.size[1]*i);this.canvas_.width!=n||this.canvas_.height!=o?(this.canvas_.width=n,this.canvas_.height=o):e.clearRect(0,0,n,o);var r=t.viewState.rotation;this.calculateMatrices2D(t),this.dispatchRenderEvent(ae.PRECOMPOSE,t);var s=t.layerStatesArray;!function(t,e){var i,n=t.length,o=Array(t.length);for(i=0;i<n;i++)o[i]={index:i,value:t[i]};for(o.sort(function(t,i){return e(t.value,i.value)||t.index-i.index}),i=0;i<t.length;i++)t[i]=o[i].value}(s,ws),r&&(e.save(),Wr(e,r,n/2,o/2));var a,h,l=t.viewState.resolution;for(a=0,h=s.length;a<h;++a){var u=s[a],c=u.layer,p=this.getLayerRenderer(c);To(u,l)&&u.sourceState==ro.READY&&(p.prepareFrame(t,u)&&p.composeFrame(t,u,e))}r&&e.restore(),this.dispatchRenderEvent(ae.POSTCOMPOSE,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)},e.prototype.forEachLayerAtPixel=function(t,e,i,n,o,r,s){var a,h,l=e.viewState.resolution,u=e.layerStatesArray,c=u.length,p=ln(e.pixelToCoordinateTransform,t.slice());for(h=c-1;h>=0;--h){var d=u[h],f=d.layer;if(To(d,l)&&r.call(s,f))if(a=this.getLayerRenderer(f).forEachLayerAtCoordinate(p,e,i,n,o))return a}},e.prototype.registerLayerRenderers=function(e){t.prototype.registerLayerRenderers.call(this,e);for(var i=0,n=e.length;i<n;++i){var o=e[i];Bt(Ms,o)||Ms.push(o)}},e}(function(t){function e(e){t.call(this),this.map_=e,this.layerRenderers_={},this.layerRendererListeners_={},this.layerRendererConstructors_=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispatchRenderEvent=function(t,e){l()},e.prototype.registerLayerRenderers=function(t){this.layerRendererConstructors_.push.apply(this.layerRendererConstructors_,t)},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;pn(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),function(t){var e,i=(e=t)[0]*e[3]-e[1]*e[2];le(0!==i,32);var n=t[0],o=t[1],r=t[2],s=t[3],a=t[4],h=t[5];t[0]=s/i,t[1]=-o/i,t[2]=-r/i,t[3]=n/i,t[4]=(r*h-s*a)/i,t[5]=-(n*h-o*a)/i}(hn(n,i))},e.prototype.removeLayerRenderers=function(){for(var t in this.layerRenderers_)this.removeLayerRendererByKey_(t).dispose()},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o,r,s){var a,h=e.viewState,l=h.resolution;function u(t,i){var r=e.layerStates[c(i)].managed;if(!(c(t)in e.skippedFeatureUids)||r)return n.call(o,t,r?i:null)}var p=h.projection,d=t;if(p.canWrapX()){var f=p.getExtent(),_=fi(f),g=t[0];if(g<f[0]||g>f[2])d=[g+_*Math.ceil((f[0]-g)/_),t[1]]}var v,y=e.layerStatesArray;for(v=y.length-1;v>=0;--v){var m=y[v],E=m.layer;if(To(m,l)&&r.call(s,E)){var x=this.getLayerRenderer(E),T=E.getSource();if(T&&(a=x.forEachFeatureAtCoordinate(T.getWrapX()?d:t,e,i,u)),a)return a}}},e.prototype.forEachLayerAtPixel=function(t,e,i,n,o,r,s){return l()},e.prototype.hasFeatureAtCoordinate=function(t,e,i,n,o){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,M,this,n,o)},e.prototype.getLayerRenderer=function(t){var e=c(t);if(e in this.layerRenderers_)return this.layerRenderers_[e];for(var i,n=0,o=this.layerRendererConstructors_.length;n<o;++n){var r=this.layerRendererConstructors_[n];if(r.handles(t)){i=r.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]=C(i,N.CHANGE,this.handleLayerRendererChange_,this),i},e.prototype.getLayerRendererByKey=function(t){return this.layerRenderers_[t]},e.prototype.getLayerRenderers=function(){return this.layerRenderers_},e.prototype.getMap=function(){return this.map_},e.prototype.handleLayerRendererChange_=function(){this.map_.render()},e.prototype.removeLayerRendererByKey_=function(t){var e=this.layerRenderers_[t];return delete this.layerRenderers_[t],I(this.layerRendererListeners_[t]),delete this.layerRendererListeners_[t],e},e.prototype.removeUnusedLayerRenderers_=function(t,e){for(var i in this.layerRenderers_)e&&i in e.layerStates||this.removeLayerRendererByKey_(i).dispose()},e.prototype.renderFrame=function(t){l()},e.prototype.scheduleExpireIconCache=function(t){t.postRenderFunctions.push(Os)},e.prototype.scheduleRemoveUnusedLayerRenderers=function(t){for(var e in this.layerRenderers_)if(!(e in t.layerStates))return void t.postRenderFunctions.push(this.removeUnusedLayerRenderers_.bind(this))},e}(w)),Ps=function(t){function e(e){t.call(this,e),this.renderedResolution,this.transform_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clip=function(t,e,i){var n=e.pixelRatio,o=e.size[0]*n,r=e.size[1]*n,s=e.viewState.rotation,a=pi(i),h=di(i),l=ai(i),u=si(i);ln(e.coordinateToPixelTransform,a),ln(e.coordinateToPixelTransform,h),ln(e.coordinateToPixelTransform,l),ln(e.coordinateToPixelTransform,u),t.save(),Wr(t,-s,o/2,r/2),t.beginPath(),t.moveTo(a[0]*n,a[1]*n),t.lineTo(h[0]*n,h[1]*n),t.lineTo(l[0]*n,l[1]*n),t.lineTo(u[0]*n,u[1]*n),t.clip(),Wr(t,s,o/2,r/2)},e.prototype.dispatchComposeEvent_=function(t,e,i,n){var o=this.getLayer();if(o.hasListener(t)){var r=i.size[0]*i.pixelRatio,s=i.size[1]*i.pixelRatio,a=i.viewState.rotation;Wr(e,-a,r/2,s/2);var h=void 0!==n?n:this.getTransform(i,0),l=new Cs(e,i.pixelRatio,i.extent,h,i.viewState.rotation),u=new xs(t,l,i,e,null);o.dispatchEvent(u),Wr(e,a,r/2,s/2)}},e.prototype.forEachLayerAtCoordinate=function(t,e,i,n,o){return this.forEachFeatureAtCoordinate(t,e,i,M)?n.call(o,this.getLayer(),null):void 0},e.prototype.postCompose=function(t,e,i,n){this.dispatchComposeEvent_(ae.POSTCOMPOSE,t,e,n)},e.prototype.preCompose=function(t,e,i){this.dispatchComposeEvent_(ae.PRECOMPOSE,t,e,i)},e.prototype.dispatchRenderEvent=function(t,e,i){this.dispatchComposeEvent_(ae.RENDER,t,e,i)},e.prototype.getTransform=function(t,e){var i=t.viewState,n=t.pixelRatio,o=n*t.size[0]/2,r=n*t.size[1]/2,s=n/i.resolution,a=-s,h=-i.rotation,l=-i.center[0]+e,u=-i.center[1];return pn(this.transform_,o,r,s,a,h,l,u)},e.prototype.composeFrame=function(t,e,i){l()},e.prototype.prepareFrame=function(t,e){return l()},e}(function(t){function e(e){t.call(this),this.layer_=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createLoadedTileFinder=function(t,e,i){return function(n,o){return t.forEachLoadedTile(e,n,o,function(t){i[n]||(i[n]={}),i[n][t.tileCoord.toString()]=t})}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n){},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleImageChange_=function(t){t.target.getState()===Ir.LOADED&&this.renderIfReadyAndVisible()},e.prototype.hasFeatureAtCoordinate=function(t,e){return!1},e.prototype.loadImage=function(t){var e=t.getState();return e!=Ir.LOADED&&e!=Ir.ERROR&&C(t,N.CHANGE,this.handleImageChange_,this),e==Ir.IDLE&&(t.load(),e=t.getState()),e==Ir.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==ro.READY&&this.changed()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var i=function(t,e,i){var n=c(t);n in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[n])}.bind(null,e);t.postRenderFunctions.push(i)}},e.prototype.updateUsedTiles=function(t,e,i,n){var o=c(e),r=i.toString();o in t?r in t[o]?t[o][r].extend(n):t[o][r]=n:(t[o]={},t[o][r]=n)},e.prototype.manageTilePyramid=function(t,e,i,n,o,r,s,a,h,l){var u=c(e);u in t.wantedTiles||(t.wantedTiles[u]={});var p,d,f,_,g,v,y=t.wantedTiles[u],m=t.tileQueue;for(v=i.getMinZoom();v<=s;++v)for(d=i.getTileRangeForExtentAndZ(r,v,d),f=i.getResolution(v),_=d.minX;_<=d.maxX;++_)for(g=d.minY;g<=d.maxY;++g)s-v<=a?((p=e.getTile(v,_,g,n,o)).getState()==he.IDLE&&(y[p.getKey()]=!0,m.isKeyQueued(p.getKey())||m.enqueue([p,u,i.getTileCoordCenter(p.tileCoord),f])),void 0!==h&&h.call(l,p)):e.useTile(v,_,g,o)},e}(G)),As=function(t){function e(e){t.call(this,e),this.coordinateToCanvasPixelTransform=[1,0,0,1,0,0],this.hitCanvasContext_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.composeFrame=function(t,e,i){this.preCompose(i,t);var n=this.getImage();if(n){var o=e.extent,r=void 0!==o&&!Be(o,t.extent)&&_i(o,t.extent);r&&this.clip(i,t,o);var s=this.getImageTransform(),a=i.globalAlpha;i.globalAlpha=e.opacity;var h=s[4],l=s[5],u=n.width*s[0],c=n.height*s[3];u>=.5&&c>=.5&&i.drawImage(n,0,0,+n.width,+n.height,Math.round(h),Math.round(l),Math.round(u),Math.round(c)),i.globalAlpha=a,r&&i.restore()}this.postCompose(i,t,e)},e.prototype.getImage=function(){return l()},e.prototype.getImageTransform=function(){return l()},e.prototype.forEachLayerAtCoordinate=function(t,e,i,n,o){if(this.getImage()){var r=ln(this.coordinateToCanvasPixelTransform,t.slice());Pe(r,e.viewState.resolution/this.renderedResolution),this.hitCanvasContext_||(this.hitCanvasContext_=Qn(1,1)),this.hitCanvasContext_.clearRect(0,0,1,1),this.hitCanvasContext_.drawImage(this.getImage(),r[0],r[1],1,1,0,0,1,1);var s=this.hitCanvasContext_.getImageData(0,0,1,1).data;return s[3]>0?n.call(o,this.getLayer(),s):void 0}},e}(Ps),Fs=function(t){function e(i){if(t.call(this,i),this.image_=null,this.imageTransform_=[1,0,0,1,0,0],this.skippedFeatures_=[],this.vectorRenderer_=null,i.getType()===yr.VECTOR)for(var n=0,o=Ms.length;n<o;++n){var r=Ms[n];if(r!==e&&r.handles(i)){this.vectorRenderer_=new r(i);break}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.vectorRenderer_&&this.vectorRenderer_.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.getImageTransform=function(){return this.imageTransform_},e.prototype.prepareFrame=function(t,e){var i,n=t.pixelRatio,o=t.size,r=t.viewState,s=r.center,a=r.resolution,h=this.getLayer().getSource(),l=t.viewHints,u=this.vectorRenderer_,c=t.extent;if(u||void 0===e.extent||(c=ci(c,e.extent)),!l[Ce]&&!l[Re]&&!gi(c)){var p=r.projection,d=this.skippedFeatures_;if(u){var f=u.context,_=g({},t,{size:[fi(c)/a,ui(c)/a],viewState:g({},t.viewState,{rotation:0})}),v=Object.keys(_.skippedFeatureUids).sort();i=new Es(c,a,n,f.canvas,function(t){!u.prepareFrame(_,e)||!u.replayGroupChanged&&Ht(d,v)||(f.canvas.width=_.size[0]*n,f.canvas.height=_.size[1]*n,u.compose(f,_,e),d=v,t())})}else i=h.getImage(c,a,n,p);i&&this.loadImage(i)&&(this.image_=i,this.skippedFeatures_=d)}if(this.image_){var y=(i=this.image_).getExtent(),m=i.getResolution(),E=i.getPixelRatio(),x=n*m/(a*E),T=pn(this.imageTransform_,n*o[0]/2,n*o[1]/2,x,x,0,E*(y[0]-s[0])/m,E*(s[1]-y[3])/m);pn(this.coordinateToCanvasPixelTransform,n*o[0]/2-T[4],n*o[1]/2-T[5],n/a,-n/a,0,-s[0],-s[1]),this.renderedResolution=m*n/E}return!!this.image_},e.prototype.forEachFeatureAtCoordinate=function(e,i,n,o){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(e,i,n,o):t.prototype.forEachFeatureAtCoordinate.call(this,e,i,n,o)},e}(As);Fs.handles=function(t){return t.getType()===yr.IMAGE||t.getType()===yr.VECTOR&&t.getRenderMode()===mr.IMAGE},Fs.create=function(t,e){return new Fs(e)};var ks=Fs,Ds=function(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n};function Ns(t,e,i,n,o){return void 0!==o?(o.minX=t,o.maxX=e,o.minY=i,o.maxY=n,o):new Ds(t,e,i,n)}Ds.prototype.contains=function(t){return this.containsXY(t[1],t[2])},Ds.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},Ds.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},Ds.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},Ds.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)},Ds.prototype.getHeight=function(){return this.maxY-this.minY+1},Ds.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},Ds.prototype.getWidth=function(){return this.maxX-this.minX+1},Ds.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY};var Gs=Ds,Ys=function(t){function e(e,i){t.call(this,e),this.context=i?null:Qn(),this.oversampling_,this.renderedExtent_=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=[1/0,1/0,-1/0,-1/0],this.tmpTileRange_=new Gs(0,0,0,0),this.imageTransform_=[1,0,0,1,0,0],this.zDirection=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isDrawableTile_=function(t){var e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==he.LOADED||i==he.EMPTY||i==he.ERROR&&!n},e.prototype.getTile=function(t,e,i,n,o){var r=this.getLayer(),s=r.getSource().getTile(t,e,i,n,o);return s.getState()==he.ERROR&&(r.getUseInterimTilesOnError()?r.getPreload()>0&&(this.newTiles_=!0):s.setState(he.LOADED)),this.isDrawableTile_(s)||(s=s.getInterimTile()),s},e.prototype.prepareFrame=function(t,e){var i=t.pixelRatio,n=t.size,o=t.viewState,r=o.projection,s=o.resolution,a=o.center,h=this.getLayer(),l=h.getSource(),u=l.getRevision(),p=l.getTileGridForProjection(r),d=p.getZForResolution(s,this.zDirection),f=p.getResolution(d),_=Math.round(s/f)||1,g=t.extent;if(void 0!==e.extent&&(g=ci(g,e.extent)),gi(g))return!1;var v=p.getTileRangeForExtentAndZ(g,d),y=p.getTileRangeExtent(d,v),m=l.getTilePixelRatio(i),E={};E[d]={};var x,T,S,C=this.createLoadedTileFinder(l,r,E),R=t.viewHints,b=R[Ce]||R[Re],I=this.tmpExtent,O=this.tmpTileRange_;for(this.newTiles_=!1,T=v.minX;T<=v.maxX;++T)for(S=v.minY;S<=v.maxY;++S)if(!(Date.now()-t.time>16&&b)){if(x=this.getTile(d,T,S,i,r),this.isDrawableTile_(x)){var w=c(this);if(x.getState()==he.LOADED){E[d][x.tileCoord.toString()]=x;var M=x.inTransition(w);this.newTiles_||!M&&-1!==this.renderedTiles.indexOf(x)||(this.newTiles_=!0)}if(1===x.getAlpha(w,t.time))continue}var L=p.getTileCoordChildTileRange(x.tileCoord,O,I),P=!1;L&&(P=C(d+1,L)),P||p.forEachTileCoordParentTileRange(x.tileCoord,C,null,O,I)}var A=f*i/m*_;if(!(this.renderedResolution&&Date.now()-t.time>16&&b)&&(this.newTiles_||!this.renderedExtent_||!Be(this.renderedExtent_,g)||this.renderedRevision!=u||_!=this.oversampling_||!b&&A!=this.renderedResolution)){var F=this.context;if(F){var k=l.getTilePixelSize(d,i,r),D=Math.round(v.getWidth()*k[0]/_),N=Math.round(v.getHeight()*k[1]/_),G=F.canvas;G.width!=D||G.height!=N?(this.oversampling_=_,G.width=D,G.height=N):(this.renderedExtent_&&!Je(y,this.renderedExtent_)&&F.clearRect(0,0,D,N),_=this.oversampling_)}this.renderedTiles.length=0;var Y,X,z,j,W,B,U,K,V,H,Z=Object.keys(E).map(Number);for(Z.sort(function(t,e){return t===d?1:e===d?-1:t>e?1:t<e?-1:0}),j=0,W=Z.length;j<W;++j)for(var $ in z=Z[j],X=l.getTilePixelSize(z,i,r),Y=p.getResolution(z)/f,U=m*l.getGutterForProjection(r),K=E[z])x=K[$],T=((B=p.getTileCoordExtent(x.getTileCoord(),I))[0]-y[0])/f*m/_,S=(y[3]-B[3])/f*m/_,V=X[0]*Y/_,H=X[1]*Y/_,this.drawTileImage(x,t,e,T,S,V,H,U,d===z),this.renderedTiles.push(x);this.renderedRevision=u,this.renderedResolution=f*i/m*_,this.renderedExtent_=y}var q=this.renderedResolution/s,J=pn(this.imageTransform_,i*n[0]/2,i*n[1]/2,q,q,0,(this.renderedExtent_[0]-a[0])/this.renderedResolution*i,(a[1]-this.renderedExtent_[3])/this.renderedResolution*i);return pn(this.coordinateToCanvasPixelTransform,i*n[0]/2-J[4],i*n[1]/2-J[5],i/s,-i/s,0,-a[0],-a[1]),this.updateUsedTiles(t.usedTiles,l,d,v),this.manageTilePyramid(t,l,p,i,r,g,d,h.getPreload()),this.scheduleExpireCache(t,l),this.renderedTiles.length>0},e.prototype.drawTileImage=function(t,e,i,n,o,r,s,a,h){var l=this.getTileImage(t);if(l){var u=c(this),p=h?t.getAlpha(u,e.time):1,d=this.getLayer().getSource();1!==p||d.getOpaque(e.viewState.projection)||this.context.clearRect(n,o,r,s);var f=p!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=p),this.context.drawImage(l,a,a,l.width-2*a,l.height-2*a,n,o,r,s),f&&this.context.restore(),1!==p?e.animate=!0:h&&t.endTransition(u)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getImageTransform=function(){return this.imageTransform_},e.prototype.getTileImage=function(t){return t.getImage()},e}(As);Ys.handles=function(t){return t.getType()===yr.TILE},Ys.create=function(t,e){return new Ys(e)},Ys.prototype.getLayer;var Xs=Ys,zs=function(){};zs.prototype.getReplay=function(t,e){return l()},zs.prototype.isEmpty=function(){return l()},zs.prototype.addDeclutter=function(t){return l()};var js=zs,Ws={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};function Bs(t,e,i,n,o,r,s,a){for(var h,l,u,c=[],p=t[e]>t[i-n],d=o.length,f=t[e],_=t[e+1],g=t[e+=n],v=t[e+1],y=0,m=Math.sqrt(Math.pow(g-f,2)+Math.pow(v-_,2)),E="",x=0,T=0;T<d;++T){l=p?d-T-1:T;var S=o.charAt(l),C=r(E=p?S+E:E+S)-x;x+=C;for(var R=s+C/2;e<i-n&&y+m<R;)f=g,_=v,g=t[e+=n],v=t[e+1],y+=m,m=Math.sqrt(Math.pow(g-f,2)+Math.pow(v-_,2));var b=R-y,I=Math.atan2(v-_,g-f);if(p&&(I+=I>0?-Math.PI:Math.PI),void 0!==u){var O=I-u;if(O+=O>Math.PI?-2*Math.PI:O<-Math.PI?2*Math.PI:0,Math.abs(O)>a)return null}var w=b/m,M=Ee(f,g,w),L=Ee(_,v,w);u==I?(p&&(h[0]=M,h[1]=L,h[2]=C/2),h[4]=E):(x=C,h=[M,L,C/2,I,E=S],p?c.unshift(h):c.push(h),u=I),s+=C}return c}var Us={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Ks=[Us.FILL],Vs=[Us.STROKE],Hs=[Us.BEGIN_PATH],Zs=[Us.CLOSE_PATH],$s=Us,qs=[Ws.POLYGON,Ws.CIRCLE,Ws.LINE_STRING,Ws.IMAGE,Ws.TEXT,Ws.DEFAULT],Js={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Qs=[1/0,1/0,-1/0,-1/0],ta=[1,0,0,1,0,0],ea=function(t){function e(e,i,n,o,r,s){t.call(this),this.declutterTree=s,this.tolerance=e,this.maxExtent=i,this.overlaps=r,this.pixelRatio=o,this.maxLineWidth=0,this.resolution=n,this.alignFill_,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=[],this.pixelCoordinates_=null,this.state={},this.viewRotation_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.replayTextBackground_=function(t,e,i,n,o,r,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,o),t.lineTo.apply(t,e),r&&(this.alignFill_=r[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},e.prototype.replayImage_=function(t,e,i,n,o,r,s,a,h,l,u,c,p,d,f,_,g,v){var y=g||v;e-=o*=p,i-=r*=p;var m,E,x,T,S=f+l>n.width?n.width-l:f,C=a+u>n.height?n.height-u:a,R=_[3]+S*p+_[1],b=_[0]+C*p+_[2],I=e-_[3],O=i-_[0];(y||0!==c)&&(m=[I,O],E=[I+R,O],x=[I+R,O+b],T=[I,O+b]);var w=null;if(0!==c){var M=e+o,L=i+r;w=pn(ta,M,L,1,1,c,-M,-L),Ze(Qs),ti(Qs,ln(ta,m)),ti(Qs,ln(ta,E)),ti(Qs,ln(ta,x)),ti(Qs,ln(ta,T))}else He(I,O,I+R,O+b,Qs);var P=t.canvas,A=v?v[2]*p/2:0,F=Qs[0]-A<=P.width&&Qs[2]+A>=0&&Qs[1]-A<=P.height&&Qs[3]+A>=0;if(d&&(e=Math.round(e),i=Math.round(i)),s){if(!F&&1==s[4])return;Qe(s,Qs);var k=F?[t,w?w.slice(0):null,h,n,l,u,S,C,e,i,p]:null;k&&y&&k.push(g,v,m,E,x,T),s.push(k)}else F&&(y&&this.replayTextBackground_(t,m,E,x,T,g,v),Ur(t,w,h,n,l,u,S,C,e,i,p))},e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})},e.prototype.appendFlatCoordinates=function(t,e,i,n,o,r){var s=this.coordinates.length,a=this.getBufferedMaxExtent();r&&(e+=n);var h,l,u,c=[t[e],t[e+1]],p=[NaN,NaN],d=!0;for(h=e+n;h<i;h+=n)p[0]=t[h],p[1]=t[h+1],(u=Ke(a,p))!==l?(d&&(this.coordinates[s++]=c[0],this.coordinates[s++]=c[1]),this.coordinates[s++]=p[0],this.coordinates[s++]=p[1],d=!1):u===Ge.INTERSECTING?(this.coordinates[s++]=p[0],this.coordinates[s++]=p[1],d=!1):d=!0,c[0]=p[0],c[1]=p[1],l=u;return(o&&d||h===e+n)&&(this.coordinates[s++]=c[0],this.coordinates[s++]=c[1]),s},e.prototype.drawCustomCoordinates_=function(t,e,i,n,o){for(var r=0,s=i.length;r<s;++r){var a=i[r],h=this.appendFlatCoordinates(t,e,a,n,!1,!1);o.push(h),e=a}return e},e.prototype.drawCustom=function(t,e,i){this.beginGeometry(t,e);var n,o,r,s,a,h=t.getType(),l=t.getStride(),u=this.coordinates.length;if(h==yi.MULTI_POLYGON){n=(t=t).getOrientedFlatCoordinates(),s=[];var c=t.getEndss();a=0;for(var p=0,d=c.length;p<d;++p){var f=[];a=this.drawCustomCoordinates_(n,a,c[p],l,f),s.push(f)}this.instructions.push([$s.CUSTOM,u,s,t,i,On])}else h==yi.POLYGON||h==yi.MULTI_LINE_STRING?(r=[],n=h==yi.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),a=this.drawCustomCoordinates_(n,0,t.getEnds(),l,r),this.instructions.push([$s.CUSTOM,u,r,t,i,In])):h==yi.LINE_STRING||h==yi.MULTI_POINT?(n=t.getFlatCoordinates(),o=this.appendFlatCoordinates(n,0,n.length,l,!1,!1),this.instructions.push([$s.CUSTOM,u,o,t,i,bn])):h==yi.POINT&&(n=t.getFlatCoordinates(),this.coordinates.push(n[0],n[1]),o=this.coordinates.length,this.instructions.push([$s.CUSTOM,u,o,t,i]));this.endGeometry(t,e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[$s.BEGIN_GEOMETRY,e,0],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[$s.BEGIN_GEOMETRY,e,0],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){},e.prototype.fill_=function(t){if(this.alignFill_){var e=ln(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.setTransform.apply(t,Br)},e.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],nt&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},e.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 o=5,r=t.length;o<r;++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]),Ur.apply(void 0,s))}}t.length=5,Ze(t)}}},e.prototype.replay_=function(t,e,i,n,o,r,s){var a;this.pixelCoordinates_&&Ht(e,this.renderedTransform_)?a=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),a=Ei(this.coordinates,0,this.coordinates.length,2,e,this.pixelCoordinates_),hn(this.renderedTransform_,e));for(var h,l,u,p,d,f,_,g,v,y,E,x,T=!m(i),S=0,C=n.length,R=0,b=0,I=0,O=null,w=null,M=this.coordinateCache_,L=this.viewRotation_,P={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:L},A=this.instructions!=n||this.overlaps?0:200;S<C;){var F=n[S];switch(F[0]){case $s.BEGIN_GEOMETRY:y=F[1],T&&i[c(y)]||!y.getGeometry()?S=F[2]:void 0===s||_i(s,y.getGeometry().getExtent())?++S:S=F[2]+1;break;case $s.BEGIN_PATH:b>A&&(this.fill_(t),b=0),I>A&&(t.stroke(),I=0),b||I||(t.beginPath(),p=d=NaN),++S;break;case $s.CIRCLE:var k=a[R=F[1]],D=a[R+1],N=a[R+2]-k,G=a[R+3]-D,Y=Math.sqrt(N*N+G*G);t.moveTo(k+Y,D),t.arc(k,D,Y,0,2*Math.PI,!0),++S;break;case $s.CLOSE_PATH:t.closePath(),++S;break;case $s.CUSTOM:R=F[1],h=F[2];var X=F[3],z=F[4],j=6==F.length?F[5]:void 0;P.geometry=X,P.feature=y,S in M||(M[S]=[]);var W=M[S];j?j(a,R,h,2,W):(W[0]=a[R],W[1]=a[R+1],W.length=2),z(W,P),++S;break;case $s.DRAW_IMAGE:R=F[1],h=F[2],v=F[3],l=F[4],u=F[5],g=r?null:F[6];var B=F[7],U=F[8],K=F[9],V=F[10],H=F[11],Z=F[12],$=F[13],q=F[14],J=void 0,Q=void 0,tt=void 0;for(F.length>16?(J=F[15],Q=F[16],tt=F[17]):(J=Pr,Q=tt=!1),H&&(Z+=L);R<h;R+=2)this.replayImage_(t,a[R],a[R+1],v,l,u,g,B,U,K,V,Z,$,o,q,J,Q?O:null,tt?w:null);this.renderDeclutter_(g,y),++S;break;case $s.DRAW_CHARS:var et=F[1],it=F[2],nt=F[3];g=r?null:F[4];var ot=F[5],rt=F[6],st=F[7],at=F[8],ht=F[9],lt=F[10],ut=F[11],ct=F[12],pt=F[13],dt=F[14],ft=vr(a,et,it,2),_t=at(ct);if(ot||_t<=ft){var gt=this.textStates[pt].textAlign,vt=Bs(a,et,it,2,ct,at,(ft-_t)*Js[gt],st);if(vt){var yt=void 0,mt=void 0,Et=void 0,xt=void 0,Tt=void 0;if(lt)for(yt=0,mt=vt.length;yt<mt;++yt)Et=(Tt=vt[yt])[4],xt=this.getImage(Et,pt,"",lt),l=Tt[2]+ut,u=nt*xt.height+2*(.5-nt)*ut-ht,this.replayImage_(t,Tt[0],Tt[1],xt,l,u,g,xt.height,1,0,0,Tt[3],dt,!1,xt.width,Pr,null,null);if(rt)for(yt=0,mt=vt.length;yt<mt;++yt)Et=(Tt=vt[yt])[4],xt=this.getImage(Et,pt,rt,""),l=Tt[2],u=nt*xt.height-ht,this.replayImage_(t,Tt[0],Tt[1],xt,l,u,g,xt.height,1,0,0,Tt[3],dt,!1,xt.width,Pr,null,null)}}this.renderDeclutter_(g,y),++S;break;case $s.END_GEOMETRY:if(void 0!==r){var St=r(y=F[1]);if(St)return St}++S;break;case $s.FILL:A?b++:this.fill_(t),++S;break;case $s.MOVE_TO_LINE_TO:for(R=F[1],h=F[2],E=a[R],_=(x=a[R+1])+.5|0,(f=E+.5|0)===p&&_===d||(t.moveTo(E,x),p=f,d=_),R+=2;R<h;R+=2)f=(E=a[R])+.5|0,_=(x=a[R+1])+.5|0,R!=h-2&&f===p&&_===d||(t.lineTo(E,x),p=f,d=_);++S;break;case $s.SET_FILL_STYLE:O=F,this.alignFill_=F[2],b&&(this.fill_(t),b=0,I&&(t.stroke(),I=0)),t.fillStyle=F[1],++S;break;case $s.SET_STROKE_STYLE:w=F,I&&(t.stroke(),I=0),this.setStrokeStyle_(t,F),++S;break;case $s.STROKE:A?I++:t.stroke(),++S;break;default:++S}}b&&this.fill_(t),I&&t.stroke()},e.prototype.replay=function(t,e,i,n,o){this.viewRotation_=i,this.replay_(t,e,n,this.instructions,o,void 0,void 0)},e.prototype.replayHitDetection=function(t,e,i,n,o,r){return this.viewRotation_=i,this.replay_(t,e,n,this.hitDetectionInstructions,!0,o,r)},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var i,n,o=e.length,r=-1;for(t=0;t<o;++t)(n=(i=e[t])[0])==$s.END_GEOMETRY?r=t:n==$s.BEGIN_GEOMETRY&&(i[2]=t,Kt(this.hitDetectionInstructions,r,t),r=-1)},e.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var n=t.getColor();i.fillStyle=br(n||wr)}else i.fillStyle=void 0;if(e){var o=e.getColor();i.strokeStyle=br(o||Lr);var r=e.getLineCap();i.lineCap=void 0!==r?r:"round";var s=e.getLineDash();i.lineDash=s?s.slice():Mr;var a=e.getLineDashOffset();i.lineDashOffset=a||0;var h=e.getLineJoin();i.lineJoin=void 0!==h?h:"round";var l=e.getWidth();i.lineWidth=void 0!==l?l:1;var u=e.getMiterLimit();i.miterLimit=void 0!==u?u:10,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},e.prototype.createFill=function(t,e){var i=t.fillStyle,n=[$s.SET_FILL_STYLE,i];return"string"!=typeof i&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[$s.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e,i){var n=t.fillStyle;"string"==typeof n&&t.currentFillStyle==n||(void 0!==n&&this.instructions.push(e.call(this,t,i)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,n=t.lineCap,o=t.lineDash,r=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||o!=t.currentLineDash&&!Ht(t.currentLineDash,o)||t.currentLineDashOffset!=r||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=h)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=o,t.currentLineDashOffset=r,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=h)},e.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=[$s.END_GEOMETRY,e];this.instructions.push(i),this.hitDetectionInstructions.push(i)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=ze(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Xe(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(Ss),ia=function(t){function e(e,i,n,o,r,s){t.call(this,e,i,n,o,r,s),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.width_=void 0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawCoordinates_=function(t,e,i,n){return this.appendFlatCoordinates(t,e,i,n,!1,!1)},e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),o=this.coordinates.length,r=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([$s.DRAW_IMAGE,o,r,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.width_]),this.hitDetectionInstructions.push([$s.DRAW_IMAGE,o,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(t,e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),n=t.getStride(),o=this.coordinates.length,r=this.drawCoordinates_(i,0,i.length,n);this.instructions.push([$s.DRAW_IMAGE,o,r,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.width_]),this.hitDetectionInstructions.push([$s.DRAW_IMAGE,o,r,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(t,e)}},e.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.width_=void 0},e.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),n=t.getSize(),o=t.getHitDetectionImage(1),r=t.getImage(1),s=t.getOrigin();this.anchorX_=i[0],this.anchorY_=i[1],this.declutterGroup_=e,this.hitDetectionImage_=o,this.image_=r,this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScale(),this.width_=n[0]},e}(ea),na=function(t){function e(e,i,n,o,r,s){t.call(this,e,i,n,o,r,s)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawFlatCoordinates_=function(t,e,i,n){var o=this.coordinates.length,r=this.appendFlatCoordinates(t,e,i,n,!1,!1),s=[$s.MOVE_TO_LINE_TO,o,r];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},e.prototype.drawLineString=function(t,e){var i=this.state,n=i.strokeStyle,o=i.lineWidth;if(void 0!==n&&void 0!==o){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([$s.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Hs);var r=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(r,0,r.length,s),this.hitDetectionInstructions.push(Vs),this.endGeometry(t,e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state,n=i.strokeStyle,o=i.lineWidth;if(void 0!==n&&void 0!==o){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([$s.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Hs);for(var r=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),h=0,l=0,u=r.length;l<u;++l)h=this.drawFlatCoordinates_(s,h,r[l],a);this.hitDetectionInstructions.push(Vs),this.endGeometry(t,e)}},e.prototype.finish=function(){var t=this.state;void 0!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Vs),this.reverseHitDetectionInstructions(),this.state=null},e.prototype.applyStroke=function(e){void 0!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(Vs),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(Hs)},e}(ea),oa=function(t){function e(e,i,n,o,r,s){t.call(this,e,i,n,o,r,s)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawFlatCoordinatess_=function(t,e,i,n){var o=this.state,r=void 0!==o.fillStyle,s=void 0!=o.strokeStyle,a=i.length;this.instructions.push(Hs),this.hitDetectionInstructions.push(Hs);for(var h=0;h<a;++h){var l=i[h],u=this.coordinates.length,c=this.appendFlatCoordinates(t,e,l,n,!0,!s),p=[$s.MOVE_TO_LINE_TO,u,c];this.instructions.push(p),this.hitDetectionInstructions.push(p),s&&(this.instructions.push(Zs),this.hitDetectionInstructions.push(Zs)),e=l}return r&&(this.instructions.push(Ks),this.hitDetectionInstructions.push(Ks)),s&&(this.instructions.push(Vs),this.hitDetectionInstructions.push(Vs)),e},e.prototype.drawCircle=function(t,e){var i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0!==n||void 0!==o){this.setFillStrokeStyles_(t),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([$s.SET_FILL_STYLE,Tr(wr)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([$s.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var r=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatCoordinates(r,0,r.length,s,!1,!1);var h=[$s.CIRCLE,a];this.instructions.push(Hs,h),this.hitDetectionInstructions.push(Hs,h),this.hitDetectionInstructions.push(Ks),void 0!==i.fillStyle&&this.instructions.push(Ks),void 0!==i.strokeStyle&&(this.instructions.push(Vs),this.hitDetectionInstructions.push(Vs)),this.endGeometry(t,e)}},e.prototype.drawPolygon=function(t,e){var i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0!==n||void 0!==o){this.setFillStrokeStyles_(t),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([$s.SET_FILL_STYLE,Tr(wr)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([$s.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var r=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,r,a),this.endGeometry(t,e)}},e.prototype.drawMultiPolygon=function(t,e){var i=this.state,n=i.fillStyle,o=i.strokeStyle;if(void 0!==n||void 0!==o){this.setFillStrokeStyles_(t),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([$s.SET_FILL_STYLE,Tr(wr)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([$s.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var r=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),h=0,l=0,u=r.length;l<u;++l)h=this.drawFlatCoordinatess_(s,h,r[l],a);this.endGeometry(t,e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var t=this.tolerance;if(0!==t)for(var e=this.coordinates,i=0,n=e.length;i<n;++i)e[i]=Mn(e[i],t)},e.prototype.setFillStrokeStyles_=function(t){var e=this.state;void 0!==e.fillStyle&&this.updateFillStyle(e,this.createFill,t),void 0!==e.strokeStyle&&this.updateStrokeStyle(e,this.applyStroke)},e}(ea);function ra(t,e,i,n,o){var r,s,a,h,l,u,c,p,d,f=i,_=i,g=0,v=0,y=i;for(r=i;r<n;r+=o){var m=e[r],E=e[r+1];void 0!==h&&(p=m-h,d=E-l,a=Math.sqrt(p*p+d*d),void 0!==u&&(v+=s,Math.acos((u*p+c*d)/(s*a))>t&&(v>g&&(g=v,f=y,_=r),v=0,y=r-o)),s=a,u=p,c=d),h=m,l=E}return(v+=a)>g?[y,r]:[f,_]}var sa="point",aa="line";var ha={Circle:oa,Default:ea,Image:ia,LineString:na,Polygon:oa,Text:function(t){function e(e,i,n,o,r,s){t.call(this,e,i,n,o,r,s),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_={},Ar.prune()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawText=function(t,e){var i=this.textFillState_,n=this.textStrokeState_,o=this.textState_;if(""!==this.text_&&o&&(i||n)){var r,s,a=this.coordinates.length,h=t.getType(),l=null,u=2,c=2;if(o.placement===aa){if(!_i(this.getBufferedMaxExtent(),t.getExtent()))return;var p;if(l=t.getFlatCoordinates(),c=t.getStride(),h==yi.LINE_STRING)p=[l.length];else if(h==yi.MULTI_LINE_STRING)p=t.getEnds();else if(h==yi.POLYGON)p=t.getEnds().slice(0,1);else if(h==yi.MULTI_POLYGON){var d=t.getEndss();for(p=[],r=0,s=d.length;r<s;++r)p.push(d[r][0])}this.beginGeometry(t,e);for(var f,_=o.textAlign,g=0,v=0,y=p.length;v<y;++v){if(void 0==_){var m=ra(o.maxAngle,l,g,p[v],c);g=m[0],f=m[1]}else f=p[v];for(r=g;r<f;r+=c)this.coordinates.push(l[r],l[r+1]);u=this.coordinates.length,g=p[v],this.drawChars_(a,u,this.declutterGroup_),a=u}this.endGeometry(t,e)}else{var E=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_),x=E.width/this.pixelRatio;switch(h){case yi.POINT:case yi.MULTI_POINT:u=(l=t.getFlatCoordinates()).length;break;case yi.LINE_STRING:l=t.getFlatMidpoint();break;case yi.CIRCLE:l=t.getCenter();break;case yi.MULTI_LINE_STRING:u=(l=t.getFlatMidpoints()).length;break;case yi.POLYGON:if(l=t.getFlatInteriorPoint(),!o.overflow&&l[2]/this.resolution<x)return;c=3;break;case yi.MULTI_POLYGON:var T=t.getFlatInteriorPoints();for(l=[],r=0,s=T.length;r<s;r+=3)(o.overflow||T[r+2]/this.resolution>=x)&&l.push(T[r],T[r+1]);if(0==(u=l.length))return}u=this.appendFlatCoordinates(l,0,u,c,!1,!1),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&(this.updateFillStyle(this.state,this.createFill,t),this.hitDetectionInstructions.push(this.createFill(this.state,t))),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e),this.drawTextImage_(E,a,u),this.endGeometry(t,e)}}},e.prototype.getImage=function(t,e,i,n){var o,r=n+e+t+i+this.pixelRatio;if(!Ar.containsKey(r)){var s=n?this.strokeStates[n]||this.textStrokeState_:null,a=i?this.fillStates[i]||this.textFillState_:null,h=this.textStates[e]||this.textState_,l=this.pixelRatio,u=h.scale*l,c=Js[h.textAlign||"center"],p=n&&s.lineWidth?s.lineWidth:0,d=t.split("\n"),f=d.length,_=[],g=function(t,e,i){for(var n=e.length,o=0,r=0;r<n;++r){var s=jr(t,e[r]);o=Math.max(o,s),i.push(s)}return o}(h.font,d,_),v=zr(h.font),y=v*f,m=g+p,E=Qn(Math.ceil(m*u),Math.ceil((y+p)*u));o=E.canvas,Ar.set(r,o),1!=u&&E.scale(u,u),E.font=h.font,n&&(E.strokeStyle=s.strokeStyle,E.lineWidth=p,E.lineCap=s.lineCap,E.lineJoin=s.lineJoin,E.miterLimit=s.miterLimit,nt&&s.lineDash.length&&(E.setLineDash(s.lineDash),E.lineDashOffset=s.lineDashOffset)),i&&(E.fillStyle=a.fillStyle),E.textBaseline="middle",E.textAlign="center";var x,T=.5-c,S=c*o.width/u+T*p;if(n)for(x=0;x<f;++x)E.strokeText(d[x],S+T*_[x],.5*(p+v)+x*v);if(i)for(x=0;x<f;++x)E.fillText(d[x],S+T*_[x],.5*(p+v)+x*v)}return Ar.get(r)},e.prototype.drawTextImage_=function(t,e,i){var n=this.textState_,o=this.textStrokeState_,r=this.pixelRatio,s=Js[n.textAlign||"center"],a=Js[n.textBaseline],h=o&&o.lineWidth?o.lineWidth:0,l=s*t.width/r+2*(.5-s)*h,u=a*t.height/r+2*(.5-a)*h;this.instructions.push([$s.DRAW_IMAGE,e,i,t,(l-this.textOffsetX_)*r,(u-this.textOffsetY_)*r,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,t.width,n.padding==Pr?Pr:n.padding.map(function(t){return t*r}),!!n.backgroundFill,!!n.backgroundStroke]),this.hitDetectionInstructions.push([$s.DRAW_IMAGE,e,i,t,(l-this.textOffsetX_)*r,(u-this.textOffsetY_)*r,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/r,t.width,n.padding,!!n.backgroundFill,!!n.backgroundStroke])},e.prototype.drawChars_=function(t,e,i){var n=this.textStrokeState_,o=this.textState_,r=this.textFillState_,s=this.strokeKey_;n&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:n.strokeStyle,lineCap:n.lineCap,lineDashOffset:n.lineDashOffset,lineWidth:n.lineWidth,lineJoin:n.lineJoin,miterLimit:n.miterLimit,lineDash:n.lineDash}));var a=this.textKey_;this.textKey_ in this.textStates||(this.textStates[this.textKey_]={font:o.font,textAlign:o.textAlign||"center",scale:o.scale});var h=this.fillKey_;r&&(h in this.fillStates||(this.fillStates[h]={fillStyle:r.fillStyle}));var l=this.pixelRatio,u=Js[o.textBaseline],c=this.textOffsetY_*l,p=this.text_,d=o.font,f=o.scale,_=n?n.lineWidth*f/2:0,g=this.widths_[d];g||(this.widths_[d]=g={}),this.instructions.push([$s.DRAW_CHARS,t,e,u,i,o.overflow,h,o.maxAngle,function(t){var e=g[t];return e||(e=g[t]=jr(d,t)),e*f*l},c,s,_*l,p,a,1]),this.hitDetectionInstructions.push([$s.DRAW_CHARS,t,e,u,i,o.overflow,h,o.maxAngle,function(t){var e=g[t];return e||(e=g[t]=jr(d,t)),e*f},c,s,_,p,a,1/l])},e.prototype.setTextStyle=function(t,e){var i,n,o;if(t){this.declutterGroup_=e;var r=t.getFill();r?((n=this.textFillState_)||(n=this.textFillState_={}),n.fillStyle=br(r.getColor()||wr)):n=this.textFillState_=null;var s=t.getStroke();if(s){(o=this.textStrokeState_)||(o=this.textStrokeState_={});var a=s.getLineDash(),h=s.getLineDashOffset(),l=s.getWidth(),u=s.getMiterLimit();o.lineCap=s.getLineCap()||"round",o.lineDash=a?a.slice():Mr,o.lineDashOffset=void 0===h?0:h,o.lineJoin=s.getLineJoin()||"round",o.lineWidth=void 0===l?1:l,o.miterLimit=void 0===u?10:u,o.strokeStyle=br(s.getColor()||Lr)}else o=this.textStrokeState_=null;i=this.textState_;var p=t.getFont()||"10px sans-serif";Nr(p);var d=t.getScale();i.overflow=t.getOverflow(),i.font=p,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||"middle",i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Pr,i.scale=void 0===d?1:d;var f=t.getOffsetX(),_=t.getOffsetY(),g=t.getRotateWithView(),v=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===_?0:_,this.textRotateWithView_=void 0!==g&&g,this.textRotation_=void 0===v?0:v,this.strokeKey_=o?("string"==typeof o.strokeStyle?o.strokeStyle:c(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_=n?"string"==typeof n.fillStyle?n.fillStyle:"|"+c(n.fillStyle):""}else this.text_=""},e}(ea)},la=function(t){function e(e,i,n,o,r,s,a){t.call(this),this.declutterTree_=s,this.declutterGroup_=null,this.tolerance_=e,this.maxExtent_=i,this.overlaps_=r,this.pixelRatio_=o,this.resolution_=n,this.renderBuffer_=a,this.replaysByZIndex_={},this.hitDetectionContext_=Qn(1,1),this.hitDetectionTransform_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addDeclutter=function(t){var e=null;return this.declutterTree_&&(t?(e=this.declutterGroup_)[4]++:(e=this.declutterGroup_=[1/0,1/0,-1/0,-1/0]).push(1)),e},e.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()},e.prototype.hasReplays=function(t){for(var e in this.replaysByZIndex_)for(var i=this.replaysByZIndex_[e],n=0,o=t.length;n<o;++n)if(t[n]in i)return!0;return!1},e.prototype.finish=function(){for(var t in this.replaysByZIndex_){var e=this.replaysByZIndex_[t];for(var i in e)e[i].finish()}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o,r,s){var a,h=2*(n=Math.round(n))+1,l=pn(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),u=this.hitDetectionContext_;u.canvas.width!==h||u.canvas.height!==h?(u.canvas.width=h,u.canvas.height=h):u.clearRect(0,0,h,h),void 0!==this.renderBuffer_&&(ti(a=[1/0,1/0,-1/0,-1/0],t),Xe(a,e*(this.renderBuffer_+n),a));var c,p,d=function(t){if(void 0!==ua[t])return ua[t];for(var e=2*t+1,i=new Array(e),n=0;n<e;n++)i[n]=new Array(e);var o=t,r=0,s=0;for(;o>=r;)ca(i,t+o,t+r),ca(i,t+r,t+o),ca(i,t-r,t+o),ca(i,t-o,t+r),ca(i,t-o,t-r),ca(i,t-r,t-o),ca(i,t+r,t-o),ca(i,t+o,t-r),2*((s+=1+2*++r)-o)+1>0&&(s+=1-2*(o-=1));return ua[t]=i,i}(n);function f(t){for(var e=u.getImageData(0,0,h,h).data,i=0;i<h;i++)for(var n=0;n<h;n++)if(d[i][n]&&e[4*(n*h+i)+3]>0){var o=void 0;return(!c||p!=Ws.IMAGE&&p!=Ws.TEXT||-1!==c.indexOf(t))&&(o=r(t)),o||void u.clearRect(0,0,h,h)}}this.declutterTree_&&(c=this.declutterTree_.all().map(function(t){return t.value}));var _,g,v,y,m,E=Object.keys(this.replaysByZIndex_).map(Number);for(E.sort(Wt),_=E.length-1;_>=0;--_){var x=E[_].toString();for(v=this.replaysByZIndex_[x],g=qs.length-1;g>=0;--g)if(void 0!==(y=v[p=qs[g]]))if(!s||p!=Ws.IMAGE&&p!=Ws.TEXT){if(m=y.replayHitDetection(u,l,i,o,f,a))return m}else{var T=s[x];T?T.push(y,l.slice(0)):s[x]=[y,l.slice(0)]}}},e.prototype.getClipCoords=function(t){var e=this.maxExtent_,i=e[0],n=e[1],o=e[2],r=e[3],s=[i,n,i,r,o,r,o,n];return Ei(s,0,8,2,t,s),s},e.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 o=n[e];void 0===o&&(o=new(0,ha[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_),n[e]=o);return o},e.prototype.getReplays=function(){return this.replaysByZIndex_},e.prototype.isEmpty=function(){return m(this.replaysByZIndex_)},e.prototype.replay=function(t,e,i,n,o,r,s){var a=Object.keys(this.replaysByZIndex_).map(Number);a.sort(Wt),t.save(),this.clip(t,e);var h,l,u,c,p,d,f=r||qs;for(h=0,l=a.length;h<l;++h){var _=a[h].toString();for(p=this.replaysByZIndex_[_],u=0,c=f.length;u<c;++u){var g=f[u];if(d=p[g],void 0!==d)if(!s||g!=Ws.IMAGE&&g!=Ws.TEXT)d.replay(t,e,i,n,o);else{var v=s[_];v?v.push(d,e.slice(0)):s[_]=[d,e.slice(0)]}}}t.restore()},e}(js),ua={0:[[!0]]};function ca(t,e,i){var n,o=Math.floor(t.length/2);if(e>=o)for(n=o;n<e;n++)t[n][i]=!0;else if(e<o)for(n=e+1;n<o;n++)t[n][i]=!0}var pa=la,da=.5,fa={Point:function(t,e,i,n){var o=i.getImage();if(o){if(o.getImageState()!=Ir.LOADED)return;var r=t.getReplay(i.getZIndex(),Ws.IMAGE);r.setImageStyle(o,t.addDeclutter(!1)),r.drawPoint(e,n)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),Ws.TEXT);a.setTextStyle(s,t.addDeclutter(!!o)),a.drawText(e,n)}},LineString:function(t,e,i,n){var o=i.getStroke();if(o){var r=t.getReplay(i.getZIndex(),Ws.LINE_STRING);r.setFillStrokeStyle(null,o),r.drawLineString(e,n)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),Ws.TEXT);a.setTextStyle(s,t.addDeclutter(!1)),a.drawText(e,n)}},Polygon:function(t,e,i,n){var o=i.getFill(),r=i.getStroke();if(o||r){var s=t.getReplay(i.getZIndex(),Ws.POLYGON);s.setFillStrokeStyle(o,r),s.drawPolygon(e,n)}var a=i.getText();if(a){var h=t.getReplay(i.getZIndex(),Ws.TEXT);h.setTextStyle(a,t.addDeclutter(!1)),h.drawText(e,n)}},MultiPoint:function(t,e,i,n){var o=i.getImage();if(o){if(o.getImageState()!=Ir.LOADED)return;var r=t.getReplay(i.getZIndex(),Ws.IMAGE);r.setImageStyle(o,t.addDeclutter(!1)),r.drawMultiPoint(e,n)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),Ws.TEXT);a.setTextStyle(s,t.addDeclutter(!!o)),a.drawText(e,n)}},MultiLineString:function(t,e,i,n){var o=i.getStroke();if(o){var r=t.getReplay(i.getZIndex(),Ws.LINE_STRING);r.setFillStrokeStyle(null,o),r.drawMultiLineString(e,n)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),Ws.TEXT);a.setTextStyle(s,t.addDeclutter(!1)),a.drawText(e,n)}},MultiPolygon:function(t,e,i,n){var o=i.getFill(),r=i.getStroke();if(r||o){var s=t.getReplay(i.getZIndex(),Ws.POLYGON);s.setFillStrokeStyle(o,r),s.drawMultiPolygon(e,n)}var a=i.getText();if(a){var h=t.getReplay(i.getZIndex(),Ws.TEXT);h.setTextStyle(a,t.addDeclutter(!1)),h.drawText(e,n)}},GeometryCollection:function(t,e,i,n){var o,r,s=e.getGeometriesArray();for(o=0,r=s.length;o<r;++o){var a=fa[s[o].getType()];a(t,s[o],i,n)}},Circle:function(t,e,i,n){var o=i.getFill(),r=i.getStroke();if(o||r){var s=t.getReplay(i.getZIndex(),Ws.CIRCLE);s.setFillStrokeStyle(o,r),s.drawCircle(e,n)}var a=i.getText();if(a){var h=t.getReplay(i.getZIndex(),Ws.TEXT);h.setTextStyle(a,t.addDeclutter(!1)),h.drawText(e,n)}}};function _a(t,e){return parseInt(c(t),10)-parseInt(c(e),10)}function ga(t,e){var i=va(t,e);return i*i}function va(t,e){return da*t/e}function ya(t,e,i,n,o,r){var s=!1,a=i.getImage();if(a){var h=a.getImageState();h==Ir.LOADED||h==Ir.ERROR?a.unlistenImageChange(o,r):(h==Ir.IDLE&&a.load(),h=a.getImageState(),a.listenImageChange(o,r),s=!0)}return function(t,e,i,n){var o=i.getGeometryFunction()(e);if(!o)return;var r=o.getSimplifiedGeometry(n);if(i.getRenderer())!function t(e,i,n,o){if(i.getType()==yi.GEOMETRY_COLLECTION){for(var r=i.getGeometries(),s=0,a=r.length;s<a;++s)t(e,r[s],n,o);return}var h=e.getReplay(n.getZIndex(),Ws.DEFAULT);h.drawCustom(i,o,n.getRenderer())}(t,r,i,e);else{var s=fa[r.getType()];s(t,r,i,e)}}(t,e,i,n),s}var ma=function(t){function e(e){t.call(this,e),this.declutterTree_=e.getDeclutter()?fs()(9,void 0):null,this.dirty_=!1,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.context=Qn(),C(Ar,N.CLEAR,this.handleFontsChanged_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){b(Ar,N.CLEAR,this.handleFontsChanged_,this),t.prototype.disposeInternal.call(this)},e.prototype.compose=function(t,e,i){var n=e.extent,o=e.pixelRatio,r=i.managed?e.skippedFeatureUids:{},s=e.viewState,a=s.projection,h=s.rotation,l=a.getExtent(),u=this.getLayer().getSource(),c=this.getTransform(e,0),p=i.extent,d=void 0!==p;d&&this.clip(t,e,p);var f=this.replayGroup_;if(f&&!f.isEmpty()){this.declutterTree_&&this.declutterTree_.clear();var _,g=this.getLayer(),v=0,y=0,m=1!==i.opacity,E=g.hasListener(ae.RENDER);if(m||E){var x=t.canvas.width,T=t.canvas.height;if(h){var S=Math.round(Math.sqrt(x*x+T*T));v=(S-x)/2,y=(S-T)/2,x=T=S}this.context.canvas.width=x,this.context.canvas.height=T,_=this.context}else _=t;var C=_.globalAlpha;m||(_.globalAlpha=i.opacity),_!=t&&_.translate(v,y);var R=e.viewHints,b=!(R[Ce]||R[Re]),I=e.size[0]*o,O=e.size[1]*o;if(Wr(_,-h,I/2,O/2),f.replay(_,c,h,r,b),u.getWrapX()&&a.canWrapX()&&!Be(l,n)){for(var w,M=n[0],L=fi(l),P=0;M<l[0];)w=L*--P,c=this.getTransform(e,w),f.replay(_,c,h,r,b),M+=L;for(P=0,M=n[2];M>l[2];)w=L*++P,c=this.getTransform(e,w),f.replay(_,c,h,r,b),M-=L}if(Wr(_,h,I/2,O/2),E&&this.dispatchRenderEvent(_,e,c),_!=t){if(m){var A=t.globalAlpha;t.globalAlpha=i.opacity,t.drawImage(_.canvas,-v,-y),t.globalAlpha=A}else t.drawImage(_.canvas,-v,-y);_.translate(-v,-y)}m||(_.globalAlpha=C)}d&&t.restore()},e.prototype.composeFrame=function(t,e,i){var n=this.getTransform(t,0);this.preCompose(i,t,n),this.compose(i,t,e),this.postCompose(i,t,e,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o){if(this.replayGroup_){var r=e.viewState.resolution,s=e.viewState.rotation,a=this.getLayer(),h={};return this.replayGroup_.forEachFeatureAtCoordinate(t,r,s,i,{},function(t){var e=c(t);if(!(e in h))return h[e]=!0,n.call(o,t,a)},null)}},e.prototype.handleFontsChanged_=function(t){var e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t,e){var i=this.getLayer(),n=i.getSource(),o=t.viewHints[Ce],r=t.viewHints[Re],s=i.getUpdateWhileAnimating(),a=i.getUpdateWhileInteracting();if(!this.dirty_&&!s&&o||!a&&r)return!0;var h=t.extent,l=t.viewState,u=l.projection,c=l.resolution,p=t.pixelRatio,d=i.getRevision(),f=i.getRenderBuffer(),_=i.getRenderOrder();void 0===_&&(_=_a);var g=Xe(h,f*c),v=l.projection.getExtent();if(n.getWrapX()&&l.projection.canWrapX()&&!Be(v,t.extent)){var y=fi(v),m=Math.max(fi(g)/2,y);g[0]=v[0]-m,g[2]=v[2]+m}if(!this.dirty_&&this.renderedResolution_==c&&this.renderedRevision_==d&&this.renderedRenderOrder_==_&&Be(this.renderedExtent_,g))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var E=new pa(va(c,p),g,c,p,n.getOverlaps(),this.declutterTree_,i.getRenderBuffer());n.loadFeatures(g,c,u);var x=function(t){var e,n=t.getStyleFunction()||i.getStyleFunction();if(n&&(e=n(t,c)),e){var o=this.renderFeature(t,c,p,e,E);this.dirty_=this.dirty_||o}}.bind(this);if(_){var T=[];n.forEachFeatureInExtent(g,function(t){T.push(t)}),T.sort(_);for(var S=0,C=T.length;S<C;++S)x(T[S])}else n.forEachFeatureInExtent(g,x);return E.finish(),this.renderedResolution_=c,this.renderedRevision_=d,this.renderedRenderOrder_=_,this.renderedExtent_=g,this.replayGroup_=E,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,i,n,o){if(!n)return!1;var r=!1;if(Array.isArray(n))for(var s=0,a=n.length;s<a;++s)r=ya(o,t,n[s],ga(e,i),this.handleStyleImageChange_,this)||r;else r=ya(o,t,n,ga(e,i),this.handleStyleImageChange_,this);return r},e}(Ps);ma.handles=function(t){return t.getType()===yr.VECTOR},ma.create=function(t,e){return new ma(e)};var Ea=ma,xa={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"},Ta={image:[Ws.POLYGON,Ws.CIRCLE,Ws.LINE_STRING,Ws.IMAGE,Ws.TEXT],hybrid:[Ws.POLYGON,Ws.LINE_STRING]},Sa={image:[Ws.DEFAULT],hybrid:[Ws.IMAGE,Ws.TEXT,Ws.DEFAULT],vector:qs},Ca=function(t){function e(e){t.call(this,e,!0),this.declutterTree_=e.getDeclutter()?fs()(9,void 0):null,this.dirty_=!1,this.renderedLayerRevision_,this.tmpTransform_=[1,0,0,1,0,0];var i=e.getRenderMode();this.zDirection=i===xa.VECTOR?1:0,i!==xa.VECTOR&&(this.context=Qn()),C(Ar,N.CLEAR,this.handleFontsChanged_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){b(Ar,N.CLEAR,this.handleFontsChanged_,this),t.prototype.disposeInternal.call(this)},e.prototype.getTile=function(e,i,n,o,r){var s=t.prototype.getTile.call(this,e,i,n,o,r);return s.getState()===he.LOADED&&(this.createReplayGroup_(s,o,r),this.context&&this.renderTileImage_(s,o,r)),s},e.prototype.getTileImage=function(t){var e=this.getLayer();return t.getImage(e)},e.prototype.prepareFrame=function(e,i){var n=this.getLayer().getRevision();return this.renderedLayerRevision_!=n&&(this.renderedTiles.length=0),this.renderedLayerRevision_=n,t.prototype.prepareFrame.call(this,e,i)},e.prototype.createReplayGroup_=function(t,e,i){var n=this,o=this.getLayer(),r=o.getRevision(),s=o.getRenderOrder()||null,a=t.getReplayState(o);if(a.dirty||a.renderedRevision!=r||a.renderedRenderOrder!=s){for(var h=o.getSource(),l=h.getTileGrid(),u=h.getTileGridForProjection(i).getResolution(t.tileCoord[0]),c=t.extent,p=function(r,p){var d=t.getTile(t.tileKeys[r]);if(d.getState()==he.LOADED){var f=d.tileCoord,_=l.getTileCoordExtent(f),g=ci(c,_),v=Je(_,g)?null:Xe(g,o.getRenderBuffer()*u,n.tmpExtent),y=d.getProjection(),m=!1;Qi(i,y)||(m=!0,d.setProjection(i)),a.dirty=!1;var E=new pa(0,g,u,e,h.getOverlaps(),n.declutterTree_,o.getRenderBuffer()),x=ga(u,e),T=function(t){var e,i=t.getStyleFunction()||o.getStyleFunction();if(i&&(e=i(t,u)),e){var n=this.renderFeature(t,x,e,E);this.dirty_=this.dirty_||n,a.dirty=a.dirty||n}},S=d.getFeatures();s&&s!==a.renderedRenderOrder&&S.sort(s);for(var C=0,R=S.length;C<R;++C){var b=S[C];m&&(y.getUnits()==Ri.TILE_PIXELS&&(y.setWorldExtent(_),y.setExtent(d.getExtent())),b.getGeometry().transform(y,i)),v&&!_i(v,b.getGeometry().getExtent())||T.call(n,b)}E.finish(),d.setReplayGroup(o,t.tileCoord.toString(),E)}},d=0,f=t.tileKeys.length;d<f;++d)p(d);a.renderedRevision=r,a.renderedRenderOrder=s}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,n,o){var r=e.viewState.resolution,s=e.viewState.rotation;i=void 0==i?0:i;var a,h,l,u,p=this.getLayer(),d={},f=this.renderedTiles;for(l=0,u=f.length;l<u;++l){var _=f[l];if(We(a=Xe(_.extent,i*r,a),t))for(var g=0,v=_.tileKeys.length;g<v;++g){var y=_.getTile(_.tileKeys[g]);if(y.getState()==he.LOADED){var m=y.getReplayGroup(p,_.tileCoord.toString());h=h||m.forEachFeatureAtCoordinate(t,r,s,i,{},function(t){var e=c(t);if(!(e in d))return d[e]=!0,n.call(o,t,p)},null)}}}return h},e.prototype.getReplayTransform_=function(t,e){var i=this.getLayer().getSource().getTileGrid(),n=t.tileCoord,o=i.getResolution(n[0]),r=e.viewState,s=e.pixelRatio,a=r.resolution/s,h=i.getTileCoordExtent(n,this.tmpExtent),l=r.center,u=pi(h),c=e.size,p=Math.round(s*c[0]/2),d=Math.round(s*c[1]/2);return pn(this.tmpTransform_,p,d,o/a,o/a,r.rotation,(u[0]-l[0])/o,(l[1]-u[1])/o)},e.prototype.handleFontsChanged_=function(t){var e=this.getLayer();e.getVisible()&&void 0!==this.renderedLayerRevision_&&e.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.postCompose=function(e,i,n){var o=this.getLayer(),r=o.getRenderMode();if(r!=xa.IMAGE){var s,a,h=o.getDeclutter()?{}:null,l=o.getSource(),u=Sa[r],c=i.pixelRatio,p=i.viewState.rotation,d=i.size;p&&Wr(e,-p,s=Math.round(c*d[0]/2),a=Math.round(c*d[1]/2)),h&&this.declutterTree_.clear();for(var f=i.viewHints,_=!(f[Ce]||f[Re]),g=this.renderedTiles,v=l.getTileGridForProjection(i.viewState.projection),y=[],m=[],E=g.length-1;E>=0;--E){var x=g[E];if(x.getState()!=he.ABORT)for(var T=x.tileCoord,S=v.getTileCoordExtent(T,this.tmpExtent)[0]-x.extent[0],C=void 0,R=0,b=x.tileKeys.length;R<b;++R){var I=x.getTile(x.tileKeys[R]);if(I.getState()==he.LOADED){var O=I.getReplayGroup(o,T.toString());if(O&&O.hasReplays(u)){C||(C=this.getTransform(i,S));var w=I.tileCoord[0],M=O.getClipCoords(C);e.save(),e.globalAlpha=n.opacity;for(var L=0,P=y.length;L<P;++L){var A=y[L];w<m[L]&&(e.beginPath(),e.moveTo(M[0],M[1]),e.lineTo(M[2],M[3]),e.lineTo(M[4],M[5]),e.lineTo(M[6],M[7]),e.moveTo(A[6],A[7]),e.lineTo(A[4],A[5]),e.lineTo(A[2],A[3]),e.lineTo(A[0],A[1]),e.clip())}O.replay(e,C,p,{},_,u,h),e.restore(),y.push(M),m.push(w)}}}}h&&function(t,e,i,n){for(var o=Object.keys(t).map(Number).sort(Wt),r={},s=0,a=o.length;s<a;++s)for(var h=t[o[s].toString()],l=0,u=h.length;l<u;){var c=h[l++],p=h[l++];c.replay(e,p,i,r,n)}}(h,e,p,_),p&&Wr(e,p,s,a)}t.prototype.postCompose.call(this,e,i,n)},e.prototype.renderFeature=function(t,e,i,n){if(!i)return!1;var o=!1;if(Array.isArray(i))for(var r=0,s=i.length;r<s;++r)o=ya(n,t,i[r],e,this.handleStyleImageChange_,this)||o;else o=ya(n,t,i,e,this.handleStyleImageChange_,this);return o},e.prototype.renderTileImage_=function(t,e,i){var n=this.getLayer(),o=t.getReplayState(n),r=n.getRevision(),s=Ta[n.getRenderMode()];if(s&&o.renderedTileRevision!==r){o.renderedTileRevision=r;var a=t.wrappedTileCoord,h=a[0],l=n.getSource(),u=l.getTileGridForProjection(i),c=u.getResolution(h),p=t.getContext(n),d=l.getTilePixelSize(h,e,i);p.canvas.width=d[0],p.canvas.height=d[1];for(var f=u.getTileCoordExtent(a,this.tmpExtent),_=0,g=t.tileKeys.length;_<g;++_){var v=t.getTile(t.tileKeys[_]);if(v.getState()==he.LOADED){var y=e/c,m=rn(this.tmpTransform_);un(m,y,-y),cn(m,-f[0],-f[3]),v.getReplayGroup(n,t.tileCoord.toString()).replay(p,m,0,{},!0,s)}}}},e}(Xs);Ca.handles=function(t){return t.getType()===yr.VECTOR_TILE},Ca.create=function(t,e){return new Ca(e)};var Ra=Ca,ba=function(t){function e(e){(e=g({},e)).controls||(e.controls=function(t){var e=t||{},i=new U;return(void 0===e.zoom||e.zoom)&&i.push(new Oo(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new Io(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new Ro(e.attributionOptions)),i}()),e.interactions||(e.interactions=function(t){var e=t||{},i=new U,n=new Mo(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new qo),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new Yo({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new $o({condition:e.onFocusOnly?zo:void 0,kinetic:n})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new dr),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new fr({constrainResolution:e.constrainResolution,duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new ar),i.push(new lr({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new pr({condition:e.onFocusOnly?zo:void 0,constrainResolution:e.constrainResolution,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new or({duration:e.zoomDuration})),i}()),t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRenderer=function(){var t=new Ls(this);return t.registerLayerRenderers([ks,Xs,Ea,Ra]),t},e}(co),Ia="preload",Oa="useInterimTilesOnError",wa=function(t){function e(e){var i=e||{},n=g({},i);delete n.preload,delete n.useInterimTilesOnError,t.call(this,n),this.setPreload(void 0!==i.preload?i.preload:0),this.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),this.type=yr.TILE}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getPreload=function(){return this.get(Ia)},e.prototype.setPreload=function(t){this.set(Ia,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Oa)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Oa,t)},e}(So);wa.prototype.getSource;var Ma=wa,La={BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_CENTER:"center-center",CENTER_RIGHT:"center-right",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right"},Pa={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},Aa=function(t){function e(e){t.call(this),this.options=e,this.id=e.id,this.insertFirst=void 0===e.insertFirst||e.insertFirst,this.stopEvent=void 0===e.stopEvent||e.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==e.className?e.className:"ol-overlay-container "+vo,this.element.style.position="absolute",this.autoPan=void 0!==e.autoPan&&e.autoPan,this.autoPanAnimation=e.autoPanAnimation||{},this.autoPanMargin=void 0!==e.autoPanMargin?e.autoPanMargin:20,this.rendered={bottom_:"",left_:"",right_:"",top_:"",visible:!0},this.mapPostrenderListenerKey=null,C(this,z(Pa.ELEMENT),this.handleElementChanged,this),C(this,z(Pa.MAP),this.handleMapChanged,this),C(this,z(Pa.OFFSET),this.handleOffsetChanged,this),C(this,z(Pa.POSITION),this.handlePositionChanged,this),C(this,z(Pa.POSITIONING),this.handlePositioningChanged,this),void 0!==e.element&&this.setElement(e.element),this.setOffset(void 0!==e.offset?e.offset:[0,0]),this.setPositioning(void 0!==e.positioning?e.positioning:La.TOP_LEFT),void 0!==e.position&&this.setPosition(e.position)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){return this.get(Pa.ELEMENT)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(Pa.MAP)},e.prototype.getOffset=function(){return this.get(Pa.OFFSET)},e.prototype.getPosition=function(){return this.get(Pa.POSITION)},e.prototype.getPositioning=function(){return this.get(Pa.POSITIONING)},e.prototype.handleElementChanged=function(){io(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(eo(this.element),I(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=C(t,ne,this.render,this),this.updatePixelPosition();var e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element)}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.get(Pa.POSITION)&&this.autoPan&&this.panIntoView()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(Pa.ELEMENT,t)},e.prototype.setMap=function(t){this.set(Pa.MAP,t)},e.prototype.setOffset=function(t){this.set(Pa.OFFSET,t)},e.prototype.setPosition=function(t){this.set(Pa.POSITION,t)},e.prototype.panIntoView=function(){var t=this.getMap();if(t&&t.getTargetElement()){var e=this.getRect(t.getTargetElement(),t.getSize()),i=this.getElement(),n=this.getRect(i,[function(t){var e=t.offsetWidth,i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)}(i),function(t){var e=t.offsetHeight,i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)}(i)]),o=this.autoPanMargin;if(!Be(e,n)){var r=n[0]-e[0],s=e[2]-n[2],a=n[1]-e[1],h=e[3]-n[3],l=[0,0];if(r<0?l[0]=r-o:s<0&&(l[0]=Math.abs(s)+o),a<0?l[1]=a-o:h<0&&(l[1]=Math.abs(h)+o),0!==l[0]||0!==l[1]){var u=t.getView().getCenter(),c=t.getPixelFromCoordinate(u),p=[c[0]+l[0],c[1]+l[1]];t.getView().animate({center:t.getCoordinateFromPixel(p),duration:this.autoPanAnimation.duration,easing:this.autoPanAnimation.easing})}}}},e.prototype.getRect=function(t,e){var i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,o=i.top+window.pageYOffset;return[n,o,n+e[0],o+e[1]]},e.prototype.setPositioning=function(t){this.set(Pa.POSITIONING,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var i=this.element.style,n=this.getOffset(),o=this.getPositioning();this.setVisible(!0);var r=n[0],s=n[1];if(o==La.BOTTOM_RIGHT||o==La.CENTER_RIGHT||o==La.TOP_RIGHT){""!==this.rendered.left_&&(this.rendered.left_=i.left="");var a=Math.round(e[0]-t[0]-r)+"px";this.rendered.right_!=a&&(this.rendered.right_=i.right=a)}else{""!==this.rendered.right_&&(this.rendered.right_=i.right=""),o!=La.BOTTOM_CENTER&&o!=La.CENTER_CENTER&&o!=La.TOP_CENTER||(r-=this.element.offsetWidth/2);var h=Math.round(t[0]+r)+"px";this.rendered.left_!=h&&(this.rendered.left_=i.left=h)}if(o==La.BOTTOM_LEFT||o==La.BOTTOM_CENTER||o==La.BOTTOM_RIGHT){""!==this.rendered.top_&&(this.rendered.top_=i.top="");var l=Math.round(e[1]-t[1]-s)+"px";this.rendered.bottom_!=l&&(this.rendered.bottom_=i.bottom=l)}else{""!==this.rendered.bottom_&&(this.rendered.bottom_=i.bottom=""),o!=La.CENTER_LEFT&&o!=La.CENTER_CENTER&&o!=La.CENTER_RIGHT||(s-=this.element.offsetHeight/2);var u=Math.round(t[1]+s)+"px";this.rendered.top_!=u&&(this.rendered.top_=i.top=u)}},e.prototype.getOptions=function(){return this.options},e}(j),Fa=function(t,e){this.space_=e,this.emptyBlocks_=[{x:0,y:0,width:t,height:t}],this.entries_={},this.context_=Qn(t,t),this.canvas_=this.context_.canvas};Fa.prototype.get=function(t){return this.entries_[t]||null},Fa.prototype.add=function(t,e,i,n,o){for(var r=0,s=this.emptyBlocks_.length;r<s;++r){var a=this.emptyBlocks_[r];if(a.width>=e+this.space_&&a.height>=i+this.space_){var h={offsetX:a.x+this.space_,offsetY:a.y+this.space_,image:this.canvas_};return this.entries_[t]=h,n.call(o,this.context_,a.x+this.space_,a.y+this.space_),this.split_(r,a,e+this.space_,i+this.space_),h}}return null},Fa.prototype.split_=function(t,e,i,n){var o,r;e.width-i>e.height-n?(o={x:e.x+i,y:e.y,width:e.width-i,height:e.height},r={x:e.x,y:e.y+n,width:i,height:e.height-n},this.updateBlocks_(t,o,r)):(o={x:e.x+i,y:e.y,width:e.width-i,height:n},r={x:e.x,y:e.y+n,width:e.width,height:e.height-n},this.updateBlocks_(t,o,r))},Fa.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 ka=Fa,Da=function(t){var e=t||{};this.currentSize_=void 0!==e.initialSize?e.initialSize:256,this.maxSize_=void 0!==e.maxSize?e.maxSize:void 0!==Z?Z:2048,this.space_=void 0!==e.space?e.space:1,this.atlases_=[new ka(this.currentSize_,this.space_)],this.currentHitSize_=this.currentSize_,this.hitAtlases_=[new ka(this.currentHitSize_,this.space_)]};Da.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)},Da.prototype.getInfo_=function(t,e){for(var i=0,n=t.length;i<n;++i){var o=t[i].get(e);if(o)return o}return null},Da.prototype.mergeInfos_=function(t,e){return{offsetX:t.offsetX,offsetY:t.offsetY,image:t.image,hitImage:e.image}},Da.prototype.add=function(t,e,i,n,o,r){if(e+this.space_>this.maxSize_||i+this.space_>this.maxSize_)return null;var s=this.add_(!1,t,e,i,n,r);if(!s)return null;var a=void 0!==o?o:P,h=this.add_(!0,t,e,i,a,r);return this.mergeInfos_(s,h)},Da.prototype.add_=function(t,e,i,n,o,r){var s,a,h,l,u=t?this.hitAtlases_:this.atlases_;for(h=0,l=u.length;h<l;++h){if(a=(s=u[h]).add(e,i,n,o,r))return a;if(!a&&h===l-1){var c=void 0;t?(c=Math.min(2*this.currentHitSize_,this.maxSize_),this.currentHitSize_=c):(c=Math.min(2*this.currentSize_,this.maxSize_),this.currentSize_=c),s=new ka(c,this.space_),u.push(s),++l}}return null};var Na={FRACTION:"fraction",PIXELS:"pixels"},Ga=function(t){function e(e,i,n,o,r,s){t.call(this),this.hitDetectionImage_=null,this.image_=e||new Image,null!==o&&(this.image_.crossOrigin=o),this.canvas_=s?document.createElement("canvas"):null,this.color_=s,this.imageListenerKeys_=null,this.imageState_=r,this.size_=n,this.src_=i,this.tainted_}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===Ir.LOADED){this.tainted_=!1;var t=Qn(1,1);try{t.drawImage(this.image_,0,0),t.getImageData(0,0,1,1)}catch(t){this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(N.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=Ir.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=Ir.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.replaceColor_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.canvas_?this.canvas_:this.image_},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(t){if(!this.hitDetectionImage_)if(this.isTainted_()){var e=this.size_[0],i=this.size_[1],n=Qn(e,i);n.fillRect(0,0,e,i),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==Ir.IDLE){this.imageState_=Ir.LOADING,this.imageListenerKeys_=[R(this.image_,N.ERROR,this.handleImageError_,this),R(this.image_,N.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch(t){this.handleImageError_()}}},e.prototype.replaceColor_=function(){if(this.color_&&!this.isTainted_()){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,o=this.color_[1]/255,r=this.color_[2]/255,s=0,a=i.length;s<a;s+=4)i[s]*=n,i[s+1]*=o,i[s+2]*=r;t.putImageData(e,0,0)}},e.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(I),this.imageListenerKeys_=null},e}(D);var Ya={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},Xa=function(t){function e(e){var i=e||{},n=void 0!==i.opacity?i.opacity:1,o=void 0!==i.rotation?i.rotation:0,r=void 0!==i.scale?i.scale:1,s=void 0!==i.rotateWithView&&i.rotateWithView;t.call(this,{opacity:n,rotation:o,scale:r,rotateWithView:s}),this.anchor_=void 0!==i.anchor?i.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==i.anchorOrigin?i.anchorOrigin:Ya.TOP_LEFT,this.anchorXUnits_=void 0!==i.anchorXUnits?i.anchorXUnits:Na.FRACTION,this.anchorYUnits_=void 0!==i.anchorYUnits?i.anchorYUnits:Na.FRACTION,this.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;var a=void 0!==i.img?i.img:null,h=void 0!==i.imgSize?i.imgSize:null,l=i.src;le(!(void 0!==l&&a),4),le(!a||a&&h,5),void 0!==l&&0!==l.length||!a||(l=a.src||c(a)),le(void 0!==l&&l.length>0,6);var u,p=void 0!==i.src?Ir.IDLE:Ir.LOADED;this.color_=void 0!==i.color?(u=i.color,Array.isArray(u)?u:Sr(u)):null,this.iconImage_=function(t,e,i,n,o,r){var s=Is.get(e,n,r);return s||(s=new Ga(t,e,i,n,o,r),Is.set(e,n,r,s)),s}(a,l,h,this.crossOrigin_,p,this.color_),this.offset_=void 0!==i.offset?i.offset:[0,0],this.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:Ya.TOP_LEFT,this.origin_=null,this.size_=void 0!==i.size?i.size:null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==Na.FRACTION||this.anchorYUnits_==Na.FRACTION){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Na.FRACTION&&(t[0]*=e[0]),this.anchorYUnits_==Na.FRACTION&&(t[1]*=e[1])}if(this.anchorOrigin_!=Ya.TOP_LEFT){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=Ya.TOP_RIGHT&&this.anchorOrigin_!=Ya.BOTTOM_RIGHT||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Ya.BOTTOM_LEFT&&this.anchorOrigin_!=Ya.BOTTOM_RIGHT||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(t){return this.iconImage_.getHitDetectionImage(t)},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=Ya.TOP_LEFT){var e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),this.offsetOrigin_!=Ya.TOP_RIGHT&&this.offsetOrigin_!=Ya.BOTTOM_RIGHT||(t[0]=i[0]-e[0]-t[0]),this.offsetOrigin_!=Ya.BOTTOM_LEFT&&this.offsetOrigin_!=Ya.BOTTOM_RIGHT||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t,e){return C(this.iconImage_,N.CHANGE,t,e)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t,e){b(this.iconImage_,N.CHANGE,t,e)},e}(Vr),za=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 $r({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:sa,this.overflow_=!!e.overflow,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};za.prototype.clone=function(){return new za({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(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0})},za.prototype.getOverflow=function(){return this.overflow_},za.prototype.getFont=function(){return this.font_},za.prototype.getMaxAngle=function(){return this.maxAngle_},za.prototype.getPlacement=function(){return this.placement_},za.prototype.getOffsetX=function(){return this.offsetX_},za.prototype.getOffsetY=function(){return this.offsetY_},za.prototype.getFill=function(){return this.fill_},za.prototype.getRotateWithView=function(){return this.rotateWithView_},za.prototype.getRotation=function(){return this.rotation_},za.prototype.getScale=function(){return this.scale_},za.prototype.getStroke=function(){return this.stroke_},za.prototype.getText=function(){return this.text_},za.prototype.getTextAlign=function(){return this.textAlign_},za.prototype.getTextBaseline=function(){return this.textBaseline_},za.prototype.getBackgroundFill=function(){return this.backgroundFill_},za.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},za.prototype.getPadding=function(){return this.padding_},za.prototype.setOverflow=function(t){this.overflow_=t},za.prototype.setFont=function(t){this.font_=t},za.prototype.setMaxAngle=function(t){this.maxAngle_=t},za.prototype.setOffsetX=function(t){this.offsetX_=t},za.prototype.setOffsetY=function(t){this.offsetY_=t},za.prototype.setPlacement=function(t){this.placement_=t},za.prototype.setFill=function(t){this.fill_=t},za.prototype.setRotation=function(t){this.rotation_=t},za.prototype.setScale=function(t){this.scale_=t},za.prototype.setStroke=function(t){this.stroke_=t},za.prototype.setText=function(t){this.text_=t},za.prototype.setTextAlign=function(t){this.textAlign_=t},za.prototype.setTextBaseline=function(t){this.textBaseline_=t},za.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},za.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},za.prototype.setPadding=function(t){this.padding_=t};var ja="1.3.0";function Wa(t,e,i,n){var o=nn(i,e,t),r=$i(e,n,i),s=e.getMetersPerUnit();void 0!==s&&(r*=s);var a=t.getMetersPerUnit();void 0!==a&&(r/=a);var h=t.getExtent();if(!h||We(h,o)){var l=$i(t,r,o)/r;isFinite(l)&&l>0&&(r/=l)}return r}function Ba(t,e,i,n){var o=i-t,r=n-e,s=Math.sqrt(o*o+r*r);return[Math.round(i+o/s),Math.round(n+r/s)]}function Ua(t,e,i,n,o,r,s,a,h,l,u){var c=Qn(Math.round(i*t),Math.round(i*e));if(0===h.length)return c.canvas;c.scale(i,i);var p=[1/0,1/0,-1/0,-1/0];h.forEach(function(t,e,i){Qe(p,t.extent)});var d=fi(p),f=ui(p),_=Qn(Math.round(i*d/n),Math.round(i*f/n)),g=i/n;h.forEach(function(t,e,i){var n=t.extent[0]-p[0],o=-(t.extent[3]-p[3]),r=fi(t.extent),s=ui(t.extent);_.drawImage(t.image,l,l,t.image.width-2*l,t.image.height-2*l,n*g,o*g,r*g,s*g)});var v=pi(s);return a.getTriangles().forEach(function(t,e,o){var s=t.source,a=t.target,h=s[0][0],l=s[0][1],u=s[1][0],d=s[1][1],f=s[2][0],g=s[2][1],y=(a[0][0]-v[0])/r,m=-(a[0][1]-v[1])/r,E=(a[1][0]-v[0])/r,x=-(a[1][1]-v[1])/r,T=(a[2][0]-v[0])/r,S=-(a[2][1]-v[1])/r,C=h,R=l;h=0,l=0;var b=function(t){for(var e=t.length,i=0;i<e;i++){for(var n=i,o=Math.abs(t[i][i]),r=i+1;r<e;r++){var s=Math.abs(t[r][i]);s>o&&(o=s,n=r)}if(0===o)return null;var a=t[n];t[n]=t[i],t[i]=a;for(var h=i+1;h<e;h++)for(var l=-t[h][i]/t[i][i],u=i;u<e+1;u++)i==u?t[h][u]=0:t[h][u]+=l*t[i][u]}for(var c=new Array(e),p=e-1;p>=0;p--){c[p]=t[p][e]/t[p][p];for(var d=p-1;d>=0;d--)t[d][e]-=t[d][p]*c[p]}return c}([[u-=C,d-=R,0,0,E-y],[f-=C,g-=R,0,0,T-y],[0,0,u,d,x-m],[0,0,f,g,S-m]]);if(b){c.save(),c.beginPath();var I=(y+E+T)/3,O=(m+x+S)/3,w=Ba(I,O,y,m),M=Ba(I,O,E,x),L=Ba(I,O,T,S);c.moveTo(M[0],M[1]),c.lineTo(w[0],w[1]),c.lineTo(L[0],L[1]),c.clip(),c.transform(b[0],b[2],b[1],b[3],y,m),c.translate(p[0]-C,p[3]-R),c.scale(n/i,-n/i),c.drawImage(_.canvas,0,0),c.restore()}}),u&&(c.save(),c.strokeStyle="black",c.lineWidth=1,a.getTriangles().forEach(function(t,e,i){var n=t.target,o=(n[0][0]-v[0])/r,s=-(n[0][1]-v[1])/r,a=(n[1][0]-v[0])/r,h=-(n[1][1]-v[1])/r,l=(n[2][0]-v[0])/r,u=-(n[2][1]-v[1])/r;c.beginPath(),c.moveTo(a,h),c.lineTo(o,s),c.lineTo(l,u),c.closePath(),c.stroke()}),c.restore()),c.canvas}var Ka=function(t){function e(e,i,n){t.call(this);var o=n||{};this.tileCoord=e,this.state=i,this.interimTile=null,this.key="",this.transition_=void 0===o.transition?250:o.transition,this.transitionStarts_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){this.dispatchEvent(N.CHANGE)},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==he.LOADED)return t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==he.LOADED){t.interimTile=null;break}t.getState()==he.LOADING?e=t:t.getState()==he.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){this.state=t,this.changed()},e.prototype.load=function(){},e.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:Ae(n/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(D);function Va(){var t=Qn(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}var Ha=function(t){function e(e,i,n,o,r,s){t.call(this,e,i,s),this.crossOrigin_=o,this.src_=n,this.image_=new Image,null!==o&&(this.image_.crossOrigin=o),this.imageListenerKeys_=null,this.tileLoadFunction_=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state==he.LOADING&&(this.unlistenImage_(),this.image_=Va()),this.interimTile&&this.interimTile.dispose(),this.state=he.ABORT,this.changed(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.image_},e.prototype.getKey=function(){return this.src_},e.prototype.handleImageError_=function(){this.state=he.ERROR,this.unlistenImage_(),this.image_=Va(),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=he.LOADED:this.state=he.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==he.ERROR&&(this.state=he.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==he.IDLE&&(this.state=he.LOADING,this.changed(),this.imageListenerKeys_=[R(this.image_,N.ERROR,this.handleImageError_,this),R(this.image_,N.LOAD,this.handleImageLoad_,this)],this.tileLoadFunction_(this,this.src_))},e.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(I),this.imageListenerKeys_=null},e}(Ka);function Za(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function $a(t,e,i){return t+"/"+e+"/"+i}function qa(t){return $a(t[0],t[1],t[2])}function Ja(t){return(t[1]<<t[0])+t[2]}var Qa=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expireCache=function(t){for(;this.canExpireCache();){var e=this.peekLast(),i=e.tileCoord[0].toString();if(i in t&&t[i].contains(e.tileCoord))break;this.pop().dispose()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=function(t){return t.split("/").map(Number)}(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(qa(e.tileCoord)),e.dispose())},this)}},e}(Or),th=function(t,e,i,n,o){this.sourceProj_=t,this.targetProj_=e;var r={},s=en(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return r[e]||(r[e]=s(t)),r[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&fi(n)==fi(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?fi(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?fi(this.targetProj_.getExtent()):null;var a=pi(i),h=di(i),l=ai(i),u=si(i),c=this.transformInv_(a),p=this.transformInv_(h),d=this.transformInv_(l),f=this.transformInv_(u);if(this.addQuad_(a,h,l,u,c,p,d,f,10),this.wrapsXInSource_){var _=1/0;this.triangles_.forEach(function(t,e,i){_=Math.min(_,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])-_>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]-_>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-_>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-_>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)}}.bind(this))}r={}};th.prototype.addTriangle_=function(t,e,i,n,o,r){this.triangles_.push({source:[n,o,r],target:[t,e,i]})},th.prototype.addQuad_=function(t,e,i,n,o,r,s,a,h){var l=Ye([o,r,s,a]),u=this.sourceWorldWidth_?fi(l)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&u>.5&&u<1,d=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)d=fi(Ye([t,e,i,n]))/this.targetWorldWidth_>.25||d;!p&&this.sourceProj_.isGlobal()&&u&&(d=u>.25||d)}if(d||!this.maxSourceExtent_||_i(l,this.maxSourceExtent_)){if(!(d||isFinite(o[0])&&isFinite(o[1])&&isFinite(r[0])&&isFinite(r[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1]))){if(!(h>0))return;d=!0}if(h>0){if(!d){var f,_=[(t[0]+i[0])/2,(t[1]+i[1])/2],g=this.transformInv_(_);if(p)f=(me(o[0],c)+me(s[0],c))/2-me(g[0],c);else f=(o[0]+s[0])/2-g[0];var v=(o[1]+s[1])/2-g[1];d=f*f+v*v>this.errorThresholdSquared_}if(d){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var y=[(e[0]+i[0])/2,(e[1]+i[1])/2],m=this.transformInv_(y),E=[(n[0]+t[0])/2,(n[1]+t[1])/2],x=this.transformInv_(E);this.addQuad_(t,e,y,E,o,r,m,x,h-1),this.addQuad_(E,y,i,n,x,m,s,a,h-1)}else{var T=[(t[0]+e[0])/2,(t[1]+e[1])/2],S=this.transformInv_(T),C=[(i[0]+n[0])/2,(i[1]+n[1])/2],R=this.transformInv_(C);this.addQuad_(t,T,C,n,o,S,R,a,h-1),this.addQuad_(T,e,i,C,S,r,s,R,h-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}this.addTriangle_(t,i,n,o,s,a),this.addTriangle_(t,e,i,o,r,s)}},th.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach(function(e,i,n){var o=e.source;ti(t,o[0]),ti(t,o[1]),ti(t,o[2])}),t},th.prototype.getTriangles=function(){return this.triangles_};var eh=th,ih=function(t){function e(e,i,n,o,r,s,a,h,l,u,c){t.call(this,r,he.IDLE),this.renderEdges_=void 0!==c&&c,this.pixelRatio_=a,this.gutter_=h,this.canvas_=null,this.sourceTileGrid_=i,this.targetTileGrid_=o,this.wrappedTileCoord_=s||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;var p=o.getTileCoordExtent(this.wrappedTileCoord_),d=this.targetTileGrid_.getExtent(),f=this.sourceTileGrid_.getExtent(),_=d?ci(p,d):p;if(0!==ri(_)){var g=e.getExtent();g&&(f=f?ci(f,g):g);var v=o.getResolution(this.wrappedTileCoord_[0]),y=Wa(e,n,hi(_),v);if(!isFinite(y)||y<=0)this.state=he.EMPTY;else{var m=void 0!==u?u:ms;if(this.triangulation_=new eh(e,n,_,f,y*m),0!==this.triangulation_.getTriangles().length){this.sourceZ_=i.getZForResolution(y);var E=this.triangulation_.calculateSourceExtent();if(f&&(e.canWrapX()?(E[1]=fe(E[1],f[1],f[3]),E[3]=fe(E[3],f[1],f[3])):E=ci(E,f)),ri(E)){for(var x=i.getTileRangeForExtentAndZ(E,this.sourceZ_),T=x.minX;T<=x.maxX;T++)for(var S=x.minY;S<=x.maxY;S++){var C=l(this.sourceZ_,T,S,a);C&&this.sourceTiles_.push(C)}0===this.sourceTiles_.length&&(this.state=he.EMPTY)}else this.state=he.EMPTY}else this.state=he.EMPTY}}else this.state=he.EMPTY}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state==he.LOADING&&this.unlistenSources_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,i,n){e&&e.getState()==he.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=he.ERROR;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],o="number"==typeof i?i:i[1],r=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Ua(n,o,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),r,a,this.triangulation_,t,this.gutter_,this.renderEdges_),this.state=he.LOADED}this.changed()},e.prototype.load=function(){if(this.state==he.IDLE){this.state=he.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,n){var o=e.getState();if(o==he.IDLE||o==he.LOADING){t++;var r=C(e,N.CHANGE,function(i){var n=e.getState();n!=he.LOADED&&n!=he.ERROR&&n!=he.EMPTY||(I(r),0===--t&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(r)}}.bind(this)),this.sourceTiles_.forEach(function(t,e,i){t.getState()==he.IDLE&&t.load()}),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(I),this.sourcesListenerKeys_=null},e}(Ka);function nh(t,e){var i=/\{z\}/g,n=/\{x\}/g,o=/\{y\}/g,r=/\{-y\}/g;return function(s,a,h){return s?t.replace(i,s[0].toString()).replace(n,s[1].toString()).replace(o,function(){return(-s[2]-1).toString()}).replace(r,function(){var t=s[0],i=e.getFullTileRange(t);return le(i,55),(i.getHeight()+s[2]).toString()}):void 0}}function oh(t,e){for(var i=t.length,n=new Array(i),o=0;o<i;++o)n[o]=nh(t[o],e);return function(t){if(1===t.length)return t[0];return function(e,i,n){if(e){var o=Ja(e),r=me(o,t.length);return t[r](e,i,n)}}}(n)}function rh(t,e,i){}var sh=[0,0,0],ah=function(t){var e,i,n,o;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,le((e=this.resolutions_,i=!0,n=function(t,e){return e-t}||Wt,e.every(function(t,o){if(0===o)return!0;var r=n(e[o-1],t);return!(r>0||i&&0===r)})),17),!t.origins)for(var r=0,s=this.resolutions_.length-1;r<s;++r)if(o){if(this.resolutions_[r]/this.resolutions_[r+1]!==o){o=void 0;break}}else o=this.resolutions_[r]/this.resolutions_[r+1];this.zoomFactor_=o,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,le(this.origins_.length==this.resolutions_.length,20));var a=t.extent;void 0===a||this.origin_||this.origins_||(this.origin_=pi(a)),le(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,le(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:de,le(!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 Gs(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)};ah.prototype.forEachTileCoord=function(t,e,i){for(var n=this.getTileRangeForExtentAndZ(t,e),o=n.minX,r=n.maxX;o<=r;++o)for(var s=n.minY,a=n.maxY;s<=a;++s)i([e,o,s])},ah.prototype.forEachTileCoordParentTileRange=function(t,e,i,n,o){var r,s,a,h=null,l=t[0]-1;for(2===this.zoomFactor_?(s=t[1],a=t[2]):h=this.getTileCoordExtent(t,o);l>=this.minZoom;){if(r=2===this.zoomFactor_?Ns(s=Math.floor(s/2),s,a=Math.floor(a/2),a,n):this.getTileRangeForExtentAndZ(h,l,n),e.call(i,l,r))return!0;--l}return!1},ah.prototype.getExtent=function(){return this.extent_},ah.prototype.getMaxZoom=function(){return this.maxZoom},ah.prototype.getMinZoom=function(){return this.minZoom},ah.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},ah.prototype.getResolution=function(t){return this.resolutions_[t]},ah.prototype.getResolutions=function(){return this.resolutions_},ah.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var n=2*t[1],o=2*t[2];return Ns(n,n+1,o,o+1,e)}var r=this.getTileCoordExtent(t,i);return this.getTileRangeForExtentAndZ(r,t[0]+1,e)}return null},ah.prototype.getTileRangeExtent=function(t,e,i){var n=this.getOrigin(t),o=this.getResolution(t),r=uo(this.getTileSize(t),this.tmpSize_),s=n[0]+e.minX*r[0]*o,a=n[0]+(e.maxX+1)*r[0]*o;return He(s,n[1]+e.minY*r[1]*o,a,n[1]+(e.maxY+1)*r[1]*o,i)},ah.prototype.getTileRangeForExtentAndZ=function(t,e,i){var n=sh;this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n);var o=n[1],r=n[2];return this.getTileCoordForXYAndZ_(t[2],t[3],e,!0,n),Ns(o,n[1],r,n[2],i)},ah.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=uo(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]+(t[2]+.5)*n[1]*i]},ah.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),n=this.getResolution(t[0]),o=uo(this.getTileSize(t[0]),this.tmpSize_),r=i[0]+t[1]*o[0]*n,s=i[1]+t[2]*o[1]*n;return He(r,s,r+o[0]*n,s+o[1]*n,e)},ah.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},ah.prototype.getTileCoordForXYAndResolution_=function(t,e,i,n,o){var r=this.getZForResolution(i),s=i/this.getResolution(r),a=this.getOrigin(r),h=uo(this.getTileSize(r),this.tmpSize_),l=n?.5:0,u=n?0:.5,c=Math.floor((t-a[0])/i+l),p=Math.floor((e-a[1])/i+u),d=s*c/h[0],f=s*p/h[1];return n?(d=Math.ceil(d)-1,f=Math.ceil(f)-1):(d=Math.floor(d),f=Math.floor(f)),Za(r,d,f,o)},ah.prototype.getTileCoordForXYAndZ_=function(t,e,i,n,o){var r=this.getOrigin(i),s=this.getResolution(i),a=uo(this.getTileSize(i),this.tmpSize_),h=n?.5:0,l=n?0:.5,u=Math.floor((t-r[0])/s+h),c=Math.floor((e-r[1])/s+l),p=u/a[0],d=c/a[1];return n?(p=Math.ceil(p)-1,d=Math.ceil(d)-1):(p=Math.floor(p),d=Math.floor(d)),Za(i,p,d,o)},ah.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},ah.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},ah.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},ah.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:null},ah.prototype.getZForResolution=function(t,e){return fe(Ut(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},ah.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 hh=ah;function lh(t){var e=t.getDefaultTileGrid();return e||(e=function(t,e,i,n){return function(t,e,i,n){var o=void 0!==n?n:Ne.TOP_LEFT,r=uh(t,e,i);return new hh({extent:t,origin:function(t,e){var i;return e===Ne.BOTTOM_LEFT?i=si(t):e===Ne.BOTTOM_RIGHT?i=ai(t):e===Ne.TOP_LEFT?i=pi(t):e===Ne.TOP_RIGHT?i=di(t):le(!1,13),i}(t,o),resolutions:r,tileSize:i})}(ch(t),e,i,n)}(t),t.setDefaultTileGrid(e)),e}function uh(t,e,i){for(var n=void 0!==e?e:pe,o=ui(t),r=fi(t),s=uo(void 0!==i?i:de),a=Math.max(r/s[0],o/s[1]),h=n+1,l=new Array(h),u=0;u<h;++u)l[u]=a/Math.pow(2,u);return l}function ch(t){var e=(t=Zi(t)).getExtent();if(!e){var i=180*Ci[Ri.DEGREES]/t.getMetersPerUnit();e=He(-i,-i,i,i)}return e}var ph=function(t){function e(e){t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX}),this.opaque_=void 0!==e.opaque&&e.opaque,this.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,this.tileGrid=void 0!==e.tileGrid?e.tileGrid:null,this.tileCache=new Qa(e.cacheSize),this.tmpSize=[0,0],this.key_=e.key||"",this.tileOptions={transition:e.transition}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);i&&i.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,i,n){var o=this.getTileCacheForProjection(t);if(!o)return!1;for(var r,s,a,h=!0,l=i.minX;l<=i.maxX;++l)for(var u=i.minY;u<=i.maxY;++u)s=$a(e,l,u),a=!1,o.containsKey(s)&&(a=(r=o.get(s)).getState()===he.LOADED)&&(a=!1!==n(r)),a||(h=!1);return h},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,i,n,o){return l()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:lh(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return e&&!Qi(e,t)?null:this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,i){var n=this.getTileGridForProjection(i),o=this.getTilePixelRatio(e),r=uo(n.getTileSize(t),this.tmpSize);return 1==o?r:lo(r,o,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var i=void 0!==e?e:this.getProjection(),n=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=function(t,e,i){var n=e[0],o=t.getTileCoordCenter(e),r=ch(i);if(We(r,o))return e;var s=fi(r),a=Math.ceil((r[0]-o[0])/s);return o[0]+=s*a,t.getTileCoordForCoordAndZ(o,n)}(n,t,i)),function(t,e){var i=t[0],n=t[1],o=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;var r,s=e.getExtent();return!(r=s?e.getTileRangeForExtentAndZ(s,i):e.getFullTileRange(i))||r.containsXY(n,o)}(t,n)?t:null},e.prototype.refresh=function(){this.tileCache.clear(),this.changed()},e.prototype.useTile=function(t,e,i,n){},e}(cs),dh=function(t){function e(e,i){t.call(this,e),this.tile=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(k),fh="tileloadstart",_h="tileloadend",gh="tileloaderror";function vh(t,e){t.getImage().src=e}var yh="carmentaserver",mh="geoserver",Eh="mapserver",xh="qgis";function Th(t,e,i){var n=this.getTileGrid();if(n||(n=this.getTileGridForProjection(i)),!(n.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var o=n.getResolution(t[0]),r=n.getTileCoordExtent(t,this.tmpExtent_),s=uo(n.getTileSize(t[0]),this.tmpSize),a=this.gutter_;0!==a&&(s=ho(s,a,this.tmpSize),r=Xe(r,o*a,r)),1!=e&&(s=lo(s,e,this.tmpSize));var h={SERVICE:"WMS",VERSION:ja,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return g(h,this.params_),this.getRequestUrl_(t,s,r,e,i,h)}}var Sh=function(t){function e(e){var i=e||{},n=i.params||{},o=!("TRANSPARENT"in n)||n.TRANSPARENT;t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,opaque:!o,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,tileUrlFunction:Th,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition}),this.gutter_=void 0!==i.gutter?i.gutter:0,this.params_=n,this.v13_=!0,this.serverType_=i.serverType,this.hidpi_=void 0===i.hidpi||i.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.updateV13_(),this.setKey(this.getKeyForParams_())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getGetFeatureInfoUrl=function(t,e,i,n){var o=Zi(i),r=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(o));var a=s.getTileCoordForCoordAndResolution(t,e);if(!(s.getResolutions().length<=a[0])){var h=s.getResolution(a[0]),l=s.getTileCoordExtent(a,this.tmpExtent_),u=uo(s.getTileSize(a[0]),this.tmpSize),c=this.gutter_;0!==c&&(u=ho(u,c,this.tmpSize),l=Xe(l,h*c,l)),r&&r!==o&&(h=Wa(r,o,t,h),l=vi(l,en(o,r)),t=nn(t,o,r));var p={SERVICE:"WMS",VERSION:ja,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};g(p,this.params_,n);var d=Math.floor((t[0]-l[0])/h),f=Math.floor((l[3]-t[1])/h);return p[this.v13_?"I":"X"]=d,p[this.v13_?"J":"Y"]=f,this.getRequestUrl_(a,u,l,1,r||o,p)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,i,n,o,r){var s=this.urls;if(s){if(r.WIDTH=e[0],r.HEIGHT=e[1],r[this.v13_?"CRS":"SRS"]=o.getCode(),"STYLES"in this.params_||(r.STYLES=""),1!=n)switch(this.serverType_){case mh:var a=90*n+.5|0;"FORMAT_OPTIONS"in r?r.FORMAT_OPTIONS+=";dpi:"+a:r.FORMAT_OPTIONS="dpi:"+a;break;case Eh:r.MAP_RESOLUTION=90*n;break;case yh:case xh:r.DPI=90*n;break;default:le(!1,52)}var h,l,u=o.getAxisOrientation(),c=i;if(this.v13_&&"ne"==u.substr(0,2))h=i[0],c[0]=i[1],c[1]=h,h=i[2],c[2]=i[3],c[3]=h;if(r.BBOX=c.join(","),1==s.length)l=s[0];else l=s[me(Ja(t),s.length)];return 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}(l,r)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")},e.prototype.updateParams=function(t){g(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||ja;this.v13_=function(t,e){for(var i=(""+t).split("."),n=(""+e).split("."),o=0;o<Math.max(i.length,n.length);o++){var r=parseInt(i[o]||"0",10),s=parseInt(n[o]||"0",10);if(r>s)return 1;if(s>r)return-1}return 0}(t,"1.3")>=0},e}(function(t){function e(e){t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:vh,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible}),this.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,this.tileClass=void 0!==e.tileClass?e.tileClass:Ha,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);for(var n in this.tileCache.expireCache(this.tileCache==i?e:{}),this.tileCacheForProjection){var o=this.tileCacheForProjection[n];o.expireCache(o==i?e:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Qi(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!Qi(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Qi(e,t)){var i=c(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=lh(t)),this.tileGridForProjection[i]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Qi(e,t))return this.tileCache;var i=c(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Qa(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,e,i,n,o,r){var s=[t,e,i],a=this.getTileCoordForTileUrlFunction(s,o),h=a?this.tileUrlFunction(a,n,o):void 0,l=new this.tileClass(s,void 0!==h?he.IDLE:he.EMPTY,void 0!==h?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return l.key=r,C(l,N.CHANGE,this.handleTileChange,this),l},e.prototype.getTile=function(t,e,i,n,o){var r=this.getProjection();if(r&&o&&!Qi(r,o)){var s,a=this.getTileCacheForProjection(o),h=[t,e,i],l=qa(h);a.containsKey(l)&&(s=a.get(l));var u=this.getKey();if(s&&s.key==u)return s;var c=this.getTileGridForProjection(r),p=this.getTileGridForProjection(o),d=this.getTileCoordForTileUrlFunction(h,o),f=new ih(r,c,o,p,h,d,this.getTilePixelRatio(n),this.getGutter(),function(t,e,i,n){return this.getTileInternal(t,e,i,n,r)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_);return f.key=u,s?(f.interimTile=s,f.refreshInterimChain(),a.replace(l,f)):a.set(l,f),f}return this.getTileInternal(t,e,i,n,r||o)},e.prototype.getTileInternal=function(t,e,i,n,o){var r=null,s=$a(t,e,i),a=this.getKey();if(this.tileCache.containsKey(s)){if((r=this.tileCache.get(s)).key!=a){var h=r;r=this.createTile_(t,e,i,n,o,a),h.getState()==he.IDLE?r.interimTile=h.interimTile:r.interimTile=h,r.refreshInterimChain(),this.tileCache.replace(s,r)}}else r=this.createTile_(t,e,i,n,o,a),this.tileCache.set(s,r);return r},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var i=Zi(t);if(i){var n=c(i);n in this.tileGridForProjection||(this.tileGridForProjection[n]=e)}},e}(function(t){function e(e){t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible}),this.generateTileUrlFunction_=!e.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,this.tileUrlFunction=e.tileUrlFunction?e.tileUrlFunction.bind(this):rh,this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),e.tileUrlFunction&&this.setTileUrlFunction(e.tileUrlFunction,this.key_),this.tileLoadingKeys_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,i=t.target,n=c(i),o=i.getState();o==he.LOADING?(this.tileLoadingKeys_[n]=!0,e=fh):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],e=o==he.ERROR?gh:o==he.LOADED||o==he.ABORT?_h:void 0),void 0!=e&&this.dispatchEvent(new dh(e,i))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=this.urls=function(t){var e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var n,o=i[1].charCodeAt(0),r=i[2].charCodeAt(0);for(n=o;n<=r;++n)e.push(t.replace(i[0],String.fromCharCode(n)));return e}if(i=i=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(i[2],10),a=parseInt(i[1],10);a<=s;a++)e.push(t.replace(i[0],a.toString()));return e}return e.push(t),e}(t);this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(oh(t,this.tileGrid),e):this.setKey(e)},e.prototype.useTile=function(t,e,i){var n=$a(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)},e}(ph)));var Ch=function(t){function e(e){var i=e||{};t.call(this,i),this.type=yr.IMAGE}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(So);Ch.prototype.getSource;var Rh=function(t){function e(e){var i=e||{},n=i.renderMode||xa.HYBRID;le(void 0==n||n==xa.IMAGE||n==xa.HYBRID||n==xa.VECTOR,28),i.declutter&&n==xa.IMAGE&&(n=xa.HYBRID),i.renderMode=n;var o=g({},i);delete o.preload,delete o.useInterimTilesOnError,t.call(this,o),this.setPreload(i.preload?i.preload:0),this.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),this.type=yr.VECTOR_TILE}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getPreload=function(){return this.get(Ia)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Oa)},e.prototype.setPreload=function(t){this.set(Ia,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Oa,t)},e}(ss);Rh.prototype.getSource;i("/bpg");var bh=i("ACGT"),Ih=i.n(bh),Oh=(i("Mf0D"),i("exT9")),wh={name:"NavMenu",props:["navMenus"],components:{elSubmenu:i.n(Oh).a,elMenuItem:Ih.a},data:function(){return{}},methods:{}},Mh=i("XyMi");var Lh=function(t){i("ush1")},Ph=Object(Mh.a)(wh,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t._l(t.navMenus,function(e){return[!e.childs&&e.entity?i("el-menu-item",{key:e.entity.id,attrs:{data:e,index:e.entity.name}},[i("i",{class:e.entity.icon}),t._v(" "),i("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(e.entity.alias))])]):t._e(),t._v(" "),e.childs&&e.entity?i("el-submenu",{key:e.entity.id,attrs:{data:e,index:e.entity.name}},[i("template",{slot:"title"},[i("i",{class:e.entity.icon}),t._v(" "),i("span",[t._v(t._s(e.entity.alias))])]),t._v(" "),i("NavMenu",{attrs:{navMenus:e.childs}})],2):t._e()]})],2)},[],!1,Lh,"data-v-0adca65d",null).exports,Ah=(i("ktr9"),{metaInfo:{title:"地图管理"},components:{elTag:h.a,elMenu:s.a,NavMenu:Ph,elButton:o.a},data:function(){return{deviceState:{abNormalCount:0,normalCount:6,caremaState:{count:2,abNormal:0,normal:2},ipState:{count:2,abNormal:1,normal:1},padState:{count:2,abNormal:0,normal:2}},zoomLevel:0,centerLon:0,centerLat:0,baseLayers:[],businessLayers:{},projection:"",currentZoomLevel:0,menuData:[{entity:{id:1,name:"area1",icon:"el-icon-message",alias:"教学楼"},childs:[{entity:{id:3,name:"area2",icon:"el-icon-loading",alias:"一层"}},{entity:{id:4,name:"area3",icon:"el-icon-bell",alias:"二层"}},{entity:{id:5,name:"area4",icon:"el-icon-bell",alias:"三层"}}]}]}},methods:{mapInit:function(){var t=[];if(this.baseLayers.length>0){var e=!0,i=!1,n=void 0;try{for(var o,r=this.baseLayers[Symbol.iterator]();!(e=(o=r.next()).done);e=!0){var s=o.value;t.push(new Ma({visible:!0,source:new Sh({url:s,params:{LAYERS:"basic:shpGroup",TILED:!0},serverType:"geoserver"})}))}}catch(t){i=!0,n=t}finally{try{!e&&r.return&&r.return()}finally{if(i)throw n}}var a=new _r({geometry:new Fn([this.centerLon,this.centerLat]),name:"摄像机111"}),h=new ns({image:new Xa({opacity:.75,src:"../../assets/img/camera_device.png"})});a.setStyle(h);var l=new ss({visible:!0,source:new ys({features:[a]})}),u=new ba({layers:t,target:"olMap",view:new Jn({projection:this.projection,center:[this.centerLon,this.centerLat],zoom:this.zoomLevel})});u.addLayer(l),console.info(l+"---------------vectorLayer");var c=document.getElementById("popup"),p=new Aa({element:c,positioning:"bottom-center",stopEvent:!1,offset:[0,-50]});u.addOverlay(p),u.on("click",function(t){console.info(t,"--------evt");var e=u.forEachFeatureAtPixel(t.pixel,function(t){return t});if(e){var i=e.getGeometry().getCoordinates();p.setPosition(i)}})}},handleOpen:function(t,e){console.log(t,e)},handleClose:function(t,e){console.log(t,e)}},created:function(){this.zoomLevel=11,this.centerLon=54e4,this.centerLat=3222260,this.projection="EPSG:900913",this.baseLayers.push("http://192.168.1.203:2080/geoserver/wms")},mounted:function(){this.mapInit()}});var Fh=function(t){i("d5BH")},kh=Object(Mh.a)(Ah,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"overflow-hidden"},[n("div",{staticClass:"map",staticStyle:{position:"relative"},attrs:{id:"olMap"}},[n("div",{attrs:{id:"stateDiv"}},[n("div",{staticClass:"detailStateDiv"},[n("table",{attrs:{cellpadding:"5",cellspacing:"3"}},[n("tr",[n("td",[n("img",{staticClass:"deviceImg",attrs:{src:i("7J5b")}}),t._v(t._s(t.deviceState.caremaState.count)),n("span",[t._v("|")]),n("span",[n("label",{staticClass:"abnormal"},[t._v(t._s(t.deviceState.caremaState.abNormal))]),n("label",[t._v(t._s(t.deviceState.caremaState.normal))])])]),t._v(" "),n("td",[n("img",{staticClass:"deviceImg",attrs:{src:i("9QFF")}}),t._v(t._s(t.deviceState.ipState.count)),n("span",[t._v("|")]),n("span",[n("label",{staticClass:"abnormal"},[t._v(t._s(t.deviceState.ipState.abNormal))]),n("label",[t._v(t._s(t.deviceState.ipState.normal))])])]),t._v(" "),n("td",[n("img",{staticClass:"deviceImg",attrs:{src:i("oju6")}}),t._v(t._s(t.deviceState.padState.count)),n("span",[t._v("|")]),n("span",[n("label",{staticClass:"abnormal"},[t._v(t._s(t.deviceState.padState.abNormal))]),n("label",[t._v(t._s(t.deviceState.padState.normal))])])])])])]),t._v(" "),n("div",{staticClass:"statistStateDiv"},[n("el-tag",{attrs:{type:"danger"}},[t._v("异常("+t._s(t.deviceState.abNormalCount)+")")]),t._v(" "),n("el-tag",{attrs:{type:"success"}},[t._v("正常("+t._s(t.deviceState.normalCount)+")")])],1)]),t._v(" "),n("div",{staticClass:"areaDiv"},[[n("el-menu",{attrs:{"default-active":"systemManage","background-color":"#545c64","text-color":"#fff","active-text-color":"#ffd04b"},on:{open:t.handleOpen,close:t.handleClose}},[n("NavMenu",{attrs:{navMenus:t.menuData}})],1)]],2),t._v(" "),n("div",{staticClass:"areaManage"},[n("el-button",{staticStyle:{"background-color":"#545c64",color:"#fff",border:"0"}},[t._v("管理")])],1),t._v(" "),t._m(0),t._v(" "),n("div",{attrs:{id:"popup"}})])])},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"dragDiv"},[e("img",{attrs:{src:""}}),this._v(" "),e("div",{staticClass:"dragingDevices"})])}],!1,Fh,null,null);e.default=kh.exports},Mf0D:function(t,e){},NMof:function(t,e,i){"use strict";var n,o;"function"==typeof Symbol&&Symbol.iterator;void 0===(o="function"==typeof(n=function(){var t=window,e={placement:"bottom",gpuAcceleration:!0,offset:0,boundariesElement:"viewport",boundariesPadding:5,preventOverflowOrder:["left","right","top","bottom"],flipBehavior:"flip",arrowElement:"[x-arrow]",arrowOffset:0,modifiers:["shift","offset","preventOverflow","keepTogether","arrow","flip","applyStyle"],modifiersIgnored:[],forceAbsolute:!1};function i(t,i,n){this._reference=t.jquery?t[0]:t,this.state={};var o=void 0===i||null===i,r=i&&"[object Object]"===Object.prototype.toString.call(i);return this._popper=o||r?this.parse(r?i:{}):i.jquery?i[0]:i,this._options=Object.assign({},e,n),this._options.modifiers=this._options.modifiers.map(function(t){if(-1===this._options.modifiersIgnored.indexOf(t))return"applyStyle"===t&&this._popper.setAttribute("x-placement",this._options.placement),this.modifiers[t]||t}.bind(this)),this.state.position=this._getPosition(this._popper,this._reference),u(this._popper,{position:this.state.position,top:0}),this.update(),this._setupEventListeners(),this}function n(e){var i=e.style.display,n=e.style.visibility;e.style.display="block",e.style.visibility="hidden";e.offsetWidth;var o=t.getComputedStyle(e),r=parseFloat(o.marginTop)+parseFloat(o.marginBottom),s=parseFloat(o.marginLeft)+parseFloat(o.marginRight),a={width:e.offsetWidth+s,height:e.offsetHeight+r};return e.style.display=i,e.style.visibility=n,a}function o(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function r(t){var e=Object.assign({},t);return e.right=e.left+e.width,e.bottom=e.top+e.height,e}function s(t,e){var i,n=0;for(i in t){if(t[i]===e)return n;n++}return null}function a(e,i){return t.getComputedStyle(e,null)[i]}function h(e){var i=e.offsetParent;return i!==t.document.body&&i?i:t.document.documentElement}function l(e){var i=e.parentNode;return i?i===t.document?t.document.body.scrollTop||t.document.body.scrollLeft?t.document.body:t.document.documentElement:-1!==["scroll","auto"].indexOf(a(i,"overflow"))||-1!==["scroll","auto"].indexOf(a(i,"overflow-x"))||-1!==["scroll","auto"].indexOf(a(i,"overflow-y"))?i:l(e.parentNode):e}function u(t,e){Object.keys(e).forEach(function(i){var n,o="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&(""!==(n=e[i])&&!isNaN(parseFloat(n))&&isFinite(n))&&(o="px"),t.style[i]=e[i]+o})}function c(t){var e={width:t.offsetWidth,height:t.offsetHeight,left:t.offsetLeft,top:t.offsetTop};return e.right=e.left+e.width,e.bottom=e.top+e.height,e}function p(t){var e=t.getBoundingClientRect(),i=-1!=navigator.userAgent.indexOf("MSIE")&&"HTML"===t.tagName?-t.scrollTop:e.top;return{left:e.left,top:i,right:e.right,bottom:e.bottom,width:e.right-e.left,height:e.bottom-i}}function d(e){for(var i=["","ms","webkit","moz","o"],n=0;n<i.length;n++){var o=i[n]?i[n]+e.charAt(0).toUpperCase()+e.slice(1):e;if(void 0!==t.document.body.style[o])return o}return null}return i.prototype.destroy=function(){return this._popper.removeAttribute("x-placement"),this._popper.style.left="",this._popper.style.position="",this._popper.style.top="",this._popper.style[d("transform")]="",this._removeEventListeners(),this._options.removeOnDestroy&&this._popper.remove(),this},i.prototype.update=function(){var t={instance:this,styles:{}};t.placement=this._options.placement,t._originalPlacement=this._options.placement,t.offsets=this._getOffsets(this._popper,this._reference,t.placement),t.boundaries=this._getBoundaries(t,this._options.boundariesPadding,this._options.boundariesElement),t=this.runModifiers(t,this._options.modifiers),"function"==typeof this.state.updateCallback&&this.state.updateCallback(t)},i.prototype.onCreate=function(t){return t(this),this},i.prototype.onUpdate=function(t){return this.state.updateCallback=t,this},i.prototype.parse=function(e){var i={tagName:"div",classNames:["popper"],attributes:[],parent:t.document.body,content:"",contentType:"text",arrowTagName:"div",arrowClassNames:["popper__arrow"],arrowAttributes:["x-arrow"]};e=Object.assign({},i,e);var n=t.document,o=n.createElement(e.tagName);if(a(o,e.classNames),h(o,e.attributes),"node"===e.contentType?o.appendChild(e.content.jquery?e.content[0]:e.content):"html"===e.contentType?o.innerHTML=e.content:o.textContent=e.content,e.arrowTagName){var r=n.createElement(e.arrowTagName);a(r,e.arrowClassNames),h(r,e.arrowAttributes),o.appendChild(r)}var s=e.parent.jquery?e.parent[0]:e.parent;if("string"==typeof s){if((s=n.querySelectorAll(e.parent)).length>1&&console.warn("WARNING: the given `parent` query("+e.parent+") matched more than one element, the first one will be used"),0===s.length)throw"ERROR: the given `parent` doesn't exists!";s=s[0]}return s.length>1&&s instanceof Element==!1&&(console.warn("WARNING: you have passed as parent a list of elements, the first one will be used"),s=s[0]),s.appendChild(o),o;function a(t,e){e.forEach(function(e){t.classList.add(e)})}function h(t,e){e.forEach(function(e){t.setAttribute(e.split(":")[0],e.split(":")[1]||"")})}},i.prototype._getPosition=function(e,i){h(i);return this._options.forceAbsolute?"absolute":function e(i){if(i===t.document.body)return!1;if("fixed"===a(i,"position"))return!0;return i.parentNode?e(i.parentNode):i}(i)?"fixed":"absolute"},i.prototype._getOffsets=function(t,e,i){i=i.split("-")[0];var o={};o.position=this.state.position;var r="fixed"===o.position,s=function(t,e,i){var n=p(t),o=p(e);if(i){var r=l(e);o.top+=r.scrollTop,o.bottom+=r.scrollTop,o.left+=r.scrollLeft,o.right+=r.scrollLeft}return{top:n.top-o.top,left:n.left-o.left,bottom:n.top-o.top+n.height,right:n.left-o.left+n.width,width:n.width,height:n.height}}(e,h(t),r),a=n(t);return-1!==["right","left"].indexOf(i)?(o.top=s.top+s.height/2-a.height/2,o.left="left"===i?s.left-a.width:s.right):(o.left=s.left+s.width/2-a.width/2,o.top="top"===i?s.top-a.height:s.bottom),o.width=a.width,o.height=a.height,{popper:o,reference:s}},i.prototype._setupEventListeners=function(){if(this.state.updateBound=this.update.bind(this),t.addEventListener("resize",this.state.updateBound),"window"!==this._options.boundariesElement){var e=l(this._reference);e!==t.document.body&&e!==t.document.documentElement||(e=t),e.addEventListener("scroll",this.state.updateBound),this.state.scrollTarget=e}},i.prototype._removeEventListeners=function(){t.removeEventListener("resize",this.state.updateBound),"window"!==this._options.boundariesElement&&this.state.scrollTarget&&(this.state.scrollTarget.removeEventListener("scroll",this.state.updateBound),this.state.scrollTarget=null),this.state.updateBound=null},i.prototype._getBoundaries=function(e,i,n){var o,r,s={};if("window"===n){var a=t.document.body,u=t.document.documentElement;o=Math.max(a.scrollHeight,a.offsetHeight,u.clientHeight,u.scrollHeight,u.offsetHeight),s={top:0,right:Math.max(a.scrollWidth,a.offsetWidth,u.clientWidth,u.scrollWidth,u.offsetWidth),bottom:o,left:0}}else if("viewport"===n){var p=h(this._popper),d=l(this._popper),f=c(p),_="fixed"===e.offsets.popper.position?0:(r=d)==document.body?Math.max(document.documentElement.scrollTop,document.body.scrollTop):r.scrollTop,g="fixed"===e.offsets.popper.position?0:function(t){return t==document.body?Math.max(document.documentElement.scrollLeft,document.body.scrollLeft):t.scrollLeft}(d);s={top:0-(f.top-_),right:t.document.documentElement.clientWidth-(f.left-g),bottom:t.document.documentElement.clientHeight-(f.top-_),left:0-(f.left-g)}}else s=h(this._popper)===n?{top:0,left:0,right:n.clientWidth,bottom:n.clientHeight}:c(n);return s.left+=i,s.right-=i,s.top=s.top+i,s.bottom=s.bottom-i,s},i.prototype.runModifiers=function(t,e,i){var n=e.slice();return void 0!==i&&(n=this._options.modifiers.slice(0,s(this._options.modifiers,i))),n.forEach(function(e){var i;(i=e)&&"[object Function]"==={}.toString.call(i)&&(t=e.call(this,t))}.bind(this)),t},i.prototype.isModifierRequired=function(t,e){var i=s(this._options.modifiers,t);return!!this._options.modifiers.slice(0,i).filter(function(t){return t===e}).length},i.prototype.modifiers={},i.prototype.modifiers.applyStyle=function(t){var e,i={position:t.offsets.popper.position},n=Math.round(t.offsets.popper.left),o=Math.round(t.offsets.popper.top);return this._options.gpuAcceleration&&(e=d("transform"))?(i[e]="translate3d("+n+"px, "+o+"px, 0)",i.top=0,i.left=0):(i.left=n,i.top=o),Object.assign(i,t.styles),u(this._popper,i),this._popper.setAttribute("x-placement",t.placement),this.isModifierRequired(this.modifiers.applyStyle,this.modifiers.arrow)&&t.offsets.arrow&&u(t.arrowElement,t.offsets.arrow),t},i.prototype.modifiers.shift=function(t){var e=t.placement,i=e.split("-")[0],n=e.split("-")[1];if(n){var o=t.offsets.reference,s=r(t.offsets.popper),a={y:{start:{top:o.top},end:{top:o.top+o.height-s.height}},x:{start:{left:o.left},end:{left:o.left+o.width-s.width}}},h=-1!==["bottom","top"].indexOf(i)?"x":"y";t.offsets.popper=Object.assign(s,a[h][n])}return t},i.prototype.modifiers.preventOverflow=function(t){var e=this._options.preventOverflowOrder,i=r(t.offsets.popper),n={left:function(){var e=i.left;return i.left<t.boundaries.left&&(e=Math.max(i.left,t.boundaries.left)),{left:e}},right:function(){var e=i.left;return i.right>t.boundaries.right&&(e=Math.min(i.left,t.boundaries.right-i.width)),{left:e}},top:function(){var e=i.top;return i.top<t.boundaries.top&&(e=Math.max(i.top,t.boundaries.top)),{top:e}},bottom:function(){var e=i.top;return i.bottom>t.boundaries.bottom&&(e=Math.min(i.top,t.boundaries.bottom-i.height)),{top:e}}};return e.forEach(function(e){t.offsets.popper=Object.assign(i,n[e]())}),t},i.prototype.modifiers.keepTogether=function(t){var e=r(t.offsets.popper),i=t.offsets.reference,n=Math.floor;return e.right<n(i.left)&&(t.offsets.popper.left=n(i.left)-e.width),e.left>n(i.right)&&(t.offsets.popper.left=n(i.right)),e.bottom<n(i.top)&&(t.offsets.popper.top=n(i.top)-e.height),e.top>n(i.bottom)&&(t.offsets.popper.top=n(i.bottom)),t},i.prototype.modifiers.flip=function(t){if(!this.isModifierRequired(this.modifiers.flip,this.modifiers.preventOverflow))return console.warn("WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!"),t;if(t.flipped&&t.placement===t._originalPlacement)return t;var e=t.placement.split("-")[0],i=o(e),n=t.placement.split("-")[1]||"",s=[];return(s="flip"===this._options.flipBehavior?[e,i]:this._options.flipBehavior).forEach(function(a,h){if(e===a&&s.length!==h+1){e=t.placement.split("-")[0],i=o(e);var l=r(t.offsets.popper),u=-1!==["right","bottom"].indexOf(e);(u&&Math.floor(t.offsets.reference[e])>Math.floor(l[i])||!u&&Math.floor(t.offsets.reference[e])<Math.floor(l[i]))&&(t.flipped=!0,t.placement=s[h+1],n&&(t.placement+="-"+n),t.offsets.popper=this._getOffsets(this._popper,this._reference,t.placement).popper,t=this.runModifiers(t,this._options.modifiers,this._flip))}}.bind(this)),t},i.prototype.modifiers.offset=function(t){var e=this._options.offset,i=t.offsets.popper;return-1!==t.placement.indexOf("left")?i.top-=e:-1!==t.placement.indexOf("right")?i.top+=e:-1!==t.placement.indexOf("top")?i.left-=e:-1!==t.placement.indexOf("bottom")&&(i.left+=e),t},i.prototype.modifiers.arrow=function(t){var e=this._options.arrowElement,i=this._options.arrowOffset;if("string"==typeof e&&(e=this._popper.querySelector(e)),!e)return t;if(!this._popper.contains(e))return console.warn("WARNING: `arrowElement` must be child of its popper element!"),t;if(!this.isModifierRequired(this.modifiers.arrow,this.modifiers.keepTogether))return console.warn("WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!"),t;var o={},s=t.placement.split("-")[0],a=r(t.offsets.popper),h=t.offsets.reference,l=-1!==["left","right"].indexOf(s),u=l?"height":"width",c=l?"top":"left",p=l?"left":"top",d=l?"bottom":"right",f=n(e)[u];h[d]-f<a[c]&&(t.offsets.popper[c]-=a[c]-(h[d]-f)),h[c]+f>a[d]&&(t.offsets.popper[c]+=h[c]+f-a[d]);var _=h[c]+(i||h[u]/2-f/2)-a[c];return _=Math.max(Math.min(a[u]-f-8,_),8),o[c]=_,o[p]="",t.offsets.arrow=o,t.arrowElement=e,t},Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(void 0!==n&&null!==n){n=Object(n);for(var o=Object.keys(n),r=0,s=o.length;r<s;r++){var a=o[r],h=Object.getOwnPropertyDescriptor(n,a);void 0!==h&&h.enumerable&&(e[a]=n[a])}}}return e}}),i})?n.call(e,i,e,t):n)||(t.exports=o)},ON3O:function(t,e,i){var n=i("uY1a");t.exports=function(t,e,i){return void 0===i?n(t,e,!1):n(t,i,!1!==e)}},SExR:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get: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="/dist/",i(i.s=84)}({0:function(t,e){t.exports=function(t,e,i,n,o,r){var s,a=t=t||{},h=typeof t.default;"object"!==h&&"function"!==h||(s=t,a=t.default);var l,u="function"==typeof a?a.options:a;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId=o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):n&&(l=n),l){var c=u.functional,p=c?u.render:u.beforeCreate;c?(u._injectStyles=l,u.render=function(t,e){return l.call(e),p(t,e)}):u.beforeCreate=p?[].concat(p,l):[l]}return{esModule:s,exports:a,options:u}}},1:function(t,e){t.exports=i("fPll")},3:function(t,e){t.exports=i("2kvA")},47:function(t,e,i){"use strict";e.__esModule=!0;var n=n||{};n.Utils=n.Utils||{},n.Utils.focusFirstDescendant=function(t){for(var e=0;e<t.childNodes.length;e++){var i=t.childNodes[e];if(n.Utils.attemptFocus(i)||n.Utils.focusFirstDescendant(i))return!0}return!1},n.Utils.focusLastDescendant=function(t){for(var e=t.childNodes.length-1;e>=0;e--){var i=t.childNodes[e];if(n.Utils.attemptFocus(i)||n.Utils.focusLastDescendant(i))return!0}return!1},n.Utils.attemptFocus=function(t){if(!n.Utils.isFocusable(t))return!1;n.Utils.IgnoreUtilFocusChanges=!0;try{t.focus()}catch(t){}return n.Utils.IgnoreUtilFocusChanges=!1,document.activeElement===t},n.Utils.isFocusable=function(t){if(t.tabIndex>0||0===t.tabIndex&&null!==t.getAttribute("tabIndex"))return!0;if(t.disabled)return!1;switch(t.nodeName){case"A":return!!t.href&&"ignore"!==t.rel;case"INPUT":return"hidden"!==t.type&&"file"!==t.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},n.Utils.triggerEvent=function(t,e){var i=void 0;i=/^mouse|click/.test(e)?"MouseEvents":/^key/.test(e)?"KeyboardEvent":"HTMLEvents";for(var n=document.createEvent(i),o=arguments.length,r=Array(o>2?o-2:0),s=2;s<o;s++)r[s-2]=arguments[s];return n.initEvent.apply(n,[e].concat(r)),t.dispatchEvent?t.dispatchEvent(n):t.fireEvent("on"+e,n),t},n.Utils.keys={tab:9,enter:13,space:32,left:37,up:38,right:39,down:40},e.default=n.Utils},8:function(t,e){t.exports=i("aW5l")},84:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(85),r=(n=o)&&n.__esModule?n:{default:n};r.default.install=function(t){t.component(r.default.name,r.default)},e.default=r.default},85:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(86),o=i.n(n),r=i(0)(o.a,null,!1,null,null,null);e.default=r.exports},86:function(t,e,i){"use strict";e.__esModule=!0;var n=a(i(1)),o=a(i(8)),r=a(i(87)),s=i(3);function a(t){return t&&t.__esModule?t:{default:t}}e.default={name:"ElMenu",render:function(t){var e=t("ul",{attrs:{role:"menubar"},key:+this.collapse,style:{backgroundColor:this.backgroundColor||""},class:{"el-menu--horizontal":"horizontal"===this.mode,"el-menu--collapse":this.collapse,"el-menu":!0}},[this.$slots.default]);return this.collapseTransition?t("el-menu-collapse-transition",null,[e]):e},componentName:"ElMenu",mixins:[n.default,o.default],provide:function(){return{rootMenu:this}},components:{"el-menu-collapse-transition":{functional:!0,render:function(t,e){return t("transition",{props:{mode:"out-in"},on:{beforeEnter:function(t){t.style.opacity=.2},enter:function(t){(0,s.addClass)(t,"el-opacity-transition"),t.style.opacity=1},afterEnter:function(t){(0,s.removeClass)(t,"el-opacity-transition"),t.style.opacity=""},beforeLeave:function(t){t.dataset||(t.dataset={}),(0,s.hasClass)(t,"el-menu--collapse")?((0,s.removeClass)(t,"el-menu--collapse"),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth,(0,s.addClass)(t,"el-menu--collapse")):((0,s.addClass)(t,"el-menu--collapse"),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth,(0,s.removeClass)(t,"el-menu--collapse")),t.style.width=t.scrollWidth+"px",t.style.overflow="hidden"},leave:function(t){(0,s.addClass)(t,"horizontal-collapse-transition"),t.style.width=t.dataset.scrollWidth+"px"}}},e.children)}}},props:{mode:{type:String,default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:Array,uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,collapseTransition:{type:Boolean,default:!0}},data:function(){return{activeIndex:this.defaultActive,openedMenus:this.defaultOpeneds&&!this.collapse?this.defaultOpeneds.slice(0):[],items:{},submenus:{}}},computed:{hoverBackground:function(){return this.backgroundColor?this.mixColor(this.backgroundColor,.2):""},isMenuPopup:function(){return"horizontal"===this.mode||"vertical"===this.mode&&this.collapse}},watch:{defaultActive:"updateActiveIndex",defaultOpeneds:function(t){this.collapse||(this.openedMenus=t)},collapse:function(t){t&&(this.openedMenus=[]),this.broadcast("ElSubmenu","toggle-collapse",t)}},methods:{updateActiveIndex:function(t){var e=this.items[t]||this.items[this.activeIndex]||this.items[this.defaultActive];e?(this.activeIndex=e.index,this.initOpenedMenu()):this.activeIndex=null},getMigratingConfig:function(){return{props:{theme:"theme is removed."}}},getColorChannels:function(t){if(t=t.replace("#",""),/^[0-9a-fA-F]{3}$/.test(t)){t=t.split("");for(var e=2;e>=0;e--)t.splice(e,0,t[e]);t=t.join("")}return/^[0-9a-fA-F]{6}$/.test(t)?{red:parseInt(t.slice(0,2),16),green:parseInt(t.slice(2,4),16),blue:parseInt(t.slice(4,6),16)}:{red:255,green:255,blue:255}},mixColor:function(t,e){var i=this.getColorChannels(t),n=i.red,o=i.green,r=i.blue;return e>0?(n*=1-e,o*=1-e,r*=1-e):(n+=(255-n)*e,o+=(255-o)*e,r+=(255-r)*e),"rgb("+Math.round(n)+", "+Math.round(o)+", "+Math.round(r)+")"},addItem:function(t){this.$set(this.items,t.index,t)},removeItem:function(t){delete this.items[t.index]},addSubmenu:function(t){this.$set(this.submenus,t.index,t)},removeSubmenu:function(t){delete this.submenus[t.index]},openMenu:function(t,e){var i=this.openedMenus;-1===i.indexOf(t)&&(this.uniqueOpened&&(this.openedMenus=i.filter(function(t){return-1!==e.indexOf(t)})),this.openedMenus.push(t))},closeMenu:function(t){var e=this.openedMenus.indexOf(t);-1!==e&&this.openedMenus.splice(e,1)},handleSubmenuClick:function(t){var e=t.index,i=t.indexPath;-1!==this.openedMenus.indexOf(e)?(this.closeMenu(e),this.$emit("close",e,i)):(this.openMenu(e,i),this.$emit("open",e,i))},handleItemClick:function(t){var e=this,i=t.index,n=t.indexPath,o=this.activeIndex;this.activeIndex=t.index,this.$emit("select",i,n,t),("horizontal"===this.mode||this.collapse)&&(this.openedMenus=[]),this.router&&this.routeToItem(t,function(t){e.activeIndex=o,t&&console.error(t)})},initOpenedMenu:function(){var t=this,e=this.activeIndex,i=this.items[e];i&&"horizontal"!==this.mode&&!this.collapse&&i.indexPath.forEach(function(e){var i=t.submenus[e];i&&t.openMenu(e,i.indexPath)})},routeToItem:function(t,e){var i=t.route||t.index;try{this.$router.push(i,function(){},e)}catch(t){console.error(t)}},open:function(t){var e=this,i=this.submenus[t.toString()].indexPath;i.forEach(function(t){return e.openMenu(t,i)})},close:function(t){this.closeMenu(t)}},mounted:function(){this.initOpenedMenu(),this.$on("item-click",this.handleItemClick),this.$on("submenu-click",this.handleSubmenuClick),"horizontal"===this.mode&&new r.default(this.$el),this.$watch("items",this.updateActiveIndex)}}},87:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(88),r=(n=o)&&n.__esModule?n:{default:n};var s=function(t){this.domNode=t,this.init()};s.prototype.init=function(){var t=this.domNode.childNodes;[].filter.call(t,function(t){return 1===t.nodeType}).forEach(function(t){new r.default(t)})},e.default=s},88:function(t,e,i){"use strict";e.__esModule=!0;var n=r(i(47)),o=r(i(89));function r(t){return t&&t.__esModule?t:{default:t}}var s=function(t){this.domNode=t,this.submenu=null,this.init()};s.prototype.init=function(){this.domNode.setAttribute("tabindex","0");var t=this.domNode.querySelector(".el-menu");t&&(this.submenu=new o.default(this,t)),this.addListeners()},s.prototype.addListeners=function(){var t=this,e=n.default.keys;this.domNode.addEventListener("keydown",function(i){var o=!1;switch(i.keyCode){case e.down:n.default.triggerEvent(i.currentTarget,"mouseenter"),t.submenu&&t.submenu.gotoSubIndex(0),o=!0;break;case e.up:n.default.triggerEvent(i.currentTarget,"mouseenter"),t.submenu&&t.submenu.gotoSubIndex(t.submenu.subMenuItems.length-1),o=!0;break;case e.tab:n.default.triggerEvent(i.currentTarget,"mouseleave");break;case e.enter:case e.space:o=!0,i.currentTarget.click()}o&&i.preventDefault()})},e.default=s},89:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(47),r=(n=o)&&n.__esModule?n:{default:n};var s=function(t,e){this.domNode=e,this.parent=t,this.subMenuItems=[],this.subIndex=0,this.init()};s.prototype.init=function(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()},s.prototype.gotoSubIndex=function(t){t===this.subMenuItems.length?t=0:t<0&&(t=this.subMenuItems.length-1),this.subMenuItems[t].focus(),this.subIndex=t},s.prototype.addListeners=function(){var t=this,e=r.default.keys,i=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,function(n){n.addEventListener("keydown",function(n){var o=!1;switch(n.keyCode){case e.down:t.gotoSubIndex(t.subIndex+1),o=!0;break;case e.up:t.gotoSubIndex(t.subIndex-1),o=!0;break;case e.tab:r.default.triggerEvent(i,"mouseleave");break;case e.enter:case e.space:o=!0,n.currentTarget.click()}return o&&(n.preventDefault(),n.stopPropagation()),!1})})},e.default=s}})},SpdK:function(t,e,i){var n;n=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,o,r,s){!function e(i,n,o,r,s){for(;r>o;){if(r-o>600){var a=r-o+1,h=n-o+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(h-a/2<0?-1:1),p=Math.max(o,Math.floor(n-h*u/a+c)),d=Math.min(r,Math.floor(n+(a-h)*u/a+c));e(i,n,p,d,s)}var f=i[n],_=o,g=r;for(t(i,o,n),s(i[r],f)>0&&t(i,o,r);_<g;){for(t(i,_,g),_++,g--;s(i[_],f)<0;)_++;for(;s(i[g],f)>0;)g--}0===s(i[o],f)?t(i,o,g):t(i,++g,r),g<=n&&(o=g+1),n<=g&&(r=g-1)}}(i,n,o||0,r||i.length-1,s||e)}},t.exports=n()},Zcwg:function(t,e,i){"use strict";e.__esModule=!0;var n=i("2kvA");var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.prototype.beforeEnter=function(t){(0,n.addClass)(t,"collapse-transition"),t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.style.height="0",t.style.paddingTop=0,t.style.paddingBottom=0},t.prototype.enter=function(t){t.dataset.oldOverflow=t.style.overflow,0!==t.scrollHeight?(t.style.height=t.scrollHeight+"px",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom):(t.style.height="",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom),t.style.overflow="hidden"},t.prototype.afterEnter=function(t){(0,n.removeClass)(t,"collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow},t.prototype.beforeLeave=function(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.dataset.oldOverflow=t.style.overflow,t.style.height=t.scrollHeight+"px",t.style.overflow="hidden"},t.prototype.leave=function(t){0!==t.scrollHeight&&((0,n.addClass)(t,"collapse-transition"),t.style.height=0,t.style.paddingTop=0,t.style.paddingBottom=0)},t.prototype.afterLeave=function(t){(0,n.removeClass)(t,"collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom},t}();e.default={name:"ElCollapseTransition",functional:!0,render:function(t,e){var i=e.children;return t("transition",{on:new o},i)}}},aMwW:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get: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="/dist/",i(i.s=207)}({14:function(t,e){t.exports=i("ON3O")},2:function(t,e){t.exports=i("ylDJ")},20:function(t,e){t.exports=i("fUqW")},207:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(208),r=(n=o)&&n.__esModule?n:{default:n};r.default.install=function(t){t.component(r.default.name,r.default)},e.default=r.default},208:function(t,e,i){"use strict";e.__esModule=!0;var n=l(i(7)),o=l(i(14)),r=i(3),s=i(20),a=i(2),h=l(i(4));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"ElTooltip",mixins:[n.default],props:{openDelay:{type:Number,default:0},disabled:Boolean,manual:Boolean,effect:{type:String,default:"dark"},arrowOffset:{type:Number,default:0},popperClass:String,content:String,visibleArrow:{default:!0},transition:{type:String,default:"el-fade-in-linear"},popperOptions:{default:function(){return{boundariesPadding:10,gpuAcceleration:!1}}},enterable:{type:Boolean,default:!0},hideAfter:{type:Number,default:0}},data:function(){return{timeoutPending:null,focusing:!1}},computed:{tooltipId:function(){return"el-tooltip-"+(0,a.generateId)()}},beforeCreate:function(){var t=this;this.$isServer||(this.popperVM=new h.default({data:{node:""},render:function(t){return this.node}}).$mount(),this.debounceClose=(0,o.default)(200,function(){return t.handleClosePopper()}))},render:function(t){var e=this;if(this.popperVM&&(this.popperVM.node=t("transition",{attrs:{name:this.transition},on:{afterLeave:this.doDestroy}},[t("div",{on:{mouseleave:function(){e.setExpectedState(!1),e.debounceClose()},mouseenter:function(){e.setExpectedState(!0)}},ref:"popper",attrs:{role:"tooltip",id:this.tooltipId,"aria-hidden":this.disabled||!this.showPopper?"true":"false"},directives:[{name:"show",value:!this.disabled&&this.showPopper}],class:["el-tooltip__popper","is-"+this.effect,this.popperClass]},[this.$slots.content||this.content])])),!this.$slots.default||!this.$slots.default.length)return this.$slots.default;var i=(0,s.getFirstComponentChild)(this.$slots.default);if(!i)return i;var n=i.data=i.data||{};return n.staticClass=this.concatClass(n.staticClass,"el-tooltip"),i},mounted:function(){var t=this;this.referenceElm=this.$el,1===this.$el.nodeType&&(this.$el.setAttribute("aria-describedby",this.tooltipId),this.$el.setAttribute("tabindex",0),(0,r.on)(this.referenceElm,"mouseenter",this.show),(0,r.on)(this.referenceElm,"mouseleave",this.hide),(0,r.on)(this.referenceElm,"focus",function(){if(t.$slots.default&&t.$slots.default.length){var e=t.$slots.default[0].componentInstance;e&&e.focus?e.focus():t.handleFocus()}else t.handleFocus()}),(0,r.on)(this.referenceElm,"blur",this.handleBlur),(0,r.on)(this.referenceElm,"click",this.removeFocusing))},watch:{focusing:function(t){t?(0,r.addClass)(this.referenceElm,"focusing"):(0,r.removeClass)(this.referenceElm,"focusing")}},methods:{show:function(){this.setExpectedState(!0),this.handleShowPopper()},hide:function(){this.setExpectedState(!1),this.debounceClose()},handleFocus:function(){this.focusing=!0,this.show()},handleBlur:function(){this.focusing=!1,this.hide()},removeFocusing:function(){this.focusing=!1},concatClass:function(t,e){return t&&t.indexOf(e)>-1?t:t?e?t+" "+e:t:e||""},handleShowPopper:function(){var t=this;this.expectedState&&!this.manual&&(clearTimeout(this.timeout),this.timeout=setTimeout(function(){t.showPopper=!0},this.openDelay),this.hideAfter>0&&(this.timeoutPending=setTimeout(function(){t.showPopper=!1},this.hideAfter)))},handleClosePopper:function(){this.enterable&&this.expectedState||this.manual||(clearTimeout(this.timeout),this.timeoutPending&&clearTimeout(this.timeoutPending),this.showPopper=!1,this.disabled&&this.doDestroy())},setExpectedState:function(t){!1===t&&clearTimeout(this.timeoutPending),this.expectedState=t}},destroyed:function(){var t=this.referenceElm;(0,r.off)(t,"mouseenter",this.show),(0,r.off)(t,"mouseleave",this.hide),(0,r.off)(t,"focus",this.handleFocus),(0,r.off)(t,"blur",this.handleBlur),(0,r.off)(t,"click",this.removeFocusing)}}},3:function(t,e){t.exports=i("2kvA")},4:function(t,e){t.exports=i("7+uW")},7:function(t,e){t.exports=i("fKx3")}})},bwiK:function(t,e){},d5BH:function(t,e){},emf4:function(t,e,i){"use strict";t.exports=o,t.exports.default=o;var n=i("SpdK");function o(t,e){if(!(this instanceof o))return new o(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 r(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 s(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,n,o){o||(o=_(null)),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(var r,s=e;s<i;s++)r=t.children[s],h(o,t.leaf?n(r):r);return o}function h(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function p(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function _(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,o,r){for(var s,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=o||(s=e+Math.ceil((i-e)/o/2)*o,n(t,s,e,i,r),a.push(e,s,s,i))}o.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],n=this.toBBox;if(!f(t,e))return i;for(var o,r,s,a,h=[];e;){for(o=0,r=e.children.length;o<r;o++)s=e.children[o],f(t,a=e.leaf?n(s):s)&&(e.leaf?i.push(s):d(t,a)?this._all(s,i):h.push(s));e=h.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!f(t,e))return!1;for(var n,o,r,s,a=[];e;){for(n=0,o=e.children.length;n<o;n++)if(r=e.children[n],f(t,s=e.leaf?i(r):r)){if(e.leaf||d(t,s))return!0;a.push(r)}e=a.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 o=this.data;this.data=n,n=o}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=_([]),this},remove:function(t,e){if(!t)return this;for(var i,n,o,s,a=this.data,h=this.toBBox(t),l=[],u=[];a||l.length;){if(a||(a=l.pop(),n=l[l.length-1],i=u.pop(),s=!0),a.leaf&&-1!==(o=r(t,a.children,e)))return a.children.splice(o,1),l.push(a),this._condense(l),this;s||a.leaf||!d(a,h)?n?(i++,a=n.children[i],s=!1):a=null:(l.push(a),u.push(i),i=0,n=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var 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 o,r=i-e+1,a=this._maxEntries;if(r<=a)return s(o=_(t.slice(e,i+1)),this.toBBox),o;n||(n=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/Math.pow(a,n-1))),(o=_([])).leaf=!1,o.height=n;var h,l,u,c,p=Math.ceil(r/a),d=p*Math.ceil(Math.sqrt(a));for(g(t,e,i,d,this.compareMinX),h=e;h<=i;h+=d)for(g(t,h,u=Math.min(h+d-1,i),p,this.compareMinY),l=h;l<=u;l+=p)c=Math.min(l+p-1,u),o.children.push(this._build(t,l,c,n-1));return s(o,this.toBBox),o},_chooseSubtree:function(t,e,i,n){for(var o,r,s,a,h,l,u,p,d,f;n.push(e),!e.leaf&&n.length-1!==i;){for(u=p=1/0,o=0,r=e.children.length;o<r;o++)h=c(s=e.children[o]),d=t,f=s,(l=(Math.max(f.maxX,d.maxX)-Math.min(f.minX,d.minX))*(Math.max(f.maxY,d.maxY)-Math.min(f.minY,d.minY))-h)<p?(p=l,u=h<u?h:u,a=s):l===p&&h<u&&(u=h,a=s);e=a||e.children[0]}return e},_insert:function(t,e,i){var n=this.toBBox,o=i?t:n(t),r=[],s=this._chooseSubtree(o,this.data,e,r);for(s.children.push(t),h(s,o);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(o,r,e)},_split:function(t,e){var i=t[e],n=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,n);var r=this._chooseSplitIndex(i,o,n),a=_(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,s(i,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=_([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var n,o,r,s,h,l,u,p,d,f,_,g,v,y;for(l=u=1/0,n=e;n<=i-e;n++)o=a(t,0,n,this.toBBox),r=a(t,n,i,this.toBBox),d=o,f=r,void 0,void 0,void 0,void 0,_=Math.max(d.minX,f.minX),g=Math.max(d.minY,f.minY),v=Math.min(d.maxX,f.maxX),y=Math.min(d.maxY,f.maxY),s=Math.max(0,v-_)*Math.max(0,y-g),h=c(o)+c(r),s<l?(l=s,p=n,u=h<u?h:u):s===l&&h<u&&(u=h,p=n);return p},_chooseSplitAxis:function(t,e,i){var n=t.leaf?this.compareMinX:l,o=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,o)&&t.children.sort(n)},_allDistMargin:function(t,e,i,n){t.children.sort(n);var o,r,s=this.toBBox,l=a(t,0,e,s),u=a(t,i-e,i,s),c=p(l)+p(u);for(o=e;o<i-e;o++)r=t.children[o],h(l,t.leaf?s(r):r),c+=p(l);for(o=i-e-1;o>=e;o--)r=t.children[o],h(u,t.leaf?s(r):r),c+=p(u);return c},_adjustParentBBoxes:function(t,e,i){for(var n=i;n>=0;n--)h(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():s(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]+"};")}}},exT9:function(t,e,i){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get: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="/dist/",i(i.s=90)}({0:function(t,e){t.exports=function(t,e,i,n,o,r){var s,a=t=t||{},h=typeof t.default;"object"!==h&&"function"!==h||(s=t,a=t.default);var l,u="function"==typeof a?a.options:a;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId=o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):n&&(l=n),l){var c=u.functional,p=c?u.render:u.beforeCreate;c?(u._injectStyles=l,u.render=function(t,e){return l.call(e),p(t,e)}):u.beforeCreate=p?[].concat(p,l):[l]}return{esModule:s,exports:a,options:u}}},1:function(t,e){t.exports=i("fPll")},21:function(t,e){t.exports=i("Zcwg")},34:function(t,e,i){"use strict";e.__esModule=!0,e.default={inject:["rootMenu"],computed:{indexPath:function(){for(var t=[this.index],e=this.$parent;"ElMenu"!==e.$options.componentName;)e.index&&t.unshift(e.index),e=e.$parent;return t},parentMenu:function(){for(var t=this.$parent;t&&-1===["ElMenu","ElSubmenu"].indexOf(t.$options.componentName);)t=t.$parent;return t},paddingStyle:function(){if("vertical"!==this.rootMenu.mode)return{};var t=20,e=this.$parent;if(this.rootMenu.collapse)t=20;else for(;e&&"ElMenu"!==e.$options.componentName;)"ElSubmenu"===e.$options.componentName&&(t+=20),e=e.$parent;return{paddingLeft:t+"px"}}}}},7:function(t,e){t.exports=i("fKx3")},90:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(91),r=(n=o)&&n.__esModule?n:{default:n};r.default.install=function(t){t.component(r.default.name,r.default)},e.default=r.default},91:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(92),o=i.n(n),r=i(0)(o.a,null,!1,null,null,null);e.default=r.exports},92:function(t,e,i){"use strict";e.__esModule=!0;var n=a(i(21)),o=a(i(34)),r=a(i(1)),s=a(i(7));function a(t){return t&&t.__esModule?t:{default:t}}var h={props:{transformOrigin:{type:[Boolean,String],default:!1},offset:s.default.props.offset,boundariesPadding:s.default.props.boundariesPadding,popperOptions:s.default.props.popperOptions},data:s.default.data,methods:s.default.methods,beforeDestroy:s.default.beforeDestroy,deactivated:s.default.deactivated};e.default={name:"ElSubmenu",componentName:"ElSubmenu",mixins:[o.default,r.default,h],components:{ElCollapseTransition:n.default},props:{index:{type:String,required:!0},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},popperClass:String,disabled:Boolean,popperAppendToBody:{type:Boolean,default:void 0}},data:function(){return{popperJS:null,timeout:null,items:{},submenus:{},mouseInChild:!1}},watch:{opened:function(t){var e=this;this.isMenuPopup&&this.$nextTick(function(t){e.updatePopper()})}},computed:{appendToBody:function(){return void 0===this.popperAppendToBody?this.isFirstLevel:this.popperAppendToBody},menuTransitionName:function(){return this.rootMenu.collapse?"el-zoom-in-left":"el-zoom-in-top"},opened:function(){return this.rootMenu.openedMenus.indexOf(this.index)>-1},active:function(){var t=!1,e=this.submenus,i=this.items;return Object.keys(i).forEach(function(e){i[e].active&&(t=!0)}),Object.keys(e).forEach(function(i){e[i].active&&(t=!0)}),t},hoverBackground:function(){return this.rootMenu.hoverBackground},backgroundColor:function(){return this.rootMenu.backgroundColor||""},activeTextColor:function(){return this.rootMenu.activeTextColor||""},textColor:function(){return this.rootMenu.textColor||""},mode:function(){return this.rootMenu.mode},isMenuPopup:function(){return this.rootMenu.isMenuPopup},titleStyle:function(){return"horizontal"!==this.mode?{color:this.textColor}:{borderBottomColor:this.active?this.rootMenu.activeTextColor?this.activeTextColor:"":"transparent",color:this.active?this.activeTextColor:this.textColor}},isFirstLevel:function(){for(var t=!0,e=this.$parent;e&&e!==this.rootMenu;){if(["ElSubmenu","ElMenuItemGroup"].indexOf(e.$options.componentName)>-1){t=!1;break}e=e.$parent}return t}},methods:{handleCollapseToggle:function(t){t?this.initPopper():this.doDestroy()},addItem:function(t){this.$set(this.items,t.index,t)},removeItem:function(t){delete this.items[t.index]},addSubmenu:function(t){this.$set(this.submenus,t.index,t)},removeSubmenu:function(t){delete this.submenus[t.index]},handleClick:function(){var t=this.rootMenu,e=this.disabled;"hover"===t.menuTrigger&&"horizontal"===t.mode||t.collapse&&"vertical"===t.mode||e||this.dispatch("ElMenu","submenu-click",this)},handleMouseenter:function(){var t=this,e=this.rootMenu,i=this.disabled;"click"===e.menuTrigger&&"horizontal"===e.mode||!e.collapse&&"vertical"===e.mode||i||(this.dispatch("ElSubmenu","mouse-enter-child"),clearTimeout(this.timeout),this.timeout=setTimeout(function(){t.rootMenu.openMenu(t.index,t.indexPath)},this.showTimeout))},handleMouseleave:function(){var t=this,e=this.rootMenu;"click"===e.menuTrigger&&"horizontal"===e.mode||!e.collapse&&"vertical"===e.mode||(this.dispatch("ElSubmenu","mouse-leave-child"),clearTimeout(this.timeout),this.timeout=setTimeout(function(){!t.mouseInChild&&t.rootMenu.closeMenu(t.index)},this.hideTimeout))},handleTitleMouseenter:function(){if("horizontal"!==this.mode||this.rootMenu.backgroundColor){var t=this.$refs["submenu-title"];t&&(t.style.backgroundColor=this.rootMenu.hoverBackground)}},handleTitleMouseleave:function(){if("horizontal"!==this.mode||this.rootMenu.backgroundColor){var t=this.$refs["submenu-title"];t&&(t.style.backgroundColor=this.rootMenu.backgroundColor||"")}},updatePlacement:function(){this.currentPlacement="horizontal"===this.mode&&this.isFirstLevel?"bottom-start":"right-start"},initPopper:function(){this.referenceElm=this.$el,this.popperElm=this.$refs.menu,this.updatePlacement()}},created:function(){var t=this;this.$on("toggle-collapse",this.handleCollapseToggle),this.$on("mouse-enter-child",function(){t.mouseInChild=!0,clearTimeout(t.timeout)}),this.$on("mouse-leave-child",function(){t.mouseInChild=!1,clearTimeout(t.timeout)})},mounted:function(){this.parentMenu.addSubmenu(this),this.rootMenu.addSubmenu(this),this.initPopper()},beforeDestroy:function(){this.parentMenu.removeSubmenu(this),this.rootMenu.removeSubmenu(this)},render:function(t){var e=this.active,i=this.opened,n=this.paddingStyle,o=this.titleStyle,r=this.backgroundColor,s=this.rootMenu,a=this.currentPlacement,h=this.menuTransitionName,l=this.mode,u=this.disabled,c=this.popperClass,p=this.$slots,d=this.isFirstLevel,f=t("transition",{attrs:{name:h}},[t("div",{ref:"menu",directives:[{name:"show",value:i}],class:["el-menu--"+l,c],on:{mouseenter:this.handleMouseenter,mouseleave:this.handleMouseleave,focus:this.handleMouseenter}},[t("ul",{attrs:{role:"menu"},class:["el-menu el-menu--popup","el-menu--popup-"+a],style:{backgroundColor:s.backgroundColor||""}},[p.default])])]),_=t("el-collapse-transition",null,[t("ul",{attrs:{role:"menu"},class:"el-menu el-menu--inline",directives:[{name:"show",value:i}],style:{backgroundColor:s.backgroundColor||""}},[p.default])]),g="horizontal"===s.mode&&d||"vertical"===s.mode&&!s.collapse?"el-icon-arrow-down":"el-icon-arrow-right";return t("li",{class:{"el-submenu":!0,"is-active":e,"is-opened":i,"is-disabled":u},attrs:{role:"menuitem","aria-haspopup":"true","aria-expanded":i},on:{mouseenter:this.handleMouseenter,mouseleave:this.handleMouseleave,focus:this.handleMouseenter}},[t("div",{class:"el-submenu__title",ref:"submenu-title",on:{click:this.handleClick,mouseenter:this.handleTitleMouseenter,mouseleave:this.handleTitleMouseleave},style:[n,o,{backgroundColor:r}]},[p.title,t("i",{class:["el-submenu__icon-arrow",g]},[])]),this.isMenuPopup?f:_])}}}})},fKx3:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i("7+uW"),r=(n=o)&&n.__esModule?n:{default:n},s=i("7J9s");var a=r.default.prototype.$isServer?function(){}:i("NMof"),h=function(t){return t.stopPropagation()};e.default={props:{transformOrigin:{type:[Boolean,String],default:!0},placement:{type:String,default:"bottom"},boundariesPadding:{type:Number,default:5},reference:{},popper:{},offset:{default:0},value:Boolean,visibleArrow:Boolean,arrowOffset:{type:Number,default:35},appendToBody:{type:Boolean,default:!0},popperOptions:{type:Object,default:function(){return{gpuAcceleration:!1}}}},data:function(){return{showPopper:!1,currentPlacement:""}},watch:{value:{immediate:!0,handler:function(t){this.showPopper=t,this.$emit("input",t)}},showPopper:function(t){this.disabled||(t?this.updatePopper():this.destroyPopper(),this.$emit("input",t))}},methods:{createPopper:function(){var t=this;if(!this.$isServer&&(this.currentPlacement=this.currentPlacement||this.placement,/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement))){var e=this.popperOptions,i=this.popperElm=this.popperElm||this.popper||this.$refs.popper,n=this.referenceElm=this.referenceElm||this.reference||this.$refs.reference;!n&&this.$slots.reference&&this.$slots.reference[0]&&(n=this.referenceElm=this.$slots.reference[0].elm),i&&n&&(this.visibleArrow&&this.appendArrow(i),this.appendToBody&&document.body.appendChild(this.popperElm),this.popperJS&&this.popperJS.destroy&&this.popperJS.destroy(),e.placement=this.currentPlacement,e.offset=this.offset,e.arrowOffset=this.arrowOffset,this.popperJS=new a(n,i,e),this.popperJS.onCreate(function(e){t.$emit("created",t),t.resetTransformOrigin(),t.$nextTick(t.updatePopper)}),"function"==typeof e.onUpdate&&this.popperJS.onUpdate(e.onUpdate),this.popperJS._popper.style.zIndex=s.PopupManager.nextZIndex(),this.popperElm.addEventListener("click",h))}},updatePopper:function(){var t=this.popperJS;t?(t.update(),t._popper&&(t._popper.style.zIndex=s.PopupManager.nextZIndex())):this.createPopper()},doDestroy:function(t){!this.popperJS||this.showPopper&&!t||(this.popperJS.destroy(),this.popperJS=null)},destroyPopper:function(){this.popperJS&&this.resetTransformOrigin()},resetTransformOrigin:function(){if(this.transformOrigin){var t=this.popperJS._popper.getAttribute("x-placement").split("-")[0],e={top:"bottom",bottom:"top",left:"right",right:"left"}[t];this.popperJS._popper.style.transformOrigin="string"==typeof this.transformOrigin?this.transformOrigin:["top","bottom"].indexOf(t)>-1?"center "+e:e+" center"}},appendArrow:function(t){var e=void 0;if(!this.appended){for(var i in this.appended=!0,t.attributes)if(/^_v-/.test(t.attributes[i].name)){e=t.attributes[i].name;break}var n=document.createElement("div");e&&n.setAttribute(e,""),n.setAttribute("x-arrow",""),n.className="popper__arrow",t.appendChild(n)}}},beforeDestroy:function(){this.doDestroy(!0),this.popperElm&&this.popperElm.parentNode===document.body&&(this.popperElm.removeEventListener("click",h),document.body.removeChild(this.popperElm))},deactivated:function(){this.$options.beforeDestroy[0].call(this)}}},fUqW:function(t,e,i){"use strict";e.__esModule=!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.isVNode=function(t){return null!==t&&"object"===(void 0===t?"undefined":n(t))&&(0,o.hasOwn)(t,"componentOptions")},e.getFirstComponentChild=function(t){return t&&t.filter(function(t){return t&&t.tag})[0]};var o=i("ylDJ")},ktr9:function(t,e){},oju6:function(t,e,i){t.exports=i.p+"static/img/visitor_device.7b16bc2.png"},orbS:function(t,e){t.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get: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="/dist/",i(i.s=244)}({0:function(t,e){t.exports=function(t,e,i,n,o,r){var s,a=t=t||{},h=typeof t.default;"object"!==h&&"function"!==h||(s=t,a=t.default);var l,u="function"==typeof a?a.options:a;if(e&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId=o),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},u._ssrRegister=l):n&&(l=n),l){var c=u.functional,p=c?u.render:u.beforeCreate;c?(u._injectStyles=l,u.render=function(t,e){return l.call(e),p(t,e)}):u.beforeCreate=p?[].concat(p,l):[l]}return{esModule:s,exports:a,options:u}}},244:function(t,e,i){"use strict";e.__esModule=!0;var n,o=i(245),r=(n=o)&&n.__esModule?n:{default:n};r.default.install=function(t){t.component(r.default.name,r.default)},e.default=r.default},245:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(246),o=i.n(n),r=i(0)(o.a,null,!1,null,null,null);e.default=r.exports},246:function(t,e,i){"use strict";e.__esModule=!0,e.default={name:"ElTag",props:{text:String,closable:Boolean,type:String,hit:Boolean,disableTransitions:Boolean,color:String,size:String},methods:{handleClose:function(t){t.stopPropagation(),this.$emit("close",t)}},computed:{tagSize:function(){return this.size||(this.$ELEMENT||{}).size}},render:function(t){var e=t("span",{class:["el-tag",this.type?"el-tag--"+this.type:"",this.tagSize?"el-tag--"+this.tagSize:"",{"is-hit":this.hit}],style:{backgroundColor:this.color}},[this.$slots.default,this.closable&&t("i",{class:"el-tag__close el-icon-close",on:{click:this.handleClose}},[])]);return this.disableTransitions?e:t("transition",{attrs:{name:"el-zoom-in-center"}},[e])}}}})},uY1a:function(t,e){t.exports=function(t,e,i,n){var o,r=0;return"boolean"!=typeof e&&(n=i,i=e,e=void 0),function(){var s=this,a=Number(new Date)-r,h=arguments;function l(){r=Number(new Date),i.apply(s,h)}n&&!o&&l(),o&&clearTimeout(o),void 0===n&&a>t?l():!0!==e&&(o=setTimeout(n?function(){o=void 0}:l,void 0===n?t-a:t))}}},ush1:function(t,e){},wJKS:function(t,e){},ylDJ:function(t,e,i){"use strict";e.__esModule=!0,e.isEdge=e.isIE=e.coerceTruthyValueToArray=e.arrayFind=e.arrayFindIndex=e.escapeRegexpString=e.valueEquals=e.generateId=e.getValueByPath=void 0,e.noop=function(){},e.hasOwn=function(t,e){return s.call(t,e)},e.toObject=function(t){for(var e={},i=0;i<t.length;i++)t[i]&&a(e,t[i]);return e},e.getPropByPath=function(t,e,i){for(var n=t,o=(e=(e=e.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"")).split("."),r=0,s=o.length;r<s-1&&(n||i);++r){var a=o[r];if(!(a in n)){if(i)throw new Error("please transfer a valid prop path to form item!");break}n=n[a]}return{o:n,k:o[r],v:n?n[o[r]]:null}};var n,o=i("7+uW"),r=(n=o)&&n.__esModule?n:{default:n};var s=Object.prototype.hasOwnProperty;function a(t,e){for(var i in e)t[i]=e[i];return t}e.getValueByPath=function(t,e){for(var i=(e=e||"").split("."),n=t,o=null,r=0,s=i.length;r<s;r++){var a=i[r];if(!n)break;if(r===s-1){o=n[a];break}n=n[a]}return o};e.generateId=function(){return Math.floor(1e4*Math.random())},e.valueEquals=function(t,e){if(t===e)return!0;if(!(t instanceof Array))return!1;if(!(e instanceof Array))return!1;if(t.length!==e.length)return!1;for(var i=0;i!==t.length;++i)if(t[i]!==e[i])return!1;return!0},e.escapeRegexpString=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String(t).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")};var h=e.arrayFindIndex=function(t,e){for(var i=0;i!==t.length;++i)if(e(t[i]))return i;return-1};e.arrayFind=function(t,e){var i=h(t,e);return-1!==i?t[i]:void 0},e.coerceTruthyValueToArray=function(t){return Array.isArray(t)?t:t?[t]:[]},e.isIE=function(){return!r.default.prototype.$isServer&&!isNaN(Number(document.documentMode))},e.isEdge=function(){return!r.default.prototype.$isServer&&navigator.userAgent.indexOf("Edge")>-1}}});