{"version":3,"sources":["webpack:///./node_modules/@arcgis/core/layers/support/I3SLayerDefinitions.js","webpack:///./node_modules/@arcgis/core/layers/support/I3SIndexInfo.js","webpack:///./node_modules/@arcgis/core/layers/support/capabilities.js","webpack:///./node_modules/@arcgis/core/webdoc/support/saveUtils.js","webpack:///./node_modules/@arcgis/core/layers/mixins/SceneService.js","webpack:///./node_modules/@arcgis/core/layers/support/FetchAssociatedFeatureLayer.js","webpack:///./node_modules/@arcgis/core/portal/support/resourceUtils.js"],"names":["s","t","constructor","super","arguments","this","nodesPerPage","rootIndex","lodSelectionMetricType","e","o","type","Number","prototype","String","p","i","factor","json","read","source","a","baseColorFactor","baseColorTexture","metallicRoughnessTexture","metallicFactor","roughnessFactor","l","alphaMode","alphaCutoff","doubleSided","cullFace","normalTexture","occlusionTexture","emissiveTexture","emissiveFactor","pbrMetallicRoughness","r","opaque","mask","blend","Boolean","none","back","front","n","reader","index","jpg","png","dds","ktx2","basis","u","atlas","y","Float32","UInt64","UInt32","UInt16","UInt8","d","draco","c","offset","m","triangle","async","Math","floor","rootPage","query","f","token","responseType","signal","data","pageSize","lodMetric","urlPrefix","warn","split","pop","rootNode","pageError","nodeError","url","analytics","supportsCacheHint","attachment","supportsContentType","supportsExifInfo","supportsKeywords","supportsName","supportsSize","supportsResize","isVersioned","supportsAttachment","supportsM","supportsZ","editing","supportsDeleteByAnonymous","supportsDeleteByOthers","supportsGeometryUpdate","supportsGlobalId","supportsReturnServiceEditsInSourceSpatialReference","supportsRollbackOnFailure","supportsUpdateByAnonymous","supportsUpdateByOthers","supportsUpdateWithoutM","supportsUploadWithItemId","metadata","supportsAdvancedFieldProperties","operations","supportsCalculate","supportsTruncate","supportsValidateSql","supportsAdd","supportsDelete","supportsEditing","supportsChangeTracking","supportsQuery","supportsQueryAnalytics","supportsQueryAttachments","supportsQueryTopFeatures","supportsResizeAttachments","supportsSync","supportsUpdate","supportsExceedsLimitStatistics","queryRelated","supportsCount","supportsOrderBy","supportsPagination","queryTopFeatures","maxRecordCount","maxRecordCountFactor","standardMaxRecordCount","supportsCentroid","supportsCompactGeometry","supportsDefaultSpatialReference","supportsDisjointSpatialRelationship","supportsDistance","supportsDistinct","supportsExtent","supportsFormatPBF","supportsGeometryProperties","supportsHavingClause","supportsHistoricMoment","supportsMaxRecordCountFactor","supportsPercentileStatistics","supportsQuantization","supportsQuantizationEditMode","supportsQueryByOthers","supportsQueryGeometry","supportsResultType","supportsSqlExpression","supportsStandardizedQueriesOnly","supportsTopFeaturesQuery","supportsSpatialAggregationStatistics","supportedSpatialAggregationStatistics","envelope","centroid","convexHull","supportsStatistics","tileMaxRecordCount","resources","h","portalItem","Set","paths","length","toKeep","map","resource","path","forEach","delete","push","toUpdate","has","content","finish","error","add","toAdd","resourceFromPath","removeResource","catch","filter","errors","addResource","ok","update","R","getLogger","A","spatialReference","fullExtent","heightModelInfo","minScale","maxScale","version","major","NaN","minor","versionString","copyright","sublayerTitleMode","title","layerId","indexInfo","_debouncedSaveOperations","K","SAVE","_save","SAVE_AS","_saveAs","readSpatialReference","_readSpatialReference","fromJSON","store","indexCRS","geographicCRS","parseInt","substring","lastIndexOf","readFullExtent","extent","Array","isArray","some","N","xmin","ymin","xmax","ymax","parseVersionString","readVersion","toString","readTitlePortalItem","readTitleService","name","v","S","layer","nonStandardUrlAllowed","logger","_set","writeUrl","g","_get","x","parsedUrl","apiKey","hasZ","_updateExtent","nodes","obb","center","halfSize","sqrt","zmin","zmax","mbs","test","_fetchFirstLayerId","_fetchServiceLayer","layers","id","ssl","replace","layerType","_fetchVoxelServiceLayer","origin","validateLayer","load","beforeSave","_updateTypeKeywords","typeKeywords","getTypeKeywords","indexOf","U","newItem","O","j","from","Promise","reject","clone","portal","b","getDefault","_ensureLoadBeforeSave","T","messages","writtenProperties","blockedRelativeUrls","pendingOperations","write","all","_validateAgainstJSONSchema","_signIn","user","addItem","item","folder","_","resourceReferences","itemUrl","existingItem","message","details","validationOptions","ignoreUnsupported","enabled","E","validate","portalItemLayerType","join","failPolicy","concat","combined","w","readOnly","origins","service","target","isRequired","ignoreOrigin","I","rootDocument","match","urlParts","root","_portalItemFromServiceItemId","_loadFromUrl","_findAndLoadRelatedPortalItem","_loadFeatureLayerFromPortalItem","findServerInfo","owningSystemUrl","fetchRelatedItems","relationshipType","direction","find","_findMatchingAssociatedSublayerUrl","authMode","_fetchRootDocument","Error","min","serviceItemId","_fetchServiceOwningPortalUrl","start","num","sortOrder","sortField","_request","total","nextStart","created","size","Date","hasPath","userItemUrl","FormData","append","access","method","body","deleteAll","slice","Blob"],"mappings":"mIAAA,wOAI+b,IAAIA,EAAE,cAAcC,OAAEC,cAAcC,SAASC,WAAWC,KAAKC,aAAa,KAAKD,KAAKE,UAAU,EAAEF,KAAKG,uBAAuB,OAAOC,eAAE,CAACC,eAAE,CAACC,KAAKC,UAAUZ,EAAEa,UAAU,oBAAe,GAAQJ,eAAE,CAACC,eAAE,CAACC,KAAKC,UAAUZ,EAAEa,UAAU,iBAAY,GAAQJ,eAAE,CAACC,eAAE,CAACC,KAAKG,UAAUd,EAAEa,UAAU,8BAAyB,GAAQb,EAAES,eAAE,CAACM,eAAE,6CAA6Cf,GAAG,IAAIgB,EAAE,cAAcf,OAAEC,cAAcC,SAASC,WAAWC,KAAKY,OAAO,IAAIR,eAAE,CAACC,eAAE,CAACC,KAAKC,OAAOM,KAAK,CAACC,KAAK,CAACC,OAAO,8BAA8BJ,EAAEH,UAAU,UAAK,GAAQJ,eAAE,CAACC,eAAE,CAACC,KAAKC,UAAUI,EAAEH,UAAU,cAAS,GAAQG,EAAEP,eAAE,CAACM,eAAE,0CAA0CC,GAAG,IAAIK,EAAE,cAAcpB,OAAEC,cAAcC,SAASC,WAAWC,KAAKiB,gBAAgB,CAAC,EAAE,EAAE,EAAE,GAAGjB,KAAKkB,iBAAiB,KAAKlB,KAAKmB,yBAAyB,KAAKnB,KAAKoB,eAAe,EAAEpB,KAAKqB,gBAAgB,IAAIjB,eAAE,CAACC,eAAE,CAACC,KA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,aAAaiX,KAAYjX,SAAeQ,qBAAER,EAAEqF,IAAI,CAACZ,aAAa,UAAUE,KAAK,SAASJ,EAAE/D,EAAER,GAAG,IAAIQ,EAAEgW,UAAU,OAAO,KAAK,MAAMpU,EAAD,CAAIhB,GAAGwC,EAAEpD,EAAEqK,MAAM,OAAOrK,EAAE8J,WAAWkB,iBAAiBzL,eAAEqC,EAAEpC,EAAEoB,IAAI,SAAS6S,EAAEzT,EAAER,GAAG,IAAIQ,EAAEgW,UAAU,OAAO,KAAK,MAAMpU,EAAD,CAAIhB,GAAGwC,EAAEpD,EAAEqK,MAAM,OAAOrK,EAAE8J,WAAWkB,iBAAiBzL,eAAEqC,EAAEpC,EAAEoB","file":"js/chunk-e4001ad6.1367c0a5.js","sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.24/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../chunks/tslib.es6.js\";import{JSONSupport as t}from\"../../core/JSONSupport.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{enumeration as r}from\"../../core/accessorSupport/decorators/enumeration.js\";import{subclass as p}from\"../../core/accessorSupport/decorators/subclass.js\";let s=class extends t{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};e([o({type:Number})],s.prototype,\"nodesPerPage\",void 0),e([o({type:Number})],s.prototype,\"rootIndex\",void 0),e([o({type:String})],s.prototype,\"lodSelectionMetricType\",void 0),s=e([p(\"esri.layer.support.I3SNodePageDefinition\")],s);let i=class extends t{constructor(){super(...arguments),this.factor=1}};e([o({type:Number,json:{read:{source:\"textureSetDefinitionId\"}}})],i.prototype,\"id\",void 0),e([o({type:Number})],i.prototype,\"factor\",void 0),i=e([p(\"esri.layer.support.I3SMaterialTexture\")],i);let a=class extends t{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};e([o({type:[Number]})],a.prototype,\"baseColorFactor\",void 0),e([o({type:i})],a.prototype,\"baseColorTexture\",void 0),e([o({type:i})],a.prototype,\"metallicRoughnessTexture\",void 0),e([o({type:Number})],a.prototype,\"metallicFactor\",void 0),e([o({type:Number})],a.prototype,\"roughnessFactor\",void 0),a=e([p(\"esri.layer.support.I3SMaterialPBRMetallicRoughness\")],a);let l=class extends t{constructor(){super(...arguments),this.alphaMode=\"opaque\",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace=\"none\",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};e([r({opaque:\"opaque\",mask:\"mask\",blend:\"blend\"})],l.prototype,\"alphaMode\",void 0),e([o({type:Number})],l.prototype,\"alphaCutoff\",void 0),e([o({type:Boolean})],l.prototype,\"doubleSided\",void 0),e([r({none:\"none\",back:\"back\",front:\"front\"})],l.prototype,\"cullFace\",void 0),e([o({type:i})],l.prototype,\"normalTexture\",void 0),e([o({type:i})],l.prototype,\"occlusionTexture\",void 0),e([o({type:i})],l.prototype,\"emissiveTexture\",void 0),e([o({type:[Number]})],l.prototype,\"emissiveFactor\",void 0),e([o({type:a})],l.prototype,\"pbrMetallicRoughness\",void 0),l=e([p(\"esri.layer.support.I3SMaterialDefinition\")],l);let n=class extends t{};e([o({type:String,json:{read:{source:[\"name\",\"index\"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],n.prototype,\"name\",void 0),e([r({jpg:\"jpg\",png:\"png\",dds:\"dds\",\"ktx-etc2\":\"ktx-etc2\",ktx2:\"ktx2\",basis:\"basis\"})],n.prototype,\"format\",void 0),n=e([p(\"esri.layer.support.I3STextureFormat\")],n);let u=class extends t{constructor(){super(...arguments),this.atlas=!1}};e([o({type:[n]})],u.prototype,\"formats\",void 0),e([o({type:Boolean})],u.prototype,\"atlas\",void 0),u=e([p(\"esri.layer.support.I3STextureSetDefinition\")],u);let y=class extends t{};e([r({Float32:\"Float32\",UInt64:\"UInt64\",UInt32:\"UInt32\",UInt16:\"UInt16\",UInt8:\"UInt8\"})],y.prototype,\"type\",void 0),e([o({type:Number})],y.prototype,\"component\",void 0),y=e([p(\"esri.layer.support.I3SGeometryAttribute\")],y);let d=class extends t{};e([r({draco:\"draco\"})],d.prototype,\"encoding\",void 0),e([o({type:[String]})],d.prototype,\"attributes\",void 0),d=e([p(\"esri.layer.support.I3SGeometryCompressedAttributes\")],d);let c=class extends t{constructor(){super(...arguments),this.offset=0}};e([o({type:Number})],c.prototype,\"offset\",void 0),e([o({type:y})],c.prototype,\"position\",void 0),e([o({type:y})],c.prototype,\"normal\",void 0),e([o({type:y})],c.prototype,\"uv0\",void 0),e([o({type:y})],c.prototype,\"color\",void 0),e([o({type:y})],c.prototype,\"uvRegion\",void 0),e([o({type:y})],c.prototype,\"featureId\",void 0),e([o({type:y})],c.prototype,\"faceRange\",void 0),e([o({type:d})],c.prototype,\"compressedAttributes\",void 0),c=e([p(\"esri.layer.support.I3SGeometryBuffer\")],c);let m=class extends t{};e([r({triangle:\"triangle\"})],m.prototype,\"topology\",void 0),e([o()],m.prototype,\"geometryBuffers\",void 0),m=e([p(\"esri.layer.support.I3SGeometryDefinition\")],m);export{y as I3SGeometryAttribute,c as I3SGeometryBuffer,d as I3SGeometryCompressedAttributes,m as I3SGeometryDefinition,l as I3SMaterialDefinition,a as I3SMaterialPBRMetallicRoughness,i as I3SMaterialTexture,s as I3SNodePageDefinition,n as I3STextureFormat,u as I3STextureSetDefinition};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.24/esri/copyright.txt for details.\n*/\nimport e from\"../../request.js\";import o from\"../../core/Error.js\";import{isSome as r}from\"../../core/maybe.js\";async function n(n,t,s,a,i,d){let l=null;if(r(s)){const o=`${n}/nodepages/`,t=o+Math.floor(s.rootIndex/s.nodesPerPage);try{return{type:\"page\",rootPage:(await e(t,{query:{f:\"json\",token:a},responseType:\"json\",signal:d})).data,rootIndex:s.rootIndex,pageSize:s.nodesPerPage,lodMetric:s.lodSelectionMetricType,urlPrefix:o}}catch(f){r(i)&&i.warn(\"#fetchIndexInfo()\",\"Failed to load root node page. Falling back to node documents.\",t,f),l=f}}if(!t)return null;const p=`${n}/nodes/`,c=p+(t&&t.split(\"/\").pop());try{return{type:\"node\",rootNode:(await e(c,{query:{f:\"json\",token:a},responseType:\"json\",signal:d})).data,urlPrefix:p}}catch(f){throw new o(\"sceneservice:root-node-missing\",\"Root node missing.\",{pageError:l,nodeError:f,url:c})}}export{n as fetchIndexInfo};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.24/esri/copyright.txt for details.\n*/\nconst t={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}};export{t as zeroCapabilities};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.24/esri/copyright.txt for details.\n*/\nimport{result as r}from\"../../core/asyncUtils.js\";import e from\"../../core/Error.js\";import{eachAlways as o,throwIfAborted as t}from\"../../core/promiseUtils.js\";import{generateUUID as s}from\"../../core/uuid.js\";import{getSiblingOfSameTypeI as c}from\"../../portal/support/resourceUtils.js\";async function a(r,a,u){if(!a||!a.resources)return;const h=a.portalItem===r.portalItem?new Set(r.paths):new Set;r.paths.length=0,r.portalItem=a.portalItem;const i=new Set(a.resources.toKeep.map((r=>r.resource.path))),f=new Set,m=[];i.forEach((e=>{h.delete(e),r.paths.push(e)}));for(const e of a.resources.toUpdate)if(h.delete(e.resource.path),i.has(e.resource.path)||f.has(e.resource.path)){const{resource:o,content:t,finish:a,error:p}=e,h=c(o,s());r.paths.push(h.path),m.push(n({resource:h,content:t,finish:a,error:p},u))}else r.paths.push(e.resource.path),m.push(p(e,u)),f.add(e.resource.path);for(const e of a.resources.toAdd)m.push(n(e,u)),r.paths.push(e.resource.path);if(h.forEach((r=>{const e=a.portalItem.resourceFromPath(r);m.push(e.portalItem.removeResource(e).catch((()=>{})))})),0===m.length)return;const l=await o(m);t(u);const d=l.filter((r=>\"error\"in r)).map((r=>r.error));if(d.length>0)throw new e(\"save:resources\",\"Failed to save one or more resources\",{errors:d})}async function n(e,o){const t=await r(e.resource.portalItem.addResource(e.resource,e.content,o));if(!0!==t.ok)throw e.error&&e.error(t.error),t.error;e.finish&&e.finish(e.resource)}async function p(e,o){const t=await r(e.resource.update(e.content,o));if(!0!==t.ok)throw e.error(t.error),t.error;e.finish(e.resource)}export{a as saveResources};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.24/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../chunks/tslib.es6.js\";import t from\"../../request.js\";import r from\"../../core/Error.js\";import\"../../core/has.js\";import i from\"../../core/Logger.js\";import{isSome as o}from\"../../core/maybe.js\";import{debounce as s}from\"../../core/promiseUtils.js\";import{urlToObject as a}from\"../../core/urlUtils.js\";import{property as n}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/arrayUtils.js\";import\"../../core/accessorSupport/ensureType.js\";import{reader as l}from\"../../core/accessorSupport/decorators/reader.js\";import{subclass as p}from\"../../core/accessorSupport/decorators/subclass.js\";import{writer as c}from\"../../core/accessorSupport/decorators/writer.js\";import{updateOrigins as d}from\"../../core/accessorSupport/originUtils.js\";import u from\"../../geometry/Extent.js\";import m from\"../../geometry/HeightModelInfo.js\";import y from\"../../geometry/SpatialReference.js\";import{titleFromUrlAndName as h,parse as f,cleanTitle as v,sanitizeUrlWithLayerId as S,writeUrlWithLayerId as g}from\"../support/arcgisLayerUrl.js\";import{id as w,url as I}from\"../support/commonProperties.js\";import{fetchIndexInfo as x}from\"../support/I3SIndexInfo.js\";import b from\"../../portal/Portal.js\";import j from\"../../portal/PortalItem.js\";import{saveResources as _}from\"../../webdoc/support/saveUtils.js\";const R=i.getLogger(\"esri.layers.mixins.SceneService\"),A=i=>{let A=class extends i{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:\"\"},this.copyright=null,this.sublayerTitleMode=\"item-title\",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=s((async(e,t,r)=>{switch(e){case K.SAVE:return this._save(t);case K.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return y.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.substring(r.lastIndexOf(\"/\")+1,r.length),10);return null!=i?new y(i):null}}readFullExtent(e,t,r){if(null!=e&&\"object\"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return u.fromJSON(i,r)}const i=t.store,o=this._readSpatialReference(t);return null==o||null==i||null==i.extent||!Array.isArray(i.extent)||i.extent.some((e=>e=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():\"\";return this.parseVersionString(i)}readTitlePortalItem(e){return\"item-title\"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if(\"item-title\"===this.sublayerTitleMode)return h(this.url,t.name);let i=t.name;if(!i&&this.url){const e=f(this.url);o(e)&&(i=e.title)}return\"item-title-and-service-name\"===this.sublayerTitleMode&&r&&(i=r+\" - \"+i),v(i)}set url(e){const t=S({layer:this,url:e,nonStandardUrlAllowed:!1,logger:R});this._set(\"url\",t.url),null!=t.layerId&&this._set(\"layerId\",t.layerId)}writeUrl(e,t,r,i){g(this,e,\"layers\",t,i)}get parsedUrl(){const e=this._get(\"url\");if(!e)return null;const t=a(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=x(this.parsedUrl.path,this.rootNode,e,this.apiKey,R,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if(\"page\"===e?.type){const t=e.rootIndex%e.pageSize,i=e.rootPage?.nodes?.[t];if(null==i||null==i.obb||null==i.obb.center||null==i.obb.halfSize)throw new r(\"sceneservice:invalid-node-page\",\"Invalid node page.\");if(i.obb.center[0]0)return r.data.layers[0].id}async _fetchServiceLayer(e){const r=await t(this.parsedUrl.path,{query:{f:\"json\",token:this.apiKey},responseType:\"json\",signal:e});r.ssl&&(this.url=this.url.replace(/^http:/i,\"https:\"));let i=!1;if(r.data.layerType&&\"Voxel\"===r.data.layerType&&(i=!0),i)return this._fetchVoxelServiceLayer();const o=r.data;this.read(o,{origin:\"service\",url:this.parsedUrl}),this.validateLayer(o)}async _fetchVoxelServiceLayer(e){const r=(await t(this.parsedUrl.path+\"/layer\",{query:{f:\"json\",token:this.apiKey},responseType:\"json\",signal:e})).data;this.read(r,{origin:\"service\",url:this.parsedUrl}),this.validateLayer(r)}async _ensureLoadBeforeSave(){await this.load(),\"beforeSave\"in this&&\"function\"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const o of i)e.typeKeywords.push(o);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===U.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>\"Hosted Service\"!==e))))}async _saveAs(e,t){const i={...O,...t};let o=j.from(e);o||(R.error(\"_saveAs(): requires a portal item parameter\"),await Promise.reject(new r(\"sceneservice:portal-item-required\",\"_saveAs() requires a portal item to save to\"))),o.id&&(o=o.clone(),o.id=null);const s=o.portal||b.getDefault();await this._ensureLoadBeforeSave(),o.type=T,o.portal=s;const a={origin:\"portal-item\",url:null,messages:[],portal:s,portalItem:o,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},n={layers:[this.write({},a)]};return await Promise.all(a.resources.pendingOperations),await this._validateAgainstJSONSchema(n,a,i),o.url=this.url,o.title||(o.title=this.title),this._updateTypeKeywords(o,i,U.newItem),await s._signIn(),await s.user.addItem({item:o,folder:i&&i.folder,data:n}),await _(this.resourceReferences,a,null),this.portalItem=o,d(a),a.portalItem=o,o}async _save(e){const t={...O,...e};this.portalItem||(R.error(\"_save(): requires the .portalItem property to be set\"),await Promise.reject(new r(\"sceneservice:portal-item-not-set\",\"Portal item to save to has not been set on this SceneService\"))),this.portalItem.type!==T&&(R.error(\"_save(): Non-matching portal item type. Got \"+this.portalItem.type+\", expected \"+T),await Promise.reject(new r(\"sceneservice:portal-item-wrong-type\",`Portal item needs to have type \"${T}\"`))),await this._ensureLoadBeforeSave();const i={origin:\"portal-item\",url:this.portalItem.itemUrl&&a(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||b.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},o={layers:[this.write({},i)]};return await Promise.all(i.resources.pendingOperations),await this._validateAgainstJSONSchema(o,i,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,U.existingItem),await this.portalItem.update({data:o}),await _(this.resourceReferences,i,null),d(i),this.portalItem}async _validateAgainstJSONSchema(e,t,i){let o=t.messages.filter((e=>\"error\"===e.type)).map((e=>new r(e.name,e.message,e.details)));if(i&&i.validationOptions.ignoreUnsupported&&(o=o.filter((e=>\"layer:unsupported\"!==e.name&&\"symbol:unsupported\"!==e.name&&\"symbol-layer:unsupported\"!==e.name&&\"property:unsupported\"!==e.name&&\"url:unsupported\"!==e.name&&\"scenemodification:unsupported\"!==e.name))),i.validationOptions.enabled||E){const t=(await import(\"../support/schemaValidator.js\")).validate(e,i.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\\n${t.join(\"\\n\")}`;if(R.error(`_validateAgainstJSONSchema(): ${e}`),\"throw\"===i.validationOptions.failPolicy){const e=t.map((e=>new r(\"sceneservice:schema-validation\",e))).concat(o);throw new r(\"sceneservice-validate:error\",\"Failed to save layer item due to schema validation, see `details.errors`.\",{combined:e})}}}if(o.length>0)throw new r(\"sceneservice:save\",\"Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information\",{errors:o})}};return e([n(w)],A.prototype,\"id\",void 0),e([n({type:y})],A.prototype,\"spatialReference\",void 0),e([l(\"spatialReference\",[\"spatialReference\",\"store.indexCRS\",\"store.geographicCRS\"])],A.prototype,\"readSpatialReference\",null),e([n({type:u})],A.prototype,\"fullExtent\",void 0),e([l(\"fullExtent\",[\"fullExtent\",\"store.extent\",\"spatialReference\",\"store.indexCRS\",\"store.geographicCRS\"])],A.prototype,\"readFullExtent\",null),e([n({readOnly:!0,type:m})],A.prototype,\"heightModelInfo\",void 0),e([n({type:Number,json:{name:\"layerDefinition.minScale\",write:!0,origins:{service:{read:{source:\"minScale\"},write:!1}}}})],A.prototype,\"minScale\",void 0),e([n({type:Number,json:{name:\"layerDefinition.maxScale\",write:!0,origins:{service:{read:{source:\"maxScale\"},write:!1}}}})],A.prototype,\"maxScale\",void 0),e([n({readOnly:!0})],A.prototype,\"version\",void 0),e([l(\"version\",[\"store.version\"])],A.prototype,\"readVersion\",null),e([n({type:String,json:{read:{source:\"copyrightText\"}}})],A.prototype,\"copyright\",void 0),e([n({type:String,json:{read:!1}})],A.prototype,\"sublayerTitleMode\",void 0),e([n({type:String})],A.prototype,\"title\",void 0),e([l(\"portal-item\",\"title\")],A.prototype,\"readTitlePortalItem\",null),e([l(\"service\",\"title\",[\"name\"])],A.prototype,\"readTitleService\",null),e([n({type:Number,json:{origins:{service:{read:{source:\"id\"}},\"portal-item\":{write:{target:\"id\",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],A.prototype,\"layerId\",void 0),e([n(I)],A.prototype,\"url\",null),e([c(\"url\")],A.prototype,\"writeUrl\",null),e([n()],A.prototype,\"parsedUrl\",null),e([n({readOnly:!0})],A.prototype,\"store\",void 0),e([n({type:String,readOnly:!0,json:{read:{source:\"store.rootNode\"}}})],A.prototype,\"rootNode\",void 0),A=e([p(\"esri.layers.mixins.SceneService\")],A),A},N=-1e38,E=!1;var U;!function(e){e[e.existingItem=0]=\"existingItem\",e[e.newItem=1]=\"newItem\"}(U||(U={}));const T=\"Scene Service\",O={getTypeKeywords:()=>[],portalItemLayerType:\"unknown\",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:\"throw\"}};var K;!function(e){e[e.SAVE=0]=\"SAVE\",e[e.SAVE_AS=1]=\"SAVE_AS\"}(K||(K={}));export{T as SCENE_SERVICE_ITEM_TYPE,K as SaveOperationType,A as SceneService};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.24/esri/copyright.txt for details.\n*/\nimport{id as t}from\"../../kernel.js\";import r from\"../../request.js\";import{isNone as e,isSome as a}from\"../../core/maybe.js\";import{throwIfAbortError as s}from\"../../core/promiseUtils.js\";import i from\"../FeatureLayer.js\";import o from\"../../portal/Portal.js\";import n from\"../../portal/PortalItem.js\";class l{constructor(t,r,e,a){this.parsedUrl=t,this.portalItem=r,this.apiKey=e,this.signal=a,this.rootDocument=null;const s=this.parsedUrl.path.match(/^(.*)\\/SceneServer\\/layers\\/([\\d]*)\\/?$/i);s&&(this.urlParts={root:s[1],layerId:parseInt(s[2],10)})}async fetch(){if(!this.urlParts)return null;const t=this.portalItem??await this._portalItemFromServiceItemId();if(e(t))return this._loadFromUrl();const r=await this._findAndLoadRelatedPortalItem(t);return e(r)?null:this._loadFeatureLayerFromPortalItem(r)}async fetchPortalItem(){if(!this.urlParts)return null;const t=this.portalItem??await this._portalItemFromServiceItemId();return e(t)?null:this._findAndLoadRelatedPortalItem(t)}async _fetchRootDocument(){if(a(this.rootDocument))return this.rootDocument;if(e(this.urlParts))return this.rootDocument={},{};const t={query:{f:\"json\",token:this.apiKey},responseType:\"json\",signal:this.signal},s=`${this.urlParts.root}/SceneServer`;try{const e=await r(s,t);this.rootDocument=e.data}catch{this.rootDocument={}}return this.rootDocument}async _fetchServiceOwningPortalUrl(){const e=t?.findServerInfo(this.parsedUrl.path);if(e?.owningSystemUrl)return e.owningSystemUrl;const a=this.parsedUrl.path.replace(/(.*\\/rest)\\/.*/i,\"$1\")+\"/info\";try{const t=(await r(a,{query:{f:\"json\"},responseType:\"json\",signal:this.signal})).data.owningSystemUrl;if(t)return t}catch(i){s(i)}return null}async _findAndLoadRelatedPortalItem(t){try{return(await t.fetchRelatedItems({relationshipType:\"Service2Service\",direction:\"reverse\"},{signal:this.signal})).find((t=>\"Feature Service\"===t.type))||null}catch(r){return s(r),null}}async _loadFeatureLayerFromPortalItem(t){await t.load({signal:this.signal});const r=await this._findMatchingAssociatedSublayerUrl(t.url);return new i({url:r,portalItem:t}).load({signal:this.signal})}async _loadFromUrl(){const t=await this._findMatchingAssociatedSublayerUrl(`${this.urlParts.root}/FeatureServer`);return new i({url:t}).load({signal:this.signal})}async _findMatchingAssociatedSublayerUrl(t){const e=t.replace(/^(.*FeatureServer)(\\/[\\d]*\\/?)?$/i,\"$1\"),a={query:{f:\"json\"},responseType:\"json\",authMode:\"no-prompt\",signal:this.signal},s=this.urlParts.layerId,i=this._fetchRootDocument(),o=r(e,a),[n,l]=await Promise.all([o,i]),c=l&&l.layers,h=n.data&&n.data.layers;if(!Array.isArray(h))throw new Error(\"expected layers array\");if(Array.isArray(c))for(let r=0;r({created:new Date(t),size:r,resource:e.resourceFromPath(a)})))}}async function u(e,o,n,c){if(!e.hasPath())throw new t(`portal-item-resource-${o}:invalid-path`,\"Resource does not have a valid path\");const u=e.portalItem;await u.load(c);const i=s(u.userItemUrl,\"add\"===o?\"addResources\":\"updateResources\"),[l,d]=p(e.path),m=await h(n),f=new FormData;return l&&\".\"!==l&&f.append(\"resourcesPrefix\",l),f.append(\"fileName\",d),f.append(\"file\",m,d),f.append(\"f\",\"json\"),a(c)&&c.access&&f.append(\"access\",c.access),await u.portal._request(i,{method:\"post\",body:f,signal:r(c,\"signal\")}),e}async function i(e,a,o){if(!a.hasPath())throw new t(\"portal-item-resources-remove:invalid-path\",\"Resource does not have a valid path\");await e.load(o);const n=s(e.userItemUrl,\"removeResources\");await e.portal._request(n,{method:\"post\",query:{resource:a.path},signal:r(o,\"signal\")}),a.portalItem=null}async function l(e,t){await e.load(t);const a=s(e.userItemUrl,\"removeResources\");return e.portal._request(a,{method:\"post\",query:{deleteAll:!0},signal:r(t,\"signal\")})}function p(e){const t=e.lastIndexOf(\"/\");return-1===t?[\".\",e]:[e.slice(0,t),e.slice(t+1)]}function d(e){const[t,r]=m(e),[a,o]=p(t);return[a,o,r]}function m(e){const t=n(e);return o(t)?[e,\"\"]:[e.slice(0,e.length-t.length-1),`.${t}`]}async function h(t){if(t instanceof Blob)return t;return(await e(t.url,{responseType:\"blob\"})).data}function f(e,t){if(!e.hasPath())return null;const[r,,a]=d(e.path);return e.portalItem.resourceFromPath(s(r,t+a))}function w(e,t){if(!e.hasPath())return null;const[r,,a]=d(e.path);return e.portalItem.resourceFromPath(s(r,t+a))}export{u as addOrUpdateResource,h as contentToBlob,c as fetchResources,f as getSiblingOfSameType,w as getSiblingOfSameTypeI,l as removeAllResources,i as removeResource,d as splitPrefixFileNameAndExtension};\n"],"sourceRoot":""}