@esri/solutions-components 5.1.0-next.153 → 5.1.0-next.155

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 (174) hide show
  1. package/dist/cdn/2C6OKRTL.js +2 -0
  2. package/dist/cdn/{4D4UXCEU.js → 2K4FSWCI.js} +1 -1
  3. package/dist/cdn/2L62YUIH.js +2 -0
  4. package/dist/cdn/2UIPY2ED.js +2 -0
  5. package/dist/cdn/{DN3PZCF4.js → 37SYO65U.js} +1 -1
  6. package/dist/cdn/{XK36P3C4.js → 3N4FGXFE.js} +1 -1
  7. package/dist/cdn/{2IGILR4T.js → 5KWJUQRY.js} +1 -1
  8. package/dist/cdn/66VSNZFA.js +2 -0
  9. package/dist/cdn/{GCEPKR7I.js → 6LDTUOZL.js} +1 -1
  10. package/dist/cdn/6OJALTOU.js +2 -0
  11. package/dist/cdn/6RNSFI2J.js +2 -0
  12. package/dist/cdn/{3JZVI5AM.js → 6RONZCGM.js} +1 -1
  13. package/dist/cdn/{DMM5WA5Q.js → 6Y47Z4QA.js} +1 -1
  14. package/dist/cdn/{UNBTFJYB.js → 7IXJB2CS.js} +1 -1
  15. package/dist/cdn/7JC52SFZ.js +2 -0
  16. package/dist/cdn/{IFONVCBL.js → 7LKPG6HJ.js} +1 -1
  17. package/dist/cdn/{VY5TD3VS.js → 7ZEDJMU7.js} +1 -1
  18. package/dist/cdn/{YXHO47AZ.js → 7ZJQQBSR.js} +1 -1
  19. package/dist/cdn/{PNESECPO.js → A6VVARNG.js} +1 -1
  20. package/dist/cdn/{JYUZPAPI.js → A7PEHKA2.js} +1 -1
  21. package/dist/cdn/{SYQ5E5TV.js → AKQEDHUS.js} +1 -1
  22. package/dist/cdn/{TOIBA2KF.js → ALQFRJNC.js} +1 -1
  23. package/dist/cdn/{FWRT4BPD.js → ARFCWGCB.js} +1 -1
  24. package/dist/cdn/{PPRV6EZZ.js → AVBZ2B75.js} +1 -1
  25. package/dist/cdn/{SZRVESYE.js → AXFB53AQ.js} +1 -1
  26. package/dist/cdn/{4ASIXXDP.js → AZDHGEBN.js} +1 -1
  27. package/dist/cdn/{JNE3LBQU.js → BFC6PQCO.js} +1 -1
  28. package/dist/cdn/BLR4MTOP.js +2 -0
  29. package/dist/cdn/{LHG6NOEP.js → BM4VSEDV.js} +1 -1
  30. package/dist/cdn/{DDJSF2M3.js → BWRBYYGI.js} +1 -1
  31. package/dist/cdn/C4F2OOUL.js +2 -0
  32. package/dist/cdn/C4T4HSG2.js +2 -0
  33. package/dist/cdn/C5KDPY7R.js +2 -0
  34. package/dist/cdn/{FZKGL66L.js → C76SZF3J.js} +1 -1
  35. package/dist/cdn/{TB33W36T.js → CEPWTLDN.js} +1 -1
  36. package/dist/cdn/{XO54BFTC.js → CFQKZMGC.js} +1 -1
  37. package/dist/cdn/CJ3EZE7U.js +2 -0
  38. package/dist/cdn/CPBEDBQJ.js +2 -0
  39. package/dist/cdn/{UWSHU7MG.js → CQQH3XK5.js} +1 -1
  40. package/dist/cdn/{WC37HMOI.js → CSAXBV46.js} +1 -1
  41. package/dist/cdn/{TLM7N22U.js → DF7TCZUS.js} +1 -1
  42. package/dist/cdn/{QFFHU77I.js → DMX66TUK.js} +1 -1
  43. package/dist/cdn/{NKX2EIDR.js → DOXKOGC2.js} +1 -1
  44. package/dist/cdn/{BJAEUZFB.js → EF4LWVLU.js} +1 -1
  45. package/dist/cdn/{IEC46RE7.js → EKFKOS5K.js} +1 -1
  46. package/dist/cdn/{ZCPVOS4Q.js → ENTBR5YC.js} +1 -1
  47. package/dist/cdn/EPKRNLRL.js +2 -0
  48. package/dist/cdn/{LGZDNUGT.js → FS5WR74E.js} +1 -1
  49. package/dist/cdn/{JOAEH3CI.js → G4ADX65Y.js} +1 -1
  50. package/dist/cdn/{NV2DLQDN.js → G5PL37M5.js} +1 -1
  51. package/dist/cdn/{RRD4QUQS.js → GBDBGOCT.js} +1 -1
  52. package/dist/cdn/{OAEWZFWV.js → GDX4FWG7.js} +1 -1
  53. package/dist/cdn/{GG4IIHQE.js → GFEDQ7WH.js} +1 -1
  54. package/dist/cdn/{G6EZOEPB.js → GJ7QMCFT.js} +1 -1
  55. package/dist/cdn/GXIGM56I.js +2 -0
  56. package/dist/cdn/{DD2Y5NOB.js → GYTMAAVH.js} +1 -1
  57. package/dist/cdn/HRH3YBW4.js +2 -0
  58. package/dist/cdn/{KV76ATT5.js → HS55CSUO.js} +1 -1
  59. package/dist/cdn/HVT2WBVC.js +2 -0
  60. package/dist/cdn/{QD22B6N2.js → I3A27HFS.js} +1 -1
  61. package/dist/cdn/IADXB53D.js +2 -0
  62. package/dist/cdn/{DXQQQNOF.js → IBAJ7OFO.js} +1 -1
  63. package/dist/cdn/{PX6AYCC4.js → IM3C52I6.js} +1 -1
  64. package/dist/cdn/{EVO7B63R.js → IR55PBAU.js} +1 -1
  65. package/dist/cdn/{JXTZNXTZ.js → IUNUJ6GU.js} +1 -1
  66. package/dist/cdn/{GMSG7ZRV.js → IZ7DJL5P.js} +1 -1
  67. package/dist/cdn/{FNTXI57U.js → IZDAQGZD.js} +1 -1
  68. package/dist/cdn/{UIGRRD7P.js → JET6MYZJ.js} +1 -1
  69. package/dist/cdn/{NYQQSL25.js → JM4BUUFY.js} +1 -1
  70. package/dist/cdn/JQANOMEB.js +2 -0
  71. package/dist/cdn/JTENM3PQ.js +2 -0
  72. package/dist/cdn/KGU32CDZ.js +2 -0
  73. package/dist/cdn/{EKUENEEW.js → L2XO4YLV.js} +1 -1
  74. package/dist/cdn/{LWT3JEQ6.js → LJIX7K76.js} +5 -5
  75. package/dist/cdn/{ZOF7AUSS.js → LOPXSWVG.js} +1 -1
  76. package/dist/cdn/M5ZEJF3J.js +2 -0
  77. package/dist/cdn/{WG5NM5XY.js → MDMFIEM7.js} +1 -1
  78. package/dist/cdn/MPSNK45A.js +2 -0
  79. package/dist/cdn/{XJAXXELZ.js → N2LDQKCJ.js} +1 -1
  80. package/dist/cdn/{L5YT5FRJ.js → O4YFJXGF.js} +1 -1
  81. package/dist/cdn/OOP3DI7Y.js +2 -0
  82. package/dist/cdn/ORMBTE2Z.js +2 -0
  83. package/dist/cdn/OUNL2UWX.js +7 -0
  84. package/dist/cdn/OVKPT3QA.js +2 -0
  85. package/dist/cdn/{RUVOSMTB.js → OZFVLORO.js} +1 -1
  86. package/dist/cdn/{SHEPQVUX.js → PCP5UFZR.js} +1 -1
  87. package/dist/cdn/{3CDO3ATJ.js → PJTHEJG4.js} +1 -1
  88. package/dist/cdn/PRM47E4O.js +2 -0
  89. package/dist/cdn/{ZCLYSOQM.js → Q7GMS6X2.js} +1 -1
  90. package/dist/cdn/{2HAYT46E.js → QA3SYWWX.js} +1 -1
  91. package/dist/cdn/{3S5PVZVU.js → QCCLUBLV.js} +1 -1
  92. package/dist/cdn/{3KYQE6O5.js → QCNGBMWJ.js} +1 -1
  93. package/dist/cdn/{X6JL6SAH.js → QLRGY4WQ.js} +1 -1
  94. package/dist/cdn/{D6VR7GCD.js → QSGVCMF2.js} +1 -1
  95. package/dist/cdn/{ZTRQVOAR.js → QX7YVGEN.js} +1 -1
  96. package/dist/cdn/{S4VDUHA7.js → RCOHFQC5.js} +1 -1
  97. package/dist/cdn/{U56TK45K.js → RFSPNC4B.js} +13 -13
  98. package/dist/cdn/RLV5JHIU.js +2 -0
  99. package/dist/cdn/RXOPHYUF.js +2 -0
  100. package/dist/cdn/{M73VTGBI.js → S2A7SDYB.js} +1 -1
  101. package/dist/cdn/{RYBSWXQQ.js → S2Y44VZV.js} +1 -1
  102. package/dist/cdn/{3ZYEIYTY.js → S6J35GRM.js} +1 -1
  103. package/dist/cdn/SIODWUWX.js +2 -0
  104. package/dist/cdn/{WZCJ2VDD.js → SNJPMQCE.js} +1 -1
  105. package/dist/cdn/{DUXRJBCP.js → SRLQU37I.js} +1 -1
  106. package/dist/cdn/TCUNTTNI.js +2 -0
  107. package/dist/cdn/{AOWNMC3W.js → TK235QG4.js} +1 -1
  108. package/dist/cdn/TM6TYAW2.js +90 -0
  109. package/dist/cdn/{ITSA4WXG.js → TRXDA7G2.js} +1 -1
  110. package/dist/cdn/U2ZKJCSY.js +27 -0
  111. package/dist/cdn/UBPOT5V3.js +2 -0
  112. package/dist/cdn/{QGDR24DC.js → UY66XIX3.js} +1 -1
  113. package/dist/cdn/{BAFYN4RD.js → V2DYKK6V.js} +1 -1
  114. package/dist/cdn/{QEPO225M.js → V6VJJHYJ.js} +1 -1
  115. package/dist/cdn/{YM2IDMZO.js → V73HMWMC.js} +1 -1
  116. package/dist/cdn/{7WIFBTQF.js → VCL4OTSQ.js} +6 -14
  117. package/dist/cdn/{Z23BVIGQ.js → VYCVNEK2.js} +1 -1
  118. package/dist/cdn/{2BM4W44V.js → WAJG744H.js} +1 -1
  119. package/dist/cdn/{CDJCXGBN.js → WFWEWVGR.js} +1 -1
  120. package/dist/cdn/WRLN7DLT.js +2 -0
  121. package/dist/cdn/X3CDW2ME.js +78 -0
  122. package/dist/cdn/{3TIQRBWC.js → XDONARND.js} +1 -1
  123. package/dist/cdn/{MGEDATQ7.js → XF5N3NI5.js} +1 -1
  124. package/dist/cdn/{63ZMLOEP.js → XKBOPER7.js} +1 -1
  125. package/dist/cdn/XOEFU24R.js +2 -0
  126. package/dist/cdn/{U6JZYJ4D.js → Y3Q6SFIV.js} +1 -1
  127. package/dist/cdn/Y6KZTCZD.js +2 -0
  128. package/dist/cdn/{WI67R264.js → YKSW755L.js} +1 -1
  129. package/dist/cdn/YM4U4HSN.js +2 -0
  130. package/dist/cdn/{OQOCOC5R.js → ZQAD6SUE.js} +1 -1
  131. package/dist/cdn/index.js +1 -1
  132. package/dist/chunks/assessBuildRequest.js +13 -13
  133. package/dist/chunks/assessUpdateRequest.js +29 -26
  134. package/dist/chunks/assistantResponse.js +6 -14
  135. package/dist/chunks/classifyIntent.js +5 -5
  136. package/dist/chunks/updateDesign.js +1 -1
  137. package/dist/components/arcgis-solutions-assistant/customElement.js +449 -446
  138. package/dist/docs/api.json +1 -1
  139. package/dist/docs/docs.json +1 -1
  140. package/dist/docs/web-types.json +1 -1
  141. package/dist/solutions-components_commit.txt +7 -7
  142. package/package.json +3 -3
  143. package/dist/cdn/4MAZNAHZ.js +0 -2
  144. package/dist/cdn/4RU3GWUU.js +0 -2
  145. package/dist/cdn/6IBUETLU.js +0 -2
  146. package/dist/cdn/6ZN2VAXG.js +0 -2
  147. package/dist/cdn/7CAFUU5D.js +0 -2
  148. package/dist/cdn/APL6U736.js +0 -2
  149. package/dist/cdn/BBECVTV3.js +0 -2
  150. package/dist/cdn/BG4LNU44.js +0 -2
  151. package/dist/cdn/BZLMMSFW.js +0 -2
  152. package/dist/cdn/CUOHPTI7.js +0 -2
  153. package/dist/cdn/CVHXDPJO.js +0 -2
  154. package/dist/cdn/DVWIWECZ.js +0 -27
  155. package/dist/cdn/F2V6IA23.js +0 -2
  156. package/dist/cdn/GWJRCE5C.js +0 -90
  157. package/dist/cdn/JGMNZLH4.js +0 -7
  158. package/dist/cdn/JMYENPUQ.js +0 -2
  159. package/dist/cdn/LBY3ZNJE.js +0 -2
  160. package/dist/cdn/LZDMYPQ2.js +0 -75
  161. package/dist/cdn/PYBOC3DB.js +0 -2
  162. package/dist/cdn/RMEDO4JC.js +0 -2
  163. package/dist/cdn/SO27FVOH.js +0 -2
  164. package/dist/cdn/SWM5KEF6.js +0 -2
  165. package/dist/cdn/TDH6R4JP.js +0 -2
  166. package/dist/cdn/TWJSFINX.js +0 -2
  167. package/dist/cdn/UQDRAXO2.js +0 -2
  168. package/dist/cdn/UQN2JCKP.js +0 -2
  169. package/dist/cdn/WDRZR4N3.js +0 -2
  170. package/dist/cdn/WW6SEFWM.js +0 -2
  171. package/dist/cdn/XDF5MAGN.js +0 -2
  172. package/dist/cdn/Y7F2QFO6.js +0 -2
  173. package/dist/cdn/YCJJWOTP.js +0 -2
  174. package/dist/cdn/ZWKTEPK3.js +0 -2
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as y}from"./C5KDPY7R.js";import{a as r,c as s,d as c}from"./YM4U4HSN.js";var a={PREDOMINANCE:"predominance",CLASS_BREAKS_SIZE:"class-breaks-size",CLASS_BREAKS_COLOR:"class-breaks-color",RELATIONSHIP:"relationship",DOT_DENSITY:"dot-density"},I="feature";function Z(e,n,i){let o=p(e,n,i),t=y(e?.layer,o.field);return P(o,t)?!1:N(o)}function p(e,n,i){let o=e?.layer,t=e?.layerView,l=o?.renderer?.field,u=t?.layer?.renderer?.classBreakInfos,E=!!(t&&u&&u.length>1);return{activeLayerInfo:e,legendElement:n,legendElementIndex:i,field:l,authoringInfoType:t?.layer?.renderer?.authoringInfo?.type,isFeatureLayer:e?.layer?.type===I,isSizeRamp:n?.type===r.SIZE_RAMP,isColorRamp:n?.type===r.COLOR_RAMP,hasMoreThanOneClassBreak:E,classBreakInfos:u}}function m(e){let n=e.legendElementIndex;return!!(e.activeLayerInfo?.layer?.featureReduction&&n!==void 0&&e.activeLayerInfo?.legendElements?.[n]?.type===r.SIZE_RAMP)}function R(e){return!e?.legendElements.every(n=>n.type!==r.COLOR_RAMP)}function S(e){return!e?.legendElements.every(n=>n.type!==r.SIZE_RAMP)}function f(e){return e?.type===r.SYMBOL_TABLE}function d(e){return f(e.legendElement)&&e.legendElement?.infos?.length===1}function g(e){return!!(e.activeLayerInfo?.layerView?.layer?.renderer?.uniqueValueInfos&&e.field)}function L(e){return e.authoringInfoType===a.PREDOMINANCE}function A(e){return e.authoringInfoType===a.CLASS_BREAKS_SIZE&&!!e.field}function O(e){return e.authoringInfoType===a.CLASS_BREAKS_COLOR&&!!e.field}function _(e){return e.authoringInfoType===a.RELATIONSHIP&&e.legendElement?.type!==r.SIZE_RAMP&&!f(e.legendElement)}function h(e){return e.authoringInfoType===a.DOT_DENSITY}function C(e){let n=e.activeLayerInfo?.legendElements;return f(n?.[0])&&n?.[1]?.type===r.COLOR_RAMP}function T(e){return!!e.legendElement?.infos?.every(n=>typeof n.value=="number")}function v(e){return d(e)&&R(e.activeLayerInfo)}function B(e){return d(e)&&S(e.activeLayerInfo)}function M(e){return e.legendElement?.infos?.length===1&&!e.field&&e.field!==null}function P(e,n){return!e.isFeatureLayer||m(e)||c(e.legendElement)||s(e.legendElement)||v(e)||B(e)||T(e)||C(e)||h(e)||!n}function N(e){let{field:n,isColorRamp:i,isSizeRamp:o,hasMoreThanOneClassBreak:t,classBreakInfos:l}=e;return!!n&&!i&&!o&&(l?t:!t)||L(e)&&!e.isSizeRamp||O(e)||A(e)||M(e)||_(e)||g(e)}export{Z as a,f as b};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import x from"./S2Y44VZV.js";import"./DF7TCZUS.js";import"./X65HFYH4.js";import u from"./3N4FGXFE.js";import t from"./RCOHFQC5.js";import s from"./GDX4FWG7.js";import q from"./WUEJANIZ.js";import n from"./C76SZF3J.js";import m from"./IZ7DJL5P.js";import l from"./V2DYKK6V.js";import k from"./5MPDXVRM.js";import j from"./37SYO65U.js";import i from"./ARFCWGCB.js";import h from"./WFWEWVGR.js";import"./HYQVSB6C.js";import g from"./N2LDQKCJ.js";import"./A6VVARNG.js";import e from"./GJ7QMCFT.js";import"./ONARC6AZ.js";import{a as $}from"./7VD3Y4IF.js";import"./NQH7ZZWD.js";import"./S37TPZAO.js";import"./SJ7HTNAT.js";import d from"./FS5WR74E.js";import b from"./UBEU6ULP.js";import{a as S,b as D,c as A}from"./2B4SGB3I.js";import{a as p}from"./I2NTSKBD.js";import"./AE5HNAOV.js";import{a as C}from"./XF5N3NI5.js";import"./UBPOT5V3.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as w}from"./2I5LGZNX.js";import{E as o,F as a,G as f,I as _,K as T,h as v,i as r,q as c}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,,,{m:x},{c:I,j:O,n:F,o:L,r:h},,{b:k},{a:M},,,{g:P,h:B},,,,m,R,,{a:y}])=>{var N=v`.back-color-override{background-color:var(--calcite-color-surface-3);--calcite-tab-border-color: var(--calcite-color-surface-4)}:host{--panel-edge-adjustment: 2vw;--assistant-panel-min-width: 420px;--assistant-panel-width: max(var(--assistant-panel-min-width), calc((96vw - 1440px) / 2 + var(--panel-edge-adjustment) - 15px))}.display-none{display:none!important}.height-100{height:100%}calcite-tab-nav{padding-bottom:6px;padding-top:6px}calcite-tab{--calcite-color-focus: transparent}calcite-tab>*{--calcite-color-focus: initial}calcite-tabs{--calcite-tab-border-color: var(--calcite-color-border-2);flex:1;min-height:0}.tab-space-0{--calcite-tab-content-space-y: var(--calcite-spacing-none)}.tab-space-md{--calcite-tab-content-space-y: var(--calcite-spacing-md)}solutions-searchsort-toolbar,solutions-deploy-app-nav,solution-details-panel,solutions-deployed-shell,solutions-all-shell,solutions-resources-shell,calcite-tab-nav,solution-deployed-card-panel,.resources-menu-container{width:1440px;display:block;max-width:96vw;padding-right:var(--calcite-spacing-none);padding-left:var(--calcite-spacing-none);margin-left:auto;margin-right:auto;box-sizing:border-box}.resources-menu-container{background-color:var(--calcite-color-foreground-1)}.resources-menu-toolbar{height:65px;display:flex;align-items:center}.resources-menu-toolbar calcite-menu-item{transition:border-color .2s ease}.resources-menu-toolbar calcite-menu-item[active]{border-bottom-color:var(--calcite-color-brand)}.border{height:var(--calcite-spacing-px);border-bottom-color:var(--calcite-color-border-2);border-bottom-style:solid;border-bottom-width:var(--calcite-border-width-sm);box-sizing:border-box}.overflow-auto{overflow:auto}solution-details-panel{scroll-margin-top:3rem}.main-content{container-type:inline-size;display:flex;flex-direction:column;height:100%;overflow:hidden}.main-content.assistant-open{margin-inline-end:var(--assistant-panel-width)}.assistant-open solutions-searchsort-toolbar,.assistant-open solution-details-panel,.assistant-open solutions-deployed-shell,.assistant-open solutions-all-shell,.assistant-open solutions-resources-shell,.assistant-open calcite-tab-nav,.assistant-open solution-deployed-card-panel,.assistant-open .resources-menu-container{margin-inline-start:max(var(--panel-edge-adjustment),calc((96vw - 1440px) / 2 + var(--panel-edge-adjustment)));margin-inline-end:0;width:auto;max-width:1440px}.builder-panel{position:fixed;top:65px;inset-inline-start:max(var(--panel-edge-adjustment),calc((96vw - 1440px) / 2 + var(--panel-edge-adjustment)));inset-inline-end:var(--assistant-panel-width);bottom:0;z-index:400;display:flex;flex-direction:column;transition:transform .3s cubic-bezier(.4,0,.2,1);pointer-events:auto}.builder-panel.display-none{display:flex!important;transform:translate(100%);pointer-events:none}.builder-panel:dir(rtl).display-none{transform:translate(-100%)}@supports (-webkit-touch-callout: none){.builder-panel.display-none{display:none!important;transform:none}.builder-panel:dir(rtl).display-none{transform:none}}.builder-panel.display-none:has(~.assistant-panel.display-none){display:none!important;transition:none}.assistant-panel{position:fixed;top:65px;inset-inline-end:0;bottom:0;width:var(--assistant-panel-width);min-width:var(--assistant-panel-min-width);z-index:400;display:flex;flex-direction:column}@media(max-width:800px){.builder-panel{display:none!important}.assistant-panel{width:100%;box-shadow:none}.main-content.assistant-open{margin-inline-end:0}}.assistant-fab{position:fixed;bottom:var(--calcite-spacing-xxl);inset-inline-end:var(--calcite-spacing-xxl);z-index:500}calcite-tooltip{--calcite-tooltip-max-size-x: 16rem}.assistant-fab-popover{--calcite-popover-max-size-x: 16rem}.assistant-fab-popover__content{display:block;padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-md);font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word}`,V={solution:{title:"Bus Stop ADA Compliance Inspections",description:"Bus Stop ADA Compliance Inspections can be used to perform routine inspections of bus stops for ADA compliance and monitor inspection progress.",thumbnailUrl:M,tags:["Bus Stop","ADA Compliance","Inspection","Field","Monitor","ArcGIS Solutions"],strings:[{key:"inspectionsByMonth",value:"Inspections by Month",description:"Descriptive title of dashboard chart displaying the number of inspections completed by month."},{key:"inspectionsCompleted",value:"Inspections Completed",description:"Descriptive title of dashboard indicator displaying the total number of inspections completed."},{key:"assetInventory",value:"Bus Stop Inventory",description:"Descriptive title of dashboard indicator displaying the total number of bus stops."}]},items:[{id:"b21885d38b3c4924922ce36c90112737",title:"Bus Stop ADA Inspection Dashboard",description:"An ArcGIS Dashboards app used to monitor bus stop ADA compliance inspections.",type:"Dashboard"},{id:"54f69b6af00b4f06b1c1eef05e80dc93",title:"Bus Stop ADA Inspection Map",description:"A map used by the Bus Stop ADA Inspection Dashboard app to monitor inspections.",type:"Web Map"},{id:"2fc93fa4e07e42508669d02acb837a75",title:"Bus Stop ADA Inspection Field Map",description:"A map used in ArcGIS Field Maps to inspect bus stops in the field for ADA compliance.",type:"Web Map"},{id:"0bd4ecf9c95e4dcd8ff1744adc12f323",title:"BusStops_field",description:"A hosted feature layer view used to inspect bus stops for ADA compliance.",type:"Feature Layer (hosted, view)"},{id:"0bd4ecf9c95e4dcd8ff1744adc12f324",title:"BusStops_dashboard",description:"A hosted feature layer view used to monitor bus stop ADA inspections.",type:"Feature Layer (hosted, view)"},{id:"36d0bdce3a74436f8314c88c9667003e",title:"BusStops",description:"A hosted feature layer used to store bus stop and ADA inspection details.",type:"Feature Layer (hosted)"}],featureLayer:{itemId:"36d0bdce3a74436f8314c88c9667003e",addLayers:!0,layers:[{id:"0",type:"Point",typeMutable:!0,name:"BusStops",description:"Point layer containing bus stop locations and ADA compliance information.",customFields:[{name:"stop_id",type:"string",alias:"Stop ID",description:"Identifier for the bus stop.",choiceList:null,length:255},{name:"location_description",type:"string",alias:"Location Description",description:"Description of the bus stop location.",choiceList:null,length:255},{name:"shelter_present",type:"string",alias:"Shelter Present",description:"Indicates if a waiting shelter is present at the bus stop.",choiceList:["Yes","No"],length:5},{name:"bench_present",type:"string",alias:"Bench Present",description:"Indicates if a bench is present at the bus stop.",choiceList:["Yes","No"],length:5},{name:"ada_compliant",type:"string",alias:"ADA Compliant",description:"Indicates if the bus stop meets ADA compliance requirements.",choiceList:["Yes","No"],length:5},{name:"capacity",type:"integer",alias:"Seating Capacity",description:"Number of people that can be seated at the bus stop."},{name:"distance_from_curb",type:"double",alias:"Distance from Curb (ft)",description:"Distance in feet from the curb to the shelter."},{name:"last_inspection_date",type:"date",alias:"Last Inspection Date",description:"Date of the most recent inspection."},{name:"installation_date",type:"date",alias:"Installation Date",description:"Date when the bus stop was installed."}],requiredFields:[{name:"route_number",type:"string",alias:"Route Number",description:"Number of the bus route that uses this stop.",choiceList:null,length:50},{name:"average_daily_riders",type:"integer",alias:"Average Daily Riders",description:"Average number of riders using this stop per day."},{name:"inspection_priority",type:"string",alias:"Inspection Priority",description:"Priority level for scheduling inspections.",choiceList:["High","Medium","Low"],length:10}],systemFields:[{name:"objectid",type:"oid",alias:"ObjectID",description:"Unique identifier for each record in the dataset."},{name:"globalid",type:"globalid",alias:"GlobalID",description:"Globally unique identifier for the record."},{name:"created_date",type:"date",alias:"Created On",description:"Date when the record was created."},{name:"created_user",type:"string",alias:"Created By",description:"User who created the record."},{name:"last_edited_date",type:"date",alias:"Last Edited On",description:"Date when the record was last edited."},{name:"last_edited_user",type:"string",alias:"Last Edited By",description:"User who last edited the record."}]},{id:"1",type:"Polyline",typeMutable:!1,name:"Routes",description:"Polyline layer containing bus route paths.",customFields:[{name:"route_name",type:"string",alias:"Route Name",description:"Name of the bus route.",choiceList:null,length:100},{name:"route_type",type:"string",alias:"Route Type",description:"Type of bus route service.",choiceList:["Express","Local","Rapid"],length:20},{name:"frequency_minutes",type:"integer",alias:"Frequency (minutes)",description:"How often buses run on this route in minutes."},{name:"route_length_miles",type:"double",alias:"Route Length (miles)",description:"Total length of the route in miles."}],requiredFields:[{name:"route_id",type:"string",alias:"Route ID",description:"Unique identifier for the route.",choiceList:null,length:50},{name:"active",type:"string",alias:"Active Status",description:"Whether the route is currently active.",choiceList:["Yes","No"],length:3}],systemFields:[{name:"objectid",type:"oid",alias:"ObjectID",description:"Unique identifier for each record in the dataset."},{name:"globalid",type:"globalid",alias:"GlobalID",description:"Globally unique identifier for the record."},{name:"created_date",type:"date",alias:"Created On",description:"Date when the record was created."},{name:"created_user",type:"string",alias:"Created By",description:"User who created the record."},{name:"last_edited_date",type:"date",alias:"Last Edited On",description:"Date when the record was last edited."},{name:"last_edited_user",type:"string",alias:"Last Edited By",description:"User who last edited the record."}]},{id:"2",type:"Polygon",typeMutable:!1,name:"ServiceAreas",description:"Polygon layer defining bus service coverage areas.",customFields:[{name:"area_name",type:"string",alias:"Area Name",description:"Name of the service area.",choiceList:null,length:100},{name:"service_level",type:"string",alias:"Service Level",description:"Level of service provided in this area.",choiceList:["High Frequency","Standard","Limited"],length:20},{name:"population",type:"integer",alias:"Population",description:"Estimated population within the service area."},{name:"area_sq_miles",type:"double",alias:"Area (sq miles)",description:"Size of the service area in square miles."}],requiredFields:[{name:"district_id",type:"string",alias:"District ID",description:"Unique identifier for the service district.",choiceList:null,length:50}],systemFields:[{name:"objectid",type:"oid",alias:"ObjectID",description:"Unique identifier for each record in the dataset."},{name:"globalid",type:"globalid",alias:"GlobalID",description:"Globally unique identifier for the record."},{name:"created_date",type:"date",alias:"Created On",description:"Date when the record was created."},{name:"created_user",type:"string",alias:"Created By",description:"User who created the record."},{name:"last_edited_date",type:"date",alias:"Last Edited On",description:"Date when the record was last edited."},{name:"last_edited_user",type:"string",alias:"Last Edited By",description:"User who last edited the record."}]},{id:"3",type:"Point",typeMutable:!1,name:"Tasks",description:"Point layer containing task assignments for bus stop inspections, related to BusStops layer.",customFields:[{name:"task_id",type:"string",alias:"Task ID",description:"Unique identifier for the task assignment.",choiceList:null,length:50},{name:"stop_id",type:"string",alias:"Bus Stop ID",description:"ID of the bus stop to be inspected (relates to BusStops layer).",choiceList:null,length:255},{name:"assigned_to",type:"string",alias:"Assigned To",description:"Name of the inspector assigned to this task.",choiceList:null,length:100},{name:"due_date",type:"date",alias:"Due Date",description:"Date by which the inspection should be completed."},{name:"priority",type:"string",alias:"Priority",description:"Priority level of the inspection task.",choiceList:["High","Medium","Low"],length:10},{name:"notes",type:"string",alias:"Task Notes",description:"Additional notes or instructions for the inspection task.",choiceList:null,length:500}],requiredFields:[{name:"status",type:"string",alias:"Task Status",description:"Current status of the task assignment.",choiceList:["Not Started","In Progress","Completed","Cancelled"],length:20},{name:"assignment_date",type:"date",alias:"Assignment Date",description:"Date when the task was created and assigned."}],systemFields:[{name:"objectid",type:"oid",alias:"ObjectID",description:"Unique identifier for each record in the dataset."},{name:"globalid",type:"globalid",alias:"GlobalID",description:"Globally unique identifier for the record."},{name:"created_date",type:"date",alias:"Created On",description:"Date when the record was created."},{name:"created_user",type:"string",alias:"Created By",description:"User who created the record."},{name:"last_edited_date",type:"date",alias:"Last Edited On",description:"Date when the record was last edited."},{name:"last_edited_user",type:"string",alias:"Last Edited By",description:"User who last edited the record."}]},{id:"4",typeMutable:!1,type:"Table",name:"Inspections",description:"Table containing inspection records and findings.",customFields:[{name:"inspection_id",type:"string",alias:"Inspection ID",description:"Unique identifier for the inspection.",choiceList:null,length:50},{name:"stop_id",type:"string",alias:"Bus Stop ID",description:"ID of the bus stop that was inspected.",choiceList:null,length:255},{name:"inspector_name",type:"string",alias:"Inspector Name",description:"Name of the person who performed the inspection.",choiceList:null,length:100},{name:"inspection_date",type:"date",alias:"Inspection Date",description:"Date when the inspection was performed."},{name:"overall_condition",type:"string",alias:"Overall Condition",description:"Overall condition assessment of the bus stop.",choiceList:["Excellent","Good","Fair","Poor","Critical"],length:20},{name:"issues_found",type:"integer",alias:"Issues Found",description:"Number of issues identified during inspection."},{name:"notes",type:"string",alias:"Inspection Notes",description:"Additional notes or comments about the inspection.",choiceList:null,length:1e3}],requiredFields:[{name:"inspection_status",type:"string",alias:"Inspection Status",description:"Current status of the inspection.",choiceList:["Scheduled","In Progress","Completed","Cancelled"],length:20}],systemFields:[{name:"objectid",type:"oid",alias:"ObjectID",description:"Unique identifier for each record in the dataset."},{name:"globalid",type:"globalid",alias:"GlobalID",description:"Globally unique identifier for the record."},{name:"created_date",type:"date",alias:"Created On",description:"Date when the record was created."},{name:"created_user",type:"string",alias:"Created By",description:"User who created the record."},{name:"last_edited_date",type:"date",alias:"Last Edited On",description:"Date when the record was last edited."},{name:"last_edited_user",type:"string",alias:"Last Edited By",description:"User who last edited the record."}]}]}},g=class extends f{constructor(){super(),this.initTitleOrId="",this.sortType="relevance",this.useLocalAppConfig=!1,this.loadExampleBuilderData=!1,this.authentication=void 0,this._isLoaded=!1,this.isMobile=!1,this._isViewportMobile=window.innerWidth<=800,this._isAssistantOpen=!1,this._builderVisible=!1,this._hasActiveBuilderDesign=!1,this._showFabTooltip=!0,this._fabTooltipDismissed=!1,this._activeTab="all-solutions",this._activeResourcesMenuItem="getStarted",this._showDeployedCardFetchFailed=!1,this._globalAlerts=[],this._translations=C({name:"solutions-deploy-app",blocking:!0}),this._agoTerms=`${L}`,this._allCards=[],this._allShell=o(),this._allTab=o(),this._allTabTitle=o(),this._resourcesTab=o(),this._resourcesTabTitle=o(),this._categories=[],this._configContextProvider=p({context:D}),this._delay=!1,this._deployAppNav=o(),this._deployedCardPanel=o(),this._deployCardFetchFailedMessage="",this._deployedCardTab=o(),this._deployedCardTabTitle=o(),this._detailsShell=o(),this._detailsTab=o(),this._detailsTabTitle=o(),this._forceInit=!1,this._getSuggested=!1,this._tabpanelsFixed=!1,this._solutionBuilderPanel=o(),this._builderDesignContextProvider=p({context:A}),this._isMobileContextProvider=p({context:S}),this._handleWindowResize=()=>{let t=window.innerWidth<=800;this._isViewportMobile!==t&&(this._isViewportMobile=t,t&&(this._isAssistantOpen=!1,this._builderVisible=!1))},this._mainContentRef=o(),this._mySolutionsShell=o(),this._mySolutionsTab=o(),this._mySolutionsTabTitle=o(),this._resourcesShell=o(),this._sortField="relevance",this._sortOrder="desc",this._telemetryManager=new y,this.deployAppTabSelected=c(),this.deployedCardFetchFailed=c(),this.detailsCardSelected=c(),this.deployedCardSelected=c(),this.metaTagStringsReady=c(),this.sessionRefreshed=c(),this.tabChanged=c(),this.listenOn(window,"detailsCardSelected",this._detailsCardSelected),this.listenOn(window,"deployedCardSelected",this._deployedCardSelected),this.listenOn(window,"displayDeployedCard",this._handleDeployedCardDisplay),this.listenOn(window,"navTabSelected",this._setActiveTab),this.listenOn(window,"forceSelectTab",t=>this.selectTab(t.detail,{})),this.listenOn(window,"showGlobalAlert",this._handleShowGlobalAlert),this.listenOn(window,"openAssistant",()=>{this._openAssistant()}),this.listenOn(window,"closeAssistant",()=>{this._isAssistantOpen=!1,this._builderVisible=!1}),this.listenOn(window,"toggleSolutionBuilder",()=>{this._builderVisible=!this._builderVisible}),this.listenOn(window,"hideSolutionBuilder",()=>{this._builderVisible=!1}),this.listenOn(window,"discardBuilder",t=>{this._hasActiveBuilderDesign=t.detail}),this.listenOn(window,"arcgis-solution-design-update",this._solutionBuilderSelected),window.addEventListener("resize",this._handleWindowResize),this._builderDesignContextProvider.value={design:this.loadExampleBuilderData?V:null,updateDesign:t=>{this._builderDesignContextProvider.value={...this._builderDesignContextProvider.value,design:t}},isBuilderVisible:!1,setBuilderVisible:t=>{this._builderVisible=t,this._builderDesignContextProvider.value={...this._builderDesignContextProvider.value,isBuilderVisible:t}}},this.loadExampleBuilderData&&(this._hasActiveBuilderDesign=!0)}static{this.properties={appConfig:1,initTab:1,initTitleOrId:1,sortType:1,useLocalAppConfig:5,loadExampleBuilderData:5,authentication:16,_isLoaded:16,isMobile:16,_isViewportMobile:16,_isAssistantOpen:16,_builderVisible:16,_hasActiveBuilderDesign:16,_showFabTooltip:16,_fabTooltipDismissed:16,_activeTab:16,_activeResourcesMenuItem:16,_showDeployedCardFetchFailed:16,_globalAlerts:16,_translations:16}}static{this.styles=N}get _telemetry(){return this._configContextProvider.value?.telemetrySession}get _isDisconnectedEnvironment(){return this._configContextProvider.value?.isEnterprise===!0&&this._configContextProvider.value?.authentication?.CanSearchArcGISOnline===!1}get _readOnlyNotice(){return this._configContextProvider.value?.isEnterprise?this._translations.writableEnterprise||"":(this._translations.writableOnline||"").replace("{{url}}","https://status.arcgis.com/")}_openAssistant(){this._telemetry?.logEvent({category:h.ASSISTANT,action:"Open"}),this._isAssistantOpen=!0}async selectTab(t,e){if(this._isLoaded||this._forceInit){let i=this._getDefaultSearchOptions(e);switch(this._searchSortToolbar&&(this._searchSortToolbar.scope=t.tabType),t.tabType){case"all-solutions":this._allTab.value.selected=!0,this._allTabTitle.value.selected=!0,i&&await this._allShell.value?.searchSolutions(i);break;case"resources":this._resourcesTab.value.selected=!0,this._resourcesTabTitle.value.selected=!0;break;case"deployed-card":if(this.authentication?.IsSignedIn){if(this._forceInit=!0,this._isLoaded=!1,this._cardFetcherDeployed&&await this._getDeployedSolution(t.tabTitleOrId),this._deployedSolutions?.cards?.length>0){let s;this._deployedSolutions.cards.some(l=>l.id===t.tabTitleOrId?(s=l,this.deployedCardSelected.emit({card:s}),!0):!1),this._isLoaded=!0,this._forceInit=!1}else return this._isLoaded=!0,this._forceInit=!1,this.selectTab({tabTitleOrId:"",tabType:"deployments"},e);break}else await this.authentication?.signIn();case"details":if(this._allCards){let s=P(this._allCards,t.tabTitleOrId);s=s||B(this._allCards,t.tabTitleOrId),s?(this._detailsTab.value.selected=!0,this._detailsTabTitle.value.selected=!0,this.detailsCardSelected.emit(s)):(t.tabType="all-solutions",this._allTab.value.selected=!0,this._allTabTitle.value.selected=!0)}break;case"deployments":this._mySolutionsTab.value.selected=!0,this._mySolutionsTabTitle.value.selected=!0,this._searchSortToolbar&&i?.filter&&this._searchSortToolbar.changeOwnerFilter(i.filter!=="Organization"),i&&await this._mySolutionsShell.value?.searchSolutions(i);break}return this._builderVisible=!1,this._setActiveTab(new CustomEvent("setActiveTab",{detail:t})),this._blurTabs(),this._showDeployedCardFetchFailed&&(this.deployedCardFetchFailed.emit({message:this._deployCardFetchFailedMessage,title:this._translations.failedToOpen}),this._showDeployedCardFetchFailed=!1),!0}else return this._initTab=t,this._initFilters=e,!1}updated(t){this._fixTabpanelFocus(),t.has("_isAssistantOpen")&&this._setScrollbarGutters(this._isAssistantOpen?"stable":"stable both-edges"),!this._resizeObserver&&this._mainContentRef.value&&(this._resizeObserver=new ResizeObserver(e=>{for(let i of e){let s=i.contentRect.width<=800;this.isMobile!==s&&(this.isMobile=s,this._isMobileContextProvider.setValue(s))}}),this._resizeObserver.observe(this._mainContentRef.value))}_fixTabpanelFocus(){if(!this._tabpanelsFixed&&this._allTab.value){let t=[this._allTab,this._mySolutionsTab,this._resourcesTab,this._detailsTab,this._deployedCardTab];Promise.all(t.map(async e=>{let i=e.value;if(i&&(await i.componentOnReady?.(),i.shadowRoot)){let s=i.shadowRoot.querySelector('[role="tabpanel"]');s&&(s.tabIndex=-1)}})).then(()=>{this._tabpanelsFixed=!0,this._setupTabpanelObserver()}).catch(()=>{this._tabpanelsFixed=!0})}}_setupTabpanelObserver(){this._tabpanelObserver||(this._tabpanelObserver=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="attributes"&&e.attributeName==="tabindex"){let i=e.target;i.getAttribute("role")==="tabpanel"&&i.tabIndex===0&&(i.tabIndex=-1)}})}),[this._allTab,this._mySolutionsTab,this._resourcesTab,this._detailsTab,this._deployedCardTab].forEach(t=>{let e=t.value;if(e?.shadowRoot){let i=e.shadowRoot.querySelector('[role="tabpanel"]');i&&this._tabpanelObserver.observe(i,{attributes:!0,attributeFilter:["tabindex"]})}}))}async load(){this.useLocalAppConfig&&(this.appConfig=k)}render(){let t=this._isLoaded?"display-none":"",e=this._isLoaded?"":"display-none";return r`<calcite-shell><solutions-deploy-app-nav .appConfig=${this.appConfig} .assistantOpen=${this._isAssistantOpen} .initTab=${this.initTab} @authInit=${this._handleAuthInit} slot=header ${a(this._deployAppNav)}></solutions-deploy-app-nav><div class=${`main-content${this._isAssistantOpen?" assistant-open":""}`} ${a(this._mainContentRef)}>${this._isSearchToolbarShowing()&&r`<div class="border"></div>`||""}${this._activeTab!=="resources"&&r`<solutions-searchsort-toolbar ${a(async i=>{i&&(await this._deployAppNav.value?.componentOnReady(),this._searchSortToolbar=i)})}></solutions-searchsort-toolbar>`||""}${this._activeTab==="resources"&&r`<div class="border"></div><div class="resources-menu-container"><calcite-menu label="Resources Navigation" class="resources-menu-toolbar"><calcite-menu-item .active=${this._activeResourcesMenuItem==="getStarted"||void 0} label="Get Started" text="Get Started" @click=${()=>this._handleResourcesMenuClick("getStarted")}></calcite-menu-item><calcite-menu-item .active=${this._activeResourcesMenuItem==="documentation"||void 0} label=Documentation text=Documentation @click=${()=>this._handleResourcesMenuClick("documentation")}></calcite-menu-item><calcite-menu-item .active=${this._activeResourcesMenuItem==="support"||void 0} label=Support text=Support @click=${()=>this._handleResourcesMenuClick("support")}></calcite-menu-item></calcite-menu></div>`||""}<calcite-loader class=${_(t)} id=solutions-loader .label=${this._translations.fetchingAllSolutions}></calcite-loader>${this._renderGlobalAlerts()}<calcite-tabs class=${_(e)} scale=l><calcite-tab-nav class="display-none" @calciteTabChange=${this._handleCalciteTabChanged} slot=title-group><calcite-tab-title ${a(this._allTabTitle)}>${this._translations.allSolutions}</calcite-tab-title><calcite-tab-title ${a(this._mySolutionsTabTitle)}>${this._translations.mySolutions}</calcite-tab-title><calcite-tab-title ${a(this._resourcesTabTitle)}>${this._translations.solutionResources}</calcite-tab-title><calcite-tab-title class="display-none" ${a(this._detailsTabTitle)}></calcite-tab-title><calcite-tab-title class="display-none" ${a(this._deployedCardTabTitle)}></calcite-tab-title></calcite-tab-nav><calcite-tab class="back-color-override tab-space-0" selected ${a(this._allTab)}><solutions-all-shell class="height-100" ${a(this._allShell)}></solutions-all-shell></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${a(this._mySolutionsTab)}><solutions-deployed-shell class="height-100" ${a(this._mySolutionsShell)}></solutions-deployed-shell></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${a(this._resourcesTab)}><solutions-resources-shell class="height-100" ${a(this._resourcesShell)}></solutions-resources-shell></calcite-tab><calcite-tab class="back-color-override" ${a(this._detailsTab)}><solution-details-panel class="height-100" .readOnlyNotice=${this._readOnlyNotice} ${a(this._detailsShell)}></solution-details-panel></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${a(this._deployedCardTab)}><solution-deployed-card-panel class="shell-container height-100" .readOnlyNotice=${this._readOnlyNotice} ${a(this._deployedCardPanel)}></solution-deployed-card-panel></calcite-tab></calcite-tabs></div>${!this._configContextProvider.value?.isEnterprise&&r`<div class=${`builder-panel${this._builderVisible&&!this._isViewportMobile?"":" display-none"}`}><solution-builder-assistant class="height-100" .readOnlyNotice=${this._readOnlyNotice} ${a(this._solutionBuilderPanel)}></solution-builder-assistant></div><div class=${`assistant-panel${this._isAssistantOpen&&!this._isViewportMobile?"":" display-none"}`}><arcgis-solutions-assistant class="height-100" .builderVisible=${this._builderVisible} .hasActiveBuilderDesign=${this._hasActiveBuilderDesign}></arcgis-solutions-assistant></div><calcite-fab aria-label=${this._translations.assistantFabTooltip??T} class=${`assistant-fab${this._isAssistantOpen||this._isViewportMobile?" display-none":""}`} icon=effects id=assistant-fab-button @click=${()=>{this._openAssistant(),this._fabTooltipDismissed=!0,this._showFabTooltip=!1}} scale=l></calcite-fab>${!this._fabTooltipDismissed&&r`<calcite-popover closable class=${`assistant-fab-popover${this._isAssistantOpen||this._isViewportMobile?" display-none":""}`} .label=${this._translations.assistantFabTooltip} overlay-positioning=fixed @calcitePopoverClose=${()=>{this._fabTooltipDismissed=!0,this._showFabTooltip=!1}} .open=${this._showFabTooltip&&!this._isAssistantOpen&&!this._isViewportMobile} placement=leading reference-element=assistant-fab-button><span class="assistant-fab-popover__content">${this._translations.assistantFabTooltip}</span></calcite-popover>`||""}`||""}</calcite-shell>`}loaded(){this._setScrollbarGutters()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._handleWindowResize),this._resizeObserver?.disconnect(),this._tabpanelObserver?.disconnect()}async _handleResourcesMenuClick(t){this._activeResourcesMenuItem=t,await this._resourcesShell.value?.scrollToSection(t)}_renderGlobalAlerts(){return $(this._globalAlerts,t=>t.id,t=>r`<calcite-alert .autoClose=${t.autoClose} .autoCloseDuration=${t.autoCloseDuration} .icon=${t.icon} .kind=${t.kind} .label=${t.title||""} @calciteAlertClose=${()=>this._removeGlobalAlert(t.id)} open>${t.title&&r`<div slot=title>${t.title}</div>`||""}<div slot=message>${t.message}</div></calcite-alert>`)}async _handleAuthInit(t){let e=t.detail;e.telemetrySession||(e.telemetrySession=y.getDisabledSession()),this._configContextProvider.setValue(e),e.authentication&&(this.authentication=e.authentication),this._cardFetcherDeployed=new m(e.locale,e.orgUrl,e.portalURL),this._cardsFetcher=new m(e.locale,e.orgUrl,e.portalURL),this._isDisconnectedEnvironment||await this._getSolutions(e.primarySolutionsGroupId,e.agoBasedEnterpriseSolutionsGroupId),this._configContextProvider.value.allCards=this._allCards,this._configContextProvider.value.anonAgolSession=this._cardsFetcher.anonAgolSession,this._configContextProvider.value.agolPortalUrl=this._cardsFetcher.agolPortalUrl,await this._initializeTelemetry(),this._isLoaded=!0,this._setRefreshInterval(),this._initTab?(this.selectTab(this._initTab,this._initFilters),this._logTabViewTelemetry(this._initTab.tabType),this._initTab=void 0,this._initFilters=void 0):this.authentication?.IsSignedIn&&(this.initTab==="details"||this.initTab==="deployed-card"||(this._logTabViewTelemetry(this._activeTab),this._emitMetaTagStrings(this._activeTab)))}_setActiveTab(t){let e=t.detail.tabType,i=this._activeTab!==e;switch(this._activeTab=e,i&&this._logTabViewTelemetry(e),e){case"all-solutions":this._allTabTitle.value?.click();break;case"deployments":this._mySolutionsTabTitle.value?.click();break;case"resources":this._resourcesTabTitle.value?.click();break;case"deployed-card":this._deployedCardTabTitle.value?.click();break;case"details":this._detailsTabTitle.value?.click();break}this._builderVisible=!1,e!=="details"&&e!=="deployed-card"&&(this._deployAppNav.value.activateMenuItem(e),this.deployAppTabSelected.emit(e),this._emitMetaTagStrings(e))}_logTabViewTelemetry(t,e){let i;switch(t){case"all-solutions":i=h.ALL_SOLUTIONS;break;case"deployments":i=h.DEPLOYMENTS;break;case"resources":i=h.RESOURCES;break;case"details":i=h.SOLUTION_DETAILS;break;case"deployed-card":i=h.DEPLOYMENTS;break}if(!((t==="details"||t==="deployed-card")&&!e)&&i){let s=[];if((t==="details"||t==="deployed-card")&&e){let n=e;s.push(n.title||""),s.push(n.deployCommonId||""),s.push(n.deployVersion||""),s.push(""),s.push(x(n.typeKeywords))}let l=t==="deployed-card"?"Open":"View";this._telemetry?.logEvent({category:i,action:l,dimensions:s.length>0?s:void 0})}}_emitMetaTagStrings(t,e){let i="",s="";switch(t){case"all-solutions":i=this._translations.metaAllSolutionsTitle,s=this._translations.metaAllSolutionsDescription;break;case"deployments":case"deployed-card":i=this._translations.metaDeploymentsTitle,s=this._translations.metaDeploymentsDescription;break;case"resources":i=this._translations.metaResourcesTitle,s=this._translations.metaResourcesDescription;break;case"details":e&&(i=this._translations.metaDetailsTitle.replace("{title}",e.title),s=e.snippet);break}this.metaTagStringsReady.emit({pageType:t,title:i,description:s,detailTemplate:e})}_handleCalciteTabChanged(){this.tabChanged.emit(this._activeTab)}_detailsCardSelected(t){this._activeTab="details",this._detailsTabTitle.value.selected=!0,this._detailsTab.value.selected=!0,this._deployAppNav.value.clearMenuItems(),t?.detail&&(this._selectedDetailsCard=t.detail),this._logTabViewTelemetry("details",this._selectedDetailsCard),this._emitMetaTagStrings("details",this._selectedDetailsCard)}_deployedCardSelected(t){this._activeTab="deployed-card",this._deployedCardTabTitle.value.selected=!0,this._deployedCardTab.value.selected=!0,this._deployAppNav.value.clearMenuItems(),t?.detail?.card&&(this._selectedDeployedCard=t.detail.card),this._logTabViewTelemetry("deployed-card",this._selectedDeployedCard),this._emitMetaTagStrings("deployed-card")}_solutionBuilderSelected(t){t?.detail&&(this._builderVisible=!0,this._hasActiveBuilderDesign=!0,this._builderDesignContextProvider.value={design:t.detail,updateDesign:e=>{this._builderDesignContextProvider.value={...this._builderDesignContextProvider.value,design:e}},isBuilderVisible:!0,setBuilderVisible:e=>{this._builderVisible=e,this._builderDesignContextProvider.value={...this._builderDesignContextProvider.value,isBuilderVisible:e}}})}_handleDeployedCardDisplay(t){let{card:e,cardRef:i}=t.detail;this.deployedCardSelected.emit({card:e,cardRef:i})}_handleShowGlobalAlert(t){let e=t.detail,i=e.id||`alert-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;this._globalAlerts=[...this._globalAlerts,{...e,id:i}]}_removeGlobalAlert(t){this._globalAlerts=this._globalAlerts.filter(e=>e.id!==t)}async _initializeTelemetry(){let t=this._configContextProvider.value;if(!this.authentication||!t)return;let e=await this._telemetryManager.initializeTelemetry(this.authentication,t);this._configContextProvider.value.telemetrySession=e}async _getSolutions(t,e){if(this._isDisconnectedEnvironment)return[];this._abortController?(this._abortController.abort(),this._abortController=new AbortController):this._abortController=new AbortController;let i=await this._cardsFetcher?.requestAvailableSolutionCards({q:this._agoTerms,filter:"type:Solution",sortField:this._sortField,sortOrder:this._sortOrder,nextStart:-1,categories:this._categories,delay:this._delay,getSuggested:this._getSuggested,num:100},t,e,this._configContextProvider.value.userSession,this._configContextProvider.value.isEnterprise,this._abortController.signal,{num:1e3});return this._abortController=void 0,this._allCards.length===0&&i?.cards&&(this._allCards=i?.cards),this._allCards}async _getDeployedSolution(t){let e=this._configContextProvider.value.authentication,i=this._configContextProvider.value.userSession;if(e&&i&&e.IsSignedIn){this._abortControllerDeployed?(this._abortControllerDeployed.abort(),this._abortControllerDeployed=new AbortController):this._abortControllerDeployed=new AbortController;let s=I(e);try{let l=await R(e,i,this._cardsFetcher,this._cardFetcherDeployed,F,"created","desc",!1,[],[],this._abortControllerDeployed.signal,s?"My organization's solutions":"My solutions",t);l.cards.length===0||l.cards[0].typeKeywords.indexOf("Deployed")<0?(this._deployCardFetchFailedMessage=this._translations.failedToFetchNotSolution.replace("{{ITEMID}}",t),this._showDeployedCardFetchFailed=!0):this._deployedSolutions=l}catch(l){let n=l.message;n.indexOf("CONT_0001")>-1||n.indexOf("Item does not exist or is inaccessible.")>-1?(this._deployCardFetchFailedMessage=this._translations.failedToFetchWrongId.replace("{{ITEMID}}",t),this._showDeployedCardFetchFailed=!0):n.indexOf("GWM_0003")>-1||n.indexOf("You do not have permissions to access this resource or perform this operation.")>-1?(this._deployCardFetchFailedMessage=this._translations.failedToFetchWrongPermissions.replace("{{ITEMID}}",t),this._showDeployedCardFetchFailed=!0):(this._showDeployedCardFetchFailed=!0,this._deployCardFetchFailedMessage=""),console.warn(l)}}}_blurTabs(){this._allTabTitle.value?.blur(),this._resourcesTabTitle.value?.blur(),this._detailsTabTitle.value?.blur(),this._mySolutionsTabTitle.value?.blur()}_isSearchToolbarShowing(){return this._activeTab==="all-solutions"||this._activeTab==="deployments"&&this.authentication?.IsSignedIn===!0}_getDefaultSearchOptions(t){let e;if(t){let i=t.domain,s=t.industry==="AEC"?O.AEC:t.industry,l=t.offerType,n=t.searchTerm,E="",d=t.sortField,u=t.owner,b=t.filter;d==="suggested"&&!this.authentication?.IsSignedIn&&(d=this.sortType),e=i||s?{type:i?"domain":s?"industry":""}:void 0,i&&(e=e?{...e,domain:i}:{domain:i}),s&&(e=e?{...e,industry:s}:{industry:s}),n&&(e=e?{...e,searchTerm:n}:{searchTerm:n}),e&&(e={...e,displayValue:E}),d&&(e=e?{...e,sortType:d}:{sortType:d}),l&&(d=l.toLowerCase(),e=e?{...e,sortType:d}:{sortType:d}),u&&(e=e?{...e,owner:u}:{owner:u}),b&&(e=e?{...e,filter:b}:{filter:b})}return e}_setScrollbarGutters(t="stable both-edges"){[this._allTab,this._mySolutionsTab,this._resourcesTab,this._detailsTab,this._deployedCardTab].forEach(e=>{let i=e.value?.shadowRoot?.firstElementChild;i?.style&&(i.style.scrollbarGutter=t)})}_setRefreshInterval(){let{userSession:t,authentication:e}=this._configContextProvider.value;if(t&&t.tokenDuration&&e?.IsSignedIn){let i=Date.now(),s=(e.Credential?.expires-i)*.95;setInterval(async()=>{if(e.Credential&&e.Credential.expires){await e.Credential?.refreshToken();let l=new Date(e.Credential.expires);t.updateToken(e.Credential.token,l),this.sessionRefreshed.emit(t.token)}},s)}}};w("solutions-deploy-app",g);return g},"identity/IdentityManager","identity/OAuthInfo","portal/Portal",b,d,e,g,h,i,j,k,l,m,n,q,s,t,u,x)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as T}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import{b}from"./2I5LGZNX.js";import{E as a,F as r,G as u,I as h,h as w,i as n,l as g,q as y}from"./FFF5HUPM.js";import"./QPIMTXPL.js";var x=w`:host{display:block}.display-none{display:none}.display-flex{display:flex}.margin-top-1-2{margin-top:.5rem}.margin-left-1-2{margin-left:.5rem}.margin-right-1-2{margin-right:.5rem}.square-32{width:32px;height:32px}.square-40{width:40px;height:40px}.square-48{width:48px;height:48px}.height-fit-content{height:fit-content!important}.height-0{height:0!important}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.box-shadow{box-shadow:0 1px 2px #0000004d}.margin-bottom-1-2{margin-bottom:.5rem}.danger-icon-color{--calcite-icon-color: var(--calcite-color-status-danger)}.map-actions{--calcite-action-background-color: var(--calcite-color-foreground-1);--calcite-action-background-color-hover: var(--calcite-color-foreground-3);--calcite-color-transparent-press: var(--calcite-color-foreground-2)}`,m=class extends u{constructor(){super(),this.enabledLayerIds=[],this.enableLegend=!1,this.enableLayerList=!1,this.enableFloorFilter=!1,this.enableFullscreen=!1,this.enableSearch=!1,this.enableBasemap=!1,this.enableHome=!1,this.enableSingleExpand=!1,this.zoomToolsSize="m",this.layout="vertical",this.mapWidgetsSize="m",this.enableMapPicker=!1,this.enableMapLayerPicker=!1,this.position="top-leading",this.stackTools=!0,this.enableSelectionTool=!1,this.toolOrder=["home","legend","search","fullscreen","floorfilter","layers-list","selectiontool","map-picker","map-layer-picker"],this.selectionTools=["rectangle-select","lasso-select","clear-selection"],this.mapInfos=[],this.defaultLayerId="",this.isMobile=!1,this.selectedFeaturesIds=[],this.selectedWebMapId="",this.showOnlyUpdatableLayers=!1,this.visibilityIcon="eyeball",this.configLayerOrderDefined=!1,this._hasFloorInfo=!1,this._translations=T({name:"map-tools",blocking:!0}),this._showTools=!0,this._showBasemapWidget=!1,this._showFloorFilter=!1,this._showLegendWidget=!1,this._showSearchWidget=!1,this._showLayersListWidget=!1,this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!1,this._showEllipsisTools=!0,this._ellipsisTools=[],this._isValidWebMap=!0,this._showSelectionTools=!1,this._basemapElement=a(),this._floorFilterElement=a(),this._fullscreenElement=a(),this._layerListWidgetElement=a(),this._legendElement=a(),this._searchElement=a(),this._widgets=[],this._selectionToolElement=a(),this._mapTools=[],this._mapTool=a(),this.clearSelection=y(),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this._layerSelectionChange)}static{this.properties={basemapConfig:0,enabledLayerIds:0,enableLegend:5,enableLayerList:5,enableFloorFilter:5,enableFullscreen:5,enableSearch:5,enableBasemap:5,enableHome:5,enableSingleExpand:5,zoomToolsSize:1,layout:1,mapView:0,mapWidgetsSize:1,enableMapPicker:5,enableMapLayerPicker:5,position:1,searchConfiguration:0,stackTools:5,enableSelectionTool:5,toolOrder:0,selectionTools:0,selectedLayer:0,mapInfos:0,defaultLayerId:1,isMobile:5,parentComponentHeight:9,parentComponentWidth:9,selectedFeaturesIds:0,selectedWebMapId:1,showOnlyUpdatableLayers:5,mapInfo:0,visibilityIcon:1,configLayerOrderDefined:5,_hasFloorInfo:16,_translations:16,_showTools:16,_showBasemapWidget:16,_showFloorFilter:16,_showLegendWidget:16,_showSearchWidget:16,_showLayersListWidget:16,_rectangleSelectionToolActive:16,_lassoSelectionToolActive:16,_showEllipsisTools:16,_ellipsisTools:16,_isValidWebMap:16,_showSelectionTools:16}}static{this.styles=x}willUpdate(t){t.has("mapView")&&this.mapViewWatchHandler(),t.has("parentComponentWidth")&&this.parentComponentWidth&&this.parentComponentWidthWatchHandler(this.parentComponentWidth),t.has("_showBasemapWidget")&&(this.hasUpdated||this._showBasemapWidget!==!1)&&this._showBasemapWidgetWatchHandler(this._showBasemapWidget),t.has("_showLayersListWidget")&&(this.hasUpdated||this._showLayersListWidget!==!1)&&this._showLayersListWidgetWatchHandler(this._showLayersListWidget),t.has("_showFloorFilter")&&(this.hasUpdated||this._showFloorFilter!==!1)&&this._showFloorFilterWatchHandler(this._showFloorFilter),t.has("_showLegendWidget")&&(this.hasUpdated||this._showLegendWidget!==!1)&&this._showLegendWidgetWatchHandler(this._showLegendWidget),t.has("_showSearchWidget")&&(this.hasUpdated||this._showSearchWidget!==!1)&&this._showSearchWidgetWatchHandler(this._showSearchWidget)}async mapViewWatchHandler(){await this.mapView?.when(()=>{this.enableHome&&this._initHome(),this.parentComponentWidth&&this._updateTools(this.parentComponentWidth)})}async parentComponentWidthWatchHandler(t){this._updateTools(t)}async _showBasemapWidgetWatchHandler(t){let e=this._basemapElement.value?this._basemapElement.value.basemapGalleryRef.value:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.style.setProperty("direction",s),e.style.setProperty("max-height","240px")):this.mapView?.ui.remove(e))}async _showLayersListWidgetWatchHandler(t){let e=this._layerListWidgetElement.value?this._layerListWidgetElement.value.layerListRef.value:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.style.setProperty("direction",s),e.style.setProperty("max-height","240px")):this.mapView?.ui.remove(e))}async _showFloorFilterWatchHandler(t){let e=this._floorFilterElement.value?this._floorFilterElement.value.floorFilterRef.value:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.style.setProperty("direction",s),e.style.setProperty("max-height","240px")):this.mapView?.ui.remove(e))}async _showLegendWidgetWatchHandler(t){let e=this._legendElement.value?this._legendElement.value.legendRef.value:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.style.setProperty("direction",s),e.style.setProperty("max-height","240px")):this.mapView?.ui.remove(e))}async _showSearchWidgetWatchHandler(t){let e=this._searchElement.value?this._searchElement.value.searchComponent.value:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.style.setProperty("direction",s),e.style.setProperty("max-height","240px")):this.mapView?.ui.remove(e))}async mapChanged(t){let e=t.detail.isValid;this._isValidWebMap=e,this._showTools||this._toggleTools()}async _layerSelectionChange(t){this._showTools||this._toggleTools()}async load(){this._mapTools=[...this.toolOrder]}render(){this._setZoomToolsSize();let t=this.layout==="horizontal"?"display-flex":"",e=this._getToggleIcon(),s=!this._showTools&&!this._showSelectionTools?"display-none":t,i=this._showEllipsisTools?"":"display-none",o=this._showSearchWidget?"":"display-none",l=this._showBasemapWidget?"":"display-none",d=this._showLegendWidget?"":"display-none",c=this._showFloorFilter?"":"display-none",p=this._showLayersListWidget?"":"display-none",v=this._showTools?this._translations.collapse:this._translations.expand,f=!this.enableBasemap&&!this.enableFullscreen&&!this.enableLegend&&!this.enableLayerList&&!this.enableSearch&&!this.enableMapPicker&&!this.enableMapLayerPicker?"display-none":"",W=document.dir==="rtl"?"margin-right-1-2":"margin-left-1-2",L=this.enableSingleExpand?this.layout==="horizontal"?W:"margin-top-1-2":"",S=this._ellipsisTools.length>0&&this._showTools?"":"display-none",_=this.stackTools&&this._ellipsisTools.length===0?"box-shadow":"",$=this._showSelectionTools?this.selectionTools:this._mapTools;return n`<div class=${`${f} ${t} height-0`}>${this.enableSingleExpand?n`<div class=${h(_)}>${this._getActionGroup(e,!1,v||"",()=>this._toggleTools())}</div>`:void 0}<div class=${`${L} ${_} ${s}`}>${this._getMapWidgets($)}</div><div><div class=${h(S)}>${this._getActionGroup("ellipsis",!1,"",()=>this._toggleEllipsisTools())}<div class=${h(i)}>${this._getMapWidgets(this._ellipsisTools)}</div></div></div></div><map-basemap-gallery .basemapConfig=${this.basemapConfig} class=${h(l)} .mapView=${this.mapView} ${r(this._basemapElement)}></map-basemap-gallery><map-search class=${h(o)} .mapView=${this.mapView} result-graphic-enabled .searchConfiguration=${this.searchConfiguration} ${r(this._searchElement)}></map-search><map-legend class=${h(d)} .mapView=${this.mapView} ${r(this._legendElement)}></map-legend><layer-list-widget class=${h(p)} .mapView=${this.mapView} .visibilityIcon=${this.visibilityIcon} ${r(this._layerListWidgetElement)}></layer-list-widget><map-floor-filter class=${h(c)} .enabled=${this.enableFloorFilter} .mapView=${this.mapView} ${r(this._floorFilterElement)}></map-floor-filter><selection-tool .mapView=${this.mapView} @drawingComplete=${()=>{this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!1}} .selectedLayerId=${this.selectedLayer?.id} ${r(this._selectionToolElement)}></selection-tool>${this.enableMapPicker&&n`<map-picker class=mapPickerClass .height=${(this.parentComponentHeight??0)-25} id=map-picker .mapInfos=${this.mapInfos} reference-element=map .selectedWebMapId=${this.selectedWebMapId} show-map-list-in-popover></map-picker>`||""}${this.enableMapLayerPicker&&this.selectedLayer&&n`<map-layer-picker appearance=transparent .configLayerOrderDefined=${this.configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} .enabledLayerIds=${this.enabledLayerIds} .height=${(this.parentComponentHeight??0)-25} .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} reference-element=layers scale=s .selectedIds=${this.selectedLayer?[this.selectedLayer.id]:[]} show-layers-list-in-popover show-tables type=dropdown></map-layer-picker>`||""}`}_initHome(){this.enableHome&&(this._homeComponent=document.createElement("arcgis-home"),this._homeComponent.view=this.mapView,this._homeComponent.viewpoint=this.mapView?.viewpoint?.clone())}_setZoomToolsSize(){let t=document.getElementById("arcgis-map")?.shadowRoot;if(!t)return;let e=t.querySelector(".esri-zoom"),s=t.querySelectorAll(".esri-widget--button")[0],i=t.querySelectorAll(".esri-widget--button")[1];if(s&&i){let o=this.zoomToolsSize==="s"?"32px":this.zoomToolsSize==="m"?"40px":"48px";s.style.width=o,s.style.height=o,i.style.width=o,i.style.height=o}if(this.layout==="horizontal"){let o=document.dir||"ltr",l=o==="ltr"?".esri-ui-top-left":".esri-ui-top-right",d=o==="ltr"?0:this.parentComponentWidth-62,c=o==="ltr"?this._showTools?"ltr":"rtl":this._showTools?"rtl":"ltr";t.querySelector(l)?.firstElementChild?.tagName==="MAP-TOOLS"&&!this._showTools&&(c=o),e&&e.setAttribute("style",`position: absolute; top: 50px; left: ${d}px`),this._showSelectionTools||t.querySelector(l)?.setAttribute("style",`flex-direction: row; gap: 5px; align-items: flex-start; direction: ${c} !important; z-index: 1;`)}}_getToggleIcon(){let t=document.dir||"ltr";return this.layout==="horizontal"?t==="ltr"?this._showTools?"chevrons-left":"chevrons-right":this._showTools?"chevrons-right":"chevrons-left":this._showTools?"chevrons-up":"chevrons-down"}_updateTools(t){let e=this._showSelectionTools?JSON.parse(JSON.stringify(this.selectionTools)):JSON.parse(JSON.stringify(this.toolOrder));this._hasFloorInfo=this.mapView?.map?.floorInfo;let s=e.indexOf("floorfilter");s>-1&&!this._hasFloorInfo&&e.splice(s,1);let i=this.mapWidgetsSize==="s"?32:this.mapWidgetsSize==="m"?40:48,o=110;this.isMobile&&(this.enableMapPicker||this.enableMapLayerPicker)&&(o=160);let l=Math.ceil((t-o)/i)-1;l&&l!==e.length-1?(this._mapTools=e.slice(0,l),this._ellipsisTools=e.slice(l,e.length)):(this._mapTools=e,this._ellipsisTools=[])}_getMapWidgets(t){let e=this._isValidWebMap?"map":"exclamation-mark-triangle",s=this.selectedLayer===void 0?"exclamation-mark-triangle":"layers";return t.map(i=>{switch(i){case"legend":return this.enableLegend&&this.enableSingleExpand?this._getActionGroup("legend",!1,this._translations.legend,()=>this._showLegend()):this.enableLegend?this._getWidget(i,this._legendElement.value?.legendRef.value,!0):void 0;case"search":return this.enableSearch&&this.enableSingleExpand?this._getActionGroup("magnifying-glass",!1,this._translations.search,()=>this._search()):this.enableSearch?this._getWidget(i,this._searchElement.value?.searchComponent.value,!0):void 0;case"fullscreen":return this.enableFullscreen&&this.enableSingleExpand?this._getFullScreenComponent():this.enableFullscreen?this._getWidget(i,this._fullscreenElement.value?.fullscreenRef.value,!1):void 0;case"basemap":return this.enableBasemap&&this.enableSingleExpand?this._getActionGroup("basemap",!1,this._translations.basemap,()=>this._toggleBasemapPicker()):this.enableBasemap?this._getWidget(i,this._basemapElement.value?.basemapGalleryRef.value,!0):void 0;case"layers-list":return this.enableLayerList&&this.enableSingleExpand?this._getActionGroup("layers",!1,this._translations.layers||"",()=>this._toggleLayerListWidget()):this.enableLayerList?this._getWidget(i,this._layerListWidgetElement.value?.layerListRef.value,!0):void 0;case"floorfilter":return this.enableFloorFilter&&this._hasFloorInfo&&this.enableSingleExpand?this._getActionGroup("urban-model",!1,this._translations.floorFilter,()=>this._toggleFloorFilter()):this.enableFloorFilter&&this._hasFloorInfo?this._getWidget(i,this._floorFilterElement.value?.floorFilterRef.value,!0):void 0;case"selectiontool":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("cursor-selection",!1,this._translations.selectionTools,this._onSelectionToolClick,!1):void 0;case"rectangle-select":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("cursor-marquee",!1,this._translations.selectByRectangle,()=>this._toggleSelectionTool("rectangle"),!1,this._rectangleSelectionToolActive):void 0;case"lasso-select":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("lasso-select",!1,this._translations.selectByLasso,()=>this._toggleSelectionTool("freehandPolygon"),!1,this._lassoSelectionToolActive):void 0;case"clear-selection":return this.selectedLayer&&this.selectedFeaturesIds.length>0?this._getActionGroup("erase",!1,this._translations.clearSelection,()=>this.clearSelection.emit()):void 0;case"home":return this.enableHome?this._getActionGroup("home",!1,this._translations.defaultMapView,()=>{this._homeComponent?.go()}):void 0;case"map-picker":return this.enableMapPicker?this._getActionGroup(e,!1,"",()=>{},!this._isValidWebMap):void 0;case"map-layer-picker":return this.enableMapLayerPicker&&this._isValidWebMap?this._getActionGroup(s,!1,"",()=>{},this.selectedLayer===void 0):void 0;default:return""}})}_getFullScreenComponent(){return n`<map-fullscreen .mapView=${this.mapView}></map-fullscreen>`}_getActionGroup(t,e,s,i,o,l){let d=this.mapWidgetsSize==="s"?"square-32":this.mapWidgetsSize==="m"?"square-40":"square-48",c=this.stackTools?"":"margin-bottom-1-2",p=this.stackTools?"":"box-shadow";return n`<div class="height-fit-content"><calcite-action alignment=center .indicator=${l} class=${`map-actions ${d} ${c} border-bottom ${p} ${o?"danger-icon-color":""}`} .disabled=${e} .icon=${t} id=${t??g} @click=${i} scale=m .text=${s} ${r(this._mapTool)}><calcite-icon aria-hidden=true icon=chevron-up scale=s slot=icon></calcite-icon></calcite-action>${!this.isMobile&&s&&n`<calcite-tooltip .placement=${this.layout==="vertical"?"auto":"bottom"} reference-element=${t??g}><span>${s}</span></calcite-tooltip>`||""}</div>`}_getWidget(t,e,s){if(this._widgets.indexOf(t)<0&&this.mapView&&e){let i=this.toolOrder.indexOf(t),o=document.createElement("arcgis-expand");o.view=this.mapView,o.appendChild(e);let l=this.enableHome?2:1;this.mapView.ui.add(s?o:e,{position:this.position,index:i>-1?i+l:1}),this._widgets.push(t)}}_showLegend(){this._showLegendWidget=!this._showLegendWidget,this._showTools=!1,this._toggleEllipsisTools()}_search(){this._showSearchWidget=!this._showSearchWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleBasemapPicker(){this._showBasemapWidget=!this._showBasemapWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleLayerListWidget(){this._showLayersListWidget=!this._showLayersListWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleFloorFilter(){this._showFloorFilter=!this._showFloorFilter,this._showTools=!1,this._toggleEllipsisTools()}_onSelectionToolClick(){this._showSelectionTools=!this._showSelectionTools,this._showTools=!1,this._toggleEllipsisTools()}_toggleSelectionTool(t){t==="rectangle"?(this._lassoSelectionToolActive=!1,this._rectangleSelectionToolActive=!this._rectangleSelectionToolActive):t==="freehandPolygon"&&(this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!this._lassoSelectionToolActive),this._selectionToolElement.value?.toggleSelectionTool(t,this._rectangleSelectionToolActive||this._lassoSelectionToolActive)}_toggleTools(){this._showTools||(this._showSelectionTools=!1,this._showBasemapWidget=!1,this._showLayersListWidget=!1,this._showSearchWidget=!1,this._showLegendWidget=!1,this._showFloorFilter=!1),this._rectangleSelectionToolActive?this._toggleSelectionTool("rectangle"):this._lassoSelectionToolActive&&this._toggleSelectionTool("freehandPolygon"),this._showTools=!this._showTools,this._toggleEllipsisTools(),this._updateTools(this.parentComponentWidth)}_toggleEllipsisTools(){this._showEllipsisTools=!this._showEllipsisTools}};b("map-tools",m);export{m as MapTools};
2
+ import{a as T}from"./XF5N3NI5.js";import"./UBPOT5V3.js";import"./ISFTCFSJ.js";import{b}from"./2I5LGZNX.js";import{E as a,F as r,G as u,I as h,h as w,i as n,l as g,q as y}from"./FFF5HUPM.js";import"./QPIMTXPL.js";var x=w`:host{display:block}.display-none{display:none}.display-flex{display:flex}.margin-top-1-2{margin-top:.5rem}.margin-left-1-2{margin-left:.5rem}.margin-right-1-2{margin-right:.5rem}.square-32{width:32px;height:32px}.square-40{width:40px;height:40px}.square-48{width:48px;height:48px}.height-fit-content{height:fit-content!important}.height-0{height:0!important}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.box-shadow{box-shadow:0 1px 2px #0000004d}.margin-bottom-1-2{margin-bottom:.5rem}.danger-icon-color{--calcite-icon-color: var(--calcite-color-status-danger)}.map-actions{--calcite-action-background-color: var(--calcite-color-foreground-1);--calcite-action-background-color-hover: var(--calcite-color-foreground-3);--calcite-color-transparent-press: var(--calcite-color-foreground-2)}`,m=class extends u{constructor(){super(),this.enabledLayerIds=[],this.enableLegend=!1,this.enableLayerList=!1,this.enableFloorFilter=!1,this.enableFullscreen=!1,this.enableSearch=!1,this.enableBasemap=!1,this.enableHome=!1,this.enableSingleExpand=!1,this.zoomToolsSize="m",this.layout="vertical",this.mapWidgetsSize="m",this.enableMapPicker=!1,this.enableMapLayerPicker=!1,this.position="top-leading",this.stackTools=!0,this.enableSelectionTool=!1,this.toolOrder=["home","legend","search","fullscreen","floorfilter","layers-list","selectiontool","map-picker","map-layer-picker"],this.selectionTools=["rectangle-select","lasso-select","clear-selection"],this.mapInfos=[],this.defaultLayerId="",this.isMobile=!1,this.selectedFeaturesIds=[],this.selectedWebMapId="",this.showOnlyUpdatableLayers=!1,this.visibilityIcon="eyeball",this.configLayerOrderDefined=!1,this._hasFloorInfo=!1,this._translations=T({name:"map-tools",blocking:!0}),this._showTools=!0,this._showBasemapWidget=!1,this._showFloorFilter=!1,this._showLegendWidget=!1,this._showSearchWidget=!1,this._showLayersListWidget=!1,this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!1,this._showEllipsisTools=!0,this._ellipsisTools=[],this._isValidWebMap=!0,this._showSelectionTools=!1,this._basemapElement=a(),this._floorFilterElement=a(),this._fullscreenElement=a(),this._layerListWidgetElement=a(),this._legendElement=a(),this._searchElement=a(),this._widgets=[],this._selectionToolElement=a(),this._mapTools=[],this._mapTool=a(),this.clearSelection=y(),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this._layerSelectionChange)}static{this.properties={basemapConfig:0,enabledLayerIds:0,enableLegend:5,enableLayerList:5,enableFloorFilter:5,enableFullscreen:5,enableSearch:5,enableBasemap:5,enableHome:5,enableSingleExpand:5,zoomToolsSize:1,layout:1,mapView:0,mapWidgetsSize:1,enableMapPicker:5,enableMapLayerPicker:5,position:1,searchConfiguration:0,stackTools:5,enableSelectionTool:5,toolOrder:0,selectionTools:0,selectedLayer:0,mapInfos:0,defaultLayerId:1,isMobile:5,parentComponentHeight:9,parentComponentWidth:9,selectedFeaturesIds:0,selectedWebMapId:1,showOnlyUpdatableLayers:5,mapInfo:0,visibilityIcon:1,configLayerOrderDefined:5,_hasFloorInfo:16,_translations:16,_showTools:16,_showBasemapWidget:16,_showFloorFilter:16,_showLegendWidget:16,_showSearchWidget:16,_showLayersListWidget:16,_rectangleSelectionToolActive:16,_lassoSelectionToolActive:16,_showEllipsisTools:16,_ellipsisTools:16,_isValidWebMap:16,_showSelectionTools:16}}static{this.styles=x}willUpdate(t){t.has("mapView")&&this.mapViewWatchHandler(),t.has("parentComponentWidth")&&this.parentComponentWidth&&this.parentComponentWidthWatchHandler(this.parentComponentWidth),t.has("_showBasemapWidget")&&(this.hasUpdated||this._showBasemapWidget!==!1)&&this._showBasemapWidgetWatchHandler(this._showBasemapWidget),t.has("_showLayersListWidget")&&(this.hasUpdated||this._showLayersListWidget!==!1)&&this._showLayersListWidgetWatchHandler(this._showLayersListWidget),t.has("_showFloorFilter")&&(this.hasUpdated||this._showFloorFilter!==!1)&&this._showFloorFilterWatchHandler(this._showFloorFilter),t.has("_showLegendWidget")&&(this.hasUpdated||this._showLegendWidget!==!1)&&this._showLegendWidgetWatchHandler(this._showLegendWidget),t.has("_showSearchWidget")&&(this.hasUpdated||this._showSearchWidget!==!1)&&this._showSearchWidgetWatchHandler(this._showSearchWidget)}async mapViewWatchHandler(){await this.mapView?.when(()=>{this.enableHome&&this._initHome(),this.parentComponentWidth&&this._updateTools(this.parentComponentWidth)})}async parentComponentWidthWatchHandler(t){this._updateTools(t)}async _showBasemapWidgetWatchHandler(t){let e=this._basemapElement.value?this._basemapElement.value.basemapGalleryRef.value:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.style.setProperty("direction",s),e.style.setProperty("max-height","240px")):this.mapView?.ui.remove(e))}async _showLayersListWidgetWatchHandler(t){let e=this._layerListWidgetElement.value?this._layerListWidgetElement.value.layerListRef.value:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.style.setProperty("direction",s),e.style.setProperty("max-height","240px")):this.mapView?.ui.remove(e))}async _showFloorFilterWatchHandler(t){let e=this._floorFilterElement.value?this._floorFilterElement.value.floorFilterRef.value:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.style.setProperty("direction",s),e.style.setProperty("max-height","240px")):this.mapView?.ui.remove(e))}async _showLegendWidgetWatchHandler(t){let e=this._legendElement.value?this._legendElement.value.legendRef.value:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.style.setProperty("direction",s),e.style.setProperty("max-height","240px")):this.mapView?.ui.remove(e))}async _showSearchWidgetWatchHandler(t){let e=this._searchElement.value?this._searchElement.value.searchComponent.value:void 0,s=document.dir==="rtl"?"rtl":"ltr";e&&(t?(this.mapView?.ui.add(e,{position:this.position,index:1}),e.style.setProperty("direction",s),e.style.setProperty("max-height","240px")):this.mapView?.ui.remove(e))}async mapChanged(t){let e=t.detail.isValid;this._isValidWebMap=e,this._showTools||this._toggleTools()}async _layerSelectionChange(t){this._showTools||this._toggleTools()}async load(){this._mapTools=[...this.toolOrder]}render(){this._setZoomToolsSize();let t=this.layout==="horizontal"?"display-flex":"",e=this._getToggleIcon(),s=!this._showTools&&!this._showSelectionTools?"display-none":t,i=this._showEllipsisTools?"":"display-none",o=this._showSearchWidget?"":"display-none",l=this._showBasemapWidget?"":"display-none",d=this._showLegendWidget?"":"display-none",c=this._showFloorFilter?"":"display-none",p=this._showLayersListWidget?"":"display-none",v=this._showTools?this._translations.collapse:this._translations.expand,f=!this.enableBasemap&&!this.enableFullscreen&&!this.enableLegend&&!this.enableLayerList&&!this.enableSearch&&!this.enableMapPicker&&!this.enableMapLayerPicker?"display-none":"",W=document.dir==="rtl"?"margin-right-1-2":"margin-left-1-2",L=this.enableSingleExpand?this.layout==="horizontal"?W:"margin-top-1-2":"",S=this._ellipsisTools.length>0&&this._showTools?"":"display-none",_=this.stackTools&&this._ellipsisTools.length===0?"box-shadow":"",$=this._showSelectionTools?this.selectionTools:this._mapTools;return n`<div class=${`${f} ${t} height-0`}>${this.enableSingleExpand?n`<div class=${h(_)}>${this._getActionGroup(e,!1,v||"",()=>this._toggleTools())}</div>`:void 0}<div class=${`${L} ${_} ${s}`}>${this._getMapWidgets($)}</div><div><div class=${h(S)}>${this._getActionGroup("ellipsis",!1,"",()=>this._toggleEllipsisTools())}<div class=${h(i)}>${this._getMapWidgets(this._ellipsisTools)}</div></div></div></div><map-basemap-gallery .basemapConfig=${this.basemapConfig} class=${h(l)} .mapView=${this.mapView} ${r(this._basemapElement)}></map-basemap-gallery><map-search class=${h(o)} .mapView=${this.mapView} result-graphic-enabled .searchConfiguration=${this.searchConfiguration} ${r(this._searchElement)}></map-search><map-legend class=${h(d)} .mapView=${this.mapView} ${r(this._legendElement)}></map-legend><layer-list-widget class=${h(p)} .mapView=${this.mapView} .visibilityIcon=${this.visibilityIcon} ${r(this._layerListWidgetElement)}></layer-list-widget><map-floor-filter class=${h(c)} .enabled=${this.enableFloorFilter} .mapView=${this.mapView} ${r(this._floorFilterElement)}></map-floor-filter><selection-tool .mapView=${this.mapView} @drawingComplete=${()=>{this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!1}} .selectedLayerId=${this.selectedLayer?.id} ${r(this._selectionToolElement)}></selection-tool>${this.enableMapPicker&&n`<map-picker class=mapPickerClass .height=${(this.parentComponentHeight??0)-25} id=map-picker .mapInfos=${this.mapInfos} reference-element=map .selectedWebMapId=${this.selectedWebMapId} show-map-list-in-popover></map-picker>`||""}${this.enableMapLayerPicker&&this.selectedLayer&&n`<map-layer-picker appearance=transparent .configLayerOrderDefined=${this.configLayerOrderDefined} .defaultLayerId=${this.defaultLayerId} .enabledLayerIds=${this.enabledLayerIds} .height=${(this.parentComponentHeight??0)-25} .isMobile=${this.isMobile} .mapView=${this.mapView} .showOnlyUpdatableLayers=${this.showOnlyUpdatableLayers} reference-element=layers scale=s .selectedIds=${this.selectedLayer?[this.selectedLayer.id]:[]} show-layers-list-in-popover show-tables type=dropdown></map-layer-picker>`||""}`}_initHome(){this.enableHome&&(this._homeComponent=document.createElement("arcgis-home"),this._homeComponent.view=this.mapView,this._homeComponent.viewpoint=this.mapView?.viewpoint?.clone())}_setZoomToolsSize(){let t=document.getElementById("arcgis-map")?.shadowRoot;if(!t)return;let e=t.querySelector(".esri-zoom"),s=t.querySelectorAll(".esri-widget--button")[0],i=t.querySelectorAll(".esri-widget--button")[1];if(s&&i){let o=this.zoomToolsSize==="s"?"32px":this.zoomToolsSize==="m"?"40px":"48px";s.style.width=o,s.style.height=o,i.style.width=o,i.style.height=o}if(this.layout==="horizontal"){let o=document.dir||"ltr",l=o==="ltr"?".esri-ui-top-left":".esri-ui-top-right",d=o==="ltr"?0:this.parentComponentWidth-62,c=o==="ltr"?this._showTools?"ltr":"rtl":this._showTools?"rtl":"ltr";t.querySelector(l)?.firstElementChild?.tagName==="MAP-TOOLS"&&!this._showTools&&(c=o),e&&e.setAttribute("style",`position: absolute; top: 50px; left: ${d}px`),this._showSelectionTools||t.querySelector(l)?.setAttribute("style",`flex-direction: row; gap: 5px; align-items: flex-start; direction: ${c} !important; z-index: 1;`)}}_getToggleIcon(){let t=document.dir||"ltr";return this.layout==="horizontal"?t==="ltr"?this._showTools?"chevrons-left":"chevrons-right":this._showTools?"chevrons-right":"chevrons-left":this._showTools?"chevrons-up":"chevrons-down"}_updateTools(t){let e=this._showSelectionTools?JSON.parse(JSON.stringify(this.selectionTools)):JSON.parse(JSON.stringify(this.toolOrder));this._hasFloorInfo=this.mapView?.map?.floorInfo;let s=e.indexOf("floorfilter");s>-1&&!this._hasFloorInfo&&e.splice(s,1);let i=this.mapWidgetsSize==="s"?32:this.mapWidgetsSize==="m"?40:48,o=110;this.isMobile&&(this.enableMapPicker||this.enableMapLayerPicker)&&(o=160);let l=Math.ceil((t-o)/i)-1;l&&l!==e.length-1?(this._mapTools=e.slice(0,l),this._ellipsisTools=e.slice(l,e.length)):(this._mapTools=e,this._ellipsisTools=[])}_getMapWidgets(t){let e=this._isValidWebMap?"map":"exclamation-mark-triangle",s=this.selectedLayer===void 0?"exclamation-mark-triangle":"layers";return t.map(i=>{switch(i){case"legend":return this.enableLegend&&this.enableSingleExpand?this._getActionGroup("legend",!1,this._translations.legend,()=>this._showLegend()):this.enableLegend?this._getWidget(i,this._legendElement.value?.legendRef.value,!0):void 0;case"search":return this.enableSearch&&this.enableSingleExpand?this._getActionGroup("magnifying-glass",!1,this._translations.search,()=>this._search()):this.enableSearch?this._getWidget(i,this._searchElement.value?.searchComponent.value,!0):void 0;case"fullscreen":return this.enableFullscreen&&this.enableSingleExpand?this._getFullScreenComponent():this.enableFullscreen?this._getWidget(i,this._fullscreenElement.value?.fullscreenRef.value,!1):void 0;case"basemap":return this.enableBasemap&&this.enableSingleExpand?this._getActionGroup("basemap",!1,this._translations.basemap,()=>this._toggleBasemapPicker()):this.enableBasemap?this._getWidget(i,this._basemapElement.value?.basemapGalleryRef.value,!0):void 0;case"layers-list":return this.enableLayerList&&this.enableSingleExpand?this._getActionGroup("layers",!1,this._translations.layers||"",()=>this._toggleLayerListWidget()):this.enableLayerList?this._getWidget(i,this._layerListWidgetElement.value?.layerListRef.value,!0):void 0;case"floorfilter":return this.enableFloorFilter&&this._hasFloorInfo&&this.enableSingleExpand?this._getActionGroup("urban-model",!1,this._translations.floorFilter,()=>this._toggleFloorFilter()):this.enableFloorFilter&&this._hasFloorInfo?this._getWidget(i,this._floorFilterElement.value?.floorFilterRef.value,!0):void 0;case"selectiontool":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("cursor-selection",!1,this._translations.selectionTools,this._onSelectionToolClick,!1):void 0;case"rectangle-select":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("cursor-marquee",!1,this._translations.selectByRectangle,()=>this._toggleSelectionTool("rectangle"),!1,this._rectangleSelectionToolActive):void 0;case"lasso-select":return this.enableSelectionTool&&this.selectedLayer?this._getActionGroup("lasso-select",!1,this._translations.selectByLasso,()=>this._toggleSelectionTool("freehandPolygon"),!1,this._lassoSelectionToolActive):void 0;case"clear-selection":return this.selectedLayer&&this.selectedFeaturesIds.length>0?this._getActionGroup("erase",!1,this._translations.clearSelection,()=>this.clearSelection.emit()):void 0;case"home":return this.enableHome?this._getActionGroup("home",!1,this._translations.defaultMapView,()=>{this._homeComponent?.go()}):void 0;case"map-picker":return this.enableMapPicker?this._getActionGroup(e,!1,"",()=>{},!this._isValidWebMap):void 0;case"map-layer-picker":return this.enableMapLayerPicker&&this._isValidWebMap?this._getActionGroup(s,!1,"",()=>{},this.selectedLayer===void 0):void 0;default:return""}})}_getFullScreenComponent(){return n`<map-fullscreen .mapView=${this.mapView}></map-fullscreen>`}_getActionGroup(t,e,s,i,o,l){let d=this.mapWidgetsSize==="s"?"square-32":this.mapWidgetsSize==="m"?"square-40":"square-48",c=this.stackTools?"":"margin-bottom-1-2",p=this.stackTools?"":"box-shadow";return n`<div class="height-fit-content"><calcite-action alignment=center .indicator=${l} class=${`map-actions ${d} ${c} border-bottom ${p} ${o?"danger-icon-color":""}`} .disabled=${e} .icon=${t} id=${t??g} @click=${i} scale=m .text=${s} ${r(this._mapTool)}><calcite-icon aria-hidden=true icon=chevron-up scale=s slot=icon></calcite-icon></calcite-action>${!this.isMobile&&s&&n`<calcite-tooltip .placement=${this.layout==="vertical"?"auto":"bottom"} reference-element=${t??g}><span>${s}</span></calcite-tooltip>`||""}</div>`}_getWidget(t,e,s){if(this._widgets.indexOf(t)<0&&this.mapView&&e){let i=this.toolOrder.indexOf(t),o=document.createElement("arcgis-expand");o.view=this.mapView,o.appendChild(e);let l=this.enableHome?2:1;this.mapView.ui.add(s?o:e,{position:this.position,index:i>-1?i+l:1}),this._widgets.push(t)}}_showLegend(){this._showLegendWidget=!this._showLegendWidget,this._showTools=!1,this._toggleEllipsisTools()}_search(){this._showSearchWidget=!this._showSearchWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleBasemapPicker(){this._showBasemapWidget=!this._showBasemapWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleLayerListWidget(){this._showLayersListWidget=!this._showLayersListWidget,this._showTools=!1,this._toggleEllipsisTools()}_toggleFloorFilter(){this._showFloorFilter=!this._showFloorFilter,this._showTools=!1,this._toggleEllipsisTools()}_onSelectionToolClick(){this._showSelectionTools=!this._showSelectionTools,this._showTools=!1,this._toggleEllipsisTools()}_toggleSelectionTool(t){t==="rectangle"?(this._lassoSelectionToolActive=!1,this._rectangleSelectionToolActive=!this._rectangleSelectionToolActive):t==="freehandPolygon"&&(this._rectangleSelectionToolActive=!1,this._lassoSelectionToolActive=!this._lassoSelectionToolActive),this._selectionToolElement.value?.toggleSelectionTool(t,this._rectangleSelectionToolActive||this._lassoSelectionToolActive)}_toggleTools(){this._showTools||(this._showSelectionTools=!1,this._showBasemapWidget=!1,this._showLayersListWidget=!1,this._showSearchWidget=!1,this._showLegendWidget=!1,this._showFloorFilter=!1),this._rectangleSelectionToolActive?this._toggleSelectionTool("rectangle"):this._lassoSelectionToolActive&&this._toggleSelectionTool("freehandPolygon"),this._showTools=!this._showTools,this._toggleEllipsisTools(),this._updateTools(this.parentComponentWidth)}_toggleEllipsisTools(){this._showEllipsisTools=!this._showEllipsisTools}};b("map-tools",m);export{m as MapTools};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"./M3NML7ZV.js";import d from"./QU25YPPX.js";import"./VVZAS55G.js";import"./US5FON7D.js";import"./AE5HNAOV.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as F}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as L}from"./2I5LGZNX.js";import{E as u,F as c,G as w,I as x,J as I,h as m,i as l,l as _,q as p,t as y}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([E,S,$,,{c:d,d:g,g:b},,v])=>{var T=m`@layer{:host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.notice-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500}.feature-list-popup-title-small{font-size:small}.feature-list-popup-title-small-ellipsis{font-size:small;white-space:nowrap!important;text-overflow:ellipsis;overflow:hidden}.popup-title{padding:0 5px;word-break:break-word}.profile-img{margin:0 5px;min-width:32px}.like-container{display:flex;align-items:center;gap:5px;color:gray!important;font-style:italic}.feature-symbol{padding:0 3px;min-width:30px;display:flex;justify-content:center}.search{padding:10px;background-color:var(--calcite-color-surface-2)!important;border-block-end:1px solid var(--calcite-color-border-3)}}`,f=class extends w{constructor(){super(),this.selectedLayerId="",this.noFeaturesFoundMsg="",this.pageSize=100,this.highlightOnMap=!1,this.highlightOnHover=!1,this.textSize="large",this.showInitialLoading=!0,this.showErrorWhenNoFeatures=!1,this.showUserImageInList=!1,this.showFeatureSymbol=!1,this.applyLayerViewFilter=!1,this.showFullTitle=!0,this.filterByMapExtent=!1,this._featureItems=[],this._featuresCount=0,this._isLoading=!1,this._searchPlaceHolder="",this._fullTextSearchInfo=[],this._translations=F({name:"feature-list",blocking:!0}),this._pagination=u(),this._calciteList=u(),this._validFieldTypes=["small-integer","integer","big-integer","single","long"],this._abbreviatedLikeCount="",this._likeFieldAvailable=!1,this._searchExpression="",this.featureClick=p(),this.featureSelect=p(),this.listenOn(window,"selectedLanguageUpdated",this.selectedLanguageUpdated)}static{this.properties={selectedLayerId:1,mapView:0,noFeaturesFoundMsg:1,pageSize:9,highlightOnMap:5,highlightOnHover:5,sortingInfo:0,whereClause:1,textSize:1,showInitialLoading:5,showErrorWhenNoFeatures:5,showUserImageInList:5,showFeatureSymbol:5,applyLayerViewFilter:5,reportingOptions:0,showFullTitle:5,filterByMapExtent:5,_featureItems:16,_featuresCount:16,_isLoading:16,_searchPlaceHolder:16,_fullTextSearchInfo:16,_translations:16}}static{this.styles=T}static{this.shadowRootOptions=y}willUpdate(e){e.has("selectedLayerId")&&this.selectedLayerWatchHandler(),e.has("sortingInfo")&&this.sortingInfoWatchHandler(),e.has("whereClause")&&this.whereClauseHandler(),e.has("filterByMapExtent")&&this.hasUpdated&&this.filterByMapExtentWatchHandler(this.filterByMapExtent)}async selectedLayerWatchHandler(){this._selectedLayer=this.mapView&&await g(this.mapView,this.selectedLayerId),await this.initializeFeatureItems()}async sortingInfoWatchHandler(){await this.initializeFeatureItems()}async whereClauseHandler(){await this.initializeFeatureItems()}async filterByMapExtentWatchHandler(e){e?this.initializeMapExtentFilter():this._filterByMapExtentHandle&&this._filterByMapExtentHandle.remove()}async refresh(e){if(e&&this._pagination.value){let t={target:{startItem:this._pagination.value.startItem}};await this.pageChanged(t)}else this._searchExpression?await this._searchFullText():await this.initializeFeatureItems()}async selectedLanguageUpdated(e){if(this._pagination.value){let t={target:{startItem:this._pagination.value.startItem}};await this.pageChanged(t)}else await this.initializeFeatureItems()}async load(){this._isLoading=!!this.showInitialLoading,this._popupUtils=new v,this.mapView&&this.selectedLayerId&&(this._selectedLayer=await g(this.mapView,this.selectedLayerId),this._getFullTextSearchInfo()),this.filterByMapExtent&&this.initializeMapExtentFilter()}async loaded(){await this.initializeFeatureItems()}render(){let e=this._canShowFullTextSearch();return l`<calcite-panel>${e&&l`<calcite-input class=search clearable icon=search @calciteInputChange=${this._searchTextChanged} .placeholder=${this._searchPlaceHolder} title type=search></calcite-input>`||""}${this._isLoading&&l`<calcite-loader label scale=m></calcite-loader>`||""}${this.showErrorWhenNoFeatures&&this._featureItems.length===0&&!this._isLoading&&l`<calcite-notice class="notice-msg" icon=feature-details kind=info open><div slot=message>${this.filterByMapExtent?this._translations.featureErrorMsgInCurrentMapView:this.noFeaturesFoundMsg?this.noFeaturesFoundMsg:this._translations.featureErrorMsg}</div></calcite-notice>`||""}<calcite-list class=${x(this.textSize==="small"&&!this.showFullTitle?"overflow-hidden":"")} label selection-appearance=border selection-mode=none ${c(this._calciteList)}>${!this._isLoading&&this._featureItems.length>0&&l`<div>${this.filterByMapExtent&&this.getExtentNotice()||""}${this._featureItems}</div>`||""}</calcite-list>${this.pageSize&&this._featuresCount>this.pageSize&&l`<div class="width-full" slot=footer><calcite-pagination class="pagination" @calcitePaginationChange=${this.pageChanged} .pageSize=${this.pageSize} start-item=1 .totalItems=${this._featuresCount} ${c(this._pagination)}></calcite-pagination></div>`||""}</calcite-panel>`}async getWhereCondition(){let e="1=1";if(this.whereClause&&(e=this.whereClause),this._selectedLayer?.definitionExpression&&(e=e+" AND "+this._selectedLayer.definitionExpression),this.applyLayerViewFilter){let t=this.mapView&&await d(this.mapView,this.selectedLayerId);t?.filter?.where&&(e=e+" AND "+t.filter.where)}return e}async initializeFeatureItems(){if(this._selectedLayer){this._pagination.value?.goTo("start"),this._isLoading=!!this.showInitialLoading,this._featureItems=await this.queryPage(0);let e={where:await this.getWhereCondition(),geometry:this.filterByMapExtent?this.mapView?.extent:null};this._featuresCount=await this._selectedLayer?.queryFeatureCount(e),this._isLoading=!1}}initializeMapExtentFilter(){this._filterByMapExtentHandle=$.when(()=>this.mapView?.stationary,()=>{this.initializeFeatureItems()},{initial:!0})}async pageChanged(e){this._isLoading=!0,this._highlightHandle&&(this._highlightHandle.remove(),this._highlightHandle=void 0);let t=e.target.startItem-1;this._featureItems=await this.queryPage(t),this._isLoading=!1}_canShowFullTextSearch(){return this._selectedLayer?.capabilities?.query?.supportsFullTextSearch&&this._selectedLayer.indexes.items.filter(e=>e.indexType=="FullText").length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],this._selectedLayer?.capabilities?.query?.supportsFullTextSearch){let e=this._selectedLayer.indexes?.filter(t=>t.indexType=="FullText");if(e?.length){let t=[];e.forEach(i=>{t.push(...i.fields.split(","))});let s=[];t.forEach(i=>{let a=this._selectedLayer?.getField(i.trim());s.push(a?.alias||"")}),this._searchPlaceHolder=this._translations.searchPlaceholder?this._translations.searchPlaceholder.replace("{{field_names}}",s.join(", ")):"",this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}async _searchTextChanged(e){this._fullTextSearchInfo.forEach(t=>{t.searchTerm=e.target.value}),await this._searchFullText()}async _searchFullText(){this._searchExpression&&this._clearSearchDefinitionExpression();let e=[];if(this._fullTextSearchInfo&&this._fullTextSearchInfo[0].searchTerm){let t=this._selectedLayer?.createQuery();t&&(t.fullText=this._fullTextSearchInfo,e=await this._selectedLayer?.queryObjectIds(t),await this._updateSearchDefinitionExpression(e?.length?e:[-1]))}await this.initializeFeatureItems()}async _updateSearchDefinitionExpression(e){if(this._selectedLayer){let t=this._selectedLayer.definitionExpression;if(e?.length){let s=`objectId in(${e})`;this._selectedLayer.definitionExpression=this._searchExpression&&t&&t?.indexOf(this._searchExpression)>-1?t.replace(this._searchExpression,s):t?`${t} AND (${s})`:s,this._searchExpression=s}else this._clearSearchDefinitionExpression()}}_clearSearchDefinitionExpression(){if(this._selectedLayer){let e=this._selectedLayer?.definitionExpression;this._searchExpression&&e&&e?.indexOf(this._searchExpression)>-1&&(e?.indexOf(" AND ("+this._searchExpression)>-1?this._selectedLayer.definitionExpression=e.replace(` AND (${this._searchExpression})`,""):this._selectedLayer.definitionExpression=e.replace(this._searchExpression,""))}this._searchExpression=""}async featureClicked(e,t){if(this.featureClick.emit(),this.clearHighlights(),this.highlightOnMap){let s=Number(e.target.value),i=this.mapView&&await d(this.mapView,this.selectedLayerId);this._highlightHandle=i&&this.mapView?await b([s],i,this.mapView,!0):void 0}await this.emitSelectedFeature(t)}async emitSelectedFeature(e){let t=e.layer,s=t.createQuery();s.returnGeometry=!0;let i=Number(e.getObjectId());if(!Number.isNaN(i)&&s){s.objectIds=[i];let a=await t.queryFeatures(s);this.featureSelect.emit(a.features[0])}}async onFeatureHover(e){if(this.clearHighlights(),this.highlightOnHover){let t=Number(e.getObjectId()),s=this.mapView&&await d(this.mapView,this.selectedLayerId);s&&(this._highlightHandle=s.highlight([t],{name:"temporary"}))}}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}async queryPage(e){let t=this._selectedLayer;if(t){let s=this.sortingInfo?.field?this.sortingInfo.field:t.objectIdField,i=this.sortingInfo?.order?this.sortingInfo.order:"desc",a=await this.getWhereCondition(),r={start:e,num:this.pageSize,outFields:["*"],returnGeometry:!0,where:a,outSpatialReference:this.mapView?.spatialReference.toJSON(),geometry:this.filterByMapExtent?this.mapView?.extent:null};s&&i&&(r.orderByFields=[s.toString()+" "+i]);let n=await t.queryFeatures(r);return await this.createFeatureItem(n)}else return}async createFeatureItem(e){let t=e?.features,s=this.reportingOptions&&this.reportingOptions[this.selectedLayerId]?.like,i=t.map(async a=>{let r=this.mapView?.map&&await this._popupUtils?.getPopupTitle(a,this.mapView.map)||"",n,h;return this.showUserImageInList&&this._selectedLayer?.editFieldsInfo?.creatorField&&(n=await this.getUserInformation(a)),this.showFeatureSymbol&&(h=await this.getFeatureSymbol(a)),s&&this.getAbbreviatedLikeCount(a),this.getFeatureItem(a,r,h,n)});return Promise.all(i)}getExtentNotice(){return l`<calcite-notice class="notice-msg" icon=extent-filter kind=brand open scale=s><div slot=message>${this._translations.extentFilterMsg}</div></calcite-notice>`}getAbbreviatedLikeCount(e){let t=this._selectedLayer;if(t){let s=this.reportingOptions&&this.reportingOptions[t.id].likeField;t.fields.forEach(i=>{if(this._validFieldTypes.indexOf(i.type)>-1&&i.name===s&&this.reportingOptions&&this.reportingOptions[t.id].like){this._likeFieldAvailable=!0;let a=e.attributes[s]||0;a>999&&this._translations.millions_value&&this._translations.thousands_value&&(a=a>999999?this._translations.millions_value.replace("{{millions_value}}",Math.floor(a/1e6).toString()):this._translations.thousands_value.replace("{{thousands_value}}",Math.floor(a/1e3).toString())),this._abbreviatedLikeCount=a}})}}getFeatureItem(e,t,s,i){if(this._selectedLayer?.id&&this._calciteList.value){let a=e.attributes[this._selectedLayer.objectIdField].toString();t=t??a;let r=Number(e.attributes[this.reportingOptions?.[this._selectedLayer.id].likeField||""]).toLocaleString(),n=this.textSize==="small"&&!this.showFullTitle?"feature-list-popup-title-small-ellipsis":this.textSize==="small"?"feature-list-popup-title-small":"feature-list-popup-title",h=this.showUserImageInList?115:65,C=this._calciteList.value.offsetWidth-h;return l`<calcite-list-item @mouseleave=${()=>{this.clearHighlights()}} @mouseover=${()=>{this.onFeatureHover(e)}} @calciteListItemSelect=${o=>{this.featureClicked(o,e)}} .value=${a}>${this.showUserImageInList&&l`<calcite-avatar class=profile-img .fullName=${i?.fullName} scale=m slot=content-start .thumbnail=${i?.userProfileUrl} .userId=${i?.id} .username=${i?.fullName?i.username:void 0}></calcite-avatar>`||""}${this.showFeatureSymbol&&s&&l`<div class=feature-symbol slot=content-start ${c(o=>o&&o.replaceChildren(s))}></div>`||""}<div class=${`popup-title ${n}`} slot=content-start style=${I({maxWidth:this.textSize==="large"?"none":`${C}px`})}>${t}</div>${this._likeFieldAvailable&&l`<div class=like-container id=${a.concat("like")??_} slot=content-end><span>${this._abbreviatedLikeCount}</span><calcite-icon aria-hidden=true icon=thumbs-up scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${a.concat("like")}>${r}</calcite-tooltip></div>`||""}<calcite-icon aria-hidden=true flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`}else return}async getUserInformation(e){let t=this._selectedLayer?.editFieldsInfo?.creatorField;if(t){e.attributes.hasOwnProperty(t.toLowerCase())?t=t.toLowerCase():e.attributes.hasOwnProperty(t.toUpperCase())&&(t=t.toUpperCase());let s=`${E.portalUrl}/sharing/rest/community/users/${e.attributes[t]}?f=json&returnUserLicensedItems=true`,i=this.mapView?.map?.portalItem.portal?.credential?.token;i&&(s+=`&token=${i}`);let a=await(await fetch(s)).json(),r=a?.username??e.attributes[t],n=`${E.portalUrl}/sharing/rest/community/users/${r}/info/blob.png`;return a?.access&&i&&(n+=`?token=${i}`),a.userProfileUrl=n,a}else return}async getFeatureSymbol(e){let t=document.createElement("div");return await S?.getDisplayedSymbol(e).then(async s=>{if(s&&await S?.renderPreviewHTML(s,{node:t}),t.children?.length){let i=t.children[0];if(i){let a=Number(i.getAttribute("height")),r=Number(i.getAttribute("width"));r>30&&(t.setAttribute("width","30"),i.setAttribute("width","30")),a>30&&(t.setAttribute("height","30"),i.setAttribute("height","30")),i.setAttribute("viewBox",`0 0 ${r} ${a}`),t.setAttribute("viewBox",`0 0 ${r} ${a}`)}}}),t}};L("feature-list",f);return f},"config","symbols/support/symbolUtils","core/reactiveUtils",a,b,d,e)
2
+ import e from"./M3NML7ZV.js";import d from"./QU25YPPX.js";import"./VVZAS55G.js";import"./US5FON7D.js";import"./AE5HNAOV.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as F}from"./XF5N3NI5.js";import"./UBPOT5V3.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import{b as L}from"./2I5LGZNX.js";import{E as u,F as c,G as w,I as x,J as I,h as m,i as l,l as _,q as p,t as y}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([E,S,$,,{c:d,d:g,g:b},,v])=>{var T=m`@layer{:host{display:block}.width-full{width:100%}.pagination{display:flex;justify-content:center}.notice-msg{padding:10px;width:calc(100% - 20px)}.feature-list-popup-title{font-weight:500}.feature-list-popup-title-small{font-size:small}.feature-list-popup-title-small-ellipsis{font-size:small;white-space:nowrap!important;text-overflow:ellipsis;overflow:hidden}.popup-title{padding:0 5px;word-break:break-word}.profile-img{margin:0 5px;min-width:32px}.like-container{display:flex;align-items:center;gap:5px;color:gray!important;font-style:italic}.feature-symbol{padding:0 3px;min-width:30px;display:flex;justify-content:center}.search{padding:10px;background-color:var(--calcite-color-surface-2)!important;border-block-end:1px solid var(--calcite-color-border-3)}}`,f=class extends w{constructor(){super(),this.selectedLayerId="",this.noFeaturesFoundMsg="",this.pageSize=100,this.highlightOnMap=!1,this.highlightOnHover=!1,this.textSize="large",this.showInitialLoading=!0,this.showErrorWhenNoFeatures=!1,this.showUserImageInList=!1,this.showFeatureSymbol=!1,this.applyLayerViewFilter=!1,this.showFullTitle=!0,this.filterByMapExtent=!1,this._featureItems=[],this._featuresCount=0,this._isLoading=!1,this._searchPlaceHolder="",this._fullTextSearchInfo=[],this._translations=F({name:"feature-list",blocking:!0}),this._pagination=u(),this._calciteList=u(),this._validFieldTypes=["small-integer","integer","big-integer","single","long"],this._abbreviatedLikeCount="",this._likeFieldAvailable=!1,this._searchExpression="",this.featureClick=p(),this.featureSelect=p(),this.listenOn(window,"selectedLanguageUpdated",this.selectedLanguageUpdated)}static{this.properties={selectedLayerId:1,mapView:0,noFeaturesFoundMsg:1,pageSize:9,highlightOnMap:5,highlightOnHover:5,sortingInfo:0,whereClause:1,textSize:1,showInitialLoading:5,showErrorWhenNoFeatures:5,showUserImageInList:5,showFeatureSymbol:5,applyLayerViewFilter:5,reportingOptions:0,showFullTitle:5,filterByMapExtent:5,_featureItems:16,_featuresCount:16,_isLoading:16,_searchPlaceHolder:16,_fullTextSearchInfo:16,_translations:16}}static{this.styles=T}static{this.shadowRootOptions=y}willUpdate(e){e.has("selectedLayerId")&&this.selectedLayerWatchHandler(),e.has("sortingInfo")&&this.sortingInfoWatchHandler(),e.has("whereClause")&&this.whereClauseHandler(),e.has("filterByMapExtent")&&this.hasUpdated&&this.filterByMapExtentWatchHandler(this.filterByMapExtent)}async selectedLayerWatchHandler(){this._selectedLayer=this.mapView&&await g(this.mapView,this.selectedLayerId),await this.initializeFeatureItems()}async sortingInfoWatchHandler(){await this.initializeFeatureItems()}async whereClauseHandler(){await this.initializeFeatureItems()}async filterByMapExtentWatchHandler(e){e?this.initializeMapExtentFilter():this._filterByMapExtentHandle&&this._filterByMapExtentHandle.remove()}async refresh(e){if(e&&this._pagination.value){let t={target:{startItem:this._pagination.value.startItem}};await this.pageChanged(t)}else this._searchExpression?await this._searchFullText():await this.initializeFeatureItems()}async selectedLanguageUpdated(e){if(this._pagination.value){let t={target:{startItem:this._pagination.value.startItem}};await this.pageChanged(t)}else await this.initializeFeatureItems()}async load(){this._isLoading=!!this.showInitialLoading,this._popupUtils=new v,this.mapView&&this.selectedLayerId&&(this._selectedLayer=await g(this.mapView,this.selectedLayerId),this._getFullTextSearchInfo()),this.filterByMapExtent&&this.initializeMapExtentFilter()}async loaded(){await this.initializeFeatureItems()}render(){let e=this._canShowFullTextSearch();return l`<calcite-panel>${e&&l`<calcite-input class=search clearable icon=search @calciteInputChange=${this._searchTextChanged} .placeholder=${this._searchPlaceHolder} title type=search></calcite-input>`||""}${this._isLoading&&l`<calcite-loader label scale=m></calcite-loader>`||""}${this.showErrorWhenNoFeatures&&this._featureItems.length===0&&!this._isLoading&&l`<calcite-notice class="notice-msg" icon=feature-details kind=info open><div slot=message>${this.filterByMapExtent?this._translations.featureErrorMsgInCurrentMapView:this.noFeaturesFoundMsg?this.noFeaturesFoundMsg:this._translations.featureErrorMsg}</div></calcite-notice>`||""}<calcite-list class=${x(this.textSize==="small"&&!this.showFullTitle?"overflow-hidden":"")} label selection-appearance=border selection-mode=none ${c(this._calciteList)}>${!this._isLoading&&this._featureItems.length>0&&l`<div>${this.filterByMapExtent&&this.getExtentNotice()||""}${this._featureItems}</div>`||""}</calcite-list>${this.pageSize&&this._featuresCount>this.pageSize&&l`<div class="width-full" slot=footer><calcite-pagination class="pagination" @calcitePaginationChange=${this.pageChanged} .pageSize=${this.pageSize} start-item=1 .totalItems=${this._featuresCount} ${c(this._pagination)}></calcite-pagination></div>`||""}</calcite-panel>`}async getWhereCondition(){let e="1=1";if(this.whereClause&&(e=this.whereClause),this._selectedLayer?.definitionExpression&&(e=e+" AND "+this._selectedLayer.definitionExpression),this.applyLayerViewFilter){let t=this.mapView&&await d(this.mapView,this.selectedLayerId);t?.filter?.where&&(e=e+" AND "+t.filter.where)}return e}async initializeFeatureItems(){if(this._selectedLayer){this._pagination.value?.goTo("start"),this._isLoading=!!this.showInitialLoading,this._featureItems=await this.queryPage(0);let e={where:await this.getWhereCondition(),geometry:this.filterByMapExtent?this.mapView?.extent:null};this._featuresCount=await this._selectedLayer?.queryFeatureCount(e),this._isLoading=!1}}initializeMapExtentFilter(){this._filterByMapExtentHandle=$.when(()=>this.mapView?.stationary,()=>{this.initializeFeatureItems()},{initial:!0})}async pageChanged(e){this._isLoading=!0,this._highlightHandle&&(this._highlightHandle.remove(),this._highlightHandle=void 0);let t=e.target.startItem-1;this._featureItems=await this.queryPage(t),this._isLoading=!1}_canShowFullTextSearch(){return this._selectedLayer?.capabilities?.query?.supportsFullTextSearch&&this._selectedLayer.indexes.items.filter(e=>e.indexType=="FullText").length>0}_getFullTextSearchInfo(){if(this._fullTextSearchInfo=[],this._selectedLayer?.capabilities?.query?.supportsFullTextSearch){let e=this._selectedLayer.indexes?.filter(t=>t.indexType=="FullText");if(e?.length){let t=[];e.forEach(i=>{t.push(...i.fields.split(","))});let s=[];t.forEach(i=>{let a=this._selectedLayer?.getField(i.trim());s.push(a?.alias||"")}),this._searchPlaceHolder=this._translations.searchPlaceholder?this._translations.searchPlaceholder.replace("{{field_names}}",s.join(", ")):"",this._fullTextSearchInfo.push({onFields:["*"],searchTerm:"",searchType:"prefix"})}}}async _searchTextChanged(e){this._fullTextSearchInfo.forEach(t=>{t.searchTerm=e.target.value}),await this._searchFullText()}async _searchFullText(){this._searchExpression&&this._clearSearchDefinitionExpression();let e=[];if(this._fullTextSearchInfo&&this._fullTextSearchInfo[0].searchTerm){let t=this._selectedLayer?.createQuery();t&&(t.fullText=this._fullTextSearchInfo,e=await this._selectedLayer?.queryObjectIds(t),await this._updateSearchDefinitionExpression(e?.length?e:[-1]))}await this.initializeFeatureItems()}async _updateSearchDefinitionExpression(e){if(this._selectedLayer){let t=this._selectedLayer.definitionExpression;if(e?.length){let s=`objectId in(${e})`;this._selectedLayer.definitionExpression=this._searchExpression&&t&&t?.indexOf(this._searchExpression)>-1?t.replace(this._searchExpression,s):t?`${t} AND (${s})`:s,this._searchExpression=s}else this._clearSearchDefinitionExpression()}}_clearSearchDefinitionExpression(){if(this._selectedLayer){let e=this._selectedLayer?.definitionExpression;this._searchExpression&&e&&e?.indexOf(this._searchExpression)>-1&&(e?.indexOf(" AND ("+this._searchExpression)>-1?this._selectedLayer.definitionExpression=e.replace(` AND (${this._searchExpression})`,""):this._selectedLayer.definitionExpression=e.replace(this._searchExpression,""))}this._searchExpression=""}async featureClicked(e,t){if(this.featureClick.emit(),this.clearHighlights(),this.highlightOnMap){let s=Number(e.target.value),i=this.mapView&&await d(this.mapView,this.selectedLayerId);this._highlightHandle=i&&this.mapView?await b([s],i,this.mapView,!0):void 0}await this.emitSelectedFeature(t)}async emitSelectedFeature(e){let t=e.layer,s=t.createQuery();s.returnGeometry=!0;let i=Number(e.getObjectId());if(!Number.isNaN(i)&&s){s.objectIds=[i];let a=await t.queryFeatures(s);this.featureSelect.emit(a.features[0])}}async onFeatureHover(e){if(this.clearHighlights(),this.highlightOnHover){let t=Number(e.getObjectId()),s=this.mapView&&await d(this.mapView,this.selectedLayerId);s&&(this._highlightHandle=s.highlight([t],{name:"temporary"}))}}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}async queryPage(e){let t=this._selectedLayer;if(t){let s=this.sortingInfo?.field?this.sortingInfo.field:t.objectIdField,i=this.sortingInfo?.order?this.sortingInfo.order:"desc",a=await this.getWhereCondition(),r={start:e,num:this.pageSize,outFields:["*"],returnGeometry:!0,where:a,outSpatialReference:this.mapView?.spatialReference.toJSON(),geometry:this.filterByMapExtent?this.mapView?.extent:null};s&&i&&(r.orderByFields=[s.toString()+" "+i]);let n=await t.queryFeatures(r);return await this.createFeatureItem(n)}else return}async createFeatureItem(e){let t=e?.features,s=this.reportingOptions&&this.reportingOptions[this.selectedLayerId]?.like,i=t.map(async a=>{let r=this.mapView?.map&&await this._popupUtils?.getPopupTitle(a,this.mapView.map)||"",n,h;return this.showUserImageInList&&this._selectedLayer?.editFieldsInfo?.creatorField&&(n=await this.getUserInformation(a)),this.showFeatureSymbol&&(h=await this.getFeatureSymbol(a)),s&&this.getAbbreviatedLikeCount(a),this.getFeatureItem(a,r,h,n)});return Promise.all(i)}getExtentNotice(){return l`<calcite-notice class="notice-msg" icon=extent-filter kind=brand open scale=s><div slot=message>${this._translations.extentFilterMsg}</div></calcite-notice>`}getAbbreviatedLikeCount(e){let t=this._selectedLayer;if(t){let s=this.reportingOptions&&this.reportingOptions[t.id].likeField;t.fields.forEach(i=>{if(this._validFieldTypes.indexOf(i.type)>-1&&i.name===s&&this.reportingOptions&&this.reportingOptions[t.id].like){this._likeFieldAvailable=!0;let a=e.attributes[s]||0;a>999&&this._translations.millions_value&&this._translations.thousands_value&&(a=a>999999?this._translations.millions_value.replace("{{millions_value}}",Math.floor(a/1e6).toString()):this._translations.thousands_value.replace("{{thousands_value}}",Math.floor(a/1e3).toString())),this._abbreviatedLikeCount=a}})}}getFeatureItem(e,t,s,i){if(this._selectedLayer?.id&&this._calciteList.value){let a=e.attributes[this._selectedLayer.objectIdField].toString();t=t??a;let r=Number(e.attributes[this.reportingOptions?.[this._selectedLayer.id].likeField||""]).toLocaleString(),n=this.textSize==="small"&&!this.showFullTitle?"feature-list-popup-title-small-ellipsis":this.textSize==="small"?"feature-list-popup-title-small":"feature-list-popup-title",h=this.showUserImageInList?115:65,C=this._calciteList.value.offsetWidth-h;return l`<calcite-list-item @mouseleave=${()=>{this.clearHighlights()}} @mouseover=${()=>{this.onFeatureHover(e)}} @calciteListItemSelect=${o=>{this.featureClicked(o,e)}} .value=${a}>${this.showUserImageInList&&l`<calcite-avatar class=profile-img .fullName=${i?.fullName} scale=m slot=content-start .thumbnail=${i?.userProfileUrl} .userId=${i?.id} .username=${i?.fullName?i.username:void 0}></calcite-avatar>`||""}${this.showFeatureSymbol&&s&&l`<div class=feature-symbol slot=content-start ${c(o=>o&&o.replaceChildren(s))}></div>`||""}<div class=${`popup-title ${n}`} slot=content-start style=${I({maxWidth:this.textSize==="large"?"none":`${C}px`})}>${t}</div>${this._likeFieldAvailable&&l`<div class=like-container id=${a.concat("like")??_} slot=content-end><span>${this._abbreviatedLikeCount}</span><calcite-icon aria-hidden=true icon=thumbs-up scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${a.concat("like")}>${r}</calcite-tooltip></div>`||""}<calcite-icon aria-hidden=true flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`}else return}async getUserInformation(e){let t=this._selectedLayer?.editFieldsInfo?.creatorField;if(t){e.attributes.hasOwnProperty(t.toLowerCase())?t=t.toLowerCase():e.attributes.hasOwnProperty(t.toUpperCase())&&(t=t.toUpperCase());let s=`${E.portalUrl}/sharing/rest/community/users/${e.attributes[t]}?f=json&returnUserLicensedItems=true`,i=this.mapView?.map?.portalItem.portal?.credential?.token;i&&(s+=`&token=${i}`);let a=await(await fetch(s)).json(),r=a?.username??e.attributes[t],n=`${E.portalUrl}/sharing/rest/community/users/${r}/info/blob.png`;return a?.access&&i&&(n+=`?token=${i}`),a.userProfileUrl=n,a}else return}async getFeatureSymbol(e){let t=document.createElement("div");return await S?.getDisplayedSymbol(e).then(async s=>{if(s&&await S?.renderPreviewHTML(s,{node:t}),t.children?.length){let i=t.children[0];if(i){let a=Number(i.getAttribute("height")),r=Number(i.getAttribute("width"));r>30&&(t.setAttribute("width","30"),i.setAttribute("width","30")),a>30&&(t.setAttribute("height","30"),i.setAttribute("height","30")),i.setAttribute("viewBox",`0 0 ${r} ${a}`),t.setAttribute("viewBox",`0 0 ${r} ${a}`)}}}),t}};L("feature-list",f);return f},"config","symbols/support/symbolUtils","core/reactiveUtils",a,b,d,e)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as v}from"./MGEDATQ7.js";import{b}from"./2I5LGZNX.js";import{E as r,F as d,G as m,h as p,i as u,q as g}from"./FFF5HUPM.js";var _={heading:"Get Started",card1:{heading:"What's new in the app"},card2:{heading:"Deploy a solution"},card3:{heading:"Manage a deployment"},card4:{heading:"AI Assistant"}},w={heading:"Documentation",card1:{heading:"Help"},card2:{heading:"What's new"},card3:{heading:"FAQ"},card4:{heading:"ArcGIS Blog"}},E={heading:"Support",card1:{heading:"Esri Community"},card2:{heading:"ArcGIS Ideas"},card3:{heading:"Esri Video"},card4:{heading:"Technical support"}},t={getStarted:_,documentation:w,support:E},R=p`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}:host{display:block;position:relative;height:100%}.position-relative{position:relative}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-surface-3)}.panel-override{--calcite-panel-background-color: var(--calcite-color-surface-3);--calcite-panel-border-color: none}.z-index-1{z-index:1}calcite-shell{background-color:unset;height:auto}.section-spacing{margin-top:var(--calcite-spacing-lg)}`,l=class extends m{constructor(){super(),this._translations=v({name:"solutions-resources-shell",blocking:!0}),this._mainPanelRef=r(),this._getStartedSectionRef=r(),this._documentationSectionRef=r(),this._supportSectionRef=r(),this._panelFixed=!1,this.sortTypeChanged=g(),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected)}static{this.properties={_translations:16}}static{this.styles=R}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let i=e.shadowRoot.querySelector(".content-wrapper");i&&(i.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(i=>{i.forEach(a=>{if(a.type==="attributes"&&a.attributeName==="tabindex"){let s=a.target;s.classList.contains("content-wrapper")&&s.tabIndex===0&&(s.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let i=e.shadowRoot.querySelector(".content-wrapper");i&&this._panelObserver.observe(i,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._translations;return u`<calcite-shell class="position-relative"><calcite-panel class="border-override header-override panel-override z-index-1" ${d(this._mainPanelRef)}><div class="section-spacing" ${d(this._getStartedSectionRef)}><solutions-resources-section .heading=${e.getStarted.heading} .subheading=${e.getStarted.subheading} .cards=${[{meridianIcon:"value",heading:e.getStarted.card1.heading,description:e.getStarted.card1.description,url:"https://links.esri.com/solutions/whats-new-in-the-app",headingEn:t.getStarted.card1.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"install",heading:e.getStarted.card2.heading,description:e.getStarted.card2.description,url:"https://links.esri.com/solutions/deploy-a-solution",headingEn:t.getStarted.card2.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"keys",heading:e.getStarted.card3.heading,description:e.getStarted.card3.description,url:"https://links.esri.com/solutions/manage-a-deployment",headingEn:t.getStarted.card3.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"speech-bubbles",heading:e.getStarted.card4.heading,description:e.getStarted.card4.description,url:"https://links.esri.com/solutions/ai-assistant",headingEn:t.getStarted.card4.heading,sectionHeadingEn:t.getStarted.heading}]}></solutions-resources-section></div><div ${d(this._documentationSectionRef)}><solutions-resources-section .heading=${e.documentation.heading} .subheading=${e.documentation.subheading} .cards=${[{meridianIcon:"search-files",heading:e.documentation.card1.heading,description:e.documentation.card1.description,url:"https://links.esri.com/solutions/help",headingEn:t.documentation.card1.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"value",heading:e.documentation.card2.heading,description:e.documentation.card2.description,url:"https://links.esri.com/solutions/whats-new",headingEn:t.documentation.card2.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"faq",heading:e.documentation.card3.heading,description:e.documentation.card3.description,url:"https://links.esri.com/solutions/faq",headingEn:t.documentation.card3.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"arcmap-blog",heading:e.documentation.card4.heading,description:e.documentation.card4.description,url:"https://links.esri.com/solutions/arcgis-blogs",headingEn:t.documentation.card4.heading,sectionHeadingEn:t.documentation.heading}]}></solutions-resources-section></div><div ${d(this._supportSectionRef)}><solutions-resources-section .heading=${e.support.heading} .subheading=${e.support.subheading} .cards=${[{meridianIcon:"esri-community",heading:e.support.card1.heading,description:e.support.card1.description,url:"https://links.esri.com/solutions/esri-community",headingEn:t.support.card1.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"idea",heading:e.support.card2.heading,description:e.support.card2.description,url:"https://links.esri.com/solutions/arcgis-ideas",headingEn:t.support.card2.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"video",heading:e.support.card3.heading,description:e.support.card3.description,url:"https://links.esri.com/solutions/esri-video",headingEn:t.support.card3.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"support",heading:e.support.card4.heading,description:e.support.card4.description,url:"https://links.esri.com/solutions/technical-support",headingEn:t.support.card4.heading,sectionHeadingEn:t.support.heading}]}></solutions-resources-section></div></calcite-panel></calcite-shell>`}async scrollToSection(e){let i={getStarted:this._getStartedSectionRef,documentation:this._documentationSectionRef,support:this._supportSectionRef}[e];if(!i.value||!this._mainPanelRef.value)return;let a=this._mainPanelRef.value,s=()=>{let n=this.el;for(;n&&n!==document.body;){let o=window.getComputedStyle(n),c=o.overflowY,h=o.overflow;if(n.scrollHeight>n.clientHeight&&(c==="auto"||c==="scroll"||h==="auto"||h==="scroll")&&i.value){let f=n.getBoundingClientRect(),S=i.value.getBoundingClientRect().top-f.top+n.scrollTop;n.scrollTo({top:S,behavior:"smooth"});return}n=n.parentElement}if(a.shadowRoot){let o=a.shadowRoot.querySelector(".content-wrapper");if(o&&i.value){let c=i.value.offsetTop;if(o.scrollHeight>o.clientHeight){o.scrollTo({top:c,behavior:"smooth"});return}}}i.value&&i.value.scrollIntoView({behavior:"smooth",block:"start"})};typeof a.componentOnReady=="function"?(await a.componentOnReady(),s()):(await new Promise(n=>setTimeout(n,100)),s())}_handleDeployAppTabSelected(e){e.detail==="resources"&&this.sortTypeChanged.emit("")}};b("solutions-resources-shell",l);export{l as a};
2
+ import{a as v}from"./XF5N3NI5.js";import{b}from"./2I5LGZNX.js";import{E as r,F as d,G as m,h as p,i as u,q as g}from"./FFF5HUPM.js";var _={heading:"Get Started",card1:{heading:"What's new in the app"},card2:{heading:"Deploy a solution"},card3:{heading:"Manage a deployment"},card4:{heading:"AI Assistant"}},w={heading:"Documentation",card1:{heading:"Help"},card2:{heading:"What's new"},card3:{heading:"FAQ"},card4:{heading:"ArcGIS Blog"}},E={heading:"Support",card1:{heading:"Esri Community"},card2:{heading:"ArcGIS Ideas"},card3:{heading:"Esri Video"},card4:{heading:"Technical support"}},t={getStarted:_,documentation:w,support:E},R=p`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}:host{display:block;position:relative;height:100%}.position-relative{position:relative}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-surface-3)}.panel-override{--calcite-panel-background-color: var(--calcite-color-surface-3);--calcite-panel-border-color: none}.z-index-1{z-index:1}calcite-shell{background-color:unset;height:auto}.section-spacing{margin-top:var(--calcite-spacing-lg)}`,l=class extends m{constructor(){super(),this._translations=v({name:"solutions-resources-shell",blocking:!0}),this._mainPanelRef=r(),this._getStartedSectionRef=r(),this._documentationSectionRef=r(),this._supportSectionRef=r(),this._panelFixed=!1,this.sortTypeChanged=g(),this.listenOn(window,"deployAppTabSelected",this._handleDeployAppTabSelected)}static{this.properties={_translations:16}}static{this.styles=R}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let i=e.shadowRoot.querySelector(".content-wrapper");i&&(i.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(i=>{i.forEach(a=>{if(a.type==="attributes"&&a.attributeName==="tabindex"){let s=a.target;s.classList.contains("content-wrapper")&&s.tabIndex===0&&(s.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let i=e.shadowRoot.querySelector(".content-wrapper");i&&this._panelObserver.observe(i,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._translations;return u`<calcite-shell class="position-relative"><calcite-panel class="border-override header-override panel-override z-index-1" ${d(this._mainPanelRef)}><div class="section-spacing" ${d(this._getStartedSectionRef)}><solutions-resources-section .heading=${e.getStarted.heading} .subheading=${e.getStarted.subheading} .cards=${[{meridianIcon:"value",heading:e.getStarted.card1.heading,description:e.getStarted.card1.description,url:"https://links.esri.com/solutions/whats-new-in-the-app",headingEn:t.getStarted.card1.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"install",heading:e.getStarted.card2.heading,description:e.getStarted.card2.description,url:"https://links.esri.com/solutions/deploy-a-solution",headingEn:t.getStarted.card2.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"keys",heading:e.getStarted.card3.heading,description:e.getStarted.card3.description,url:"https://links.esri.com/solutions/manage-a-deployment",headingEn:t.getStarted.card3.heading,sectionHeadingEn:t.getStarted.heading},{meridianIcon:"speech-bubbles",heading:e.getStarted.card4.heading,description:e.getStarted.card4.description,url:"https://links.esri.com/solutions/ai-assistant",headingEn:t.getStarted.card4.heading,sectionHeadingEn:t.getStarted.heading}]}></solutions-resources-section></div><div ${d(this._documentationSectionRef)}><solutions-resources-section .heading=${e.documentation.heading} .subheading=${e.documentation.subheading} .cards=${[{meridianIcon:"search-files",heading:e.documentation.card1.heading,description:e.documentation.card1.description,url:"https://links.esri.com/solutions/help",headingEn:t.documentation.card1.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"value",heading:e.documentation.card2.heading,description:e.documentation.card2.description,url:"https://links.esri.com/solutions/whats-new",headingEn:t.documentation.card2.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"faq",heading:e.documentation.card3.heading,description:e.documentation.card3.description,url:"https://links.esri.com/solutions/faq",headingEn:t.documentation.card3.heading,sectionHeadingEn:t.documentation.heading},{meridianIcon:"arcmap-blog",heading:e.documentation.card4.heading,description:e.documentation.card4.description,url:"https://links.esri.com/solutions/arcgis-blogs",headingEn:t.documentation.card4.heading,sectionHeadingEn:t.documentation.heading}]}></solutions-resources-section></div><div ${d(this._supportSectionRef)}><solutions-resources-section .heading=${e.support.heading} .subheading=${e.support.subheading} .cards=${[{meridianIcon:"esri-community",heading:e.support.card1.heading,description:e.support.card1.description,url:"https://links.esri.com/solutions/esri-community",headingEn:t.support.card1.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"idea",heading:e.support.card2.heading,description:e.support.card2.description,url:"https://links.esri.com/solutions/arcgis-ideas",headingEn:t.support.card2.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"video",heading:e.support.card3.heading,description:e.support.card3.description,url:"https://links.esri.com/solutions/esri-video",headingEn:t.support.card3.heading,sectionHeadingEn:t.support.heading},{meridianIcon:"support",heading:e.support.card4.heading,description:e.support.card4.description,url:"https://links.esri.com/solutions/technical-support",headingEn:t.support.card4.heading,sectionHeadingEn:t.support.heading}]}></solutions-resources-section></div></calcite-panel></calcite-shell>`}async scrollToSection(e){let i={getStarted:this._getStartedSectionRef,documentation:this._documentationSectionRef,support:this._supportSectionRef}[e];if(!i.value||!this._mainPanelRef.value)return;let a=this._mainPanelRef.value,s=()=>{let n=this.el;for(;n&&n!==document.body;){let o=window.getComputedStyle(n),c=o.overflowY,h=o.overflow;if(n.scrollHeight>n.clientHeight&&(c==="auto"||c==="scroll"||h==="auto"||h==="scroll")&&i.value){let f=n.getBoundingClientRect(),S=i.value.getBoundingClientRect().top-f.top+n.scrollTop;n.scrollTo({top:S,behavior:"smooth"});return}n=n.parentElement}if(a.shadowRoot){let o=a.shadowRoot.querySelector(".content-wrapper");if(o&&i.value){let c=i.value.offsetTop;if(o.scrollHeight>o.clientHeight){o.scrollTo({top:c,behavior:"smooth"});return}}}i.value&&i.value.scrollIntoView({behavior:"smooth",block:"start"})};typeof a.componentOnReady=="function"?(await a.componentOnReady(),s()):(await new Promise(n=>setTimeout(n,100)),s())}_handleDeployAppTabSelected(e){e.detail==="resources"&&this.sortTypeChanged.emit("")}};b("solutions-resources-shell",l);export{l as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import d from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as _}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import{b as g}from"./2I5LGZNX.js";import{E as h,F as c,G as w,I as b,h as u,i,q as n,t as C}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([{b:p},{d:y}])=>{var S=u`@layer{:host{display:block!important}.display-none{display:none}.padding-1{padding:1rem}.position-relative{position:relative}.overflow-auto{overflow:auto}.height-full{height:100%}.paste-component{--arcgis-paste-height: 100%;--arcgis-paste-width: 100%;height:100%;width:100%}.position-static{position:static!important}.z-index-500{z-index:500!important}.margin-top-10{margin-top:10px}card-manager{display:block}}`,d=class extends w{constructor(){super(),this.customInfoText="",this.enableEditGeometry=!1,this.enableSnapping=!1,this.isMobile=!1,this.zoomAndScrollToSelected=!1,this.selectedFeaturesIds=[],this.enableCreateFeatures=!0,this.createBtnLabel="",this.selectingFeatureFromMap=!1,this.showSketchWidgets=!1,this.mapComponentId="",this.pasteEnabled=!1,this.showCopyPasteActions=!1,this.allowedPasteLayerIds=[],this._cardLoading=!1,this._graphics=[],this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._activeFeatureCreationCount=1,this._translations=_({name:"card-manager",blocking:!0}),this._isFeatureCreated=!1,this._createFeature=h(),this._pasteComponent=h(),this.createWorkFlowStarted=n(),this.backFromCreateWorkFlow=n(),this.featureOrRecordSubmitted=n(),this.featuresCopied=n(),this.featuresPasted=n(),this._featuresAdded=()=>{this._pasteComponent.value&&this._resetPasteWorkflow()},this._initCreateComponent=()=>{this._showCreateFeatureComponent=!0},this._pasteComponentReady=async()=>{if(this._pasteComponent.value&&this.mapComponentId&&this._pasteComponent.value.referenceElement===void 0){let e=document.getElementById(this.mapComponentId);await e.viewOnReady(),this._pasteComponent.value.referenceElement=e}},this._applyPasteCommand=async e=>{let t=new Promise((a,o)=>{if(!this._pasteComponent.value){console.error("Paste failed: paste component is not available."),a();return}try{e.detail.applySet?this._pasteComponent.value.writeChanges(e.detail.applySet).then(()=>{this._resetPasteWorkflow(),a()}).catch(s=>{console.log(s),o(s)}):a()}catch(s){o(s),console.error("Paste failed:",s)}});e.detail.completionCallback=t},this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"copyFeatures",this._copyFeatures),this.listenOn(window,"pasteFeatures",this._pasteFeatures),this.listenOn(window,"featuresAdded",this._featuresAdded),this.listenOn(window,"initCreateComponent",this._initCreateComponent)}static{this.properties={customInfoText:1,enableEditGeometry:5,enableSnapping:5,isMobile:5,layerOrTable:0,mapView:0,zoomAndScrollToSelected:5,selectedFeaturesIds:0,enableCreateFeatures:5,createBtnLabel:1,selectingFeatureFromMap:5,showSketchWidgets:5,mapComponentId:1,pasteEnabled:5,showCopyPasteActions:5,allowedPasteLayerIds:0,_cardLoading:16,_graphics:16,_showCreateFeatureComponent:16,_showSubmitBtn:16,_activeFeatureCreationCount:16,_translations:16}}static{this.styles=S}static{this.shadowRootOptions=C}async featureSelectionChange(e){this._showCreateFeatureComponent&&!this._isFeatureCreated&&this._backFromCreateFeature();let t=e.detail;this._graphics=await this._getFeaturesByIds(t)}async layerSelectionChange(e){this._showCreateFeatureComponent&&this._backFromCreateFeature();let t=e.detail[0];this.layerOrTable=this.mapView?await y(this.mapView,t):void 0,await this._resetPasteWorkflow()}async mapChanged(e){await this._resetPasteWorkflow()}async relatedRecordToggled(e){let t=e.detail;this.layerOrTable=t}async _copyFeatures(e){if(!this._pasteComponent.value)return;let t=e.detail.featuresIds,a=this.layerOrTable,o=await p(t,a,[],!0,this.mapView?.spatialReference),s=[];o.forEach(r=>{let l={layer:r.layer,graphic:r,type:"feature"};s.push(l)}),this._pasteComponent.value.clipboard.setData(s),this.featuresCopied.emit(),this.requestUpdate()}async _pasteFeatures(e){if(!this._pasteComponent.value){console.error("Paste failed: paste component is not available.");return}try{this._pasteComponent.value.closed=!1,await this._pasteComponent.value.showClipboardItems(!0),this.layerOrTable?.isTable||await this._pasteComponent.value.startMoveClipboard(!0),this.featuresPasted.emit()}catch(t){console.error("Paste failed:",t)}}_getLayerPermissionsCheck(){let e=this.allowedPasteLayerIds?.length>0?this.allowedPasteLayerIds.map(String):this.layerOrTable?.id!==void 0?[String(this.layerOrTable.id)]:[],t=new Set(e);return{canCreate:a=>t.has(String(a.id))&&a.editingEnabled&&a.capabilities?.operations?.supportsAdd,canUpdate:a=>t.has(String(a.id))&&a.editingEnabled&&a.capabilities?.operations?.supportsUpdate}}async _resetPasteWorkflow(){if(this._pasteComponent.value)try{await this._pasteComponent.value.showClipboardItems(!1),await this._pasteComponent.value.cancelMoveClipboard()}catch(e){console.error("Reset paste workflow failed:",e)}finally{this._pasteComponent.value.closed=!0}}async load(){this.selectedFeaturesIds?.length>0&&(this._graphics=await this._getFeaturesByIds(this.selectedFeaturesIds))}render(){let e=(this._pasteComponent.value?.closed||!this.showCopyPasteActions)&&this._graphics?.length>0,t=this._pasteComponent.value?.closed?"display-none":"",a=this._graphics?.length===0&&this._showCreateFeatureComponent?"":"display-none",o=this._graphics?.length>0||this._showCreateFeatureComponent||!this._pasteComponent.value?.closed&&this.showCopyPasteActions?"display-none":"",s=this.layerOrTable?.isTable,r=this.customInfoText?this.customInfoText:this.selectingFeatureFromMap?this._translations.selectFeaturesFromMapToStart:this._translations.selectFeaturesToStart,l=this.enableCreateFeatures&&this.layerOrTable?.editingEnabled&&this.layerOrTable?.capabilities?.operations?.supportsAdd,m=this.createBtnLabel?this.createBtnLabel:s?this._translations.createRecord:this._translations.createFeature,f=!this.layerOrTable,F=this.enableSnapping&&!this.layerOrTable?.isTable,v=this.layerOrTable?.isTable?["paste"]:["paste","paste-as"],$=!this.layerOrTable?.isTable;return i`<calcite-panel><div class="overflow-auto height-full">${e&&i`<calcite-shell class=${"position-relative"}><div class="position-static z-index-500 height-full"><info-card .allowEditing=${this.layerOrTable?.editingEnabled} .enableEditGeometry=${this.enableEditGeometry} .enableSnapping=${F} .graphics=${this._graphics.reverse()} .isLoading=${this._cardLoading} .isMobile=${this.isMobile} .mapView=${this.mapView} .featuresReferenceId=${this.mapComponentId} position=relative .pasteEnabled=${this.pasteEnabled} show-close-btn .showCopyPasteActions=${this.showCopyPasteActions}></info-card></div></calcite-shell>`||""}<calcite-shell class=${`position-relative ${o}`}><calcite-panel><div class=padding-1><calcite-notice .icon=${this.selectingFeatureFromMap?"map":"table"} icon-flip-rtl open><div slot=message>${r}</div></calcite-notice></div>${!this.isMobile&&l&&i`<calcite-button .disabled=${f} @click=${()=>this._createFeatureBtnClicked()} slot=footer width=full>${m}</calcite-button>`||""}</calcite-panel></calcite-shell><calcite-shell class=${`position-relative ${a}`}><calcite-flow-item selected><calcite-panel .heading=${m}><calcite-action class="back-button hydrated" icon=chevron-left @click=${this._backFromCreateFeature} scale=s slot=header-actions-start .text=${this._translations.back}></calcite-action>${this.getEditorComponent()}${this._showSubmitBtn&&i`<calcite-button appearance=solid class="footer-top-button footer-button" @click=${()=>this._createFeature.value&&void this._createFeature.value.submit()} slot=footer width=full>${this._activeFeatureCreationCount>1?this._translations.createMultiple.replace("{{n}}",String(this._activeFeatureCreationCount)):this._translations.create}</calcite-button>`||""}</calcite-panel></calcite-flow-item></calcite-shell>${this.showCopyPasteActions&&i`<calcite-panel class=${b(t)}><arcgis-paste always-show-feature-form class=${`paste-component ${t}`} closed @arcgisReady=${this._pasteComponentReady} @arcgisApplyPasteCommand=${this._applyPasteCommand} @arcgisClose=${()=>{this._resetPasteWorkflow()}} paste-with-multiple-layers-enabled paste-with-multiple-features-enabled .layerPermissionsCheck=${this._getLayerPermissionsCheck()} .supportedCommands=${v} .view=${this.mapView} ${c(this._pasteComponent)}>${$&&i`<calcite-notice slot=commands-page-message class="margin-top-10" open icon=move><div slot=message>${this._translations.moveClipboardFeatures}</div></calcite-notice>`||""}</arcgis-paste></calcite-panel>`||""}</div></calcite-panel>`}getEditorComponent(){let e=this.enableSnapping&&!this.layerOrTable?.isTable&&this.enableCreateFeatures;return i`<div>${this._showCreateFeatureComponent&&i`<create-feature allow-multiple-creation customize-submit .enableSnapping=${e} .mapView=${this.mapView} .isMobile=${this.isMobile} @activeFeatureCountChange=${t=>{this._activeFeatureCreationCount=t.detail,this._showSubmitBtn=this._activeFeatureCreationCount>0}} @drawComplete=${()=>{this._showSubmitBtn=!0}} @editingAttachment=${t=>{this._showSubmitBtn=!t.detail}} @progressStatus=${()=>{setTimeout(()=>{this._isFeatureCreated=!1},2e3)}} @success=${this._featureCreated} .showSketchWidgets=${this.showSketchWidgets} .selectedLayerId=${this.layerOrTable?.id} show-guiding-msg .showLayerVisibilityMsg=${this.layerOrTable?.visible===!1} ${c(this._createFeature)}></create-feature>`||""}</div>`}async _getFeaturesByIds(e){return(e.length>0&&this.layerOrTable&&this.mapView?await p(e,this.layerOrTable,[],!0,this.mapView?.spatialReference):[]).sort((t,a)=>e.indexOf(Number(t.getObjectId()))-e.indexOf(Number(a.getObjectId())))}_createFeatureBtnClicked(){this._showCreateFeatureComponent=!0,this.createWorkFlowStarted.emit()}async _backFromCreateFeature(){this._createFeature.value&&(this._showCreateFeatureComponent=!1,this.backFromCreateWorkFlow.emit()),this._showSubmitBtn=!1}_featureCreated(){this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._isFeatureCreated=!0,this.featureOrRecordSubmitted.emit()}};g("card-manager",d);return d},a,d)
2
+ import d from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as _}from"./XF5N3NI5.js";import"./UBPOT5V3.js";import"./ISFTCFSJ.js";import{b as g}from"./2I5LGZNX.js";import{E as h,F as c,G as w,I as b,h as u,i,q as n,t as C}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([{b:p},{d:y}])=>{var S=u`@layer{:host{display:block!important}.display-none{display:none}.padding-1{padding:1rem}.position-relative{position:relative}.overflow-auto{overflow:auto}.height-full{height:100%}.paste-component{--arcgis-paste-height: 100%;--arcgis-paste-width: 100%;height:100%;width:100%}.position-static{position:static!important}.z-index-500{z-index:500!important}.margin-top-10{margin-top:10px}card-manager{display:block}}`,d=class extends w{constructor(){super(),this.customInfoText="",this.enableEditGeometry=!1,this.enableSnapping=!1,this.isMobile=!1,this.zoomAndScrollToSelected=!1,this.selectedFeaturesIds=[],this.enableCreateFeatures=!0,this.createBtnLabel="",this.selectingFeatureFromMap=!1,this.showSketchWidgets=!1,this.mapComponentId="",this.pasteEnabled=!1,this.showCopyPasteActions=!1,this.allowedPasteLayerIds=[],this._cardLoading=!1,this._graphics=[],this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._activeFeatureCreationCount=1,this._translations=_({name:"card-manager",blocking:!0}),this._isFeatureCreated=!1,this._createFeature=h(),this._pasteComponent=h(),this.createWorkFlowStarted=n(),this.backFromCreateWorkFlow=n(),this.featureOrRecordSubmitted=n(),this.featuresCopied=n(),this.featuresPasted=n(),this._featuresAdded=()=>{this._pasteComponent.value&&this._resetPasteWorkflow()},this._initCreateComponent=()=>{this._showCreateFeatureComponent=!0},this._pasteComponentReady=async()=>{if(this._pasteComponent.value&&this.mapComponentId&&this._pasteComponent.value.referenceElement===void 0){let e=document.getElementById(this.mapComponentId);await e.viewOnReady(),this._pasteComponent.value.referenceElement=e}},this._applyPasteCommand=async e=>{let t=new Promise((a,o)=>{if(!this._pasteComponent.value){console.error("Paste failed: paste component is not available."),a();return}try{e.detail.applySet?this._pasteComponent.value.writeChanges(e.detail.applySet).then(()=>{this._resetPasteWorkflow(),a()}).catch(s=>{console.log(s),o(s)}):a()}catch(s){o(s),console.error("Paste failed:",s)}});e.detail.completionCallback=t},this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"copyFeatures",this._copyFeatures),this.listenOn(window,"pasteFeatures",this._pasteFeatures),this.listenOn(window,"featuresAdded",this._featuresAdded),this.listenOn(window,"initCreateComponent",this._initCreateComponent)}static{this.properties={customInfoText:1,enableEditGeometry:5,enableSnapping:5,isMobile:5,layerOrTable:0,mapView:0,zoomAndScrollToSelected:5,selectedFeaturesIds:0,enableCreateFeatures:5,createBtnLabel:1,selectingFeatureFromMap:5,showSketchWidgets:5,mapComponentId:1,pasteEnabled:5,showCopyPasteActions:5,allowedPasteLayerIds:0,_cardLoading:16,_graphics:16,_showCreateFeatureComponent:16,_showSubmitBtn:16,_activeFeatureCreationCount:16,_translations:16}}static{this.styles=S}static{this.shadowRootOptions=C}async featureSelectionChange(e){this._showCreateFeatureComponent&&!this._isFeatureCreated&&this._backFromCreateFeature();let t=e.detail;this._graphics=await this._getFeaturesByIds(t)}async layerSelectionChange(e){this._showCreateFeatureComponent&&this._backFromCreateFeature();let t=e.detail[0];this.layerOrTable=this.mapView?await y(this.mapView,t):void 0,await this._resetPasteWorkflow()}async mapChanged(e){await this._resetPasteWorkflow()}async relatedRecordToggled(e){let t=e.detail;this.layerOrTable=t}async _copyFeatures(e){if(!this._pasteComponent.value)return;let t=e.detail.featuresIds,a=this.layerOrTable,o=await p(t,a,[],!0,this.mapView?.spatialReference),s=[];o.forEach(r=>{let l={layer:r.layer,graphic:r,type:"feature"};s.push(l)}),this._pasteComponent.value.clipboard.setData(s),this.featuresCopied.emit(),this.requestUpdate()}async _pasteFeatures(e){if(!this._pasteComponent.value){console.error("Paste failed: paste component is not available.");return}try{this._pasteComponent.value.closed=!1,await this._pasteComponent.value.showClipboardItems(!0),this.layerOrTable?.isTable||await this._pasteComponent.value.startMoveClipboard(!0),this.featuresPasted.emit()}catch(t){console.error("Paste failed:",t)}}_getLayerPermissionsCheck(){let e=this.allowedPasteLayerIds?.length>0?this.allowedPasteLayerIds.map(String):this.layerOrTable?.id!==void 0?[String(this.layerOrTable.id)]:[],t=new Set(e);return{canCreate:a=>t.has(String(a.id))&&a.editingEnabled&&a.capabilities?.operations?.supportsAdd,canUpdate:a=>t.has(String(a.id))&&a.editingEnabled&&a.capabilities?.operations?.supportsUpdate}}async _resetPasteWorkflow(){if(this._pasteComponent.value)try{await this._pasteComponent.value.showClipboardItems(!1),await this._pasteComponent.value.cancelMoveClipboard()}catch(e){console.error("Reset paste workflow failed:",e)}finally{this._pasteComponent.value.closed=!0}}async load(){this.selectedFeaturesIds?.length>0&&(this._graphics=await this._getFeaturesByIds(this.selectedFeaturesIds))}render(){let e=(this._pasteComponent.value?.closed||!this.showCopyPasteActions)&&this._graphics?.length>0,t=this._pasteComponent.value?.closed?"display-none":"",a=this._graphics?.length===0&&this._showCreateFeatureComponent?"":"display-none",o=this._graphics?.length>0||this._showCreateFeatureComponent||!this._pasteComponent.value?.closed&&this.showCopyPasteActions?"display-none":"",s=this.layerOrTable?.isTable,r=this.customInfoText?this.customInfoText:this.selectingFeatureFromMap?this._translations.selectFeaturesFromMapToStart:this._translations.selectFeaturesToStart,l=this.enableCreateFeatures&&this.layerOrTable?.editingEnabled&&this.layerOrTable?.capabilities?.operations?.supportsAdd,m=this.createBtnLabel?this.createBtnLabel:s?this._translations.createRecord:this._translations.createFeature,f=!this.layerOrTable,F=this.enableSnapping&&!this.layerOrTable?.isTable,v=this.layerOrTable?.isTable?["paste"]:["paste","paste-as"],$=!this.layerOrTable?.isTable;return i`<calcite-panel><div class="overflow-auto height-full">${e&&i`<calcite-shell class=${"position-relative"}><div class="position-static z-index-500 height-full"><info-card .allowEditing=${this.layerOrTable?.editingEnabled} .enableEditGeometry=${this.enableEditGeometry} .enableSnapping=${F} .graphics=${this._graphics.reverse()} .isLoading=${this._cardLoading} .isMobile=${this.isMobile} .mapView=${this.mapView} .featuresReferenceId=${this.mapComponentId} position=relative .pasteEnabled=${this.pasteEnabled} show-close-btn .showCopyPasteActions=${this.showCopyPasteActions}></info-card></div></calcite-shell>`||""}<calcite-shell class=${`position-relative ${o}`}><calcite-panel><div class=padding-1><calcite-notice .icon=${this.selectingFeatureFromMap?"map":"table"} icon-flip-rtl open><div slot=message>${r}</div></calcite-notice></div>${!this.isMobile&&l&&i`<calcite-button .disabled=${f} @click=${()=>this._createFeatureBtnClicked()} slot=footer width=full>${m}</calcite-button>`||""}</calcite-panel></calcite-shell><calcite-shell class=${`position-relative ${a}`}><calcite-flow-item selected><calcite-panel .heading=${m}><calcite-action class="back-button hydrated" icon=chevron-left @click=${this._backFromCreateFeature} scale=s slot=header-actions-start .text=${this._translations.back}></calcite-action>${this.getEditorComponent()}${this._showSubmitBtn&&i`<calcite-button appearance=solid class="footer-top-button footer-button" @click=${()=>this._createFeature.value&&void this._createFeature.value.submit()} slot=footer width=full>${this._activeFeatureCreationCount>1?this._translations.createMultiple.replace("{{n}}",String(this._activeFeatureCreationCount)):this._translations.create}</calcite-button>`||""}</calcite-panel></calcite-flow-item></calcite-shell>${this.showCopyPasteActions&&i`<calcite-panel class=${b(t)}><arcgis-paste always-show-feature-form class=${`paste-component ${t}`} closed @arcgisReady=${this._pasteComponentReady} @arcgisApplyPasteCommand=${this._applyPasteCommand} @arcgisClose=${()=>{this._resetPasteWorkflow()}} paste-with-multiple-layers-enabled paste-with-multiple-features-enabled .layerPermissionsCheck=${this._getLayerPermissionsCheck()} .supportedCommands=${v} .view=${this.mapView} ${c(this._pasteComponent)}>${$&&i`<calcite-notice slot=commands-page-message class="margin-top-10" open icon=move><div slot=message>${this._translations.moveClipboardFeatures}</div></calcite-notice>`||""}</arcgis-paste></calcite-panel>`||""}</div></calcite-panel>`}getEditorComponent(){let e=this.enableSnapping&&!this.layerOrTable?.isTable&&this.enableCreateFeatures;return i`<div>${this._showCreateFeatureComponent&&i`<create-feature allow-multiple-creation customize-submit .enableSnapping=${e} .mapView=${this.mapView} .isMobile=${this.isMobile} @activeFeatureCountChange=${t=>{this._activeFeatureCreationCount=t.detail,this._showSubmitBtn=this._activeFeatureCreationCount>0}} @drawComplete=${()=>{this._showSubmitBtn=!0}} @editingAttachment=${t=>{this._showSubmitBtn=!t.detail}} @progressStatus=${()=>{setTimeout(()=>{this._isFeatureCreated=!1},2e3)}} @success=${this._featureCreated} .showSketchWidgets=${this.showSketchWidgets} .selectedLayerId=${this.layerOrTable?.id} show-guiding-msg .showLayerVisibilityMsg=${this.layerOrTable?.visible===!1} ${c(this._createFeature)}></create-feature>`||""}</div>`}async _getFeaturesByIds(e){return(e.length>0&&this.layerOrTable&&this.mapView?await p(e,this.layerOrTable,[],!0,this.mapView?.spatialReference):[]).sort((t,a)=>e.indexOf(Number(t.getObjectId()))-e.indexOf(Number(a.getObjectId())))}_createFeatureBtnClicked(){this._showCreateFeatureComponent=!0,this.createWorkFlowStarted.emit()}async _backFromCreateFeature(){this._createFeature.value&&(this._showCreateFeatureComponent=!1,this.backFromCreateWorkFlow.emit()),this._showSubmitBtn=!1}_featureCreated(){this._showCreateFeatureComponent=!1,this._showSubmitBtn=!1,this._isFeatureCreated=!0,this.featureOrRecordSubmitted.emit()}};g("card-manager",d);return d},a,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as v}from"./LHG6NOEP.js";import{b as u}from"./CVHXDPJO.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import{E as m,F as d,G as h,I as o,h as l,i as n,q as r,t as p}from"./FFF5HUPM.js";import"./QPIMTXPL.js";var T=l`@layer{.instant-apps-measurement-panel{width:300px}.instant-apps-measurement-panel calcite-action-bar{--calcite-action-bar-items-space: 1.5em}.instant-apps-measurement-panel .esri-coordinate-conversion__conversions-view,.instant-apps-measurement-panel .esri-coordinate-conversion{max-width:300px}}`,$={content:"instant-apps-measurement__content"},c=class extends h{constructor(){super(...arguments),this._messages=v({name:"instant-apps-measurement",blocking:!0}),this.measureTool=m(),this.showHeading=!0,this.closable=!1,this.measureActive=r()}static{this.properties={view:0,areaUnit:1,linearUnit:1,coordinateFormat:1,showHeading:5,activeToolType:1,closable:5}}static{this.styles=T}static{this.shadowRootOptions=p}_handleToolClick(e){if(!this?.measureTool)return;let a=e?.target;if(!(a instanceof HTMLElement))return;let t=a?.dataset.value;if(t!=="distance"&&t!=="area"&&t!=="point"&&t!=="clear")return;t&&this.measureTool.value&&(this.measureTool.value.activeTool=t);let s=document.getElementsByClassName("active-tool");for(let i=0;i<s?.length;i++)s[i]?.classList?.remove("active-tool");a?.classList.add("active-tool"),this.measureActive.emit(!(t===void 0||t==="clear"))}render(){return n`<calcite-panel class="instant-apps-measurement-panel" .heading=${this.showHeading?this._messages.label:void 0} .closable=${this.closable}>${this.renderActionBar()}${this.renderMeasureToolPanel()}</calcite-panel>`}renderMeasureToolPanel(){let{view:e,coordinateFormat:a,areaUnit:t,linearUnit:s,activeToolType:i}=this;return n`<calcite-panel class=${o($.content)}><instant-apps-measurement-tool .view=${e} .measureConfiguration=${{coordinateFormat:a,areaUnit:t,linearUnit:s,activeToolType:i}} .activeTool=${this.activeToolType} ${d(this.measureTool)}></instant-apps-measurement-tool></calcite-panel>`}renderActionBar(){let{_messages:e,activeToolType:a}=this;return n`<calcite-action-bar expand-disabled selection-appearance=highlight slot=action-bar><calcite-action class=${o(a==="distance"?"active-tool":"")} .text=${e.line} scale=m icon=measure data-value=distance @click=${this._handleToolClick} id=distanceTool><calcite-tooltip reference-element=distanceTool overlay-positioning=fixed close-on-click placement=top>${e.line}</calcite-tooltip></calcite-action><calcite-action class=${o(a==="area"?"active-tool":"")} .text=${e.area} icon=measure-area scale=m data-value=area @click=${this._handleToolClick} id=areaTool><calcite-tooltip reference-element=areaTool overlay-positioning=fixed close-on-click placement=top>${e.area}</calcite-tooltip></calcite-action><calcite-action class=${o(a==="point"?"active-tool":"")} .text=${e.point} scale=m icon=pin-plus data-value=point @click=${this._handleToolClick} id=pointTool><calcite-tooltip reference-element=pointTool overlay-positioning=fixed close-on-click placement=top>${e.point}</calcite-tooltip></calcite-action><calcite-action .text=${e.clear} scale=m icon=trash data-value=clear @click=${this._handleToolClick} id=trashTool><calcite-tooltip reference-element=trashTool overlay-positioning=fixed close-on-click placement=top>${e.clear}</calcite-tooltip></calcite-action></calcite-action-bar>`}};u("instant-apps-measurement",c);export{c as InstantAppsMeasurement};
2
+ import{a as v}from"./BM4VSEDV.js";import{b as u}from"./HVT2WBVC.js";import"./UBPOT5V3.js";import"./ISFTCFSJ.js";import{E as m,F as d,G as h,I as o,h as l,i as n,q as r,t as p}from"./FFF5HUPM.js";import"./QPIMTXPL.js";var T=l`@layer{.instant-apps-measurement-panel{width:300px}.instant-apps-measurement-panel calcite-action-bar{--calcite-action-bar-items-space: 1.5em}.instant-apps-measurement-panel .esri-coordinate-conversion__conversions-view,.instant-apps-measurement-panel .esri-coordinate-conversion{max-width:300px}}`,$={content:"instant-apps-measurement__content"},c=class extends h{constructor(){super(...arguments),this._messages=v({name:"instant-apps-measurement",blocking:!0}),this.measureTool=m(),this.showHeading=!0,this.closable=!1,this.measureActive=r()}static{this.properties={view:0,areaUnit:1,linearUnit:1,coordinateFormat:1,showHeading:5,activeToolType:1,closable:5}}static{this.styles=T}static{this.shadowRootOptions=p}_handleToolClick(e){if(!this?.measureTool)return;let a=e?.target;if(!(a instanceof HTMLElement))return;let t=a?.dataset.value;if(t!=="distance"&&t!=="area"&&t!=="point"&&t!=="clear")return;t&&this.measureTool.value&&(this.measureTool.value.activeTool=t);let s=document.getElementsByClassName("active-tool");for(let i=0;i<s?.length;i++)s[i]?.classList?.remove("active-tool");a?.classList.add("active-tool"),this.measureActive.emit(!(t===void 0||t==="clear"))}render(){return n`<calcite-panel class="instant-apps-measurement-panel" .heading=${this.showHeading?this._messages.label:void 0} .closable=${this.closable}>${this.renderActionBar()}${this.renderMeasureToolPanel()}</calcite-panel>`}renderMeasureToolPanel(){let{view:e,coordinateFormat:a,areaUnit:t,linearUnit:s,activeToolType:i}=this;return n`<calcite-panel class=${o($.content)}><instant-apps-measurement-tool .view=${e} .measureConfiguration=${{coordinateFormat:a,areaUnit:t,linearUnit:s,activeToolType:i}} .activeTool=${this.activeToolType} ${d(this.measureTool)}></instant-apps-measurement-tool></calcite-panel>`}renderActionBar(){let{_messages:e,activeToolType:a}=this;return n`<calcite-action-bar expand-disabled selection-appearance=highlight slot=action-bar><calcite-action class=${o(a==="distance"?"active-tool":"")} .text=${e.line} scale=m icon=measure data-value=distance @click=${this._handleToolClick} id=distanceTool><calcite-tooltip reference-element=distanceTool overlay-positioning=fixed close-on-click placement=top>${e.line}</calcite-tooltip></calcite-action><calcite-action class=${o(a==="area"?"active-tool":"")} .text=${e.area} icon=measure-area scale=m data-value=area @click=${this._handleToolClick} id=areaTool><calcite-tooltip reference-element=areaTool overlay-positioning=fixed close-on-click placement=top>${e.area}</calcite-tooltip></calcite-action><calcite-action class=${o(a==="point"?"active-tool":"")} .text=${e.point} scale=m icon=pin-plus data-value=point @click=${this._handleToolClick} id=pointTool><calcite-tooltip reference-element=pointTool overlay-positioning=fixed close-on-click placement=top>${e.point}</calcite-tooltip></calcite-action><calcite-action .text=${e.clear} scale=m icon=trash data-value=clear @click=${this._handleToolClick} id=trashTool><calcite-tooltip reference-element=trashTool overlay-positioning=fixed close-on-click placement=top>${e.clear}</calcite-tooltip></calcite-action></calcite-action-bar>`}};u("instant-apps-measurement",c);export{c as InstantAppsMeasurement};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as _}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import{b as y}from"./2I5LGZNX.js";import{E as g,F as b,G as f,I as w,h as m,i as l,q as o,t as p}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([c])=>{var v=m`@layer{:host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar,.display-none{display:none!important}.esri-editor__panel-content{padding-block:10px!important}.notice-msg{padding:10px;width:calc(100% - 20px)}}`,h=class extends f{constructor(){super(...arguments),this.customizeSubmit=!1,this.enableSnapping=!1,this.showGuidingMsg=!0,this._editorLoading=!1,this._translations=_({name:"create-related-feature",blocking:!0}),this._addingAttachment=!1,this._editor=g(),this._isSubmitBtnClicked=!1,this.success=o(),this.fail=o(),this.isActionPending=o(),this.formReady=o(),this._onEditorPropertyChange=()=>{let t=this._editor.value;t&&(c.watch(()=>t.state,e=>{e==="adding-attachment"||e==="editing-attachment"?(this._addingAttachment=!0,this.isActionPending.emit(!0)):this._addingAttachment&&(this.isActionPending.emit(!1),this._addingAttachment=!1)}),c.watch(()=>t.activeWorkflow?.formViewModel?.state,e=>{e==="ready"&&this.formReady.emit()}))}}static{this.properties={customizeSubmit:5,enableSnapping:5,mapView:0,selectedFeature:0,showGuidingMsg:5,table:0,_editorLoading:16,_translations:16}}static{this.styles=v}static{this.shadowRootOptions=p}async submit(){this._editor.value?.activeWorkflow&&(this._isSubmitBtnClicked=!0,this._editor.value.activeWorkflow?.formViewModel?.submit())}render(){let t=this._editorLoading?"":"display-none";return l`${this.showGuidingMsg&&l`<calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.provideDetailsMsg}</div></calcite-notice>`||""}<calcite-loader class=${w(t)} .label=${this._translations.loading} scale=s></calcite-loader>${this.mapView&&this._getEditor()||""}`}disconnectedCallback(){super.disconnectedCallback(),this._editor.value&&this._editor.value.destroy()}_getEditor(){return l`<arcgis-editor .view=${this.mapView} hide-edit-features-section .hideSettingsMenu=${!this.enableSnapping} hide-sketch .hideSnappingControlsElementsEnabledToggle=${!this.enableSnapping} @arcgisReady=${this._startCreate} @arcgisPropertyChange=${this._onEditorPropertyChange} ${b(this._editor)}></arcgis-editor>`}async _startCreate(){let t=this.selectedFeature?.layer,e=this.table;if(t.relationships&&e?.relationships&&this.selectedFeature&&e.templates){let s=t.relationships[0],i=e.relationships.find(r=>t.layerId===r.relatedTableId),a=Number(this.selectedFeature.getObjectId());if(!Number.isNaN(a)&&i){let r=(await t.queryFeatures({objectIds:[a],outFields:[t.objectIdField,s.keyField]})).features[0],n=e.templates[0],d={attributeOverrides:this.makeAttributesForRelatedFeature(r,s,i),layer:e,template:n};await this._editor.value?.startCreateFeaturesWorkflowAtFeatureCreation(d),await this.hideEditorsElements();let u=this._editor.value?.activeWorkflow?.formViewModel;u&&this._editor.value?.activeWorkflow?.formViewModel?.addHandles(u.on("submit",this.submitted.bind(this)))}}}async hideEditorsElements(){this.customizeSubmit&&(await this.timeout(700),this.el.querySelector("arcgis-editor")?.shadowRoot?.querySelectorAll("calcite-flow-item")?.forEach(t=>{let e=t.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");e?.querySelector("header")?.setAttribute("style","display: none"),e?.querySelector("footer")?.setAttribute("style","display: none")}))}makeAttributesForRelatedFeature(t,e,s){let i=e.keyField,a;t.attributes.hasOwnProperty(i)?a=t.getAttribute(i):t.attributes.hasOwnProperty(i.toLowerCase())?a=t.getAttribute(i.toLowerCase()):t.attributes.hasOwnProperty(i.toUpperCase())&&(a=t.getAttribute(i.toUpperCase()));let r=s.keyField,n=this.table?.fields.find(d=>d.name.toLocaleLowerCase()===r.toLocaleLowerCase());if(n)return r=n.name,{[r]:a}}async submitted(t){if(t.invalid.length){this._isSubmitBtnClicked=!1;return}if(t.valid.length&&this._isSubmitBtnClicked){this._isSubmitBtnClicked=!1;try{if(this._editor.value?.activeWorkflow){await this._editor.value.activeWorkflow.commit();let e=this._editor.value.activeWorkflow.failures;e?.length&&e.some(s=>{if(s.error)throw s.error})}}catch(e){this.fail.emit(e);return}this.success.emit()}}async timeout(t){return await new Promise(e=>setTimeout(e,t))}};y("create-related-feature",h);return h},"core/reactiveUtils")
2
+ import{a as _}from"./XF5N3NI5.js";import"./UBPOT5V3.js";import"./ISFTCFSJ.js";import{b as y}from"./2I5LGZNX.js";import{E as g,F as b,G as f,I as w,h as m,i as l,q as o,t as p}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([c])=>{var v=m`@layer{:host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar,.display-none{display:none!important}.esri-editor__panel-content{padding-block:10px!important}.notice-msg{padding:10px;width:calc(100% - 20px)}}`,h=class extends f{constructor(){super(...arguments),this.customizeSubmit=!1,this.enableSnapping=!1,this.showGuidingMsg=!0,this._editorLoading=!1,this._translations=_({name:"create-related-feature",blocking:!0}),this._addingAttachment=!1,this._editor=g(),this._isSubmitBtnClicked=!1,this.success=o(),this.fail=o(),this.isActionPending=o(),this.formReady=o(),this._onEditorPropertyChange=()=>{let t=this._editor.value;t&&(c.watch(()=>t.state,e=>{e==="adding-attachment"||e==="editing-attachment"?(this._addingAttachment=!0,this.isActionPending.emit(!0)):this._addingAttachment&&(this.isActionPending.emit(!1),this._addingAttachment=!1)}),c.watch(()=>t.activeWorkflow?.formViewModel?.state,e=>{e==="ready"&&this.formReady.emit()}))}}static{this.properties={customizeSubmit:5,enableSnapping:5,mapView:0,selectedFeature:0,showGuidingMsg:5,table:0,_editorLoading:16,_translations:16}}static{this.styles=v}static{this.shadowRootOptions=p}async submit(){this._editor.value?.activeWorkflow&&(this._isSubmitBtnClicked=!0,this._editor.value.activeWorkflow?.formViewModel?.submit())}render(){let t=this._editorLoading?"":"display-none";return l`${this.showGuidingMsg&&l`<calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.provideDetailsMsg}</div></calcite-notice>`||""}<calcite-loader class=${w(t)} .label=${this._translations.loading} scale=s></calcite-loader>${this.mapView&&this._getEditor()||""}`}disconnectedCallback(){super.disconnectedCallback(),this._editor.value&&this._editor.value.destroy()}_getEditor(){return l`<arcgis-editor .view=${this.mapView} hide-edit-features-section .hideSettingsMenu=${!this.enableSnapping} hide-sketch .hideSnappingControlsElementsEnabledToggle=${!this.enableSnapping} @arcgisReady=${this._startCreate} @arcgisPropertyChange=${this._onEditorPropertyChange} ${b(this._editor)}></arcgis-editor>`}async _startCreate(){let t=this.selectedFeature?.layer,e=this.table;if(t.relationships&&e?.relationships&&this.selectedFeature&&e.templates){let s=t.relationships[0],i=e.relationships.find(r=>t.layerId===r.relatedTableId),a=Number(this.selectedFeature.getObjectId());if(!Number.isNaN(a)&&i){let r=(await t.queryFeatures({objectIds:[a],outFields:[t.objectIdField,s.keyField]})).features[0],n=e.templates[0],d={attributeOverrides:this.makeAttributesForRelatedFeature(r,s,i),layer:e,template:n};await this._editor.value?.startCreateFeaturesWorkflowAtFeatureCreation(d),await this.hideEditorsElements();let u=this._editor.value?.activeWorkflow?.formViewModel;u&&this._editor.value?.activeWorkflow?.formViewModel?.addHandles(u.on("submit",this.submitted.bind(this)))}}}async hideEditorsElements(){this.customizeSubmit&&(await this.timeout(700),this.el.querySelector("arcgis-editor")?.shadowRoot?.querySelectorAll("calcite-flow-item")?.forEach(t=>{let e=t.shadowRoot?.querySelector("calcite-panel")?.shadowRoot?.querySelector("article");e?.querySelector("header")?.setAttribute("style","display: none"),e?.querySelector("footer")?.setAttribute("style","display: none")}))}makeAttributesForRelatedFeature(t,e,s){let i=e.keyField,a;t.attributes.hasOwnProperty(i)?a=t.getAttribute(i):t.attributes.hasOwnProperty(i.toLowerCase())?a=t.getAttribute(i.toLowerCase()):t.attributes.hasOwnProperty(i.toUpperCase())&&(a=t.getAttribute(i.toUpperCase()));let r=s.keyField,n=this.table?.fields.find(d=>d.name.toLocaleLowerCase()===r.toLocaleLowerCase());if(n)return r=n.name,{[r]:a}}async submitted(t){if(t.invalid.length){this._isSubmitBtnClicked=!1;return}if(t.valid.length&&this._isSubmitBtnClicked){this._isSubmitBtnClicked=!1;try{if(this._editor.value?.activeWorkflow){await this._editor.value.activeWorkflow.commit();let e=this._editor.value.activeWorkflow.failures;e?.length&&e.some(s=>{if(s.error)throw s.error})}}catch(e){this.fail.emit(e);return}this.success.emit()}}async timeout(t){return await new Promise(e=>setTimeout(e,t))}};y("create-related-feature",h);return h},"core/reactiveUtils")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a}from"./DXQQQNOF.js";import"./2B4SGB3I.js";import"./I2NTSKBD.js";import"./AE5HNAOV.js";import"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./2I5LGZNX.js";import"./FFF5HUPM.js";import"./QPIMTXPL.js";export{a as SolutionItemAccordion};
2
+ import{a}from"./IBAJ7OFO.js";import"./2B4SGB3I.js";import"./I2NTSKBD.js";import"./AE5HNAOV.js";import"./XF5N3NI5.js";import"./UBPOT5V3.js";import"./ISFTCFSJ.js";import"./TEHBW75B.js";import"./IHG7KTNC.js";import"./ZCU2WWVN.js";import"./WGO4EVOV.js";import"./YKB6256M.js";import"./N22MFQSQ.js";import"./N7BXCDA3.js";import"./ZX3UHK6P.js";import"./Z4F2NZOT.js";import"./KOIDWEP3.js";import"./3KXMYZCU.js";import"./LP2JYX4X.js";import"./GF4QELNV.js";import"./AYSQIO6L.js";import"./YQHYMLC7.js";import"./DKD2EGQP.js";import"./5O53T3SW.js";import"./AJZDBHB6.js";import"./FES7B3SJ.js";import"./2I5LGZNX.js";import"./FFF5HUPM.js";import"./QPIMTXPL.js";export{a as SolutionItemAccordion};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as v}from"./BM666UZR.js";import{b as w}from"./I2NTSKBD.js";import e from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as L}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import{b as u}from"./2I5LGZNX.js";import{E as d,F as o,G as g,I as p,J as c,h as b,i,l,q as h,t as _}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,{a:f,b:I,d:y}])=>{var $=b`@layer{:host{display:block}.map-layer-picker-container{width:100%;align-items:center}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}.height-100{height:100%}.disabled{cursor:default!important;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.no-bottom-margin{--calcite-label-margin-bottom: 0px}.layer-picker-label-container{align-items:center;display:inline-flex;height:100%;padding-inline-start:1rem;padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.cursor-default{cursor:default}.popover-list{overflow:auto;width:250px}}`,m=class extends g{constructor(){super(),this.appearance="transparent",this.configLayerOrderDefined=!1,this.defaultLayerId="",this.disabled=!1,this.display="inline-block",this.enabledLayerIds=[],this.isMobile=!1,this.showOnlyUpdatableLayers=!1,this.selectedIds=[],this.scale="m",this.showTables=!1,this.showTablesDisabled=!1,this.showSingleLayerAsLabel=!1,this.type="select",this.showLayersListInPopover=!1,this.referenceElement="",this.force=!1,this._hasMultipleLayers=!0,this._hasValidLayers=!0,this._isDropdownOpen=!1,this.ids=[],this.selectedName="",this._translations=L({name:"map-layer-picker",blocking:!0}),this.defaultLayerHonored=!1,this._layerSelectElement=d(),this._layerComboboxElement=d(),this._pnContextConsumer=w({context:v,subscribe:!0}),this._skipEditCheck=!1,this._popover=d(),this.beforeLayerSelectionChange=h(),this.idsFound=h(),this.noLayersFound=h(),this.layerSelectionChange=h(),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"requestLayerSelectionChange",this.requestLayerSelectionChange)}static{this.properties={appearance:1,configLayerOrderDefined:5,defaultLayerId:1,disabled:5,display:1,enabledLayerIds:0,height:9,isMobile:5,mapView:0,showOnlyUpdatableLayers:5,placeholderIcon:1,selectedIds:0,scale:1,showTables:5,showTablesDisabled:5,showSingleLayerAsLabel:5,type:1,showLayersListInPopover:5,referenceElement:1,force:16,_hasMultipleLayers:16,_hasValidLayers:16,_isDropdownOpen:16,ids:16,selectedName:16,_translations:16}}static{this.styles=$}static{this.shadowRootOptions=_}willUpdate(e){e.has("mapView")&&this.hasUpdated&&this.mapViewWatchHandler(),e.has("type")&&(this._layerElement=this.type==="select"?this._layerSelectElement:this._layerComboboxElement),e.has("selectedIds")&&this.hasUpdated&&this.mapView&&(async()=>{let t=await y(this.mapView,this.selectedIds[0]);this.selectedName=t?.title??""})(),e.has("enabledLayerIds")&&this.hasUpdated&&this.enabledLayerIdsWatchHandler()}async enabledLayerIdsWatchHandler(){let e=this.selectedIds.length>0&&!this.enabledLayerIds.includes(this.selectedIds[0]),t=this.enabledLayerIds.some(a=>!this.ids.includes(a)),s=this.ids.toString()!==this.enabledLayerIds.toString();e?this.mapViewWatchHandler():(t||s)&&this._setLayers(),this._hasMultipleLayers=this.enabledLayerIds.length>1}async mapViewWatchHandler(){if(await this._setLayers(),this.ids?.length>0){this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1;let e=this.ids[0];this.defaultLayerId&&!this.defaultLayerHonored&&(e=this.defaultLayerId),await this._setSelectedLayer(e)}else this.mapView&&(this._hasValidLayers=!1,this.noLayersFound.emit())}async setLayerById(e,t=!1){this._skipEditCheck=t,!t||t&&e!==this.selectedIds[0]?this._setSelectedLayer(e):t&&e===this.selectedIds[0]&&(this.force=!0,setTimeout(()=>{this.force=!1},10)),this._skipEditCheck=!1}async setLayerByIds(e,t=!1){this._skipEditCheck=t,this._layerSelectionChange(e),this._skipEditCheck=!1}async updateLayer(){await this._setSelectedLayer(this.ids[0])}async mapChanged(e){let t=e.detail.isValid;t&&!this._hasValidLayers?await this.load():t||(this._hasValidLayers=!1,this.noLayersFound.emit())}async requestLayerSelectionChange(e){let t=e.detail;await this._setSelectedLayer(t)}async load(){await this._setLayers(),this.ids?.length>0?(this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1,this.defaultLayerId||await this._setSelectedLayer(this.ids[0])):this.mapView&&(this._hasValidLayers=!1,this.noLayersFound.emit())}render(){let e="map-layer-picker",t=this.height&&this.height>0&&!this.showLayersListInPopover?{height:`${this.height.toString()}px`}:{};return t={...t,display:this.display},i`<div class="map-layer-picker-container" style=${c(t)}><div class="map-layer-picker" style=${c(t)}>${this._hasValidLayers?!this._hasMultipleLayers&&this.showSingleLayerAsLabel?this._getSingleLayerPlaceholder():this.type==="combobox"?this._getCombobox(e):this.type==="select"?this._getSelect(e):this.showLayersListInPopover?this._getMapLayerPopOver():this._getDropdown(e):this._getInvalidPlaceholder()}</div></div>`}loaded(){if(this.ids?.length>0||this.selectedIds?.length===1){let e=this.selectedIds.length===1?this.selectedIds[0]:this.ids[0];this.type==="select"?this._layerElement.value&&(this._layerElement.value.value=e):this.type==="dropdown"&&(this.selectedName=this._layerNameHash&&Object.keys(this._layerNameHash).indexOf(e)>-1?this._layerNameHash[e].name:this._tableNameHash&&Object.keys(this._tableNameHash).indexOf(e)>-1?this._tableNameHash[e].name:"")}this._popover.value?.addEventListener("calcitePopoverOpen",()=>{this.el.querySelector("calcite-dropdown-item[selected]")?.setFocus()})}_getMapLayerPopOver(){let e=this.height&&this.height>0?{"max-height":`${this.height.toString()}px`}:{};return i`<calcite-popover auto-close focus-trap-disabled .label=${this.referenceElement} placement=left .referenceElement=${this.referenceElement} scale=s ${o(this._popover)}><div class=popover-list style=${c(e)}>${this._getMapLayerOptions()}</div></calcite-popover>`}_getInvalidPlaceholder(){return i`<div><calcite-notice class="height-100" icon=exclamation-mark-triangle id=no-valid-layers kind=danger open><div slot=message>${this._translations.noLayersFound}</div></calcite-notice><calcite-tooltip .label=${this._translations.enableEditUpdate} placement=bottom reference-element=no-valid-layers><span>${this._translations.enableEditUpdate}</span></calcite-tooltip></div>`}_getSingleLayerPlaceholder(){let e=this._getItemTypeIcon();return i`<div class="layer-picker-label-container cursor-default"><calcite-icon aria-hidden=true .icon=${e} scale=s></calcite-icon><calcite-label class="no-bottom-margin padding-start-1">${this.selectedName}</calcite-label></div>`}_getSelect(e){return i`<calcite-select .disabled=${this.disabled} id=${e??l} label @calciteSelectChange=${()=>this._layerSelectionChange()} .scale=${this.scale} ${o(this._layerElement)}>${this._getMapLayerOptions()}</calcite-select>`}_getCombobox(e){return i`<calcite-combobox clear-disabled id=${e??l} label @calciteComboboxChange=${()=>this._layerSelectionChange()} .placeholderIcon=${this.placeholderIcon} .scale=${this.scale} selection-mode=single ${o(this._layerElement)}>${this._getMapLayerOptions()}</calcite-combobox>`}_getDropdown(e){return i`<calcite-dropdown class="layer-picker-dropdown" @calciteDropdownBeforeClose=${()=>this._isDropdownOpen=!1} @calciteDropdownBeforeOpen=${()=>this._isDropdownOpen=!0}>${this.isMobile?this._getDropdownButton():this._getActionDropdownButton(e)}<calcite-dropdown-group selection-mode=single>${this._getMapLayerOptions()}</calcite-dropdown-group></calcite-dropdown>`}_getActionDropdownButton(e){return i`<calcite-action id=${e??l} slot=trigger .text=${this.selectedName}>${this._getDropdownButton()}</calcite-action>`}_getDropdownButton(){let e=this._getItemTypeIcon(),t=this.isMobile?"":"max-width-350",s=this.isMobile?"trigger":"",a=this._isDropdownOpen?"chevron-up":"chevron-down";return i`<calcite-button alignment=icon-end-space-between .appearance=${this.appearance} class=${p(t)} .iconEnd=${a} .iconStart=${e} kind=neutral slot=${s??l} width=full><div>${this.selectedName}</div></calcite-button>`}_getItemTypeIcon(){let e=this.selectedIds.length>0&&this._layerNameHash,t=e?this.selectedIds[0]:void 0;return e?Object.keys(this._layerNameHash).indexOf(t)>-1?"layers":"table":"layers"}_getMapLayerOptions(){return this.ids.reduce((e,t)=>(this._validLayer(t)?e.push(this._getItem(t,"layer")):this._validTable(t)&&e.push(this._getItem(t,"table")),e),[])}_getItem(e,t){let s=t==="layer"&&this._layerNameHash?this._layerNameHash[e]:this._tableNameHash?this._tableNameHash[e]:void 0,a=this.showOnlyUpdatableLayers?s&&!s.supportsUpdate:!1,r=s?.name||"",n=this.selectedIds.indexOf(e)>-1;return this.type==="combobox"?i`<calcite-combobox-item .disabled=${a} .heading=${r} .selected=${n} .value=${e}></calcite-combobox-item>`:this.type==="select"?i`<calcite-option .disabled=${a} .label=${r} .selected=${n} .value=${e}></calcite-option>`:this.force&&n||!this.force?i`<calcite-dropdown-group class=${p(a?"disabled":"")} id=${r??l} .selectionMode=${a?"none":"single"}><calcite-dropdown-item .disabled=${!!(t==="table"&&this.showTablesDisabled)} .iconStart=${t} @click=${a?void 0:()=>{this._setSelectedLayer(e)}} .selected=${n}>${r}</calcite-dropdown-item></calcite-dropdown-group>`:null}async _setSelectedLayer(e){if(e!==this.selectedIds[0]){let t;if(this.defaultLayerId&&!this.defaultLayerHonored&&(t=this._getLayerFromHash(this.defaultLayerId),this.defaultLayerHonored=t!==void 0,e=this.defaultLayerHonored?this.defaultLayerId:e),t=t||this._getLayerFromHash(e),!this._skipEditCheck&&this.beforeLayerSelectionChange.emit({currentId:this.selectedIds[0],newId:e,ref:this.el}).defaultPrevented)return;this.selectedName=t?.name,this.selectedIds=[e],this._popover.value&&(this._popover.value.open=!1),this.layerSelectionChange.emit(this.selectedIds)}else{let t=this.mapView&&await y(this.mapView,this.selectedIds[0]);this.selectedName=t?.title||""}}_getLayerFromHash(e){return this._layerNameHash&&Object.keys(this._layerNameHash).indexOf(e)>-1?this._layerNameHash[e]:this._tableNameHash&&Object.keys(this._tableNameHash).indexOf(e)>-1?this._tableNameHash[e]:void 0}async _setLayers(){if(this.mapView){await this._initLayerTableHash();let e=[];this._layerNameHash&&(e=this.showOnlyUpdatableLayers?this._getEditableIds(this._layerNameHash):Object.keys(this._layerNameHash));let t=[];if(this._tableNameHash&&(t=this.showTables?this.showOnlyUpdatableLayers?this._getEditableIds(this._tableNameHash):Object.keys(this._tableNameHash):[]),this.configLayerOrderDefined){let s=[...e.reverse(),...t.reverse()];this.ids=this.enabledLayerIds.length>0?this.enabledLayerIds.filter(a=>s.includes(a)):s}else this.ids=[...e.reverse().filter(s=>this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(s)>-1:!0),...t.reverse().filter(s=>this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(s)>-1:!0)];this.idsFound.emit(this.ids)}}_getEditableIds(e){return Object.keys(e).filter(t=>e[t].supportsUpdate)}async _initLayerTableHash(){this._layerNameHash=this.mapView&&await f(this.mapView,this.showOnlyUpdatableLayers),this._tableNameHash=this.showTables&&this.mapView?await I(this.mapView,this.showOnlyUpdatableLayers):{}}_validLayer(e){let t=this._pnContextConsumer.value,s=this._layerNameHash&&this._layerNameHash[e]?.name;return s!==void 0&&Object.keys(t?.managedLayers||[]).indexOf(s)<0&&(this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(e)>-1:!0)}_validTable(e){let t=this._pnContextConsumer.value,s=this._tableNameHash&&this._tableNameHash[e]?.name,a=s&&this.showTables;return a?(t?.managedTables||[]).indexOf(s)<0&&(this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(e)>-1:!0):a!==void 0}_layerSelectionChange(e){if(this._layerElement.value){let t=e||(Array.isArray(this._layerElement.value.value)?this._layerElement.value.value:[this._layerElement.value.value]);if(JSON.stringify(t)!==JSON.stringify([""])){if(JSON.stringify(t)===JSON.stringify(this.selectedIds)||!this._skipEditCheck&&this.beforeLayerSelectionChange.emit({currentIds:this.selectedIds,newIds:t,ref:this.el}).defaultPrevented)return;this.selectedIds=t,this.layerSelectionChange.emit(this.selectedIds)}}}};u("map-layer-picker",m);return m},a,e)
2
+ import{a as v}from"./BM666UZR.js";import{b as w}from"./I2NTSKBD.js";import e from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as L}from"./XF5N3NI5.js";import"./UBPOT5V3.js";import"./ISFTCFSJ.js";import{b as u}from"./2I5LGZNX.js";import{E as d,F as o,G as g,I as p,J as c,h as b,i,l,q as h,t as _}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,{a:f,b:I,d:y}])=>{var $=b`@layer{:host{display:block}.map-layer-picker-container{width:100%;align-items:center}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}.layer-picker-dropdown{height:100%;width:100%}.max-width-350{max-width:350px}.height-100{height:100%}.disabled{cursor:default!important;user-select:none;opacity:var(--calcite-opacity-disabled);pointer-events:none}.no-bottom-margin{--calcite-label-margin-bottom: 0px}.layer-picker-label-container{align-items:center;display:inline-flex;height:100%;padding-inline-start:1rem;padding-inline-end:1rem}.padding-start-1{padding-inline-start:1rem}.cursor-default{cursor:default}.popover-list{overflow:auto;width:250px}}`,m=class extends g{constructor(){super(),this.appearance="transparent",this.configLayerOrderDefined=!1,this.defaultLayerId="",this.disabled=!1,this.display="inline-block",this.enabledLayerIds=[],this.isMobile=!1,this.showOnlyUpdatableLayers=!1,this.selectedIds=[],this.scale="m",this.showTables=!1,this.showTablesDisabled=!1,this.showSingleLayerAsLabel=!1,this.type="select",this.showLayersListInPopover=!1,this.referenceElement="",this.force=!1,this._hasMultipleLayers=!0,this._hasValidLayers=!0,this._isDropdownOpen=!1,this.ids=[],this.selectedName="",this._translations=L({name:"map-layer-picker",blocking:!0}),this.defaultLayerHonored=!1,this._layerSelectElement=d(),this._layerComboboxElement=d(),this._pnContextConsumer=w({context:v,subscribe:!0}),this._skipEditCheck=!1,this._popover=d(),this.beforeLayerSelectionChange=h(),this.idsFound=h(),this.noLayersFound=h(),this.layerSelectionChange=h(),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"requestLayerSelectionChange",this.requestLayerSelectionChange)}static{this.properties={appearance:1,configLayerOrderDefined:5,defaultLayerId:1,disabled:5,display:1,enabledLayerIds:0,height:9,isMobile:5,mapView:0,showOnlyUpdatableLayers:5,placeholderIcon:1,selectedIds:0,scale:1,showTables:5,showTablesDisabled:5,showSingleLayerAsLabel:5,type:1,showLayersListInPopover:5,referenceElement:1,force:16,_hasMultipleLayers:16,_hasValidLayers:16,_isDropdownOpen:16,ids:16,selectedName:16,_translations:16}}static{this.styles=$}static{this.shadowRootOptions=_}willUpdate(e){e.has("mapView")&&this.hasUpdated&&this.mapViewWatchHandler(),e.has("type")&&(this._layerElement=this.type==="select"?this._layerSelectElement:this._layerComboboxElement),e.has("selectedIds")&&this.hasUpdated&&this.mapView&&(async()=>{let t=await y(this.mapView,this.selectedIds[0]);this.selectedName=t?.title??""})(),e.has("enabledLayerIds")&&this.hasUpdated&&this.enabledLayerIdsWatchHandler()}async enabledLayerIdsWatchHandler(){let e=this.selectedIds.length>0&&!this.enabledLayerIds.includes(this.selectedIds[0]),t=this.enabledLayerIds.some(a=>!this.ids.includes(a)),s=this.ids.toString()!==this.enabledLayerIds.toString();e?this.mapViewWatchHandler():(t||s)&&this._setLayers(),this._hasMultipleLayers=this.enabledLayerIds.length>1}async mapViewWatchHandler(){if(await this._setLayers(),this.ids?.length>0){this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1;let e=this.ids[0];this.defaultLayerId&&!this.defaultLayerHonored&&(e=this.defaultLayerId),await this._setSelectedLayer(e)}else this.mapView&&(this._hasValidLayers=!1,this.noLayersFound.emit())}async setLayerById(e,t=!1){this._skipEditCheck=t,!t||t&&e!==this.selectedIds[0]?this._setSelectedLayer(e):t&&e===this.selectedIds[0]&&(this.force=!0,setTimeout(()=>{this.force=!1},10)),this._skipEditCheck=!1}async setLayerByIds(e,t=!1){this._skipEditCheck=t,this._layerSelectionChange(e),this._skipEditCheck=!1}async updateLayer(){await this._setSelectedLayer(this.ids[0])}async mapChanged(e){let t=e.detail.isValid;t&&!this._hasValidLayers?await this.load():t||(this._hasValidLayers=!1,this.noLayersFound.emit())}async requestLayerSelectionChange(e){let t=e.detail;await this._setSelectedLayer(t)}async load(){await this._setLayers(),this.ids?.length>0?(this._hasValidLayers=!0,this._hasMultipleLayers=this.ids.length>1,this.defaultLayerId||await this._setSelectedLayer(this.ids[0])):this.mapView&&(this._hasValidLayers=!1,this.noLayersFound.emit())}render(){let e="map-layer-picker",t=this.height&&this.height>0&&!this.showLayersListInPopover?{height:`${this.height.toString()}px`}:{};return t={...t,display:this.display},i`<div class="map-layer-picker-container" style=${c(t)}><div class="map-layer-picker" style=${c(t)}>${this._hasValidLayers?!this._hasMultipleLayers&&this.showSingleLayerAsLabel?this._getSingleLayerPlaceholder():this.type==="combobox"?this._getCombobox(e):this.type==="select"?this._getSelect(e):this.showLayersListInPopover?this._getMapLayerPopOver():this._getDropdown(e):this._getInvalidPlaceholder()}</div></div>`}loaded(){if(this.ids?.length>0||this.selectedIds?.length===1){let e=this.selectedIds.length===1?this.selectedIds[0]:this.ids[0];this.type==="select"?this._layerElement.value&&(this._layerElement.value.value=e):this.type==="dropdown"&&(this.selectedName=this._layerNameHash&&Object.keys(this._layerNameHash).indexOf(e)>-1?this._layerNameHash[e].name:this._tableNameHash&&Object.keys(this._tableNameHash).indexOf(e)>-1?this._tableNameHash[e].name:"")}this._popover.value?.addEventListener("calcitePopoverOpen",()=>{this.el.querySelector("calcite-dropdown-item[selected]")?.setFocus()})}_getMapLayerPopOver(){let e=this.height&&this.height>0?{"max-height":`${this.height.toString()}px`}:{};return i`<calcite-popover auto-close focus-trap-disabled .label=${this.referenceElement} placement=left .referenceElement=${this.referenceElement} scale=s ${o(this._popover)}><div class=popover-list style=${c(e)}>${this._getMapLayerOptions()}</div></calcite-popover>`}_getInvalidPlaceholder(){return i`<div><calcite-notice class="height-100" icon=exclamation-mark-triangle id=no-valid-layers kind=danger open><div slot=message>${this._translations.noLayersFound}</div></calcite-notice><calcite-tooltip .label=${this._translations.enableEditUpdate} placement=bottom reference-element=no-valid-layers><span>${this._translations.enableEditUpdate}</span></calcite-tooltip></div>`}_getSingleLayerPlaceholder(){let e=this._getItemTypeIcon();return i`<div class="layer-picker-label-container cursor-default"><calcite-icon aria-hidden=true .icon=${e} scale=s></calcite-icon><calcite-label class="no-bottom-margin padding-start-1">${this.selectedName}</calcite-label></div>`}_getSelect(e){return i`<calcite-select .disabled=${this.disabled} id=${e??l} label @calciteSelectChange=${()=>this._layerSelectionChange()} .scale=${this.scale} ${o(this._layerElement)}>${this._getMapLayerOptions()}</calcite-select>`}_getCombobox(e){return i`<calcite-combobox clear-disabled id=${e??l} label @calciteComboboxChange=${()=>this._layerSelectionChange()} .placeholderIcon=${this.placeholderIcon} .scale=${this.scale} selection-mode=single ${o(this._layerElement)}>${this._getMapLayerOptions()}</calcite-combobox>`}_getDropdown(e){return i`<calcite-dropdown class="layer-picker-dropdown" @calciteDropdownBeforeClose=${()=>this._isDropdownOpen=!1} @calciteDropdownBeforeOpen=${()=>this._isDropdownOpen=!0}>${this.isMobile?this._getDropdownButton():this._getActionDropdownButton(e)}<calcite-dropdown-group selection-mode=single>${this._getMapLayerOptions()}</calcite-dropdown-group></calcite-dropdown>`}_getActionDropdownButton(e){return i`<calcite-action id=${e??l} slot=trigger .text=${this.selectedName}>${this._getDropdownButton()}</calcite-action>`}_getDropdownButton(){let e=this._getItemTypeIcon(),t=this.isMobile?"":"max-width-350",s=this.isMobile?"trigger":"",a=this._isDropdownOpen?"chevron-up":"chevron-down";return i`<calcite-button alignment=icon-end-space-between .appearance=${this.appearance} class=${p(t)} .iconEnd=${a} .iconStart=${e} kind=neutral slot=${s??l} width=full><div>${this.selectedName}</div></calcite-button>`}_getItemTypeIcon(){let e=this.selectedIds.length>0&&this._layerNameHash,t=e?this.selectedIds[0]:void 0;return e?Object.keys(this._layerNameHash).indexOf(t)>-1?"layers":"table":"layers"}_getMapLayerOptions(){return this.ids.reduce((e,t)=>(this._validLayer(t)?e.push(this._getItem(t,"layer")):this._validTable(t)&&e.push(this._getItem(t,"table")),e),[])}_getItem(e,t){let s=t==="layer"&&this._layerNameHash?this._layerNameHash[e]:this._tableNameHash?this._tableNameHash[e]:void 0,a=this.showOnlyUpdatableLayers?s&&!s.supportsUpdate:!1,r=s?.name||"",n=this.selectedIds.indexOf(e)>-1;return this.type==="combobox"?i`<calcite-combobox-item .disabled=${a} .heading=${r} .selected=${n} .value=${e}></calcite-combobox-item>`:this.type==="select"?i`<calcite-option .disabled=${a} .label=${r} .selected=${n} .value=${e}></calcite-option>`:this.force&&n||!this.force?i`<calcite-dropdown-group class=${p(a?"disabled":"")} id=${r??l} .selectionMode=${a?"none":"single"}><calcite-dropdown-item .disabled=${!!(t==="table"&&this.showTablesDisabled)} .iconStart=${t} @click=${a?void 0:()=>{this._setSelectedLayer(e)}} .selected=${n}>${r}</calcite-dropdown-item></calcite-dropdown-group>`:null}async _setSelectedLayer(e){if(e!==this.selectedIds[0]){let t;if(this.defaultLayerId&&!this.defaultLayerHonored&&(t=this._getLayerFromHash(this.defaultLayerId),this.defaultLayerHonored=t!==void 0,e=this.defaultLayerHonored?this.defaultLayerId:e),t=t||this._getLayerFromHash(e),!this._skipEditCheck&&this.beforeLayerSelectionChange.emit({currentId:this.selectedIds[0],newId:e,ref:this.el}).defaultPrevented)return;this.selectedName=t?.name,this.selectedIds=[e],this._popover.value&&(this._popover.value.open=!1),this.layerSelectionChange.emit(this.selectedIds)}else{let t=this.mapView&&await y(this.mapView,this.selectedIds[0]);this.selectedName=t?.title||""}}_getLayerFromHash(e){return this._layerNameHash&&Object.keys(this._layerNameHash).indexOf(e)>-1?this._layerNameHash[e]:this._tableNameHash&&Object.keys(this._tableNameHash).indexOf(e)>-1?this._tableNameHash[e]:void 0}async _setLayers(){if(this.mapView){await this._initLayerTableHash();let e=[];this._layerNameHash&&(e=this.showOnlyUpdatableLayers?this._getEditableIds(this._layerNameHash):Object.keys(this._layerNameHash));let t=[];if(this._tableNameHash&&(t=this.showTables?this.showOnlyUpdatableLayers?this._getEditableIds(this._tableNameHash):Object.keys(this._tableNameHash):[]),this.configLayerOrderDefined){let s=[...e.reverse(),...t.reverse()];this.ids=this.enabledLayerIds.length>0?this.enabledLayerIds.filter(a=>s.includes(a)):s}else this.ids=[...e.reverse().filter(s=>this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(s)>-1:!0),...t.reverse().filter(s=>this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(s)>-1:!0)];this.idsFound.emit(this.ids)}}_getEditableIds(e){return Object.keys(e).filter(t=>e[t].supportsUpdate)}async _initLayerTableHash(){this._layerNameHash=this.mapView&&await f(this.mapView,this.showOnlyUpdatableLayers),this._tableNameHash=this.showTables&&this.mapView?await I(this.mapView,this.showOnlyUpdatableLayers):{}}_validLayer(e){let t=this._pnContextConsumer.value,s=this._layerNameHash&&this._layerNameHash[e]?.name;return s!==void 0&&Object.keys(t?.managedLayers||[]).indexOf(s)<0&&(this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(e)>-1:!0)}_validTable(e){let t=this._pnContextConsumer.value,s=this._tableNameHash&&this._tableNameHash[e]?.name,a=s&&this.showTables;return a?(t?.managedTables||[]).indexOf(s)<0&&(this.enabledLayerIds?.length>0?this.enabledLayerIds.indexOf(e)>-1:!0):a!==void 0}_layerSelectionChange(e){if(this._layerElement.value){let t=e||(Array.isArray(this._layerElement.value.value)?this._layerElement.value.value:[this._layerElement.value.value]);if(JSON.stringify(t)!==JSON.stringify([""])){if(JSON.stringify(t)===JSON.stringify(this.selectedIds)||!this._skipEditCheck&&this.beforeLayerSelectionChange.emit({currentIds:this.selectedIds,newIds:t,ref:this.el}).defaultPrevented)return;this.selectedIds=t,this.layerSelectionChange.emit(this.selectedIds)}}}};u("map-layer-picker",m);return m},a,e)