@arcgis/core 4.30.0-next.20240521 → 4.30.0-next.20240522

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/WebMap.js +1 -1
  2. package/assets/components/assets/icon/developerCredentials16.json +1 -0
  3. package/assets/components/assets/icon/developerCredentials24.json +1 -0
  4. package/assets/components/assets/icon/developerCredentials32.json +1 -0
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/01927419855947110cc1.js.LICENSE.txt +1 -1
  7. package/assets/esri/core/workers/chunks/158c05b16372d8ed33ea.js.LICENSE.txt +1 -1
  8. package/assets/esri/core/workers/chunks/190913c221964292333b.js.LICENSE.txt +1 -1
  9. package/assets/esri/core/workers/chunks/4268373bf374b2a6252a.js.LICENSE.txt +1 -1
  10. package/assets/esri/core/workers/chunks/59b193d42e8abf9d4088.js.LICENSE.txt +1 -1
  11. package/assets/esri/core/workers/chunks/{eac4ec8c410eaf9e621c.js → 606f8b907166190a8b65.js} +2 -2
  12. package/assets/esri/core/workers/chunks/{eac4ec8c410eaf9e621c.js.LICENSE.txt → 606f8b907166190a8b65.js.LICENSE.txt} +1 -1
  13. package/assets/esri/core/workers/chunks/{3716015ccf0888c0a21d.js → 724f221680849db03104.js} +1 -1
  14. package/assets/esri/core/workers/chunks/88c7d84a1fde246ca71f.js +1 -0
  15. package/assets/esri/core/workers/chunks/9b04a666726b5d2ff3c5.js.LICENSE.txt +1 -1
  16. package/assets/esri/core/workers/chunks/9c75837b7e75f0f38dc0.js.LICENSE.txt +1 -1
  17. package/assets/esri/core/workers/chunks/{bd0545bb100b3393fd85.js → bbec62f8792520993909.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{4f3a87586e334c52d0bf.js → caffbaa8b0a67d117f34.js} +1 -1
  19. package/assets/esri/core/workers/chunks/dde183c6bb1710ff16df.js.LICENSE.txt +1 -1
  20. package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
  21. package/assets/esri/themes/dark/main.css +1 -1
  22. package/assets/esri/themes/light/main.css +1 -1
  23. package/assets/esri/themes/light/view.css +1 -1
  24. package/chunks/LineSeries.js +1 -1
  25. package/chunks/Theme.js +1 -1
  26. package/chunks/Tooltip.js +1 -1
  27. package/chunks/chartUtilsAm5.js +1 -1
  28. package/interfaces.d.ts +12 -4
  29. package/layers/ImageryTileLayer.js +1 -1
  30. package/layers/support/editableLayers.js +1 -1
  31. package/package.json +2 -2
  32. package/portal/PortalItem.js +1 -1
  33. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  34. package/support/revision.js +1 -1
  35. package/views/2d/GoToManager.js +1 -1
  36. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  37. package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
  38. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  39. package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils.js +1 -1
  40. package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
  41. package/views/3d/interactive/editingTools/transform/ScaleRotateMeshAdapter.js +1 -1
  42. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  43. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
  44. package/views/3d/interactive/editingTools/undoRecords.js +5 -0
  45. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  46. package/views/layers/ImageryTileLayerView.js +1 -1
  47. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  48. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  49. package/widgets/LayerList/ListItemPanel.js +1 -1
  50. package/widgets/LayerList/support/layerListUtils.js +1 -1
  51. package/widgets/Sketch/SketchViewModel.js +1 -1
  52. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  53. package/assets/esri/core/workers/chunks/0753c636c2801f067235.js +0 -1
  54. package/views/3d/interactive/editingTools/transform/undoRecords.js +0 -5
package/WebMap.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"./chunks/tslib.es6.js";import{version as t}from"./kernel.js";import r from"./Map.js";import i from"./Viewpoint.js";import{isSome as o}from"./core/arrayUtils.js";import s from"./core/Collection.js";import n from"./core/Error.js";import a from"./core/Loadable.js";import{loadAll as p}from"./core/loadAll.js";import l from"./core/Logger.js";import{destroyMaybe as u}from"./core/maybe.js";import{MultiOriginJSONMixin as m}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as h}from"./core/Promise.js";import{debounce as c}from"./core/promiseUtils.js";import{whenOnce as d}from"./core/reactiveUtils.js";import{addQueryParameter as g,isDataProtocol as f,dataComponents as w}from"./core/urlUtils.js";import{property as y}from"./core/accessorSupport/decorators/property.js";import"./core/has.js";import{reader as b}from"./core/accessorSupport/decorators/reader.js";import{subclass as A}from"./core/accessorSupport/decorators/subclass.js";import{writer as S}from"./core/accessorSupport/decorators/writer.js";import{readLoadable as v}from"./core/accessorSupport/read.js";import _ from"./geometry/SpatialReference.js";import j from"./networks/UtilityNetwork.js";import V from"./portal/PortalItem.js";import{typeKeyword as I}from"./portal/support/portalItemUtils.js";import U from"./support/MapFloorInfo.js";import P from"./webdoc/GeotriggersInfo.js";import{SaveOperationType as O}from"./webdoc/interfaces.js";import k from"./webdoc/RangeInfo.js";import L from"./webdoc/Widgets.js";import{getOptimalThumbnailSize as F}from"./webdoc/support/thumbnailUtils.js";import{loadFromSource as N}from"./webdoc/support/webdocLoadUtils.js";import{getLayerJSON as R}from"./webdoc/support/writeUtils.js";import T from"./webmap/ApplicationProperties.js";import E from"./webmap/Bookmark.js";import B from"./webmap/InitialViewProperties.js";import{Version as J}from"./webmap/Version.js";import x from"./webmap/background/ColorBackground.js";const M=new J(2,30),Z="Web Map",W="webmap",$="web-map",C=s.ofType(E),G=s.ofType(j),z=new Map([["image/jpeg","jpeg"],["image/jpg","jpg"],["image/png","png"],["image/gif","gif"]]),D="ArcGIS Pro",q=I.JSAPI,H={currentVersion:M,createInitialViewProperties:()=>new B,parseVersion:J.parse,itemType:Z,name:W,origin:$};let K=class extends(m(a.LoadableMixin(h(r)))){constructor(e){super(e),this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1,this._thumbnailFilename=null,this._updateFromPromise=null,this.resourceReferences={portalItem:null,paths:[]},this.applicationProperties=null,this.bookmarks=new C,this.floorInfo=null,this.geotriggersInfo=null,this.initialViewProperties=new B,this.ipsInfo=null,this.portalItem=null,this.presentation=null,this.sourceVersion=null,this.widgets=null,this.utilityNetworks=null,this._debouncedSaveOperations=c((async(e,t,r)=>{const{save:i,saveAs:o}=await import("./webdoc/support/webdocSaveUtils.js");switch(e){case O.SAVE:return i(H,this,t);case O.SAVE_AS:return o(H,this,r,t)}})),this.authoringApp=this.authoringAppVersion=null,this._isAuthoringAppSetByUser=this._isAuthoringAppVersionSetByUser=!1}destroy(){if(this.portalItem=u(this.portalItem),this.utilityNetworks){const e=this.utilityNetworks.removeAll();for(const t of e)t.destroy();this.utilityNetworks.destroy()}}initialize(){if(this.when().catch((e=>{l.getLogger(this).error("#load()","Failed to load web map",e)})),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t)}}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp=q}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,r){e&&this._isAuthoringAppVersionSetByUser?r.authoringAppVersion=e:r.authoringAppVersion=t}readInitialViewProperties(e,t){const r=new B;t.background&&(r.background=x.fromJSON(t.background));const o=t.initialState?.viewpoint;if(o){if(o.rotation){J.parse(t.version||"","webmap").lessThan(2,20)&&t.authoringApp===D&&(o.rotation*=-1)}r.viewpoint=i.fromJSON(o)}return t.mapRangeInfo&&(r.rangeInfo=k.fromJSON(t.mapRangeInfo)),t.spatialReference&&(r.spatialReference=_.fromJSON(t.spatialReference)),t.timeZone&&(r.timeZone=t.timeZone),r}writeInitialViewProperties(e,t,r,i){e&&(e.background?.color&&(t.background=e.background.write({},i)),e.viewpoint&&(t.initialState={viewpoint:e.viewpoint.write({},i)}),e.rangeInfo&&(t.mapRangeInfo=e.rangeInfo.toJSON(i)),e.spatialReference&&(t.spatialReference=e.spatialReference.write({},i)),t.timeZone=e.timeZone)}writeLayers(e,t,r,i){t[r]=this._writeLayers(e,i,"operational-layers")}readSourceVersion(e,t){const[r,i]=t.version.split(".");return new J(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${M.major}.${M.minor}`}writeTables(e,t,r,i){const o=this._writeLayers(e,i,"tables");o.length&&(t[r]=o)}get thumbnailUrl(){return this.portalItem?.thumbnailUrl||null}set thumbnailUrl(e){e?(this._override("thumbnailUrl",e),this._thumbnailFilename=this._generateCustomThumbnailFilename(e)):this._clearThumbnailOverride()}get updatingFromView(){return!!this._updateFromPromise}load(e){return this.addResolvingPromise(N(H,this)),Promise.resolve(this)}loadAll(){return p(this,(e=>{e(this.ground,this.basemap,this.layers,this.tables)}))}read(e,t){t={...t,origin:$};const r=this._getAuthoringPropsState();v(this,e,(t=>super.read(e,t)),t),this._restoreAuthoringPropsFromState(r)}write(e,t){if("loaded"!==this.loadStatus){const e=new n("webmap:not-loaded","Web map must be loaded before it can be serialized");throw l.getLogger(this).error("#toJSON()","Web map must be loaded before it can be serialized",this.loadError||this.loadStatus),e}return this._removeDanglingLayerRefs(),t={...t,origin:$,restrictedWebMapWriting:!0,webmap:this},super.write(e,t)}async save(e){return this._debouncedSaveOperations(O.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(O.SAVE_AS,t,e)}async updateFrom(e,t){const r=this._updateFromInternal(e,t);this._updateFromPromise=r,await r;r===this._updateFromPromise&&(this._updateFromPromise=null)}getLayerJSONFromResourceInfo(e){const t=this.resourceInfo;return this._collectAllLayersJSON([...t?.baseMap?.baseMapLayers||[],...t?.operationalLayers||[],...this.basemap?.resourceInfo?.data?.baseMapLayers||[]]).find((t=>t.id===e.id))}async updateItemThumbnail(){this.thumbnailUrl&&this._isOverridden("thumbnailUrl")&&(await(this.portalItem?.updateThumbnail({thumbnail:this.thumbnailUrl,filename:this._thumbnailFilename})),this._clearThumbnailOverride())}getThumbnailState(){let e=this.thumbnailUrl;return e&&(e=this._isOverridden("thumbnailUrl")?e:g(e,"w","8192")),{thumbnailUrl:e,filename:this._thumbnailFilename}}restoreThumbnailFromState(e){this.thumbnailUrl=e.thumbnailUrl,this._thumbnailFilename=e.filename}_collectAllLayersJSON(e){return e.reduce(((e,t)=>(e.push(t),"GroupLayer"===t.layerType&&(e=e.concat(this._collectAllLayersJSON(t.layers||[]))),e)),[])}_writeLayers(e,t,r){t={...t,layerContainerType:r};return e.map((e=>R(e,"tables"===r?null:this.getLayerJSONFromResourceInfo(e),t))).filter(o).toArray()}_validateJSON(e){const t=J.parse(e.version||"","webmap");return M.validate(t),e.version=`${t.major}.${t.minor}`,e}_removeDanglingLayerRefs(){const e=this.applicationProperties,t=e?.viewing?.search,r=e=>this.allLayers.some((t=>t.id===e));if(t?.layers&&(t.layers=t.layers.filter((e=>r(e.id)))),t?.tables&&(t.tables=t.tables.filter((e=>this.tables.some((t=>t.id===e.id))))),e){const t=e.editing?.locationTracking;t?.info&&!r(t.info.layerId)&&(e.editing=null)}const i=this.presentation?.slides;i&&i.forEach((e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter((e=>r(e.id))))}))}async _updateFromInternal(e,t){if(t??={},await d((()=>e.ready)),this._updateInitialViewProperties(e,t),e.map===this)for(const r of e.allLayerViews)"visible"in r&&"visible"in r.layer&&r._isOverridden("visible")&&(r.layer.visible=r.visible),"featureEffect"in r&&"featureEffect"in r.layer&&r._isOverridden("featureEffect")&&(r.layer.featureEffect=r.featureEffect);await this._updateThumbnailUrl(e,t)}_updateInitialViewProperties(e,t){if(t.backgroundExcluded||(this.initialViewProperties.background=e.background?.clone()),this.initialViewProperties.spatialReference=e.spatialReference?.clone(),this.initialViewProperties.timeZone=e.timeZone,t.viewpointExcluded||(this.initialViewProperties.viewpoint=new i({rotation:e.rotation,scale:t.scalePreserved?e.scale:null,targetGeometry:this._getViewExtent(e)})),!t.widgetsExcluded)for(const r of e.persistableViewModels)r.updateWebDocument(this)}_getViewExtent(e){const t=e.center.clone().normalize(),r=e.extent.clone(),i=r.width/2;return r.xmin=t.x-i,r.xmax=t.x+i,r}async _updateThumbnailUrl(e,t){if(t.thumbnailExcluded)return;const r=F(e,t.thumbnailSize),i=await e.takeScreenshot({format:"png",width:r.width,height:r.height});this._setAutoGeneratedThumbnail(i.dataUrl)}_setAutoGeneratedThumbnail(e){this.thumbnailUrl=e,this._thumbnailFilename=null}_clearThumbnailOverride(){this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"),this._thumbnailFilename=null}_generateCustomThumbnailFilename(e){if(f(e)){const t=w(e),r=t?.mediaType,i=r&&z.get(r.toLowerCase())||null,o=`thumbnail${Date.now()}`;return i?`${o}.${i}`:o}return null}_getAuthoringPropsState(){return{authoringApp:this.authoringApp,authoringAppVersion:this.authoringAppVersion,isAuthoringAppSetByUser:this._isAuthoringAppSetByUser,isAuthoringAppVersionSetByUser:this._isAuthoringAppVersionSetByUser}}_restoreAuthoringPropsFromState(e){e.isAuthoringAppSetByUser?this.authoringApp=e.authoringApp:this._isAuthoringAppSetByUser=!1,e.isAuthoringAppVersionSetByUser?this.authoringAppVersion=e.authoringAppVersion:this._isAuthoringAppVersionSetByUser=!1}static fromJSON(e){const t=e;if(!t)throw new n("webmap:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:t})}};K.VERSION=M,e([y()],K.prototype,"_updateFromPromise",void 0),e([y({type:T,json:{write:!0}})],K.prototype,"applicationProperties",void 0),e([y({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],K.prototype,"authoringApp",null),e([S("authoringApp")],K.prototype,"writeAuthoringApp",null),e([y({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],K.prototype,"authoringAppVersion",null),e([S("authoringAppVersion")],K.prototype,"writeAuthoringAppVersion",null),e([y({type:C,json:{write:{overridePolicy:e=>({enabled:!!(e&&e.length>0),ignoreOrigin:!0})}}})],K.prototype,"bookmarks",void 0),e([y({type:U,json:{name:"mapFloorInfo",write:!0}})],K.prototype,"floorInfo",void 0),e([y({type:P,json:{write:!0}})],K.prototype,"geotriggersInfo",void 0),e([y({type:B,nonNullable:!0,json:{read:{source:["background","initialState.viewpoint","mapRangeInfo","spatialReference","timeZone"]},write:{ignoreOrigin:!0,target:{background:{type:x},"initialState.viewpoint":{type:i},mapRangeInfo:{type:k},spatialReference:{type:_},"timeZone:":{type:String}}}}})],K.prototype,"initialViewProperties",void 0),e([b("initialViewProperties")],K.prototype,"readInitialViewProperties",null),e([S("initialViewProperties")],K.prototype,"writeInitialViewProperties",null),e([y({json:{write:!0,name:"mapIPSInfo"}})],K.prototype,"ipsInfo",void 0),e([y({json:{read:!1,write:{target:"operationalLayers",ignoreOrigin:!0}}})],K.prototype,"layers",void 0),e([S("layers")],K.prototype,"writeLayers",null),e([y({type:V})],K.prototype,"portalItem",void 0),e([y({json:{write:!0}})],K.prototype,"presentation",void 0),e([y()],K.prototype,"resourceInfo",void 0),e([y({readOnly:!0,type:J,json:{read:{source:"version"},write:{allowNull:!0,ignoreOrigin:!0,target:"version",isRequired:!0}}})],K.prototype,"sourceVersion",void 0),e([b("sourceVersion")],K.prototype,"readSourceVersion",null),e([S("sourceVersion")],K.prototype,"writeSourceVersion",null),e([y({json:{read:!1,write:{ignoreOrigin:!0}}})],K.prototype,"tables",void 0),e([S("tables")],K.prototype,"writeTables",null),e([y()],K.prototype,"thumbnailUrl",null),e([y()],K.prototype,"updatingFromView",null),e([y({type:L,json:{write:!0}})],K.prototype,"widgets",void 0),e([y({type:G,json:{read:!0,write:!0}})],K.prototype,"utilityNetworks",void 0),K=e([A("esri.WebMap")],K);const Q=K;export{Q as default};
5
+ import{_ as e}from"./chunks/tslib.es6.js";import{version as t}from"./kernel.js";import r from"./Map.js";import i from"./Viewpoint.js";import{isSome as o}from"./core/arrayUtils.js";import s from"./core/Collection.js";import n from"./core/Error.js";import a from"./core/Loadable.js";import{loadAll as p}from"./core/loadAll.js";import l from"./core/Logger.js";import{destroyMaybe as u}from"./core/maybe.js";import{MultiOriginJSONMixin as m}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as h}from"./core/Promise.js";import{debounce as c}from"./core/promiseUtils.js";import{whenOnce as d}from"./core/reactiveUtils.js";import{addQueryParameter as g,isDataProtocol as f,dataComponents as w}from"./core/urlUtils.js";import{property as y}from"./core/accessorSupport/decorators/property.js";import"./core/has.js";import{reader as b}from"./core/accessorSupport/decorators/reader.js";import{subclass as A}from"./core/accessorSupport/decorators/subclass.js";import{writer as S}from"./core/accessorSupport/decorators/writer.js";import{readLoadable as v}from"./core/accessorSupport/read.js";import _ from"./geometry/SpatialReference.js";import j from"./networks/UtilityNetwork.js";import V from"./portal/PortalItem.js";import{typeKeyword as I}from"./portal/support/portalItemUtils.js";import U from"./support/MapFloorInfo.js";import P from"./webdoc/GeotriggersInfo.js";import{SaveOperationType as O}from"./webdoc/interfaces.js";import k from"./webdoc/RangeInfo.js";import L from"./webdoc/Widgets.js";import{getOptimalThumbnailSize as F}from"./webdoc/support/thumbnailUtils.js";import{loadFromSource as N}from"./webdoc/support/webdocLoadUtils.js";import{getLayerJSON as R}from"./webdoc/support/writeUtils.js";import T from"./webmap/ApplicationProperties.js";import E from"./webmap/Bookmark.js";import B from"./webmap/InitialViewProperties.js";import{Version as J}from"./webmap/Version.js";import x from"./webmap/background/ColorBackground.js";const M=new J(2,31),Z="Web Map",W="webmap",$="web-map",C=s.ofType(E),G=s.ofType(j),z=new Map([["image/jpeg","jpeg"],["image/jpg","jpg"],["image/png","png"],["image/gif","gif"]]),D="ArcGIS Pro",q=I.JSAPI,H={currentVersion:M,createInitialViewProperties:()=>new B,parseVersion:J.parse,itemType:Z,name:W,origin:$};let K=class extends(m(a.LoadableMixin(h(r)))){constructor(e){super(e),this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1,this._thumbnailFilename=null,this._updateFromPromise=null,this.resourceReferences={portalItem:null,paths:[]},this.applicationProperties=null,this.bookmarks=new C,this.floorInfo=null,this.geotriggersInfo=null,this.initialViewProperties=new B,this.ipsInfo=null,this.portalItem=null,this.presentation=null,this.sourceVersion=null,this.widgets=null,this.utilityNetworks=null,this._debouncedSaveOperations=c((async(e,t,r)=>{const{save:i,saveAs:o}=await import("./webdoc/support/webdocSaveUtils.js");switch(e){case O.SAVE:return i(H,this,t);case O.SAVE_AS:return o(H,this,r,t)}})),this.authoringApp=this.authoringAppVersion=null,this._isAuthoringAppSetByUser=this._isAuthoringAppVersionSetByUser=!1}destroy(){if(this.portalItem=u(this.portalItem),this.utilityNetworks){const e=this.utilityNetworks.removeAll();for(const t of e)t.destroy();this.utilityNetworks.destroy()}}initialize(){if(this.when().catch((e=>{l.getLogger(this).error("#load()","Failed to load web map",e)})),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t)}}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp=q}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,r){e&&this._isAuthoringAppVersionSetByUser?r.authoringAppVersion=e:r.authoringAppVersion=t}readInitialViewProperties(e,t){const r=new B;t.background&&(r.background=x.fromJSON(t.background));const o=t.initialState?.viewpoint;if(o){if(o.rotation){J.parse(t.version||"","webmap").lessThan(2,20)&&t.authoringApp===D&&(o.rotation*=-1)}r.viewpoint=i.fromJSON(o)}return t.mapRangeInfo&&(r.rangeInfo=k.fromJSON(t.mapRangeInfo)),t.spatialReference&&(r.spatialReference=_.fromJSON(t.spatialReference)),t.timeZone&&(r.timeZone=t.timeZone),r}writeInitialViewProperties(e,t,r,i){e&&(e.background?.color&&(t.background=e.background.write({},i)),e.viewpoint&&(t.initialState={viewpoint:e.viewpoint.write({},i)}),e.rangeInfo&&(t.mapRangeInfo=e.rangeInfo.toJSON(i)),e.spatialReference&&(t.spatialReference=e.spatialReference.write({},i)),t.timeZone=e.timeZone)}writeLayers(e,t,r,i){t[r]=this._writeLayers(e,i,"operational-layers")}readSourceVersion(e,t){const[r,i]=t.version.split(".");return new J(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${M.major}.${M.minor}`}writeTables(e,t,r,i){const o=this._writeLayers(e,i,"tables");o.length&&(t[r]=o)}get thumbnailUrl(){return this.portalItem?.thumbnailUrl||null}set thumbnailUrl(e){e?(this._override("thumbnailUrl",e),this._thumbnailFilename=this._generateCustomThumbnailFilename(e)):this._clearThumbnailOverride()}get updatingFromView(){return!!this._updateFromPromise}load(e){return this.addResolvingPromise(N(H,this)),Promise.resolve(this)}loadAll(){return p(this,(e=>{e(this.ground,this.basemap,this.layers,this.tables)}))}read(e,t){t={...t,origin:$};const r=this._getAuthoringPropsState();v(this,e,(t=>super.read(e,t)),t),this._restoreAuthoringPropsFromState(r)}write(e,t){if("loaded"!==this.loadStatus){const e=new n("webmap:not-loaded","Web map must be loaded before it can be serialized");throw l.getLogger(this).error("#toJSON()","Web map must be loaded before it can be serialized",this.loadError||this.loadStatus),e}return this._removeDanglingLayerRefs(),t={...t,origin:$,restrictedWebMapWriting:!0,webmap:this},super.write(e,t)}async save(e){return this._debouncedSaveOperations(O.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(O.SAVE_AS,t,e)}async updateFrom(e,t){const r=this._updateFromInternal(e,t);this._updateFromPromise=r,await r;r===this._updateFromPromise&&(this._updateFromPromise=null)}getLayerJSONFromResourceInfo(e){const t=this.resourceInfo;return this._collectAllLayersJSON([...t?.baseMap?.baseMapLayers||[],...t?.operationalLayers||[],...this.basemap?.resourceInfo?.data?.baseMapLayers||[]]).find((t=>t.id===e.id))}async updateItemThumbnail(){this.thumbnailUrl&&this._isOverridden("thumbnailUrl")&&(await(this.portalItem?.updateThumbnail({thumbnail:this.thumbnailUrl,filename:this._thumbnailFilename})),this._clearThumbnailOverride())}getThumbnailState(){let e=this.thumbnailUrl;return e&&(e=this._isOverridden("thumbnailUrl")?e:g(e,"w","8192")),{thumbnailUrl:e,filename:this._thumbnailFilename}}restoreThumbnailFromState(e){this.thumbnailUrl=e.thumbnailUrl,this._thumbnailFilename=e.filename}_collectAllLayersJSON(e){return e.reduce(((e,t)=>(e.push(t),"GroupLayer"===t.layerType&&(e=e.concat(this._collectAllLayersJSON(t.layers||[]))),e)),[])}_writeLayers(e,t,r){t={...t,layerContainerType:r};return e.map((e=>R(e,"tables"===r?null:this.getLayerJSONFromResourceInfo(e),t))).filter(o).toArray()}_validateJSON(e){const t=J.parse(e.version||"","webmap");return M.validate(t),e.version=`${t.major}.${t.minor}`,e}_removeDanglingLayerRefs(){const e=this.applicationProperties,t=e?.viewing?.search,r=e=>this.allLayers.some((t=>t.id===e));if(t?.layers&&(t.layers=t.layers.filter((e=>r(e.id)))),t?.tables&&(t.tables=t.tables.filter((e=>this.tables.some((t=>t.id===e.id))))),e){const t=e.editing?.locationTracking;t?.info&&!r(t.info.layerId)&&(e.editing=null)}const i=this.presentation?.slides;i&&i.forEach((e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter((e=>r(e.id))))}))}async _updateFromInternal(e,t){if(t??={},await d((()=>e.ready)),this._updateInitialViewProperties(e,t),e.map===this)for(const r of e.allLayerViews)"visible"in r&&"visible"in r.layer&&r._isOverridden("visible")&&(r.layer.visible=r.visible),"featureEffect"in r&&"featureEffect"in r.layer&&r._isOverridden("featureEffect")&&(r.layer.featureEffect=r.featureEffect);await this._updateThumbnailUrl(e,t)}_updateInitialViewProperties(e,t){if(t.backgroundExcluded||(this.initialViewProperties.background=e.background?.clone()),this.initialViewProperties.spatialReference=e.spatialReference?.clone(),this.initialViewProperties.timeZone=e.timeZone,t.viewpointExcluded||(this.initialViewProperties.viewpoint=new i({rotation:e.rotation,scale:t.scalePreserved?e.scale:null,targetGeometry:this._getViewExtent(e)})),!t.widgetsExcluded)for(const r of e.persistableViewModels)r.updateWebDocument(this)}_getViewExtent(e){const t=e.center.clone().normalize(),r=e.extent.clone(),i=r.width/2;return r.xmin=t.x-i,r.xmax=t.x+i,r}async _updateThumbnailUrl(e,t){if(t.thumbnailExcluded)return;const r=F(e,t.thumbnailSize),i=await e.takeScreenshot({format:"png",width:r.width,height:r.height});this._setAutoGeneratedThumbnail(i.dataUrl)}_setAutoGeneratedThumbnail(e){this.thumbnailUrl=e,this._thumbnailFilename=null}_clearThumbnailOverride(){this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"),this._thumbnailFilename=null}_generateCustomThumbnailFilename(e){if(f(e)){const t=w(e),r=t?.mediaType,i=r&&z.get(r.toLowerCase())||null,o=`thumbnail${Date.now()}`;return i?`${o}.${i}`:o}return null}_getAuthoringPropsState(){return{authoringApp:this.authoringApp,authoringAppVersion:this.authoringAppVersion,isAuthoringAppSetByUser:this._isAuthoringAppSetByUser,isAuthoringAppVersionSetByUser:this._isAuthoringAppVersionSetByUser}}_restoreAuthoringPropsFromState(e){e.isAuthoringAppSetByUser?this.authoringApp=e.authoringApp:this._isAuthoringAppSetByUser=!1,e.isAuthoringAppVersionSetByUser?this.authoringAppVersion=e.authoringAppVersion:this._isAuthoringAppVersionSetByUser=!1}static fromJSON(e){const t=e;if(!t)throw new n("webmap:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:t})}};K.VERSION=M,e([y()],K.prototype,"_updateFromPromise",void 0),e([y({type:T,json:{write:!0}})],K.prototype,"applicationProperties",void 0),e([y({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],K.prototype,"authoringApp",null),e([S("authoringApp")],K.prototype,"writeAuthoringApp",null),e([y({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],K.prototype,"authoringAppVersion",null),e([S("authoringAppVersion")],K.prototype,"writeAuthoringAppVersion",null),e([y({type:C,json:{write:{overridePolicy:e=>({enabled:!!(e&&e.length>0),ignoreOrigin:!0})}}})],K.prototype,"bookmarks",void 0),e([y({type:U,json:{name:"mapFloorInfo",write:!0}})],K.prototype,"floorInfo",void 0),e([y({type:P,json:{write:!0}})],K.prototype,"geotriggersInfo",void 0),e([y({type:B,nonNullable:!0,json:{read:{source:["background","initialState.viewpoint","mapRangeInfo","spatialReference","timeZone"]},write:{ignoreOrigin:!0,target:{background:{type:x},"initialState.viewpoint":{type:i},mapRangeInfo:{type:k},spatialReference:{type:_},"timeZone:":{type:String}}}}})],K.prototype,"initialViewProperties",void 0),e([b("initialViewProperties")],K.prototype,"readInitialViewProperties",null),e([S("initialViewProperties")],K.prototype,"writeInitialViewProperties",null),e([y({json:{write:!0,name:"mapIPSInfo"}})],K.prototype,"ipsInfo",void 0),e([y({json:{read:!1,write:{target:"operationalLayers",ignoreOrigin:!0}}})],K.prototype,"layers",void 0),e([S("layers")],K.prototype,"writeLayers",null),e([y({type:V})],K.prototype,"portalItem",void 0),e([y({json:{write:!0}})],K.prototype,"presentation",void 0),e([y()],K.prototype,"resourceInfo",void 0),e([y({readOnly:!0,type:J,json:{read:{source:"version"},write:{allowNull:!0,ignoreOrigin:!0,target:"version",isRequired:!0}}})],K.prototype,"sourceVersion",void 0),e([b("sourceVersion")],K.prototype,"readSourceVersion",null),e([S("sourceVersion")],K.prototype,"writeSourceVersion",null),e([y({json:{read:!1,write:{ignoreOrigin:!0}}})],K.prototype,"tables",void 0),e([S("tables")],K.prototype,"writeTables",null),e([y()],K.prototype,"thumbnailUrl",null),e([y()],K.prototype,"updatingFromView",null),e([y({type:L,json:{write:!0}})],K.prototype,"widgets",void 0),e([y({type:G,json:{read:!0,write:!0}})],K.prototype,"utilityNetworks",void 0),K=e([A("esri.WebMap")],K);const Q=K;export{Q as default};
@@ -0,0 +1 @@
1
+ "M8 9H6V8h2v1zm7.95 2.5a2.45 2.45 0 0 1-2.45 2.45c-.077 0-.15-.016-.226-.023L11.3 16H9v-1.5l2.165-2.296a2.422 2.422 0 0 1-.115-.704 2.45 2.45 0 0 1 4.9 0zm-.95 0c0-.827-.673-1.5-1.5-1.5s-1.5.673-1.5 1.5c0 .351.126.67.33.927L10 14.897V15h.986l2.012-2.093c.158.057.325.093.502.093.827 0 1.5-.673 1.5-1.5zm-2 .5h1v-1h-1v1zM9 6H6v1h3V6zm-1 8.32l-.32.142a.45.45 0 0 1-.36 0L2 12.105V4.1a1 1 0 0 1 .595-.914L7.32 1.092a.45.45 0 0 1 .36-.001L13 3.449V8h1V2.799L8.081.176a1.446 1.446 0 0 0-1.164 0L2.19 2.272A1.999 1.999 0 0 0 1 4.1v8.655l5.919 2.623c.185.081.38.122.581.122.172 0 .339-.036.5-.096V14.32zM4 7.5c0-.53.127-1.027.339-1.477l-.78-.654A4.45 4.45 0 0 0 3 7.5 4.5 4.5 0 0 0 7.5 12c.529 0 1.029-.108 1.5-.276V10.65a3.46 3.46 0 0 1-1.5.35C5.57 11 4 9.43 4 7.5zM7.5 3a4.47 4.47 0 0 0-2.372.69l.821.689A3.453 3.453 0 0 1 7.5 4C9.43 4 11 5.57 11 7.5c0 .171-.027.335-.05.5h1c.018-.166.05-.329.05-.5A4.5 4.5 0 0 0 7.5 3z"
@@ -0,0 +1 @@
1
+ "M9.9 6a4.876 4.876 0 0 0-3.39 1.376l-.757-.67A5.88 5.88 0 0 1 9.9 5c2.945 0 5.38 2.16 5.821 4.981a6.041 6.041 0 0 0-.937.756C14.696 8.112 12.546 6 9.9 6zM8 13h3v-1H8v1zM2 6.448c0-.686.404-1.307 1.03-1.582l6.63-2.914a.859.859 0 0 1 .68 0L18 5.317V9.09c.326-.055.659-.09 1-.09V4.666l-8.26-3.632a1.866 1.866 0 0 0-1.481.001L2.627 3.95A2.728 2.728 0 0 0 1 6.448v11.266l7.771 3.417v-.404c0-.22.045-.434.114-.639L2 17.062V6.448zM13 10H8v1h5v-1zM8 8v1h4V8H8zm13 6.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm-1 0a.501.501 0 0 0-1 0 .501.501 0 0 0 1 0zm-6.966 1.135A6.039 6.039 0 0 1 13 15c0-.119.01-.234.018-.351-.85.708-1.928 1.151-3.118 1.151A4.906 4.906 0 0 1 5 10.9c0-.66.134-1.287.372-1.861l-.783-.695A5.866 5.866 0 0 0 4 10.9a5.9 5.9 0 0 0 5.9 5.9c.918 0 1.784-.216 2.56-.59l.574-.575zM23 15a4 4 0 0 1-4 4c-.307 0-.602-.042-.889-.107l-.107.107H17v1l-.995 1H15v1l-.984.99-.023.01H11v-2.273l4.246-4.39A3.961 3.961 0 0 1 15 15a4 4 0 0 1 8 0zm-1 0c0-1.654-1.346-3-3-3s-3 1.346-3 3c0 .55.16 1.059.419 1.503L12 21.094V22h1.592l.408-.326V20h2v-2h1.505l.272-.267c.374.169.787.267 1.223.267 1.654 0 3-1.346 3-3z"
@@ -0,0 +1 @@
1
+ "M13.678 27.034a2.159 2.159 0 0 1-.546-.148L3 22.45V8.667c0-1.286.762-2.451 1.94-2.968l8.193-3.585a2.18 2.18 0 0 1 1.735 0L25 6.55v6.95c-.34 0-.673.034-1 .085V7.203L14.468 3.03a1.175 1.175 0 0 0-.934 0L5.341 6.615A2.24 2.24 0 0 0 4 8.667v13.13l9.532 4.173c.297.129.639.129.934 0l.302-.132-.829.828a1.492 1.492 0 0 0-.261.368zM28 18.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm-1 0a.501.501 0 0 0-1 0 .501.501 0 0 0 1 0zm3 1.5a5 5 0 0 1-5 5c-.53 0-1.03-.105-1.51-.258L22.232 26H21v1.233l-.767.767H19v1.234l-.756.756-.022.01H15v-2.273l5.53-5.53A4.947 4.947 0 0 1 20 20a5 5 0 0 1 10 0zm-1 0c0-2.206-1.794-4-4-4s-4 1.794-4 4c0 .883.297 1.693.784 2.356L16 28.14V29h1.82l.18-.18V27h1.82l.18-.18V25h1.818l1.424-1.425A3.95 3.95 0 0 0 25 24c2.206 0 4-1.794 4-4zm-15 1c-3.309 0-6-2.691-6-6 0-.773.152-1.51.42-2.19l-.803-.673A6.965 6.965 0 0 0 7 15a7 7 0 0 0 7 7 6.968 6.968 0 0 0 4.525-1.664c-.006-.113-.025-.222-.025-.336 0-.399.042-.787.11-1.166A5.989 5.989 0 0 1 14 21zm0-13a6.966 6.966 0 0 0-4.59 1.724l.773.65A5.972 5.972 0 0 1 14 9c3.309 0 6 2.691 6 6 0 .328-.034.648-.085.962.317-.398.68-.756 1.08-1.07A6.997 6.997 0 0 0 14 8zm3 4h-6v1h6v-1zm1 2h-7v1h7v-1zm-3 2h-4v1h4v-1z"