@arcgis/map-components 6.0.0-next.41 → 6.0.0-next.43

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 (173) hide show
  1. package/dist/cdn/{HOMM5T7F.js → 23FQMZEJ.js} +1 -1
  2. package/dist/cdn/{OT4D3TVG.js → 2KGJ7SZH.js} +1 -1
  3. package/dist/cdn/{GTQOMGD7.js → 2MIHLZFT.js} +1 -1
  4. package/dist/cdn/{NF426VVG.js → 3L2QSX64.js} +1 -1
  5. package/dist/cdn/{IH2T7XRU.js → 3VLSPKTJ.js} +1 -1
  6. package/dist/cdn/3ZRVPLIZ.js +2 -0
  7. package/dist/cdn/{TII37L6V.js → 4FBPT5MA.js} +1 -1
  8. package/dist/cdn/{6WT5CUW4.js → 4IPFHL7W.js} +1 -1
  9. package/dist/cdn/{5XZKVLHC.js → 5ATTOWK4.js} +1 -1
  10. package/dist/cdn/{HUZLTULW.js → 5MRT5VRJ.js} +1 -1
  11. package/dist/cdn/6E4PVTTN.js +2 -0
  12. package/dist/cdn/{JBD7Q5YD.js → 6NCSWYYX.js} +1 -1
  13. package/dist/cdn/{5VK56DPB.js → 6NY67VW5.js} +1 -1
  14. package/dist/cdn/{RX7LVZ5V.js → 6P7V62WJ.js} +1 -1
  15. package/dist/cdn/{2BKWAHTD.js → 6TLX4R5A.js} +1 -1
  16. package/dist/cdn/6YPY3QWH.js +2 -0
  17. package/dist/cdn/72KS3TKM.js +2 -0
  18. package/dist/cdn/{5IWCWL2Q.js → 7FB4DOVH.js} +1 -1
  19. package/dist/cdn/{DYKRS7YX.js → 7GXJ6HJZ.js} +1 -1
  20. package/dist/cdn/7WUY57GO.js +2 -0
  21. package/dist/cdn/{DVLTVCIH.js → 7YSYI32G.js} +1 -1
  22. package/dist/cdn/{AMRGLUBB.js → AKSCONMP.js} +1 -1
  23. package/dist/cdn/{FTRRLFYT.js → B6VGTQ4L.js} +1 -1
  24. package/dist/cdn/BQCOYIEH.js +2 -0
  25. package/dist/cdn/{Y6MM3GUE.js → BVWTI63V.js} +1 -1
  26. package/dist/cdn/{4DRKK3S6.js → CBCAUSDJ.js} +1 -1
  27. package/dist/cdn/{CX23L4OX.js → CPK3PMBE.js} +1 -1
  28. package/dist/cdn/CSVVXWVY.js +2 -0
  29. package/dist/cdn/{Y4GL4RZF.js → CX5AZKYT.js} +1 -1
  30. package/dist/cdn/{2J6WEB6T.js → DEICCDP4.js} +1 -1
  31. package/dist/cdn/DJAFLMKA.js +2 -0
  32. package/dist/cdn/DSINA62N.js +4 -0
  33. package/dist/cdn/{NYIKMTKG.js → E4ZUESKS.js} +1 -1
  34. package/dist/cdn/{UJBFSJDF.js → E5BLQ5FK.js} +1 -1
  35. package/dist/cdn/{KKSTZRNG.js → EDGXY4OL.js} +1 -1
  36. package/dist/cdn/{YEPFWDQQ.js → EL5AFBNE.js} +1 -1
  37. package/dist/cdn/{GEZIZQV6.js → EN5NCDOJ.js} +1 -1
  38. package/dist/cdn/{QNQOBXLM.js → EQA4WO3H.js} +1 -1
  39. package/dist/cdn/{JILA7S66.js → FLSEDKWU.js} +1 -1
  40. package/dist/cdn/{625O4F4L.js → GQVCBPZS.js} +1 -1
  41. package/dist/cdn/{I7XTEFQP.js → GSGFAJCR.js} +1 -1
  42. package/dist/cdn/{BXBPEOE3.js → GSU7GNNP.js} +1 -1
  43. package/dist/cdn/{IZFEOYED.js → H2PXK4AT.js} +1 -1
  44. package/dist/cdn/{RCJ3GROZ.js → HBQAYD5H.js} +1 -1
  45. package/dist/cdn/{D7RGMUI2.js → IAJNBAC5.js} +1 -1
  46. package/dist/cdn/{JPQ5ELDQ.js → INMMQJOE.js} +1 -1
  47. package/dist/cdn/{OMDFAKMT.js → IQYLP2H7.js} +1 -1
  48. package/dist/cdn/{DVH35LZL.js → J2K2LRII.js} +1 -1
  49. package/dist/cdn/JUTSSJJF.js +2 -0
  50. package/dist/cdn/JZYDXRQ6.js +4 -0
  51. package/dist/cdn/{Y6ZJNJZ7.js → KSOO3XZ2.js} +1 -1
  52. package/dist/cdn/{KLSIUZNN.js → MKL4YXDU.js} +1 -1
  53. package/dist/cdn/{EMOYKTQL.js → O2BFE6NY.js} +1 -1
  54. package/dist/cdn/OUFB4LJK.js +2 -0
  55. package/dist/cdn/{GFC6LS4L.js → OYG42YJL.js} +1 -1
  56. package/dist/cdn/{O2RCWKKW.js → PD2BELF2.js} +1 -1
  57. package/dist/cdn/{T2JBUILX.js → PFYEJDRJ.js} +1 -1
  58. package/dist/cdn/{JWCEHGEZ.js → PNMBUGPD.js} +1 -1
  59. package/dist/cdn/QEAEEU72.js +2 -0
  60. package/dist/cdn/{U53HTVZS.js → RUJLTSDR.js} +1 -1
  61. package/dist/cdn/{IH7XQCY4.js → SA7B3XQG.js} +1 -1
  62. package/dist/cdn/{CNUAMIZQ.js → T5RX6NXT.js} +2 -2
  63. package/dist/cdn/T7PDMEAD.js +2 -0
  64. package/dist/cdn/{7PMJ7HCH.js → U5BYZI4G.js} +1 -1
  65. package/dist/cdn/UPXNXNTT.js +2 -0
  66. package/dist/cdn/{MG2HQ3FT.js → UW3FYQWG.js} +1 -1
  67. package/dist/cdn/V34ZYXUI.js +2 -0
  68. package/dist/cdn/{WRB2DEQ6.js → W6ILOTBW.js} +1 -1
  69. package/dist/cdn/{EZFBYRI4.js → WYX6WXW4.js} +1 -1
  70. package/dist/cdn/{JFE63ANJ.js → X27EW2YC.js} +1 -1
  71. package/dist/cdn/{6GFNMSM4.js → XHHVIWXO.js} +1 -1
  72. package/dist/cdn/{7P24CQF4.js → XOWOMVSW.js} +1 -1
  73. package/dist/cdn/{CRJB272X.js → XURPEC42.js} +1 -1
  74. package/dist/cdn/{WVRIR3PK.js → YB6AHPU5.js} +1 -1
  75. package/dist/cdn/{LQYTLVCL.js → YRQXG7GX.js} +1 -1
  76. package/dist/cdn/{LHH3PS5H.js → ZVGWUEUE.js} +1 -1
  77. package/dist/cdn/assets/time-zone-chip/t9n/messages.en.json +1 -1
  78. package/dist/cdn/index.js +1 -1
  79. package/dist/cdn/main.css +1 -1
  80. package/dist/chunks/AnalysisViewModel.js +1 -1
  81. package/dist/chunks/async-utils.js +1 -1
  82. package/dist/chunks/slots.js +1 -1
  83. package/dist/components/arcgis-daylight/customElement.d.ts +43 -50
  84. package/dist/components/arcgis-daylight/customElement.js +231 -225
  85. package/dist/components/arcgis-editor/customElement.d.ts +0 -1
  86. package/dist/components/arcgis-elevation-profile/customElement.d.ts +8 -0
  87. package/dist/components/arcgis-elevation-profile/customElement.js +39 -38
  88. package/dist/components/arcgis-line-of-sight/customElement.d.ts +4 -1
  89. package/dist/components/arcgis-link-chart/customElement.d.ts +0 -1
  90. package/dist/components/arcgis-map/customElement.d.ts +0 -1
  91. package/dist/components/arcgis-scene/customElement.d.ts +0 -1
  92. package/dist/components/arcgis-shadow-cast/customElement.d.ts +36 -24
  93. package/dist/components/arcgis-shadow-cast/customElement.js +105 -128
  94. package/dist/components/arcgis-sketch/customElement.d.ts +0 -1
  95. package/dist/components/arcgis-time-zone-chip/customElement.d.ts +8 -0
  96. package/dist/components/arcgis-time-zone-chip/customElement.js +27 -18
  97. package/dist/components/arcgis-utility-network-trace-locations/customElement.js +34 -34
  98. package/dist/components/types.d.ts +7 -0
  99. package/dist/docs/api.json +1 -1
  100. package/dist/docs/docs.json +1 -1
  101. package/dist/docs/vscode.html-custom-data.json +1 -1
  102. package/dist/docs/web-types.json +1 -1
  103. package/dist/index.d.ts +0 -10
  104. package/dist/loader.js +3 -4
  105. package/dist/types/lumina.d.ts +6 -11
  106. package/dist/types/preact.d.ts +6 -12
  107. package/dist/types/react.d.ts +6 -13
  108. package/dist/types/stencil.d.ts +6 -11
  109. package/package.json +7 -7
  110. package/dist/cdn/27TSPXYV.js +0 -2
  111. package/dist/cdn/2JSC2QUL.js +0 -2
  112. package/dist/cdn/43IGD6V3.js +0 -2
  113. package/dist/cdn/4JR57ZIQ.js +0 -2
  114. package/dist/cdn/6BT6RP22.js +0 -2
  115. package/dist/cdn/6KYZMT4A.js +0 -2
  116. package/dist/cdn/BJUFDQGX.js +0 -2
  117. package/dist/cdn/DFNH6YRR.js +0 -2
  118. package/dist/cdn/GOMR7D5M.js +0 -2
  119. package/dist/cdn/HKKNU4CX.js +0 -2
  120. package/dist/cdn/LZUAJU6O.js +0 -2
  121. package/dist/cdn/PYBUTNHM.js +0 -2
  122. package/dist/cdn/SKV3CQSZ.js +0 -2
  123. package/dist/cdn/TXVB6WRV.js +0 -2
  124. package/dist/cdn/UYDXI4AK.js +0 -4
  125. package/dist/cdn/YAWLVMV6.js +0 -2
  126. package/dist/cdn/YGBYB3BZ.js +0 -2
  127. package/dist/components/arcgis-utility-network-validate-topology/customElement.d.ts +0 -100
  128. package/dist/components/arcgis-utility-network-validate-topology/customElement.js +0 -44
  129. package/dist/components/arcgis-utility-network-validate-topology/index.d.ts +0 -1
  130. package/dist/components/arcgis-utility-network-validate-topology/index.js +0 -1
  131. /package/dist/cdn/{SLQPDAGN.js → 237ZYFAI.js} +0 -0
  132. /package/dist/cdn/{AYQJ2LTV.js → 4LNUUNTS.js} +0 -0
  133. /package/dist/cdn/{OLSESBZ7.js → 4RG2L4NX.js} +0 -0
  134. /package/dist/cdn/{N2YWWQOS.js → 6F6UDFL6.js} +0 -0
  135. /package/dist/cdn/{62HMPABL.js → 6FZQAFDW.js} +0 -0
  136. /package/dist/cdn/{RTDY3HLR.js → 6RNYBJQG.js} +0 -0
  137. /package/dist/cdn/{ZCL4XHIZ.js → 6YT2MRU6.js} +0 -0
  138. /package/dist/cdn/{XQ2WXTW7.js → AAF7U7C7.js} +0 -0
  139. /package/dist/cdn/{IRFIHD5X.js → AZFQTGM4.js} +0 -0
  140. /package/dist/cdn/{XCSF7KJK.js → BVR6RYPL.js} +0 -0
  141. /package/dist/cdn/{DPEWQQEB.js → C3VCBV5R.js} +0 -0
  142. /package/dist/cdn/{ZSKO7HLH.js → COJJ4ST7.js} +0 -0
  143. /package/dist/cdn/{NVN2CATF.js → CSLBASOL.js} +0 -0
  144. /package/dist/cdn/{2P5AJORF.js → DDUJHOQ5.js} +0 -0
  145. /package/dist/cdn/{DLUFAV4S.js → F25B6VFT.js} +0 -0
  146. /package/dist/cdn/{PWZHB6VD.js → FC4U5FYO.js} +0 -0
  147. /package/dist/cdn/{SLNXNVPI.js → H3SNBMDP.js} +0 -0
  148. /package/dist/cdn/{QWMDZDQA.js → HDNFEQXP.js} +0 -0
  149. /package/dist/cdn/{FJMXBIN5.js → HMAEKQ63.js} +0 -0
  150. /package/dist/cdn/{T34W3GKP.js → HRKFC3ZC.js} +0 -0
  151. /package/dist/cdn/{5GTPIPN7.js → ID3JLPN6.js} +0 -0
  152. /package/dist/cdn/{KOMTNQPT.js → IKNNVF57.js} +0 -0
  153. /package/dist/cdn/{OFBWNR54.js → J3U6IFQO.js} +0 -0
  154. /package/dist/cdn/{CHMBPPHS.js → JUG5VVPL.js} +0 -0
  155. /package/dist/cdn/{MEISDI2H.js → KYUDUFNZ.js} +0 -0
  156. /package/dist/cdn/{4LWSF6AI.js → L63YJ5AF.js} +0 -0
  157. /package/dist/cdn/{LVIYMA67.js → LGPNCTTW.js} +0 -0
  158. /package/dist/cdn/{LS4U4GD5.js → LH4SQVC2.js} +0 -0
  159. /package/dist/cdn/{XGWYQ7FU.js → LNUFIKD5.js} +0 -0
  160. /package/dist/cdn/{7YT5W57B.js → NIASADUV.js} +0 -0
  161. /package/dist/cdn/{UDXDE3LW.js → NJ3CJS46.js} +0 -0
  162. /package/dist/cdn/{6SL7YNKF.js → NXC47WWQ.js} +0 -0
  163. /package/dist/cdn/{ZNIMZP5R.js → O527UXXI.js} +0 -0
  164. /package/dist/cdn/{G4IKO2R6.js → OXZOWO5A.js} +0 -0
  165. /package/dist/cdn/{SFDCS6A2.js → PHFJU5KL.js} +0 -0
  166. /package/dist/cdn/{TP2KQRW6.js → QHK5I5OO.js} +0 -0
  167. /package/dist/cdn/{IAYL44LK.js → RB3QNSQJ.js} +0 -0
  168. /package/dist/cdn/{ECA47Z37.js → T4CJDMMZ.js} +0 -0
  169. /package/dist/cdn/{AKTIOEYM.js → TAU22PX7.js} +0 -0
  170. /package/dist/cdn/{ZHYXFOYU.js → VP47DYTR.js} +0 -0
  171. /package/dist/cdn/{NVKOZL7X.js → WMP77MLQ.js} +0 -0
  172. /package/dist/cdn/{5GGAWGSN.js → WMRMVZHH.js} +0 -0
  173. /package/dist/cdn/{GCPR7XFU.js → YEEPGAEP.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as _}from"./GUL7EIJ4.js";import c from"./DP2UXNPJ.js";import b from"./HU57LQOA.js";import a from"./SKV3CQSZ.js";import"./WJQUE4DR.js";import"./FY7P5YLX.js";import"./IRDDLVT2.js";import{a as L}from"./LXME6MU5.js";import{P as O,Q as S,R as j,T as R,Y as f,_ as Q,a as N,b as o,o as M}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{templateHasKey:V,stripHTML:k},{isRelatableFeatureSupportedLayer:G,findRelatedLayer:J},{substitute:U,formatNumber:T},{watch:p,on:X},H,K,{ignoreAbortErrors:P},Y,,,{h:B}])=>{var ee=N`:host{position:relative;flex:1 1 auto}:host([empty]){display:none}.list{min-height:var(--calcite-spacing-xxxl)}.list-item-hidden{display:none}.feature-observer{position:relative;bottom:var(--calcite-space-2xl);z-index:2;text-align:center}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-space-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none}`,te=u=>{let e=[];if(u.formTemplate){let{description:t,title:r}=u.formTemplate;u.fields?.forEach(i=>{let s=r&&V(r,i.name),a=t&&V(t,i.name);(s||a)&&e.push(i.name)})}return e},D=100;function re(u){return typeof u=="string"&&u.trim().length>0}var E=class extends j{constructor(){super(...arguments),this._increaseFeaturePage=()=>{let{state:e,showAllEnabled:t,relatedFeatures:r,featuresPerPage:i,featurePage:s}=this;e==="ready"&&t&&r.length>=i*s&&this.featurePage++},this._relatedFeatureIntersectionObserver=new IntersectionObserver(([e])=>{e?.isIntersecting&&this._increaseFeaturePage()},{root:window.document}),this._featurePage=1,this._cancelQuery=()=>{let{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._cancelQueryPage=()=>{let{_queryPageAbortController:e}=this;e&&e.abort(),this._queryPageAbortController=null},this._queryController=async()=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await P(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let e=new AbortController;this._queryFeatureCountAbortController=e,await P(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryPageController=async()=>{let e=new AbortController;this._queryPageAbortController=e,await P(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryDebounced=_(this._queryController,D),this._queryFeatureCountDebounced=_(this._queryFeatureCountController,D),this._queryPageDebounced=_(this._queryPageController,D),this._query=async()=>{let{_queryAbortController:e,relatedFeatures:t}=this;!this.featureCount||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||(this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,t.destroyAll(),t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:e?.signal}))))},this._addFlowItem=e=>{e&&this.flowItems?.push(e)},this._relatedFeatureIntersectionObserverNode=O(),this.relatedFeatures=new H,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featureCount=0,this._loaded=!1,this.relatedFeatureViewModels=new H,this.autoDestroyDisabled=!1,this.featuresPerPage=10,this.useFeatureNextFlowItem=!1,this.includeDefaultActions=!1,this.flowType="feature-relationship",this.headingLevel=2,this.hideHeading=!1,this.hideDescription=!1,this.hideEmptyRelationshipContent=!1,this.empty=!1,this.showAllEnabled=!1}static{this.properties={allCategories:16,_queryAbortController:16,_queryPageAbortController:16,_queryFeatureCountAbortController:16,featureCount:16,_loaded:16,canLoad:16,canQuery:16,displayShowAllButton:16,displayListItems:16,categories:16,itemDescriptionFieldName:16,relatedFeatureViewModels:16,state:16,autoDestroyDisabled:5,allItemsDescription:32,featurePage:9,featuresPerPage:9,flowItems:0,useFeatureNextFlowItem:5,actions:0,includeDefaultActions:5,flowType:1,headingLevel:9,messages:0,heading:1,description:1,values:0,activeCategory:0,hideHeading:5,hideDescription:5,hideEmptyRelationshipContent:5,empty:39,displayCount:9,graphic:0,layer:0,map:0,view:0,spatialReference:0,timeZone:1,orderByFields:0,relationshipId:9,showAllEnabled:5,label:3}}static{this.styles=ee}get orderByFieldsFixedCasing(){let{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map(r=>{let i=r.clone();return i.field=B(r.field,t),i}):e??[]}get supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get allCategoriesCount(){return this.allCategories?.length??0}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedLayer(){let{layer:e,map:t,relationship:r}=this;if(!e?.loaded||!t||!r)return null;let i=e.type==="subtype-sublayer"&&e.parent&&G(e.parent)?e.parent:e;return J(t,i,r)??null}get relatedLayerKeyField(){let{relatedLayer:e,relationshipId:t}=this;return e?.loaded&&t!=null?e.relationships?.find(r=>r.id===t)?.keyField:null}get relatedLayerKeyFields(){let{relatedLayer:e}=this;return e?.loaded?e.relationships?.map(t=>t.keyField).filter(t=>t!=null)??[]:[]}get relationship(){let{relationshipId:e,layer:t}=this;return e!=null&&t?.loaded?t.relationships?.find(({id:r})=>r===e)??null:null}get relationshipKey(){let{relationshipKeyField:e}=this;return(e&&this.graphic?.attributes?.[e])??null}get relationshipKeyField(){return this.relationship?.keyField||null}get canLoad(){return!!this.map&&this.relationshipId!=null&&typeof this.objectId=="number"}get canQuery(){let e=this.layer?.capabilities?.queryRelated;return!!this.relatedLayer&&!!this.relationship&&this.relationshipId!=null&&this.objectId!=null&&!!e?.supportsCount&&e?.supportsPagination}get displayShowAllButton(){let{showAllEnabled:e,featureCount:t,displayCount:r,state:i,allCategoriesCount:s}=this,a=!!s&&(s>r||r===0),n=!!t&&(t>r||r===0);return!e&&i==="ready"&&(a||n)}get displayListItems(){let{relatedFeatures:e,allCategoriesCount:t}=this;return this.displayShowAllButton||!!e.length||!!t}get categories(){let{allCategories:e}=this;return this.showAllEnabled?e:e?.slice(0,this.displayCount)??null}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing[0]?.field||null}get state(){let{_queryAbortController:e,_queryFeatureCountAbortController:t,_queryPageAbortController:r,canQuery:i,_loaded:s,canLoad:a}=this;return t||a&&!s?"loading":e||r?"querying":i?"ready":"disabled"}get allItemsDescription(){let{messages:e,featureCount:t,allCategories:r,allCategoriesCount:i}=this;return U(e?.numberRecords??"",{number:T(r?i:t)})}get featurePage(){return this._featurePage}set featurePage(e){let{featuresPerPage:t,featureCount:r}=this,i=1,s=Math.ceil(r/t)||1;this._featurePage=Math.min(Math.max(e,i),s)}get heading(){let{activeCategory:e}=this;return this._heading??e?.name}set heading(e){this._heading=e}get _empty(){let{displayListItems:e,hideEmptyRelationshipContent:t,state:r}=this;return t&&r==="ready"&&!e}get displayCount(){return this._displayCount??3}set displayCount(e){this._displayCount=Math.min(Math.max(e??3,0),10)}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[p(()=>[this.displayCount,this.graphic,this.layer,this.layer?.loaded,this.map,this.orderByFields,this.relationshipId,this.featuresPerPage,this.showAllEnabled,this.canQuery,this.featureCount,this.activeCategory],()=>this._queryDebounced(),{initial:!0}),p(()=>[this.featurePage,this.showAllEnabled],()=>this._queryPageDebounced()),p(()=>[this.layer,this.relationshipId,this.objectId,this.canQuery,this.activeCategory],()=>this._queryFeatureCountDebounced(),{initial:!0}),p(()=>[this.state,this.showAllEnabled,this._relatedFeatureIntersectionObserverNode],()=>this._handleRelatedFeatureObserverChange()),p(()=>[this.displayListItems,this.hideEmptyRelationshipContent,this.state],()=>this._setEmpty(this._empty),{initial:!0}),X(()=>this.relatedFeatures,"change",()=>this._setRelatedFeaturesViewModels())]),this.manager.onDestroy(()=>{this.relatedFeatureViewModels.destroyAll(),this.relatedFeatures.destroyAll(),this._cancelQuery(),this._cancelQueryFeatureCount(),this._cancelQueryPage(),this._unobserveRelatedFeatureObserver()})}_setEmpty(e){M(()=>this.empty=e)}async _queryFeatureCount(){let{layer:e,relatedLayer:t}=this;await e?.load(),await t?.load();let{_queryFeatureCountAbortController:r,activeCategory:i,canQuery:s,objectId:a,relatedLayerKeyField:n,relationshipId:l,relationshipKey:g,supportsCacheHint:C}=this;if(!s||!e||!t||a==null){this.featureCount=0,this.allCategories=void 0;return}if(t?.type==="subtype-group"&&!i){if(this.featureCount=0,this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,this.relatedFeatures.destroyAll(),n&&g!=null){let{default:v}=await $arcgis.t(m=>({default:m[0]}),"smartMapping/statistics/uniqueValues"),{uniqueValueInfos:I}=await v({layer:t,sqlWhere:`${n} = '${g}'`,field:t.subtypeField??void 0,signal:r?.signal}),$=I.map(({count:h,value:y})=>{let b=t.subtypes?.find(A=>A.code===y)?.name;return y!=null&&b?{count:h,value:y,name:b}:void 0}).filter(h=>h!=null);this.allCategories=$}return}let{historicMoment:m,gdbVersion:F}=e,w=new K({cacheHint:C,gdbVersion:F,historicMoment:m,relationshipId:l,returnGeometry:!1,objectIds:[a],where:this._getRelationshipWhereClause(t)}),c=await e.queryRelatedFeaturesCount(w,{signal:r?.signal});this.allCategories=void 0,this.featureCount=c[a]||0}_getRelationshipWhereClause(e){let{activeCategory:t}=this,r=e.createQuery(),i="subtypeField"in e?e.subtypeField:void 0,s=t&&i?`${i} = ${t.value}`:void 0,a=r.where;return a&&s?`(${a}) AND (${s})`:a??s}_sliceFeatures(e){let{showAllEnabled:t,displayCount:r}=this;return t?e:r?e.slice(0,r):[]}async _queryPage(){let{relatedFeatures:e,featurePage:t,showAllEnabled:r,_queryPageAbortController:i,featureCount:s}=this;!r||t<2||!s||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||e.addMany(await this._queryRelatedFeatures({signal:i?.signal}))}async _queryRelatedFeatures(e){let{displayCount:t,featureCount:r,featurePage:i,featuresPerPage:s,layer:a,orderByFieldsFixedCasing:n,relatedLayer:l,relatedLayerKeyFields:g,relationshipId:C,showAllEnabled:m,supportsCacheHint:F}=this,{canQuery:w,objectId:c}=this;if(!w||!a||!l||c==null)return[];let v=m?((i-1)*s+r)%r:0,I=m?s:t,$=l.objectIdField,h="subtypeField"in l?l.subtypeField:void 0,y=[...n.map(d=>d.field),...te(l),...g,$,h].filter(re),b=n.map(d=>`${d.field} ${d.order}`),{historicMoment:A,gdbVersion:Z}=a,W=new K({orderByFields:b,start:v,num:I,outFields:y,cacheHint:F,historicMoment:A,gdbVersion:Z,relationshipId:C,returnGeometry:!1,objectIds:[c],where:this._getRelationshipWhereClause(l)}),q=(await a.queryRelatedFeatures(W,{signal:e?.signal}))[c]?.features||[];return l.type==="subtype-group"&&h?q.forEach(d=>{let z=d.attributes[h],x=l.findSublayerForSubtypeCode?.(z);d.sourceLayer=x,d.layer=x}):q.forEach(d=>{d.sourceLayer=l,d.layer=l}),q}_selectCategory(e){let{flowItems:t}=this;t&&this._addRelationshipFlowItem({showAllEnabled:!0,activeCategory:e})}_selectRecord(e){let{flowItems:t}=this;if(!t)return;let r=this.useFeatureNextFlowItem?f(o`<arcgis-feature-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .includeDefaultActions=${this.includeDefaultActions} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-next>`):f(o`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`);this._addFlowItem(r)}_addRelationshipFlowItem({showAllEnabled:e=!1,activeCategory:t}){this._addFlowItem(f(o`<arcgis-feature-relationship .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .messages=${this.messages} .activeCategory=${t} .displayCount=${this.displayCount} .flowItems=${this.flowItems} .flowType=${this.flowType} .graphic=${this.graphic} .heading=${this.heading} .includeDefaultActions=${this.includeDefaultActions} hide-description .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .showAllEnabled=${e} hide-heading .layer=${this.layer} .map=${this.map} .orderByFields=${this.orderByFields} .relationshipId=${this.relationshipId} .spatialReference=${this.spatialReference} .useFeatureNextFlowItem=${this.useFeatureNextFlowItem} .values=${this.values} .view=${this.view}></arcgis-feature-relationship>`))}_showAllRecords(){let{flowItems:e}=this;e&&this._addRelationshipFlowItem({showAllEnabled:!0})}_handleRelatedFeatureObserverChange(){this._unobserveRelatedFeatureObserver();let{state:e,showAllEnabled:t}=this;this._relatedFeatureIntersectionObserverNode.value&&e==="ready"&&t&&this._relatedFeatureIntersectionObserver.observe(this._relatedFeatureIntersectionObserverNode.value)}_unobserveRelatedFeatureObserver(){this._relatedFeatureIntersectionObserverNode.value&&this._relatedFeatureIntersectionObserver.unobserve(this._relatedFeatureIntersectionObserverNode.value)}_matchesFeature(e,t){let r=e?.graphic?.getObjectId(),i=t?.getObjectId();return r!=null&&i!=null&&r===i}_setRelatedFeaturesViewModels(){let{relatedFeatures:e,relatedFeatureViewModels:t,map:r,view:i,spatialReference:s,timeZone:a}=this;e?.filter(Boolean).forEach(n=>{t.some(l=>this._matchesFeature(l,n))||t.add(new Y({abilities:{relationshipContent:!1},map:r,view:i,spatialReference:s,timeZone:a,graphic:n}))}),t.forEach(n=>{e?.find(l=>this._matchesFeature(n,l))||t.remove(n)})}render(){let{state:e}=this;return o`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${e==="loading"?this._renderLoading():e==="disabled"?this._renderRelationshipNotFound():this._renderRelatedFeatures()}</div>`}_renderStickyLoading(){return this.state==="querying"?o`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}_renderLoadingIcon(){return o`<calcite-loader inline label></calcite-loader>`}_renderLoading(){return o`<div class="loading-container">${this._renderLoadingIcon()}</div>`}_renderShowAllIconNode(){return o`<calcite-icon icon=list scale=s slot=content-end></calcite-icon>`}_renderChevronIconNode(){return o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}_renderCategory(e){let{count:t,name:r}=e,i=T(t);return o`<calcite-list-item class="list-item" .disabled=${!t} .label=${r} @calciteListItemSelect=${()=>this._selectCategory(e)}><calcite-chip .label=${i} scale=s slot=content-end>${i}</calcite-chip>${this._renderChevronIconNode()}</calcite-list-item>`}_renderRelatedFeature(e){let{itemDescriptionFieldName:t,values:r}=this,{formattedAttributes:i,state:s,heading:a}=e,n={...r,...i?.global},l=(t&&n?.[t])??"";return o`<calcite-list-item class=${R(L("list-item",{"list-item-hidden":s==="loading"}))} .description=${k(l.toString())} .label=${k(a)} @calciteListItemSelect=${()=>this._selectRecord(e)}>${this._renderChevronIconNode()}</calcite-list-item>`}_renderShowAllListItem(){return this.displayShowAllButton?o`<calcite-list-item .description=${this.allItemsDescription} .label=${this.messages?.showAll} @calciteListItemSelect=${()=>this._showAllRecords()}>${this._renderShowAllIconNode()}</calcite-list-item>`:null}_renderNoRelatedFeaturesMessage(){return o`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noRelatedFeatures}</div></calcite-notice>`}_renderFeatureObserver(){return o`<div class="feature-observer" ${S(this._relatedFeatureIntersectionObserverNode)}></div>`}_renderList(){let{relatedFeatureViewModels:e,categories:t}=this;return o`<calcite-list display-mode=flat .label=${this.messages?.relatedFeaturesList??""}>${t?.map(r=>this._renderCategory(r))??e.toArray().map(r=>this._renderRelatedFeature(r))}${this._renderShowAllListItem()}</calcite-list>`}_renderRelatedFeatures(){let{displayListItems:e}=this,{state:t}=this;return o`<div class=${R(L("list",{"list-querying":t==="querying"}))}>${e?this._renderList():t==="ready"?this._renderNoRelatedFeaturesMessage():null}${this._renderStickyLoading()}${this._renderFeatureObserver()}</div>`}_renderRelationshipNotFound(){return o`<calcite-notice icon=exclamation-mark-triangle kind=danger open scale=s width=full><div slot=message>${this.messages?.relationshipNotFound}</div></calcite-notice>`}};Q("arcgis-feature-relationship",E);return E},"applications/Components/stringUtils","applications/Components/featureUtils","intl","core/reactiveUtils","core/Collection","rest/support/RelationshipQuery","core/promiseUtils","popup/FeatureModel",a,b,c)
2
+ import{a as _}from"./GUL7EIJ4.js";import c from"./DP2UXNPJ.js";import b from"./HU57LQOA.js";import a from"./3ZRVPLIZ.js";import"./WJQUE4DR.js";import"./FY7P5YLX.js";import"./IRDDLVT2.js";import{a as L}from"./LXME6MU5.js";import{P as O,Q as S,R as j,T as R,Y as f,_ as Q,a as N,b as o,o as M}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{templateHasKey:V,stripHTML:k},{isRelatableFeatureSupportedLayer:G,findRelatedLayer:J},{substitute:U,formatNumber:T},{watch:p,on:X},H,K,{ignoreAbortErrors:P},Y,,,{h:B}])=>{var ee=N`:host{position:relative;flex:1 1 auto}:host([empty]){display:none}.list{min-height:var(--calcite-spacing-xxxl)}.list-item-hidden{display:none}.feature-observer{position:relative;bottom:var(--calcite-space-2xl);z-index:2;text-align:center}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-space-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none}`,te=u=>{let e=[];if(u.formTemplate){let{description:t,title:r}=u.formTemplate;u.fields?.forEach(i=>{let s=r&&V(r,i.name),a=t&&V(t,i.name);(s||a)&&e.push(i.name)})}return e},D=100;function re(u){return typeof u=="string"&&u.trim().length>0}var E=class extends j{constructor(){super(...arguments),this._increaseFeaturePage=()=>{let{state:e,showAllEnabled:t,relatedFeatures:r,featuresPerPage:i,featurePage:s}=this;e==="ready"&&t&&r.length>=i*s&&this.featurePage++},this._relatedFeatureIntersectionObserver=new IntersectionObserver(([e])=>{e?.isIntersecting&&this._increaseFeaturePage()},{root:window.document}),this._featurePage=1,this._cancelQuery=()=>{let{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._cancelQueryPage=()=>{let{_queryPageAbortController:e}=this;e&&e.abort(),this._queryPageAbortController=null},this._queryController=async()=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await P(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let e=new AbortController;this._queryFeatureCountAbortController=e,await P(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryPageController=async()=>{let e=new AbortController;this._queryPageAbortController=e,await P(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryDebounced=_(this._queryController,D),this._queryFeatureCountDebounced=_(this._queryFeatureCountController,D),this._queryPageDebounced=_(this._queryPageController,D),this._query=async()=>{let{_queryAbortController:e,relatedFeatures:t}=this;!this.featureCount||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||(this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,t.destroyAll(),t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:e?.signal}))))},this._addFlowItem=e=>{e&&this.flowItems?.push(e)},this._relatedFeatureIntersectionObserverNode=O(),this.relatedFeatures=new H,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featureCount=0,this._loaded=!1,this.relatedFeatureViewModels=new H,this.autoDestroyDisabled=!1,this.featuresPerPage=10,this.useFeatureNextFlowItem=!1,this.includeDefaultActions=!1,this.flowType="feature-relationship",this.headingLevel=2,this.hideHeading=!1,this.hideDescription=!1,this.hideEmptyRelationshipContent=!1,this.empty=!1,this.showAllEnabled=!1}static{this.properties={allCategories:16,_queryAbortController:16,_queryPageAbortController:16,_queryFeatureCountAbortController:16,featureCount:16,_loaded:16,canLoad:16,canQuery:16,displayShowAllButton:16,displayListItems:16,categories:16,itemDescriptionFieldName:16,relatedFeatureViewModels:16,state:16,autoDestroyDisabled:5,allItemsDescription:32,featurePage:9,featuresPerPage:9,flowItems:0,useFeatureNextFlowItem:5,actions:0,includeDefaultActions:5,flowType:1,headingLevel:9,messages:0,heading:1,description:1,values:0,activeCategory:0,hideHeading:5,hideDescription:5,hideEmptyRelationshipContent:5,empty:39,displayCount:9,graphic:0,layer:0,map:0,view:0,spatialReference:0,timeZone:1,orderByFields:0,relationshipId:9,showAllEnabled:5,label:3}}static{this.styles=ee}get orderByFieldsFixedCasing(){let{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map(r=>{let i=r.clone();return i.field=B(r.field,t),i}):e??[]}get supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get allCategoriesCount(){return this.allCategories?.length??0}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedLayer(){let{layer:e,map:t,relationship:r}=this;if(!e?.loaded||!t||!r)return null;let i=e.type==="subtype-sublayer"&&e.parent&&G(e.parent)?e.parent:e;return J(t,i,r)??null}get relatedLayerKeyField(){let{relatedLayer:e,relationshipId:t}=this;return e?.loaded&&t!=null?e.relationships?.find(r=>r.id===t)?.keyField:null}get relatedLayerKeyFields(){let{relatedLayer:e}=this;return e?.loaded?e.relationships?.map(t=>t.keyField).filter(t=>t!=null)??[]:[]}get relationship(){let{relationshipId:e,layer:t}=this;return e!=null&&t?.loaded?t.relationships?.find(({id:r})=>r===e)??null:null}get relationshipKey(){let{relationshipKeyField:e}=this;return(e&&this.graphic?.attributes?.[e])??null}get relationshipKeyField(){return this.relationship?.keyField||null}get canLoad(){return!!this.map&&this.relationshipId!=null&&typeof this.objectId=="number"}get canQuery(){let e=this.layer?.capabilities?.queryRelated;return!!this.relatedLayer&&!!this.relationship&&this.relationshipId!=null&&this.objectId!=null&&!!e?.supportsCount&&e?.supportsPagination}get displayShowAllButton(){let{showAllEnabled:e,featureCount:t,displayCount:r,state:i,allCategoriesCount:s}=this,a=!!s&&(s>r||r===0),n=!!t&&(t>r||r===0);return!e&&i==="ready"&&(a||n)}get displayListItems(){let{relatedFeatures:e,allCategoriesCount:t}=this;return this.displayShowAllButton||!!e.length||!!t}get categories(){let{allCategories:e}=this;return this.showAllEnabled?e:e?.slice(0,this.displayCount)??null}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing[0]?.field||null}get state(){let{_queryAbortController:e,_queryFeatureCountAbortController:t,_queryPageAbortController:r,canQuery:i,_loaded:s,canLoad:a}=this;return t||a&&!s?"loading":e||r?"querying":i?"ready":"disabled"}get allItemsDescription(){let{messages:e,featureCount:t,allCategories:r,allCategoriesCount:i}=this;return U(e?.numberRecords??"",{number:T(r?i:t)})}get featurePage(){return this._featurePage}set featurePage(e){let{featuresPerPage:t,featureCount:r}=this,i=1,s=Math.ceil(r/t)||1;this._featurePage=Math.min(Math.max(e,i),s)}get heading(){let{activeCategory:e}=this;return this._heading??e?.name}set heading(e){this._heading=e}get _empty(){let{displayListItems:e,hideEmptyRelationshipContent:t,state:r}=this;return t&&r==="ready"&&!e}get displayCount(){return this._displayCount??3}set displayCount(e){this._displayCount=Math.min(Math.max(e??3,0),10)}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[p(()=>[this.displayCount,this.graphic,this.layer,this.layer?.loaded,this.map,this.orderByFields,this.relationshipId,this.featuresPerPage,this.showAllEnabled,this.canQuery,this.featureCount,this.activeCategory],()=>this._queryDebounced(),{initial:!0}),p(()=>[this.featurePage,this.showAllEnabled],()=>this._queryPageDebounced()),p(()=>[this.layer,this.relationshipId,this.objectId,this.canQuery,this.activeCategory],()=>this._queryFeatureCountDebounced(),{initial:!0}),p(()=>[this.state,this.showAllEnabled,this._relatedFeatureIntersectionObserverNode],()=>this._handleRelatedFeatureObserverChange()),p(()=>[this.displayListItems,this.hideEmptyRelationshipContent,this.state],()=>this._setEmpty(this._empty),{initial:!0}),X(()=>this.relatedFeatures,"change",()=>this._setRelatedFeaturesViewModels())]),this.manager.onDestroy(()=>{this.relatedFeatureViewModels.destroyAll(),this.relatedFeatures.destroyAll(),this._cancelQuery(),this._cancelQueryFeatureCount(),this._cancelQueryPage(),this._unobserveRelatedFeatureObserver()})}_setEmpty(e){M(()=>this.empty=e)}async _queryFeatureCount(){let{layer:e,relatedLayer:t}=this;await e?.load(),await t?.load();let{_queryFeatureCountAbortController:r,activeCategory:i,canQuery:s,objectId:a,relatedLayerKeyField:n,relationshipId:l,relationshipKey:g,supportsCacheHint:C}=this;if(!s||!e||!t||a==null){this.featureCount=0,this.allCategories=void 0;return}if(t?.type==="subtype-group"&&!i){if(this.featureCount=0,this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,this.relatedFeatures.destroyAll(),n&&g!=null){let{default:v}=await $arcgis.t(m=>({default:m[0]}),"smartMapping/statistics/uniqueValues"),{uniqueValueInfos:I}=await v({layer:t,sqlWhere:`${n} = '${g}'`,field:t.subtypeField??void 0,signal:r?.signal}),$=I.map(({count:h,value:y})=>{let b=t.subtypes?.find(A=>A.code===y)?.name;return y!=null&&b?{count:h,value:y,name:b}:void 0}).filter(h=>h!=null);this.allCategories=$}return}let{historicMoment:m,gdbVersion:F}=e,w=new K({cacheHint:C,gdbVersion:F,historicMoment:m,relationshipId:l,returnGeometry:!1,objectIds:[a],where:this._getRelationshipWhereClause(t)}),c=await e.queryRelatedFeaturesCount(w,{signal:r?.signal});this.allCategories=void 0,this.featureCount=c[a]||0}_getRelationshipWhereClause(e){let{activeCategory:t}=this,r=e.createQuery(),i="subtypeField"in e?e.subtypeField:void 0,s=t&&i?`${i} = ${t.value}`:void 0,a=r.where;return a&&s?`(${a}) AND (${s})`:a??s}_sliceFeatures(e){let{showAllEnabled:t,displayCount:r}=this;return t?e:r?e.slice(0,r):[]}async _queryPage(){let{relatedFeatures:e,featurePage:t,showAllEnabled:r,_queryPageAbortController:i,featureCount:s}=this;!r||t<2||!s||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||e.addMany(await this._queryRelatedFeatures({signal:i?.signal}))}async _queryRelatedFeatures(e){let{displayCount:t,featureCount:r,featurePage:i,featuresPerPage:s,layer:a,orderByFieldsFixedCasing:n,relatedLayer:l,relatedLayerKeyFields:g,relationshipId:C,showAllEnabled:m,supportsCacheHint:F}=this,{canQuery:w,objectId:c}=this;if(!w||!a||!l||c==null)return[];let v=m?((i-1)*s+r)%r:0,I=m?s:t,$=l.objectIdField,h="subtypeField"in l?l.subtypeField:void 0,y=[...n.map(d=>d.field),...te(l),...g,$,h].filter(re),b=n.map(d=>`${d.field} ${d.order}`),{historicMoment:A,gdbVersion:Z}=a,W=new K({orderByFields:b,start:v,num:I,outFields:y,cacheHint:F,historicMoment:A,gdbVersion:Z,relationshipId:C,returnGeometry:!1,objectIds:[c],where:this._getRelationshipWhereClause(l)}),q=(await a.queryRelatedFeatures(W,{signal:e?.signal}))[c]?.features||[];return l.type==="subtype-group"&&h?q.forEach(d=>{let z=d.attributes[h],x=l.findSublayerForSubtypeCode?.(z);d.sourceLayer=x,d.layer=x}):q.forEach(d=>{d.sourceLayer=l,d.layer=l}),q}_selectCategory(e){let{flowItems:t}=this;t&&this._addRelationshipFlowItem({showAllEnabled:!0,activeCategory:e})}_selectRecord(e){let{flowItems:t}=this;if(!t)return;let r=this.useFeatureNextFlowItem?f(o`<arcgis-feature-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .includeDefaultActions=${this.includeDefaultActions} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-next>`):f(o`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`);this._addFlowItem(r)}_addRelationshipFlowItem({showAllEnabled:e=!1,activeCategory:t}){this._addFlowItem(f(o`<arcgis-feature-relationship .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .messages=${this.messages} .activeCategory=${t} .displayCount=${this.displayCount} .flowItems=${this.flowItems} .flowType=${this.flowType} .graphic=${this.graphic} .heading=${this.heading} .includeDefaultActions=${this.includeDefaultActions} hide-description .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .showAllEnabled=${e} hide-heading .layer=${this.layer} .map=${this.map} .orderByFields=${this.orderByFields} .relationshipId=${this.relationshipId} .spatialReference=${this.spatialReference} .useFeatureNextFlowItem=${this.useFeatureNextFlowItem} .values=${this.values} .view=${this.view}></arcgis-feature-relationship>`))}_showAllRecords(){let{flowItems:e}=this;e&&this._addRelationshipFlowItem({showAllEnabled:!0})}_handleRelatedFeatureObserverChange(){this._unobserveRelatedFeatureObserver();let{state:e,showAllEnabled:t}=this;this._relatedFeatureIntersectionObserverNode.value&&e==="ready"&&t&&this._relatedFeatureIntersectionObserver.observe(this._relatedFeatureIntersectionObserverNode.value)}_unobserveRelatedFeatureObserver(){this._relatedFeatureIntersectionObserverNode.value&&this._relatedFeatureIntersectionObserver.unobserve(this._relatedFeatureIntersectionObserverNode.value)}_matchesFeature(e,t){let r=e?.graphic?.getObjectId(),i=t?.getObjectId();return r!=null&&i!=null&&r===i}_setRelatedFeaturesViewModels(){let{relatedFeatures:e,relatedFeatureViewModels:t,map:r,view:i,spatialReference:s,timeZone:a}=this;e?.filter(Boolean).forEach(n=>{t.some(l=>this._matchesFeature(l,n))||t.add(new Y({abilities:{relationshipContent:!1},map:r,view:i,spatialReference:s,timeZone:a,graphic:n}))}),t.forEach(n=>{e?.find(l=>this._matchesFeature(n,l))||t.remove(n)})}render(){let{state:e}=this;return o`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${e==="loading"?this._renderLoading():e==="disabled"?this._renderRelationshipNotFound():this._renderRelatedFeatures()}</div>`}_renderStickyLoading(){return this.state==="querying"?o`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}_renderLoadingIcon(){return o`<calcite-loader inline label></calcite-loader>`}_renderLoading(){return o`<div class="loading-container">${this._renderLoadingIcon()}</div>`}_renderShowAllIconNode(){return o`<calcite-icon icon=list scale=s slot=content-end></calcite-icon>`}_renderChevronIconNode(){return o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}_renderCategory(e){let{count:t,name:r}=e,i=T(t);return o`<calcite-list-item class="list-item" .disabled=${!t} .label=${r} @calciteListItemSelect=${()=>this._selectCategory(e)}><calcite-chip .label=${i} scale=s slot=content-end>${i}</calcite-chip>${this._renderChevronIconNode()}</calcite-list-item>`}_renderRelatedFeature(e){let{itemDescriptionFieldName:t,values:r}=this,{formattedAttributes:i,state:s,heading:a}=e,n={...r,...i?.global},l=(t&&n?.[t])??"";return o`<calcite-list-item class=${R(L("list-item",{"list-item-hidden":s==="loading"}))} .description=${k(l.toString())} .label=${k(a)} @calciteListItemSelect=${()=>this._selectRecord(e)}>${this._renderChevronIconNode()}</calcite-list-item>`}_renderShowAllListItem(){return this.displayShowAllButton?o`<calcite-list-item .description=${this.allItemsDescription} .label=${this.messages?.showAll} @calciteListItemSelect=${()=>this._showAllRecords()}>${this._renderShowAllIconNode()}</calcite-list-item>`:null}_renderNoRelatedFeaturesMessage(){return o`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noRelatedFeatures}</div></calcite-notice>`}_renderFeatureObserver(){return o`<div class="feature-observer" ${S(this._relatedFeatureIntersectionObserverNode)}></div>`}_renderList(){let{relatedFeatureViewModels:e,categories:t}=this;return o`<calcite-list display-mode=flat .label=${this.messages?.relatedFeaturesList??""}>${t?.map(r=>this._renderCategory(r))??e.toArray().map(r=>this._renderRelatedFeature(r))}${this._renderShowAllListItem()}</calcite-list>`}_renderRelatedFeatures(){let{displayListItems:e}=this,{state:t}=this;return o`<div class=${R(L("list",{"list-querying":t==="querying"}))}>${e?this._renderList():t==="ready"?this._renderNoRelatedFeaturesMessage():null}${this._renderStickyLoading()}${this._renderFeatureObserver()}</div>`}_renderRelationshipNotFound(){return o`<calcite-notice icon=exclamation-mark-triangle kind=danger open scale=s width=full><div slot=message>${this.messages?.relationshipNotFound}</div></calcite-notice>`}};Q("arcgis-feature-relationship",E);return E},"applications/Components/stringUtils","applications/Components/featureUtils","intl","core/reactiveUtils","core/Collection","rest/support/RelationshipQuery","core/promiseUtils","popup/FeatureModel",a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import a from"./SKV3CQSZ.js";import{p as d}from"./IW3P4TGM.js";export default $arcgis.t(([U,{property:l,subclass:x},p,{watch:N},A,I,T,{projectIsLoaded:k,projectExecute:O},y,{geographicToWebMercator:F},z,{project:Q},D,{b:m,c:u}])=>{var h=!1,L={maximumAge:0,timeout:15e3,enableHighAccuracy:!0};function G(t){let e="geolocation"in navigator;return e||d("warn",t,"Geolocation is not supported by this browser."),e}function K(t){let e=window.isSecureContext;return e||h||(h=!0,d("warn",t,"Geolocation requires a secure origin.")),e}function H(t){return G(t)&&K(t)}function he(t){return t??=L,new Promise((e,i)=>{setTimeout(()=>i(new p("geolocation:timeout","getting the current geolocation position timed out")),t?.timeout??15e3),navigator.geolocation.getCurrentPosition(e,i,t??void 0)})}function J(t,e){let{position:i,view:r}=t,o=V(i)?.coords;if(!o)throw new p("geometry-service:no-coords","Geolocation has no coordinates");let a=j(o);return q(a,r,e)}function V(t){let e=t?.coords||{},i={accuracy:e.accuracy,altitude:e.altitude,altitudeAccuracy:e.altitudeAccuracy,heading:e.heading,latitude:e.latitude,longitude:e.longitude,speed:e.speed,toJSON(){return{}}};return t&&{coords:i,timestamp:t.timestamp,toJSON(){return{}}}}function j({longitude:t,latitude:e,altitude:i}){return new T({longitude:t,latitude:e,z:i||void 0,spatialReference:{wkid:4326}})}async function q(t,e,i){if(!e)return await Promise.resolve(t);let r=e.spatialReference;return r.isWGS84?await Promise.resolve(t):r.isWebMercator?await Promise.resolve(F(t)):k()?O(t,r):await W(i).then(async o=>{if(!o)throw new p("geometry-service:missing-url","Geometry service URL is missing");let a=new D({geometries:[t],outSpatialReference:r});return(await Q(o,a,i))[0]})}async function W(t){if(y.geometryServiceUrl)return await Promise.resolve(y.geometryServiceUrl);let e=z.getDefault();try{await e.load(t)}catch{}return e.helperServices?.geometry?.url}var X=Object.defineProperty,B=Object.getOwnPropertyDescriptor,c=(t,e,i,r)=>{for(var o=r>1?void 0:r?B(e,i):e,a=t.length-1,s;a>=0;a--)(s=t[a])&&(o=(r?s(e,i,o):s(o))||o);return r&&o&&X(e,i,o),o},Z=2500;function w(t){let e={type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:t==="background"?16:14,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:17,ymax:17},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[8.5,0],[7.02,.13],[5.59,.51],[4.25,1.14],[3.04,1.99],[1.99,3.04],[1.14,4.25],[.51,5.59],[.13,7.02],[0,8.5],[.13,9.98],[.51,11.41],[1.14,12.75],[1.99,13.96],[3.04,15.01],[4.25,15.86],[5.59,16.49],[7.02,16.87],[8.5,17],[9.98,16.87],[11.41,16.49],[12.75,15.86],[13.96,15.01],[15.01,13.96],[15.86,12.75],[16.49,11.41],[16.87,9.98],[17,8.5],[16.87,7.02],[16.49,5.59],[15.86,4.25],[15.01,3.04],[13.96,1.99],[12.75,1.14],[11.41,.51],[9.98,.13],[8.5,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Round",joinStyle:"Round",lineStyle3D:"Strip",miterLimit:10,width:t==="background"?0:2,color:[255,255,255,255]},{type:"CIMSolidFill",enable:!0,color:t==="background"?[0,0,0,66]:[0,122,194,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0};return t==="background"&&(e.offsetX=0,e.offsetY=-1),e}var f={type:"CIMPictureMarker",primitiveName:"headingOverride",enable:!0,anchorPoint:{x:0,y:-.5},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:36,billboardMode3D:"FaceNearPlane",invertBackfaceTexture:!0,scaleX:1,textureFilter:"Picture",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAYAAACe0YppAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAYaSURBVHgBvVfNb1VFFD/nzP16xRYJKYREEiJoDLLShQkrSNzoHv8I2QgxwY8FJWHhxoVxISEu2AordWNiQjAxEBeEsKAmhCCwkPDRAn1t33v33jnH37n3Fam0pa8kTjOde+/MnN/5+J0z85jW08yYTpxgfzx0bS+fO0R0YHqyeb9w7YEtLTv+9rSdOH7ciNleJJJX/Do1JQ3AltdlT35fiN6gG8kD8akdmzO+6w/zM7wdw725rUY78DBXtmATA6PZntFgm9Kjm6o/HFJpdi5Xhp+16sDBC+H+gUmZfjIXHKC+35U42ZHZfpe30BZS7okNFnhu8wTRk2ek5LEV2q+N8nEj6yuNVRjHddftrt4ahyJbOxF+Uppi/Rf47NlA05Pp9vkyRNkkD8sqUJHwOGfSpYFQFXhTJryQBaZSeAxbFus+U1K0gJm2oy3QKwuZzqeuSK5kpW6BEsE6+nCsAHDXQWuaOljzU8uP/ToxUW4KcwKg8QzOSdFL6Swm0hurAC7N2qIW7ncwNgYKF4la3/w7RnzrUK29KseXWqmTKXGl45Zrd9CLrsSjr96fcw4kS46mTsJznSTrVBR6VQJQdDbpZTWexxgCYCFz30cquD8oYVQgtUAUzfo8wGtqGoNRFmFZ1KKulJMQu3Vpm/I8Pup3ekvES57GaabXo4lsszEA6zrkhcmAAkBNshi59O9wVsokBLZUCQAxllXVBkyCDRQuTlLLiLSEqw3gfUqU0kVdsKymsnzyPLm8fXZxDxVZgvUhg9QyaKDI7AhpSlRVEaA83JM+/V8pGO0PMTHyZwra9FQVk4i1e0D6dPK9v5agkmXAhc0Bw5MjlAQQE0lSDbUmbBX4kGfsiiQWuSZtdle1S4F73cUKJgviyw4mmmqlVSoR/FAK2d1noWQZ8N79MySw0tgNzhN00jRFaPM6y3IyLWBxXuOdvMfhaIy1MQctmvnEMGrMq2Y/ekC3dHF14I84gmZP2s0pgiJFHVwYhIIrMC1zgT4fQgsS0CG48LWtslAsgeKZK5U1c5Slj+nEvvJZqOWubr5ks8iE3bVqCMQCz4p5aiUqpMrOdHz2qLFTxAMSPLwY8WpmntNwrXIMCWvESGH+7n9hVi6ZJ6/sR5gnycFFQgsCQEEB8T9TbsCGy4PrZrEBjGyIt4EApoGRXWKP6Mt3fnvOvhWBjR4gdjtJEDmGQQkBSCS6Teys5qECABTPWOBwcPWgAPIU+E2+Rq3J8lsrQawMHNPbqAXvRqasWcMB/mK42N3twM6/FsbJTZK2Fru15K7niPVIp6RHn++9vRKErAg8ta+MFq4LBxAJKY1EajpxLj5KUzFzOMTni4btxoUzXPzIIOwLnEPxGVqlyWoTdO/WNRUXJhDmAgNAJVd0eABj8FTCvLbpEnxdOycJlFNXVq6MDvzthwOQ654LaMGGVofQWIWtXhM9xaCQp85QIZFMPXcpuUPH3uquJj6htVonvySD+KY6c2AulPAzHdVaZElvPCGBgvkIRUECr1J4qmV6LdGyJvAnu+94HZMla1Eg1AuGVyQWnNCwzqsUXK5+AIsUyPRc1Rbpi93X1xK9tsXtkj9U7INWSWvU0DaZ6OlVAmUDiqgbrwY2Z3ThRVKFXrgi/R0x9GMplxAyER6ynAtZin1DQoLVznLMU+/mywMf3dlDpbyMlbjLQDhLw/Sh24sm5dhTrlHKgS/T0X2zLw/sLeGr5OlEbg2uHwAFw5reKuKsJj8kcIj0zq9H5PqAj+z6E8y+YRIaUhnAEOrcWgv9m3shQ1H7mz5duVJtDLhZqZcNlrEDwXKwCzncdFg+PJeVf1m3uPUupLR7Hq6tHNyLhw1TCmdGbm0BmaUjr63LzaMBH943D9f+yO5uZ7HfcLktqdwqMU0jtPUDN6vDOfzgKFrXtta6q83vfHU4M5KoURbT4W3zsPIqrgQFO8GozV8ocZGOTN4dRdRowN6CnOLmKkk5t7H1i+HPNGJj2kj7buYajoRXh2+36eOt+2nENrrF3ozODEmFC0D4hjbQNgYc+DSYjd9qqGSJXqL/tZ16/DWdfvw9bbCt41hcpYn9RAEX9Q22fwC74ny5v9iplQAAAABJRU5ErkJggg=="},Y=w("layer"),_=w("background"),$=new I({data:{type:"CIMSymbolReference",symbol:{type:"CIMPointSymbol",symbolLayers:[Y,_,f],angleAlignment:"Map"},primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"Rotation",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Rotation override",expression:"360 - $feature.heading",returnType:"Default"}},{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"TintColor",valueExpressionInfo:{type:"CIMExpressionInfo",title:"TintColor override",expression:"IIF(IsEmpty($feature.heading), [255, 255, 255, 0], [255, 255, 255, 1])",returnType:"Default"}}]}}),n=class extends U{constructor(){super(...arguments),this._geolocationUsable=!0,this.goToLocationEnabled=!0,this.graphic=new A({symbol:$}),this.rotationEnabled=!0}initialize(){H(this)||(this._geolocationUsable=!1),this.addHandles([N(()=>this.view?.type,()=>this._handleViewTypeChange(),{initial:!0})])}destroy(){this._clearGraphic(),this.view=void 0}_clearGraphic(){let{view:t,graphic:e}=this;t&&e&&t.graphics.remove(e)}_addGraphic(){let{view:t,graphic:e}=this;!t?.graphics||!e||t.graphics.includes(e)||t.graphics.push(e)}_handleViewTypeChange(){f.enable=this.view?.type==="2d"}_getScaleWithinConstraints(t,e){if(!e)return t;if(e.type==="2d"){let{effectiveMaxScale:i,effectiveMinScale:r}=e.constraints;return Math.min(r,Math.max(i,t))}return t}_getScale(t){let{scale:e}=this,i=typeof e=="number"?e:Z;return this._getScaleWithinConstraints(i,t)}_getHeading(t,e){let i=e?.spatialReference,r=i?.isWebMercator||i?.isGeographic,o=t.coords?.heading;return!r||typeof o!="number"||Number.isNaN(o)||o<0||o>360?null:o}_addHeading(t){let{heading:e,target:i,view:r}=t;if(!(!r||e===null)){if(r.type==="3d"){i.heading=e;return}r.type==="2d"&&(i.rotation=360-e)}}async _animatePoint(t,e,i,r){let{view:o}=this;if(!this.goToLocationEnabled||!o)return;let a={target:t,scale:e};this.rotationEnabled&&this._addHeading({heading:i,target:a,view:o});let s={signal:r.signal};if(m(s),this.goToOverride&&o)return await this.goToOverride(o,{target:a,options:s});await o.goTo(a,s)}async updatePosition(t,e){try{let i=this.view,r=await J({position:t,view:i},{signal:e.signal}),{graphic:o}=this,{timestamp:a,coords:s}=t,{accuracy:v,altitude:b,altitudeAccuracy:S,latitude:M,longitude:C,speed:E}=s,g=this._getHeading(t,i),P={timestamp:a,accuracy:v,altitude:b,altitudeAccuracy:S,heading:g,latitude:M,longitude:C,speed:E};o&&(o.geometry=r,o.attributes=P);let R=this._getScale(i);await this._animatePoint(r,R,g,e)}catch(i){if(!u(i))throw new p("geolocation-positioning:invalid-point","Cannot position invalid point",{error:i})}return t}};c([l()],n.prototype,"_geolocationUsable",2);c([l()],n.prototype,"geolocationOptions",2);c([l()],n.prototype,"goToLocationEnabled",2);c([l()],n.prototype,"goToOverride",2);c([l({type:A})],n.prototype,"graphic",2);c([l()],n.prototype,"scale",2);c([l()],n.prototype,"rotationEnabled",2);c([l()],n.prototype,"view",2);n=c([x("map-components.geolocation.GeolocationPositioning")],n);var Ae=n;return{a:he,b:Ae}},"core/Accessor","core/accessorSupport/decorators","core/Error","core/reactiveUtils","Graphic","symbols/CIMSymbol","geometry/Point","geometry/operators/projectOperator","config","geometry/support/webMercatorUtils","portal/Portal","rest/geometryService","rest/support/ProjectParameters",a)
2
+ import a from"./3ZRVPLIZ.js";import{p as d}from"./IW3P4TGM.js";export default $arcgis.t(([U,{property:l,subclass:x},p,{watch:N},A,I,T,{projectIsLoaded:k,projectExecute:O},y,{geographicToWebMercator:F},z,{project:Q},D,{b:m,c:u}])=>{var h=!1,L={maximumAge:0,timeout:15e3,enableHighAccuracy:!0};function G(t){let e="geolocation"in navigator;return e||d("warn",t,"Geolocation is not supported by this browser."),e}function K(t){let e=window.isSecureContext;return e||h||(h=!0,d("warn",t,"Geolocation requires a secure origin.")),e}function H(t){return G(t)&&K(t)}function he(t){return t??=L,new Promise((e,i)=>{setTimeout(()=>i(new p("geolocation:timeout","getting the current geolocation position timed out")),t?.timeout??15e3),navigator.geolocation.getCurrentPosition(e,i,t??void 0)})}function J(t,e){let{position:i,view:r}=t,o=V(i)?.coords;if(!o)throw new p("geometry-service:no-coords","Geolocation has no coordinates");let a=j(o);return q(a,r,e)}function V(t){let e=t?.coords||{},i={accuracy:e.accuracy,altitude:e.altitude,altitudeAccuracy:e.altitudeAccuracy,heading:e.heading,latitude:e.latitude,longitude:e.longitude,speed:e.speed,toJSON(){return{}}};return t&&{coords:i,timestamp:t.timestamp,toJSON(){return{}}}}function j({longitude:t,latitude:e,altitude:i}){return new T({longitude:t,latitude:e,z:i||void 0,spatialReference:{wkid:4326}})}async function q(t,e,i){if(!e)return await Promise.resolve(t);let r=e.spatialReference;return r.isWGS84?await Promise.resolve(t):r.isWebMercator?await Promise.resolve(F(t)):k()?O(t,r):await W(i).then(async o=>{if(!o)throw new p("geometry-service:missing-url","Geometry service URL is missing");let a=new D({geometries:[t],outSpatialReference:r});return(await Q(o,a,i))[0]})}async function W(t){if(y.geometryServiceUrl)return await Promise.resolve(y.geometryServiceUrl);let e=z.getDefault();try{await e.load(t)}catch{}return e.helperServices?.geometry?.url}var X=Object.defineProperty,B=Object.getOwnPropertyDescriptor,c=(t,e,i,r)=>{for(var o=r>1?void 0:r?B(e,i):e,a=t.length-1,s;a>=0;a--)(s=t[a])&&(o=(r?s(e,i,o):s(o))||o);return r&&o&&X(e,i,o),o},Z=2500;function w(t){let e={type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:t==="background"?16:14,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:17,ymax:17},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[8.5,0],[7.02,.13],[5.59,.51],[4.25,1.14],[3.04,1.99],[1.99,3.04],[1.14,4.25],[.51,5.59],[.13,7.02],[0,8.5],[.13,9.98],[.51,11.41],[1.14,12.75],[1.99,13.96],[3.04,15.01],[4.25,15.86],[5.59,16.49],[7.02,16.87],[8.5,17],[9.98,16.87],[11.41,16.49],[12.75,15.86],[13.96,15.01],[15.01,13.96],[15.86,12.75],[16.49,11.41],[16.87,9.98],[17,8.5],[16.87,7.02],[16.49,5.59],[15.86,4.25],[15.01,3.04],[13.96,1.99],[12.75,1.14],[11.41,.51],[9.98,.13],[8.5,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Round",joinStyle:"Round",lineStyle3D:"Strip",miterLimit:10,width:t==="background"?0:2,color:[255,255,255,255]},{type:"CIMSolidFill",enable:!0,color:t==="background"?[0,0,0,66]:[0,122,194,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0};return t==="background"&&(e.offsetX=0,e.offsetY=-1),e}var f={type:"CIMPictureMarker",primitiveName:"headingOverride",enable:!0,anchorPoint:{x:0,y:-.5},anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:36,billboardMode3D:"FaceNearPlane",invertBackfaceTexture:!0,scaleX:1,textureFilter:"Picture",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAkCAYAAACe0YppAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAYaSURBVHgBvVfNb1VFFD/nzP16xRYJKYREEiJoDLLShQkrSNzoHv8I2QgxwY8FJWHhxoVxISEu2AordWNiQjAxEBeEsKAmhCCwkPDRAn1t33v33jnH37n3Fam0pa8kTjOde+/MnN/5+J0z85jW08yYTpxgfzx0bS+fO0R0YHqyeb9w7YEtLTv+9rSdOH7ciNleJJJX/Do1JQ3AltdlT35fiN6gG8kD8akdmzO+6w/zM7wdw725rUY78DBXtmATA6PZntFgm9Kjm6o/HFJpdi5Xhp+16sDBC+H+gUmZfjIXHKC+35U42ZHZfpe30BZS7okNFnhu8wTRk2ek5LEV2q+N8nEj6yuNVRjHddftrt4ahyJbOxF+Uppi/Rf47NlA05Pp9vkyRNkkD8sqUJHwOGfSpYFQFXhTJryQBaZSeAxbFus+U1K0gJm2oy3QKwuZzqeuSK5kpW6BEsE6+nCsAHDXQWuaOljzU8uP/ToxUW4KcwKg8QzOSdFL6Swm0hurAC7N2qIW7ncwNgYKF4la3/w7RnzrUK29KseXWqmTKXGl45Zrd9CLrsSjr96fcw4kS46mTsJznSTrVBR6VQJQdDbpZTWexxgCYCFz30cquD8oYVQgtUAUzfo8wGtqGoNRFmFZ1KKulJMQu3Vpm/I8Pup3ekvES57GaabXo4lsszEA6zrkhcmAAkBNshi59O9wVsokBLZUCQAxllXVBkyCDRQuTlLLiLSEqw3gfUqU0kVdsKymsnzyPLm8fXZxDxVZgvUhg9QyaKDI7AhpSlRVEaA83JM+/V8pGO0PMTHyZwra9FQVk4i1e0D6dPK9v5agkmXAhc0Bw5MjlAQQE0lSDbUmbBX4kGfsiiQWuSZtdle1S4F73cUKJgviyw4mmmqlVSoR/FAK2d1noWQZ8N79MySw0tgNzhN00jRFaPM6y3IyLWBxXuOdvMfhaIy1MQctmvnEMGrMq2Y/ekC3dHF14I84gmZP2s0pgiJFHVwYhIIrMC1zgT4fQgsS0CG48LWtslAsgeKZK5U1c5Slj+nEvvJZqOWubr5ks8iE3bVqCMQCz4p5aiUqpMrOdHz2qLFTxAMSPLwY8WpmntNwrXIMCWvESGH+7n9hVi6ZJ6/sR5gnycFFQgsCQEEB8T9TbsCGy4PrZrEBjGyIt4EApoGRXWKP6Mt3fnvOvhWBjR4gdjtJEDmGQQkBSCS6Teys5qECABTPWOBwcPWgAPIU+E2+Rq3J8lsrQawMHNPbqAXvRqasWcMB/mK42N3twM6/FsbJTZK2Fru15K7niPVIp6RHn++9vRKErAg8ta+MFq4LBxAJKY1EajpxLj5KUzFzOMTni4btxoUzXPzIIOwLnEPxGVqlyWoTdO/WNRUXJhDmAgNAJVd0eABj8FTCvLbpEnxdOycJlFNXVq6MDvzthwOQ654LaMGGVofQWIWtXhM9xaCQp85QIZFMPXcpuUPH3uquJj6htVonvySD+KY6c2AulPAzHdVaZElvPCGBgvkIRUECr1J4qmV6LdGyJvAnu+94HZMla1Eg1AuGVyQWnNCwzqsUXK5+AIsUyPRc1Rbpi93X1xK9tsXtkj9U7INWSWvU0DaZ6OlVAmUDiqgbrwY2Z3ThRVKFXrgi/R0x9GMplxAyER6ynAtZin1DQoLVznLMU+/mywMf3dlDpbyMlbjLQDhLw/Sh24sm5dhTrlHKgS/T0X2zLw/sLeGr5OlEbg2uHwAFw5reKuKsJj8kcIj0zq9H5PqAj+z6E8y+YRIaUhnAEOrcWgv9m3shQ1H7mz5duVJtDLhZqZcNlrEDwXKwCzncdFg+PJeVf1m3uPUupLR7Hq6tHNyLhw1TCmdGbm0BmaUjr63LzaMBH943D9f+yO5uZ7HfcLktqdwqMU0jtPUDN6vDOfzgKFrXtta6q83vfHU4M5KoURbT4W3zsPIqrgQFO8GozV8ocZGOTN4dRdRowN6CnOLmKkk5t7H1i+HPNGJj2kj7buYajoRXh2+36eOt+2nENrrF3ozODEmFC0D4hjbQNgYc+DSYjd9qqGSJXqL/tZ16/DWdfvw9bbCt41hcpYn9RAEX9Q22fwC74ny5v9iplQAAAABJRU5ErkJggg=="},Y=w("layer"),_=w("background"),$=new I({data:{type:"CIMSymbolReference",symbol:{type:"CIMPointSymbol",symbolLayers:[Y,_,f],angleAlignment:"Map"},primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"Rotation",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Rotation override",expression:"360 - $feature.heading",returnType:"Default"}},{type:"CIMPrimitiveOverride",primitiveName:"headingOverride",propertyName:"TintColor",valueExpressionInfo:{type:"CIMExpressionInfo",title:"TintColor override",expression:"IIF(IsEmpty($feature.heading), [255, 255, 255, 0], [255, 255, 255, 1])",returnType:"Default"}}]}}),n=class extends U{constructor(){super(...arguments),this._geolocationUsable=!0,this.goToLocationEnabled=!0,this.graphic=new A({symbol:$}),this.rotationEnabled=!0}initialize(){H(this)||(this._geolocationUsable=!1),this.addHandles([N(()=>this.view?.type,()=>this._handleViewTypeChange(),{initial:!0})])}destroy(){this._clearGraphic(),this.view=void 0}_clearGraphic(){let{view:t,graphic:e}=this;t&&e&&t.graphics.remove(e)}_addGraphic(){let{view:t,graphic:e}=this;!t?.graphics||!e||t.graphics.includes(e)||t.graphics.push(e)}_handleViewTypeChange(){f.enable=this.view?.type==="2d"}_getScaleWithinConstraints(t,e){if(!e)return t;if(e.type==="2d"){let{effectiveMaxScale:i,effectiveMinScale:r}=e.constraints;return Math.min(r,Math.max(i,t))}return t}_getScale(t){let{scale:e}=this,i=typeof e=="number"?e:Z;return this._getScaleWithinConstraints(i,t)}_getHeading(t,e){let i=e?.spatialReference,r=i?.isWebMercator||i?.isGeographic,o=t.coords?.heading;return!r||typeof o!="number"||Number.isNaN(o)||o<0||o>360?null:o}_addHeading(t){let{heading:e,target:i,view:r}=t;if(!(!r||e===null)){if(r.type==="3d"){i.heading=e;return}r.type==="2d"&&(i.rotation=360-e)}}async _animatePoint(t,e,i,r){let{view:o}=this;if(!this.goToLocationEnabled||!o)return;let a={target:t,scale:e};this.rotationEnabled&&this._addHeading({heading:i,target:a,view:o});let s={signal:r.signal};if(m(s),this.goToOverride&&o)return await this.goToOverride(o,{target:a,options:s});await o.goTo(a,s)}async updatePosition(t,e){try{let i=this.view,r=await J({position:t,view:i},{signal:e.signal}),{graphic:o}=this,{timestamp:a,coords:s}=t,{accuracy:v,altitude:b,altitudeAccuracy:S,latitude:M,longitude:C,speed:E}=s,g=this._getHeading(t,i),P={timestamp:a,accuracy:v,altitude:b,altitudeAccuracy:S,heading:g,latitude:M,longitude:C,speed:E};o&&(o.geometry=r,o.attributes=P);let R=this._getScale(i);await this._animatePoint(r,R,g,e)}catch(i){if(!u(i))throw new p("geolocation-positioning:invalid-point","Cannot position invalid point",{error:i})}return t}};c([l()],n.prototype,"_geolocationUsable",2);c([l()],n.prototype,"geolocationOptions",2);c([l()],n.prototype,"goToLocationEnabled",2);c([l()],n.prototype,"goToOverride",2);c([l({type:A})],n.prototype,"graphic",2);c([l()],n.prototype,"scale",2);c([l()],n.prototype,"rotationEnabled",2);c([l()],n.prototype,"view",2);n=c([x("map-components.geolocation.GeolocationPositioning")],n);var Ae=n;return{a:he,b:Ae}},"core/Accessor","core/accessorSupport/decorators","core/Error","core/reactiveUtils","Graphic","symbols/CIMSymbol","geometry/Point","geometry/operators/projectOperator","config","geometry/support/webMercatorUtils","portal/Portal","rest/geometryService","rest/support/ProjectParameters",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import b from"./Y6ZJNJZ7.js";import a from"./SKV3CQSZ.js";import"./WJQUE4DR.js";import{R as f,X as v,_ as x,a as m,b as g}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([y,O,{property:n,subclass:$},{watch:C,on:k},{c:w},{a:S,c:V}])=>{var D=Object.defineProperty,I=Object.getOwnPropertyDescriptor,c=(e,t,i,r)=>{for(var s=r>1?void 0:r?I(t,i):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(s=(r?o(t,i,s):o(s))||s);return r&&s&&D(t,i,s),s},a=class extends O{constructor(e){super(e),this.id="root",this.children=new y,this.layers=new y,this.level=0,this.childIds=new Set,this.layerUniqueIds=new Set}initialize(){this.addHandles([this.layers.on("before-add",e=>{this.layerUniqueIds.has(e.item.uid)?e.preventDefault():this.layerUniqueIds.add(e.item.uid)}),this.layers.on("after-add",({item:e})=>{this.addHandles([C(()=>e.visible,()=>this.notifyChange("visible"),{initial:!0}),C(()=>e.title,()=>this.notifyChange("title"),{initial:!0})],e.uid)}),this.layers.on("before-remove",({item:e})=>{this.removeHandles(e.uid),this.notifyChange("title"),this.notifyChange("visible")}),this.children.on("before-add",e=>{this.childIds.has(e.item.id)?e.preventDefault():(e.item._set("parent",this),this.childIds.add(e.item.id))})])}destroy(){this.children.forEach(e=>e.destroy())}get hasChildren(){return this.children.length>0}get isDiscipline(){return this.level===1}get visible(){return L(this.layers,e=>e.visible)}get title(){return L(this.layers,e=>e.title)||this.layers.map(e=>e.title).join(", ")||null}toggleVisibility(e){let t=e===void 0?!this.visible:e;this.layers.forEach(i=>{i.visible=t}),t&&this.parent!=null&&this.parent.toggleVisibility(!0)}toggleAllSiblingsVisibility(e){let t=e===void 0?!this.visible:e;this.toggleVisibility(t),this.parent!=null&&(this.parent.toggleVisibility(t),this.parent.children.forEach(i=>i.toggleVisibility(t)))}};c([n({})],a.prototype,"id",2);c([n()],a.prototype,"parent",2);c([n({readOnly:!0})],a.prototype,"children",2);c([n({readOnly:!0})],a.prototype,"layers",2);c([n({})],a.prototype,"level",2);c([n({readOnly:!0})],a.prototype,"hasChildren",1);c([n({readOnly:!0})],a.prototype,"isDiscipline",1);c([n({readOnly:!0})],a.prototype,"visible",1);c([n({readOnly:!0})],a.prototype,"title",1);a=c([$("esri.widgets.BuildingExplorer.support.LayerTreeNode")],a);function L(e,t){let i=null;for(let r of e){let s=t(r);if(i!=null&&i!==s)return null;i=s}return i}var N=Object.defineProperty,A=Object.getOwnPropertyDescriptor,E=e=>{throw TypeError(e)},p=(e,t,i,r)=>{for(var s=r>1?void 0:r?A(t,i):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(s=(r?o(t,i,s):o(s))||s);return r&&s&&N(t,i,s),s},P=(e,t,i)=>t.has(e)||E("Cannot "+i),b=(e,t,i)=>(P(e,t,"read from private field"),i?i.call(e):t.get(e)),F=(e,t,i)=>t.has(e)?E("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),h,d=class extends O{constructor(e){super(e),this.root=new a,F(this,h,new y),this.state="disabled",this.loadLayers=V()}initialize(){this.addHandles(k(()=>this.layers,"change",()=>{this._onLayersChange()},{onListenerAdd:()=>{this._onLayersChange()},onListenerRemove:()=>{this._onLayersChange()}})),this._onLayersChange()}destroy(){this._set("state","disabled"),this.root.destroy()}get layers(){return b(this,h)}set layers(e){b(this,h).removeAll(),b(this,h).addMany(e)}updateLayerTree(){this.root.destroy(),this._set("root",new a);let e=new Map,t=this.layers.length>1?"modelName":"id";return this.layers.forEach(i=>{let r=S(i);this.addNodesForSublayers(r??i,this.root,e,t)}),this}addNodeForLayer(e,t,i,r){let s=String(e[r]).toLowerCase();if(s==null||e.isEmpty)return;let l=`${t.id}/${s}`,o=i.get(l);o||(o=new a({id:s,level:t.level+1}),i.set(l,o)),o.layers.push(e),t.children.push(o),this.addNodesForSublayers(e,o,i,r)}addNodesForSublayers(e,t,i,r){(e.type==="building-scene"||e.type==="building-group"&&!e.isEmpty)&&e.sublayers.forEach(s=>this.addNodeForLayer(s,t,i,r))}async _onLayersChange(){if(this._set("state","loading"),this.layers.length!==0)try{await this.loadLayers(this.layers),this.updateLayerTree(),this._set("state","ready")}catch(e){w(e)||this._set("state","failed")}}};h=new WeakMap;p([n()],d.prototype,"root",2);p([n()],d.prototype,"layers",1);p([n()],d.prototype,"state",2);d=p([$("esri.components.BuildingExplorer.BuildingDisciplinesViewModel")],d);var j=m`.label{--calcite-label-text-color: var(--arcgis-internal-building-explorer-content-text-color, var(--calcite-color-text-1));--calcite-label-margin-bottom: 0}calcite-tree{--calcite-color-text-3: var(--arcgis-internal-building-explorer-content-text-color, inherit);--calcite-tree-text-color: var(--arcgis-internal-building-explorer-content-text-color, var(--calcite-color-text-1))}calcite-checkbox{--calcite-color-brand: var(--arcgis-internal-building-explorer-selected-button-background-color);--calcite-checkbox-icon-color: var(--arcgis-internal-building-explorer-selected-button-text-color)}`,u=class extends f{constructor(){super(...arguments),this.#e=new d,this.toggleSiblingsVisibility=!1}static{this.properties={layers:0,messages:0,toggleSiblingsVisibility:5}}static{this.styles=j}#e;get layers(){return this.#e.layers.toArray()}set layers(t){this.#e.layers=new y(t)}render(){let t=this.messages,i=this.#e;return t==null?null:g`<calcite-tree lines selection-mode=none>${_({node:i.root,messages:t,toggleSiblingsVisibility:this.toggleSiblingsVisibility})}</calcite-tree>`}};function B(e){let t=e.node,i=t.visible===!0,r=t.visible===null,s=i?e.messages.hideSublayer:e.messages.showSublayer;return g`<calcite-tree-item><calcite-label class="label" layout=inline><calcite-checkbox .checked=${i} .indeterminate=${r} .label=${s} @click=${l=>{l.stopPropagation(),(l.metaKey||l.ctrlKey)&&e.toggleSiblingsVisibility&&(l.stopImmediatePropagation(),t.toggleAllSiblingsVisibility())}} title=${s??v} @calciteCheckboxChange=${l=>{t.toggleVisibility(l.currentTarget.checked)}}></calcite-checkbox>${e.node.title}</calcite-label>${e.node.hasChildren?g`<calcite-tree lines selection-mode=none slot=children>${_({node:e.node,messages:e.messages,toggleSiblingsVisibility:e.toggleSiblingsVisibility})}</calcite-tree>`:null}</calcite-tree-item>`}function _(e){return e.node.children.toArray().reverse().map(t=>B({node:t,messages:e.messages,toggleSiblingsVisibility:e.toggleSiblingsVisibility}))}x("arcgis-building-discipline-tree",u);return u},"core/Collection","core/Accessor","core/accessorSupport/decorators","core/reactiveUtils",a,b)
2
+ import b from"./KSOO3XZ2.js";import a from"./3ZRVPLIZ.js";import"./WJQUE4DR.js";import{R as f,X as v,_ as x,a as m,b as g}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([y,O,{property:n,subclass:$},{watch:C,on:k},{c:w},{a:S,c:V}])=>{var D=Object.defineProperty,I=Object.getOwnPropertyDescriptor,c=(e,t,i,r)=>{for(var s=r>1?void 0:r?I(t,i):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(s=(r?o(t,i,s):o(s))||s);return r&&s&&D(t,i,s),s},a=class extends O{constructor(e){super(e),this.id="root",this.children=new y,this.layers=new y,this.level=0,this.childIds=new Set,this.layerUniqueIds=new Set}initialize(){this.addHandles([this.layers.on("before-add",e=>{this.layerUniqueIds.has(e.item.uid)?e.preventDefault():this.layerUniqueIds.add(e.item.uid)}),this.layers.on("after-add",({item:e})=>{this.addHandles([C(()=>e.visible,()=>this.notifyChange("visible"),{initial:!0}),C(()=>e.title,()=>this.notifyChange("title"),{initial:!0})],e.uid)}),this.layers.on("before-remove",({item:e})=>{this.removeHandles(e.uid),this.notifyChange("title"),this.notifyChange("visible")}),this.children.on("before-add",e=>{this.childIds.has(e.item.id)?e.preventDefault():(e.item._set("parent",this),this.childIds.add(e.item.id))})])}destroy(){this.children.forEach(e=>e.destroy())}get hasChildren(){return this.children.length>0}get isDiscipline(){return this.level===1}get visible(){return L(this.layers,e=>e.visible)}get title(){return L(this.layers,e=>e.title)||this.layers.map(e=>e.title).join(", ")||null}toggleVisibility(e){let t=e===void 0?!this.visible:e;this.layers.forEach(i=>{i.visible=t}),t&&this.parent!=null&&this.parent.toggleVisibility(!0)}toggleAllSiblingsVisibility(e){let t=e===void 0?!this.visible:e;this.toggleVisibility(t),this.parent!=null&&(this.parent.toggleVisibility(t),this.parent.children.forEach(i=>i.toggleVisibility(t)))}};c([n({})],a.prototype,"id",2);c([n()],a.prototype,"parent",2);c([n({readOnly:!0})],a.prototype,"children",2);c([n({readOnly:!0})],a.prototype,"layers",2);c([n({})],a.prototype,"level",2);c([n({readOnly:!0})],a.prototype,"hasChildren",1);c([n({readOnly:!0})],a.prototype,"isDiscipline",1);c([n({readOnly:!0})],a.prototype,"visible",1);c([n({readOnly:!0})],a.prototype,"title",1);a=c([$("esri.widgets.BuildingExplorer.support.LayerTreeNode")],a);function L(e,t){let i=null;for(let r of e){let s=t(r);if(i!=null&&i!==s)return null;i=s}return i}var N=Object.defineProperty,A=Object.getOwnPropertyDescriptor,E=e=>{throw TypeError(e)},p=(e,t,i,r)=>{for(var s=r>1?void 0:r?A(t,i):t,l=e.length-1,o;l>=0;l--)(o=e[l])&&(s=(r?o(t,i,s):o(s))||s);return r&&s&&N(t,i,s),s},P=(e,t,i)=>t.has(e)||E("Cannot "+i),b=(e,t,i)=>(P(e,t,"read from private field"),i?i.call(e):t.get(e)),F=(e,t,i)=>t.has(e)?E("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),h,d=class extends O{constructor(e){super(e),this.root=new a,F(this,h,new y),this.state="disabled",this.loadLayers=V()}initialize(){this.addHandles(k(()=>this.layers,"change",()=>{this._onLayersChange()},{onListenerAdd:()=>{this._onLayersChange()},onListenerRemove:()=>{this._onLayersChange()}})),this._onLayersChange()}destroy(){this._set("state","disabled"),this.root.destroy()}get layers(){return b(this,h)}set layers(e){b(this,h).removeAll(),b(this,h).addMany(e)}updateLayerTree(){this.root.destroy(),this._set("root",new a);let e=new Map,t=this.layers.length>1?"modelName":"id";return this.layers.forEach(i=>{let r=S(i);this.addNodesForSublayers(r??i,this.root,e,t)}),this}addNodeForLayer(e,t,i,r){let s=String(e[r]).toLowerCase();if(s==null||e.isEmpty)return;let l=`${t.id}/${s}`,o=i.get(l);o||(o=new a({id:s,level:t.level+1}),i.set(l,o)),o.layers.push(e),t.children.push(o),this.addNodesForSublayers(e,o,i,r)}addNodesForSublayers(e,t,i,r){(e.type==="building-scene"||e.type==="building-group"&&!e.isEmpty)&&e.sublayers.forEach(s=>this.addNodeForLayer(s,t,i,r))}async _onLayersChange(){if(this._set("state","loading"),this.layers.length!==0)try{await this.loadLayers(this.layers),this.updateLayerTree(),this._set("state","ready")}catch(e){w(e)||this._set("state","failed")}}};h=new WeakMap;p([n()],d.prototype,"root",2);p([n()],d.prototype,"layers",1);p([n()],d.prototype,"state",2);d=p([$("esri.components.BuildingExplorer.BuildingDisciplinesViewModel")],d);var j=m`.label{--calcite-label-text-color: var(--arcgis-internal-building-explorer-content-text-color, var(--calcite-color-text-1));--calcite-label-margin-bottom: 0}calcite-tree{--calcite-color-text-3: var(--arcgis-internal-building-explorer-content-text-color, inherit);--calcite-tree-text-color: var(--arcgis-internal-building-explorer-content-text-color, var(--calcite-color-text-1))}calcite-checkbox{--calcite-color-brand: var(--arcgis-internal-building-explorer-selected-button-background-color);--calcite-checkbox-icon-color: var(--arcgis-internal-building-explorer-selected-button-text-color)}`,u=class extends f{constructor(){super(...arguments),this.#e=new d,this.toggleSiblingsVisibility=!1}static{this.properties={layers:0,messages:0,toggleSiblingsVisibility:5}}static{this.styles=j}#e;get layers(){return this.#e.layers.toArray()}set layers(t){this.#e.layers=new y(t)}render(){let t=this.messages,i=this.#e;return t==null?null:g`<calcite-tree lines selection-mode=none>${_({node:i.root,messages:t,toggleSiblingsVisibility:this.toggleSiblingsVisibility})}</calcite-tree>`}};function B(e){let t=e.node,i=t.visible===!0,r=t.visible===null,s=i?e.messages.hideSublayer:e.messages.showSublayer;return g`<calcite-tree-item><calcite-label class="label" layout=inline><calcite-checkbox .checked=${i} .indeterminate=${r} .label=${s} @click=${l=>{l.stopPropagation(),(l.metaKey||l.ctrlKey)&&e.toggleSiblingsVisibility&&(l.stopImmediatePropagation(),t.toggleAllSiblingsVisibility())}} title=${s??v} @calciteCheckboxChange=${l=>{t.toggleVisibility(l.currentTarget.checked)}}></calcite-checkbox>${e.node.title}</calcite-label>${e.node.hasChildren?g`<calcite-tree lines selection-mode=none slot=children>${_({node:e.node,messages:e.messages,toggleSiblingsVisibility:e.toggleSiblingsVisibility})}</calcite-tree>`:null}</calcite-tree-item>`}function _(e){return e.node.children.toArray().reverse().map(t=>B({node:t,messages:e.messages,toggleSiblingsVisibility:e.toggleSiblingsVisibility}))}x("arcgis-building-discipline-tree",u);return u},"core/Collection","core/Accessor","core/accessorSupport/decorators","core/reactiveUtils",a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import f from"./TRRAIBBM.js";import{c as et}from"./Y6WTYXVP.js";import{a as K,b as Q,k as tt}from"./IM6IDWYR.js";import e from"./SKV3CQSZ.js";import"./WJQUE4DR.js";import d from"./ZRT4RJ62.js";import{a as G}from"./SAI7K4OO.js";import c from"./3VFPLRD3.js";import b from"./E3RBRDUV.js";import{f as L,h as H}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import"./LXME6MU5.js";import{P as q,Q as M,R as B,_ as V,a as I,b as p,f as y,p as W,x as j}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([pt,f,dt,vt,{convertDateFormatToIntlOptions:E},gt,{getTimeSliderSettingsFromWebDocument:ft},{property:l,subclass:yt},{watch:g,whenOnce:lt},,,,J,{c:U,e:X,h:Y},{a:it,b:st,c:D,d:k,e:at,f:nt,g:ot,h:P,i:rt}])=>{var ct=new WeakMap,mt=new WeakMap;function wt(t){let{locale:e,formatOptions:a}=t,o=_t(a),c=new Intl.DateTimeFormat(e,o);return ct.set(t,c),c}function xt(t){let{locale:e,formatOptions:a}=t,o=new Intl.NumberFormat(e,a);return mt.set(t,o),o}function bt(t){return ct.get(t)??wt(t)}function Et(t){return mt.get(t)??xt(t)}function _t(t){return t.timeZone?{...t,timeZone:tt(t.timeZone)}:t}var i=(t,e)=>({tick:t,tickFormat:e}),s={sf:{second:"numeric",fractionalSecondDigits:3},s:{second:"numeric"},ms:{minute:"numeric",second:"numeric"},mi:{minute:"numeric"},hm:{hour:"numeric",minute:"numeric"},dm:{day:"numeric",month:"short"},m:{month:"short"},my:{month:"short",year:"numeric"},y:{year:"numeric"}},Tt=[i({value:10,unit:"milliseconds"},s.sf),i({value:20,unit:"milliseconds"},s.sf),i({value:50,unit:"milliseconds"},s.sf),i({value:100,unit:"milliseconds"},s.sf),i({value:200,unit:"milliseconds"},s.sf),i({value:500,unit:"milliseconds"},s.sf),i({value:1,unit:"seconds"},s.s),i({value:2,unit:"seconds"},s.s),i({value:5,unit:"seconds"},s.s),i({value:10,unit:"seconds"},s.s),i({value:20,unit:"seconds"},s.ms),i({value:30,unit:"seconds"},s.ms),i({value:1,unit:"minutes"},s.mi),i({value:2,unit:"minutes"},s.mi),i({value:5,unit:"minutes"},s.mi),i({value:10,unit:"minutes"},s.mi),i({value:30,unit:"minutes"},s.hm),i({value:1,unit:"hours"},s.hm),i({value:2,unit:"hours"},s.hm),i({value:4,unit:"hours"},s.hm),i({value:8,unit:"hours"},s.hm),i({value:1,unit:"days"},s.dm),i({value:1,unit:"days"},s.dm),i({value:2,unit:"days"},s.dm),i({value:4,unit:"days"},s.dm),i({value:10,unit:"days"},s.dm),i({value:15,unit:"days"},s.dm),i({value:20,unit:"days"},s.dm),i({value:1,unit:"months"},s.m),i({value:3,unit:"months"},s.m),i({value:6,unit:"months"},s.my),i({value:1,unit:"years"},s.y),i({value:2,unit:"years"},s.y),i({value:4,unit:"years"},s.y),i({value:10,unit:"years"},s.y),i({value:20,unit:"years"},s.y),i({value:50,unit:"years"},s.y),i({value:100,unit:"years"},s.y),i({value:200,unit:"years"},s.y),i({value:500,unit:"years"},s.y),i({value:10,unit:"centuries"},s.y),i({value:20,unit:"centuries"},s.y),i({value:50,unit:"centuries"},s.y),i({value:100,unit:"centuries"},s.y),i({value:200,unit:"centuries"},s.y),i({value:500,unit:"centuries"},s.y),i({value:1e3,unit:"centuries"},s.y),i({value:2e3,unit:"centuries"},s.y),i({value:5e3,unit:"centuries"},s.y),i({value:1e4,unit:"centuries"},s.y),i({value:2e4,unit:"centuries"},s.y)];function St(t){return Tt.map(({tick:e,tickFormat:a})=>{let o=new gt(e),c=o.toMilliseconds(),m={...a,timeZone:t};return{duration:c,format:m,timeInterval:o}})}var $t=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,ht=t=>{throw TypeError(t)},r=(t,e,a,o)=>{for(var c=o>1?void 0:o?Mt(e,a):e,m=t.length-1,d;m>=0;m--)(d=t[m])&&(c=(o?d(e,a,c):d(c))||c);return o&&c&&$t(e,a,c),c},N=(t,e,a)=>e.has(t)||ht("Cannot "+a),_=(t,e,a)=>(N(t,e,"read from private field"),a?a.call(t):e.get(t)),Z=(t,e,a)=>e.has(t)?ht("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a),Dt=(t,e,a,o)=>(N(t,e,"write to private field"),e.set(t,a),a),u=(t,e,a)=>(N(t,e,"access private method"),a),w,T,h,F,O,A,R,x,S,C,n=class extends pt{constructor(){super(...arguments),Z(this,h),Z(this,w,new AbortController),Z(this,T,!1),this.disabled=!1,this.format="date",this.loadPersistedSettingsDisabled=!1,this.loop=!1,this.mode="time-window",this.reverseAnimation=!1,this.savePersistedSettingsDisabled=!1,this.stops=it}get _adjustedTickFormat(){let{era:t,timeZone:e}=this;return{...this.tickFormat?.format,era:this.tickFormat?.format.year?t:void 0,timeZone:e}}get _dateFormat(){let{era:t,timeZone:e}=this;return{...E("short-date"),era:t,timeZone:e}}get _dateTimeFormat(){let{era:t,timeZone:e}=this;return{...E("short-date"),...E("long-time"),era:t,timeZone:e}}get _thumbPositions(){if(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty)return null;let{start:t,end:e}=this.timeExtent;switch(this.mode){case"cumulative-from-end":case"instant":return t?[t.getTime()]:null;case"cumulative-from-start":return e?[e.getTime()]:null;case"time-window":return t&&e?[t.getTime(),e.getTime()]:null}}get _thumbStopIndices(){let{_thumbPositions:t,effectiveStopsEpoch:e}=this;return!t||!e?null:t.map(a=>{let o=e.indexOf(a);if(o!==-1)return o;let c=e.reduce((m,d)=>Math.abs(d-a)<Math.abs(m-a)?d:m);return e.indexOf(c)})}get _timeFormat(){let{timeZone:t}=this;return{...E("long-time"),timeZone:t}}get canPrevious(){return this._thumbStopIndices?.map(t=>--t).every(t=>u(this,h,A).call(this,t))??!1}get canNext(){return this._thumbStopIndices?.map(t=>++t).every(t=>u(this,h,A).call(this,t))??!1}get effectiveStops(){let{fullTimeExtent:t,stops:e}=this;if(!e)return;if(k(e)){let{dates:o}=e;if(!o?.length)return;let c=o.sort(($,b)=>$.getTime()-b.getTime());if(!t?.start||!t?.end)return c;let{start:m,end:d}=t,v=m.getTime(),ut=d.getTime();return c.filter($=>{let b=$.getTime();return b>=v&&b<=ut})}let a=e.timeExtent??t;if(a)return D(e)?nt(a,e.count):ot(a,e.interval)}get effectiveStopsEpoch(){return this.effectiveStops?.map(t=>t.getTime())}get era(){return(this.fullTimeExtent?.start?.getFullYear()??0)<0?"short":void 0}get interactive(){return!(this.disabled||this.state==="disabled"||this.timeZone===Q)}get isOutOfRange(){let{timeExtent:t,fullTimeExtent:e}=this,{start:a,end:o}=e??{};if(!a||!o||!t||t.isAllTime||t.isEmpty)return!0;let{start:c,end:m}=t??{},d=c!=null&&(c<a||c>o),v=m!=null&&(m>o||m<a);return d||v}set playRate(t){t<=0||t>1e3*60*60||(this.state==="playing"&&u(this,h,R).call(this),this._set("playRate",t))}get state(){return this.fullTimeExtent?this._animationController?"playing":"ready":"disabled"}get tickFormatter(){return t=>this._formatDate(t,this._adjustedTickFormat)}get tickFormats(){return St(this.timeZone)}get tickValues(){let{fullTimeExtent:t,tickFormat:e,timeZone:a}=this;if(!t||!e)return[];let{start:o,end:c}=t;return!o||!c?[]:rt(o,c,e.timeInterval,a).map(m=>m.getTime())}get timeZone(){return this._userTimeZone??this.viewTimeZone??K}set timeZone(t){this._userTimeZone=t??void 0}get viewTimeZone(){return this.view?.timeZone}destroy(){_(this,w).abort(),this.view?.unregisterComponent(this),u(this,h,S).call(this),super.destroy()}formatDate(t){return this._formatDate(t,this._dateFormat)}formatDateTime(t){return this._formatDate(t,this._dateTimeFormat)}formatNumber(t,e){return this._formatNumber(t,e)}formatTime(t){return this._formatDate(t,this._timeFormat)}async initialize(){this.addHandles([g(()=>this.effectiveStops,t=>{t&&(this.timeExtent??=P(t,this.mode))},{initial:!0}),g(()=>this.timeExtent,t=>{!this.view||(!t||t.isAllTime)&&(!this.view.timeExtent||this.view.timeExtent.isAllTime)||this.view.timeExtent&&t?.equals(this.view.timeExtent)||(this.view.timeExtent=t)},{initial:!0}),g(()=>this.view,t=>{t?.timeExtent&&(this.timeExtent=t.timeExtent)}),g(()=>this.view,(t,e)=>{e?.unregisterComponent(this),t?.registerComponent(this)},{initial:!0,sync:!0}),g(()=>this.view?.timeExtent,t=>{if(this.view){if(!_(this,T)){Dt(this,T,!0);return}(!t||t.isAllTime)&&(!this.timeExtent||this.timeExtent.isAllTime)||t&&this.timeExtent&&t.equals(this.timeExtent)||(this.timeExtent=t??void 0)}}),g(()=>this.mode,t=>{if(!(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty||!this.fullTimeExtent?.start||!this.fullTimeExtent.end))switch(t){case"time-window":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-start":this.timeExtent=new f({start:null,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-end":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:null});break;case"instant":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.start??this.timeExtent.end});break}})]),await X((async()=>{if(await lt(()=>this.view?.ready,{signal:_(this,w).signal}),this.loadPersistedSettingsDisabled)return;let t=await ft(this.view?.map,_(this,w).signal);t&&(this.fullTimeExtent=t.fullTimeExtent??void 0,this.loop=t.loop,this.mode=t.mode,this.playRate=t.playRate,this.stops=t.stops??void 0,this.timeExtent=t.timeExtent??void 0)})())}next(){u(this,h,x).call(this,{forward:!0,allowRestart:!1})}play(){u(this,h,R).call(this)}previous(){u(this,h,x).call(this,{forward:!1,allowRestart:!1})}stop(){u(this,h,S).call(this)}updateWebDocument(t){if(this.savePersistedSettingsDisabled)return;let e=new dt({currentTimeExtent:this.timeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:D(this.stops)?this.stops.count:null,numThumbs:this.mode==="time-window"?2:1,stopDelay:this.playRate,stopInterval:at(this.stops)?this.stops.interval:null,stops:k(this.stops)?this.stops.dates:null});t.widgets??=new vt,t.widgets.timeSlider=e}_formatDate(t,e){return bt({locale:this.locale,formatOptions:e}).format(t)}_formatNumber(t,e){return Et({locale:this.locale,formatOptions:e}).format(t)}};w=new WeakMap;T=new WeakMap;h=new WeakSet;F=async function(){try{let{view:t}=this,e=this._animationController?.signal;await Promise.all([Y(this.playRate,e),t&&lt(()=>!t.updating,e)])}catch(t){U(t)||W("error","arcgis-slider-time","animation error",{detail:{error:t}}),this._animationController=void 0;return}u(this,h,x).call(this,{forward:!this.reverseAnimation,allowRestart:!1}),this._animationController&&u(this,h,F).call(this)};O=function(t){return t?this.canNext:this.canPrevious};A=function(t){return t>=0&&t<(this.effectiveStopsEpoch?.length??0)};R=function(){u(this,h,S).call(this),this._animationController=new AbortController,u(this,h,x).call(this,{forward:!this.reverseAnimation,allowRestart:!0}),u(this,h,F).call(this)};x=function({forward:t,allowRestart:e}){let{_thumbStopIndices:a,effectiveStopsEpoch:o}=this;if(!(!a||!o))if(u(this,h,O).call(this,t)){let c=a.map(m=>m+(t?1:-1)).map(m=>o[m]);this.timeExtent=u(this,h,C).call(this,c),!this.loop&&!u(this,h,O).call(this,t)&&this.stop()}else if(this.loop||e){let c=Math.min(...a),m=Math.max(...a),d=(t?a.map(v=>v-c):a.map(v=>v+(o.length-1-m))).map(v=>o[v]);this.timeExtent=u(this,h,C).call(this,d)}else this.stop()};S=function(){this._animationController?.abort(),this._animationController=void 0};C=function(t){if(!t)return;let e=[...t].sort((a,o)=>a-o).map(a=>new Date(a));return P(e,this.mode)};r([l()],n.prototype,"_adjustedTickFormat",1);r([l()],n.prototype,"_animationController",2);r([l()],n.prototype,"_dateFormat",1);r([l()],n.prototype,"_dateTimeFormat",1);r([l()],n.prototype,"_thumbPositions",1);r([l()],n.prototype,"_thumbStopIndices",1);r([l()],n.prototype,"_timeFormat",1);r([l()],n.prototype,"_userTimeZone",2);r([l()],n.prototype,"canPrevious",1);r([l()],n.prototype,"canNext",1);r([l()],n.prototype,"disabled",2);r([l()],n.prototype,"effectiveStops",1);r([l()],n.prototype,"effectiveStopsEpoch",1);r([l()],n.prototype,"era",1);r([l()],n.prototype,"format",2);r([l({type:f})],n.prototype,"fullTimeExtent",2);r([l()],n.prototype,"interactive",1);r([l()],n.prototype,"isOutOfRange",1);r([l()],n.prototype,"loadPersistedSettingsDisabled",2);r([l()],n.prototype,"locale",2);r([l()],n.prototype,"loop",2);r([l()],n.prototype,"mode",2);r([l({value:1e3})],n.prototype,"playRate",1);r([l()],n.prototype,"reverseAnimation",2);r([l()],n.prototype,"savePersistedSettingsDisabled",2);r([l()],n.prototype,"state",1);r([l({cast:st})],n.prototype,"stops",2);r([l()],n.prototype,"tickFormat",2);r([l()],n.prototype,"tickFormatter",1);r([l()],n.prototype,"tickFormats",1);r([l()],n.prototype,"tickValues",1);r([l({type:f})],n.prototype,"timeExtent",2);r([l()],n.prototype,"timeZone",1);r([l()],n.prototype,"view",2);r([l()],n.prototype,"viewTimeZone",1);n=r([yt("components.time-bar.TimeBarViewModel")],n);var kt=I`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-space-lg);--arcgis-internal-panel-actions-gap: var(--calcite-space-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight);transition:max-height var(--calcite-internal-animation-timing-medium) ease-in-out}:host([floating]) .action-bar{--calcite-action-bar-shadow: var(--arcgis-internal-box-shadow)}::slotted([slot="actions-end"]){border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding-inline-start:var(--calcite-space-sm)}.action-bar,.time-extent-group,.time-extent-group>slot{display:flex;flex:1 0 auto;place-items:center}.action-bar{--calcite-action-bar-shadow: none;--calcite-action-bar-background-color: var(--calcite-color-foreground-1)}.label{block-size:var(--calcite-size-fixed-xxxl);inline-size:175px}.settings{inline-size:calc(var(--arcgis-internal-panel-width) - 2 * var(--calcite-space-lg))}`,Pt=J(n),z=class extends B{constructor(){super(...arguments),this._direction=L(),this._viewModel=Pt(this),this.messages=G({name:"time-bar",blocking:!0}),this.#t=q(),this.#e=e=>{this._settingsActionElement=e},this.autoDestroyDisabled=!1,this.disabled=this._viewModel.disabled,this.effectiveStops=this._viewModel.effectiveStops,this.floating=!1,this.format=this._viewModel.format,this.fullTimeExtent=this._viewModel.fullTimeExtent,this.icon="clock",this.loadPersistedSettingsDisabled=this._viewModel.loadPersistedSettingsDisabled,this.loop=this._viewModel.loop,this.mode=this._viewModel.mode,this.playRate=this._viewModel.playRate,this.reverseAnimation=this._viewModel.reverseAnimation,this.savePersistedSettingsDisabled=this._viewModel.savePersistedSettingsDisabled,this.showNext=!1,this.showPlay=!1,this.showPrevious=!1,this.showSettings=!1,this.showTimeExtent=!1,this.state=this._viewModel.state,this.stops=this._viewModel.stops,this.timeExtent=this._viewModel.timeExtent,this.timeZone=this._viewModel.timeZone,this.view=this._viewModel.view,this.arcgisPropertyChange=H()("effectiveStops","fullTimeExtent","state","timeExtent"),this.arcgisReady=j()}static{this.properties={_settingsActionElement:16,autoDestroyDisabled:5,disabled:5,effectiveStops:32,floating:7,format:1,fullTimeExtent:0,icon:1,label:1,loadPersistedSettingsDisabled:5,loop:5,messageOverrides:0,mode:1,playRate:9,referenceElement:1,reverseAnimation:5,savePersistedSettingsDisabled:5,showNext:5,showPlay:5,showPrevious:5,showSettings:5,showTimeExtent:5,state:32,stops:0,timeExtent:0,timeZone:1,view:0}}static{this.styles=kt}#t;#e;async applyTimeSettings(e){this._viewModel.set(e)}async destroy(){await this.manager.destroy()}async next(){this._viewModel.next()}async play(){this._viewModel.play()}async previous(){this._viewModel.previous()}async stop(){this._viewModel.stop()}async updateWebDocument(e){this._viewModel.updateWebDocument(e)}willUpdate(e){e.has("messages")&&(this._viewModel.locale=this.messages._lang)}#m(e){let{currentTarget:a}=e,o=et(a).at(0)??a.querySelector("arcgis-time-bar-extent");o&&(o.messages=this.messages,o.viewModel=this._viewModel)}async#h(){switch(this.state){case"disabled":case"playing":return await this.stop();case"ready":return await this.play()}}render(){return p`<div role=presentation><calcite-action-bar class="action-bar" layout=horizontal expand-toggle-disabled .floating=${this.floating} overflow-mode=none>${this._direction==="ltr"?p`${this.#i()}${this.#a()}${this.#c()}${this.#l()}${this.#s()}`:p`${this.#i()}${this.#l()}${this.#c()}${this.#a()}${this.#s()}`}</calcite-action-bar></div>`}#i(){return this.showNext||this.showPlay||this.showPrevious||this.showTimeExtent||this.showSettings?null:p`<calcite-action disabled .text=${this.messages.componentLabel} text-enabled></calcite-action>`}#s(){return p`<slot name=actions-end slot=actions-end></slot>`}#a(){return this.showPrevious||this.showPlay||this.showNext?p`<calcite-action-group>${this._direction==="ltr"?p`${this.#o()}${this.#r()}${this.#n()}`:p`${this.#n()}${this.#r()}${this.#o()}`}</calcite-action-group>`:null}#n(){return this.showNext?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"||!this.loop&&!this._viewModel.canNext} icon=forward @click=${this.next} .text=${this.messages.next} title=${this.messages.next??y}></calcite-action>`:null}#o(){return this.showPlay?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length} .icon=${this.state==="playing"?"pause-f":"play-f"} @click=${this.#h} .text=${this.state==="playing"?this.messages.stop:this.messages.play} title=${(this.state==="playing"?this.messages.stop:this.messages.play)??y}></calcite-action>`:null}#r(){return this.showPrevious?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"||!this.loop&&!this._viewModel.canPrevious} icon=reverse @click=${this.previous} .text=${this.messages.previous} title=${this.messages.previous??y}></calcite-action>`:null}#l(){return this.showSettings?p`<calcite-action-group><calcite-action .disabled=${!this._viewModel.interactive} .text=${this.messages.settings} icon=sliders-horizontal title=${this.messages.settings??y} ${M(this.#e)}></calcite-action>${this._settingsActionElement?p`<calcite-popover auto-close .heading=${this.messages.timeBarSettings} .label=${this.messages.timeBarSettings} .referenceElement=${this._settingsActionElement} @calcitePopoverClose=${()=>{this.#t.value?.navigateToOverview()}} overlay-positioning=fixed><slot name=settings><arcgis-time-bar-settings .autoDestroyDisabled=${this.autoDestroyDisabled} class="settings" .messages=${this.messages} .viewModel=${this._viewModel} ${M(this.#t)}></arcgis-time-bar-settings></slot></calcite-popover>`:void 0}</calcite-action-group>`:null}#c(){return this.showTimeExtent?p`<calcite-action-group class="time-extent-group"><slot name=time-extent @slotchange=${this.#m}><arcgis-time-bar-extent .autoDestroyDisabled=${this.autoDestroyDisabled} class="label" .messages=${this.messages} .viewModel=${this._viewModel}></arcgis-time-bar-extent></slot></calcite-action-group>`:null}};V("arcgis-time-bar",z);return z},"core/Accessor","time/TimeExtent","webdoc/widgets/TimeSlider","webdoc/Widgets","intl","time/TimeInterval","support/timeUtils","core/accessorSupport/decorators","core/reactiveUtils",a,b,c,d,e,f)
2
+ import f from"./TRRAIBBM.js";import{c as et}from"./Y6WTYXVP.js";import{a as K,b as Q,k as tt}from"./IM6IDWYR.js";import e from"./3ZRVPLIZ.js";import"./WJQUE4DR.js";import d from"./ZRT4RJ62.js";import{a as G}from"./SAI7K4OO.js";import c from"./3VFPLRD3.js";import b from"./E3RBRDUV.js";import{f as L,h as H}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import"./LXME6MU5.js";import{P as q,Q as M,R as B,_ as V,a as I,b as p,f as y,p as W,x as j}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([pt,f,dt,vt,{convertDateFormatToIntlOptions:E},gt,{getTimeSliderSettingsFromWebDocument:ft},{property:l,subclass:yt},{watch:g,whenOnce:lt},,,,J,{c:U,e:X,h:Y},{a:it,b:st,c:D,d:k,e:at,f:nt,g:ot,h:P,i:rt}])=>{var ct=new WeakMap,mt=new WeakMap;function wt(t){let{locale:e,formatOptions:a}=t,o=_t(a),c=new Intl.DateTimeFormat(e,o);return ct.set(t,c),c}function xt(t){let{locale:e,formatOptions:a}=t,o=new Intl.NumberFormat(e,a);return mt.set(t,o),o}function bt(t){return ct.get(t)??wt(t)}function Et(t){return mt.get(t)??xt(t)}function _t(t){return t.timeZone?{...t,timeZone:tt(t.timeZone)}:t}var i=(t,e)=>({tick:t,tickFormat:e}),s={sf:{second:"numeric",fractionalSecondDigits:3},s:{second:"numeric"},ms:{minute:"numeric",second:"numeric"},mi:{minute:"numeric"},hm:{hour:"numeric",minute:"numeric"},dm:{day:"numeric",month:"short"},m:{month:"short"},my:{month:"short",year:"numeric"},y:{year:"numeric"}},Tt=[i({value:10,unit:"milliseconds"},s.sf),i({value:20,unit:"milliseconds"},s.sf),i({value:50,unit:"milliseconds"},s.sf),i({value:100,unit:"milliseconds"},s.sf),i({value:200,unit:"milliseconds"},s.sf),i({value:500,unit:"milliseconds"},s.sf),i({value:1,unit:"seconds"},s.s),i({value:2,unit:"seconds"},s.s),i({value:5,unit:"seconds"},s.s),i({value:10,unit:"seconds"},s.s),i({value:20,unit:"seconds"},s.ms),i({value:30,unit:"seconds"},s.ms),i({value:1,unit:"minutes"},s.mi),i({value:2,unit:"minutes"},s.mi),i({value:5,unit:"minutes"},s.mi),i({value:10,unit:"minutes"},s.mi),i({value:30,unit:"minutes"},s.hm),i({value:1,unit:"hours"},s.hm),i({value:2,unit:"hours"},s.hm),i({value:4,unit:"hours"},s.hm),i({value:8,unit:"hours"},s.hm),i({value:1,unit:"days"},s.dm),i({value:1,unit:"days"},s.dm),i({value:2,unit:"days"},s.dm),i({value:4,unit:"days"},s.dm),i({value:10,unit:"days"},s.dm),i({value:15,unit:"days"},s.dm),i({value:20,unit:"days"},s.dm),i({value:1,unit:"months"},s.m),i({value:3,unit:"months"},s.m),i({value:6,unit:"months"},s.my),i({value:1,unit:"years"},s.y),i({value:2,unit:"years"},s.y),i({value:4,unit:"years"},s.y),i({value:10,unit:"years"},s.y),i({value:20,unit:"years"},s.y),i({value:50,unit:"years"},s.y),i({value:100,unit:"years"},s.y),i({value:200,unit:"years"},s.y),i({value:500,unit:"years"},s.y),i({value:10,unit:"centuries"},s.y),i({value:20,unit:"centuries"},s.y),i({value:50,unit:"centuries"},s.y),i({value:100,unit:"centuries"},s.y),i({value:200,unit:"centuries"},s.y),i({value:500,unit:"centuries"},s.y),i({value:1e3,unit:"centuries"},s.y),i({value:2e3,unit:"centuries"},s.y),i({value:5e3,unit:"centuries"},s.y),i({value:1e4,unit:"centuries"},s.y),i({value:2e4,unit:"centuries"},s.y)];function St(t){return Tt.map(({tick:e,tickFormat:a})=>{let o=new gt(e),c=o.toMilliseconds(),m={...a,timeZone:t};return{duration:c,format:m,timeInterval:o}})}var $t=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,ht=t=>{throw TypeError(t)},r=(t,e,a,o)=>{for(var c=o>1?void 0:o?Mt(e,a):e,m=t.length-1,d;m>=0;m--)(d=t[m])&&(c=(o?d(e,a,c):d(c))||c);return o&&c&&$t(e,a,c),c},N=(t,e,a)=>e.has(t)||ht("Cannot "+a),_=(t,e,a)=>(N(t,e,"read from private field"),a?a.call(t):e.get(t)),Z=(t,e,a)=>e.has(t)?ht("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a),Dt=(t,e,a,o)=>(N(t,e,"write to private field"),e.set(t,a),a),u=(t,e,a)=>(N(t,e,"access private method"),a),w,T,h,F,O,A,R,x,S,C,n=class extends pt{constructor(){super(...arguments),Z(this,h),Z(this,w,new AbortController),Z(this,T,!1),this.disabled=!1,this.format="date",this.loadPersistedSettingsDisabled=!1,this.loop=!1,this.mode="time-window",this.reverseAnimation=!1,this.savePersistedSettingsDisabled=!1,this.stops=it}get _adjustedTickFormat(){let{era:t,timeZone:e}=this;return{...this.tickFormat?.format,era:this.tickFormat?.format.year?t:void 0,timeZone:e}}get _dateFormat(){let{era:t,timeZone:e}=this;return{...E("short-date"),era:t,timeZone:e}}get _dateTimeFormat(){let{era:t,timeZone:e}=this;return{...E("short-date"),...E("long-time"),era:t,timeZone:e}}get _thumbPositions(){if(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty)return null;let{start:t,end:e}=this.timeExtent;switch(this.mode){case"cumulative-from-end":case"instant":return t?[t.getTime()]:null;case"cumulative-from-start":return e?[e.getTime()]:null;case"time-window":return t&&e?[t.getTime(),e.getTime()]:null}}get _thumbStopIndices(){let{_thumbPositions:t,effectiveStopsEpoch:e}=this;return!t||!e?null:t.map(a=>{let o=e.indexOf(a);if(o!==-1)return o;let c=e.reduce((m,d)=>Math.abs(d-a)<Math.abs(m-a)?d:m);return e.indexOf(c)})}get _timeFormat(){let{timeZone:t}=this;return{...E("long-time"),timeZone:t}}get canPrevious(){return this._thumbStopIndices?.map(t=>--t).every(t=>u(this,h,A).call(this,t))??!1}get canNext(){return this._thumbStopIndices?.map(t=>++t).every(t=>u(this,h,A).call(this,t))??!1}get effectiveStops(){let{fullTimeExtent:t,stops:e}=this;if(!e)return;if(k(e)){let{dates:o}=e;if(!o?.length)return;let c=o.sort(($,b)=>$.getTime()-b.getTime());if(!t?.start||!t?.end)return c;let{start:m,end:d}=t,v=m.getTime(),ut=d.getTime();return c.filter($=>{let b=$.getTime();return b>=v&&b<=ut})}let a=e.timeExtent??t;if(a)return D(e)?nt(a,e.count):ot(a,e.interval)}get effectiveStopsEpoch(){return this.effectiveStops?.map(t=>t.getTime())}get era(){return(this.fullTimeExtent?.start?.getFullYear()??0)<0?"short":void 0}get interactive(){return!(this.disabled||this.state==="disabled"||this.timeZone===Q)}get isOutOfRange(){let{timeExtent:t,fullTimeExtent:e}=this,{start:a,end:o}=e??{};if(!a||!o||!t||t.isAllTime||t.isEmpty)return!0;let{start:c,end:m}=t??{},d=c!=null&&(c<a||c>o),v=m!=null&&(m>o||m<a);return d||v}set playRate(t){t<=0||t>1e3*60*60||(this.state==="playing"&&u(this,h,R).call(this),this._set("playRate",t))}get state(){return this.fullTimeExtent?this._animationController?"playing":"ready":"disabled"}get tickFormatter(){return t=>this._formatDate(t,this._adjustedTickFormat)}get tickFormats(){return St(this.timeZone)}get tickValues(){let{fullTimeExtent:t,tickFormat:e,timeZone:a}=this;if(!t||!e)return[];let{start:o,end:c}=t;return!o||!c?[]:rt(o,c,e.timeInterval,a).map(m=>m.getTime())}get timeZone(){return this._userTimeZone??this.viewTimeZone??K}set timeZone(t){this._userTimeZone=t??void 0}get viewTimeZone(){return this.view?.timeZone}destroy(){_(this,w).abort(),this.view?.unregisterComponent(this),u(this,h,S).call(this),super.destroy()}formatDate(t){return this._formatDate(t,this._dateFormat)}formatDateTime(t){return this._formatDate(t,this._dateTimeFormat)}formatNumber(t,e){return this._formatNumber(t,e)}formatTime(t){return this._formatDate(t,this._timeFormat)}async initialize(){this.addHandles([g(()=>this.effectiveStops,t=>{t&&(this.timeExtent??=P(t,this.mode))},{initial:!0}),g(()=>this.timeExtent,t=>{!this.view||(!t||t.isAllTime)&&(!this.view.timeExtent||this.view.timeExtent.isAllTime)||this.view.timeExtent&&t?.equals(this.view.timeExtent)||(this.view.timeExtent=t)},{initial:!0}),g(()=>this.view,t=>{t?.timeExtent&&(this.timeExtent=t.timeExtent)}),g(()=>this.view,(t,e)=>{e?.unregisterComponent(this),t?.registerComponent(this)},{initial:!0,sync:!0}),g(()=>this.view?.timeExtent,t=>{if(this.view){if(!_(this,T)){Dt(this,T,!0);return}(!t||t.isAllTime)&&(!this.timeExtent||this.timeExtent.isAllTime)||t&&this.timeExtent&&t.equals(this.timeExtent)||(this.timeExtent=t??void 0)}}),g(()=>this.mode,t=>{if(!(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty||!this.fullTimeExtent?.start||!this.fullTimeExtent.end))switch(t){case"time-window":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-start":this.timeExtent=new f({start:null,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-end":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:null});break;case"instant":this.timeExtent=new f({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.start??this.timeExtent.end});break}})]),await X((async()=>{if(await lt(()=>this.view?.ready,{signal:_(this,w).signal}),this.loadPersistedSettingsDisabled)return;let t=await ft(this.view?.map,_(this,w).signal);t&&(this.fullTimeExtent=t.fullTimeExtent??void 0,this.loop=t.loop,this.mode=t.mode,this.playRate=t.playRate,this.stops=t.stops??void 0,this.timeExtent=t.timeExtent??void 0)})())}next(){u(this,h,x).call(this,{forward:!0,allowRestart:!1})}play(){u(this,h,R).call(this)}previous(){u(this,h,x).call(this,{forward:!1,allowRestart:!1})}stop(){u(this,h,S).call(this)}updateWebDocument(t){if(this.savePersistedSettingsDisabled)return;let e=new dt({currentTimeExtent:this.timeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:D(this.stops)?this.stops.count:null,numThumbs:this.mode==="time-window"?2:1,stopDelay:this.playRate,stopInterval:at(this.stops)?this.stops.interval:null,stops:k(this.stops)?this.stops.dates:null});t.widgets??=new vt,t.widgets.timeSlider=e}_formatDate(t,e){return bt({locale:this.locale,formatOptions:e}).format(t)}_formatNumber(t,e){return Et({locale:this.locale,formatOptions:e}).format(t)}};w=new WeakMap;T=new WeakMap;h=new WeakSet;F=async function(){try{let{view:t}=this,e=this._animationController?.signal;await Promise.all([Y(this.playRate,e),t&&lt(()=>!t.updating,e)])}catch(t){U(t)||W("error","arcgis-slider-time","animation error",{detail:{error:t}}),this._animationController=void 0;return}u(this,h,x).call(this,{forward:!this.reverseAnimation,allowRestart:!1}),this._animationController&&u(this,h,F).call(this)};O=function(t){return t?this.canNext:this.canPrevious};A=function(t){return t>=0&&t<(this.effectiveStopsEpoch?.length??0)};R=function(){u(this,h,S).call(this),this._animationController=new AbortController,u(this,h,x).call(this,{forward:!this.reverseAnimation,allowRestart:!0}),u(this,h,F).call(this)};x=function({forward:t,allowRestart:e}){let{_thumbStopIndices:a,effectiveStopsEpoch:o}=this;if(!(!a||!o))if(u(this,h,O).call(this,t)){let c=a.map(m=>m+(t?1:-1)).map(m=>o[m]);this.timeExtent=u(this,h,C).call(this,c),!this.loop&&!u(this,h,O).call(this,t)&&this.stop()}else if(this.loop||e){let c=Math.min(...a),m=Math.max(...a),d=(t?a.map(v=>v-c):a.map(v=>v+(o.length-1-m))).map(v=>o[v]);this.timeExtent=u(this,h,C).call(this,d)}else this.stop()};S=function(){this._animationController?.abort(),this._animationController=void 0};C=function(t){if(!t)return;let e=[...t].sort((a,o)=>a-o).map(a=>new Date(a));return P(e,this.mode)};r([l()],n.prototype,"_adjustedTickFormat",1);r([l()],n.prototype,"_animationController",2);r([l()],n.prototype,"_dateFormat",1);r([l()],n.prototype,"_dateTimeFormat",1);r([l()],n.prototype,"_thumbPositions",1);r([l()],n.prototype,"_thumbStopIndices",1);r([l()],n.prototype,"_timeFormat",1);r([l()],n.prototype,"_userTimeZone",2);r([l()],n.prototype,"canPrevious",1);r([l()],n.prototype,"canNext",1);r([l()],n.prototype,"disabled",2);r([l()],n.prototype,"effectiveStops",1);r([l()],n.prototype,"effectiveStopsEpoch",1);r([l()],n.prototype,"era",1);r([l()],n.prototype,"format",2);r([l({type:f})],n.prototype,"fullTimeExtent",2);r([l()],n.prototype,"interactive",1);r([l()],n.prototype,"isOutOfRange",1);r([l()],n.prototype,"loadPersistedSettingsDisabled",2);r([l()],n.prototype,"locale",2);r([l()],n.prototype,"loop",2);r([l()],n.prototype,"mode",2);r([l({value:1e3})],n.prototype,"playRate",1);r([l()],n.prototype,"reverseAnimation",2);r([l()],n.prototype,"savePersistedSettingsDisabled",2);r([l()],n.prototype,"state",1);r([l({cast:st})],n.prototype,"stops",2);r([l()],n.prototype,"tickFormat",2);r([l()],n.prototype,"tickFormatter",1);r([l()],n.prototype,"tickFormats",1);r([l()],n.prototype,"tickValues",1);r([l({type:f})],n.prototype,"timeExtent",2);r([l()],n.prototype,"timeZone",1);r([l()],n.prototype,"view",2);r([l()],n.prototype,"viewTimeZone",1);n=r([yt("components.time-bar.TimeBarViewModel")],n);var kt=I`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-space-lg);--arcgis-internal-panel-actions-gap: var(--calcite-space-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight);transition:max-height var(--calcite-internal-animation-timing-medium) ease-in-out}:host([floating]) .action-bar{--calcite-action-bar-shadow: var(--arcgis-internal-box-shadow)}::slotted([slot="actions-end"]){border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding-inline-start:var(--calcite-space-sm)}.action-bar,.time-extent-group,.time-extent-group>slot{display:flex;flex:1 0 auto;place-items:center}.action-bar{--calcite-action-bar-shadow: none;--calcite-action-bar-background-color: var(--calcite-color-foreground-1)}.label{block-size:var(--calcite-size-fixed-xxxl);inline-size:175px}.settings{inline-size:calc(var(--arcgis-internal-panel-width) - 2 * var(--calcite-space-lg))}`,Pt=J(n),z=class extends B{constructor(){super(...arguments),this._direction=L(),this._viewModel=Pt(this),this.messages=G({name:"time-bar",blocking:!0}),this.#t=q(),this.#e=e=>{this._settingsActionElement=e},this.autoDestroyDisabled=!1,this.disabled=this._viewModel.disabled,this.effectiveStops=this._viewModel.effectiveStops,this.floating=!1,this.format=this._viewModel.format,this.fullTimeExtent=this._viewModel.fullTimeExtent,this.icon="clock",this.loadPersistedSettingsDisabled=this._viewModel.loadPersistedSettingsDisabled,this.loop=this._viewModel.loop,this.mode=this._viewModel.mode,this.playRate=this._viewModel.playRate,this.reverseAnimation=this._viewModel.reverseAnimation,this.savePersistedSettingsDisabled=this._viewModel.savePersistedSettingsDisabled,this.showNext=!1,this.showPlay=!1,this.showPrevious=!1,this.showSettings=!1,this.showTimeExtent=!1,this.state=this._viewModel.state,this.stops=this._viewModel.stops,this.timeExtent=this._viewModel.timeExtent,this.timeZone=this._viewModel.timeZone,this.view=this._viewModel.view,this.arcgisPropertyChange=H()("effectiveStops","fullTimeExtent","state","timeExtent"),this.arcgisReady=j()}static{this.properties={_settingsActionElement:16,autoDestroyDisabled:5,disabled:5,effectiveStops:32,floating:7,format:1,fullTimeExtent:0,icon:1,label:1,loadPersistedSettingsDisabled:5,loop:5,messageOverrides:0,mode:1,playRate:9,referenceElement:1,reverseAnimation:5,savePersistedSettingsDisabled:5,showNext:5,showPlay:5,showPrevious:5,showSettings:5,showTimeExtent:5,state:32,stops:0,timeExtent:0,timeZone:1,view:0}}static{this.styles=kt}#t;#e;async applyTimeSettings(e){this._viewModel.set(e)}async destroy(){await this.manager.destroy()}async next(){this._viewModel.next()}async play(){this._viewModel.play()}async previous(){this._viewModel.previous()}async stop(){this._viewModel.stop()}async updateWebDocument(e){this._viewModel.updateWebDocument(e)}willUpdate(e){e.has("messages")&&(this._viewModel.locale=this.messages._lang)}#m(e){let{currentTarget:a}=e,o=et(a).at(0)??a.querySelector("arcgis-time-bar-extent");o&&(o.messages=this.messages,o.viewModel=this._viewModel)}async#h(){switch(this.state){case"disabled":case"playing":return await this.stop();case"ready":return await this.play()}}render(){return p`<div role=presentation><calcite-action-bar class="action-bar" layout=horizontal expand-toggle-disabled .floating=${this.floating} overflow-mode=none>${this._direction==="ltr"?p`${this.#i()}${this.#a()}${this.#c()}${this.#l()}${this.#s()}`:p`${this.#i()}${this.#l()}${this.#c()}${this.#a()}${this.#s()}`}</calcite-action-bar></div>`}#i(){return this.showNext||this.showPlay||this.showPrevious||this.showTimeExtent||this.showSettings?null:p`<calcite-action disabled .text=${this.messages.componentLabel} text-enabled></calcite-action>`}#s(){return p`<slot name=actions-end slot=actions-end></slot>`}#a(){return this.showPrevious||this.showPlay||this.showNext?p`<calcite-action-group>${this._direction==="ltr"?p`${this.#o()}${this.#r()}${this.#n()}`:p`${this.#n()}${this.#r()}${this.#o()}`}</calcite-action-group>`:null}#n(){return this.showNext?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"||!this.loop&&!this._viewModel.canNext} icon=forward @click=${this.next} .text=${this.messages.next} title=${this.messages.next??y}></calcite-action>`:null}#o(){return this.showPlay?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length} .icon=${this.state==="playing"?"pause-f":"play-f"} @click=${this.#h} .text=${this.state==="playing"?this.messages.stop:this.messages.play} title=${(this.state==="playing"?this.messages.stop:this.messages.play)??y}></calcite-action>`:null}#r(){return this.showPrevious?p`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"||!this.loop&&!this._viewModel.canPrevious} icon=reverse @click=${this.previous} .text=${this.messages.previous} title=${this.messages.previous??y}></calcite-action>`:null}#l(){return this.showSettings?p`<calcite-action-group><calcite-action .disabled=${!this._viewModel.interactive} .text=${this.messages.settings} icon=sliders-horizontal title=${this.messages.settings??y} ${M(this.#e)}></calcite-action>${this._settingsActionElement?p`<calcite-popover auto-close .heading=${this.messages.timeBarSettings} .label=${this.messages.timeBarSettings} .referenceElement=${this._settingsActionElement} @calcitePopoverClose=${()=>{this.#t.value?.navigateToOverview()}} overlay-positioning=fixed><slot name=settings><arcgis-time-bar-settings .autoDestroyDisabled=${this.autoDestroyDisabled} class="settings" .messages=${this.messages} .viewModel=${this._viewModel} ${M(this.#t)}></arcgis-time-bar-settings></slot></calcite-popover>`:void 0}</calcite-action-group>`:null}#c(){return this.showTimeExtent?p`<calcite-action-group class="time-extent-group"><slot name=time-extent @slotchange=${this.#m}><arcgis-time-bar-extent .autoDestroyDisabled=${this.autoDestroyDisabled} class="label" .messages=${this.messages} .viewModel=${this._viewModel}></arcgis-time-bar-extent></slot></calcite-action-group>`:null}};V("arcgis-time-bar",z);return z},"core/Accessor","time/TimeExtent","webdoc/widgets/TimeSlider","webdoc/Widgets","intl","time/TimeInterval","support/timeUtils","core/accessorSupport/decorators","core/reactiveUtils",a,b,c,d,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import l from"./LZUAJU6O.js";import{a as D,b as S,d as u,g as V,j as R,k as j}from"./FXUZU52U.js";import{a as g}from"./6J3KSMFG.js";import i from"./SKV3CQSZ.js";import"./WJQUE4DR.js";import h from"./ZRT4RJ62.js";import{a as U}from"./SAI7K4OO.js";import{a as p}from"./L5IRXOCJ.js";import e from"./3VFPLRD3.js";import d from"./E3RBRDUV.js";import{h as k}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import{a as x}from"./LXME6MU5.js";import{R as f,T as b,X as v,_ as y,a as _,b as c,x as w}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([L,{property:a,subclass:A},{watch:B},C,,,,M,{b:z,e:O},$])=>{var P=_`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-space-2xl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-space-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-space-xs);display:flex}:host{.esri-widget--panel{min-width:0}}`,T=Object.defineProperty,I=Object.getOwnPropertyDescriptor,o=(e,t,i,l)=>{for(var s=l>1?void 0:l?I(t,i):t,n=e.length-1,d;n>=0;n--)(d=e[n])&&(s=(l?d(t,i,s):d(s))||s);return l&&s&&T(t,i,s),s},r=class extends ${constructor(){super(...arguments),this.snappingOptions=new C,this.supportedViewType="2d",this.unsupportedErrorMessage="The Distance Measurement 2D component is only supported in 2D views."}initialize(){this.addHandles([B(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:e,unit:t})=>{t&&(e.unit=t)},{sync:!0,initial:!0}),B(()=>({analysisView:this.analysisView,snappingOptions:this.snappingOptions}),({analysisView:e,snappingOptions:t})=>{e&&(e.snappingOptions=t)},{sync:!0,initial:!0})])}get state(){let{analysis:e,disabled:t,operationState:i,ready:l,supported:s}=this,{valid:n}=e;return D({supported:s,disabled:t,ready:l,operationState:i,valid:n})}get displayState(){return S(this.state,!!this.analysis.geometry)}get measurement(){return{mode:this.analysisView?.result?.mode??"euclidean",length:V(this.analysis.valid?this.analysisView?.result?.length:void 0)}}get unitOptions(){return R(this._userUnitOptions,u,u)}set unitOptions(e){this._userUnitOptions=e}get unit(){return j({userUnit:this._userUnit,analysisUnit:this.analysis.unit,options:this.unitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.length})}set unit(e){this._userUnit=e}get canResetUnit(){return this._userUnit!=null||this.analysis.unit!=null}resetUnit(){this._userUnit=void 0,this.analysis.unit=null}async place(e){let t=this.analysisView;t&&(await t.place(e),z(e?.signal))}clearAnalysis(){this.analysis.geometry=null}constructAnalysis(){return new L}};o([a({readOnly:!0})],r.prototype,"state",1);o([a({readOnly:!0})],r.prototype,"displayState",1);o([a()],r.prototype,"measurement",1);o([a({type:C})],r.prototype,"snappingOptions",2);o([a()],r.prototype,"unitOptions",1);o([a()],r.prototype,"_userUnitOptions",2);o([a()],r.prototype,"unit",1);o([a()],r.prototype,"_userUnit",2);o([a({readOnly:!0})],r.prototype,"canResetUnit",1);r=o([A("components.distance-measurement-2d.DistanceMeasurement2dViewModel")],r);var H=M(r),h=class extends f{constructor(){super(...arguments),this.viewModel=H(this),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideResetUnitsButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-line",this.interactionDisabled=this.viewModel.interactionDisabled,this.messages=U({name:"distance-measurement-2d",blocking:!0}),this.snappingOptions=this.viewModel.snappingOptions,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=k()("analysis","interactionDisabled","state"),this.arcgisReady=w()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideResetUnitsButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,messages:0,referenceElement:1,snappingOptions:0,state:32,unit:1,unitOptions:0}}static{this.styles=P}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){O(this.viewModel.start())}render(){let{hideResetUnitsButton:t,messages:i,unit:l,unitOptions:s,viewModel:n}=this,{measurement:d,state:m}=n;return c`<div aria-label=${i.componentLabel??v} class=${b(x("root",p.widget,p.panel))} role=presentation><arcgis-measurement-content .state=${n.displayState} .hintLabel=${i.hint} .unsupportedLabel=${i.unsupported} .items=${[{title:i.distance,measurement:d.length}]}>${g({hidden:this.hideUnitSelect,children:c`<arcgis-unit-select slot=settings .options=${s} .selectLabel=${i.unit} .value=${l} .canReset=${!t&&n.canResetUnit} .resetLabel=${i.reset} @arcgisInternalUnitReset=${()=>n.resetUnit()} @arcgisUnitSelectChange=${E=>{this.unit=E.detail}}></arcgis-unit-select>`})}${g({hidden:this.hideStartButton,children:c`<calcite-button slot=actions .disabled=${m==="unsupported"||m==="disabled"||this.interactionDisabled} @click=${this.start}>${i.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};y("arcgis-distance-measurement-2d",h);return h},"analysis/DistanceMeasurementAnalysis","core/accessorSupport/decorators","core/reactiveUtils","views/interactive/options/SnappingOptions",a,d,e,h,i,l)
2
+ import l from"./BQCOYIEH.js";import{a as D,b as S,d as u,g as V,j as R,k as j}from"./FXUZU52U.js";import{a as g}from"./6J3KSMFG.js";import i from"./3ZRVPLIZ.js";import"./WJQUE4DR.js";import h from"./ZRT4RJ62.js";import{a as U}from"./SAI7K4OO.js";import{a as p}from"./L5IRXOCJ.js";import e from"./3VFPLRD3.js";import d from"./E3RBRDUV.js";import{h as k}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import{a as x}from"./LXME6MU5.js";import{R as f,T as b,X as v,_ as y,a as _,b as c,x as w}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([L,{property:a,subclass:A},{watch:B},C,,,,M,{b:z,e:O},$])=>{var P=_`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-space-2xl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-space-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-space-xs);display:flex}:host{.esri-widget--panel{min-width:0}}`,T=Object.defineProperty,I=Object.getOwnPropertyDescriptor,o=(e,t,i,l)=>{for(var s=l>1?void 0:l?I(t,i):t,n=e.length-1,d;n>=0;n--)(d=e[n])&&(s=(l?d(t,i,s):d(s))||s);return l&&s&&T(t,i,s),s},r=class extends ${constructor(){super(...arguments),this.snappingOptions=new C,this.supportedViewType="2d",this.unsupportedErrorMessage="The Distance Measurement 2D component is only supported in 2D views."}initialize(){this.addHandles([B(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:e,unit:t})=>{t&&(e.unit=t)},{sync:!0,initial:!0}),B(()=>({analysisView:this.analysisView,snappingOptions:this.snappingOptions}),({analysisView:e,snappingOptions:t})=>{e&&(e.snappingOptions=t)},{sync:!0,initial:!0})])}get state(){let{analysis:e,disabled:t,operationState:i,ready:l,supported:s}=this,{valid:n}=e;return D({supported:s,disabled:t,ready:l,operationState:i,valid:n})}get displayState(){return S(this.state,!!this.analysis.geometry)}get measurement(){return{mode:this.analysisView?.result?.mode??"euclidean",length:V(this.analysis.valid?this.analysisView?.result?.length:void 0)}}get unitOptions(){return R(this._userUnitOptions,u,u)}set unitOptions(e){this._userUnitOptions=e}get unit(){return j({userUnit:this._userUnit,analysisUnit:this.analysis.unit,options:this.unitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.length})}set unit(e){this._userUnit=e}get canResetUnit(){return this._userUnit!=null||this.analysis.unit!=null}resetUnit(){this._userUnit=void 0,this.analysis.unit=null}async place(e){let t=this.analysisView;t&&(await t.place(e),z(e?.signal))}clearAnalysis(){this.analysis.geometry=null}constructAnalysis(){return new L}};o([a({readOnly:!0})],r.prototype,"state",1);o([a({readOnly:!0})],r.prototype,"displayState",1);o([a()],r.prototype,"measurement",1);o([a({type:C})],r.prototype,"snappingOptions",2);o([a()],r.prototype,"unitOptions",1);o([a()],r.prototype,"_userUnitOptions",2);o([a()],r.prototype,"unit",1);o([a()],r.prototype,"_userUnit",2);o([a({readOnly:!0})],r.prototype,"canResetUnit",1);r=o([A("components.distance-measurement-2d.DistanceMeasurement2dViewModel")],r);var H=M(r),h=class extends f{constructor(){super(...arguments),this.viewModel=H(this),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideResetUnitsButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-line",this.interactionDisabled=this.viewModel.interactionDisabled,this.messages=U({name:"distance-measurement-2d",blocking:!0}),this.snappingOptions=this.viewModel.snappingOptions,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=k()("analysis","interactionDisabled","state"),this.arcgisReady=w()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideResetUnitsButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,messages:0,referenceElement:1,snappingOptions:0,state:32,unit:1,unitOptions:0}}static{this.styles=P}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){O(this.viewModel.start())}render(){let{hideResetUnitsButton:t,messages:i,unit:l,unitOptions:s,viewModel:n}=this,{measurement:d,state:m}=n;return c`<div aria-label=${i.componentLabel??v} class=${b(x("root",p.widget,p.panel))} role=presentation><arcgis-measurement-content .state=${n.displayState} .hintLabel=${i.hint} .unsupportedLabel=${i.unsupported} .items=${[{title:i.distance,measurement:d.length}]}>${g({hidden:this.hideUnitSelect,children:c`<arcgis-unit-select slot=settings .options=${s} .selectLabel=${i.unit} .value=${l} .canReset=${!t&&n.canResetUnit} .resetLabel=${i.reset} @arcgisInternalUnitReset=${()=>n.resetUnit()} @arcgisUnitSelectChange=${E=>{this.unit=E.detail}}></arcgis-unit-select>`})}${g({hidden:this.hideStartButton,children:c`<calcite-button slot=actions .disabled=${m==="unsupported"||m==="disabled"||this.interactionDisabled} @click=${this.start}>${i.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};y("arcgis-distance-measurement-2d",h);return h},"analysis/DistanceMeasurementAnalysis","core/accessorSupport/decorators","core/reactiveUtils","views/interactive/options/SnappingOptions",a,d,e,h,i,l)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as f,b as p}from"./WJQUE4DR.js";import{p as d}from"./IW3P4TGM.js";export default $arcgis.t(([h,{property:l,subclass:w},y])=>{var _=Object.defineProperty,v=Object.getOwnPropertyDescriptor,a=(r,t,e,o)=>{for(var n=o>1?void 0:o?v(t,e):t,i=r.length-1,u;i>=0;i--)(u=r[i])&&(n=(o?u(t,e,n):u(n))||n);return o&&n&&_(t,e,n),n};function q(r,t,e){if(r&&typeof r=="object"&&!Array.isArray(r)){let o="details"in r&&r.details&&typeof r.details=="object"&&!Array.isArray(r.details)?{detail:r.details}:void 0,n=e?`${e} - ${String(r)}`:String(r);d("error",t,n,o)}}function b(r="Aborted"){return new y("AbortError",r)}function L(r,t="Aborted"){if(g(r))throw b(t)}function m(r){return r instanceof AbortSignal?r:r?.signal??void 0}function g(r){return m(r)?.aborted??!1}function A(r){return r?.name==="AbortError"}function C(r){return{ok:!0,value:r}}function k(r){return{ok:!1,error:r}}function T(r){return r?.ok?r.value:null}function j(r){return r!=null&&!r.ok?r.error:null}function c(r,t){let e=m(r);if(e==null)return;if(e.aborted){t();return}let o=()=>t();return e.addEventListener("abort",o,{once:!0}),{remove:()=>e.removeEventListener("abort",o)}}function O(r,t){return new s(r,t)}var s=class extends h{constructor(r,t){super(),this._abortHandle=null,this.abort=()=>{this._abortController=f(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:e}=this._abortController;this.promise=r(e),this.promise.then(o=>{this._result=C(o),this._cleanup()},o=>{this._result=k(o),this._cleanup()}),this._abortHandle=c(t,this.abort)}get value(){return T(this._result)}get error(){return j(this._result)}get finished(){return this._result!=null}destroy(){this.abort()}_cleanup(){this._abortHandle=p(this._abortHandle),this._abortController=null}[Symbol.dispose](){super[Symbol.dispose](),this._cleanup()}};a([l()],s.prototype,"value",1);a([l()],s.prototype,"error",1);a([l()],s.prototype,"finished",1);a([l()],s.prototype,"promise",2);a([l()],s.prototype,"_result",2);s=a([w("esri.components.asyncUtils.ReactiveTask")],s);function P(r){return r.catch(t=>{if(!A(t))throw t})}function R(r,t={}){if("requestIdleCallback"in window)return window.requestIdleCallback(r,t);let e=t.timeout!=null?t.timeout:50,o=typeof performance<"u"&&performance.now?performance.now.bind(performance):Date.now,n=o();return window.setTimeout(()=>{r({didTimeout:!1,timeRemaining(){return Math.max(0,e-(o()-n))}})},1)}function $(r){"cancelIdleCallback"in window&&window.cancelIdleCallback(r),window.clearTimeout(r)}function D(r,t){let e=new AbortController;return c(t,()=>e.abort()),new Promise((o,n)=>{let i=setTimeout(()=>{i=void 0,o()},r);c(e,()=>{i!==void 0&&(clearTimeout(i),i=void 0,n(b()))})})}return{a:q,b:L,c:A,d:O,e:P,f:R,g:$,h:D}},"core/Accessor","core/accessorSupport/decorators","core/Error")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as x}from"./CKZBNHMD.js";import{c as b}from"./JB6WQEFJ.js";import f from"./SKV3CQSZ.js";import"./WJQUE4DR.js";import e from"./ZRT4RJ62.js";import{a as z}from"./SAI7K4OO.js";import d from"./3VFPLRD3.js";import c from"./E3RBRDUV.js";import{a as D,f as R}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import"./LXME6MU5.js";import{R as M,X as w,_ as E,a as F,b as u,x as v,z as L}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{property:d,subclass:N},H,_,{ignoreAbortErrors:j},{watch:g,on:V,whenOnce:I},W,U,K,Q,q,J,X,Y,{fetchPopupFeaturesFromGraphics:G},,,,B])=>{var Z=F`:host{width:100%;height:100%;padding:var(--calcite-space-none);margin:var(--calcite-space-none);display:flex;--internal-attribution-height: 16px;--arcgis-internal-presentation-padding-start: unset;--arcgis-internal-presentation-padding-end: unset;--arcgis-internal-presentation-cover-padding-top: unset;--arcgis-internal-presentation-cover-padding-bottom: unset;--arcgis-internal-presentation-cover-padding-start: unset;--arcgis-internal-presentation-cover-padding-end: unset;--arcgis-presentation-navigation-z-index: unset}p{padding:0;margin:0}.root{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%}.presentation-content{position:absolute;display:flex;width:100%;height:100%;justify-content:flex-end;padding-top:var(--calcite-space-lg);padding-inline-start:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-start));padding-inline-end:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-end))}.navigation-container{display:flex;flex-direction:column;margin-inline-start:var(--calcite-space-lg);margin-block:auto calc(var(--calcite-space-lg) + var(--arcgis-internal-attribution-space-top));width:fit-content;height:100%;z-index:var(--arcgis-presentation-navigation-z-index)}.navigation{width:fit-content;display:flex;align-items:center;background-color:var(--calcite-color-surface-2);box-shadow:var(--arcgis-internal-box-shadow);pointer-events:auto}.navigation-slide-list-container{position:relative;height:100%;min-height:0;margin-block-start:var(--calcite-space-lg)}.slide-list-action-container{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.slide-counter-text{display:flex;align-items:center;justify-content:center;gap:var(--calcite-space-base);font-size:var(--calcite-font-size-md)}.slide-counter-text-element{box-sizing:border-box;max-width:28px;margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums;min-width:var(--calcite-space-md);text-align:center}.legend-container{pointer-events:all;box-shadow:var(--calcite-shadow-sm);max-width:300px;height:fit-content;max-height:calc(100vh - 136px);overflow:hidden auto}.legend{background-color:var(--calcite-color-surface-2)}`,ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,o=(i,e,t,s)=>{for(var n=s>1?void 0:s?te(e,t):e,a=i.length-1,r;a>=0;a--)(r=i[a])&&(n=(s?r(e,t,n):r(n))||n);return s&&n&&ee(e,t,n),n},l=class extends H{constructor(i){super(i),this.transitionActive=!1,this.showLegend=!1,this._slideLegendDisabled=!1,this.keyboardNavigationEnabled=!1,this._subscribeToSlideEvents=e=>{this._unsubscribeToSlideEvents(e),e.forEach(t=>{let s=t.on("apply-slide-start",()=>this._onApplySlideStart(t)),n=t.on("apply-slide-complete",()=>this._onApplySlideComplete(t)),a=t.on("apply-slide-cancel",()=>this._onApplySlideCancel(t));this.addHandles(s,t.id),this.addHandles(n,t.id),this.addHandles(a,t.id)})},this._unsubscribeToSlideEvents=e=>{e.forEach(t=>{this.hasHandles(t.id)&&this.removeHandles(t.id)})}}initialize(){this.addHandles(g(()=>this.view?.map,(i,e)=>{if(this.hasHandles("sceneLoaded")&&this.removeHandles("sceneLoaded"),e){let t=e.presentation?.slides;t&&t.length>0&&this._unsubscribeToSlideEvents(t)}i&&this.addHandles(g(()=>i.loaded,t=>{t&&(this.removeHandles("sceneLoaded"),this._startWatchSlides(),this._slideId&&this._applySlideById(this._slideId))},{initial:!0}),"sceneLoaded")},{initial:!0}))}destroy(){this._unsubscribeToSlideEvents(this.slides)}get slideId(){return this._slideId}set slideId(i){i===void 0||!this.view?.map?.loaded?this._slideId=i:this._applySlideById(i)}get visibleSlides(){return this.view?.map?.presentation?.slides?.filter(i=>!i.hidden)??new _}get slides(){return this.view?.map?.presentation?.slides??new _}get lastSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===this.visibleSlides.length-1}get firstSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===0}get slideSelected(){return this.getSlideIndexBySlideId(this.slideId)>-1}get hasOnlyOneSlide(){return this.visibleSlides.length===1}get slideIndex(){return this.getSlideIndexBySlideId(this.slideId)}get slideLegendDisabled(){return this._slideLegendDisabled}set slideLegendDisabled(i){this._slideLegendDisabled=i,i&&(this.showLegend=!1)}getSlideIndexBySlideId(i){let e=-1;return i&&(e=this.visibleSlides.findIndex(t=>t.id===i)),e}navigateInPresentation(i){let e=this.slideIndex+i,t=this._getSlideBySlideIndex(e);t??=this._getSlideBySlideIndex(0),t&&this.applySlide(t)}captureArrowKeysForNavigation(i,e){let t=["ArrowLeft","ArrowRight","PageUp","PageDown"];if(document.activeElement?.nodeName.toLowerCase()==="arcgis-scene"||!t.includes(i.code))return;let s=e==="rtl"?"ArrowRight":"ArrowLeft",n=i.code===s||i.code==="PageUp"?-1:1;this.navigateInPresentation(n)}async setSliceAnalysisInteractive(i){if(!this.view?.analyses?.length)return;let e=this.view.analyses.find(s=>s.type==="slice"&&s.origin?.type==="web-scene");if(!e)return;let t=await this.view.whenAnalysisView(e);t&&(t.interactive=i)}getSlideBySlideId(i){return this.visibleSlides.find(e=>e.id===i)}async applySlide(i,e,t){if(this.view){let s=t?{signal:t?.signal}:{};await j(i.applyTo(this.view,{...s,animate:!e}))}}_getSlideBySlideIndex(i){if(i!=null&&i>=0&&i<this.visibleSlides.length)return this.visibleSlides.getItemAt(i)}async _applySlideById(i){let e=i?this.getSlideBySlideId(i):void 0;e&&await this.applySlide(e)}_startWatchSlides(){this._subscribeToSlideEvents(this.slides),this.addHandles(V(()=>this.slides,"change",i=>{this._subscribeToSlideEvents(new _(i.added)),this._unsubscribeToSlideEvents(new _(i.removed))},{onListenerAdd:this._subscribeToSlideEvents,onListenerRemove:this._unsubscribeToSlideEvents}))}_onApplySlideStart(i){this._slideId=i.id,this.transitionActive=!0,this.showLegend=!1,this.onApplySlideStart?.(i)}_onApplySlideComplete(i){this.transitionActive=!1,this._updateLegendDisplay(i),this.onApplySlideComplete?.(i)}_onApplySlideCancel(i){this.transitionActive=!1,this._updateLegendDisplay(i),this.onApplySlideCancel?.(i)}_updateLegendDisplay(i){this.showLegend=!this._slideLegendDisabled&&!!i.elements.legendInfo?.visible}};o([d()],l.prototype,"_slideId",2);o([d()],l.prototype,"view",2);o([d()],l.prototype,"slideId",1);o([d()],l.prototype,"transitionActive",2);o([d()],l.prototype,"showLegend",2);o([d()],l.prototype,"_slideLegendDisabled",2);o([d()],l.prototype,"keyboardNavigationEnabled",2);o([d()],l.prototype,"visibleSlides",1);o([d()],l.prototype,"slides",1);o([d()],l.prototype,"lastSlideSelected",1);o([d()],l.prototype,"firstSlideSelected",1);o([d()],l.prototype,"slideSelected",1);o([d()],l.prototype,"hasOnlyOneSlide",1);o([d()],l.prototype,"slideLegendDisabled",1);o([d()],l.prototype,"onApplySlideStart",2);o([d()],l.prototype,"onApplySlideComplete",2);o([d()],l.prototype,"onApplySlideCancel",2);o([d()],l.prototype,"getSlideIndexBySlideId",1);l=o([N("components.presentation.PresentationViewModel")],l);var $=class extends L{constructor(e){super(e)}hostLoaded(){this.component.manager.onLifecycle(()=>{let e=this.component;I(()=>e.referenceElement).then(t=>{this._isArcgisScene(t)&&(this._sceneRef=t)})})}openPopup(e){this.component.view&&this.component.slideId===e.id&&e.elements.popupInfo!=null&&this._preparePopupFeature(this.component.view,e.elements.popupInfo).then(({success:t,features:s,popupInfo:n})=>{this.component.slideId===e.id&&(t?this._handlePopupFeatureFound(e,s,n):this.component.arcgisPopupFeatureNotFound.emit({slide:e}))})}_isArcgisScene(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}closePopup(e){(!this.component.slidePopupDisabled||e)&&this._sceneRef?.closePopup()}async _handlePopupFeatureFound(e,t,s){let n=s?.location??void 0;this.component.arcgisPopupFeaturesRetrieved.emit({slide:e,features:t,location:n}),this.component.slidePopupDisabled||await this._sceneRef?.openPopup({features:t,location:n})}async _preparePopupFeature(e,t){let s=[];if(!t.features?.length||t.features.length===0)return{success:!1,features:s};let n=t.features?.getItemAt(t.selectedFeatureIndex)?.layerReference;if(n?.layerId==null)return{success:!1,features:s};let{layer:a,sublayer:r}=this._getLayersFromView(e,n.layerId,n?.sublayerId);if(!a)return{success:!1,features:s};let p=r??a;if(!p||!this._layerTypeSupportsCapturePopup(p))return{success:!1,features:s};if(s=await this._fetchFeaturesFromQueryable(e,t,a,r,p),s&&this._featureHasBeenFilledWithAttributes(s)){let c=s[0];return this._setFallbackPopupTemplate(c,r,a),this._setFallbackGeometry(c,t?.location),{success:!0,features:s,popupInfo:t}}return{success:!1,features:s}}_getLayersFromView(e,t,s){let n=e.map?.findLayerById(t)??void 0,a=this._getBuildingSceneLayerSublayer(n,s);return{layer:n,sublayer:a}}_getBuildingSceneLayerSublayer(e,t){let s;return e&&this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(s=e.allSublayers.find(n=>n.id===t&&n.type==="building-component")),s}_featureHasBeenFilledWithAttributes(e){return e&&e.length>0&&e[0].attributes&&Object.entries(e[0].attributes)?.length>1}async _fetchFeaturesFromQueryable(e,t,s,n,a){let r=t.features?.getItemAt(t.selectedFeatureIndex);if(r?.id==null)return await Promise.resolve([]);let p=await e.whenLayerView(s);await I(()=>!p.updating);let c=this._tryGetBuildingComponentSublayerView(s,n,p)??p;await I(()=>!c.updating);let h=this._createFeatureGraphic(s,n,a,r.id),y=await G(c,[h]);return this._featureHasBeenFilledWithAttributes(y)||(await I(()=>!e.updating),y=await G(c,[h])),y}_tryGetBuildingComponentSublayerView(e,t,s){let n;return this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(n=s.sublayerViews.find(a=>a.sublayer.id===t.id)),n}_setFallbackPopupTemplate(e,t,s){e.popupTemplate==null&&(e.popupTemplate=t?.popupTemplate?t.popupTemplate:s.popupTemplate)}_setFallbackGeometry(e,t){e.geometry==null&&t&&(e.geometry=t.clone())}_createFeatureGraphic(e,t,s,n){let a=this._getGlobalIdFieldNameFromLayer(s),r=n.type==="global-id"&&a?a:s.objectIdField,p=this._getGraphicOrigin(e,t),c=new W({attributes:{},layer:e,origin:p});return c.attributes[r]=n.value,c}_getGraphicOrigin(e,t){switch(e.type){case"csv":return new K(e);case"feature":return new Y(e);case"geojson":return new Q(e);case"scene":return new q(e);case"wfs":return new J(e);case"building-scene":return t?new X(t):void 0;default:return}}_layerTypeSupportsCapturePopup(e){return e!=null&&["csv","feature","geojson","wfs","scene","building-component"].includes(e.type)}_isLayer(e){return!!e&&e instanceof U}_isBuildingSceneLayer(e){return e?.type==="building-scene"}_getGlobalIdFieldNameFromLayer(e){return e.fields?.find(t=>t.type==="global-id")?.name}},ie=i=>new $(i),m=Object.freeze({width:0,height:0}),f=new WeakMap,S=()=>({topCenter:{...m},topLeft:{...m},topRight:{...m},bottomCenter:{...m},bottomLeft:{...m},bottomRight:{...m}}),k=i=>({topCenter:{...i.topCenter},topLeft:{...i.topLeft},topRight:{...i.topRight},bottomCenter:{...i.bottomCenter},bottomLeft:{...i.bottomLeft},bottomRight:{...i.bottomRight}}),T=i=>{let e=f.get(i);return e||(e={observedGroups:new Map,observedSizes:S(),subscribers:new Set},f.set(i,e)),e},se=i=>{let e=i?.topCenter.value,t=i?.topLeft.value,s=i?.topRight.value,n=i?.bottomCenter.value,a=i?.bottomLeft.value,r=i?.bottomRight.value;return e&&t&&s&&n&&a&&r?{topCenter:e,topLeft:t,topRight:s,bottomCenter:n,bottomLeft:a,bottomRight:r}:null},ne=(i,e)=>b.every(t=>i.get(t)===e[t]),ae=i=>{let e=k(i.observedSizes);i.subscribers.forEach(t=>t(e))},re=(i,e)=>{let t=f.get(i);if(!t)return;let s=!1;e.forEach(n=>{let a=b.find(y=>t.observedGroups.get(y)===n.target);if(!a)return;let{width:r,height:p}=n.contentRect,c={width:r,height:p},h=t.observedSizes[a];h.width===c.width&&h.height===c.height||(t.observedSizes[a]=c,s=!0)}),s&&ae(t)},A=(i,e)=>{let t=T(i);t.resizeObserver||(t.resizeObserver=new ResizeObserver(n=>{re(i,n)}));let s=se(e);if(!s){t.observedGroups.size>0&&(t.resizeObserver.disconnect(),t.observedGroups.clear());return}ne(t.observedGroups,s)||(t.resizeObserver.disconnect(),t.observedGroups.clear(),b.forEach(n=>{let a=s[n];t.observedGroups.set(n,a),t.resizeObserver?.observe(a)}))},le=(i,e)=>{let t=T(i);return t.subscribers.add(e),e(k(t.observedSizes)),()=>{let s=f.get(i);s&&(s.subscribers.delete(e),s.subscribers.size===0&&(s.resizeObserver?.disconnect(),s.observedGroups.clear(),f.delete(i)))}},P=class extends L{#t;#e;#i;constructor(e){super(e),this.exports=S()}hostDisconnected(){this.#i?.(),this.#i=void 0,this.#e=void 0,this.#t=void 0,this.exports=S()}hostLifecycle(){return[g(()=>this.#s(),e=>{if(this.#e!==e){if(this.#i?.(),this.#i=void 0,this.#e=e,this.#t=e?.slotGroupRefs,!e){this.exports=S();return}this.#i=le(e,t=>{this.#n(t)||(this.exports=t)}),A(e,this.#t)}},{sync:!0,initial:!0}),g(()=>this.#s()?.slotGroupRefs,e=>{this.#t=e,this.#e&&e&&A(this.#e,e)},{sync:!0,initial:!0})]}#s(){let{referenceElement:e}=this.component;return e&&typeof e!="string"?e:void 0}hostUpdated(){!this.#e||!this.#t||A(this.#e,this.#t)}#n(e){let t=this.exports??S();return b.every(s=>{let n=t[s],a=e[s];return n.width===a.width&&n.height===a.height})}},oe=D(P),de=B(l),C=class extends M{constructor(){super(...arguments),this._messages=z(),this._direction=R(),this._viewModel=de(this),this.#e=e=>{this._viewModel.captureArrowKeysForNavigation(e,this._direction)},this.#i=ie(this),this.#n=null,this.#r=e=>{this.#i.closePopup(),this.arcgisSlideApplyStart.emit({slide:e})},this.#l=e=>{this.#i.openPopup(e),this.sliceAnalysisInteractive&&this._viewModel.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyComplete.emit({slide:e})},this.#o=e=>{this.sliceAnalysisInteractive&&this._viewModel.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyCancel.emit({slide:e})},this.#d=e=>{let t=e.detail?.selectedSlide;if(!t)return;this.#s?.abort();let s=new AbortController;this.#s=s;let n=Date.now(),a=this.#n!==null&&n-this.#n<300;if(this.#n=n,this._viewModel.applySlide(t,a,s),a){this._showSlideList=!1;return}setTimeout(()=>{s.signal.aborted||(this._showSlideList=!1)},300)},this.#a=()=>{this._showSlideList=!1},this._showSlideList=!1,this.autoDestroyDisabled=!1,this.view=this._viewModel.view,this.visualScale="m",this.keyboardNavigationEnabled=!1,this.slidePopupDisabled=!1,this.slideCaptionsDisabled=!1,this.slideLegendDisabled=this._viewModel.slideLegendDisabled,this.sliceAnalysisInteractive=!1,this.navigationHidden=!1,this.arcgisPopupFeatureNotFound=v(),this.arcgisPopupFeaturesRetrieved=v(),this.arcgisReady=v(),this.arcgisSlideApplyCancel=v(),this.arcgisSlideApplyComplete=v(),this.arcgisSlideApplyStart=v()}static{this.properties={_slotSizesController:16,_showSlideList:16,slideId:1,autoDestroyDisabled:5,view:0,visualScale:1,keyboardNavigationEnabled:5,slidePopupDisabled:5,slideCaptionsDisabled:5,slideLegendDisabled:5,sliceAnalysisInteractive:5,navigationHidden:5}}static{this.styles=Z}#t;#e;#i;#s;#n;#r;#l;#o;#d;#a;#p;#c;get slideId(){return this._viewModel.slideId}set slideId(e){this._viewModel.slideId=e}async destroy(){await this.manager.destroy()}loaded(){this._viewModel.onApplySlideStart=this.#r,this._viewModel.onApplySlideComplete=this.#l,this._viewModel.onApplySlideCancel=this.#o,this.#v();let e=this;this.manager.onLifecycle(()=>[g(()=>this.sliceAnalysisInteractive,t=>{this._viewModel.setSliceAnalysisInteractive(t)},{initial:!0}),g(()=>e.referenceElement,t=>{this.#h(t)&&(this._slotSizesController=oe(this),this.#c=this.#u())},{once:!0,initial:!0}),{remove:()=>{document.removeEventListener("keydown",this.#e),this.#p?.removeEventListener("arcgisSlideListClose",this.#a),this.#t?.remove(),this.#c?.remove(),this.#s?.abort()}}])}#h(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}#u(){return g(()=>this._slotSizesController,e=>this.#g(e?.topLeft,e?.topRight,e?.bottomLeft,e?.bottomRight),{initial:!0})}#g(e,t,s,n){let a=this._direction==="ltr"?e?.width??0:t?.width??0,r=this._direction==="ltr"?t?.width??0:e?.width??0,p=Math.max(e?.height??0,t?.height??0),c=Math.max(s?.height??0,n?.height??0);a>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-start",`calc(var(--calcite-space-lg) + ${a.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-start","0px"),r>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-end",`calc(var(--calcite-space-lg) + ${r.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-end","0px");let h=a<=Math.max(p,c)&&r<=Math.max(p,c);this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top",h?"0":`${p}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-bottom",h?"0":`${c}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-start",h?`${a}px`:"0"),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-end",h?`${r}px`:"0")}#v(){this.#t=g(()=>this.keyboardNavigationEnabled,e=>{document.removeEventListener("keydown",this.#e),e&&document.addEventListener("keydown",this.#e)},{initial:!0})}render(){if(this._viewModel?.visibleSlides?.length===0)return u`<div></div>`;let e=this._viewModel.visibleSlides.find(a=>a.id===this.slideId),t=this.#m(),s=this.#b(e),n=this.#S();return u`<div class="root"><div class="presentation-content">${s}${n}</div>${t}</div>`}#m(){if(this.navigationHidden)return null;let e=this._viewModel.lastSlideSelected&&!this._viewModel.hasOnlyOneSlide,t=this.#f();return u`<div class="navigation-container"><div class="navigation-slide-list-container">${t}</div><div class="navigation"><div class="slide-list-action-container" id=${x}><calcite-action-bar expand-toggle-disabled layout=horizontal .scale=${this.visualScale==="l"?"m":"s"}><calcite-action .text=${this._messages.slideList??""} selection-appearance=highlight icon=list .scale=${this.visualScale==="l"?"m":"s"} .label=${this._messages.slideList} .active=${this._showSlideList} @click=${()=>this._showSlideList=!this._showSlideList}></calcite-action></calcite-action-bar><calcite-tooltip .referenceElement=${x} placement=bottom><span>${this._messages.slideList}</span></calcite-tooltip></div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .disabled=${this._viewModel.firstSlideSelected||!this._viewModel.slideSelected} .label=${this._messages.previous} title=${this._messages.previous??w} @click=${()=>this._viewModel.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this.#y()}</div><calcite-button appearance=transparent icon-start=${e?"reset":"chevron-right"} icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .label=${e?this._messages.restart:this._messages.next} title=${(e?this._messages.restart:this._messages.next)??w} @click=${()=>this._viewModel.navigateInPresentation(1)}></calcite-button></div></div>`}#y(){let e=this._viewModel.slideIndex+1,t=this._messages?.slideNavAriaText?.replace("${index}",e.toString()).replace("${numberOfSlides}",this._viewModel.visibleSlides.length.toString());return this._viewModel.slideSelected?u`<p role=banner aria-label=${t??w} aria-live=polite><div class="slide-counter-text-element" data-testId=arcgis-map-presentation-slideIndex>${e}</div><div>/</div><p class="slide-counter-text-element" data-testId=arcgis-map-presentation-numberOfSlides>${this._viewModel.visibleSlides.length}</p></p>`:u`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this._viewModel.visibleSlides?.length} ${this._messages?.slides}</p>`}#b(e){return this.slideCaptionsDisabled?null:u`<arcgis-presentation-captions .slide=${e} .transitionActive=${this._viewModel.transitionActive}></arcgis-presentation-captions>`}#S(){return this._viewModel.showLegend?u`<calcite-panel data-testid=presentation-legend class="legend-container" .heading=${this._messages.legend} closable @calcitePanelClose=${()=>this._viewModel.showLegend=!1}><arcgis-legend class="legend" .view=${this.view} @arcgisReady=${e=>e.stopPropagation()}></arcgis-legend></calcite-panel>`:null}#f(){return this._showSlideList?u`<arcgis-presentation-slide-list .slides=${this._viewModel.visibleSlides} .slideId=${this._viewModel.slideId} .label=${this._messages.slideList} .visualScale=${this.visualScale} @arcgisSlideListItemSelected=${this.#d} @arcgisSlideListOutsideClick=${this.#a}></arcgis-presentation-slide-list>`:null}};E("arcgis-presentation",C);return C},"core/accessorSupport/decorators","core/Accessor","core/Collection","core/promiseUtils","core/reactiveUtils","Graphic","layers/Layer","graphic/CSVGraphicOrigin","graphic/GeoJSONGraphicOrigin","graphic/SceneGraphicOrigin","graphic/WFSGraphicOrigin","graphic/BuildingGraphicOrigin","graphic/FeatureGraphicOrigin","applications/SceneViewer/sceneViewerUtils",a,c,d,e,f)
2
+ import{a as x}from"./CKZBNHMD.js";import{c as b}from"./JB6WQEFJ.js";import f from"./3ZRVPLIZ.js";import"./WJQUE4DR.js";import e from"./ZRT4RJ62.js";import{a as z}from"./SAI7K4OO.js";import d from"./3VFPLRD3.js";import c from"./E3RBRDUV.js";import{a as D,f as R}from"./FY7P5YLX.js";import"./IRDDLVT2.js";import a from"./TJHVEY7T.js";import"./LXME6MU5.js";import{R as M,X as w,_ as E,a as F,b as u,x as v,z as L}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{property:d,subclass:N},H,_,{ignoreAbortErrors:j},{watch:g,on:V,whenOnce:I},W,U,K,Q,q,J,X,Y,{fetchPopupFeaturesFromGraphics:G},,,,B])=>{var Z=F`:host{width:100%;height:100%;padding:var(--calcite-space-none);margin:var(--calcite-space-none);display:flex;--internal-attribution-height: 16px;--arcgis-internal-presentation-padding-start: unset;--arcgis-internal-presentation-padding-end: unset;--arcgis-internal-presentation-cover-padding-top: unset;--arcgis-internal-presentation-cover-padding-bottom: unset;--arcgis-internal-presentation-cover-padding-start: unset;--arcgis-internal-presentation-cover-padding-end: unset;--arcgis-presentation-navigation-z-index: unset}p{padding:0;margin:0}.root{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%}.presentation-content{position:absolute;display:flex;width:100%;height:100%;justify-content:flex-end;padding-top:var(--calcite-space-lg);padding-inline-start:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-start));padding-inline-end:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-end))}.navigation-container{display:flex;flex-direction:column;margin-inline-start:var(--calcite-space-lg);margin-block:auto calc(var(--calcite-space-lg) + var(--arcgis-internal-attribution-space-top));width:fit-content;height:100%;z-index:var(--arcgis-presentation-navigation-z-index)}.navigation{width:fit-content;display:flex;align-items:center;background-color:var(--calcite-color-surface-2);box-shadow:var(--arcgis-internal-box-shadow);pointer-events:auto}.navigation-slide-list-container{position:relative;height:100%;min-height:0;margin-block-start:var(--calcite-space-lg)}.slide-list-action-container{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.slide-counter-text{display:flex;align-items:center;justify-content:center;gap:var(--calcite-space-base);font-size:var(--calcite-font-size-md)}.slide-counter-text-element{box-sizing:border-box;max-width:28px;margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums;min-width:var(--calcite-space-md);text-align:center}.legend-container{pointer-events:all;box-shadow:var(--calcite-shadow-sm);max-width:300px;height:fit-content;max-height:calc(100vh - 136px);overflow:hidden auto}.legend{background-color:var(--calcite-color-surface-2)}`,ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,o=(i,e,t,s)=>{for(var n=s>1?void 0:s?te(e,t):e,a=i.length-1,r;a>=0;a--)(r=i[a])&&(n=(s?r(e,t,n):r(n))||n);return s&&n&&ee(e,t,n),n},l=class extends H{constructor(i){super(i),this.transitionActive=!1,this.showLegend=!1,this._slideLegendDisabled=!1,this.keyboardNavigationEnabled=!1,this._subscribeToSlideEvents=e=>{this._unsubscribeToSlideEvents(e),e.forEach(t=>{let s=t.on("apply-slide-start",()=>this._onApplySlideStart(t)),n=t.on("apply-slide-complete",()=>this._onApplySlideComplete(t)),a=t.on("apply-slide-cancel",()=>this._onApplySlideCancel(t));this.addHandles(s,t.id),this.addHandles(n,t.id),this.addHandles(a,t.id)})},this._unsubscribeToSlideEvents=e=>{e.forEach(t=>{this.hasHandles(t.id)&&this.removeHandles(t.id)})}}initialize(){this.addHandles(g(()=>this.view?.map,(i,e)=>{if(this.hasHandles("sceneLoaded")&&this.removeHandles("sceneLoaded"),e){let t=e.presentation?.slides;t&&t.length>0&&this._unsubscribeToSlideEvents(t)}i&&this.addHandles(g(()=>i.loaded,t=>{t&&(this.removeHandles("sceneLoaded"),this._startWatchSlides(),this._slideId&&this._applySlideById(this._slideId))},{initial:!0}),"sceneLoaded")},{initial:!0}))}destroy(){this._unsubscribeToSlideEvents(this.slides)}get slideId(){return this._slideId}set slideId(i){i===void 0||!this.view?.map?.loaded?this._slideId=i:this._applySlideById(i)}get visibleSlides(){return this.view?.map?.presentation?.slides?.filter(i=>!i.hidden)??new _}get slides(){return this.view?.map?.presentation?.slides??new _}get lastSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===this.visibleSlides.length-1}get firstSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===0}get slideSelected(){return this.getSlideIndexBySlideId(this.slideId)>-1}get hasOnlyOneSlide(){return this.visibleSlides.length===1}get slideIndex(){return this.getSlideIndexBySlideId(this.slideId)}get slideLegendDisabled(){return this._slideLegendDisabled}set slideLegendDisabled(i){this._slideLegendDisabled=i,i&&(this.showLegend=!1)}getSlideIndexBySlideId(i){let e=-1;return i&&(e=this.visibleSlides.findIndex(t=>t.id===i)),e}navigateInPresentation(i){let e=this.slideIndex+i,t=this._getSlideBySlideIndex(e);t??=this._getSlideBySlideIndex(0),t&&this.applySlide(t)}captureArrowKeysForNavigation(i,e){let t=["ArrowLeft","ArrowRight","PageUp","PageDown"];if(document.activeElement?.nodeName.toLowerCase()==="arcgis-scene"||!t.includes(i.code))return;let s=e==="rtl"?"ArrowRight":"ArrowLeft",n=i.code===s||i.code==="PageUp"?-1:1;this.navigateInPresentation(n)}async setSliceAnalysisInteractive(i){if(!this.view?.analyses?.length)return;let e=this.view.analyses.find(s=>s.type==="slice"&&s.origin?.type==="web-scene");if(!e)return;let t=await this.view.whenAnalysisView(e);t&&(t.interactive=i)}getSlideBySlideId(i){return this.visibleSlides.find(e=>e.id===i)}async applySlide(i,e,t){if(this.view){let s=t?{signal:t?.signal}:{};await j(i.applyTo(this.view,{...s,animate:!e}))}}_getSlideBySlideIndex(i){if(i!=null&&i>=0&&i<this.visibleSlides.length)return this.visibleSlides.getItemAt(i)}async _applySlideById(i){let e=i?this.getSlideBySlideId(i):void 0;e&&await this.applySlide(e)}_startWatchSlides(){this._subscribeToSlideEvents(this.slides),this.addHandles(V(()=>this.slides,"change",i=>{this._subscribeToSlideEvents(new _(i.added)),this._unsubscribeToSlideEvents(new _(i.removed))},{onListenerAdd:this._subscribeToSlideEvents,onListenerRemove:this._unsubscribeToSlideEvents}))}_onApplySlideStart(i){this._slideId=i.id,this.transitionActive=!0,this.showLegend=!1,this.onApplySlideStart?.(i)}_onApplySlideComplete(i){this.transitionActive=!1,this._updateLegendDisplay(i),this.onApplySlideComplete?.(i)}_onApplySlideCancel(i){this.transitionActive=!1,this._updateLegendDisplay(i),this.onApplySlideCancel?.(i)}_updateLegendDisplay(i){this.showLegend=!this._slideLegendDisabled&&!!i.elements.legendInfo?.visible}};o([d()],l.prototype,"_slideId",2);o([d()],l.prototype,"view",2);o([d()],l.prototype,"slideId",1);o([d()],l.prototype,"transitionActive",2);o([d()],l.prototype,"showLegend",2);o([d()],l.prototype,"_slideLegendDisabled",2);o([d()],l.prototype,"keyboardNavigationEnabled",2);o([d()],l.prototype,"visibleSlides",1);o([d()],l.prototype,"slides",1);o([d()],l.prototype,"lastSlideSelected",1);o([d()],l.prototype,"firstSlideSelected",1);o([d()],l.prototype,"slideSelected",1);o([d()],l.prototype,"hasOnlyOneSlide",1);o([d()],l.prototype,"slideLegendDisabled",1);o([d()],l.prototype,"onApplySlideStart",2);o([d()],l.prototype,"onApplySlideComplete",2);o([d()],l.prototype,"onApplySlideCancel",2);o([d()],l.prototype,"getSlideIndexBySlideId",1);l=o([N("components.presentation.PresentationViewModel")],l);var $=class extends L{constructor(e){super(e)}hostLoaded(){this.component.manager.onLifecycle(()=>{let e=this.component;I(()=>e.referenceElement).then(t=>{this._isArcgisScene(t)&&(this._sceneRef=t)})})}openPopup(e){this.component.view&&this.component.slideId===e.id&&e.elements.popupInfo!=null&&this._preparePopupFeature(this.component.view,e.elements.popupInfo).then(({success:t,features:s,popupInfo:n})=>{this.component.slideId===e.id&&(t?this._handlePopupFeatureFound(e,s,n):this.component.arcgisPopupFeatureNotFound.emit({slide:e}))})}_isArcgisScene(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}closePopup(e){(!this.component.slidePopupDisabled||e)&&this._sceneRef?.closePopup()}async _handlePopupFeatureFound(e,t,s){let n=s?.location??void 0;this.component.arcgisPopupFeaturesRetrieved.emit({slide:e,features:t,location:n}),this.component.slidePopupDisabled||await this._sceneRef?.openPopup({features:t,location:n})}async _preparePopupFeature(e,t){let s=[];if(!t.features?.length||t.features.length===0)return{success:!1,features:s};let n=t.features?.getItemAt(t.selectedFeatureIndex)?.layerReference;if(n?.layerId==null)return{success:!1,features:s};let{layer:a,sublayer:r}=this._getLayersFromView(e,n.layerId,n?.sublayerId);if(!a)return{success:!1,features:s};let p=r??a;if(!p||!this._layerTypeSupportsCapturePopup(p))return{success:!1,features:s};if(s=await this._fetchFeaturesFromQueryable(e,t,a,r,p),s&&this._featureHasBeenFilledWithAttributes(s)){let c=s[0];return this._setFallbackPopupTemplate(c,r,a),this._setFallbackGeometry(c,t?.location),{success:!0,features:s,popupInfo:t}}return{success:!1,features:s}}_getLayersFromView(e,t,s){let n=e.map?.findLayerById(t)??void 0,a=this._getBuildingSceneLayerSublayer(n,s);return{layer:n,sublayer:a}}_getBuildingSceneLayerSublayer(e,t){let s;return e&&this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(s=e.allSublayers.find(n=>n.id===t&&n.type==="building-component")),s}_featureHasBeenFilledWithAttributes(e){return e&&e.length>0&&e[0].attributes&&Object.entries(e[0].attributes)?.length>1}async _fetchFeaturesFromQueryable(e,t,s,n,a){let r=t.features?.getItemAt(t.selectedFeatureIndex);if(r?.id==null)return await Promise.resolve([]);let p=await e.whenLayerView(s);await I(()=>!p.updating);let c=this._tryGetBuildingComponentSublayerView(s,n,p)??p;await I(()=>!c.updating);let h=this._createFeatureGraphic(s,n,a,r.id),y=await G(c,[h]);return this._featureHasBeenFilledWithAttributes(y)||(await I(()=>!e.updating),y=await G(c,[h])),y}_tryGetBuildingComponentSublayerView(e,t,s){let n;return this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(n=s.sublayerViews.find(a=>a.sublayer.id===t.id)),n}_setFallbackPopupTemplate(e,t,s){e.popupTemplate==null&&(e.popupTemplate=t?.popupTemplate?t.popupTemplate:s.popupTemplate)}_setFallbackGeometry(e,t){e.geometry==null&&t&&(e.geometry=t.clone())}_createFeatureGraphic(e,t,s,n){let a=this._getGlobalIdFieldNameFromLayer(s),r=n.type==="global-id"&&a?a:s.objectIdField,p=this._getGraphicOrigin(e,t),c=new W({attributes:{},layer:e,origin:p});return c.attributes[r]=n.value,c}_getGraphicOrigin(e,t){switch(e.type){case"csv":return new K(e);case"feature":return new Y(e);case"geojson":return new Q(e);case"scene":return new q(e);case"wfs":return new J(e);case"building-scene":return t?new X(t):void 0;default:return}}_layerTypeSupportsCapturePopup(e){return e!=null&&["csv","feature","geojson","wfs","scene","building-component"].includes(e.type)}_isLayer(e){return!!e&&e instanceof U}_isBuildingSceneLayer(e){return e?.type==="building-scene"}_getGlobalIdFieldNameFromLayer(e){return e.fields?.find(t=>t.type==="global-id")?.name}},ie=i=>new $(i),m=Object.freeze({width:0,height:0}),f=new WeakMap,S=()=>({topCenter:{...m},topLeft:{...m},topRight:{...m},bottomCenter:{...m},bottomLeft:{...m},bottomRight:{...m}}),k=i=>({topCenter:{...i.topCenter},topLeft:{...i.topLeft},topRight:{...i.topRight},bottomCenter:{...i.bottomCenter},bottomLeft:{...i.bottomLeft},bottomRight:{...i.bottomRight}}),T=i=>{let e=f.get(i);return e||(e={observedGroups:new Map,observedSizes:S(),subscribers:new Set},f.set(i,e)),e},se=i=>{let e=i?.topCenter.value,t=i?.topLeft.value,s=i?.topRight.value,n=i?.bottomCenter.value,a=i?.bottomLeft.value,r=i?.bottomRight.value;return e&&t&&s&&n&&a&&r?{topCenter:e,topLeft:t,topRight:s,bottomCenter:n,bottomLeft:a,bottomRight:r}:null},ne=(i,e)=>b.every(t=>i.get(t)===e[t]),ae=i=>{let e=k(i.observedSizes);i.subscribers.forEach(t=>t(e))},re=(i,e)=>{let t=f.get(i);if(!t)return;let s=!1;e.forEach(n=>{let a=b.find(y=>t.observedGroups.get(y)===n.target);if(!a)return;let{width:r,height:p}=n.contentRect,c={width:r,height:p},h=t.observedSizes[a];h.width===c.width&&h.height===c.height||(t.observedSizes[a]=c,s=!0)}),s&&ae(t)},A=(i,e)=>{let t=T(i);t.resizeObserver||(t.resizeObserver=new ResizeObserver(n=>{re(i,n)}));let s=se(e);if(!s){t.observedGroups.size>0&&(t.resizeObserver.disconnect(),t.observedGroups.clear());return}ne(t.observedGroups,s)||(t.resizeObserver.disconnect(),t.observedGroups.clear(),b.forEach(n=>{let a=s[n];t.observedGroups.set(n,a),t.resizeObserver?.observe(a)}))},le=(i,e)=>{let t=T(i);return t.subscribers.add(e),e(k(t.observedSizes)),()=>{let s=f.get(i);s&&(s.subscribers.delete(e),s.subscribers.size===0&&(s.resizeObserver?.disconnect(),s.observedGroups.clear(),f.delete(i)))}},P=class extends L{#t;#e;#i;constructor(e){super(e),this.exports=S()}hostDisconnected(){this.#i?.(),this.#i=void 0,this.#e=void 0,this.#t=void 0,this.exports=S()}hostLifecycle(){return[g(()=>this.#s(),e=>{if(this.#e!==e){if(this.#i?.(),this.#i=void 0,this.#e=e,this.#t=e?.slotGroupRefs,!e){this.exports=S();return}this.#i=le(e,t=>{this.#n(t)||(this.exports=t)}),A(e,this.#t)}},{sync:!0,initial:!0}),g(()=>this.#s()?.slotGroupRefs,e=>{this.#t=e,this.#e&&e&&A(this.#e,e)},{sync:!0,initial:!0})]}#s(){let{referenceElement:e}=this.component;return e&&typeof e!="string"?e:void 0}hostUpdated(){!this.#e||!this.#t||A(this.#e,this.#t)}#n(e){let t=this.exports??S();return b.every(s=>{let n=t[s],a=e[s];return n.width===a.width&&n.height===a.height})}},oe=D(P),de=B(l),C=class extends M{constructor(){super(...arguments),this._messages=z(),this._direction=R(),this._viewModel=de(this),this.#e=e=>{this._viewModel.captureArrowKeysForNavigation(e,this._direction)},this.#i=ie(this),this.#n=null,this.#r=e=>{this.#i.closePopup(),this.arcgisSlideApplyStart.emit({slide:e})},this.#l=e=>{this.#i.openPopup(e),this.sliceAnalysisInteractive&&this._viewModel.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyComplete.emit({slide:e})},this.#o=e=>{this.sliceAnalysisInteractive&&this._viewModel.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyCancel.emit({slide:e})},this.#d=e=>{let t=e.detail?.selectedSlide;if(!t)return;this.#s?.abort();let s=new AbortController;this.#s=s;let n=Date.now(),a=this.#n!==null&&n-this.#n<300;if(this.#n=n,this._viewModel.applySlide(t,a,s),a){this._showSlideList=!1;return}setTimeout(()=>{s.signal.aborted||(this._showSlideList=!1)},300)},this.#a=()=>{this._showSlideList=!1},this._showSlideList=!1,this.autoDestroyDisabled=!1,this.view=this._viewModel.view,this.visualScale="m",this.keyboardNavigationEnabled=!1,this.slidePopupDisabled=!1,this.slideCaptionsDisabled=!1,this.slideLegendDisabled=this._viewModel.slideLegendDisabled,this.sliceAnalysisInteractive=!1,this.navigationHidden=!1,this.arcgisPopupFeatureNotFound=v(),this.arcgisPopupFeaturesRetrieved=v(),this.arcgisReady=v(),this.arcgisSlideApplyCancel=v(),this.arcgisSlideApplyComplete=v(),this.arcgisSlideApplyStart=v()}static{this.properties={_slotSizesController:16,_showSlideList:16,slideId:1,autoDestroyDisabled:5,view:0,visualScale:1,keyboardNavigationEnabled:5,slidePopupDisabled:5,slideCaptionsDisabled:5,slideLegendDisabled:5,sliceAnalysisInteractive:5,navigationHidden:5}}static{this.styles=Z}#t;#e;#i;#s;#n;#r;#l;#o;#d;#a;#p;#c;get slideId(){return this._viewModel.slideId}set slideId(e){this._viewModel.slideId=e}async destroy(){await this.manager.destroy()}loaded(){this._viewModel.onApplySlideStart=this.#r,this._viewModel.onApplySlideComplete=this.#l,this._viewModel.onApplySlideCancel=this.#o,this.#v();let e=this;this.manager.onLifecycle(()=>[g(()=>this.sliceAnalysisInteractive,t=>{this._viewModel.setSliceAnalysisInteractive(t)},{initial:!0}),g(()=>e.referenceElement,t=>{this.#h(t)&&(this._slotSizesController=oe(this),this.#c=this.#u())},{once:!0,initial:!0}),{remove:()=>{document.removeEventListener("keydown",this.#e),this.#p?.removeEventListener("arcgisSlideListClose",this.#a),this.#t?.remove(),this.#c?.remove(),this.#s?.abort()}}])}#h(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}#u(){return g(()=>this._slotSizesController,e=>this.#g(e?.topLeft,e?.topRight,e?.bottomLeft,e?.bottomRight),{initial:!0})}#g(e,t,s,n){let a=this._direction==="ltr"?e?.width??0:t?.width??0,r=this._direction==="ltr"?t?.width??0:e?.width??0,p=Math.max(e?.height??0,t?.height??0),c=Math.max(s?.height??0,n?.height??0);a>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-start",`calc(var(--calcite-space-lg) + ${a.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-start","0px"),r>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-end",`calc(var(--calcite-space-lg) + ${r.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-end","0px");let h=a<=Math.max(p,c)&&r<=Math.max(p,c);this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top",h?"0":`${p}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-bottom",h?"0":`${c}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-start",h?`${a}px`:"0"),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-end",h?`${r}px`:"0")}#v(){this.#t=g(()=>this.keyboardNavigationEnabled,e=>{document.removeEventListener("keydown",this.#e),e&&document.addEventListener("keydown",this.#e)},{initial:!0})}render(){if(this._viewModel?.visibleSlides?.length===0)return u`<div></div>`;let e=this._viewModel.visibleSlides.find(a=>a.id===this.slideId),t=this.#m(),s=this.#b(e),n=this.#S();return u`<div class="root"><div class="presentation-content">${s}${n}</div>${t}</div>`}#m(){if(this.navigationHidden)return null;let e=this._viewModel.lastSlideSelected&&!this._viewModel.hasOnlyOneSlide,t=this.#f();return u`<div class="navigation-container"><div class="navigation-slide-list-container">${t}</div><div class="navigation"><div class="slide-list-action-container" id=${x}><calcite-action-bar expand-toggle-disabled layout=horizontal .scale=${this.visualScale==="l"?"m":"s"}><calcite-action .text=${this._messages.slideList??""} selection-appearance=highlight icon=list .scale=${this.visualScale==="l"?"m":"s"} .label=${this._messages.slideList} .active=${this._showSlideList} @click=${()=>this._showSlideList=!this._showSlideList}></calcite-action></calcite-action-bar><calcite-tooltip .referenceElement=${x} placement=bottom><span>${this._messages.slideList}</span></calcite-tooltip></div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .disabled=${this._viewModel.firstSlideSelected||!this._viewModel.slideSelected} .label=${this._messages.previous} title=${this._messages.previous??w} @click=${()=>this._viewModel.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this.#y()}</div><calcite-button appearance=transparent icon-start=${e?"reset":"chevron-right"} icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .label=${e?this._messages.restart:this._messages.next} title=${(e?this._messages.restart:this._messages.next)??w} @click=${()=>this._viewModel.navigateInPresentation(1)}></calcite-button></div></div>`}#y(){let e=this._viewModel.slideIndex+1,t=this._messages?.slideNavAriaText?.replace("${index}",e.toString()).replace("${numberOfSlides}",this._viewModel.visibleSlides.length.toString());return this._viewModel.slideSelected?u`<p role=banner aria-label=${t??w} aria-live=polite><div class="slide-counter-text-element" data-testId=arcgis-map-presentation-slideIndex>${e}</div><div>/</div><p class="slide-counter-text-element" data-testId=arcgis-map-presentation-numberOfSlides>${this._viewModel.visibleSlides.length}</p></p>`:u`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this._viewModel.visibleSlides?.length} ${this._messages?.slides}</p>`}#b(e){return this.slideCaptionsDisabled?null:u`<arcgis-presentation-captions .slide=${e} .transitionActive=${this._viewModel.transitionActive}></arcgis-presentation-captions>`}#S(){return this._viewModel.showLegend?u`<calcite-panel data-testid=presentation-legend class="legend-container" .heading=${this._messages.legend} closable @calcitePanelClose=${()=>this._viewModel.showLegend=!1}><arcgis-legend class="legend" .view=${this.view} @arcgisReady=${e=>e.stopPropagation()}></arcgis-legend></calcite-panel>`:null}#f(){return this._showSlideList?u`<arcgis-presentation-slide-list .slides=${this._viewModel.visibleSlides} .slideId=${this._viewModel.slideId} .label=${this._messages.slideList} .visualScale=${this.visualScale} @arcgisSlideListItemSelected=${this.#d} @arcgisSlideListOutsideClick=${this.#a}></arcgis-presentation-slide-list>`:null}};E("arcgis-presentation",C);return C},"core/accessorSupport/decorators","core/Accessor","core/Collection","core/promiseUtils","core/reactiveUtils","Graphic","layers/Layer","graphic/CSVGraphicOrigin","graphic/GeoJSONGraphicOrigin","graphic/SceneGraphicOrigin","graphic/WFSGraphicOrigin","graphic/BuildingGraphicOrigin","graphic/FeatureGraphicOrigin","applications/SceneViewer/sceneViewerUtils",a,c,d,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"./ND7BSIVO.js";import b from"./SKV3CQSZ.js";import"./WJQUE4DR.js";import{Q as d,R as c,X as a,_ as m,a as v,b as w}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([g,_,{on:h,watch:I,whenOnce:C},L,{a:f,c:u},{a:b}])=>{var y=v`:host{position:absolute;inset:0;pointer-events:none}.video-preview-container{position:absolute;bottom:calc(100% + var(--calcite-space-xs));z-index:1;box-sizing:border-box;transform:translate(-50%);pointer-events:none;border:1px solid var(--calcite-color-border-1);background-color:var(--calcite-color-surface-2)}.video-preview-container canvas{display:block;width:100%;height:auto}.video-preview-container .thumbnail-time{position:absolute;bottom:0;right:0;padding:var(--calcite-space-xs);background-color:var(--calcite-color-surface-2);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-relative-xs);line-height:1;text-align:center;white-space:nowrap}`,l=class extends c{constructor(){super(...arguments),this._previewsLoadId=0,this.previewLeft=0,this.previewTime="",this.previewVisible=!1,this.previewWidth=0}static{this.properties={previewLeft:16,previewTime:16,previewVisible:16,previewWidth:16,referenceElement:0,viewModel:0}}static{this.styles=y}updated(){this.#s()}loaded(){this.manager.onLifecycle(()=>{let i=new _,t=e=>this.#p(e);return i.add([h(()=>this.referenceElement,"pointerenter",t),h(()=>this.referenceElement,"pointermove",t),h(()=>this.referenceElement,"pointerleave",()=>this.#i()),I(()=>this.viewModel.layer,e=>{this.#l(e)},{initial:!0}),{remove:()=>{this.#t(),this._previews?.close(),this._previews=void 0,this._previewsInfo=void 0,this.#i()}}]),{remove:()=>i.destroy()}})}#t(){this._previewsLoadId++,this._previewsLoadController?.abort(),this._previewsLoadController=void 0}#r(i,t){try{return new URL(i,t)}catch(e){throw new g("video-player:invalid-previews-url","Unable to construct the video previews image URL.",{urlFragment:i,baseUrl:t,error:e})}}#s(){let{_previewContainer:i,_previews:t,_previewClip:e}=this;!i||!t||!e||i.getContext("2d")?.drawImage(t,e.x,e.y,e.width,e.height,0,0,e.width,e.height)}async#o({previewsImageUrl:i,previewsInfo:t,loadId:e,signal:r}){let{data:s}=await L(i.href,{responseType:"blob",signal:r}),o=await createImageBitmap(s);if(e!==this._previewsLoadId||r.aborted){o.close();return}this._previews?.close(),this._previews=o,this._previewsInfo=t,this.requestUpdate()}#n(i,t,e){return e.thumbnailInfo.length>0?this.#h(i,e):this.#a(i,t,e)}#e(i,t){let e=Math.min(t.thumbnailInfo.length||t.count,t.numCols*t.numRows);if(!(i<0||i>=e))return{x:i%t.numCols*t.width,y:Math.floor(i/t.numCols)*t.height,width:t.width,height:t.height}}#a(i,t,e){let r=Math.min(e.count,e.numCols*e.numRows);if(r<=0||t<=0)return;let s=Math.min(r-1,Math.floor(i/t*r));return this.#e(s,e)}#h(i,t){let e=t.thumbnailInfo,r=e.reduce((s,o,n)=>Math.abs(o.offset-i)<Math.abs(e[s].offset-i)?n:s,0);return this.#e(r,t)}async#l(i){let t=++this._previewsLoadId;if(this._previewsLoadController?.abort(),this._previewsLoadController=void 0,this._previews?.close(),this._previews=void 0,this._previewsInfo=void 0,this._previewClip=void 0,this.previewVisible=!1,this.requestUpdate(),!i)return;let e=new AbortController;this._previewsLoadController=e;try{if(await C(()=>i.loaded,e.signal),t!==this._previewsLoadId||e.signal.aborted)return;let r=i.previewsInfo;if(!i.capabilities?.operations?.supportsPreviews||!r)return;let s={...r,count:r.count>0?r.count:r.thumbnailInfo.length>0?r.thumbnailInfo.length:r.numCols*r.numRows},o=this.#r(s.urlFragment,`${i.url}/${i.layerId}/`);await this.#o({previewsImageUrl:o,previewsInfo:s,loadId:t,signal:e.signal})}catch(r){if(t!==this._previewsLoadId||e.signal.aborted||u(r))return;f(r,this,"Failed to load the video previews")}finally{this._previewsLoadController===e&&(this._previewsLoadController=void 0)}}#i(){this.previewVisible=!1,this._previewClip=void 0}#p(i){if(!(i instanceof PointerEvent))return;let t=this.viewModel.duration;if(i.pointerType==="touch"||!this._previewsInfo||!this._previews||this._previewsInfo.numCols<=0||this._previewsInfo.numRows<=0||this._previewsInfo.width<=0||this._previewsInfo.height<=0||!Number.isFinite(t)||t<=0){this.previewVisible=!1;return}let e=i.currentTarget instanceof HTMLElement?i.currentTarget.getBoundingClientRect():null;if(!e||e.width<=0){this.previewVisible=!1;return}let r=Math.max(0,Math.min(e.width,i.clientX-e.left)),s=r/e.width*t*1e3,o=this.#n(s,t*1e3,this._previewsInfo);if(!o){this.previewVisible=!1;return}this._previewClip=o;let n=Math.min(this._previewsInfo.width,e.width),p=n/2;this.previewLeft=Math.max(p,Math.min(e.width-p,r)),this.previewWidth=n,this.previewTime=b(s/1e3),this.previewVisible=!0}#v(i){this._previewContainer=i??void 0}render(){return this._previewsInfo?w`<div class="video-preview-container" aria-hidden=true .hidden=${!this.previewVisible} style=${`left: ${this.previewLeft}px; width: ${this.previewWidth}px`}><canvas height=${this._previewsInfo.height??a} width=${this._previewsInfo.width??a} ${d(this.#v)}></canvas><span class="thumbnail-time">${this.previewTime}</span></div>`:null}};m("arcgis-video-player-previews",l);return l},"core/Error","core/Handles","core/reactiveUtils","request",b,e)
2
+ import e from"./ND7BSIVO.js";import b from"./3ZRVPLIZ.js";import"./WJQUE4DR.js";import{Q as d,R as c,X as a,_ as m,a as v,b as w}from"./IW3P4TGM.js";import"./TAVTDQ6S.js";export default $arcgis.t(([g,_,{on:h,watch:I,whenOnce:C},L,{a:f,c:u},{a:b}])=>{var y=v`:host{position:absolute;inset:0;pointer-events:none}.video-preview-container{position:absolute;bottom:calc(100% + var(--calcite-space-xs));z-index:1;box-sizing:border-box;transform:translate(-50%);pointer-events:none;border:1px solid var(--calcite-color-border-1);background-color:var(--calcite-color-surface-2)}.video-preview-container canvas{display:block;width:100%;height:auto}.video-preview-container .thumbnail-time{position:absolute;bottom:0;right:0;padding:var(--calcite-space-xs);background-color:var(--calcite-color-surface-2);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-relative-xs);line-height:1;text-align:center;white-space:nowrap}`,l=class extends c{constructor(){super(...arguments),this._previewsLoadId=0,this.previewLeft=0,this.previewTime="",this.previewVisible=!1,this.previewWidth=0}static{this.properties={previewLeft:16,previewTime:16,previewVisible:16,previewWidth:16,referenceElement:0,viewModel:0}}static{this.styles=y}updated(){this.#s()}loaded(){this.manager.onLifecycle(()=>{let i=new _,t=e=>this.#p(e);return i.add([h(()=>this.referenceElement,"pointerenter",t),h(()=>this.referenceElement,"pointermove",t),h(()=>this.referenceElement,"pointerleave",()=>this.#i()),I(()=>this.viewModel.layer,e=>{this.#l(e)},{initial:!0}),{remove:()=>{this.#t(),this._previews?.close(),this._previews=void 0,this._previewsInfo=void 0,this.#i()}}]),{remove:()=>i.destroy()}})}#t(){this._previewsLoadId++,this._previewsLoadController?.abort(),this._previewsLoadController=void 0}#r(i,t){try{return new URL(i,t)}catch(e){throw new g("video-player:invalid-previews-url","Unable to construct the video previews image URL.",{urlFragment:i,baseUrl:t,error:e})}}#s(){let{_previewContainer:i,_previews:t,_previewClip:e}=this;!i||!t||!e||i.getContext("2d")?.drawImage(t,e.x,e.y,e.width,e.height,0,0,e.width,e.height)}async#o({previewsImageUrl:i,previewsInfo:t,loadId:e,signal:r}){let{data:s}=await L(i.href,{responseType:"blob",signal:r}),o=await createImageBitmap(s);if(e!==this._previewsLoadId||r.aborted){o.close();return}this._previews?.close(),this._previews=o,this._previewsInfo=t,this.requestUpdate()}#n(i,t,e){return e.thumbnailInfo.length>0?this.#h(i,e):this.#a(i,t,e)}#e(i,t){let e=Math.min(t.thumbnailInfo.length||t.count,t.numCols*t.numRows);if(!(i<0||i>=e))return{x:i%t.numCols*t.width,y:Math.floor(i/t.numCols)*t.height,width:t.width,height:t.height}}#a(i,t,e){let r=Math.min(e.count,e.numCols*e.numRows);if(r<=0||t<=0)return;let s=Math.min(r-1,Math.floor(i/t*r));return this.#e(s,e)}#h(i,t){let e=t.thumbnailInfo,r=e.reduce((s,o,n)=>Math.abs(o.offset-i)<Math.abs(e[s].offset-i)?n:s,0);return this.#e(r,t)}async#l(i){let t=++this._previewsLoadId;if(this._previewsLoadController?.abort(),this._previewsLoadController=void 0,this._previews?.close(),this._previews=void 0,this._previewsInfo=void 0,this._previewClip=void 0,this.previewVisible=!1,this.requestUpdate(),!i)return;let e=new AbortController;this._previewsLoadController=e;try{if(await C(()=>i.loaded,e.signal),t!==this._previewsLoadId||e.signal.aborted)return;let r=i.previewsInfo;if(!i.capabilities?.operations?.supportsPreviews||!r)return;let s={...r,count:r.count>0?r.count:r.thumbnailInfo.length>0?r.thumbnailInfo.length:r.numCols*r.numRows},o=this.#r(s.urlFragment,`${i.url}/${i.layerId}/`);await this.#o({previewsImageUrl:o,previewsInfo:s,loadId:t,signal:e.signal})}catch(r){if(t!==this._previewsLoadId||e.signal.aborted||u(r))return;f(r,this,"Failed to load the video previews")}finally{this._previewsLoadController===e&&(this._previewsLoadController=void 0)}}#i(){this.previewVisible=!1,this._previewClip=void 0}#p(i){if(!(i instanceof PointerEvent))return;let t=this.viewModel.duration;if(i.pointerType==="touch"||!this._previewsInfo||!this._previews||this._previewsInfo.numCols<=0||this._previewsInfo.numRows<=0||this._previewsInfo.width<=0||this._previewsInfo.height<=0||!Number.isFinite(t)||t<=0){this.previewVisible=!1;return}let e=i.currentTarget instanceof HTMLElement?i.currentTarget.getBoundingClientRect():null;if(!e||e.width<=0){this.previewVisible=!1;return}let r=Math.max(0,Math.min(e.width,i.clientX-e.left)),s=r/e.width*t*1e3,o=this.#n(s,t*1e3,this._previewsInfo);if(!o){this.previewVisible=!1;return}this._previewClip=o;let n=Math.min(this._previewsInfo.width,e.width),p=n/2;this.previewLeft=Math.max(p,Math.min(e.width-p,r)),this.previewWidth=n,this.previewTime=b(s/1e3),this.previewVisible=!0}#v(i){this._previewContainer=i??void 0}render(){return this._previewsInfo?w`<div class="video-preview-container" aria-hidden=true .hidden=${!this.previewVisible} style=${`left: ${this.previewLeft}px; width: ${this.previewWidth}px`}><canvas height=${this._previewsInfo.height??a} width=${this._previewsInfo.width??a} ${d(this.#v)}></canvas><span class="thumbnail-time">${this.previewTime}</span></div>`:null}};m("arcgis-video-player-previews",l);return l},"core/Error","core/Handles","core/reactiveUtils","request",b,e)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"./UYDXI4AK.js";import"./GFC6LS4L.js";import"./PYBUTNHM.js";import"./6KYZMT4A.js";import{W as o}from"./AMRGLUBB.js";import"./UDXDE3LW.js";import"./6SL7YNKF.js";import"./TAVTDQ6S.js";var t=["#2888B8","#EB7028","#48A375","#9370B1","#e55035","#3d9ccc","#DC7B04","#b87bb0","#3fa681","#EE6386"],c=t.map(r=>o(r));export{c as esriChartColorSet};
2
+ import"./JZYDXRQ6.js";import"./OYG42YJL.js";import"./OUFB4LJK.js";import"./7WUY57GO.js";import{W as o}from"./AKSCONMP.js";import"./NJ3CJS46.js";import"./NXC47WWQ.js";import"./TAVTDQ6S.js";var t=["#2888B8","#EB7028","#48A375","#9370B1","#e55035","#3d9ccc","#DC7B04","#b87bb0","#3fa681","#EE6386"],c=t.map(r=>o(r));export{c as esriChartColorSet};