@arcgis/core 4.30.0-next.20240607 → 4.30.0-next.20240608

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{deepEqual as t}from"../../../../core/object.js";import{throwIfNotAbortError as s,throwIfAborted as r}from"../../../../core/promiseUtils.js";import{diff as i}from"../../../../core/accessorSupport/diffUtils.js";import{ignoreConnectionErrors as a}from"../../../../core/workers/utils.js";import o from"../../../../geometry/SpatialReference.js";import{MultiTileMeshData as n}from"../../engine/webgl/mesh/MultiTileMeshData.js";import{FeatureMeshFactory as c}from"../../engine/webgl/mesh/factories/FeatureMeshFactory.js";import{ResourceProxy as h}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{MeshWriterRegistry as u}from"../../engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{MatcherContext as p}from"../../engine/webgl/util/MatcherContext.js";import{ProcessorTileMessageQueue as g}from"./ProcessorTileMessageQueue.js";import{BinningStrategy as d}from"./processor/BinningStrategy.js";import{ClusterStrategy as y}from"./processor/ClusterStrategy.js";import{FeatureUpdateStrategy as _}from"./processor/FeatureUpdateStrategy.js";import{AttributeStore as l}from"./support/AttributeStore.js";import{ComputedAttributeStorage as m}from"./support/ComputedAttributeStorage.js";class f{constructor(e,t){this._connection=e,this._source=t,this._version=1,this._registry=new u,this._proxy=new h({fetch:(e,t)=>this._connection.layerView.fetch(e,t),fetchDictionary:(e,t)=>this._connection.layerView.fetchDictionary(e,t)}),this._attributeStore=new l({isLocal:!1,update:e=>a(this._connection.container.updateAttributeView(e))})}destroy(){this._proxy.destroy(),this._strategy?.destroy(),this._attributeStore.destroy()}get aggregateQueryEngine(){return this._strategy?.aggregateQueryEngine}getDisplayFeatures(e){return this._strategy?this._strategy.getDisplayFeatures(e):{features:[],aggregates:[]}}getFeatureObjectIdsForAggregate(e){return this._strategy?this._strategy.getFeatureObjectIdsForAggregate(e):[]}onSubscribe(e){this._strategy?.onSubscribe(e)}onUnsubscribe(e){this._strategy?.onUnsubscribe(e)}async update(e,s,r,a,n){const h=e.processor,u=t(this._schema?.storage,h.storage),g=t(this._schema?.mesh.properties,h.mesh.properties),d=t(this._schema?.mesh.factory,h.mesh.factory),y=t(this._schema?.mesh.strategy,h.mesh.strategy),_=g||d||y;if(!(u||_)&&!a)return;has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] SymbolProcessor.update`,{changes:i(this._schema,h),schema:h}),this._schema=h;const l=o.fromJSON(this._source.service.outSpatialReference),f=new m({fields:this._source.metadata.fieldsIndex,spatialReference:l});if(await this._attributeStore.update(h.storage,f,this._source.metadata,l,s),this._strategy?.invalidateAttributeData(),!a&&!_)return;(y||g)&&await this._updateStrategy(h.mesh.strategy,l,n,h.mesh.properties.timeZone),this._updateSortKey(f,"sortKey"in h.mesh.properties?h.mesh.properties.sortKey:null);const b=new p(f,this._proxy,r,this._registry);return(d||"dictionary"===h.mesh.factory.symbology.type)&&(this._factory=await c.create(b,h.mesh.factory)),this._invalidate(),this._version=s,this._connection.container.updateRenderState(this._version)}async applyLocalEdit(e){if(!this._strategy)return;const t=this._strategy.applyLocalEdit(e);for await(const r of t)try{await this._process(r)}catch(s){}}async updateChunks(){await this._doUpdateChunks(),this._strategy?.afterUpdateChunks()}async removeChunks(e){this._strategy?.removeChunks(e),this._attributeStore.incrementDisplayIdGeneration()}updateHighlight({highlights:e}){if(!this._strategy)return void this._attributeStore.setHighlight(e.map((({objectId:e,highlightFlags:t})=>({objectId:e,highlightFlags:t,displayId:-1}))),e);const t=this._strategy.displayMap(e,(({objectId:e})=>e),((e,{highlightFlags:t},s)=>({objectId:s,displayId:e,highlightFlags:t})));this._attributeStore.setHighlight(t,e)}async _doUpdateChunks(){if(!this._strategy)return;const e=this._strategy.updateChunks(),t=[],r=new Map;for await(const a of e){let e=r.get(a.id);null==e&&(e=new g({concurrency:16,process:e=>this._process(e)}),r.set(a.id,e));const i=e.push(a).catch((e=>s(e)));t.push(i)}try{await Promise.all(t)}catch(i){}has("esri-2d-update-debug")&&console.log("SendUpdates"),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")&&console.log("SendUpdates.await")}async _updateStrategy(e,t,s,r){switch(this._strategy?.destroy(),e.type){case"feature":this._strategy=new _(this._source,this._attributeStore,r);break;case"binning":this._strategy=await d.create(e,t,this._source,this._attributeStore,r);break;case"cluster":this._strategy=await y.create(this._connection,e,t,this._source,this._attributeStore,r)}for(const i of s)this._strategy.onSubscribe(i)}async _updateSortKey(t,s){if(this._sortInfo=e(this._sortInfo?.computed),null!=s){const e=s.byRenderer?null:await t.createComputedField(s);this._sortInfo={...s,computed:e}}}_invalidate(){this._strategy&&this._strategy.invalidate()}async _process(e){const t=e.subscription;if(has("esri-2d-update-debug")){const s=t.tile;console.debug(`Version[${this._version}] Tile[${s.key.id}, end=${e.end}] Processor._process`)}await this._fetchResources(e),r(t.signal);const s=await this._write(e,t.tile.createArcadeEvaluationOptions(this._schema?.mesh.properties.timeZone)),i=t.tile.tileInfoView.tileInfo.isWrappable,{message:a,transferList:o}=s.serialize(i),n={objectIdMap:null,inner:e.createMessage(a,this._version,this._attributeStore.epoch)};if(this._schema?.mesh.properties.returnMeshObjectId){n.objectIdMap={};const t=e.reader?.getCursor();if(t)for(;t.next();)n.objectIdMap[t.getDisplayId()]=t.getObjectId()}if(r(t.signal),await this._connection.container.onMessage(n,{signal:t.signal,transferList:o}),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")){const s=t.tile;console.debug(`Version[${this._version}] Tile[${s.key.id}, end=${e.end}] Processor._process.await`)}}async _fetchResources(e){await this._fetchMatcherResources(e),await this._fetchWriterResources(e)}async _fetchMatcherResources(e){if(e.reader)return this._factory.enqueueMatcherRequests(this._proxy,e.reader)}async _fetchWriterResources(e){if(!e.reader)return;const t=e.reader.getCursor(),s=e.subscription.tile.createArcadeEvaluationOptions(this._schema.mesh.properties.timeZone);for(;t.next();)this._factory.enqueueWriterRequests(this._proxy,t,s);await this._proxy.fetchEnqueuedResources()}async _write(e,t){const s=e.subscription.tile,r=e.reader?.getCursor(),i=r?.getSize()??0,a=s.tileInfoView.tileInfo.isWrappable,o=new n(s.key,this._strategy.enablePixelBuffering,a,i);if(!r)return o;const c=s.createArcadeEvaluationOptions(this._schema.mesh.properties.timeZone);for(;r.next();){const e=this._getSortKeyValue(r,t);o.entityStart(r.getDisplayId(),e),this._factory.write(o,this._proxy,r,c,s.level),o.entityEnd()}return o}_getSortKeyValue(e,t){if(!this._sortInfo)return 0;const{computed:s,order:r,byRenderer:i}=this._sortInfo,a=i?this._factory.getSortKey(e,t):s?.read(e,t);return null==a||isNaN(a)?0:a*("asc"===r?-1:1)}}export{f as default};
5
+ import has from"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{notDeepEqual as t}from"../../../../core/object.js";import{throwIfNotAbortError as s,throwIfAborted as r}from"../../../../core/promiseUtils.js";import{diff as i}from"../../../../core/accessorSupport/diffUtils.js";import{ignoreConnectionErrors as a}from"../../../../core/workers/utils.js";import o from"../../../../geometry/SpatialReference.js";import{MultiTileMeshData as n}from"../../engine/webgl/mesh/MultiTileMeshData.js";import{FeatureMeshFactory as c}from"../../engine/webgl/mesh/factories/FeatureMeshFactory.js";import{ResourceProxy as h}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{MeshWriterRegistry as u}from"../../engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{MatcherContext as p}from"../../engine/webgl/util/MatcherContext.js";import{ProcessorTileMessageQueue as g}from"./ProcessorTileMessageQueue.js";import{BinningStrategy as d}from"./processor/BinningStrategy.js";import{ClusterStrategy as y}from"./processor/ClusterStrategy.js";import{FeatureUpdateStrategy as _}from"./processor/FeatureUpdateStrategy.js";import{AttributeStore as l}from"./support/AttributeStore.js";import{ComputedAttributeStorage as m}from"./support/ComputedAttributeStorage.js";class f{constructor(e,t){this._connection=e,this._source=t,this._version=1,this._registry=new u,this._proxy=new h({fetch:(e,t)=>this._connection.layerView.fetch(e,t),fetchDictionary:(e,t)=>this._connection.layerView.fetchDictionary(e,t)}),this._attributeStore=new l({isLocal:!1,update:e=>a(this._connection.container.updateAttributeView(e))})}destroy(){this._proxy.destroy(),this._strategy?.destroy(),this._attributeStore.destroy()}get aggregateQueryEngine(){return this._strategy?.aggregateQueryEngine}getDisplayFeatures(e){return this._strategy?this._strategy.getDisplayFeatures(e):{features:[],aggregates:[]}}getFeatureObjectIdsForAggregate(e){return this._strategy?this._strategy.getFeatureObjectIdsForAggregate(e):[]}onSubscribe(e){this._strategy?.onSubscribe(e)}onUnsubscribe(e){this._strategy?.onUnsubscribe(e)}async update(e,s,r,a,n){const h=e.processor,u=t(this._schema?.storage,h.storage),g=t(this._schema?.mesh.properties,h.mesh.properties),d=t(this._schema?.mesh.factory,h.mesh.factory),y=t(this._schema?.mesh.strategy,h.mesh.strategy),_=g||d||y;if(!(u||_)&&!a)return;has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] SymbolProcessor.update`,{changes:i(this._schema,h),schema:h}),this._schema=h;const l=o.fromJSON(this._source.service.outSpatialReference),f=new m({fields:this._source.metadata.fieldsIndex,spatialReference:l});if(await this._attributeStore.update(h.storage,f,this._source.metadata,l,s),this._strategy?.invalidateAttributeData(),!a&&!_)return;(y||g)&&await this._updateStrategy(h.mesh.strategy,l,n,h.mesh.properties.timeZone),this._updateSortKey(f,"sortKey"in h.mesh.properties?h.mesh.properties.sortKey:null);const b=new p(f,this._proxy,r,this._registry);return(d||"dictionary"===h.mesh.factory.symbology.type)&&(this._factory=await c.create(b,h.mesh.factory)),this._invalidate(),this._version=s,this._connection.container.updateRenderState(this._version)}async applyLocalEdit(e){if(!this._strategy)return;const t=this._strategy.applyLocalEdit(e);for await(const r of t)try{await this._process(r)}catch(s){}}async updateChunks(){await this._doUpdateChunks(),this._strategy?.afterUpdateChunks()}async removeChunks(e){this._strategy?.removeChunks(e),this._attributeStore.incrementDisplayIdGeneration()}updateHighlight({highlights:e}){if(!this._strategy)return void this._attributeStore.setHighlight(e.map((({objectId:e,highlightFlags:t})=>({objectId:e,highlightFlags:t,displayId:-1}))),e);const t=this._strategy.displayMap(e,(({objectId:e})=>e),((e,{highlightFlags:t},s)=>({objectId:s,displayId:e,highlightFlags:t})));this._attributeStore.setHighlight(t,e)}async _doUpdateChunks(){if(!this._strategy)return;const e=this._strategy.updateChunks(),t=[],r=new Map;for await(const a of e){let e=r.get(a.id);null==e&&(e=new g({concurrency:16,process:e=>this._process(e)}),r.set(a.id,e));const i=e.push(a).catch((e=>s(e)));t.push(i)}try{await Promise.all(t)}catch(i){}has("esri-2d-update-debug")&&console.log("SendUpdates"),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")&&console.log("SendUpdates.await")}async _updateStrategy(e,t,s,r){switch(this._strategy?.destroy(),e.type){case"feature":this._strategy=new _(this._source,this._attributeStore,r);break;case"binning":this._strategy=await d.create(e,t,this._source,this._attributeStore,r);break;case"cluster":this._strategy=await y.create(this._connection,e,t,this._source,this._attributeStore,r)}for(const i of s)this._strategy.onSubscribe(i)}async _updateSortKey(t,s){if(this._sortInfo=e(this._sortInfo?.computed),null!=s){const e=s.byRenderer?null:await t.createComputedField(s);this._sortInfo={...s,computed:e}}}_invalidate(){this._strategy&&this._strategy.invalidate()}async _process(e){const t=e.subscription;if(has("esri-2d-update-debug")){const s=t.tile;console.debug(`Version[${this._version}] Tile[${s.key.id}, end=${e.end}] Processor._process`)}await this._fetchResources(e),r(t.signal);const s=await this._write(e,t.tile.createArcadeEvaluationOptions(this._schema?.mesh.properties.timeZone)),i=t.tile.tileInfoView.tileInfo.isWrappable,{message:a,transferList:o}=s.serialize(i),n={objectIdMap:null,inner:e.createMessage(a,this._version,this._attributeStore.epoch)};if(this._schema?.mesh.properties.returnMeshObjectId){n.objectIdMap={};const t=e.reader?.getCursor();if(t)for(;t.next();)n.objectIdMap[t.getDisplayId()]=t.getObjectId()}if(r(t.signal),await this._connection.container.onMessage(n,{signal:t.signal,transferList:o}),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")){const s=t.tile;console.debug(`Version[${this._version}] Tile[${s.key.id}, end=${e.end}] Processor._process.await`)}}async _fetchResources(e){await this._fetchMatcherResources(e),await this._fetchWriterResources(e)}async _fetchMatcherResources(e){if(e.reader)return this._factory.enqueueMatcherRequests(this._proxy,e.reader)}async _fetchWriterResources(e){if(!e.reader)return;const t=e.reader.getCursor(),s=e.subscription.tile.createArcadeEvaluationOptions(this._schema.mesh.properties.timeZone);for(;t.next();)this._factory.enqueueWriterRequests(this._proxy,t,s);await this._proxy.fetchEnqueuedResources()}async _write(e,t){const s=e.subscription.tile,r=e.reader?.getCursor(),i=r?.getSize()??0,a=s.tileInfoView.tileInfo.isWrappable,o=new n(s.key,this._strategy.enablePixelBuffering,a,i);if(!r)return o;const c=s.createArcadeEvaluationOptions(this._schema.mesh.properties.timeZone);for(;r.next();){const e=this._getSortKeyValue(r,t);o.entityStart(r.getDisplayId(),e),this._factory.write(o,this._proxy,r,c,s.level),o.entityEnd()}return o}_getSortKeyValue(e,t){if(!this._sortInfo)return 0;const{computed:s,order:r,byRenderer:i}=this._sortInfo,a=i?this._factory.getSortKey(e,t):s?.read(e,t);return null==a||isNaN(a)?0:a*("asc"===r?-1:1)}}export{f as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Logger.js";import{replace as t}from"../../../core/string.js";import{convertDateFormatToIntlOptions as r,formatDate as n}from"../../../intl/date.js";import{formatNumber as i,convertNumberFormatToIntlOptions as o}from"../../../intl/number.js";import{isRasterPixelValueField as a,featureHasFields as l,isTimeOnlyField as u}from"../../../layers/support/fieldUtils.js";import{getEffectiveLayerCapabilities as s}from"../../../layers/support/layerUtils.js";import{formatAnyDate as f,isAnyDateField as c}from"../../../smartMapping/support/utils.js";import{loadArcade as d}from"../../../support/arcadeOnDemand.js";import{getTimeZoneFormattingOptions as p}from"../../../time/timeZoneUtils.js";const y="esri.widgets.Feature.support.featureUtils",m=()=>e.getLogger(y),g=/href=(""|'')/gi,h=/(\{([^{\r\n]+)\})/g,b=/'/g,I=/^\s*expression\//i,T=/(\n)/gi,w=/[\u00A0-\u9999<>&]/gim,F=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,N=/^(?:mailto:|tel:)/,j="relationships/",Z=r("short-date-short-time");function L(e){if(null!=e)return(e.sourceLayer||e.layer)??void 0}async function E({type:e,value:t,event:r}){try{return"function"==typeof t?t(r):t}catch(n){return void m().error("error",`An error occurred when calling the "${e}" function`,{error:n,graphic:r.graphic,value:t})}}function v(e=""){if(e)return!N.test(e.trim().toLowerCase())}function x(e){return!!e&&I.test(e)}function A(e,t){if(!t||!x(t)||!e)return;const r=t.replace(I,"").toLowerCase();return e.find((({name:e})=>e.toLowerCase()===r))}function C(e,t){const r=A(t,e?.fieldName);return r?r.title||null:e?e.label||e.fieldName:null}function M(e,t){const r=t.get(e.toLowerCase());return`{${r?.fieldName||e}}`}function U(e){return e.replaceAll(g,"")}function q(e,t){const r=$(t,e);return r?r.name:e}function R(e,t){return e&&e.map((e=>q(e,t)))}function $(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function k(e){return`${e}`.trim()}function D({attributes:e,globalAttributes:t,layer:r,text:n,expressionAttributes:i,fieldInfoMap:o}){return n?O({formattedAttributes:t,template:Q(n,{...t,...i,...e},r),fieldInfoMap:o}):""}function O({formattedAttributes:e,template:r,fieldInfoMap:n}){return k(U(t(t(r,(e=>M(e,n))),e)))}function z(e,t,r=!1){const n=t[e];if("string"==typeof n){const i="%27",o=(r?encodeURIComponent(n):n).replaceAll(b,i);t[e]=o}}function G(e,t=!1){const r={...e};return Object.keys(r).forEach((e=>z(e,r,t))),r}function S(e,r,n){const i=(r=k(r))&&"{"!==r[0];return t(e,G(n,i||!1))}function P(e,t){return e.replaceAll(h,((e,r,n)=>{const i=$(t,n);return i?`{${i.name}}`:r}))}function Q(e,t,r){const n=P(e,r);return n?n.replaceAll(F,((e,r,n)=>S(e,r||n,t))):n}function _(e,t){if("string"==typeof e&&t&&null==t.dateFormat&&(null!=t.places||null!=t.digitSeparator)){const t=Number(e);if(!isNaN(t))return t}return e}function H(e){return null!=e&&"object"==typeof e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&("feature"===e.type||"scene"===e.type||"sublayer"===e.type)&&"when"in e}function J(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function B(e){return H(e)&&J(e)}function K(e){return!!e&&"object"==typeof e&&"sourceLayer"in e&&B(e.sourceLayer)}function V(e,t){const{fieldInfos:r,fieldName:n,preventPlacesFormatting:l,layer:u,timeZone:s}=t,c=Y(r,n),d=$(u,n);if(c&&!a(n)){const t=d?.type,r=c.format?.dateFormat;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||r)return f(e,{format:r,fieldType:t,timeZoneOptions:{layerTimeZone:u&&"preferredTimeZone"in u?u.preferredTimeZone:null,viewTimeZone:s,datesInUnknownTimezone:!(!u||!("datesInUnknownTimezone"in u))&&!!u.datesInUnknownTimezone}})}const p=c?.format;return"string"==typeof e&&a(n)&&p?W(e,p):"string"==typeof(e=_(e,p))||null==e||null==p?ae(e):i(e,l?{...o(p),minimumFractionDigits:0,maximumFractionDigits:20}:o(p))}function W(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(",")?X(e,",",", ",t):e.includes(";")?X(e,";","; ",t):e.includes(" ")?X(e," "," ",t):i(Number(e),o(t))}function X(e,t,r,n){return e.trim().split(t).map((e=>i(Number(e),o(n)))).join(r)}function Y(e,t){if(e?.length&&t)return e.find((e=>e.fieldName?.toLowerCase()===t.toLowerCase()))}function ee({fieldName:e,graphic:t,layer:r}){if(de(e))return null;if(!r||"function"!=typeof r.getFeatureType)return null;const{typeIdField:n}=r;if(!n||e!==n)return null;const i=r.getFeatureType(t);return i?i.name:null}function te({fieldName:e,value:t,graphic:r,layer:n}){if(de(e))return null;if(!n||"function"!=typeof n.getFieldDomain)return null;const i=r&&n.getFieldDomain(e,{feature:r});return i&&"coded-value"===i.type?i.getName(t):null}function re(e,t,r,i){const{creatorField:o,creationDateField:a,editorField:l,editDateField:u}=e;if(!t)return;const s=p(i&&"preferredTimeZone"in i?i.preferredTimeZone:null,!(!i||!("datesInUnknownTimezone"in i))&&!!i.datesInUnknownTimezone,r,Z,"date"),f={...Z,...s},c=t[u];if("number"==typeof c){const e=t[l];return{type:"edit",date:n(c,f),user:e}}const d=t[a];if("number"==typeof d){const e=t[o];return{type:"create",date:n(d,f),user:e}}return null}function ne(e,t){const r=new Map;if(!e)return r;for(const n of e){if(!n.fieldName)continue;const e=q(n.fieldName,t);n.fieldName=e,r.set(e.toLowerCase(),n)}return r}function ie(e){const t=[];if(!e)return t;const{fieldInfos:r,content:n}=e;return r&&t.push(...r),n&&Array.isArray(n)?(n.forEach((e=>{if("fields"===e.type){const r=e?.fieldInfos;r&&t.push(...r)}})),t):t}function oe(e){return e.replaceAll(w,(e=>`&#${e.charCodeAt(0)};`))}function ae(e){return"string"==typeof e?e.replaceAll(T,'<br class="esri-text-new-line" />'):e}function le(e){const{value:t,fieldName:r,fieldInfos:n,fieldInfoMap:i,layer:o,graphic:a,timeZone:l}=e;if(null==t)return"";const s=te({fieldName:r,value:t,graphic:a,layer:o});if(s)return s;const d=ee({fieldName:r,graphic:a,layer:o});if(d)return d;if(i.get(r.toLowerCase()))return V(t,{fieldInfos:n||Array.from(i.values()),fieldName:r,layer:o,timeZone:l});const p=o?.fieldsIndex?.get(r);return p&&(c(p)||u(p))?f(t,{fieldType:p.type,timeZoneOptions:{layerTimeZone:o&&"preferredTimeZone"in o?o.preferredTimeZone:null,viewTimeZone:l,datesInUnknownTimezone:!(!o||!("datesInUnknownTimezone"in o))&&!!o.datesInUnknownTimezone}}):ae(t)}function ue({fieldInfos:e,attributes:t,layer:r,graphic:n,fieldInfoMap:i,relatedInfos:o,timeZone:a}){const l={};return o?.forEach((t=>me({attributes:l,relatedInfo:t,fieldInfoMap:i,fieldInfos:e,layer:r,timeZone:a}))),t&&Object.keys(t).forEach((o=>{const u=t[o];l[o]=le({fieldName:o,fieldInfos:e,fieldInfoMap:i,layer:r,value:u,graphic:n,timeZone:a})})),l}async function se(e,t){const{layer:r,graphic:n,outFields:i,objectIds:o,returnGeometry:a,spatialReference:l}=e,u=o[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:r,graphic:n,objectId:u,requiredFields:i};return m().warn(e,t),null}if(!s(r)?.operations?.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:r,graphic:n,requiredFields:i,returnGeometry:a};return m().warn(e,t),null}const f=r.createQuery();f.objectIds=o,f.outFields=i?.length?i:[r.objectIdField],f.returnGeometry=!!a,f.returnZ=!!a,f.returnM=!!a,f.outSpatialReference=l;return(await r.queryFeatures(f,t)).features[0]}async function fe(e){if(!e.expressionInfos?.length)return!1;const t=await d(),{arcadeUtils:{hasGeometryFunctions:r}}=t;return r(e)}async function ce({graphic:e,popupTemplate:t,layer:r,spatialReference:n},i){if(!r||!t)return;if("function"==typeof r.load&&await r.load(i),!e.attributes)return;const o=r.objectIdField,a=e.attributes[o];if(null==a)return;const u=[a],s=await t.getRequiredFields(r.fieldsIndex),f=l(s,e),c=f?[]:s.includes(o)?s:[...s,o],d=t.returnGeometry||await fe(t);if(f&&!d)return;const p=await se({layer:r,graphic:e,outFields:c,objectIds:u,returnGeometry:d,spatialReference:n},i);p&&(p.geometry&&(e.geometry=p.geometry),p.attributes&&(e.attributes={...e.attributes,...p.attributes}))}function de(e=""){return!!e&&e.includes(j)}function pe(e){return e?`${j}${e.layerId}/${e.fieldName}`:""}function ye({attributes:e,graphic:t,relatedInfo:r,fieldInfos:n,fieldInfoMap:i,layer:o,timeZone:a}){e&&t&&r&&Object.keys(t.attributes).forEach((l=>{const u=pe({layerId:r.relation.id.toString(),fieldName:l}),s=t.attributes[l];e[u]=le({fieldName:u,fieldInfos:n,fieldInfoMap:i,layer:o,value:s,graphic:t,timeZone:a})}))}function me({attributes:e,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i,timeZone:o}){e&&t&&(t.relatedFeatures?.forEach((a=>ye({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i,timeZone:o}))),t.relatedStatsFeatures?.forEach((a=>ye({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:r,fieldInfos:n,layer:i,timeZone:o}))))}const ge=e=>{if(!e)return!1;const t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},he=({layer:e,method:t,query:r,definitionExpression:n})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;const i=null!=r.where?r.where:null,o=null!=r.geometry?r.geometry:null;ge(n)||ge(i)||"extent"===o?.type||"tile"===r.resultType||(r.cacheHint=!0)},be=({query:e,layer:t,method:r})=>{he({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})},Ie=({queryPayload:e,layer:t,method:r})=>{he({layer:t,method:r,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})};function Te(e,t,r){return e&&t&&r?"sublayer"===t.type?we({layers:t.layer?.sublayers,map:e,relatedLayer:t,relationship:r})||we({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:r}):we({layers:e.allLayers,map:e,relatedLayer:t,relationship:r})||we({layers:e.allTables,map:e,relatedLayer:t,relationship:r}):null}function we({map:e,relationship:t,relationship:{relatedTableId:r},relatedLayer:n,layers:i}){if(!i)return null;for(const o of i){if("map-image"===o.type){const r=we({layers:o.sublayers,map:e,relatedLayer:n,relationship:t})||we({layers:o.subtables,map:e,relatedLayer:n,relationship:t});if(r)return r;continue}if(!B(o))continue;if("sublayer"===n.type){if(o!==n&&o.id===r)return"Table"===o?.sourceJSON?.type?e?.allTables.find((e=>"feature"===e.type&&e.layerId===o.id&&e.url===o.layer?.url))??o:o;continue}const i="scene"===n.type&&n.associatedLayer?n.associatedLayer.url:n.url;if(!i)return null;if("sublayer"!==o.type){if(o!==n&&o.url===i&&o.layerId===r)return o}else if(o!==n&&o.layer?.url===i&&o.id===r)return o}return null}function Fe(e){const t=e.getObjectId();return null!=t?`oid:${t}`:`uid:${e.uid}`}export{ae as applyTextFormattingHTML,ne as createFieldInfoMap,Te as findRelatedLayer,P as fixTokens,ue as formatAttributes,re as formatEditInfo,V as formatValueToFieldInfo,ie as getAllFieldInfos,Y as getFieldInfo,C as getFieldInfoLabel,q as getFixedFieldName,R as getFixedFieldNames,Fe as getHighlightKeyForFeature,L as getSourceLayer,E as graphicCallback,oe as htmlEntities,x as isExpressionField,H as isFeatureSupportedLayer,K as isGraphicForRelatableFeatureSupportedLayer,B as isRelatableFeatureSupportedLayer,J as isRelatableLayer,de as isRelatedField,be as preLayerQueryCallback,Ie as preRequestCallback,se as querySourceLayer,ce as queryUpdatedFeature,v as shouldOpenInNewTab,O as substituteAttributes,D as substituteFieldsInLinksAndAttributes};
5
+ import e from"../../../core/Logger.js";import{replace as t}from"../../../core/string.js";import{convertDateFormatToIntlOptions as n,formatDate as r}from"../../../intl/date.js";import{formatNumber as i,convertNumberFormatToIntlOptions as o}from"../../../intl/number.js";import{isRasterPixelValueField as a,featureHasFields as l,isTimeOnlyField as u}from"../../../layers/support/fieldUtils.js";import{getEffectiveLayerCapabilities as s}from"../../../layers/support/layerUtils.js";import{formatAnyDate as f,isAnyDateField as c}from"../../../smartMapping/support/utils.js";import{loadArcade as d}from"../../../support/arcadeOnDemand.js";import{getTimeZoneFormattingOptions as p}from"../../../time/timeZoneUtils.js";const y="esri.widgets.Feature.support.featureUtils",m=()=>e.getLogger(y),g=/href=(""|'')/gi,h=/(\{([^{\r\n]+)\})/g,b=/'/g,I=/^\s*expression\//i,T=/(\n)/gi,w=/[\u00A0-\u9999<>&]/gim,F=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,N=/^(?:mailto:|tel:)/,j="relationships/",Z=n("short-date-short-time");function L(e){if(null!=e)return(e.sourceLayer||e.layer)??void 0}async function E({type:e,value:t,event:n}){try{return"function"==typeof t?t(n):t}catch(r){return void m().error("error",`An error occurred when calling the "${e}" function`,{error:r,graphic:n.graphic,value:t})}}function v(e=""){if(e)return!N.test(e.trim().toLowerCase())}function x(e){return!!e&&I.test(e)}function A(e,t){if(!t||!x(t)||!e)return;const n=t.replace(I,"").toLowerCase();return e.find((({name:e})=>e.toLowerCase()===n))}function C(e,t){const n=A(t,e?.fieldName);return n?n.title||null:e?e.label||e.fieldName:null}function M(e,t){const n=t.get(e.toLowerCase());return`{${n?.fieldName||e}}`}function U(e){return e.replaceAll(g,"")}function q(e,t){const n=$(t,e);return n?n.name:e}function R(e,t){return e&&e.map((e=>q(e,t)))}function $(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function k(e){return`${e}`.trim()}function D({attributes:e,globalAttributes:t,layer:n,text:r,expressionAttributes:i,fieldInfoMap:o}){return r?z({formattedAttributes:t,template:Q(r,{...t,...i,...e},n),fieldInfoMap:o}):""}function z({formattedAttributes:e,template:n,fieldInfoMap:r}){return k(U(t(t(n,(e=>M(e,r))),e)))}function O(e,t,n=!1){const r=t[e];if("string"==typeof r){const i="%27",o=(n?encodeURIComponent(r):r).replaceAll(b,i);t[e]=o}}function G(e,t=!1){const n={...e};return Object.keys(n).forEach((e=>O(e,n,t))),n}function S(e,n,r){const i=(n=k(n))&&"{"!==n[0];return t(e,G(r,i||!1))}function P(e,t){return e.replaceAll(h,((e,n,r)=>{const i=$(t,r);return i?`{${i.name}}`:n}))}function Q(e,t,n){const r=P(e,n);return r?r.replaceAll(F,((e,n,r)=>S(e,n||r,t))):r}function _(e,t){if("string"==typeof e&&t&&null==t.dateFormat&&(null!=t.places||null!=t.digitSeparator)){const t=Number(e);if(!isNaN(t))return t}return e}function H(e){return null!=e&&"object"==typeof e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&("feature"===e.type||"scene"===e.type||"sublayer"===e.type)&&"when"in e}function B(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function J(e){return H(e)&&B(e)}function K(e){return!!e&&"object"==typeof e&&"sourceLayer"in e&&J(e.sourceLayer)}function V(e,t){const{fieldInfos:n,fieldName:r,preventPlacesFormatting:l,layer:u,timeZone:s}=t,c=Y(n,r),d=$(u,r);if(c&&!a(r)){const t=d?.type,n=c.format?.dateFormat;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||n)return f(e,{format:n,fieldType:t,timeZoneOptions:{layerTimeZone:u&&"preferredTimeZone"in u?u.preferredTimeZone:null,viewTimeZone:s,datesInUnknownTimezone:!(!u||!("datesInUnknownTimezone"in u))&&!!u.datesInUnknownTimezone}})}const p=c?.format;return"string"==typeof e&&a(r)&&p?W(e,p):"string"==typeof(e=_(e,p))||null==e||null==p?ae(e):i(e,l?{...o(p),minimumFractionDigits:0,maximumFractionDigits:20}:o(p))}function W(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(",")?X(e,",",", ",t):e.includes(";")?X(e,";","; ",t):e.includes(" ")?X(e," "," ",t):i(Number(e),o(t))}function X(e,t,n,r){return e.trim().split(t).map((e=>i(Number(e),o(r)))).join(n)}function Y(e,t){if(e?.length&&t)return e.find((e=>e.fieldName?.toLowerCase()===t.toLowerCase()))}function ee({fieldName:e,graphic:t,layer:n}){if(de(e))return null;if(!n||"function"!=typeof n.getFeatureType)return null;const{typeIdField:r}=n;if(!r||e!==r)return null;const i=n.getFeatureType(t);return i?i.name:null}function te({fieldName:e,value:t,graphic:n,layer:r}){if(de(e))return null;if(!r||"function"!=typeof r.getFieldDomain)return null;const i=n&&r.getFieldDomain(e,{feature:n});return i&&"coded-value"===i.type?i.getName(t):null}function ne(e,t,n,i){const{creatorField:o,creationDateField:a,editorField:l,editDateField:u}=e;if(!t)return;const s=p(i&&"preferredTimeZone"in i?i.preferredTimeZone:null,!(!i||!("datesInUnknownTimezone"in i))&&!!i.datesInUnknownTimezone,n,Z,"date"),f={...Z,...s},c=t[u];if("number"==typeof c){const e=t[l];return{type:"edit",date:r(c,f),user:e}}const d=t[a];if("number"==typeof d){const e=t[o];return{type:"create",date:r(d,f),user:e}}return null}function re(e,t){const n=new Map;if(!e)return n;for(const r of e){if(!r.fieldName)continue;const e=q(r.fieldName,t);r.fieldName=e,n.set(e.toLowerCase(),r)}return n}function ie(e){const t=[];if(!e)return t;const{fieldInfos:n,content:r}=e;return n&&t.push(...n),r&&Array.isArray(r)?(r.forEach((e=>{if("fields"===e.type){const n=e?.fieldInfos;n&&t.push(...n)}})),t):t}function oe(e){return e.replaceAll(w,(e=>`&#${e.charCodeAt(0)};`))}function ae(e){return"string"==typeof e?e.replaceAll(T,'<br class="esri-text-new-line" />'):e}function le(e){const{value:t,fieldName:n,fieldInfos:r,fieldInfoMap:i,layer:o,graphic:a,timeZone:l}=e;if(null==t)return"";const s=te({fieldName:n,value:t,graphic:a,layer:o});if(s)return s;const d=ee({fieldName:n,graphic:a,layer:o});if(d)return d;if(i.get(n.toLowerCase()))return V(t,{fieldInfos:r||Array.from(i.values()),fieldName:n,layer:o,timeZone:l});const p=o?.fieldsIndex?.get(n);return p&&(c(p)||u(p))?f(t,{fieldType:p.type,timeZoneOptions:{layerTimeZone:o&&"preferredTimeZone"in o?o.preferredTimeZone:null,viewTimeZone:l,datesInUnknownTimezone:!(!o||!("datesInUnknownTimezone"in o))&&!!o.datesInUnknownTimezone}}):ae(t)}function ue({fieldInfos:e,attributes:t,layer:n,graphic:r,fieldInfoMap:i,relatedInfos:o,timeZone:a}){const l={};return o?.forEach((t=>me({attributes:l,relatedInfo:t,fieldInfoMap:i,fieldInfos:e,layer:n,timeZone:a}))),t&&Object.keys(t).forEach((o=>{const u=t[o];l[o]=le({fieldName:o,fieldInfos:e,fieldInfoMap:i,layer:n,value:u,graphic:r,timeZone:a})})),l}async function se(e,t){const{layer:n,graphic:r,outFields:i,objectIds:o,returnGeometry:a,spatialReference:l}=e,u=o[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:n,graphic:r,objectId:u,requiredFields:i};return m().warn(e,t),null}if(!s(n)?.operations?.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:n,graphic:r,requiredFields:i,returnGeometry:a};return m().warn(e,t),null}const f=n.createQuery();f.objectIds=o,f.outFields=i?.length?i:[n.objectIdField],f.returnGeometry=!!a,f.returnZ=!!a,f.returnM=!!a,f.outSpatialReference=l;return(await n.queryFeatures(f,t)).features[0]}async function fe(e){if(!e.expressionInfos?.length)return!1;const t=await d(),{arcadeUtils:{hasGeometryFunctions:n}}=t;return n(e)}async function ce({graphic:e,popupTemplate:t,layer:n,spatialReference:r},i){if(!n||!t)return;if("function"==typeof n.load&&await n.load(i),!e.attributes)return;const o=n.objectIdField,a=e.attributes[o];if(null==a)return;const u=[a],s=await t.getRequiredFields(n.fieldsIndex),f=l(s,e),c=f?[]:s.includes(o)?s:[...s,o],d=t.returnGeometry||await fe(t);if(f&&!d)return;const p=await se({layer:n,graphic:e,outFields:c,objectIds:u,returnGeometry:d,spatialReference:r},i);p&&(p.geometry&&(e.geometry=p.geometry),p.attributes&&(e.attributes={...e.attributes,...p.attributes}))}function de(e=""){return!!e&&e.includes(j)}function pe(e){return e?`${j}${e.layerId}/${e.fieldName}`:""}function ye({attributes:e,graphic:t,relatedInfo:n,fieldInfos:r,fieldInfoMap:i,layer:o,timeZone:a}){e&&t&&n&&Object.keys(t.attributes).forEach((l=>{const u=pe({layerId:n.relation.id.toString(),fieldName:l}),s=t.attributes[l];e[u]=le({fieldName:u,fieldInfos:r,fieldInfoMap:i,layer:o,value:s,graphic:t,timeZone:a})}))}function me({attributes:e,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o}){e&&t&&(t.relatedFeatures?.forEach((a=>ye({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o}))),t.relatedStatsFeatures?.forEach((a=>ye({attributes:e,graphic:a,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:o}))))}const ge=e=>{if(!e)return!1;const t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},he=({layer:e,method:t,query:n,definitionExpression:r})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;const i=null!=n.where?n.where:null,o=null!=n.geometry?n.geometry:null;ge(r)||ge(i)||"extent"===o?.type||"tile"===n.resultType||(n.cacheHint=!0)},be=({query:e,layer:t,method:n})=>{he({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})},Ie=({queryPayload:e,layer:t,method:n})=>{he({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})};function Te(e,t,n){return e&&t&&n?"sublayer"===t.type?we({layers:t.layer?.sublayers,map:e,relatedLayer:t,relationship:n})||we({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:n}):we({layers:e.allLayers,map:e,relatedLayer:t,relationship:n})||we({layers:e.allTables,map:e,relatedLayer:t,relationship:n}):null}function we({map:e,relationship:t,relationship:{relatedTableId:n},relatedLayer:r,layers:i}){if(!i)return null;for(const o of i){if("map-image"===o.type){const n=we({layers:o.sublayers,map:e,relatedLayer:r,relationship:t})||we({layers:o.subtables,map:e,relatedLayer:r,relationship:t});if(n)return n;continue}if(!J(o))continue;if("sublayer"===r.type){if(o!==r&&o.id===n)return o.isTable?e?.allTables.find((e=>"feature"===e.type&&e.layerId===o.id&&e.url===o.layer?.url))??o:o;continue}const i="scene"===r.type&&r.associatedLayer?r.associatedLayer.url:r.url;if(!i)return null;if("sublayer"!==o.type){if(o!==r&&o.url===i&&o.layerId===n)return o}else if(o!==r&&o.layer?.url===i&&o.id===n)return o}return null}function Fe(e){const t=e.getObjectId();return null!=t?`oid:${t}`:`uid:${e.uid}`}export{ae as applyTextFormattingHTML,re as createFieldInfoMap,Te as findRelatedLayer,P as fixTokens,ue as formatAttributes,ne as formatEditInfo,V as formatValueToFieldInfo,ie as getAllFieldInfos,Y as getFieldInfo,C as getFieldInfoLabel,q as getFixedFieldName,R as getFixedFieldNames,Fe as getHighlightKeyForFeature,L as getSourceLayer,E as graphicCallback,oe as htmlEntities,x as isExpressionField,H as isFeatureSupportedLayer,K as isGraphicForRelatableFeatureSupportedLayer,J as isRelatableFeatureSupportedLayer,B as isRelatableLayer,de as isRelatedField,be as preLayerQueryCallback,Ie as preRequestCallback,se as querySourceLayer,ce as queryUpdatedFeature,v as shouldOpenInNewTab,z as substituteAttributes,D as substituteFieldsInLinksAndAttributes};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import o from"./Widget.js";import r from"./Fullscreen/FullscreenViewModel.js";import{loadCalciteComponents as i}from"./support/componentsUtils.js";import{globalCss as l}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as n}from"./support/decorators/messageBundle.js";import{tsx as p}from"./support/jsxFactory.js";const c={base:"esri-fullscreen"};let a=class extends o{constructor(e,t){super(e,t),this.messages=null,this.viewModel=new r,this._toggle=()=>{this.viewModel.toggle()}}loadDependencies(){return i({button:()=>import("@esri/calcite-components/dist/components/calcite-button.js")})}get element(){return this.viewModel.element}set element(e){this.viewModel.element=e}get fullscreenTitle(){const e=this.viewModel?.state;return"active"===e?this.messages.exit:"ready"===e?this.messages.enter:""}get icon(){return"full-screen"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{fullscreenTitle:e,icon:t}=this,s=this.viewModel?.state,o="feature-unsupported"===s,r="ready"===s||"disabled"===s||"feature-unsupported"===s?"zoom-out-fixed":"zoom-in-fixed";return p("div",{class:this.classes(c.base,l.widget)},!o&&p("calcite-button",{class:l.widgetButton,disabled:"disabled"===s,iconStart:t??r,kind:"neutral",label:e,onclick:this._toggle,title:e}))}};e([t()],a.prototype,"element",null),e([t({readOnly:!0})],a.prototype,"fullscreenTitle",null),e([t()],a.prototype,"icon",null),e([t()],a.prototype,"label",null),e([t(),n("esri/widgets/Fullscreen/t9n/Fullscreen")],a.prototype,"messages",void 0),e([t()],a.prototype,"view",null),e([t({type:r})],a.prototype,"viewModel",void 0),a=e([s("esri.widgets.Fullscreen")],a);const u=a;export{u as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import o from"./Widget.js";import r from"./Fullscreen/FullscreenViewModel.js";import{loadCalciteComponents as i}from"./support/componentsUtils.js";import{globalCss as l}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as n}from"./support/decorators/messageBundle.js";import{tsx as p}from"./support/jsxFactory.js";const c={base:"esri-fullscreen"};let a=class extends o{constructor(e,t){super(e,t),this.messages=null,this.viewModel=new r,this._toggle=()=>{this.viewModel.toggle()}}loadDependencies(){return i({button:()=>import("@esri/calcite-components/dist/components/calcite-button.js")})}get element(){return this.viewModel.element}set element(e){this.viewModel.element=e}get fullscreenTitle(){const e=this.viewModel?.state;return"active"===e?this.messages.exit:"ready"===e?this.messages.enter:""}get icon(){const e=this.viewModel?.state;return"ready"===e||"disabled"===e||"feature-unsupported"===e?"zoom-out-fixed":"zoom-in-fixed"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}render(){const{fullscreenTitle:e,icon:t}=this,s=this.viewModel?.state,o="feature-unsupported"===s;return p("div",{class:this.classes(c.base,l.widget)},!o&&p("calcite-button",{class:l.widgetButton,disabled:"disabled"===s,iconStart:t,kind:"neutral",label:e,onclick:this._toggle,title:e}))}};e([t()],a.prototype,"element",null),e([t({readOnly:!0})],a.prototype,"fullscreenTitle",null),e([t()],a.prototype,"icon",null),e([t()],a.prototype,"label",null),e([t(),n("esri/widgets/Fullscreen/t9n/Fullscreen")],a.prototype,"messages",void 0),e([t()],a.prototype,"view",null),e([t({type:r})],a.prototype,"viewModel",void 0),a=e([s("esri.widgets.Fullscreen")],a);const d=a;export{d as default};
package/widgets/Locate.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import{deprecatedProperty as o}from"../core/deprecate.js";import t from"../core/Logger.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import r from"./Widget.js";import l from"./Locate/LocateViewModel.js";import{loadCalciteComponents as n}from"./support/componentsUtils.js";import{globalCss as a}from"./support/globalCss.js";import{legacyIcon as c}from"./support/legacyIcon.js";import"./support/widgetUtils.js";import{messageBundle as p}from"./support/decorators/messageBundle.js";import{vmEvent as d}from"./support/decorators/vmEvent.js";import{tsx as m}from"./support/jsxFactory.js";const g={base:"esri-locate"},u="gps-off";let v=class extends r{constructor(e,o){super(e,o),this.messages=null,this.messagesCommon=null,this.viewModel=new l,this._locate=()=>{const{viewModel:e}=this;"locating"===e.state?e.cancelLocate():e.locate().catch((()=>{}))}}loadDependencies(){return n({button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}get geolocationOptions(){return this.viewModel.geolocationOptions}set geolocationOptions(e){this.viewModel.geolocationOptions=e}get goToLocationEnabled(){return this.viewModel.goToLocationEnabled}set goToLocationEnabled(e){this.viewModel.goToLocationEnabled=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get graphic(){return this.viewModel.graphic}set graphic(e){this.viewModel.graphic=e}get icon(){return"compass"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get popupEnabled(){return this.viewModel.popupEnabled}set popupEnabled(e){this.viewModel.popupEnabled=e}get rotationEnabled(){return o(t.getLogger(this),"rotationEnabled",{replacement:"use Track widget",version:"4.29",warnOnce:!0}),this.viewModel.rotationEnabled}set rotationEnabled(e){o(t.getLogger(this),"rotationEnabled",{replacement:"use Track widget",version:"4.29",warnOnce:!0}),this.viewModel.rotationEnabled=e}get scale(){return this.viewModel.scale}set scale(e){this.viewModel.scale=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}cancelLocate(){this.viewModel.cancelLocate()}locate(){return this.viewModel.locate()}render(){const{viewModel:e,icon:o}=this,{state:t}=e,i="locating"===t,s=i?this.messagesCommon.cancel:this.messages.title,r="feature-unsupported"===t,l=void 0===c?u:void 0,n=this._localizeError(this.viewModel?.error);return m("div",{class:this.classes(g.base,a.widget)},!r&&m("calcite-button",{class:a.widgetButton,disabled:"disabled"===t,iconStart:i?void 0:o??l,kind:"neutral",label:s,onclick:this._locate,title:s},i?m("calcite-loader",{inline:!0,label:""}):null),n?m("calcite-tooltip",{open:!0,overlayPositioning:"fixed",referenceElement:this.container},n):null)}_localizeError(e){return e instanceof GeolocationPositionError?e.code===GeolocationPositionError.PERMISSION_DENIED?this.messages?.permissionError:e.code===GeolocationPositionError.TIMEOUT?this.messages?.timeoutError:this.messages?.positionUnavailable:e instanceof Error?e.message:void 0}};e([i()],v.prototype,"geolocationOptions",null),e([i()],v.prototype,"goToLocationEnabled",null),e([i()],v.prototype,"goToOverride",null),e([i()],v.prototype,"graphic",null),e([i()],v.prototype,"icon",null),e([i()],v.prototype,"label",null),e([i(),p("esri/widgets/Locate/t9n/Locate")],v.prototype,"messages",void 0),e([i(),p("esri/t9n/common")],v.prototype,"messagesCommon",void 0),e([i()],v.prototype,"popupEnabled",null),e([i()],v.prototype,"rotationEnabled",null),e([i()],v.prototype,"scale",null),e([i()],v.prototype,"view",null),e([i({type:l}),d(["locate","locate-error"])],v.prototype,"viewModel",void 0),v=e([s("esri.widgets.Locate")],v);const h=v;export{h as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{deprecatedProperty as o}from"../core/deprecate.js";import t from"../core/Logger.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import r from"./Widget.js";import l from"./Locate/LocateViewModel.js";import{loadCalciteComponents as n}from"./support/componentsUtils.js";import{globalCss as a}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as c}from"./support/decorators/messageBundle.js";import{vmEvent as p}from"./support/decorators/vmEvent.js";import{tsx as d}from"./support/jsxFactory.js";const m={base:"esri-locate"};let g=class extends r{constructor(e,o){super(e,o),this.messages=null,this.messagesCommon=null,this.viewModel=new l,this._locate=()=>{const{viewModel:e}=this;"locating"===e.state?e.cancelLocate():e.locate().catch((()=>{}))}}loadDependencies(){return n({button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}get geolocationOptions(){return this.viewModel.geolocationOptions}set geolocationOptions(e){this.viewModel.geolocationOptions=e}get goToLocationEnabled(){return this.viewModel.goToLocationEnabled}set goToLocationEnabled(e){this.viewModel.goToLocationEnabled=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get graphic(){return this.viewModel.graphic}set graphic(e){this.viewModel.graphic=e}get icon(){return"gps-off"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get popupEnabled(){return this.viewModel.popupEnabled}set popupEnabled(e){this.viewModel.popupEnabled=e}get rotationEnabled(){return o(t.getLogger(this),"rotationEnabled",{replacement:"use Track widget",version:"4.29",warnOnce:!0}),this.viewModel.rotationEnabled}set rotationEnabled(e){o(t.getLogger(this),"rotationEnabled",{replacement:"use Track widget",version:"4.29",warnOnce:!0}),this.viewModel.rotationEnabled=e}get scale(){return this.viewModel.scale}set scale(e){this.viewModel.scale=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}cancelLocate(){this.viewModel.cancelLocate()}locate(){return this.viewModel.locate()}render(){const{viewModel:e,icon:o}=this,{state:t}=e,i="locating"===t,s=i?this.messagesCommon.cancel:this.messages.title,r="feature-unsupported"===t,l=this._localizeError(this.viewModel?.error);return d("div",{class:this.classes(m.base,a.widget)},!r&&d("calcite-button",{class:a.widgetButton,disabled:"disabled"===t,iconStart:i?void 0:o,kind:"neutral",label:s,onclick:this._locate,title:s},i?d("calcite-loader",{inline:!0,label:""}):null),l?d("calcite-tooltip",{open:!0,overlayPositioning:"fixed",referenceElement:this.container},l):null)}_localizeError(e){return e instanceof GeolocationPositionError?e.code===GeolocationPositionError.PERMISSION_DENIED?this.messages?.permissionError:e.code===GeolocationPositionError.TIMEOUT?this.messages?.timeoutError:this.messages?.positionUnavailable:e instanceof Error?e.message:void 0}};e([i()],g.prototype,"geolocationOptions",null),e([i()],g.prototype,"goToLocationEnabled",null),e([i()],g.prototype,"goToOverride",null),e([i()],g.prototype,"graphic",null),e([i()],g.prototype,"icon",null),e([i()],g.prototype,"label",null),e([i(),c("esri/widgets/Locate/t9n/Locate")],g.prototype,"messages",void 0),e([i(),c("esri/t9n/common")],g.prototype,"messagesCommon",void 0),e([i()],g.prototype,"popupEnabled",null),e([i()],g.prototype,"rotationEnabled",null),e([i()],g.prototype,"scale",null),e([i()],g.prototype,"view",null),e([i({type:l}),p(["locate","locate-error"])],g.prototype,"viewModel",void 0),g=e([s("esri.widgets.Locate")],g);const u=g;export{u as default};
package/widgets/Track.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../chunks/tslib.es6.js";import{property as e}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as t}from"../core/accessorSupport/decorators/subclass.js";import i from"./Widget.js";import{loadCalciteComponents as r}from"./support/componentsUtils.js";import{globalCss as s}from"./support/globalCss.js";import{legacyIcon as n}from"./support/legacyIcon.js";import"./support/widgetUtils.js";import{messageBundle as a}from"./support/decorators/messageBundle.js";import{vmEvent as l}from"./support/decorators/vmEvent.js";import{tsx as c}from"./support/jsxFactory.js";import p from"./Track/TrackViewModel.js";const d={base:"esri-track"},g="compass-north-circle";let u=class extends i{constructor(o,e){super(o,e),this.messages=null,this.viewModel=new p,this._toggleTracking=()=>{const o=this.viewModel;o&&"feature-unsupported"!==o.state&&"disabled"!==o.state&&("tracking"!==o.state&&"waiting"!==o.state?this.viewModel.start():this.viewModel.stop())}}loadDependencies(){return r({button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}get geolocationOptions(){return this.viewModel.geolocationOptions}set geolocationOptions(o){this.viewModel.geolocationOptions=o}get goToLocationEnabled(){return this.viewModel.goToLocationEnabled}set goToLocationEnabled(o){this.viewModel.goToLocationEnabled=o}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(o){this.viewModel.goToOverride=o}get graphic(){return this.viewModel.graphic}set graphic(o){this.viewModel.graphic=o}get icon(){return"compass-north-circle"}set icon(o){this._overrideIfSome("icon",o)}get label(){return this.messages?.widgetLabel??""}set label(o){this._overrideIfSome("label",o)}get rotationEnabled(){return this.viewModel.rotationEnabled}set rotationEnabled(o){this.viewModel.rotationEnabled=o}get scale(){return this.viewModel.scale}set scale(o){this.viewModel.scale=o}get tracking(){return this.viewModel.tracking}get view(){return this.viewModel.view}set view(o){this.viewModel.view=o}start(){this.viewModel.start()}stop(){this.viewModel.stop()}render(){const{viewModel:o,messages:e,icon:t}=this,i=o?.state,r="tracking"===i,a=this._localizeError(this.viewModel?.error),l=(r?e?.stopTracking:e?.startTracking)??"",p="feature-unsupported"===i,u=("tracking"===i?"pause":void 0)??t,m=void 0===n?g:void 0;return c("div",{class:this.classes(d.base,s.widget)},!p&&c("calcite-button",{class:s.widgetButton,disabled:"disabled"===i,iconStart:u??m,kind:"neutral",label:l,loading:"waiting"===i,onclick:this._toggleTracking,title:l}),a?c("calcite-tooltip",{open:!0,overlayPositioning:"fixed",referenceElement:this.container},a):null)}_localizeError(o){return o instanceof GeolocationPositionError?o.code===GeolocationPositionError.PERMISSION_DENIED?this.messages?.permissionError:o.code===GeolocationPositionError.TIMEOUT?this.messages?.timeoutError:this.messages?.positionUnavailable:o instanceof Error?o.message:void 0}};o([e()],u.prototype,"geolocationOptions",null),o([e()],u.prototype,"goToLocationEnabled",null),o([e()],u.prototype,"goToOverride",null),o([e()],u.prototype,"graphic",null),o([e()],u.prototype,"icon",null),o([e()],u.prototype,"label",null),o([e(),a("esri/widgets/Track/t9n/Track")],u.prototype,"messages",void 0),o([e()],u.prototype,"rotationEnabled",null),o([e()],u.prototype,"scale",null),o([e({readOnly:!0})],u.prototype,"tracking",null),o([e()],u.prototype,"view",null),o([e({type:p}),l(["track","track-error"])],u.prototype,"viewModel",void 0),u=o([t("esri.widgets.Track")],u);const m=u;export{m as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{property as o}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as t}from"../core/accessorSupport/decorators/subclass.js";import i from"./Widget.js";import{loadCalciteComponents as r}from"./support/componentsUtils.js";import{globalCss as s}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as n}from"./support/decorators/messageBundle.js";import{vmEvent as a}from"./support/decorators/vmEvent.js";import{tsx as l}from"./support/jsxFactory.js";import c from"./Track/TrackViewModel.js";const p={base:"esri-track"};let d=class extends i{constructor(e,o){super(e,o),this.messages=null,this.viewModel=new c,this._toggleTracking=()=>{const e=this.viewModel;e&&"feature-unsupported"!==e.state&&"disabled"!==e.state&&("tracking"!==e.state&&"waiting"!==e.state?this.viewModel.start():this.viewModel.stop())}}loadDependencies(){return r({button:()=>import("@esri/calcite-components/dist/components/calcite-button.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}get geolocationOptions(){return this.viewModel.geolocationOptions}set geolocationOptions(e){this.viewModel.geolocationOptions=e}get goToLocationEnabled(){return this.viewModel.goToLocationEnabled}set goToLocationEnabled(e){this.viewModel.goToLocationEnabled=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get graphic(){return this.viewModel.graphic}set graphic(e){this.viewModel.graphic=e}get icon(){return"compass-north-circle"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get rotationEnabled(){return this.viewModel.rotationEnabled}set rotationEnabled(e){this.viewModel.rotationEnabled=e}get scale(){return this.viewModel.scale}set scale(e){this.viewModel.scale=e}get tracking(){return this.viewModel.tracking}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}start(){this.viewModel.start()}stop(){this.viewModel.stop()}render(){const{viewModel:e,messages:o,icon:t}=this,i=e?.state,r="tracking"===i,n=this._localizeError(this.viewModel?.error),a=(r?o?.stopTracking:o?.startTracking)??"",c="feature-unsupported"===i,d=("tracking"===i?"pause":void 0)??t;return l("div",{class:this.classes(p.base,s.widget)},!c&&l("calcite-button",{class:s.widgetButton,disabled:"disabled"===i,iconStart:d,kind:"neutral",label:a,loading:"waiting"===i,onclick:this._toggleTracking,title:a}),n?l("calcite-tooltip",{open:!0,overlayPositioning:"fixed",referenceElement:this.container},n):null)}_localizeError(e){return e instanceof GeolocationPositionError?e.code===GeolocationPositionError.PERMISSION_DENIED?this.messages?.permissionError:e.code===GeolocationPositionError.TIMEOUT?this.messages?.timeoutError:this.messages?.positionUnavailable:e instanceof Error?e.message:void 0}};e([o()],d.prototype,"geolocationOptions",null),e([o()],d.prototype,"goToLocationEnabled",null),e([o()],d.prototype,"goToOverride",null),e([o()],d.prototype,"graphic",null),e([o()],d.prototype,"icon",null),e([o()],d.prototype,"label",null),e([o(),n("esri/widgets/Track/t9n/Track")],d.prototype,"messages",void 0),e([o()],d.prototype,"rotationEnabled",null),e([o()],d.prototype,"scale",null),e([o({readOnly:!0})],d.prototype,"tracking",null),e([o()],d.prototype,"view",null),e([o({type:c}),a(["track","track-error"])],d.prototype,"viewModel",void 0),d=e([t("esri.widgets.Track")],d);const g=d;export{g as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[591],{38961:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(90237),n=r(5503),s=(r(60999),r(49186),r(53966),r(14012),r(80559)),o=r(10107),a=r(40608);let l=class extends n.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,s.fm)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new n.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.MZ)()],l.prototype,"getCollections",void 0),(0,i._)([(0,o.MZ)()],l.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.MZ)()],l.prototype,"itemFilterFunction",void 0),l=(0,i._)([(0,a.$)("esri.core.CollectionFlattener")],l);const u=l},39516:(e,t,r)=>{async function i(e,t){const{WhereClause:i}=await Promise.all([r.e(835),r.e(4800)]).then(r.bind(r,50835));return i.create(e,t)}function n(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>i,m:()=>n})},3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>o,Y4:()=>s});var i=r(96285);class n{}function s(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return s(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>m,Ej:()=>p,Hq:()=>u,Ie:()=>h,Jt:()=>f,Ne:()=>y,RF:()=>a,aI:()=>b,fA:()=>s,hZ:()=>c,iT:()=>l,is:()=>g,qv:()=>w,vI:()=>d,v_:()=>S,vt:()=>n,w1:()=>o});var i=r(5443);function n(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,o,a=n()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=s,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?c(e,w):n(w)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function m(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function b(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];n()},98534:(e,t,r)=>{r.d(t,{V:()=>b});var i=r(90237),n=r(78888),s=r(91869),o=r(74887),a=r(84952),l=r(46140),u=r(10107),p=(r(44208),r(53966),r(87811),r(36005)),y=r(40608),d=r(35666),c=r(5443),h=r(16930),f=r(60694),m=r(10873),g=r(10407);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,n="tile"!==i&&!!t.supportsDynamicLayers,s=r.includes("query"),o=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),p=r.includes("data"),y="tile"!==i&&(!t.tileInfo||n),d="tile"!==i&&(!t.tileInfo||n),c="tile"!==i,h=t.cimVersion&&l.R.parse(t.cimVersion),f=h?.since(1,4)??!1,m=h?.since(2,0)??!1;return{operations:{supportsExportMap:o,supportsExportTiles:a,supportsIdentify:s,supportsQuery:p,supportsTileMap:u},exportMap:o?{supportsArcadeExpressionForLabeling:f,supportsSublayersChanges:c,supportsDynamicLayers:n,supportsSublayerVisibility:y,supportsSublayerDefinitionExpression:d,supportsCIMSymbols:m}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,g.bK)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then((e=>e.find((e=>"Feature Service"===e.type))??null),(()=>null)));const r=await this._relatedFeatureServicePromise;return(0,o.Te)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,g.bK)(this.portalItem)&&e.originIdOf("url")<d.Gr.SERVICE){const i=await this.fetchRelatedService(t);i&&(e.url=(0,a.fj)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let s;if("data-layer"===r.type)s=(await(0,n.A)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>d.Gr.SERVICE)try{const e=await this._fetchAllLayersAndTablesFromService(i),t=(0,f.qg)(i)?.sublayer??r.mapLayerId;s=e.get(t)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{s=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return s}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,f.qg)(e),i=(0,s.tE)(this._allLayersAndTablesMap,r?.url.path,(()=>(0,n.A)((0,a.fj)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{const t=new Map,{layers:r,tables:i}=e.data,n=[...r??[],...i??[]];for(const e of n)t.set(e.id,e);return{result:t}}),(e=>({error:e}))))),l=await i;if((0,o.Te)(t),"result"in l)return l.result;throw l.error}};return(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,p.w)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.MZ)({type:c.A})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.MZ)(m.id)],t.prototype,"id",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,u.MZ)(m.M6)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,u.MZ)({type:h.A})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,p.w)("version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,y.$)("esri.layers.mixins.ArcGISMapService")],t),t}},91921:(e,t,r)=>{r.d(t,{I:()=>g});var i=r(90237),n=r(5503),s=r(38961),o=r(49186),a=r(53966),l=r(36708),u=r(10107),p=(r(44208),r(87811),r(88620)),y=r(40608),d=r(35666),c=r(60410),h=r(63389);const f=n.A.ofType(c.A);function m(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&m(e.sublayers,t)}))}const g=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new s.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[d.Gr.SERVICE]:{},[d.Gr.PORTAL_ITEM]:{},[d.Gr.WEB_SCENE]:{},[d.Gr.WEB_MAP]:{}},this.subtables=null,this.addHandles([(0,l.wB)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),l.OH),(0,l.wB)((()=>this.subtables),((e,t)=>this._handleSublayersChange(e,t)),l.OH)])}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,d.aB)(t.origin);if(i<d.Gr.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>d.Gr.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:n,origin:s}=this.createSublayersForOrigin("web-document"),o=(0,p.oY)(this);o.setDefaultOrigin(s),this._set("sublayers",new f(n)),o.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,d.aB)("web-document"===e?"web-map":e);let r=d.Gr.SERVICE,i=this.sublayersSourceJSON[d.Gr.SERVICE].layers,n=this.sublayersSourceJSON[d.Gr.SERVICE].context,s=null;const o=[d.Gr.PORTAL_ITEM,d.Gr.WEB_SCENE,d.Gr.WEB_MAP].filter((e=>e<=t));for(const e of o){const t=this.sublayersSourceJSON[e];(0,h._X)(t.layers)&&(r=e,i=t.layers,n=t.context,t.visibleLayers&&(s={visibleLayers:t.visibleLayers,context:t.context}))}const a=[d.Gr.PORTAL_ITEM,d.Gr.WEB_SCENE,d.Gr.WEB_MAP].filter((e=>e>r&&e<=t));let l=null;for(const e of a){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(l={layers:t,context:i}),r&&(s={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const n=new c.A;if(n.read(e,t),i[n.id]=n,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(n)}else r.unshift(n)})),r):r}(i,n),p=new Map,y=new Set;if(l)for(const e of l.layers)p.set(e.id,e);if(s?.visibleLayers)for(const e of s.visibleLayers)y.add(e);return m(u,(e=>{l&&e.read(p.get(e.id),l.context),s&&e.read({defaultVisibility:y.has(e.id)},s.context)})),{origin:(0,d.OL)(r),sublayers:new f({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",(e=>{a.A.getLogger("esri.layers.TileLayer").error(new o.A("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.MZ)({readOnly:!0,type:n.A.ofType(c.A)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.MZ)({value:null,type:f,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),(0,i._)([(0,u.MZ)({type:f,json:{read:{source:"tables"}}})],t.prototype,"subtables",void 0),t=(0,i._)([(0,y.$)("esri.layers.mixins.SublayersOwner")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),n=r(69540),s=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(72088),y=r(29005);let d=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,i._)([(0,o.MZ)({type:[y.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],d);const c=d},20437:(e,t,r)=>{r.d(t,{A:()=>m});var i,n=r(90237),s=r(66552),o=r(25482),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(93223)),p=r(36005),y=r(40608),d=r(72088),c=r(98453);const h=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=i=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,n._)([(0,a.MZ)()],f.prototype,"description",void 0),(0,n._)([(0,p.w)("description")],f.prototype,"readDescription",null),(0,n._)([(0,a.MZ)({types:d.gK,json:{read:{reader:d.rS},write:!0}})],f.prototype,"domain",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,n._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,n._)([(0,u.e)(c.m)],f.prototype,"type",void 0),(0,n._)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,n._)([(0,p.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,n._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,n._)([(0,y.$)("esri.layers.support.Field")],f);const m=f},95466:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(49186),n=r(25482),s=r(53966),o=r(91869),a=r(3330),l=r(30524),u=r(56400),p=r(96285);const y=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],m(e))}static fromLayerJSON(e){return new d(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=c(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(c(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(y,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function c(e){return e.trim().toLowerCase()}function h(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,u.ZS)(n.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,y=new Map([[c(n?.creationDateField??""),l],[c(n?.editDateField??""),l],[c(s),p],[c(o),p]]);for(const{name:i,type:n}of e.fields)if(f.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=y.get(c(i??""))??a;t.set(i,e)}return t}},60410:(e,t,r)=>{r.d(t,{A:()=>te});var i,n=r(90237),s=(r(59456),r(13874)),o=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494),r(15036)),a=r(78888),l=r(61147),u=r(5503),p=r(49186),y=r(44208),d=r(4902),c=r(4718),h=r(92474),f=r(53966),m=r(92071),g=r(39516),b=r(84952),w=r(10107),S=r(79901),v=r(36005),_=r(40608),I=r(43937),x=r(56507),F=r(35666),M=r(88620),T=r(93622),A=r(15426),E=r(33143),O=r(20437),L=r(95466),Z=r(30524),D=r(81457),N=r(39383),P=r(37352),R=r(45067),V=r(22453),j=r(27733),C=r(49053),q=r(2272),G=r(54546),B=r(61956),$=r(30291),k=r(5443),J=r(16930),z=r(50498);function Q(e){return"esriSMS"===e?.type}function U(e,t,r){const i=this.originIdOf(t)>=(0,F.aB)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function K(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(r.origin&&this.originIdOf(t)>=(0,F.aB)(r.origin)||this._isOverridden(t))}}function H(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function Y(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,F.aB)(r.origin))}}let W=0;const X=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let ee=i=class extends((0,m.P)((0,d.sA)(h.A))){constructor(e){super(e),this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new p.A("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,a.A)(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service",layer:t,url:(0,q.Dl)(r)}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{operations:{supportsQuery:r,supportsQueryAttachments:i},query:{supportsFormatPBF:n,supportsOrderBy:s,supportsPagination:o},data:{supportsAttachment:a},queryRelated:l}=(0,V.S)(t,this.url);return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r,supportsQueryAttachments:i},data:{supportsAttachment:a},query:{supportsFormatPBF:n,supportsOrderBy:s,supportsPagination:o},queryRelated:l}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readMaxScaleRange(e,t){return{minScale:(t=t.layerDefinition||t).minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new L.A(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){return this._get("id")??W++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;const r=t.fields?.find((e=>"esriFieldTypeOID"===e.type));return r?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const{layerDefinition:r}=t;return 1-.01*(r?.transparency??r?.drawingInfo?.transparency??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,x.Vr)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:t,layer:r,url:i}=this,{spatialReference:n}=r,s="gdbVersion"in r?r.gdbVersion:void 0,o=(0,y.A)("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new T.A({fieldsIndex:t,gdbVersion:s,pbfSupported:o,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:n,url:i})}set renderer(e){if((0,Z.yp)(e,this.fieldsIndex),e)for(const t of e.getSymbols())if((0,l.wk)(t)){f.A.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new C.f({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,x.dp)(u.A.ofType(i),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTitle(e,t){return t.layerDefinition?.name??t.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,b.x0)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,M.oY)(this),t=new i;return(0,M.oY)(t).store=e.clone(X),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,$.tn)(this,e)}createQuery(){return new B.A({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=(await Promise.all([r.e(5894),r.e(620),r.e(3600),r.e(3069)]).then(r.bind(r,13600))).default,{layer:t,url:i}=this;let n;if(i&&this.originIdOf("url")>F.Gr.SERVICE)n=new e({url:i});else{if(!t?.parsedUrl)throw new p.A("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const r=t.parsedUrl;n=new e({url:r.path}),r&&this.source&&("map-layer"===this.source.type?n.layerId=this.source.mapLayerId:n.dynamicDataSource=this.source)}}return null!=t?.refreshInterval&&(n.refreshInterval=t.refreshInterval),this.definitionExpression&&(n.definitionExpression=this.definitionExpression),this.floorInfo&&(n.floorInfo=(0,c.o8)(this.floorInfo)),this.originIdOf("labelingInfo")>F.Gr.SERVICE&&(n.labelingInfo=(0,c.o8)(this.labelingInfo)),this.originIdOf("labelsVisible")>F.Gr.DEFAULTS&&(n.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>F.Gr.DEFAULTS&&(n.legendEnabled=this.legendEnabled),this.originIdOf("visible")>F.Gr.DEFAULTS&&(n.visible=this.visible),this.originIdOf("minScale")>F.Gr.DEFAULTS&&(n.minScale=this.minScale),this.originIdOf("maxScale")>F.Gr.DEFAULTS&&(n.maxScale=this.maxScale),this.originIdOf("opacity")>F.Gr.DEFAULTS&&(n.opacity=this.opacity),this.originIdOf("popupTemplate")>F.Gr.DEFAULTS&&(n.popupTemplate=(0,c.o8)(this.popupTemplate)),this.originIdOf("renderer")>F.Gr.SERVICE&&(n.renderer=(0,c.o8)(this.renderer)),"data-layer"===this.source?.type&&(n.dynamicDataSource=this.source.clone()),this.originIdOf("title")>F.Gr.DEFAULTS&&(n.title=this.title),"map-image"===t?.type&&t.originIdOf("customParameters")>F.Gr.DEFAULTS&&(n.customParameters=t.customParameters),"tile"===t?.type&&t.originIdOf("customParameters")>F.Gr.DEFAULTS&&(n.customParameters=t.customParameters),n}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return(0,A.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=G.A.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new p.A("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:n,globalIds:s,num:o,size:a,start:l,where:u}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||s?.length>0||a?.length>0||o||l||u))throw new p.A("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(n?.length||s?.length||u))throw new p.A("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,t)}async queryFeatureCount(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryFeatureCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features)for(const e of r.features)e.sourceLayer=this;return r}async queryObjectIds(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryObjectIds:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeatures(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryRelatedFeatures:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new p.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new p.A("queryRelatedFeaturesCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,g.m)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),n=Object.keys(i).some((e=>i[e]>F.Gr.SERVICE));if(n){const e=t.drawingInfo={};if(i.renderer>F.Gr.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>F.Gr.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>F.Gr.SERVICE)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some((e=>!e.labelPlacement))&&f.A.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,N.z)(this.labelingInfo,z.g.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=t.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer})))}else e.showLabels=!1;i.opacity>F.Gr.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)Q(e.symbol)&&t(e.symbol);"symbol"in e&&Q(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&Q(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let n,s;switch(e){case"definitionExpression":case"floorInfo":n="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":n="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":n="supportsDynamicLayers",s="supportsModification"}const o=(0,M.oY)(this).getDefaultOrigin();if("service"!==o){if(n&&!1===this.layer?.capabilities?.exportMap?.[n])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${n}'`);if(s&&!1===this.capabilities?.exportMap[s])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${s}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==o&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeAllHandles()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(f.A.getLogger(this).error(new p.A("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;f.A.getLogger(i).error(new p.A("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}};ee.test={isMapImageLayerOverridePolicy:e=>e===H||e===U,isTileImageLayerOverridePolicy:e=>e===K},(0,n._)([(0,w.MZ)({readOnly:!0})],ee.prototype,"capabilities",void 0),(0,n._)([(0,v.w)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],ee.prototype,"readCapabilities",null),(0,n._)([(0,w.MZ)()],ee.prototype,"defaultPopupTemplate",null),(0,n._)([(0,w.MZ)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:U}}})],ee.prototype,"definitionExpression",null),(0,n._)([(0,w.MZ)({readOnly:!0})],ee.prototype,"effectiveScaleRange",null),(0,n._)([(0,v.w)("service","maxScaleRange",["minScale","maxScale"])],ee.prototype,"readMaxScaleRange",null),(0,n._)([(0,w.MZ)({type:[O.A],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],ee.prototype,"fields",void 0),(0,n._)([(0,w.MZ)({readOnly:!0})],ee.prototype,"fieldsIndex",null),(0,n._)([(0,w.MZ)({type:P.A,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:U},origins:{"web-scene":{read:!1,write:!1}}}})],ee.prototype,"floorInfo",null),(0,n._)([(0,w.MZ)({type:k.A,json:{read:{source:"layerDefinition.extent"}}})],ee.prototype,"fullExtent",void 0),(0,n._)([(0,w.MZ)({type:z.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:z.g.read}}}}})],ee.prototype,"geometryType",void 0),(0,n._)([(0,w.MZ)({type:String})],ee.prototype,"globalIdField",void 0),(0,n._)([(0,v.w)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ee.prototype,"readGlobalIdFieldFromService",null),(0,n._)([(0,w.MZ)({type:x.jz,json:{write:{ignoreOrigin:!0}}})],ee.prototype,"id",null),(0,n._)([(0,w.MZ)({value:null,type:[D.A],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:H}}})],ee.prototype,"labelingInfo",null),(0,n._)([(0,I.K)("labelingInfo")],ee.prototype,"writeLabelingInfo",null),(0,n._)([(0,w.MZ)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:H}}})],ee.prototype,"labelsVisible",null),(0,n._)([(0,w.MZ)({value:null})],ee.prototype,"layer",null),(0,n._)([(0,w.MZ)({type:String,json:{write:{overridePolicy:K}}})],ee.prototype,"layerItemId",void 0),(0,n._)([(0,w.MZ)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:Y}}})],ee.prototype,"legendEnabled",void 0),(0,n._)([(0,w.MZ)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],ee.prototype,"listMode",null),(0,n._)([(0,w.MZ)({type:Number,value:0,json:{write:{overridePolicy:H}}})],ee.prototype,"minScale",null),(0,n._)([(0,v.w)("minScale",["minScale","layerDefinition.minScale"])],ee.prototype,"readMinScale",null),(0,n._)([(0,w.MZ)({type:Number,value:0,json:{write:{overridePolicy:H}}})],ee.prototype,"maxScale",null),(0,n._)([(0,v.w)("maxScale",["maxScale","layerDefinition.maxScale"])],ee.prototype,"readMaxScale",null),(0,n._)([(0,w.MZ)({type:String})],ee.prototype,"objectIdField",void 0),(0,n._)([(0,v.w)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ee.prototype,"readObjectIdFieldFromService",null),(0,n._)([(0,w.MZ)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:H}}})],ee.prototype,"opacity",null),(0,n._)([(0,v.w)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],ee.prototype,"readOpacity",null),(0,n._)([(0,I.K)("opacity")],ee.prototype,"writeOpacity",null),(0,n._)([(0,w.MZ)({json:{type:x.jz,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:H}}})],ee.prototype,"parent",void 0),(0,n._)([(0,I.K)("parent")],ee.prototype,"writeParent",null),(0,n._)([(0,w.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:Y,writer(e,t,r){t[r]=!e}}}})],ee.prototype,"popupEnabled",void 0),(0,n._)([(0,w.MZ)({type:s.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:Y}}})],ee.prototype,"popupTemplate",void 0),(0,n._)([(0,w.MZ)({readOnly:!0})],ee.prototype,"queryTask",null),(0,n._)([(0,w.MZ)({type:[R.A],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],ee.prototype,"relationships",void 0),(0,n._)([(0,w.MZ)({types:o.H,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:H},origins:{"web-scene":{types:o.X,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:H}}}}})],ee.prototype,"renderer",null),(0,n._)([(0,w.MZ)({types:{key:"type",base:null,typeMap:{"data-layer":j.L,"map-layer":C.f}},cast(e){if(e){if("mapLayerId"in e)return(0,x.PZ)(C.f,e);if("dataSource"in e)return(0,x.PZ)(j.L,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:H}}})],ee.prototype,"source",null),(0,n._)([(0,w.MZ)()],ee.prototype,"sourceJSON",void 0),(0,n._)([(0,w.MZ)({type:J.A,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],ee.prototype,"spatialReference",void 0),(0,n._)([(0,w.MZ)({value:null,json:{type:[x.jz],write:{target:"subLayerIds",allowNull:!0,overridePolicy:H}}})],ee.prototype,"sublayers",null),(0,n._)([(0,S.w)("sublayers")],ee.prototype,"castSublayers",null),(0,n._)([(0,I.K)("sublayers")],ee.prototype,"writeSublayers",null),(0,n._)([(0,w.MZ)({type:String,json:{name:"name",write:{overridePolicy:Y}}})],ee.prototype,"title",void 0),(0,n._)([(0,v.w)("service","title",["name","layerDefinition.name"])],ee.prototype,"readTitle",null),(0,n._)([(0,w.MZ)({type:String})],ee.prototype,"typeIdField",void 0),(0,n._)([(0,w.MZ)({json:{read:!1},readOnly:!0,value:"sublayer"})],ee.prototype,"type",void 0),(0,n._)([(0,v.w)("typeIdField",["layerDefinition.typeIdField"])],ee.prototype,"readTypeIdField",null),(0,n._)([(0,w.MZ)({type:[E.A],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],ee.prototype,"types",void 0),(0,n._)([(0,w.MZ)({type:String,json:{name:"layerUrl",write:{overridePolicy:K}}})],ee.prototype,"url",null),(0,n._)([(0,w.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:H}}})],ee.prototype,"visible",null),(0,n._)([(0,I.K)("visible")],ee.prototype,"writeVisible",null),ee=i=(0,n._)([(0,_.$)("esri.layers.support.Sublayer")],ee);const te=ee},72088:(e,t,r)=>{r.d(t,{rS:()=>x,gK:()=>I}),r(44208);var i,n=r(90237),s=r(4718),o=r(10107),a=(r(53966),r(93223)),l=r(40608),u=r(25482);r(87811);let p=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,n._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValue")],p);const y=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,a.e)(y)],d.prototype,"type",void 0),d=(0,n._)([(0,l.$)("esri.layers.support.Domain")],d);const c=d;var h;let f=h=class extends c{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,o.MZ)({type:[p],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,n._)([(0,a.e)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=h=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],f);const m=f;var g;r(49186);let b=g=class extends c{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,n._)([(0,a.e)({inherited:"inherited"})],b.prototype,"type",void 0),b=g=(0,n._)([(0,l.$)("esri.layers.support.InheritedDomain")],b);const w=b;var S;let v=S=class extends c{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new S({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],v.prototype,"maxValue",void 0),(0,n._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],v.prototype,"minValue",void 0),(0,n._)([(0,a.e)({range:"range"})],v.prototype,"type",void 0),v=S=(0,n._)([(0,l.$)("esri.layers.support.RangeDomain")],v);const _=v,I={key:"type",base:c,typeMap:{range:v,"coded-value":m,inherited:w}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},33446:(e,t,r)=>{r.d(t,{C:()=>o,m:()=>s});var i=r(49186),n=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.Te)(r),s}async function o(e,t,r,s,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,n.Te)(o),a}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>h,XJ:()=>f,lc:()=>c,mX:()=>b,rU:()=>g,tH:()=>I});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),p='"',y=p+" + ",d=" + "+p;function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return I(t.expression)}return null}function b(e){let t;return e?(t=(0,i.HC)(e,(e=>n+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(o,y).replaceAll(a,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,S=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,_=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function I(e){if(!e)return null;let t=S.exec(e)||v.exec(e);return t?t[1]||t[3]:(t=_.exec(e),t?t[2]:null)}},63389:(e,t,r)=>{r.d(t,{Sk:()=>s,Zx:()=>n,_X:()=>a});var i=r(35666);function n(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!o(e,t)}function s(e,t,r){return!!e.some((e=>{const t=e.source,n=!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r);return e.commitProperty("renderer"),e.commitProperty("labelingInfo"),e.commitProperty("opacity"),e.commitProperty("labelsVisible"),!n||e.originIdOf("renderer")>i.Gr.SERVICE||e.originIdOf("labelingInfo")>i.Gr.SERVICE||e.originIdOf("opacity")>i.Gr.SERVICE||e.originIdOf("labelsVisible")>i.Gr.SERVICE}))||!o(e,t)}function o(e,t){if(!e?.length||null==t)return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let i=0;const n=r.length;for(const{id:t}of e){for(;i<n&&r[i]!==t;)i++;if(i>=n)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||null!=e.layerDefinition?.minScale))}},58501:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(90237),s=r(59456),o=r(52106),a=r(66552),l=r(25482),u=r(4718),p=r(10107),y=(r(44208),r(53966),r(36005)),d=r(40608),c=r(43937),h=r(16930),f=r(65864),m=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],s=o.A.fromJSON(n),a=n.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=n.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(s)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+i),(e=>n-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,f.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,f.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.MZ)({type:[o.A],json:{write:!0}})],b.prototype,"features",void 0),(0,n._)([(0,y.w)("features")],b.prototype,"readFeatures",null),(0,n._)([(0,p.MZ)({type:[m.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,n._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,n._)([(0,c.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,n._)([(0,p.MZ)({types:s.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,n._)([(0,y.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,n._)([(0,p.MZ)({type:h.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,n._)([(0,c.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,n._)([(0,p.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,n._)([(0,d.$)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const w=b}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7656],{70668:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),s=r(69540),o=r(25482),a=r(88930),n=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),d=r(40608),u=r(73133);let p=class extends((0,s.O)(o.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,a.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.e)(u.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i._)([(0,d.$)("esri.TimeInterval")],p);const y=p},83960:(e,t,r)=>{r.d(t,{X_:()=>a,zx:()=>n});var i=r(34727),s=r(83047);const o=96;function a(e,t){const r=t||e.extent,i=e.width,a=(0,s.GA)(r?.spatialReference);return r&&i?r.width/i*a*s.dy*o:0}function n(e,t,r){return function(e,t){return 0===t||(0,i.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.Sp)(e,t)||e>t}(e,r)}},7656:(e,t,r)=>{r.r(t),r.d(t,{default:()=>C});var i=r(90237),s=r(78888),o=r(60945),a=r(49186),n=r(81583),l=r(92071),d=r(74887),u=r(10107),p=r(56507),y=(r(87811),r(44208),r(36005)),m=r(40608),c=r(43937),h=r(35666),f=r(5443),v=r(83960),g=r(21325),b=r(4146),_=r(52136),x=r(98534),w=r(18768),S=r(63074),I=r(69208),M=r(16131),T=r(8303),Z=r(54310),O=r(25036),E=r(91921),A=r(82935),L=r(10873),F=r(69622),N=r(39516);function P(e,t){return"floorInfo"in t&&t.floorInfo?.floorField?function(e,t){if(!e?.length)return null;const r=e.filter((e=>""!==e)).map((e=>`'${e}'`));return r.push("''"),`${t} IN (${r.join(",")}) OR ${t} IS NULL`}(e,t.floorInfo.floorField):null}r(53966);var U=r(63389);const j={visible:"visibleSublayers",definitionExpression:"layerDefs",labelingInfo:"hasDynamicLayers",labelsVisible:"hasDynamicLayers",opacity:"hasDynamicLayers",minScale:"visibleSublayers",maxScale:"visibleSublayers",renderer:"hasDynamicLayers",source:"hasDynamicLayers"};let D=class extends F.A{constructor(e){super(e),this.floors=null,this.scale=0}destroy(){this.layer=null}get dynamicLayers(){if(!this.hasDynamicLayers)return null;const e=this.visibleSublayers.map((e=>{const t=P(this.floors,e);return e.toExportImageJSON(t)}));return e.length?JSON.stringify(e):null}get hasDynamicLayers(){return this.layer&&(0,U.Sk)(this.visibleSublayers,this.layer.serviceSublayers,this.layer.gdbVersion)}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.allSublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("sublayer-update",(e=>this.notifyChange(j[e.propertyName])))],"layer"))}get layers(){const e=this.visibleSublayers;return e?e.length?"show:"+e.map((e=>e.id)).join(","):"show:-1":null}get layerDefs(){const e=!!this.floors?.length,t=this.visibleSublayers.filter((t=>null!=t.definitionExpression||e&&null!=t.floorInfo));return t.length?JSON.stringify(t.reduce(((e,t)=>{const r=P(this.floors,t),i=(0,N.m)(r,t.definitionExpression);return null!=i&&(e[t.id]=i),e}),{})):null}get version(){this.commitProperty("layers"),this.commitProperty("layerDefs"),this.commitProperty("dynamicLayers");const e=this.layer;return e&&(e.commitProperty("dpi"),e.commitProperty("imageFormat"),e.commitProperty("imageTransparency"),e.commitProperty("gdbVersion")),(this._get("version")||0)+1}get visibleSublayers(){const e=[];if(!this.layer)return e;const t=this.layer.sublayers,r=this.scale,i=t=>{t.visible&&(0===r||(0,v.zx)(r,t.minScale,t.maxScale))&&(t.sublayers?t.sublayers.forEach(i):e.unshift(t))};t&&t.forEach(i);const s=this._get("visibleSublayers");return!s||s.length!==e.length||s.some(((t,r)=>e[r]!==t))?e:s}toJSON(){const e=this.layer;let t={dpi:e.dpi,format:e.imageFormat,transparent:e.imageTransparency,gdbVersion:e.gdbVersion||null};return this.hasDynamicLayers&&this.dynamicLayers?t.dynamicLayers=this.dynamicLayers:t={...t,layers:this.layers,layerDefs:this.layerDefs},t}};(0,i._)([(0,u.MZ)({readOnly:!0})],D.prototype,"dynamicLayers",null),(0,i._)([(0,u.MZ)()],D.prototype,"floors",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],D.prototype,"hasDynamicLayers",null),(0,i._)([(0,u.MZ)()],D.prototype,"layer",null),(0,i._)([(0,u.MZ)({readOnly:!0})],D.prototype,"layers",null),(0,i._)([(0,u.MZ)({readOnly:!0})],D.prototype,"layerDefs",null),(0,i._)([(0,u.MZ)({type:Number})],D.prototype,"scale",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],D.prototype,"version",null),(0,i._)([(0,u.MZ)({readOnly:!0})],D.prototype,"visibleSublayers",null),D=(0,i._)([(0,m.$)("esri.layers.support.ExportImageParameters")],D);var J=r(33446),R=r(60410),k=r(91908),V=r(56400);let $=class extends((0,S.dM)((0,A.e)((0,O.j)((0,E.I)((0,x.V)((0,w.b)((0,M.q)((0,T.A)((0,l.P)((0,Z.J)((0,_.p)((0,I.d)(b.A))))))))))))){constructor(...e){super(...e),this._exportImageParameters=new D({layer:this}),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(d.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}destroy(){this._exportImageParameters.destroy()}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("PNG32")?"png32":"png24"}writeSublayers(e,t,r,i){if(!this.loaded||!e)return;const s=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray();let o=!1;const a=(0,h.aB)(i.origin);if(this.capabilities?.operations.supportsExportMap&&this.capabilities?.exportMap?.supportsDynamicLayers)if(a===h.Gr.PORTAL_ITEM){const e=this.createSublayersForOrigin("service").sublayers;o=(0,U.Zx)(s,e,h.Gr.SERVICE)}else if(a>h.Gr.PORTAL_ITEM){const e=this.createSublayersForOrigin("portal-item");o=(0,U.Zx)(s,e.sublayers,(0,h.aB)(e.origin))}const n=[],l={writeSublayerStructure:o,...i};let d=o||this.hasVisibleLayersForOrigin(a);s.forEach((e=>{const t=e.write({},l);n.push(t),d=d||"user"===e.originOf("visible")})),n.some((e=>Object.keys(e).length>1))&&(t.layers=n),d&&(t.visibleLayers=s.filter((e=>e.visible)).map((e=>e.id)))}createExportImageParameters(e,t,r,i){const s=i?.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian()),this._exportImageParameters.floors=i?.floors??null,this._exportImageParameters.scale=(0,v.X_)({extent:e,width:t})*s;const o=this._exportImageParameters.toJSON(),a=!i?.rotation||this.version<10.3?{}:{rotation:-i.rotation},n=e?.spatialReference,l=(0,g.YX)(n);o.dpi*=s;const d={};if(i?.timeExtent){const{start:e,end:t}=i.timeExtent.toJSON();d.time=e&&t&&e===t?""+e:`${e??"null"},${t??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(d.time="null,null");return{bbox:e&&e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:l,imageSR:l,size:t+","+r,...o,...a,...d}}async fetchImage(e,t,r,i){const{data:s}=await this._fetchImage("image",e,t,r,i);return s}async fetchImageBitmap(e,t,r,i){const{data:s,url:o}=await this._fetchImage("blob",e,t,r,i);return(0,J.m)(s,o,i?.signal)}async fetchRecomputedExtents(e={}){const t={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:r}=await(0,s.A)(this.url,t),{extent:i,fullExtent:a,timeExtent:n}=r,l=i||a;return{fullExtent:l&&f.A.fromJSON(l),timeExtent:n&&o.A.fromJSON({start:n[0],end:n[1]})}}loadAll(){return(0,n.g)(this,(e=>{e(this.allSublayers)}))}serviceSupportsSpatialReference(e){return(0,k.D)(this,e)}async _fetchImage(e,t,r,i,o){const n={responseType:e,signal:o?.signal??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(t,r,i,o),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},l=this.parsedUrl.path+"/export";if(null!=n.query?.dynamicLayers&&!this.capabilities?.exportMap?.supportsDynamicLayers)throw new a.A("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:n.query});try{const{data:e}=await(0,s.A)(l,n);return{data:e,url:l}}catch(e){if((0,d.zf)(e))throw e;throw new a.A("mapimagelayer:image-fetch-error",`Unable to load image: ${l}`,{error:e})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:r}=await(0,s.A)(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});r&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}hasVisibleLayersForOrigin(e){return!(null==e||!this.sublayersSourceJSON[e]?.visibleLayers)}};(0,i._)([(0,u.MZ)((0,V.P6)("dateFieldsTimeReference"))],$.prototype,"dateFieldsTimeZone",void 0),(0,i._)([(0,u.MZ)({type:Boolean})],$.prototype,"datesInUnknownTimezone",void 0),(0,i._)([(0,u.MZ)()],$.prototype,"dpi",void 0),(0,i._)([(0,u.MZ)()],$.prototype,"gdbVersion",void 0),(0,i._)([(0,u.MZ)()],$.prototype,"imageFormat",void 0),(0,i._)([(0,y.w)("imageFormat",["supportedImageFormatTypes"])],$.prototype,"readImageFormat",null),(0,i._)([(0,u.MZ)({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],$.prototype,"imageMaxHeight",void 0),(0,i._)([(0,u.MZ)({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],$.prototype,"imageMaxWidth",void 0),(0,i._)([(0,u.MZ)()],$.prototype,"imageTransparency",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],$.prototype,"isReference",void 0),(0,i._)([(0,u.MZ)({json:{read:!1,write:!1}})],$.prototype,"labelsVisible",void 0),(0,i._)([(0,u.MZ)({type:["ArcGISMapServiceLayer"]})],$.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.MZ)({json:{read:!1,write:!1}})],$.prototype,"popupEnabled",void 0),(0,i._)([(0,u.MZ)((0,V.P6)("preferredTimeReference"))],$.prototype,"preferredTimeZone",void 0),(0,i._)([(0,u.MZ)()],$.prototype,"sourceJSON",void 0),(0,i._)([(0,u.MZ)({json:{write:{ignoreOrigin:!0}}})],$.prototype,"sublayers",void 0),(0,i._)([(0,c.K)("sublayers",{layers:{type:[R.A]},visibleLayers:{type:[p.jz]}})],$.prototype,"writeSublayers",null),(0,i._)([(0,u.MZ)({type:["show","hide","hide-children"]})],$.prototype,"listMode",void 0),(0,i._)([(0,u.MZ)({json:{read:!1},readOnly:!0,value:"map-image"})],$.prototype,"type",void 0),(0,i._)([(0,u.MZ)(L.OZ)],$.prototype,"url",void 0),$=(0,i._)([(0,m.$)("esri.layers.MapImageLayer")],$);const C=$},82935:(e,t,r)=>{r.d(t,{B:()=>m,e:()=>c});var i=r(90237),s=r(60945),o=r(70668),a=r(10107),n=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),d=r(89317),u=r(30524),p=r(96184),y=r(73133);const m={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:d.K}}},c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=y.j.fromJSON(r.timeOffsetUnits);return i&&s?new o.A({value:i,unit:s}):null}set timeInfo(e){(0,u.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,a.MZ)({type:s.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,a.MZ)({type:o.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,n.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,a.MZ)({value:null,type:p.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,a.MZ)(m)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,l.$)("esri.layers.mixins.TemporalLayer")],t),t}},96184:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(90237),s=r(60945),o=r(70668),a=r(69540),n=r(25482),l=r(10107),d=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),p=r(43937),y=r(56400);function m(e,t){return o.A.fromJSON({value:e,unit:t})}let c=class extends((0,a.O)(n.oY)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?s.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],c.prototype,"cumulative",void 0),(0,i._)([(0,l.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],c.prototype,"endField",void 0),(0,i._)([(0,l.MZ)({type:s.A,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"fullTimeExtent",void 0),(0,i._)([(0,d.w)("fullTimeExtent",["timeExtent"])],c.prototype,"readFullTimeExtent",null),(0,i._)([(0,p.K)("fullTimeExtent")],c.prototype,"writeFullTimeExtent",null),(0,i._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"hasLiveData",void 0),(0,i._)([(0,l.MZ)({type:o.A,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"interval",void 0),(0,i._)([(0,d.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],c.prototype,"readInterval",null),(0,i._)([(0,p.K)("interval")],c.prototype,"writeInterval",null),(0,i._)([(0,l.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],c.prototype,"startField",void 0),(0,i._)([(0,l.MZ)((0,y.P6)("timeReference",!0))],c.prototype,"timeZone",void 0),(0,i._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"trackIdField",void 0),(0,i._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],c.prototype,"useTime",void 0),(0,i._)([(0,l.MZ)({type:[Date],json:{read:!1}})],c.prototype,"stops",void 0),c=(0,i._)([(0,u.$)("esri.layers.support.TimeInfo")],c);const h=c},91908:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(60694);const s=[];function o(e,t){if((0,i.Wo)(e.url??""))return!0;const{wkid:r}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})}}]);