@arcgis/core 4.25.0-next.20220921 → 4.25.0-next.20220922
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.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/libs/linkchartlayout/lclayout.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +2 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark/main.scss +7 -5
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ar.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_bg.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_bs.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ca.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_cs.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_da.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_de.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_el.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_en.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_es.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_et.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_fi.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_fr.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_he.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_hr.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_hu.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_id.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_it.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ja.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ko.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_lt.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_lv.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_nb.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_nl.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_pl.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_pt-BR.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_pt-PT.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ro.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_ru.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_sk.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_sl.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_sr.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_sv.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_th.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_tr.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_uk.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_vi.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_zh-CN.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_zh-HK.json +1 -1
- package/assets/esri/widgets/Feature/t9n/Feature_zh-TW.json +1 -1
- package/interfaces.d.ts +106 -1
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/networks/Network.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/NetworkSystemLayers.js +5 -0
- package/package.json +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
- package/support/featureFlags.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/MapViewConstraints.js +1 -1
- package/views/2d/constraints/GeometryConstraint.js +1 -1
- package/views/2d/constraints/RotationConstraint.js +1 -1
- package/views/2d/constraints/ZoomConstraint.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/layers/SceneLayerFeatureView3D.js +5 -0
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/interactive/tooltip/ReshapeTooltipInfos.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Feature/FeatureRelationship.js +1 -1
package/networks/Network.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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import t from"../core/Loadable.js";import o from"../core/Logger.js";import{isSome as s}from"../core/maybe.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{isAbortError as i}from"../core/promiseUtils.js";import{urlToObject as n}from"../core/urlUtils.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import p from"../geometry/Extent.js";import d from"../geometry/SpatialReference.js";import{parse as c}from"../layers/support/arcgisLayerUrl.js";import y from"../rest/networks/support/QueryNamedTraceConfigurationsParameters.js";let m=class extends(a(t)){constructor(e){super(e),this.id=null,this.title=null,this.layerUrl=null,this.dataElement=null,this.fullExtent=null,this.spatialReference=null,this.type=null,this.sourceJSON=null}initialize(){this.when().catch((e=>{i(e)||o.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}get datasetName(){return this.dataElement?.name??null}get owner(){return this.dataElement?.userIdentity??null}get schemaGeneration(){return this.dataElement?.schemaGeneration??null}get parsedUrl(){const e=this.layerUrl;return e?n(e):null}get featureServiceUrl(){const e=this.parsedUrl&&c(this.parsedUrl.path);return s(e)?e.url.path:null}get networkServiceUrl(){return this.featureServiceUrl?this.featureServiceUrl.replace(/\/FeatureServer/i,"/UtilityNetworkServer"):null}get layerId(){const e=this.parsedUrl&&c(this.parsedUrl.path);return s(e)?e.sublayer:null}async load(e){return this.addResolvingPromise(this._fetchDataElement(this.featureServiceUrl,this.layerId.toString(),e)),this.addResolvingPromise(this._fetchLayerMetaData(this.layerUrl,e)),this}getLayerIdBySourceId(e){if(this.dataElement){const r=this.dataElement.domainNetworks;for(const t of r){for(const r of t.edgeSources?t.edgeSources:[])if(r.sourceId===e)return r.layerId;for(const r of t.junctionSources?t.junctionSources:[])if(r.sourceId===e)return r.layerId}return null}return null}async queryNamedTraceConfigurations(e,r){const{queryNamedTraceConfigurations:t}=await import("../rest/networks/queryNamedTraceConfigurations.js"),o=this.networkServiceUrl,s=new y({...e});return(await t(o,s,{...r}))?.namedTraceConfigurations??null}async _fetchLayerMetaData(e,t){const o=await r(e,{responseType:"json",query:{f:"json"},...t});this.sourceJSON=o.data,this.read(o.data,{origin:"service"})}async _fetchDataElement(e,t,o){if(this.dataElement)return;const s=await r(`${e}/queryDataElements`,{responseType:"json",query:{layers:JSON.stringify([t]),f:"json"},...o}).then((e=>e.data.layerDataElements?.[0]));s&&this.read(s,{origin:"service"})}};e([l({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}}},read:!1}})],m.prototype,"id",void 0),e([l({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}}},read:!1}})],m.prototype,"title",void 0),e([l({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"url"},write:{target:"url",isRequired:!0}}},read:!1}})],m.prototype,"layerUrl",void 0),e([l({type:Object,json:{origins:{service:{read:!0}},read:!1}})],m.prototype,"dataElement",void 0),e([l({type:p,json:{origins:{service:{read:{source:"extent"}}},read:!1}})],m.prototype,"fullExtent",void 0),e([l({type:d,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:!1}})],m.prototype,"spatialReference",void 0),e([l({type:["utility","trace"],readOnly:!0,json:{read:!1,write:!1}})],m.prototype,"type",void 0),e([l({readOnly:!0})],m.prototype,"datasetName",null),e([l({readOnly:!0})],m.prototype,"owner",null),e([l({readOnly:!0})],m.prototype,"schemaGeneration",null),e([l({readOnly:!0})],m.prototype,"parsedUrl",null),e([l({readOnly:!0})],m.prototype,"featureServiceUrl",null),e([l({readOnly:!0})],m.prototype,"networkServiceUrl",null),e([l({readOnly:!0})],m.prototype,"layerId",null),e([l()],m.prototype,"sourceJSON",void 0),m=e([u("esri.networks.Network")],m);const h=m;export{h as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import r from"../request.js";import t from"../core/Loadable.js";import o from"../core/Logger.js";import{isSome as s}from"../core/maybe.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{isAbortError as i}from"../core/promiseUtils.js";import{urlToObject as n}from"../core/urlUtils.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import p from"../geometry/Extent.js";import d from"../geometry/SpatialReference.js";import{parse as c}from"../layers/support/arcgisLayerUrl.js";import y from"../rest/networks/support/QueryNamedTraceConfigurationsParameters.js";let m=class extends(a(t)){constructor(e){super(e),this.id=null,this.title=null,this.layerUrl=null,this.dataElement=null,this.fullExtent=null,this.spatialReference=null,this.type=null,this.sourceJSON=null}initialize(){this.when().catch((e=>{i(e)||o.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}get datasetName(){return this.dataElement?.name??null}get owner(){return this.dataElement?.userIdentity??null}get schemaGeneration(){return this.dataElement?.schemaGeneration??null}get parsedUrl(){const e=this.layerUrl;return e?n(e):null}get featureServiceUrl(){const e=this.parsedUrl&&c(this.parsedUrl.path);return s(e)?e.url.path:null}get networkServiceUrl(){return this.featureServiceUrl?this.featureServiceUrl.replace(/\/FeatureServer/i,"/UtilityNetworkServer"):null}get layerId(){const e=this.parsedUrl&&c(this.parsedUrl.path);return s(e)?e.sublayer:null}get networkSystemLayers(){return null}async load(e){return this.addResolvingPromise(this._fetchDataElement(this.featureServiceUrl,this.layerId.toString(),e)),this.addResolvingPromise(this._fetchLayerMetaData(this.layerUrl,e)),this}getLayerIdBySourceId(e){if(this.dataElement){const r=this.dataElement.domainNetworks;for(const t of r){for(const r of t.edgeSources?t.edgeSources:[])if(r.sourceId===e)return r.layerId;for(const r of t.junctionSources?t.junctionSources:[])if(r.sourceId===e)return r.layerId}return null}return null}async queryNamedTraceConfigurations(e,r){const{queryNamedTraceConfigurations:t}=await import("../rest/networks/queryNamedTraceConfigurations.js"),o=this.networkServiceUrl,s=new y({...e});return(await t(o,s,{...r}))?.namedTraceConfigurations??null}async _fetchLayerMetaData(e,t){const o=await r(e,{responseType:"json",query:{f:"json"},...t});this.sourceJSON=o.data,this.read(o.data,{origin:"service"})}async _fetchDataElement(e,t,o){if(this.dataElement)return;const s=await r(`${e}/queryDataElements`,{responseType:"json",query:{layers:JSON.stringify([t]),f:"json"},...o}).then((e=>e.data.layerDataElements?.[0]));s&&this.read(s,{origin:"service"})}};e([l({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}}},read:!1}})],m.prototype,"id",void 0),e([l({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}}},read:!1}})],m.prototype,"title",void 0),e([l({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"url"},write:{target:"url",isRequired:!0}}},read:!1}})],m.prototype,"layerUrl",void 0),e([l({type:Object,json:{origins:{service:{read:!0}},read:!1}})],m.prototype,"dataElement",void 0),e([l({type:p,json:{origins:{service:{read:{source:"extent"}}},read:!1}})],m.prototype,"fullExtent",void 0),e([l({type:d,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:!1}})],m.prototype,"spatialReference",void 0),e([l({type:["utility","trace"],readOnly:!0,json:{read:!1,write:!1}})],m.prototype,"type",void 0),e([l({readOnly:!0})],m.prototype,"datasetName",null),e([l({readOnly:!0})],m.prototype,"owner",null),e([l({readOnly:!0})],m.prototype,"schemaGeneration",null),e([l({readOnly:!0})],m.prototype,"parsedUrl",null),e([l({readOnly:!0})],m.prototype,"featureServiceUrl",null),e([l({readOnly:!0})],m.prototype,"networkServiceUrl",null),e([l({readOnly:!0})],m.prototype,"layerId",null),e([l()],m.prototype,"sourceJSON",void 0),e([l({readOnly:!0})],m.prototype,"networkSystemLayers",null),m=e([u("esri.networks.Network")],m);const h=m;export{h 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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import s from"../layers/FeatureLayer.js";import{queryAllJSON as a}from"../layers/support/featureQueryAll.js";import o from"./Network.js";import n from"./RulesTable.js";import i from"./support/NamedTraceConfiguration.js";import l from"./support/TerminalConfiguration.js";import{RuleType as
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import s from"../layers/FeatureLayer.js";import{queryAllJSON as a}from"../layers/support/featureQueryAll.js";import o from"./Network.js";import n from"./RulesTable.js";import i from"./support/NamedTraceConfiguration.js";import l from"./support/NetworkSystemLayers.js";import u from"./support/TerminalConfiguration.js";import{RuleType as d}from"./support/typeUtils.js";import m from"../rest/support/Query.js";let c=class extends o{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility"}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new l({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})}get rulesTableId(){return this.sourceJSON?.systemLayers.rulesTableId}get rulesTableUrl(){return this.sourceJSON?`${this.featureServiceUrl}/${this.rulesTableId}`:null}get subnetworksTableId(){return this.sourceJSON?.systemLayers.subnetworksTableId}get subnetworksTableUrl(){return this.sourceJSON?`${this.featureServiceUrl}/${this.subnetworksTableId}`:null}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map((e=>u.fromJSON(e)))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map((e=>e.domainNetworkName))||[]}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map((t=>{t.edgeSources.map((t=>{e.add(t.layerId)})),t.junctionSources.map((t=>{e.add(t.layerId)}))})),e}async load(e){return this.addResolvingPromise(super.load(e)),this.addResolvingPromise(this._loadNamedTraceConfigurationsFromNetwork(e)),this}getTerminalConfiguration(e){let t=null,r=null;const s=e.layer;let a=null;if("feature"!==s?.type)return null;if(a=s.layerId,null===a)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 n=null;const i=this.dataElement.domainNetworks;for(const l of i){const e=l.junctionSources?.find((e=>e.layerId===a));if(e){const s=e.assetGroups?.find((e=>e.assetGroupCode===t));if(s){const e=s.assetTypes?.find((e=>e.assetTypeCode===r));if(e){n=e.terminalConfigurationId;break}}}}if(null!=n){const e=this.dataElement.terminalConfigurations?.find((e=>e.terminalConfigurationId===n));return e?u.fromJSON(e):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find((t=>t.domainNetworkName===e));return t?.tiers.map((e=>e.name))||[]}async getRulesTable(){return this._createRulesTable()}isUtilityLayer(e){return this._utilityLayerList.has(e.layerId)}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"})}}}async _createRulesTable(){const e=new s({url:this.rulesTableUrl});await e.load();const t=this.dataElement?.domainNetworks;if(!t)return null;const r=t.flatMap((e=>[...e.edgeSources,...e.junctionSources])),a=(await this._queryRulesTable(e)).map((t=>this._hydrateRuleInfo(e,r,t)));return new n({layer:e,rules:a})}async _queryRulesTable(e){const t=new m({where:"1=1",outFields:["*"]});return(await a(e,t)).features}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,a=s.get("RULETYPE"),o=s.get("CREATIONDATE"),n=s.get("FROMNETWORKSOURCEID"),i=s.get("FROMASSETGROUP"),l=s.get("FROMASSETTYPE"),u=s.get("FROMTERMINALID"),m=s.get("TONETWORKSOURCEID"),c=s.get("TOASSETGROUP"),y=s.get("TOASSETTYPE"),p=s.get("TOTERMINALID"),f=s.get("VIANETWORKSOURCEID"),T=s.get("VIAASSETGROUP"),g=s.get("VIAASSETTYPE"),I=s.get("VIATERMINALID"),b=r.attributes[a.name],h=new Date(r.attributes[o.name]),S=[{networkSourceId:r.attributes[n.name],assetGroupId:r.attributes[i.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[m.name],assetGroupId:r.attributes[c.name],assetTypeId:r.attributes[y.name],terminalId:r.attributes[p.name]},{networkSourceId:r.attributes[f.name],assetGroupId:r.attributes[T.name],assetTypeId:r.attributes[g.name],terminalId:r.attributes[I.name]}];let N;!function(e){e[e.from=0]="from",e[e.to=1]="to",e[e.via=2]="via"}(N||(N={}));const w={ruleType:b,creationDate:h};for(const O of[N.from,N.to,N.via]){if(b!==d.RTEdgeJunctionEdgeConnectivity&&O===N.via)continue;const e=S[O],r=t.find((t=>t.sourceId===e.networkSourceId)),s=r?.assetGroups.find((t=>t.assetGroupCode===e.assetGroupId)),a=s?.assetTypes.find((t=>t.assetTypeCode===e.assetTypeId));let o=this._getTerminal(b,a,e);b!==d.RTContainment&&b!==d.RTAttachment||(o=null);let n="";switch(O){case N.from:n="from";break;case N.to:n="to";break;case N.via:n="via"}w[`${n}NetworkSource`]=r,w[`${n}AssetGroup`]=s,w[`${n}AssetType`]=a,w[`${n}Terminal`]=o}return w}_getTerminal(e,t,r){if(e===d.RTAttachment||e===d.RTContainment)return null;const s=t?.terminalConfigurationId,a=this.terminalConfigurations?.find((e=>e.id===s));return a?.terminals?.find((e=>e.id===r.terminalId))??null}};e([t({type:[i],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],c.prototype,"sharedNamedTraceConfigurations",void 0),e([t({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],c.prototype,"type",void 0),e([t({readOnly:!0})],c.prototype,"serviceTerritoryFeatureLayerId",null),e([t({readOnly:!0})],c.prototype,"networkSystemLayers",null),e([t({readOnly:!0})],c.prototype,"rulesTableId",null),e([t({readOnly:!0})],c.prototype,"rulesTableUrl",null),e([t({readOnly:!0})],c.prototype,"subnetworksTableId",null),e([t({readOnly:!0})],c.prototype,"subnetworksTableUrl",null),e([t({readOnly:!0})],c.prototype,"terminalConfigurations",null),e([t({readOnly:!0})],c.prototype,"domainNetworkNames",null),c=e([r("esri.networks.UtilityNetwork")],c);const y=c;export{y 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.25/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import s from"../../core/Accessor.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";let e=class extends s{constructor(r){super(r),this.rulesTableId=null,this.rulesTableUrl=null,this.subnetworksTableId=null,this.subnetworksTableUrl=null,this.dirtyAreasLayerId=null,this.dirtyAreasLayerUrl=null}};r([o({constructOnly:!0})],e.prototype,"rulesTableId",void 0),r([o({constructOnly:!0})],e.prototype,"rulesTableUrl",void 0),r([o({constructOnly:!0})],e.prototype,"subnetworksTableId",void 0),r([o({constructOnly:!0})],e.prototype,"subnetworksTableUrl",void 0),r([o({constructOnly:!0})],e.prototype,"dirtyAreasLayerId",void 0),r([o({constructOnly:!0})],e.prototype,"dirtyAreasLayerUrl",void 0),e=r([t("esri.networks.support.NetworkSystemLayers")],e);const l=e;export{l as default};
|
package/package.json
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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../GraphApplyEditsResult.js";function r(r){const t=new e;t.hasError=r.has_error(),t.hasError&&(t.error={errorCode:r.error.error_code,errorMessage:r.error.error_message});const
|
|
5
|
+
import e from"../GraphApplyEditsResult.js";function r(r){const t=new e;t.hasError=r.has_error(),t.hasError&&(t.error={errorCode:r.error.error_code,errorMessage:r.error.error_message});const s=r.get_edit_results_count();for(let e=0;e<s;e++){const s=r.get_edit_results_at(e),o=r.get_edit_results_type_name_at(e),_=[],d=[],l=[],u=s.get_add_results_count(),a=s.get_update_results_count(),n=s.get_delete_results_count();for(let e=0;e<u;e++){const r=s.get_add_result_at(e);_.push({id:r.globalId,error:r.error})}for(let e=0;e<a;e++){const r=s.get_update_result_at(e);d.push({id:r.globalId,error:r.error})}for(let e=0;e<n;e++){const r=s.get_delete_result_at(e);l.push({id:r.globalId,error:r.error})}t.editResults.push({typeName:o,adds:_,updates:d,deletes:l})}return t}export{r as decoderToApplyEditsResponse};
|
package/support/featureFlags.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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../core/has.js";const e=()=>!!has("enable-feature:force-wosr"),
|
|
5
|
+
import has from"../core/has.js";const e=()=>!!has("enable-feature:force-wosr"),a=()=>!!has("enable-feature:direct-3d-object-feature-layer-display"),r=()=>has.cache["enable-feature:direct-3d-object-feature-layer-display"]=!0,t=()=>!!has("enable-feature:SceneLayer-editing"),c=()=>{has.cache["enable-feature:SceneLayer-editing"]=!0,r()};export{a as enableDirect3DObjectFeatureLayerDisplay,c as enableSceneLayerEditing,e as enableWebStyleForceWOSR,t as sceneLayerEditingEnabled,r as turnOnDirect3DObjectFeatureLayerDisplay};
|
package/support/revision.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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const a="
|
|
5
|
+
const a="20220922",c="f0caaa101df00450860cb2bebaf2a56c340239cf";export{a as buildDate,c 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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as o}from"../../chunks/tslib.es6.js";import"../../geometry.js";import e from"../../core/Accessor.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import s from"../../layers/support/LOD.js";import{GeometryConstraint as i}from"./constraints/GeometryConstraint.js";import n from"./constraints/RotationConstraint.js";import a from"./constraints/ZoomConstraint.js";import m from"../../geometry/Extent.js";import l from"../../geometry/Polygon.js";const p={base:null,key:"type",typeMap:{extent:m,polygon:l}};let c=class extends e{constructor(o){super(o),this.lods=null,this.minScale=0,this.maxScale=0,this.minZoom=-1,this.maxZoom=-1,this.rotationEnabled=!0,this.snapToZoom=!0}destroy(){this.view=null}get effectiveLODs(){return this._zoom.effectiveLODs}get effectiveMinScale(){return this._zoom.effectiveMinScale}get effectiveMaxScale(){return this._zoom.effectiveMaxScale}get effectiveMinZoom(){return this._zoom.effectiveMinZoom}get effectiveMaxZoom(){return this._zoom.effectiveMaxZoom}set geometry(o){o?this._set("geometry",o):this._set("geometry",null)}get version(){return
|
|
5
|
+
import{_ as o}from"../../chunks/tslib.es6.js";import"../../geometry.js";import e from"../../core/Accessor.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import s from"../../layers/support/LOD.js";import{GeometryConstraint as i}from"./constraints/GeometryConstraint.js";import n from"./constraints/RotationConstraint.js";import a from"./constraints/ZoomConstraint.js";import m from"../../geometry/Extent.js";import l from"../../geometry/Polygon.js";const p={base:null,key:"type",typeMap:{extent:m,polygon:l}};let c=class extends e{constructor(o){super(o),this.lods=null,this.minScale=0,this.maxScale=0,this.minZoom=-1,this.maxZoom=-1,this.rotationEnabled=!0,this.snapToZoom=!0}destroy(){this.view=null}get effectiveLODs(){return this._zoom.effectiveLODs}get effectiveMinScale(){return this._zoom.effectiveMinScale}get effectiveMaxScale(){return this._zoom.effectiveMaxScale}get effectiveMinZoom(){return this._zoom.effectiveMinZoom}get effectiveMaxZoom(){return this._zoom.effectiveMaxZoom}set geometry(o){o?this._set("geometry",o):this._set("geometry",null)}get version(){return`${this._zoom?.uid}/${this._rotation?.uid}/${this._geometry?.uid}`}get _defaultLODs(){const o=this.view?.defaultsFromMap?.tileInfo,e=this.view?.spatialReference;return o&&e&&o.spatialReference.equals(e)?o.lods:null}get _geometry(){return new i({geometry:this.geometry,spatialReference:this.view?.spatialReference})}get _rotation(){return new n({rotationEnabled:this.rotationEnabled})}get _zoom(){const o=this._get("_zoom"),e=this.lods||this._defaultLODs,t=this.minZoom,r=this.maxZoom,s=this.minScale,i=this.maxScale,n=this.snapToZoom;return o&&o.lods===e&&o.minZoom===t&&o.maxZoom===r&&o.minScale===s&&o.maxScale===i&&o.snapToZoom===n?o:new a({lods:e,minZoom:t,maxZoom:r,minScale:s,maxScale:i,snapToZoom:n})}canZoomInTo(o){const e=this.effectiveMaxScale;return 0===e||o>=e}canZoomOutTo(o){const e=this.effectiveMinScale;return 0===e||o<=e}constrain(o,e){return this._zoom.constrain(o,e),this._rotation.constrain(o,e),this._geometry.constrain(o,e),o}constrainByGeometry(o){return this._geometry.constrain(o)}fit(o){return this._zoom.fit(o)}zoomToScale(o){return this._zoom.zoomToScale(o)}scaleToZoom(o){return this._zoom.scaleToZoom(o)}snapScale(o){return this._zoom.snapToClosestScale(o)}snapToNextScale(o){return this._zoom.snapToNextScale(o)}snapToPreviousScale(o){return this._zoom.snapToPreviousScale(o)}};o([t({readOnly:!0})],c.prototype,"effectiveLODs",null),o([t({readOnly:!0})],c.prototype,"effectiveMinScale",null),o([t({readOnly:!0})],c.prototype,"effectiveMaxScale",null),o([t({readOnly:!0})],c.prototype,"effectiveMinZoom",null),o([t({readOnly:!0})],c.prototype,"effectiveMaxZoom",null),o([t({types:p,value:null})],c.prototype,"geometry",null),o([t({type:[s]})],c.prototype,"lods",void 0),o([t()],c.prototype,"minScale",void 0),o([t()],c.prototype,"maxScale",void 0),o([t()],c.prototype,"minZoom",void 0),o([t()],c.prototype,"maxZoom",void 0),o([t()],c.prototype,"rotationEnabled",void 0),o([t()],c.prototype,"snapToZoom",void 0),o([t()],c.prototype,"view",void 0),o([t({readOnly:!0})],c.prototype,"version",null),o([t()],c.prototype,"_defaultLODs",null),o([t({type:i})],c.prototype,"_geometry",null),o([t({type:n})],c.prototype,"_rotation",null),o([t({readOnly:!0,type:a})],c.prototype,"_zoom",null),c=o([r("esri.views.2d.MapViewConstraints")],c);const u=c;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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Accessor.js";import t from"../../../core/Logger.js";import{isNone as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Accessor.js";import{NumericIdentifiableMixin as t}from"../../../core/Identifiable.js";import o from"../../../core/Logger.js";import{isNone as s}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{project as a}from"../../../geometry/projection.js";import{extentContainsPoint as m,polygonContainsPoint as c}from"../../../geometry/support/contains.js";import{nearestCoordinate as p}from"../../../geometry/support/near.js";var l;let y=l=class extends(t(r)){constructor(e){super(e),this.geometry=null,this.spatialReference=null}get normalizedGeometry(){if(s(this.geometry)||!this.spatialReference)return null;if(!this.spatialReference.equals(this.geometry.spatialReference))try{return a(this.geometry,this.spatialReference)}catch(e){return o.getLogger(this.declaredClass).error("#constraints.geometry","could not project the geometry to the view's spatial reference",{geometry:this.geometry,spatialReference:this.spatialReference,error:e}),null}return this.geometry}constrain(e,r){if(s(this.normalizedGeometry))return e;const t=e.targetGeometry;if("extent"===this.normalizedGeometry.type?m(this.normalizedGeometry,t):c(this.normalizedGeometry,t))return e;const{coordinate:o}=p(this.normalizedGeometry,t);return o?(e.targetGeometry=o,e):e}clone(){return new l({geometry:this.geometry?.clone(),spatialReference:this.spatialReference?.clone()})}};e([i({constructOnly:!0})],y.prototype,"geometry",void 0),e([i({readOnly:!0})],y.prototype,"normalizedGeometry",null),e([i({constructOnly:!0})],y.prototype,"spatialReference",void 0),y=l=e([n("esri.views.2d.constraints.GeometryConstraint")],y);export{y as GeometryConstraint};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as o}from"../../../chunks/tslib.es6.js";import r from"../../../core/Accessor.js";import{
|
|
5
|
+
import{_ as o}from"../../../chunks/tslib.es6.js";import r from"../../../core/Accessor.js";import{NumericIdentifiableMixin as t}from"../../../core/Identifiable.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";var a;let n=a=class extends(t(r)){constructor(){super(...arguments),this.enabled=!0,this.rotationEnabled=!0}constrain(o,r){return this.enabled&&r?(this.rotationEnabled||(o.rotation=r.rotation),o):o}clone(){return new a({enabled:this.enabled,rotationEnabled:this.rotationEnabled})}};o([e()],n.prototype,"enabled",void 0),o([e()],n.prototype,"rotationEnabled",void 0),n=a=o([s("esri.views.2d.constraints.RotationConstraint")],n);const i=n;export{i 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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{NumericIdentifiableMixin as o}from"../../../core/Identifiable.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";var a;let c=a=class extends(o(t)){constructor(e){super(e),this._lodByScale={},this._scales=[],this.effectiveLODs=null,this.effectiveMinZoom=-1,this.effectiveMaxZoom=-1,this.effectiveMinScale=0,this.effectiveMaxScale=0,this.lods=null,this.minZoom=-1,this.maxZoom=-1,this.minScale=0,this.maxScale=0,this.snapToZoom=!0}initialize(){let e,{lods:t,minScale:o,maxScale:s,minZoom:i,maxZoom:a}=this,c=-1,r=-1,l=!1,n=!1;if(0!==o&&0!==s&&o<s&&([o,s]=[s,o]),!t||!t.length)return this._set("effectiveMinScale",o),void this._set("effectiveMaxScale",s);t=t.map((e=>e.clone())),t.sort(((e,t)=>t.scale-e.scale)),t.forEach(((e,t)=>e.level=t));for(const f of t)!l&&o>0&&o>=f.scale&&(c=f.level,l=!0),!n&&s>0&&s>=f.scale&&(r=e?e.level:-1,n=!0),e=f;-1===i&&(i=0===o?0:c),-1===a&&(a=0===s?t.length-1:r),i=Math.max(i,0),i=Math.min(i,t.length-1),a=Math.max(a,0),a=Math.min(a,t.length-1),i>a&&([i,a]=[a,i]),o=t[i].scale,s=t[a].scale,t.splice(0,i),t.splice(a-i+1,t.length),t.forEach(((e,t)=>{this._lodByScale[e.scale]=e,this._scales[t]=e.scale})),this._set("effectiveLODs",t),this._set("effectiveMinZoom",i),this._set("effectiveMaxZoom",a),this._set("effectiveMinScale",o),this._set("effectiveMaxScale",s)}constrain(e,t){if(t&&e.scale===t.scale)return e;const o=this.effectiveMinScale,s=this.effectiveMaxScale,i=e.targetGeometry,a=t&&t.targetGeometry,c=0!==s&&e.scale<s,r=0!==o&&e.scale>o;if(c||r){const c=r?o:s;if(t&&a){const o=(c-t.scale)/(e.scale-t.scale);i.x=a.x+(i.x-a.x)*o,i.y=a.y+(i.y-a.y)*o}e.scale=c}return this.snapToZoom&&this.effectiveLODs&&(e.scale=this._getClosestScale(e.scale)),e}fit(e){if(!this.effectiveLODs||!this.snapToZoom)return this.constrain(e,null);const t=this.scaleToZoom(e.scale),o=Math.abs(t-Math.floor(t));return e.scale=this.zoomToScale(o>.99?Math.round(t):Math.floor(t)),e}zoomToScale(e){if(!this.effectiveLODs)return 0;e-=this.effectiveMinZoom,e=Math.max(0,e);const t=this._scales;if(e<=0)return t[0];if(e>=t.length)return t[t.length-1];const o=Math.round(e-.5),s=Math.round(e);return t[s]+(s-e)*(t[o]-t[s])}scaleToZoom(e){if(!this.effectiveLODs)return-1;const t=this._scales;let o,s;if(e>=t[0])return this.effectiveMinZoom;if(e<=t[t.length-1])return this.effectiveMaxZoom;for(let i=0;i<t.length-1;i++){if(o=t[i],s=t[i+1],s===e){return i+this.effectiveMinZoom+1}if(o>e&&s<e){return i+this.effectiveMinZoom+1-(e-s)/(o-s)}}return-1}snapToClosestScale(e){if(!this.effectiveLODs)return e;const t=this.scaleToZoom(e);return this.zoomToScale(Math.round(t))}snapToNextScale(e,t=.5){if(!this.effectiveLODs)return e*t;const o=Math.round(this.scaleToZoom(e));return this.zoomToScale(o+1)}snapToPreviousScale(e,t=2){if(!this.effectiveLODs)return e*t;const o=Math.round(this.scaleToZoom(e));return this.zoomToScale(o-1)}clone(){return new a({lods:this.lods,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,maxScale:this.maxScale})}_getClosestScale(e){return this._lodByScale[e]||(e=this._scales.reduce(((t,o)=>Math.abs(o-e)<=Math.abs(t-e)?o:t),this._scales[0])),this._lodByScale[e].scale}};e([s({readOnly:!0})],c.prototype,"effectiveLODs",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMinZoom",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMaxZoom",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMinScale",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMaxScale",void 0),e([s()],c.prototype,"lods",void 0),e([s()],c.prototype,"minZoom",void 0),e([s()],c.prototype,"maxZoom",void 0),e([s()],c.prototype,"minScale",void 0),e([s()],c.prototype,"maxScale",void 0),e([s()],c.prototype,"snapToZoom",void 0),c=a=e([i("esri.views.2d.constraints.ZoomConstraint")],c);const r=c;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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../../chunks/tslib.es6.js";import{removeUnordered as t}from"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import i from"../../../../../core/Evented.js";import{HandleOwner as a}from"../../../../../core/HandleOwner.js";import o from"../../../../../core/Handles.js";import{handlesGroup as n,destroyHandle as r}from"../../../../../core/handleUtils.js";import{destroyMaybe as s,isSome as l,isNone as p,unwrap as h,removeMaybe as d}from"../../../../../core/maybe.js";import{zeroMeters as u,scale as c,createLength as m}from"../../../../../core/quantityUtils.js";import{watch as g,when as _,initial as f}from"../../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as v}from"../../../../../core/unitUtils.js";import{property as M}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as y}from"../../../../../core/accessorSupport/decorators/subclass.js";import{I as x}from"../../../../../chunks/mat4f64.js";import{l as O,b,h as E,s as G,a as S,g as V}from"../../../../../chunks/vec3.js";import{f as I,c as T}from"../../../../../chunks/vec3f64.js";import w from"../../../../../geometry/Polyline.js";import{projectPoint as H}from"../../../../../geometry/support/plane.js";import{sv3d as A}from"../../../../../geometry/support/vectorStacks.js";import{makeDehydratedPoint as D}from"../../../../../layers/graphics/dehydratedFeatures.js";import{getGraphicEffectiveElevationInfo as L}from"../../../../../support/elevationInfoUtils.js";import{isVolumetricSymbol as P}from"../../../../../symbols/support/utils.js";import{Manipulator3D as j}from"../../Manipulator3D.js";import{createManipulatorMaterial as U,createManipulatorOutlineMaterial as k,placeAtGraphic as N}from"../../manipulatorUtils.js";import{SegmentLabels3D as C}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as R}from"../../SnappingVisualizer3D.js";import{screenToRenderPlaneFromEvent as F,convertToMapCoordinates as z,screenToMapXYAtLocation as X,screenToMapXYForGraphicAtLocation as Y}from"../dragEventPipeline3D.js";import{ManipulatorType as Z}from"../ManipulatorType.js";import{canMoveZ as q}from"../manipulatorUtils.js";import{settings as W,colors as K}from"../settings.js";import{createVisualElements as B}from"../visualElementUtils.js";import{DISC_RADIUS_SMALL as J}from"../manipulations/config.js";import{ManipulationType as Q,MoveManipulation as $}from"../manipulations/MoveManipulation.js";import{shapeOrientation as ee,axisConstrainedDragSign as te}from"../manipulations/moveUtils.js";import{MoveXYGraphicManipulation as ie}from"../manipulations/MoveXYGraphicManipulation.js";import{createEdgeOffsetIntersectionPlane as ae,createEdgeOffsetOperation as oe,edgeOffsetRotationMatrix as ne,screenEdgeLengthSquared as re}from"./edgeOffsetUtils.js";import{OutlineVisualElement as se}from"../../visualElements/OutlineVisualElement.js";import{GraphicState as le}from"../../../layers/graphics/GraphicState.js";import{createExtrudedTriangle as pe,createSphereGeometry as he}from"../../../webgl-engine/lib/GeometryUtil.js";import{MouseButton as de}from"../../../../input/IViewEvents.js";import{addMapDelta as ue,createManipulatorDragEventPipeline as ce,dragAtLocation as me,addScreenDelta as ge}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateFlags as _e,ManipulatorStateCustomFlags as fe}from"../../../../interactive/interfaces.js";import{EditGeometryOperations as ve}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as Me}from"../../../../interactive/editGeometry/interfaces.js";import{SnappingContext as ye}from"../../../../interactive/snapping/SnappingContext.js";import{SnappingPipeline as xe}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{ReshapeEdgeOffsetTooltipInfo as Oe}from"../../../../interactive/tooltip/ReshapeTooltipInfos.js";import{Tooltip as be}from"../../../../interactive/tooltip/Tooltip.js";import{TranslateGraphicZTooltipInfo as Ee,TranslateGraphicXYTooltipInfo as Ge,TranslateGraphicTooltipInfo as Se,TranslateVertexZTooltipInfo as Ve,TranslateVertexXYTooltipInfo as Ie,TranslateVertexTooltipInfo as Te}from"../../../../interactive/tooltip/TranslateTooltipInfos.js";import{autoAreaByElevationMode as we}from"../../../../support/automaticAreaMeasurementUtils.js";import{autoHorizontalDistanceByElevationModeBetweenPoints as He,autoLengthByElevationMode as Ae}from"../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistanceBetweenPoints as De,elevationOfPoint as Le}from"../../../../support/euclideanLengthMeasurementUtils.js";import{geodesicDistance as Pe}from"../../../../support/geodesicLengthMeasurementUtils.js";let je=class extends(i.EventedMixin(a)){constructor(e){super(e),this._vertexManipulatorMaterial=U(W.colorToVec4(W.reshapeManipulators.vertex.color),W.reshapeManipulators.vertex.renderOccluded),this._vertexManipulatorOutlineMaterial=k(W.colorToVec4(W.reshapeManipulators.vertex.outlineColor),W.reshapeManipulators.vertex.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=k(W.colorToVec4(W.reshapeManipulators.vertex.hoverOutlineColor),W.reshapeManipulators.vertex.renderOccluded),this._edgeManipulatorMaterial=U(W.colorToVec4(W.reshapeManipulators.edge.color),W.reshapeManipulators.edge.renderOccluded),this._edgeManipulatorOutlineMaterial=k(W.colorToVec4(W.reshapeManipulators.edge.outlineColor),W.reshapeManipulators.edge.renderOccluded),this._edgeOffsetManipulatorMaterial=U(W.colorToVec4(W.reshapeManipulators.edgeOffset.color),W.reshapeManipulators.edgeOffset.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=U(W.colorToVec4(W.reshapeManipulators.edgeOffset.hoverColor),W.reshapeManipulators.edgeOffset.renderOccluded,!1),this._selectedManipulatorMaterial=U(W.colorToVec4(W.reshapeManipulators.selected.color),W.reshapeManipulators.selected.renderOccluded),this._selectedManipulatorOutlineMaterial=k(W.colorToVec4(W.reshapeManipulators.selected.outlineColor),W.reshapeManipulators.selected.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=k(W.colorToVec4(W.reshapeManipulators.selected.hoverOutlineColor),W.reshapeManipulators.selected.renderOccluded),this._selectedIndex=0,this._vertexManipulatorGeometry=null,this._vertexManipulatorOutlineGeometry=null,this._edgeManipulatorGeometry=null,this._edgeManipulatorOutlineGeometry=null,this._edgeOffsetManipulatorGeometryInside=null,this._edgeOffsetManipulatorGeometryOutside=null,this._manipulatorHandles=new o,this._manipulatorInfos=[],this._editGeometryOperations=null,this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=Fe.NONE,this._outlineVisualElement=null,this._segmentLabels=null,this.outputGeometry=null,this._snappingPipeline=new xe,this._snappingPipelineHandle=new xe,this._vertexLaserLineVisualElement=null}initialize(){const{graphic:e,view:t}=this,i=this._graphicState=new le({graphic:e});this._tooltip=new be({view:t}),this.addHandles([g((()=>i.displaying),(e=>{for(const t of this._manipulatorInfos)t.manipulator.available=e})),g((()=>({labels:this._segmentLabels,enabled:this._labelOptions.enabled,edgeOffsetEnabled:this.enableEdgeOffset})),(({labels:e,enabled:t,edgeOffsetEnabled:i})=>{l(e)&&(e.visible=t,e.edgeDistance=i?"far":"default")}),f),_((()=>!this._tooltipOptions.enabled),(()=>this._tooltip.clear()),f),this.view.trackGraphicState(i)])}destroy(){this._segmentLabels=s(this._segmentLabels),this._tooltip=s(this._tooltip),this._removeManipulators()}get inputGeometry(){return l(this._editGeometryOperations)?this._editGeometryOperations.data.geometry:null}set inputGeometry(e){this._recreateEditGeometryAndManipulators(e)}get updating(){return this.updatingHandles.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get graphic(){return this.tool.graphic}get enableZShape(){return this.tool.enableZShape}get enableZVertex(){return this.tool.enableZVertex}get enableMoveGraphic(){return this.tool.enableMoveGraphic}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _labelOptions(){return this.tool.labelOptions}get _tooltipOptions(){return this.tool.tooltipOptions}removeSelectedVertices(){const e=this._manipulatorInfos.filter((e=>e.manipulator.selected&&"vertex"===e.type));this._removeVertices(e)}onManipulatorSelectionChanged(){this.emit("manipulators-changed")}_removeManipulators(){this._manipulatorHandles.removeAll(),this._moveManipulation=s(this._moveManipulation),this._graphicMoveManipulation=s(this._graphicMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0}_createManipulators(){if(p(this._editGeometryOperations))return;const e=L(this.graphic);for(const t of this._editGeometryOperations.data.components){for(const i of t.vertices)this._createVertexOrEdgeManipulator(i,e);for(const i of t.edges)this._createVertexOrEdgeManipulator(i,e)}this._createGraphicMoveManipulation(),this._createMoveManipulation(e),this._createVisualElements()}get canRedo(){return l(this._editGeometryOperations)&&this._editGeometryOperations.canRedo}get canUndo(){return l(this._editGeometryOperations)&&this._editGeometryOperations.canUndo}redo(){if(p(this._editGeometryOperations))return null;const e=this._editGeometryOperations.redo();return l(e)&&(this.outputGeometry=this._editGeometryOperations.data.geometry,this._recreateManipulators()),e}undo(){if(p(this._editGeometryOperations))return null;this.emit("undo");const e=this._editGeometryOperations.undo();return l(e)&&(this.outputGeometry=this._editGeometryOperations.data.geometry,this._recreateManipulators()),e}_recreateManipulators(){this._removeManipulators(),this._tooltip.clear(),this._createManipulators()}_recreateEditGeometryAndManipulators(e=this.inputGeometry){this._removeManipulators(),this._tooltip.clear(),p(e)||(s(this._editGeometryOperations),this._editGeometryOperations=ve.fromGeometry(e,this.view.state.viewingMode),this._createManipulators(),s(this._segmentLabels),this._segmentLabels=new C({context:{view:this.view,editGeometryOperations:this._editGeometryOperations,elevationInfo:L(this.graphic),labelOptions:this._labelOptions,graphic:this.graphic,graphicState:this._graphicState},visible:this._labelOptions.enabled}))}_perGraphicManipulatorDragAction(e,t){if("end"===t.action)return t;let i=0;const a=[],o=this._manipulatorInfos.some((e=>"vertex"===e.type&&e.manipulator.selected)),n=e===ze.SELECTED_OR_ALL&&o;for(const r of this._manipulatorInfos)"vertex"===r.type&&(r.manipulator.grabbing||n&&!r.manipulator.selected||a.push(r),i++);if(0===a.length)return t;this._moveVertices(a,t);if(a.length===i){if(this._updateEventState(Fe.MOVING),this.destroyed)return t;this.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,mover:this.graphic})}else{if(this._updateEventState(Fe.RESHAPING),this.destroyed)return t;this.emit("reshape",{type:"reshape",mover:this.graphic})}return t}_isMultiVertexSelection(){let e=0;for(const t of this._manipulatorInfos)"vertex"===t.type&&t.manipulator.selected&&e++;return e>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(Fe.RESHAPING),this.destroyed)return;const{mapDeltaX:t,mapDeltaY:i,mapDeltaZ:a}=e;if(!t&&!i&&!a)return;const o=[];for(const n of this._manipulatorInfos)"vertex"===n.type&&(n.manipulator.selected&&!n.manipulator.grabbing||n===e.info)&&o.push(n);this._moveVertices(o,e,Me.ACCUMULATE_STEPS),this.emit("reshape",{type:"reshape",mover:this.graphic})}_updateEventState(e){if(e===this._reshapeEventState)return!1;switch(e){case Fe.NONE:if(0!==this._numGrabbing||0!==this._numDragging)return!1;switch(this._reshapeEventState){case Fe.MOVING:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic});break;case Fe.RESHAPING:this.emit("reshape",{type:"reshape-stop",mover:this.graphic})}break;case Fe.MOVING:switch(this._reshapeEventState){case Fe.NONE:this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic});break;case Fe.RESHAPING:this.emit("reshape",{type:"reshape-stop",mover:this.graphic}),this.destroyed||this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic})}break;case Fe.RESHAPING:switch(this._reshapeEventState){case Fe.NONE:this.emit("reshape",{type:"reshape-start",mover:this.graphic});break;case Fe.MOVING:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic}),this.destroyed||this.emit("reshape",{type:"reshape-start",mover:this.graphic})}}if(this.destroyed)return!1;const t=this._reshapeEventState!==e;return this._reshapeEventState=e,t}_createGraphicMoveManipulation(){const{tool:e,view:t}=this,i=this._graphicState;if(this._graphicMoveManipulation=new ie({tool:e,view:t,graphicState:i}),this.enableMoveGraphic){let e=null;this._manipulatorHandles.add(this._graphicMoveManipulation.createDragPipeline(((t,i,a)=>{i.next((e=>this._trackNumDragging(e))).next((t=>("start"===t.action&&(e=h(this._editGeometryOperations).createUndoGroup()),t))).next((e=>this._perGraphicManipulatorDragAction(ze.ALL,e))).next((e=>(this._updateTranslateGraphicTooltip(Q.XY,e),e))).next((t=>{"end"===t.action&&(this._tooltip.clear(),e=d(e))})),a.next((()=>this._onDragCancel(!0,(()=>e=d(e)))))}))),this._graphicMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1))))}else this._graphicMoveManipulation.forEachManipulator((e=>{e.grabbable=!1,e.cursor=null}));this._graphicMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(e.events.on("immediate-click",(e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.emit("immediate-click",{...e,graphic:this.graphic}),e.stopPropagation()})))))}_createMoveManipulation(e){const{graphic:t,handles:i,tool:a,view:o}=this,n=this._graphicState;this._moveManipulation=new $({tool:a,view:o,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&q(t),snapToScene:!1,radius:$.radiusForSymbol(t.symbol)}),this._moveManipulation.forEachManipulator((e=>i.add([e.events.on("immediate-click",(i=>{this._moveManipulation.zManipulation.hasManipulator(e)||this._manipulatorInfos.some((e=>e.manipulator.selected))||this.emit("immediate-click",{...i,graphic:t}),i.stopPropagation()})),this._watchAndUpdateGrabState(e,!1)])));const r=e=>t=>{i.add(t.events.on("focus-changed",(({action:t})=>{"focus"===t&&this._tooltipOptions.enabled?this._updateTranslateTooltip(e):this._tooltip.clear()})))};this._moveManipulation.xyManipulation.forEachManipulator(r(Q.XY)),this._moveManipulation.xyAxisManipulation.forEachManipulator(r(Q.XY_AXIS)),this._moveManipulation.zManipulation.forEachManipulator(r(Q.Z)),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};const s=h(t.geometry).spatialReference;i.add([this._moveManipulation.createDragPipeline(((i,o,n,r,s)=>{const l=n.next((e=>this._trackNumDragging(e))).next((e=>{const t=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));return e.manipulatorType===Z.TRANSLATE_XY&&1===t.length?{...e,info:t[0],snapOrigin:t[0].handle.pos}:{...e,info:null}})).next(this._snappingPipelineHandle.createSnapDragEventPipelineStep({predicate:e=>!!e.info,cancel:r,snappingManager:a.snappingManager,snappingContext:new ye({editGeometryOperations:h(this._editGeometryOperations),elevationInfo:e,pointer:s,excludeFeature:t,visualizer:new R}),updatingHandles:this.updatingHandles}),this._snappingPipelineHandle.next).next(ue()).next((e=>this._perGraphicManipulatorDragAction(ze.SELECTED_OR_ALL,e))).next((e=>(this._updateTranslateTooltip(i,e),e)));return r.next((()=>this._onDragCancel())),l}),e,s,t),g((()=>n.displaying),(()=>{this._updateMoveManipulationPosition()}),f),n.on("changed",(()=>this._updateMoveManipulationPosition())),g((()=>n.isDraped),(e=>{this._updateMoveManipulationPosition();const t="align-move-manipulation";e?i.add(this.view.elevationProvider.on("elevation-change",(()=>this._updateMoveManipulationPosition())),t):i.remove(t)}),f)])}_createVisualElements(){const{graphic:e,view:t}=this,i=B({view:t,graphic:e,forEachManipulator:e=>{if(!this.destroyed){this._graphicMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(const t of this._manipulatorInfos)e(t.manipulator,Z.TRANSLATE_XY)}},onManipulatorsChanged:e=>this.on("manipulators-changed",e)});l(i)&&(this._outlineVisualElement=i.visualElement instanceof se?i.visualElement:null),l(this._outlineVisualElement)&&this._manipulatorHandles.add(this._outlineVisualElement.events.on("attachment-origin-changed",(()=>{this._graphicState.isDraped||this._updateMoveManipulationPosition()}))),this._manipulatorHandles.add(i)}_createEdgeOffsetManipulator(e,t=L(this.graphic)){const i=W.reshapeManipulators.edgeOffset,a=i.size/2,o=a+i.collisionPadding;if(p(this._edgeOffsetManipulatorGeometryInside)||p(this._edgeOffsetManipulatorGeometryOutside)){const e=a/o,t=e*Math.sqrt(3)/2;this._edgeOffsetManipulatorGeometryInside=pe(t,e/2,e/2,i.height,i.offset),this._edgeOffsetManipulatorGeometryOutside=pe(-t,e/2,e/2,i.height,-i.offset)}const r=[{geometry:this._edgeOffsetManipulatorGeometryInside,material:this._edgeOffsetManipulatorMaterial,stateMask:_e.Unfocused},{geometry:this._edgeOffsetManipulatorGeometryInside,material:this._edgeOffsetManipulatorHoverMaterial,stateMask:_e.Focused},{geometry:this._edgeOffsetManipulatorGeometryOutside,material:this._edgeOffsetManipulatorMaterial,stateMask:_e.Unfocused},{geometry:this._edgeOffsetManipulatorGeometryOutside,material:this._edgeOffsetManipulatorHoverMaterial,stateMask:_e.Focused}],s=new j({view:this.view,renderObjects:r,elevationInfo:"on-the-ground"!==t.mode||P(this.graphic.symbol)?{mode:"absolute-height",offset:0}:t,worldOriented:!1,focusMultiplier:1,radius:o,available:!(!this.graphic.visible||!this.graphic.layer.visible),collisionType:{type:"disc",direction:I(0,0,1)},collisionPriority:1,metadata:{deleting:!1}}),h=new j({view:this.view,renderObjects:[],worldSized:!0,worldOriented:!1,available:!(!this.graphic.visible||!this.graphic.layer.visible),collisionPriority:-10,cursor:this.enableMoveGraphic?"move":"default",metadata:{deleting:!1}}),d={manipulator:s,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:h,elevationInfo:t,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(d,i.minSquaredEdgeLength),this._updateEdgeOffsetManipulator(d);const u=[];for(const n of[d.handle.leftVertex,d.handle.rightVertex]){const e=this._getManipulatorInfoFromHandle(n);l(e)&&u.push(e.manipulator.events.on("location-update",(()=>this._updateEdgeOffsetManipulator(d))))}d.locationUpdateHandle=n(u),this._manipulatorHandles.add(d.locationUpdateHandle,s),this._manipulatorHandles.add([this._watchAndUpdateGrabState(s,!0),this._watchAndUpdateGrabState(h,!0)],s),this._manipulatorHandles.add(ce(s,this._createEdgeOffsetPipeline(d,t)),s),this._manipulatorHandles.add(ce(h,((e,i,a,o)=>{if("touch"===o){this._createEdgeOffsetPipeline(d,t)(e,i,a)}else if(this.enableMoveGraphic){const o=this.graphic,n=l(o.geometry)?o.geometry.spatialReference:null;i.next((e=>this._trackNumDragging(e))).next(me(this.view,e.elevationAlignedLocation)).next(X(this.view,e.elevationAlignedLocation,t,n,o)).next(ge()).next(ue()).next((e=>this._perGraphicManipulatorDragAction(ze.ALL,e))).next((e=>(this._updateTranslateGraphicTooltip(Q.XY,e),e))).next((e=>{"end"===e.action&&this._tooltip.clear()})),a.next((()=>this._onDragCancel(!e.metadata.deleting)))}})),s);const c=e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.emit("immediate-click",{...e,graphic:this.graphic}),e.stopPropagation()};return this._manipulatorHandles.add([s.events.on("immediate-click",c),h.events.on("immediate-click",c),s.events.on("focus-changed",(({action:e})=>{const t=this._tooltipOptions;"focus"===e&&t.enabled?this._tooltip.info=new Oe({tooltipOptions:t}):this._tooltip.clear()}))],s),this._manipulatorInfos.push(d),this.manipulators.add(s),this.manipulators.add(h),this.emit("manipulators-changed"),d}_autoHideEdgeOffsetManipulator(e,t){const i=e.manipulator,a=e.edgeManipulator,o=()=>{e.visibilityHandle=d(e.visibilityHandle);const o=this._getManipulatorInfoFromHandle(e.handle.leftVertex),r=this._getManipulatorInfoFromHandle(e.handle.rightVertex),s=l(o)&&l(r)&&re(o.manipulator.renderLocation,r.manipulator.renderLocation,this.view.state.camera)<t;(!i.focused&&!a.focused||s)&&(i.grabbable=!s,a.grabbable=!s,e.visibilityHandle=n([i.disableDisplay(),{remove:()=>{i.grabbable=!0,a.grabbable=this.enableMoveGraphic}}]))};this._manipulatorHandles.add([i.events.on("focus-changed",o),a.events.on("focus-changed",o),{remove:()=>{d(e.visibilityHandle),a.metadata.deleting=!0,this.manipulators.remove(a)}}],i),o()}_updateEdgeOffsetManipulator(e){this._updateManipulatorPosition(e);const t=h(this._editGeometryOperations).data.coordinateHelper,i=ae(this.view,e.manipulator.elevationAlignedLocation,oe(t,e.handle,h(e.manipulator.elevationInfo))),a=this._getManipulatorInfoFromHandle(e.handle.leftVertex),o=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(p(a)||p(o))return;const n=a.manipulator.renderLocation,r=o.manipulator.renderLocation,s=l(i)?ne(i,n,r):x;e.manipulator.modelTransform=s,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=s;const d=O(b(Ce,n,r))/2;e.edgeManipulator.collisionType={type:"line",paths:[[[-d,0,0],[d,0,0]]]}}_createEdgeOffsetPipeline(e,t){return(i,a,o)=>{this._clearSelection();const{step:n,cleanup:r}=this._initializeEdgeOffset(e,t);a.next((e=>this._trackNumDragging(e))).next(me(this.view,i.elevationAlignedLocation)).next(n).next(F(this.view)).next(z(this.view,h(this._editGeometryOperations).data.spatialReference)).next(ue()).next(this._applyComputeEdgeOffsetDistanceStep()).next(this._applyEdgeOffsetStep(e)).next(this._showEdgeOffsetTooltip()).next((e=>{"end"===e.action&&r()})),o.next((()=>{i.metadata.deleting||(r(),this._onDragCancel())}))}}_initializeEdgeOffset(e,t){const i=h(this._editGeometryOperations),a=oe(i.data.coordinateHelper,e.handle,t),o=i.createUndoGroup(),s=ae(this.view,e.manipulator.elevationAlignedLocation,a);if(a.requiresSplitEdgeLeft){const t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftEdge);l(t)&&this._splitEdgeManipulator(t,1)}if(a.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightEdge);l(t)&&this._splitEdgeManipulator(t,0)}const u=()=>new w({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:h(this._editGeometryOperations).data.spatialReference}),c=new se({view:this.view,isDraped:this._graphicState.isDraped,geometry:u(),elevationInfo:e.elevationInfo,width:W.visualElements.lineGraphics.outline.width,color:W.colorToVec4(K.main),attached:!0});let m;const _=()=>{this._cleanEdgeOffsetCollapsedEdges(e),m=d(m)},f=this.on("undo",_);return m=n([r(c),g((()=>this._graphicState.isDraped),(e=>c.isDraped=e)),this._graphicState.on("changed",(()=>c.geometry=u())),o,f]),{step:e=>p(a)||p(s)?(_(),null):{...e,operation:a,plane:s},cleanup:_}}_applyEdgeOffsetStep(e){return t=>{if(this.destroyed||p(t.operation))return t;this._updateEventState(Fe.RESHAPING);const{mapDeltaX:i,mapDeltaY:a,mapDeltaZ:o}=t;return(i||a||o)&&(this._offsetEdge(e,t),this.emit("reshape",{type:"reshape",mover:this.graphic})),t}}_applyComputeEdgeOffsetDistanceStep(){return e=>{const{operation:t,mapEnd:i}=e;return p(t)||p(i)?e:("start"===e.action&&t.selectArrowFromStartPoint(i),{...e,signedDistance:t.signedDistanceToPoint(i)})}}_showEdgeOffsetTooltip(){return e=>{const{mapEnd:t,signedDistance:i,operation:a}=e,o=this._tooltip,n=this._tooltipOptions;if(!n.enabled||p(i))return o.clear(),e;const r="end"===e.action?u:ke(this._graphicState.isDraped,i*a.selectedArrow,t,a.plane,h(this._editGeometryOperations).data.coordinateHelper);return p(o.info)||"reshape-edge-offset"!==o.info.type?o.info=new Oe({tooltipOptions:n,distance:r}):o.info.distance=r,e}}_cleanEdgeOffsetCollapsedEdges(e){const t=e.handle.leftVertex.leftEdge?.leftVertex,i=e.handle.leftVertex,a=e.handle.rightVertex.rightEdge?.rightVertex,o=e.handle.rightVertex,n=h(this._editGeometryOperations).data.coordinateHelper,r=1e-6,s=[];if(t&&n.distance(t.pos,i.pos)<r){const e=this._getManipulatorInfoFromHandle(i);l(e)&&s.push(e)}if(n.distance(i.pos,o.pos)<r||a&&n.distance(a.pos,o.pos)<r){const e=this._getManipulatorInfoFromHandle(o);l(e)&&s.push(e)}s.length&&this._removeVertices(s)}_computeVertexManipulatorSizeAndOutline(e){const t=e.size/2,i=t+e.collisionPadding;return{size:t/i,outlineSize:(t+e.outlineSize)/i}}_createVertexOrEdgeManipulator(e,t=L(this.graphic)){if("edge"===e.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(p(this._vertexManipulatorGeometry)||p(this._vertexManipulatorOutlineGeometry)){const{size:e,outlineSize:t}=this._computeVertexManipulatorSizeAndOutline(W.reshapeManipulators.vertex);this._vertexManipulatorGeometry=he(e,16,16),this._vertexManipulatorOutlineGeometry=he(t,16,16)}if(p(this._edgeManipulatorGeometry)||p(this._edgeManipulatorOutlineGeometry)){const{size:e,outlineSize:t}=this._computeVertexManipulatorSizeAndOutline(W.reshapeManipulators.edge);this._edgeManipulatorGeometry=he(e,16,16),this._edgeManipulatorOutlineGeometry=he(t,16,16)}const i=l(this.graphic.geometry)&&"point"===this.graphic.geometry.type?[]:[{geometry:this._vertexManipulatorGeometry,material:this._vertexManipulatorMaterial,stateMask:Re.Vertex|_e.Unselected},{geometry:this._vertexManipulatorOutlineGeometry,material:this._vertexManipulatorOutlineMaterial,stateMask:Re.Vertex|_e.Unfocused|_e.Unselected},{geometry:this._vertexManipulatorOutlineGeometry,material:this._vertexManipulatorHoverOutlineMaterial,stateMask:Re.Vertex|_e.Focused|_e.Unselected},{geometry:this._vertexManipulatorGeometry,material:this._selectedManipulatorMaterial,stateMask:_e.Selected},{geometry:this._vertexManipulatorOutlineGeometry,material:this._selectedManipulatorOutlineMaterial,stateMask:_e.Selected|_e.Unfocused},{geometry:this._vertexManipulatorOutlineGeometry,material:this._selectedManipulatorHoverOutlineMaterial,stateMask:_e.Selected|_e.Focused}];this.enableMidpoints&&i.push({geometry:this._edgeManipulatorGeometry,material:this._vertexManipulatorMaterial,stateMask:Re.Edge|_e.Focused|_e.Unselected},{geometry:this._edgeManipulatorOutlineGeometry,material:this._vertexManipulatorHoverOutlineMaterial,stateMask:Re.Edge|_e.Focused|_e.Unselected},{geometry:this._edgeManipulatorGeometry,material:this._edgeManipulatorMaterial,stateMask:Re.Edge|_e.Unfocused|_e.Unselected},{geometry:this._edgeManipulatorOutlineGeometry,material:this._edgeManipulatorOutlineMaterial,stateMask:Re.Edge|_e.Unfocused|_e.Unselected});const a=new j({view:this.view,renderObjects:i,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:!(!this.graphic.visible||!this.graphic.layer.visible),metadata:{deleting:!1}});this._setTypeSpecificManipulatorSettings(a,e,t);const o="edge"===e.type?{manipulator:a,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0}:{manipulator:a,handle:e,type:"vertex",selectedIndex:0};if(this._manipulatorInfos.push(o),this.manipulators.add(a),this._updateManipulatorPosition(o),"edge"===o.type){const e=[];for(const t of[o.handle.leftVertex,o.handle.rightVertex]){const i=this._getManipulatorInfoFromHandle(t);l(i)&&e.push(i.manipulator.events.on("location-update",(()=>this._updateManipulatorPosition(o))))}o.locationUpdateHandle=n(e),this._manipulatorHandles.add(o.locationUpdateHandle,a)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(a,!0),a);const r=ce(a,((e,i,a,n)=>{let r=null;i.next((e=>this._trackNumDragging(e))).next((e=>{if("start"===e.action&&(r=h(this._editGeometryOperations).createUndoGroup()),"edge"===o.type){const t=this._splitEdgeManipulator(o);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:o,snapOrigin:o.handle.pos}})).next(me(this.view,e.elevationAlignedLocation)).next(Y(this.view,this.graphic,e.elevationAlignedLocation,e.location.spatialReference,this.graphic)).next(this._snappingPipeline.createSnapDragEventPipelineStep({predicate:()=>!this._isMultiVertexSelection(),cancel:a,snappingManager:this.tool.snappingManager,snappingContext:new ye({editGeometryOperations:h(this._editGeometryOperations),elevationInfo:t,pointer:n,excludeFeature:this.graphic,visualizer:new R}),updatingHandles:this.updatingHandles}),this._snappingPipeline.next).next(ue()).next((t=>{this._perVertexManipulatorDragAction(t),"end"===t.action&&(r=d(r)),this._updateTranslateVertexTooltip(e,Q.XY,t)})),a.next((()=>this._onDragCancel(!e.metadata.deleting,(()=>r=d(r)))))}));return this._manipulatorHandles.add([r,a.events.on("immediate-click",(e=>this._manipulatorClickCallback(e,o))),a.events.on("select-changed",(()=>{o.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition()})),a.events.on("focus-changed",(({action:e})=>{"focus"===e&&"edge"!==o.type?this._updateTranslateVertexTooltip(a,Q.XY):this._tooltip.clear()}))],a),this.emit("manipulators-changed"),o}_trackNumDragging(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&(this.undo(),this.outputGeometry=l(this._editGeometryOperations)?this._editGeometryOperations.data.geometry:null),l(this.tool.snappingManager)&&this.tool.snappingManager.doneSnapping(),this._tooltip.clear(),this._reshapeEventState){case Fe.NONE:break;case Fe.MOVING:this.emit("move",{type:"move",dx:0,dy:0,mover:this.graphic});break;case Fe.RESHAPING:this.emit("reshape",{type:"reshape",mover:this.graphic})}t&&t(),this.destroyed||this._updateEventState(Fe.NONE)}_setTypeSpecificManipulatorSettings(e,t,i){switch(t.type){case"vertex":e.state=Re.Vertex,e.selectable=!0,e.cursor="move",e.collisionPriority=2,e.radius=W.reshapeManipulators.vertex.size/2+W.reshapeManipulators.vertex.collisionPadding,e.elevationInfo=i,e.interactive=l(this.graphic.geometry)&&"point"!==this.graphic.geometry.type;break;case"edge":e.state=Re.Edge,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1,e.radius=W.reshapeManipulators.edge.size/2+W.reshapeManipulators.edge.collisionPadding,e.elevationInfo="on-the-ground"!==i.mode||P(this.graphic.symbol)?{mode:"absolute-height",offset:0}:i}}_watchAndUpdateGrabState(e,t){return e.events.on("grab-changed",(i=>this._onGrabStateChanged(e,t,i.action,i.pointerType)))}_onGrabStateChanged(e,t,i,a="mouse"){if("start"===i)t&&this._updateSelection(e),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(Fe.NONE),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,("touch"!==a||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach((e=>{e.manipulator.interactive=e.manipulator.grabbing||!this._numGrabbing&&l(this.graphic.geometry)&&"point"!==this.graphic.geometry.type,"edgeManipulator"in e&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)})),this._graphicMoveManipulation.forEachManipulator((e=>{e.interactive=e.grabbing||!this._numGrabbing})))}_clearSelection(){for(const e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1)}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.emit("manipulators-changed"))}_removeManipulator(e){p(e)||(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),t(this._manipulatorInfos,e),this.emit("manipulators-changed"))}_getManipulatorInfoFromHandle(e){if(e)for(const t of this._manipulatorInfos)if(e===t.handle)return t;return null}_updateManipulatorPosition(e){if(p(e))return;const t=h(this._editGeometryOperations);if("vertex"===e.type)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,Ne),e.manipulator.grabbing&&l(this._vertexLaserLineVisualElement)&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.type){const i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),a=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(p(i)||p(a))return;const o=i.manipulator,n=a.manipulator;if(l(e.manipulator.elevationInfo)&&"on-the-ground"===e.manipulator.elevationInfo.mode){const i=o.location,a=n.location,r=.5,s=i.x+r*(a.x-i.x),l=i.y+r*(a.y-i.y),p=i.hasZ&&a.hasZ?0:void 0;e.manipulator.location=D(s,l,p,t.data.spatialReference)}else E(Ce,o.renderLocation,n.renderLocation,.5),e.manipulator.renderLocation=Ce}}_splitEdgeManipulator(e,t=.5){const i=h(this._editGeometryOperations),a=h(i.splitEdge(e.handle,t).createdVertex);e.locationUpdateHandle.remove(),e.locationUpdateHandle=void 0;const o=L(this.graphic);let n;this.enableEdgeOffset?(this._removeManipulator(e),n=this._createVertexOrEdgeManipulator(a)):(n=e,n.handle=a,n.type="vertex",this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,o)),a.leftEdge&&this._createVertexOrEdgeManipulator(a.leftEdge),a.rightEdge&&this._createVertexOrEdgeManipulator(a.rightEdge),this.outputGeometry=i.data.geometry,this._updateManipulatorPosition(n),this.enableEdgeOffset||this._updateTranslateVertexTooltip(n.manipulator,Q.XY),this._updateSelection(e.manipulator);const r=this._updateEventState(Fe.RESHAPING),s=i.data.coordinateHelper.vectorToArray(n.handle.pos),l=i.data.components.indexOf(a.component);return this.emit("vertex-add",{type:"vertex-add",vertices:[{coordinates:s,componentIndex:l,vertexIndex:h(a.index)}],added:s}),r&&this._updateEventState(Fe.NONE),n}_updateMoveManipulationPosition(){const e=G(Ce,0,0,0);let t=0,i=!1,a=null,o=null;for(const n of this._manipulatorInfos)"vertex"===n.type&&(n.manipulator.selected?(t++,S(e,e,n.manipulator.renderLocation),p(a)||n.selectedIndex>a.selectedIndex?(o=a,a=n):(p(o)||n.selectedIndex>o.selectedIndex)&&(o=n)):i=!0);if(0!==t){const e=this._graphicState.displaying;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&q(this.graphic),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&1!==t}else{const e=this._graphicState.displaying&&this.enableMoveGraphic;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&q(this.graphic)}if(0!==t){let e=0;if(l(a)){const t=a.handle.pos,i=l(o)?o.handle.pos:a.handle.leftEdge&&a.handle.leftEdge.leftVertex?a.handle.leftEdge.leftVertex.pos:null,n=p(o)&&a.handle.rightEdge&&a.handle.rightEdge.rightVertex?a.handle.rightEdge.rightVertex.pos:null;i&&n?this._moveManipulation.xyAxisManipulation.available=!1:i?e=Ue(i,t):n&&(e=Ue(t,n))}this._moveManipulation.angle=e,this._moveManipulation.radius=J}else this._moveManipulation.angle=ee(h(this.graphic.geometry)),this._moveManipulation.radius=$.radiusForSymbol(this.graphic.symbol);0!==t&&i?(V(e,e,1/t),Ne.spatialReference=h(this._editGeometryOperations).data.spatialReference,Ne.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,Ne),this._moveManipulation.elevationAlignedLocation=Ne):l(this._outlineVisualElement)&&!this._graphicState.isDraped&&l(this._outlineVisualElement.attachmentOrigin)?this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin:N(this.view,this._moveManipulation,this.graphic)}_removeVertices(e){const t=[],i=h(this._editGeometryOperations);for(const a of e)if("vertex"===a.type&&i.canRemoveVertex()){t.push(a.handle),this._removeManipulator(a),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.leftEdge)),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.rightEdge));const e=h(i.removeVertices([a.handle]).removedVertices[0].createdEdge);e&&this._createVertexOrEdgeManipulator(e)}if(t.length>0){const e=t.map((e=>{const t=i.data.components.indexOf(e.component);return{coordinates:i.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:h(e.index)}}));this.outputGeometry=i.data.geometry;const a=this._updateEventState(Fe.RESHAPING);if(this.destroyed)return;if(this.emit("vertex-remove",{type:"vertex-remove",removed:e.map((e=>e.coordinates)),vertices:e}),this.destroyed)return;if(a&&(this._updateEventState(Fe.NONE),this.destroyed))return;this._updateMoveManipulationPosition()}}_moveVertices(e,t,i=("start"===t.action?Me.NEW_STEP:Me.ACCUMULATE_STEPS)){const a=h(this._editGeometryOperations);a.moveVertices(e.map((e=>e.handle)),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i),this.outputGeometry=a.data.geometry;for(const o of e)this._updateManipulatorPosition(o)}_offsetEdge(e,t){if(p(t.operation)||p(t.signedDistance))return;const i=h(this._editGeometryOperations),a=t.operation.clone();a.distance=t.signedDistance,i.updateVertices([e.handle.leftVertex,e.handle.rightVertex],a),this.outputGeometry=i.data.geometry,this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.type&&(t.manipulator.selected=!t.manipulator.selected,e.button===de.Right&&this._removeVertices([t])),"edge"===t.type&&e.button===de.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){const i=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));1===i.length?this._updateTranslateVertexTooltip(i[0].manipulator,e,t):this._updateTranslateGraphicTooltip(e,t)}_updateTranslateGraphicTooltip(e,t){const i=this._tooltipOptions;if(!i.enabled)return;const a=this._graphicState.isDraped?"on-the-ground":"absolute-height";switch(e){case Q.XY:this._tooltip.info=new Se({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,((e,t)=>He(e,t,a)));break;case Q.XY_AXIS:this._tooltip.info=new Ge({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,((e,i)=>{const o=He(e,i,a);return c(o,te(t))}));break;case Q.Z:this._tooltip.info=new Ee({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,De)}}_updateTranslateVertexTooltip(e,t,i){const a=this._tooltipOptions;if(!a.enabled)return;let o;const n=this._graphicState.isDraped?"on-the-ground":"absolute-height";switch(t){case Q.XY:o=new Te({tooltipOptions:a}),this._updateTranslateTooltipDistance(o,i,((e,t)=>He(e,t,n))),this._updateTranslateVertexTooltipSum(o);break;case Q.XY_AXIS:o=new Ie({tooltipOptions:a}),this._updateTranslateTooltipDistance(o,i,((e,t)=>{const a=He(e,t,n);return c(a,te(i))})),this._updateTranslateVertexTooltipSum(o);break;case Q.Z:o=new Ve({tooltipOptions:a}),this._updateTranslateTooltipDistance(o,i,De)}const r=Le(e.elevationAlignedLocation);l(r)&&(o.elevation={mode:"absolute-height",...r}),this._tooltip.info=o}_updateTranslateTooltipDistance(e,t,i){if(l(t)&&"end"!==t.action){const{mapStart:a,mapEnd:o}=t,n=i(a,o);e.distance=l(n)?n:u}}_updateTranslateVertexTooltipSum(e){const{geometry:t}=this.graphic;if(p(t))return;const i=this._graphicState.isDraped?"on-the-ground":"absolute-height";e.area="polygon"===t.type?we(t,i):null,e.totalLength="polyline"===t.type?Ae(t,i):null}get test(){return{segmentLabels:this._segmentLabels,tooltip:this._tooltip}}};function Ue(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function ke(e,t,i,a,o){if(e){const e=o.toXYZ(o.pointToVector(i)),n=H(a,e,A.get()),r=Pe(n,e,o.spatialReference);if(l(r))return m(r.value*Math.sign(t),r.unit)}return m(t*v(i.spatialReference),"meters")}e([M()],je.prototype,"_segmentLabels",void 0),e([M({constructOnly:!0})],je.prototype,"tool",void 0),e([M()],je.prototype,"_tooltip",void 0),e([M()],je.prototype,"inputGeometry",null),e([M()],je.prototype,"outputGeometry",void 0),e([M({readOnly:!0})],je.prototype,"updating",null),e([M()],je.prototype,"manipulators",null),e([M()],je.prototype,"view",null),e([M()],je.prototype,"graphic",null),e([M()],je.prototype,"enableZShape",null),e([M()],je.prototype,"enableZVertex",null),e([M()],je.prototype,"enableMoveGraphic",null),e([M()],je.prototype,"enableMidpoints",null),e([M()],je.prototype,"enableEdgeOffset",null),e([M()],je.prototype,"_labelOptions",null),e([M()],je.prototype,"_tooltipOptions",null),je=e([y("esri.views.3d.interactive.editingTools.reshapeGraphic.ReshapeOperation")],je);const Ne=D(0,0,null,null),Ce=T();var Re,Fe,ze;!function(e){e.Vertex=fe.Custom1,e.Edge=fe.Custom2}(Re||(Re={})),function(e){e[e.NONE=0]="NONE",e[e.MOVING=1]="MOVING",e[e.RESHAPING=2]="RESHAPING"}(Fe||(Fe={})),function(e){e[e.ALL=0]="ALL",e[e.SELECTED_OR_ALL=1]="SELECTED_OR_ALL"}(ze||(ze={}));export{je as ReshapeOperation};
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import{removeUnordered as t}from"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import i from"../../../../../core/Evented.js";import{HandleOwner as a}from"../../../../../core/HandleOwner.js";import o from"../../../../../core/Handles.js";import{handlesGroup as n,destroyHandle as r}from"../../../../../core/handleUtils.js";import{destroyMaybe as s,isSome as l,isNone as p,unwrap as h,removeMaybe as d}from"../../../../../core/maybe.js";import{zeroMeters as u,scale as c,createLength as m}from"../../../../../core/quantityUtils.js";import{watch as g,when as _,initial as f}from"../../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as v}from"../../../../../core/unitUtils.js";import{property as M}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as y}from"../../../../../core/accessorSupport/decorators/subclass.js";import{I as O}from"../../../../../chunks/mat4f64.js";import{l as x,b,h as E,s as G,a as S,g as V}from"../../../../../chunks/vec3.js";import{f as I,c as T}from"../../../../../chunks/vec3f64.js";import w from"../../../../../geometry/Polyline.js";import{projectPoint as H}from"../../../../../geometry/support/plane.js";import{sv3d as A}from"../../../../../geometry/support/vectorStacks.js";import{makeDehydratedPoint as D}from"../../../../../layers/graphics/dehydratedFeatures.js";import{getGraphicEffectiveElevationInfo as L}from"../../../../../support/elevationInfoUtils.js";import{isVolumetricSymbol as P}from"../../../../../symbols/support/utils.js";import{Manipulator3D as j}from"../../Manipulator3D.js";import{createManipulatorMaterial as U,createManipulatorOutlineMaterial as k,placeAtGraphic as N}from"../../manipulatorUtils.js";import{SegmentLabels3D as C}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as R}from"../../SnappingVisualizer3D.js";import{screenToRenderPlaneFromEvent as F,convertToMapCoordinates as z,screenToMapXYAtLocation as X,screenToMapXYForGraphicAtLocation as Y}from"../dragEventPipeline3D.js";import{ManipulatorType as Z}from"../ManipulatorType.js";import{canMoveZ as q}from"../manipulatorUtils.js";import{settings as W,colors as K}from"../settings.js";import{createVisualElements as B}from"../visualElementUtils.js";import{DISC_RADIUS_SMALL as J}from"../manipulations/config.js";import{ManipulationType as Q,MoveManipulation as $}from"../manipulations/MoveManipulation.js";import{shapeOrientation as ee,axisConstrainedDragSign as te}from"../manipulations/moveUtils.js";import{MoveXYGraphicManipulation as ie}from"../manipulations/MoveXYGraphicManipulation.js";import{createEdgeOffsetIntersectionPlane as ae,createEdgeOffsetOperation as oe,edgeOffsetRotationMatrix as ne,screenEdgeLengthSquared as re}from"./edgeOffsetUtils.js";import{OutlineVisualElement as se}from"../../visualElements/OutlineVisualElement.js";import{GraphicState as le}from"../../../layers/graphics/GraphicState.js";import{createExtrudedTriangle as pe,createSphereGeometry as he}from"../../../webgl-engine/lib/GeometryUtil.js";import{MouseButton as de}from"../../../../input/IViewEvents.js";import{addMapDelta as ue,createManipulatorDragEventPipeline as ce,dragAtLocation as me,addScreenDelta as ge}from"../../../../interactive/dragEventPipeline.js";import{ManipulatorStateFlags as _e,ManipulatorStateCustomFlags as fe}from"../../../../interactive/interfaces.js";import{EditGeometryOperations as ve}from"../../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as Me}from"../../../../interactive/editGeometry/interfaces.js";import{SnappingContext as ye}from"../../../../interactive/snapping/SnappingContext.js";import{SnappingPipeline as Oe}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{ReshapeEdgeOffsetTooltipInfo as xe}from"../../../../interactive/tooltip/ReshapeTooltipInfos.js";import{Tooltip as be}from"../../../../interactive/tooltip/Tooltip.js";import{TranslateGraphicZTooltipInfo as Ee,TranslateGraphicXYTooltipInfo as Ge,TranslateGraphicTooltipInfo as Se,TranslateVertexZTooltipInfo as Ve,TranslateVertexXYTooltipInfo as Ie,TranslateVertexTooltipInfo as Te}from"../../../../interactive/tooltip/TranslateTooltipInfos.js";import{autoAreaByElevationMode as we}from"../../../../support/automaticAreaMeasurementUtils.js";import{autoHorizontalDistanceByElevationModeBetweenPoints as He,autoLengthByElevationMode as Ae}from"../../../../support/automaticLengthMeasurementUtils.js";import{verticalSignedDistanceBetweenPoints as De,elevationOfPoint as Le}from"../../../../support/euclideanLengthMeasurementUtils.js";import{geodesicDistance as Pe}from"../../../../support/geodesicLengthMeasurementUtils.js";let je=class extends(i.EventedMixin(a)){constructor(e){super(e),this._vertexManipulatorMaterial=U(W.colorToVec4(W.reshapeManipulators.vertex.color),W.reshapeManipulators.vertex.renderOccluded),this._vertexManipulatorOutlineMaterial=k(W.colorToVec4(W.reshapeManipulators.vertex.outlineColor),W.reshapeManipulators.vertex.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=k(W.colorToVec4(W.reshapeManipulators.vertex.hoverOutlineColor),W.reshapeManipulators.vertex.renderOccluded),this._edgeManipulatorMaterial=U(W.colorToVec4(W.reshapeManipulators.edge.color),W.reshapeManipulators.edge.renderOccluded),this._edgeManipulatorOutlineMaterial=k(W.colorToVec4(W.reshapeManipulators.edge.outlineColor),W.reshapeManipulators.edge.renderOccluded),this._edgeOffsetManipulatorMaterial=U(W.colorToVec4(W.reshapeManipulators.edgeOffset.color),W.reshapeManipulators.edgeOffset.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=U(W.colorToVec4(W.reshapeManipulators.edgeOffset.hoverColor),W.reshapeManipulators.edgeOffset.renderOccluded,!1),this._selectedManipulatorMaterial=U(W.colorToVec4(W.reshapeManipulators.selected.color),W.reshapeManipulators.selected.renderOccluded),this._selectedManipulatorOutlineMaterial=k(W.colorToVec4(W.reshapeManipulators.selected.outlineColor),W.reshapeManipulators.selected.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=k(W.colorToVec4(W.reshapeManipulators.selected.hoverOutlineColor),W.reshapeManipulators.selected.renderOccluded),this._selectedIndex=0,this._vertexManipulatorGeometry=null,this._vertexManipulatorOutlineGeometry=null,this._edgeManipulatorGeometry=null,this._edgeManipulatorOutlineGeometry=null,this._edgeOffsetManipulatorGeometryInside=null,this._edgeOffsetManipulatorGeometryOutside=null,this._manipulatorHandles=new o,this._manipulatorInfos=[],this._editGeometryOperations=null,this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=ze.NONE,this._outlineVisualElement=null,this._segmentLabels=null,this.outputGeometry=null,this._snappingPipeline=new Oe,this._snappingPipelineHandle=new Oe,this._vertexLaserLineVisualElement=null}initialize(){const{graphic:e,view:t}=this,i=this._graphicState=new le({graphic:e});this._tooltip=new be({view:t}),this.addHandles([g((()=>i.displaying),(e=>{for(const t of this._manipulatorInfos)t.manipulator.available=e})),g((()=>({labels:this._segmentLabels,enabled:this._labelOptions.enabled,edgeOffsetEnabled:this.enableEdgeOffset})),(({labels:e,enabled:t,edgeOffsetEnabled:i})=>{l(e)&&(e.visible=t,e.edgeDistance=i?"far":"default")}),f),_((()=>!this._tooltipOptions.enabled),(()=>this._tooltip.clear()),f),this.view.trackGraphicState(i)])}destroy(){this._segmentLabels=s(this._segmentLabels),this._tooltip=s(this._tooltip),this._removeManipulators()}get inputGeometry(){return l(this._editGeometryOperations)?this._editGeometryOperations.data.geometry:null}set inputGeometry(e){this._recreateEditGeometryAndManipulators(e)}get updating(){return this.updatingHandles.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get graphic(){return this.tool.graphic}get enableZShape(){return this.tool.enableZShape}get enableZVertex(){return this.tool.enableZVertex}get enableMoveGraphic(){return this.tool.enableMoveGraphic}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _labelOptions(){return this.tool.labelOptions}get _tooltipOptions(){return this.tool.tooltipOptions}removeSelectedVertices(){const e=this._manipulatorInfos.filter((e=>e.manipulator.selected&&"vertex"===e.type));this._removeVertices(e)}onManipulatorSelectionChanged(){this.emit("manipulators-changed")}_removeManipulators(){this._manipulatorHandles.removeAll(),this._moveManipulation=s(this._moveManipulation),this._graphicMoveManipulation=s(this._graphicMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0}_createManipulators(){if(p(this._editGeometryOperations))return;const e=L(this.graphic);for(const t of this._editGeometryOperations.data.components){for(const i of t.vertices)this._createVertexOrEdgeManipulator(i,e);for(const i of t.edges)this._createVertexOrEdgeManipulator(i,e)}this._createGraphicMoveManipulation(),this._createMoveManipulation(e),this._createVisualElements()}get canRedo(){return l(this._editGeometryOperations)&&this._editGeometryOperations.canRedo}get canUndo(){return l(this._editGeometryOperations)&&this._editGeometryOperations.canUndo}redo(){if(p(this._editGeometryOperations))return null;const e=this._editGeometryOperations.redo();return l(e)&&(this.outputGeometry=this._editGeometryOperations.data.geometry,this._recreateManipulators()),e}undo(){if(p(this._editGeometryOperations))return null;this.emit("undo");const e=this._editGeometryOperations.undo();return l(e)&&(this.outputGeometry=this._editGeometryOperations.data.geometry,this._recreateManipulators()),e}_recreateManipulators(){this._removeManipulators(),this._tooltip.clear(),this._createManipulators()}_recreateEditGeometryAndManipulators(e=this.inputGeometry){this._removeManipulators(),this._tooltip.clear(),p(e)||(s(this._editGeometryOperations),this._editGeometryOperations=ve.fromGeometry(e,this.view.state.viewingMode),this._createManipulators(),s(this._segmentLabels),this._segmentLabels=new C({context:{view:this.view,editGeometryOperations:this._editGeometryOperations,elevationInfo:L(this.graphic),labelOptions:this._labelOptions,graphic:this.graphic,graphicState:this._graphicState},visible:this._labelOptions.enabled}))}_perGraphicManipulatorDragAction(e,t){if("end"===t.action)return t;let i=0;const a=[],o=this._manipulatorInfos.some((e=>"vertex"===e.type&&e.manipulator.selected)),n=e===Xe.SELECTED_OR_ALL&&o;for(const r of this._manipulatorInfos)"vertex"===r.type&&(r.manipulator.grabbing||n&&!r.manipulator.selected||a.push(r),i++);if(0===a.length)return t;this._moveVertices(a,t);if(a.length===i){if(this._updateEventState(ze.MOVING),this.destroyed)return t;this.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,mover:this.graphic})}else{if(this._updateEventState(ze.RESHAPING),this.destroyed)return t;this.emit("reshape",{type:"reshape",mover:this.graphic})}return t}_isMultiVertexSelection(){let e=0;for(const t of this._manipulatorInfos)"vertex"===t.type&&t.manipulator.selected&&e++;return e>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(ze.RESHAPING),this.destroyed)return;const{mapDeltaX:t,mapDeltaY:i,mapDeltaZ:a}=e;if(!t&&!i&&!a)return;const o=[];for(const n of this._manipulatorInfos)"vertex"===n.type&&(n.manipulator.selected&&!n.manipulator.grabbing||n===e.info)&&o.push(n);this._moveVertices(o,e,Me.ACCUMULATE_STEPS),this.emit("reshape",{type:"reshape",mover:this.graphic})}_updateEventState(e){if(e===this._reshapeEventState)return!1;switch(e){case ze.NONE:if(0!==this._numGrabbing||0!==this._numDragging)return!1;switch(this._reshapeEventState){case ze.MOVING:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic});break;case ze.RESHAPING:this.emit("reshape",{type:"reshape-stop",mover:this.graphic})}break;case ze.MOVING:switch(this._reshapeEventState){case ze.NONE:this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic});break;case ze.RESHAPING:this.emit("reshape",{type:"reshape-stop",mover:this.graphic}),this.destroyed||this.emit("move",{type:"move-start",dx:0,dy:0,mover:this.graphic})}break;case ze.RESHAPING:switch(this._reshapeEventState){case ze.NONE:this.emit("reshape",{type:"reshape-start",mover:this.graphic});break;case ze.MOVING:this.emit("move",{type:"move-stop",dx:0,dy:0,mover:this.graphic}),this.destroyed||this.emit("reshape",{type:"reshape-start",mover:this.graphic})}}if(this.destroyed)return!1;const t=this._reshapeEventState!==e;return this._reshapeEventState=e,t}_createGraphicMoveManipulation(){const{tool:e,view:t}=this,i=this._graphicState;if(this._graphicMoveManipulation=new ie({tool:e,view:t,graphicState:i}),this.enableMoveGraphic){let e=null;this._manipulatorHandles.add(this._graphicMoveManipulation.createDragPipeline(((t,i,a)=>{i.next((e=>this._trackNumDragging(e))).next((t=>("start"===t.action&&(e=h(this._editGeometryOperations).createUndoGroup()),t))).next((e=>this._perGraphicManipulatorDragAction(Xe.ALL,e))).next((e=>(this._updateTranslateGraphicTooltip(Q.XY,e),e))).next((t=>{"end"===t.action&&(this._tooltip.clear(),e=d(e))})),a.next((()=>this._onDragCancel(!0,(()=>e=d(e)))))}))),this._graphicMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1))))}else this._graphicMoveManipulation.forEachManipulator((e=>{e.grabbable=!1,e.cursor=null}));this._graphicMoveManipulation.forEachManipulator((e=>this._manipulatorHandles.add(e.events.on("immediate-click",(e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.emit("immediate-click",{...e,graphic:this.graphic}),e.stopPropagation()})))))}_createMoveManipulation(e){const{graphic:t,handles:i,tool:a,view:o}=this,n=this._graphicState;this._moveManipulation=new $({tool:a,view:o,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&q(t),snapToScene:!1,radius:$.radiusForSymbol(t.symbol)}),this._moveManipulation.forEachManipulator((e=>i.add([e.events.on("immediate-click",(i=>{this._moveManipulation.zManipulation.hasManipulator(e)||this._manipulatorInfos.some((e=>e.manipulator.selected))||this.emit("immediate-click",{...i,graphic:t}),i.stopPropagation()})),this._watchAndUpdateGrabState(e,!1)])));const r=e=>t=>{i.add(t.events.on("focus-changed",(({action:t})=>{"focus"===t&&this._tooltipOptions.enabled?this._updateTranslateTooltip(e):this._tooltip.clear()})))};this._moveManipulation.xyManipulation.forEachManipulator(r(Q.XY)),this._moveManipulation.xyAxisManipulation.forEachManipulator(r(Q.XY_AXIS)),this._moveManipulation.zManipulation.forEachManipulator(r(Q.Z)),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};const s=h(t.geometry).spatialReference;i.add([this._moveManipulation.createDragPipeline(((i,o,n,r,s)=>{const l=n.next((e=>this._trackNumDragging(e))).next((e=>{const t=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));return e.manipulatorType===Z.TRANSLATE_XY&&1===t.length?{...e,info:t[0],snapOrigin:t[0].handle.pos}:{...e,info:null}})).next(this._snappingPipelineHandle.createSnapDragEventPipelineStep({predicate:e=>!!e.info,cancel:r,snappingManager:a.snappingManager,snappingContext:new ye({editGeometryOperations:h(this._editGeometryOperations),elevationInfo:e,pointer:s,excludeFeature:t,visualizer:new R}),updatingHandles:this.updatingHandles}),this._snappingPipelineHandle.next).next(ue()).next((e=>this._perGraphicManipulatorDragAction(Xe.SELECTED_OR_ALL,e))).next((e=>(this._updateTranslateTooltip(i,e),e)));return r.next((()=>this._onDragCancel())),l}),e,s,t),g((()=>n.displaying),(()=>{this._updateMoveManipulationPosition()}),f),n.on("changed",(()=>this._updateMoveManipulationPosition())),g((()=>n.isDraped),(e=>{this._updateMoveManipulationPosition();const t="align-move-manipulation";e?i.add(this.view.elevationProvider.on("elevation-change",(()=>this._updateMoveManipulationPosition())),t):i.remove(t)}),f)])}_createVisualElements(){const{graphic:e,view:t}=this,i=B({view:t,graphic:e,forEachManipulator:e=>{if(!this.destroyed){this._graphicMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(const t of this._manipulatorInfos)e(t.manipulator,Z.TRANSLATE_XY)}},onManipulatorsChanged:e=>this.on("manipulators-changed",e)});l(i)&&(this._outlineVisualElement=i.visualElement instanceof se?i.visualElement:null),l(this._outlineVisualElement)&&this._manipulatorHandles.add(this._outlineVisualElement.events.on("attachment-origin-changed",(()=>{this._graphicState.isDraped||this._updateMoveManipulationPosition()}))),this._manipulatorHandles.add(i)}_createEdgeOffsetManipulator(e,t=L(this.graphic)){const i=W.reshapeManipulators.edgeOffset,a=i.size/2,o=a+i.collisionPadding;if(p(this._edgeOffsetManipulatorGeometryInside)||p(this._edgeOffsetManipulatorGeometryOutside)){const e=a/o,t=e*Math.sqrt(3)/2;this._edgeOffsetManipulatorGeometryInside=pe(t,e/2,e/2,i.height,i.offset),this._edgeOffsetManipulatorGeometryOutside=pe(-t,e/2,e/2,i.height,-i.offset)}const r=[{geometry:this._edgeOffsetManipulatorGeometryInside,material:this._edgeOffsetManipulatorMaterial,stateMask:_e.Unfocused},{geometry:this._edgeOffsetManipulatorGeometryInside,material:this._edgeOffsetManipulatorHoverMaterial,stateMask:_e.Focused},{geometry:this._edgeOffsetManipulatorGeometryOutside,material:this._edgeOffsetManipulatorMaterial,stateMask:_e.Unfocused},{geometry:this._edgeOffsetManipulatorGeometryOutside,material:this._edgeOffsetManipulatorHoverMaterial,stateMask:_e.Focused}],s=new j({view:this.view,renderObjects:r,elevationInfo:"on-the-ground"!==t.mode||P(this.graphic.symbol)?{mode:"absolute-height",offset:0}:t,worldOriented:!1,focusMultiplier:1,radius:o,available:!(!this.graphic.visible||!this.graphic.layer.visible),collisionType:{type:"disc",direction:I(0,0,1)},collisionPriority:1,metadata:{deleting:!1}}),h=new j({view:this.view,renderObjects:[],worldSized:!0,worldOriented:!1,available:!(!this.graphic.visible||!this.graphic.layer.visible),collisionPriority:-10,cursor:this.enableMoveGraphic?"move":"default",metadata:{deleting:!1}}),d={manipulator:s,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:h,elevationInfo:t,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(d,i.minSquaredEdgeLength),this._updateEdgeOffsetManipulator(d);const u=[];for(const n of[d.handle.leftVertex,d.handle.rightVertex]){const e=this._getManipulatorInfoFromHandle(n);l(e)&&u.push(e.manipulator.events.on("location-update",(()=>this._updateEdgeOffsetManipulator(d))))}d.locationUpdateHandle=n(u),this._manipulatorHandles.add(d.locationUpdateHandle,s),this._manipulatorHandles.add([this._watchAndUpdateGrabState(s,!0),this._watchAndUpdateGrabState(h,!0)],s),this._manipulatorHandles.add(ce(s,this._createEdgeOffsetPipeline(d,t)),s),this._manipulatorHandles.add(ce(h,((e,i,a,o)=>{if("touch"===o){this._createEdgeOffsetPipeline(d,t)(e,i,a)}else if(this.enableMoveGraphic){const o=this.graphic,n=l(o.geometry)?o.geometry.spatialReference:null;i.next((e=>this._trackNumDragging(e))).next(me(this.view,e.elevationAlignedLocation)).next(X(this.view,e.elevationAlignedLocation,t,n,o)).next(ge()).next(ue()).next((e=>this._perGraphicManipulatorDragAction(Xe.ALL,e))).next((e=>(this._updateTranslateGraphicTooltip(Q.XY,e),e))).next((e=>{"end"===e.action&&this._tooltip.clear()})),a.next((()=>this._onDragCancel(!e.metadata.deleting)))}})),s);const c=e=>{this._manipulatorInfos.some((e=>e.manipulator.selected))?this._clearSelection():this.emit("immediate-click",{...e,graphic:this.graphic}),e.stopPropagation()};return this._manipulatorHandles.add([s.events.on("immediate-click",c),h.events.on("immediate-click",c),s.events.on("focus-changed",(({action:e})=>{const t=this._tooltipOptions;if("focus"===e&&t.enabled){const e=this._tooltip.info=new xe({tooltipOptions:t});this._updateTooltipAreaOrTotalLength(e)}else this._tooltip.clear()}))],s),this._manipulatorInfos.push(d),this.manipulators.add(s),this.manipulators.add(h),this.emit("manipulators-changed"),d}_autoHideEdgeOffsetManipulator(e,t){const i=e.manipulator,a=e.edgeManipulator,o=()=>{e.visibilityHandle=d(e.visibilityHandle);const o=this._getManipulatorInfoFromHandle(e.handle.leftVertex),r=this._getManipulatorInfoFromHandle(e.handle.rightVertex),s=l(o)&&l(r)&&re(o.manipulator.renderLocation,r.manipulator.renderLocation,this.view.state.camera)<t;(!i.focused&&!a.focused||s)&&(i.grabbable=!s,a.grabbable=!s,e.visibilityHandle=n([i.disableDisplay(),{remove:()=>{i.grabbable=!0,a.grabbable=this.enableMoveGraphic}}]))};this._manipulatorHandles.add([i.events.on("focus-changed",o),a.events.on("focus-changed",o),{remove:()=>{d(e.visibilityHandle),a.metadata.deleting=!0,this.manipulators.remove(a)}}],i),o()}_updateEdgeOffsetManipulator(e){this._updateManipulatorPosition(e);const{coordinateHelper:t}=h(this._editGeometryOperations).data,i=ae(this.view,e.manipulator.elevationAlignedLocation,oe(t,e.handle,h(e.manipulator.elevationInfo))),a=this._getManipulatorInfoFromHandle(e.handle.leftVertex),o=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(p(a)||p(o))return;const n=a.manipulator.renderLocation,r=o.manipulator.renderLocation,s=l(i)?ne(i,n,r):O;e.manipulator.modelTransform=s,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=s;const d=x(b(Ce,n,r))/2;e.edgeManipulator.collisionType={type:"line",paths:[[[-d,0,0],[d,0,0]]]}}_createEdgeOffsetPipeline(e,t){return(i,a,o)=>{this._clearSelection();const{step:n,cleanup:r}=this._initializeEdgeOffset(e,t);a.next((e=>this._trackNumDragging(e))).next(me(this.view,i.elevationAlignedLocation)).next(n).next(F(this.view)).next(z(this.view,h(this._editGeometryOperations).data.spatialReference)).next(ue()).next(this._applyComputeEdgeOffsetDistanceStep()).next(this._applyEdgeOffsetStep(e)).next(this._showEdgeOffsetTooltip()).next((e=>{"end"===e.action&&r()})),o.next((()=>{i.metadata.deleting||(r(),this._onDragCancel())}))}}_initializeEdgeOffset(e,t){const i=h(this._editGeometryOperations),a=oe(i.data.coordinateHelper,e.handle,t),o=i.createUndoGroup(),s=ae(this.view,e.manipulator.elevationAlignedLocation,a);if(a.requiresSplitEdgeLeft){const t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftEdge);l(t)&&this._splitEdgeManipulator(t,1)}if(a.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightEdge);l(t)&&this._splitEdgeManipulator(t,0)}const u=()=>new w({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:i.data.spatialReference}),c=new se({view:this.view,isDraped:this._graphicState.isDraped,geometry:u(),elevationInfo:e.elevationInfo,width:W.visualElements.lineGraphics.outline.width,color:W.colorToVec4(K.main),attached:!0});let m;const _=()=>{this._cleanEdgeOffsetCollapsedEdges(e),m=d(m)},f=this.on("undo",_);return m=n([r(c),g((()=>this._graphicState.isDraped),(e=>c.isDraped=e)),this._graphicState.on("changed",(()=>c.geometry=u())),o,f]),{step:e=>p(a)||p(s)?(_(),null):{...e,operation:a,plane:s},cleanup:_}}_applyEdgeOffsetStep(e){return t=>{if(this.destroyed||p(t.operation))return t;this._updateEventState(ze.RESHAPING);const{mapDeltaX:i,mapDeltaY:a,mapDeltaZ:o}=t;return(i||a||o)&&(this._offsetEdge(e,t),this.emit("reshape",{type:"reshape",mover:this.graphic})),t}}_applyComputeEdgeOffsetDistanceStep(){return e=>{const{operation:t,mapEnd:i}=e;return p(t)||p(i)?e:("start"===e.action&&t.selectArrowFromStartPoint(i),{...e,signedDistance:t.signedDistanceToPoint(i)})}}_showEdgeOffsetTooltip(){return e=>{const{mapEnd:t,signedDistance:i,operation:a}=e,o=this._tooltip,n=this._tooltipOptions;if(!n.enabled||p(i))return o.clear(),e;let r=o.info;(p(r)||"reshape-edge-offset"!==r.type)&&(r=o.info=new xe({tooltipOptions:n}));const{coordinateHelper:s}=h(this._editGeometryOperations).data;return r.distance="end"===e.action?u:ke(this._graphicState.isDraped,i*a.selectedArrow,t,a.plane,s),this._updateTooltipAreaOrTotalLength(r),e}}_cleanEdgeOffsetCollapsedEdges(e){const t=e.handle.leftVertex.leftEdge?.leftVertex,i=e.handle.leftVertex,a=e.handle.rightVertex.rightEdge?.rightVertex,o=e.handle.rightVertex,n=h(this._editGeometryOperations).data.coordinateHelper,r=[];if(t&&n.distance(t.pos,i.pos)<Re){const e=this._getManipulatorInfoFromHandle(i);l(e)&&r.push(e)}if(n.distance(i.pos,o.pos)<Re||a&&n.distance(a.pos,o.pos)<Re){const e=this._getManipulatorInfoFromHandle(o);l(e)&&r.push(e)}r.length&&this._removeVertices(r)}_computeVertexManipulatorSizeAndOutline(e){const t=e.size/2,i=t+e.collisionPadding;return{size:t/i,outlineSize:(t+e.outlineSize)/i}}_createVertexOrEdgeManipulator(e,t=L(this.graphic)){if("edge"===e.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(p(this._vertexManipulatorGeometry)||p(this._vertexManipulatorOutlineGeometry)){const{size:e,outlineSize:t}=this._computeVertexManipulatorSizeAndOutline(W.reshapeManipulators.vertex);this._vertexManipulatorGeometry=he(e,16,16),this._vertexManipulatorOutlineGeometry=he(t,16,16)}if(p(this._edgeManipulatorGeometry)||p(this._edgeManipulatorOutlineGeometry)){const{size:e,outlineSize:t}=this._computeVertexManipulatorSizeAndOutline(W.reshapeManipulators.edge);this._edgeManipulatorGeometry=he(e,16,16),this._edgeManipulatorOutlineGeometry=he(t,16,16)}const i=l(this.graphic.geometry)&&"point"===this.graphic.geometry.type?[]:[{geometry:this._vertexManipulatorGeometry,material:this._vertexManipulatorMaterial,stateMask:Fe.Vertex|_e.Unselected},{geometry:this._vertexManipulatorOutlineGeometry,material:this._vertexManipulatorOutlineMaterial,stateMask:Fe.Vertex|_e.Unfocused|_e.Unselected},{geometry:this._vertexManipulatorOutlineGeometry,material:this._vertexManipulatorHoverOutlineMaterial,stateMask:Fe.Vertex|_e.Focused|_e.Unselected},{geometry:this._vertexManipulatorGeometry,material:this._selectedManipulatorMaterial,stateMask:_e.Selected},{geometry:this._vertexManipulatorOutlineGeometry,material:this._selectedManipulatorOutlineMaterial,stateMask:_e.Selected|_e.Unfocused},{geometry:this._vertexManipulatorOutlineGeometry,material:this._selectedManipulatorHoverOutlineMaterial,stateMask:_e.Selected|_e.Focused}];this.enableMidpoints&&i.push({geometry:this._edgeManipulatorGeometry,material:this._vertexManipulatorMaterial,stateMask:Fe.Edge|_e.Focused|_e.Unselected},{geometry:this._edgeManipulatorOutlineGeometry,material:this._vertexManipulatorHoverOutlineMaterial,stateMask:Fe.Edge|_e.Focused|_e.Unselected},{geometry:this._edgeManipulatorGeometry,material:this._edgeManipulatorMaterial,stateMask:Fe.Edge|_e.Unfocused|_e.Unselected},{geometry:this._edgeManipulatorOutlineGeometry,material:this._edgeManipulatorOutlineMaterial,stateMask:Fe.Edge|_e.Unfocused|_e.Unselected});const a=new j({view:this.view,renderObjects:i,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:!(!this.graphic.visible||!this.graphic.layer.visible),metadata:{deleting:!1}});this._setTypeSpecificManipulatorSettings(a,e,t);const o="edge"===e.type?{manipulator:a,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0}:{manipulator:a,handle:e,type:"vertex",selectedIndex:0};if(this._manipulatorInfos.push(o),this.manipulators.add(a),this._updateManipulatorPosition(o),"edge"===o.type){const e=[];for(const t of[o.handle.leftVertex,o.handle.rightVertex]){const i=this._getManipulatorInfoFromHandle(t);l(i)&&e.push(i.manipulator.events.on("location-update",(()=>this._updateManipulatorPosition(o))))}o.locationUpdateHandle=n(e),this._manipulatorHandles.add(o.locationUpdateHandle,a)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(a,!0),a);const r=ce(a,((e,i,a,n)=>{let r=null;i.next((e=>this._trackNumDragging(e))).next((e=>{if("start"===e.action&&(r=h(this._editGeometryOperations).createUndoGroup()),"edge"===o.type){const t=this._splitEdgeManipulator(o);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:o,snapOrigin:o.handle.pos}})).next(me(this.view,e.elevationAlignedLocation)).next(Y(this.view,this.graphic,e.elevationAlignedLocation,e.location.spatialReference,this.graphic)).next(this._snappingPipeline.createSnapDragEventPipelineStep({predicate:()=>!this._isMultiVertexSelection(),cancel:a,snappingManager:this.tool.snappingManager,snappingContext:new ye({editGeometryOperations:h(this._editGeometryOperations),elevationInfo:t,pointer:n,excludeFeature:this.graphic,visualizer:new R}),updatingHandles:this.updatingHandles}),this._snappingPipeline.next).next(ue()).next((t=>{this._perVertexManipulatorDragAction(t),"end"===t.action&&(r=d(r)),this._updateTranslateVertexTooltip(e,Q.XY,t)})),a.next((()=>this._onDragCancel(!e.metadata.deleting,(()=>r=d(r)))))}));return this._manipulatorHandles.add([r,a.events.on("immediate-click",(e=>this._manipulatorClickCallback(e,o))),a.events.on("select-changed",(()=>{o.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition()})),a.events.on("focus-changed",(({action:e})=>{"focus"===e&&"edge"!==o.type?this._updateTranslateVertexTooltip(a,Q.XY):this._tooltip.clear()}))],a),this.emit("manipulators-changed"),o}_trackNumDragging(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&(this.undo(),this.outputGeometry=l(this._editGeometryOperations)?this._editGeometryOperations.data.geometry:null),l(this.tool.snappingManager)&&this.tool.snappingManager.doneSnapping(),this._tooltip.clear(),this._reshapeEventState){case ze.NONE:break;case ze.MOVING:this.emit("move",{type:"move",dx:0,dy:0,mover:this.graphic});break;case ze.RESHAPING:this.emit("reshape",{type:"reshape",mover:this.graphic})}t&&t(),this.destroyed||this._updateEventState(ze.NONE)}_setTypeSpecificManipulatorSettings(e,t,i){switch(t.type){case"vertex":e.state=Fe.Vertex,e.selectable=!0,e.cursor="move",e.collisionPriority=2,e.radius=W.reshapeManipulators.vertex.size/2+W.reshapeManipulators.vertex.collisionPadding,e.elevationInfo=i,e.interactive=l(this.graphic.geometry)&&"point"!==this.graphic.geometry.type;break;case"edge":e.state=Fe.Edge,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1,e.radius=W.reshapeManipulators.edge.size/2+W.reshapeManipulators.edge.collisionPadding,e.elevationInfo="on-the-ground"!==i.mode||P(this.graphic.symbol)?{mode:"absolute-height",offset:0}:i}}_watchAndUpdateGrabState(e,t){return e.events.on("grab-changed",(i=>this._onGrabStateChanged(e,t,i.action,i.pointerType)))}_onGrabStateChanged(e,t,i,a="mouse"){if("start"===i)t&&this._updateSelection(e),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(ze.NONE),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,("touch"!==a||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach((e=>{e.manipulator.interactive=e.manipulator.grabbing||!this._numGrabbing&&l(this.graphic.geometry)&&"point"!==this.graphic.geometry.type,"edgeManipulator"in e&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)})),this._graphicMoveManipulation.forEachManipulator((e=>{e.interactive=e.grabbing||!this._numGrabbing})))}_clearSelection(){for(const e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1)}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.emit("manipulators-changed"))}_removeManipulator(e){p(e)||(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),t(this._manipulatorInfos,e),this.emit("manipulators-changed"))}_getManipulatorInfoFromHandle(e){if(e)for(const t of this._manipulatorInfos)if(e===t.handle)return t;return null}_updateManipulatorPosition(e){if(p(e))return;const t=h(this._editGeometryOperations);if("vertex"===e.type)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,Ne),e.manipulator.grabbing&&l(this._vertexLaserLineVisualElement)&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.type){const i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),a=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(p(i)||p(a))return;const o=i.manipulator,n=a.manipulator;if(l(e.manipulator.elevationInfo)&&"on-the-ground"===e.manipulator.elevationInfo.mode){const i=o.location,a=n.location,r=.5,s=i.x+r*(a.x-i.x),l=i.y+r*(a.y-i.y),p=i.hasZ&&a.hasZ?0:void 0;e.manipulator.location=D(s,l,p,t.data.spatialReference)}else E(Ce,o.renderLocation,n.renderLocation,.5),e.manipulator.renderLocation=Ce}}_splitEdgeManipulator(e,t=.5){const i=h(this._editGeometryOperations),a=h(i.splitEdge(e.handle,t).createdVertex);e.locationUpdateHandle.remove(),e.locationUpdateHandle=void 0;const o=L(this.graphic);let n;this.enableEdgeOffset?(this._removeManipulator(e),n=this._createVertexOrEdgeManipulator(a)):(n=e,n.handle=a,n.type="vertex",this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,o)),a.leftEdge&&this._createVertexOrEdgeManipulator(a.leftEdge),a.rightEdge&&this._createVertexOrEdgeManipulator(a.rightEdge),this.outputGeometry=i.data.geometry,this._updateManipulatorPosition(n),this.enableEdgeOffset||this._updateTranslateVertexTooltip(n.manipulator,Q.XY),this._updateSelection(e.manipulator);const r=this._updateEventState(ze.RESHAPING),s=i.data.coordinateHelper.vectorToArray(n.handle.pos),l=i.data.components.indexOf(a.component);return this.emit("vertex-add",{type:"vertex-add",vertices:[{coordinates:s,componentIndex:l,vertexIndex:h(a.index)}],added:s}),r&&this._updateEventState(ze.NONE),n}_updateMoveManipulationPosition(){const e=G(Ce,0,0,0);let t=0,i=!1,a=null,o=null;for(const n of this._manipulatorInfos)"vertex"===n.type&&(n.manipulator.selected?(t++,S(e,e,n.manipulator.renderLocation),p(a)||n.selectedIndex>a.selectedIndex?(o=a,a=n):(p(o)||n.selectedIndex>o.selectedIndex)&&(o=n)):i=!0);if(0!==t){const e=this._graphicState.displaying;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&q(this.graphic),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&1!==t}else{const e=this._graphicState.displaying&&this.enableMoveGraphic;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&q(this.graphic)}if(0!==t){let e=0;if(l(a)){const t=a.handle.pos,i=l(o)?o.handle.pos:a.handle.leftEdge&&a.handle.leftEdge.leftVertex?a.handle.leftEdge.leftVertex.pos:null,n=p(o)&&a.handle.rightEdge&&a.handle.rightEdge.rightVertex?a.handle.rightEdge.rightVertex.pos:null;i&&n?this._moveManipulation.xyAxisManipulation.available=!1:i?e=Ue(i,t):n&&(e=Ue(t,n))}this._moveManipulation.angle=e,this._moveManipulation.radius=J}else this._moveManipulation.angle=ee(h(this.graphic.geometry)),this._moveManipulation.radius=$.radiusForSymbol(this.graphic.symbol);0!==t&&i?(V(e,e,1/t),Ne.spatialReference=h(this._editGeometryOperations).data.spatialReference,Ne.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,Ne),this._moveManipulation.elevationAlignedLocation=Ne):l(this._outlineVisualElement)&&!this._graphicState.isDraped&&l(this._outlineVisualElement.attachmentOrigin)?this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin:N(this.view,this._moveManipulation,this.graphic)}_removeVertices(e){const t=[],i=h(this._editGeometryOperations);for(const a of e)if("vertex"===a.type&&i.canRemoveVertex()){t.push(a.handle),this._removeManipulator(a),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.leftEdge)),this._removeManipulator(this._getManipulatorInfoFromHandle(a.handle.rightEdge));const e=h(i.removeVertices([a.handle]).removedVertices[0].createdEdge);e&&this._createVertexOrEdgeManipulator(e)}if(t.length>0){const e=t.map((e=>{const t=i.data.components.indexOf(e.component);return{coordinates:i.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:h(e.index)}}));this.outputGeometry=i.data.geometry;const a=this._updateEventState(ze.RESHAPING);if(this.destroyed)return;if(this.emit("vertex-remove",{type:"vertex-remove",removed:e.map((e=>e.coordinates)),vertices:e}),this.destroyed)return;if(a&&(this._updateEventState(ze.NONE),this.destroyed))return;this._updateMoveManipulationPosition()}}_moveVertices(e,t,i=("start"===t.action?Me.NEW_STEP:Me.ACCUMULATE_STEPS)){const a=h(this._editGeometryOperations);a.moveVertices(e.map((e=>e.handle)),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i),this.outputGeometry=a.data.geometry;for(const o of e)this._updateManipulatorPosition(o)}_offsetEdge(e,t){if(p(t.operation)||p(t.signedDistance))return;const i=h(this._editGeometryOperations),a=t.operation.clone();a.distance=t.signedDistance,i.updateVertices([e.handle.leftVertex,e.handle.rightVertex],a),this.outputGeometry=i.data.geometry,this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.type&&(t.manipulator.selected=!t.manipulator.selected,e.button===de.Right&&this._removeVertices([t])),"edge"===t.type&&e.button===de.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){const i=this._manipulatorInfos.filter((e=>"vertex"===e.type&&e.manipulator.selected));1===i.length?this._updateTranslateVertexTooltip(i[0].manipulator,e,t):this._updateTranslateGraphicTooltip(e,t)}_updateTranslateGraphicTooltip(e,t){const i=this._tooltipOptions;if(!i.enabled)return;const a=this._graphicState.isDraped?"on-the-ground":"absolute-height";switch(e){case Q.XY:this._tooltip.info=new Se({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,((e,t)=>He(e,t,a)));break;case Q.XY_AXIS:this._tooltip.info=new Ge({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,((e,i)=>{const o=He(e,i,a);return c(o,te(t))}));break;case Q.Z:this._tooltip.info=new Ee({tooltipOptions:i}),this._updateTranslateTooltipDistance(this._tooltip.info,t,De)}}_updateTranslateVertexTooltip(e,t,i){const a=this._tooltipOptions;if(!a.enabled)return;let o;const n=this._graphicState.isDraped?"on-the-ground":"absolute-height";switch(t){case Q.XY:o=new Te({tooltipOptions:a}),this._updateTranslateTooltipDistance(o,i,((e,t)=>He(e,t,n))),this._updateTooltipAreaOrTotalLength(o);break;case Q.XY_AXIS:o=new Ie({tooltipOptions:a}),this._updateTranslateTooltipDistance(o,i,((e,t)=>{const a=He(e,t,n);return c(a,te(i))})),this._updateTooltipAreaOrTotalLength(o);break;case Q.Z:o=new Ve({tooltipOptions:a}),this._updateTranslateTooltipDistance(o,i,De)}const r=Le(e.elevationAlignedLocation);l(r)&&(o.elevation={mode:"absolute-height",...r}),this._tooltip.info=o}_updateTranslateTooltipDistance(e,t,i){if(l(t)&&"end"!==t.action){const{mapStart:a,mapEnd:o}=t,n=i(a,o);e.distance=l(n)?n:u}}_updateTooltipAreaOrTotalLength(e){const{geometry:t}=this.graphic;if(p(t))return;const i=this._graphicState.isDraped?"on-the-ground":"absolute-height";e.area="polygon"===t.type?we(t,i):null,e.totalLength="polyline"===t.type?Ae(t,i):null}get test(){return{segmentLabels:this._segmentLabels,tooltip:this._tooltip}}};function Ue(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function ke(e,t,i,a,o){if(e){const e=o.toXYZ(o.pointToVector(i)),n=H(a,e,A.get()),r=Pe(n,e,o.spatialReference);if(l(r))return m(r.value*Math.sign(t),r.unit)}return m(t*v(i.spatialReference),"meters")}e([M()],je.prototype,"_segmentLabels",void 0),e([M({constructOnly:!0})],je.prototype,"tool",void 0),e([M()],je.prototype,"_tooltip",void 0),e([M()],je.prototype,"inputGeometry",null),e([M()],je.prototype,"outputGeometry",void 0),e([M({readOnly:!0})],je.prototype,"updating",null),e([M()],je.prototype,"manipulators",null),e([M()],je.prototype,"view",null),e([M()],je.prototype,"graphic",null),e([M()],je.prototype,"enableZShape",null),e([M()],je.prototype,"enableZVertex",null),e([M()],je.prototype,"enableMoveGraphic",null),e([M()],je.prototype,"enableMidpoints",null),e([M()],je.prototype,"enableEdgeOffset",null),e([M()],je.prototype,"_labelOptions",null),e([M()],je.prototype,"_tooltipOptions",null),je=e([y("esri.views.3d.interactive.editingTools.reshapeGraphic.ReshapeOperation")],je);const Ne=D(0,0,null,null),Ce=T(),Re=1e-6;var Fe,ze,Xe;!function(e){e.Vertex=fe.Custom1,e.Edge=fe.Custom2}(Fe||(Fe={})),function(e){e[e.NONE=0]="NONE",e[e.MOVING=1]="MOVING",e[e.RESHAPING=2]="RESHAPING"}(ze||(ze={})),function(e){e[e.ALL=0]="ALL",e[e.SELECTED_OR_ALL=1]="SELECTED_OR_ALL"}(Xe||(Xe={}));export{je as ReshapeOperation};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import i from"../../../core/Accessor.js";import{ClonableMixin as o}from"../../../core/Clonable.js";import{IdentifiableMixin as s}from"../../../core/Identifiable.js";import{JSONSupportMixin as t}from"../../../core/JSONSupport.js";import{isSome as r,unwrap as a}from"../../../core/maybe.js";import{watch as n,initial as p}from"../../../core/reactiveUtils.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import l from"./FeatureLayerView3D.js";let y=class extends(t(o(s(i)))){constructor(e){super(e),this._originalDefinitionExpression=null,this.associatedLayerView=null,this.objectIds=[],this._loaded=!1}initialize(){this.associatedLayer.load().then((e=>{this.destroyed||(this._originalDefinitionExpression=e.definitionExpression,this.addHandles(n((()=>this._definitionExpression),(e=>this.associatedLayer.definitionExpression=e),p)),this.associatedLayerView=new l({layer:this.associatedLayer,view:this.view}),this._loaded=!0)}))}destroy(){r(this.associatedLayerView)&&(this.associatedLayer.definitionExpression=a(this._originalDefinitionExpression))}get updating(){return!this._loaded||r(this.associatedLayerView)&&this.associatedLayerView.updating}get _definitionExpression(){const e=this.objectIds;return 0===e.length?"1 = 0":`OBJECTID IN (${e.join(",")})`}};e([d()],y.prototype,"updating",null),e([d()],y.prototype,"view",void 0),e([d()],y.prototype,"associatedLayer",void 0),e([d()],y.prototype,"associatedLayerView",void 0),e([d()],y.prototype,"objectIds",void 0),e([d()],y.prototype,"_definitionExpression",null),e([d()],y.prototype,"_loaded",void 0),y=e([c("esri.views.3d.layers.SceneLayerFeatureView3D")],y);export{y as SceneLayerFeatureView3D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Logger.js";import{isNone as i,isSome as s,applySome as o,destroyMaybe as l}from"../../../core/maybe.js";import{initial as n}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{WhereClause as d}from"../../../core/sql/WhereClause.js";import h from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as p}from"../../../layers/support/floorFilterUtils.js";import c from"../../../rest/support/Query.js";import{
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Logger.js";import{isNone as i,isSome as s,applySome as o,destroyMaybe as l}from"../../../core/maybe.js";import{initial as n}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{WhereClause as d}from"../../../core/sql/WhereClause.js";import h from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as p}from"../../../layers/support/floorFilterUtils.js";import c from"../../../rest/support/Query.js";import{sceneLayerEditingEnabled as y}from"../../../support/featureFlags.js";import{I3SMeshView3D as f}from"./I3SMeshView3D.js";import{ForAllFeaturesReturnType as g,ForAllFeaturesVisibilityMode as m}from"./II3SMeshView3D.js";import{LayerView3D as _}from"./LayerView3D.js";import{SceneLayerFeatureView3D as F}from"./SceneLayerFeatureView3D.js";import{createInteractiveEditSession as w,processAttributeEdits as j}from"./i3s/attributeEditing.js";import{createGetFeatureExtent as I}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as S}from"./i3s/I3SMeshViewFilter.js";import{NodeFilterImpact as b}from"./i3s/I3SNode.js";import{I3SQueryEngine as E}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as v}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as x}from"./i3s/I3SQueryFeatureStore.js";import{getIndexCrs as C,objectIdFilter as Q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as V}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as A}from"./support/fieldProperties.js";import{PopupSceneLayerView as L}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as q}from"./support/SceneLayerViewRequiredFields.js";import{updatingProgress as D}from"../support/updatingProperties.js";import R from"../../layers/SceneLayerView.js";import{TaskPriority as U}from"../../support/Scheduler.js";const N=A();let O=class extends(f(V(L(_(R))))){constructor(){super(...arguments),this.type="scene-layer-3d",this.progressiveLoadFactor=1,this._elevationContext="scene",this._isIntegratedMesh=!1,this._supportsLabeling=!0,this._interactiveEditingSessions=new Map,this._queryEngine=null}get i3slayer(){return this.layer}get filter(){return this._get("filter")}set filter(e){this._set("filter",S.checkSupport(e)?e:null)}get viewFilter(){const e=this.filter;if(i(e)&&i(this.layerFilter))return null;const t=this._get("viewFilter");return i(t)?new S({layerFilter:this.layerFilter,viewFilter:e,layerFieldsIndex:this.layer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),applyFilters:()=>this._applyFilters(!0),addSqlFilter:(e,t)=>this.addSqlFilter(e,t,this.logError)}):(t.viewFilter=this.filter,t.layerFilter=this.layerFilter,this.notifyChange("viewFilter"),t)}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get _floorFilterClause(){const e=p(this);return s(e)?d.create(e,this.layer.fieldsIndex):null}get _excludeObjectIdsSorted(){let e=this.layer.excludeObjectIds.toArray();return s(this.featureView)&&(e=e.concat(this.featureView.objectIds)),e.length?e.sort(((e,t)=>e-t)):null}get _objectQualitySettings(){return this.view?.qualitySettings?.sceneService?.object}get lodFactor(){return this._objectQualitySettings?.lodFactor??1}get lodCrossfadeinDuration(){return this._objectQualitySettings.lodCrossfadeinDuration??0}get lodCrossfadeoutDuration(){return this._objectQualitySettings.lodCrossfadeoutDuration??0}get lodCrossfadeUncoveredDuration(){return this._objectQualitySettings.lodCrossfadeUncoveredDuration??0}get updatingProgressValue(){return this._controller?.updatingProgress??0}initialize(){this._fieldsHelper=new q({layerView:this}),this.updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),n),this.updatingHandles.add((()=>this.layer.renderer),(e=>this.updatingHandles.addPromise(this._rendererChange(e))),n),this.updatingHandles.add((()=>[this.parsedDefinitionExpression,this.filter,this.layer.filter,this._floorFilterClause,this._excludeObjectIdsSorted,o(this.viewFilter,(e=>[e.parsedWhereClause,e.parsedGeometry,e.sortedObjectIds]))]),(()=>this._filterChange())),this.updatingHandles.add((()=>[this.filter,o(this.viewFilter,(e=>e.parsedGeometry))]),(()=>this._geometryFilterChange())),this.handles.add(this.layer.on("apply-edits",(e=>this.updatingHandles.addPromise(e.result)))),this.handles.add(this.layer.on("edits",(e=>this._handleEdits(e))));const e=this.layer.associatedLayer;y()&&s(e)&&s(e.infoFor3D)&&(this.featureView=new F({associatedLayer:e,view:this.view}))}destroy(){this._fieldsHelper=l(this._fieldsHelper),this.featureView=l(this.featureView)}_rangeInfosChanged(e){null!=e&&e.length>0&&r.getLogger(this.declaredClass).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return s(this.filter)?this.filter.createQuery(e):new c(e)}queryExtent(e,t){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),t?.signal)}queryFeatures(e,t){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),t?.signal).then((e=>{if(!e?.features)return e;const t=this.layer;for(const r of e.features)r.layer=t,r.sourceLayer=t;return e}))}queryObjectIds(e,t){return this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),t?.signal)}_ensureQueryEngine(){return this._queryEngine||(this._queryEngine=this._createQueryEngine()),this._queryEngine}_createQueryEngine(){const e=I(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new E({layerView:this,priority:U.FEATURE_QUERY_ENGINE,spatialIndex:new x({featureAdapter:new v({objectIdField:this.layer.objectIdField,attributeStorageInfo:this.layer.attributeStorageInfo,getFeatureExtent:e}),toArray:()=>{const e=new Array;return this._forAllFeatures(((t,r,i)=>(e.push({id:t,index:r,meta:i}),g.CONTINUE)),null,m.ALL_IN_CLIPPING_AREA),e},forAllFeatures:(e,t)=>this._forAllFeatures(((t,r,i)=>e({id:t,index:r,meta:i})),t,m.ALL_IN_CLIPPING_AREA),getFeatureExtent:e,sourceSpatialReference:C(this.layer),viewSpatialReference:this.view.spatialReference})})}highlight(e){const t=this._highlights;if(e instanceof c){const{set:r,handle:i}=t.acquireSet();return this.queryObjectIds(e).then((e=>t.setFeatureIds(r,e))),i}return super.highlight(e)}createInteractiveEditSession(e){return w(this._attributeEditingContext,e)}_createLayerGraphic(e){const r=new t(null,null,e);return r.layer=this.layer,r.sourceLayer=this.layer,r}canResume(){return super.canResume()&&(!this._controller||this._controller.rootNodeVisible)}getFilters(){const e=super.getFilters(),t=this._excludeObjectIdsSorted;return s(t)&&e.push((e=>Q(t,!1,e))),this._floorFilterClause&&this.addSqlFilter(e,this._floorFilterClause,this.logError),this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),s(this.viewFilter)&&this.viewFilter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}isUpdating(){return super.isUpdating()||this.layerFilterUpdating||s(this.featureView)&&this.featureView.updating}_ensureQuery(e){return this._addDefinitionExpressionToQuery(i(e)?this.createQuery():c.from(e))}get _attributeEditingContext(){return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:this._getObjectIdField(),forEachNode:e=>this._forAllNodes((t=>s(t)?e(t.node,t.featureIds):null)),attributeStorageInfo:this.i3slayer.attributeStorageInfo,attributeOverrides:this.attributeOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(e,t)=>this.setAttributeData(e,t),clearMemCache:()=>this.clearMemCache()}}_handleEdits(e){j(this._attributeEditingContext,e)}get hasGeometryFilter(){const e=this.viewFilter;return s(e)&&s(e.parsedGeometry)}computeNodeFiltering(e){const t=this.viewFilter;return i(t)||t.isMBSGeometryVisible(e,this.view.spatialReference,this._controller.crsIndex)?b.Unmodified:b.Culled}};e([a()],O.prototype,"i3slayer",null),e([a(D)],O.prototype,"updatingProgress",void 0),e([a({type:h})],O.prototype,"filter",null),e([a({readOnly:!0})],O.prototype,"viewFilter",null),e([a(N.requiredFields)],O.prototype,"requiredFields",null),e([a(N.availableFields)],O.prototype,"availableFields",void 0),e([a()],O.prototype,"_fieldsHelper",void 0),e([a()],O.prototype,"featureView",void 0),e([a()],O.prototype,"_floorFilterClause",null),e([a()],O.prototype,"_excludeObjectIdsSorted",null),e([a()],O.prototype,"_objectQualitySettings",null),e([a()],O.prototype,"lodFactor",null),e([a()],O.prototype,"updatingProgressValue",null),O=e([u("esri.views.3d.layers.SceneLayerView3D")],O);const P=O;export{P 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.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as o}from"../../../chunks/tslib.es6.js";import{zeroMeters as
|
|
5
|
+
import{_ as o}from"../../../chunks/tslib.es6.js";import{zeroMeters as t}from"../../../core/quantityUtils.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{SketchTooltipInfo as s}from"./SketchTooltipInfo.js";let p=class extends s{constructor(o){super(o),this.type="reshape-edge-offset",this.distance=t,this.area=null,this.totalLength=null}};o([e()],p.prototype,"type",void 0),o([e()],p.prototype,"distance",void 0),o([e()],p.prototype,"area",void 0),o([e()],p.prototype,"totalLength",void 0),p=o([r("esri.views.interactive.tooltip.ReshapeEdgeOffsetTooltipInfo")],p);export{p as ReshapeEdgeOffsetTooltipInfo};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import{isSome as e}from"../../../../core/maybe.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{CONTENT as o}from"../css.js";import{TooltipContent as r}from"./TooltipContent.js";import{TooltipField as i}from"../support/TooltipField.js";import"../../../../widgets/support/widgetUtils.js";import{tsx as a}from"../../../../widgets/support/jsxFactory.js";const p={base:`${o} ${`${o}--reshape-edge-offset`}`};let c=class extends r{render(){const{area:t,distance:s,totalLength:o,tooltipOptions:r}=this.info,{visibleElements:c}=r,l=this._messagesTooltip.sketch;return a("div",{class:p.base},c.distance&&a(i,{title:l.distance,value:this._formatRelativeLength(s)}),c.area&&e(t)&&a(i,{title:l.area,value:this._formatArea(t)}),c.totalLength&&e(o)&&a(i,{title:l.totalLength,value:this._formatLength(o)}))}};c=t([s("esri.views.interactive.tooltip.content.TooltipContentReshapeEdgeOffset")],c);export{c as TooltipContentReshapeEdgeOffset};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.25/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Accessor.js";import{ClonableMixin as o}from"../../../core/Clonable.js";import l from"../../../core/Collection.js";import{HandleOwnerMixin as s}from"../../../core/HandleOwner.js";import{IdentifiableMixin as a}from"../../../core/Identifiable.js";import{ignoreAbortErrors as i}from"../../../core/promiseUtils.js";import{watch as n,initial as u}from"../../../core/reactiveUtils.js";import{throttle as d}from"../../../core/throttle.js";import{property as y}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import p from"../../../rest/support/RelationshipQuery.js";import{getFixedFieldName as c,findRelatedLayer as C}from"../support/featureUtils.js";const _=100;let g=class extends(o(a(s(r)))){constructor(e){super(e),this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featuresPerPage=10,this.description=null,this.graphic=null,this.layer=null,this.map=null,this.orderByFields=null,this.featureCount=0,this.relationshipId=null,this.showAllEnabled=!1,this.title=null,this._cancelQuery=()=>{const{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{const{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._cancelQueryPage=()=>{const{_queryPageAbortController:e}=this;e&&e.abort(),this._queryPageAbortController=null},this._queryController=async()=>{this._cancelQuery();const e=new AbortController;this._queryAbortController=e,await i(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._cancelQueryFeatureCount();const e=new AbortController;this._queryFeatureCountAbortController=e,await i(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null)},this._queryPageController=async()=>{const e=new AbortController;this._queryPageAbortController=e,await i(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryThrottled=d(this._queryController,_,this),this._queryFeatureCountThrottled=d(this._queryFeatureCountController,_,this),this._queryPageThrottled=d(this._queryPageController,_,this),this._query=async()=>{const{_queryAbortController:e,relatedFeatures:t}=this;this._destroyRelatedFeatureViewModels(),this.featurePage=1,t.removeAll(),t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:e?.signal})))},this.handles.add([n((()=>[this.displayCount,this.graphic,this.layer,this.map,this.orderByFieldsFixedCasing,this.relationshipId,this.featuresPerPage,this.showAllEnabled]),(()=>this._queryThrottled()),u),n((()=>[this.featurePage,this.showAllEnabled]),(()=>this._queryPageThrottled())),n((()=>[this.layer,this.relationshipId,this.objectId]),(()=>this._queryFeatureCountThrottled()))])}destroy(){this._destroyRelatedFeatureViewModels(),this.relatedFeatures.removeAll(),this._cancelQuery(),this._cancelQueryFeatureCount(),this._cancelQueryPage()}set featurePage(e){const{featuresPerPage:t,featureCount:r}=this,o=1,l=Math.ceil(r/t)||1;this._set("featurePage",Math.min(Math.max(e,o),l))}get featurePage(){return this._get("featurePage")}get orderByFieldsFixedCasing(){const{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map((e=>{const r=e.clone(),o=c(e.field,t);return r.field=o,r})):e}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing?.[0]?.field||null}set displayCount(e){const t=0,r=10;this._set("displayCount",Math.min(Math.max(e,t),r))}get displayCount(){return this._get("displayCount")}get objectId(){return this.graphic?.attributes?.[this.objectIdField]??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedFeatures(){return this._get("relatedFeatures")||new l}get relatedLayer(){const{layer:e,map:t,relationship:r}=this;return e?.loaded?C(t,e,r):null}get relationship(){return
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import r from"../../../core/Accessor.js";import{ClonableMixin as o}from"../../../core/Clonable.js";import l from"../../../core/Collection.js";import{HandleOwnerMixin as s}from"../../../core/HandleOwner.js";import{IdentifiableMixin as a}from"../../../core/Identifiable.js";import{ignoreAbortErrors as i}from"../../../core/promiseUtils.js";import{watch as n,initial as u}from"../../../core/reactiveUtils.js";import{throttle as d}from"../../../core/throttle.js";import{property as y}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import p from"../../../rest/support/RelationshipQuery.js";import{getFixedFieldName as c,findRelatedLayer as C}from"../support/featureUtils.js";const _=100;let g=class extends(o(a(s(r)))){constructor(e){super(e),this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featuresPerPage=10,this.description=null,this.graphic=null,this.layer=null,this.map=null,this.orderByFields=null,this.featureCount=0,this.relationshipId=null,this.showAllEnabled=!1,this.title=null,this._cancelQuery=()=>{const{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{const{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._cancelQueryPage=()=>{const{_queryPageAbortController:e}=this;e&&e.abort(),this._queryPageAbortController=null},this._queryController=async()=>{this._cancelQuery();const e=new AbortController;this._queryAbortController=e,await i(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._cancelQueryFeatureCount();const e=new AbortController;this._queryFeatureCountAbortController=e,await i(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null)},this._queryPageController=async()=>{const e=new AbortController;this._queryPageAbortController=e,await i(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryThrottled=d(this._queryController,_,this),this._queryFeatureCountThrottled=d(this._queryFeatureCountController,_,this),this._queryPageThrottled=d(this._queryPageController,_,this),this._query=async()=>{const{_queryAbortController:e,relatedFeatures:t}=this;this._destroyRelatedFeatureViewModels(),this.featurePage=1,t.removeAll(),t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:e?.signal})))},this.handles.add([n((()=>[this.displayCount,this.graphic,this.layer,this.map,this.orderByFieldsFixedCasing,this.relationshipId,this.featuresPerPage,this.showAllEnabled]),(()=>this._queryThrottled()),u),n((()=>[this.featurePage,this.showAllEnabled]),(()=>this._queryPageThrottled())),n((()=>[this.layer,this.relationshipId,this.objectId]),(()=>this._queryFeatureCountThrottled()))])}destroy(){this._destroyRelatedFeatureViewModels(),this.relatedFeatures.removeAll(),this._cancelQuery(),this._cancelQueryFeatureCount(),this._cancelQueryPage()}set featurePage(e){const{featuresPerPage:t,featureCount:r}=this,o=1,l=Math.ceil(r/t)||1;this._set("featurePage",Math.min(Math.max(e,o),l))}get featurePage(){return this._get("featurePage")}get orderByFieldsFixedCasing(){const{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map((e=>{const r=e.clone(),o=c(e.field,t);return r.field=o,r})):e}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing?.[0]?.field||null}set displayCount(e){const t=0,r=10;this._set("displayCount",Math.min(Math.max(e,t),r))}get displayCount(){return this._get("displayCount")}get objectId(){return this.graphic?.attributes?.[this.objectIdField]??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedFeatures(){return this._get("relatedFeatures")||new l}get relatedLayer(){const{layer:e,map:t,relationship:r}=this;return e?.loaded?C(t,e,r):null}get relationship(){const{relationshipId:e,layer:t}=this;return"number"==typeof e?t?.relationships?.find((({id:t})=>t===e))??null:null}get relatedFeatureViewModels(){return this._get("relatedFeatureViewModels")||new l}get state(){const{_queryAbortController:e,_queryFeatureCountAbortController:t,_queryPageAbortController:r,graphic:o,relatedLayer:l}=this;return t?"loading":e||r?"querying":o&&l?"ready":"disabled"}_destroyRelatedFeatureViewModels(){this.relatedFeatureViewModels?.forEach((e=>!e.destroyed&&e.destroy())),this.relatedFeatureViewModels.removeAll()}async _queryFeatureCount(){const{layer:e,relationshipId:t,objectId:r,_queryFeatureCountAbortController:o}=this;if(await(e?.load()),"number"!=typeof r||!e?.capabilities?.queryRelated?.supportsCount)return void this._set("featureCount",0);const l=e.capabilities?.queryRelated?.supportsCacheHint??!1,s=new p({cacheHint:l,relationshipId:t,returnGeometry:!1,objectIds:[r]}),a=await e.queryRelatedFeaturesCount(s,{signal:o?.signal});this._set("featureCount",a[r]||0)}_sliceFeatures(e){const{showAllEnabled:t,displayCount:r}=this;return t?e:r?e.slice(0,r):[]}async _queryPage(){const{relatedFeatures:e,featurePage:t,showAllEnabled:r,_queryPageAbortController:o}=this;!r||t<2||e.addMany(await this._queryRelatedFeatures({signal:o?.signal}))}async _queryRelatedFeatures(e){const{orderByFieldsFixedCasing:t,showAllEnabled:r,featuresPerPage:o,displayCount:l,layer:s,relationshipId:a,featurePage:i,featureCount:n,relatedLayer:u,objectIdField:d}=this;await(s?.load());const{relationship:y,objectId:h}=this;if(!y||"number"!=typeof h||!s?.capabilities?.queryRelated?.supportsPagination)return[];const c=r?((i-1)*o+n)%n:0,C=r?o:l;if(!u)return[];await u.load();const _=[...t?.map((e=>e.field)),d],g=t?.map((e=>`${e.field} ${e.order}`)),b=s.capabilities?.queryRelated?.supportsCacheHint||!1,F=new p({orderByFields:g,start:c,num:C,outFields:_,cacheHint:b,relationshipId:a,returnGeometry:!1,objectIds:[h]}),m=(await s.queryRelatedFeatures(F,{signal:e?.signal}))[h]?.features||[];return m.forEach((e=>e.sourceLayer=u)),m}};e([y()],g.prototype,"_queryAbortController",void 0),e([y()],g.prototype,"_queryPageAbortController",void 0),e([y()],g.prototype,"_queryFeatureCountAbortController",void 0),e([y({value:1})],g.prototype,"featurePage",null),e([y()],g.prototype,"featuresPerPage",void 0),e([y({readOnly:!0})],g.prototype,"orderByFieldsFixedCasing",null),e([y()],g.prototype,"description",void 0),e([y({readOnly:!0})],g.prototype,"itemDescriptionFieldName",null),e([y({value:3})],g.prototype,"displayCount",null),e([y({type:t})],g.prototype,"graphic",void 0),e([y()],g.prototype,"layer",void 0),e([y()],g.prototype,"map",void 0),e([y({readOnly:!0})],g.prototype,"objectId",null),e([y({readOnly:!0})],g.prototype,"objectIdField",null),e([y()],g.prototype,"orderByFields",void 0),e([y({readOnly:!0})],g.prototype,"relatedFeatures",null),e([y({readOnly:!0})],g.prototype,"relatedLayer",null),e([y({readOnly:!0})],g.prototype,"relationship",null),e([y({readOnly:!0})],g.prototype,"featureCount",void 0),e([y({readOnly:!0})],g.prototype,"relatedFeatureViewModels",null),e([y()],g.prototype,"relationshipId",void 0),e([y()],g.prototype,"showAllEnabled",void 0),e([y({readOnly:!0})],g.prototype,"state",null),e([y()],g.prototype,"title",void 0),g=e([h("esri.widgets.Feature.FeatureRelationship.FeatureRelationshipViewModel")],g);const b=g;export{b as default};
|