UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

1 lines • 24.3 kB
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5335,7548,7716],{4146(t,e,i){i.d(e,{A:()=>_});var r=i(5482),s=i(11254),n=i(49186),o=i(65529),a=i(4902),l=i(92474),u=i(53966),c=i(74887),h=i(84952),d=i(91429),p=i(5443),y=i(16930),f=i(92602),g=i(79677);let m=0,_=class extends((0,o.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,y.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:r}=await Promise.all([i.e(1218),i.e(812),i.e(5613)]).then(i.bind(i,45613));try{return await r(e)}catch(t){const i=e?.portalItem,r=i?.id||"unset",s=i?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",t),t}}(t)}initialize(){this.when().catch(t=>{(0,c.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})})}destroy(){const{parent:t}=this;t&&(this.parent=null,t.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:t}=this;t&&(t.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,h.An)(this.url)}createLayerView(t,e){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,s.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,d.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,r.Cg)([(0,d.MZ)({type:p.A})],_.prototype,"fullExtent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,r.Cg)([(0,d.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,r.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,r.Cg)([(0,d.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,d.MZ)({type:y.A})],_.prototype,"spatialReference",void 0),(0,r.Cg)([(0,d.MZ)({type:String})],_.prototype,"title",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,r.Cg)([(0,d.MZ)()],_.prototype,"url",void 0),(0,r.Cg)([(0,d.MZ)({type:g.A})],_.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,r.Cg)([(0,d.$K)("esri.layers.Layer")],_)},4902(t,e,i){i.d(e,{s:()=>o});var r=i(5482),s=i(64108);let n=0;const o=t=>{const e=t;let i=class extends e{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return i=(0,r.Cg)([(0,s.$)("esri.core.Identifiable")],i),i};o(class{})},8303(t,e,i){i.d(e,{A:()=>w});var r=i(5482),s=i(92602),n=i(70333),o=i(11254),a=i(60999),l=i(49186),u=i(53966),c=i(97768),h=i(74887),d=i(84952),p=i(91429),y=i(77548),f=i(20655),g=i(80812),m=i(41318),_=i(10407),v=i(36005),b=i(43937);const w=t=>{const e=t;let w=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,i){if(e.itemId)return new g.default({id:e.itemId,portal:i?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,h.Te)(e),await r({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,h.zf)(t)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch(t=>((0,h.QP)(t),!0)))}async setUserPrivileges(t,e){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(t){(0,h.QP)(t)}}async _fetchUserPrivileges(t,e){let i=this.portalItem;if(!t||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(e);const r=!n.id?.findCredential(this.url),s=t===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let o,a;if(s)o=i.portal.url;else try{o=await(0,y.wI)(this.url,e)}catch(t){(0,h.QP)(t)}if(!o||!(0,d.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,h.QP)(t)}const l=!0,u=!1,c=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(s?await i.reload():(i=new g.default({id:t,portal:{url:o}}),await i.load(e)),i.portal.user)return this._getUserPrivileges(i,r)}catch(t){(0,h.QP)(t)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(t,e){const i=(0,_.It)(t);return e&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,h.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?n.id?.findCredential(this.url):null;if(!e)return!0;const i=E.credential===e?E.user:await this._fetchEditingUser(t);return E.credential=e,E.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=f.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(r))return s.user;const l=`${r}/community/self`,u=null!=t?t.signal:null,c=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?m.A.fromJSON(c.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const i=e?.portal,r=this.portalItem?.id&&(this.portalItem.portal||f.A.getDefault());return i&&r&&!(0,d.ut)(r.restUrl,i.restUrl)?(e.messages&&e.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return(0,r.Cg)([(0,p.MZ)({type:g.default})],w.prototype,"portalItem",null),(0,r.Cg)([(0,v.w)("web-document","portalItem",["itemId"])],w.prototype,"readPortalItem",null),(0,r.Cg)([(0,b.K)("web-document","portalItem",{itemId:{type:String}})],w.prototype,"writePortalItem",null),(0,r.Cg)([(0,p.MZ)({clonable:!1})],w.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasUpdateItemPrivileges",void 0),w=(0,r.Cg)([(0,p.$K)("esri.layers.mixins.PortalLayer")],w),w},E={credential:null,user:null}},10407(t,e,i){i.d(e,{It:()=>p,LG:()=>o,OM:()=>u,Sm:()=>c,Y:()=>a,bK:()=>l,mm:()=>d,sQ:()=>h});var r=i(91218),s=i(16930),n=i(28735);function o(t,e){if(!a(t,e)){const i=t.typeKeywords;i?i.push(e):t.typeKeywords=[e]}}function a(t,e){return!!t.typeKeywords?.includes(e)}function l(t){return a(t,d.HOSTED_SERVICE)}function u(t,e){const i=t.typeKeywords;if(i){const t=i.indexOf(e);t>-1&&i.splice(t,1)}}function c(t,e,i){i?o(t,e):u(t,e)}async function h(t){const e=t.clone().normalize();let i;if(e.length>1)for(const t of e)i?t.width>i.width&&(i=t):i=t;else i=e[0];return async function(t){const e=t.spatialReference;if(e.isWGS84)return t.clone();if(e.isWebMercator)return(0,n.ci)(t);const i=s.A.WGS84;return await(0,r.initializeProjection)(e,i),(0,r.project)(t,i)}(i)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(t){const{portal:e,isOrgItem:i,itemControl:r}=t,s=e.user?.privileges;let n=!s||s.includes("features:user:edit"),o=!!i&&!!s?.includes("features:user:fullEdit");const a="update"===r||"admin"===r;return a?o=n=!0:o&&(n=!0),{features:{edit:n,fullEdit:o},content:{updateItem:a}}}},16215(t,e,i){i.d(e,{S:()=>s,Y:()=>r});const r=Symbol("BasemapInstance");function s(t){return null!=t&&"object"==typeof t&&r in t}},36708(t,e,i){i.d(e,{C_:()=>d,OH:()=>f,Vh:()=>g,on:()=>h,pc:()=>m,wB:()=>l,z7:()=>u});var r=i(37955),s=i(36563),n=i(97768),o=i(74887),a=i(14012);function l(t,e,i={}){return c(t,e,i,p)}function u(t,e,i={}){return c(t,e,i,y)}function c(t,e,i={},r){let s=null;const o=i.once?(t,i)=>{r(t)&&((0,n.xt)(s),e(t,i))}:(t,i)=>{r(t)&&e(t,i)};if(s=(0,a.Cn)(t,o,i.sync,i.equals),i.initial){const e=t();o(e,e)}return s}function h(t,e,i,o={}){let a=null,u=null,c=null;function h(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(t){o.once&&o.once&&(0,n.xt)(c),i(t)}const p=l(t,(t,i)=>{h(),(0,r.wb)(t)&&(a=t,u=(0,r.on)(t,e,d),o.onListenerAdd?.(t))},{sync:o.sync,initial:!0});return c=(0,s.hA)(()=>{p.remove(),h()}),c}function d(t,e){return function(t,e,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const r=t();if(e?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((r,n)=>{a=(0,s.vE)([(0,o.u7)(i,()=>{l(),n((0,o.NK)())}),c(t,t=>{l(),r(t)},{sync:!1,once:!0},e??p)])})}(t,y,e)}function p(t){return!0}function y(t){return!!t}i(80559);const f={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},60999(t,e,i){i.d(e,{DZ:()=>y,Ke:()=>p,Tj:()=>c,UT:()=>f,aD:()=>m,jJ:()=>u});var r=i(5482),s=i(69622),n=i(97768),o=i(74887),a=i(10107),l=i(64108);function u(t,e,i){return(0,o.Lx)(t.map((t,r)=>e.apply(i,[t,r])))}async function c(t,e,i){return(await(0,o.Lx)(t.map((t,r)=>e.apply(i,[t,r])))).map(t=>t.value)}function h(t){return{ok:!0,value:t}}function d(t){return{ok:!1,error:t}}async function p(t){if(null==t)return{ok:!1,error:new Error("no promise provided")};try{return h(await t)}catch(t){return d(t)}}async function y(t){try{return h(await t)}catch(t){return(0,o.QP)(t),d(t)}}function f(t,e){return new g(t,e)}let g=class extends s.A{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=t(i),this.promise.then(t=>{this._result=h(t),this._cleanup()},t=>{this._result=d(t),this._cleanup()}),this._abortHandle=(0,o.u7)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,a.MZ)()],g.prototype,"value",null),(0,r.Cg)([(0,a.MZ)()],g.prototype,"error",null),(0,r.Cg)([(0,a.MZ)()],g.prototype,"finished",null),(0,r.Cg)([(0,a.MZ)()],g.prototype,"promise",void 0),(0,r.Cg)([(0,a.MZ)()],g.prototype,"_result",void 0),g=(0,r.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g);class m{constructor(){this._sequence=Promise.resolve()}async acquire(){let t;this._sequence=new Promise(e=>{t=this._sequence.then(()=>e,()=>e)});const e=await t;return{[Symbol.dispose]:e}}async run(t){const e={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(e,await this.acquire(),!1),await t()}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}}},66344(t,e,i){i.d(e,{q:()=>a});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db.clear()}register(t){this._users.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._users.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,e){const i=this._db.get(t.id+e);return i?.size??0}put(t,e,i,s,o){e=t.id+e;const a=this._db.get(e);if(a&&(this._size-=a.size,t.size-=a.size,this._db.delete(e),a.entry!==i&&this._notifyRemove(e,a.entry,a.size,0)),s>this._maxSize)return void this._notifyRemove(e,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${e}`),void this._notifyRemove(e,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(e,new n(i,s,l)),this._size+=s,t.size+=s,this._checkSize()}updateSize(t,e){e=t.id+e;const i=this._db.get(e);if(!i)return;this._size-=i.size,t.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){const t=this._notifyRemove(e,i.entry,r,1);if(!(null!=t&&t>0))return void this._db.delete(e);r=t}i.size=r,this._size+=r,t.size+=r,this._checkSize()}pop(t,e){e=t.id+e;const i=this._db.get(e);if(i)return this._size-=i.size,t.size-=i.size,this._db.delete(e),++this._hit,i.entry;++this._miss}get(t,e){e=t.id+e;const i=this._db.get(e);if(void 0!==i)return this._db.delete(e),i.lives=i.lifetime,this._db.set(e,i),++this._hit,i.entry;++this._miss}peek(t,e){const i=this._db.get(t.id+e);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},i=new Array;this._db.forEach((t,r)=>{const s=t.lifetime;i[s]=(i[s]||0)+t.size,this._users.forEach(i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=e[n]||0;e[n]=i+t.size}})});const r={};this._users.forEach(t=>{const i=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const s=e[i]||0;e[i]=s,r[i]=Math.round(100*t.hitRate)+"%"}else r[i]="0%"});const s=Object.keys(e);s.sort((t,i)=>e[i]-e[t]),s.forEach(i=>t[i]=Math.round(e[i]/2**20)+"MB / "+r[i]);for(let e=i.length-1;e>=0;--e){const r=i[e];r&&(t["Priority "+(e+-3-1)]=Math.round(r/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forEach(t=>t.resetHitRate())}clear(t){const e=t.id;this._db.forEach((t,i)=>{i.startsWith(e)&&(this._size-=t.size,this._db.delete(i),this._notifyRemove(i,t.entry,t.size,0))}),t.size=0}clearAll(){this._db.forEach((t,e)=>this._notifyRemove(e,t.entry,t.size,0)),this._users.forEach(t=>t.size=0),this._size=0,this._db.clear()}*values(t){for(const[e,i]of this._db)e.startsWith(t.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,i,r){const s=this._users.get(t.split(o)[0])?.removeFunc,n=s?.(e,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((t,e)=>this._checkSizeLimits(t,e)),this._checkSizeLimits(this.maxSize)}setMaxSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const i=e??this;if(i.size<=t)return;const r=e?.id;let s=!0;for(;s;){s=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!r||n.startsWith(r))){const r=e??this._users.get(n.split(o)[0]);if(this._purgeItem(n,a,r),i.size<=.9*t)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if(!r||s.startsWith(r)){const r=e??this._users.get(s.split(o)[0]);if(this._purgeItem(s,n,r),i.size<=.9*t)return}}_purgeItem(t,e,i){if(this._db.delete(t),e.lives<=1){this._size-=e.size,i&&(i.size-=e.size);const r=this._notifyRemove(t,e.entry,e.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),e.lives=e.lifetime,e.size=r,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}new s(0);class n{constructor(t,e,i){this.entry=t,this.size=e,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(t,e){this.removeFunc=e,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(t,e,i=1){this._storage.put(this,t,e,i,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},77548(t,e,i){i.d(e,{Gh:()=>v,tk:()=>f,BR:()=>y,p2:()=>d,wI:()=>p,G$:()=>m,$x:()=>g,Ov:()=>l,UC:()=>n,W_:()=>u,OP:()=>_,TU:()=>a,XX:()=>o,jy:()=>c});var r=i(70333),s=i(11254);function n(t){return null!=t&&"object"==typeof t&&"type"in t&&"knowledge-graph-sublayer"===t.type}i(7762),i(84952),i(36563),i(36708),i(4146),new WeakMap,i(16215);const o={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(t){const e=t?.type;return"building-scene"===e||"integrated-mesh"===e||"point-cloud"===e||"scene"===e}function l(t){return"feature"===t?.type&&!t.url&&"memory"===t.source?.type}function u(t){const e=t?.type;return("feature"===e||"subtype-group"===e||"oriented-imagery"===e)&&"feature-layer"===t?.source?.type}function c(t){return function(t){return null!=t&&"object"==typeof t&&"type"in t&&"feature"===t.type}(t)&&function(t){return"feature"===t?.type&&"feature-layer"===t.source?.type}(t)}function h(t){const e=t?.type;return"binning"===e||"cluster"===e}function d(t,e){if(!c(t))return;const i=e?.graphic,r=t.featureReduction;if(i){if(i.isAggregate){const t=i.origin;return t&&"featureReductionProvider"in t&&r?h(r)?r:null:void 0}return t}return e?.checkFeatureReduction&&r?h(r)?r:null:t}async function p(t,e){const i=r.id?.findServerInfo(t);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const n=t.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const o=`${t.slice(0,n)}/rest/info`,a=null!=e?e.signal:null,{data:l}=await(0,s.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function y(t){return function(t){if(!("capabilities"in t))return!1;switch(t.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(t)?"effectiveCapabilities"in t?t.effectiveCapabilities:t.capabilities:null}function f(t){return!!function(t){if(!("editingEnabled"in t))return!1;switch(t.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(t)&&("effectiveEditingEnabled"in t?t.effectiveEditingEnabled:t.editingEnabled)}function g(t,e){return null}function m(t){return null}function _(t){return!t||"Feature Service"===t.type&&!t.sourceUrl}function v(t,e){if(!e||!_(t))return;const i=(t.url,null);i&&(t.url=i)}},78553(t,e,i){i.d(e,{D:()=>n,p:()=>s});var r=i(56507);function s(t){const e=(0,r.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function n(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79677(t,e,i){i.d(e,{A:()=>h});var r,s=i(5482),n=i(25482),o=i(88930),a=i(91429),l=i(98623),u=i(36005),c=i(43937);let h=class extends n.o{static{r=this}static get allTime(){return d}static get empty(){return p}static fromArray(t){return new r({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=t.start?.getTime()??t.start,s=t.end?.getTime()??t.end;return e===r&&i===s}expandTo(t,e=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,t,e));let s=this.end;if(s){const i=(0,o.lL)(s,t,e);s=s.getTime()===i.getTime()?i:(0,o.S1)(i,1,t,e)}return new r({start:i,end:s})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return r.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=t.start?.getTime()??-1/0,n=t.end?.getTime()??1/0;let o,a;return s>=e&&s<=i?o=s:e>=s&&e<=n&&(o=e),i>=s&&i<=n?a=i:n>=e&&n<=i&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?r.empty:new r({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(t,e,i=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();const s=new r,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.S1)(n,t,e,i)),null!=a&&(s.end=(0,o.S1)(a,t,e,i)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,i=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new r({start:e,end:i})}};(0,s.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,s.Cg)([(0,u.w)("end")],h.prototype,"readEnd",null),(0,s.Cg)([(0,c.K)("end")],h.prototype,"writeEnd",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,s.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,s.Cg)([(0,u.w)("start")],h.prototype,"readStart",null),(0,s.Cg)([(0,c.K)("start")],h.prototype,"writeStart",null),h=r=(0,s.Cg)([(0,a.$K)("esri.time.TimeExtent")],h);const d=new h,p=new h({start:void 0,end:void 0})},83027(t,e,i){i.d(e,{h:()=>r});const r=i(29953).ho}}]);