@geoscene/core 4.23.9 → 4.23.12

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 (229) hide show
  1. package/assets/geoscene/core/workers/chunks/6f827a32646bab0a8777.js +1 -1
  2. package/assets/geoscene/core/workers/chunks/7f91f70ef69a7e24f8e2.js +1 -1
  3. package/assets/geoscene/core/workers/chunks/85fde4b92b0c212f5ff6.js +1 -1
  4. package/assets/geoscene/core/workers/chunks/9f458f10dc65b185f66e.js +1 -1
  5. package/assets/geoscene/themes/base/_Overlay.scss +2 -2
  6. package/assets/geoscene/themes/base/_OverlayItem.scss +12 -12
  7. package/assets/geoscene/themes/base/_Ui.scss +32 -32
  8. package/assets/geoscene/themes/base/_View.scss +31 -31
  9. package/assets/geoscene/themes/base/_animation.scss +6 -6
  10. package/assets/geoscene/themes/base/_core.scss +2 -2
  11. package/assets/geoscene/themes/base/_mixins.scss +43 -43
  12. package/assets/geoscene/themes/base/icons/style.css +190 -190
  13. package/assets/geoscene/themes/base/icons/style.scss +376 -376
  14. package/assets/geoscene/themes/base/icons/variables.scss +187 -187
  15. package/assets/geoscene/themes/base/widgets/_AreaMeasurement2D.scss +4 -4
  16. package/assets/geoscene/themes/base/widgets/_AreaMeasurement3D.scss +4 -4
  17. package/assets/geoscene/themes/base/widgets/_Attachments.scss +48 -48
  18. package/assets/geoscene/themes/base/widgets/_Attribution.scss +9 -9
  19. package/assets/geoscene/themes/base/widgets/_BasemapGallery.scss +39 -39
  20. package/assets/geoscene/themes/base/widgets/_BasemapLayerList.scss +100 -100
  21. package/assets/geoscene/themes/base/widgets/_BasemapToggle.scss +22 -22
  22. package/assets/geoscene/themes/base/widgets/_BinaryColorSizeSlider.scss +2 -2
  23. package/assets/geoscene/themes/base/widgets/_Bookmarks.scss +48 -48
  24. package/assets/geoscene/themes/base/widgets/_BuildingDisciplinesTree.scss +3 -3
  25. package/assets/geoscene/themes/base/widgets/_BuildingExplorer.scss +4 -4
  26. package/assets/geoscene/themes/base/widgets/_BuildingLevelPicker.scss +4 -4
  27. package/assets/geoscene/themes/base/widgets/_BuildingPhasePicker.scss +4 -4
  28. package/assets/geoscene/themes/base/widgets/_ButtonMenu.scss +21 -21
  29. package/assets/geoscene/themes/base/widgets/_ClassedColorSlider.scss +2 -2
  30. package/assets/geoscene/themes/base/widgets/_ClassedSizeSlider.scss +2 -2
  31. package/assets/geoscene/themes/base/widgets/_ColorPicker.scss +3 -3
  32. package/assets/geoscene/themes/base/widgets/_ColorSizeSlider.scss +2 -2
  33. package/assets/geoscene/themes/base/widgets/_ColorSlider.scss +2 -2
  34. package/assets/geoscene/themes/base/widgets/_Compass.scss +3 -3
  35. package/assets/geoscene/themes/base/widgets/_CoordinateConversion.scss +51 -51
  36. package/assets/geoscene/themes/base/widgets/_DatePicker.scss +34 -34
  37. package/assets/geoscene/themes/base/widgets/_Daylight.scss +63 -63
  38. package/assets/geoscene/themes/base/widgets/_DirectLineMeasurement3D.scss +2 -2
  39. package/assets/geoscene/themes/base/widgets/_Directions.scss +98 -98
  40. package/assets/geoscene/themes/base/widgets/_DistanceMeasurement2D.scss +2 -2
  41. package/assets/geoscene/themes/base/widgets/_Editor.scss +56 -56
  42. package/assets/geoscene/themes/base/widgets/_ElevationProfile.scss +19 -19
  43. package/assets/geoscene/themes/base/widgets/_Expand.scss +58 -58
  44. package/assets/geoscene/themes/base/widgets/_Feature.scss +13 -13
  45. package/assets/geoscene/themes/base/widgets/_FeatureContent.scss +24 -24
  46. package/assets/geoscene/themes/base/widgets/_FeatureForm.scss +36 -36
  47. package/assets/geoscene/themes/base/widgets/_FeatureMedia.scss +17 -17
  48. package/assets/geoscene/themes/base/widgets/_FeatureTable.scss +26 -26
  49. package/assets/geoscene/themes/base/widgets/_FeatureTemplates.scss +9 -9
  50. package/assets/geoscene/themes/base/widgets/_FloorFilter.scss +93 -93
  51. package/assets/geoscene/themes/base/widgets/_Grid.scss +6 -6
  52. package/assets/geoscene/themes/base/widgets/_HeatmapSlider.scss +2 -2
  53. package/assets/geoscene/themes/base/widgets/_Histogram.scss +10 -10
  54. package/assets/geoscene/themes/base/widgets/_HistogramRangeSlider.scss +27 -27
  55. package/assets/geoscene/themes/base/widgets/_IdentityForm.scss +5 -5
  56. package/assets/geoscene/themes/base/widgets/_IdentityModal.scss +13 -13
  57. package/assets/geoscene/themes/base/widgets/_ItemList.scss +18 -18
  58. package/assets/geoscene/themes/base/widgets/_LayerList.scss +89 -89
  59. package/assets/geoscene/themes/base/widgets/_Legend.scss +95 -95
  60. package/assets/geoscene/themes/base/widgets/_LineOfSight.scss +9 -9
  61. package/assets/geoscene/themes/base/widgets/_NavigationToggle.scss +14 -14
  62. package/assets/geoscene/themes/base/widgets/_OpacitySlider.scss +2 -2
  63. package/assets/geoscene/themes/base/widgets/_Popup.scss +167 -167
  64. package/assets/geoscene/themes/base/widgets/_Print.scss +52 -52
  65. package/assets/geoscene/themes/base/widgets/_ScaleBar.scss +28 -28
  66. package/assets/geoscene/themes/base/widgets/_ScaleRangeSlider.scss +29 -29
  67. package/assets/geoscene/themes/base/widgets/_Search.scss +50 -50
  68. package/assets/geoscene/themes/base/widgets/_SearchResultRenderer.scss +7 -7
  69. package/assets/geoscene/themes/base/widgets/_SelectionToolbar.scss +3 -3
  70. package/assets/geoscene/themes/base/widgets/_ShadowCast.scss +17 -17
  71. package/assets/geoscene/themes/base/widgets/_SizeSlider.scss +2 -2
  72. package/assets/geoscene/themes/base/widgets/_Sketch.scss +24 -24
  73. package/assets/geoscene/themes/base/widgets/_Slice.scss +5 -5
  74. package/assets/geoscene/themes/base/widgets/_Slider.scss +70 -70
  75. package/assets/geoscene/themes/base/widgets/_SnappingControls.scss +16 -16
  76. package/assets/geoscene/themes/base/widgets/_Spinner.scss +12 -12
  77. package/assets/geoscene/themes/base/widgets/_Swipe.scss +15 -15
  78. package/assets/geoscene/themes/base/widgets/_TableList.scss +57 -57
  79. package/assets/geoscene/themes/base/widgets/_TimePicker.scss +3 -3
  80. package/assets/geoscene/themes/base/widgets/_TimeSlider.scss +28 -28
  81. package/assets/geoscene/themes/base/widgets/_UtilityNetworkTrace.scss +8 -8
  82. package/assets/geoscene/themes/base/widgets/_Weather.scss +2 -2
  83. package/assets/geoscene/themes/base/widgets/_Widget.scss +95 -95
  84. package/assets/geoscene/themes/base/widgets/_Zoom.scss +8 -8
  85. package/assets/geoscene/themes/dark/main.css +1 -1
  86. package/assets/geoscene/themes/dark/main.scss +3 -3
  87. package/assets/geoscene/themes/dark-blue/main.css +1 -1
  88. package/assets/geoscene/themes/dark-blue/main.scss +3 -3
  89. package/assets/geoscene/themes/dark-green/main.css +1 -1
  90. package/assets/geoscene/themes/dark-green/main.scss +3 -3
  91. package/assets/geoscene/themes/dark-purple/main.css +1 -1
  92. package/assets/geoscene/themes/dark-purple/main.scss +3 -3
  93. package/assets/geoscene/themes/dark-red/main.css +1 -1
  94. package/assets/geoscene/themes/dark-red/main.scss +3 -3
  95. package/assets/geoscene/themes/light/main.css +1 -1
  96. package/assets/geoscene/themes/light/main.scss +2 -2
  97. package/assets/geoscene/themes/light/view.css +1 -1
  98. package/assets/geoscene/themes/light-blue/main.css +1 -1
  99. package/assets/geoscene/themes/light-blue/main.scss +3 -3
  100. package/assets/geoscene/themes/light-green/main.css +1 -1
  101. package/assets/geoscene/themes/light-green/main.scss +3 -3
  102. package/assets/geoscene/themes/light-purple/main.css +1 -1
  103. package/assets/geoscene/themes/light-purple/main.scss +3 -3
  104. package/assets/geoscene/themes/light-red/main.css +1 -1
  105. package/assets/geoscene/themes/light-red/main.scss +3 -3
  106. package/identity/IdentityForm.js +1 -1
  107. package/identity/IdentityManagerBase.js +1 -1
  108. package/identity/IdentityModal.js +1 -1
  109. package/interfaces.d.ts +1 -1
  110. package/package.json +1 -1
  111. package/portal/schemas/definitions.js +1 -1
  112. package/portal/schemas/sceneLayerItem.js +1 -1
  113. package/support/basemapDefinitions.js +1 -1
  114. package/support/groundUtils.js +1 -1
  115. package/symbols/support/styleUtils.js +1 -1
  116. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  117. package/views/2d/layers/support/clusterUtils.js +1 -1
  118. package/views/2d/navigation/ZoomBox.js +1 -1
  119. package/views/3d/externalRenderers.js +1 -1
  120. package/views/3d/layers/I3SMeshView3D.js +1 -1
  121. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  122. package/views/BreakpointsOwner.js +1 -1
  123. package/views/DOMContainer.js +1 -1
  124. package/views/input/BrowserEventSource.js +1 -1
  125. package/views/overlay/LineOverlayItem.js +1 -1
  126. package/views/overlay/TextOverlayItem.js +1 -1
  127. package/views/overlay/ViewOverlay.js +1 -1
  128. package/views/ui/Component.js +1 -1
  129. package/views/ui/UI.js +1 -1
  130. package/views/webgl/context-util.js +1 -1
  131. package/widgets/AreaMeasurement2D.js +1 -1
  132. package/widgets/AreaMeasurement3D.js +1 -1
  133. package/widgets/Attachments.js +1 -1
  134. package/widgets/Attribution.js +1 -1
  135. package/widgets/BasemapGallery.js +1 -1
  136. package/widgets/BasemapLayerList.js +1 -1
  137. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  138. package/widgets/BasemapToggle.js +1 -1
  139. package/widgets/Bookmarks.js +1 -1
  140. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
  141. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
  142. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  143. package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
  144. package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
  145. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  146. package/widgets/BuildingExplorer.js +1 -1
  147. package/widgets/Compass.js +1 -1
  148. package/widgets/CoordinateConversion.js +1 -1
  149. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  150. package/widgets/Daylight.js +1 -1
  151. package/widgets/DirectLineMeasurement3D.js +1 -1
  152. package/widgets/Directions/support/resources.js +1 -1
  153. package/widgets/Directions.js +1 -1
  154. package/widgets/DistanceMeasurement2D.js +1 -1
  155. package/widgets/Editor/deprecationUtils.js +1 -1
  156. package/widgets/Editor.js +1 -1
  157. package/widgets/ElevationProfile/css.js +1 -1
  158. package/widgets/Expand.js +1 -1
  159. package/widgets/Feature/FeatureAttachments.js +1 -1
  160. package/widgets/Feature/FeatureContent.js +1 -1
  161. package/widgets/Feature/FeatureExpression.js +1 -1
  162. package/widgets/Feature/FeatureFields.js +1 -1
  163. package/widgets/Feature/FeatureMedia.js +1 -1
  164. package/widgets/Feature/support/FeatureElementInfo.js +1 -1
  165. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  166. package/widgets/Feature/support/featureUtils.js +1 -1
  167. package/widgets/Feature.js +1 -1
  168. package/widgets/FeatureForm.js +1 -1
  169. package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
  170. package/widgets/FeatureTable/FieldColumn.js +1 -1
  171. package/widgets/FeatureTable/Grid/Column.js +1 -1
  172. package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
  173. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  174. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  175. package/widgets/FeatureTable.js +1 -1
  176. package/widgets/FeatureTemplates/ItemList.js +1 -1
  177. package/widgets/FeatureTemplates.js +1 -1
  178. package/widgets/FloorFilter.js +1 -1
  179. package/widgets/Fullscreen.js +1 -1
  180. package/widgets/Histogram.js +1 -1
  181. package/widgets/HistogramRangeSlider.js +1 -1
  182. package/widgets/Home.js +1 -1
  183. package/widgets/LayerList/ListItemPanel.js +1 -1
  184. package/widgets/LayerList.js +1 -1
  185. package/widgets/Legend/styles/Card.js +1 -1
  186. package/widgets/Legend/styles/Classic.js +1 -1
  187. package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
  188. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  189. package/widgets/Legend.js +1 -1
  190. package/widgets/LineOfSight.js +1 -1
  191. package/widgets/Locate.js +1 -1
  192. package/widgets/Measurement.js +1 -1
  193. package/widgets/NavigationToggle.js +1 -1
  194. package/widgets/Popup.js +1 -1
  195. package/widgets/Print.js +1 -1
  196. package/widgets/ScaleBar.js +1 -1
  197. package/widgets/ScaleRangeSlider.js +1 -1
  198. package/widgets/Search/SearchResultRenderer.js +1 -1
  199. package/widgets/Search.js +1 -1
  200. package/widgets/ShadowCast/css.js +1 -1
  201. package/widgets/Sketch.js +1 -1
  202. package/widgets/Slice.js +1 -1
  203. package/widgets/Slider.js +1 -1
  204. package/widgets/Spinner.js +1 -1
  205. package/widgets/Swipe.js +1 -1
  206. package/widgets/TableList.js +1 -1
  207. package/widgets/TimeSlider.js +1 -1
  208. package/widgets/Track.js +1 -1
  209. package/widgets/UtilityNetworkTrace.js +1 -1
  210. package/widgets/Weather/css.js +1 -1
  211. package/widgets/Widget.js +1 -1
  212. package/widgets/Zoom/IconButton.js +1 -1
  213. package/widgets/Zoom.js +1 -1
  214. package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
  215. package/widgets/smartMapping/ClassedColorSlider.js +1 -1
  216. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  217. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  218. package/widgets/smartMapping/ColorSlider.js +1 -1
  219. package/widgets/smartMapping/HeatmapSlider.js +1 -1
  220. package/widgets/smartMapping/OpacitySlider.js +1 -1
  221. package/widgets/smartMapping/SizeSlider.js +1 -1
  222. package/widgets/support/ColorPicker.js +1 -1
  223. package/widgets/support/DatePicker.js +1 -1
  224. package/widgets/support/Heading.js +1 -1
  225. package/widgets/support/Popover.js +1 -1
  226. package/widgets/support/SelectionToolbar.js +1 -1
  227. package/widgets/support/SnappingControls.js +1 -1
  228. package/widgets/support/TimePicker.js +1 -1
  229. package/widgets/support/widgetThemeUtils.js +1 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8422],{13867:(e,t,r)=>{r.d(t,{Z:()=>s});var o=r(69801);class s{constructor(e,t){this._storage=new o.WJ,this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t,r){this._storage.put(e,t,r,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}}},83379:(e,t,r)=>{r.d(t,{Z:()=>y});var o=r(43697),s=r(20102),i=r(609),l=r(95330),n=r(20941),a=r(5600),u=r(52011);const p="loaded",d=e=>{let t=class extends e{constructor(...e){super(...e),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((e=>{const t=this.load.bind(this);this.load=r=>{const o=new Promise(((e,t)=>{const o=(0,l.$F)(r,t);this.destroyed&&t(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this._promiseProps.when(e,t).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const e=this._loadController=new AbortController;t({signal:e.signal}),(0,l.fu)(e.signal,(()=>{this._promiseProps.abort()}))}return e(),o}}))),this.when((()=>{this._set("loadStatus",p),this._loadController=null}),(e=>{this._set("loadStatus","failed"),this._set("loadError",e),this._loadController=null}))}get loaded(){return this.loadStatus===p}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){var e;return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),null==(e=this._loadController)||e.abort()),this}};return(0,o._)([(0,a.Cb)({readOnly:!0})],t.prototype,"loaded",null),(0,o._)([(0,a.Cb)({readOnly:!0})],t.prototype,"loadError",void 0),(0,o._)([(0,a.Cb)({clonable:!1})],t.prototype,"loadStatus",void 0),(0,o._)([(0,a.Cb)({type:[n.Z],readOnly:!0})],t.prototype,"loadWarnings",null),t=(0,o._)([(0,u.j)("geoscene.core.Loadable")],t),t};let h=class extends(d(i.D)){};var c;h=(0,o._)([(0,u.j)("geoscene.core.Loadable")],h),(c=h||(h={})).LoadableMixin=d,c.isLoadable=function(e){return!(!e||!e.load)};const y=h},609:(e,t,r)=>{r.d(t,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(15923),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(e){this.instance=e,this._resolver=(0,a.dD)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()}))}addResolvingPromise(e){this._resolvingPromises.push(e),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.zE)())}when(e,t){return this._resolver.promise.then(e,t)}_cleanUp(){this._allPromise=this._resolvingPromises=this._allPromise=null}_tryResolve(){if(this.isFulfilled())return;const e=(0,a.dD)(),t=[...this._resolvingPromises,(0,n.j0)(e.promise)],r=this._allPromise=Promise.all(t);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve(this.instance)}),(e=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(e)||this._resolver.reject(e)})),e.resolve()}}const d=e=>{let t=class extends e{constructor(...e){super(...e),this._promiseProps=new p(this),this.addResolvingPromise(Promise.resolve())}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return new Promise(((e,t)=>{this._promiseProps.when(e,t)})).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}};return t=(0,i._)([(0,u.j)("geoscene.core.Promise")],t),t};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("geoscene.core.Promise")],h)},62357:(e,t,r)=>{r.d(t,{vW:()=>n,F2:()=>s,Wz:()=>i,t_:()=>l});const o=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function s(e){return e?e/72*96:0}function i(e){return e?72*e/96:0}function l(e){if("string"==typeof e){const t=e.match(o);if(t){const r=Number(t[1]),o=t[3]&&t[3].toLowerCase(),s="-"===e.charAt(0),l="px"===o?i(r):r;return s?-l:l}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function n(e=0,t=0){return{x:e,y:t}}},65587:(e,t,r)=>{r.d(t,{Z:()=>E});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(60235),a=r(20102),u=r(96674),p=r(83379),d=r(92604),h=r(70586),c=r(95330),y=r(5600),m=(r(67676),r(80442),r(75215)),_=r(71715),v=r(52011),b=r(6570),f=r(70171),C=r(41253),g=r(15923);let S=class extends g.Z{constructor(e){super(e),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,y.Cb)()],S.prototype,"nextQueryParams",void 0),(0,o._)([(0,y.Cb)()],S.prototype,"queryParams",void 0),(0,o._)([(0,y.Cb)()],S.prototype,"results",void 0),(0,o._)([(0,y.Cb)()],S.prototype,"total",void 0),S=(0,o._)([(0,v.j)("geoscene.portal.PortalQueryResult")],S);const P=S;var w,O=r(86082),U=r(71058);let q;const G={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>r.e(5235).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let D=w=class extends((0,u.eC)(p.Z)){constructor(e){super(e),this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=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.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.livingAtlasGroupQuery=null,this.hasCategorySchema=!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.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.Z.portalUrl,this.urlKey=null,this.user=null,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){this._geosceneId_credentialCreateHandle&&(this._geosceneId_credentialCreateHandle.remove(),this._geosceneId_credentialCreateHandle=null)}readAuthorizedCrossOriginDomains(e){if(e)for(const t of e)-1===s.Z.request.trustedServers.indexOf(t)&&s.Z.request.trustedServers.push(t);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){const e=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!e?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get restUrl(){let e=this.url;if(e){const t=e.indexOf("/sharing");e=t>0?e.substring(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get stylesGroupQuery(){return(0,n.Mr)(d.Z.getLogger(this.declaredClass),"stylesGroupQuery",{replacement:"stylesGroupQuery3d",version:"4.21"}),this.stylesGroupQuery3d}get thumbnailUrl(){const e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e?e.toLowerCase():e}readUser(e){let t=null;return e&&(t=O.default.fromJSON(e),t.portal=this),t}load(e){const t=r.e(3668).then(r.bind(r,93668)).then((({default:t})=>{(0,c.k_)(e),q=t})).then((()=>this.sourceJSON?this.sourceJSON:this._fetchSelf(this.authMode,!1,e))).then((e=>{if(i.id){const e=i.id;this.credential=e.findCredential(this.restUrl),this.credential||this.authMode!==w.AUTH_MODE_AUTO||(this._geosceneId_credentialCreateHandle=e.on("credential-create",(()=>{e.findCredential(this.restUrl)&&this._signIn()})))}this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}async createClosestFacilityTask(){(0,n.XV)(d.Z.getLogger(this.declaredClass),null,{replacement:"Use helperServices url with geoscene/rest/closestFacility",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("closestFacility");return new(0,(await Promise.all([r.e(7319),r.e(1773),r.e(5318),r.e(7055)]).then(r.bind(r,17055))).default)(e)}async createElevationLayers(){await this.load();const e=this._getHelperService("defaultElevationLayers"),t=(await Promise.all([r.e(9151),r.e(9932),r.e(2515)]).then(r.bind(r,49932))).default;return e?e.map((e=>new t({id:e.id,url:e.url}))):[]}async createGeometryService(){(0,n.XV)(d.Z.getLogger(this.declaredClass),null,{replacement:"Use helperServices url with geoscene/rest/geometryService",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("geometry");return new(0,(await r.e(5313).then(r.bind(r,85313))).default)({url:e})}async createPrintTask(){(0,n.XV)(d.Z.getLogger(this.declaredClass),null,{replacement:"Use helperServices url with geoscene/rest/print",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("printTask");return new(0,(await Promise.all([r.e(7319),r.e(1773),r.e(6619)]).then(r.bind(r,16619))).default)(e)}async createRouteTask(){(0,n.XV)(d.Z.getLogger(this.declaredClass),null,{replacement:"Use helperServices url with geoscene/rest/route",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("route");return new(0,(await Promise.all([r.e(7319),r.e(1773),r.e(5318),r.e(8234)]).then(r.bind(r,8234))).default)(e)}async createServiceAreaTask(){(0,n.XV)(d.Z.getLogger(this.declaredClass),null,{replacement:"Use helperServices url with geoscene/rest/serviceArea",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("serviceArea");return new(0,(await Promise.all([r.e(7319),r.e(1773),r.e(5318),r.e(7039)]).then(r.bind(r,57039))).default)(e)}fetchBasemaps(e,t){const r=new C.Z;return r.query=e||(s.Z.apiKey&&(0,U.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0,this.queryGroups(r,t).then((e=>{if(r.num=100,r.query='type:"Web Map" -type:"Web Application"',e.total){const o=e.results[0];return r.sortField=o.sortField||"name",r.sortOrder=o.sortOrder||"desc",o.queryItems(r,t)}return null})).then((e=>{let t;return t=e&&e.total?e.results.filter((e=>"Web Map"===e.type)).map((e=>new q({portalItem:e}))):[],t}))}fetchCategorySchema(e){return this.hasCategorySchema?this._request(this.restUrl+"/portals/self/categorySchema",e).then((e=>e.categorySchema)):(0,c.Hc)(e)?Promise.reject((0,c.zE)()):Promise.resolve([])}fetchFeaturedGroups(e){const t=this.featuredGroups,r=new C.Z;if(r.num=100,r.sortField="title",t&&t.length){const o=[];for(const e of t)o.push(`(title:"${e.title}" AND owner:${e.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,e).then((e=>e.results))}return(0,c.Hc)(e)?Promise.reject((0,c.zE)()):Promise.resolve([])}fetchRegions(e){var t;const r=(null==(t=this.user)?void 0:t.culture)||this.culture||(0,f.Kd)();return this._request(this.restUrl+"/portals/regions",{...e,query:{culture:r}})}fetchSettings(e){var t;const r=(null==(t=this.user)?void 0:t.culture)||this.culture||(0,f.Kd)();return this._request(this.restUrl+"/portals/self/settings",{...e,query:{culture:r}})}static getDefault(){return w._default&&!w._default.destroyed||(w._default=new w),w._default}queryGroups(e,t){return this._queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this._queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||(e.sortField="username"),this._queryPortal("/community/users",e,"PortalUser",t)}toJSON(){throw new a.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new w({sourceJSON:e})}_getHelperService(e){const t=this.helperServices&&this.helperServices[e];if(!t)throw new a.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}_getHelperServiceUrl(e){const t=this._getHelperService(e);if(!t.url)throw new a.Z("portal:service-url-not-found",`The \`helperServices\` entry "${e}" does not include a \`url\` value`);return t.url}_fetchSelf(e=this.authMode,t=!1,r){const o=this.restUrl+"/portals/self",s={authMode:e,query:{culture:(0,f.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),t&&(s.query.default=!0),this._request(o,s)}_queryPortal(e,t,r,o){const s=(0,m.se)(C.Z,t),i=t=>this._request(this.restUrl+e,{...s.toRequestOptions(this),...o}).then((e=>{const r=s.clone();return r.start=e.nextStart,new P({nextQueryParams:r,queryParams:s,total:e.total,results:w._resultsToTypedArray(t,{portal:this},e,o)})})).then((e=>Promise.all(e.results.map((t=>"function"==typeof t.when?t.when():e))).then((()=>e),(t=>((0,c.r9)(t),e)))));return r&&G[r]?G[r]().then((({default:e})=>((0,c.k_)(o),i(e)))):i()}_signIn(){if(this.authMode===w.AUTH_MODE_ANONYMOUS)return Promise.reject(new a.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const e=e=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(e||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=e,this._fetchSelf("immediate")))):this.user&&this.credential===e?null:(this.credential=e,this._fetchSelf("immediate")))).then((e=>{e&&(this.sourceJSON=e,this.read(e))}));return i.id?i.id.getCredential(this.restUrl).then((t=>e(t))):e(this.credential)}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_normalizeUrl(e){const t=this.credential&&this.credential.token;return this._normalizeSSL(t?e+(e.indexOf("?")>-1?"&":"?")+"token="+t:e)}_requestToTypedArray(e,t,r){return this._request(e,t).then((e=>{const t=w._resultsToTypedArray(r,{portal:this},e);return Promise.all(t.map((t=>"function"==typeof t.when?t.when():e))).then((()=>t),(()=>t))}))}_readBasemap(e){if(e){const t=q.fromJSON(e);return t.portalItem={portal:this},t}return null}_request(e,t={}){const r={f:"json",...t.query},{authMode:o=(this.authMode===w.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=t,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(e),p).then((e=>e.data))}static _resultsToTypedArray(e,t,r,o){let s;if(r){const i=(0,h.pC)(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,(e||t)&&(s=s.map((r=>{const o=Object.assign(e?e.fromJSON(r):r,t);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",(0,o._)([(0,y.Cb)()],D.prototype,"access",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"allSSL",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"authMode",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,_.r)("authorizedCrossOriginDomains")],D.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,y.Cb)()],D.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"bingKey",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canListApps",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canListData",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canSearchPublic",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canShareBingPublic",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canSharePublic",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canSignInIDP",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"commentsEnabled",void 0),(0,o._)([(0,y.Cb)({type:Date})],D.prototype,"created",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"credential",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"culture",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"currentVersion",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"customBaseUrl",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"defaultBasemap",void 0),(0,o._)([(0,_.r)("defaultBasemap")],D.prototype,"readDefaultBasemap",null),(0,o._)([(0,y.Cb)()],D.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,_.r)("defaultDevBasemap")],D.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,y.Cb)({type:b.Z})],D.prototype,"defaultExtent",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,_.r)("defaultVectorBasemap")],D.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,y.Cb)()],D.prototype,"description",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"eueiEnabled",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],D.prototype,"extraQuery",null),(0,o._)([(0,y.Cb)()],D.prototype,"featuredGroups",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"hasCategorySchema",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"helpBase",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"helperServices",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"helpMap",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"httpPort",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"httpsPort",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"id",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"ipCntryCode",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],D.prototype,"isOrganization",null),(0,o._)([(0,y.Cb)()],D.prototype,"isPortal",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"isReadOnly",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,y.Cb)({type:Date})],D.prototype,"modified",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"name",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"portalHostname",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"portalMode",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"portalProperties",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"region",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],D.prototype,"restUrl",null),(0,o._)([(0,y.Cb)()],D.prototype,"rotatorPanels",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"showHomePageDescription",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"sourceJSON",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"staticImagesUrl",void 0),(0,o._)([(0,y.Cb)({readOnly:!0,json:{read:!1}})],D.prototype,"stylesGroupQuery",null),(0,o._)([(0,y.Cb)({json:{name:"2DStylesGroupQuery"}})],D.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,y.Cb)({json:{name:"stylesGroupQuery"}})],D.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"supportsHostedServices",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"thumbnail",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],D.prototype,"thumbnailUrl",null),(0,o._)([(0,y.Cb)()],D.prototype,"units",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"url",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"urlKey",void 0),(0,o._)([(0,_.r)("urlKey")],D.prototype,"readUrlKey",null),(0,o._)([(0,y.Cb)()],D.prototype,"user",void 0),(0,o._)([(0,_.r)("user")],D.prototype,"readUser",null),(0,o._)([(0,y.Cb)()],D.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"vectorBasemapGalleryGroupQuery",void 0),D=w=(0,o._)([(0,v.j)("geoscene.portal.Portal")],D);const E=D},68916:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(67676),r(80442),r(75215)),a=r(52011),u=r(41253);let p=class extends i.wq{constructor(e){super(e),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.tags=null,this.title=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get url(){const e=this.get("portal.restUrl");return e?e+"/community/groups/"+this.id:null}fetchCategorySchema(e){return this.portal._request(this.url+"/categorySchema",e).then((t=>{const r=t.categorySchema||[];return r.some((e=>"contentCategorySetsGroupQuery.LivingAtlas"===e.source))?this._fetchCategorySchemaSet("LivingAtlas",e):r}))}fetchMembers(e){return this.portal._request(this.url+"/users",e)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(e,t){let r=(0,n.se)(u.Z,e);return parseFloat(this.portal.currentVersion)>5?(r=r||new u.Z,this.portal._queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",t)):(r=r?r.clone():new u.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),this.portal.queryItems(r,t))}_fetchCategorySchemaSet(e,t){return this.portal._fetchSelf(this.portal.authMode,!0,t).then((e=>{const r=e.contentCategorySetsGroupQuery;if(r){const e=new u.Z;return e.disableExtraQuery=!0,e.num=1,e.query=r,this.portal.queryGroups(e,t)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new u.Z;return s.num=1,s.query=`typekeywords:"${e}"`,o.queryItems(s,t)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((e=>e.total?e.results[0].fetchData("json",t).then((e=>{const t=e&&e.categorySchema;return t&&t.length?t:[]})):[]))}};(0,o._)([(0,l.Cb)()],p.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],p.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"isInvitationOnly",void 0),(0,o._)([(0,l.Cb)({type:Date})],p.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"owner",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"snippet",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"sortField",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"sortOrder",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"tags",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],p.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],p.prototype,"url",null),p=(0,o._)([(0,a.j)("geoscene.portal.PortalGroup")],p);const d=p},41253:(e,t,r)=>{r.d(t,{Z:()=>_});var o,s=r(43697),i=r(15923),l=r(35454),n=r(22974),a=r(70586),u=r(5600),p=(r(75215),r(52011)),d=r(6570),h=r(82971),c=r(40488);const y=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let m=o=class extends i.Z{constructor(e){super(e),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(e){"asc"!==e&&"desc"!==e||this._set("sortOrder",e)}clone(){return new o({categories:this.categories?(0,n.d9)(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(e,t){let r,o;if(this.categories&&(r=this.categories.map((e=>Array.isArray(e)?JSON.stringify(e):e))),this.extent){const e=(0,c.iV)(this.extent,h.Z.WGS84);(0,a.pC)(e)&&(o=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`)}let s=this.query;!this.disableExtraQuery&&e.extraQuery&&(s="("+s+")"+e.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((e=>y.toJSON(e.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...t,...i}}}};(0,s._)([(0,u.Cb)()],m.prototype,"categories",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"disableExtraQuery",void 0),(0,s._)([(0,u.Cb)({type:d.Z})],m.prototype,"extent",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"filter",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"num",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"query",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"sortField",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"sortOrder",null),(0,s._)([(0,u.Cb)()],m.prototype,"start",void 0),m=o=(0,s._)([(0,p.j)("geoscene.portal.PortalQueryParams")],m);const _=m},86082:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(67676),r(80442),r(75215),r(52011));let a=class extends i.wq{constructor(e){super(e),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const e=this.get("portal.restUrl");return e?`${e}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("geoscene.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...e){super(...e),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.userType=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userContentUrl(){const e=this.get("portal.restUrl");return e?`${e}/content/users/${this.username}`:null}get url(){const e=this.get("portal.restUrl");return e?`${e}/community/users/${this.username}`:null}addItem(e){const t=e&&e.item,r=e&&e.data,o=e&&e.folder,s={method:"post"};t&&(s.query=t.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((e=>(t.id=e.id,t.portal=this.portal,t.loaded?t.reload():t.load())))}deleteItem(e){let t=this.userContentUrl;return e.ownerFolder&&(t+="/"+e.ownerFolder),this.portal._request(t+`/items/${e.id}/delete`,{method:"post"}).then((()=>{e.id=null,e.portal=null}))}deleteItems(e){const t=this.userContentUrl+"/deleteItems",r=e.map((e=>e.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal._request(t,o).then((()=>{e.forEach((e=>{e.id=null,e.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal._request(this.userContentUrl,{query:{num:1}}).then((e=>{let t;return t=e&&e.folders?e.folders.map((e=>{const t=u.fromJSON(e);return t.portal=this.portal,t})):[],t}))}fetchGroups(){return this.portal._request(this.url).then((e=>{let t;return t=e&&e.groups?e.groups.map((e=>{const t=d.default.fromJSON(e);return t.portal=this.portal,t})):[],t}))}fetchItems(e){e||(e={});let t,o=this.userContentUrl;return e.folder&&(o+="/"+e.folder.id),r.e(5235).then(r.bind(r,15235)).then((({default:r})=>{t=r;const s={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal._request(o,{query:s})})).then((e=>{let r;return e&&e.items?(r=e.items.map((e=>{const r=t.fromJSON(e);return r.portal=this.portal,r})),Promise.all(r.map((e=>e.load()))).catch((e=>e)).then((()=>({items:r,nextStart:e.nextStart,total:e.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal._request(this.url+"/tags").then((e=>e.tags))}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}queryFavorites(e){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(e)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const t=new p;return t.sourceJSON=e,t.read(e),t}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("geoscene.portal.PortalUser")],h);const c=h},27391:(e,t,r)=>{r.d(t,{wm:()=>v,n2:()=>d,KV:()=>h,EJ:()=>y,v9:()=>c});var o=r(3172),s=r(20102),i=r(95330),l=r(17452),n=r(65587),a=r(41253),u=r(80442);const p={};function d(e,t,r){return e.styleUrl?async function(e,t){try{return{data:(await y(e,t)).data,baseUrl:(0,l.Yd)(e),styleUrl:e}}catch(e){return(0,i.r9)(e),null}}(e.styleUrl,r):e.styleName?function(e,t,r){const o=t&&t.portal||n.Z.getDefault();let i;const l=`${o.url} - ${o.user&&o.user.username} - ${e}`;return p[l]||(p[l]=function(e,t,r){return t.load(r).then((()=>{const o=new a.Z({disableExtraQuery:!0,query:`owner:${m} AND type:${_} AND typekeywords:"${e}"`});return t.queryItems(o,r)})).then((({results:t})=>{let o=null;const i=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t)if(e.typeKeywords.some((e=>e.toLowerCase()===i))&&e.type===_&&e.owner===m){o=e;break}if(!o)throw new s.Z("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return o.load(r)}))}(e,o,r).then((e=>(i=e,e.fetchData()))).then((t=>({data:t,baseUrl:i.itemUrl,styleName:e})))),p[l]}(e.styleName,t,r):Promise.reject(new s.Z("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function h(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function c(e,t){if("cimRef"===t)return e.cimRef;if(e.formatInfos&&!(0,u.Z)("enable-feature:force-wosr"))for(const t of e.formatInfos)if("gltf"===t.type)return t.href;return e.webRef}function y(e,t){const r={responseType:"json",query:{f:"json"},...t};return(0,o.default)((0,l.Fv)(e),r)}const m="esri_en",_="Style",v="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8422],{13867:(e,t,r)=>{r.d(t,{Z:()=>s});var o=r(69801);class s{constructor(e,t){this._storage=new o.WJ,this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t,r){this._storage.put(e,t,r,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}}},83379:(e,t,r)=>{r.d(t,{Z:()=>y});var o=r(43697),s=r(20102),i=r(609),l=r(95330),n=r(20941),a=r(5600),u=r(52011);const p="loaded",d=e=>{let t=class extends e{constructor(...e){super(...e),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((e=>{const t=this.load.bind(this);this.load=r=>{const o=new Promise(((e,t)=>{const o=(0,l.$F)(r,t);this.destroyed&&t(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this._promiseProps.when(e,t).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const e=this._loadController=new AbortController;t({signal:e.signal}),(0,l.fu)(e.signal,(()=>{this._promiseProps.abort()}))}return e(),o}}))),this.when((()=>{this._set("loadStatus",p),this._loadController=null}),(e=>{this._set("loadStatus","failed"),this._set("loadError",e),this._loadController=null}))}get loaded(){return this.loadStatus===p}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){var e;return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),null==(e=this._loadController)||e.abort()),this}};return(0,o._)([(0,a.Cb)({readOnly:!0})],t.prototype,"loaded",null),(0,o._)([(0,a.Cb)({readOnly:!0})],t.prototype,"loadError",void 0),(0,o._)([(0,a.Cb)({clonable:!1})],t.prototype,"loadStatus",void 0),(0,o._)([(0,a.Cb)({type:[n.Z],readOnly:!0})],t.prototype,"loadWarnings",null),t=(0,o._)([(0,u.j)("geoscene.core.Loadable")],t),t};let h=class extends(d(i.D)){};var c;h=(0,o._)([(0,u.j)("geoscene.core.Loadable")],h),(c=h||(h={})).LoadableMixin=d,c.isLoadable=function(e){return!(!e||!e.load)};const y=h},609:(e,t,r)=>{r.d(t,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(15923),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(e){this.instance=e,this._resolver=(0,a.dD)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()}))}addResolvingPromise(e){this._resolvingPromises.push(e),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.zE)())}when(e,t){return this._resolver.promise.then(e,t)}_cleanUp(){this._allPromise=this._resolvingPromises=this._allPromise=null}_tryResolve(){if(this.isFulfilled())return;const e=(0,a.dD)(),t=[...this._resolvingPromises,(0,n.j0)(e.promise)],r=this._allPromise=Promise.all(t);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve(this.instance)}),(e=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(e)||this._resolver.reject(e)})),e.resolve()}}const d=e=>{let t=class extends e{constructor(...e){super(...e),this._promiseProps=new p(this),this.addResolvingPromise(Promise.resolve())}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return new Promise(((e,t)=>{this._promiseProps.when(e,t)})).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}};return t=(0,i._)([(0,u.j)("geoscene.core.Promise")],t),t};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("geoscene.core.Promise")],h)},62357:(e,t,r)=>{r.d(t,{vW:()=>n,F2:()=>s,Wz:()=>i,t_:()=>l});const o=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function s(e){return e?e/72*96:0}function i(e){return e?72*e/96:0}function l(e){if("string"==typeof e){const t=e.match(o);if(t){const r=Number(t[1]),o=t[3]&&t[3].toLowerCase(),s="-"===e.charAt(0),l="px"===o?i(r):r;return s?-l:l}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function n(e=0,t=0){return{x:e,y:t}}},65587:(e,t,r)=>{r.d(t,{Z:()=>E});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(60235),a=r(20102),u=r(96674),p=r(83379),d=r(92604),h=r(70586),c=r(95330),y=r(5600),m=(r(67676),r(80442),r(75215)),_=r(71715),v=r(52011),b=r(6570),f=r(70171),C=r(41253),g=r(15923);let S=class extends g.Z{constructor(e){super(e),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,y.Cb)()],S.prototype,"nextQueryParams",void 0),(0,o._)([(0,y.Cb)()],S.prototype,"queryParams",void 0),(0,o._)([(0,y.Cb)()],S.prototype,"results",void 0),(0,o._)([(0,y.Cb)()],S.prototype,"total",void 0),S=(0,o._)([(0,v.j)("geoscene.portal.PortalQueryResult")],S);const P=S;var w,O=r(86082),U=r(71058);let q;const G={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>r.e(5235).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let D=w=class extends((0,u.eC)(p.Z)){constructor(e){super(e),this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=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.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.livingAtlasGroupQuery=null,this.hasCategorySchema=!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.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=s.Z.portalUrl,this.urlKey=null,this.user=null,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){this._geosceneId_credentialCreateHandle&&(this._geosceneId_credentialCreateHandle.remove(),this._geosceneId_credentialCreateHandle=null)}readAuthorizedCrossOriginDomains(e){if(e)for(const t of e)-1===s.Z.request.trustedServers.indexOf(t)&&s.Z.request.trustedServers.push(t);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){const e=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!e?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get restUrl(){let e=this.url;if(e){const t=e.indexOf("/sharing");e=t>0?e.substring(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get stylesGroupQuery(){return(0,n.Mr)(d.Z.getLogger(this.declaredClass),"stylesGroupQuery",{replacement:"stylesGroupQuery3d",version:"4.21"}),this.stylesGroupQuery3d}get thumbnailUrl(){const e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e?e.toLowerCase():e}readUser(e){let t=null;return e&&(t=O.default.fromJSON(e),t.portal=this),t}load(e){const t=r.e(3668).then(r.bind(r,93668)).then((({default:t})=>{(0,c.k_)(e),q=t})).then((()=>this.sourceJSON?this.sourceJSON:this._fetchSelf(this.authMode,!1,e))).then((e=>{if(i.id){const e=i.id;this.credential=e.findCredential(this.restUrl),this.credential||this.authMode!==w.AUTH_MODE_AUTO||(this._geosceneId_credentialCreateHandle=e.on("credential-create",(()=>{e.findCredential(this.restUrl)&&this._signIn()})))}this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}async createClosestFacilityTask(){(0,n.XV)(d.Z.getLogger(this.declaredClass),null,{replacement:"Use helperServices url with geoscene/rest/closestFacility",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("closestFacility");return new(0,(await Promise.all([r.e(7319),r.e(1773),r.e(5318),r.e(7055)]).then(r.bind(r,17055))).default)(e)}async createElevationLayers(){await this.load();const e=this._getHelperService("defaultElevationLayers"),t=(await Promise.all([r.e(9151),r.e(9932),r.e(2515)]).then(r.bind(r,49932))).default;return e?e.map((e=>new t({id:e.id,url:e.url}))):[]}async createGeometryService(){(0,n.XV)(d.Z.getLogger(this.declaredClass),null,{replacement:"Use helperServices url with geoscene/rest/geometryService",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("geometry");return new(0,(await r.e(5313).then(r.bind(r,85313))).default)({url:e})}async createPrintTask(){(0,n.XV)(d.Z.getLogger(this.declaredClass),null,{replacement:"Use helperServices url with geoscene/rest/print",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("printTask");return new(0,(await Promise.all([r.e(7319),r.e(1773),r.e(6619)]).then(r.bind(r,16619))).default)(e)}async createRouteTask(){(0,n.XV)(d.Z.getLogger(this.declaredClass),null,{replacement:"Use helperServices url with geoscene/rest/route",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("route");return new(0,(await Promise.all([r.e(7319),r.e(1773),r.e(5318),r.e(8234)]).then(r.bind(r,8234))).default)(e)}async createServiceAreaTask(){(0,n.XV)(d.Z.getLogger(this.declaredClass),null,{replacement:"Use helperServices url with geoscene/rest/serviceArea",version:"4.21"}),await this.load();const e=this._getHelperServiceUrl("serviceArea");return new(0,(await Promise.all([r.e(7319),r.e(1773),r.e(5318),r.e(7039)]).then(r.bind(r,57039))).default)(e)}fetchBasemaps(e,t){const r=new C.Z;return r.query=e||(s.Z.apiKey&&(0,U.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0,this.queryGroups(r,t).then((e=>{if(r.num=100,r.query='type:"Web Map" -type:"Web Application"',e.total){const o=e.results[0];return r.sortField=o.sortField||"name",r.sortOrder=o.sortOrder||"desc",o.queryItems(r,t)}return null})).then((e=>{let t;return t=e&&e.total?e.results.filter((e=>"Web Map"===e.type)).map((e=>new q({portalItem:e}))):[],t}))}fetchCategorySchema(e){return this.hasCategorySchema?this._request(this.restUrl+"/portals/self/categorySchema",e).then((e=>e.categorySchema)):(0,c.Hc)(e)?Promise.reject((0,c.zE)()):Promise.resolve([])}fetchFeaturedGroups(e){const t=this.featuredGroups,r=new C.Z;if(r.num=100,r.sortField="title",t&&t.length){const o=[];for(const e of t)o.push(`(title:"${e.title}" AND owner:${e.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,e).then((e=>e.results))}return(0,c.Hc)(e)?Promise.reject((0,c.zE)()):Promise.resolve([])}fetchRegions(e){var t;const r=(null==(t=this.user)?void 0:t.culture)||this.culture||(0,f.Kd)();return this._request(this.restUrl+"/portals/regions",{...e,query:{culture:r}})}fetchSettings(e){var t;const r=(null==(t=this.user)?void 0:t.culture)||this.culture||(0,f.Kd)();return this._request(this.restUrl+"/portals/self/settings",{...e,query:{culture:r}})}static getDefault(){return w._default&&!w._default.destroyed||(w._default=new w),w._default}queryGroups(e,t){return this._queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this._queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||(e.sortField="username"),this._queryPortal("/community/users",e,"PortalUser",t)}toJSON(){throw new a.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new w({sourceJSON:e})}_getHelperService(e){const t=this.helperServices&&this.helperServices[e];if(!t)throw new a.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}_getHelperServiceUrl(e){const t=this._getHelperService(e);if(!t.url)throw new a.Z("portal:service-url-not-found",`The \`helperServices\` entry "${e}" does not include a \`url\` value`);return t.url}_fetchSelf(e=this.authMode,t=!1,r){const o=this.restUrl+"/portals/self",s={authMode:e,query:{culture:(0,f.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),t&&(s.query.default=!0),this._request(o,s)}_queryPortal(e,t,r,o){const s=(0,m.se)(C.Z,t),i=t=>this._request(this.restUrl+e,{...s.toRequestOptions(this),...o}).then((e=>{const r=s.clone();return r.start=e.nextStart,new P({nextQueryParams:r,queryParams:s,total:e.total,results:w._resultsToTypedArray(t,{portal:this},e,o)})})).then((e=>Promise.all(e.results.map((t=>"function"==typeof t.when?t.when():e))).then((()=>e),(t=>((0,c.r9)(t),e)))));return r&&G[r]?G[r]().then((({default:e})=>((0,c.k_)(o),i(e)))):i()}_signIn(){if(this.authMode===w.AUTH_MODE_ANONYMOUS)return Promise.reject(new a.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const e=e=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(e||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=e,this._fetchSelf("immediate")))):this.user&&this.credential===e?null:(this.credential=e,this._fetchSelf("immediate")))).then((e=>{e&&(this.sourceJSON=e,this.read(e))}));return i.id?i.id.getCredential(this.restUrl).then((t=>e(t))):e(this.credential)}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_normalizeUrl(e){const t=this.credential&&this.credential.token;return this._normalizeSSL(t?e+(e.indexOf("?")>-1?"&":"?")+"token="+t:e)}_requestToTypedArray(e,t,r){return this._request(e,t).then((e=>{const t=w._resultsToTypedArray(r,{portal:this},e);return Promise.all(t.map((t=>"function"==typeof t.when?t.when():e))).then((()=>t),(()=>t))}))}_readBasemap(e){if(e){const t=q.fromJSON(e);return t.portalItem={portal:this},t}return null}_request(e,t={}){const r={f:"json",...t.query},{authMode:o=(this.authMode===w.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=t,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(e),p).then((e=>e.data))}static _resultsToTypedArray(e,t,r,o){let s;if(r){const i=(0,h.pC)(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,(e||t)&&(s=s.map((r=>{const o=Object.assign(e?e.fromJSON(r):r,t);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",(0,o._)([(0,y.Cb)()],D.prototype,"access",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"allSSL",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"authMode",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,_.r)("authorizedCrossOriginDomains")],D.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,y.Cb)()],D.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"bingKey",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canListApps",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canListData",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canSearchPublic",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canShareBingPublic",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canSharePublic",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"canSignInIDP",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"commentsEnabled",void 0),(0,o._)([(0,y.Cb)({type:Date})],D.prototype,"created",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"credential",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"culture",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"currentVersion",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"customBaseUrl",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"defaultBasemap",void 0),(0,o._)([(0,_.r)("defaultBasemap")],D.prototype,"readDefaultBasemap",null),(0,o._)([(0,y.Cb)()],D.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,_.r)("defaultDevBasemap")],D.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,y.Cb)({type:b.Z})],D.prototype,"defaultExtent",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,_.r)("defaultVectorBasemap")],D.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,y.Cb)()],D.prototype,"description",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"eueiEnabled",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],D.prototype,"extraQuery",null),(0,o._)([(0,y.Cb)()],D.prototype,"featuredGroups",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"hasCategorySchema",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"helpBase",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"helperServices",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"helpMap",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"httpPort",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"httpsPort",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"id",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"ipCntryCode",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],D.prototype,"isOrganization",null),(0,o._)([(0,y.Cb)()],D.prototype,"isPortal",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"isReadOnly",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,y.Cb)({type:Date})],D.prototype,"modified",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"name",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"portalHostname",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"portalMode",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"portalProperties",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"region",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],D.prototype,"restUrl",null),(0,o._)([(0,y.Cb)()],D.prototype,"rotatorPanels",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"showHomePageDescription",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"sourceJSON",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"staticImagesUrl",void 0),(0,o._)([(0,y.Cb)({readOnly:!0,json:{read:!1}})],D.prototype,"stylesGroupQuery",null),(0,o._)([(0,y.Cb)({json:{name:"2DStylesGroupQuery"}})],D.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,y.Cb)({json:{name:"stylesGroupQuery"}})],D.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"supportsHostedServices",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"thumbnail",void 0),(0,o._)([(0,y.Cb)({readOnly:!0})],D.prototype,"thumbnailUrl",null),(0,o._)([(0,y.Cb)()],D.prototype,"units",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"url",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"urlKey",void 0),(0,o._)([(0,_.r)("urlKey")],D.prototype,"readUrlKey",null),(0,o._)([(0,y.Cb)()],D.prototype,"user",void 0),(0,o._)([(0,_.r)("user")],D.prototype,"readUser",null),(0,o._)([(0,y.Cb)()],D.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,y.Cb)()],D.prototype,"vectorBasemapGalleryGroupQuery",void 0),D=w=(0,o._)([(0,v.j)("geoscene.portal.Portal")],D);const E=D},68916:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(67676),r(80442),r(75215)),a=r(52011),u=r(41253);let p=class extends i.wq{constructor(e){super(e),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.tags=null,this.title=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get url(){const e=this.get("portal.restUrl");return e?e+"/community/groups/"+this.id:null}fetchCategorySchema(e){return this.portal._request(this.url+"/categorySchema",e).then((t=>{const r=t.categorySchema||[];return r.some((e=>"contentCategorySetsGroupQuery.LivingAtlas"===e.source))?this._fetchCategorySchemaSet("LivingAtlas",e):r}))}fetchMembers(e){return this.portal._request(this.url+"/users",e)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(e,t){let r=(0,n.se)(u.Z,e);return parseFloat(this.portal.currentVersion)>5?(r=r||new u.Z,this.portal._queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",t)):(r=r?r.clone():new u.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),this.portal.queryItems(r,t))}_fetchCategorySchemaSet(e,t){return this.portal._fetchSelf(this.portal.authMode,!0,t).then((e=>{const r=e.contentCategorySetsGroupQuery;if(r){const e=new u.Z;return e.disableExtraQuery=!0,e.num=1,e.query=r,this.portal.queryGroups(e,t)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new u.Z;return s.num=1,s.query=`typekeywords:"${e}"`,o.queryItems(s,t)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((e=>e.total?e.results[0].fetchData("json",t).then((e=>{const t=e&&e.categorySchema;return t&&t.length?t:[]})):[]))}};(0,o._)([(0,l.Cb)()],p.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],p.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"isInvitationOnly",void 0),(0,o._)([(0,l.Cb)({type:Date})],p.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"owner",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"snippet",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"sortField",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"sortOrder",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"tags",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],p.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],p.prototype,"url",null),p=(0,o._)([(0,a.j)("geoscene.portal.PortalGroup")],p);const d=p},41253:(e,t,r)=>{r.d(t,{Z:()=>_});var o,s=r(43697),i=r(15923),l=r(35454),n=r(22974),a=r(70586),u=r(5600),p=(r(75215),r(52011)),d=r(6570),h=r(82971),c=r(40488);const y=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let m=o=class extends i.Z{constructor(e){super(e),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(e){"asc"!==e&&"desc"!==e||this._set("sortOrder",e)}clone(){return new o({categories:this.categories?(0,n.d9)(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(e,t){let r,o;if(this.categories&&(r=this.categories.map((e=>Array.isArray(e)?JSON.stringify(e):e))),this.extent){const e=(0,c.iV)(this.extent,h.Z.WGS84);(0,a.pC)(e)&&(o=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`)}let s=this.query;!this.disableExtraQuery&&e.extraQuery&&(s="("+s+")"+e.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((e=>y.toJSON(e.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...t,...i}}}};(0,s._)([(0,u.Cb)()],m.prototype,"categories",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"disableExtraQuery",void 0),(0,s._)([(0,u.Cb)({type:d.Z})],m.prototype,"extent",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"filter",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"num",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"query",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"sortField",void 0),(0,s._)([(0,u.Cb)()],m.prototype,"sortOrder",null),(0,s._)([(0,u.Cb)()],m.prototype,"start",void 0),m=o=(0,s._)([(0,p.j)("geoscene.portal.PortalQueryParams")],m);const _=m},86082:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(67676),r(80442),r(75215),r(52011));let a=class extends i.wq{constructor(e){super(e),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const e=this.get("portal.restUrl");return e?`${e}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("geoscene.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...e){super(...e),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.userType=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userContentUrl(){const e=this.get("portal.restUrl");return e?`${e}/content/users/${this.username}`:null}get url(){const e=this.get("portal.restUrl");return e?`${e}/community/users/${this.username}`:null}addItem(e){const t=e&&e.item,r=e&&e.data,o=e&&e.folder,s={method:"post"};t&&(s.query=t.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((e=>(t.id=e.id,t.portal=this.portal,t.loaded?t.reload():t.load())))}deleteItem(e){let t=this.userContentUrl;return e.ownerFolder&&(t+="/"+e.ownerFolder),this.portal._request(t+`/items/${e.id}/delete`,{method:"post"}).then((()=>{e.id=null,e.portal=null}))}deleteItems(e){const t=this.userContentUrl+"/deleteItems",r=e.map((e=>e.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal._request(t,o).then((()=>{e.forEach((e=>{e.id=null,e.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal._request(this.userContentUrl,{query:{num:1}}).then((e=>{let t;return t=e&&e.folders?e.folders.map((e=>{const t=u.fromJSON(e);return t.portal=this.portal,t})):[],t}))}fetchGroups(){return this.portal._request(this.url).then((e=>{let t;return t=e&&e.groups?e.groups.map((e=>{const t=d.default.fromJSON(e);return t.portal=this.portal,t})):[],t}))}fetchItems(e){e||(e={});let t,o=this.userContentUrl;return e.folder&&(o+="/"+e.folder.id),r.e(5235).then(r.bind(r,15235)).then((({default:r})=>{t=r;const s={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal._request(o,{query:s})})).then((e=>{let r;return e&&e.items?(r=e.items.map((e=>{const r=t.fromJSON(e);return r.portal=this.portal,r})),Promise.all(r.map((e=>e.load()))).catch((e=>e)).then((()=>({items:r,nextStart:e.nextStart,total:e.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal._request(this.url+"/tags").then((e=>e.tags))}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}queryFavorites(e){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(e)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const t=new p;return t.sourceJSON=e,t.read(e),t}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("geoscene.portal.PortalUser")],h);const c=h},27391:(e,t,r)=>{r.d(t,{wm:()=>v,n2:()=>d,KV:()=>h,EJ:()=>y,v9:()=>c});var o=r(3172),s=r(20102),i=r(95330),l=r(17452),n=r(65587),a=r(41253),u=r(80442);const p={};function d(e,t,r){return e.styleUrl?async function(e,t){try{return{data:(await y(e,t)).data,baseUrl:(0,l.Yd)(e),styleUrl:e}}catch(e){return(0,i.r9)(e),null}}(e.styleUrl,r):e.styleName?function(e,t,r){const o=t&&t.portal||n.Z.getDefault();let i;const l=`${o.url} - ${o.user&&o.user.username} - ${e}`;return p[l]||(p[l]=function(e,t,r){return t.load(r).then((()=>{const o=new a.Z({disableExtraQuery:!0,query:`owner:${m} AND type:${_} AND typekeywords:"${e}"`});return t.queryItems(o,r)})).then((({results:t})=>{let o=null;const i=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t)if(e.typeKeywords.some((e=>e.toLowerCase()===i))&&e.type===_&&e.owner===m){o=e;break}if(!o)throw new s.Z("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return o.load(r)}))}(e,o,r).then((e=>(i=e,e.fetchData()))).then((t=>({data:t,baseUrl:i.itemUrl,styleName:e})))),p[l]}(e.styleName,t,r):Promise.reject(new s.Z("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function h(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function c(e,t){if("cimRef"===t)return e.cimRef;if(e.formatInfos&&!(0,u.Z)("enable-feature:force-wosr"))for(const t of e.formatInfos)if("gltf"===t.type)return t.href;return e.webRef}function y(e,t){const r={responseType:"json",query:{f:"json"},...t};return(0,o.default)((0,l.Fv)(e),r)}const m="esri_en",_="Style",v="https://links.geoscene.cn/geoscene/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3668,5235,2515,999],{93668:(e,r,t)=>{t.r(r),t.d(r,{default:()=>O});var a=t(43697),s=t(80539),i=t(70921),l=t(60235),o=t(96674),n=t(22974),c=t(83379),p=t(68668),y=t(92604),d=t(70586),h=t(95330),g=t(17452),u=t(5600),m=(t(75215),t(52011)),b=t(30556),v=t(82971),f=t(65587),L=t(15235),S=t(99880),w=t(94443);const T ={"geoq-community":{get thumbnailUrl(){return (0,S.V)("geoscene/images/basemap/community.jpg")},id:"geoq-community",classic:true,title:"彩色版基础底图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"彩色版基础底图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer"}]},"geoq-gray":{get thumbnailUrl(){return (0,S.V)("geoscene/images/basemap/gray.jpg")},id:"geoq-gray",classic:true,title:"灰色不含兴趣点版中国基础地图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"灰色不含兴趣点版中国基础地图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetGray/MapServer"}]},"geoq-blue":{get thumbnailUrl(){return (0,S.V)("geoscene/images/basemap/blue.jpg")},id:"geoq-blue",classic:true,title:"蓝黑色不含兴趣点版中国基础地图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"蓝黑色不含兴趣点版中国基础地图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer"}]},"geoq-warm":{get thumbnailUrl(){return (0,S.V)("geoscene/images/basemap/warm.jpg")},id:"geoq-warm",classic:true,title:"暖色不含兴趣点版中国基础地图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"暖色不含兴趣点版中国基础地图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetWarm/MapServer"}]}};M,_=t(15650);let I=0;const k=y.Z.getLogger("geoscene.Basemap");let C=M=class extends((0,o.eC)(c.Z)){constructor(e){super(e),this.id=null,this.portalItem=null,this.spatialReference=null,this.thumbnailUrl=null,this.title="Basemap",this.id=Date.now().toString(16)+"-basemap-"+I++,this.baseLayers=new s.Z,this.referenceLayers=new s.Z;const r=e=>{e.parent&&e.parent!==this&&"remove"in e.parent&&e.parent.remove(e),e.parent=this,"elevation"===e.type&&k.error(`Layer '${e.title}, id:${e.id}' of type '${e.type}' is not supported as a basemap layer and will therefore be ignored.`)},t=e=>{e.parent=null};this.baseLayers.on("after-add",(e=>r(e.item))),this.referenceLayers.on("after-add",(e=>r(e.item))),this.baseLayers.on("after-remove",(e=>t(e.item))),this.referenceLayers.on("after-remove",(e=>t(e.item)))}initialize(){this.when().catch((e=>{k.error("#load()",`Failed to load basemap (title: '${this.title}', id: '${this.id}')`,e)})),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){var e;const r=this.baseLayers.removeAll();for(const e of r)e.destroy();const t=this.referenceLayers.removeAll();for(const e of t)e.destroy();this.baseLayers.destroy(),this.referenceLayers.destroy(),null==(e=this.portalItem)||e.destroy(),this.portalItem=null}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set baseLayers(e){this._set("baseLayers",(0,i.Z)(e,this._get("baseLayers")))}_writeBaseLayers(e,r,t){const a=[];e?(t={...t,layerContainerType:"basemap"},this.baseLayers.forEach((e=>{const r=(0,_.Nw)(e,t.webmap?t.webmap.getLayerJSONFromResourceInfo(e):null,t);(0,d.pC)(r)&&a.push(r)})),this.referenceLayers.forEach((e=>{const r=(0,_.Nw)(e,t.webmap?t.webmap.getLayerJSONFromResourceInfo(e):null,t);(0,d.pC)(r)&&(r.isReference=!0,a.push(r))})),r.baseMapLayers=a):r.baseMapLayers=a}set referenceLayers(e){this._set("referenceLayers",(0,i.Z)(e,this._get("referenceLayers")))}writeTitle(e,r){r.title=e||"Basemap"}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return(0,p.G)(this,(e=>{e(this.baseLayers,this.referenceLayers)}))}clone(){const e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.slice(),referenceLayers:this.referenceLayers.slice()};return this.loaded&&(e.loadStatus="loaded"),new M({resourceInfo:this.resourceInfo}).set(e)}read(e,r){this.resourceInfo||this._set("resourceInfo",{data:e,context:r}),super.read(e,r)}write(e,r){return e=e||{},r&&r.origin||(r={origin:"web-map",...r}),super.write(e,r),!this.loaded&&this.resourceInfo&&this.resourceInfo.data.baseMapLayers&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map((e=>{const r=(0,n.d9)(e);return r.url&&(0,g.oC)(r.url)&&(r.url=`https:${r.url}`),r.templateUrl&&(0,g.oC)(r.templateUrl)&&(r.templateUrl=`https:${r.templateUrl}`),r}))),e}async _loadFromSource(e){const{resourceInfo:r,portalItem:t}=this;(0,h.k_)(e);const a=[];if(r){const t=r.context?r.context.url:null;if(a.push(this._loadLayersFromJSON(r.data,t,e)),r.data.id&&!r.data.title){const e=r.data.id;a.push(async function(e){if(!e)return;const r=e.indexOf("-vector")>-1?e.slice(0,e.indexOf("-vector")):e,t=await(0,w.ME)("geoscene/t9n/basemaps");return t[e]||t[r]}(e).then((e=>{e&&this.read({title:e},r.context)})))}}else t&&a.push(this._loadFromItem(t,e));await Promise.all(a)}async _loadLayersFromJSON(e,r,a){const s=this.resourceInfo&&this.resourceInfo.context,i=this.portalItem&&this.portalItem.portal||s&&s.portal||null,l=s&&"web-scene"===s.origin?"web-scene":"web-map",{populateOperationalLayers:o}=await t.e(24).then(t.bind(t,70024)),n=[];if((0,h.k_)(a),e.baseMapLayers&&Array.isArray(e.baseMapLayers)){const t={context:{origin:l,url:r,portal:i,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},a=o(this.baseLayers,e.baseMapLayers.filter((e=>!e.isReference)),t);n.push(a);const s=o(this.referenceLayers,e.baseMapLayers.filter((e=>e.isReference)),t);n.push(s)}await(0,h.as)(n)}async _loadFromItem(e,r){const t=await e.load(r),a=await t.fetchData("json",r),s=(0,g.mN)(e.itemUrl);return this._set("resourceInfo",{data:a.baseMap,context:{origin:"web-map",portal:e.portal||f.Z.getDefault(),url:s}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:a.spatialReference},this.resourceInfo.context),this.read({title:e.title,thumbnailUrl:e.thumbnailUrl},{origin:"portal-item",portal:e.portal||f.Z.getDefault(),url:s}),this._loadLayersFromJSON(this.resourceInfo.data,s,r)}static fromId(e){const r=T[e];if(r){if(r.deprecated){let r=null;"dark-gray"===e?r="dark-gray-vector":"gray"===e?r="gray-vector":"streets"===e?r="streets-vector":"topo"===e&&(r="topo-vector"),(0,l.x9)(k,`The ${e} basemap has entered mature support and is no longer being updated.`,{replacement:r,see:"https://doc.geoscene.cn/blog/1iq8aD",warnOnce:!0})}return M.fromJSON(r)}return null}};(0,a._)([(0,u.Cb)({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer(e,r,t,a){this._writeBaseLayers(e,r,a)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:s.Z}},writer(e,r,t,a){this._writeBaseLayers(e,r,a)}}}}}})],C.prototype,"baseLayers",null),(0,a._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{write:!0}}}})],C.prototype,"id",void 0),(0,a._)([(0,u.Cb)({type:L.default})],C.prototype,"portalItem",void 0),(0,a._)([(0,u.Cb)()],C.prototype,"referenceLayers",null),(0,a._)([(0,u.Cb)({readOnly:!0})],C.prototype,"resourceInfo",void 0),(0,a._)([(0,u.Cb)({type:v.Z})],C.prototype,"spatialReference",void 0),(0,a._)([(0,u.Cb)()],C.prototype,"thumbnailUrl",void 0),(0,a._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],C.prototype,"title",void 0),(0,a._)([(0,b.c)("title")],C.prototype,"writeTitle",null),C=M=(0,a._)([(0,m.j)("geoscene.Basemap")],C);const O=C},66643:(e,r,t)=>{t.d(r,{Ed:()=>i,UI:()=>l,q6:()=>o,mt:()=>n});var a=t(70586),s=t(95330);function i(e,r,t){return(0,s.as)(e.map(((e,a)=>r.apply(t,[e,a]))))}function l(e,r,t){return(0,s.as)(e.map(((e,a)=>r.apply(t,[e,a])))).then((e=>e.map((e=>e.value))))}function o(e){return(0,a.Wi)(e)?(0,s.DB)():e.then((e=>({ok:!0,value:e}))).catch((e=>({ok:!1,error:e})))}function n(e){return e.then((e=>({ok:!0,value:e}))).catch((e=>((0,s.r9)(e),{ok:!1,error:e})))}},70921:(e,r,t)=>{t.d(r,{R:()=>i,Z:()=>s});var a=t(80539);function s(e,r,t=a.Z){return r||(r=new t),r===e||(r.removeAll(),(s=e)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?r.addMany(e):e&&r.add(e)),r;var s}function i(e){return e}},68668:(e,r,t)=>{t.d(r,{G:()=>o,w:()=>n});var a=t(66643),s=t(80539),i=t(83379),l=t(70586);async function o(e,r){return await e.load(),n(e,r)}async function n(e,r){const t=[],o=(...e)=>{for(const r of e)(0,l.Wi)(r)||(Array.isArray(r)?o(...r):s.Z.isCollection(r)?r.forEach((e=>o(e))):i.Z.isLoadable(r)&&t.push(r))};r(o);let n=null;if(await(0,a.UI)(t,(async e=>{!1!==(await(0,a.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load())).ok||n||(n=e)})),n)throw n.loadError;return e}},94443:(e,r,t)=>{t.d(r,{ME:()=>h,Su:()=>g,tz:()=>d});var a=t(20102),s=t(95330),i=t(70171);const l=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,o={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function n(e){var r;return null!=(r=o[e])&&r}const c=[],p=new Map;function y(e){for(const r of p.keys())u(e.pattern,r)&&p.delete(r)}function d(e){return c.includes(e)||(y(e),c.unshift(e)),{remove(){const r=c.indexOf(e);r>-1&&(c.splice(r,1),y(e))}}}async function h(e){const r=(0,i.Kd)();p.has(e)||p.set(e,async function(e,r){const t=[];for(const a of c)if(u(a.pattern,e))try{return await a.fetchMessageBundle(e,r)}catch(e){t.push(e)}if(t.length)throw new a.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:t});throw new a.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,r));const t=p.get(e);return await m.add(t),t}function g(e){if(!l.test(e))return null;const[,r,t]=l.exec(e),a=r+(t?"-"+t.toUpperCase():"");return n(a)?a:n(r)?r:null}function u(e,r){return"string"==typeof e?r.startsWith(e):e.test(r)}(0,i.Ze)((()=>{p.clear()}));const m=new class{constructor(){this._numLoading=0}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,s.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},15235:(e,r,t)=>{t.r(r),t.d(r,{default:()=>k});var a=t(43697),s=t(99880),i=t(20102),l=t(96674),o=t(22974),n=t(83379),c=t(70586),p=t(17452),y=t(5600),d=t(75215),h=t(71715),g=t(52011),u=t(6570),m=t(65587),b=t(15923),v=t(92604),f=(t(67676),t(80442),t(90578));const L=v.Z.getLogger("geoscene.portal.PortalItemResource");let S=class extends b.Z{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this._normalizePath(e.path,e.portalItem)}:e}set path(e){(0,c.pC)(e)&&(0,p.YP)(e)?L.error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this._normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",r){const t=this.url;if((0,c.Wi)(t))throw new i.Z("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal._request(t,{responseType:e,query:{token:this.portalItem.apiKey},signal:(0,c.U2)(r,"signal")})}async update(e,r){return(await t.e(7873).then(t.bind(t,97873))).addOrUpdateResource(this,"update",e,r)}hasPath(){return(0,c.pC)(this.path)}_normalizePath(e,r){return(0,c.Wi)(e)?e:(e=e.replace(/^\/+/,""),(0,c.pC)(r)&&(0,p.YP)(e)&&(e=(0,p.PF)(e,r.itemUrl)),e.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,a._)([(0,y.Cb)()],S.prototype,"portalItem",void 0),(0,a._)([(0,y.Cb)({type:String,value:null})],S.prototype,"path",null),(0,a._)([(0,f.p)("path")],S.prototype,"_castPath",null),(0,a._)([(0,y.Cb)({type:String,readOnly:!0})],S.prototype,"url",null),(0,a._)([(0,y.Cb)({type:String,readOnly:!0})],S.prototype,"itemRelativeUrl",null),S=(0,a._)([(0,g.j)("geoscene.portal.PortalItemResource")],S);const w=S;let T=class extends b.Z{constructor(e){super(e),this.created=null,this.rating=null}};(0,a._)([(0,y.Cb)()],T.prototype,"created",void 0),(0,a._)([(0,y.Cb)()],T.prototype,"rating",void 0),T=(0,a._)([(0,g.j)("geoscene.portal.PortalRating")],T);const M=T;var _;let I=_=class extends((0,l.eC)(n.Z)){constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}static from(e){return(0,d.TJ)(_,e)}destroy(){this.portal=null}get displayName(){const e=this.type,r=this.typeKeywords||[];let t=e;return"Feature Service"===e||"Feature Collection"===e?t=r.indexOf("Table")>-1?"Table":r.indexOf("Route Layer")>-1?"Route Layer":r.indexOf("Markup")>-1?"Markup":"Feature Layer":"Image Service"===e?t=r.indexOf("Elevation 3D Layer")>-1?"Elevation Layer":r.indexOf("Tiled Imagery")>-1?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?t="Scene Layer":"Media Service"===e?t="Media Layer":"Scene Package"===e?t="Scene Layer Package":"Stream Service"===e?t="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?t=r.indexOf("Web Tool")>-1?"Tool":"Geoprocessing Service":"Geocoding Service"===e?t="Locator":"Geoenrichment Service"===e?t="GeoEnrichment Service":"Microsoft Powerpoint"===e?t="Microsoft PowerPoint":"GeoJson"===e?t="GeoJSON":"Globe Service"===e?t="Globe Layer":"Vector Tile Service"===e?t="Tile Layer":"netCDF"===e?t="NetCDF":"Map Service"===e?t=-1===r.indexOf("Spatiotemporal")&&(r.indexOf("Hosted Service")>-1||r.indexOf("Tiled")>-1)&&-1===r.indexOf("Relational")?"Tile Layer":"Map Image Layer":e&&e.toLowerCase().indexOf("add in")>-1?t=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?t="Big Data File Share":"Compact Tile Package"===e?t="Tile Package (tpkx)":"OGCFeatureServer"===e?t="OGC Feature Layer":"web mapping application"===e&&r.indexOf("configurableApp")>-1&&(t="Instant App"),t}readExtent(e){return e&&e.length?new u.Z(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",r=this.typeKeywords||[];let t,a=!1,i=!1,l=!1,o=!1,n=!1,c=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(a=r.indexOf("Hosted Service")>-1,"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(i=r.indexOf("Table")>-1,l=r.indexOf("Route Layer")>-1,o=r.indexOf("Markup")>-1,n=-1!==r.indexOf("Spatiotemporal"),c=-1!==r.indexOf("UtilityNetwork"),t=n&&i?"spatiotemporaltable":i?"table":l?"routelayer":o?"markup":n?"spatiotemporal":a?"featureshosted":c?"utilitynetwork":"features"):t="map service"===e||"wms"===e||"wmts"===e?a||r.indexOf("Tiled")>-1||"wmts"===e?"maptiles":"mapimages":"scene service"===e?r.indexOf("Line")>-1?"sceneweblayerline":r.indexOf("3DObject")>-1?"sceneweblayermultipatch":r.indexOf("Point")>-1?"sceneweblayerpoint":r.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":r.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":r.indexOf("Polygon")>-1?"sceneweblayerpolygon":r.indexOf("Building")>-1?"sceneweblayerbuilding":r.indexOf("Voxel")>-1?"sceneweblayervoxel":"sceneweblayer":"image service"===e?r.indexOf("Elevation 3D Layer")>-1?"elevationlayer":r.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"media service"===e?"mediaservice":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e&&r.indexOf("Web Tool")>-1&&this.portal&&this.portal.isPortal?"tool":"layers"):t="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?r.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===e&&r.indexOf("configurableApp")>-1?"instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&r.indexOf("ArcGIS Pro")>-1||"explorer map"===e&&r.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&r.indexOf("Explorer Mapping Application")>-1||r.indexOf("Document")>-1?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"hub project"===e?"hubproject":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"experience builder widget"===e?"experiencebuilderwidget":"experience builder widget package"===e?"experiencebuilderwidgetpackage":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"maps",t?(0,s.V)("geoscene/images/portal/"+t+"16.png"):null}get isLayer(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].indexOf(this.type)>-1}get itemUrl(){const e=this.get("portal.restUrl");return e?e+"/content/items/"+this.id:null}get thumbnailUrl(){const e=this.itemUrl,r=this.thumbnail;return e&&r?this.portal._normalizeUrl(`${e}/info/${r}?f=json`):null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const r=this.owner||this.get("portal.user.username");return r?`${e}/content/users/${this.ownerFolder?`${r}/${this.ownerFolder}`:r}/items/${this.id}`:null}load(e){this.portal||(this.portal=m.Z.getDefault());const r=this.portal.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?this.portal._request(this.itemUrl,{signal:(0,c.pC)(e)?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(r),Promise.resolve(this)}addRating(e){const r={method:"post",query:{}};return e instanceof M&&(e=e.rating),isNaN(e)||"number"!=typeof e||(r.query.rating=e),this.portal._request(this.itemUrl+"/addRating",r).then((()=>new M({rating:e,created:new Date})))}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,o.d9)(this.applicationProxies),avgRating:this.avgRating,categories:(0,o.d9)(this.categories),created:(0,o.d9)(this.created),culture:this.culture,description:this.description,extent:(0,o.d9)(this.extent),groupCategories:(0,o.d9)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,o.d9)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,o.d9)(this.screenshots),size:this.size,snippet:this.snippet,tags:(0,o.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,o.d9)(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new _({sourceJSON:this.sourceJSON}).set(e)}createPostQuery(){const e=this.toJSON();for(const r in e)"tags"===r&&null!==e[r]&&(e[r]=e[r].join(", ")),"typeKeywords"===r&&null!==e[r]&&(e[r]=e[r].join(", ")),"extent"===r&&e[r]&&(e[r]=JSON.stringify(e[r]));return e}deleteRating(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then((()=>{}))}fetchData(e="json",r){return this.portal._request(this.itemUrl+"/data",{responseType:e,...r,query:{token:this.apiKey}})}fetchRating(e){return this.portal._request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e}).then((e=>null!=e.rating?(e.created=new Date(e.created),new M(e)):null))}fetchRelatedItems(e,r){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...r},_)}getThumbnailUrl(e){let r=this.thumbnailUrl;return r&&e&&(r+=`&w=${e}`),r}reload(){return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const r=e&&e.data,t={method:"post"};t.query=this.createPostQuery();for(const e in t.query)null===t.query[e]&&(t.query[e]="");return t.query.clearEmptyFields=!0,null!=r&&("string"==typeof r?t.query.text=r:"object"==typeof r&&(t.query.text=JSON.stringify(r))),this.portal._request(`${this.userItemUrl}/update`,t).then((()=>this.reload()))})):Promise.reject(new i.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}updateThumbnail(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const r=e.thumbnail,t=e.filename,a={method:"post"};if("string"==typeof r)(0,p.HK)(r)?a.query={data:r}:a.query={url:(0,p.hF)(r)},(0,c.pC)(t)&&(a.query.filename=t);else{const e=new FormData;(0,c.pC)(t)?e.append("file",r,t):e.append("file",r),a.body=e}return this.portal._request(`${this.userItemUrl}/updateThumbnail`,a).then((()=>this.reload()))})):Promise.reject(new i.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},r){return(await t.e(7873).then(t.bind(t,97873))).fetchResources(this,e,r)}async addResource(e,r,a){const s=await t.e(7873).then(t.bind(t,97873));return e.portalItem=this,s.addOrUpdateResource(e,"add",r,a)}async removeResource(e,r){const a=await t.e(7873).then(t.bind(t,97873));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i.Z("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return a.removeResource(this,e,r)}async removeAllResources(e){return(await t.e(7873).then(t.bind(t,97873))).removeAllResources(this,e)}resourceFromPath(e){return new w({portalItem:this,path:e})}toJSON(){const e=this.extent,r={created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return(0,o.yd)(r)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new _({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const r in e)"tags"===r&&null!==e[r]&&(e[r]=e[r].join(", ")),"typeKeywords"===r&&null!==e[r]&&(e[r]=e[r].join(", ")),"extent"===r&&e[r]&&(e[r]=JSON.stringify(e[r]));return e}};(0,a._)([(0,y.Cb)({type:["private","shared","org","public"]})],I.prototype,"access",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"accessInformation",void 0),(0,a._)([(0,y.Cb)({type:String})],I.prototype,"apiKey",void 0),(0,a._)([(0,y.Cb)({json:{read:{source:"appProxies"}}})],I.prototype,"applicationProxies",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"avgRating",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"categories",void 0),(0,a._)([(0,y.Cb)({type:Date})],I.prototype,"created",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"culture",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"description",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"displayName",null),(0,a._)([(0,y.Cb)({type:u.Z})],I.prototype,"extent",void 0),(0,a._)([(0,h.r)("extent")],I.prototype,"readExtent",null),(0,a._)([(0,y.Cb)()],I.prototype,"groupCategories",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"iconUrl",null),(0,a._)([(0,y.Cb)()],I.prototype,"id",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"isLayer",null),(0,a._)([(0,y.Cb)()],I.prototype,"itemControl",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"itemUrl",null),(0,a._)([(0,y.Cb)()],I.prototype,"licenseInfo",void 0),(0,a._)([(0,y.Cb)({type:Date})],I.prototype,"modified",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"name",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"numComments",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"numRatings",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"numViews",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"owner",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"ownerFolder",void 0),(0,a._)([(0,y.Cb)({type:m.Z})],I.prototype,"portal",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"screenshots",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"size",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"snippet",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"sourceJSON",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"tags",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"thumbnail",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"thumbnailUrl",null),(0,a._)([(0,y.Cb)()],I.prototype,"title",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"type",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"typeKeywords",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"url",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"userItemUrl",null),I=_=(0,a._)([(0,g.j)("geoscene.portal.PortalItem")],I);const k=I},15650:(e,r,t)=>{t.d(r,{Nw:()=>h});var a=t(20102),s=t(22974),i=t(70586),l=t(78286),o=t(827);const n=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),c=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","ogc-feature","route","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function p(e){return!("feature"!==e.type||e.url||!e.source||"memory"!==e.source.type)}function y(e,r){if(r.restrictedWebMapWriting){const t=function(e){return"basemap"===e.layerContainerType?n:"operational-layers"===e.layerContainerType?c:null}(r);return!(0,i.pC)(t)||t.has(e.type)&&!p(e)}return!0}function d(e,r){"maxScale"in e&&(r.maxScale=(0,o.k)(e.maxScale)),"minScale"in e&&(r.minScale=(0,o.k)(e.minScale))}function h(e,r,t){if(!("write"in e)||!e.write)return t&&t.messages&&t.messages.push(new a.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(y(e,t)){const r={};return e.write(r,t)?r:null}return(0,i.pC)(r)&&function(e,r){if(function(e,r){if(p(e)){const t=(0,l.hS)("featureCollection.layers",r),a=t&&t[0]&&t[0].layerDefinition;a&&d(e,a)}else"stream"===e.type?d(e,r.layerDefinition=r.layerDefinition||{}):"group"!==e.type&&d(e,r)}(e,r),"blendMode"in e&&(r.blendMode=e.blendMode,"normal"===r.blendMode&&delete r.blendMode),r.opacity=(0,o.k)(e.opacity),r.title=e.title||"Layer",r.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type)if(p(e)){const t=r.featureCollection;t&&(t.showLegend=e.legendEnabled)}else r.showLegend=e.legendEnabled}(e,r=(0,s.d9)(r)),r}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3668,5235,2515,999],{93668:(e,r,t)=>{t.r(r),t.d(r,{default:()=>O});var a=t(43697),s=t(80539),i=t(70921),l=t(60235),o=t(96674),n=t(22974),c=t(83379),p=t(68668),y=t(92604),d=t(70586),h=t(95330),g=t(17452),u=t(5600),m=(t(75215),t(52011)),b=t(30556),v=t(82971),f=t(65587),L=t(15235),S=t(99880),w=t(94443);const T ={"geoscene-community":{get thumbnailUrl(){return (0,S.V)("geoscene/images/basemap/community.jpg")},id:"geoscene-community",classic:true,title:"彩色版基础底图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"彩色版基础底图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer"}]},"geoscene-gray":{get thumbnailUrl(){return (0,S.V)("geoscene/images/basemap/gray.jpg")},id:"geoscene-gray",classic:true,title:"灰色不含兴趣点版中国基础地图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"灰色不含兴趣点版中国基础地图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetGray/MapServer"}]},"geoscene-blue":{get thumbnailUrl(){return (0,S.V)("geoscene/images/basemap/blue.jpg")},id:"geoscene-blue",classic:true,title:"蓝黑色不含兴趣点版中国基础地图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"蓝黑色不含兴趣点版中国基础地图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer"}]},"geoscene-warm":{get thumbnailUrl(){return (0,S.V)("geoscene/images/basemap/warm.jpg")},id:"geoscene-warm",classic:true,title:"暖色不含兴趣点版中国基础地图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"暖色不含兴趣点版中国基础地图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetWarm/MapServer"}]},"tianditu-topography":{classic:true,title:"天地图-地形地图(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/ter_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=ter&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_6884","title":"天地图-地形地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cta_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cta&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_4525","title":"天地图-地形注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]},"tianditu-image":{classic:true,title:"天地图-影像地图(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=img&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_3572","title":"天地图-影像地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cia&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_5882","title":"天地图-影像注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]},"tianditu-vector":{classic:true,title:"天地图-矢量(含注记)(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=vec&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_8803","title":"天地图-矢量地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cva&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_2198","title":"天地图-矢量注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]}};M,_=t(15650);let I=0;const k=y.Z.getLogger("geoscene.Basemap");let C=M=class extends((0,o.eC)(c.Z)){constructor(e){super(e),this.id=null,this.portalItem=null,this.spatialReference=null,this.thumbnailUrl=null,this.title="Basemap",this.id=Date.now().toString(16)+"-basemap-"+I++,this.baseLayers=new s.Z,this.referenceLayers=new s.Z;const r=e=>{e.parent&&e.parent!==this&&"remove"in e.parent&&e.parent.remove(e),e.parent=this,"elevation"===e.type&&k.error(`Layer '${e.title}, id:${e.id}' of type '${e.type}' is not supported as a basemap layer and will therefore be ignored.`)},t=e=>{e.parent=null};this.baseLayers.on("after-add",(e=>r(e.item))),this.referenceLayers.on("after-add",(e=>r(e.item))),this.baseLayers.on("after-remove",(e=>t(e.item))),this.referenceLayers.on("after-remove",(e=>t(e.item)))}initialize(){this.when().catch((e=>{k.error("#load()",`Failed to load basemap (title: '${this.title}', id: '${this.id}')`,e)})),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){var e;const r=this.baseLayers.removeAll();for(const e of r)e.destroy();const t=this.referenceLayers.removeAll();for(const e of t)e.destroy();this.baseLayers.destroy(),this.referenceLayers.destroy(),null==(e=this.portalItem)||e.destroy(),this.portalItem=null}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set baseLayers(e){this._set("baseLayers",(0,i.Z)(e,this._get("baseLayers")))}_writeBaseLayers(e,r,t){const a=[];e?(t={...t,layerContainerType:"basemap"},this.baseLayers.forEach((e=>{const r=(0,_.Nw)(e,t.webmap?t.webmap.getLayerJSONFromResourceInfo(e):null,t);(0,d.pC)(r)&&a.push(r)})),this.referenceLayers.forEach((e=>{const r=(0,_.Nw)(e,t.webmap?t.webmap.getLayerJSONFromResourceInfo(e):null,t);(0,d.pC)(r)&&(r.isReference=!0,a.push(r))})),r.baseMapLayers=a):r.baseMapLayers=a}set referenceLayers(e){this._set("referenceLayers",(0,i.Z)(e,this._get("referenceLayers")))}writeTitle(e,r){r.title=e||"Basemap"}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return(0,p.G)(this,(e=>{e(this.baseLayers,this.referenceLayers)}))}clone(){const e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.slice(),referenceLayers:this.referenceLayers.slice()};return this.loaded&&(e.loadStatus="loaded"),new M({resourceInfo:this.resourceInfo}).set(e)}read(e,r){this.resourceInfo||this._set("resourceInfo",{data:e,context:r}),super.read(e,r)}write(e,r){return e=e||{},r&&r.origin||(r={origin:"web-map",...r}),super.write(e,r),!this.loaded&&this.resourceInfo&&this.resourceInfo.data.baseMapLayers&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map((e=>{const r=(0,n.d9)(e);return r.url&&(0,g.oC)(r.url)&&(r.url=`https:${r.url}`),r.templateUrl&&(0,g.oC)(r.templateUrl)&&(r.templateUrl=`https:${r.templateUrl}`),r}))),e}async _loadFromSource(e){const{resourceInfo:r,portalItem:t}=this;(0,h.k_)(e);const a=[];if(r){const t=r.context?r.context.url:null;if(a.push(this._loadLayersFromJSON(r.data,t,e)),r.data.id&&!r.data.title){const e=r.data.id;a.push(async function(e){if(!e)return;const r=e.indexOf("-vector")>-1?e.slice(0,e.indexOf("-vector")):e,t=await(0,w.ME)("geoscene/t9n/basemaps");return t[e]||t[r]}(e).then((e=>{e&&this.read({title:e},r.context)})))}}else t&&a.push(this._loadFromItem(t,e));await Promise.all(a)}async _loadLayersFromJSON(e,r,a){const s=this.resourceInfo&&this.resourceInfo.context,i=this.portalItem&&this.portalItem.portal||s&&s.portal||null,l=s&&"web-scene"===s.origin?"web-scene":"web-map",{populateOperationalLayers:o}=await t.e(24).then(t.bind(t,70024)),n=[];if((0,h.k_)(a),e.baseMapLayers&&Array.isArray(e.baseMapLayers)){const t={context:{origin:l,url:r,portal:i,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},a=o(this.baseLayers,e.baseMapLayers.filter((e=>!e.isReference)),t);n.push(a);const s=o(this.referenceLayers,e.baseMapLayers.filter((e=>e.isReference)),t);n.push(s)}await(0,h.as)(n)}async _loadFromItem(e,r){const t=await e.load(r),a=await t.fetchData("json",r),s=(0,g.mN)(e.itemUrl);return this._set("resourceInfo",{data:a.baseMap,context:{origin:"web-map",portal:e.portal||f.Z.getDefault(),url:s}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:a.spatialReference},this.resourceInfo.context),this.read({title:e.title,thumbnailUrl:e.thumbnailUrl},{origin:"portal-item",portal:e.portal||f.Z.getDefault(),url:s}),this._loadLayersFromJSON(this.resourceInfo.data,s,r)}static fromId(e){const r=T[e];if(r){if(r.deprecated){let r=null;"dark-gray"===e?r="dark-gray-vector":"gray"===e?r="gray-vector":"streets"===e?r="streets-vector":"topo"===e&&(r="topo-vector"),(0,l.x9)(k,`The ${e} basemap has entered mature support and is no longer being updated.`,{replacement:r,see:"https://doc.geoscene.cn/blog/1iq8aD",warnOnce:!0})}return M.fromJSON(r)}return null}};(0,a._)([(0,u.Cb)({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer(e,r,t,a){this._writeBaseLayers(e,r,a)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:s.Z}},writer(e,r,t,a){this._writeBaseLayers(e,r,a)}}}}}})],C.prototype,"baseLayers",null),(0,a._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{write:!0}}}})],C.prototype,"id",void 0),(0,a._)([(0,u.Cb)({type:L.default})],C.prototype,"portalItem",void 0),(0,a._)([(0,u.Cb)()],C.prototype,"referenceLayers",null),(0,a._)([(0,u.Cb)({readOnly:!0})],C.prototype,"resourceInfo",void 0),(0,a._)([(0,u.Cb)({type:v.Z})],C.prototype,"spatialReference",void 0),(0,a._)([(0,u.Cb)()],C.prototype,"thumbnailUrl",void 0),(0,a._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],C.prototype,"title",void 0),(0,a._)([(0,b.c)("title")],C.prototype,"writeTitle",null),C=M=(0,a._)([(0,m.j)("geoscene.Basemap")],C);const O=C},66643:(e,r,t)=>{t.d(r,{Ed:()=>i,UI:()=>l,q6:()=>o,mt:()=>n});var a=t(70586),s=t(95330);function i(e,r,t){return(0,s.as)(e.map(((e,a)=>r.apply(t,[e,a]))))}function l(e,r,t){return(0,s.as)(e.map(((e,a)=>r.apply(t,[e,a])))).then((e=>e.map((e=>e.value))))}function o(e){return(0,a.Wi)(e)?(0,s.DB)():e.then((e=>({ok:!0,value:e}))).catch((e=>({ok:!1,error:e})))}function n(e){return e.then((e=>({ok:!0,value:e}))).catch((e=>((0,s.r9)(e),{ok:!1,error:e})))}},70921:(e,r,t)=>{t.d(r,{R:()=>i,Z:()=>s});var a=t(80539);function s(e,r,t=a.Z){return r||(r=new t),r===e||(r.removeAll(),(s=e)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?r.addMany(e):e&&r.add(e)),r;var s}function i(e){return e}},68668:(e,r,t)=>{t.d(r,{G:()=>o,w:()=>n});var a=t(66643),s=t(80539),i=t(83379),l=t(70586);async function o(e,r){return await e.load(),n(e,r)}async function n(e,r){const t=[],o=(...e)=>{for(const r of e)(0,l.Wi)(r)||(Array.isArray(r)?o(...r):s.Z.isCollection(r)?r.forEach((e=>o(e))):i.Z.isLoadable(r)&&t.push(r))};r(o);let n=null;if(await(0,a.UI)(t,(async e=>{!1!==(await(0,a.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load())).ok||n||(n=e)})),n)throw n.loadError;return e}},94443:(e,r,t)=>{t.d(r,{ME:()=>h,Su:()=>g,tz:()=>d});var a=t(20102),s=t(95330),i=t(70171);const l=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,o={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function n(e){var r;return null!=(r=o[e])&&r}const c=[],p=new Map;function y(e){for(const r of p.keys())u(e.pattern,r)&&p.delete(r)}function d(e){return c.includes(e)||(y(e),c.unshift(e)),{remove(){const r=c.indexOf(e);r>-1&&(c.splice(r,1),y(e))}}}async function h(e){const r=(0,i.Kd)();p.has(e)||p.set(e,async function(e,r){const t=[];for(const a of c)if(u(a.pattern,e))try{return await a.fetchMessageBundle(e,r)}catch(e){t.push(e)}if(t.length)throw new a.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:t});throw new a.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,r));const t=p.get(e);return await m.add(t),t}function g(e){if(!l.test(e))return null;const[,r,t]=l.exec(e),a=r+(t?"-"+t.toUpperCase():"");return n(a)?a:n(r)?r:null}function u(e,r){return"string"==typeof e?r.startsWith(e):e.test(r)}(0,i.Ze)((()=>{p.clear()}));const m=new class{constructor(){this._numLoading=0}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,s.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},15235:(e,r,t)=>{t.r(r),t.d(r,{default:()=>k});var a=t(43697),s=t(99880),i=t(20102),l=t(96674),o=t(22974),n=t(83379),c=t(70586),p=t(17452),y=t(5600),d=t(75215),h=t(71715),g=t(52011),u=t(6570),m=t(65587),b=t(15923),v=t(92604),f=(t(67676),t(80442),t(90578));const L=v.Z.getLogger("geoscene.portal.PortalItemResource");let S=class extends b.Z{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this._normalizePath(e.path,e.portalItem)}:e}set path(e){(0,c.pC)(e)&&(0,p.YP)(e)?L.error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this._normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",r){const t=this.url;if((0,c.Wi)(t))throw new i.Z("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal._request(t,{responseType:e,query:{token:this.portalItem.apiKey},signal:(0,c.U2)(r,"signal")})}async update(e,r){return(await t.e(7873).then(t.bind(t,97873))).addOrUpdateResource(this,"update",e,r)}hasPath(){return(0,c.pC)(this.path)}_normalizePath(e,r){return(0,c.Wi)(e)?e:(e=e.replace(/^\/+/,""),(0,c.pC)(r)&&(0,p.YP)(e)&&(e=(0,p.PF)(e,r.itemUrl)),e.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,a._)([(0,y.Cb)()],S.prototype,"portalItem",void 0),(0,a._)([(0,y.Cb)({type:String,value:null})],S.prototype,"path",null),(0,a._)([(0,f.p)("path")],S.prototype,"_castPath",null),(0,a._)([(0,y.Cb)({type:String,readOnly:!0})],S.prototype,"url",null),(0,a._)([(0,y.Cb)({type:String,readOnly:!0})],S.prototype,"itemRelativeUrl",null),S=(0,a._)([(0,g.j)("geoscene.portal.PortalItemResource")],S);const w=S;let T=class extends b.Z{constructor(e){super(e),this.created=null,this.rating=null}};(0,a._)([(0,y.Cb)()],T.prototype,"created",void 0),(0,a._)([(0,y.Cb)()],T.prototype,"rating",void 0),T=(0,a._)([(0,g.j)("geoscene.portal.PortalRating")],T);const M=T;var _;let I=_=class extends((0,l.eC)(n.Z)){constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}static from(e){return(0,d.TJ)(_,e)}destroy(){this.portal=null}get displayName(){const e=this.type,r=this.typeKeywords||[];let t=e;return"Feature Service"===e||"Feature Collection"===e?t=r.indexOf("Table")>-1?"Table":r.indexOf("Route Layer")>-1?"Route Layer":r.indexOf("Markup")>-1?"Markup":"Feature Layer":"Image Service"===e?t=r.indexOf("Elevation 3D Layer")>-1?"Elevation Layer":r.indexOf("Tiled Imagery")>-1?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?t="Scene Layer":"Media Service"===e?t="Media Layer":"Scene Package"===e?t="Scene Layer Package":"Stream Service"===e?t="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?t=r.indexOf("Web Tool")>-1?"Tool":"Geoprocessing Service":"Geocoding Service"===e?t="Locator":"Geoenrichment Service"===e?t="GeoEnrichment Service":"Microsoft Powerpoint"===e?t="Microsoft PowerPoint":"GeoJson"===e?t="GeoJSON":"Globe Service"===e?t="Globe Layer":"Vector Tile Service"===e?t="Tile Layer":"netCDF"===e?t="NetCDF":"Map Service"===e?t=-1===r.indexOf("Spatiotemporal")&&(r.indexOf("Hosted Service")>-1||r.indexOf("Tiled")>-1)&&-1===r.indexOf("Relational")?"Tile Layer":"Map Image Layer":e&&e.toLowerCase().indexOf("add in")>-1?t=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?t="Big Data File Share":"Compact Tile Package"===e?t="Tile Package (tpkx)":"OGCFeatureServer"===e?t="OGC Feature Layer":"web mapping application"===e&&r.indexOf("configurableApp")>-1&&(t="Instant App"),t}readExtent(e){return e&&e.length?new u.Z(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",r=this.typeKeywords||[];let t,a=!1,i=!1,l=!1,o=!1,n=!1,c=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(a=r.indexOf("Hosted Service")>-1,"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(i=r.indexOf("Table")>-1,l=r.indexOf("Route Layer")>-1,o=r.indexOf("Markup")>-1,n=-1!==r.indexOf("Spatiotemporal"),c=-1!==r.indexOf("UtilityNetwork"),t=n&&i?"spatiotemporaltable":i?"table":l?"routelayer":o?"markup":n?"spatiotemporal":a?"featureshosted":c?"utilitynetwork":"features"):t="map service"===e||"wms"===e||"wmts"===e?a||r.indexOf("Tiled")>-1||"wmts"===e?"maptiles":"mapimages":"scene service"===e?r.indexOf("Line")>-1?"sceneweblayerline":r.indexOf("3DObject")>-1?"sceneweblayermultipatch":r.indexOf("Point")>-1?"sceneweblayerpoint":r.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":r.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":r.indexOf("Polygon")>-1?"sceneweblayerpolygon":r.indexOf("Building")>-1?"sceneweblayerbuilding":r.indexOf("Voxel")>-1?"sceneweblayervoxel":"sceneweblayer":"image service"===e?r.indexOf("Elevation 3D Layer")>-1?"elevationlayer":r.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"media service"===e?"mediaservice":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e&&r.indexOf("Web Tool")>-1&&this.portal&&this.portal.isPortal?"tool":"layers"):t="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?r.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===e&&r.indexOf("configurableApp")>-1?"instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&r.indexOf("ArcGIS Pro")>-1||"explorer map"===e&&r.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&r.indexOf("Explorer Mapping Application")>-1||r.indexOf("Document")>-1?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"hub project"===e?"hubproject":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"experience builder widget"===e?"experiencebuilderwidget":"experience builder widget package"===e?"experiencebuilderwidgetpackage":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"maps",t?(0,s.V)("geoscene/images/portal/"+t+"16.png"):null}get isLayer(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].indexOf(this.type)>-1}get itemUrl(){const e=this.get("portal.restUrl");return e?e+"/content/items/"+this.id:null}get thumbnailUrl(){const e=this.itemUrl,r=this.thumbnail;return e&&r?this.portal._normalizeUrl(`${e}/info/${r}?f=json`):null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const r=this.owner||this.get("portal.user.username");return r?`${e}/content/users/${this.ownerFolder?`${r}/${this.ownerFolder}`:r}/items/${this.id}`:null}load(e){this.portal||(this.portal=m.Z.getDefault());const r=this.portal.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?this.portal._request(this.itemUrl,{signal:(0,c.pC)(e)?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(r),Promise.resolve(this)}addRating(e){const r={method:"post",query:{}};return e instanceof M&&(e=e.rating),isNaN(e)||"number"!=typeof e||(r.query.rating=e),this.portal._request(this.itemUrl+"/addRating",r).then((()=>new M({rating:e,created:new Date})))}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,o.d9)(this.applicationProxies),avgRating:this.avgRating,categories:(0,o.d9)(this.categories),created:(0,o.d9)(this.created),culture:this.culture,description:this.description,extent:(0,o.d9)(this.extent),groupCategories:(0,o.d9)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,o.d9)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,o.d9)(this.screenshots),size:this.size,snippet:this.snippet,tags:(0,o.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,o.d9)(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new _({sourceJSON:this.sourceJSON}).set(e)}createPostQuery(){const e=this.toJSON();for(const r in e)"tags"===r&&null!==e[r]&&(e[r]=e[r].join(", ")),"typeKeywords"===r&&null!==e[r]&&(e[r]=e[r].join(", ")),"extent"===r&&e[r]&&(e[r]=JSON.stringify(e[r]));return e}deleteRating(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then((()=>{}))}fetchData(e="json",r){return this.portal._request(this.itemUrl+"/data",{responseType:e,...r,query:{token:this.apiKey}})}fetchRating(e){return this.portal._request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e}).then((e=>null!=e.rating?(e.created=new Date(e.created),new M(e)):null))}fetchRelatedItems(e,r){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...r},_)}getThumbnailUrl(e){let r=this.thumbnailUrl;return r&&e&&(r+=`&w=${e}`),r}reload(){return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const r=e&&e.data,t={method:"post"};t.query=this.createPostQuery();for(const e in t.query)null===t.query[e]&&(t.query[e]="");return t.query.clearEmptyFields=!0,null!=r&&("string"==typeof r?t.query.text=r:"object"==typeof r&&(t.query.text=JSON.stringify(r))),this.portal._request(`${this.userItemUrl}/update`,t).then((()=>this.reload()))})):Promise.reject(new i.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}updateThumbnail(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const r=e.thumbnail,t=e.filename,a={method:"post"};if("string"==typeof r)(0,p.HK)(r)?a.query={data:r}:a.query={url:(0,p.hF)(r)},(0,c.pC)(t)&&(a.query.filename=t);else{const e=new FormData;(0,c.pC)(t)?e.append("file",r,t):e.append("file",r),a.body=e}return this.portal._request(`${this.userItemUrl}/updateThumbnail`,a).then((()=>this.reload()))})):Promise.reject(new i.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},r){return(await t.e(7873).then(t.bind(t,97873))).fetchResources(this,e,r)}async addResource(e,r,a){const s=await t.e(7873).then(t.bind(t,97873));return e.portalItem=this,s.addOrUpdateResource(e,"add",r,a)}async removeResource(e,r){const a=await t.e(7873).then(t.bind(t,97873));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new i.Z("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return a.removeResource(this,e,r)}async removeAllResources(e){return(await t.e(7873).then(t.bind(t,97873))).removeAllResources(this,e)}resourceFromPath(e){return new w({portalItem:this,path:e})}toJSON(){const e=this.extent,r={created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return(0,o.yd)(r)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new _({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const r in e)"tags"===r&&null!==e[r]&&(e[r]=e[r].join(", ")),"typeKeywords"===r&&null!==e[r]&&(e[r]=e[r].join(", ")),"extent"===r&&e[r]&&(e[r]=JSON.stringify(e[r]));return e}};(0,a._)([(0,y.Cb)({type:["private","shared","org","public"]})],I.prototype,"access",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"accessInformation",void 0),(0,a._)([(0,y.Cb)({type:String})],I.prototype,"apiKey",void 0),(0,a._)([(0,y.Cb)({json:{read:{source:"appProxies"}}})],I.prototype,"applicationProxies",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"avgRating",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"categories",void 0),(0,a._)([(0,y.Cb)({type:Date})],I.prototype,"created",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"culture",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"description",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"displayName",null),(0,a._)([(0,y.Cb)({type:u.Z})],I.prototype,"extent",void 0),(0,a._)([(0,h.r)("extent")],I.prototype,"readExtent",null),(0,a._)([(0,y.Cb)()],I.prototype,"groupCategories",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"iconUrl",null),(0,a._)([(0,y.Cb)()],I.prototype,"id",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"isLayer",null),(0,a._)([(0,y.Cb)()],I.prototype,"itemControl",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"itemUrl",null),(0,a._)([(0,y.Cb)()],I.prototype,"licenseInfo",void 0),(0,a._)([(0,y.Cb)({type:Date})],I.prototype,"modified",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"name",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"numComments",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"numRatings",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"numViews",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"owner",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"ownerFolder",void 0),(0,a._)([(0,y.Cb)({type:m.Z})],I.prototype,"portal",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"screenshots",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"size",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"snippet",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"sourceJSON",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"tags",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"thumbnail",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"thumbnailUrl",null),(0,a._)([(0,y.Cb)()],I.prototype,"title",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"type",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"typeKeywords",void 0),(0,a._)([(0,y.Cb)()],I.prototype,"url",void 0),(0,a._)([(0,y.Cb)({readOnly:!0})],I.prototype,"userItemUrl",null),I=_=(0,a._)([(0,g.j)("geoscene.portal.PortalItem")],I);const k=I},15650:(e,r,t)=>{t.d(r,{Nw:()=>h});var a=t(20102),s=t(22974),i=t(70586),l=t(78286),o=t(827);const n=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),c=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","ogc-feature","route","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function p(e){return!("feature"!==e.type||e.url||!e.source||"memory"!==e.source.type)}function y(e,r){if(r.restrictedWebMapWriting){const t=function(e){return"basemap"===e.layerContainerType?n:"operational-layers"===e.layerContainerType?c:null}(r);return!(0,i.pC)(t)||t.has(e.type)&&!p(e)}return!0}function d(e,r){"maxScale"in e&&(r.maxScale=(0,o.k)(e.maxScale)),"minScale"in e&&(r.minScale=(0,o.k)(e.minScale))}function h(e,r,t){if(!("write"in e)||!e.write)return t&&t.messages&&t.messages.push(new a.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(y(e,t)){const r={};return e.write(r,t)?r:null}return(0,i.pC)(r)&&function(e,r){if(function(e,r){if(p(e)){const t=(0,l.hS)("featureCollection.layers",r),a=t&&t[0]&&t[0].layerDefinition;a&&d(e,a)}else"stream"===e.type?d(e,r.layerDefinition=r.layerDefinition||{}):"group"!==e.type&&d(e,r)}(e,r),"blendMode"in e&&(r.blendMode=e.blendMode,"normal"===r.blendMode&&delete r.blendMode),r.opacity=(0,o.k)(e.opacity),r.title=e.title||"Layer",r.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type)if(p(e)){const t=r.featureCollection;t&&(t.showLegend=e.legendEnabled)}else r.showLegend=e.legendEnabled}(e,r=(0,s.d9)(r)),r}}}]);