(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2f44d502"],{"02b4":function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return j}));var s=i("a4ee"),r=i("e92d"),a=i("f4cc"),n=i("477c"),c=i("59b2"),o=(i("b50f"),i("c120"),i("cea0"),i("d386")),h=i("7f83"),l=i("164a"),u=i("566d"),d=i("d81b"),p=i("018d"),f=i("ae54"),b=i("07cd"),y=i("d302"),m=i("365a"),g=i("6c7a"),w=i("2be0"),v=i("e94b");const _=[0,0];let O=class extends(Object(w["a"])(Object(g["a"])(Object(l["a"])(Object(u["a"])(m["a"]))))){constructor(){super(...arguments),this._tileStrategy=null,this._fetchQueue=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume()}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null;this._tileInfoView=new p["a"](this.layer.tileInfo,this.layer.fullExtent),this._fetchQueue=new b["a"]({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,t)=>this.fetchTile(e,t)}),this._tileStrategy=new y["a"]({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),this.requestUpdate(),this.handles.add(Object(n["e"])(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){var t;return Object(h["d"])(null==(t=this.layer.tileInfo)?void 0:t.spatialReference,e)}createFetchPopupFeaturesQueryGeometry(e,t){return Object(v["a"])(e,t,this.view)}async doRefresh(){this.updateRequested||this.suspended||(this._fetchQueue.reset(),this._tileStrategy.tiles.forEach(e=>this._enqueueTileFetch(e)))}isUpdating(){var e,t;return null!=(e=null==(t=this._fetchQueue)?void 0:t.updating)&&e}acquireTile(e){const t=this._bitmapView.createTile(e),i=t.bitmap;return[i.x,i.y]=this._tileInfoView.getTileCoords(_,t.key),i.resolution=this._tileInfoView.getTileResolution(t.key),[i.width,i.height]=this._tileInfoView.tileInfo.size,this._enqueueTileFetch(t),this._bitmapView.addChild(t),this.requestUpdate(),t}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,t={}){const i="tilemapCache"in this.layer?this.layer.tilemapCache:null,{signal:s,resamplingLevel:r=0}=t;if(!i)try{return await this._fetchImage(e,s)}catch(o){if(!Object(a["m"])(o)&&!this.resampling)return Object(d["a"])(this._tileInfoView.tileInfo.size);if(r<3){const i=this._tileInfoView.getTileParentId(e.id);if(i){const s=new f["a"](i),a=await this.fetchTile(s,{...t,resamplingLevel:r+1});return Object(d["b"])(this._tileInfoView,a,s,e)}}throw o}const n=new f["a"](0,0,0,0);let c;try{if(await i.fetchAvailabilityUpsample(e.level,e.row,e.col,n,{signal:s}),n.level!==e.level&&!this.resampling)return Object(d["a"])(this._tileInfoView.tileInfo.size);c=await this._fetchImage(n,s)}catch(o){if(Object(a["m"])(o))throw o;c=await this._fetchImage(e,s)}return this.resampling?Object(d["b"])(this._tileInfoView,c,n,e):c}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);e.bitmap.source=t,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",()=>this.requestUpdate())}catch(t){Object(a["m"])(t)||r["a"].getLogger(this.declaredClass).error(t)}this.requestUpdate()}}async _fetchImage(e,t){return this.layer.fetchTile(e.level,e.row,e.col,{signal:t})}};Object(s["a"])([Object(c["b"])()],O.prototype,"_fetchQueue",void 0),Object(s["a"])([Object(c["b"])()],O.prototype,"resampling",null),O=Object(s["a"])([Object(o["a"])("esri.views.2d.layers.TileLayerView2D")],O);const j=O},"164a":function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var s=i("a4ee"),r=(i("e92d"),i("cea0"),i("b50f"),i("c120"),i("2dd4"),i("d386")),a=i("e80c");const n=e=>{let t=class extends e{attach(){this.view.timeline.record(this.layer.title+" (BitmapTileLayer) Attach"),this._bitmapView=new a["a"](this._tileInfoView),this.container.addChild(this._bitmapView)}detach(){var e;this.container.removeChild(this._bitmapView),null==(e=this._bitmapView)||e.removeAllChildren()}};return t=Object(s["a"])([Object(r["a"])("esri.views.2d.layers.BitmapTileLayerView2D")],t),t}},"2be0":function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var s=i("a4ee"),r=i("ce50"),a=i("b2b2"),n=i("f4cc"),c=i("59b2"),o=(i("b50f"),i("c120"),i("cea0"),i("d386")),h=i("536f");const l=e=>{let t=class extends e{async fetchPopupFeatures(e,t){const{layer:i}=this;if(!e)return Promise.reject(new r["a"]("tilelayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:i}));if("tile"!==i.type)return Promise.reject(new r["a"]("tilelayerview:fetchPopupFeatures","Layer type should be 'tile'",{type:i.type}));const s=this.get("view.scale"),c=i.allSublayers.toArray().filter(e=>{const t=0===e.minScale||s<=e.minScale,i=0===e.maxScale||s>=e.maxScale;return e.popupTemplate&&e.popupEnabled&&e.visible&&t&&i});return Object(n["j"])(c.map(async i=>{const s=i.createQuery(),r=Object(a["k"])(t)?t.event:null,n=Object(h["a"])({renderer:i.renderer,event:r});return s.geometry=this.createFetchPopupFeaturesQueryGeometry(e,n),s.outFields=await i.popupTemplate.getRequiredFields(),(await i.queryFeatures(s)).features})).then(e=>[].concat(...e.map(e=>e.value).filter(Boolean)))}};return Object(s["a"])([Object(c["b"])()],t.prototype,"layer",void 0),t=Object(s["a"])([Object(o["a"])("esri.layers.mixins.TileLayerView")],t),t}},"536f":function(e,t,i){"use strict";function s(e,t){return t?"xoffset"in t&&t.xoffset?Math.max(e,Math.abs(t.xoffset)):"yoffset"in t&&t.yoffset?Math.max(e,Math.abs(t.yoffset||0)):e:e}function r(e){let t=0,i=0;for(let s=0;s"size"===e.type).map(t=>{const{maxSize:i,minSize:s}=t;return(a(i,e)+a(s,e))/2});let s=0;const r=i.length;if(0===r)return e;for(let a=0;a{e=s(e,t.symbol)}),e}if("class-breaks"===t.type){let e=r;return t.classBreakInfos.forEach(t=>{e=s(e,t.symbol)}),e}return t.type,r}i.d(t,"a",(function(){return c}))},"566d":function(e,t,i){"use strict";i.d(t,"a",(function(){return S}));var s=i("a4ee"),r=i("2c4f"),a=i("7d7d"),n=i("ce50"),c=i("477c"),o=i("59b2"),h=(i("b50f"),i("c120"),i("cea0"),i("d386")),l=i("00c0"),u=i("6a0ed");i("e92d"),i("2dd4");let d=class extends u["a"]{};d=Object(s["a"])([Object(h["a"])("esri.views.layers.support.ClipArea")],d);const p=d;var f;let b=f=class extends p{constructor(){super(...arguments),this.type="rect",this.left=null,this.right=null,this.top=null,this.bottom=null}clone(){return new f({left:this.left,right:this.right,top:this.top,bottom:this.bottom})}get version(){return(this._get("version")||0)+1}};Object(s["a"])([Object(o["b"])({type:[Number,String],json:{write:!0}})],b.prototype,"left",void 0),Object(s["a"])([Object(o["b"])({type:[Number,String],json:{write:!0}})],b.prototype,"right",void 0),Object(s["a"])([Object(o["b"])({type:[Number,String],json:{write:!0}})],b.prototype,"top",void 0),Object(s["a"])([Object(o["b"])({type:[Number,String],json:{write:!0}})],b.prototype,"bottom",void 0),Object(s["a"])([Object(o["b"])({readOnly:!0})],b.prototype,"version",null),b=f=Object(s["a"])([Object(h["a"])("esri.views.layers.support.ClipRect")],b);const y=b;i("e06a");var m,g=i("3760"),w=i("a9ab"),v=i("3af1"),_=i("1219");const O={base:g["a"],key:"type",typeMap:{extent:v["a"],polygon:_["a"]}};let j=m=class extends p{constructor(){super(...arguments),this.type="geometry",this.geometry=null}get version(){return(this._get("version")||0)+1}clone(){return new m({geometry:this.geometry.clone()})}};Object(s["a"])([Object(o["b"])({types:O,json:{read:w["a"],write:!0}})],j.prototype,"geometry",void 0),Object(s["a"])([Object(o["b"])({readOnly:!0})],j.prototype,"version",null),j=m=Object(s["a"])([Object(h["a"])("esri.views.layers.support.Geometry")],j);const x=j;let R=class extends p{constructor(){super(...arguments),this.type="path",this.path=[]}get version(){return(this._get("version")||0)+1}};Object(s["a"])([Object(o["b"])({type:[[[Number]]],json:{write:!0}})],R.prototype,"path",void 0),Object(s["a"])([Object(o["b"])({readOnly:!0})],R.prototype,"version",null),R=Object(s["a"])([Object(h["a"])("esri.views.layers.support.Path")],R);const I=R,T=r["a"].ofType({key:"type",base:p,typeMap:{rect:y,path:I,geometry:x}}),S=e=>{let t=class extends e{constructor(){super(...arguments),this.attached=!1,this.clips=new T,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1}initialize(){var e,t,i,s;const r=null==(e=null==(t=this.view)?void 0:t.spatialReferenceLocked)||e;(null==(i=this.view)?void 0:i.spatialReference)&&r&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new n["a"]("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer}))):(this.container||(this.container=new l["a"]),this.container.fadeTransitionEnabled=!0,this.container.opacity=0,this.container.clips=this.clips,this.handles.add([Object(c["e"])(()=>this.suspended,e=>{this.container&&(this.container.visible=!e),this.view&&!e&&this.updateRequested&&this.view.requestUpdate()},c["d"]),Object(c["e"])(()=>{var e,t;return null!=(e=null==(t=this.layer)?void 0:t.opacity)?e:1},e=>{this.container&&(this.container.opacity=e)},c["d"]),Object(c["e"])(()=>this.layer&&"blendMode"in this.layer?this.layer.blendMode:"normal",e=>{this.container&&(this.container.blendMode=e)},c["d"]),Object(c["e"])(()=>this.layer&&"effect"in this.layer?this.layer.effect:null,e=>{this.container&&(this.container.effect=e)},c["d"]),Object(c["b"])(()=>this.clips,"change",()=>{this.container&&(this.container.clips=this.clips)})]),null!=(s=this.view)&&s.whenLayerView?this.view.whenLayerView(this.layer).then(e=>{e===this&&this.processAttach()},()=>{}):this.when().then(()=>{this.processAttach()},()=>{}))}destroy(){this.processDetach(),this.updateRequested=!1}get spatialReferenceSupported(){var e;const t=null==(e=this.view)?void 0:e.spatialReference;return null==t||this.supportsSpatialReference(t)}get updating(){var e;return this.spatialReferenceSupported&&(!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())||!(null==(e=this.updatingHandles)||!e.updating))}get visibleAtCurrentScale(){return this.isVisibleAtScale(this.view.scale)}processAttach(){this.isResolved()&&!this.attached&&!this.destroyed&&this.spatialReferenceSupported&&(this.attach(),this.attached=!0,this.requestUpdate())}processDetach(){this.attached&&(this.attached=!1,this.detach(),this.updateRequested=!1)}isVisibleAtScale(e){const t=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;if(!t)return!0;const{minScale:i,maxScale:s}=t;return(0===i||e<=i)&&(0===s||e>=s)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.suspended||this.view.requestUpdate())}processUpdate(e){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",e),this.updateRequested&&!this.suspended&&(this.updateRequested=!1,this.update(e))):this.updateRequested=!1}hitTest(e,t){return Promise.resolve(null)}supportsSpatialReference(e){return!0}canResume(){return!!this.spatialReferenceSupported&&!!super.canResume()&&this.visibleAtCurrentScale}getSuspendInfo(){const e=super.getSuspendInfo(),t=!this.spatialReferenceSupported,i=this.visibleAtCurrentScale;return t&&(e.spatialReferenceNotSupported=t),i&&(e.outsideScaleRange=i),e}};return Object(s["a"])([Object(o["b"])()],t.prototype,"attached",void 0),Object(s["a"])([Object(o["b"])({type:T,set(e){const t=Object(a["b"])(e,this._get("clips"),T);this._set("clips",t)}})],t.prototype,"clips",void 0),Object(s["a"])([Object(o["b"])()],t.prototype,"container",void 0),Object(s["a"])([Object(o["b"])()],t.prototype,"moving",void 0),Object(s["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"spatialReferenceSupported",null),Object(s["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"updateParameters",void 0),Object(s["a"])([Object(o["b"])()],t.prototype,"updateRequested",void 0),Object(s["a"])([Object(o["b"])()],t.prototype,"updating",null),Object(s["a"])([Object(o["b"])()],t.prototype,"view",void 0),Object(s["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"visibleAtCurrentScale",null),t=Object(s["a"])([Object(h["a"])("esri.views.2d.layers.LayerView2D")],t),t}},6722:function(e,t,i){"use strict";i.d(t,"a",(function(){return h}));var s=i("c120"),r=i("c84e"),a=i("9a02"),n=i("6f75"),c=i("ec5e");const o=(e,t)=>e.key.level-t.key.level!=0?e.key.level-t.key.level:e.key.row-t.key.row!=0?e.key.row-t.key.row:e.key.col-t.key.col;class h extends a["a"]{constructor(e){super(),this._tileInfoView=e}get requiresDedicatedFBO(){return!1}renderChildren(e){this.sortChildren(o),this.setStencilReference(e),super.renderChildren(e)}createRenderParams(e){const{state:t}=e,i=super.createRenderParams(e);return i.requiredLevel=this._tileInfoView.getClosestInfoForScale(t.scale).level,i.displayLevel=this._tileInfoView.tileInfo.scaleToZoom(t.scale),i}prepareRenderPasses(e){const t=super.prepareRenderPasses(e);return t.push(e.registerRenderPass({name:"stencil",brushes:[c["a"]],drawPhase:r["c"].DEBUG|r["c"].MAP|r["c"].HIGHLIGHT,target:()=>this.getStencilTarget()})),Object(s["a"])("esri-tiles-debug")&&t.push(e.registerRenderPass({name:"tileInfo",brushes:[n["a"]],drawPhase:r["c"].DEBUG,target:()=>this.children})),t}getStencilTarget(){return this.children}updateTransforms(e){for(const t of this.children){const i=this._tileInfoView.getTileResolution(t.key);t.setTransform(e,i)}}setStencilReference(e){let t=1;for(const i of this.children)i.stencilRef=t++}}},"6c7a":function(e,t,i){"use strict";i.d(t,"a",(function(){return h}));var s=i("a4ee"),r=i("e92d"),a=i("f4cc"),n=i("477c"),c=i("59b2"),o=(i("b50f"),i("c120"),i("cea0"),i("d386"));const h=e=>{let t=class extends e{initialize(){this.handles.add(Object(n["b"])(()=>this.layer,"refresh",e=>{this.doRefresh(e.dataChanged).catch(e=>{Object(a["m"])(e)||r["a"].getLogger(this.declaredClass).error(e)})}),"RefreshableLayerView")}};return Object(s["a"])([Object(c["b"])()],t.prototype,"layer",void 0),t=Object(s["a"])([Object(o["a"])("esri.layers.mixins.RefreshableLayerView")],t),t}},"894c":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var s=i("b2b2");class r{constructor(e,t,i){this.pixelBlock=e,this.extent=t,this.originalPixelBlock=i}get width(){return Object(s["k"])(this.pixelBlock)?this.pixelBlock.width:0}get height(){return Object(s["k"])(this.pixelBlock)?this.pixelBlock.height:0}render(e){const t=this.pixelBlock;if(Object(s["j"])(t))return;const i=this.filter({pixelBlock:t});if(Object(s["j"])(i.pixelBlock))return;const r=i.pixelBlock.getAsRGBA(),a=e.createImageData(i.pixelBlock.width,i.pixelBlock.height);a.data.set(r),e.putImageData(a,0,0)}getRenderedRasterPixels(){const e=this.filter({pixelBlock:this.pixelBlock});return Object(s["j"])(e.pixelBlock)?null:{width:e.pixelBlock.width,height:e.pixelBlock.height,renderedRasterPixels:new Uint8Array(e.pixelBlock.getAsRGBA().buffer)}}}},"9a02":function(e,t,i){"use strict";i.d(t,"a",(function(){return S}));i("c120");var s=i("b2b2"),r=i("8c71"),a=i("3b1a"),n=i("00c0"),c=i("ce50"),o=i("e92d"),h=i("7c4b"),l=i("9812"),u=i("3349"),d=i("02f1"),p=i("6655"),f=i("8152"),b=i("d114"),y=i("7ce4"),m=i("d17d");const g=o["a"].getLogger("esri.views.2d.engine.webgl.Mesh2D"),w=e=>{switch(e.BYTES_PER_ELEMENT){case 1:return m["k"].UNSIGNED_BYTE;case 2:return m["k"].UNSIGNED_SHORT;case 4:return m["k"].UNSIGNED_INT;default:throw new c["a"]("Cannot get DataType of array")}},v=(e,t,i,s)=>{let r=0;for(let a=1;a0:r<0},_=({coords:e,lengths:t},i)=>{const s=[];for(let r=0,a=0;r({...i,[s]:y["a"].createVertex(e,t,this.vertices[s])}),{})),this._cache.vertexBuffers}}var j=i("0fa6");const x=o["a"].getLogger("esri.views.2d.engine.webgl.ClippingInfo"),R=e=>parseFloat(e)/100;class I extends h["a"]{constructor(e,t){super(),this._clip=t,this._cache={},this.stage=e,this._handle=t.watch("version",()=>this._invalidate()),this.ready()}static fromClipArea(e,t){return new I(e,t)}_destroyGL(){Object(s["k"])(this._cache.mesh)&&(this._cache.mesh.destroy(),this._cache.mesh=null),Object(s["k"])(this._cache.vao)&&(this._cache.vao.dispose(),this._cache.vao=null)}destroy(){this._destroyGL(),this._handle.remove()}getVAO(e,t,i,r){const[a,n]=t.size;if("geometry"!==this._clip.type&&this._lastWidth===a&&this._lastHeight===n||(this._lastWidth=a,this._lastHeight=n,this._destroyGL()),Object(s["j"])(this._cache.vao)){const s=this._createMesh(t,this._clip),a=s.getIndexBuffer(e),n=s.getVertexBuffers(e);this._cache.mesh=s,this._cache.vao=new j["a"](e,i,r,n,a)}return this._cache.vao}_createTransforms(){return{dvs:Object(r["b"])()}}_invalidate(){this._destroyGL(),this.requestRender()}_createScreenRect(e,t){const[i,s]=e.size,r="string"==typeof t.left?R(t.left)*i:t.left,a="string"==typeof t.right?R(t.right)*i:t.right,n="string"==typeof t.top?R(t.top)*s:t.top,c="string"==typeof t.bottom?R(t.bottom)*s:t.bottom,o=r,h=n;return{x:o,y:h,width:Math.max(i-a-o,0),height:Math.max(s-c-h,0)}}_createMesh(e,t){switch(t.type){case"rect":return O.fromRect(this._createScreenRect(e,t));case"path":return O.fromPath(t);case"geometry":return O.fromGeometry(e,t);default:return x.error(new c["a"]("mapview-bad-type","Unable to create ClippingInfo mesh from clip of type: ${clip.type}")),O.fromRect({x:0,y:0,width:1,height:1})}}}var T=i("c84e");class S extends n["a"]{constructor(){super(...arguments),this.name=this.constructor.name}set clips(e){this._clips=e,this.children.forEach(t=>t.clips=e),this._updateClippingInfo()}_createTransforms(){return{dvs:Object(r["b"])()}}doRender(e){const t=this.createRenderParams(e),{painter:i,globalOpacity:s,profiler:r,drawPhase:a}=t,n=a===T["c"].LABEL||a===T["c"].HIGHLIGHT?1:s*this.computedOpacity;r.recordContainerStart(this.name),i.beforeRenderLayer(t,this._clippingInfos?255:0,n),this.updateTransforms(e.state),this.renderChildren(t),i.compositeLayer(t,n),r.recordContainerEnd()}renderChildren(e){Object(s["j"])(this._renderPasses)&&(this._renderPasses=this.prepareRenderPasses(e.painter));for(const i of this.children)i.beforeRender(e);for(const i of this._renderPasses)try{i.render(e)}catch(t){}for(const i of this.children)i.afterRender(e)}createRenderParams(e){return e.requireFBO=this.requiresDedicatedFBO,e}prepareRenderPasses(e){return[e.registerRenderPass({name:"clip",brushes:[a["a"].clip],target:()=>this._clippingInfos,drawPhase:T["c"].MAP|T["c"].LABEL|T["c"].LABEL_ALPHA|T["c"].DEBUG|T["c"].HIGHLIGHT})]}updateTransforms(e){for(const t of this.children)t.setTransform(e)}onAttach(){super.onAttach(),this._updateClippingInfo()}onDetach(){super.onDetach(),this._updateClippingInfo()}_updateClippingInfo(){if(Object(s["k"])(this._clippingInfos)&&(this._clippingInfos.forEach(e=>e.destroy()),this._clippingInfos=null),!this.stage)return;const e=this._clips;Object(s["k"])(e)&&e.length&&(this._clippingInfos=e.items.map(e=>I.fromClipArea(this.stage,e))),this.requestRender()}}},c73a:function(e,t,i){"use strict";i.d(t,"a",(function(){return b}));var s=i("b2b2"),r=i("1c92"),a=i("8c71"),n=i("738e"),c=i("7c4b"),o=i("894c"),h=i("d17d"),l=i("a1ff");function u(e){return e&&"render"in e}function d(e){return e&&!("render"in e)}function p(e){const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,e.render(t.getContext("2d")),t}function f(e,t,i){const s={target:h["A"].TEXTURE_2D,pixelFormat:h["p"].RGBA,internalFormat:h["p"].RGBA,dataType:h["q"].UNSIGNED_BYTE,wrapMode:h["B"].CLAMP_TO_EDGE};return t&&i&&(s.width=t,s.height=i),new l["a"](e,s)}class b extends c["a"]{constructor(e=null,t,i=!0){super(),this.requestRenderOnSourceChangedEnabled=i,this._textureInvalidated=!0,this.stencilRef=0,this.coordScale=[1,1],this._height=void 0,this.pixelRatio=1,this.resolution=0,this.rotation=0,this._source=null,this._width=void 0,this.x=0,this.y=0,this.blendFunction=t,this.source=e,this.requestRender=this.requestRender.bind(this)}destroy(){this._texture&&(this._texture.dispose(),this._texture=null)}get isSourceScaled(){return this.width!==this.sourceWidth||this.height!==this.sourceHeight}get height(){return void 0!==this._height?this._height:this.sourceHeight}set height(e){this._height=e}get source(){return this._source}set source(e){this._source=e,this.invalidateTexture()}get sourceHeight(){return this._source instanceof HTMLImageElement?this._source.naturalHeight:this._source.height}get sourceWidth(){return this._source instanceof HTMLImageElement?this._source.naturalWidth:this._source.width}get width(){return void 0!==this._width?this._width:this.sourceWidth}set width(e){this._width=e}beforeRender(e){super.beforeRender(e),this.updateTexture(e.context)}invalidateTexture(){this._textureInvalidated||(this._textureInvalidated=!0,this.requestRenderOnSourceChangedEnabled&&this.requestRender())}_createTransforms(){return{dvs:Object(a["b"])()}}setTransform(e){const t=Object(r["b"])(this.transforms.dvs),[i,s]=e.toScreenNoRotation([0,0],[this.x,this.y]),a=this.resolution/this.pixelRatio/e.resolution,c=a*this.width,o=a*this.height,h=Math.PI*this.rotation/180;Object(r["c"])(t,t,Object(n["b"])(i,s)),Object(r["c"])(t,t,Object(n["b"])(c/2,o/2)),Object(r["n"])(t,t,-h),Object(r["c"])(t,t,Object(n["b"])(-c/2,-o/2)),Object(r["j"])(t,t,Object(n["b"])(c,o)),Object(r["l"])(this.transforms.dvs,e.displayViewMat3,t)}setSamplingProfile(e){this._texture&&(e.mips&&!this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._texture.setSamplingMode(e.samplingMode))}bind(e,t){this._texture&&e.bindTexture(this._texture,t)}updateTexture(e){var t;if(!this.stage)return null==(t=this._texture)||t.dispose(),void(this._texture=null);if(!this._textureInvalidated)return;this._textureInvalidated=!1,this._texture||(this.source?this._texture=f(e,this.sourceWidth,this.sourceHeight):this._texture=f(e));const i=this.source;if(i){if(this._texture.resize(this.sourceWidth,this.sourceHeight),u(i))if(i instanceof o["a"]){const e=i.getRenderedRasterPixels();this._texture.setData(Object(s["k"])(e)?e.renderedRasterPixels:null)}else this._texture.setData(p(i));else d(i)&&this._texture.setData(i);this.ready()}else this._texture.setData(null)}onAttach(){this.invalidateTexture()}onDetach(){this.invalidateTexture()}}},d81b:function(e,t,i){"use strict";function s(e){return e instanceof HTMLImageElement?e.naturalWidth:e.width}function r(e){return e instanceof HTMLImageElement?e.naturalHeight:e.height}function a(e,t,i,a){if(i.level===a.level)return t;const c=e.tileInfo.size,o=e.getTileResolution(i.level),h=e.getTileResolution(a.level);let l=e.getLODInfoAt(a.level);const u=l.getXForColumn(a.col),d=l.getYForRow(a.row);l=e.getLODInfoAt(i.level);const p=l.getXForColumn(i.col),f=l.getYForRow(i.row),b=s(t)/c[0],y=r(t)/c[1],m=Math.round(b*((u-p)/o)),g=Math.round(y*(-(d-f)/o)),w=Math.round(b*c[0]*(h/o)),v=Math.round(y*c[1]*(h/o)),_=n(c);return _.getContext("2d").drawImage(t,m,g,w,v,0,0,c[0],c[1]),_}function n(e){const t=document.createElement("canvas");return[t.width,t.height]=e,t}i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return a}))},e80c:function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));var s=i("9180"),r=i("8c71"),a=i("c73a"),n=i("e4b1");class c extends n["a"]{constructor(e,t,i,s,r,n=null){super(e,t,i,s,r),this.bitmap=new a["a"](n,"standard",!1),this.bitmap.coordScale=[s,r],this.bitmap.once("isReady",()=>this.ready())}destroy(){super.destroy(),this.bitmap.destroy()}beforeRender(e){super.beforeRender(e),this.bitmap.beforeRender(e)}afterRender(e){super.afterRender(e),this.bitmap.afterRender(e)}set stencilRef(e){this.bitmap.stencilRef=e}get stencilRef(){return this.bitmap.stencilRef}_createTransforms(){return{dvs:Object(r["b"])(),tileMat3:Object(r["b"])()}}setTransform(e,t){super.setTransform(e,t),this.bitmap.transforms.dvs=this.transforms.dvs}onAttach(){this.bitmap.stage=this.stage}onDetach(){this.bitmap&&(this.bitmap.stage=null)}}var o=i("3b1a"),h=i("c84e"),l=i("6722");class u extends l["a"]{get requiresDedicatedFBO(){return this.children.some(e=>"additive"===e.bitmap.blendFunction)}createTile(e){const t=this._tileInfoView.getTileBounds(Object(s["l"])(),e),[i,r]=this._tileInfoView.tileInfo.size;return new c(e,t[0],t[3],i,r)}prepareRenderPasses(e){const t=e.registerRenderPass({name:"bitmap (tile)",brushes:[o["a"].bitmap],target:()=>this.children.map(e=>e.bitmap),drawPhase:h["c"].MAP});return[...super.prepareRenderPasses(e),t]}doRender(e){this.visible&&e.drawPhase===h["c"].MAP&&super.doRender(e)}}},e94b:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));i("e06a");var s=i("b2b2"),r=i("8048"),a=(i("536f"),i("3af1"));function n(e,t,i,n=new a["a"]){let c;if("2d"===i.type)c=t*i.resolution;else if("3d"===i.type){const a=i.overlayPixelSizeInMapUnits(e),n=i.basemapSpatialReference;c=Object(s["k"])(n)&&!n.equals(i.spatialReference)?Object(r["f"])(n)/Object(r["f"])(i.spatialReference):t*a}const o=e.x-c,h=e.y-c,l=e.x+c,u=e.y+c,{spatialReference:d}=i;return n.xmin=Math.min(o,l),n.ymin=Math.min(h,u),n.xmax=Math.max(o,l),n.ymax=Math.max(h,u),n.spatialReference=d,n}new a["a"]}}]); //# sourceMappingURL=chunk-2f44d502.15bd50a2.js.map