@esri/solutions-components 5.1.0-next.154 → 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.
- package/dist/cdn/2C6OKRTL.js +2 -0
- package/dist/cdn/{4D4UXCEU.js → 2K4FSWCI.js} +1 -1
- package/dist/cdn/2L62YUIH.js +2 -0
- package/dist/cdn/2UIPY2ED.js +2 -0
- package/dist/cdn/{DN3PZCF4.js → 37SYO65U.js} +1 -1
- package/dist/cdn/{XK36P3C4.js → 3N4FGXFE.js} +1 -1
- package/dist/cdn/{2IGILR4T.js → 5KWJUQRY.js} +1 -1
- package/dist/cdn/66VSNZFA.js +2 -0
- package/dist/cdn/{GCEPKR7I.js → 6LDTUOZL.js} +1 -1
- package/dist/cdn/6OJALTOU.js +2 -0
- package/dist/cdn/6RNSFI2J.js +2 -0
- package/dist/cdn/{3JZVI5AM.js → 6RONZCGM.js} +1 -1
- package/dist/cdn/{DMM5WA5Q.js → 6Y47Z4QA.js} +1 -1
- package/dist/cdn/{UNBTFJYB.js → 7IXJB2CS.js} +1 -1
- package/dist/cdn/7JC52SFZ.js +2 -0
- package/dist/cdn/{IFONVCBL.js → 7LKPG6HJ.js} +1 -1
- package/dist/cdn/{VY5TD3VS.js → 7ZEDJMU7.js} +1 -1
- package/dist/cdn/{YXHO47AZ.js → 7ZJQQBSR.js} +1 -1
- package/dist/cdn/{PNESECPO.js → A6VVARNG.js} +1 -1
- package/dist/cdn/{JYUZPAPI.js → A7PEHKA2.js} +1 -1
- package/dist/cdn/{SYQ5E5TV.js → AKQEDHUS.js} +1 -1
- package/dist/cdn/{TOIBA2KF.js → ALQFRJNC.js} +1 -1
- package/dist/cdn/{FWRT4BPD.js → ARFCWGCB.js} +1 -1
- package/dist/cdn/{PPRV6EZZ.js → AVBZ2B75.js} +1 -1
- package/dist/cdn/{SZRVESYE.js → AXFB53AQ.js} +1 -1
- package/dist/cdn/{4ASIXXDP.js → AZDHGEBN.js} +1 -1
- package/dist/cdn/{JNE3LBQU.js → BFC6PQCO.js} +1 -1
- package/dist/cdn/BLR4MTOP.js +2 -0
- package/dist/cdn/{LHG6NOEP.js → BM4VSEDV.js} +1 -1
- package/dist/cdn/{DDJSF2M3.js → BWRBYYGI.js} +1 -1
- package/dist/cdn/C4F2OOUL.js +2 -0
- package/dist/cdn/C4T4HSG2.js +2 -0
- package/dist/cdn/C5KDPY7R.js +2 -0
- package/dist/cdn/{FZKGL66L.js → C76SZF3J.js} +1 -1
- package/dist/cdn/{TB33W36T.js → CEPWTLDN.js} +1 -1
- package/dist/cdn/{XO54BFTC.js → CFQKZMGC.js} +1 -1
- package/dist/cdn/CJ3EZE7U.js +2 -0
- package/dist/cdn/CPBEDBQJ.js +2 -0
- package/dist/cdn/{UWSHU7MG.js → CQQH3XK5.js} +1 -1
- package/dist/cdn/{WC37HMOI.js → CSAXBV46.js} +1 -1
- package/dist/cdn/{TLM7N22U.js → DF7TCZUS.js} +1 -1
- package/dist/cdn/{QFFHU77I.js → DMX66TUK.js} +1 -1
- package/dist/cdn/{NKX2EIDR.js → DOXKOGC2.js} +1 -1
- package/dist/cdn/{BJAEUZFB.js → EF4LWVLU.js} +1 -1
- package/dist/cdn/{IEC46RE7.js → EKFKOS5K.js} +1 -1
- package/dist/cdn/{ZCPVOS4Q.js → ENTBR5YC.js} +1 -1
- package/dist/cdn/EPKRNLRL.js +2 -0
- package/dist/cdn/{LGZDNUGT.js → FS5WR74E.js} +1 -1
- package/dist/cdn/{JOAEH3CI.js → G4ADX65Y.js} +1 -1
- package/dist/cdn/{NV2DLQDN.js → G5PL37M5.js} +1 -1
- package/dist/cdn/{RRD4QUQS.js → GBDBGOCT.js} +1 -1
- package/dist/cdn/{OAEWZFWV.js → GDX4FWG7.js} +1 -1
- package/dist/cdn/{GG4IIHQE.js → GFEDQ7WH.js} +1 -1
- package/dist/cdn/{G6EZOEPB.js → GJ7QMCFT.js} +1 -1
- package/dist/cdn/GXIGM56I.js +2 -0
- package/dist/cdn/{DD2Y5NOB.js → GYTMAAVH.js} +1 -1
- package/dist/cdn/HRH3YBW4.js +2 -0
- package/dist/cdn/{KV76ATT5.js → HS55CSUO.js} +1 -1
- package/dist/cdn/HVT2WBVC.js +2 -0
- package/dist/cdn/{QD22B6N2.js → I3A27HFS.js} +1 -1
- package/dist/cdn/IADXB53D.js +2 -0
- package/dist/cdn/{DXQQQNOF.js → IBAJ7OFO.js} +1 -1
- package/dist/cdn/{PX6AYCC4.js → IM3C52I6.js} +1 -1
- package/dist/cdn/{EVO7B63R.js → IR55PBAU.js} +1 -1
- package/dist/cdn/{JXTZNXTZ.js → IUNUJ6GU.js} +1 -1
- package/dist/cdn/{GMSG7ZRV.js → IZ7DJL5P.js} +1 -1
- package/dist/cdn/{FNTXI57U.js → IZDAQGZD.js} +1 -1
- package/dist/cdn/{UIGRRD7P.js → JET6MYZJ.js} +1 -1
- package/dist/cdn/{NYQQSL25.js → JM4BUUFY.js} +1 -1
- package/dist/cdn/JQANOMEB.js +2 -0
- package/dist/cdn/JTENM3PQ.js +2 -0
- package/dist/cdn/KGU32CDZ.js +2 -0
- package/dist/cdn/{EKUENEEW.js → L2XO4YLV.js} +1 -1
- package/dist/cdn/{LWT3JEQ6.js → LJIX7K76.js} +5 -5
- package/dist/cdn/{ZOF7AUSS.js → LOPXSWVG.js} +1 -1
- package/dist/cdn/M5ZEJF3J.js +2 -0
- package/dist/cdn/{WG5NM5XY.js → MDMFIEM7.js} +1 -1
- package/dist/cdn/MPSNK45A.js +2 -0
- package/dist/cdn/{XJAXXELZ.js → N2LDQKCJ.js} +1 -1
- package/dist/cdn/{L5YT5FRJ.js → O4YFJXGF.js} +1 -1
- package/dist/cdn/OOP3DI7Y.js +2 -0
- package/dist/cdn/ORMBTE2Z.js +2 -0
- package/dist/cdn/OUNL2UWX.js +7 -0
- package/dist/cdn/OVKPT3QA.js +2 -0
- package/dist/cdn/{RUVOSMTB.js → OZFVLORO.js} +1 -1
- package/dist/cdn/{SHEPQVUX.js → PCP5UFZR.js} +1 -1
- package/dist/cdn/{3CDO3ATJ.js → PJTHEJG4.js} +1 -1
- package/dist/cdn/PRM47E4O.js +2 -0
- package/dist/cdn/{ZCLYSOQM.js → Q7GMS6X2.js} +1 -1
- package/dist/cdn/{2HAYT46E.js → QA3SYWWX.js} +1 -1
- package/dist/cdn/{3S5PVZVU.js → QCCLUBLV.js} +1 -1
- package/dist/cdn/{3KYQE6O5.js → QCNGBMWJ.js} +1 -1
- package/dist/cdn/{X6JL6SAH.js → QLRGY4WQ.js} +1 -1
- package/dist/cdn/{D6VR7GCD.js → QSGVCMF2.js} +1 -1
- package/dist/cdn/{ZTRQVOAR.js → QX7YVGEN.js} +1 -1
- package/dist/cdn/{S4VDUHA7.js → RCOHFQC5.js} +1 -1
- package/dist/cdn/{U56TK45K.js → RFSPNC4B.js} +13 -13
- package/dist/cdn/RLV5JHIU.js +2 -0
- package/dist/cdn/RXOPHYUF.js +2 -0
- package/dist/cdn/{M73VTGBI.js → S2A7SDYB.js} +1 -1
- package/dist/cdn/{RYBSWXQQ.js → S2Y44VZV.js} +1 -1
- package/dist/cdn/{3ZYEIYTY.js → S6J35GRM.js} +1 -1
- package/dist/cdn/SIODWUWX.js +2 -0
- package/dist/cdn/{WZCJ2VDD.js → SNJPMQCE.js} +1 -1
- package/dist/cdn/{DUXRJBCP.js → SRLQU37I.js} +1 -1
- package/dist/cdn/TCUNTTNI.js +2 -0
- package/dist/cdn/{AOWNMC3W.js → TK235QG4.js} +1 -1
- package/dist/cdn/TM6TYAW2.js +90 -0
- package/dist/cdn/{ITSA4WXG.js → TRXDA7G2.js} +1 -1
- package/dist/cdn/U2ZKJCSY.js +27 -0
- package/dist/cdn/UBPOT5V3.js +2 -0
- package/dist/cdn/{QGDR24DC.js → UY66XIX3.js} +1 -1
- package/dist/cdn/{BAFYN4RD.js → V2DYKK6V.js} +1 -1
- package/dist/cdn/{QEPO225M.js → V6VJJHYJ.js} +1 -1
- package/dist/cdn/{YM2IDMZO.js → V73HMWMC.js} +1 -1
- package/dist/cdn/{7WIFBTQF.js → VCL4OTSQ.js} +6 -14
- package/dist/cdn/{Z23BVIGQ.js → VYCVNEK2.js} +1 -1
- package/dist/cdn/{2BM4W44V.js → WAJG744H.js} +1 -1
- package/dist/cdn/{CDJCXGBN.js → WFWEWVGR.js} +1 -1
- package/dist/cdn/WRLN7DLT.js +2 -0
- package/dist/cdn/X3CDW2ME.js +78 -0
- package/dist/cdn/{3TIQRBWC.js → XDONARND.js} +1 -1
- package/dist/cdn/{MGEDATQ7.js → XF5N3NI5.js} +1 -1
- package/dist/cdn/{63ZMLOEP.js → XKBOPER7.js} +1 -1
- package/dist/cdn/XOEFU24R.js +2 -0
- package/dist/cdn/{U6JZYJ4D.js → Y3Q6SFIV.js} +1 -1
- package/dist/cdn/Y6KZTCZD.js +2 -0
- package/dist/cdn/{WI67R264.js → YKSW755L.js} +1 -1
- package/dist/cdn/YM4U4HSN.js +2 -0
- package/dist/cdn/{OQOCOC5R.js → ZQAD6SUE.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/assessBuildRequest.js +13 -13
- package/dist/chunks/assessUpdateRequest.js +29 -26
- package/dist/chunks/assistantResponse.js +6 -14
- package/dist/chunks/classifyIntent.js +5 -5
- package/dist/chunks/updateDesign.js +1 -1
- package/dist/components/arcgis-solutions-assistant/customElement.js +449 -446
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +8 -5
- package/package.json +3 -3
- package/dist/cdn/4MAZNAHZ.js +0 -2
- package/dist/cdn/4RU3GWUU.js +0 -2
- package/dist/cdn/6IBUETLU.js +0 -2
- package/dist/cdn/6ZN2VAXG.js +0 -2
- package/dist/cdn/7CAFUU5D.js +0 -2
- package/dist/cdn/APL6U736.js +0 -2
- package/dist/cdn/BBECVTV3.js +0 -2
- package/dist/cdn/BG4LNU44.js +0 -2
- package/dist/cdn/BZLMMSFW.js +0 -2
- package/dist/cdn/CUOHPTI7.js +0 -2
- package/dist/cdn/CVHXDPJO.js +0 -2
- package/dist/cdn/DVWIWECZ.js +0 -27
- package/dist/cdn/F2V6IA23.js +0 -2
- package/dist/cdn/GWJRCE5C.js +0 -90
- package/dist/cdn/JGMNZLH4.js +0 -7
- package/dist/cdn/JMYENPUQ.js +0 -2
- package/dist/cdn/LBY3ZNJE.js +0 -2
- package/dist/cdn/LZDMYPQ2.js +0 -75
- package/dist/cdn/PYBOC3DB.js +0 -2
- package/dist/cdn/RMEDO4JC.js +0 -2
- package/dist/cdn/SO27FVOH.js +0 -2
- package/dist/cdn/SWM5KEF6.js +0 -2
- package/dist/cdn/TDH6R4JP.js +0 -2
- package/dist/cdn/TWJSFINX.js +0 -2
- package/dist/cdn/UQDRAXO2.js +0 -2
- package/dist/cdn/UQN2JCKP.js +0 -2
- package/dist/cdn/WDRZR4N3.js +0 -2
- package/dist/cdn/WW6SEFWM.js +0 -2
- package/dist/cdn/XDF5MAGN.js +0 -2
- package/dist/cdn/Y7F2QFO6.js +0 -2
- package/dist/cdn/YCJJWOTP.js +0 -2
- package/dist/cdn/ZWKTEPK3.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import e from"./KGUELU4O.js";import{a as xe,b as Ge,c as ue}from"./TCUNTTNI.js";import d from"./C4F2OOUL.js";import c from"./SIODWUWX.js";import b from"./7JC52SFZ.js";import a from"./4AFANEZZ.js";import{a as je}from"./CJ3EZE7U.js";import{d as Ne}from"./C5KDPY7R.js";import{a as Ke,b as de,c as Ee,d as me,e as Qe,f as Xe,g as ye,h as Re,i as Ye,j as Ze,k as Oe}from"./YM4U4HSN.js";import{a as j}from"./IADXB53D.js";import{a as Q}from"./ONARC6AZ.js";import{b as We}from"./HVT2WBVC.js";import"./ISFTCFSJ.js";import{E as Ue,F as Le,G as qe,I as x,J as k,h as Be,i as L,j as _e,l as ge,t as De}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([ct,vt,gt,q,fe,Ct,,{a:N,b:J,c:Je,d:he},{a:be,b:Ve,d:et,f:tt,g:Ae,h:it,i:nt,j:at},{a:rt,b:Ce,c:st,g:lt},oe])=>{(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.maquette={}))})(void 0,(function(d){"use strict";var e=function(){var t,i;return{invalidate:function(){i=void 0,t=void 0},result:function(a,c){if(t)for(var g=0;g<a.length;g++)t[g]!==a[g]&&(i=void 0);return i||(i=c(),t=a),i}}},n="http://www.w3.org/",l="".concat(n,"2000/svg"),r="".concat(n,"1999/xlink"),s=[],u=function(t,i){var a={};return Object.keys(t).forEach(function(c){a[c]=t[c]}),i&&Object.keys(i).forEach(function(c){a[c]=i[c]}),a},h=function(t,i){return t.vnodeSelector!==i.vnodeSelector?!1:t.properties&&i.properties?t.properties.key!==i.properties.key?!1:t.properties.bind===i.properties.bind:!t.properties&&!i.properties},$=function(t){if(typeof t!="string")throw new Error("Style values must be strings")},w=function(t,i,a){if(i.vnodeSelector!==""){for(var c=a;c<t.length;c++)if(h(t[c],i))return c}return-1},S=function(t,i,a,c){var g=t[i];if(g.vnodeSelector!==""){var o=g.properties,E=o?o.key===void 0?o.bind:o.key:void 0;if(!E){for(var p=0;p<t.length;p++)if(p!==i){var f=t[p];if(h(f,g))throw Object.assign(new Error("".concat(a.vnodeSelector," had a ").concat(g.vnodeSelector," child ").concat(c==="added"?c:"removed",", but there is now more than one. You must add unique key properties to make them distinguishable.")),{parentNode:a,childNode:g})}}}},R=function(t){if(t.properties){var i=t.properties.enterAnimation;i&&i(t.domNode,t.properties)}},_=[],T=!1,M=function(t){(t.children||[]).forEach(M),t.properties&&t.properties.afterRemoved&&t.properties.afterRemoved.apply(t.properties.bind||t.properties,[t.domNode])},I=function(){T=!1,_.forEach(M),_.length=0},P=function(t){_.push(t),T||(T=!0,typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(I,{timeout:16}):setTimeout(I,16))},C=function(t){var i=t.domNode;if(t.properties){var a=t.properties.exitAnimation;if(a){i.style.pointerEvents="none";var c=function(){i.parentNode&&(i.parentNode.removeChild(i),P(t))};a(i,c,t.properties);return}}i.parentNode&&(i.parentNode.removeChild(i),P(t))},B=["on","afterCreate","afterUpdate","afterRemoved","enterAnimation","exitAnimation","updateAnimation"];function U(t){return!B.includes(t)}var K=function(t,i,a){if(i){for(var c=a.eventHandlerInterceptor,g=Object.keys(i).filter(U),o=g.length,E=0;E<o;E++){var p=g[E],f=i[p];if(p==="className")throw new Error('Property "className" is not supported, use "class".');if(p==="class")se(t,f,!0);else if(p==="classes")for(var v=Object.keys(f),A=v.length,b=0;b<A;b++){var y=v[b];f[y]&&t.classList.add(y)}else if(p==="styles")for(var z=Object.keys(f),F=z.length,b=0;b<F;b++){var G=z[b],te=f[G];te&&($(te),a.styleApplyer(t,G,te))}else if(p!=="key"&&f!==null&&f!==void 0){var ve=typeof f;ve==="function"?(p.lastIndexOf("on",0)===0&&c&&(f=c(p,f,t,i)),t[p]=f):a.namespace===l?p==="href"?t.setAttributeNS(r,p,f):t.setAttribute(p,f):ve==="string"&&p!=="value"&&p!=="innerHTML"?t.setAttribute(p,f):t[p]=f}}if(i.on)for(var ie=0,pe=Object.entries(i.on);ie<pe.length;ie++){var Y=pe[ie],Z=Y[0],O=Y[1],ne=typeof O=="function"?O:O.listener;c&&(ne=c(Z,ne,t,i)),ne&&t.addEventListener(Z,ne,typeof O=="function"?void 0:O.options)}}},H=function(t,i,a){if(i)for(var c=0,g=i;c<g.length;c++){var o=g[c];W(o,t,void 0,a)}},D=function(t,i,a){H(t,i.children,a),i.text&&(t.textContent=i.text),K(t,i.properties,a),i.properties&&i.properties.afterCreate&&i.properties.afterCreate.apply(i.properties.bind||i.properties,[t,a,i.vnodeSelector,i.properties,i.children])},W=function(t,i,a,c){var g,o,E=0,p=t.vnodeSelector,f=i.ownerDocument;if(p==="")t.domNode?t.domNode.nodeValue=t.text:(o=t.domNode=f.createTextNode(t.text),a!==void 0?i.insertBefore(o,a):i.appendChild(o));else{for(var v=0;v<=p.length;++v){var A=p.charAt(v);if(v===p.length||A==="."||A==="#"){var b=p.charAt(E-1),y=p.slice(E,v);b==="."?o.classList.add(y):b==="#"?o.id=y:(y==="svg"&&(c=u(c,{namespace:l})),c.namespace!==void 0?o=t.domNode=f.createElementNS(c.namespace,y):(o=t.domNode=t.domNode||(!((g=t.properties)===null||g===void 0)&&g.is?f.createElement(y,{is:t.properties.is}):f.createElement(y)),y==="input"&&t.properties&&t.properties.type!==void 0&&o.setAttribute("type",t.properties.type)),a!==void 0?i.insertBefore(o,a):o.parentNode!==i&&i.appendChild(o)),E=v+1}}D(o,t,c)}},V,se=function(t,i,a){i&&i.split(" ").forEach(function(c){c&&t.classList.toggle(c,a)})},we=function(t,i,a,c){if(a){for(var g=!1,o=Object.keys(a).filter(U),E=o.length,p=0;p<E;p++){var f=o[p],v=a[f],A=i[f];if(f==="class")A!==v&&(se(t,A,!1),se(t,v,!0));else if(f==="classes")for(var b=t.classList,y=Object.keys(v),z=y.length,F=0;F<z;F++){var G=y[F],te=!!v[G],ve=!!A[G];te!==ve&&(g=!0,te?b.add(G):b.remove(G))}else if(f==="styles")for(var ie=Object.keys(v),pe=ie.length,F=0;F<pe;F++){var Y=ie[F],Z=v[Y],O=A[Y];Z!==O&&(g=!0,Z?($(Z),c.styleApplyer(t,Y,Z)):c.styleApplyer(t,Y,""))}else if(!v&&typeof A=="string"&&(v=""),f==="value"){var ne=t[f];ne!==v&&v!==A&&(t[f]=v),v!==A&&(g=!0)}else if(v!==A){var He=typeof v;(He!=="function"||!c.eventHandlerInterceptor)&&(c.namespace===l?f==="href"?t.setAttributeNS(r,f,v):t.setAttribute(f,v):He==="string"&&f!=="innerHTML"?f==="role"&&v===""?t.removeAttribute(f):t.setAttribute(f,v):t[f]!==v&&(t[f]=v),g=!0)}}return g}},bt=function(t,i,a,c,g){if(a===c)return!1;a=a||s,c=c||s;for(var o=a.length,E=c.length,p=0,f=0,v,A=!1;f<E;){var b=p<o?a[p]:void 0,y=c[f];if(b!==void 0&&h(b,y))A=V(b,y,g,i,a)||A,p++;else{var z=w(a,y,p+1);if(z>=0){for(v=p;v<z;v++)C(a[v]),S(a,v,t,"removed");A=V(a[z],y,g,i,a)||A,p=z+1}else W(y,i,p<o?a[p].domNode:void 0,g),R(y),S(c,f,t,"added")}f++}if(o>p)for(v=p;v<o;v++)C(a[v]),S(a,v,t,"removed");return A};V=function(t,i,a,c,g){var o=t.domNode,E=!1;if(t===i)return!1;var p=!1;if(i.vnodeSelector===""){if(i.text!==t.text){var f=o.ownerDocument.createTextNode(i.text);try{c.replaceChild(f,o)}catch{c.replaceChild(f,c.childNodes[g.indexOf(t)])}return i.domNode=f,E=!0,E}i.domNode=o}else i.vnodeSelector.lastIndexOf("svg",0)===0&&(a=u(a,{namespace:l})),t.text!==i.text&&(p=!0,i.text===void 0?o.removeChild(o.firstChild):o.textContent=i.text),i.domNode=o,p=bt(i,o,t.children,i.children,a)||p,p=we(o,t.properties,i.properties,a)||p,i.properties&&i.properties.afterUpdate&&i.properties.afterUpdate.apply(i.properties.bind||i.properties,[o,a,i.vnodeSelector,i.properties,i.children]);return p&&i.properties&&i.properties.updateAnimation&&i.properties.updateAnimation(o,i.properties,t.properties),E};var le=function(t,i){return{getLastRender:function(){return t},update:function(a){if(t.vnodeSelector!==a.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var c=t;t=a,V(c,a,i,c.domNode.parentNode,[c])},domNode:t.domNode}},$t={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(t,i,a){i.charAt(0)==="-"?t.style.setProperty(i,a):t.style[i]=a}},ee=function(t){return u($t,t)},ce={create:function(t,i){return i=ee(i),W(t,document.createElement("div"),void 0,i),le(t,i)},append:function(t,i,a){return a=ee(a),W(i,t,void 0,a),le(i,a)},insertBefore:function(t,i,a){return a=ee(a),W(i,t.parentNode,t,a),le(i,a)},merge:function(t,i,a){return a=ee(a),i.domNode=t,D(t,i,a),le(i,a)},replace:function(t,i,a){return a=ee(a),W(i,t.parentNode,t,a),t.parentNode.removeChild(t),le(i,a)}},wt=function(t){return{vnodeSelector:"",properties:void 0,children:void 0,text:t.toString(),domNode:null}},Me=function(t,i,a){for(var c=0,g=i.length;c<g;c++){var o=i[c];Array.isArray(o)?Me(t,o,a):o!=null&&o!==!1&&(typeof o=="string"&&(o=wt(o)),a.push(o))}};function _t(t,i,a){if(Array.isArray(i))a=i,i=void 0;else if(i&&(typeof i=="string"||i.vnodeSelector)||a&&(typeof a=="string"||a.vnodeSelector))throw new Error("h called with invalid arguments");var c,g;return a&&a.length===1&&typeof a[0]=="string"?c=a[0]:a&&(g=[],Me(t,a,g),g.length===0&&(g=void 0)),{vnodeSelector:t,properties:i,children:g,text:c===""?void 0:c,domNode:null}}var Lt=function(t,i,a){var c=[],g=[];return{results:g,map:function(o){for(var E=o.map(t),p=g.slice(),f=0,v=0;v<o.length;v++){var A=o[v],b=E[v];if(b===c[f])g[v]=p[f],a(A,p[f],v),f++;else{for(var y=!1,z=1;z<c.length+1;z++){var F=(f+z)%c.length;if(c[F]===b){g[v]=p[F],a(o[v],p[F],v),f=F+1,y=!0;break}}y||(g[v]=i(A,v))}}g.length=o.length,c=E}}},xt=function(t,i){for(var a=[];t&&t!==i;)a.push(t),t=t.parentNode;return a},Et=function(t,i){var a=t;return i.forEach(function(c){a=a&&a.children?a.children.find(function(g){return g.domNode===c}):void 0}),a},Rt=function(t,i,a){return function(g,o,E,p){return c};function c(g){var o,E;a("domEvent",g);var p=i(),f=xt(g.currentTarget,p.domNode);f.reverse();var v=Et(p.getLastRender(),f);t.scheduleRender();var A;if(v){var b=(E=(o=v.properties["on".concat(g.type)])!==null&&o!==void 0?o:v.properties.on[g.type].listener)!==null&&E!==void 0?E:v.properties.on[g.type];A=b.apply(v.properties.bind||this,arguments)}return a("domEventProcessed",g),A}},At=function(t){var i,a=ee(t),c=a.performanceLogger,g=!0,o,E=!1,p=[],f=[],v=function(b,y,z){var F,G=function(){return F};a.eventHandlerInterceptor=Rt(i,G,c),F=b(y,z(),a),p.push(F),f.push(z)},A=function(){if(o=void 0,!!g){g=!1,c("renderStart",void 0);for(var b=0;b<p.length;b++){var y=f[b]();c("rendered",void 0),p[b].update(y),c("patched",void 0)}c("renderDone",void 0),g=!0}};return i={renderNow:A,scheduleRender:function(){!o&&!E&&(o=requestAnimationFrame(A))},stop:function(){o&&(cancelAnimationFrame(o),o=void 0),E=!0},resume:function(){E=!1,g=!0,i.scheduleRender()},append:function(b,y){v(ce.append,b,y)},insertBefore:function(b,y){v(ce.insertBefore,b,y)},merge:function(b,y){v(ce.merge,b,y)},replace:function(b,y){v(ce.replace,b,y)},detach:function(b){for(var y=0;y<f.length;y++)if(f[y]===b)return f.splice(y,1),p.splice(y,1)[0];throw new Error("renderFunction was not found")}},i};d.createCache=e,d.createMapping=Lt,d.createProjector=At,d.dom=ce,d.h=_t}));function kt(d,e,n,l){let r=st(d,e,n,l),s=St(r);return r.join(s)}function St(d){return d.every(e=>e&&e.includes(rt.NOT_EQUAL))?Ce.AND:Ce.OR}async function dt(d,e,n,l,r){let{fLayerView:s}=d,u=kt(d,e,n,r),h=s?.filter?.timeExtent??s?.featureEffect?.filter?.timeExtent??null,{type:$}=l;if(ue($))s.filter=new ct({where:u,timeExtent:h});else if(l.effect){let{includedEffect:w,excludedEffect:S}=l.effect,R=await oe(S,s,"excludedEffect"),_=await oe(w,s,"includedEffect");s.featureEffect=new vt({filter:new ct({where:u,timeExtent:h}),includedEffect:_,excludedEffect:R})}return await Promise.resolve()}function It(d,e){let{type:n}=d;ue(n)?Tt(e):Ge(n)&&Ft(d,e)}function Tt(d){d?.allLayerViews?.filter(e=>be(e?.layer?.type))?.forEach(e=>{let n=e,l=ut(n);n.filter=l,n.set("featureEffect",null)})}function Ft(d,e){e?.allLayerViews?.filter(n=>be(n?.layer?.type)).forEach(async n=>{let l=n;if(d?.effect&&l){let{includedEffect:r,excludedEffect:s}=d.effect,u=await oe(s,l,"excludedEffect"),h=await oe(r,l,"includedEffect"),$=ut(l);l.featureEffect=new vt({filter:$,includedEffect:h,excludedEffect:u}),l.set(xe.FILTER,null)}})}function ut(d){return d?.filter||d?.featureEffect?.filter}var Pt=80,zt=.2,Mt=6;function X(d){let e=typeof d=="number"?d:Number(d);return Number.isFinite(e)?e:0}function ht(d){if("infos"in d)return Math.max(...d.infos.map(e=>ht(e)),0);if("preview"in d&&d.preview){let e=d.preview,n=e.querySelector("svg"),l=X(n?.getAttribute("width")),r=X(n?.getAttribute("height")),s=X(e.style.width?.replace("px","")),u=X(e.style.height?.replace("px","")),h=X(e.clientWidth),$=X(e.clientHeight);return Math.max(l,r,s,u,h,$)}return"src"in d?Math.max(X(d.width),X(d.height)):0}function Ht(d,e){let n=ht(d);return n>=Pt?!0:typeof e!="number"||e<=0?!1:n+Mt>=e}function Bt(d){if(!(d<=0))return d*zt}var Dt=(void 0)(),mt=10,Fe=20,$e=10,Pe=20,ze={univariateAboveAndBelowSymbol:"esri-univariate-above-and-below-ramp__symbol",colorRamp:"esri-legend__color-ramp"};function Ut(d="vertical"){let e={stroke:"rgb(200, 200, 200)",strokeWidth:"1"};return d==="vertical"?L`<svg height=4 width=10>${_e`<line x1=0 y1=2 x2=10 y2=2 style=${k(e)} />`}</svg>`:L`<svg height=10 width=10>${_e`<line x1=5 y1=0 x2=5 y2=10 style=${k(e)} />`}</svg>`}function qt(d,e="vertical"){let n=document.createElement("div");return n.style.height=`${Fe}px`,n.className=ze.univariateAboveAndBelowSymbol,d!=null&&(n.style.opacity=d.toString()),Dt.append(n,Ut.bind(null,e)),n}function yt(d,e,n="vertical",l){d.infos.forEach((r,s)=>{if(l&&s===2)r.preview=qt(e,n);else{let{size:u}=r,h=re(u)+(n==="horizontal"?Pe:$e),$=r.preview.tagName.toLowerCase()==="div",w=$?r.preview:document.createElement("div");w&&(w.className=ze.univariateAboveAndBelowSymbol),n==="horizontal"?w&&(w.style.width=`${h}px`):w&&(w.style.height=`${h}px`),$||w&&w.appendChild(r.preview),r.preview=w}})}var Wt=96;function re(d){return d?d/72*Wt:0}function ot(d,e="classic"){let n=d.infos,l=n[0].size,r=n[n.length-1].size;return e==="classic"?(re(l)+$e)/2:(re(l)-re(r))/2}function ke(d,e){if(!d)return null;let n=d.infos.map(r=>r.color),l=gt.renderColorRampPreviewHTML(e.type==="full"?n:e.type==="above"?n.slice(0,3):n.slice(2,5),{width:e.width,height:e.height,align:e.rampAlignment,effectList:e.effectList});return l.className=ze.colorRamp,e.opacity!=null&&(l.style.opacity=e.opacity.toString()),l}function Gt(d,e,n,l="vertical"){let r=0,s=d.infos,u=Math.floor(s.length/2),h=e==="full"||e==="above"?0:u,$=e==="full"||e==="below"?s.length-1:u;for(let w=h;w<=$;w++)if(n&&w===u)r+=l==="horizontal"?mt:Fe;else{let S=s[w].size,R=re(S)+(l==="horizontal"?Pe:$e);r+=R}return Math.round(r)}function Se(d,e,n,l="vertical"){let r=Gt(d,e,n,l),s=d.infos,u=Math.floor(s.length/2),h=e==="full"||e==="above"?0:u,$=e==="full"||e==="below"?s.length-1:u,w=e==="full"?s[h].size+s[$].size:e==="above"?s[h].size:s[$].size,S=n?l==="vertical"?Fe:mt:0,R=l==="vertical"?$e*(e==="full"?2:1):Pe*(e==="full"?2:1);return Math.round(r-(re(w)/2+S/2+R/2))}function Jt(d,e,n="vertical"){let l=d.infos,r=l.find(u=>ye(u)),s=l.find(u=>de(u));return r&&(r={...r},r.infos=[...r.infos],yt(r,e,n,!0)),s&&(s={...s},s.infos=[...s.infos]),n==="horizontal"&&(r?.infos.reverse(),s?.infos.reverse()),{sizeRampElement:r,colorRampElement:s}}function Kt(d,e="vertical"){let n=d.infos,l=n.find(s=>ye(s)),r=n.find(s=>de(s));return l&&(l={...l},l.infos=[...l.infos],yt(l,null,e,!1)),r&&(r={...r},r.infos=[...r.infos]),e==="horizontal"&&(l?.infos.reverse(),r?.infos.reverse()),{sizeRampElement:l,colorRampElement:r}}var Qt=Be`@layer{instant-apps-interactive-legend-classic{display:block;--instant-apps-interactive-legend-heading-font-size: 1rem;--instant-apps-interactive-legend-heading-font-weight: normal;--instant-apps-interactive-legend-caption-font-weight: normal;--instant-apps-interactive-legend-secondary-color: var( --calcite-color-text-1 );--instant-apps-interactive-legend-field-name-font-size: 1rem;--instant-apps-interactive-legend-total-feature-count-font-size: .875rem;--instant-apps-interactive-legend-info-font-size: .875rem;--instant-apps-interactive-legend-info-item-background--selected: #c7ebff;--instant-apps-interactive-legend-info-item-background--selected--dark: #009af2;--instant-apps-interactive-legend-info-item-background--hover: #e9e9e9;--instant-apps-interactive-legend-info-item-background--hover--dark: #4a4a4a;--instant-apps-interactive-legend-info-item-color--selected: var( --calcite-color-text-2 );--instant-apps-interactive-legend-secondary-background-color: var( --calcite-color-background );--instant-apps-interactive-legend-ui-margin: 20px 15px;--instant-apps-interactive-legend-ui-padding: 20px 15px}instant-apps-interactive-legend-classic .esri-legend__service{padding:0}instant-apps-interactive-legend-classic .esri-legend__layer-body,instant-apps-interactive-legend-classic .esri-legend__layer,instant-apps-interactive-legend-classic .esri-legend__layer-table,instant-apps-interactive-legend-classic .esri-legend__group-layer-child,instant-apps-interactive-legend-classic .esri-legend__layer-child-table{margin:0;overflow:hidden}instant-apps-interactive-legend-classic .esri-legend__layer-caption calcite-action{margin-right:5px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container{white-space:nowrap}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container calcite-button{margin:2px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{font-weight:var(--instant-apps-interactive-legend-caption-font-weight)}instant-apps-interactive-legend-classic .esri-legend__layer-cell.esri-legend__layer-cell--info{font-size:var(--instant-apps-interactive-legend-info-font-size);text-align:left}instant-apps-interactive-legend-classic .esri-legend__layer-cell,instant-apps-interactive-legend-classic .esri-legend__layer-row{display:flex;align-items:center}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-body{display:block;margin:var(--instant-apps-interactive-legend-ui-margin)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive.instant-apps-interactive-legend__nested-unique-symbol>.esri-legend__layer-body{margin:0}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-row{display:table-row}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-cell{display:table-cell}instant-apps-interactive-legend-classic .esri-legend__layer-cell--symbols{justify-content:center;width:20%}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{width:65%}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{margin:1px;background:transparent;border:none;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row{display:grid;grid-template-columns:minmax(35%,max-content) minmax(0,1fr);column-gap:clamp(.125rem,.3vw,.25rem);align-items:center;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row>.esri-legend__layer-cell--symbols{width:35%;box-sizing:border-box;padding-inline:clamp(.125rem,.3vw,.25rem);display:flex;align-items:center;justify-content:center}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row>.esri-legend__layer-cell--info{display:block;width:auto;min-width:0}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .esri-legend__layer-row,instant-apps-interactive-legend-classic .esri-legend__layer-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{position:relative}instant-apps-interactive-legend-classic .instant-apps-interactive-legend-element-info--selected{background-color:var(--instant-apps-interactive-legend-info-item-background--selected)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected{cursor:pointer;background-color:var(--instant-apps-interactive-legend-info-item-background--selected--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected .esri-legend__layer-cell--info{color:var(--calcite-color-text-inverse)}instant-apps-interactive-legend-classic .hide{display:none}.instant-apps-interactive-legend__compact .esri-legend__layer-row{--instant-apps-interactive-legend-ui-padding: 10px 5px}.instant-apps-interactive-legend__compact .esri-legend__layer-row .esri-legend__layer-cell--info:not(:has(.esri-legend__ramp-labels)){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;line-clamp:2;line-height:1.3125rem;max-height:2.625rem}@media(min-width:992px){instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{cursor:pointer}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#e2f2fe}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#26a9f4}}}`,m={layer:"esri-legend__layer",layerBody:"esri-legend__layer-body",layerRow:"esri-legend__layer-row",layerInfo:"esri-legend__layer-cell esri-legend__layer-cell--info",imageryLayerStretchedImage:"esri-legend__imagery-layer-image--stretched",imageryLayerInfoStretched:"esri-legend__imagery-layer-info--stretched",symbolContainer:"esri-legend__layer-cell esri-legend__layer-cell--symbols",symbol:"esri-legend__symbol",rampContainer:"esri-legend__ramps",sizeRamp:"esri-legend__size-ramp",colorRamp:"esri-legend__color-ramp",opacityRamp:"esri-legend__opacity-ramp",rampLabelsContainer:"esri-legend__ramp-labels",rampLabel:"esri-legend__ramp-label",univariateAboveAndBelowLabel:"esri-univariate-above-and-below-ramp__label",message:"esri-legend__message",layerBodyLargeSymbol:"instant-apps-interactive-legend__layer-body--large-symbol",interactiveLayerRow:"instant-apps-interactive-legend__layer-row--interactive",infoSelected:"instant-apps-interactive-legend-element-info--selected",compact:"instant-apps-interactive-legend__compact"},Xt=24,ft={display:"flex",alignItems:"flex-start"},Ie={marginLeft:"3px"},ae={display:"table-cell",verticalAlign:"middle"},Te=class extends qe{constructor(){super(...arguments),this.featureCountRequestId=0,this._legendContainerRef=Ue(),this._hiddenLegendState={},this._pendingRestore={},this._restoreTimeouts={},this.isLoading=!0,this.zoomTo=!1,this.featureCount=!1,this.filterMode={type:xe.FILTER}}static{this.properties={isLoading:16,legendvm:0,zoomTo:5,featureCount:5,filterMode:0,messages:0}}static{this.styles=Qt}static{this.shadowRootOptions=De}connectedCallback(){super.connectedCallback(),!this.handles&&(this.handles=new Ct)}async load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0}),J.onChange("data",()=>this.requestUpdate())}willUpdate(e){e.has("filterMode")&&this.legendvm?.view&&(this.hasUpdated||!ue(this.filterMode.type))&&It(this.filterMode,this.legendvm.view)}async loaded(){await this.initLegend()}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}async initLegend(){try{await q.whenOnce(()=>this.legendvm?.view);let e=async()=>{try{let n=this.legendvm?.view?.map;await n?.load(),await n?.basemap?.load();let l=n?.allLayers?.map(async h=>await h.load()),r=(await Promise.allSettled(l)).map(h=>h?.status==="fulfilled"&&h?.value?h.value:null).filter(h=>!!h),s=[];r.forEach(h=>{this.legendvm?.view&&s.push(this.legendvm.view.whenLayerView(h))}),await Promise.allSettled(s);let u=await Ae(this.legendvm);J.set("data",{...N.data,...u}),await this.refreshFeatureCount(),this.isLoading=!1,await this.setupWatchersAndListeners()}catch(n){console.error(n),this.isLoading=!1}};this.legendvm?.view?.when(e),this.legendvm?.view?.map?.layers?.on("after-changes",e)}catch{this.isLoading=!1}}getStretchStopLabel(e){let n=this.messages[e.label];return e.label?`${n}: ${typeof e.value=="string"?e.value:fe.formatNumber(e.value,{style:"decimal",notation:e.value.toString().includes("e")?"scientific":"standard"})}`:""}getTitle(e,n){if(!e)return;if(typeof e=="string"||typeof e=="number")return e;if("value"in e||"unit"in e){let s=typeof this.messages?.dotValue=="string"?this.messages.dotValue:"";return fe.substitute(s,e)}if("colorName"in e||"bandName"in e){let{colorName:s,bandName:u}=e,h=this.messages[s],$=typeof this.messages[u]=="string"?this.messages[u]:u;return`${h}: ${$}`}if("showCount"in e)return e.showCount?this.messages.clusterCountTitle:null;let l=null;if(n){let s=e;l=s.ratioPercentTotal?"showRatioPercentTotal":s.ratioPercent?"showRatioPercent":s.ratio?"showRatio":e.normField?"showNormField":e.field?"showField":null}else if(this.isRendererTitle(n)){let s=e;l=s.normField?"showNormField":s.normByPct?"showNormPct":s.field?"showField":null}let r=l==="showField"?"{field}":typeof l=="string"?this.messages[l]:"";return l?fe.substitute(r,{field:e.field,normField:e.normField}):""}isRendererTitle(e){return!e}async setupWatchersAndListeners(){let e=this.legendvm?.view?.map?.allLayers?.filter(r=>be(r?.type)),n=[];for(let r of e)this.legendvm?.view&&n.push(this.legendvm?.view?.whenLayerView(r));let l=[];try{l=await Promise.all(n)}catch(r){console.error(r)}for(let r of l){let s=`fLayerViewScale-${r.layer.id}`;!this.handles?.has(s)&&r&&this.handles?.add(r.watch("visibleAtCurrentScale",()=>{this.createDataForLayer(r.layer).catch(u=>{console.error(u)})}),s)}e?.forEach(r=>{let s=`fLayer-${r?.id}`;this.handles?.has(s)||this.handles?.add(q?.watch(()=>r?.visible,()=>this.handleFeatureLayerVisibilityChange(r)),s)}),this.handles?.add(q.when(()=>this.legendvm,()=>{q.watch(()=>this.legendvm?.view?.updating,()=>{this.legendvm?.view?.updating&&q.when(()=>!this.legendvm?.view?.updating,()=>{this.refreshFeatureCount().catch(r=>{console.error(r)})},{once:!0,initial:!0})},{initial:!0})},{initial:!0,once:!0})),this.handles?.add(q.on(()=>this.legendvm?.activeLayerInfos,"change",r=>{this.regenerateData().then(()=>{this.handles?.add(q.on(()=>r.children,"change",()=>{this.regenerateData().catch(s=>{console.error(s)})}))}).catch(s=>{console.error(s)})})),this.handles?.add(q.on(()=>this.legendvm?.view?.map?.layers,"after-changes",()=>{this.refreshFeatureCount().catch(r=>{console.error(r)})}))}async createDataForLayer(e){let n=e?.id;if(nt(n,this._pendingRestore,this._hiddenLegendState))return;let l=J.get("data")?.[n],r=it(this.legendvm?.activeLayerInfos)?.find(s=>s?.layer?.id===n);if(!l&&r){let s=await Ve(this.legendvm,r);he({intLegendLayerData:s,layerId:n}),await this.refreshFeatureCount()}}applyFilter(e,n,l,r){return async()=>{let s={...N.data?.[n?.id]};r?await dt(s,e,l,this.filterMode,r):await dt(s,e,l,this.filterMode),he({intLegendLayerData:s,layerId:n?.id})}}async regenerateData(){let e=await Ae(this.legendvm),n=at(e,N.data,this._pendingRestore,this._hiddenLegendState);J.set("data",n),await this.refreshFeatureCount(),this.requestUpdate()}async refreshFeatureCount(){if(!this.featureCount)return;let e=++this.featureCountRequestId;try{let n=await lt(this.legendvm,N.data);if(e!==this.featureCountRequestId)return;J.set("data",{...N.data,...n})}catch{}}handleFeatureLayerVisibilityChange(e){let n=e.id,l=J.get("data")?.[n];if(e.visible){this.handleFeatureLayerVisible(n,e);return}this.handleFeatureLayerHidden(n,l)}handleFeatureLayerVisible(e,n){if(this._hiddenLegendState[e]){let l=this._hiddenLegendState[e];this._pendingRestore[e]=l,he({intLegendLayerData:l,layerId:e}),delete this._hiddenLegendState[e],this.clearRestoreGuard(e),this._restoreTimeouts[e]=window.setTimeout(()=>{delete this._pendingRestore[e],delete this._restoreTimeouts[e]},250);return}this.createDataForLayer(n).catch(l=>{console.error(l)})}handleFeatureLayerHidden(e,n){this.clearRestoreGuard(e),n&&(this._hiddenLegendState[e]=n)}clearRestoreGuard(e){this._restoreTimeouts[e]&&(clearTimeout(this._restoreTimeouts[e]),delete this._restoreTimeouts[e]),delete this._pendingRestore[e]}isImageryStretchedLegend(e,n){return!0}render(){let e=this.renderFilteredLayers(),n=J.get("compact")?` ${m.compact}`:"";return this.isLoading?Q("interactive-legend-loader",L`<calcite-loader scale=m .label=${this.messages?.loading} .text=${this.messages?.loading}></calcite-loader>`):Q("interactive-legend-classic-container",L`<div class=${`${j(this.el)}${n}`} ${Le(this._legendContainerRef)}>${e?.length>0?e:L`<div class=${x(m.message)}>${this.messages?.noLegend}</div>`}</div>`)}renderFilteredLayers(){return(this.legendvm?.activeLayerInfos?.toArray()).map(e=>this.renderLegendForLayer(e)).filter(e=>!!e)}renderLegendForLayer(e,n){if(!e.ready)return null;if(e.children.length){let s=e.children.map(u=>this.renderLegendForLayer(u,!0)).toArray();return L`<instant-apps-interactive-legend-group-legend-element class=${x(j(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${n}><div style=${k({paddingLeft:"20px"})} .id=${`${e?.layer?.id}-legend-layer`} slot=content>${s}</div></instant-apps-interactive-legend-group-legend-element>`}let l=e.legendElements;if(l&&!l.length)return null;let r=l.map((s,u)=>this.renderLegendForElement(s,e.layer,e.effectList,e,u)).filter(s=>!!s);return r.length?L`<instant-apps-interactive-legend-layer-element class=${x(j(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${!!n}><div slot=content .id=${`${e?.layer?.id}-legend-layer`} class=${x(m.layer)}>${r}</div></instant-apps-interactive-legend-layer-element>`:null}renderLegendForElement(e,n,l,r,s,u,h){let $=de(e),w=me(e),S=ye(e),R=null,_=je(r,e,s),T=Xe(e),M=Bt(this._legendContainerRef?.value?.clientWidth||this.el?.clientWidth);if(Ye(e)||S){let C=e.infos.some(U=>Ht(U,M)),B=e.infos.map((U,K)=>this.renderLegendForElementInfo(U,n,l,S,e,r,s,K,_,h)).filter(U=>!!U);B.length&&(R=L`<div class=${`${m.layerBody}${C?` ${m.layerBodyLargeSymbol}`:""}`}>${B}</div>`)}else if(de(e)||me(e)||Ee(e)||Re(e)){let C=e;R=this.renderLegendForRamp(C,n.opacity)}else if(T){let C=e;R=Q(Ke.RELATIONSHIP_RAMP,L`<instant-apps-interactive-legend-relationship class=${x(j(this.el))} .filterMode=${this.filterMode} .activeLayerInfo=${r} .legendElement=${C}></instant-apps-interactive-legend-relationship>`)}else if(Qe(e)){let C=e;R=this.renderPieChartRamp(C)}else if(Ze(e)){let C=e;R=this.renderUnivariateAboveAndBelowRamp(C,n.opacity,l)}else if(Oe(e)){let C=e;R=this.renderUnivariateColorSizeRamp(C,n.opacity,l)}if(!R)return null;let I=e.title,P=null;if(typeof I=="string")P=I;else if(I){let C=I,B=this.getTitle(C,$||w);this.isRendererTitle($||w)?"title"in I&&(P=`${I.title} (${B})`):P=B}return L`<instant-apps-interactive-legend-legend-element class=${x(j(this.el))} .activeLayerInfo=${r} .isSizeRamp=${S} .isChild=${!!u} .isColorRamp=${$} .isRelationshipRamp=${T} .isInteractive=${_} .zoomTo=${this.zoomTo} .legendElement=${e} .titleText=${P} .legendvm=${this.legendvm} .legendElementIndex=${s}><div slot=content>${R}</div></instant-apps-interactive-legend-legend-element>`}renderPieChartRamp(e){return L`<div .innerHTML=${`${e.preview?.outerHTML}`}></div>`}renderUnivariateAboveAndBelowRamp(e,n,l){let{sizeRampElement:r,colorRampElement:s}=Jt(e,n);if(!r)return null;let u=Se(r,"above",!0),h=Se(r,"below",!0),$=12,w=ke(s,{width:$,height:u,rampAlignment:"vertical",opacity:n,type:"above",effectList:l}),S=ke(s,{width:$,height:h,rampAlignment:"vertical",opacity:n,type:"below",effectList:l}),R=ot(r),_=r.infos.map(H=>H.label),T=_.map((H,D)=>D===0?L`<div class=${x(H?w?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:D===2?L`<div></div>`:null),M=_.length-1,I=Math.floor(_.length/2),P=_.map((H,D)=>D===I||D===M?L`<div class=${x(H?w?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:null),C={display:"table-cell",verticalAlign:"middle"},B={marginTop:`${R}px`},U={height:`${u}px`},K={height:`${h}px`};return Q("univariate-above-and-below-ramp-preview",L`<div style=${k(ft)}><div class=${x(m.layerBody)}>${r.infos.map((H,D)=>L`<div class=${`${m.layerRow} ${m.sizeRamp}`}><div class=${x(m.symbol)} style=${k(C)} .innerHTML=${H?.preview?.outerHTML??""??""}></div>${!w&&D%2===0?L`<div class=${x(m.layerInfo)}>${_[D]}</div>`:null}</div>`)}</div>${w?Q("color-ramp-preview",L`<div style=${k(B)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${w}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(U)}>${T}</div></div></div><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${S}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(K)}>${P}</div></div></div></div>`):null}</div>`)}renderUnivariateColorSizeRamp(e,n,l){let{sizeRampElement:r,colorRampElement:s}=Kt(e);if(!r)return null;let u=ot(r),h=12,$=Se(r,"full",!1),w=ke(s,{width:h,height:$,rampAlignment:"vertical",opacity:n,type:"full",effectList:l}),S=r.infos.length-1,R=r.infos.map((I,P)=>P===0||P===S?L`<div class=${x(I.label?s?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${I.label}</div>`:null),_={display:"table-cell",verticalAlign:"middle"},T={marginTop:`${u}px`},M={height:`${$}px`};return Q("univariate-above-and-below-ramp-preview",L`<div style=${k(ft)}><div class=${x(m.layerBody)}>${r.infos.map(I=>L`<div class=${`${m.layerRow} ${m.sizeRamp}`}><div class=${x(m.symbol)} style=${k(_)} .innerHTML=${I?.preview?.outerHTML??""??""}></div></div>`)}</div>${Q("color-ramp-preview",L`<div style=${k(T)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${w}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(M)}>${R}</div></div></div></div>`)}</div>`)}renderLegendForRamp(e,n){let l=e.infos,r=me(e),s=Ee(e),u=Re(e),h=e.preview,$=r?m.opacityRamp:"";h&&(h.classList.add(m.colorRamp),$&&h.classList.add($)),n!=null&&h&&(h.style.opacity=n.toString());let w=l.map(_=>{let T;if(s){let M=this.messages[_.label];T=typeof M=="string"?M:_.label}else u?T="value"in _?this.getStretchStopLabel(_):_.label:T=_.label;return L`<div class=${x(_.label?m.rampLabel:"")}>${T}</div>`}),S={width:`${Xt}px`},R={height:h?.style?.height};return L`<div class=${x(m.layerRow)}><div class=${x(m.symbolContainer)} style=${k({...S})}><div class=${x(m.rampContainer)} ${Le(_=>{_?.firstChild&&_?.firstChild?.remove(),_?.appendChild(h)})}></div></div><div class=${x(m.layerInfo)}><div class=${x(m.rampLabelsContainer)} style=${k({...R})}>${w}</div></div></div>`}renderLegendForElementInfo(e,n,l,r,s,u,h,$,w,S){if("infos"in e)return this.renderLegendForElement(e,n,l,u,h,!0,e);let R=null,_=!this.isImageryStretchedLegend(n,s.type);if("preview"in e){let{outerHTML:W}=e.preview;R=L`<div class=${x(m.symbol)} .innerHTML=${W??""}></div>`}else"src"in e&&(R=this.renderImage(e,n,_));if(!R)return null;let T=_?` ${m.imageryLayerInfoStretched}`:"",M=!_&&r?` ${m.sizeRamp}`:"",I,P=Je(n),C=tt(P,S);if(N.data){let W=et(P,n,e,C,$),V=C?C?.nestedInfos:P,se=Ne(V),we=!!u?.children?.length||!!C;I=P?.categories?.size===1&&!we?!W?.selected:se||W?.selected}let B="label"in e?e.label:null,U=C&&!("value"in e)?!1:w,K=J.get("compact"),H=this.getTitle(B,!1)||"",D=C?s.title:B??n?.id;return U?L`<button @click=${this.applyFilter(e,n,$,S)} class=${`${m.layerRow} ${m.interactiveLayerRow}${I?` ${m.infoSelected}`:""}`} title=${(K?`${H}`:void 0)??ge} .ariaPressed=${I?"true":"false"}><div class=${`${m.symbolContainer}${T}${M}`}>${R}</div><div class=${`${m.layerInfo}${T}`}>${this.getTitle(B,!1)||""}</div>${this.featureCount&&!K?L`<instant-apps-interactive-legend-count class=${x(j(this.el))} .categoryId=${D} .activeLayerInfo=${u} .legendvm=${this.legendvm} .selected=${!!I} .legendElement=${s} .infoIndex=${$}></instant-apps-interactive-legend-count>`:null}</button>`:L`<div class=${x(m.layerRow)}><div class=${`${m.symbolContainer}${T}${M}`}>${R}</div><div class=${`${m.layerInfo}${T}`}>${H}</div></div>`}renderImage(e,n,l){let{label:r,src:s,opacity:u}=e,h=l?` ${m.imageryLayerStretchedImage}`:"",$=l?"":` ${m.symbol}`,w={opacity:`${u??n.opacity}`};return L`<img alt=${this.getTitle(r,!1)??ge} src=${s??ge} width=${e.width} height=${e.height} class=${`$${h}${$}`} style=${k(w)}>`}};We("instant-apps-interactive-legend-classic",Te);return Te},"layers/support/FeatureFilter","layers/support/FeatureEffect","symbols/support/symbolUtils","core/reactiveUtils","intl","core/Handles",a,b,c,d,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import a from"./UBEU6ULP.js";import{a as O,b as C}from"./2B4SGB3I.js";import{b as w}from"./I2NTSKBD.js";import{pa as k,ra as $,ta as R}from"./AE5HNAOV.js";import{a as I}from"./MGEDATQ7.js";import{b as S}from"./2I5LGZNX.js";import{E as b,F as f,G as A,I as D,K as h,h as _,i as l,j as v,q as T}from"./FFF5HUPM.js";export default $arcgis.t(([,,,,,,,,{a:N,h:x,m:g,s:p}])=>{var H=_`calcite-card{height:100%;padding-bottom:var(--calcite-spacing-base)}@media(max-width:400px){calcite-card{width:100%}}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);box-sizing:content-box;cursor:pointer}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:var(--calcite-spacing-xl)}.card-image-wrap{flex:0 0 auto}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.card-image{width:100%;display:block;background-color:var(--calcite-color-surface-2)}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip}.width-full{width:100%}.deployed-label-override{--calcite-label-text-color: var(--calcite-color-text-3);--calcite-label-margin-bottom: var(--calcite-spacing-none)}.svg-color{fill:var(--calcite-color-text-3)}.padding-end-1-2{padding-inline-end:var(--calcite-spacing-sm)}.padding-bottom-1-2{padding-bottom:var(--calcite-spacing-sm)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.align-items-center{align-items:center}.font-weight-400,.font-weight-normal{font-weight:400}.font-color-text-2{--calcite-label-text-color: var(--calcite-color-text-2)}.font-line-height{line-height:1.4}.font-size-size--1{font-size:var(--calcite-font-size--1)}.icon-brand-color{--calcite-icon-color: var(--calcite-color-brand)}.header-line-height{--calcite-label-margin-bottom: 0;margin-top:var(--calcite-spacing-sm);margin-bottom:.7rem}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.justify-content-space-between{justify-content:space-between}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-surface-2);--calcite-panel-background-color: var(--calcite-color-surface-2)}.cursor-default{cursor:default}.chipClass{padding-bottom:var(--calcite-spacing-sm)!important}`;async function V(i,e){let t=await R(i,e);if(!t)throw new Error(`Solution ${i} was not found`);let s=e?.portal.replace("/sharing/rest","")??"https://www.arcgis.com",a=[];if(t.templates[0].item)a=t.templates.map(r=>({id:r.itemId,title:r.item.title,type:r.item.type,typeKeywords:r.item.typeKeywords,dependencies:r.dependencies,snippet:r.item.snippet,owner:r.item.owner}));else{let r=t.templates.map(o=>o.type==="Group"?k(o.itemId,e):$(o.itemId,e));a=(await Promise.allSettled(r)).filter(o=>o.status==="fulfilled").map(o=>o.value).map((o,d)=>{let n=typeof o.type>"u"?"group":"item";return{id:o.id,title:o.title,type:o.type??"Group",typeKeywords:o.typeKeywords,dependencies:t.templates[d].dependencies,snippet:o.snippet,url:`${s}/home/${n}.html?id=${o.id}`,owner:o.owner}})}return a}function Se(i,e,t){let s=i.templates.map(u=>u.type),a=[];a.push(X),s.indexOf("Group")>=0&&(a.push(M),a.push(L)),s.indexOf("Feature Service")>=0&&a.push(P);let r=s.indexOf("Feed")>-1;r&&a.push(Z);let o=s.indexOf("Big Data Analytic")>-1;o&&a.push(Q);let d=s.indexOf("Real Time Analytic")>-1;d&&a.push(te),(r||o||d)&&a.push(re),s.indexOf("Workflow")>-1&&(a.push(M),a.push(P),a.push(L),a.push(le)),s.indexOf("Geoprocessing Service")>-1&&(a.push(ee),t.IsEnterprisePortal&&a.push(se));let n=i.templates.reduce((u,K)=>u.concat(K.item.typeKeywords||[]),[]);return W(a,n,t),z(a,e),F(a,i),a}function F(i,e){e.templates.some(t=>t.type==="Group"&&t.item?.membershipAccess==="collaboration")&&i.push(J)}function W(i,e,t){let s=G(t),a=Y(t);["Location Tracking View"].some(r=>e.indexOf(r)>-1)&&(!s&&!a?i.push(ae):s&&!a?i.push(oe):!s&&a&&i.push(ne))}function z(i,e){["HubPremium"].some(t=>e.indexOf(t)>-1)&&i.push(ie)}function G(i){let e=i?.PortalUserSubset?.privileges;return e?["portal:admin:create","portal:admin:delete","portal:admin:update","portal:admin:reassign"].every(s=>e.some(a=>a.startsWith(s))):!1}function Y(i){return i.PortalSubset?.locationTrackingEnabled||!1}function Ie(i,e){let t={leadingMessages:[],bulletedMessages:[],trailingMessages:[]},s=[c.NOTEBOOK,c.VELOCITY,c.HUBPREMIUM,c.WORKFLOW,c.TRACKINGBASE],a=m(i,e,c.VELOCITY);a&&t.leadingMessages.push(a);let r=m(i,e,c.NOTEBOOK);r&&t.leadingMessages.push(r);let o=m(i,e,c.HUBPREMIUM);o&&t.leadingMessages.push(o);let d=m(i,e,c.WORKFLOW);d&&t.leadingMessages.push(d),e=e.filter(u=>s.indexOf(u)<0),e.forEach(u=>{t.bulletedMessages.push(U(i,u))});let n=m(i,e,c.TRACKINGBASE);return n&&t.trailingMessages.push(n),(t.leadingMessages.length>0||t.trailingMessages.length>0||t.bulletedMessages.length>0)&&t.trailingMessages.push(i.missingPrivilegesPopup.suggestedProblemRemedyMessage),t}function m(i,e,t){return e.filter(s=>s.includes(t)).length>0?U(i,t):""}function U(i,e){let t=i.missingPrivilegesPopup.requiredPrivilegesList,s="";switch(e){case"portal:user:createItem":s=t.createItem;break;case"portal:publisher:publishFeatures":s=t.publishFeatures;break;case"portal:user:createGroup":s=t.createGroup;break;case"portal:user:shareToGroup":s=t.shareToGroup;break;case"portal:user:addExternalMembersToGroup":s=t.addMembers;break;case"portal:publisher:publishFeeds":s=t.publishFeeds;break;case"portal:publisher:publishBigDataAnalytics":s=t.publishBigDataAnalytics;break;case"portal:publisher:publishRealTimeAnalytics":s=t.publishRealTimeAnalytics;break;case"solutions:locationtracking:admin:tracking":s=t.requiresLocationTrackingAndAdmin;break;case"solutions:locationtracking:tracking":s=t.requiresLocationTracking;break;case"solutions:locationtracking:admin":s=t.requiresAdmin;break;case"solutions:hubPremium":s=t.hubPremium;break;case"solutions:workflowManager":s=t.workflowManager;break;case"solutions:velocity":s=t.velocity;break;case"solutions:notebook":s=t.requiresNotebookServer;break;case"portal:publisher:publishServerGPServices":s=t.publishGPServices;break}return s}function Oe(i,e){let t=B(e),s=N([{k:"id",v:i}])||"";return t?`${t}/home/item.html${s}`:""}function Ce(i,e,t,s){let a=s||B(t);return a?`${a}/sharing/rest/content/items/${i}/resources/${e}`:""}function B(i){return i?.PortalSubset?.orgUrl||i?.PortalUrl||""}function q(i,e){let t=new URL(i);return t.searchParams.set("token",e),t.toString()}var E=class extends A{constructor(){super(),this.deployedDate="",this.description="",this.diagramKey="",this.heading="",this.itemId="",this.owner="",this.thumbnail="",this.updateAvailable=!1,this.templateInfos=[],this._isDeleteOpen=!1,this._isDiagramOpen=!1,this.isMobile=!1,this.templateInfoGraph=[],this._configureTitlesOpen=!1,this._thumbnailUrl="",this._translations=I({name:"solution-deployed-card",blocking:!0}),this._configContextConsumer=w({context:C,subscribe:!0,callback:async e=>{e&&(this._isOrgAdmin=G(e.authentication),this._thumbnailUrl=`${this.thumbnail}&token=${e.userSession?.token}`)}}),this._deleteDialogRef=b(),this._diagramDialogRef=b(),this._isOrgAdmin=!1,this._isMobileContextConsumer=w({context:O,subscribe:!0,callback:e=>this.isMobile=e}),this.deployedCardSelected=T(),this.listenOn(window,"sessionRefreshed",e=>{this._updateThumbnailToken(e.detail)})}static{this.properties={card:0,deployedDate:1,description:1,diagramKey:1,heading:1,itemId:1,owner:1,thumbnail:1,updateAvailable:5,templateInfos:0,_isDeleteOpen:16,_isDiagramOpen:16,isMobile:16,templateInfoGraph:16,_configureTitlesOpen:16,_thumbnailUrl:16,_translations:16}}static{this.styles=H}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async renderDeleteDialog(){return this._isDeleteOpen=!0,this._renderDeleteDialog(),this._deleteDialogRef.value}async renderDiagramDialog(e){return await this._viewDiagram(e),await this._renderDiagramDialog(),this._diagramDialogRef.value}async getTemplates(){return this._processTemplates(this.card)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}render(){let e=this.card&&this.card.typeKeywords?.includes("AIAssistant");return l`<calcite-card .label=${this.description} @click=${this._cardSelected} @keydown=${t=>p(t,()=>this._cardSelected())}>${this._getImage()}${this._getHeader()}<p class="font-color-text-2 font-line-height font-size-size--1" slot=description>${this.description}</p><div class="width-full display-flex flex-direction-column" slot=footer-start><div class="padding-bottom-1-2">${e&&this._getChips()||""}${this.owner!==""&&this._getOwnerLabel()||""}${this._getDeployedDate()}</div>${this._getConfigureButton()}</div></calcite-card>${this._renderDeleteDialog()}${this._renderDiagramDialog()}${this._renderConfigureTitlesDialog()}`}_getImage(){return l`<div class="card-image-wrap" slot=thumbnail><img alt=${this.heading??h} class="thumbnail card-image" src=${this._thumbnailUrl??h}><div class="hover-text">${this._translations.openSolution}</div></div>`}_getHeader(){return l`<div class="display-flex justify-content-space-between header-line-height" slot=heading><calcite-label layout=inline-space-between scale=l>${this.heading}</calcite-label></div>`}_getOwnerLabel(){return l`<calcite-label class="font-weight-400 padding-end-1-2" layout=inline scale=s>${`${this._translations.owner}:`}<calcite-link class="font-weight-normal" @click=${this._openUserProfile} @keydown=${e=>p(e,()=>this._openUserProfile(e))}>${this.owner}</calcite-link></calcite-label>`}_getDeployedDate(){return l`<div class="display-flex align-items-center"><div class="padding-end-1-2"><svg aria-hidden=true height=16px viewBox="0 0 32 32" width=16px xmlns=http://www.w3.org/2000/svg>${v`<path class="svg-color" d="M29.963 7.672a1.586 1.586 0 0 0-1.584-1.585h-5.274a.187.187 0 0 1-.188-.187V3.977A2 2 0 0 0 20.825 2h-9.672A2.095 2.095 0 0 0 9.06 4.093V5.9a.187.187 0 0 1-.187.187H3.598a1.586 1.586 0 0 0-1.584 1.585v4.016a.281.281 0 0 0 .281.28H4.9l.014-.013V9.153a.177.177 0 0 1 .177-.177h21.46a.456.456 0 0 1 .449.45v13.742A1.832 1.832 0 0 1 25.168 25h-8.892a.568.568 0 0 1-.534-.373 3.98 3.98 0 0 0-7.6.373H5.657a.757.757 0 0 1-.757-.757v-3.055A.188.188 0 0 0 4.714 21H2.028l-.014.014v4.58a2.35 2.35 0 0 0 2.347 2.346h4.161a3.963 3.963 0 0 0 6.8.256.569.569 0 0 1 .475-.256h12.065a2.102 2.102 0 0 0 2.101-2.101zM21 5.625a.375.375 0 0 1-.375.375h-9.25A.375.375 0 0 1 11 5.625V4.45a.456.456 0 0 1 .45-.45h9.1a.456.456 0 0 1 .45.45zM12 28a2 2 0 1 1 2-2 2 2 0 0 1-2 2z" /><path class="svg-color" d="M13.273 17.994a.57.57 0 0 1 .479.262A3.73 3.73 0 0 0 17 20a3.74 3.74 0 0 0 3.403-2.006h3.41a.188.188 0 0 0 .187-.188v-2.589a.187.187 0 0 0-.188-.188H20.8A3.8 3.8 0 0 0 17 12a4.058 4.058 0 0 0-3.69 2.647.568.568 0 0 1-.537.383H1.093a.094.094 0 0 0-.093.093V17.9a.094.094 0 0 0 .094.094zM17 13.9a2.1 2.1 0 1 1-2.1 2.1 2.1 2.1 0 0 1 2.1-2.1z" />`}</svg></div><calcite-label class="deployed-label-override" scale=s>${this._translations.deployedDate.replace("{{date}}",this.deployedDate)}</calcite-label></div>`}_getChips(){return l`<calcite-chip class="chipClass" icon=effects .label=${this._translations.builtWithAI} scale=s>${this._translations.builtWithAI}</calcite-chip>`}_getConfigureButton(){let e=this._configContextConsumer.value?.userSession?.username,t=this._configContextConsumer.value?.authentication?.CanUpdateSolution,s=this._configContextConsumer.value?.authentication?.CanDeleteSolution&&this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=x(this._configContextConsumer.value),r=this.card?.owner===e||this._isOrgAdmin||t,o=this.card?.owner===e||this._isOrgAdmin||s,d=r?"display-none":"";return l`<calcite-split-button appearance=outline aria-label=${this._translations.openSolution??h} dropdown-label=${this._translations.moreActions??h} kind=neutral @calciteSplitButtonPrimaryClick=${this._cardSelected} @click=${n=>n.stopPropagation()} @keydown=${n=>n.stopPropagation()} overlay-positioning=fixed primary-text=${this._translations.openSolution??h} width=full><calcite-dropdown-group selection-mode=none>${!this.isMobile&&l`<calcite-dropdown-item icon-start=model @click=${this._viewDiagram} @keydown=${n=>p(n,()=>this._viewDiagram(n))}>${this._translations.viewDiagram}</calcite-dropdown-item>`||""}<calcite-dropdown-item icon-start=file-text @click=${this._viewDocumentation} @keydown=${n=>p(n,()=>this._viewDocumentation(n))}>${this._translations.documentation}</calcite-dropdown-item><calcite-dropdown-item icon-start=information @click=${this._viewItemDetails} @keydown=${n=>p(n,()=>this._viewItemDetails(n))}>${this._translations.viewItemDetails}</calcite-dropdown-item>${!this.isMobile&&r&&l`<calcite-dropdown-item .disabled=${a} icon-start=edit-attributes id=solution-configure-titles-dropdown @click=${async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0}} @keydown=${n=>p(n,async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0})}>${this._translations.renameItems}</calcite-dropdown-item>`||""}${!this.isMobile&&o&&l`<calcite-dropdown-item .disabled=${a} icon-start=trash @click=${this._deleteSolution} @keydown=${n=>p(n,()=>this._deleteSolution(n))}>${this._translations.deleteSolution}</calcite-dropdown-item>`||""}</calcite-dropdown-group><calcite-tooltip class=${D(d)} overlay-positioning=fixed reference-element=solution-configure-titles-dropdown><span>${this._translations.mustOwnSolution}</span></calcite-tooltip></calcite-split-button>`}_renderDeleteDialog(){return this._isDeleteOpen?l`<solution-delete-dialog .card=${this.card} @solutionDeleteDialogOpen=${e=>{this._isDeleteOpen=e.detail}} .open=${this._isDeleteOpen} source="Card Dropdown" ${f(this._deleteDialogRef)}></solution-delete-dialog>`:""}_renderDiagramDialog(){return this._isDiagramOpen?l`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")??h} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l ${f(this._diagramDialogRef)}><solution-item-diagram .diagramKey=${this.diagramKey} .templateInfoGraph=${this.templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}_renderConfigureTitlesDialog(){return this._configureTitlesOpen?l`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this._processTemplates(this.card).then(e=>{this.templateInfos=e}),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this._processTemplates(this.card).then(e=>{this.templateInfos=e})}} .open=${this._configureTitlesOpen} source="Card Dropdown" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_cardSelected(){this.deployedCardSelected.emit({card:this.card,cardRef:this.el})}async _viewDiagram(e){e.stopPropagation(),this.card&&(this._telemetry?.logEvent({category:y.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card.title||"",this.card.deployCommonId||"",this.card.deployVersion||"","Dropdown",g(this.card?.typeKeywords)]}),this.templateInfoGraph=await this._processTemplates(this.card),this._isDiagramOpen=!0)}_viewDocumentation(e){e.stopPropagation(),this._telemetry?.logEvent({category:y.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown",g(this.card?.typeKeywords)]}),window.open(this.card.learnMoreUrl,"_blank")}_viewItemDetails(e){e.stopPropagation(),this._telemetry?.logEvent({category:y.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown",g(this.card?.typeKeywords)]}),window.open(this.card.itemUrl,"_blank")}_deleteSolution(e){e.stopPropagation(),this._isDeleteOpen=!0}_openUserProfile(e){e.stopPropagation();let t=this._configContextConsumer.value?.authentication?.PortalSubset?.orgUrl;t&&window.open(`${t}/home/user.html?user=${this.owner}`,"_blank")}async _processTemplates(e){return await V(e.id,this._configContextConsumer.value.userSession)}_updateThumbnailToken(e){this._thumbnailUrl!==""&&(this._thumbnailUrl=q(this._thumbnailUrl,e))}};S("solution-deployed-card",E);var ke=500,$e={AEC:"Architecture, Engineering, and Construction (AEC)",AIRPORTPORTRAIL:"Airports, Ports, and Rails",BUSINESS:"Business",CONSERVATION:"Conservation",DEFENSE:"Defense",FACILITIES:"Facilities",HEALTHANDHUMANSERVICES:"Health and Human Services",PIPELINE:"Pipeline",PUBLICSAFETY:"Public Safety",RENEWABLES:"Renewables",STATEANDLOCALGOVERNMENT:"State and Local Government",TELECOMMUNICATIONS:"Telecommunications",UTILITIES:"Utilities"},Re={AIRPORT:"Airports",AGRICULTURE:"Agriculture",ASSESSMENTANDTAXATION:"Assessment and Taxation",DISTRICTENERGY:"District Energy",ELECTIONS:"Elections",ELECTRIC:"Electric",EMERGENCYMANAGEMENT:"Emergency Management",ENVIRONMENTANDNATURALRESOURCES:"Environment and Natural Resources",FIRESERVICE:"Fire Service",FISHANDWILDLIFE:"Fish and Wildlife",GAS:"Gas",HEALTHANDHUMANSERVICES:"Health and Human Services",LAWENFORCEMENT:"Law Enforcement",NATURALRESOURCES:"Natural Resources",PARKS:"Parks",PLANNINGANDDEVELOPMENT:"Planning and Development",PROTECTEDAREAS:"Protected Areas",PUBLICWORKS:"Public Works",SEWER:"Sewer",STORMWATER:"Stormwater",TELECOMMUNICATIONS:"Telecommunications",TRANSPORTATION:"Transportation",WATER:"Water Distribution"},c=(i=>(i.HUBPREMIUM="solutions:hubPremium",i.NOTEBOOK="solutions:notebook",i.TRACKINGBASE="solutions:locationtracking",i.TRACKING="solutions:locationtracking:tracking",i.TRACKINGADMIN="solutions:locationtracking:admin",i.TRACKINGADMINANDTRACKING="solutions:locationtracking:admin:tracking",i.VELOCITY="solutions:velocity",i.WORKFLOW="solutions:workflowManager",i))(c||{}),j=(i=>(i.VELOCITYBIGDATA="portal:publisher:publishBigDataAnalytics",i.VELOCITYFEEDS="portal:publisher:publishFeeds",i.VELOCITYREALTIME="portal:publisher:publishRealTimeAnalytics",i))(j||{}),Ne='((typekeywords:Deployed,"ArcGIS Solution") OR (typekeywords:Deployed,AIAssistant) OR ((typekeywords:Deployed) AND (created:[1577862000000 TO 1622576880000])))',xe="(typekeywords:Solution,Template)",J="portal:user:addExternalMembersToGroup",X="portal:user:createItem",M="portal:user:createGroup",Q="portal:publisher:publishBigDataAnalytics",P="portal:publisher:publishFeatures",Z="portal:publisher:publishFeeds",ee="portal:publisher:publishServerGPServices",te="portal:publisher:publishRealTimeAnalytics",L="portal:user:shareToGroup",ie="solutions:hubPremium",se="solutions:notebook",ae="solutions:locationtracking:admin:tracking",oe="solutions:locationtracking:tracking",ne="solutions:locationtracking:admin",re="solutions:velocity",le="solutions:workflowManager",Me=250,Pe=256,y={SOLUTION_DETAILS:"Solution Details",GLOBAL_NAVIGATION:"Global Nav",ALL_SOLUTIONS:"Solutions",DEPLOYMENTS:"Deployments",ASSISTANT:"Assistant",RESOURCES:"Resources",BUILDER:"Solution Builder"},Le={MINE:"My deployments",ORG:"Organization"};return{a:V,b:Se,c:G,d:Ie,e:Oe,f:Ce,g:q,h:E,i:ke,j:$e,k:Re,l:c,m:j,n:Ne,o:xe,p:Me,q:Pe,r:y,s:Le}},"identity/IdentityManager","identity/OAuthInfo","portal/Portal","intl","geometry/Extent","geometry/SpatialReference","geometry/operators/projectOperator","geometry/operators/support/geographicTransformationUtils",a)
|
|
2
|
+
import a from"./UBEU6ULP.js";import{a as O,b as C}from"./2B4SGB3I.js";import{b as w}from"./I2NTSKBD.js";import{pa as k,ra as $,ta as R}from"./AE5HNAOV.js";import{a as I}from"./XF5N3NI5.js";import{b as S}from"./2I5LGZNX.js";import{E as b,F as f,G as A,I as D,K as h,h as _,i as l,j as v,q as T}from"./FFF5HUPM.js";export default $arcgis.t(([,,,,,,,,{a:N,h:x,m:g,s:p}])=>{var H=_`calcite-card{height:100%;padding-bottom:var(--calcite-spacing-base)}@media(max-width:400px){calcite-card{width:100%}}calcite-card:hover img{-webkit-filter:brightness(30%);filter:brightness(30%);-webkit-transition:all .1s ease;-moz-transition:all .1s ease;-o-transition:all .1s ease;-ms-transition:all .1s ease;transition:all .1s ease}calcite-card:hover .hover-text{opacity:1;color:#fff}calcite-card:hover{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);box-sizing:content-box;cursor:pointer}.hover-text{transition:.1s ease;opacity:0;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);text-align:center;display:flex;flex-direction:row;align-items:center;height:100%;font-size:var(--calcite-spacing-xl)}.card-image-wrap{flex:0 0 auto}.card-image-wrap{width:100%;position:relative;margin-bottom:0;-webkit-box-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.card-image{width:100%;display:block;background-color:var(--calcite-color-surface-2)}video,img{max-width:100%;height:auto}img{overflow-clip-margin:content-box;overflow:clip}.width-full{width:100%}.deployed-label-override{--calcite-label-text-color: var(--calcite-color-text-3);--calcite-label-margin-bottom: var(--calcite-spacing-none)}.svg-color{fill:var(--calcite-color-text-3)}.padding-end-1-2{padding-inline-end:var(--calcite-spacing-sm)}.padding-bottom-1-2{padding-bottom:var(--calcite-spacing-sm)}.display-flex{display:flex}.display-none{display:none}.flex-direction-column{flex-direction:column}.align-items-center{align-items:center}.font-weight-400,.font-weight-normal{font-weight:400}.font-color-text-2{--calcite-label-text-color: var(--calcite-color-text-2)}.font-line-height{line-height:1.4}.font-size-size--1{font-size:var(--calcite-font-size--1)}.icon-brand-color{--calcite-icon-color: var(--calcite-color-brand)}.header-line-height{--calcite-label-margin-bottom: 0;margin-top:var(--calcite-spacing-sm);margin-bottom:.7rem}.dialog-y-size{--calcite-dialog-size-y: 90% }.dialog-x-size{--calcite-dialog-size-x: 90% }.justify-content-space-between{justify-content:space-between}.panel-bg-color{--calcite-panel-header-background-color: var(--calcite-color-surface-2);--calcite-panel-background-color: var(--calcite-color-surface-2)}.cursor-default{cursor:default}.chipClass{padding-bottom:var(--calcite-spacing-sm)!important}`;async function V(i,e){let t=await R(i,e);if(!t)throw new Error(`Solution ${i} was not found`);let s=e?.portal.replace("/sharing/rest","")??"https://www.arcgis.com",a=[];if(t.templates[0].item)a=t.templates.map(r=>({id:r.itemId,title:r.item.title,type:r.item.type,typeKeywords:r.item.typeKeywords,dependencies:r.dependencies,snippet:r.item.snippet,owner:r.item.owner}));else{let r=t.templates.map(o=>o.type==="Group"?k(o.itemId,e):$(o.itemId,e));a=(await Promise.allSettled(r)).filter(o=>o.status==="fulfilled").map(o=>o.value).map((o,d)=>{let n=typeof o.type>"u"?"group":"item";return{id:o.id,title:o.title,type:o.type??"Group",typeKeywords:o.typeKeywords,dependencies:t.templates[d].dependencies,snippet:o.snippet,url:`${s}/home/${n}.html?id=${o.id}`,owner:o.owner}})}return a}function Se(i,e,t){let s=i.templates.map(u=>u.type),a=[];a.push(X),s.indexOf("Group")>=0&&(a.push(M),a.push(L)),s.indexOf("Feature Service")>=0&&a.push(P);let r=s.indexOf("Feed")>-1;r&&a.push(Z);let o=s.indexOf("Big Data Analytic")>-1;o&&a.push(Q);let d=s.indexOf("Real Time Analytic")>-1;d&&a.push(te),(r||o||d)&&a.push(re),s.indexOf("Workflow")>-1&&(a.push(M),a.push(P),a.push(L),a.push(le)),s.indexOf("Geoprocessing Service")>-1&&(a.push(ee),t.IsEnterprisePortal&&a.push(se));let n=i.templates.reduce((u,K)=>u.concat(K.item.typeKeywords||[]),[]);return W(a,n,t),z(a,e),F(a,i),a}function F(i,e){e.templates.some(t=>t.type==="Group"&&t.item?.membershipAccess==="collaboration")&&i.push(J)}function W(i,e,t){let s=G(t),a=Y(t);["Location Tracking View"].some(r=>e.indexOf(r)>-1)&&(!s&&!a?i.push(ae):s&&!a?i.push(oe):!s&&a&&i.push(ne))}function z(i,e){["HubPremium"].some(t=>e.indexOf(t)>-1)&&i.push(ie)}function G(i){let e=i?.PortalUserSubset?.privileges;return e?["portal:admin:create","portal:admin:delete","portal:admin:update","portal:admin:reassign"].every(s=>e.some(a=>a.startsWith(s))):!1}function Y(i){return i.PortalSubset?.locationTrackingEnabled||!1}function Ie(i,e){let t={leadingMessages:[],bulletedMessages:[],trailingMessages:[]},s=[c.NOTEBOOK,c.VELOCITY,c.HUBPREMIUM,c.WORKFLOW,c.TRACKINGBASE],a=m(i,e,c.VELOCITY);a&&t.leadingMessages.push(a);let r=m(i,e,c.NOTEBOOK);r&&t.leadingMessages.push(r);let o=m(i,e,c.HUBPREMIUM);o&&t.leadingMessages.push(o);let d=m(i,e,c.WORKFLOW);d&&t.leadingMessages.push(d),e=e.filter(u=>s.indexOf(u)<0),e.forEach(u=>{t.bulletedMessages.push(U(i,u))});let n=m(i,e,c.TRACKINGBASE);return n&&t.trailingMessages.push(n),(t.leadingMessages.length>0||t.trailingMessages.length>0||t.bulletedMessages.length>0)&&t.trailingMessages.push(i.missingPrivilegesPopup.suggestedProblemRemedyMessage),t}function m(i,e,t){return e.filter(s=>s.includes(t)).length>0?U(i,t):""}function U(i,e){let t=i.missingPrivilegesPopup.requiredPrivilegesList,s="";switch(e){case"portal:user:createItem":s=t.createItem;break;case"portal:publisher:publishFeatures":s=t.publishFeatures;break;case"portal:user:createGroup":s=t.createGroup;break;case"portal:user:shareToGroup":s=t.shareToGroup;break;case"portal:user:addExternalMembersToGroup":s=t.addMembers;break;case"portal:publisher:publishFeeds":s=t.publishFeeds;break;case"portal:publisher:publishBigDataAnalytics":s=t.publishBigDataAnalytics;break;case"portal:publisher:publishRealTimeAnalytics":s=t.publishRealTimeAnalytics;break;case"solutions:locationtracking:admin:tracking":s=t.requiresLocationTrackingAndAdmin;break;case"solutions:locationtracking:tracking":s=t.requiresLocationTracking;break;case"solutions:locationtracking:admin":s=t.requiresAdmin;break;case"solutions:hubPremium":s=t.hubPremium;break;case"solutions:workflowManager":s=t.workflowManager;break;case"solutions:velocity":s=t.velocity;break;case"solutions:notebook":s=t.requiresNotebookServer;break;case"portal:publisher:publishServerGPServices":s=t.publishGPServices;break}return s}function Oe(i,e){let t=B(e),s=N([{k:"id",v:i}])||"";return t?`${t}/home/item.html${s}`:""}function Ce(i,e,t,s){let a=s||B(t);return a?`${a}/sharing/rest/content/items/${i}/resources/${e}`:""}function B(i){return i?.PortalSubset?.orgUrl||i?.PortalUrl||""}function q(i,e){let t=new URL(i);return t.searchParams.set("token",e),t.toString()}var E=class extends A{constructor(){super(),this.deployedDate="",this.description="",this.diagramKey="",this.heading="",this.itemId="",this.owner="",this.thumbnail="",this.updateAvailable=!1,this.templateInfos=[],this._isDeleteOpen=!1,this._isDiagramOpen=!1,this.isMobile=!1,this.templateInfoGraph=[],this._configureTitlesOpen=!1,this._thumbnailUrl="",this._translations=I({name:"solution-deployed-card",blocking:!0}),this._configContextConsumer=w({context:C,subscribe:!0,callback:async e=>{e&&(this._isOrgAdmin=G(e.authentication),this._thumbnailUrl=`${this.thumbnail}&token=${e.userSession?.token}`)}}),this._deleteDialogRef=b(),this._diagramDialogRef=b(),this._isOrgAdmin=!1,this._isMobileContextConsumer=w({context:O,subscribe:!0,callback:e=>this.isMobile=e}),this.deployedCardSelected=T(),this.listenOn(window,"sessionRefreshed",e=>{this._updateThumbnailToken(e.detail)})}static{this.properties={card:0,deployedDate:1,description:1,diagramKey:1,heading:1,itemId:1,owner:1,thumbnail:1,updateAvailable:5,templateInfos:0,_isDeleteOpen:16,_isDiagramOpen:16,isMobile:16,templateInfoGraph:16,_configureTitlesOpen:16,_thumbnailUrl:16,_translations:16}}static{this.styles=H}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async renderDeleteDialog(){return this._isDeleteOpen=!0,this._renderDeleteDialog(),this._deleteDialogRef.value}async renderDiagramDialog(e){return await this._viewDiagram(e),await this._renderDiagramDialog(),this._diagramDialogRef.value}async getTemplates(){return this._processTemplates(this.card)}async load(){this._isMobileContextConsumer.value&&(this.isMobile=this._isMobileContextConsumer.value)}render(){let e=this.card&&this.card.typeKeywords?.includes("AIAssistant");return l`<calcite-card .label=${this.description} @click=${this._cardSelected} @keydown=${t=>p(t,()=>this._cardSelected())}>${this._getImage()}${this._getHeader()}<p class="font-color-text-2 font-line-height font-size-size--1" slot=description>${this.description}</p><div class="width-full display-flex flex-direction-column" slot=footer-start><div class="padding-bottom-1-2">${e&&this._getChips()||""}${this.owner!==""&&this._getOwnerLabel()||""}${this._getDeployedDate()}</div>${this._getConfigureButton()}</div></calcite-card>${this._renderDeleteDialog()}${this._renderDiagramDialog()}${this._renderConfigureTitlesDialog()}`}_getImage(){return l`<div class="card-image-wrap" slot=thumbnail><img alt=${this.heading??h} class="thumbnail card-image" src=${this._thumbnailUrl??h}><div class="hover-text">${this._translations.openSolution}</div></div>`}_getHeader(){return l`<div class="display-flex justify-content-space-between header-line-height" slot=heading><calcite-label layout=inline-space-between scale=l>${this.heading}</calcite-label></div>`}_getOwnerLabel(){return l`<calcite-label class="font-weight-400 padding-end-1-2" layout=inline scale=s>${`${this._translations.owner}:`}<calcite-link class="font-weight-normal" @click=${this._openUserProfile} @keydown=${e=>p(e,()=>this._openUserProfile(e))}>${this.owner}</calcite-link></calcite-label>`}_getDeployedDate(){return l`<div class="display-flex align-items-center"><div class="padding-end-1-2"><svg aria-hidden=true height=16px viewBox="0 0 32 32" width=16px xmlns=http://www.w3.org/2000/svg>${v`<path class="svg-color" d="M29.963 7.672a1.586 1.586 0 0 0-1.584-1.585h-5.274a.187.187 0 0 1-.188-.187V3.977A2 2 0 0 0 20.825 2h-9.672A2.095 2.095 0 0 0 9.06 4.093V5.9a.187.187 0 0 1-.187.187H3.598a1.586 1.586 0 0 0-1.584 1.585v4.016a.281.281 0 0 0 .281.28H4.9l.014-.013V9.153a.177.177 0 0 1 .177-.177h21.46a.456.456 0 0 1 .449.45v13.742A1.832 1.832 0 0 1 25.168 25h-8.892a.568.568 0 0 1-.534-.373 3.98 3.98 0 0 0-7.6.373H5.657a.757.757 0 0 1-.757-.757v-3.055A.188.188 0 0 0 4.714 21H2.028l-.014.014v4.58a2.35 2.35 0 0 0 2.347 2.346h4.161a3.963 3.963 0 0 0 6.8.256.569.569 0 0 1 .475-.256h12.065a2.102 2.102 0 0 0 2.101-2.101zM21 5.625a.375.375 0 0 1-.375.375h-9.25A.375.375 0 0 1 11 5.625V4.45a.456.456 0 0 1 .45-.45h9.1a.456.456 0 0 1 .45.45zM12 28a2 2 0 1 1 2-2 2 2 0 0 1-2 2z" /><path class="svg-color" d="M13.273 17.994a.57.57 0 0 1 .479.262A3.73 3.73 0 0 0 17 20a3.74 3.74 0 0 0 3.403-2.006h3.41a.188.188 0 0 0 .187-.188v-2.589a.187.187 0 0 0-.188-.188H20.8A3.8 3.8 0 0 0 17 12a4.058 4.058 0 0 0-3.69 2.647.568.568 0 0 1-.537.383H1.093a.094.094 0 0 0-.093.093V17.9a.094.094 0 0 0 .094.094zM17 13.9a2.1 2.1 0 1 1-2.1 2.1 2.1 2.1 0 0 1 2.1-2.1z" />`}</svg></div><calcite-label class="deployed-label-override" scale=s>${this._translations.deployedDate.replace("{{date}}",this.deployedDate)}</calcite-label></div>`}_getChips(){return l`<calcite-chip class="chipClass" icon=effects .label=${this._translations.builtWithAI} scale=s>${this._translations.builtWithAI}</calcite-chip>`}_getConfigureButton(){let e=this._configContextConsumer.value?.userSession?.username,t=this._configContextConsumer.value?.authentication?.CanUpdateSolution,s=this._configContextConsumer.value?.authentication?.CanDeleteSolution&&this._configContextConsumer.value?.authentication?.CanUpdateSolution,a=x(this._configContextConsumer.value),r=this.card?.owner===e||this._isOrgAdmin||t,o=this.card?.owner===e||this._isOrgAdmin||s,d=r?"display-none":"";return l`<calcite-split-button appearance=outline aria-label=${this._translations.openSolution??h} dropdown-label=${this._translations.moreActions??h} kind=neutral @calciteSplitButtonPrimaryClick=${this._cardSelected} @click=${n=>n.stopPropagation()} @keydown=${n=>n.stopPropagation()} overlay-positioning=fixed primary-text=${this._translations.openSolution??h} width=full><calcite-dropdown-group selection-mode=none>${!this.isMobile&&l`<calcite-dropdown-item icon-start=model @click=${this._viewDiagram} @keydown=${n=>p(n,()=>this._viewDiagram(n))}>${this._translations.viewDiagram}</calcite-dropdown-item>`||""}<calcite-dropdown-item icon-start=file-text @click=${this._viewDocumentation} @keydown=${n=>p(n,()=>this._viewDocumentation(n))}>${this._translations.documentation}</calcite-dropdown-item><calcite-dropdown-item icon-start=information @click=${this._viewItemDetails} @keydown=${n=>p(n,()=>this._viewItemDetails(n))}>${this._translations.viewItemDetails}</calcite-dropdown-item>${!this.isMobile&&r&&l`<calcite-dropdown-item .disabled=${a} icon-start=edit-attributes id=solution-configure-titles-dropdown @click=${async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0}} @keydown=${n=>p(n,async()=>{this.templateInfos=await this._processTemplates(this.card),this._configureTitlesOpen=!0})}>${this._translations.renameItems}</calcite-dropdown-item>`||""}${!this.isMobile&&o&&l`<calcite-dropdown-item .disabled=${a} icon-start=trash @click=${this._deleteSolution} @keydown=${n=>p(n,()=>this._deleteSolution(n))}>${this._translations.deleteSolution}</calcite-dropdown-item>`||""}</calcite-dropdown-group><calcite-tooltip class=${D(d)} overlay-positioning=fixed reference-element=solution-configure-titles-dropdown><span>${this._translations.mustOwnSolution}</span></calcite-tooltip></calcite-split-button>`}_renderDeleteDialog(){return this._isDeleteOpen?l`<solution-delete-dialog .card=${this.card} @solutionDeleteDialogOpen=${e=>{this._isDeleteOpen=e.detail}} .open=${this._isDeleteOpen} source="Card Dropdown" ${f(this._deleteDialogRef)}></solution-delete-dialog>`:""}_renderDiagramDialog(){return this._isDiagramOpen?l`<calcite-dialog class="dialog-y-size dialog-x-size panel-bg-color" .heading=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")} id=${this._translations.diagramTitle.replace("{{solution}}",this.card?.title??"")??h} modal .open=${this._isDiagramOpen} @calciteDialogClose=${()=>{this._isDiagramOpen=!1}} outside-close-disabled scale=m width=l ${f(this._diagramDialogRef)}><solution-item-diagram .diagramKey=${this.diagramKey} .templateInfoGraph=${this.templateInfoGraph} .typeKeywords=${this.card?.typeKeywords}></solution-item-diagram></calcite-dialog>`:""}_renderConfigureTitlesDialog(){return this._configureTitlesOpen?l`<solution-configure-titles .card=${this.card} @solutionConfigureTitlesBeforeClose=${async()=>{this._processTemplates(this.card).then(e=>{this.templateInfos=e}),this._configureTitlesOpen=!1}} @solutionItemsTitlesChanged=${async()=>{this._processTemplates(this.card).then(e=>{this.templateInfos=e})}} .open=${this._configureTitlesOpen} source="Card Dropdown" .templateInfos=${this.templateInfos}></solution-configure-titles>`:""}_cardSelected(){this.deployedCardSelected.emit({card:this.card,cardRef:this.el})}async _viewDiagram(e){e.stopPropagation(),this.card&&(this._telemetry?.logEvent({category:y.DEPLOYMENTS,action:"View Diagram",dimensions:[this.card.title||"",this.card.deployCommonId||"",this.card.deployVersion||"","Dropdown",g(this.card?.typeKeywords)]}),this.templateInfoGraph=await this._processTemplates(this.card),this._isDiagramOpen=!0)}_viewDocumentation(e){e.stopPropagation(),this._telemetry?.logEvent({category:y.DEPLOYMENTS,action:"Open Help",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown",g(this.card?.typeKeywords)]}),window.open(this.card.learnMoreUrl,"_blank")}_viewItemDetails(e){e.stopPropagation(),this._telemetry?.logEvent({category:y.DEPLOYMENTS,action:"Open Item Details",dimensions:[this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||"","Card Dropdown",g(this.card?.typeKeywords)]}),window.open(this.card.itemUrl,"_blank")}_deleteSolution(e){e.stopPropagation(),this._isDeleteOpen=!0}_openUserProfile(e){e.stopPropagation();let t=this._configContextConsumer.value?.authentication?.PortalSubset?.orgUrl;t&&window.open(`${t}/home/user.html?user=${this.owner}`,"_blank")}async _processTemplates(e){return await V(e.id,this._configContextConsumer.value.userSession)}_updateThumbnailToken(e){this._thumbnailUrl!==""&&(this._thumbnailUrl=q(this._thumbnailUrl,e))}};S("solution-deployed-card",E);var ke=500,$e={AEC:"Architecture, Engineering, and Construction (AEC)",AIRPORTPORTRAIL:"Airports, Ports, and Rails",BUSINESS:"Business",CONSERVATION:"Conservation",DEFENSE:"Defense",FACILITIES:"Facilities",HEALTHANDHUMANSERVICES:"Health and Human Services",PIPELINE:"Pipeline",PUBLICSAFETY:"Public Safety",RENEWABLES:"Renewables",STATEANDLOCALGOVERNMENT:"State and Local Government",TELECOMMUNICATIONS:"Telecommunications",UTILITIES:"Utilities"},Re={AIRPORT:"Airports",AGRICULTURE:"Agriculture",ASSESSMENTANDTAXATION:"Assessment and Taxation",DISTRICTENERGY:"District Energy",ELECTIONS:"Elections",ELECTRIC:"Electric",EMERGENCYMANAGEMENT:"Emergency Management",ENVIRONMENTANDNATURALRESOURCES:"Environment and Natural Resources",FIRESERVICE:"Fire Service",FISHANDWILDLIFE:"Fish and Wildlife",GAS:"Gas",HEALTHANDHUMANSERVICES:"Health and Human Services",LAWENFORCEMENT:"Law Enforcement",NATURALRESOURCES:"Natural Resources",PARKS:"Parks",PLANNINGANDDEVELOPMENT:"Planning and Development",PROTECTEDAREAS:"Protected Areas",PUBLICWORKS:"Public Works",SEWER:"Sewer",STORMWATER:"Stormwater",TELECOMMUNICATIONS:"Telecommunications",TRANSPORTATION:"Transportation",WATER:"Water Distribution"},c=(i=>(i.HUBPREMIUM="solutions:hubPremium",i.NOTEBOOK="solutions:notebook",i.TRACKINGBASE="solutions:locationtracking",i.TRACKING="solutions:locationtracking:tracking",i.TRACKINGADMIN="solutions:locationtracking:admin",i.TRACKINGADMINANDTRACKING="solutions:locationtracking:admin:tracking",i.VELOCITY="solutions:velocity",i.WORKFLOW="solutions:workflowManager",i))(c||{}),j=(i=>(i.VELOCITYBIGDATA="portal:publisher:publishBigDataAnalytics",i.VELOCITYFEEDS="portal:publisher:publishFeeds",i.VELOCITYREALTIME="portal:publisher:publishRealTimeAnalytics",i))(j||{}),Ne='((typekeywords:Deployed,"ArcGIS Solution") OR (typekeywords:Deployed,AIAssistant) OR ((typekeywords:Deployed) AND (created:[1577862000000 TO 1622576880000])))',xe="(typekeywords:Solution,Template)",J="portal:user:addExternalMembersToGroup",X="portal:user:createItem",M="portal:user:createGroup",Q="portal:publisher:publishBigDataAnalytics",P="portal:publisher:publishFeatures",Z="portal:publisher:publishFeeds",ee="portal:publisher:publishServerGPServices",te="portal:publisher:publishRealTimeAnalytics",L="portal:user:shareToGroup",ie="solutions:hubPremium",se="solutions:notebook",ae="solutions:locationtracking:admin:tracking",oe="solutions:locationtracking:tracking",ne="solutions:locationtracking:admin",re="solutions:velocity",le="solutions:workflowManager",Me=250,Pe=256,y={SOLUTION_DETAILS:"Solution Details",GLOBAL_NAVIGATION:"Global Nav",ALL_SOLUTIONS:"Solutions",DEPLOYMENTS:"Deployments",ASSISTANT:"Assistant",RESOURCES:"Resources",BUILDER:"Solution Builder"},Le={MINE:"My deployments",ORG:"Organization"};return{a:V,b:Se,c:G,d:Ie,e:Oe,f:Ce,g:q,h:E,i:ke,j:$e,k:Re,l:c,m:j,n:Ne,o:xe,p:Me,q:Pe,r:y,s:Le}},"identity/IdentityManager","identity/OAuthInfo","portal/Portal","intl","geometry/Extent","geometry/SpatialReference","geometry/operators/projectOperator","geometry/operators/support/geographicTransformationUtils",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import c from"./QU25YPPX.js";import"./VVZAS55G.js";import"./US5FON7D.js";import"./AE5HNAOV.js";import a from"./WV7QX3ED.js";import{a as d}from"./
|
|
2
|
+
import c from"./QU25YPPX.js";import"./VVZAS55G.js";import"./US5FON7D.js";import"./AE5HNAOV.js";import a from"./WV7QX3ED.js";import{a as d}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 g}from"./2I5LGZNX.js";import{E as p,F as o,G as b,h as n,i as r}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,{b:P,c:m}])=>{var c=[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageProperties:{pageType:"ANSI A",leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}],u=Object.freeze(Object.defineProperty({__proto__:null,default:c},Symbol.toStringTag,{value:"Module"})),y=n`:host{display:block}`,s=class extends b{constructor(){super(...arguments),this.disabled=!1,this._translations=d({name:"pdf-download",blocking:!0}),this._labelInfoElement=p()}static{this.properties={defaultNumLabelsPerPage:9,disabled:5,_translations:16}}static{this.styles=y}async downloadCSV(a,e,l,t=!0){return P(a,e,!0,l,t)}async downloadPDF(a,e,l=!1,t="",i=""){let h=this._labelInfoElement.value?this._labelInfoElement.value.selectedOption?.value:"";return m(a,e,h,l,t,i)}render(){return r`<calcite-select .disabled=${this.disabled} label="Label format" ${o(this._labelInfoElement)}>${this._renderOptions()}</calcite-select>`}_getLabelSizeText(a){let e=a.descriptionPDF.labelsPerPageDisplay,l=a.descriptionPDF.labelWidthDisplay+" x "+a.descriptionPDF.labelHeightDisplay;return this._translations.pdfLabel?this._translations.pdfLabel.replace("{{n}}",e).replace("{{labelSize}}",l):""}_renderOptions(){let a=u;return(a.default||a).sort((e,l)=>{let t=Number.parseInt(e.descriptionPDF.labelsPerPageDisplay,10),i=Number.parseInt(l.descriptionPDF.labelsPerPageDisplay,10);return t<i?-1:t>i?1:0}).map((e,l)=>{let t=!1;return(this.defaultNumLabelsPerPage?Number.parseInt(e.descriptionPDF.labelsPerPageDisplay,10)===this.defaultNumLabelsPerPage:l===0)&&(t=!0),r`<calcite-option .selected=${t} .value=${e}>${this._getLabelSizeText(e)}</calcite-option>`})}};g("pdf-download",s);return s},a,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as E}from"./BM666UZR.js";import{b as V}from"./I2NTSKBD.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as $}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import{b as C}from"./2I5LGZNX.js";import{E as d,F as u,G as S,I as p,J as v,h as g,i as o,q as w,t as L}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([x,R,D,N,{a:k,d:I,f:T},{c:_,g:G,j:O}])=>{var P=g`@layer{:host{display:block}.div-visible{display:inherit}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100%!important;border:1px solid var(--calcite-color-border-input)}.w-100{width:100%}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.tooltip-container{display:flex}.padding-start-1-2{padding-inline-start:.5rem}.padding-end-1-2{padding-inline-end:.5rem}.icon{--calcite-color-icon-color: var(--calcite-color-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);max-width:400px}}`,y=class extends S{constructor(){super(),this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=!1,this.enabledLayerIds=[],this.enableLayerFeatures=!0,this.enableLayerFeaturesOnLoad=!1,this.enableSearchDistance=!0,this.enableSearchDistanceOnLoad=!1,this.enableSketchTools=!0,this.geometries=[],this.headerLabelClass="font-bold",this.isUpdate=!1,this.layerViews=[],this.noResultText="",this.selectionLayerIds=[],this.searchDistanceEnabled=!1,this.useLayerFeaturesEnabled=!1,this._numSelected=0,this._searchTerm="",this._selectionLoading=!1,this._translations=$({name:"map-select-tools",blocking:!0}),this._bufferTools=d(),this._drawTools=d(),this._labelName=d(),this._pnContextConsumer=V({context:E,subscribe:!0}),this._searchElement=d(),this._selectedIds=[],this._selectionLabel="",this._graphics=[],this._featuresCollection={},this.selectionSetChange=w(),this.listenOn(window,"searchConfigurationChange",this.searchConfigurationChangeChanged),this.listenOn(window,"distanceChanged",this.distanceChanged),this.listenOn(window,"unitChanged",this.unitChanged)}static{this.properties={bufferColor:1,bufferOutlineColor:1,customLabelEnabled:5,enabledLayerIds:0,enableLayerFeatures:5,enableLayerFeaturesOnLoad:5,enableSearchDistance:5,enableSearchDistanceOnLoad:5,enableSketchTools:5,defaultBufferDistance:9,defaultBufferUnit:1,geometries:0,headerLabelClass:1,isUpdate:5,layerViews:0,mapView:0,noResultText:1,searchConfiguration:0,selectionSet:0,selectionLayerIds:0,selectLayerView:0,sketchLineSymbol:0,sketchPointSymbol:0,sketchPolygonSymbol:0,searchDistanceEnabled:5,useLayerFeaturesEnabled:5,_numSelected:16,_searchTerm:16,_selectionLoading:16,_translations:16}}static{this.styles=P}static{this.shadowRootOptions=L}willUpdate(e){e.has("geometries")&&(this.hasUpdated||this.geometries?.length>0)&&this.watchGeometriesHandler(this.geometries,e.get("geometries")),e.has("mapView")&&this.mapView&&this.mapViewWatchHandler(this.mapView,e.get("mapView")),e.has("defaultBufferUnit")&&this.hasUpdated&&(this.selectionSet&&(this.selectionSet.unit=this.defaultBufferUnit),this._bufferTools.value&&this.defaultBufferUnit!==void 0&&(this._bufferTools.value.unit=this.defaultBufferUnit),this._updateLabel()),e.has("defaultBufferDistance")&&this.hasUpdated&&(this.selectionSet&&(this.selectionSet.distance=this.defaultBufferDistance),this._updateLabel())}async watchGeometriesHandler(e,t){if(e!==t&&e.length>0)return this._highlightWithOIDsOrGeoms()}async mapViewWatchHandler(e,t){e&&e!==t&&await this._init()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||await this._updateLabel(),{id:this.isUpdate&&this.selectionSet?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.value?.distance,download:!0,unit:this._bufferTools.value?.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this.searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this.useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}searchConfigurationChangeChanged(e){this.searchConfiguration=e.detail}async distanceChanged(e){await this._distanceChanged(e.detail)}async unitChanged(e){e.detail.newValue!==e.detail.oldValue&&(this._unit=e.detail.newValue,await this._updateLabel())}async loaded(){await this._init()}render(){let e=this.enableSketchTools?"":"display-none",t=this.enableSketchTools?"padding-top-1":"",s=this.searchConfiguration&&this.mapView?this._getSearchConfig(this.searchConfiguration,this.mapView):void 0,i=this.searchConfiguration?.allPlaceholder&&this.searchConfiguration.allPlaceholder.toLowerCase()!=="find address or place"?this.searchConfiguration.allPlaceholder:this._translations.placeholder;return o`${this._getMapLayerPicker()}<div class="border-bottom"></div><div class="padding-top-sides-1"><arcgis-search class="search-widget" .activeSourceIndex=${s?.activeSourceIndex} .allPlaceholder=${i} .includeDefaultSourcesDisabled=${s?.includeDefaultSources===!1} @arcgisSearchClear=${()=>{this._handleSearchClear()}} @arcgisSelectResult=${a=>{this._handleSearchSelectResult(a)}} popup-disabled result-graphic-disabled .searchAllDisabled=${s?.searchAllEnabled===!1} .searchTerm=${this._searchTerm} .sources=${s?.sources} .view=${this.mapView} ${u(this._searchElement)}></arcgis-search><div class=${p(t)}><map-draw-tools active class=${p(e)} .editGraphicsEnabled=${!this.useLayerFeaturesEnabled} .graphics=${this._graphics} .mapView=${this.mapView} @sketchGraphicsChange=${a=>{this._sketchGraphicsChanged(a)}} .pointSymbol=${this.sketchPointSymbol} .polygonSymbol=${this.sketchPolygonSymbol} .polylineSymbol=${this.sketchLineSymbol} ${u(this._drawTools)}></map-draw-tools></div>${this.enableSearchDistance?this._getBufferOptions():void 0}${this.enableLayerFeatures?this._getUseLayerFeaturesOptions():void 0}${this._getNumSelected()}</div><div class="border-bottom"></div>${this._getNameInput()}`}_getBufferOptions(){this.enableSearchDistanceOnLoad&&(this.searchDistanceEnabled=!0,this.enableSearchDistanceOnLoad=!1);let e=this.searchDistanceEnabled?"search-distance":"div-not-visible",t=typeof this.selectionSet?.distance=="number"?this.selectionSet.distance:this.defaultBufferDistance;return o`<div><div class="padding-top-1 display-flex"><calcite-label class="label-margin-0 w-100" layout=inline-space-between><div class="tooltip-container">${this._translations.searchDistance}<calcite-icon aria-hidden=true class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=search-distance-icon scale=s></calcite-icon></div></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=search-distance-icon><span class="tooltip-message">${this._translations.useSearchDistanceTootip}</span></calcite-popover><calcite-switch .checked=${this.searchDistanceEnabled} @calciteSwitchChange=${()=>this.searchDistanceEnabled=!this.searchDistanceEnabled}></calcite-switch></div><div class=${p(e)}><buffer-tools .disabled=${!this.searchDistanceEnabled} .distance=${t} .geometries=${this.geometries} @bufferComplete=${s=>{this._bufferComplete(s)}} .unit=${this.selectionSet?.unit||this.defaultBufferUnit} ${u(this._bufferTools)}></buffer-tools></div></div>`}_getUseLayerFeaturesOptions(){this.enableLayerFeaturesOnLoad&&(this.useLayerFeaturesEnabled=!0,this.enableLayerFeaturesOnLoad=!1);let e=this.useLayerFeaturesEnabled?"div-visible":"div-not-visible";return o`<div><div class="padding-top-1 display-flex"><calcite-label class="label-margin-0 w-100" layout=inline-space-between><div class="tooltip-container">${this._translations.useLayerFeatures}<calcite-icon aria-hidden=true class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=use-layer-features-icon scale=s></calcite-icon></div></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=use-layer-features-icon><span class="tooltip-message">${this._translations.useLayerFeaturesTooltip}</span></calcite-popover><calcite-switch .checked=${this.useLayerFeaturesEnabled} @calciteSwitchChange=${()=>{this._useLayerFeaturesEnabledChanged()}}></calcite-switch></div><div class=${`${e} padding-top-1`}><map-layer-picker .enabledLayerIds=${this.selectionLayerIds} .mapView=${this.mapView} @layerSelectionChange=${t=>{this._layerSelectionChange(t)}} .selectedIds=${this.layerViews.map(t=>t.layer.id)}></map-layer-picker></div></div>`}_getNumSelected(){let e=this._translations._lang==="en"?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return o`<div class="padding-top-1 padding-bottom-1" style=${v({"align-items":"end",display:"flex"})}>${this._selectionLoading?o`<div><calcite-loader class="info-blue padding-end-1-2" inline .label=${e||""} scale=m type=indeterminate></calcite-loader></div>`:o`<calcite-icon aria-hidden=true class="info-blue padding-end-1-2" icon=feature-layer scale=s></calcite-icon>`}<calcite-input-message class="info-blue" scale=m>${this._selectionLoading?e:this.noResultText&&this._numSelected===0?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())}</calcite-input-message></div>`}_getNameInput(){let e=this.customLabelEnabled?"":"display-none";return o`<div class=${`padding-sides-1 padding-top-1 ${e}`}><calcite-label class=${p(this.headerLabelClass)}>${this._translations.listName}<calcite-input @input=${()=>{this._selectionLabel=this._labelName.value?this._labelName.value.value:""}} .placeholder=${this._translations.listNamePlaceholder} .value=${this._selectionLabel||""} ${u(this._labelName)}></calcite-input></calcite-label></div>`}_getMapLayerPicker(){let e=this.selectionSet?.layerView?.layer.id;return o`<div class="display-flex padding-sides-1 padding-bottom-1"><calcite-label class=${`${this.headerLabelClass} width-full label-margin-0`}>${this._translations.inputLayer}<map-layer-picker .enabledLayerIds=${this.enabledLayerIds} .mapView=${this.mapView} @layerSelectionChange=${t=>{this._inputLayerSelectionChange(t)}} .selectedIds=${this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet&&e!==void 0?[e]:[]}></map-layer-picker></calcite-label></div>`}async _init(){this._initGraphicsLayer(),await this._initSelectionSet()}async _initSelectionSet(){this.selectionSet&&(this._searchTerm=this.selectionSet.searchResult?.name,this._searchResult=this.selectionSet.searchResult,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs||[],this.searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this.useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...this.selectionSet?.geometries||[]],this._graphics=this.geometries.reduce((e,t)=>{let s=t.type==="point"?this.sketchPointSymbol:t.type==="polyline"?this.sketchLineSymbol:this.sketchPolygonSymbol;return e.push(new D({geometry:t,symbol:s})),e},[]),this._selectionLabel=this.selectionSet?.label,this.useLayerFeaturesEnabled||await this._drawTools.value?.updateGraphics(),this.selectionSet.layerView&&this.mapView&&await O(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}async _handleSearchClear(){let e=this._searchClearLabel();this._searchResult?.name&&await this._clearResults(!1,e)}async _handleSearchSelectResult(e){await this._selectResult(e.detail.result)}async _selectResult(e){if(e){this._searchResult=e;let t=e.feature,s=t?.layer,i=this.selectLayerView?.layer,a=Number(t?.getObjectId()),l;s?.sourceJSON?.isView&&s.url&&(l=await this._getViewSourceUrl(s.url));let r;i?.sourceJSON?.isView&&i.url&&(r=await this._getViewSourceUrl(i.url));let c=s?.url?.toLowerCase(),n=l?.toLowerCase(),h=i?.url?.toLowerCase(),m=r?.toLowerCase(),b=c&&h&&(c===h||c===m||n===h||n===m)&&!Number.isNaN(a),F=b?[a]:void 0;this._workflowType="SEARCH",this._updateLabel();let f=[e.feature];this._updateSelection(f,b,F),this._drawTools.value&&(this._drawTools.value.graphics=f)}else{let t=this._searchClearLabel();this._clearResults(!1,t)}}async _getViewSourceUrl(e){let t="",s=`${e}/sources?f=json`;try{let i=await x(s,{query:{f:"json"}});i?.data?.services?.length===1&&(t=i.data.services[0].url)}catch(i){console.log(i)}return t}_searchClearLabel(){return this._searchResult?.name&&this._labelName.value&&this._labelName.value.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(e,t){let s=e?.sources;return s&&s?.length>0?(e={...e,includeDefaultSources:!1},s.forEach(i=>{if(i.hasOwnProperty("layer")){let a=i,l=a.layer?.id,r=l?t.map?.findLayerById(l):null,c=a?.layer?.url;r&&a?a.layer=r:c&&(a.layer=new R(c))}}),s?.forEach(i=>{if(i.hasOwnProperty("locator")){let a=i;if(a?.name==="ArcGIS World Geocoding Service"){let l=a.outFields||["Addr_type","Match_addr","StAddr","City"];a.outFields=l,a.singleLineFieldName="SingleLine"}a.url=a.url,delete a.url}})):e={...e,includeDefaultSources:!0},e}_initGraphicsLayer(){let e=this._pnContextConsumer.value,t=this._translations.bufferLayer;if(this.mapView){let s=this.mapView.map.layers.findIndex(i=>i.title===t);if(s>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(s);else if(this._bufferGraphicsLayer=new N({title:t,listMode:"hide"}),this._bufferGraphicsLayer){e.managedLayers[t]="buffer";let i=this.mapView.map.layers.findIndex(a=>a.title===this._translations.sketchLayer);i>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,i):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}}async _sketchGraphicsChanged(e,t=!1){let s=e.detail.graphics;if(s.length>0&&s[0])if(t||(this._sketchGraphic=s[0]),this._workflowType=this.useLayerFeaturesEnabled?"SELECT":"SKETCH",this._workflowType==="SKETCH"&&this._drawTools.value&&await this._drawTools.value.updateGraphics(),await this._updateLabel(),this._clearSearchWidget(),this.useLayerFeaturesEnabled&&!t){let i=Array.isArray(s)?s.map(a=>a.geometry):this.geometries;await this._selectLayerFeatures(i[0])}else{let i=s.reduce((l,r)=>(r?.layer?.objectIdField?l.push(Number(r.attributes[r.layer.objectIdField])):r.getObjectId&&l.push(Number(r.getObjectId())),l),[]),a=e.detail.useOIDs&&i.length>0;this._updateSelection(s,a,i),a&&await this._highlightFeatures(i)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){return this._skipGeomOIDs&&this._skipGeomOIDs?.length>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(e){let t=this._pnContextConsumer.value;if(t.removeHandles(),e.length>0&&this.selectLayerView&&this.mapView){let s=await G(e,this.selectLayerView,this.mapView);t.highlightHandles.push(s)}this._numSelected=e.length,this.selectionSetChange.emit(e.length)}async _selectFeatures(e){this._selectionLoading=!0,this._selectedIds=this.selectLayerView&&await k(e,this.selectLayerView.layer)||[],this._selectionLoading=!1,this._drawTools.value&&(this._drawTools.value.graphics=this._graphics),await this._highlightFeatures(this._selectedIds)}async _bufferComplete(e){this._bufferGeometry=Array.isArray(e.detail)?e.detail[0]:e.detail;let t=this._bufferTools.value&&Number(this._bufferTools.value.distance),s=0;if(this._bufferGeometry){let i={type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}},a=new D({geometry:this._bufferGeometry,symbol:i});this._bufferGraphicsLayer&&this.mapView&&(this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(a),await this._selectFeatures([this._bufferGeometry]),a.geometry?.extent&&await this.mapView.goTo(a.geometry.extent)),s=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();await this._distanceChanged({oldValue:t,newValue:s})}async _geomQuery(e){let t=T(e);return t?this._selectFeatures(t):Promise.resolve()}async _clearResults(e=!0,t=!1){this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName.value&&(this._labelName.value.value="")),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),e&&this._clearSearchWidget(),this._pnContextConsumer.value.removeHandles(),this._drawTools.value?.clear&&(this._graphics=[],this.geometries=[],await this._drawTools.value.clear()),this._numSelected=this._selectedIds.length,this.selectionSetChange.emit(this._numSelected)}_clearSearchWidget(){this._searchElement.value?.clear(),this._searchResult=void 0}_updateSelection(e,t,s){this._selectedIds=t&&s?s:this._selectedIds,this._skipGeomOIDs=t?s:void 0,this.geometries=Array.isArray(e)?e.reduce((i,a)=>(a.geometry&&i.push(a.geometry),i),[]):this.geometries,this._graphics=e}async _updateLabel(){if(this.enableSearchDistance){let e=this._translations.sketch&&this._selectionLabel.indexOf(this._translations.sketch)>-1,t=this._translations.select&&this._selectionLabel.indexOf(this._translations.select)>-1,s=this._selectionLabel.indexOf(this._searchResult?.name)>-1,i=this._workflowType==="SEARCH"?this._searchResult?.name:this._workflowType==="SELECT"?this._translations.select:this._translations.sketch,a=this._bufferTools.value?this._bufferTools.value.unit:this._unit,l=this._bufferTools.value&&a&&await this._bufferTools.value.getTranslatedUnit(a),r=Number.isNaN(Number(this._distance))&&this._bufferTools.value?this._bufferTools.value.distance:this._distance;this._selectionLabel=e||t||s||!this._selectionLabel?`${i} ${r} ${l}`:this._selectionLabel,this._labelName.value&&(this._labelName.value.value=this._selectionLabel)}}async _layerSelectionChange(e){if(Array.isArray(e.detail)&&e.detail.length>0){let t=e.detail.reduce((s,i)=>(this.mapView&&s.push(_(this.mapView,i)),s),[]);return Promise.all(t).then(s=>{this.layerViews=s.reduce((i,a)=>(a&&i.push(a),i),[]),this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})})}}async _inputLayerSelectionChange(e){let t=e?.detail?.length>0?e.detail[0]:"";(!this.selectLayerView||t!==this.selectLayerView.layer.id)&&(this.selectLayerView=this.mapView&&await _(this.mapView,t),await this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}async _distanceChanged(e){e.newValue!==e.oldValue&&(this._distance=e.newValue,await this._updateLabel())}async _selectLayerFeatures(e){this._selectionLoading=!0;let t=this.layerViews.map(s=>(this._featuresCollection[s.layer.id]=[],I(0,s.layer,e,this._featuresCollection)));return Promise.all(t).then(async s=>{this._selectionLoading=!1;let i=[];s.forEach(n=>{Object.keys(n).forEach(h=>{i=i.concat(n[h])})});let a=!1;i.forEach(n=>{let h=n.geometry;n.symbol=h&&h.type==="point"?this.sketchPointSymbol:h&&h.type==="polyline"?this.sketchLineSymbol:h&&h.type==="polygon"?this.sketchPolygonSymbol:void 0,a=n?.layer?.hasOwnProperty("objectIdField")||n.hasOwnProperty("getObjectId")});let l=this.layerViews[0].layer,r=this.selectLayerView?.layer,c=a&&l.url===r?.url&&r?.layerId===l.layerId;await this._sketchGraphicsChanged({detail:{graphics:i,useOIDs:c}},!0)})}_useLayerFeaturesEnabledChanged(){this.useLayerFeaturesEnabled=!this.useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}};C("map-select-tools",y);return y},"request","layers/FeatureLayer","Graphic","layers/GraphicsLayer",a,b)
|
|
2
|
+
import{a as E}from"./BM666UZR.js";import{b as V}from"./I2NTSKBD.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as $}from"./XF5N3NI5.js";import"./UBPOT5V3.js";import"./ISFTCFSJ.js";import{b as C}from"./2I5LGZNX.js";import{E as d,F as u,G as S,I as p,J as v,h as g,i as o,q as w,t as L}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([x,R,D,N,{a:k,d:I,f:T},{c:_,g:G,j:O}])=>{var P=g`@layer{:host{display:block}.div-visible{display:inherit}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.padding-top-1{padding-top:1rem}.search-widget{width:100%!important;border:1px solid var(--calcite-color-border-input)}.w-100{width:100%}.search-distance{display:flex;padding-top:1rem}.font-bold{font:bold}.border-bottom{border-bottom:1px solid var(--calcite-color-border-2)}.tooltip-container{display:flex}.padding-start-1-2{padding-inline-start:.5rem}.padding-end-1-2{padding-inline-end:.5rem}.icon{--calcite-color-icon-color: var(--calcite-color-brand)}.tooltip-message{padding:5px 8px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-color-text-2);max-width:400px}}`,y=class extends S{constructor(){super(),this.bufferColor=[227,139,79,.8],this.bufferOutlineColor=[255,255,255],this.customLabelEnabled=!1,this.enabledLayerIds=[],this.enableLayerFeatures=!0,this.enableLayerFeaturesOnLoad=!1,this.enableSearchDistance=!0,this.enableSearchDistanceOnLoad=!1,this.enableSketchTools=!0,this.geometries=[],this.headerLabelClass="font-bold",this.isUpdate=!1,this.layerViews=[],this.noResultText="",this.selectionLayerIds=[],this.searchDistanceEnabled=!1,this.useLayerFeaturesEnabled=!1,this._numSelected=0,this._searchTerm="",this._selectionLoading=!1,this._translations=$({name:"map-select-tools",blocking:!0}),this._bufferTools=d(),this._drawTools=d(),this._labelName=d(),this._pnContextConsumer=V({context:E,subscribe:!0}),this._searchElement=d(),this._selectedIds=[],this._selectionLabel="",this._graphics=[],this._featuresCollection={},this.selectionSetChange=w(),this.listenOn(window,"searchConfigurationChange",this.searchConfigurationChangeChanged),this.listenOn(window,"distanceChanged",this.distanceChanged),this.listenOn(window,"unitChanged",this.unitChanged)}static{this.properties={bufferColor:1,bufferOutlineColor:1,customLabelEnabled:5,enabledLayerIds:0,enableLayerFeatures:5,enableLayerFeaturesOnLoad:5,enableSearchDistance:5,enableSearchDistanceOnLoad:5,enableSketchTools:5,defaultBufferDistance:9,defaultBufferUnit:1,geometries:0,headerLabelClass:1,isUpdate:5,layerViews:0,mapView:0,noResultText:1,searchConfiguration:0,selectionSet:0,selectionLayerIds:0,selectLayerView:0,sketchLineSymbol:0,sketchPointSymbol:0,sketchPolygonSymbol:0,searchDistanceEnabled:5,useLayerFeaturesEnabled:5,_numSelected:16,_searchTerm:16,_selectionLoading:16,_translations:16}}static{this.styles=P}static{this.shadowRootOptions=L}willUpdate(e){e.has("geometries")&&(this.hasUpdated||this.geometries?.length>0)&&this.watchGeometriesHandler(this.geometries,e.get("geometries")),e.has("mapView")&&this.mapView&&this.mapViewWatchHandler(this.mapView,e.get("mapView")),e.has("defaultBufferUnit")&&this.hasUpdated&&(this.selectionSet&&(this.selectionSet.unit=this.defaultBufferUnit),this._bufferTools.value&&this.defaultBufferUnit!==void 0&&(this._bufferTools.value.unit=this.defaultBufferUnit),this._updateLabel()),e.has("defaultBufferDistance")&&this.hasUpdated&&(this.selectionSet&&(this.selectionSet.distance=this.defaultBufferDistance),this._updateLabel())}async watchGeometriesHandler(e,t){if(e!==t&&e.length>0)return this._highlightWithOIDsOrGeoms()}async mapViewWatchHandler(e,t){e&&e!==t&&await this._init()}async clearSelection(){return this._clearResults(!0,!0)}async getSelection(){return/\S+/gm.test(this._selectionLabel)||await this._updateLabel(),{id:this.isUpdate&&this.selectionSet?this.selectionSet.id:Date.now(),searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.value?.distance,download:!0,unit:this._bufferTools.value?.unit,label:this._selectionLabel,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,graphics:this._graphics,selectLayers:this.layerViews,skipGeomOIDs:this._skipGeomOIDs,searchDistanceEnabled:this.searchDistanceEnabled,workflowType:this._workflowType,useLayerFeaturesEnabled:this.useLayerFeaturesEnabled,sketchGraphic:this._sketchGraphic}}searchConfigurationChangeChanged(e){this.searchConfiguration=e.detail}async distanceChanged(e){await this._distanceChanged(e.detail)}async unitChanged(e){e.detail.newValue!==e.detail.oldValue&&(this._unit=e.detail.newValue,await this._updateLabel())}async loaded(){await this._init()}render(){let e=this.enableSketchTools?"":"display-none",t=this.enableSketchTools?"padding-top-1":"",s=this.searchConfiguration&&this.mapView?this._getSearchConfig(this.searchConfiguration,this.mapView):void 0,i=this.searchConfiguration?.allPlaceholder&&this.searchConfiguration.allPlaceholder.toLowerCase()!=="find address or place"?this.searchConfiguration.allPlaceholder:this._translations.placeholder;return o`${this._getMapLayerPicker()}<div class="border-bottom"></div><div class="padding-top-sides-1"><arcgis-search class="search-widget" .activeSourceIndex=${s?.activeSourceIndex} .allPlaceholder=${i} .includeDefaultSourcesDisabled=${s?.includeDefaultSources===!1} @arcgisSearchClear=${()=>{this._handleSearchClear()}} @arcgisSelectResult=${a=>{this._handleSearchSelectResult(a)}} popup-disabled result-graphic-disabled .searchAllDisabled=${s?.searchAllEnabled===!1} .searchTerm=${this._searchTerm} .sources=${s?.sources} .view=${this.mapView} ${u(this._searchElement)}></arcgis-search><div class=${p(t)}><map-draw-tools active class=${p(e)} .editGraphicsEnabled=${!this.useLayerFeaturesEnabled} .graphics=${this._graphics} .mapView=${this.mapView} @sketchGraphicsChange=${a=>{this._sketchGraphicsChanged(a)}} .pointSymbol=${this.sketchPointSymbol} .polygonSymbol=${this.sketchPolygonSymbol} .polylineSymbol=${this.sketchLineSymbol} ${u(this._drawTools)}></map-draw-tools></div>${this.enableSearchDistance?this._getBufferOptions():void 0}${this.enableLayerFeatures?this._getUseLayerFeaturesOptions():void 0}${this._getNumSelected()}</div><div class="border-bottom"></div>${this._getNameInput()}`}_getBufferOptions(){this.enableSearchDistanceOnLoad&&(this.searchDistanceEnabled=!0,this.enableSearchDistanceOnLoad=!1);let e=this.searchDistanceEnabled?"search-distance":"div-not-visible",t=typeof this.selectionSet?.distance=="number"?this.selectionSet.distance:this.defaultBufferDistance;return o`<div><div class="padding-top-1 display-flex"><calcite-label class="label-margin-0 w-100" layout=inline-space-between><div class="tooltip-container">${this._translations.searchDistance}<calcite-icon aria-hidden=true class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=search-distance-icon scale=s></calcite-icon></div></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=search-distance-icon><span class="tooltip-message">${this._translations.useSearchDistanceTootip}</span></calcite-popover><calcite-switch .checked=${this.searchDistanceEnabled} @calciteSwitchChange=${()=>this.searchDistanceEnabled=!this.searchDistanceEnabled}></calcite-switch></div><div class=${p(e)}><buffer-tools .disabled=${!this.searchDistanceEnabled} .distance=${t} .geometries=${this.geometries} @bufferComplete=${s=>{this._bufferComplete(s)}} .unit=${this.selectionSet?.unit||this.defaultBufferUnit} ${u(this._bufferTools)}></buffer-tools></div></div>`}_getUseLayerFeaturesOptions(){this.enableLayerFeaturesOnLoad&&(this.useLayerFeaturesEnabled=!0,this.enableLayerFeaturesOnLoad=!1);let e=this.useLayerFeaturesEnabled?"div-visible":"div-not-visible";return o`<div><div class="padding-top-1 display-flex"><calcite-label class="label-margin-0 w-100" layout=inline-space-between><div class="tooltip-container">${this._translations.useLayerFeatures}<calcite-icon aria-hidden=true class="padding-start-1-2 icon" .flipRtl=${this._translations._lang?.toLowerCase()!=="he"} icon=question id=use-layer-features-icon scale=s></calcite-icon></div></calcite-label><calcite-popover closable label overlay-positioning=fixed reference-element=use-layer-features-icon><span class="tooltip-message">${this._translations.useLayerFeaturesTooltip}</span></calcite-popover><calcite-switch .checked=${this.useLayerFeaturesEnabled} @calciteSwitchChange=${()=>{this._useLayerFeaturesEnabledChanged()}}></calcite-switch></div><div class=${`${e} padding-top-1`}><map-layer-picker .enabledLayerIds=${this.selectionLayerIds} .mapView=${this.mapView} @layerSelectionChange=${t=>{this._layerSelectionChange(t)}} .selectedIds=${this.layerViews.map(t=>t.layer.id)}></map-layer-picker></div></div>`}_getNumSelected(){let e=this._translations._lang==="en"?`${this._translations.selectionLoading}...`:this._translations.selectionLoading;return o`<div class="padding-top-1 padding-bottom-1" style=${v({"align-items":"end",display:"flex"})}>${this._selectionLoading?o`<div><calcite-loader class="info-blue padding-end-1-2" inline .label=${e||""} scale=m type=indeterminate></calcite-loader></div>`:o`<calcite-icon aria-hidden=true class="info-blue padding-end-1-2" icon=feature-layer scale=s></calcite-icon>`}<calcite-input-message class="info-blue" scale=m>${this._selectionLoading?e:this.noResultText&&this._numSelected===0?this.noResultText:this._translations.selectedFeatures.replace("{{n}}",this._numSelected.toString())}</calcite-input-message></div>`}_getNameInput(){let e=this.customLabelEnabled?"":"display-none";return o`<div class=${`padding-sides-1 padding-top-1 ${e}`}><calcite-label class=${p(this.headerLabelClass)}>${this._translations.listName}<calcite-input @input=${()=>{this._selectionLabel=this._labelName.value?this._labelName.value.value:""}} .placeholder=${this._translations.listNamePlaceholder} .value=${this._selectionLabel||""} ${u(this._labelName)}></calcite-input></calcite-label></div>`}_getMapLayerPicker(){let e=this.selectionSet?.layerView?.layer.id;return o`<div class="display-flex padding-sides-1 padding-bottom-1"><calcite-label class=${`${this.headerLabelClass} width-full label-margin-0`}>${this._translations.inputLayer}<map-layer-picker .enabledLayerIds=${this.enabledLayerIds} .mapView=${this.mapView} @layerSelectionChange=${t=>{this._inputLayerSelectionChange(t)}} .selectedIds=${this.selectLayerView?[this.selectLayerView.layer.id]:this.selectionSet&&e!==void 0?[e]:[]}></map-layer-picker></calcite-label></div>`}async _init(){this._initGraphicsLayer(),await this._initSelectionSet()}async _initSelectionSet(){this.selectionSet&&(this._searchTerm=this.selectionSet.searchResult?.name,this._searchResult=this.selectionSet.searchResult,this._selectedIds=this.selectionSet.selectedIds,this._skipGeomOIDs=this.selectionSet.skipGeomOIDs||[],this.searchDistanceEnabled=this.selectionSet.searchDistanceEnabled,this.useLayerFeaturesEnabled=this.selectionSet.useLayerFeaturesEnabled,this._distance=this.selectionSet.searchDistanceEnabled?this.selectionSet.distance:0,this._unit=this.selectionSet.unit,this._workflowType=this.selectionSet.workflowType,this.selectLayerView=this.selectionSet.layerView,this._sketchGraphic=this.selectionSet.sketchGraphic,this.geometries=[...this.selectionSet?.geometries||[]],this._graphics=this.geometries.reduce((e,t)=>{let s=t.type==="point"?this.sketchPointSymbol:t.type==="polyline"?this.sketchLineSymbol:this.sketchPolygonSymbol;return e.push(new D({geometry:t,symbol:s})),e},[]),this._selectionLabel=this.selectionSet?.label,this.useLayerFeaturesEnabled||await this._drawTools.value?.updateGraphics(),this.selectionSet.layerView&&this.mapView&&await O(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1))}async _handleSearchClear(){let e=this._searchClearLabel();this._searchResult?.name&&await this._clearResults(!1,e)}async _handleSearchSelectResult(e){await this._selectResult(e.detail.result)}async _selectResult(e){if(e){this._searchResult=e;let t=e.feature,s=t?.layer,i=this.selectLayerView?.layer,a=Number(t?.getObjectId()),l;s?.sourceJSON?.isView&&s.url&&(l=await this._getViewSourceUrl(s.url));let r;i?.sourceJSON?.isView&&i.url&&(r=await this._getViewSourceUrl(i.url));let c=s?.url?.toLowerCase(),n=l?.toLowerCase(),h=i?.url?.toLowerCase(),m=r?.toLowerCase(),b=c&&h&&(c===h||c===m||n===h||n===m)&&!Number.isNaN(a),F=b?[a]:void 0;this._workflowType="SEARCH",this._updateLabel();let f=[e.feature];this._updateSelection(f,b,F),this._drawTools.value&&(this._drawTools.value.graphics=f)}else{let t=this._searchClearLabel();this._clearResults(!1,t)}}async _getViewSourceUrl(e){let t="",s=`${e}/sources?f=json`;try{let i=await x(s,{query:{f:"json"}});i?.data?.services?.length===1&&(t=i.data.services[0].url)}catch(i){console.log(i)}return t}_searchClearLabel(){return this._searchResult?.name&&this._labelName.value&&this._labelName.value.value.indexOf(this._searchResult.name)>-1}_getSearchConfig(e,t){let s=e?.sources;return s&&s?.length>0?(e={...e,includeDefaultSources:!1},s.forEach(i=>{if(i.hasOwnProperty("layer")){let a=i,l=a.layer?.id,r=l?t.map?.findLayerById(l):null,c=a?.layer?.url;r&&a?a.layer=r:c&&(a.layer=new R(c))}}),s?.forEach(i=>{if(i.hasOwnProperty("locator")){let a=i;if(a?.name==="ArcGIS World Geocoding Service"){let l=a.outFields||["Addr_type","Match_addr","StAddr","City"];a.outFields=l,a.singleLineFieldName="SingleLine"}a.url=a.url,delete a.url}})):e={...e,includeDefaultSources:!0},e}_initGraphicsLayer(){let e=this._pnContextConsumer.value,t=this._translations.bufferLayer;if(this.mapView){let s=this.mapView.map.layers.findIndex(i=>i.title===t);if(s>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(s);else if(this._bufferGraphicsLayer=new N({title:t,listMode:"hide"}),this._bufferGraphicsLayer){e.managedLayers[t]="buffer";let i=this.mapView.map.layers.findIndex(a=>a.title===this._translations.sketchLayer);i>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,i):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}}async _sketchGraphicsChanged(e,t=!1){let s=e.detail.graphics;if(s.length>0&&s[0])if(t||(this._sketchGraphic=s[0]),this._workflowType=this.useLayerFeaturesEnabled?"SELECT":"SKETCH",this._workflowType==="SKETCH"&&this._drawTools.value&&await this._drawTools.value.updateGraphics(),await this._updateLabel(),this._clearSearchWidget(),this.useLayerFeaturesEnabled&&!t){let i=Array.isArray(s)?s.map(a=>a.geometry):this.geometries;await this._selectLayerFeatures(i[0])}else{let i=s.reduce((l,r)=>(r?.layer?.objectIdField?l.push(Number(r.attributes[r.layer.objectIdField])):r.getObjectId&&l.push(Number(r.getObjectId())),l),[]),a=e.detail.useOIDs&&i.length>0;this._updateSelection(s,a,i),a&&await this._highlightFeatures(i)}else await this._clearResults(!0,!0)}async _highlightWithOIDsOrGeoms(){return this._skipGeomOIDs&&this._skipGeomOIDs?.length>0?(this._selectedIds=this._skipGeomOIDs,this._highlightFeatures(this._selectedIds)):this._geomQuery(this.geometries)}async _highlightFeatures(e){let t=this._pnContextConsumer.value;if(t.removeHandles(),e.length>0&&this.selectLayerView&&this.mapView){let s=await G(e,this.selectLayerView,this.mapView);t.highlightHandles.push(s)}this._numSelected=e.length,this.selectionSetChange.emit(e.length)}async _selectFeatures(e){this._selectionLoading=!0,this._selectedIds=this.selectLayerView&&await k(e,this.selectLayerView.layer)||[],this._selectionLoading=!1,this._drawTools.value&&(this._drawTools.value.graphics=this._graphics),await this._highlightFeatures(this._selectedIds)}async _bufferComplete(e){this._bufferGeometry=Array.isArray(e.detail)?e.detail[0]:e.detail;let t=this._bufferTools.value&&Number(this._bufferTools.value.distance),s=0;if(this._bufferGeometry){let i={type:"simple-fill",color:this.bufferColor,outline:{color:this.bufferOutlineColor,width:1}},a=new D({geometry:this._bufferGeometry,symbol:i});this._bufferGraphicsLayer&&this.mapView&&(this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(a),await this._selectFeatures([this._bufferGeometry]),a.geometry?.extent&&await this.mapView.goTo(a.geometry.extent)),s=t,t=0}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),await this._highlightWithOIDsOrGeoms();await this._distanceChanged({oldValue:t,newValue:s})}async _geomQuery(e){let t=T(e);return t?this._selectFeatures(t):Promise.resolve()}async _clearResults(e=!0,t=!1){this._selectedIds=[],this._distance=void 0,this._unit=void 0,t&&(this._selectionLabel="",this._labelName.value&&(this._labelName.value.value="")),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),e&&this._clearSearchWidget(),this._pnContextConsumer.value.removeHandles(),this._drawTools.value?.clear&&(this._graphics=[],this.geometries=[],await this._drawTools.value.clear()),this._numSelected=this._selectedIds.length,this.selectionSetChange.emit(this._numSelected)}_clearSearchWidget(){this._searchElement.value?.clear(),this._searchResult=void 0}_updateSelection(e,t,s){this._selectedIds=t&&s?s:this._selectedIds,this._skipGeomOIDs=t?s:void 0,this.geometries=Array.isArray(e)?e.reduce((i,a)=>(a.geometry&&i.push(a.geometry),i),[]):this.geometries,this._graphics=e}async _updateLabel(){if(this.enableSearchDistance){let e=this._translations.sketch&&this._selectionLabel.indexOf(this._translations.sketch)>-1,t=this._translations.select&&this._selectionLabel.indexOf(this._translations.select)>-1,s=this._selectionLabel.indexOf(this._searchResult?.name)>-1,i=this._workflowType==="SEARCH"?this._searchResult?.name:this._workflowType==="SELECT"?this._translations.select:this._translations.sketch,a=this._bufferTools.value?this._bufferTools.value.unit:this._unit,l=this._bufferTools.value&&a&&await this._bufferTools.value.getTranslatedUnit(a),r=Number.isNaN(Number(this._distance))&&this._bufferTools.value?this._bufferTools.value.distance:this._distance;this._selectionLabel=e||t||s||!this._selectionLabel?`${i} ${r} ${l}`:this._selectionLabel,this._labelName.value&&(this._labelName.value.value=this._selectionLabel)}}async _layerSelectionChange(e){if(Array.isArray(e.detail)&&e.detail.length>0){let t=e.detail.reduce((s,i)=>(this.mapView&&s.push(_(this.mapView,i)),s),[]);return Promise.all(t).then(s=>{this.layerViews=s.reduce((i,a)=>(a&&i.push(a),i),[]),this._featuresCollection={},this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})})}}async _inputLayerSelectionChange(e){let t=e?.detail?.length>0?e.detail[0]:"";(!this.selectLayerView||t!==this.selectLayerView.layer.id)&&(this.selectLayerView=this.mapView&&await _(this.mapView,t),await this._updateLabel(),this._bufferGeometry?await this._selectFeatures([this._bufferGeometry]):await this._highlightWithOIDsOrGeoms())}async _distanceChanged(e){e.newValue!==e.oldValue&&(this._distance=e.newValue,await this._updateLabel())}async _selectLayerFeatures(e){this._selectionLoading=!0;let t=this.layerViews.map(s=>(this._featuresCollection[s.layer.id]=[],I(0,s.layer,e,this._featuresCollection)));return Promise.all(t).then(async s=>{this._selectionLoading=!1;let i=[];s.forEach(n=>{Object.keys(n).forEach(h=>{i=i.concat(n[h])})});let a=!1;i.forEach(n=>{let h=n.geometry;n.symbol=h&&h.type==="point"?this.sketchPointSymbol:h&&h.type==="polyline"?this.sketchLineSymbol:h&&h.type==="polygon"?this.sketchPolygonSymbol:void 0,a=n?.layer?.hasOwnProperty("objectIdField")||n.hasOwnProperty("getObjectId")});let l=this.layerViews[0].layer,r=this.selectLayerView?.layer,c=a&&l.url===r?.url&&r?.layerId===l.layerId;await this._sketchGraphicsChanged({detail:{graphics:i,useOIDs:c}},!0)})}_useLayerFeaturesEnabledChanged(){this.useLayerFeaturesEnabled=!this.useLayerFeaturesEnabled,this._sketchGraphic&&this._sketchGraphicsChanged({detail:{graphics:[this._sketchGraphic],useOIDs:!1}})}};C("map-select-tools",y);return y},"request","layers/FeatureLayer","Graphic","layers/GraphicsLayer",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as x}from"./4MAZNAHZ.js";import"./CVHXDPJO.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as L}from"./MGEDATQ7.js";import"./RMEDO4JC.js";import"./ISFTCFSJ.js";import{b as I}from"./2I5LGZNX.js";import{E as h,F as r,G as v,I as d,J as C,h as y,i as s,l as w,q as _,t as $}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,{d:M}])=>{function T(f){let e=t=>{(t?.altKey||t?.metaKey)&&t?.code==="KeyM"&&f?.focus()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}var k=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-surface-2)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.z-index-2{z-index:2!important}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-surface-1)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,m=class extends v{constructor(){super(),this.coverPageEnabled=!1,this.customInfoText="",this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableLayerList=!0,this.enableMapList=!0,this.visibilityIcon="eyeball",this.enableSearch=!0,this.enableShare=!1,this.enableSnapping=!0,this.enableZoom=!0,this.mapInfos=[],this.onlyShowUpdatableLayers=!1,this.popupHeaderColor="",this.popupHeaderHoverColor="",this.popupHeaderHoverTextColor="",this.popupHeaderTextColor="",this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.enableSelectionTool=!0,this.featureSelectionMode="multiple",this.enableCopyPaste=!0,this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=L({name:"crowdsource-manager",blocking:!0}),this._layoutMode="GRID",this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerExpressions=[],this._layerIds=[],this._isLoading=!0,this._mapExtentFilterChecked=!1,this._deleteIds=[],this._showInvalidMapAlert=!1,this._currentMapInfos=[],this._pasteEnabled=!1,this._showCopyPasteActions=!1,this._defaultAppLayoutHonored=!1,this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._layerTable=h(),this._shouldSetMapView=!1,this._filterList=h(),this._mapCard=h(),this._isMapViewOnLoad=!1,this.showIntroductionWindow=_(),this.showCoverPage=_(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"popupClosed",this.popupClosed),this.listenOn(window,"layoutChanged",this.layoutChanged),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"showDelete",this.showDelete),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"creatingFeature",this.creatingFeature),this.listenOn(window,"featuresCopied",this.featuresCopied),this.listenOn(window,"idsFound",this.idsFound),x(window)}static{this.properties={appLayout:1,appProxies:1,basemapConfig:0,coverPageEnabled:5,customInfoText:1,defaultAppLayout:1,defaultCenter:1,defaultGlobalId:1,defaultLayer:1,defaultLevel:1,defaultOid:1,defaultWebmap:1,honorMapFieldSettings:5,introductionWindowEnabled:5,enableAutoRefresh:5,enableBasemap:5,enableColumnReorder:5,enableCSV:5,enableFloorFilter:5,enableFullscreen:5,enableHome:5,enableLegend:5,enableLayerList:5,enableMapList:5,visibilityIcon:1,enableSearch:5,enableShare:5,enableSnapping:5,enableZoom:5,mapInfos:0,onlyShowUpdatableLayers:5,popupHeaderColor:1,popupHeaderHoverColor:1,popupHeaderHoverTextColor:1,popupHeaderTextColor:1,searchConfiguration:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,theme:1,zoomAndScrollToSelected:5,zoomToScale:9,enableSelectionTool:5,featureSelectionMode:1,enableCopyPaste:5,_deleteDialogOpen:16,_enableCreateFeatures:16,_hideFooter:16,_hideTable:16,_isMobile:16,_translations:16,_layer:16,_layoutMode:16,_mapInfo:16,_mapView:16,_panelOpen:16,_numSelected:16,_filterOpen:16,_showInformationHeader:16,_layerExpressions:16,_layerIds:16,_isLoading:16,_mapExtentFilterChecked:16,_deleteIds:16,_showInvalidMapAlert:16,_currentMapInfos:16,_pasteEnabled:16,_showCopyPasteActions:16}}static{this.styles=k}static{this.shadowRootOptions=$}willUpdate(e){e.has("appLayout")&&this.appLayout&&this.appLayoutWatchHandler(this.appLayout,e.get("appLayout")),e.has("enableZoom")&&(this.hasUpdated||this.enableZoom!==!0)&&this.enableZoomWatchHandler(),e.has("mapInfos")&&this.hasUpdated&&this.mapInfosWatchHandler(),e.has("_isMobile")&&this.hasUpdated&&this._handleCopyPasteActions(),e.has("enableCopyPaste")&&this.hasUpdated&&this._handleCopyPasteActions()}appLayoutWatchHandler(e,t){e!==t&&(this._layerTable.value?.validateTableUpdate(e==="splitView"),this._setActiveLayout(e),this.appLayout==="mapView"&&this._layer?.isTable&&this._mapCard.value&&this._mapCard.value.updateLayer(),this._isMapViewOnLoad&&this._layerTable.value&&this._layerTable.value.refresh())}enableZoomWatchHandler(){this._initMapZoom()}mapInfosWatchHandler(){this.updateCurrentMapInfos()}async featureSelectionChange(e){this._numSelected=e.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(e){this._layoutMode=e.detail}async mapChanged(e){this._isMapViewOnLoad&&(this._showMapInFullView(),this._isMapViewOnLoad=!1),this._mapChange=e.detail,this.showHideMapPopupAndTable(!1),this._pasteEnabled=!1,this._mapChange?.isValid?await this._mapChange.mapView?.when(async()=>{await this._setMapView()}):(this._mapInfo=this._mapChange&&this._getMapInfo(this._mapChange.id),this._showInvalidMapAlert=!0)}async layerSelectionChange(e){let t=e.detail[0],i=this._mapView&&await M(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,this._pasteEnabled=!1,this._handleCopyPasteActions(),this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1})}async showDelete(e){this._deleteIds=e.detail.ids,this._deleteDialogOpen=!0}async noLayersFound(){this._layer=void 0,this._isLoading=!1}async clearSelection(){this.showHideMapPopupAndTable(!1)}async relatedRecordToggled(e){let t=e.detail;this._relatedTableLayer=t}async creatingFeature(){this.appLayout="splitView"}featuresCopied(){this._pasteEnabled=!0}idsFound(e){this._layerIds=e.detail}load(){this.updateCurrentMapInfos(),this._resizeObserver=new ResizeObserver(()=>this._onResize())}render(){let e=this.popupHeaderColor&&this.popupHeaderColor!=="#FFFFFF"?"border-width-0":"",t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",i=this._translations.invalidWebMapMsg?.replace("{{web_map}}",this._mapInfo?.name||"");return s`${this._showInvalidMapAlert&&s`<calcite-alert auto-close class=${d(t)} icon=check-circle kind=danger label @calciteAlertClose=${()=>{this._showInvalidMapAlert=!1}} open placement=top><div slot=message>${i}</div></calcite-alert>`||""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode,this._panelOpen,this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile&&this._deleteModal()||""}`}async updated(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}loaded(){this._resizeObserver?.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad=this.appLayout==="mapView",this._setActiveLayout(this.appLayout)}_getFooter(){let e=this._numSelected>0,t=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer,i=this._layer?.editingEnabled&&this._layer.capabilities?.operations.supportsDelete;return this._isMobile&&e&&!this._hideFooter?s`<div class=${"width-100"} slot=footer><div class="display-flex padding-1-2"><calcite-button appearance=solid id=solutions-show @click=${()=>this.showHideMapPopupAndTable(!0)} width=full>${this._translations.view.replace("{{n}}",this._numSelected.toString())}</calcite-button>${i?s`<delete-button class="padding-inline-start-1 width-full" id=solutions-delete .ids=${this.updateIdsToBeDeleted()} @deleteClicked=${this.updateIdsToBeDeleted} .layer=${t}></delete-button>`:void 0}</div></div>`:void 0}updateIdsToBeDeleted(){return this._deleteIds=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._layerTable.value.selectedRelatedIds:this._layerTable.value?.selectedIds,this._deleteIds}_setActiveLayout(e){e==="splitView"&&!this._panelOpen&&this._toggleLayout(),e==="mapView"?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(e,t){return e==="HORIZONTAL"?t?"chevrons-up":"chevrons-down":e==="VERTICAL"||e==="GRID"?t?"chevrons-left":"chevrons-right":void 0}_getMapSizeClass(e,t,i){let a="";switch(e){case"HORIZONTAL":a=`${t&&!i?"height-1-2 display-grid":t&&i?"height-full":"height-0"} width-full position-relative`;break;case"GRID":a=`height-full position-relative ${t?"width-1-3":"width-0"}`;break;case"VERTICAL":a=`height-full position-relative ${t?"width-1-2":"width-0"}`;break}return a}_getTableSizeClass(e,t){let i="";switch(e){case"HORIZONTAL":i=`${t?"height-1-2":"height-full"} width-full display-flex flex-column`;break;case"GRID":i=`${t?"width-2-3":"width-full"} height-full display-flex`;break;case"VERTICAL":i=`${t?"width-1-2":"width-full"} height-full display-flex`;break}return i}_getBody(e,t,i){let a=e==="HORIZONTAL"?"":"display-flex",l=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return s`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e,t,i)}${this._getTable(e,t,i)}</div>${this.coverPageEnabled&&s`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${l}`} icon-start=content-minimal kind=neutral .label=${this._translations.coverPage} round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&s`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${l}`} icon-start=information-letter kind=neutral .label=${this._translations.information} round scale=l split-child=primary width=auto></calcite-button></div>`||""}</calcite-panel>`}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(e,t,i){let a=this._getMapSizeClass(e,t,i);return s`<div class=${`${a} overflow-hidden z-index-2`}>${this._getMapNode(t)}${this._getPopupExpandNode()}</div>`}_getMapNode(e){let t=this.appLayout==="mapView",i=this.appLayout==="tableView",a=this._isMobile?"height-full":t||i?"position-absolute-0":this._layoutMode==="HORIZONTAL"&&(!this._isMobile||e)?"":"adjusted-height-50",l=this.defaultWebmap&&this.defaultLayer,o=this.enableSelectionTool&&this.featureSelectionMode==="multiple"&&!this._layer?.isTable,p=["home","legend","search","fullscreen","basemap","floorfilter","layers-list","selectiontool"],c=["map-picker","map-layer-picker"],n=document.dir||"ltr";return s`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${l?this.defaultLayer:""} .defaultWebmapId=${this.defaultWebmap} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSelectionTool=${o} .enableShare=${this.enableShare} enable-single-expand enable-map-layer-picker enable-map-picker .featureSelectionMode=${this.featureSelectionMode} .hide=${!this._isMobile&&i} zoom-tools-size=s .isMapLayout=${t} .isMobile=${this._isMobile} .mapInfo=${this._mapInfo} .mapInfos=${this._currentMapInfos.filter(u=>u.visible!==!1)} map-widgets-index=0 .mapWidgetsPosition=${n==="rtl"?"top-right":"top-left"} .mobileMapWidgetsPosition=${n==="rtl"?"top-left":"top-right"} map-component-id=arcgis-map map-widgets-size=s .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} .pasteEnabled=${this._pasteEnabled} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showCopyPasteActions=${this._showCopyPasteActions} stack-tools .theme=${this.theme} .visibilityIcon=${this.visibilityIcon} .mapToolsOrder=${p} .mobileToolsOrder=${c} .zoomToScale=${this.zoomToScale} ${r(this._mapCard)}></map-card></div>`}_getPopupExpandNode(){let e=this._isMobile?"height-full":"height-full position-relative",t=this._isMobile&&this._showInformationHeader?"display-none height-0":"",i=this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark",a=this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":"",l=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return s`<div class=${`${i} ${e} ${a} ${l} ${o}`} style=${C({"--calcite-color-surface-2":this.popupHeaderColor,"--calcite-color-surface-3":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor})}><calcite-panel>${!this._isMobile&&this._showInformationHeader||this._numSelected>0&&!this._isMobile?s`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon aria-hidden=true icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:s`<div></div>`}${this._getCardNode()}</calcite-panel></div>`}_getCardNode(){let e=this.appLayout==="mapView",t=this.appLayout==="tableView",i=this._isMobile?"height-full":t&&this._currentMapInfos?.length>1?"adjusted-height-100-51":e||t?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isMobile?"height-full":"height-50":"adjusted-height-50_25",a=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",l=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return s`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .allowedPasteLayerIds=${this._layerIds} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${l} .mapView=${this?._mapView} map-component-id=arcgis-map @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=l?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} @featureOrRecordSubmitted=${()=>this._layerTable.value&&void this._layerTable.value.refresh()} .pasteEnabled=${this._pasteEnabled} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showCopyPasteActions=${this._showCopyPasteActions} .showSketchWidgets=${l?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",l=this.appLayout==="tableView",o=i&&this._isMobile?"visibility-hidden":a?"display-none":"",p=a?"height-full width-full z-index-0":"display-none",c=this._getTableSizeClass(e,t),n=e==="HORIZONTAL"?"horizontal":"vertical",u=e==="HORIZONTAL"?"header":"panel-start",b=this.defaultWebmap&&this.defaultLayer,S=this._isMobile?"border-top":"",g=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,F=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(V=>Number.parseInt(V,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return s`<calcite-shell class=${`${c} ${S} border-bottom z-index-1`}>${this._isMobile?void 0:s`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${u??w}>${this.getActions(e,t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${b?g:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!g?F:void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave!==void 0?this._mapInfo?.enableTableAutosave:!0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${l} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .pasteEnabled=${this._pasteEnabled} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} .showCopyPasteActions=${this._showCopyPasteActions} .layerIds=${this._layerIds} ${r(this._layerTable)}></layer-table></div><div class=${d(p)} id=full-map-view></div></calcite-shell>`}getActions(e,t){let i=this._getDividerIcon(e,t),a=t?this._translations.close:this._translations.open,l="toggle-layout";return s`<calcite-action .active=${this.appLayout==="splitView"} alignment=center class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} .text=${this._translations.splitView}></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="tableView"} alignment=center class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} .text=${this._translations.tableView}></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="mapView"} alignment=center class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} .text=${this._translations.mapView}></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center class="toggle-node" .icon=${i} id=${l} @click=${()=>this._toggleLayout()} slot=actions-end .text=${a}></calcite-action><calcite-tooltip placement=bottom .referenceElement=${l}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return s`<delete-dialog id=deleteDialogId .ids=${this._deleteIds} .layer=${e} @deleteDialogClose=${()=>this._deleteDialogOpen=!1} .open=${this._deleteDialogOpen}></delete-dialog>`}_mapExtentFilter(){let e=this._layerExpressions?.length===0;return s`<calcite-panel><div><calcite-block class=${d(this.theme==="dark"?"background-dark":"")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${t=>{let i=!!(t.target.checked||this._filterList.value?.filterCount&&this._filterList.value?.filterCount>0);this._layerTable.value&&this._layerTable.value?.filterUpdate(i,t.target.checked),this._mapCard.value&&this._mapCard.value?.updateFilterState(i),this._mapExtentFilterChecked=t.target.checked}} scale=m></calcite-switch></div></calcite-block>${e&&s`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>`||""}</div></calcite-panel>`}_filterModal(){let e=this._layerExpressions?.length>0,t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return s`<calcite-dialog class=${`filter-content-space ${t}`} .heading=${this._translations.filter.replace("{{title}}",this._layer?.title||"")} id=solutions-filter-dialog-manager kind=brand modal @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s>${!this._layer?.isTable&&this._mapExtentFilter()||""}${e&&this._mapView&&s`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._layerExpressions} @filterListReset=${this._handleFilterListReset} @filterUpdate=${()=>{this._updateFilter()}} .view=${this._mapView} ${r(this._filterList)}></instant-apps-filter-list>`||""}</calcite-dialog>`}_updateFilter(){let e=this._filterList?.value?.filterCount&&this._filterList.value.filterCount>0||this._mapExtentFilterChecked;this._layerTable.value&&this._layerTable.value?.filterUpdate(e),this._mapCard.value&&this._mapCard.value.updateFilterState(e)}_initLayerExpressions(){let e=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=e?e.filter(t=>t.id===this._layer?.id):[]}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.value&&this._mapCard.value.resetFilter(),this._layerTable.value&&this._layerTable.value.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.value&&this._layerTable.value.closeFilter())}_onResize(){let e=this.el.offsetWidth<=1024,t=!this._isMobile&&e;this._isMobile=e,t&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this.appLayout="splitView"):(this._layer?.isTable&&(this.appLayout="tableView"),this._isMobile=!1),this._layoutMode=this._isMobile?"HORIZONTAL":"GRID"}updateCurrentMapInfos(){this._currentMapInfos=this.mapInfos,!this.enableMapList&&this.defaultWebmap&&(this._currentMapInfos=this.mapInfos.filter(e=>e.id===this.defaultWebmap))}_handleCopyPasteActions(){this._layer&&(this._showCopyPasteActions=this.enableCopyPaste&&!this._isMobile)}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if(this.appLayout!=="mapView"){let e=document.getElementById("full-map-view")?.childNodes[0],t=document.getElementById("card-mapView");e&&t&&t.appendChild(e)}}_showMapInFullView(){let e=document.getElementById("card-mapView")?.childNodes,t;e?.forEach(a=>{!t&&a.mapView&&(t=a)});let i=document.getElementById("full-map-view");t&&i&&i.appendChild(t)}showHideMapPopupAndTable(e){this._hideTable=e,this._hideFooter=e}_getMapInfo(e){let t;return this._currentMapInfos.some(i=>i.id===e?(t={...i},!0):!1),t}async _setMapView(){let e=this._mapChange&&this._getMapInfo(this._mapChange.id);if(e&&this._mapChange){this._mapInfo=e,this._initLayerExpressions(),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView&&(this._mapView.popupEnabled=!1,T(this._mapView));let t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map(a=>Number.parseFloat(a)),i=!this.defaultLevel||this._defaultLevelHonored?void 0:Number.parseInt(this.defaultLevel,10);t&&i&&(await this._mapView?.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView?.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView?.ui.remove("zoom")}};I("crowdsource-manager",m);return m},a,b)
|
|
2
|
+
import{a as x}from"./C4T4HSG2.js";import"./HVT2WBVC.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as L}from"./XF5N3NI5.js";import"./UBPOT5V3.js";import"./ISFTCFSJ.js";import{b as I}from"./2I5LGZNX.js";import{E as h,F as r,G as v,I as d,J as C,h as y,i as s,l as w,q as _,t as $}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,{d:M}])=>{function T(f){let e=t=>{(t?.altKey||t?.metaKey)&&t?.code==="KeyM"&&f?.focus()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}var k=y`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-surface-2)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.z-index-2{z-index:2!important}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-surface-1)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,m=class extends v{constructor(){super(),this.coverPageEnabled=!1,this.customInfoText="",this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableLayerList=!0,this.enableMapList=!0,this.visibilityIcon="eyeball",this.enableSearch=!0,this.enableShare=!1,this.enableSnapping=!0,this.enableZoom=!0,this.mapInfos=[],this.onlyShowUpdatableLayers=!1,this.popupHeaderColor="",this.popupHeaderHoverColor="",this.popupHeaderHoverTextColor="",this.popupHeaderTextColor="",this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.enableSelectionTool=!0,this.featureSelectionMode="multiple",this.enableCopyPaste=!0,this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=L({name:"crowdsource-manager",blocking:!0}),this._layoutMode="GRID",this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerExpressions=[],this._layerIds=[],this._isLoading=!0,this._mapExtentFilterChecked=!1,this._deleteIds=[],this._showInvalidMapAlert=!1,this._currentMapInfos=[],this._pasteEnabled=!1,this._showCopyPasteActions=!1,this._defaultAppLayoutHonored=!1,this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._layerTable=h(),this._shouldSetMapView=!1,this._filterList=h(),this._mapCard=h(),this._isMapViewOnLoad=!1,this.showIntroductionWindow=_(),this.showCoverPage=_(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"popupClosed",this.popupClosed),this.listenOn(window,"layoutChanged",this.layoutChanged),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"showDelete",this.showDelete),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"creatingFeature",this.creatingFeature),this.listenOn(window,"featuresCopied",this.featuresCopied),this.listenOn(window,"idsFound",this.idsFound),x(window)}static{this.properties={appLayout:1,appProxies:1,basemapConfig:0,coverPageEnabled:5,customInfoText:1,defaultAppLayout:1,defaultCenter:1,defaultGlobalId:1,defaultLayer:1,defaultLevel:1,defaultOid:1,defaultWebmap:1,honorMapFieldSettings:5,introductionWindowEnabled:5,enableAutoRefresh:5,enableBasemap:5,enableColumnReorder:5,enableCSV:5,enableFloorFilter:5,enableFullscreen:5,enableHome:5,enableLegend:5,enableLayerList:5,enableMapList:5,visibilityIcon:1,enableSearch:5,enableShare:5,enableSnapping:5,enableZoom:5,mapInfos:0,onlyShowUpdatableLayers:5,popupHeaderColor:1,popupHeaderHoverColor:1,popupHeaderHoverTextColor:1,popupHeaderTextColor:1,searchConfiguration:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,theme:1,zoomAndScrollToSelected:5,zoomToScale:9,enableSelectionTool:5,featureSelectionMode:1,enableCopyPaste:5,_deleteDialogOpen:16,_enableCreateFeatures:16,_hideFooter:16,_hideTable:16,_isMobile:16,_translations:16,_layer:16,_layoutMode:16,_mapInfo:16,_mapView:16,_panelOpen:16,_numSelected:16,_filterOpen:16,_showInformationHeader:16,_layerExpressions:16,_layerIds:16,_isLoading:16,_mapExtentFilterChecked:16,_deleteIds:16,_showInvalidMapAlert:16,_currentMapInfos:16,_pasteEnabled:16,_showCopyPasteActions:16}}static{this.styles=k}static{this.shadowRootOptions=$}willUpdate(e){e.has("appLayout")&&this.appLayout&&this.appLayoutWatchHandler(this.appLayout,e.get("appLayout")),e.has("enableZoom")&&(this.hasUpdated||this.enableZoom!==!0)&&this.enableZoomWatchHandler(),e.has("mapInfos")&&this.hasUpdated&&this.mapInfosWatchHandler(),e.has("_isMobile")&&this.hasUpdated&&this._handleCopyPasteActions(),e.has("enableCopyPaste")&&this.hasUpdated&&this._handleCopyPasteActions()}appLayoutWatchHandler(e,t){e!==t&&(this._layerTable.value?.validateTableUpdate(e==="splitView"),this._setActiveLayout(e),this.appLayout==="mapView"&&this._layer?.isTable&&this._mapCard.value&&this._mapCard.value.updateLayer(),this._isMapViewOnLoad&&this._layerTable.value&&this._layerTable.value.refresh())}enableZoomWatchHandler(){this._initMapZoom()}mapInfosWatchHandler(){this.updateCurrentMapInfos()}async featureSelectionChange(e){this._numSelected=e.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(e){this._layoutMode=e.detail}async mapChanged(e){this._isMapViewOnLoad&&(this._showMapInFullView(),this._isMapViewOnLoad=!1),this._mapChange=e.detail,this.showHideMapPopupAndTable(!1),this._pasteEnabled=!1,this._mapChange?.isValid?await this._mapChange.mapView?.when(async()=>{await this._setMapView()}):(this._mapInfo=this._mapChange&&this._getMapInfo(this._mapChange.id),this._showInvalidMapAlert=!0)}async layerSelectionChange(e){let t=e.detail[0],i=this._mapView&&await M(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,this._pasteEnabled=!1,this._handleCopyPasteActions(),this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1})}async showDelete(e){this._deleteIds=e.detail.ids,this._deleteDialogOpen=!0}async noLayersFound(){this._layer=void 0,this._isLoading=!1}async clearSelection(){this.showHideMapPopupAndTable(!1)}async relatedRecordToggled(e){let t=e.detail;this._relatedTableLayer=t}async creatingFeature(){this.appLayout="splitView"}featuresCopied(){this._pasteEnabled=!0}idsFound(e){this._layerIds=e.detail}load(){this.updateCurrentMapInfos(),this._resizeObserver=new ResizeObserver(()=>this._onResize())}render(){let e=this.popupHeaderColor&&this.popupHeaderColor!=="#FFFFFF"?"border-width-0":"",t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",i=this._translations.invalidWebMapMsg?.replace("{{web_map}}",this._mapInfo?.name||"");return s`${this._showInvalidMapAlert&&s`<calcite-alert auto-close class=${d(t)} icon=check-circle kind=danger label @calciteAlertClose=${()=>{this._showInvalidMapAlert=!1}} open placement=top><div slot=message>${i}</div></calcite-alert>`||""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode,this._panelOpen,this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile&&this._deleteModal()||""}`}async updated(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}loaded(){this._resizeObserver?.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad=this.appLayout==="mapView",this._setActiveLayout(this.appLayout)}_getFooter(){let e=this._numSelected>0,t=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer,i=this._layer?.editingEnabled&&this._layer.capabilities?.operations.supportsDelete;return this._isMobile&&e&&!this._hideFooter?s`<div class=${"width-100"} slot=footer><div class="display-flex padding-1-2"><calcite-button appearance=solid id=solutions-show @click=${()=>this.showHideMapPopupAndTable(!0)} width=full>${this._translations.view.replace("{{n}}",this._numSelected.toString())}</calcite-button>${i?s`<delete-button class="padding-inline-start-1 width-full" id=solutions-delete .ids=${this.updateIdsToBeDeleted()} @deleteClicked=${this.updateIdsToBeDeleted} .layer=${t}></delete-button>`:void 0}</div></div>`:void 0}updateIdsToBeDeleted(){return this._deleteIds=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._layerTable.value.selectedRelatedIds:this._layerTable.value?.selectedIds,this._deleteIds}_setActiveLayout(e){e==="splitView"&&!this._panelOpen&&this._toggleLayout(),e==="mapView"?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(e,t){return e==="HORIZONTAL"?t?"chevrons-up":"chevrons-down":e==="VERTICAL"||e==="GRID"?t?"chevrons-left":"chevrons-right":void 0}_getMapSizeClass(e,t,i){let a="";switch(e){case"HORIZONTAL":a=`${t&&!i?"height-1-2 display-grid":t&&i?"height-full":"height-0"} width-full position-relative`;break;case"GRID":a=`height-full position-relative ${t?"width-1-3":"width-0"}`;break;case"VERTICAL":a=`height-full position-relative ${t?"width-1-2":"width-0"}`;break}return a}_getTableSizeClass(e,t){let i="";switch(e){case"HORIZONTAL":i=`${t?"height-1-2":"height-full"} width-full display-flex flex-column`;break;case"GRID":i=`${t?"width-2-3":"width-full"} height-full display-flex`;break;case"VERTICAL":i=`${t?"width-1-2":"width-full"} height-full display-flex`;break}return i}_getBody(e,t,i){let a=e==="HORIZONTAL"?"":"display-flex",l=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return s`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e,t,i)}${this._getTable(e,t,i)}</div>${this.coverPageEnabled&&s`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${l}`} icon-start=content-minimal kind=neutral .label=${this._translations.coverPage} round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&s`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${l}`} icon-start=information-letter kind=neutral .label=${this._translations.information} round scale=l split-child=primary width=auto></calcite-button></div>`||""}</calcite-panel>`}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(e,t,i){let a=this._getMapSizeClass(e,t,i);return s`<div class=${`${a} overflow-hidden z-index-2`}>${this._getMapNode(t)}${this._getPopupExpandNode()}</div>`}_getMapNode(e){let t=this.appLayout==="mapView",i=this.appLayout==="tableView",a=this._isMobile?"height-full":t||i?"position-absolute-0":this._layoutMode==="HORIZONTAL"&&(!this._isMobile||e)?"":"adjusted-height-50",l=this.defaultWebmap&&this.defaultLayer,o=this.enableSelectionTool&&this.featureSelectionMode==="multiple"&&!this._layer?.isTable,p=["home","legend","search","fullscreen","basemap","floorfilter","layers-list","selectiontool"],c=["map-picker","map-layer-picker"],n=document.dir||"ltr";return s`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${l?this.defaultLayer:""} .defaultWebmapId=${this.defaultWebmap} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSelectionTool=${o} .enableShare=${this.enableShare} enable-single-expand enable-map-layer-picker enable-map-picker .featureSelectionMode=${this.featureSelectionMode} .hide=${!this._isMobile&&i} zoom-tools-size=s .isMapLayout=${t} .isMobile=${this._isMobile} .mapInfo=${this._mapInfo} .mapInfos=${this._currentMapInfos.filter(u=>u.visible!==!1)} map-widgets-index=0 .mapWidgetsPosition=${n==="rtl"?"top-right":"top-left"} .mobileMapWidgetsPosition=${n==="rtl"?"top-left":"top-right"} map-component-id=arcgis-map map-widgets-size=s .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} .pasteEnabled=${this._pasteEnabled} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showCopyPasteActions=${this._showCopyPasteActions} stack-tools .theme=${this.theme} .visibilityIcon=${this.visibilityIcon} .mapToolsOrder=${p} .mobileToolsOrder=${c} .zoomToScale=${this.zoomToScale} ${r(this._mapCard)}></map-card></div>`}_getPopupExpandNode(){let e=this._isMobile?"height-full":"height-full position-relative",t=this._isMobile&&this._showInformationHeader?"display-none height-0":"",i=this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark",a=this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":"",l=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return s`<div class=${`${i} ${e} ${a} ${l} ${o}`} style=${C({"--calcite-color-surface-2":this.popupHeaderColor,"--calcite-color-surface-3":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor})}><calcite-panel>${!this._isMobile&&this._showInformationHeader||this._numSelected>0&&!this._isMobile?s`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon aria-hidden=true icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:s`<div></div>`}${this._getCardNode()}</calcite-panel></div>`}_getCardNode(){let e=this.appLayout==="mapView",t=this.appLayout==="tableView",i=this._isMobile?"height-full":t&&this._currentMapInfos?.length>1?"adjusted-height-100-51":e||t?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isMobile?"height-full":"height-50":"adjusted-height-50_25",a=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",l=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return s`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .allowedPasteLayerIds=${this._layerIds} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${l} .mapView=${this?._mapView} map-component-id=arcgis-map @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=l?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} @featureOrRecordSubmitted=${()=>this._layerTable.value&&void this._layerTable.value.refresh()} .pasteEnabled=${this._pasteEnabled} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showCopyPasteActions=${this._showCopyPasteActions} .showSketchWidgets=${l?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",l=this.appLayout==="tableView",o=i&&this._isMobile?"visibility-hidden":a?"display-none":"",p=a?"height-full width-full z-index-0":"display-none",c=this._getTableSizeClass(e,t),n=e==="HORIZONTAL"?"horizontal":"vertical",u=e==="HORIZONTAL"?"header":"panel-start",b=this.defaultWebmap&&this.defaultLayer,S=this._isMobile?"border-top":"",g=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,F=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(V=>Number.parseInt(V,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return s`<calcite-shell class=${`${c} ${S} border-bottom z-index-1`}>${this._isMobile?void 0:s`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${u??w}>${this.getActions(e,t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${b?g:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!g?F:void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave!==void 0?this._mapInfo?.enableTableAutosave:!0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${l} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .pasteEnabled=${this._pasteEnabled} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} .showCopyPasteActions=${this._showCopyPasteActions} .layerIds=${this._layerIds} ${r(this._layerTable)}></layer-table></div><div class=${d(p)} id=full-map-view></div></calcite-shell>`}getActions(e,t){let i=this._getDividerIcon(e,t),a=t?this._translations.close:this._translations.open,l="toggle-layout";return s`<calcite-action .active=${this.appLayout==="splitView"} alignment=center class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} .text=${this._translations.splitView}></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="tableView"} alignment=center class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} .text=${this._translations.tableView}></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="mapView"} alignment=center class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} .text=${this._translations.mapView}></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center class="toggle-node" .icon=${i} id=${l} @click=${()=>this._toggleLayout()} slot=actions-end .text=${a}></calcite-action><calcite-tooltip placement=bottom .referenceElement=${l}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return s`<delete-dialog id=deleteDialogId .ids=${this._deleteIds} .layer=${e} @deleteDialogClose=${()=>this._deleteDialogOpen=!1} .open=${this._deleteDialogOpen}></delete-dialog>`}_mapExtentFilter(){let e=this._layerExpressions?.length===0;return s`<calcite-panel><div><calcite-block class=${d(this.theme==="dark"?"background-dark":"")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${t=>{let i=!!(t.target.checked||this._filterList.value?.filterCount&&this._filterList.value?.filterCount>0);this._layerTable.value&&this._layerTable.value?.filterUpdate(i,t.target.checked),this._mapCard.value&&this._mapCard.value?.updateFilterState(i),this._mapExtentFilterChecked=t.target.checked}} scale=m></calcite-switch></div></calcite-block>${e&&s`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>`||""}</div></calcite-panel>`}_filterModal(){let e=this._layerExpressions?.length>0,t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return s`<calcite-dialog class=${`filter-content-space ${t}`} .heading=${this._translations.filter.replace("{{title}}",this._layer?.title||"")} id=solutions-filter-dialog-manager kind=brand modal @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s>${!this._layer?.isTable&&this._mapExtentFilter()||""}${e&&this._mapView&&s`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._layerExpressions} @filterListReset=${this._handleFilterListReset} @filterUpdate=${()=>{this._updateFilter()}} .view=${this._mapView} ${r(this._filterList)}></instant-apps-filter-list>`||""}</calcite-dialog>`}_updateFilter(){let e=this._filterList?.value?.filterCount&&this._filterList.value.filterCount>0||this._mapExtentFilterChecked;this._layerTable.value&&this._layerTable.value?.filterUpdate(e),this._mapCard.value&&this._mapCard.value.updateFilterState(e)}_initLayerExpressions(){let e=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=e?e.filter(t=>t.id===this._layer?.id):[]}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.value&&this._mapCard.value.resetFilter(),this._layerTable.value&&this._layerTable.value.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.value&&this._layerTable.value.closeFilter())}_onResize(){let e=this.el.offsetWidth<=1024,t=!this._isMobile&&e;this._isMobile=e,t&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this.appLayout="splitView"):(this._layer?.isTable&&(this.appLayout="tableView"),this._isMobile=!1),this._layoutMode=this._isMobile?"HORIZONTAL":"GRID"}updateCurrentMapInfos(){this._currentMapInfos=this.mapInfos,!this.enableMapList&&this.defaultWebmap&&(this._currentMapInfos=this.mapInfos.filter(e=>e.id===this.defaultWebmap))}_handleCopyPasteActions(){this._layer&&(this._showCopyPasteActions=this.enableCopyPaste&&!this._isMobile)}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if(this.appLayout!=="mapView"){let e=document.getElementById("full-map-view")?.childNodes[0],t=document.getElementById("card-mapView");e&&t&&t.appendChild(e)}}_showMapInFullView(){let e=document.getElementById("card-mapView")?.childNodes,t;e?.forEach(a=>{!t&&a.mapView&&(t=a)});let i=document.getElementById("full-map-view");t&&i&&i.appendChild(t)}showHideMapPopupAndTable(e){this._hideTable=e,this._hideFooter=e}_getMapInfo(e){let t;return this._currentMapInfos.some(i=>i.id===e?(t={...i},!0):!1),t}async _setMapView(){let e=this._mapChange&&this._getMapInfo(this._mapChange.id);if(e&&this._mapChange){this._mapInfo=e,this._initLayerExpressions(),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView&&(this._mapView.popupEnabled=!1,T(this._mapView));let t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map(a=>Number.parseFloat(a)),i=!this.defaultLevel||this._defaultLevelHonored?void 0:Number.parseInt(this.defaultLevel,10);t&&i&&(await this._mapView?.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView?.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView?.ui.remove("zoom")}};I("crowdsource-manager",m);return m},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import b from"./5MPDXVRM.js";import a from"./
|
|
2
|
+
import b from"./5MPDXVRM.js";import a from"./FS5WR74E.js";export default $arcgis.t(([{n:d},{c:u}])=>{async function O(r,n,t,o,e=d,a="created",s="desc",i=!1,l=[],m=[],f,g,p){if(!r?.IsSignedIn)return;let c={q:e,filter:"type:Solution",sortField:a,sortOrder:s,delay:i,categories:l,num:100};return c.q+=y(r,g),await S(n,c,o,m,p,f)}function y(r,n){let t="",o=r.PortalUserOrg,e=r.PortalUserName;return o&&(t+=" orgid:"+o),n!=="My organization's solutions"&&e&&(t+=" owner:"+e),t}async function S(r,n,t,o,e="",a){let s=await t.requestDeployedSolutionCards(n,r,e,a),i=u(s.cards,o);return{cards:s.cards,relatedSolutions:i}}return O},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import f from"./WUEJANIZ.js";import e from"./5MPDXVRM.js";import b from"./UBEU6ULP.js";import{b as m}from"./2B4SGB3I.js";import{b as d}from"./I2NTSKBD.js";import"./AE5HNAOV.js";import{a as c}from"./
|
|
2
|
+
import f from"./WUEJANIZ.js";import e from"./5MPDXVRM.js";import b from"./UBEU6ULP.js";import{b as m}from"./2B4SGB3I.js";import{b as d}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 a}from"./2I5LGZNX.js";import{G as r,K as s,h as o,i,q as n}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([{v:u},,h])=>{var p=o`.text-center{text-align:center}.no-solutions{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:calc(100vh - 190px)}.display-flex{display:flex;align-items:center}.display-none{display:none}.flex-direction-column{flex-direction:column}.flex-direction-row{flex-direction:row}.padding-10{padding:10px}.padding-y-10{padding-top:10px;padding-bottom:10px}.subnote{font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.solution-list-item-label{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1)}.solution-list-item-label,.solution-list-item-description{font-family:var(--calcite-font-family);font-weight:var(--calcite-font-weight-normal);overflow-wrap:break-word;word-break:break-word}.solution-list-item-description{font-size:var(--calcite-font-size--2);margin-block-start:.125rem;color:var(--calcite-color-text-3)}.solution-list-item-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;line-height:1.375}.underline{text-decoration:underline}`,l=class extends r{constructor(){super(),this.referenceCards=[],this.results=null,this.hasLinks=!1,this.listTitle="",this._translations=c({name:"solutions-deployed-list",blocking:!0}),this._cardsFetcher=null,this._configContextConsumer=d({context:m,subscribe:!0}),this.deployedCardSelected=n()}static{this.properties={referenceCards:0,results:0,hasLinks:5,listTitle:1,_translations:16,_cardsFetcher:16}}static{this.styles=p}async load(){if(this._configContextConsumer?.value){let t=this._configContextConsumer.value;this._cardsFetcher=new h(t.locale,t.orgUrl,t.portalURL)}}disconnectedCallback(){super.disconnectedCallback()}render(){if(!this.results)return i`<div class="no-solutions"></div>`;let t=this.listTitle||this._translations.dependencyList,e="solutions-deployed-list-title";return i`${this.listTitle!==""&&i`<div class="solutions-deployed-list-title" id=${e}>${this.listTitle}</div>`||""}${this.hasLinks?i`<calcite-list aria-labelledby=${(this.listTitle!==""?e:void 0)??s} .label=${t}>${this._renderCards()}</calcite-list>`:i`<calcite-list aria-labelledby=${(this.listTitle!==""?e:void 0)??s} .label=${t} selection-mode=none interaction-mode=static>${this._renderCards()}</calcite-list>`}`}_renderCards(){if(this._cardsFetcher&&this.results){let t={...this.results};return t.results=u(t.results),this._cardsFetcher.getCardsFromResponse(t).map(e=>i`<calcite-list-item .label=${e.title} @calciteListItemSelect=${()=>{this.hasLinks&&this._cardSelected(e)}} .value=${e.id}><div class="solution-list-item-content" slot=content><div class=${`solution-list-item-label ${this.hasLinks?"underline":""}`}>${e.title}</div><div class="solution-list-item-description">${`${this._translations.deployedVersion} ${e.deployVersion} - ${new Date(e.created).toLocaleDateString(this._configContextConsumer.value?.locale,{year:"numeric",month:"long",day:"numeric"})}`}</div></div></calcite-list-item>`)}return[]}async _cardSelected(t){let e={tabType:"deployed-card",tabTitleOrId:t.id};window.dispatchEvent(new CustomEvent("forceSelectTab",{detail:e}))}};a("solutions-deployed-list",l);return l},b,e,f)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./FS5WR74E.js";import{ua as i}from"./AE5HNAOV.js";export default $arcgis.t(([{a:p}])=>{async function D(o,a){let r=await v(a,o),I=[],m=[],d=[],f=r.map(async e=>{let c=await h(e.id,"reverse","Solution2Item",o);return{template:e,relatedItems:c}}),u=await Promise.all(f);for(let{template:e,relatedItems:c}of u)for(let w of c){let s=[];for(let t of w.relatedItemIds)s.push({controlItemId:e.id,dependencyItemId:t});let S=s.reduce((t,n)=>(t[n.controlItemId]||(t[n.controlItemId]=new Set),t[n.controlItemId].add(n.dependencyItemId),t),{}),l=Object.entries(S).filter(([t,n])=>n.size>1).flatMap(([t,n])=>Array.from(n).map(g=>({controlItemId:t,dependencyItemId:g})));l.length>0&&(d=d.concat(l))}m=Array.from(new Map([...d].map(e=>[`${e.controlItemId}:${e.dependencyItemId}`,e])).values());let y=m.map(e=>e.controlItemId);return I=[...new Set(y)],{uniqueIitemIds:I,_nonSolutionDependencyItems:m,templateInfos:r}}async function h(o,a,r,I){let m=await i(o,r,a,I);return[{relationshipType:r,relatedItemIds:m.relatedItems.map(d=>d.id)}]}async function v(o,a){return await p(o.id,a)}return{a:D,b:v}},a)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
+
import b from"./7JC52SFZ.js";import a from"./4AFANEZZ.js";import{c as y}from"./C5KDPY7R.js";import"./YM4U4HSN.js";import{a as m}from"./ONARC6AZ.js";import{b as h}from"./HVT2WBVC.js";import"./ISFTCFSJ.js";import{E as r,F as o,G as p,I as i,h as d,i as t}from"./FFF5HUPM.js";import"./QPIMTXPL.js";export default $arcgis.t(([,{b:c}])=>{var f=d`:host{display:block}:host .esri-legend__layer-table,:host .instant-apps-interactive-legend__nested-unique-symbol{margin:0}:host .hide{display:none}`,e={layerTableSizeRamp:"esri-legend__layer-table--size-ramp",layerChildTable:"esri-legend__layer-child-table",layerTable:"esri-legend__layer-table",nestedUniqueSymbol:"instant-apps-interactive-legend__nested-unique-symbol",nonInteractive:"instant-apps-interactive-legend__non-interactive"},n=class extends p{constructor(){super(),this.legendLayerCaption=r(),this.expanded=!0,this.titleText="",this.listenOn(window,"legendLayerExpandUpdated",this.legendLayerExpandUpdatedEmitted)}static{this.properties={expanded:16,activeLayerInfo:0,isSizeRamp:5,isChild:5,isColorRamp:5,isRelationshipRamp:5,isInteractive:5,zoomTo:5,legendElement:0,titleText:1,legendvm:0,legendElementIndex:9}}static{this.styles=f}legendLayerExpandUpdatedEmitted(){this.legendLayerCaption.value&&(this.expanded=this.legendLayerCaption.value.expanded)}render(){let g=this.isChild?e.layerChildTable:e.layerTable,a=this.legendElement?.infos?.length===1&&!this.activeLayerInfo?.layer?.renderer?.field,v=(this.isSizeRamp||!this.isChild)&&!this.isColorRamp?` ${e.layerTableSizeRamp}`:"",$=this.isInteractive?"":` ${e.nonInteractive}`,x=y(this.activeLayerInfo)?` ${e.nestedUniqueSymbol}`:"",s=a&&!this.expanded&&!this.zoomTo?!0:this.expanded;if(this.isRelationshipRamp){let l=c.get("relationshipRampExpandStates")[this.activeLayerInfo.layer.id];s=l===void 0?!0:l}return t`<div class=${`${g}${v}${$}${x}`}><div .id=${`${this.activeLayerInfo?.layer?.id}-legend-element-caption`} class=${i(this.isRelationshipRamp||!this.titleText&&!this.zoomTo&&a?"hide":"show")}><instant-apps-interactive-legend-legend-element-caption .legendvm=${this.legendvm} .activeLayerInfo=${this.activeLayerInfo} .layer=${this.activeLayerInfo.layer} .titleText=${this.titleText} .legendElement=${this.legendElement} .legendElementIndex=${this.legendElementIndex} .zoomTo=${this.zoomTo} .isInteractive=${this.isInteractive} ${o(this.legendLayerCaption)}></instant-apps-interactive-legend-legend-element-caption></div>${m("content",t`<div .id=${`${this.activeLayerInfo?.layer?.id}-legend-element-content-${this.legendElementIndex}`} class=${i(s?"show":"hide")}><slot name=content></slot></div>`)}</div>`}};h("instant-apps-interactive-legend-legend-element",n);return n},a,b)
|