@arcgis/core 4.34.0-next.48 → 4.34.0-next.49

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.
Files changed (132) hide show
  1. package/analysis/ElevationProfileUnits.js +1 -1
  2. package/analysis/support/elevationProfileLineTypes.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{6ce2f86b9b1d2f2b8675.js → 0874b88d5ae7c2b78b3b.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{90a97ffba604c1c35532.js → 0b52c0ca432761076076.js} +65 -65
  6. package/assets/esri/core/workers/chunks/0c129b78e5cfe96795e1.js +1 -0
  7. package/assets/esri/core/workers/chunks/{9f869b331dff505b6b55.js → 1d234c057a6671acc59f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/4cc982c99d84e896d535.js +1 -0
  9. package/assets/esri/core/workers/chunks/4e2b125e6e3945985a54.js +1 -0
  10. package/assets/esri/core/workers/chunks/5a016dcd3192d42d363e.js +1 -0
  11. package/assets/esri/core/workers/chunks/{574ea32d6c257e0d2079.js → 5b0c42bb95d81085061d.js} +1 -1
  12. package/assets/esri/core/workers/chunks/72ecf49d03bb24bf0998.js +1 -0
  13. package/assets/esri/core/workers/chunks/781b59ba0cabe78bc122.js +1 -0
  14. package/assets/esri/core/workers/chunks/{28a85997c9003cacdefb.js → 8e3c09c3524654830b14.js} +1 -1
  15. package/assets/esri/core/workers/chunks/bd7e303dd64a27ba6846.js +1 -0
  16. package/assets/esri/core/workers/chunks/cb8f2ce22274990b359c.js +1 -0
  17. package/assets/esri/core/workers/chunks/{0b67b16d7e6c030bcfc7.js → d4766c97d97554b3b408.js} +1 -1
  18. package/assets/esri/core/workers/chunks/ddd6597a66ec6b972f9c.js +1 -0
  19. package/chunks/LineSeries.js +1 -1
  20. package/chunks/Theme.js +1 -1
  21. package/chunks/chartUtilsAm5.js +1 -1
  22. package/config.js +1 -1
  23. package/core/lang.js +1 -1
  24. package/core/timeUtils.js +1 -1
  25. package/editing/sharedTemplates/support/sharedTemplateErrors.js +1 -1
  26. package/interfaces.d.ts +44 -10
  27. package/kernel.js +1 -1
  28. package/layers/LinkChartLayer.js +1 -1
  29. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  30. package/layers/orientedImagery/transformations/utils.js +1 -1
  31. package/layers/support/rasterDatasets/pixelReader.js +1 -1
  32. package/libs/linkchartlayout/LinkChartLayout.js +1 -1
  33. package/libs/parquet/parquet.js +1 -1
  34. package/networks/UtilityNetwork.js +1 -1
  35. package/networks/support/UtilityNetworkLookupHelper.js +1 -1
  36. package/networks/support/networkFieldUtils.js +1 -1
  37. package/networks/support/typeUtils.js +1 -1
  38. package/package.json +4 -4
  39. package/rest/networks/support/CircuitLocation.js +5 -0
  40. package/rest/networks/support/CircuitSection.js +5 -0
  41. package/rest/support/Query.js +1 -1
  42. package/rest/support/RelationshipQuery.js +1 -1
  43. package/rest/utils.js +1 -1
  44. package/support/revision.js +1 -1
  45. package/support/webSceneUtils.js +1 -1
  46. package/symbols/cim/utils.js +1 -1
  47. package/views/2d/LabelManager.js +1 -1
  48. package/views/2d/engine/flow/utils.js +1 -1
  49. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  50. package/views/2d/engine/webgl/DisplayId.js +1 -1
  51. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  52. package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
  53. package/views/2d/interactive/editingTools.js +1 -1
  54. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  55. package/views/2d/layers/features/FeatureContainer.js +1 -1
  56. package/views/2d/layers/features/RenderState.js +1 -1
  57. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  58. package/views/2d/layers/features/sources/strategies/chunks/ParquetSourceChunk.js +1 -1
  59. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  60. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
  61. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +5 -0
  62. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  63. package/views/3d/environment/SunLighting.js +1 -1
  64. package/views/3d/layers/FlowSubView3D.js +1 -1
  65. package/views/3d/layers/I3SMeshView3D.js +1 -1
  66. package/views/3d/layers/graphics/Graphics3DSymbolLayerFactory.js +1 -1
  67. package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
  68. package/views/3d/terrain/terrainUtils.js +1 -1
  69. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  70. package/views/3d/webgl-engine/core/shaderModules/Matrix4sDrawUniform.js +1 -1
  71. package/views/3d/webgl-engine/core/shaderModules/Matrix4sPassUniform.js +1 -1
  72. package/views/3d/webgl-engine/lib/Program.js +1 -1
  73. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  74. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  75. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  76. package/views/analysis/ElevationProfile/ElevationProfileController.js +5 -0
  77. package/views/analysis/ElevationProfile/ElevationProfileLineComputation.js +5 -0
  78. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +5 -0
  79. package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +5 -0
  80. package/views/analysis/ElevationProfile/ElevationProfileLineQueryComputation.js +5 -0
  81. package/views/analysis/ElevationProfile/ProfileGenerationError.js +5 -0
  82. package/views/analysis/ElevationProfile/constants.js +5 -0
  83. package/views/analysis/ElevationProfile/elevationQuerySourceUtils.js +5 -0
  84. package/views/analysis/ElevationProfile/geometryUtils.js +5 -0
  85. package/views/analysis/ElevationProfile/profileUtils.js +5 -0
  86. package/views/analysis/ElevationProfile/statisticsUtils.js +5 -0
  87. package/views/analysis/ElevationProfile/traversalUtils.js +5 -0
  88. package/views/analysis/ElevationProfile/unitUtils.js +5 -0
  89. package/views/analysis/ElevationProfileResult.js +1 -1
  90. package/views/support/LayerLayerViewInfo.js +1 -1
  91. package/views/support/highlightOptionsUtils.js +1 -1
  92. package/views/webgl/Program.js +1 -1
  93. package/views/webgl/textureUtils.js +1 -1
  94. package/webscene/SunLighting.js +1 -1
  95. package/widgets/Daylight/DaylightViewModel.js +1 -1
  96. package/widgets/Daylight/support/daylightUtils.js +1 -1
  97. package/widgets/Editor/EditorViewModel.js +1 -1
  98. package/widgets/Editor/support/SketchController.js +1 -1
  99. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  100. package/widgets/Features/FeaturesViewModel.js +1 -1
  101. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  102. package/widgets/OrientedImageryViewer/constants.js +1 -1
  103. package/widgets/OrientedImageryViewer/navigation/errors.js +1 -1
  104. package/widgets/OrientedImageryViewer.js +1 -1
  105. package/widgets/ShadowCast/css.js +1 -1
  106. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  107. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  108. package/widgets/UtilityNetworkTraceAnalysis/UtilityNetworkTraceAnalysisViewModel.js +1 -1
  109. package/widgets/smartMapping/SmartMappingSliderViewModel.js +1 -1
  110. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  111. package/arcade/credentials.js +0 -5
  112. package/arcade/featureset/support/Guid.js +0 -5
  113. package/arcade/request.js +0 -5
  114. package/arcade/serviceAreaMetaData.js +0 -5
  115. package/assets/esri/core/workers/chunks/45b450c045d5fadf71b6.js +0 -1
  116. package/assets/esri/core/workers/chunks/4f5e72993a4f5180d703.js +0 -1
  117. package/assets/esri/core/workers/chunks/516b30778cd54d29e362.js +0 -1
  118. package/assets/esri/core/workers/chunks/576792b5e1e13084adba.js +0 -1
  119. package/assets/esri/core/workers/chunks/5f7dc9657803ae3140a6.js +0 -1
  120. package/assets/esri/core/workers/chunks/8d51b6823ef5d290c670.js +0 -1
  121. package/assets/esri/core/workers/chunks/947085d176bd3a930e6f.js +0 -1
  122. package/assets/esri/core/workers/chunks/d09ded9fb621491e2466.js +0 -1
  123. package/assets/esri/core/workers/chunks/eb61b47df99a54a364c8.js +0 -1
  124. package/rest/versionManagement/support/GetVersionInfosResult.js +0 -5
  125. package/symbols/cim/quantizeTime.js +0 -5
  126. package/undoredo/support/DataEditingContext.js +0 -5
  127. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/WriterRegistry.js +0 -5
  128. package/views/2d/interactive/editingTools/MediaTransformToolsWrapper.js +0 -5
  129. package/views/2d/layers/features/sources/strategies/chunks/FeatureSourceEndChunk.js +0 -5
  130. package/views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloat16Encoding.glsl.js +0 -25
  131. package/webscene/spec-certification/index.js +0 -5
  132. package/widgets/HighlightConfigurator.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../Graphic.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{watch as s}from"../core/reactiveUtils.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import a from"../layers/FeatureLayer.js";import{queryAllJSON as n}from"../layers/support/featureQueryAll.js";import l from"./Network.js";import u from"./RulesTable.js";import d from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as m}from"./support/networkFieldUtils.js";import c from"./support/NetworkSystemLayers.js";import y from"./support/TerminalConfiguration.js";import p from"./support/TraceJobInfo.js";import{AssociationTypeEnum as h}from"./support/typeUtils.js";import{doesRuleAllowAssociation as f}from"./support/utils.js";import g from"../rest/support/Query.js";let b=class extends l{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility",this._circuitManagerMap=new Map,this._terminalById=new Map,this._unitIdentifierManager=null}initialize(){this.addHandles(s(()=>[this.gdbVersion,this.historicMoment],()=>{this.networkSystemLayers.associationsTable&&(this.networkSystemLayers.associationsTable.gdbVersion!==this.gdbVersion&&(this.networkSystemLayers.associationsTable.gdbVersion=this.gdbVersion),this.networkSystemLayers.associationsTable.historicMoment!==this.historicMoment&&(this.networkSystemLayers.associationsTable.historicMoment=this.historicMoment))}))}get _rulesLayer(){const{gdbVersion:e,historicMoment:t}=this,r=this.networkSystemLayers.rulesTableUrl;return new a({url:r,gdbVersion:e,historicMoment:t})}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map(t=>{t?.edgeSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)}),t?.junctionSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)})}),e}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new c({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map(e=>y.fromJSON(e))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map(e=>e.domainNetworkName)||[]}get hasTelecomNetwork(){return this.dataElement?.domainNetworks.some(e=>e.isTelecomNetwork)??!1}get associationsTable(){return this.networkSystemLayers.associationsTable}async load(e){return this.addResolvingPromise(this._load(e)),this}async _load(e){await super._load(e),await Promise.all([this._loadNamedTraceConfigurationsFromNetwork(e),this.networkSystemLayers.loadAssociationsTable(e)])}getTerminalConfiguration(e){let t=null,r=null;const s=e.sourceLayer;let i=null;if("feature"===s?.type){if(i=s.layerId,null===i)return null}else{if("subtype-sublayer"!==s?.type)return null;if(i=s?.parent?.layerId??null,null===i)return null}const o=e.attributes;if(null==o)return null;for(const l of Object.keys(o))"ASSETGROUP"===l.toUpperCase()&&(t=e.getAttribute(l)),"ASSETTYPE"===l.toUpperCase()&&(r=e.getAttribute(l));if(!this.dataElement)return null;let a=null;const n=this.dataElement.domainNetworks;for(const l of n){const e=l.junctionSources?.find(e=>e.layerId===i);if(e){const s=e.assetGroups?.find(e=>e.assetGroupCode===t);if(s){const e=s.assetTypes?.find(e=>e.assetTypeCode===r);if(e?.isTerminalConfigurationSupported){a=e.terminalConfigurationId;break}}}}if(null!=a){const e=this.dataElement.terminalConfigurations,t=e?.find(e=>e.terminalConfigurationId===a);return t?y.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e);return t?.tiers?.map(e=>e.name)||[]}async getRulesTable(){const e=this._rulesLayer;e.loaded||await e.load();const t=this.dataElement?.domainNetworks;if(!t)return null;const r=t.flatMap(e=>[...e.edgeSources||[],...e.junctionSources||[]]),s=(await this._queryRulesTable(e)).map(t=>this._hydrateRuleInfo(e,r,t));return new u({rulesLayer:e,rules:s})}async getCircuitManager(e){if(!this.hasTelecomNetwork)return null;const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e&&t.isTelecomNetwork);if(!t)return null;const{default:s}=await import("./CircuitManager.js");return r(this._circuitManagerMap,e,()=>new s({utilityNetwork:this,telecomDomainNetwork:t}))}async getUnitIdentifierManager(){if(!this.hasTelecomNetwork)return null;if(this._unitIdentifierManager)return this._unitIdentifierManager;const{default:e}=await import("./UnitIdentifierManager.js");return this._unitIdentifierManager=new e({utilityNetwork:this}),this._unitIdentifierManager}getTerminalById(e){if(!this.dataElement||null==e)return null;const t=this._terminalById.get(e);return null!=t?t:(this.terminalConfigurations.forEach(e=>{e.terminals.forEach(e=>{this._terminalById.set(e.id,e)})}),this._terminalById.get(e))}isUtilityLayer(e){return"layerId"in e?null!=e.layerId&&this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):!("subtype-sublayer"!==e.type||!e.parent)&&(this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1))}async queryAssociations(e,t){const[{queryAssociations:r},{default:s}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),i=s.from(e);i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment;return(await r(this.networkServiceUrl,i,t)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const i=await t(this.networkServiceUrl,s);return new p({statusUrl:i})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;const{fromNetworkElement:r,toNetworkElement:s}=e;if(!r||!s)return!1;await t.load();let i=null;switch(e.associationType){case"containment":i=t.rulesCategorized.containment;break;case"attachment":i=t.rulesCategorized.attachment;break;default:i=t.rulesCategorized.connectivity}return i.some(e=>f(e,r,s))}generateAddAssociations(e){const{associationsTable:r}=this.networkSystemLayers,{fromNetworkSourceId:s,fromGlobalId:i,fromTerminalId:o,toNetworkSourceId:a,toGlobalId:n,toTerminalId:l,associationType:u,isContentVisible:d,percentAlong:c,globalId:y}=m(r);return{addFeatures:e.map(e=>new t({attributes:{[s]:e.fromNetworkElement?.networkSourceId,[i]:e.fromNetworkElement?.globalId,[o]:e.fromNetworkElement?.terminalId,[a]:e.toNetworkElement?.networkSourceId,[n]:e.toNetworkElement?.globalId,[l]:e.toNetworkElement?.terminalId,[u]:h[e.associationType],[d]:null==e.isContentVisible?void 0:e.isContentVisible?1:0,[c]:e.percentAlong,[y]:e.globalId}})),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:r?.globalIdField??"globalid",objectIdField:r?.objectIdField??"objectid"}}}generateDeleteAssociations(e){const{associationsTable:t,associationsTableId:r}=this.networkSystemLayers;return{deleteFeatures:e.map(e=>({globalId:e.globalId})),id:r,identifierFields:{globalIdField:t?.globalIdField??"globalid",objectIdField:t?.objectIdField??"objectid"}}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map(e=>e.globalId),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const s of this.sharedNamedTraceConfigurations){const e=r?.find(e=>e.globalId===s.globalId);if(e){const t=e.write({},{origin:"service"});s.read(t,{origin:"service"})}}}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,i=s.get("RULETYPE"),o=s.get("CREATIONDATE"),a=s.get("FROMNETWORKSOURCEID"),n=s.get("FROMASSETGROUP"),l=s.get("FROMASSETTYPE"),u=s.get("FROMTERMINALID"),d=s.get("TONETWORKSOURCEID"),m=s.get("TOASSETGROUP"),c=s.get("TOASSETTYPE"),y=s.get("TOTERMINALID"),p=s.get("VIANETWORKSOURCEID"),h=s.get("VIAASSETGROUP"),f=s.get("VIAASSETTYPE"),g=s.get("VIATERMINALID"),b=r.attributes[i.name],I=new Date(r.attributes[o.name]),w=[{networkSourceId:r.attributes[a.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[d.name],assetGroupId:r.attributes[m.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[p.name],assetGroupId:r.attributes[h.name],assetTypeId:r.attributes[f.name],terminalId:r.attributes[g.name]}],T={ruleType:b,creationDate:I};for(const k of[0,1,2]){if(5!==b&&2===k)continue;const e=w[k],r=t.find(t=>t.sourceId===e.networkSourceId),s=r?.assetGroups.find(t=>t.assetGroupCode===e.assetGroupId),i=s?.assetTypes.find(t=>t.assetTypeCode===e.assetTypeId),o=this._getTerminal(i,e);let a="";switch(k){case 0:a="from";break;case 1:a="to";break;case 2:a="via"}T[`${a}NetworkSource`]=r,T[`${a}AssetGroup`]=s,T[`${a}AssetType`]=i,T[`${a}Terminal`]=o?.toJSON()}return T}_getTerminal(e,t){const r=e?.terminalConfigurationId,s=this.terminalConfigurations?.find(e=>e.id===r);return s?.terminals?.find(e=>e.id===t.terminalId)??null}async _queryRulesTable(e){const{gdbVersion:t,historicMoment:r}=this,s=new g({where:"1=1",outFields:["*"],gdbVersion:t,historicMoment:r});return(await n(e,s)).features}};e([i({readOnly:!0})],b.prototype,"_rulesLayer",null),e([i({type:[d],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],b.prototype,"sharedNamedTraceConfigurations",void 0),e([i({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],b.prototype,"type",void 0),e([i({readOnly:!0})],b.prototype,"serviceTerritoryFeatureLayerId",null),e([i({readOnly:!0})],b.prototype,"networkSystemLayers",null),e([i({readOnly:!0})],b.prototype,"terminalConfigurations",null),e([i({readOnly:!0})],b.prototype,"domainNetworkNames",null),e([i({readOnly:!0})],b.prototype,"hasTelecomNetwork",null),e([i({readOnly:!0,json:{read:!1}})],b.prototype,"associationsTable",null),b=e([o("esri.networks.UtilityNetwork")],b);const I=b;export{I as default};
5
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{watch as s}from"../core/reactiveUtils.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 i}from"../core/accessorSupport/decorators/subclass.js";import a from"../layers/FeatureLayer.js";import{queryAllJSON as n}from"../layers/support/featureQueryAll.js";import l from"./Network.js";import u from"./RulesTable.js";import m from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as d}from"./support/networkFieldUtils.js";import c from"./support/NetworkSystemLayers.js";import y from"./support/TerminalConfiguration.js";import p from"./support/TraceJobInfo.js";import{AssociationTypeEnum as f,associationTypeKebabDict as h}from"./support/typeUtils.js";import{doesRuleAllowAssociation as I}from"./support/utils.js";import b from"../rest/networks/support/TelecomNetworkElement.js";import g from"../rest/support/Query.js";let w=class extends l{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility",this._circuitManagerMap=new Map,this._terminalById=new Map,this._unitIdentifierManager=null}initialize(){this.addHandles(s(()=>[this.gdbVersion,this.historicMoment],()=>{this.networkSystemLayers.associationsTable&&(this.networkSystemLayers.associationsTable.gdbVersion!==this.gdbVersion&&(this.networkSystemLayers.associationsTable.gdbVersion=this.gdbVersion),this.networkSystemLayers.associationsTable.historicMoment!==this.historicMoment&&(this.networkSystemLayers.associationsTable.historicMoment=this.historicMoment))}))}get _rulesLayer(){const{gdbVersion:e,historicMoment:t}=this,r=this.networkSystemLayers.rulesTableUrl;return new a({url:r,gdbVersion:e,historicMoment:t})}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map(t=>{t?.edgeSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)}),t?.junctionSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)})}),e}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new c({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map(e=>y.fromJSON(e))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map(e=>e.domainNetworkName)||[]}get hasTelecomNetwork(){return this.dataElement?.domainNetworks.some(e=>e.isTelecomNetwork)??!1}get associationsTable(){return this.networkSystemLayers.associationsTable}async load(e){return this.addResolvingPromise(this._load(e)),this}async _load(e){await super._load(e),await Promise.all([this._loadNamedTraceConfigurationsFromNetwork(e),this.networkSystemLayers.loadAssociationsTable(e)])}getTerminalConfiguration(e){let t=null,r=null;const s=e.sourceLayer;let o=null;if("feature"===s?.type){if(o=s.layerId,null===o)return null}else{if("subtype-sublayer"!==s?.type)return null;if(o=s?.parent?.layerId??null,null===o)return null}const i=e.attributes;if(null==i)return null;for(const l of Object.keys(i))"ASSETGROUP"===l.toUpperCase()&&(t=e.getAttribute(l)),"ASSETTYPE"===l.toUpperCase()&&(r=e.getAttribute(l));if(!this.dataElement)return null;let a=null;const n=this.dataElement.domainNetworks;for(const l of n){const e=l.junctionSources?.find(e=>e.layerId===o);if(e){const s=e.assetGroups?.find(e=>e.assetGroupCode===t);if(s){const e=s.assetTypes?.find(e=>e.assetTypeCode===r);if(e?.isTerminalConfigurationSupported){a=e.terminalConfigurationId;break}}}}if(null!=a){const e=this.dataElement.terminalConfigurations,t=e?.find(e=>e.terminalConfigurationId===a);return t?y.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e);return t?.tiers?.map(e=>e.name)||[]}async getRulesTable(){const e=this._rulesLayer;e.loaded||await e.load();const t=this.dataElement?.domainNetworks;if(!t)return null;const r=t.flatMap(e=>[...e.edgeSources||[],...e.junctionSources||[]]),s=(await this._queryRulesTable(e)).map(t=>this._hydrateRuleInfo(e,r,t));return new u({rulesLayer:e,rules:s})}async getCircuitManager(e){if(!this.hasTelecomNetwork)return null;const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e&&t.isTelecomNetwork);if(!t)return null;const{default:s}=await import("./CircuitManager.js");return r(this._circuitManagerMap,e,()=>new s({utilityNetwork:this,telecomDomainNetwork:t}))}async getUnitIdentifierManager(){if(!this.hasTelecomNetwork)return null;if(this._unitIdentifierManager)return this._unitIdentifierManager;const{default:e}=await import("./UnitIdentifierManager.js");return this._unitIdentifierManager=new e({utilityNetwork:this}),this._unitIdentifierManager}getTerminalById(e){if(!this.dataElement||null==e)return null;const t=this._terminalById.get(e);return null!=t?t:(this.terminalConfigurations.forEach(e=>{e.terminals.forEach(e=>{this._terminalById.set(e.id,e)})}),this._terminalById.get(e))}isUtilityLayer(e){return"layerId"in e?null!=e.layerId&&this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):!("subtype-sublayer"!==e.type||!e.parent)&&(this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1))}async queryAssociations(e,t){const[{queryAssociations:r},{default:s}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),o=s.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;return(await r(this.networkServiceUrl,o,t)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const o=await t(this.networkServiceUrl,s);return new p({statusUrl:o})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;const{fromNetworkElement:r,toNetworkElement:s}=e;if(!r||!s)return!1;await t.load();let o=null;switch(e.associationType){case"containment":o=t.rulesCategorized.containment;break;case"attachment":o=t.rulesCategorized.attachment;break;default:o=t.rulesCategorized.connectivity}return o.some(e=>I(e,r,s))}generateAddAssociations(e){const{associationsTable:r}=this.networkSystemLayers,{fromNetworkSourceId:s,fromGlobalId:o,fromTerminalId:i,fromFirstUnit:a,fromNumUnits:n,toNetworkSourceId:l,toGlobalId:u,toTerminalId:m,toFirstUnit:c,toNumUnits:y,associationType:p,isContentVisible:h,percentAlong:I,globalId:g}=d(r);return{addFeatures:e.map(e=>{const r=new t({attributes:{[s]:e.fromNetworkElement?.networkSourceId,[o]:e.fromNetworkElement?.globalId,[i]:e.fromNetworkElement?.terminalId,[l]:e.toNetworkElement?.networkSourceId,[u]:e.toNetworkElement?.globalId,[m]:e.toNetworkElement?.terminalId,[p]:f[e.associationType],[h]:null==e.isContentVisible?void 0:e.isContentVisible?1:0,[I]:e.percentAlong,[g]:e.globalId}});return e.fromNetworkElement instanceof b&&(r.attributes[a]=e.fromNetworkElement?.firstUnit,r.attributes[n]=e.fromNetworkElement?.numUnits),e.toNetworkElement instanceof b&&(r.attributes[c]=e.toNetworkElement?.firstUnit,r.attributes[y]=e.toNetworkElement?.numUnits),r}),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:r?.globalIdField??"globalid",objectIdField:r?.objectIdField??"objectid"}}}generateDeleteAssociations(e){const{associationsTable:t,associationsTableId:r}=this.networkSystemLayers,s={id:r,identifierFields:{globalIdField:t?.globalIdField??"globalid",objectIdField:t?.objectIdField??"objectid"}};if(-8===this.dataElement?.schemaGeneration){const t=this._generateDeleteTelecomAssociationPayload(e);return{...s,deleteAssociations:t}}const o=e.map(e=>({globalId:e.globalId}));return{...s,deleteFeatures:o}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map(e=>e.globalId),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const s of this.sharedNamedTraceConfigurations){const e=r?.find(e=>e.globalId===s.globalId);if(e){const t=e.write({},{origin:"service"});s.read(t,{origin:"service"})}}}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,o=s.get("RULETYPE"),i=s.get("CREATIONDATE"),a=s.get("FROMNETWORKSOURCEID"),n=s.get("FROMASSETGROUP"),l=s.get("FROMASSETTYPE"),u=s.get("FROMTERMINALID"),m=s.get("TONETWORKSOURCEID"),d=s.get("TOASSETGROUP"),c=s.get("TOASSETTYPE"),y=s.get("TOTERMINALID"),p=s.get("VIANETWORKSOURCEID"),f=s.get("VIAASSETGROUP"),h=s.get("VIAASSETTYPE"),I=s.get("VIATERMINALID"),b=r.attributes[o.name],g=new Date(r.attributes[i.name]),w=[{networkSourceId:r.attributes[a.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[m.name],assetGroupId:r.attributes[d.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[p.name],assetGroupId:r.attributes[f.name],assetTypeId:r.attributes[h.name],terminalId:r.attributes[I.name]}],T={ruleType:b,creationDate:g};for(const k of[0,1,2]){if(5!==b&&2===k)continue;const e=w[k],r=t.find(t=>t.sourceId===e.networkSourceId),s=r?.assetGroups.find(t=>t.assetGroupCode===e.assetGroupId),o=s?.assetTypes.find(t=>t.assetTypeCode===e.assetTypeId),i=this._getTerminal(o,e);let a="";switch(k){case 0:a="from";break;case 1:a="to";break;case 2:a="via"}T[`${a}NetworkSource`]=r,T[`${a}AssetGroup`]=s,T[`${a}AssetType`]=o,T[`${a}Terminal`]=i?.toJSON()}return T}_getTerminal(e,t){const r=e?.terminalConfigurationId,s=this.terminalConfigurations?.find(e=>e.id===r);return s?.terminals?.find(e=>e.id===t.terminalId)??null}async _queryRulesTable(e){const{gdbVersion:t,historicMoment:r}=this,s=new g({where:"1=1",outFields:["*"],gdbVersion:t,historicMoment:r});return(await n(e,s)).features}_generateDeleteTelecomAssociationPayload(e){return e.map(e=>({globalId:e.globalId??"{00000000-0000-0000-0000-000000000000}",associationType:h.toJSON(e.associationType),fromSourceId:e.fromNetworkElement.networkSourceId,fromGlobalId:e.fromNetworkElement.globalId,fromTerminalId:e.fromNetworkElement.terminalId,toSourceId:e.toNetworkElement.networkSourceId,toGlobalId:e.toNetworkElement.globalId,toTerminalId:e.toNetworkElement.terminalId}))}};e([o({readOnly:!0})],w.prototype,"_rulesLayer",null),e([o({type:[m],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],w.prototype,"sharedNamedTraceConfigurations",void 0),e([o({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],w.prototype,"type",void 0),e([o({readOnly:!0})],w.prototype,"serviceTerritoryFeatureLayerId",null),e([o({readOnly:!0})],w.prototype,"networkSystemLayers",null),e([o({readOnly:!0})],w.prototype,"terminalConfigurations",null),e([o({readOnly:!0})],w.prototype,"domainNetworkNames",null),e([o({readOnly:!0})],w.prototype,"hasTelecomNetwork",null),e([o({readOnly:!0,json:{read:!1}})],w.prototype,"associationsTable",null),w=e([i("esri.networks.UtilityNetwork")],w);const T=w;export{T 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import o from"../../core/Error.js";import{LoadableMixin as s}from"../../core/Loadable.js";import{getOrCreateMapValue as t}from"../../core/MapUtils.js";import{EsriPromise as r}from"../../core/Promise.js";import{throwIfAborted as u}from"../../core/promiseUtils.js";import a from"../../core/ReactiveMap.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{isSubtypeSublayer as p}from"../../layers/support/layerUtils.js";function l(e){return`${e.networkSource?.sourceId??""}-${e.assetGroup?.assetGroupCode??""}-${e.assetType?.assetTypeCode??""}`}let c=class extends(s(r)){constructor(e){super(e),this.layerIdToSourceIdLookup=new a,this.sourceIdToLayerIdLookup=new a,this.sourceIdToNetworkInfo=new a,this._rulesBySourceId=new Map,this._terminalConfigurationsBySourceId=new Map}async load(e){return this.addResolvingPromise(this._load(e)),this}agatFromRule(e,o){let s;switch(o){case"to":s={networkSource:e.toNetworkSource??null,assetGroup:e.toAssetGroup??null,assetType:e.toAssetType??null};break;case"from":s={networkSource:e.fromNetworkSource??null,assetGroup:e.fromAssetGroup??null,assetType:e.fromAssetType??null};break;case"via":s={networkSource:e.viaNetworkSource??null,assetGroup:e.viaAssetGroup??null,assetType:e.viaAssetType??null}}return null===s.networkSource?null:s}agatToFullDefinition({assetGroup:e,assetType:o,networkSourceId:s}){if(null===s||null===e||null===o)return null;const t={networkSource:null,assetGroup:null,assetType:null},r=this.sourceIdToNetworkInfo.get(s);if(!r)return null;t.networkSource=r;const u=r.assetGroupLookup.get(e);return u?(t.assetGroup=u,t.assetType=u.assetTypeLookup.get(o)??null,null===t.assetType?null:t):null}findAgat(e,s){const t=p(s)?s.parent:s;if(!t)throw new o("utility-network:missing-layer","Unable to find asset group/asset type for layer. The given layer is a `SubtypeSublayer` with no parent.");if(this.utilityNetwork.featureServiceUrl!==t.url)return null;const r=this.getNetworkSourceIdForLayer(t);if(null===r)return null;const u=t.fieldsIndex.get("assettype")?.name??"";if(""===u)return null;const a=t.fieldsIndex.get("assetgroup")?.name??"";if(""===a)return null;const n=e.attributes[u],i=e.attributes[a];return null==n||null==i?null:{assetGroup:i,assetType:n,networkSourceId:r}}findAgatFullDefinition(e,o){const s=this.findAgat(e,o);return s?this.agatToFullDefinition(s):null}findRules({networkSourceId:e,assetGroup:o,assetType:s}){const t=[];if(null===e||null===o)return t;const r=this._rulesBySourceId.get(e)?.get(o);if(!r)return t;for(const u of r.generalRules)t.push(u);if(null!=s){const e=r.typeSpecificRules.get(s);if(e)for(const o of e)t.push(o)}return t}getNetworkSourceIdForLayer(e){const o=p(e)?e.parent:e;return o&&this.utilityNetwork.featureServiceUrl===o.url?this.layerIdToSourceIdLookup.get(o.layerId)??null:null}ruleMatchesAgat(e,o,s){switch(s){case"to":return!(e.toNetworkSource?.sourceId!==o.networkSourceId||e.toAssetGroup&&e.toAssetGroup.assetGroupCode!==o.assetGroup||e.toAssetType&&e.toAssetType.assetTypeCode!==o.assetType);case"from":return!(e.fromNetworkSource?.sourceId!==o.networkSourceId||e.fromAssetGroup&&e.fromAssetGroup.assetGroupCode!==o.assetGroup||e.fromAssetType&&e.fromAssetType.assetTypeCode!==o.assetType);case"via":return!(e.viaNetworkSource?.sourceId!==o.networkSourceId||e.viaAssetGroup&&e.viaAssetGroup.assetGroupCode!==o.assetGroup||e.viaAssetType&&e.viaAssetType.assetTypeCode!==o.assetType)}}ruleMatchesFullDefinitionAgat(e,o,s){switch(s){case"to":return!(e.toNetworkSource?.sourceId!==o.networkSource?.sourceId||e.toAssetGroup&&e.toAssetGroup.assetGroupCode!==o.assetGroup?.assetGroupCode||e.toAssetType&&e.toAssetType.assetTypeCode!==o.assetType?.assetTypeCode);case"from":return!(e.fromNetworkSource?.sourceId!==o.networkSource?.sourceId||e.fromAssetGroup&&e.fromAssetGroup.assetGroupCode!==o.assetGroup?.assetGroupCode||e.fromAssetType&&e.fromAssetType.assetTypeCode!==o.assetType?.assetTypeCode);case"via":return!(e.viaNetworkSource?.sourceId!==o.networkSource?.sourceId||e.viaAssetGroup&&e.viaAssetGroup.assetGroupCode!==o.assetGroup?.assetGroupCode||e.viaAssetType&&e.viaAssetType.assetTypeCode!==o.assetType?.assetTypeCode)}}terminalConfiguration(e,o,s){const t=this._terminalConfigurationsBySourceId.get(e);if(!t)return null;const r=t.get(o);if(!r)return null;const u=r.get(s);return u||null}async _load(e){await this.utilityNetwork.load(),u(e);const{dataElement:s}=this.utilityNetwork;if(!s)throw new o("utility-network:no-data-element","No data element found on utility network");for(const o of s.domainNetworks)for(const e of[...o.edgeSources??[],...o.junctionSources??[]]){this.layerIdToSourceIdLookup.set(e.layerId,e.sourceId),this.sourceIdToLayerIdLookup.set(e.sourceId,e.layerId);const o=(e.assetGroups??[]).map(e=>{const o=new a;for(const s of e.assetTypes??[])o.set(s.assetTypeCode,s);return{...e,assetTypeLookup:o}}),s=new a;for(const e of o)s.set(e.assetGroupCode,e);const t={...e,assetGroupLookup:s,assetGroups:o};this.sourceIdToNetworkInfo.set(t.sourceId,t)}const t=await this.utilityNetwork.getRulesTable();u(e);for(const o of t?.rules??[])switch(o.ruleType){case 3:case 2:case 4:case 1:this._registerRule(o.fromNetworkSource.sourceId,o.fromAssetGroup.assetGroupCode,o.fromAssetType.assetTypeCode,o),this._registerRule(o.toNetworkSource.sourceId,o.toAssetGroup.assetGroupCode,o.toAssetType.assetTypeCode,o);break;case 5:this._registerRule(o.fromNetworkSource.sourceId,o.fromAssetGroup.assetGroupCode,o.fromAssetType.assetTypeCode,o),this._registerRule(o.toNetworkSource.sourceId,o.toAssetGroup.assetGroupCode,o.toAssetType.assetTypeCode,o),this._registerRule(o.viaNetworkSource.sourceId,o.viaAssetGroup.assetGroupCode,o.viaAssetType.assetTypeCode,o)}this._makeTerminalConfigurationLookups(s)}_makeTerminalConfigurationLookups(e){const o={};for(const s of e.terminalConfigurations??[])o[s.terminalConfigurationId]=s;for(const s of e.domainNetworks??[])for(const e of s.junctionSources)if("esriUNFCUTJunctionObject"===e.utilityNetworkFeatureClassUsageType||"esriUNFCUTDevice"===e.utilityNetworkFeatureClassUsageType)for(const s of e.assetGroups??[])for(const r of s.assetTypes??[])if(null!=r.terminalConfigurationId&&r.terminalConfigurationId>=0){const u=o[r.terminalConfigurationId];if(u){const o=t(this._terminalConfigurationsBySourceId,e.sourceId,()=>new Map);t(o,s.assetGroupCode,()=>new Map).set(r.assetTypeCode,u)}}}_registerRule(e,o,s,r){const u=t(this._rulesBySourceId,e,()=>new Map),a=t(u,o,()=>({generalRules:[],typeSpecificRules:new Map}));if(-1!==s){return void t(a.typeSpecificRules,s,()=>[]).push(r)}a.generalRules.push(r)}};e([n()],c.prototype,"layerIdToSourceIdLookup",void 0),e([n()],c.prototype,"sourceIdToLayerIdLookup",void 0),e([n()],c.prototype,"sourceIdToNetworkInfo",void 0),e([n()],c.prototype,"utilityNetwork",void 0),c=e([i("esri.networks.support.UtilityNetworkLookupHelper")],c);export{c as UtilityNetworkLookupHelper,l as hashAgat};
5
+ import{__decorate as e}from"tslib";import o from"../../core/Error.js";import{LoadableMixin as t}from"../../core/Loadable.js";import{getOrCreateMapValue as s}from"../../core/MapUtils.js";import{EsriPromise as r}from"../../core/Promise.js";import{throwIfAborted as u}from"../../core/promiseUtils.js";import a from"../../core/ReactiveMap.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{isSubtypeSublayer as p}from"../../layers/support/layerUtils.js";let l=class extends(t(r)){constructor(e){super(e),this.layerIdToSourceIdLookup=new a,this.sourceIdToLayerIdLookup=new a,this.sourceIdToNetworkInfo=new a,this._rulesBySourceId=new Map,this._terminalConfigurationsBySourceId=new Map}async load(e){return this.addResolvingPromise(this._load(e)),this}agatFromRule(e,o){let t;switch(o){case"to":t={networkSource:e.toNetworkSource??null,assetGroup:e.toAssetGroup??null,assetType:e.toAssetType??null};break;case"from":t={networkSource:e.fromNetworkSource??null,assetGroup:e.fromAssetGroup??null,assetType:e.fromAssetType??null};break;case"via":t={networkSource:e.viaNetworkSource??null,assetGroup:e.viaAssetGroup??null,assetType:e.viaAssetType??null}}return null===t.networkSource?null:t}agatToFullDefinition({assetGroup:e,assetType:o,networkSourceId:t}){if(null===t||null===e||null===o)return null;const s={networkSource:null,assetGroup:null,assetType:null},r=this.sourceIdToNetworkInfo.get(t);if(!r)return null;s.networkSource=r;const u=r.assetGroupLookup.get(e);return u?(s.assetGroup=u,s.assetType=u.assetTypeLookup.get(o)??null,null===s.assetType?null:s):null}findAgat(e,t){const s=p(t)?t.parent:t;if(!s)throw new o("utility-network:missing-layer","Unable to find asset group/asset type for layer. The given layer is a `SubtypeSublayer` with no parent.");if(this.utilityNetwork.featureServiceUrl!==s.url)return null;const r=this.getNetworkSourceIdForLayer(s);if(null===r)return null;const u=s.fieldsIndex.get("assettype")?.name??"";if(""===u)return null;const a=s.fieldsIndex.get("assetgroup")?.name??"";if(""===a)return null;const n=e.attributes[u],i=e.attributes[a];return null==n||null==i?null:{assetGroup:i,assetType:n,networkSourceId:r}}findAgatFullDefinition(e,o){const t=this.findAgat(e,o);return t?this.agatToFullDefinition(t):null}findRules({networkSourceId:e,assetGroup:o,assetType:t}){const s=[];if(null===e||null===o)return s;const r=this._rulesBySourceId.get(e)?.get(o);if(!r)return s;for(const u of r.generalRules)s.push(u);if(null!=t){const e=r.typeSpecificRules.get(t);if(e)for(const o of e)s.push(o)}return s}getNetworkSourceIdForLayer(e){const o=p(e)?e.parent:e;return o&&this.utilityNetwork.featureServiceUrl===o.url?this.layerIdToSourceIdLookup.get(o.layerId)??null:null}ruleMatchesAgat(e,o,t){switch(t){case"to":return!(e.toNetworkSource?.sourceId!==o.networkSourceId||e.toAssetGroup&&e.toAssetGroup.assetGroupCode!==o.assetGroup||e.toAssetType&&e.toAssetType.assetTypeCode!==o.assetType);case"from":return!(e.fromNetworkSource?.sourceId!==o.networkSourceId||e.fromAssetGroup&&e.fromAssetGroup.assetGroupCode!==o.assetGroup||e.fromAssetType&&e.fromAssetType.assetTypeCode!==o.assetType);case"via":return!(e.viaNetworkSource?.sourceId!==o.networkSourceId||e.viaAssetGroup&&e.viaAssetGroup.assetGroupCode!==o.assetGroup||e.viaAssetType&&e.viaAssetType.assetTypeCode!==o.assetType)}}ruleMatchesFullDefinitionAgat(e,o,t){switch(t){case"to":return!(e.toNetworkSource?.sourceId!==o.networkSource?.sourceId||e.toAssetGroup&&e.toAssetGroup.assetGroupCode!==o.assetGroup?.assetGroupCode||e.toAssetType&&e.toAssetType.assetTypeCode!==o.assetType?.assetTypeCode);case"from":return!(e.fromNetworkSource?.sourceId!==o.networkSource?.sourceId||e.fromAssetGroup&&e.fromAssetGroup.assetGroupCode!==o.assetGroup?.assetGroupCode||e.fromAssetType&&e.fromAssetType.assetTypeCode!==o.assetType?.assetTypeCode);case"via":return!(e.viaNetworkSource?.sourceId!==o.networkSource?.sourceId||e.viaAssetGroup&&e.viaAssetGroup.assetGroupCode!==o.assetGroup?.assetGroupCode||e.viaAssetType&&e.viaAssetType.assetTypeCode!==o.assetType?.assetTypeCode)}}terminalConfiguration(e,o,t){const s=this._terminalConfigurationsBySourceId.get(e);if(!s)return null;const r=s.get(o);if(!r)return null;const u=r.get(t);return u||null}async _load(e){await this.utilityNetwork.load(),u(e);const{dataElement:t}=this.utilityNetwork;if(!t)throw new o("utility-network:no-data-element","No data element found on utility network");for(const o of t.domainNetworks)for(const e of[...o.edgeSources??[],...o.junctionSources??[]]){this.layerIdToSourceIdLookup.set(e.layerId,e.sourceId),this.sourceIdToLayerIdLookup.set(e.sourceId,e.layerId);const o=(e.assetGroups??[]).map(e=>{const o=new a;for(const t of e.assetTypes??[])o.set(t.assetTypeCode,t);return{...e,assetTypeLookup:o}}),t=new a;for(const e of o)t.set(e.assetGroupCode,e);const s={...e,assetGroupLookup:t,assetGroups:o};this.sourceIdToNetworkInfo.set(s.sourceId,s)}const s=await this.utilityNetwork.getRulesTable();u(e);for(const o of s?.rules??[])switch(o.ruleType){case 3:case 2:case 4:case 1:this._registerRule(o.fromNetworkSource.sourceId,o.fromAssetGroup.assetGroupCode,o.fromAssetType.assetTypeCode,o),this._registerRule(o.toNetworkSource.sourceId,o.toAssetGroup.assetGroupCode,o.toAssetType.assetTypeCode,o);break;case 5:this._registerRule(o.fromNetworkSource.sourceId,o.fromAssetGroup.assetGroupCode,o.fromAssetType.assetTypeCode,o),this._registerRule(o.toNetworkSource.sourceId,o.toAssetGroup.assetGroupCode,o.toAssetType.assetTypeCode,o),this._registerRule(o.viaNetworkSource.sourceId,o.viaAssetGroup.assetGroupCode,o.viaAssetType.assetTypeCode,o)}this._makeTerminalConfigurationLookups(t)}_makeTerminalConfigurationLookups(e){const o={};for(const t of e.terminalConfigurations??[])o[t.terminalConfigurationId]=t;for(const t of e.domainNetworks??[])for(const e of t.junctionSources)if("esriUNFCUTJunctionObject"===e.utilityNetworkFeatureClassUsageType||"esriUNFCUTDevice"===e.utilityNetworkFeatureClassUsageType)for(const t of e.assetGroups??[])for(const r of t.assetTypes??[])if(null!=r.terminalConfigurationId&&r.terminalConfigurationId>=0){const u=o[r.terminalConfigurationId];if(u){const o=s(this._terminalConfigurationsBySourceId,e.sourceId,()=>new Map);s(o,t.assetGroupCode,()=>new Map).set(r.assetTypeCode,u)}}}_registerRule(e,o,t,r){const u=s(this._rulesBySourceId,e,()=>new Map),a=s(u,o,()=>({generalRules:[],typeSpecificRules:new Map}));if(-1!==t){return void s(a.typeSpecificRules,t,()=>[]).push(r)}a.generalRules.push(r)}};e([n()],l.prototype,"layerIdToSourceIdLookup",void 0),e([n()],l.prototype,"sourceIdToLayerIdLookup",void 0),e([n()],l.prototype,"sourceIdToNetworkInfo",void 0),e([n()],l.prototype,"utilityNetwork",void 0),l=e([i("esri.networks.support.UtilityNetworkLookupHelper")],l);export{l as UtilityNetworkLookupHelper};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- function e(e){const t=e?.fieldsIndex,o="fromnetworksourceid",n="fromglobalid",r="fromterminalid",i="tonetworksourceid",a="toglobalid",l="toterminalid",s="status",m="associationtype",d="iscontentvisible",g="percentalong",u="globalid";return{fromNetworkSourceId:t?.get(o)?.name??o,fromGlobalId:t?.get(n)?.name??n,fromTerminalId:t?.get(r)?.name??r,toNetworkSourceId:t?.get(i)?.name??i,toGlobalId:t?.get(a)?.name??a,toTerminalId:t?.get(l)?.name??l,status:t?.get(s)?.name??s,associationType:t?.get(m)?.name??m,isContentVisible:t?.get(d)?.name??d,percentAlong:t?.get(g)?.name??g,globalId:t?.get(e?.globalIdField??u)?.name??u}}function t(e,t){if("feature"!==t.type&&"subtype-group"!==t.type)return[];if(!t.url)return[];const o="utilityNetworks"in e.map?e.map.utilityNetworks??[]:[];for(const n of o)if(n.isUtilityLayer(t)){const e=t.fieldsIndex.get("assetgroup"),o=t.fieldsIndex.get("assettype");return[e?.name,o?.name].filter(e=>null!=e)}return[]}export{e as getAssociationsTableFields,t as getUtilityNetworkFields};
5
+ function t(t){const e=t?.fieldsIndex,n="fromnetworksourceid",o="fromglobalid",i="fromterminalid",r="fromfirstunit",a="fromnumunits",m="tonetworksourceid",s="toglobalid",l="toterminalid",u="tofirstunit",g="tonumunits",f="status",d="associationtype",c="iscontentvisible",p="percentalong",I="globalid";return{fromNetworkSourceId:e?.get(n)?.name??n,fromGlobalId:e?.get(o)?.name??o,fromTerminalId:e?.get(i)?.name??i,fromFirstUnit:e?.get(r)?.name??r,fromNumUnits:e?.get(a)?.name??a,toNetworkSourceId:e?.get(m)?.name??m,toGlobalId:e?.get(s)?.name??s,toTerminalId:e?.get(l)?.name??l,toFirstUnit:e?.get(u)?.name??u,toNumUnits:e?.get(g)?.name??g,status:e?.get(f)?.name??f,associationType:e?.get(d)?.name??d,isContentVisible:e?.get(c)?.name??c,percentAlong:e?.get(p)?.name??p,globalId:e?.get(t?.globalIdField??I)?.name??I}}function e(t,e){if("feature"!==e.type&&"subtype-group"!==e.type)return[];if(!e.url)return[];const n="utilityNetworks"in t.map?t.map.utilityNetworks??[]:[];for(const o of n)if(o.isUtilityLayer(e)){const t=e.fieldsIndex.get("assetgroup"),n=e.fieldsIndex.get("assettype");return[t?.name,n?.name].filter(t=>null!=t)}return[]}export{t as getAssociationsTableFields,e as getUtilityNetworkFields};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{JSONMap as n}from"../../core/jsonMap.js";const t=new n({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation",path:"path",circuit:"circuit"}),o=new n({junctionJunctionConnectivity:"junction-junction-connectivity",connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionEdgeMidspanConnectivity:"junction-edge-midspan-connectivity",junctionEdgeToConnectivity:"junction-edge-to-connectivity"}),i={connectivity:1,"junction-junction-connectivity":1,containment:2,attachment:3,"junction-edge-from-connectivity":4,"junction-edge-midspan-connectivity":5,"junction-edge-to-connectivity":6},e=new n({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});export{i as AssociationTypeEnum,o as associationTypeKebabDict,t as traceTypeKebabDict,e as validationTypeKebabDict};
5
+ import{JSONMap as n}from"../../core/jsonMap.js";const t=new n({Physical:"physical",Virtual:"virtual"}),o=new n({"Start and end":"start-and-end",Start:"start",Midspan:"midspan",End:"end"}),i=new n({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation",path:"path",circuit:"circuit"}),e=new n({junctionJunctionConnectivity:"junction-junction-connectivity",connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionEdgeMidspanConnectivity:"junction-edge-midspan-connectivity",junctionEdgeToConnectivity:"junction-edge-to-connectivity"}),c={connectivity:1,"junction-junction-connectivity":1,containment:2,attachment:3,"junction-edge-from-connectivity":4,"junction-edge-midspan-connectivity":5,"junction-edge-to-connectivity":6},a=new n({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});export{c as AssociationTypeEnum,o as CircuitSectionRoleKebabDict,t as CircuitTypeKebabDict,e as associationTypeKebabDict,i as traceTypeKebabDict,a as validationTypeKebabDict};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.34.0-next.48",
3
+ "version": "4.34.0-next.49",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -20,10 +20,10 @@
20
20
  "dependencies": {
21
21
  "@esri/arcgis-html-sanitizer": "~4.1.0",
22
22
  "@esri/calcite-components": "^3.2.1",
23
- "@vaadin/grid": "~24.8.3",
24
- "@zip.js/zip.js": "~2.7.63",
23
+ "@vaadin/grid": "~24.8.4",
24
+ "@zip.js/zip.js": "~2.7.69",
25
25
  "luxon": "~3.7.1",
26
- "marked": "~16.0.0",
26
+ "marked": "~16.1.1",
27
27
  "tslib": "^2.8.1"
28
28
  },
29
29
  "type": "module"
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as o}from"tslib";import{JSONSupport as t}from"../../../core/JSONSupport.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";let s=class extends t{constructor(o){super(o),this.sourceId=null,this.globalId=null,this.terminalId=null,this.firstUnit=null,this.numUnits=null}};o([r({type:Number,json:{write:!0}})],s.prototype,"sourceId",void 0),o([r({type:String,json:{write:!0}})],s.prototype,"globalId",void 0),o([r({type:Number,json:{write:!0}})],s.prototype,"terminalId",void 0),o([r({type:Number,json:{write:!0}})],s.prototype,"firstUnit",void 0),o([r({type:Number,json:{write:!0}})],s.prototype,"numUnits",void 0),s=o([e("esri.rest.networks.support.CircuitLocation")],s);const i=s;export{i as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import{__decorate as t}from"tslib";import{JSONSupport as o}from"../../../core/JSONSupport.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import{CircuitSectionRoleKebabDict as s,CircuitTypeKebabDict as i}from"../../../networks/support/typeUtils.js";import p from"./CircuitLocation.js";import c from"./CircuitPath.js";import a from"./Subcircuit.js";let n=class extends o{constructor(t){super(t),this.sectionId=null,this.role="start-and-end",this.sectionType="physical",this.startLocation=null,this.stopLocation=null,this.subcircuit=null,this.path=null}};t([r({type:Number,json:{write:!0}})],n.prototype,"sectionId",void 0),t([r({type:s.apiValues,json:{type:s.jsonValues,read:s.read},readOnly:!0})],n.prototype,"role",void 0),t([r({type:i.apiValues,json:{type:i.jsonValues,read:i.read,write:i.write}})],n.prototype,"sectionType",void 0),t([r({type:p,json:{write:!0}})],n.prototype,"startLocation",void 0),t([r({type:p,json:{write:!0}})],n.prototype,"stopLocation",void 0),t([r({type:a,json:{write:!0}})],n.prototype,"subcircuit",void 0),t([r({type:c,readOnly:!0})],n.prototype,"path",void 0),n=t([e("esri.rest.networks.support.CircuitSection")],n);const u=n;export{u 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{JSONMap as e}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import{cast as s}from"../../core/accessorSupport/decorators/cast.js";import{enumeration as n}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";import{ensureClass as p}from"../../core/accessorSupport/ensureType.js";import u from"../../geometry/Point.js";import m from"../../geometry/SpatialReference.js";import{fromJSON as c}from"../../geometry/support/jsonUtils.js";import{geometryTypes as d}from"../../geometry/support/typeUtils.js";import{DataLayerSource as y}from"../../layers/support/source/DataLayerSource.js";import h from"./FullTextSearch.js";import f from"./QuantizationParameters.js";import{spatialRelKebabDict as j}from"./spatialRelationships.js";import v from"./StatisticDefinition.js";import{T as w}from"../../chunks/TimeExtent.js";var S;const g=new e({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let R=class extends r{static{S=this}static from(t){return p(S,t)}constructor(t){super(t),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.fullText=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.returnTrueCurves=void 0,this.sourceSpatialReference=null,this.spatialRelationship="intersects",this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.where=null}castDatumTransformation(t){return"number"==typeof t||"object"==typeof t?t:null}writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}writeParameterValues(t,e){if(t){const r={};for(const e in t){const o=t[e];Array.isArray(o)?r[e]=o.map(t=>t instanceof Date?t.getTime():t):o instanceof Date?r[e]=o.getTime():r[e]=o}e.parameterValues=r}}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10,e.where="1=1"}writeWhere(t,e){e.where=t||"1=1"}clone(){return new S(o({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,fullText:this.fullText,formatOf3DObjects:this.formatOf3DObjects,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:null!=this.historicMoment?new Date(this.historicMoment.getTime()):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,returnTrueCurves:this.returnTrueCurves,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,where:this.where}))}static{this.MAX_MAX_RECORD_COUNT_FACTOR=5}};t([i({json:{write:!0}})],R.prototype,"aggregateIds",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"compactGeometryEnabled",void 0),t([i({json:{write:!0}})],R.prototype,"datumTransformation",void 0),t([s("datumTransformation")],R.prototype,"castDatumTransformation",null),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"defaultSpatialReferenceEnabled",void 0),t([i({type:Number,json:{write:!0}})],R.prototype,"distance",void 0),t([i({type:y,json:{write:!0}})],R.prototype,"dynamicDataSource",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"formatOf3DObjects",void 0),t([i({type:[h],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.fullText&&this.fullText.length>0}}}}})],R.prototype,"fullText",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"gdbVersion",void 0),t([i({types:d,json:{read:c,write:!0}})],R.prototype,"geometry",void 0),t([i({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"groupByFieldsForStatistics",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"having",void 0),t([i({type:Date})],R.prototype,"historicMoment",void 0),t([l("historicMoment")],R.prototype,"writeHistoricMoment",null),t([i({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),t([i({type:Number,cast:t=>t<1?1:t>R.MAX_MAX_RECORD_COUNT_FACTOR?R.MAX_MAX_RECORD_COUNT_FACTOR:t,json:{write:{overridePolicy:t=>({enabled:t>1})}}})],R.prototype,"maxRecordCountFactor",void 0),t([i({type:["xyFootprint"],json:{write:!0}})],R.prototype,"multipatchOption",void 0),t([i({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),t([i({json:{write:!0}})],R.prototype,"objectIds",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),t([i({type:m,json:{name:"outSR",write:!0}})],R.prototype,"outSpatialReference",void 0),t([i({type:[v],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],R.prototype,"outStatistics",void 0),t([i({json:{write:!0}})],R.prototype,"parameterValues",void 0),t([l("parameterValues")],R.prototype,"writeParameterValues",null),t([i({type:u,json:{write:!0}})],R.prototype,"pixelSize",void 0),t([i({type:f,json:{write:!0}})],R.prototype,"quantizationParameters",void 0),t([i({type:[Object],json:{write:!0}})],R.prototype,"rangeValues",void 0),t([i({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy(){return{enabled:"relation"===this.spatialRelationship}}}}})],R.prototype,"relationParameter",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnCentroid",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnDistinctValues",void 0),t([i({type:Boolean,json:{default:!0,write:!0}})],R.prototype,"returnExceededLimitFeatures",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"returnGeometry",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnQueryGeometry",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnM",void 0),t([i({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],R.prototype,"returnZ",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"returnTrueCurves",void 0),t([i({type:m,json:{write:!0}})],R.prototype,"sourceSpatialReference",void 0),t([n(j,{ignoreUnknown:!1,name:"spatialRel"})],R.prototype,"spatialRelationship",void 0),t([i({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),t([l("start"),l("num")],R.prototype,"writeStart",null),t([i({type:String,json:{write:!0}})],R.prototype,"sqlFormat",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"text",void 0),t([i({type:w,json:{write:!0}})],R.prototype,"timeExtent",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"timeReferenceUnknownClient",void 0),t([n(g,{ignoreUnknown:!1}),i({json:{write:{overridePolicy(t){return{enabled:!!t&&null!=this.distance}}}}})],R.prototype,"units",void 0),t([i({type:String,json:{write:{overridePolicy(t){return{enabled:null!=t||null!=this.start&&this.start>0}}}}})],R.prototype,"where",void 0),t([l("where")],R.prototype,"writeWhere",null),R=S=t([a("esri.rest.support.Query")],R);export{R as default};
5
+ import{__decorate as t}from"tslib";import{JSONMap as e}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import{cast as s}from"../../core/accessorSupport/decorators/cast.js";import{enumeration as n}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";import{ensureClass as p}from"../../core/accessorSupport/ensureType.js";import u from"../../geometry/Point.js";import m from"../../geometry/SpatialReference.js";import{fromJSON as c}from"../../geometry/support/jsonUtils.js";import{geometryTypes as d}from"../../geometry/support/typeUtils.js";import{DataLayerSource as y}from"../../layers/support/source/DataLayerSource.js";import h from"./FullTextSearch.js";import f from"./QuantizationParameters.js";import{spatialRelKebabDict as j}from"./spatialRelationships.js";import v from"./StatisticDefinition.js";import{T as w}from"../../chunks/TimeExtent.js";var S;const g=new e({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let R=class extends r{static{S=this}static from(t){return p(S,t)}constructor(t){super(t),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.fullText=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.returnTrueCurves=void 0,this.sourceSpatialReference=null,this.spatialRelationship="intersects",this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.where=null}castDatumTransformation(t){return"number"==typeof t||"object"==typeof t?t:null}writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}writeParameterValues(t,e){if(t){const r={};for(const e in t){const o=t[e];Array.isArray(o)?r[e]=o.map(t=>t instanceof Date?t.getTime():t):o instanceof Date?r[e]=o.getTime():r[e]=o}e.parameterValues=r}}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10,e.where="1=1"}writeWhere(t,e){e.where=t||"1=1"}clone(){return new S(o({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,fullText:this.fullText,formatOf3DObjects:this.formatOf3DObjects,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:null!=this.historicMoment?new Date(this.historicMoment):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,returnTrueCurves:this.returnTrueCurves,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,where:this.where}))}static{this.MAX_MAX_RECORD_COUNT_FACTOR=5}};t([i({json:{write:!0}})],R.prototype,"aggregateIds",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"compactGeometryEnabled",void 0),t([i({json:{write:!0}})],R.prototype,"datumTransformation",void 0),t([s("datumTransformation")],R.prototype,"castDatumTransformation",null),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"defaultSpatialReferenceEnabled",void 0),t([i({type:Number,json:{write:!0}})],R.prototype,"distance",void 0),t([i({type:y,json:{write:!0}})],R.prototype,"dynamicDataSource",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"formatOf3DObjects",void 0),t([i({type:[h],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.fullText&&this.fullText.length>0}}}}})],R.prototype,"fullText",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"gdbVersion",void 0),t([i({types:d,json:{read:c,write:!0}})],R.prototype,"geometry",void 0),t([i({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"groupByFieldsForStatistics",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"having",void 0),t([i({type:Date})],R.prototype,"historicMoment",void 0),t([l("historicMoment")],R.prototype,"writeHistoricMoment",null),t([i({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),t([i({type:Number,cast:t=>t<1?1:t>R.MAX_MAX_RECORD_COUNT_FACTOR?R.MAX_MAX_RECORD_COUNT_FACTOR:t,json:{write:{overridePolicy:t=>({enabled:t>1})}}})],R.prototype,"maxRecordCountFactor",void 0),t([i({type:["xyFootprint"],json:{write:!0}})],R.prototype,"multipatchOption",void 0),t([i({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),t([i({json:{write:!0}})],R.prototype,"objectIds",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),t([i({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),t([i({type:m,json:{name:"outSR",write:!0}})],R.prototype,"outSpatialReference",void 0),t([i({type:[v],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],R.prototype,"outStatistics",void 0),t([i({json:{write:!0}})],R.prototype,"parameterValues",void 0),t([l("parameterValues")],R.prototype,"writeParameterValues",null),t([i({type:u,json:{write:!0}})],R.prototype,"pixelSize",void 0),t([i({type:f,json:{write:!0}})],R.prototype,"quantizationParameters",void 0),t([i({type:[Object],json:{write:!0}})],R.prototype,"rangeValues",void 0),t([i({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy(){return{enabled:"relation"===this.spatialRelationship}}}}})],R.prototype,"relationParameter",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnCentroid",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnDistinctValues",void 0),t([i({type:Boolean,json:{default:!0,write:!0}})],R.prototype,"returnExceededLimitFeatures",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"returnGeometry",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnQueryGeometry",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"returnM",void 0),t([i({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],R.prototype,"returnZ",void 0),t([i({type:Boolean,json:{write:!0}})],R.prototype,"returnTrueCurves",void 0),t([i({type:m,json:{write:!0}})],R.prototype,"sourceSpatialReference",void 0),t([n(j,{ignoreUnknown:!1,name:"spatialRel"})],R.prototype,"spatialRelationship",void 0),t([i({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),t([l("start"),l("num")],R.prototype,"writeStart",null),t([i({type:String,json:{write:!0}})],R.prototype,"sqlFormat",void 0),t([i({type:String,json:{write:!0}})],R.prototype,"text",void 0),t([i({type:w,json:{write:!0}})],R.prototype,"timeExtent",void 0),t([i({type:Boolean,json:{default:!1,write:!0}})],R.prototype,"timeReferenceUnknownClient",void 0),t([n(g,{ignoreUnknown:!1}),i({json:{write:{overridePolicy(t){return{enabled:!!t&&null!=this.distance}}}}})],R.prototype,"units",void 0),t([i({type:String,json:{write:{overridePolicy(t){return{enabled:null!=t||null!=this.start&&this.start>0}}}}})],R.prototype,"where",void 0),t([l("where")],R.prototype,"writeWhere",null),R=S=t([a("esri.rest.support.Query")],R);export{R 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{ensureType as i}from"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../../core/accessorSupport/decorators/writer.js";import p from"../../geometry/SpatialReference.js";import{DataLayerSource as a}from"../../layers/support/source/DataLayerSource.js";var d;let u=class extends e{static{d=this}constructor(t){super(t),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(e.definitionExpression="1=1")}clone(){return new d(o({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};t([r({type:Boolean,json:{write:!0}})],u.prototype,"cacheHint",void 0),t([r({type:a,json:{write:!0}})],u.prototype,"dynamicDataSource",void 0),t([r({type:String,json:{write:!0}})],u.prototype,"gdbVersion",void 0),t([r({type:Number,json:{write:!0}})],u.prototype,"geometryPrecision",void 0),t([r({type:Date})],u.prototype,"historicMoment",void 0),t([n("historicMoment")],u.prototype,"_writeHistoricMoment",null),t([r({type:Number,json:{write:!0}})],u.prototype,"maxAllowableOffset",void 0),t([r({json:{write:!0}})],u.prototype,"objectIds",void 0),t([r({type:[String],json:{write:!0}})],u.prototype,"orderByFields",void 0),t([r({type:[String],json:{write:!0}})],u.prototype,"outFields",void 0),t([r({type:p,json:{read:{source:"outSR"},write:{target:"outSR"}}})],u.prototype,"outSpatialReference",void 0),t([r({json:{write:!0}})],u.prototype,"relationshipId",void 0),t([r({type:Number,json:{read:{source:"resultOffset"}}})],u.prototype,"start",void 0),t([n("start"),n("num")],u.prototype,"writeStart",null),t([r({type:Number,json:{read:{source:"resultRecordCount"}}})],u.prototype,"num",void 0),t([r({json:{write:!0}})],u.prototype,"returnGeometry",void 0),t([r({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],u.prototype,"returnM",void 0),t([r({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],u.prototype,"returnZ",void 0),t([r({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],u.prototype,"where",void 0),u=d=t([s("esri.rest.support.RelationshipQuery")],u),u.from=i(u);export{u as default};
5
+ import{__decorate as t}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import{ensureType as i}from"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../../core/accessorSupport/decorators/writer.js";import p from"../../geometry/SpatialReference.js";import{DataLayerSource as a}from"../../layers/support/source/DataLayerSource.js";var d;let u=class extends e{static{d=this}constructor(t){super(t),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(t,e){e.historicMoment=t&&t.getTime()}writeStart(t,e){e.resultOffset=this.start,e.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(e.definitionExpression="1=1")}clone(){return new d(o({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};t([r({type:Boolean,json:{write:!0}})],u.prototype,"cacheHint",void 0),t([r({type:a,json:{write:!0}})],u.prototype,"dynamicDataSource",void 0),t([r({type:String,json:{write:!0}})],u.prototype,"gdbVersion",void 0),t([r({type:Number,json:{write:!0}})],u.prototype,"geometryPrecision",void 0),t([r({type:Date})],u.prototype,"historicMoment",void 0),t([n("historicMoment")],u.prototype,"_writeHistoricMoment",null),t([r({type:Number,json:{write:!0}})],u.prototype,"maxAllowableOffset",void 0),t([r({json:{write:!0}})],u.prototype,"objectIds",void 0),t([r({type:[String],json:{write:!0}})],u.prototype,"orderByFields",void 0),t([r({type:[String],json:{write:!0}})],u.prototype,"outFields",void 0),t([r({type:p,json:{read:{source:"outSR"},write:{target:"outSR"}}})],u.prototype,"outSpatialReference",void 0),t([r({json:{write:!0}})],u.prototype,"relationshipId",void 0),t([r({type:Number,json:{read:{source:"resultOffset"}}})],u.prototype,"start",void 0),t([n("start"),n("num")],u.prototype,"writeStart",null),t([r({type:Number,json:{read:{source:"resultRecordCount"}}})],u.prototype,"num",void 0),t([r({json:{write:!0}})],u.prototype,"returnGeometry",void 0),t([r({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],u.prototype,"returnM",void 0),t([r({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],u.prototype,"returnZ",void 0),t([r({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],u.prototype,"where",void 0),u=d=t([s("esri.rest.support.RelationshipQuery")],u),u.from=i(u);export{u as default};
package/rest/utils.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.34/esri/copyright.txt for details.
4
4
  */
5
- import t from"../config.js";import{id as n}from"../kernel.js";import{clone as r}from"../core/lang.js";import{urlToObject as e}from"../core/urlUtils.js";import{supportsApiKey as i,getApiKey as o}from"../support/apiKeyUtils.js";function s(t,n){return n?{...n,query:{...t??{},...n.query}}:{query:t}}function f(t){return"string"==typeof t?e(t):r(t)}function u(t,n,r){const e={};for(const i in t){if("declaredClass"===i)continue;const o=t[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))e[i]=o.map(t=>u(t));else if("object"==typeof o)if(o.toJSON){const t=o.toJSON(r?.[i]);e[i]=n?t:JSON.stringify(t)}else e[i]=n?o:JSON.stringify(o);else e[i]=o}return e}function c(t,r){return t?r&&i(t)?r:o(t)??n?.findCredential(t)?.token:null}async function a(r,e,i){const o=c(r,e);if(o)return o;!n&&t.request.useIdentity&&await import("../identity/IdentityManager.js");const s=await n.getCredential(r,i);return s?.token}export{s as asValidOptions,u as encode,c as findToken,a as getToken,f as parseUrl};
5
+ import t from"../config.js";import{id as n}from"../kernel.js";import{clone as r}from"../core/lang.js";import{urlToObject as e}from"../core/urlUtils.js";import{supportsApiKey as i,getApiKey as o}from"../support/apiKeyUtils.js";function s(t,n){return n?{...n,query:{...t,...n.query}}:{query:t}}function f(t){return"string"==typeof t?e(t):r(t)}function u(t,n,r){const e={};for(const i in t){if("declaredClass"===i)continue;const o=t[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))e[i]=o.map(t=>u(t));else if("object"==typeof o)if(o.toJSON){const t=o.toJSON(r?.[i]);e[i]=n?t:JSON.stringify(t)}else e[i]=n?o:JSON.stringify(o);else e[i]=o}return e}function c(t,r){return t?r&&i(t)?r:o(t)??n?.findCredential(t)?.token:null}async function a(r,e,i){const o=c(r,e);if(o)return o;!n&&t.request.useIdentity&&await import("../identity/IdentityManager.js");const s=await n.getCredential(r,i);return s?.token}export{s as asValidOptions,u as encode,c as findToken,a as getToken,f as parseUrl};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const c="20250729",e="277e607b1f50b54c726baecc0c8d3841a891ea49";export{c as buildDate,e as commitHash};
5
+ const e="20250730",d="f63eddc54e0d40fc73398057751ebc105ed9ed47";export{e as buildDate,d as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../core/Error.js";const r="webscene:failed-to-copy-embedded-resources",o="webscene:schema-validation";function n(){return new e(r,"Copying of embedded resources is currently not supported")}function s(r){return new e(o,"Failed to save webscene due to schema validation errors. See 'details.errors' for more detailed information",{errors:r})}export{n as createCopyError,s as createSchemaValidationError,o as schemaValidationErrorName};
5
+ import e from"../core/Error.js";const r="webscene:schema-validation";function o(o){return new e(r,"Failed to save webscene due to schema validation errors. See 'details.errors' for more detailed information",{errors:o})}export{o as createSchemaValidationError,r as schemaValidationErrorName};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{defaultCIMValues as e,defaultCIMColor as t}from"./defaultCIMValues.js";function r(e){return"function"==typeof e}function n(e,t,n,o){return r(e)?e(t,n,o):e}function o(e){return[e.r,e.g,e.b,e.a]}const l=" /-,\n";function i(e){let t=e.length;for(;t--;)if(!l.includes(e.charAt(t)))return!1;return!0}function a(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,i(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const l=t[e.slice(n,o)];l&&r.push([null,l,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,i(t)])}return r}function s(e,t,r){let n="",o=null;for(const l of t){const[t,r,i]=l;if(null!=t&&""!==t)i?o=t:(null!=o&&(n+=o,o=null),n+=t);else{const t=e.readAttribute(r);null!=t&&""!==t&&(null!==o&&(n+=o,o=null),n+=t)}}return u(n,r)}function c(e,t,r,n){let o="",l=null;for(const i of t){const[t,n,a]=i;if(null!=t&&""!==t)a?l=t:(null!=l&&(o+=l,l=null),o+=t);else{let t=n;null!=r&&(t=W(n,r));const i=e.attributes[t];null!=i&&""!==i&&(null!=l&&(o+=l,l=null),o+=i)}}return u(o,n)}function u(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function f(e,t,r,n,o,l,i=!0){const a=t/o,s=r/l,c=Math.ceil(a/2),u=Math.ceil(s/2);for(let f=0;f<l;f++)for(let r=0;r<o;r++){const y=4*(r+(i?l-f-1:f)*o);let M=0,m=0,C=0,p=0,h=0,I=0,b=0;const d=(f+.5)*s;for(let n=Math.floor(f*s);n<(f+1)*s;n++){const o=Math.abs(d-(n+.5))/u,l=(r+.5)*a,i=o*o;for(let s=Math.floor(r*a);s<(r+1)*a;s++){let r=Math.abs(l-(s+.5))/c;const o=Math.sqrt(i+r*r);o>=-1&&o<=1&&(M=2*o*o*o-3*o*o+1,M>0&&(r=4*(s+n*t),b+=M*e[r+3],C+=M,e[r+3]<255&&(M=M*e[r+3]/250),p+=M*e[r],h+=M*e[r+1],I+=M*e[r+2],m+=M))}}n[y]=p/m,n[y+1]=h/m,n[y+2]=I/m,n[y+3]=b/C}}function y(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function M(e){return e.data?.symbol??null}function m(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function C(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function p(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function h(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const I=(e,t=0)=>null==e||isNaN(e)?t:e,b=(e,t)=>null!=e?e:t,d=(e,t)=>e??t,k=e=>e.tintColor?y(e.tintColor):[255,255,255,1];class S{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function g(e){return new S(e)}const P=g(()=>import("../../geometry/geometryEngineJSON.js"));function w(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function L(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function A(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function N(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function T(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=T(t);if(null!=e)return e}break;case"CIMTextSymbol":return T(e.symbol);case"CIMSolidFill":return e.color}return null}function x(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=x(e);if(null!=t)return t}break}case"CIMTextSymbol":return x(e.symbol);case"CIMSolidStroke":return e.color}}function v(e){for(const t of e)if(t.enable)switch(t.type){case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return!0}return!1}function F(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=F(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return F(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function V(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":case"Justify":return"center"}}function z(e){switch(e){case"Top":default:return"top";case"Center":return"middle";case"Baseline":return"baseline";case"Bottom":return"bottom"}}function G(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const O=e=>e.includes("data:image/svg+xml");function D(e){if(!e)return null;switch(e.type){case"CIMPointSymbol":case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function E(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function j(e,t,r,n,o,l,i=!0){const{infos:a}=l;let s=1,c=0,u=0,f=0,y=1;for(const{absoluteAnchorPoint:C,offsetX:p,offsetY:h,rotation:I,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:S}of a){y=C?1:s;u=K(p,h,c,y,u),f=$(p,h,c,y,f),d&&(S||i)&&(s*=b/d),c=Q(I,k,c)}const M=K(n,o,c,y,u),m=$(n,o,c,y,f);return{size:e*s,rotation:Q(t,r,c),offsetX:M,offsetY:m}}function q(e){if(null==e)return!1;if(Array.isArray(e))return e.every(e=>q(e));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function R(r,n){if("color"===n||"outlinecolor"===n||"backgroundcolor"===n||"borderlinecolor"===n||"tintcolor"===n)return[...t[n]];const o=e[r];if(!o)throw new Error(`InternalError: default value for type ${r}.`);return o[n]}function _(e){return e.split(" ").map(e=>Number(e))}function B(e){return"string"==typeof e?_(e):e}function H(e){return e?.dashTemplate&&(e.dashTemplate=B(e.dashTemplate)),e}function J(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return J(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return J(e.symbol)}}return"Normal"}function U(t){if(t)switch(t.type){case"CIMTextSymbol":return t.height;case"CIMPointSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t);break}}return r}case"CIMLineSymbol":case"CIMPolygonSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=n.width;null!=e&&e>r&&(r=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(n.markerPlacement&&h(n.markerPlacement)){const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t)}break;case"CIMPictureFill":{const e=n.height;null!=e&&e>r&&(r=e)}}return r}}}function W(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function X(e){return e.map(e=>({...e,propertyName:E(e.propertyName)}))}function Y(e){const t={};for(const r in e){const n=e[r];t[E(r)]=n}return t}function $(e,t,r,n,o){const l=r*Math.PI/180;if(l){const r=Math.cos(l);return(Math.sin(l)*e+r*t)*n+o}return t*n+o}function K(e,t,r,n,o){const l=r*Math.PI/180;if(l){return(Math.cos(l)*e-Math.sin(l)*t)*n+o}return e*n+o}function Q(e,t,r){return t?r-e:r+e}function Z(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let l=t[E(r)];if(null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180)),null==l&&(l=R(t.type,r.toLowerCase()),null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]]:o&&(l*=Math.PI/180))),null!=t.primitiveName){const i=e[t.primitiveName];if(null!=i){const e=i[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(l=e,null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180))):(l={valueExpressionInfo:e,defaultValue:l},null!=l&&(n?l={type:"Process",op:"ArcadeColor",value:l}:o&&(l={type:"Process",op:"Divide",left:l,right:180/Math.PI}))))}}if(null==l)throw new Error(`Failed to derive a value or an expression for "${r}".`);return l}function ee(e,t,r){if(null!=t[E(r)])return!0;if(null!=t.primitiveName){const n=e[t.primitiveName];if(null!=n){if(null!=n[r])return!0}}return!1}function te(e,t){return Math.max(Math.min((e??t)/100,1),0)}export{u as adjustTextCase,a as analyzeTextParts,j as applyParentTransform,c as assignTextValuesFromFeature,G as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,N as fromCIMFontDecoration,A as fromCIMFontStyle,V as fromCIMHorizontalAlignment,z as fromCIMVerticalAlignment,R as getDefaultCIMValue,d as getEnum,W as getFieldName,T as getFillColor,w as getFontStyle,L as getFontWeight,I as getNumericValue,Z as getProcessParam,te as getRelativeGradientSize,U as getSize,x as getStrokeColor,F as getStrokeWidth,J as getTextCasing,s as getTextValuesFromFeatureHandle,k as getTintColor,b as getValue,ee as hasProcessParam,v as hasStrokeLayer,g as importLazily,p as isCIMFill,m as isCIMMarker,h as isCIMMarkerStrokePlacement,C as isCIMStroke,r as isFeatureValueFn,O as isSVGImage,q as isValidCIMValue,P as lazyGeometryEngine,D as mapCIMSymbolToGeometryType,y as normalizeAlpha,H as normalizeDashEffectTemplate,B as normalizeDashTemplate,X as normalizePrimitiveOverrideProps,_ as parseDashTemplate,f as resampleHermite,M as toCIMSymbolJSON,Y as toLowerCaseProps,E as uncapitalize};
5
+ import{defaultCIMValues as e,defaultCIMColor as t}from"./defaultCIMValues.js";function r(e){return"function"==typeof e}function n(e,t,n,o){return r(e)?e(t,n,o):e}function o(e){return[e.r,e.g,e.b,e.a]}const l=" /-,\n";function i(e){let t=e.length;for(;t--;)if(!l.includes(e.charAt(t)))return!1;return!0}function a(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,i(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const l=t[e.slice(n,o)];l&&r.push([null,l,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,i(t)])}return r}function s(e,t,r){let n="",o=null;for(const l of t){const[t,r,i]=l;if(null!=t&&""!==t)i?o=t:(null!=o&&(n+=o,o=null),n+=t);else{const t=e.readAttribute(r);null!=t&&""!==t&&(null!==o&&(n+=o,o=null),n+=t)}}return u(n,r)}function c(e,t,r,n){let o="",l=null;for(const i of t){const[t,n,a]=i;if(null!=t&&""!==t)a?l=t:(null!=l&&(o+=l,l=null),o+=t);else{let t=n;null!=r&&(t=W(n,r));const i=e.attributes[t];null!=i&&""!==i&&(null!=l&&(o+=l,l=null),o+=i)}}return u(o,n)}function u(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function f(e,t,r,n,o,l,i=!0){const a=t/o,s=r/l,c=Math.ceil(a/2),u=Math.ceil(s/2);for(let f=0;f<l;f++)for(let r=0;r<o;r++){const M=4*(r+(i?l-f-1:f)*o);let y=0,m=0,C=0,p=0,h=0,I=0,b=0;const d=(f+.5)*s;for(let n=Math.floor(f*s);n<(f+1)*s;n++){const o=Math.abs(d-(n+.5))/u,l=(r+.5)*a,i=o*o;for(let s=Math.floor(r*a);s<(r+1)*a;s++){let r=Math.abs(l-(s+.5))/c;const o=Math.sqrt(i+r*r);o>=-1&&o<=1&&(y=2*o*o*o-3*o*o+1,y>0&&(r=4*(s+n*t),b+=y*e[r+3],C+=y,e[r+3]<255&&(y=y*e[r+3]/250),p+=y*e[r],h+=y*e[r+1],I+=y*e[r+2],m+=y))}}n[M]=p/m,n[M+1]=h/m,n[M+2]=I/m,n[M+3]=b/C}}function M(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function y(e){return e.data?.symbol??null}function m(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function C(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function p(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function h(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const I=(e,t=0)=>null==e||isNaN(e)?t:e,b=(e,t)=>null!=e?e:t,d=(e,t)=>e??t,k=e=>e.tintColor?M(e.tintColor):[255,255,255,1];class S{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function P(e){return new S(e)}function g(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function w(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function L(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function A(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function T(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=T(t);if(null!=e)return e}break;case"CIMTextSymbol":return T(e.symbol);case"CIMSolidFill":return e.color}return null}function N(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=N(e);if(null!=t)return t}break}case"CIMTextSymbol":return N(e.symbol);case"CIMSolidStroke":return e.color}}function x(e){for(const t of e)if(t.enable)switch(t.type){case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return!0}return!1}function v(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=v(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return v(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function F(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":case"Justify":return"center"}}function V(e){switch(e){case"Top":default:return"top";case"Center":return"middle";case"Baseline":return"baseline";case"Bottom":return"bottom"}}function z(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const G=e=>e.includes("data:image/svg+xml");function O(e){if(!e)return null;switch(e.type){case"CIMPointSymbol":case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function D(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function q(e,t,r,n,o,l,i=!0){const{infos:a}=l;let s=1,c=0,u=0,f=0,M=1;for(const{absoluteAnchorPoint:C,offsetX:p,offsetY:h,rotation:I,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:S}of a){M=C?1:s;u=J(p,h,c,M,u),f=$(p,h,c,M,f),d&&(S||i)&&(s*=b/d),c=K(I,k,c)}const y=J(n,o,c,M,u),m=$(n,o,c,M,f);return{size:e*s,rotation:K(t,r,c),offsetX:y,offsetY:m}}function E(e){if(null==e)return!1;if(Array.isArray(e))return e.every(e=>E(e));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function R(r,n){if("color"===n||"outlinecolor"===n||"backgroundcolor"===n||"borderlinecolor"===n||"tintcolor"===n)return[...t[n]];const o=e[r];if(!o)throw new Error(`InternalError: default value for type ${r}.`);return o[n]}function _(e){return e.split(" ").map(e=>Number(e))}function j(e){return"string"==typeof e?_(e):e}function B(e){return e?.dashTemplate&&(e.dashTemplate=j(e.dashTemplate)),e}function H(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return H(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return H(e.symbol)}}return"Normal"}function U(t){if(t)switch(t.type){case"CIMTextSymbol":return t.height;case"CIMPointSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t);break}}return r}case"CIMLineSymbol":case"CIMPolygonSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=n.width;null!=e&&e>r&&(r=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(n.markerPlacement&&h(n.markerPlacement)){const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t)}break;case"CIMPictureFill":{const e=n.height;null!=e&&e>r&&(r=e)}}return r}}}function W(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function X(e){return e.map(e=>({...e,propertyName:D(e.propertyName)}))}function Y(e){const t={};for(const r in e){const n=e[r];t[D(r)]=n}return t}function $(e,t,r,n,o){const l=r*Math.PI/180;if(l){const r=Math.cos(l);return(Math.sin(l)*e+r*t)*n+o}return t*n+o}function J(e,t,r,n,o){const l=r*Math.PI/180;if(l){return(Math.cos(l)*e-Math.sin(l)*t)*n+o}return e*n+o}function K(e,t,r){return t?r-e:r+e}function Q(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let l=t[D(r)];if(null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180)),null==l&&(l=R(t.type,r.toLowerCase()),null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]]:o&&(l*=Math.PI/180))),null!=t.primitiveName){const i=e[t.primitiveName];if(null!=i){const e=i[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(l=e,null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180))):(l={valueExpressionInfo:e,defaultValue:l},null!=l&&(n?l={type:"Process",op:"ArcadeColor",value:l}:o&&(l={type:"Process",op:"Divide",left:l,right:180/Math.PI}))))}}if(null==l)throw new Error(`Failed to derive a value or an expression for "${r}".`);return l}function Z(e,t,r){if(null!=t[D(r)])return!0;if(null!=t.primitiveName){const n=e[t.primitiveName];if(null!=n){if(null!=n[r])return!0}}return!1}function ee(e,t){return Math.max(Math.min((e??t)/100,1),0)}export{u as adjustTextCase,a as analyzeTextParts,q as applyParentTransform,c as assignTextValuesFromFeature,z as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,A as fromCIMFontDecoration,L as fromCIMFontStyle,F as fromCIMHorizontalAlignment,V as fromCIMVerticalAlignment,R as getDefaultCIMValue,d as getEnum,W as getFieldName,T as getFillColor,g as getFontStyle,w as getFontWeight,I as getNumericValue,Q as getProcessParam,ee as getRelativeGradientSize,U as getSize,N as getStrokeColor,v as getStrokeWidth,H as getTextCasing,s as getTextValuesFromFeatureHandle,k as getTintColor,b as getValue,Z as hasProcessParam,x as hasStrokeLayer,P as importLazily,p as isCIMFill,m as isCIMMarker,h as isCIMMarkerStrokePlacement,C as isCIMStroke,r as isFeatureValueFn,G as isSVGImage,E as isValidCIMValue,O as mapCIMSymbolToGeometryType,M as normalizeAlpha,B as normalizeDashEffectTemplate,j as normalizeDashTemplate,X as normalizePrimitiveOverrideProps,_ as parseDashTemplate,f as resampleHermite,y as toCIMSymbolJSON,Y as toLowerCaseProps,D as uncapitalize};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import has from"../../core/has.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{SymbolFader as o}from"./engine/vectorTiles/decluttering/SymbolFader.js";import{tileSize as a}from"./engine/webgl/definitions.js";const i=7e6;class l{constructor(){this.styles=new Map,this.layerContexts=new Map}get cachedStyles(){return this.styles}setLabelClassStyle(e,t,s){this.layerContexts.set(e,t),this.styles.set(e,s)}}let n=class extends t{constructor(e){super(e),this._faderWorkingSet=[],this._styleRepository=new l,this.lastUpdateId=-1,this.updateRequested=!1,this.view=null;const t=(e,t)=>{e.updateLabelVisibility(),e.requestRender(),e.isReady&&(e.decluttered=!0)};this.symbolFader=new o("feature-tile",this._styleRepository,t,this._faderWorkingSet,a,i)}get updating(){return has("esri-2d-log-updating")&&console.log(`Updating LabelManager ${this.updateRequested}:\n-> updateRequested: ${this.updateRequested}`),this.updateRequested}viewChange(){this.requestUpdate()}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.view?.requestUpdate())}processUpdate(e){this.doUpdate(e)?this.updateRequested=!1:(this.updateRequested=!0,this.view?.requestUpdate())}setLabelSchemaStyles(e,t){let s;switch(e.type){case"label":s=e.classes;break;case"subtype":s=Array.from(Object.values(e.renderers).flatMap(e=>e.classes));break;case"cluster":s=[...e.cluster.classes,...e.feature.classes];break;case"track":s=[...e.latestObservation.classes,...e.previousObservation.classes,...e.trackLine.classes]}for(const r of s){const e=c(r);this._styleRepository.setLabelClassStyle(r.labelClassId,t,e)}}doUpdate(e){const t=this.view;if(!t)return!1;const s=t.allLayerViews.map(e=>e.featureContainer).filter(e=>!!e&&e?.hasLabels);if(s.length>0){this._faderWorkingSet.length=0;for(const t of s)for(const s of t.tiles||[])s.setTransform(e.state),this._faderWorkingSet.push(s);const r=e.state.scale,o=t.featuresTilingScheme.scaleToZoom(r);return this.symbolFader.update(o,e.state)}return!0}};function c(e){const t="esriGeometryPolyline"===e.geometryType?0:1,s="esriGeometryPolyline"===e.geometryType?0:1;return{geometryType:e.geometryType,iconAllowOverlap:!e.deconflictionEnabled,iconIgnorePlacement:!1,textAllowOverlap:!e.deconflictionEnabled,textIgnorePlacement:!1,iconRotationAlignment:t,textRotationAlignment:t,iconTranslateAnchor:s,iconTranslate:[0,0],textTranslateAnchor:s,textTranslate:[0,0]}}e([s()],n.prototype,"updateRequested",void 0),e([s()],n.prototype,"updating",null),e([s()],n.prototype,"view",void 0),n=e([r("esri.views.2d.LabelManager")],n);export{l as LabelClassStyleRepository,n as LabelManager};
5
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import has from"../../core/has.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{SymbolFader as o}from"./engine/vectorTiles/decluttering/SymbolFader.js";import{tileSize as a}from"./engine/webgl/definitions.js";const i=7e6;class n{constructor(){this.styles=new Map,this.layerContexts=new Map}get cachedStyles(){return this.styles}setLabelClassStyle(e,t,s){this.layerContexts.set(e,t),this.styles.set(e,s)}removeContainer(e){for(const[t,s]of this.layerContexts.entries())s===e&&this.layerContexts.delete(t)}}let l=class extends t{constructor(e){super(e),this._faderWorkingSet=[],this._styleRepository=new n,this.lastUpdateId=-1,this.updateRequested=!1,this.view=null;const t=(e,t)=>{e.updateLabelVisibility(),e.requestRender(),e.isReady&&(e.decluttered=!0)};this.symbolFader=new o("feature-tile",this._styleRepository,t,this._faderWorkingSet,a,i)}get updating(){return has("esri-2d-log-updating")&&console.log(`Updating LabelManager ${this.updateRequested}:\n-> updateRequested: ${this.updateRequested}`),this.updateRequested}viewChange(){this.requestUpdate()}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.view?.requestUpdate())}processUpdate(e){this.doUpdate(e)?this.updateRequested=!1:(this.updateRequested=!0,this.view?.requestUpdate())}setLabelSchemaStyles(e,t){let s;switch(e.type){case"label":s=e.classes;break;case"subtype":s=Array.from(Object.values(e.renderers).flatMap(e=>e.classes));break;case"cluster":s=[...e.cluster.classes,...e.feature.classes];break;case"track":s=[...e.latestObservation.classes,...e.previousObservation.classes,...e.trackLine.classes]}for(const r of s){const e=c(r);this._styleRepository.setLabelClassStyle(r.labelClassId,t,e)}}removeContainer(e){this._styleRepository.removeContainer(e),this.requestUpdate()}doUpdate(e){this._faderWorkingSet.length=0;const t=this.view;if(!t)return!1;const s=t.allLayerViews.map(e=>e.featureContainer).filter(e=>!!e&&e?.hasLabels);if(s.length>0){for(const t of s)for(const s of t.tiles||[])s.setTransform(e.state),this._faderWorkingSet.push(s);const r=e.state.scale,o=t.featuresTilingScheme.scaleToZoom(r);return this.symbolFader.update(o,e.state)}return!0}};function c(e){const t="esriGeometryPolyline"===e.geometryType?0:1,s="esriGeometryPolyline"===e.geometryType?0:1;return{geometryType:e.geometryType,iconAllowOverlap:!e.deconflictionEnabled,iconIgnorePlacement:!1,textAllowOverlap:!e.deconflictionEnabled,textIgnorePlacement:!1,iconRotationAlignment:t,textRotationAlignment:t,iconTranslateAnchor:s,iconTranslate:[0,0],textTranslateAnchor:s,textTranslate:[0,0]}}e([s()],l.prototype,"updateRequested",void 0),e([s()],l.prototype,"updating",null),e([s()],l.prototype,"view",void 0),l=e([r("esri.views.2d.LabelManager")],l);export{n as LabelClassStyleRepository,l as LabelManager};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{pt2px as e}from"../../../../core/screenUtils.js";import{identity as t,translate as n,scale as i}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";function s(t){const n=a(u(t)),i=n,o=!0,s=Math.max(n/2,5),r=Math.round(e(t.maxPathLength)/s)+1,l=10,{density:c}=t;return{smoothing:e(t.smoothing),interpolate:!0,velocityScale:"flow-from"===t.flowRepresentation?1:-1,verticesPerLine:r,minSpeedThreshold:.001,segmentLength:s,maxTurnAngle:1,collisions:o,lineCollisionWidth:i,lineSpacing:l,density:c}}function a(e){return"constant"===e.kind?e.value[0]:e.values[e.values.length-1]}function r(e){const t=e.toRgba();return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function l(e){return{kind:"constant",value:[.1,.1,.1,1]}}function u(t){if(!t.hasVisualVariables("size"))return{kind:"constant",value:[e(t.trailWidth)]};const n=t.getVisualVariablesForType("size")[0],i=[],o=[];let s;if(n.stops){for(const t of n.stops)i.push(t.value),o.push(e(t.size));s=n.stops.length}else i.push(n.minDataValue,n.maxDataValue),o.push(e(n.minSize),e(n.maxSize)),s=2;return{kind:"ramp",stops:i,values:o,count:s}}function c(e){if(!e.hasVisualVariables("color"))return{kind:"constant",value:r(e.color)};const t=e.getVisualVariablesForType("color")[0],n=[],i=[];for(const o of t.stops)n.push(o.value),Array.prototype.push.apply(i,r(o.color));return{kind:"ramp",stops:n,values:i,count:t.stops.length}}function p(e){if(!e.hasVisualVariables("opacity"))return{kind:"constant",value:[1]};const t=e.getVisualVariablesForType("opacity")[0],n=[],i=[];for(const o of t.stops)n.push(o.value),i.push(o.opacity);return{kind:"ramp",stops:n,values:i,count:t.stops.length}}function m(e,t,n,i){switch(t){case"int":e.setUniform1iv(n,i);break;case"float":e.setUniform1fv(n,i);break;case"vec2":e.setUniform2fv(n,i);break;case"vec3":e.setUniform3fv(n,i);break;case"vec4":e.setUniform4fv(n,i)}}function f(e,t,n,i){"constant"===i.kind?m(e,n,`u_${t}`,i.value):(m(e,"float",`u_${t}_stops`,i.stops),m(e,n,`u_${t}_values`,i.values),e.setUniform1i(`u_${t}_count`,i.count))}function h(e,t){let n=!0;return n=n&&e.collisions===t.collisions,n=n&&e.density===t.density,n=n&&e.interpolate===t.interpolate,n=n&&e.lineCollisionWidth===t.lineCollisionWidth,n=n&&e.lineSpacing===t.lineSpacing,n=n&&e.maxTurnAngle===t.maxTurnAngle,n=n&&e.minSpeedThreshold===t.minSpeedThreshold,n=n&&e.segmentLength===t.segmentLength,n=n&&e.smoothing===t.smoothing,n=n&&e.velocityScale===t.velocityScale,n=n&&e.verticesPerLine===t.verticesPerLine,n}function d(e,t){return e===t||null!=e&&null!=t&&e.equals(t)}function g(e,t){if(!h(e.simulationSettings,t.simulationSettings))return!1;if(!d(e.timeExtent,t.timeExtent))return!1;let n=!0;return n=n&&e.loadImagery===t.loadImagery,n=n&&e.createFlowMesh===t.createFlowMesh,n=n&&e.color.kind===t.color.kind,n=n&&e.opacity.kind===t.opacity.kind,n=n&&e.size.kind===t.size.kind,n}function v(e,s,a){const r=o();t(r),n(r,r,[-1,1]),i(r,r,[2/s,-2/a,1]);return{time:e,dvsMat3:r,displayViewMat3:r}}export{g as areStreamlinesCompatible,c as getColor,s as getFlowSimulationSettings,l as getForegroundColor,a as getMax,p as getOpacity,v as getSingleTileVisualState,u as getSize,m as setUniform,f as setUniforms,h as simulationSettingsEqual,d as timeExtentsEqual,r as toRgba};
5
+ import{pt2px as e}from"../../../../core/screenUtils.js";function n(n){const i=t(s(n)),o=i,a=!0,l=Math.max(i/2,5),r=Math.round(e(n.maxPathLength)/l)+1,u=10,{density:c}=n;return{smoothing:e(n.smoothing),interpolate:!0,velocityScale:"flow-from"===n.flowRepresentation?1:-1,verticesPerLine:r,minSpeedThreshold:.001,segmentLength:l,maxTurnAngle:1,collisions:a,lineCollisionWidth:o,lineSpacing:u,density:c}}function t(e){return"constant"===e.kind?e.value[0]:e.values[e.values.length-1]}function i(e){const n=e.toRgba();return[n[0]/255,n[1]/255,n[2]/255,n[3]]}function o(e){return{kind:"constant",value:[.1,.1,.1,1]}}function s(n){if(!n.hasVisualVariables("size"))return{kind:"constant",value:[e(n.trailWidth)]};const t=n.getVisualVariablesForType("size")[0],i=[],o=[];let s;if(t.stops){for(const n of t.stops)i.push(n.value),o.push(e(n.size));s=t.stops.length}else i.push(t.minDataValue,t.maxDataValue),o.push(e(t.minSize),e(t.maxSize)),s=2;return{kind:"ramp",stops:i,values:o,count:s}}function a(e){if(!e.hasVisualVariables("color"))return{kind:"constant",value:i(e.color)};const n=e.getVisualVariablesForType("color")[0],t=[],o=[];for(const s of n.stops)t.push(s.value),Array.prototype.push.apply(o,i(s.color));return{kind:"ramp",stops:t,values:o,count:n.stops.length}}function l(e){if(!e.hasVisualVariables("opacity"))return{kind:"constant",value:[1]};const n=e.getVisualVariablesForType("opacity")[0],t=[],i=[];for(const o of n.stops)t.push(o.value),i.push(o.opacity);return{kind:"ramp",stops:t,values:i,count:n.stops.length}}function r(e,n,t,i){switch(n){case"int":e.setUniform1iv(t,i);break;case"float":e.setUniform1fv(t,i);break;case"vec2":e.setUniform2fv(t,i);break;case"vec3":e.setUniform3fv(t,i);break;case"vec4":e.setUniform4fv(t,i)}}function u(e,n,t,i){"constant"===i.kind?r(e,t,`u_${n}`,i.value):(r(e,"float",`u_${n}_stops`,i.stops),r(e,t,`u_${n}_values`,i.values),e.setUniform1i(`u_${n}_count`,i.count))}function c(e,n){let t=!0;return t=t&&e.collisions===n.collisions,t=t&&e.density===n.density,t=t&&e.interpolate===n.interpolate,t=t&&e.lineCollisionWidth===n.lineCollisionWidth,t=t&&e.lineSpacing===n.lineSpacing,t=t&&e.maxTurnAngle===n.maxTurnAngle,t=t&&e.minSpeedThreshold===n.minSpeedThreshold,t=t&&e.segmentLength===n.segmentLength,t=t&&e.smoothing===n.smoothing,t=t&&e.velocityScale===n.velocityScale,t=t&&e.verticesPerLine===n.verticesPerLine,t}function p(e,n){return e===n||null!=e&&null!=n&&e.equals(n)}function f(e,n){if(!c(e.simulationSettings,n.simulationSettings))return!1;if(!p(e.timeExtent,n.timeExtent))return!1;let t=!0;return t=t&&e.loadImagery===n.loadImagery,t=t&&e.createFlowMesh===n.createFlowMesh,t=t&&e.color.kind===n.color.kind,t=t&&e.opacity.kind===n.opacity.kind,t=t&&e.size.kind===n.size.kind,t}export{f as areStreamlinesCompatible,a as getColor,n as getFlowSimulationSettings,o as getForegroundColor,t as getMax,l as getOpacity,s as getSize,r as setUniform,u as setUniforms,c as simulationSettingsEqual,p as timeExtentsEqual,i as toRgba};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{disposeMaybe as t}from"../../../../core/maybe.js";import{identity as e,translate as s,rotate as r,scaleByVec2 as i,multiply as a}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{DisplayObject as u}from"../DisplayObject.js";import{createTransformTexture as n,createPixelMaskTexture as d,createRasterTexture as l,createColormapTexture as _}from"../../../webgl/rasterUtils.js";const x={bandCount:3,minOutput:0,maxOutput:1,minCutOff:[0,0,0],maxCutOff:[255,255,255],factor:[1/255,1/255,1/255],useGamma:!1,gamma:[1,1,1],gammaCorrection:[1,1,1],colormap:null,colormapOffset:null,stretchType:"none",type:"stretch"};class c extends u{constructor(t=null,e=null,s=null){super(),this._textureInvalidated=!0,this._colormapTextureInvalidated=!0,this._rasterTexture=null,this._maskTexture=null,this._rasterTextureBandIds=null,this._transformGridTexture=null,this._colormapTexture=null,this._colormap=null,this._supportsBilinearTexture=!0,this._processedTexture=null,this.functionTextures=[],this.projected=!1,this.stencilRef=0,this.coordScale=[1,1],this._processed=!1,this._symbolizerParameters=null,this.height=null,this.isRendereredSource=!1,this.pixelRatio=1,this.resolution=0,this.rotation=0,this._source=null,this._mask=null,this.rawPixelData=null,this._suspended=!1,this._bandIds=null,this._interpolation=null,this._transformGrid=null,this.width=null,this.x=0,this.y=0,this.source=t,this.transformGrid=e,this.interpolation=s}destroy(){super.destroy(),this._disposeTextures()}get processedTexture(){return this._processedTexture}set processedTexture(t){this._processedTexture!==t&&(this._disposeTextures(!0),this._processedTexture=t)}get rasterTexture(){return this._rasterTexture}set rasterTexture(t){this._rasterTexture!==t&&(this._rasterTexture?.dispose(),this._rasterTexture=t),null==t&&(this.projected=!1)}get processed(){return this._processed}set processed(e){this._processed=e,e||(this.processedTexture=t(this.processedTexture),this.invalidateTexture())}get symbolizerParameters(){return this._symbolizerParameters||x}set symbolizerParameters(t){this._symbolizerParameters!==t&&(this._symbolizerParameters=t,this._colormapTextureInvalidated=!0)}get source(){return this._source}set source(e){this._source!==e&&(this._source=e,this._rasterTexture&&(this._rasterTexture=t(this._rasterTexture),this._rasterTextureBandIds=null),this.projected=!1,this.invalidateTexture())}get mask(){return this._mask}set mask(e){this._mask!==e&&(this._mask=e,this._maskTexture=t(this._maskTexture))}get suspended(){return this._suspended}set suspended(t){this._suspended&&!t&&this.stage&&(this.ready(),this.requestRender()),this._suspended=t}get bandIds(){return this._bandIds}set bandIds(t){this._bandIds=t,this._isBandIdsChanged(t)&&(this.projected=!1,this.invalidateTexture())}get interpolation(){return this._interpolation||"nearest"}set interpolation(t){this._interpolation=t,this._rasterTexture&&this._rasterTexture.setSamplingMode("bilinear"===this._getTextureSamplingMethod(t||"nearest")?9729:9728)}get transformGrid(){return this._transformGrid}set transformGrid(e){this._transformGrid!==e&&(this._transformGrid=e,this._transformGridTexture=t(this._transformGridTexture))}invalidateTexture(){this._textureInvalidated||(this._textureInvalidated=!0,this.requestRender())}getRasterTextureSize(t=!1){const e=t||this.projected;return[e?this.width:this.source?.width||this.width,e?this.height:this.source?.height||this.height]}getRasterCellSize(){const t=this.rawPixelData?.srcPixelSize,{projected:e,resolution:s}=this;return t&&!e?[t.x,t.y]:[s,s]}_createTransforms(){return{displayViewScreenMat3:h()}}setTransform(t){const h=e(this.transforms.displayViewScreenMat3),[u,n]=t.toScreenNoRotation([0,0],[this.x,this.y]),d=this.resolution/this.pixelRatio/t.resolution,l=d*this.width,_=d*this.height,x=Math.PI*this.rotation/180;s(h,h,o(u,n)),s(h,h,o(l/2,_/2)),r(h,h,-x),s(h,h,o(-l/2,-_/2)),i(h,h,o(l,_)),a(this.transforms.displayViewScreenMat3,t.displayViewMat3,h)}getTextures({forProcessing:t=!1,useProcessedTexture:e=!1}={}){const s=e?this._processedTexture??this._rasterTexture:this._rasterTexture,r=[],i=[];return s?(this._transformGridTexture&&!this.projected&&(i.push(this._transformGridTexture),r.push("u_transformGrid")),i.push(s),r.push("u_image"),!this._colormapTexture||!e&&t||(i.push(this._colormapTexture),r.push("u_colormap")),this._maskTexture&&(i.push(this._maskTexture),r.push("u_mask")),{names:r,textures:i}):{names:r,textures:i}}onAttach(){this.invalidateTexture()}onDetach(){this.invalidateTexture()}updateTexture({context:t}){if(!this.stage)return void this._disposeTextures();const e=this._isValidSource(this.source);e&&this._colormapTextureInvalidated&&(this._colormapTextureInvalidated=!1,this._updateColormapTexture(t)),this._textureInvalidated&&(this._textureInvalidated=!1,this._createOrDestroyRasterTexture(t),this._rasterTexture&&(e?(this.transformGrid&&!this._transformGridTexture&&(this._transformGridTexture=n(t,this.transformGrid)),this._mask&&!this._maskTexture&&(this._maskTexture=d(t,this._mask,[this.width,this.height]))):this._rasterTexture.setData(null)),this.suspended||(this.ready(),this.requestRender()))}updateProcessedTexture(){const{functionTextures:t}=this;0!==t.length&&(this.processedTexture=t.shift(),t.forEach(t=>t?.dispose()),t.length=0,this.processed=!!this.processedTexture)}_createOrDestroyRasterTexture(e){const s=this.source?.extractBands(this.bandIds);if(!this._isValidSource(s))return void(this._rasterTexture&&(this._rasterTexture=t(this._rasterTexture),this._rasterTextureBandIds=null));const r=!this._isBandIdsChanged(this.bandIds);if(this._rasterTexture){if(r)return;this._rasterTexture=t(this._rasterTexture),this._rasterTextureBandIds=null}this._supportsBilinearTexture=!!e.capabilities.textureFloatLinear;const i=this._getTextureSamplingMethod(this.interpolation),a=this.isRendereredSource;this._rasterTexture=l(e,s,i,a),this.projected=!1,this._processed=!1,this._rasterTextureBandIds=this.bandIds?[...this.bandIds]:null}_isBandIdsChanged(t){const e=this._rasterTextureBandIds;return!(null==e&&null==t||e&&t&&e.join("")===t.join(""))}_isValidSource(t){return null!=t&&t.pixels?.length>0}_getTextureSamplingMethod(t){const{type:e}=this.symbolizerParameters,s="lut"===e&&!this.symbolizerParameters.isClassBreaks||"hillshade"===e||"stretch"===e&&1===this.symbolizerParameters.bandCount;return!this._supportsBilinearTexture||s||"bilinear"!==t&&"cubic"!==t?"nearest":"bilinear"}_updateColormapTexture(e){const s=this._colormap,r=this.symbolizerParameters.colormap;return r?s?r.length!==s.length||r.some((t,e)=>t!==s[e])?(this._colormapTexture&&(this._colormapTexture=t(this._colormapTexture)),this._colormapTexture=_(e,r),void(this._colormap=r)):void 0:(this._colormapTexture=_(e,r),void(this._colormap=r)):(this._colormapTexture&&(this._colormapTexture=t(this._colormapTexture)),void(this._colormap=null))}_disposeTextures(e=!1){e?this.projected&&(this._transformGridTexture=t(this._transformGridTexture)):(this._rasterTexture=t(this._rasterTexture),this._colormapTexture=t(this._colormapTexture),this._transformGridTexture=t(this._transformGridTexture),this._maskTexture=t(this._maskTexture),this._rasterTextureBandIds=null,this._colormap=null,this._colormapTextureInvalidated=!0),this._processedTexture=t(this._processedTexture)}}class m extends c{get source(){return this._source}}function p(t){return null!=t.source}export{c as RasterBitmap,m as RasterBitmapWithSource,p as hasSource};
5
+ import{disposeMaybe as t}from"../../../../core/maybe.js";import{identity as e,translate as s,rotate as r,scaleByVec2 as i,multiply as a}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as o}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{DisplayObject as u}from"../DisplayObject.js";import{createTransformTexture as n,createPixelMaskTexture as d,createRasterTexture as l,createColormapTexture as _}from"../../../webgl/rasterUtils.js";const x={bandCount:3,minOutput:0,maxOutput:1,minCutOff:[0,0,0],maxCutOff:[255,255,255],factor:[1/255,1/255,1/255],useGamma:!1,gamma:[1,1,1],gammaCorrection:[1,1,1],colormap:null,colormapOffset:null,stretchType:"none",type:"stretch"};class m extends u{constructor(t=null,e=null,s=null){super(),this._textureInvalidated=!0,this._colormapTextureInvalidated=!0,this._rasterTexture=null,this._maskTexture=null,this._rasterTextureBandIds=null,this._transformGridTexture=null,this._colormapTexture=null,this._colormap=null,this._supportsBilinearTexture=!0,this._processedTexture=null,this.functionTextures=[],this.projected=!1,this.stencilRef=0,this.coordScale=[1,1],this._processed=!1,this._symbolizerParameters=null,this.height=null,this.isRendereredSource=!1,this.pixelRatio=1,this.resolution=0,this.rotation=0,this._source=null,this._mask=null,this.rawPixelData=null,this._suspended=!1,this._bandIds=null,this._interpolation=null,this._transformGrid=null,this.width=null,this.x=0,this.y=0,this.source=t,this.transformGrid=e,this.interpolation=s}destroy(){super.destroy(),this._disposeTextures()}get processedTexture(){return this._processedTexture}set processedTexture(t){this._processedTexture!==t&&(this._disposeTextures(!0),this._processedTexture=t)}get rasterTexture(){return this._rasterTexture}set rasterTexture(t){this._rasterTexture!==t&&(this._rasterTexture?.dispose(),this._rasterTexture=t),null==t&&(this.projected=!1)}get processed(){return this._processed}set processed(e){this._processed=e,e||(this.processedTexture=t(this.processedTexture),this.invalidateTexture())}get symbolizerParameters(){return this._symbolizerParameters||x}set symbolizerParameters(t){this._symbolizerParameters!==t&&(this._symbolizerParameters=t,this._colormapTextureInvalidated=!0)}get source(){return this._source}set source(e){this._source!==e&&(this._source=e,this._rasterTexture&&(this._rasterTexture=t(this._rasterTexture),this._rasterTextureBandIds=null),this.projected=!1,this.invalidateTexture())}get mask(){return this._mask}set mask(e){this._mask!==e&&(this._mask=e,this._maskTexture=t(this._maskTexture))}get suspended(){return this._suspended}set suspended(t){this._suspended&&!t&&this.stage&&(this.ready(),this.requestRender()),this._suspended=t}get bandIds(){return this._bandIds}set bandIds(t){this._bandIds=t,this._isBandIdsChanged(t)&&(this.projected=!1,this.invalidateTexture())}get interpolation(){return this._interpolation||"nearest"}set interpolation(t){this._interpolation=t,this._rasterTexture&&this._rasterTexture.setSamplingMode("bilinear"===this._getTextureSamplingMethod(t||"nearest")?9729:9728)}get transformGrid(){return this._transformGrid}set transformGrid(e){this._transformGrid!==e&&(this._transformGrid=e,this._transformGridTexture=t(this._transformGridTexture))}invalidateTexture(){this._textureInvalidated||(this._textureInvalidated=!0,this.requestRender())}getRasterTextureSize(t=!1){const e=t||this.projected;return[e?this.width:this.source?.width||this.width,e?this.height:this.source?.height||this.height]}getRasterCellSize(){const t=this.rawPixelData?.srcPixelSize,{projected:e,resolution:s}=this;return t&&!e?[t.x,t.y]:[s,s]}_createTransforms(){return{displayViewScreenMat3:h()}}setTransform(t){const h=e(this.transforms.displayViewScreenMat3),[u,n]=t.toScreenNoRotation([0,0],[this.x,this.y]),d=this.resolution/this.pixelRatio/t.resolution,l=d*this.width,_=d*this.height,x=Math.PI*this.rotation/180;s(h,h,o(u,n)),s(h,h,o(l/2,_/2)),r(h,h,-x),s(h,h,o(-l/2,-_/2)),i(h,h,o(l,_)),a(this.transforms.displayViewScreenMat3,t.displayViewMat3,h)}getTextures({forProcessing:t=!1,useProcessedTexture:e=!1}={}){const s=e?this._processedTexture??this._rasterTexture:this._rasterTexture,r=[],i=[];return s?(this._transformGridTexture&&!this.projected&&(i.push(this._transformGridTexture),r.push("u_transformGrid")),i.push(s),r.push("u_image"),!this._colormapTexture||!e&&t||(i.push(this._colormapTexture),r.push("u_colormap")),this._maskTexture&&(i.push(this._maskTexture),r.push("u_mask")),{names:r,textures:i}):{names:r,textures:i}}onAttach(){this.invalidateTexture()}onDetach(){this.invalidateTexture()}updateTexture({context:t}){if(!this.stage)return void this._disposeTextures();const e=this._isValidSource(this.source);e&&this._colormapTextureInvalidated&&(this._colormapTextureInvalidated=!1,this._updateColormapTexture(t)),this._textureInvalidated&&(this._textureInvalidated=!1,this._createOrDestroyRasterTexture(t),this._rasterTexture&&(e?(this.transformGrid&&!this._transformGridTexture&&(this._transformGridTexture=n(t,this.transformGrid)),this._mask&&!this._maskTexture&&(this._maskTexture=d(t,this._mask,[this.width,this.height]))):this._rasterTexture.setData(null)),this.suspended||(this.ready(),this.requestRender()))}updateProcessedTexture(){const{functionTextures:t}=this;0!==t.length&&(this.processedTexture=t.shift(),t.forEach(t=>t?.dispose()),t.length=0,this.processed=!!this.processedTexture)}_createOrDestroyRasterTexture(e){const s=this.source?.extractBands(this.bandIds);if(!this._isValidSource(s))return void(this._rasterTexture&&(this._rasterTexture=t(this._rasterTexture),this._rasterTextureBandIds=null));const r=!this._isBandIdsChanged(this.bandIds);if(this._rasterTexture){if(r)return;this._rasterTexture=t(this._rasterTexture),this._rasterTextureBandIds=null}this._supportsBilinearTexture=!!e.capabilities.textureFloatLinear;const i=this._getTextureSamplingMethod(this.interpolation),a=this.isRendereredSource;this._rasterTexture=l(e,s,i,a),this.projected=!1,this._processed=!1,this._rasterTextureBandIds=this.bandIds?[...this.bandIds]:null}_isBandIdsChanged(t){const e=this._rasterTextureBandIds;return!(null==e&&null==t||e&&t&&e.join("")===t.join(""))}_isValidSource(t){return null!=t&&t.pixels?.length>0}_getTextureSamplingMethod(t){const{type:e}=this.symbolizerParameters,s="lut"===e&&!this.symbolizerParameters.isClassBreaks||"hillshade"===e||"stretch"===e&&1===this.symbolizerParameters.bandCount;return!this._supportsBilinearTexture||s||"bilinear"!==t&&"cubic"!==t?"nearest":"bilinear"}_updateColormapTexture(e){const s=this._colormap,r=this.symbolizerParameters.colormap;return r?s?r.length!==s.length||r.some((t,e)=>t!==s[e])?(this._colormapTexture&&(this._colormapTexture=t(this._colormapTexture)),this._colormapTexture=_(e,r),void(this._colormap=r)):void 0:(this._colormapTexture=_(e,r),void(this._colormap=r)):(this._colormapTexture&&(this._colormapTexture=t(this._colormapTexture)),void(this._colormap=null))}_disposeTextures(e=!1){e?this.projected&&(this._transformGridTexture=t(this._transformGridTexture)):(this._rasterTexture=t(this._rasterTexture),this._colormapTexture=t(this._colormapTexture),this._transformGridTexture=t(this._transformGridTexture),this._maskTexture=t(this._maskTexture),this._rasterTextureBandIds=null,this._colormap=null,this._colormapTextureInvalidated=!0),this._processedTexture=t(this._processedTexture)}}class c extends m{get source(){return this._source}}export{m as RasterBitmap,c as RasterBitmapWithSource};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const n=8388607,t=8388608,r=254,o=255,u=0,c=1,e=n=>(n&t)>>>23,f=t=>t&n,i=n=>e(n)===c?r:o;function p(n){return e(n)===c}function s(n,r){return((r?t:0)|n)>>>0}export{r as aggregateValidFiltersMask,s as createDisplayId,n as displayIdTexelMask,c as displayIdTypeAggregate,u as displayIdTypeFeature,t as displayIdTypeMask,i as getDisplayIdFilterMask,f as getDisplayIdTexel,e as getDisplayIdType,p as isAggregateId,o as nonAggregateValidFiltersMask};
5
+ const n=8388607,t=8388608,o=t=>t&n;function r(n,o){return((o?t:0)|n)>>>0}export{r as createDisplayId,n as displayIdTexelMask,t as displayIdTypeMask,o as getDisplayIdTexel};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- class t{generateSource(t){const o=[];for(let a=1;a<this.length;a++)o.push(`vec4 atom${a} = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;");for(let a=0;a<this.ins;a++)o.push("top--;"),o.push(`vec4 in${this.ins-a-1} = stack[top];`);for(let a=0;a<this.outs;a++)o.push(`vec4 out${a};`);const{microcode:e}=this;for(const a of e)o.push(a);for(let a=0;a<this.outs;a++)o.push(`stack[top] = out${a};`),o.push("top++;"),o.push(`if (top >= ${d}) { top = ${d-1}; }`);return o}}let o=128;class e extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=0,this.microcode=["break;"]}encode(){return[[this.opcode,0,0,0]]}}class a extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.y, atom0.y, atom0.y, atom0.y);"]}encode(t){return[[this.opcode,t,0,0]]}}class i extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.yzw, 0.0);"]}encode(t){return[[this.opcode,t[0]||0,t[1]||0,t[2]||0]]}}class n extends t{constructor(){super(...arguments),this.opcode=++o,this.length=2,this.ins=0,this.outs=1,this.microcode=["out0 = atom1;"]}encode(t){return[[this.opcode,0,0,0],t]}}function r(t){return[`float duration = clamp(${t.duration}, 0.05, 3600.0);`,`float startTimeOffset = ${t.startTimeOffset};`,`float repeatDelay = ${t.repeatDelay};`,`float timeOriginSelector = ${t.timeOriginSelector};`,`float repeatType = ${t.repeatType};`,`float easing = ${t.easing};`,`float playAnimation = ${t.playAnimation} * (1.0 - step(0.0, -${t.duration}));`,`float reverseAnimation = ${t.reverseAnimation};`,"float time = globalTime - (timeOriginSelector == 1.0 ? localTimeOrigin : 0.0);","time *= playAnimation;","time *= 1.0 - reverseAnimation * 2.0;","float period = duration + repeatDelay;","time += reverseAnimation == 1.0 ? (period - startTimeOffset - 0.001) : startTimeOffset + 0.001;","float omega = time / period;","float oi = floor(omega);","omega = repeatType == 1.0 || repeatType == 3.0 ? omega - oi : omega;","float of = omega * period;","of = (clamp(of, reverseAnimation * repeatDelay, period - (1.0 - reverseAnimation) * repeatDelay) - reverseAnimation * repeatDelay) / duration;","of = easing == 2.0 ? pow(of, 3.0) : of;","of = easing == 3.0 ? 1.0 - pow(1.0 - of, 3.0) : of;","of = easing == 4.0 ? of < 0.5 ? 4.0 * pow(of, 3.0) : 1.0 - pow(-2.0 * of + 2.0, 3.0) / 2.0 : of;","bool oscillate = repeatType == 3.0 && mod(oi, 2.0) == 1.0;",`${t.out} = oscillate ? 1.0 - of : of;`]}const s={Linear:1,EaseIn:2,EaseOut:3,EaseInOut:4},l={Loop:1,None:2,Oscillate:3},m={Local:1,Global:2};function c(t){const o=s[t.easing],e=l[t.repeatType],a=m[t.timeOriginSelector];return[[t.duration,t.startTimeOffset,t.repeatDelay,a],[e,o,t.playAnimation,t.reverseAnimation]]}class f extends t{constructor(){super(...arguments),this.opcode=++o,this.length=10,this.ins=1,this.outs=1,this.microcode=["vec2 fromTranslation = atom1.xy;","vec2 toTranslation = atom1.zw;","float fromRotation = atom2.x;","float toRotation = atom2.y;","float fromScale = atom2.z;","float toScale = atom2.w;","bool relativeTranslation = atom9.x == 1.0;","bool absoluteScale = atom9.y == 1.0;","vec2 translationMultiplier = relativeTranslation ? pixelDimensions : vec2(1.0, 1.0);","float scaleDivisor = absoluteScale ? pixelDimensions.y : 1.0;","float fTranslation;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fTranslation"}),"}","float fRotation;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fRotation"}),"}","float fScale;","{",...r({duration:"atom7.x",startTimeOffset:"atom7.y",repeatDelay:"atom7.z",timeOriginSelector:"atom7.w",repeatType:"atom8.x",easing:"atom8.y",playAnimation:"atom8.z",reverseAnimation:"atom8.w",out:"fScale"}),"}","vec2 aTranslation = mix(fromTranslation, toTranslation, fTranslation);","float aRotation = mix(fromRotation, toRotation, fRotation);","float aScale = mix(fromScale, toScale, fScale);","vec2 pTranslation = in0.xy;","float pRotation = in0.z;","float pScale = in0.w;","aTranslation *= translationMultiplier;","aScale /= scaleDivisor;","float rotation = pRotation + aRotation;","float scale = pScale * aScale;","float sin1 = sin(pRotation);","float cos1 = cos(pRotation);","float s1 = pScale;","float x1 = pTranslation.x;","float y1 = pTranslation.y;","float x2 = aTranslation.x;","float y2 = aTranslation.y;","\n vec2 translation = vec2(\n cos1 * s1 * x2 - sin1 * s1 * y2 + x1,\n sin1 * s1 * x2 + cos1 * s1 * y2 + y1\n );\n ","out0 = vec4(translation, rotation, scale);"]}encode(t){return[[this.opcode,0,0,0],[t.translation.from[0],t.translation.from[1],t.translation.to[0],t.translation.to[1]],[t.rotation.from,t.rotation.to,t.scale.from,t.scale.to],...c(t.translation.timing),...c(t.rotation.timing),...c(t.scale.timing),[t.relativeTranslation?1:0,t.absoluteScale?1:0,0,0]]}}class p extends t{constructor(){super(...arguments),this.opcode=++o,this.length=7,this.ins=1,this.outs=1,this.microcode=["float fromOpacity = atom0.y;","float toOpacity = atom0.z;","vec4 fromColor = atom1;","vec4 toColor = atom2;","float fColor;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fColor"}),"}","float fOpacity;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fOpacity"}),"}","vec4 aColor = mix(fromColor, toColor, fColor);","aColor.a *= mix(fromOpacity, toOpacity, fOpacity);","vec4 pColor = in0;","out0 = aColor * pColor;"]}encode(t){return[[this.opcode,t.opacity.from,t.opacity.to,0],[t.color.from[0],t.color.from[1],t.color.from[2],t.color.from[3]],[t.color.to[0],t.color.to[1],t.color.to[2],t.color.to[3]],...c(t.color.timing),...c(t.opacity.timing)]}}class u extends t{constructor(){super(...arguments),this.opcode=++o,this.length=4,this.ins=1,this.outs=1,this.microcode=["float fromShift = atom0.y;","float toShift = atom0.z;","float duration = atom1.x;","bool multiplyByLineLength = atom3.x == 1.0;","float fShift;","{",...r({duration:"duration",startTimeOffset:"atom1.y",repeatDelay:"atom1.z",timeOriginSelector:"atom1.w",repeatType:"atom2.x",easing:"atom2.y",playAnimation:"atom2.z",reverseAnimation:"atom2.w",out:"fShift"}),"}","toShift *= multiplyByLineLength ? lineLength : 1.0;","float aShift = mix(fromShift, toShift, fShift);","vec4 pShift = in0;","out0 = mod(aShift + pShift, lineLength);"]}encode(t){return[[this.opcode,t.shift.from,t.shift.to,0],...c(t.shift.timing),[t.multiplyByLineLength?1:0,0,0,0]]}}const h={scalar:new a,vector3:new i,vector4:new n,animatedTransform:new f,animatedColor:new p,animatedShift:new u,ret:new e},y=40,d=4;function x(t){const o=[];o.push(`float globalTime = ${t.globalTime};`),o.push(`float localTimeOrigin = ${t.localTimeOrigin};`),o.push(`float lineLength = ${t.lineLength};`),o.push(`vec2 pointer = ${t.animationPointer};`),o.push(`vec2 size = ${t.animationTextureSize};`),o.push("int top = 0;"),o.push(`vec4 stack[${d}];`),o.push(`for (int counter = 0; counter < ${y}; counter++) {`),o.push(`vec4 atom0 = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;"),o.push(`vec2 pixelDimensions = ${t.pixelDimensions};`),o.push("if (false) {");for(const e in h){const a=h[e];o.push(`} else if (int(atom0.x) == ${a.opcode}) {`);for(const e of a.generateSource(t))o.push(e)}return o.push("} // End if-else."),o.push("} // End for."),o.push(`${t.out} = top > 0 ? stack[top - 1] : vec4(0.0);`),o.join("\n")}function g(t,o){return`\n vec4 ${t}(int valueIndex) {\n vec2 thePointer = ${o.animationPointer};\n float jump = texture(${o.animationTexture}, (0.5 + vec2(thePointer.x + float(valueIndex), thePointer.y)) / ${o.animationTextureSize}).x;\n thePointer = vec2(thePointer.x + jump, thePointer.y);\n vec4 theResult;\n ${x({...o,out:"theResult",animationPointer:"thePointer"})}\n return theResult;\n }\n `}export{t as AAnimationInstruction,p as AnimatedColorInstruction,u as AnimatedShiftInstruction,f as AnimatedTransformInstruction,e as RetInstruction,a as ScalarInstruction,i as Vector3Instruction,n as Vector4Instruction,s as easingCodes,g as generateGetValueSource,x as generateVirtualMachineSource,r as getTweenFactor,h as instructions,l as repeatTypeCodes,m as timeOriginSelectorCodes};
5
+ class t{generateSource(t){const o=[];for(let a=1;a<this.length;a++)o.push(`vec4 atom${a} = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;");for(let a=0;a<this.ins;a++)o.push("top--;"),o.push(`vec4 in${this.ins-a-1} = stack[top];`);for(let a=0;a<this.outs;a++)o.push(`vec4 out${a};`);const{microcode:e}=this;for(const a of e)o.push(a);for(let a=0;a<this.outs;a++)o.push(`stack[top] = out${a};`),o.push("top++;"),o.push(`if (top >= ${d}) { top = ${d-1}; }`);return o}}let o=128;class e extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=0,this.microcode=["break;"]}encode(){return[[this.opcode,0,0,0]]}}class a extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.y, atom0.y, atom0.y, atom0.y);"]}encode(t){return[[this.opcode,t,0,0]]}}class i extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.yzw, 0.0);"]}encode(t){return[[this.opcode,t[0]||0,t[1]||0,t[2]||0]]}}class n extends t{constructor(){super(...arguments),this.opcode=++o,this.length=2,this.ins=0,this.outs=1,this.microcode=["out0 = atom1;"]}encode(t){return[[this.opcode,0,0,0],t]}}function r(t){return[`float duration = clamp(${t.duration}, 0.05, 3600.0);`,`float startTimeOffset = ${t.startTimeOffset};`,`float repeatDelay = ${t.repeatDelay};`,`float timeOriginSelector = ${t.timeOriginSelector};`,`float repeatType = ${t.repeatType};`,`float easing = ${t.easing};`,`float playAnimation = ${t.playAnimation} * (1.0 - step(0.0, -${t.duration}));`,`float reverseAnimation = ${t.reverseAnimation};`,"float time = globalTime - (timeOriginSelector == 1.0 ? localTimeOrigin : 0.0);","time *= playAnimation;","time *= 1.0 - reverseAnimation * 2.0;","float period = duration + repeatDelay;","time += reverseAnimation == 1.0 ? (period - startTimeOffset - 0.001) : startTimeOffset + 0.001;","float omega = time / period;","float oi = floor(omega);","omega = repeatType == 1.0 || repeatType == 3.0 ? omega - oi : omega;","float of = omega * period;","of = (clamp(of, reverseAnimation * repeatDelay, period - (1.0 - reverseAnimation) * repeatDelay) - reverseAnimation * repeatDelay) / duration;","of = easing == 2.0 ? pow(of, 3.0) : of;","of = easing == 3.0 ? 1.0 - pow(1.0 - of, 3.0) : of;","of = easing == 4.0 ? of < 0.5 ? 4.0 * pow(of, 3.0) : 1.0 - pow(-2.0 * of + 2.0, 3.0) / 2.0 : of;","bool oscillate = repeatType == 3.0 && mod(oi, 2.0) == 1.0;",`${t.out} = oscillate ? 1.0 - of : of;`]}const s={Linear:1,EaseIn:2,EaseOut:3,EaseInOut:4},l={Loop:1,None:2,Oscillate:3},m={Local:1,Global:2};function c(t){const o=s[t.easing],e=l[t.repeatType],a=m[t.timeOriginSelector];return[[t.duration,t.startTimeOffset,t.repeatDelay,a],[e,o,t.playAnimation,t.reverseAnimation]]}class f extends t{constructor(){super(...arguments),this.opcode=++o,this.length=10,this.ins=1,this.outs=1,this.microcode=["vec2 fromTranslation = atom1.xy;","vec2 toTranslation = atom1.zw;","float fromRotation = atom2.x;","float toRotation = atom2.y;","float fromScale = atom2.z;","float toScale = atom2.w;","bool relativeTranslation = atom9.x == 1.0;","bool absoluteScale = atom9.y == 1.0;","vec2 translationMultiplier = relativeTranslation ? pixelDimensions : vec2(1.0, 1.0);","float scaleDivisor = absoluteScale ? pixelDimensions.y : 1.0;","float fTranslation;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fTranslation"}),"}","float fRotation;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fRotation"}),"}","float fScale;","{",...r({duration:"atom7.x",startTimeOffset:"atom7.y",repeatDelay:"atom7.z",timeOriginSelector:"atom7.w",repeatType:"atom8.x",easing:"atom8.y",playAnimation:"atom8.z",reverseAnimation:"atom8.w",out:"fScale"}),"}","vec2 aTranslation = mix(fromTranslation, toTranslation, fTranslation);","float aRotation = mix(fromRotation, toRotation, fRotation);","float aScale = mix(fromScale, toScale, fScale);","vec2 pTranslation = in0.xy;","float pRotation = in0.z;","float pScale = in0.w;","aTranslation *= translationMultiplier;","aScale /= scaleDivisor;","float rotation = pRotation + aRotation;","float scale = pScale * aScale;","float sin1 = sin(pRotation);","float cos1 = cos(pRotation);","float s1 = pScale;","float x1 = pTranslation.x;","float y1 = pTranslation.y;","float x2 = aTranslation.x;","float y2 = aTranslation.y;","\n vec2 translation = vec2(\n cos1 * s1 * x2 - sin1 * s1 * y2 + x1,\n sin1 * s1 * x2 + cos1 * s1 * y2 + y1\n );\n ","out0 = vec4(translation, rotation, scale);"]}encode(t){return[[this.opcode,0,0,0],[t.translation.from[0],t.translation.from[1],t.translation.to[0],t.translation.to[1]],[t.rotation.from,t.rotation.to,t.scale.from,t.scale.to],...c(t.translation.timing),...c(t.rotation.timing),...c(t.scale.timing),[t.relativeTranslation?1:0,t.absoluteScale?1:0,0,0]]}}class p extends t{constructor(){super(...arguments),this.opcode=++o,this.length=7,this.ins=1,this.outs=1,this.microcode=["float fromOpacity = atom0.y;","float toOpacity = atom0.z;","vec4 fromColor = atom1;","vec4 toColor = atom2;","float fColor;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fColor"}),"}","float fOpacity;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fOpacity"}),"}","vec4 aColor = mix(fromColor, toColor, fColor);","aColor.a *= mix(fromOpacity, toOpacity, fOpacity);","vec4 pColor = in0;","out0 = aColor * pColor;"]}encode(t){return[[this.opcode,t.opacity.from,t.opacity.to,0],[t.color.from[0],t.color.from[1],t.color.from[2],t.color.from[3]],[t.color.to[0],t.color.to[1],t.color.to[2],t.color.to[3]],...c(t.color.timing),...c(t.opacity.timing)]}}class u extends t{constructor(){super(...arguments),this.opcode=++o,this.length=4,this.ins=1,this.outs=1,this.microcode=["float fromShift = atom0.y;","float toShift = atom0.z;","float duration = atom1.x;","bool multiplyByLineLength = atom3.x == 1.0;","float fShift;","{",...r({duration:"duration",startTimeOffset:"atom1.y",repeatDelay:"atom1.z",timeOriginSelector:"atom1.w",repeatType:"atom2.x",easing:"atom2.y",playAnimation:"atom2.z",reverseAnimation:"atom2.w",out:"fShift"}),"}","toShift *= multiplyByLineLength ? lineLength : 1.0;","float aShift = mix(fromShift, toShift, fShift);","vec4 pShift = in0;","out0 = mod(aShift + pShift, lineLength);"]}encode(t){return[[this.opcode,t.shift.from,t.shift.to,0],...c(t.shift.timing),[t.multiplyByLineLength?1:0,0,0,0]]}}const h={scalar:new a,vector3:new i,vector4:new n,animatedTransform:new f,animatedColor:new p,animatedShift:new u,ret:new e},y=40,d=4;function g(t){const o=[];o.push(`float globalTime = ${t.globalTime};`),o.push(`float localTimeOrigin = ${t.localTimeOrigin};`),o.push(`float lineLength = ${t.lineLength};`),o.push(`vec2 pointer = ${t.animationPointer};`),o.push(`vec2 size = ${t.animationTextureSize};`),o.push("int top = 0;"),o.push(`vec4 stack[${d}];`),o.push(`for (int counter = 0; counter < ${y}; counter++) {`),o.push(`vec4 atom0 = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;"),o.push(`vec2 pixelDimensions = ${t.pixelDimensions};`),o.push("if (false) {");for(const e in h){const a=h[e];o.push(`} else if (int(atom0.x) == ${a.opcode}) {`);for(const e of a.generateSource(t))o.push(e)}return o.push("} // End if-else."),o.push("} // End for."),o.push(`${t.out} = top > 0 ? stack[top - 1] : vec4(0.0);`),o.join("\n")}export{t as AAnimationInstruction,p as AnimatedColorInstruction,u as AnimatedShiftInstruction,f as AnimatedTransformInstruction,e as RetInstruction,a as ScalarInstruction,i as Vector3Instruction,n as Vector4Instruction,s as easingCodes,g as generateVirtualMachineSource,r as getTweenFactor,h as instructions,l as repeatTypeCodes,m as timeOriginSelectorCodes};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{e as t}from"../../../../../../chunks/earcut.js";import{triangulate as e}from"../../../../../../geometry/libtess.js";import{TileClipper as n}from"../../../../../../geometry/support/TileClipper.js";import o from"../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as r}from"../../definitions.js";import{bufcut as s}from"../bufcut.js";const l=1e-5,f=new n(0,0,0,1,0),i=new n(0,0,0,1,0);function c(t,e,n){let o=0;for(let r=1;r<n;r++){const n=t[2*(e+r-1)],s=t[2*(e+r-1)+1];o+=(t[2*(e+r)]-n)*(t[2*(e+r)+1]+s)}return o}function u(t,e,n,o,r){let s=0;const l=2;for(let f=n;f<o;f+=3){const n=(t[f]-r)*l,o=(t[f+1]-r)*l,i=(t[f+2]-r)*l;s+=Math.abs((e[n]-e[i])*(e[o+1]-e[n+1])-(e[n]-e[o])*(e[i+1]-e[n+1]))}return s}function h(t,e){const{coords:n,lengths:o}=e,r=0,f=t;let i=0;for(let h=0;h<o.length;){let t=h,e=o[h],a=c(n,i,e);const g=[];for(;++t<o.length;){const r=o[t],s=c(n,i+e,r);if(!(s>0))break;a+=s,g.push(i+e),e+=r}const p=f.length;s(f,n,i,i+e,g,2,r);const m=u(f,n,p,f.length,r),x=Math.abs(a);if(Math.abs((m-x)/Math.max(1e-7,x))>l)return f.length=0,!1;h=t,i+=e}return!0}function a(e,n,o){const{coords:r,lengths:s}=n;let l=0;for(let f=0;f<s.length;){let i=f,u=s[f];const h=[];for(;++i<s.length;){const t=s[i];if(!(c(r,l+u,t)>0))break;h.push(l+u-l),u+=t}const a=l+u,g=n.coords.slice(2*l,2*a),p=t(g,h,2);for(const t of p)e.push(t+o+l);f=i,l+=u}return!0}function g(t){const{coords:n,lengths:o}=t,{buffer:r}=e(n,o);return r}function p(t,e,n){let o=0;for(let r=0;r<t.lengths.length;r++){const s=t.lengths[r];for(let r=0;r<s;r++){const s=t.coords[2*(r+o)],l=t.coords[2*(r+o)+1];if(s<e||s>n||l<e||l>n)return!0}o+=s}return!1}function m(t,e){if(null==t)return null;if(!p(t,-128,r+128))return t;f.setPixelMargin(e),f.reset(3);let n=0;for(let o=0;o<t.lengths.length;o++){const e=t.lengths[o];let r=t.coords[2*(0+n)],s=t.coords[2*(0+n)+1];f.moveTo(r,s);for(let o=1;o<e;o++)r=t.coords[2*(o+n)],s=t.coords[2*(o+n)+1],f.lineTo(r,s);f.close(),n+=e}const s=f.result(!1);if(!s)return null;const l=[],i=[];for(const o of s){let t=0;for(const e of o)i.push(e.x),i.push(e.y),t++;l.push(t)}return new o(l,i)}function x(t,e){i.setPixelMargin(e);const n=i,o=-e,s=r+e;let l=[],f=!1;if(!t.nextPath())return null;let c=t.pathLength(),u=!0;for(;u;){t.seekPathStart();const e=[];if(!t.pathSize)return null;n.reset(2),t.nextPoint();let r=t.x,i=t.y;if(f)n.moveTo(r,i);else{if(r<o||r>s||i<o||i>s){f=!0;continue}e.push({x:r,y:i})}let h=!1;for(;t.nextPoint();)if(r=t.x,i=t.y,f)n.lineTo(r,i);else{if(r<o||r>s||i<o||i>s){h=!0;break}e.push({x:r,y:i})}if(h)f=!0;else{if(f){const t=n.resultWithStarts();if(t)for(const e of t)l.push({...e,pathLength:c})}else l.push({line:e,start:0,pathLength:c});u=t.nextPath(),c=u?t.pathLength():0,f=!1}}return l=l.filter(t=>t.line.length>1),0===l.length?null:l}f.setExtent(r),i.setExtent(r);export{c as area,x as clipLinesMarshall,m as clipMarshall,u as triangleAreaArray,h as triangulate,a as triangulateEarcut,g as triangulateLibtess};
5
+ import{triangulate as t}from"../../../../../../geometry/libtess.js";import{TileClipper as e}from"../../../../../../geometry/support/TileClipper.js";import n from"../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as o}from"../../definitions.js";import{bufcut as r}from"../bufcut.js";const s=1e-5,l=new e(0,0,0,1,0),i=new e(0,0,0,1,0);function f(t,e,n){let o=0;for(let r=1;r<n;r++){const n=t[2*(e+r-1)],s=t[2*(e+r-1)+1];o+=(t[2*(e+r)]-n)*(t[2*(e+r)+1]+s)}return o}function u(t,e,n,o,r){let s=0;const l=2;for(let i=n;i<o;i+=3){const n=(t[i]-r)*l,o=(t[i+1]-r)*l,f=(t[i+2]-r)*l;s+=Math.abs((e[n]-e[f])*(e[o+1]-e[n+1])-(e[n]-e[o])*(e[f+1]-e[n+1]))}return s}function h(t,e){const{coords:n,lengths:o}=e,l=0,i=t;let h=0;for(let c=0;c<o.length;){let t=c,e=o[c],a=f(n,h,e);const g=[];for(;++t<o.length;){const r=o[t],s=f(n,h+e,r);if(!(s>0))break;a+=s,g.push(h+e),e+=r}const p=i.length;r(i,n,h,h+e,g,2,l);const m=u(i,n,p,i.length,l),x=Math.abs(a);if(Math.abs((m-x)/Math.max(1e-7,x))>s)return i.length=0,!1;c=t,h+=e}return!0}function c(e){const{coords:n,lengths:o}=e,{buffer:r}=t(n,o);return r}function a(t,e,n){let o=0;for(let r=0;r<t.lengths.length;r++){const s=t.lengths[r];for(let r=0;r<s;r++){const s=t.coords[2*(r+o)],l=t.coords[2*(r+o)+1];if(s<e||s>n||l<e||l>n)return!0}o+=s}return!1}function g(t,e){if(null==t)return null;if(!a(t,-128,o+128))return t;l.setPixelMargin(e),l.reset(3);let r=0;for(let n=0;n<t.lengths.length;n++){const e=t.lengths[n];let o=t.coords[2*(0+r)],s=t.coords[2*(0+r)+1];l.moveTo(o,s);for(let n=1;n<e;n++)o=t.coords[2*(n+r)],s=t.coords[2*(n+r)+1],l.lineTo(o,s);l.close(),r+=e}const s=l.result(!1);if(!s)return null;const i=[],f=[];for(const n of s){let t=0;for(const e of n)f.push(e.x),f.push(e.y),t++;i.push(t)}return new n(i,f)}function p(t,e){i.setPixelMargin(e);const n=i,r=-e,s=o+e;let l=[],f=!1;if(!t.nextPath())return null;let u=t.pathLength(),h=!0;for(;h;){t.seekPathStart();const e=[];if(!t.pathSize)return null;n.reset(2),t.nextPoint();let o=t.x,i=t.y;if(f)n.moveTo(o,i);else{if(o<r||o>s||i<r||i>s){f=!0;continue}e.push({x:o,y:i})}let c=!1;for(;t.nextPoint();)if(o=t.x,i=t.y,f)n.lineTo(o,i);else{if(o<r||o>s||i<r||i>s){c=!0;break}e.push({x:o,y:i})}if(c)f=!0;else{if(f){const t=n.resultWithStarts();if(t)for(const e of t)l.push({...e,pathLength:u})}else l.push({line:e,start:0,pathLength:u});h=t.nextPath(),u=h?t.pathLength():0,f=!1}}return l=l.filter(t=>t.line.length>1),0===l.length?null:l}l.setExtent(o),i.setExtent(o);export{f as area,p as clipLinesMarshall,g as clipMarshall,u as triangleAreaArray,h as triangulate,c as triangulateLibtess};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- export{DrawGraphicTool2D}from"./editingTools/draw/DrawGraphicTool2D.js";export{ControlPointsTransformTool}from"./editingTools/ControlPointsTransformTool.js";export{TransformTool}from"./editingTools/TransformTool.js";export{MediaTransformToolsWrapper}from"./editingTools/MediaTransformToolsWrapper.js";
5
+ export{DrawGraphicTool2D}from"./editingTools/draw/DrawGraphicTool2D.js";export{ControlPointsTransformTool}from"./editingTools/ControlPointsTransformTool.js";export{TransformTool}from"./editingTools/TransformTool.js";