text: this.InteractionHandler=function(t){var n={};function i(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=n,i.d=function(t,n,e){i.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,n){if(1&n&&(t=i(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(i.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)i.d(e,r,function(n){return t[n]}.bind(null,r));return e},i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,"a",n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="",i(i.s=0)}([function(t,n,i){"use strict";function e(t){this.olMap=t,this._interactions={},this._mapInteractions={},this._activeInteraction=null,this._blockMapInteraction=!1,this._onInteractionStart=null,this._onInteractionEnd=null,this._onClear=null,this._onUpdate=null}i.r(n),i.d(n,"default",function(){return e}),e.prototype.isActive=function(){return!!this._activeInteraction},e.prototype.activeInteraction=function(){return this._activeInteraction},e.prototype.get=function(t){return t in this._interactions?this._interactions[t]:null},e.prototype.addInteraction=function(t,n){var i=null;return t in this._interactions&&(i=this._interactions[t]),this._interactions[t]=n,i},e.prototype.removeInteraction=function(t){if(!(t in this._interactions))return null;this._activeInteraction&&this._activeInteraction===t?this.interrupt(null,this.removeInteraction.bind(this,t)):delete this._interactions[t]},e.prototype.onInteractionStart=function(t){this._onInteractionStart=t},e.prototype.onInteractionEnd=function(t){this._onInteractionEnd=t},e.prototype.onClear=function(t){this._onClear=t},e.prototype.onUpdate=function(t){this._onUpdate=t},e.prototype.startInteraction=function(t,n){var i=!1;if(!this._activeInteraction||(i=t===this._activeInteraction)){if(this._onInteractionStart){var e;try{e=this._onInteractionStart(n,t)}catch(t){return void console.error(t)}if(!1===e)return void(i||this.interrupt(n))}if(t in this._interactions){this._activeInteraction=t;try{i&&this._interactions[this._activeInteraction].restart&&!1===this._interactions[this._activeInteraction].restart(n)||this._interactions[this._activeInteraction].start(n)}catch(t){return console.error(t),void(this._activeInteraction=null)}if(!this._activeInteraction)return;!i&&this._interactions[this._activeInteraction].olInteraction&&this.olMap.addInteraction(this._interactions[this._activeInteraction].olInteraction)}}else this.interrupt(n,this.startInteraction.bind(this,t,n),this._cancelStartInteraction.bind(this,t))},e.prototype.endInteraction=function(t,n,i,e){if(this._activeInteraction){var r=null,o=null;try{o=this._interactions[this._activeInteraction].end(t,n)}catch(t){r=t.message,console.error(t)}try{this._interactions[this._activeInteraction].olInteraction&&this.olMap.removeInteraction(this._interactions[this._activeInteraction].olInteraction)}catch(t){r=t.message,console.error(t)}try{i||this.clearInteraction()}catch(t){r=t.message,console.error(t)}try{this._onInteractionEnd&&this._onInteractionEnd(t,this._activeInteraction,n)}catch(t){r=t.message,console.error(t)}var a=this._activeInteraction;this._activeInteraction=null,this._blockMapInteraction=!1;try{!e&&this._onUpdate&&this._onUpdate(a,o,r)}catch(t){r=t.message,console.error(t)}return r}},e.prototype.clearInteraction=function(){this._onClear&&this._onClear(),this._interactions[this._activeInteraction].clear&&this._interactions[this._activeInteraction].clear()},e.prototype.interrupt=function(t,n,i){if(this._activeInteraction&&this._interactions[this._activeInteraction].checkInterrupt){var e=this,r=this._interactions[this._activeInteraction].saveOnInterrupt;try{this._interactions[this._activeInteraction].checkInterrupt(function(){e.endInteraction(t,r),n&&n()},i||function(){})}catch(t){console.error(t)}}else this.endInteraction(t),n&&n()},e.prototype._cancelStartInteraction=function(t){t&&t in this._interactions&&this._interactions[t].cancelStart&&this._interactions[t].cancelStart()},e.prototype.addMapListener=function(t){this.removeMapListener(t);var n=this;this._mapInteractions[t]=function(i){!n._blockMapInteraction&&n._activeInteraction&&n._interactions[n._activeInteraction].map&&t in n._interactions[n._activeInteraction].map&&n._interactions[n._activeInteraction].map[t](i)},this.olMap.on(t,this._mapInteractions[t])},e.prototype.removeMapListener=function(t){t in this._mapInteractions&&(this.olMap.un(t,this._mapInteractions[t]),delete this._mapInteractions[t])},e.prototype.removeAllMapListeners=function(){for(var t in this._mapInteractions)this.olMap.un(t,this._mapInteractions[t]),delete this._mapInteractions[t]},e.prototype.disableMapInteractions=function(){this._blockMapInteraction=!0},e.prototype.enableMapInteractions=function(){this._blockMapInteraction=!1},e.prototype.bindUiElements=function(t,n){(n=n||{}).value=n.value||n.valueFunction||function(){return this.value},n.event=n.event||"click","undefined"!=typeof jQuery&&t instanceof jQuery?t=t.get():"function"===t[Symbol.iterator]||t instanceof Array||t instanceof NodeList||(t=[t]);var i=this,e=null;e=n.interruptOnly?function(t){n.always&&n.always(),i._uiInterruptorListener(this,n.onInterrupt,t)}:function(t){n.always&&n.always(),i._uiListener(this,n.value,t)};for(var r=0;r<t.length;++r)t[r].addEventListener(n.event,e)},e.prototype._uiListener=function(t,n,i){var e="function"==typeof n?n.call(t,t):n;this._activeInteraction&&e===this._activeInteraction?this.startInteraction(e,i):this.interrupt(i,this.startInteraction.bind(this,e,i),this._cancelStartInteraction.bind(this,e))},e.prototype._uiInterruptorListener=function(t,n,i){var e=this._activeInteraction&&this._interactions[this._activeInteraction].checkInterrupt;e&&(i.preventDefault(),i.stopPropagation()),this.interrupt(i,function(){n&&n(),e&&t.click()})}}]).default;