@arcgis/core 4.32.0-next.20250218 → 4.32.0-next.20250220

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 (154) hide show
  1. package/applications/ExperienceBuilder/sketchUtils.d.ts +1 -0
  2. package/applications/ExperienceBuilder/sketchUtils.js +1 -1
  3. package/arcade/treeAnalysis.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/0c3930e40fc9f8a84599.js +2 -0
  6. package/assets/esri/core/workers/chunks/{ccee343fb8c415b59ce3.js.LICENSE.txt → 0c3930e40fc9f8a84599.js.LICENSE.txt} +1 -1
  7. package/assets/esri/core/workers/chunks/{5f1af0a190f3425aa049.js → 0e178ec7ee6a7301c6a7.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{a42ae5d5e5f66d120b4d.js → 21c7265f1f2a718de7c6.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{36978fd30b24e721c6ba.js → 2def7db73a776e759dae.js} +1 -1
  10. package/assets/esri/core/workers/chunks/4289635b2fabad2c16fd.js +1 -0
  11. package/assets/esri/core/workers/chunks/486df1e042204b90b0dd.js.LICENSE.txt +1 -1
  12. package/assets/esri/core/workers/chunks/{c2d539359f321bba3432.js → 52c13b3c074c9f6dadde.js} +2 -2
  13. package/assets/esri/core/workers/chunks/{c2d539359f321bba3432.js.LICENSE.txt → 52c13b3c074c9f6dadde.js.LICENSE.txt} +1 -1
  14. package/assets/esri/core/workers/chunks/5693d9ce4472a4c5959f.js.LICENSE.txt +1 -1
  15. package/assets/esri/core/workers/chunks/5984ab09ea8010f8a874.js +1 -0
  16. package/assets/esri/core/workers/chunks/5b56b271afb0fadf48b4.js.LICENSE.txt +1 -1
  17. package/assets/esri/core/workers/chunks/6518954889df2e781c47.js.LICENSE.txt +1 -1
  18. package/assets/esri/core/workers/chunks/{f1c9595096c047e93145.js → 7b07410fe98015b80c74.js} +1 -1
  19. package/assets/esri/core/workers/chunks/a5acbdb8347a809a26c0.js +1 -0
  20. package/assets/esri/core/workers/chunks/a5c9f0102b25170bb348.js +1 -0
  21. package/assets/esri/core/workers/chunks/aadd13261b245116d958.js +1 -0
  22. package/assets/esri/core/workers/chunks/b0952b81d5be214262dd.js.LICENSE.txt +1 -1
  23. package/assets/esri/core/workers/chunks/{c9aed9a43d9935e7c768.js → bc25e34a1db735967dc5.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{841b62c0603962d4aa75.js → bd3487b587851b20ff2a.js} +1 -1
  25. package/assets/esri/core/workers/chunks/bef2a1096b1b0e646e32.js +1 -0
  26. package/assets/esri/core/workers/chunks/cf285e45c18cd4399dde.js +1 -0
  27. package/assets/esri/core/workers/chunks/{2479be4fbc1abe5bf404.js → d4e7de3eb7c0cf6efc19.js} +13 -12
  28. package/assets/esri/core/workers/chunks/ebe832bd57a316364ca1.js +1 -0
  29. package/assets/esri/core/workers/chunks/f664cc15238c8e9856a0.js +1 -0
  30. package/assets/esri/core/workers/chunks/fbf42597b2af21eb0de4.js +1 -0
  31. package/assets/esri/themes/base/widgets/_Editor.scss +7 -0
  32. package/assets/esri/themes/base/widgets/_ResponsiveToolbar.scss +9 -3
  33. package/assets/esri/themes/base/widgets/_Sketch.scss +32 -24
  34. package/assets/esri/themes/dark/main.css +1 -1
  35. package/assets/esri/themes/light/main.css +1 -1
  36. package/assets/esri/themes/light/view.css +1 -1
  37. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  38. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  39. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  40. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  41. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  42. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  43. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  44. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  45. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  46. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  47. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  48. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  49. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  50. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  51. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  52. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  53. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  54. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  55. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  56. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  57. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  58. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  59. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  60. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  61. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  62. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  63. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  64. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  65. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  66. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  67. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  68. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  69. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  70. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  71. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  72. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  73. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  74. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  75. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  76. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  77. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  78. package/chunks/RealisticTree.glsl.js +18 -17
  79. package/copyright.txt +20 -0
  80. package/geometry/support/meshUtils/elevation.js +1 -1
  81. package/interfaces.d.ts +400 -58
  82. package/layers/BuildingSceneLayer.js +1 -1
  83. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  84. package/layers/IntegratedMeshLayer.js +1 -1
  85. package/layers/OrientedImageryLayer.js +1 -1
  86. package/layers/PointCloudLayer.js +1 -1
  87. package/layers/RouteLayer.js +1 -1
  88. package/layers/support/rasterFunctionUtils.d.ts +11 -0
  89. package/networks/UtilityNetwork.js +1 -1
  90. package/package.json +2 -2
  91. package/portal/Portal.js +1 -1
  92. package/rest/route.js +1 -1
  93. package/rest/support/AttributeBinsQuery.js +1 -1
  94. package/rest/support/RouteParameters.js +1 -1
  95. package/rest/support/RouteSolveResult.js +1 -1
  96. package/support/revision.js +1 -1
  97. package/views/2d/engine/webgl/TextureManager.js +1 -1
  98. package/views/2d/engine/webgl/Utils.js +1 -1
  99. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  100. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  101. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  102. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  103. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  104. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  105. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  106. package/views/3d/layers/I3SMeshView3D.js +1 -1
  107. package/views/3d/layers/support/FeatureTile.js +1 -1
  108. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  109. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  110. package/webmap/utils.js +1 -1
  111. package/widgets/BasemapLayerList.js +1 -1
  112. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  113. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  114. package/widgets/BatchAttributeForm/templates/support/contingentValuesUtils.js +5 -0
  115. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  116. package/widgets/BatchAttributeForm.js +1 -1
  117. package/widgets/CatalogLayerList.js +1 -1
  118. package/widgets/Directions/DirectionsViewModel.js +1 -1
  119. package/widgets/Directions.js +1 -1
  120. package/widgets/Editor/components/Prompt.js +1 -1
  121. package/widgets/Editor.js +1 -1
  122. package/widgets/ElevationProfile/components/LegendItem.js +1 -1
  123. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  124. package/widgets/Feature/FeatureUtilityNetworkAssociations.js +1 -1
  125. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  126. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
  127. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  128. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  129. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  130. package/widgets/LayerList.js +1 -1
  131. package/widgets/Legend/styles/support/utils.js +1 -1
  132. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  133. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  134. package/widgets/OrientedImageryViewer/digitizationUtils.js +1 -1
  135. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  136. package/widgets/OrientedImageryViewer.js +1 -1
  137. package/widgets/Sketch/SketchViewModel.js +1 -1
  138. package/widgets/Sketch/support/ResponsiveToolbar/OverflowGroup.js +1 -1
  139. package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
  140. package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
  141. package/widgets/Sketch/support/sketchUtils.js +1 -1
  142. package/widgets/Sketch.js +1 -1
  143. package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +1 -1
  144. package/assets/esri/core/workers/chunks/05ef9aee26bd91af7d72.js +0 -1
  145. package/assets/esri/core/workers/chunks/1bf646c9fc352f98d1ca.js +0 -1
  146. package/assets/esri/core/workers/chunks/25e093b845aa995c7b38.js +0 -1
  147. package/assets/esri/core/workers/chunks/3c591f76e7d6204b7780.js +0 -1
  148. package/assets/esri/core/workers/chunks/4b588886f11df145d74c.js +0 -1
  149. package/assets/esri/core/workers/chunks/6039da57a2adedd3b83f.js +0 -1
  150. package/assets/esri/core/workers/chunks/802a390c67f4cdf3d8d9.js +0 -1
  151. package/assets/esri/core/workers/chunks/842db06ce62758fab1e7.js +0 -1
  152. package/assets/esri/core/workers/chunks/86f3a004addc087ad6c6.js +0 -1
  153. package/assets/esri/core/workers/chunks/ccee343fb8c415b59ce3.js +0 -2
  154. package/assets/esri/core/workers/chunks/cf498c621dc1f865530e.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[655],{92474:(t,e,r)=>{r.d(e,{A:()=>m});var o=r(90237),s=r(49186),i=r(97768),l=r(61893),a=r(74887),n=r(67076),u=r(10107),p=r(40608);const d="loaded",h=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,a.NY)(r,e);this.destroyed&&e(new s.A("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal})}return t(),o}}))),this.when((()=>{this._set("loadStatus",d),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}destroy(){this._loadController&&(this._loadController=(0,i.DC)(this._loadController),this._promiseProps.abort()),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.A("load:cancelled","Cancelled")),this._loadController?.abort(),this._promiseProps.abort()),this}};return(0,o._)([(0,u.MZ)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,u.MZ)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,u.MZ)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,u.MZ)({type:[n.A],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,p.$)("esri.core.Loadable")],e),e};let y=class extends(h(l.A)){};var c;y=(0,o._)([(0,p.$)("esri.core.Loadable")],y),(c=y||(y={})).LoadableMixin=h,c.isLoadable=function(t){return!(!t||!t.load)};const m=y},61893:(t,e,r)=>{r.d(e,{A:()=>h});var o,s,i=r(90237),l=r(69622),a=r(74887),n=r(40608);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class u{constructor(){this._resolver=(0,a.Tw)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,a.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.Tw)(),e=[...this._resolvingPromises,t.promise],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.zf)(t)||this._resolver.reject(t)})),t.resolve()}}const p=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new u,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then((()=>this)).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,n.$)("esri.core.Promise")],e),e};let d=class extends(p(l.A)){};d=(0,i._)([(0,n.$)("esri.core.Promise")],d),function(t){t.EsriPromiseMixin=p}(d||(d={}));const h=d},20655:(t,e,r)=>{r.d(e,{A:()=>G});var o=r(90237),s=r(92602),i=r(70333),l=r(78888),a=r(49186),n=r(25482),u=r(92474),p=r(97768),d=r(74887),h=r(10107),y=r(56507),c=(r(44208),r(87811),r(36005)),m=r(40608),_=r(5443),v=r(73444);let f;var M=r(96360),g=r(16405),Z=r(69622);r(53966);let P=class extends Z.A{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.MZ)()],P.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.MZ)()],P.prototype,"queryParams",void 0),(0,o._)([(0,h.MZ)()],P.prototype,"results",void 0),(0,o._)([(0,h.MZ)()],P.prototype,"total",void 0),P=(0,o._)([(0,m.$)("esri.portal.PortalQueryResult")],P);const S=P;var O,w=r(41318),A=r(926);let C;const b={PortalGroup:()=>Promise.resolve({default:M.A}),PortalItem:()=>r.e(812).then(r.bind(r,80812)),PortalUser:()=>Promise.resolve({default:w.A})};let D=O=class extends(n.A.JSONSupportMixin(u.A)){constructor(t){super(t),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.default3DBasemapQuery=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.hasClassificationSchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.recycleBinEnabled=!1,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.A.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useDefault3dBasemap=!1,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){q.unregister(this),this.defaultBasemap=(0,p.pR)(this.defaultBasemap),this.defaultDevBasemap=(0,p.pR)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.pR)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.xt)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.A.request.trustedServers.includes(e)||s.A.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=this.user?.orgId,e=!t||this.canSearchPublic;return this.id&&!e?` AND orgid:${this.id}`:null}get hasAPIKey(){return(0,A.Jn)(this.url)}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.slice(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=w.A.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(812),r.e(3116)]).then(r.bind(r,83116)).then((({default:e})=>{(0,d.Te)(t),C=e})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t))).then((t=>{if(!this.hasAPIKey&&i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==O.AUTH_MODE_AUTO&&this.authMode!==O.AUTH_MODE_NO_PROMPT||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),q.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(6131),r.e(9953),r.e(7251),r.e(812),r.e(9186),r.e(1435)]).then(r.bind(r,68611))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if(!0===e?.include3d&&!1!==this.use3dBasemaps){const o=await this._fetchBasemaps3D(t,e);r.unshift(...o)}return r}async fetchDefault3DBasemap(t){if(!this.useDefault3dBasemap||!this.default3DBasemapQuery||"none"===this.default3DBasemapQuery)return null;const e=new g.A;e.query=this.default3DBasemapQuery,e.disableExtraQuery=!0;const r=(await this.queryItems(e,t)).results.find((t=>"Web Scene"===t.type));return r?new C({portalItem:r}):null}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.G4)(t)?Promise.reject((0,d.NK)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new g.A({num:100,sortField:"title"});if(e?.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.G4)(t)?Promise.reject((0,d.NK)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.JK)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.JK)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return f&&!f.destroyed||(f=new O),f}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.JK)().toLowerCase()},withCredentials:!0,...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this.request(o,s)}queryPortal(t,e,r,o){const s=(0,y.dp)(g.A,e),i=e=>this.request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new S({nextQueryParams:r,queryParams:s,total:t.total,results:O._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.QP)(e),t)))));return r&&b[r]?b[r]().then((({default:t})=>((0,d.Te)(o),i(t)))):i()}signIn(){if(this.hasAPIKey)return this.load().then((()=>{if(!this.user)throw new a.A("portal:not-authenticated","Unable to authenticate user. Portal.user is missing")}));if(this.authMode===O.AUTH_MODE_ANONYMOUS||this.authMode===O.AUTH_MODE_NO_PROMPT&&!i.id)return Promise.reject(new a.A("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl,{prompt:this.authMode!==O.AUTH_MODE_NO_PROMPT}).then((e=>t(e))):t(this.credential)}normalizeUrl(t){const e=this.credential?.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then((t=>{const e=O._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===O.AUTH_MODE_ANONYMOUS||this.authMode===O.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:s=null,cacheBust:i=!1,method:a="auto",responseType:n="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:a,query:r,responseType:n,timeout:0,signal:u};return e.withCredentials&&(p.withCredentials=!0),(0,l.A)(this._normalizeSSL(t),p).then((t=>t.data))}toJSON(){throw new a.A("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new O({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new a.A("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new g.A;r.query=t||(this.hasAPIKey?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,e);if(!o.total)return[];const s=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=s.sortField||"name",r.sortOrder=s.sortOrder||"desc";const i=await s.queryItems(r,e);return i.total?i.results.filter((t=>"Web Map"===t.type)).map((t=>new C({portalItem:t}))):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];if(this.hasAPIKey)return[];const o=new g.A({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,e);if(!s.total)return[];const i=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=i.sortField||"name",o.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(o,e);return l.total?l.results.filter((t=>"Web Scene"===t.type)).map((t=>new C({portalItem:t}))):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=C.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,o){let s;if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};D.AUTH_MODE_ANONYMOUS="anonymous",D.AUTH_MODE_AUTO="auto",D.AUTH_MODE_IMMEDIATE="immediate",D.AUTH_MODE_NO_PROMPT="no-prompt",(0,o._)([(0,h.MZ)()],D.prototype,"access",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"allSSL",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"authMode",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,c.w)("authorizedCrossOriginDomains")],D.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.MZ)()],D.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.MZ)({json:{name:"3DBasemapGalleryGroupQuery"}})],D.prototype,"basemapGalleryGroupQuery3D",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"bingKey",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"canListApps",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"canListData",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"canSharePublic",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.MZ)({type:Date})],D.prototype,"created",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"credential",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"culture",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"currentVersion",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"default3DBasemapQuery",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"defaultBasemap",void 0),(0,o._)([(0,c.w)("defaultBasemap")],D.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.MZ)()],D.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,c.w)("defaultDevBasemap")],D.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.MZ)({type:_.A})],D.prototype,"defaultExtent",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,c.w)("defaultVectorBasemap")],D.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.MZ)()],D.prototype,"description",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.MZ)({readOnly:!0})],D.prototype,"extraQuery",null),(0,o._)([(0,h.MZ)()],D.prototype,"featuredGroups",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"layoutGroupQuery",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.MZ)({readOnly:!0})],D.prototype,"hasAPIKey",null),(0,o._)([(0,h.MZ)()],D.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"hasClassificationSchema",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"helpBase",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"helperServices",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"helpMap",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"httpPort",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"httpsPort",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"id",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.MZ)({readOnly:!0})],D.prototype,"isOrganization",null),(0,o._)([(0,h.MZ)()],D.prototype,"isPortal",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"isReadOnly",void 0),(0,o._)([(0,h.MZ)({readOnly:!0})],D.prototype,"itemPageUrl",null),(0,o._)([(0,h.MZ)()],D.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.MZ)({type:Date})],D.prototype,"modified",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"name",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"portalHostname",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"portalMode",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"portalProperties",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"region",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"recycleBinEnabled",void 0),(0,o._)([(0,h.MZ)({readOnly:!0})],D.prototype,"restUrl",null),(0,o._)([(0,h.MZ)()],D.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"sourceJSON",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.MZ)({json:{name:"2DStylesGroupQuery"}})],D.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.MZ)({json:{name:"stylesGroupQuery"}})],D.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"thumbnail",void 0),(0,o._)([(0,h.MZ)({readOnly:!0})],D.prototype,"thumbnailUrl",null),(0,o._)([(0,h.MZ)()],D.prototype,"units",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"url",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"urlKey",void 0),(0,o._)([(0,c.w)("urlKey")],D.prototype,"readUrlKey",null),(0,o._)([(0,h.MZ)()],D.prototype,"user",void 0),(0,o._)([(0,c.w)("user")],D.prototype,"readUser",null),(0,o._)([(0,h.MZ)()],D.prototype,"use3dBasemaps",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"useDefault3dBasemap",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.MZ)()],D.prototype,"vectorBasemapGalleryGroupQuery",void 0),D=O=(0,o._)([(0,m.$)("esri.portal.Portal")],D);const G=D,q=new FinalizationRegistry((t=>{t.remove()}))},96360:(t,e,r)=>{r.d(e,{A:()=>h});var o,s=r(90237),i=r(49186),l=r(25482),a=r(10107),n=r(56507),u=(r(44208),r(87811),r(40608)),p=r(16405);let d=o=class extends l.A{constructor(t){super(t),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.sourceJSON=null,this.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.portal?.restUrl;return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return this.portal.request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return this.portal.request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new i.A("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new o({sourceJSON:t});return e.read(t),e}queryItems(t,e){let r=(0,n.dp)(p.A,t);const o=this.portal;return parseFloat(o.currentVersion)>5?(r=r||new p.A,o.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new p.A,r.query="group:"+this.id+(r.query?" "+r.query:""),o.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=this.portal;return r.fetchSelf(r.authMode,!0,e).then((t=>{const o=t.contentCategorySetsGroupQuery;if(o){const t=new p.A({disableExtraQuery:!0,num:1,query:o});return r.queryGroups(t,e)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new p.A({num:1,query:`typekeywords:"${t}"`});return o.queryItems(s,e)}throw new i.A("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t?.categorySchema;return e?.length?e:[]})):[]))}};(0,s._)([(0,a.MZ)()],d.prototype,"access",void 0),(0,s._)([(0,a.MZ)({type:Date})],d.prototype,"created",void 0),(0,s._)([(0,a.MZ)()],d.prototype,"description",void 0),(0,s._)([(0,a.MZ)()],d.prototype,"id",void 0),(0,s._)([(0,a.MZ)()],d.prototype,"isInvitationOnly",void 0),(0,s._)([(0,a.MZ)({type:Date})],d.prototype,"modified",void 0),(0,s._)([(0,a.MZ)()],d.prototype,"owner",void 0),(0,s._)([(0,a.MZ)()],d.prototype,"portal",void 0),(0,s._)([(0,a.MZ)()],d.prototype,"snippet",void 0),(0,s._)([(0,a.MZ)()],d.prototype,"sortField",void 0),(0,s._)([(0,a.MZ)()],d.prototype,"sortOrder",void 0),(0,s._)([(0,a.MZ)()],d.prototype,"sourceJSON",void 0),(0,s._)([(0,a.MZ)()],d.prototype,"tags",void 0),(0,s._)([(0,a.MZ)()],d.prototype,"thumbnail",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,s._)([(0,a.MZ)()],d.prototype,"title",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],d.prototype,"url",null),d=o=(0,s._)([(0,u.$)("esri.portal.PortalGroup")],d);const h=d},16405:(t,e,r)=>{r.d(e,{A:()=>m});var o,s=r(90237),i=r(69622),l=r(66552),a=r(4718),n=r(10107),u=(r(44208),r(53966),r(40608)),p=r(5443),d=r(16930),h=r(28735);const y=new l.J({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let c=o=class extends i.A{constructor(t){super(t),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,a.o8)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(t,e){let r=[];this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t)));let o="";if(this.extent){const t=(0,h.Cv)(this.extent,d.A.WGS84);null!=t&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>y.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,n.MZ)()],c.prototype,"categories",void 0),(0,s._)([(0,n.MZ)()],c.prototype,"disableExtraQuery",void 0),(0,s._)([(0,n.MZ)({type:p.A})],c.prototype,"extent",void 0),(0,s._)([(0,n.MZ)()],c.prototype,"filter",void 0),(0,s._)([(0,n.MZ)()],c.prototype,"num",void 0),(0,s._)([(0,n.MZ)()],c.prototype,"query",void 0),(0,s._)([(0,n.MZ)()],c.prototype,"sortField",void 0),(0,s._)([(0,n.MZ)()],c.prototype,"sortOrder",null),(0,s._)([(0,n.MZ)()],c.prototype,"start",void 0),c=o=(0,s._)([(0,u.$)("esri.portal.PortalQueryParams")],c);const m=c},41318:(t,e,r)=>{r.d(e,{A:()=>y});var o=r(90237),s=r(49186),i=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));let n=class extends i.A{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.A("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.MZ)({type:Date})],n.prototype,"created",void 0),(0,o._)([(0,l.MZ)()],n.prototype,"id",void 0),(0,o._)([(0,l.MZ)()],n.prototype,"portal",void 0),(0,o._)([(0,l.MZ)()],n.prototype,"title",void 0),(0,o._)([(0,l.MZ)({readOnly:!0})],n.prototype,"url",null),(0,o._)([(0,l.MZ)()],n.prototype,"username",void 0),n=(0,o._)([(0,a.$)("esri.portal.PortalFolder")],n);const u=n;var p,d=r(96360);let h=p=class extends i.A{constructor(t){super(t),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userLicenseTypeId=null,this.userType=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.portal?.restUrl;return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.portal?.restUrl;return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t?.data,o=t?.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal.request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}async deleteItem(t,e=!1){let r=this.userContentUrl;t.ownerFolder&&(r+="/"+t.ownerFolder);const o=e?{permanentDelete:!0}:{};await this.portal.request(r+`/items/${t.id}/delete`,{method:"post",query:o}),t.id=null,t.portal=null}async deleteItems(t,e=!1){t=t.slice();const r=this.userContentUrl+"/deleteItems",o=[],i=t.map((t=>t.id));if(i.length){const l={method:"post",query:{items:i.join(","),permanentDelete:e}},a=await this.portal.request(r,l);for(const e of a.results){const r=t.find((t=>e.itemId===t.id)),i=e.success;let l=null;i?(r.id=null,r.portal=null):e.error&&(l=new s.A("portal:delete-item-failed",e.error.message,e.error)),o.push({item:r,success:i,error:l})}}return o}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal.request(this.url??"").then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.A.fromJSON(t);return e.portal=this.portal,e})):[],e}))}async fetchItems(t){t??={};let e=this.userContentUrl??"";t.folder&&(e+="/"+t.folder.id);const{default:o}=await r.e(812).then(r.bind(r,80812)),s={folders:!1,inRecycleBin:!!t.inRecycleBin||null,foldersContent:!(t.folder||!t.includeSubfolderItems)||null,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"},i=await this.portal.request(e,{query:s});let l;return i?.items?(l=i.items.map((t=>{const e=o.fromJSON(t);return e.portal=this.portal,e})),await Promise.all(l.map((t=>t.load()))),{items:l,nextStart:i.nextStart,total:i.total}):{items:[],nextStart:-1,total:0}}fetchTags(){return this.portal.request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.A({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.A("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}async restoreItem(t,e){const r=this.userContentUrl,o=e?{folderID:"string"==typeof e?e:e.id}:null;await this.portal.request(r+`/items/${t.id}/restore`,{method:"post",query:o})}toJSON(){throw new s.A("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p({sourceJSON:t});return e.read(t),e}};(0,o._)([(0,l.MZ)()],h.prototype,"access",void 0),(0,o._)([(0,l.MZ)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"culture",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"description",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"email",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.MZ)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"portal",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"region",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"role",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.MZ)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.MZ)()],h.prototype,"units",void 0),(0,o._)([(0,l.MZ)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.MZ)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.MZ)()],h.prototype,"username",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"userLicenseTypeId",void 0),(0,o._)([(0,l.MZ)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,a.$)("esri.portal.PortalUser")],h);const y=h}}]);