// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built require({cache:{"esri/views/2d/layers/BitmapTileLayerView2D":function(){define("exports ../../../chunks/tslib.es6 ../../../core/Logger ../../../core/has ../../../core/RandomLCG ../../../core/Error ../../../core/accessorSupport/decorators/subclass ../engine/BitmapTileContainer".split(" "),function(d,f,g,c,a,b,e,l){d.BitmapTileLayerView2D=m=>{m=class extends m{attach(){this.view.timeline.record(`${this.layer.title} (BitmapTileLayer) Attach`);this._bitmapView=new l.BitmapTileContainer(this._tileInfoView); this.container.addChild(this._bitmapView)}detach(){this.container.removeChild(this._bitmapView);this._bitmapView?.removeAllChildren();this._bitmapView=null}};return m=f.__decorate([e.subclass("esri.views.2d.layers.BitmapTileLayerView2D")],m)};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/layers/LayerView2D":function(){define("exports ../../../chunks/tslib.es6 ../../../core/Collection ../../../core/collectionUtils ../../../core/Error ../../../core/reactiveUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../engine/Container ../support/HighlightOptions ../../layers/support/ClipRect ../../layers/support/Geometry ../../layers/support/Path ../../support/layerViewUtils".split(" "), function(d,f,g,c,a,b,e,l,m,h,k,t,x,w,z,G,P){const K=g.ofType({key:"type",base:null,typeMap:{rect:w,path:G,geometry:z}});d.LayerView2DMixin=H=>{H=class extends H{constructor(){super(...arguments);this.attached=!1;this.clips=new K;this.highlightOptions=null;this.lastUpdateId=-1;this.updateRequested=this.moving=!1;this._visibleAtCurrentScale=!0}initialize(){const D=this.view?.spatialReferenceLocked??!0;this.view?.spatialReference&&D&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new 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 t.Container),this.container.fadeTransitionEnabled=!0,this.container.visible=!1,this.container.endTransitions(),this.addHandles([b.watch(()=>this.suspended,A=>{this.container&&(this.container.visible=!A)},b.syncAndInitial),b.watch(()=>this.updateSuspended,A=>{this.view&&!A&&this.updateRequested&&this.view.requestUpdate()},b.syncAndInitial),b.watch(()=>this.layer?.opacity?? 1,A=>{this.container&&(this.container.opacity=A)},b.syncAndInitial),b.watch(()=>this.layer&&"blendMode"in this.layer?this.layer.blendMode:"normal",A=>{this.container&&(this.container.blendMode=A)},b.syncAndInitial),b.watch(()=>this.layer&&"effect"in this.layer?this.layer.effect:null,A=>{this.container&&(this.container.effect=A)},b.syncAndInitial),b.watch(()=>this.highlightOptions,A=>this.container.highlightOptions=A,b.syncAndInitial),b.on(()=>this.clips,"change",()=>{this.container&&(this.container.clips= this.clips)},b.syncAndInitial),b.watch(()=>({scale:this.view?.scale,scaleRange:this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null}),({scale:A,scaleRange:Q})=>{A=P.isInEffectiveScaleRange(Q,A);A!==this._visibleAtCurrentScale&&(this._visibleAtCurrentScale=A)},b.syncAndInitial)],"constructor"),this.view?.whenLayerView?this.view.whenLayerView(this.layer).then(A=>{A===this&&this.processAttach()},()=>{}):this.when().then(()=>{this.processAttach()},()=>{}))}destroy(){this.processDetach(); this.updateRequested=!1}get spatialReferenceSupported(){const D=this.view?.spatialReference;return null==D||this.supportsSpatialReference(D)}get updating(){return this.spatialReferenceSupported&&(!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())||!!this._updatingHandles?.updating)}get visibleAtCurrentScale(){return this._visibleAtCurrentScale}processAttach(){this.isResolved()&&!this.attached&&!this.destroyed&&this.spatialReferenceSupported&&(this.attach(),this.attached=!0, this.requestUpdate())}processDetach(){this.attached&&(this.attached=!1,this.removeHandles("attach"),this.detach(),this.updateRequested=!1)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.updateSuspended||this.view.requestUpdate())}processUpdate(D){this.isFulfilled()&&!this.isResolved()?this.updateRequested=!1:(this._set("updateParameters",D),this.updateRequested&&!this.updateSuspended&&(this.updateRequested=!1,this.update(D)))}hitTest(D,A){return Promise.resolve(null)}supportsSpatialReference(D){return!0}canResume(){return this.spatialReferenceSupported? super.canResume()?this.visibleAtCurrentScale:!1:!1}getSuspendInfo(){const D=super.getSuspendInfo(),A=!this.spatialReferenceSupported;A&&(D.spatialReferenceNotSupported=A);return D}addAttachHandles(D){this.addHandles(D,"attach")}};f.__decorate([e.property()],H.prototype,"attached",void 0);f.__decorate([e.property({type:K,set(D){D=c.referenceSetter(D,this._get("clips"),K);this._set("clips",D)}})],H.prototype,"clips",void 0);f.__decorate([e.property()],H.prototype,"container",void 0);f.__decorate([e.property({type:x})], H.prototype,"highlightOptions",void 0);f.__decorate([e.property()],H.prototype,"moving",void 0);f.__decorate([e.property({readOnly:!0})],H.prototype,"spatialReferenceSupported",null);f.__decorate([e.property({readOnly:!0})],H.prototype,"updateParameters",void 0);f.__decorate([e.property()],H.prototype,"updateRequested",void 0);f.__decorate([e.property()],H.prototype,"updating",null);f.__decorate([e.property()],H.prototype,"view",void 0);f.__decorate([e.property()],H.prototype,"_visibleAtCurrentScale", void 0);f.__decorate([e.property({readOnly:!0})],H.prototype,"visibleAtCurrentScale",null);return H=f.__decorate([k.subclass("esri.views.2d.layers.LayerView2D")],H)};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/views/layers/support/ClipRect":function(){define("../../../chunks/tslib.es6 ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ./ClipArea".split(" "),function(d, f,g,c,a,b,e){var l;g=l=class extends e{constructor(m){super(m);this.type="rect";this.bottom=this.top=this.right=this.left=null}clone(){return new l({left:this.left,right:this.right,top:this.top,bottom:this.bottom})}commitVersionProperties(){this.commitProperty("left");this.commitProperty("right");this.commitProperty("top");this.commitProperty("bottom")}};d.__decorate([f.property({type:[Number,String],json:{write:!0}})],g.prototype,"left",void 0);d.__decorate([f.property({type:[Number,String],json:{write:!0}})], g.prototype,"right",void 0);d.__decorate([f.property({type:[Number,String],json:{write:!0}})],g.prototype,"top",void 0);d.__decorate([f.property({type:[Number,String],json:{write:!0}})],g.prototype,"bottom",void 0);return g=l=d.__decorate([b.subclass("esri.views.layers.support.ClipRect")],g)})},"esri/views/layers/support/ClipArea":function(){define("../../../chunks/tslib.es6 ../../../core/JSONSupport ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass".split(" "), function(d,f,g,c,a,b,e){f=class extends f.JSONSupport{get version(){this.commitVersionProperties();return(this._get("version")||0)+1}};d.__decorate([g.property({readOnly:!0})],f.prototype,"version",null);return f=d.__decorate([e.subclass("esri.views.layers.support.ClipArea")],f)})},"esri/views/layers/support/Geometry":function(){define("../../../chunks/tslib.es6 ../../../geometry ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../geometry/Geometry ../../../geometry/support/jsonUtils ./ClipArea ../../../geometry/Extent ../../../geometry/Polygon".split(" "), function(d,f,g,c,a,b,e,l,m,h,k,t){var x;f={base:l,key:"type",typeMap:{extent:k,polygon:t}};h=x=class extends h{constructor(w){super(w);this.type="geometry";this.geometry=null}clone(){return new x({geometry:this.geometry?.clone()??null})}commitVersionProperties(){this.commitProperty("geometry")}};d.__decorate([g.property({types:f,json:{read:m.fromJSON,write:!0}})],h.prototype,"geometry",void 0);return h=x=d.__decorate([e.subclass("esri.views.layers.support.Geometry")],h)})},"esri/views/layers/support/Path":function(){define("../../../chunks/tslib.es6 ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/Logger ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ./ClipArea".split(" "), function(d,f,g,c,a,b,e){g=class extends e{constructor(l){super(l);this.type="path";this.path=[]}commitVersionProperties(){this.commitProperty("path")}};d.__decorate([f.property({type:[[[Number]]],json:{write:!0}})],g.prototype,"path",void 0);return g=d.__decorate([b.subclass("esri.views.layers.support.Path")],g)})},"esri/views/2d/layers/graphics/HighlightGraphicContainer":function(){define("../../../../chunks/tslib.es6 ../../../../core/Logger ../../../../core/has ../../../../core/RandomLCG ../../../../core/Error ../../../../core/accessorSupport/decorators/subclass ../../engine/webgl/enums ./AGraphicContainer ../support/util".split(" "), function(d,f,g,c,a,b,e,l,m){f=class extends l.AGraphicContainer{get hasHighlight(){return this.children.some(h=>h.hasData)}renderChildren(h){this.attributeView.update();h.drawPhase===e.WGLDrawPhase.HIGHLIGHT&&this.children.some(k=>k.hasData)&&(super.renderChildren(h),h.context.setColorMask(!0,!0,!0,!0),m.renderHighlight(h,!0,k=>{this._renderChildren(k,e.FeatureSelection.All)}))}};return f=d.__decorate([b.subclass("esri.views.2d.layers.graphics.HighlightGraphicContainer")],f)})},"esri/views/2d/layers/support/imageUtils":function(){define(["exports"], function(d){function f(g){const c=document.createElement("canvas");[c.width,c.height]=g;return c}d.createBlankImage=f;d.resampleImage=function(g,c,a,b){if(a.level===b.level)return c;const e=g.tileInfo.size;var l=g.getTileResolution(a.level),m=g.getTileResolution(b.level),h=g.getLODInfoAt(b.level),k=h.getXForColumn(b.col);b=h.getYForRow(b.row);h=g.getLODInfoAt(a.level);g=h.getXForColumn(a.col);const t=h.getYForRow(a.row);h=(c instanceof HTMLImageElement?c.naturalWidth:c.width)/e[0];a=(c instanceof HTMLImageElement?c.naturalHeight:c.height)/e[1];k=Math.round((k-g)/l*h);b=Math.round(-(b-t)/l*a);g=Math.round(m/l*e[0]*h);l=Math.round(m/l*e[1]*a);m=f(e);m.getContext("2d").drawImage(c,k,b,g,l,0,0,e[0],e[1]);return m};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/views/layers/RefreshableLayerView":function(){define("../../chunks/tslib.es6 ../../core/Logger ../../core/promiseUtils ../../core/reactiveUtils ../../core/has ../../core/RandomLCG ../../core/Error ../../core/accessorSupport/decorators/subclass".split(" "), function(d,f,g,c,a,b,e,l){return m=>{m=class extends m{initialize(){this.addHandles(c.on(()=>this.layer,"refresh",h=>{this.doRefresh(h.dataChanged).catch(k=>{g.isAbortError(k)||f.getLogger(this).error(k)})}),"RefreshableLayerView")}};return m=d.__decorate([l.subclass("esri.views.layers.RefreshableLayerView")],m)}})},"esri/views/layers/support/MapServiceLayerViewHelper":function(){define("require exports ../../../chunks/tslib.es6 ../../../Graphic ../../../core/Accessor ../../../core/arrayUtils ../../../core/Collection ../../../core/Error ../../../core/handleUtils ../../../core/has ../../../core/MapUtils ../../../core/promiseUtils ../../../core/reactiveUtils ../../../core/sql ../../../core/unitUtils ../../../core/accessorSupport/decorators/property ../../../core/Logger ../../../core/accessorSupport/decorators/subclass ../../../geometry/Extent ../../../geometry/support/scaleUtils ../../../layers/support/fieldUtils ../../../layers/support/floorFilterUtils ../../../renderers/support/clickToleranceUtils ../../../rest/identify ../../../rest/support/IdentifyParameters ../../../support/arcadeOnDemand ../../../symbols/SimpleMarkerSymbol ./popupUtils".split(" "), function(d,f,g,c,a,b,e,l,m,h,k,t,x,w,z,G,P,K,H,D,A,Q,N,B,R,S,T,Z){function U(n,p,u){const C=[];if(!n)return C;const y=v=>{var q=0===v.minScale||p<=v.minScale;const E=0===v.maxScale||p>=v.maxScale;v.visible&&q&&E&&(v.sublayers?v.sublayers.forEach(y):v.popupEnabled&&(q=Z.getFetchPopupTemplate(v,{...u,defaultPopupTemplateEnabled:!1}),null!=q&&C.unshift({sublayer:v,popupTemplate:q})))};n.map(y);return C}function V(n){return n.expressionInfos?.length||Array.isArray(n.content)&&n.content.some(p=>"expression"=== p.type)?S.loadArcade():Promise.resolve()}async function aa(n,p){if(n.capabilities?.operations?.supportsQuery)return!0;try{return await Promise.any(p.map(({sublayer:u})=>u.load().then(()=>u.capabilities.operations.supportsQuery)))}catch{return!1}}async function da(n,p,u){const C=n.renderer;C&&"defaultSymbol"in C&&!C.defaultSymbol&&(p=C.valueExpression?await Promise.all(p.map(y=>C.getSymbolAsync(y,u).then(v=>v?y:null))).then(y=>y.filter(v=>null!=v)):p.filter(y=>null!=C.getSymbol(y)));return p}let W= null;f.MapServiceLayerViewHelper=class extends a{constructor(n){super(n);this._featuresResolutions=new WeakMap;this.highlightGraphicUpdated=this.highlightGraphics=null;this.updateHighlightedFeatures=t.debounce(async p=>{this.destroyed||this.updatingHandles.addPromise(this._updateHighlightedFeaturesGeometries(p).catch(()=>{}))})}initialize(){const n=p=>{this.updatingHandles.addPromise(this._updateHighlightedFeaturesSymbols(p).catch(()=>{}));this.updateHighlightedFeatures(this._highlightGeometriesResolution)}; this.addHandles([x.on(()=>this.highlightGraphics,"change",p=>n(p.added),{onListenerAdd:p=>n(p)})])}async fetchPopupFeaturesAtLocation(n,p){const {layerView:{layer:u,view:{scale:C}}}=this;if(!n)throw new l("fetchPopupFeatures:invalid-area","Nothing to fetch without area",{layer:u});const y=U(u.sublayers,C,p);if(!y.length)return[];const v=await aa(u,y);if(!((u.capabilities?.operations?.supportsIdentify??!0)&&10.5<=u.version||v))throw new l("fetchPopupFeatures:not-supported","query operation is disabled for this service", {layer:u});return v?this._fetchPopupFeaturesUsingQueries(n,y,p):this._fetchPopupFeaturesUsingIdentify(n,y,p)}clearHighlights(){this.highlightGraphics?.removeAll()}highlight(n){const p=this.highlightGraphics;if(!p)return m.makeHandle();let u=null;n instanceof c?u=[n]:e.isCollection(n)&&0p.removeMany(u??[]))}async _updateHighlightedFeaturesSymbols(n){const {layerView:{view:p},highlightGraphics:u,highlightGraphicUpdated:C}=this;if(u&&C)for(const y of n){const v=y.sourceLayer&&"renderer"in y.sourceLayer&&y.sourceLayer.renderer;y.sourceLayer&&"geometryType"in y.sourceLayer&&"point"===y.sourceLayer.geometryType&&v&&"getSymbolAsync"in v&&v.getSymbolAsync(y).then(async q=>{q||=new T;let E=null;const I="visualVariables"in v?v.visualVariables?.find(J=> "size"===J.type):void 0;I&&(W||(W=(await new Promise((J,L)=>d(["../../../renderers/visualVariables/support/visualVariableUtils"],J,L))).getSize),E=W(I,y,{view:p.type,scale:p.scale,shape:"simple-marker"===q.type?q.style:null}));E||="width"in q&&"height"in q&&null!=q.width&&null!=q.height?Math.max(q.width,q.height):"size"in q?q.size:16;u.includes(y)&&(y.symbol=new T({style:"square",size:E,xoffset:"xoffset"in q?q.xoffset:0,yoffset:"yoffset"in q?q.yoffset:0}),C(y,"symbol"),y.visible=!0)})}}async _updateHighlightedFeaturesGeometries(n){const {layerView:{layer:p, view:u},highlightGraphics:C,highlightGraphicUpdated:y}=this;this._highlightGeometriesResolution=n;if(y&&C?.length&&p.capabilities.operations.supportsQuery){var v=this._getTargetResolution(n);n=new Map;for(var q of C)(!this._featuresResolutions.has(q)||this._featuresResolutions.get(q)>v)&&k.getOrCreateMapValue(n,q.sourceLayer,()=>new Map).set(q.getObjectId(),q);q=Array.from(n,([E,I])=>{const J=E.createQuery();J.objectIds=[...I.keys()];J.outFields=[E.objectIdField];J.returnGeometry=!0;J.maxAllowableOffset= v;J.outSpatialReference=u.spatialReference;return E.queryFeatures(J)});q=await Promise.all(q);if(!this.destroyed)for(const {features:E}of q)for(const I of E)(q=n.get(I.sourceLayer).get(I.getObjectId()))&&C.includes(q)&&(q.geometry=I.geometry,y(q,"geometry"),this._featuresResolutions.set(q,v))}}_getTargetResolution(n){const p=n*z.getMetersPerUnitForSR(this.layerView.view.spatialReference),u=p/16;return 10>=u?0:n/p*u}async _fetchPopupFeaturesUsingIdentify(n,p,u){n=await this._createIdentifyParameters(n, p,u);if(null==n)return[];({results:u}=await B.identify(this.layerView.layer.parsedUrl,n,u));return u.map(C=>C.feature)}async _createIdentifyParameters(n,p,u){const {floors:C,layer:y,timeExtent:v,view:{spatialReference:q,scale:E}}=this.layerView;if(!p.length)return null;await Promise.all(p.map(({sublayer:X})=>X.load(u).catch(()=>{})));p=Math.min(h("mapservice-popup-identify-max-tolerance"),y.allSublayers.reduce((X,ba)=>ba.renderer?N.calculateTolerance({renderer:ba.renderer,pointerType:u?.pointerType}): X,2));var I=this.createFetchPopupFeaturesQueryGeometry(n,p);const J=D.getResolutionForScale(E,q),L=Math.round(I.width/J);I=new H({xmin:I.center.x-J*L,ymin:I.center.y-J*L,xmax:I.center.x+J*L,ymax:I.center.y+J*L,spatialReference:I.spatialReference});return new R({floors:C,gdbVersion:"gdbVersion"in y?y.gdbVersion:void 0,geometry:n,height:L,layerOption:"popup",mapExtent:I,returnGeometry:!0,spatialReference:q,sublayers:y.sublayers,timeExtent:v,tolerance:p,width:L})}async _fetchPopupFeaturesUsingQueries(n, p,u){const {layerView:{floors:C,timeExtent:y}}=this;p=p.map(async({sublayer:v,popupTemplate:q})=>{await v.load(u).catch(()=>{});if(v.capabilities&&!v.capabilities.operations.supportsQuery)return[];var E=v.createQuery(),I=N.calculateTolerance({renderer:v.renderer,pointerType:u?.pointerType}),J=this.createFetchPopupFeaturesQueryGeometry(n,I),L=new Set;const [X]=await Promise.all([Z.getRequiredFields(v,q),v.renderer?.collectRequiredFields(L,v.fieldsIndex)]);t.throwIfAborted(u);A.collectFields(L,v.fieldsIndex, X);L=Array.from(L).sort();E.geometry=J;E.outFields=L;E.timeExtent=y;L=Q.getLayerFloorFilterClause(C,v);E.where=w.sqlAnd(E.where,L);I=this._getTargetResolution(J.width/I);J=await V(q);t.throwIfAborted(u);q="point"===v.geometryType||J&&J.arcadeUtils.hasGeometryOperations(q);q||(E.maxAllowableOffset=I);({features:E}=await v.queryFeatures(E,u));q=q?0:I;E=await da(v,E,u);for(const ba of E)this._featuresResolutions.set(ba,q);return E});return(await Promise.allSettled(p)).reduce((v,q)=>"fulfilled"===q.status? [...v,...q.value]:v,[]).filter(b.isSome)}};g.__decorate([G.property({constructOnly:!0})],f.MapServiceLayerViewHelper.prototype,"createFetchPopupFeaturesQueryGeometry",void 0);g.__decorate([G.property({constructOnly:!0})],f.MapServiceLayerViewHelper.prototype,"layerView",void 0);g.__decorate([G.property({constructOnly:!0})],f.MapServiceLayerViewHelper.prototype,"highlightGraphics",void 0);g.__decorate([G.property({constructOnly:!0})],f.MapServiceLayerViewHelper.prototype,"highlightGraphicUpdated", void 0);g.__decorate([G.property({constructOnly:!0})],f.MapServiceLayerViewHelper.prototype,"updatingHandles",void 0);f.MapServiceLayerViewHelper=g.__decorate([K.subclass("esri.views.layers.support.MapServiceLayerViewHelper")],f.MapServiceLayerViewHelper);f.collectPopupProviders=U;f.isMapServiceLayerView=function(n,p){return"tile"===p.type||"map-image"===p.type};Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/scaleUtils":function(){define(["exports","../../core/mathUtils", "../../core/unitUtils"],function(d,f,g){function c(a,b){b=g.getMetersPerUnitForSR(b);return a/(b*g.inchesPerMeter*96)}d.getExtentForScale=function(a,b){const e=a.extent;a=a.width-(a.padding?a.padding.left+a.padding.right:0);b=c(b,e.spatialReference);return e.clone().expand(b*a/e.width)};d.getResolutionForScale=c;d.getResolutionInMetersForScale=function(a){return a/(96*g.inchesPerMeter)};d.getScale=function(a,b){b=b||a.extent;a=a.width;const e=g.getMetersPerUnitForSR(b?.spatialReference);return b&& a?b.width/a*e*g.inchesPerMeter*96:0};d.getScaleForResolution=function(a,b){b=g.getMetersPerUnitForSR(b);return a*b*g.inchesPerMeter*96};d.isInScaleRange=function(a,b,e){if(b=0===b||f.floatEqualAbsolute(a,b)||ae;return b};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/layers/support/floorFilterUtils":function(){define(["exports"],function(d){function f(g,c){if(!g?.length)return null;g=g.filter(a=>""!==a).map(a=>`'${a}'`);g.push("''"); return`${c} IN (${g.join(",")}) OR ${c} IS NULL`}d.getFloorFilterClause=function(g){const c=g.layer;return"floorInfo"in c&&c.floorInfo?.floorField&&"floors"in g.view?f(g.view.floors,c.floorInfo.floorField):null};d.getLayerFloorFilterClause=function(g,c){return"floorInfo"in c&&c.floorInfo?.floorField?f(g,c.floorInfo.floorField):null};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/renderers/support/clickToleranceUtils":function(){define(["exports"],function(d){function f(a,b){return b? "xoffset"in b&&b.xoffset?Math.max(a,Math.abs(b.xoffset)):"yoffset"in b&&b.yoffset?Math.max(a,Math.abs(b.yoffset||0)):a:a}function g(a,b){if("number"===typeof a)return a;if(a?.stops?.length){a=a.stops;let e=b=0;for(let l=0;l"size"===m.type).map(m=>{const {maxSize:h,minSize:k}=m;return(g(h,a)+g(k,a))/2});let e=0;const l=b.length;if(0===l)return a;for(let m=0;m{e=f(e,l.symbol)});return e}if("class-breaks"===b.type){let e=a;b.classBreakInfos.forEach(l=>{e=f(e,l.symbol)});return e}return a};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/rest/identify":function(){define("exports ../request ../geometry/support/normalizeUtils ./utils ./operations/identify ./support/IdentifyParameters ./support/IdentifyResult".split(" "), function(d,f,g,c,a,b,e){function l(k){k=k.data;k.results=k.results||[];k.exceededTransferLimit=!!k.exceededTransferLimit;k.results=k.results.map(t=>e.fromJSON(t));return k}function m(k){return k=b.from(k)}function h(k,t){function x(z){w.set(z.id,z);z.sublayers&&z.sublayers.forEach(x)}if(!t?.length)return k;const w=new Map;t.forEach(x);for(const z of k.results)z.feature.sourceLayer=w.get(z.layerId);return k}d.identify=async function(k,t,x){t=m(t);const w=t.geometry?[t.geometry]:[],z=c.parseUrl(k); z.path+="/identify";return g.normalizeCentralMeridian(w).then(G=>{G=a.identifyToIdentifyRESTParameters(t,{geometry:G?.[0]});G=c.encode({...z.query,f:"json",...G});G=c.asValidOptions(G,x);return f(z.path,G).then(l).then(P=>h(P,t.sublayers))})};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/rest/operations/identify":function(){define("exports ../../core/sql ../../geometry/support/jsonUtils ../../geometry/support/scaleUtils ../../geometry/support/spatialReferenceUtils ../../layers/support/floorFilterUtils ../../layers/support/sublayerUtils".split(" "), function(d,f,g,c,a,b,e){function l(h){const {mapExtent:k,floors:t,width:x,sublayers:w,layerIds:z,layerOption:G,gdbVersion:P}=h;var K=w?.find(B=>null!=B.layer)?.layer?.serviceSublayers;const H="popup"===G;h={};const D=c.getScale({extent:k,width:x,spatialReference:k?.spatialReference}),A=[],Q=B=>{const R=0===D,S=0===B.minScale||D<=B.minScale,T=0===B.maxScale||D>=B.maxScale;B.visible&&(R||S&&T)&&(B.sublayers?B.sublayers.forEach(Q):!1!==z?.includes(B.id)&&(!H||B.popupTemplate&&B.popupEnabled)&&A.unshift(B))}; w?.forEach(Q);if(w&&!A.length)h.layerIds=[];else{K=e.isExportDynamic(A,K,P);var N=A.map(B=>{const R=b.getLayerFloorFilterClause(t,B);return B.toExportImageJSON(R)});if(K)h.dynamicLayers=JSON.stringify(N);else if(w?(K=A.map(({id:B})=>B),z&&(K=K.filter(B=>z.includes(B))),h.layerIds=K):z?.length&&(h.layerIds=z),K=m(t,A),null!=K&&K.length){N={};for(const B of K)B.definitionExpression&&(N[B.id]=B.definitionExpression);Object.keys(N).length&&(h.layerDefs=JSON.stringify(N))}}return h}function m(h,k){const t= !!h?.length;k=k.filter(x=>null!=x.definitionExpression||t&&null!=x.floorInfo);return k.length?k.map(x=>{var w=b.getLayerFloorFilterClause(h,x);w=f.sqlAnd(w,x.definitionExpression);return{id:x.id,definitionExpression:w??void 0}}):null}d.identifyToIdentifyRESTParameters=function(h,k){const {dpi:t,gdbVersion:x,geometry:w,geometryPrecision:z,height:G,historicMoment:P,layerOption:K,mapExtent:H,maxAllowableOffset:D,returnFieldName:A,returnGeometry:Q,returnUnformattedValues:N,returnZ:B,spatialReference:R, timeExtent:S,tolerance:T,width:Z}=h.toJSON(),{dynamicLayers:U,layerDefs:V,layerIds:aa}=l(h);h={historicMoment:P,geometryPrecision:z,maxAllowableOffset:D,returnFieldName:A,returnGeometry:Q,returnUnformattedValues:N,returnZ:B,tolerance:T};k=(null!=k?.geometry?k.geometry:null)?.toJSON()||w;h.imageDisplay=`${Z},${G},${t}`;x&&(h.gdbVersion=x);k&&(delete k.spatialReference,h.geometry=JSON.stringify(k),h.geometryType=g.getJsonType(k));if(k=R??k?.spatialReference??H?.spatialReference)h.sr=a.srToRESTValue(k); h.time=S?[S.start,S.end].join():null;if(H){const {xmin:da,ymin:W,xmax:n,ymax:p}=H;h.mapExtent=`${da},${W},${n},${p}`}V&&(h.layerDefs=V);U&&!V&&(h.dynamicLayers=U);h.layers="popup"===K?"visible":K;aa&&!U&&(h.layers+=`:${aa.join(",")}`);return h};d.toDynamicLayersJSON=l;Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/layers/support/sublayerUtils":function(){define(["exports","../../core/accessorSupport/PropertyOrigin"],function(d,f){function g(c,a){if(!c?.length||null==a)return!0; a=a.slice().reverse().flatten(({sublayers:l})=>l&&l.toArray().reverse()).map(l=>l.id).toArray();if(c.length>a.length)return!1;let b=0;const e=a.length;for(const {id:l}of c){for(;b=e)return!1}return!0}d.isExportDynamic=function(c,a,b){return c.some(e=>{var l=e.source;l=!l||"map-layer"===l.type&&l.mapLayerId===e.id&&(null==l.gdbVersion||l.gdbVersion===b);e.commitProperty("renderer");e.commitProperty("labelingInfo");e.commitProperty("opacity");e.commitProperty("labelsVisible"); return!l||e.originIdOf("renderer")>f.OriginId.SERVICE||e.originIdOf("labelingInfo")>f.OriginId.SERVICE||e.originIdOf("opacity")>f.OriginId.SERVICE||e.originIdOf("labelsVisible")>f.OriginId.SERVICE})?!0:!g(c,a)};d.isSublayerOverhaul=function(c){return!!c&&c.some(a=>null!=a.minScale||null!=a.layerDefinition?.minScale)};d.shouldWriteSublayerStructure=function(c,a,b){return a.flatten(({sublayers:e})=>e).length!==c.length||c.some(e=>e.originIdOf("minScale")>b||e.originIdOf("maxScale")>b||e.originIdOf("renderer")> b||e.originIdOf("labelingInfo")>b||e.originIdOf("opacity")>b||e.originIdOf("labelsVisible")>b||e.originIdOf("source")>b)?!0:!g(c,a)};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/rest/support/IdentifyParameters":function(){define("../../chunks/tslib.es6 ../../geometry ../../TimeExtent ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/decorators/writer ../../geometry/support/jsonUtils ../../geometry/Extent ../../geometry/SpatialReference".split(" "), function(d,f,g,c,a,b,e,l,m,h,k,t,x){var w;c=w=class extends c.JSONSupport{static from(z){return b.ensureClass(w,z)}constructor(z){super(z);this.dpi=96;this.geometryPrecision=this.geometry=this.gdbVersion=this.floors=null;this.height=400;this.layerIds=this.historicMoment=null;this.layerOption="top";this.maxAllowableOffset=this.mapExtent=null;this.returnFieldName=!0;this.returnM=this.returnGeometry=!1;this.returnUnformattedValues=!0;this.returnZ=!1;this.tolerance=this.timeExtent=this.sublayers=this.spatialReference= null;this.width=400}writeHistoricMoment(z,G){G.historicMoment=z&&z.getTime()}};d.__decorate([a.property({type:Number,json:{write:!0}})],c.prototype,"dpi",void 0);d.__decorate([a.property()],c.prototype,"floors",void 0);d.__decorate([a.property({type:String,json:{write:!0}})],c.prototype,"gdbVersion",void 0);d.__decorate([a.property({types:f.geometryTypes,json:{read:k.fromJSON,write:!0}})],c.prototype,"geometry",void 0);d.__decorate([a.property({type:Number,json:{write:!0}})],c.prototype,"geometryPrecision", void 0);d.__decorate([a.property({type:Number,json:{write:!0}})],c.prototype,"height",void 0);d.__decorate([a.property({type:Date})],c.prototype,"historicMoment",void 0);d.__decorate([h.writer("historicMoment")],c.prototype,"writeHistoricMoment",null);d.__decorate([a.property({type:[Number],json:{write:!0}})],c.prototype,"layerIds",void 0);d.__decorate([a.property({type:["top","visible","all","popup"],json:{write:!0}})],c.prototype,"layerOption",void 0);d.__decorate([a.property({type:t,json:{write:!0}})], c.prototype,"mapExtent",void 0);d.__decorate([a.property({type:Number,json:{write:!0}})],c.prototype,"maxAllowableOffset",void 0);d.__decorate([a.property({type:Boolean,json:{write:!0}})],c.prototype,"returnFieldName",void 0);d.__decorate([a.property({type:Boolean,json:{write:!0}})],c.prototype,"returnGeometry",void 0);d.__decorate([a.property({type:Boolean,json:{write:!0}})],c.prototype,"returnM",void 0);d.__decorate([a.property({type:Boolean,json:{write:!0}})],c.prototype,"returnUnformattedValues", void 0);d.__decorate([a.property({type:Boolean,json:{write:!0}})],c.prototype,"returnZ",void 0);d.__decorate([a.property({type:x,json:{write:!0}})],c.prototype,"spatialReference",void 0);d.__decorate([a.property()],c.prototype,"sublayers",void 0);d.__decorate([a.property({type:g,json:{write:!0}})],c.prototype,"timeExtent",void 0);d.__decorate([a.property({type:Number,json:{write:!0}})],c.prototype,"tolerance",void 0);d.__decorate([a.property({type:Number,json:{write:!0}})],c.prototype,"width",void 0); return c=w=d.__decorate([m.subclass("esri.rest.support.IdentifyParameters")],c)})},"esri/rest/support/IdentifyResult":function(){define("../../chunks/tslib.es6 ../../geometry ../../Graphic ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/decorators/writer ../../geometry/support/typeUtils".split(" "),function(d, f,g,c,a,b,e,l,m,h,k,t){f=class extends c.JSONSupport{constructor(x){super(x);this.layerName=this.layerId=this.feature=this.displayFieldName=null}readFeature(x,w){return g.fromJSON({attributes:{...w.attributes},geometry:{...w.geometry}})}writeFeature(x,w){if(x){var {attributes:z,geometry:G}=x;z&&(w.attributes={...z});null!=G&&(w.geometry=G.toJSON(),w.geometryType=t.typeKebabDictionary.toJSON(G.type))}}};d.__decorate([a.property({type:String,json:{write:!0}})],f.prototype,"displayFieldName",void 0); d.__decorate([a.property({type:g})],f.prototype,"feature",void 0);d.__decorate([m.reader("feature",["attributes","geometry"])],f.prototype,"readFeature",null);d.__decorate([k.writer("feature")],f.prototype,"writeFeature",null);d.__decorate([a.property({type:Number,json:{write:!0}})],f.prototype,"layerId",void 0);d.__decorate([a.property({type:String,json:{write:!0}})],f.prototype,"layerName",void 0);return f=d.__decorate([h.subclass("esri.rest.support.IdentifyResult")],f)})},"esri/views/layers/support/popupUtils":function(){define(["exports", "../../../layers/support/fieldUtils"],function(d,f){function g(c,a){return c.popupTemplate?c.popupTemplate:null!=a&&a.defaultPopupTemplateEnabled&&null!=c.defaultPopupTemplate?c.defaultPopupTemplate:null}d.getFetchPopupTemplate=g;d.getRequiredFields=async function(c,a=c.popupTemplate){if(null==a)return[];const b=await a.getRequiredFields(c.fieldsIndex);({lastEditInfoEnabled:a}=a);const {objectIdField:e,typeIdField:l,globalIdField:m,relationships:h}=c;if(b.includes("*"))return["*"];a=a?f.getFeatureEditFields(c): [];const k=f.fixFields(c.fieldsIndex,[...b,...a]);l&&k.push(l);k&&e&&c.fieldsIndex?.has(e)&&!k.includes(e)&&k.push(e);k&&m&&c.fieldsIndex?.has(m)&&!k.includes(m)&&k.push(m);h&&h.forEach(t=>{({keyField:t}=t);k&&t&&c.fieldsIndex?.has(t)&&!k.includes(t)&&k.push(t)});return k};d.hasPopupTemplate=function(c,a){return null!=g(c,{defaultPopupTemplateEnabled:a})};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"esri/views/support/drapedUtils":function(){define(["exports","../../geometry", "../../core/unitUtils","../../renderers/support/clickToleranceUtils","../../geometry/Extent"],function(d,f,g,c,a){function b(l,m,h,k=new a){let t=0;if("2d"===h.type)t=m*(h.resolution??0);else if("3d"===h.type){var x=h.overlayPixelSizeInMapUnits(l),w=h.basemapSpatialReference;t=null==w||w.equals(h.spatialReference)?m*x:g.getMetersPerUnitForSR(w)/g.getMetersPerUnitForSR(h.spatialReference)}m=l.x-t;x=l.y-t;w=l.x+t;l=l.y+t;({spatialReference:h}=h);k.xmin=Math.min(m,w);k.ymin=Math.min(x,l);k.xmax=Math.max(m, w);k.ymax=Math.max(x,l);k.spatialReference=h;return k}const e=new a;d.createQueryGeometry=b;d.intersectsDrapedGeometry=function(l,m,h){l=h.toMap(l);if(null==l)return!1;const k=c.calculateTolerance();return b(l,k,h,e).intersects(m)};Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})})},"*noref":1}}); define("../../../chunks/tslib.es6 ../../../core/handleUtils ../../../core/Logger ../../../core/promiseUtils ../../../core/accessorSupport/decorators/property ../../../core/has ../../../core/RandomLCG ../../../core/accessorSupport/decorators/subclass ../../../geometry/support/spatialReferenceUtils ../../../support/GraphicsCollection ../../../core/Error ../../../core/scheduling ../../../core/accessorSupport/tracking/Flags ../../../core/colorUtils ../../../config ../../../core/mathUtils ../../../geometry/Extent ../../../symbols/Font ../../../core/ObjectPool ../../../geometry/Geometry ../../../geometry/Multipoint ../../../geometry/Point ../../../geometry/Polygon ../../../geometry/Polyline ../../../geometry/support/Axis ../../../geometry/support/TileClipper ../../../symbols/cim/effects/EffectAddControlPoints ../../../symbols/cim/effects/EffectArrow ../../../symbols/cim/effects/EffectBuffer ../../../symbols/cim/effects/EffectControlMeasureLine ../../../symbols/cim/effects/EffectCut ../../../symbols/cim/effects/EffectDashes ../../../symbols/cim/effects/EffectDonut ../../../symbols/cim/effects/EffectJog ../../../symbols/cim/effects/EffectMove ../../../symbols/cim/effects/EffectOffset ../../../symbols/cim/effects/EffectReverse ../../../symbols/cim/effects/EffectRotate ../../../symbols/cim/effects/EffectScale ../../../symbols/cim/effects/EffectWave ../../../symbols/cim/placements/PlacementAlongLineSameSize ../../../symbols/cim/placements/PlacementAtExtremities ../../../symbols/cim/placements/PlacementAtRatioPositions ../../../symbols/cim/placements/PlacementInsidePolygon ../../../symbols/cim/placements/PlacementOnLine ../../../symbols/cim/placements/PlacementOnVertices ../../../symbols/cim/placements/PlacementPolygonCenter ../../../symbols/cim/enums ../engine/webgl/definitions ../../../core/libs/gl-matrix-2/factories/vec2f32 ../engine/webgl/alignmentUtils ../../../symbols/support/defaults ../../../symbols/cim/OverrideHelper ../../../core/floatRGBA ../../../layers/effects/EffectView ../../../core/Evented ./support/util ../engine/webgl/enums ../engine/webgl/brushes/BrushBitmap ../../../core/libs/gl-matrix-2/factories/vec4f32 ../../webgl/checkWebGLError ../../webgl/enums ../../webgl/FramebufferObject ../../../chunks/builtins ../../webgl/GLObjectType ../../webgl/Texture ../engine/webgl/shaders/BackgroundPrograms ../engine/webgl/DefaultVertexAttributeLayouts ../engine/webgl/AFeatureTile ../engine/webgl/DisplayEntity ../engine/webgl/shaderGraph/techniques/featureTechniqueUtils ../engine/webgl/number ../engine/webgl/PooledUint32Array ../engine/webgl/shaders/TileInfoPrograms ../engine/vectorTiles/style/StyleDefinition ../engine/vectorTiles/enums ../engine/webgl/shaders/BitBlitPrograms ../../../request ../../../core/urlUtils ../../../core/pbf ../engine/webgl/shaders/StencilPrograms ../engine/webgl/shaders/HighlightPrograms ../engine/webgl/Profiler ../engine/webgl/shaderGraph/techniques/TechniqueRegistry ../engine/webgl/shaderGraph/techniques/TechniqueType ../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter ../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter ../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter ../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter ../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter ../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter ../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter ../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter ../../../geometry/support/aaBoundingBox ../../../Color ../engine/webgl/shaderGraph/techniques/text/TextMeshWriter ../engine/webgl/shaderGraph/techniques/line/LineMeshWriter ../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter ../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter ../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter ../../webgl/renderState ../../3d/webgl-engine/core/shaderModules/interfaces ../../webgl/testSVGPremultipliedAlpha ../LabelManager ./graphics/GraphicsView2D ../../../core/asyncUtils ../../../core/Collection ../../../core/accessorSupport/watch ../../../core/accessorSupport/tracking/SimpleTrackingTarget ../../../chunks/earcut ../../../core/libs/gl-matrix-2/factories/vec3f32 ../../../geometry/support/normalizeUtilsCommon ../../../geometry/SpatialReference ../../../geometry/support/Ellipsoid ../../../geometry ../../../kernel ../navigation/MapViewNavigation ../../../core/support/UpdatingHandles ../engine/webgl/shaders/MagnifierPrograms ./BitmapTileLayerView2D ./LayerView2D ./graphics/HighlightGraphicContainer ./support/imageUtils ../tiling/TileInfoView ../tiling/TileKey ../tiling/TileQueue ../tiling/TileStrategy ../../layers/LayerView ../../layers/RefreshableLayerView ../../layers/support/MapServiceLayerViewHelper ../../support/drapedUtils".split(" "),function(d, f,g,c,a,b,e,l,m,h,k,t,x,w,z,G,P,K,H,D,A,Q,N,B,R,S,T,Z,U,V,aa,da,W,n,p,u,C,y,v,q,E,I,J,L,X,ba,va,wa,xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,La,Ma,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,Va,Wa,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,ka,Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,la,ma,na,ea,oa,ia,pa,qa,ra,sa,ja,ta){const ua=[0,0];let ha=class extends sa(la.BitmapTileLayerView2D(ma.LayerView2DMixin(ra))){constructor(){super(...arguments);this._fetchQueue=null;this._highlightGraphics= new h.GraphicsCollection;this.layer=this._tileStrategy=this._popupHighlightHelper=this._highlightView=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(r){this._fetchQueue.pause();this._fetchQueue.state=r.state;this._tileStrategy.update(r);this._fetchQueue.resume();this._highlightView?.processUpdate(r)}attach(){const r="tileServers"in this.layer?this.layer.tileServers:null,F= this.tilemapCache;this._tileInfoView=new oa(this.layer.tileInfo,this.layer.fullExtent,F?.effectiveMinLOD,F?.effectiveMaxLOD);this._fetchQueue=new pa({tileInfoView:this._tileInfoView,concurrency:r&&10*r.length||10,process:(M,O)=>this.fetchTile(M,O)});this._tileStrategy=new qa({cachePolicy:"keep",resampling:this.resampling,acquireTile:M=>this.acquireTile(M),releaseTile:M=>this.releaseTile(M),tileInfoView:this._tileInfoView});if(ja.isMapServiceLayerView(this,this.layer)){const M=this._highlightView= new ka({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new na(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container);this._popupHighlightHelper=new ja.MapServiceLayerViewHelper({createFetchPopupFeaturesQueryGeometry:(O,Y)=>ta.createQueryGeometry(O,Y,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:(O,Y)=>{M.graphicUpdateHandler({graphic:O,property:Y})}, layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate();this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()}));super.attach()}detach(){super.detach();this._tileStrategy.destroy();this._fetchQueue.clear();this.container.removeAllChildren();this._popupHighlightHelper?.destroy();this._highlightView?.destroy();this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(r,F){return this._popupHighlightHelper? this._popupHighlightHelper.fetchPopupFeaturesAtLocation(r,F):[]}highlight(r){return this._popupHighlightHelper?this._popupHighlightHelper.highlight(r):f.makeHandle()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(r){return m.equals(this.layer.tileInfo?.spatialReference,r)}async doRefresh(){this.attached&&(this.suspended?(this._tileStrategy.clear(),this.requestUpdate()):(this._fetchQueue.reset(),this._tileStrategy.refresh(r=>this._updatingHandles.addPromise(this._enqueueTileFetch(r)))))}acquireTile(r){r= this._bitmapView.createTile(r);const F=r.bitmap;[F.x,F.y]=this._tileInfoView.getTileCoords(ua,r.key);F.resolution=this._tileInfoView.getTileResolution(r.key);[F.width,F.height]=this._tileInfoView.tileInfo.size;this._updatingHandles.addPromise(this._enqueueTileFetch(r));this._bitmapView.addChild(r);this.requestUpdate();return r}releaseTile(r){this._fetchQueue.abort(r.key.id);this._bitmapView.removeChild(r);r.once("detach",()=>r.destroy());this.requestUpdate()}async fetchTile(r,F={}){var M=this.tilemapCache; const {signal:O,resamplingLevel:Y=0}=F;if(!M)try{return await this._fetchImage(r,O)}catch(ca){if(!c.isAbortError(ca)&&!this.resampling)return ea.createBlankImage(this._tileInfoView.tileInfo.size);if(3>Y&&(M=this._tileInfoView.getTileParentId(r.id)))return M=new ia(M),F=await this.fetchTile(M,{...F,resamplingLevel:Y+1}),ea.resampleImage(this._tileInfoView,F,M,r);throw ca;}F=new ia(0,0,0,0);let fa;try{await M.fetchAvailabilityUpsample(r.level,r.row,r.col,F,{signal:O});if(F.level!==r.level&&!this.resampling)return ea.createBlankImage(this._tileInfoView.tileInfo.size); fa=await this._fetchImage(F,O)}catch(ca){if(c.isAbortError(ca))throw ca;fa=await this._fetchImage(r,O)}return this.resampling?ea.resampleImage(this._tileInfoView,fa,F,r):fa}async _enqueueTileFetch(r){if(!this._fetchQueue.has(r.key.id)){try{const F=await this._fetchQueue.push(r.key);r.bitmap.source=F;r.bitmap.width=this._tileInfoView.tileInfo.size[0];r.bitmap.height=this._tileInfoView.tileInfo.size[1];r.once("attach",()=>this.requestUpdate())}catch(F){c.isAbortError(F)||g.getLogger(this).error(F)}this.requestUpdate()}}async _fetchImage(r, F){return this.layer.fetchImageBitmapTile(r.level,r.row,r.col,{signal:F})}};d.__decorate([a.property()],ha.prototype,"resampling",null);d.__decorate([a.property()],ha.prototype,"tilemapCache",null);return ha=d.__decorate([l.subclass("esri.views.2d.layers.TileLayerView2D")],ha)});