"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6070],{9032:function(t,e,i){var o=i(86291),d=i(95883),n=i(41376),s=i(54354);function a(t){this.el=t,this.loading=0,this.loaded=0}a.prototype.addLoading=function(){0===this.loading&&this.show(),++this.loading,this.update()},a.prototype.addLoaded=function(){var t=this;setTimeout((function(){++t.loaded,t.update()}),100)},a.prototype.update=function(){var t=(this.loaded/this.loading*100).toFixed(1)+"%";if(this.el.style.width=t,this.loading===this.loaded){this.loading=0,this.loaded=0;var e=this;setTimeout((function(){e.hide()}),500)}},a.prototype.show=function(){this.el.style.visibility="visible"},a.prototype.hide=function(){this.loading===this.loaded&&(this.el.style.visibility="hidden",this.el.style.width=0)};var h=new a(document.getElementById("progress")),l=new d.Z({url:"https://ahocevar.com/geoserver/wms",params:{LAYERS:"topp:states"},serverType:"geoserver"});l.on("imageloadstart",(function(){h.addLoading()})),l.on("imageloadend",(function(){h.addLoaded()})),l.on("imageloaderror",(function(){h.addLoaded()}));new n.Z({layers:[new o.Z({source:l})],target:"map",view:new s.ZP({center:[-10997148,4569099],zoom:4})})}},function(t){var e=function(e){return t(t.s=e)};e(9877),e(9032)}]); //# sourceMappingURL=image-load-events.js.map