@arcgis/portal-components 6.0.0-next.13 → 6.0.0-next.15
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/{ICZNMBOV.js → 2W4ZEY3I.js} +1 -1
- package/dist/cdn/{Z6R3C4AK.js → 2XIDYV73.js} +1 -1
- package/dist/cdn/{WGCNE5CY.js → 36WCJDSE.js} +1 -1
- package/dist/cdn/{IHB4RIMJ.js → 3K3BYENR.js} +1 -1
- package/dist/cdn/{F6WFLI25.js → 3MLYU2YK.js} +1 -1
- package/dist/cdn/{4CCM74YA.js → 3QJWPWLY.js} +1 -1
- package/dist/cdn/3ZC26CT6.js +4 -0
- package/dist/cdn/{2WN6YUY5.js → 4AJW7TXX.js} +1 -1
- package/dist/cdn/4B2URSFO.js +2 -0
- package/dist/cdn/565U4WSN.js +2 -0
- package/dist/cdn/{TWCJJCPC.js → 57MT7FOI.js} +1 -1
- package/dist/cdn/{G6V653H2.js → 5CBLAWTC.js} +1 -1
- package/dist/cdn/5RHV5HXF.js +2 -0
- package/dist/cdn/{RHCRPJWS.js → 5SKCVK2P.js} +1 -1
- package/dist/cdn/5TY55CJN.js +2 -0
- package/dist/cdn/{2JAJY2VO.js → 5VAV267L.js} +1 -1
- package/dist/cdn/63C5KHJE.js +2 -0
- package/dist/cdn/{E3NOMS5M.js → 66PLI3XK.js} +1 -1
- package/dist/cdn/6MVERAK7.js +2 -0
- package/dist/cdn/{2YZWRFCI.js → 6XAFP5OI.js} +1 -1
- package/dist/cdn/{4NW3MEKV.js → 7GOPVQZP.js} +1 -1
- package/dist/cdn/{A2Z4NCPQ.js → 7HOK3ICE.js} +1 -1
- package/dist/cdn/{6U626CTA.js → 7M6OSITT.js} +1 -1
- package/dist/cdn/{Z2XXKHIS.js → AEPP4WJM.js} +1 -1
- package/dist/cdn/{G2C2DUPW.js → AJ5H2JMU.js} +1 -1
- package/dist/cdn/{BKD7JSV2.js → AXKMKCEW.js} +1 -1
- package/dist/cdn/{FJ3I3AJE.js → AYHYABMC.js} +1 -1
- package/dist/cdn/BGPQQ2RK.js +2 -0
- package/dist/cdn/{5HZNBMW6.js → C5FTQSU6.js} +1 -1
- package/dist/cdn/CB5XUOOF.js +2 -0
- package/dist/cdn/{XQE23XTL.js → CHZFGIWM.js} +1 -1
- package/dist/cdn/DCIJJNO3.js +2 -0
- package/dist/cdn/{CSRZ3UYP.js → EHHFEPC2.js} +1 -1
- package/dist/cdn/EJZ4LX4Z.js +2 -0
- package/dist/cdn/{MFLYO7PJ.js → FF2IT35O.js} +1 -1
- package/dist/cdn/{IO6RGF5S.js → FTT33ZZJ.js} +1 -1
- package/dist/cdn/{4BPXIHDF.js → HA35MMMF.js} +1 -1
- package/dist/cdn/{XQFUL7N2.js → HOOOFVRH.js} +1 -1
- package/dist/cdn/{OR6T5SB3.js → HXFKOELM.js} +1 -1
- package/dist/cdn/{K2XSYDAP.js → I57CRKF7.js} +1 -1
- package/dist/cdn/JOQEFKCE.js +2 -0
- package/dist/cdn/JRRPPRMV.js +2 -0
- package/dist/cdn/{VKMH5MIX.js → K5Q4ZROX.js} +1 -1
- package/dist/cdn/{ZC5KXI4B.js → KGTBXDD2.js} +1 -1
- package/dist/cdn/{L4Y2HIOC.js → LFRULIBL.js} +1 -1
- package/dist/cdn/{TT6IOLZG.js → LMFWH7YP.js} +1 -1
- package/dist/cdn/{OFWQLRQE.js → LVUKORME.js} +1 -1
- package/dist/cdn/{HNJ4WG6S.js → MSP6STQ7.js} +1 -1
- package/dist/cdn/{ZKY5WVYH.js → NBEOY6GP.js} +1 -1
- package/dist/cdn/{I27LRUII.js → NOI7ZXEF.js} +1 -1
- package/dist/cdn/{XSEZCHSU.js → O3YZLC7G.js} +1 -1
- package/dist/cdn/OQ3OHDEB.js +2 -0
- package/dist/cdn/{Z26C36RJ.js → P3GNUA6J.js} +1 -1
- package/dist/cdn/P7ZCCDSD.js +2 -0
- package/dist/cdn/{XKNKWC5Z.js → Q3VELMMC.js} +1 -1
- package/dist/cdn/{ATQT25TR.js → QKGHH3FS.js} +1 -1
- package/dist/cdn/{W2UVKYOW.js → QPPMRBBW.js} +1 -1
- package/dist/cdn/R5DXQCCJ.js +2 -0
- package/dist/cdn/{O24CJZKB.js → R7XRTDY6.js} +1 -1
- package/dist/cdn/RA75BDVB.js +2 -0
- package/dist/cdn/{BKKSIY4O.js → REWOUYVV.js} +1 -1
- package/dist/cdn/{NBJIISZZ.js → RLI7T32U.js} +1 -1
- package/dist/cdn/{6K4H4EN2.js → SQCDEL42.js} +1 -1
- package/dist/cdn/T333LJ4L.js +2 -0
- package/dist/cdn/{3S6ORDJI.js → T7NY3ZIG.js} +1 -1
- package/dist/cdn/{44QEELTO.js → TKTMO2NO.js} +1 -1
- package/dist/cdn/{7BHYNG4B.js → TNRHHR67.js} +1 -1
- package/dist/cdn/{5WGAYGZM.js → TVFDFN6V.js} +1 -1
- package/dist/cdn/{I6IRHXWR.js → ULTSLT4L.js} +1 -1
- package/dist/cdn/VLUI423B.js +2 -0
- package/dist/cdn/{6NENX7Z3.js → VRGGPMVR.js} +1 -1
- package/dist/cdn/{IN4JPZTY.js → VXDDXPD7.js} +1 -1
- package/dist/cdn/{KAPXKRSU.js → WFU6WGTW.js} +1 -1
- package/dist/cdn/{TIHS6NZD.js → WH54CSSU.js} +1 -1
- package/dist/cdn/YO3CD3O5.js +2 -0
- package/dist/cdn/{MTY3QVCM.js → YRLNSQ23.js} +1 -1
- package/dist/cdn/{YZTBAUIO.js → YTVLEHJT.js} +1 -1
- package/dist/cdn/{BTWTESBF.js → Z44I2CVX.js} +1 -1
- package/dist/cdn/ZACZJ2SR.js +2 -0
- package/dist/cdn/{M5PPX4ZX.js → ZJCG6JI7.js} +1 -1
- package/dist/cdn/ZMVW64CR.js +2 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/loadClassificationData.js +10 -11
- package/dist/components/arcgis-portal-navigation/index.js +5 -5
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +150 -16
- package/dist/utils/generateEmbeddings.d.ts +7 -0
- package/dist/utils/semanticSearch.d.ts +60 -0
- package/package.json +7 -7
- package/dist/cdn/23CP74IB.js +0 -2
- package/dist/cdn/5DVLAKTA.js +0 -2
- package/dist/cdn/6ZKYBUII.js +0 -2
- package/dist/cdn/7XBAKSHJ.js +0 -2
- package/dist/cdn/AC63PIGJ.js +0 -2
- package/dist/cdn/AICPYLWE.js +0 -4
- package/dist/cdn/BQFVNCSA.js +0 -2
- package/dist/cdn/DG6ZTIXN.js +0 -2
- package/dist/cdn/DWGYWUVJ.js +0 -2
- package/dist/cdn/E5VN6XPP.js +0 -2
- package/dist/cdn/FNWM2SRX.js +0 -2
- package/dist/cdn/I6WGLIEC.js +0 -2
- package/dist/cdn/IM7DWCQW.js +0 -2
- package/dist/cdn/ISHV5HNX.js +0 -2
- package/dist/cdn/JQWP52DP.js +0 -2
- package/dist/cdn/OVQQO7DF.js +0 -2
- package/dist/cdn/Q2CR4M4G.js +0 -2
- package/dist/cdn/QXBFIAOL.js +0 -2
- package/dist/cdn/RQTLNBI2.js +0 -2
- package/dist/cdn/RW2EKBM4.js +0 -2
- package/dist/cdn/XRMYRNQY.js +0 -2
- package/dist/cdn/YEQE6MNG.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import a from"./C5IKEISI.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import{a as q}from"./FJ3I3AJE.js";import"./I6WGLIEC.js";import"./K2XSYDAP.js";import{L as f,R as _,h as b,j as u,w as c}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([D,S,g,{b:h}])=>{var v=b`:host{background-color:var(--calcite-color-foreground-1)}.scrim-container{position:relative}.base-fields-control{margin-inline-end:.75rem}.added{display:inline-flex;gap:.5rem;flex-shrink:0;white-space:nowrap}.added calcite-icon{color:var(--calcite-color-status-success)}.add-fields-button{margin:.75rem 0}calcite-block{border-bottom:0}calcite-list-item:last-child:after{display:block;margin-inline-start:var(--calcite-spacing-md);border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3));content:""}`;async function I({item:t,layers:e}){let{url:a}=t,l=new Map;if(!a)return{result:l};try{let s=(await g(a,{cacheBust:!0,query:{f:"json"},responseType:"json"})).data;if(s.fields){let n=e?.[0];return e?.length===1&&n?.layerId!=null&&l.set(n.layerId,s.fields),{result:l}}if(!s.layers?.length)return{result:l};let i=a.replace(/\/$/u,"");return await Promise.all(s.layers.map(async({id:n})=>{let d=(await g(`${i}/${n}`,{cacheBust:!0,query:{f:"json"},responseType:"json"})).data;l.set(n,d.fields??[])})),{result:l}}catch(s){return console.error("Error getting layer fields:",s),{error:{code:"unhandledError"}}}}var P=t=>{let{url:e}=t;return e?e.replace("/rest/services","/rest/admin/services").replace(/\/$/u,""):null};async function C({fields:t,item:e,portal:a,layerId:l}){let s=P(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await h({url:`${s}/${l!=null?`${l}/`:""}addToDefinition`,portal:a,method:"post",params:{addToDefinition:JSON.stringify({fields:t})}});return i.success===!1||i.error?{error:{code:"unhandledError",message:i.error?.message}}:{result:i}}catch(i){return console.error("Error adding fields to the feature service definition:",i),{error:{code:"unhandledError"}}}}async function L({fields:t,item:e,portal:a,layerId:l}){let s=P(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await h({url:`${s}/${l!=null?`${l}/`:""}updateDefinition`,portal:a,method:"post",params:{updateDefinition:JSON.stringify({fields:t})}});return i.success===!1||i.error?{error:{code:"unhandledError",message:i.error?.message??"Failed to update the feature service definition."}}:{result:i}}catch(i){return console.error("Error updating the feature service definition:",i),{error:{code:"unhandledError"}}}}async function z(t){let{url:e}=t;if(!e)return{error:{code:"unhandledError"}};try{return{result:(await g(e,{query:{f:"json"}})).data}}catch(a){return console.error("Error getting service info:",a),{error:{code:"unhandledError"}}}}var A=(t,e)=>{let a=t.domain??null,l=e.domain??null;return a===null||l===null?a===l:a.type!==l.type?!1:a.type==="codedValue"&&l.type==="codedValue"?a.name===l.name&&a.codedValues.length===l.codedValues.length&&a.codedValues.every(({code:s,name:i},n)=>s===l.codedValues[n]?.code&&i===l.codedValues[n]?.name):a.type==="range"&&l.type==="range"?a.name===l.name&&a.range[0]===l.range[0]&&a.range[1]===l.range[1]:!0},w=(t,e)=>{let a=new Map(e.map(i=>[i.name,i])),l=[],s=[];for(let i of t){let n=a.get(i.name);n?A(i,n)||s.push({name:i.name,domain:i.domain}):l.push(i)}return{missingFields:l,modifiedFields:s}},F=t=>{switch(t){case"esriGeometryPolyline":case"esriGeometryPolygon":return[...E];case"esriGeometryPoint":return[...R];default:return[]}},x=t=>t==="esriGeometryPoint"?[...M]:[],G=t=>t==="esriGeometryPoint"?[...N]:[],E=[{name:"esrignss_avg_h_rms",type:"esriFieldTypeDouble",alias:"Average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_v_rms",type:"esriFieldTypeDouble",alias:"Average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_h_rms",type:"esriFieldTypeDouble",alias:"Worst horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_v_rms",type:"esriFieldTypeDouble",alias:"Worst vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_fixtype",type:"esriFieldTypeSmallInteger",alias:"Worst fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"NoFix",code:0},{name:"GPS",code:1},{name:"DifferentialGPS",code:2},{name:"PrecisePositioningService",code:3},{name:"RTKFixed",code:4},{name:"RTKFloat",code:5}]},defaultValue:null},{name:"esrignss_manual_locations",type:"esriFieldTypeInteger",alias:"Number of manual locations",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}],R=[{name:"esrignss_speed",type:"esriFieldTypeDouble",alias:"Speed (km/h)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_direction",type:"esriFieldTypeDouble",alias:"Direction of travel (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_azimuth",type:"esriFieldTypeDouble",alias:"Compass reading (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_positionsourcetype",type:"esriFieldTypeInteger",alias:"Position source type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_POSITIONSOURCETYPE_DOMAIN",codedValues:[{name:"Unknown",code:0},{name:"User defined",code:1},{name:"Integrated (System) Location Provider",code:2},{name:"External GNSS Receiver",code:3},{name:"Network Location Provider",code:4},{name:"Snapped",code:5}]},defaultValue:null},{name:"esrignss_receiver",type:"esriFieldTypeString",alias:"Receiver name",sqlType:"sqlTypeOther",length:50,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_rms",type:"esriFieldTypeDouble",alias:"Horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_v_rms",type:"esriFieldTypeDouble",alias:"Vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_latitude",type:"esriFieldTypeDouble",alias:"Latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_longitude",type:"esriFieldTypeDouble",alias:"Longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_altitude",type:"esriFieldTypeDouble",alias:"Ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_pdop",type:"esriFieldTypeDouble",alias:"PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_hdop",type:"esriFieldTypeDouble",alias:"HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_vdop",type:"esriFieldTypeDouble",alias:"VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_fixtype",type:"esriFieldTypeSmallInteger",alias:"Fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"NoFix",code:0},{name:"GPS",code:1},{name:"DifferentialGPS",code:2},{name:"PrecisePositioningService",code:3},{name:"RTKFixed",code:4},{name:"RTKFloat",code:5}]},defaultValue:null},{name:"esrignss_correctionage",type:"esriFieldTypeDouble",alias:"Correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_stationid",type:"esriFieldTypeSmallInteger",alias:"Station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_numsats",type:"esriFieldTypeSmallInteger",alias:"Number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"range",name:"ESRI_NUM_SATS_DOMAIN",range:[0,99]},defaultValue:null},{name:"esrignss_fixdatetime",type:"esriFieldTypeDate",alias:"Fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_h_rms",type:"esriFieldTypeDouble",alias:"Average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_v_rms",type:"esriFieldTypeDouble",alias:"Average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_positions",type:"esriFieldTypeInteger",alias:"Averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_stddev",type:"esriFieldTypeDouble",alias:"Standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_correction_source_name",type:"esriFieldTypeString",alias:"Correction source name",sqlType:"sqlTypeOther",length:100,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_correction_source_type",type:"esriFieldTypeString",alias:"Correction source type",sqlType:"sqlTypeOther",length:25,nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_correction_source_domain",codedValues:[{name:"Unknown",code:"Unknown"},{name:"Direct IP",code:"Direct IP"},{name:"NTRIP",code:"NTRIP"},{name:"PPP",code:"PPP"},{name:"Radio",code:"Radio"},{name:"SBAS",code:"SBAS"}]},defaultValue:null},{name:"esrignss_custom_attributes",type:"esriFieldTypeString",alias:"GNSS custom attributes",sqlType:"sqlTypeOther",length:2e3,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_95_status",type:"esriFieldTypeSmallInteger",alias:"95% accuracy applied",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null},{name:"esrignss_ntrip_mount_point",type:"esriFieldTypeString",alias:"NTRIP mount point",sqlType:"sqlTypeOther",length:100,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_antenna_height",type:"esriFieldTypeDouble",alias:"GNSS antenna height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_orthometric_height",type:"esriFieldTypeDouble",alias:"Orthometric height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_profile_has_hor_xform",type:"esriFieldTypeSmallInteger",alias:"Location profile horizontal datum transformation applied",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null},{name:"esrignss_profile_hor_xform",type:"esriFieldTypeString",alias:"Location profile horizontal datum transformation",sqlType:"sqlTypeOther",length:255,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_gcs",type:"esriFieldTypeString",alias:"Geographic coordinate system",sqlType:"sqlTypeOther",length:60,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_gcs_wkid",type:"esriFieldTypeInteger",alias:"Geographic coordinate system WKID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_geoid",type:"esriFieldTypeString",alias:"Receiver geoid model",sqlType:"sqlTypeOther",length:60,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_ref_epoch",type:"esriFieldTypeDouble",alias:"Reference epoch",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}],M=[{name:"esrisnsr_tilt_azimuth_accuracy",type:"esriFieldTypeDouble",alias:"Tilt azimuth accuracy (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_azimuth",type:"esriFieldTypeDouble",alias:"Tilt azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_angle_accuracy",type:"esriFieldTypeDouble",alias:"Tilt angle accuracy (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_angle",type:"esriFieldTypeDouble",alias:"Tilt angle (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_tilt_compensated",type:"esriFieldTypeSmallInteger",alias:"Tilt compensated",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null}],N=[{name:"esrignss_cp1_latitude",type:"esriFieldTypeDouble",alias:"CP1 latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_longitude",type:"esriFieldTypeDouble",alias:"CP1 longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_altitude",type:"esriFieldTypeDouble",alias:"CP1 ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_h_rms",type:"esriFieldTypeDouble",alias:"CP1 horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_v_rms",type:"esriFieldTypeDouble",alias:"CP1 vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_fixdatetime",type:"esriFieldTypeDate",alias:"CP1 fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_fixtype",type:"esriFieldTypeSmallInteger",alias:"CP1 fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"Fix not valid",code:0},{name:"GPS",code:1},{name:"Differential GPS",code:2},{name:"RTK Fixed",code:4},{name:"RTK Float",code:5}]},defaultValue:null},{name:"esrignss_cp1_corr_age",type:"esriFieldTypeDouble",alias:"CP1 correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_stationid",type:"esriFieldTypeSmallInteger",alias:"CP1 station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_numsats",type:"esriFieldTypeSmallInteger",alias:"CP1 number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_pdop",type:"esriFieldTypeDouble",alias:"CP1 PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_hdop",type:"esriFieldTypeDouble",alias:"CP1 HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_vdop",type:"esriFieldTypeDouble",alias:"CP1 VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_h_rms",type:"esriFieldTypeDouble",alias:"CP1 average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_v_rms",type:"esriFieldTypeDouble",alias:"CP1 average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_positions",type:"esriFieldTypeInteger",alias:"CP1 averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_h_stddev",type:"esriFieldTypeDouble",alias:"CP1 standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_slope_dist",type:"esriFieldTypeDouble",alias:"CP1 laser slope distance (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_inclination",type:"esriFieldTypeDouble",alias:"CP1 laser inclination (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_azimuth",type:"esriFieldTypeDouble",alias:"CP1 laser azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_latitude",type:"esriFieldTypeDouble",alias:"CP2 latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_longitude",type:"esriFieldTypeDouble",alias:"CP2 longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_altitude",type:"esriFieldTypeDouble",alias:"CP2 ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_h_rms",type:"esriFieldTypeDouble",alias:"CP2 horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_v_rms",type:"esriFieldTypeDouble",alias:"CP2 vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_fixdatetime",type:"esriFieldTypeDate",alias:"CP2 fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_fixtype",type:"esriFieldTypeSmallInteger",alias:"CP2 fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"Fix not valid",code:0},{name:"GPS",code:1},{name:"Differential GPS",code:2},{name:"RTK Fixed",code:4},{name:"RTK Float",code:5}]},defaultValue:null},{name:"esrignss_cp2_corr_age",type:"esriFieldTypeDouble",alias:"CP2 correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_stationid",type:"esriFieldTypeSmallInteger",alias:"CP2 station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_numsats",type:"esriFieldTypeSmallInteger",alias:"CP2 number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_pdop",type:"esriFieldTypeDouble",alias:"CP2 PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_hdop",type:"esriFieldTypeDouble",alias:"CP2 HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_vdop",type:"esriFieldTypeDouble",alias:"CP2 VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_h_rms",type:"esriFieldTypeDouble",alias:"CP2 average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_v_rms",type:"esriFieldTypeDouble",alias:"CP2 average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_positions",type:"esriFieldTypeInteger",alias:"CP2 averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_h_stddev",type:"esriFieldTypeDouble",alias:"CP2 standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_slope_dist",type:"esriFieldTypeDouble",alias:"CP2 laser slope distance (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_inclination",type:"esriFieldTypeDouble",alias:"CP2 laser inclination (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_azimuth",type:"esriFieldTypeDouble",alias:"CP2 laser azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_method",type:"esriFieldTypeString",alias:"Offset method",sqlType:"sqlTypeOther",length:5e3,nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_OFFSET_METHOD_DOMAIN",codedValues:[{name:"Azimuth-Azimuth",code:"azimuth-azimuth"},{name:"Distance-Angle",code:"distance-angle"},{name:"Distance-Azimuth",code:"distance-azimuth"},{name:"Distance-Distance",code:"distance-distance"},{name:"Azimuth-Azimuth-Backsight",code:"azimuth-azimuth-backsight"},{name:"Distance-Azimuth-Backsight",code:"distance-azimuth-backsight"},{name:"Distance-Distance-Backsight",code:"distance-distance-backsight"},{name:"User-defined",code:"user-defined"}]},defaultValue:null},{name:"esrisnsr_offset_device",type:"esriFieldTypeString",alias:"Rangefinder name",sqlType:"sqlTypeOther",length:5e3,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_laser_height",type:"esriFieldTypeDouble",alias:"Rangefinder height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_laser_target_ht",type:"esriFieldTypeDouble",alias:"Laser target height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_mag_var",type:"esriFieldTypeDouble",alias:"Rangefinder magnetic variation (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}];function $(t){if(t.geometryType==="polyline"||t.geometryType==="polygon"){let e=t.capabilities;return e?.data?.supportsAttachment&&e?.operations?.supportsQueryAttachments}return!0}var k=t=>t.every($),B=["point","polyline","polygon"],O=t=>t?.type==="Feature Service",T=class extends f{constructor(){super(...arguments),this.messages=q({blocking:!0}),this.initCount=0,this.supportsAttachments=!1,this.layersLoaded=!1,this.pointLayers=[],this.lineOrPolygonLayers=[],this.loadedItem=null,this.gpsFieldFixesBySet=null,this.addFieldsDisabled=!0,this.initializing=!0,this.hasLineOrPolygonLayer=!1,this.hasPointFeatureLayer=!1,this.addingGPSFieldMetadata=[],this.item=null,this.itemId=null,this.messageOverrides={},this.arcgisGPSMetadataFieldsAdded=c(),this.arcgisReadOnlyMode=c()}static{this.properties={loadedItem:16,gpsFieldFixesBySet:16,addFieldsDisabled:16,initializing:16,hasLineOrPolygonLayer:16,hasPointFeatureLayer:16,addingGPSFieldMetadata:16,item:0,itemId:1,portal:0,messageOverrides:0}}static{this.styles=v}willUpdate(e){(e.has("item")||e.has("itemId"))&&this.initItem()}async initItem({showLoading:e=!0}={}){let a=++this.initCount;if(!this.item&&!this.itemId){this.resetItemState(),this.initializing=!1;return}e&&(this.resetItemState(),this.initializing=!0);let{item:l,itemId:s,portal:i}=this,n=l?await l.load():await new S({id:s,portal:i}).load();if(!this.isCurrentInitialization(a))return;if(!O(n)){this.resetItemState(),this.initializing=!1;return}this.loadedItem=n;let d=!e&&this.layersLoaded?[...this.pointLayers,...this.lineOrPolygonLayers]:await this.getFeatureLayers(n),{result:p}=await z(n);if(!this.isCurrentInitialization(a))return;this.layersLoaded=!0,this.pointLayers=d.filter(o=>o.geometryType==="point"),this.lineOrPolygonLayers=d.filter(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasLineOrPolygonLayer=d.some(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasPointFeatureLayer=d.some(o=>o.geometryType==="point");let{result:r,error:y}=d.length>0?await I({item:n,layers:d}):{};if(!this.isCurrentInitialization(a))return;if(y){this.resetItemState(),this.initializing=!1;return}let m=r??new Map;this.gpsFieldFixesBySet={base:this.analyzeFieldSet([...this.pointLayers,...this.lineOrPolygonLayers],m,"base"),gnss:this.analyzeFieldSet(this.pointLayers,m,"gnss"),rangefinder:this.analyzeFieldSet(this.pointLayers,m,"rangefinder")},this.supportsAttachments=k(d);let V=p?.sourceSchemaChangesAllowed!==!1;this.addFieldsDisabled=!this.supportsAttachments||!V,this.initializing=!1}isCurrentInitialization(e){return e===this.initCount}resetItemState(){this.loadedItem=null,this.layersLoaded=!1,this.pointLayers=[],this.lineOrPolygonLayers=[],this.gpsFieldFixesBySet=null,this.addFieldsDisabled=!0,this.hasLineOrPolygonLayer=!1,this.hasPointFeatureLayer=!1}async getFeatureLayers(e){let a=await D.fromPortalItem({portalItem:e});return await a.load(),"layers"in a?(await Promise.all(a.layers.map(async l=>(await l.load(),this.isSupportedFeatureLayer(l)?l:null)))).filter(l=>!!l):this.isSupportedFeatureLayer(a)?[a]:[]}isSupportedFeatureLayer(e){return e.type==="feature"&&B.some(a=>a===e.geometryType)}getCompatibleEsriGeometryType(e){switch(e.geometryType){case"point":return"esriGeometryPoint";case"polyline":return"esriGeometryPolyline";case"polygon":return"esriGeometryPolygon";default:return null}}analyzeFieldSet(e,a,l){let s=[];for(let i of e){if(i.layerId==null)continue;let n=a.get(i.layerId)??[],d=this.getCompatibleEsriGeometryType(i),p=d?l==="base"?F(d):l==="gnss"?x(d):G(d):[],r=w(p,n);(r.missingFields.length>0||r.modifiedFields.length>0)&&s.push({layerId:i.layerId,fieldsToAdd:r.missingFields,domainsToUpdate:r.modifiedFields})}return s}hasFieldChanges(e){return(this.gpsFieldFixesBySet?.[e].length??0)>0}isLoading(e){return this.addingGPSFieldMetadata.includes(e)}async addFields(e){let a=this.portal??this.loadedItem?.portal,l=this.loadedItem,s=this.gpsFieldFixesBySet;if(!(!a||!l||!s)){if(a.isReadOnly){this.arcgisReadOnlyMode.emit();return}this.addingGPSFieldMetadata=[...this.addingGPSFieldMetadata,e];try{let i=s[e],n=(await Promise.all(i.filter(({fieldsToAdd:r})=>r.length>0).map(async({fieldsToAdd:r,layerId:y})=>await C({fields:r,item:l,layerId:y,portal:a})))).every(({error:r})=>!r),d=n?await Promise.all(i.filter(({domainsToUpdate:r})=>r.length>0).map(async({domainsToUpdate:r,layerId:y})=>await L({fields:r,item:l,layerId:y,portal:a}))):[],p=n&&d.every(({error:r})=>!r);await this.initItem({showLoading:!1}),n&&p&&this.gpsFieldFixesBySet&&!this.hasFieldChanges(e)&&this.arcgisGPSMetadataFieldsAdded.emit(e)}finally{this.addingGPSFieldMetadata=this.addingGPSFieldMetadata.filter(i=>i!==e)}}}canShowAddGPSMetadata(){let e=this.loadedItem??this.item;return!!e&&O(e)}showAdvancedFields(){let e=this.gpsFieldFixesBySet;return!this.hasPointFeatureLayer||!e?!1:this.pointLayers.some(a=>{if(a.layerId==null)return!1;let l=this.getCompatibleEsriGeometryType(a),s=l?F(l):[];return(e.base.find(({layerId:i})=>i===a.layerId)?.fieldsToAdd??[]).length<s.length})}renderAddFieldsControl(e,a=!1){let l=this.gpsFieldFixesBySet;if(!a&&l&&!this.hasFieldChanges(e))return u`<span slot=actions-end class="added"><calcite-icon icon=check-circle scale=s aria-hidden></calcite-icon>${this.messages.added}</span>`;let s=this.isLoading(e);return u`<calcite-button slot=actions-end class="add-fields-button" appearance=outline-fill .disabled=${a||!l||s||this.addFieldsDisabled} .loading=${s} @click=${async()=>await this.addFields(e)}>${s?this.messages.addingFields:this.messages.addFields}</calcite-button>`}render(){return this.canShowAddGPSMetadata()?u`<div class="scrim-container"><calcite-block scale=m expanded>${this.initializing&&u`<calcite-scrim loading></calcite-scrim>`||""}<calcite-list .label=${this.messages.gpsOptions} selection-mode=none><calcite-list-item .label=${this.messages.accordionHeading}>${this.renderAddFieldsControl("base")}</calcite-list-item>${this.showAdvancedFields()&&u`<calcite-list-item .label=${this.messages.gnssReceiverFields}>${this.renderAddFieldsControl("gnss")}</calcite-list-item><calcite-list-item .label=${this.messages.laserRangefinderFields}>${this.renderAddFieldsControl("rangefinder")}</calcite-list-item>`||""}</calcite-list></calcite-block></div>`:null}};_("arcgis-portal-add-gps-metadata",T);return T},"layers/Layer","portal/PortalItem","request",a)
|
|
2
|
+
import a from"./C5IKEISI.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import{a as q}from"./AYHYABMC.js";import"./OQ3OHDEB.js";import"./I57CRKF7.js";import{K as f,Q as _,h as b,j as u,v as c}from"./3ZC26CT6.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([D,S,g,{b:h}])=>{var v=b`:host{background-color:var(--calcite-color-foreground-1)}.scrim-container{position:relative}.base-fields-control{margin-inline-end:.75rem}.added{display:inline-flex;gap:.5rem;flex-shrink:0;white-space:nowrap}.added calcite-icon{color:var(--calcite-color-status-success)}.add-fields-button{margin:.75rem 0}calcite-block{border-bottom:0}calcite-list-item:last-child:after{display:block;margin-inline-start:var(--calcite-spacing-md);border-block-end:1px solid var(--calcite-list-border-color, var(--calcite-color-border-3));content:""}`;async function I({item:t,layers:e}){let{url:a}=t,l=new Map;if(!a)return{result:l};try{let s=(await g(a,{cacheBust:!0,query:{f:"json"},responseType:"json"})).data;if(s.fields){let n=e?.[0];return e?.length===1&&n?.layerId!=null&&l.set(n.layerId,s.fields),{result:l}}if(!s.layers?.length)return{result:l};let i=a.replace(/\/$/u,"");return await Promise.all(s.layers.map(async({id:n})=>{let d=(await g(`${i}/${n}`,{cacheBust:!0,query:{f:"json"},responseType:"json"})).data;l.set(n,d.fields??[])})),{result:l}}catch(s){return console.error("Error getting layer fields:",s),{error:{code:"unhandledError"}}}}var P=t=>{let{url:e}=t;return e?e.replace("/rest/services","/rest/admin/services").replace(/\/$/u,""):null};async function C({fields:t,item:e,portal:a,layerId:l}){let s=P(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await h({url:`${s}/${l!=null?`${l}/`:""}addToDefinition`,portal:a,method:"post",params:{addToDefinition:JSON.stringify({fields:t})}});return i.success===!1||i.error?{error:{code:"unhandledError",message:i.error?.message}}:{result:i}}catch(i){return console.error("Error adding fields to the feature service definition:",i),{error:{code:"unhandledError"}}}}async function L({fields:t,item:e,portal:a,layerId:l}){let s=P(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await h({url:`${s}/${l!=null?`${l}/`:""}updateDefinition`,portal:a,method:"post",params:{updateDefinition:JSON.stringify({fields:t})}});return i.success===!1||i.error?{error:{code:"unhandledError",message:i.error?.message??"Failed to update the feature service definition."}}:{result:i}}catch(i){return console.error("Error updating the feature service definition:",i),{error:{code:"unhandledError"}}}}async function z(t){let{url:e}=t;if(!e)return{error:{code:"unhandledError"}};try{return{result:(await g(e,{query:{f:"json"}})).data}}catch(a){return console.error("Error getting service info:",a),{error:{code:"unhandledError"}}}}var A=(t,e)=>{let a=t.domain??null,l=e.domain??null;return a===null||l===null?a===l:a.type!==l.type?!1:a.type==="codedValue"&&l.type==="codedValue"?a.name===l.name&&a.codedValues.length===l.codedValues.length&&a.codedValues.every(({code:s,name:i},n)=>s===l.codedValues[n]?.code&&i===l.codedValues[n]?.name):a.type==="range"&&l.type==="range"?a.name===l.name&&a.range[0]===l.range[0]&&a.range[1]===l.range[1]:!0},w=(t,e)=>{let a=new Map(e.map(i=>[i.name,i])),l=[],s=[];for(let i of t){let n=a.get(i.name);n?A(i,n)||s.push({name:i.name,domain:i.domain}):l.push(i)}return{missingFields:l,modifiedFields:s}},F=t=>{switch(t){case"esriGeometryPolyline":case"esriGeometryPolygon":return[...E];case"esriGeometryPoint":return[...R];default:return[]}},x=t=>t==="esriGeometryPoint"?[...M]:[],G=t=>t==="esriGeometryPoint"?[...N]:[],E=[{name:"esrignss_avg_h_rms",type:"esriFieldTypeDouble",alias:"Average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_v_rms",type:"esriFieldTypeDouble",alias:"Average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_h_rms",type:"esriFieldTypeDouble",alias:"Worst horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_v_rms",type:"esriFieldTypeDouble",alias:"Worst vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_worst_fixtype",type:"esriFieldTypeSmallInteger",alias:"Worst fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"NoFix",code:0},{name:"GPS",code:1},{name:"DifferentialGPS",code:2},{name:"PrecisePositioningService",code:3},{name:"RTKFixed",code:4},{name:"RTKFloat",code:5}]},defaultValue:null},{name:"esrignss_manual_locations",type:"esriFieldTypeInteger",alias:"Number of manual locations",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}],R=[{name:"esrignss_speed",type:"esriFieldTypeDouble",alias:"Speed (km/h)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_direction",type:"esriFieldTypeDouble",alias:"Direction of travel (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_azimuth",type:"esriFieldTypeDouble",alias:"Compass reading (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_positionsourcetype",type:"esriFieldTypeInteger",alias:"Position source type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_POSITIONSOURCETYPE_DOMAIN",codedValues:[{name:"Unknown",code:0},{name:"User defined",code:1},{name:"Integrated (System) Location Provider",code:2},{name:"External GNSS Receiver",code:3},{name:"Network Location Provider",code:4},{name:"Snapped",code:5}]},defaultValue:null},{name:"esrignss_receiver",type:"esriFieldTypeString",alias:"Receiver name",sqlType:"sqlTypeOther",length:50,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_rms",type:"esriFieldTypeDouble",alias:"Horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_v_rms",type:"esriFieldTypeDouble",alias:"Vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_latitude",type:"esriFieldTypeDouble",alias:"Latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_longitude",type:"esriFieldTypeDouble",alias:"Longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_altitude",type:"esriFieldTypeDouble",alias:"Ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_pdop",type:"esriFieldTypeDouble",alias:"PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_hdop",type:"esriFieldTypeDouble",alias:"HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_vdop",type:"esriFieldTypeDouble",alias:"VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_fixtype",type:"esriFieldTypeSmallInteger",alias:"Fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"NoFix",code:0},{name:"GPS",code:1},{name:"DifferentialGPS",code:2},{name:"PrecisePositioningService",code:3},{name:"RTKFixed",code:4},{name:"RTKFloat",code:5}]},defaultValue:null},{name:"esrignss_correctionage",type:"esriFieldTypeDouble",alias:"Correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_stationid",type:"esriFieldTypeSmallInteger",alias:"Station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_numsats",type:"esriFieldTypeSmallInteger",alias:"Number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"range",name:"ESRI_NUM_SATS_DOMAIN",range:[0,99]},defaultValue:null},{name:"esrignss_fixdatetime",type:"esriFieldTypeDate",alias:"Fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_h_rms",type:"esriFieldTypeDouble",alias:"Average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_v_rms",type:"esriFieldTypeDouble",alias:"Average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_avg_positions",type:"esriFieldTypeInteger",alias:"Averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_stddev",type:"esriFieldTypeDouble",alias:"Standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_correction_source_name",type:"esriFieldTypeString",alias:"Correction source name",sqlType:"sqlTypeOther",length:100,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_correction_source_type",type:"esriFieldTypeString",alias:"Correction source type",sqlType:"sqlTypeOther",length:25,nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_correction_source_domain",codedValues:[{name:"Unknown",code:"Unknown"},{name:"Direct IP",code:"Direct IP"},{name:"NTRIP",code:"NTRIP"},{name:"PPP",code:"PPP"},{name:"Radio",code:"Radio"},{name:"SBAS",code:"SBAS"}]},defaultValue:null},{name:"esrignss_custom_attributes",type:"esriFieldTypeString",alias:"GNSS custom attributes",sqlType:"sqlTypeOther",length:2e3,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_h_95_status",type:"esriFieldTypeSmallInteger",alias:"95% accuracy applied",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null},{name:"esrignss_ntrip_mount_point",type:"esriFieldTypeString",alias:"NTRIP mount point",sqlType:"sqlTypeOther",length:100,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_antenna_height",type:"esriFieldTypeDouble",alias:"GNSS antenna height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_orthometric_height",type:"esriFieldTypeDouble",alias:"Orthometric height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_profile_has_hor_xform",type:"esriFieldTypeSmallInteger",alias:"Location profile horizontal datum transformation applied",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null},{name:"esrignss_profile_hor_xform",type:"esriFieldTypeString",alias:"Location profile horizontal datum transformation",sqlType:"sqlTypeOther",length:255,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_gcs",type:"esriFieldTypeString",alias:"Geographic coordinate system",sqlType:"sqlTypeOther",length:60,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_gcs_wkid",type:"esriFieldTypeInteger",alias:"Geographic coordinate system WKID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_geoid",type:"esriFieldTypeString",alias:"Receiver geoid model",sqlType:"sqlTypeOther",length:60,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_receiver_ref_epoch",type:"esriFieldTypeDouble",alias:"Reference epoch",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}],M=[{name:"esrisnsr_tilt_azimuth_accuracy",type:"esriFieldTypeDouble",alias:"Tilt azimuth accuracy (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_azimuth",type:"esriFieldTypeDouble",alias:"Tilt azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_angle_accuracy",type:"esriFieldTypeDouble",alias:"Tilt angle accuracy (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_tilt_angle",type:"esriFieldTypeDouble",alias:"Tilt angle (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_tilt_compensated",type:"esriFieldTypeSmallInteger",alias:"Tilt compensated",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"esrignss_yesno_domain",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]},defaultValue:null}],N=[{name:"esrignss_cp1_latitude",type:"esriFieldTypeDouble",alias:"CP1 latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_longitude",type:"esriFieldTypeDouble",alias:"CP1 longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_altitude",type:"esriFieldTypeDouble",alias:"CP1 ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_h_rms",type:"esriFieldTypeDouble",alias:"CP1 horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_v_rms",type:"esriFieldTypeDouble",alias:"CP1 vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_fixdatetime",type:"esriFieldTypeDate",alias:"CP1 fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_fixtype",type:"esriFieldTypeSmallInteger",alias:"CP1 fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"Fix not valid",code:0},{name:"GPS",code:1},{name:"Differential GPS",code:2},{name:"RTK Fixed",code:4},{name:"RTK Float",code:5}]},defaultValue:null},{name:"esrignss_cp1_corr_age",type:"esriFieldTypeDouble",alias:"CP1 correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_stationid",type:"esriFieldTypeSmallInteger",alias:"CP1 station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_numsats",type:"esriFieldTypeSmallInteger",alias:"CP1 number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_pdop",type:"esriFieldTypeDouble",alias:"CP1 PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_hdop",type:"esriFieldTypeDouble",alias:"CP1 HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_vdop",type:"esriFieldTypeDouble",alias:"CP1 VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_h_rms",type:"esriFieldTypeDouble",alias:"CP1 average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_v_rms",type:"esriFieldTypeDouble",alias:"CP1 average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_avg_positions",type:"esriFieldTypeInteger",alias:"CP1 averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp1_h_stddev",type:"esriFieldTypeDouble",alias:"CP1 standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_slope_dist",type:"esriFieldTypeDouble",alias:"CP1 laser slope distance (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_inclination",type:"esriFieldTypeDouble",alias:"CP1 laser inclination (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp1_azimuth",type:"esriFieldTypeDouble",alias:"CP1 laser azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_latitude",type:"esriFieldTypeDouble",alias:"CP2 latitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_longitude",type:"esriFieldTypeDouble",alias:"CP2 longitude",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_altitude",type:"esriFieldTypeDouble",alias:"CP2 ellipsoidal height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_h_rms",type:"esriFieldTypeDouble",alias:"CP2 horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_v_rms",type:"esriFieldTypeDouble",alias:"CP2 vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_fixdatetime",type:"esriFieldTypeDate",alias:"CP2 fix time",sqlType:"sqlTypeOther",length:8,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_fixtype",type:"esriFieldTypeSmallInteger",alias:"CP2 fix type",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_FIX_TYPE_DOMAIN",codedValues:[{name:"Fix not valid",code:0},{name:"GPS",code:1},{name:"Differential GPS",code:2},{name:"RTK Fixed",code:4},{name:"RTK Float",code:5}]},defaultValue:null},{name:"esrignss_cp2_corr_age",type:"esriFieldTypeDouble",alias:"CP2 correction age",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_stationid",type:"esriFieldTypeSmallInteger",alias:"CP2 station ID",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_numsats",type:"esriFieldTypeSmallInteger",alias:"CP2 number of satellites",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_pdop",type:"esriFieldTypeDouble",alias:"CP2 PDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_hdop",type:"esriFieldTypeDouble",alias:"CP2 HDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_vdop",type:"esriFieldTypeDouble",alias:"CP2 VDOP",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_h_rms",type:"esriFieldTypeDouble",alias:"CP2 average horizontal accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_v_rms",type:"esriFieldTypeDouble",alias:"CP2 average vertical accuracy (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_avg_positions",type:"esriFieldTypeInteger",alias:"CP2 averaged positions",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrignss_cp2_h_stddev",type:"esriFieldTypeDouble",alias:"CP2 standard deviation (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_slope_dist",type:"esriFieldTypeDouble",alias:"CP2 laser slope distance (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_inclination",type:"esriFieldTypeDouble",alias:"CP2 laser inclination (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_cp2_azimuth",type:"esriFieldTypeDouble",alias:"CP2 laser azimuth (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_method",type:"esriFieldTypeString",alias:"Offset method",sqlType:"sqlTypeOther",length:5e3,nullable:!0,editable:!0,domain:{type:"codedValue",name:"ESRI_OFFSET_METHOD_DOMAIN",codedValues:[{name:"Azimuth-Azimuth",code:"azimuth-azimuth"},{name:"Distance-Angle",code:"distance-angle"},{name:"Distance-Azimuth",code:"distance-azimuth"},{name:"Distance-Distance",code:"distance-distance"},{name:"Azimuth-Azimuth-Backsight",code:"azimuth-azimuth-backsight"},{name:"Distance-Azimuth-Backsight",code:"distance-azimuth-backsight"},{name:"Distance-Distance-Backsight",code:"distance-distance-backsight"},{name:"User-defined",code:"user-defined"}]},defaultValue:null},{name:"esrisnsr_offset_device",type:"esriFieldTypeString",alias:"Rangefinder name",sqlType:"sqlTypeOther",length:5e3,nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_laser_height",type:"esriFieldTypeDouble",alias:"Rangefinder height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_laser_target_ht",type:"esriFieldTypeDouble",alias:"Laser target height (m)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null},{name:"esrisnsr_offset_mag_var",type:"esriFieldTypeDouble",alias:"Rangefinder magnetic variation (\xB0)",sqlType:"sqlTypeOther",nullable:!0,editable:!0,domain:null,defaultValue:null}];function $(t){if(t.geometryType==="polyline"||t.geometryType==="polygon"){let e=t.capabilities;return e?.data?.supportsAttachment&&e?.operations?.supportsQueryAttachments}return!0}var k=t=>t.every($),B=["point","polyline","polygon"],O=t=>t?.type==="Feature Service",T=class extends f{constructor(){super(...arguments),this.messages=q({blocking:!0}),this.initCount=0,this.supportsAttachments=!1,this.layersLoaded=!1,this.pointLayers=[],this.lineOrPolygonLayers=[],this.loadedItem=null,this.gpsFieldFixesBySet=null,this.addFieldsDisabled=!0,this.initializing=!0,this.hasLineOrPolygonLayer=!1,this.hasPointFeatureLayer=!1,this.addingGPSFieldMetadata=[],this.item=null,this.itemId=null,this.messageOverrides={},this.arcgisGPSMetadataFieldsAdded=c(),this.arcgisReadOnlyMode=c()}static{this.properties={loadedItem:16,gpsFieldFixesBySet:16,addFieldsDisabled:16,initializing:16,hasLineOrPolygonLayer:16,hasPointFeatureLayer:16,addingGPSFieldMetadata:16,item:0,itemId:1,portal:0,messageOverrides:0}}static{this.styles=v}willUpdate(e){(e.has("item")||e.has("itemId"))&&this.initItem()}async initItem({showLoading:e=!0}={}){let a=++this.initCount;if(!this.item&&!this.itemId){this.resetItemState(),this.initializing=!1;return}e&&(this.resetItemState(),this.initializing=!0);let{item:l,itemId:s,portal:i}=this,n=l?await l.load():await new S({id:s,portal:i}).load();if(!this.isCurrentInitialization(a))return;if(!O(n)){this.resetItemState(),this.initializing=!1;return}this.loadedItem=n;let d=!e&&this.layersLoaded?[...this.pointLayers,...this.lineOrPolygonLayers]:await this.getFeatureLayers(n),{result:p}=await z(n);if(!this.isCurrentInitialization(a))return;this.layersLoaded=!0,this.pointLayers=d.filter(o=>o.geometryType==="point"),this.lineOrPolygonLayers=d.filter(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasLineOrPolygonLayer=d.some(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasPointFeatureLayer=d.some(o=>o.geometryType==="point");let{result:r,error:y}=d.length>0?await I({item:n,layers:d}):{};if(!this.isCurrentInitialization(a))return;if(y){this.resetItemState(),this.initializing=!1;return}let m=r??new Map;this.gpsFieldFixesBySet={base:this.analyzeFieldSet([...this.pointLayers,...this.lineOrPolygonLayers],m,"base"),gnss:this.analyzeFieldSet(this.pointLayers,m,"gnss"),rangefinder:this.analyzeFieldSet(this.pointLayers,m,"rangefinder")},this.supportsAttachments=k(d);let V=p?.sourceSchemaChangesAllowed!==!1;this.addFieldsDisabled=!this.supportsAttachments||!V,this.initializing=!1}isCurrentInitialization(e){return e===this.initCount}resetItemState(){this.loadedItem=null,this.layersLoaded=!1,this.pointLayers=[],this.lineOrPolygonLayers=[],this.gpsFieldFixesBySet=null,this.addFieldsDisabled=!0,this.hasLineOrPolygonLayer=!1,this.hasPointFeatureLayer=!1}async getFeatureLayers(e){let a=await D.fromPortalItem({portalItem:e});return await a.load(),"layers"in a?(await Promise.all(a.layers.map(async l=>(await l.load(),this.isSupportedFeatureLayer(l)?l:null)))).filter(l=>!!l):this.isSupportedFeatureLayer(a)?[a]:[]}isSupportedFeatureLayer(e){return e.type==="feature"&&B.some(a=>a===e.geometryType)}getCompatibleEsriGeometryType(e){switch(e.geometryType){case"point":return"esriGeometryPoint";case"polyline":return"esriGeometryPolyline";case"polygon":return"esriGeometryPolygon";default:return null}}analyzeFieldSet(e,a,l){let s=[];for(let i of e){if(i.layerId==null)continue;let n=a.get(i.layerId)??[],d=this.getCompatibleEsriGeometryType(i),p=d?l==="base"?F(d):l==="gnss"?x(d):G(d):[],r=w(p,n);(r.missingFields.length>0||r.modifiedFields.length>0)&&s.push({layerId:i.layerId,fieldsToAdd:r.missingFields,domainsToUpdate:r.modifiedFields})}return s}hasFieldChanges(e){return(this.gpsFieldFixesBySet?.[e].length??0)>0}isLoading(e){return this.addingGPSFieldMetadata.includes(e)}async addFields(e){let a=this.portal??this.loadedItem?.portal,l=this.loadedItem,s=this.gpsFieldFixesBySet;if(!(!a||!l||!s)){if(a.isReadOnly){this.arcgisReadOnlyMode.emit();return}this.addingGPSFieldMetadata=[...this.addingGPSFieldMetadata,e];try{let i=s[e],n=(await Promise.all(i.filter(({fieldsToAdd:r})=>r.length>0).map(async({fieldsToAdd:r,layerId:y})=>await C({fields:r,item:l,layerId:y,portal:a})))).every(({error:r})=>!r),d=n?await Promise.all(i.filter(({domainsToUpdate:r})=>r.length>0).map(async({domainsToUpdate:r,layerId:y})=>await L({fields:r,item:l,layerId:y,portal:a}))):[],p=n&&d.every(({error:r})=>!r);await this.initItem({showLoading:!1}),n&&p&&this.gpsFieldFixesBySet&&!this.hasFieldChanges(e)&&this.arcgisGPSMetadataFieldsAdded.emit(e)}finally{this.addingGPSFieldMetadata=this.addingGPSFieldMetadata.filter(i=>i!==e)}}}canShowAddGPSMetadata(){let e=this.loadedItem??this.item;return!!e&&O(e)}showAdvancedFields(){let e=this.gpsFieldFixesBySet;return!this.hasPointFeatureLayer||!e?!1:this.pointLayers.some(a=>{if(a.layerId==null)return!1;let l=this.getCompatibleEsriGeometryType(a),s=l?F(l):[];return(e.base.find(({layerId:i})=>i===a.layerId)?.fieldsToAdd??[]).length<s.length})}renderAddFieldsControl(e,a=!1){let l=this.gpsFieldFixesBySet;if(!a&&l&&!this.hasFieldChanges(e))return u`<span slot=actions-end class="added"><calcite-icon icon=check-circle scale=s aria-hidden></calcite-icon>${this.messages.added}</span>`;let s=this.isLoading(e);return u`<calcite-button slot=actions-end class="add-fields-button" appearance=outline-fill .disabled=${a||!l||s||this.addFieldsDisabled} .loading=${s} @click=${async()=>await this.addFields(e)}>${s?this.messages.addingFields:this.messages.addFields}</calcite-button>`}render(){return this.canShowAddGPSMetadata()?u`<div class="scrim-container"><calcite-block scale=m expanded>${this.initializing&&u`<calcite-scrim loading></calcite-scrim>`||""}<calcite-list .label=${this.messages.gpsOptions} selection-mode=none><calcite-list-item .label=${this.messages.accordionHeading}>${this.renderAddFieldsControl("base")}</calcite-list-item>${this.showAdvancedFields()&&u`<calcite-list-item .label=${this.messages.gnssReceiverFields}>${this.renderAddFieldsControl("gnss")}</calcite-list-item><calcite-list-item .label=${this.messages.laserRangefinderFields}>${this.renderAddFieldsControl("rangefinder")}</calcite-list-item>`||""}</calcite-list></calcite-block></div>`:null}};_("arcgis-portal-add-gps-metadata",T);return T},"layers/Layer","portal/PortalItem","request",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as r}from"./
|
|
2
|
+
import{a as r}from"./2XIDYV73.js";import{a as n}from"./AYHYABMC.js";import"./OQ3OHDEB.js";import"./I57CRKF7.js";import{I as i,J as a,K as o,Q as l,j as e,v as c}from"./3ZC26CT6.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{substitute:p}])=>{var s=class extends o{constructor(){super(...arguments),this.messages=n({blocking:!0,name:"portal-account-switcher"}),this.dialogRef=i(),this.accounts=[],this.arcgisAccountsLinkAll=c(),this.arcgisAccountsCloseDialog=c()}static{this.properties={portal:0,targetUser:1,accounts:0}}static{this.styles=r}render(){let{messages:t,portal:u,accounts:g,targetUser:m}=this;return e`<calcite-dialog open modal width=s .heading=${t.linkTitle} heading-level=2 outside-close-disabled @calciteDialogClose=${()=>this.arcgisAccountsCloseDialog.emit()} ${a(this.dialogRef)}><calcite-block .heading=${p(t.linkWarning,{targetUser:m})} expanded class="linked-accounts-block"><arcgis-portal-account-switcher-list .portal=${u} .linkedAccounts=${g}></arcgis-portal-account-switcher-list></calcite-block><calcite-button slot=footer-end appearance=outline @click=${()=>{this.dialogRef.value.open=!1}}>${t.cancel}</calcite-button><calcite-button slot=footer-end kind=brand @click=${()=>{this.arcgisAccountsLinkAll.emit(),this.dialogRef.value.open=!1}}>${t.linkAll}</calcite-button></calcite-dialog>`}};l("arcgis-portal-account-switcher-accounts",s);return s},"intl")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./5SKCVK2P.js";import{a as g}from"./AYHYABMC.js";import{H as d,I as p,J as u,K as m,L as o,N as s,Q as b,h,j as r,v as n}from"./3ZC26CT6.js";export default $arcgis.t(([{c:w}])=>{var f=h`:host{position:relative;display:block}.search{position:absolute;z-index:10;margin-top:1rem;color:var(--calcite-color-text-1);pointer-events:none;inset-inline-start:1.5rem}.search--panel{inset-inline-start:.75rem}.x{position:absolute;z-index:10;top:0;margin-top:.5rem;margin-inline:.25rem;padding:.25rem;border:none;cursor:pointer;color:var(--calcite-color-text-1);outline:none;inset-inline-end:.25rem;background:transparent}.x--icon{display:block}.input{display:block;width:100%;box-sizing:border-box;padding-block:1rem;padding-inline-start:3rem;height:3rem;border:none;position:relative;z-index:0;color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);background-color:transparent;border-bottom:2px solid transparent;font-family:inherit}.input::-webkit-search-cancel-button{display:none}.input::-ms-clear{display:none}.input:focus{outline:none;border-bottom-color:var(--calcite-color-brand)}.input--panel{padding-inline-start:2.5rem;padding-inline-end:1rem}.input--with-clear{padding-inline-end:3rem}.alert:not([calcite-hydrated]){display:none}`,c=class extends m{constructor(){super(...arguments),this.searchInput=p(),this._messages=g({name:"portal-browser",blocking:!0}),this.showClear=!1,this.containsWildcard=!1,this.term="",this.placeholder="",this.allowClear=!0,this.store=w(),this.arcgisBrowserSearch=n(),this.arcgisBrowserSearchInput=n()}static{this.properties={showClear:16,containsWildcard:16,term:1,placeholder:1,allowClear:5,store:0}}static{this.styles=f}async setFocus(){this.searchInput.value?.focus()}connectedCallback(){super.connectedCallback(),this.showClear=!!this.term,this.containsWildcard=this.term.includes("*")}willUpdate(e){e.get("term")!==void 0&&((this.searchInput.value?.value??"")!==this.term&&(this.showClear=!!this.term,this.emitUpdate(this.term)),this.containsWildcard=this.term.includes("*"))}disconnectedCallback(){this.debounceId&&(window.clearTimeout(this.debounceId),this.debounceId=void 0),super.disconnectedCallback()}emitUpdate(e){this.store.searchTerm=e,this.arcgisBrowserSearch.emit(e)}debouncedInput(e){this.debounceId&&window.clearTimeout(this.debounceId),this.debounceId=window.setTimeout(()=>{let t=e.includes("*");this.showClear=!!e,this.containsWildcard=t,t||this.emitUpdate(e)},400)}render(){let e=!!this.store.panel,t=this.placeholder||this._messages.search.search,l=this._messages.search.wildcard,v=this._messages.search.clear;return r`<div><calcite-icon icon=search scale=s class=${o({search:!0,"search--panel":e})}></calcite-icon><input class=${o({input:!0,"input--with-clear":this.allowClear&&this.showClear,"input--panel":e})} .value=${d(this.term??"")} placeholder=${t??s} aria-label=${t??s} @input=${i=>{let a=i.currentTarget.value;a.includes("*")||(this.containsWildcard=!1),this.arcgisBrowserSearchInput.emit(a),this.debouncedInput(a)}} ${u(this.searchInput)}><calcite-alert .open=${this.containsWildcard} scale=m kind=danger class="alert" icon=exclamation-mark-triangle .label=${l} @calciteAlertClose=${()=>{this.containsWildcard=!1}}><div slot=message>${l}</div></calcite-alert>${this.allowClear&&this.showClear&&r`<button class="x" aria-label=${v??s} @click=${()=>{this.arcgisBrowserSearchInput.emit(""),this.emitUpdate(""),this.showClear=!1,this.searchInput.value&&(this.searchInput.value.value="",this.searchInput.value.focus())}} @keydown=${i=>{i.key==="Enter"&&i.stopPropagation()}} tabindex=0><calcite-icon icon=x scale=m class="x--icon"></calcite-icon></button>`||""}</div>`}};b("arcgis-portal-browser-search",c);return c},a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as g}from"./
|
|
2
|
+
import{a as g}from"./YTVLEHJT.js";import{a as f}from"./4XIHI6AF.js";import{a as m}from"./2XIDYV73.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import{a as d}from"./AYHYABMC.js";import"./OQ3OHDEB.js";import"./I57CRKF7.js";import{K as h,Q as p,j as n,v as a}from"./3ZC26CT6.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{substitute:o}])=>{var l=class extends h{constructor(){super(...arguments),this.messages=d({blocking:!0,name:"portal-account-switcher"}),this.tipReference=null,this.tooltipText="",this.linkedAccounts=[],this.interactive=!1,this.signedInUsers=[],this.accountAccess={},this.actions=[],this.arcgisAccountListSwitch=a({bubbles:!1}),this.arcgisAccountListUnlink=a()}static{this.properties={tipReference:16,tooltipText:16,portal:0,linkedAccounts:0,interactive:5,signedInUsers:0,accountAccess:0,actions:0}}static{this.styles=m}connectedCallback(){super.connectedCallback(),this.interactive&&this.actions.length===0?this.actions=["switch","unlink"]:this.interactive||(this.actions=[])}formatProvider(i){if(i.startsWith("oidc_"))return"OpenID";switch(i){case"arcgis":return"ArcGIS";case"enterprise":return"SAML";case"apple":return"Apple";case"facebook":return"Facebook";case"github":return"GitHub";case"google":return"Google";default:return"Unknown"}}formatProviderLabel(i){let{messages:e}=this;if(i.startsWith("oidc_"))return e.oidcProvider;switch(i){case"arcgis":return e.arcgisProvider;case"enterprise":return e.samlProvider;case"apple":return e.appleProvider;case"facebook":return e.facebookProvider;case"github":return e.githubProvider;case"google":return e.googleProvider;default:return"Account provider"}}formatSwitchToLabel(i,e,c=!0){let{messages:s}=this;return i.disabled?s.userDisabled:e[i.username]?.allowed??!0?c?i.orgName?o(s.switchToOrgUser,i):o(s.switchToPublicUser,i):s.switchTo:s.userNotAllowed}render(){let{linkedAccounts:i,messages:e,accountAccess:c,interactive:s,portal:$,actions:u}=this;return n`${g(i,t=>t.id??t.username,t=>n`<calcite-block .label=${t.orgName?`${t.username}, ${t.orgName}`:t.username} heading-level=4 .heading=${t.username} .description=${t.orgName?`${t.fullname}, ${t.orgName}`:t.fullname} class="linked-account"><calcite-avatar slot=content-start inert .fullName=${t.fullname} .username=${t.username} .userId=${t.id} .thumbnail=${f({fullName:t.fullname,...t},$)??void 0}></calcite-avatar><calcite-chip slot=content-end kind=neutral scale=s .label=${this.formatProviderLabel(t.provider)} class="provider-chip" @mouseenter=${r=>{this.tipReference=r.currentTarget,this.tooltipText=this.formatProviderLabel(t.provider)}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}}>${this.formatProvider(t.provider)}</calcite-chip>${s&&n`${u.includes("unlink")&&n`<calcite-button appearance=transparent slot=actions-end kind=danger icon-start=unlink .label=${o(t.orgName?e.unlinkOrgUser:e.unlinkPublicUser,t)} .id=${`unlink-${t.username}`} @mouseenter=${r=>{this.tipReference=r.currentTarget,this.tooltipText=e.unlinkAccount}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}} @focusin=${r=>{this.tipReference=r.currentTarget,this.tooltipText=e.unlinkAccount}} @focusout=${()=>{this.tipReference=null,this.tooltipText=""}} @click=${r=>{r.preventDefault(),this.arcgisAccountListUnlink.emit({account:t})}}></calcite-button>`||""}${u.includes("switch")&&n`<calcite-button appearance=transparent slot=actions-end kind=neutral icon-start=sign-in .label=${this.formatSwitchToLabel(t,c)} .disabled=${t.disabled||!(c[t.username]?.allowed??!0)} .id=${`switch-${t.username}`} @mouseenter=${r=>{this.tipReference=r.currentTarget,this.tooltipText=this.formatSwitchToLabel(t,c,!1)}} @mouseleave=${()=>{this.tipReference=null,this.tooltipText=""}} @focusin=${r=>{this.tipReference=r.currentTarget,this.tooltipText=this.formatSwitchToLabel(t,c,!1)}} @focusout=${()=>{this.tipReference=null,this.tooltipText=""}} @click=${r=>{r.preventDefault(),this.arcgisAccountListSwitch.emit({account:t})}}></calcite-button>`||""}`||""}</calcite-block>`)}<calcite-tooltip .open=${!!this.tipReference} .referenceElement=${this.tipReference}>${this.tooltipText}</calcite-tooltip>`}};p("arcgis-portal-account-switcher-list",l);return l},"intl")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./5SKCVK2P.js";import a from"./C5FTQSU6.js";import"./I57CRKF7.js";import{K as o,Q as s,j as e,v as r}from"./3ZC26CT6.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,{c:n}])=>{var c=960,i=class extends o{constructor(){super(...arguments),this.options=[],this.view="",this.viewText="View",this.store=n(),this.arcgisBrowserViewChange=r()}static{this.properties={options:0,view:1,viewText:1,store:0}}renderOption(t){return e`<calcite-dropdown-item .selected=${t.value===this.view} @calciteDropdownItemSelect=${()=>{this.arcgisBrowserViewChange.emit(t.value)}} .iconStart=${t.value} icon-flip-rtl=start>${t.title}</calcite-dropdown-item>`}renderButton(){let t=this.options.find(a=>a.value===this.view),l=this.store.width||window.innerWidth;return e`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral .iconStart=${t?.value} icon-flip-rtl=start .label=${`${this.viewText}: ${t?.title||""}`}>${l>c?t?.title:null}</calcite-button>`}render(){return e`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=s>${this.renderButton()}<calcite-dropdown-group selection-mode=single>${this.options.map(t=>this.renderOption(t))}</calcite-dropdown-group></calcite-dropdown>`}};s("arcgis-portal-browser-view",i);return i},a,b)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as P}from"./YG6ZGQ46.js";import c from"./TZ6HFMZZ.js";import b from"./TIPQ2ZWK.js";import{a as K}from"./57MT7FOI.js";import{a as R}from"./4XIHI6AF.js";import{a as M}from"./2XIDYV73.js";import a from"./C5IKEISI.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import{b as N}from"./2FKNF2ZK.js";import{a as J}from"./AYHYABMC.js";import"./OQ3OHDEB.js";import"./I57CRKF7.js";import{K as _,L,N as x,Q as T,j as d,k as O,v as A}from"./3ZC26CT6.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([p,{substitute:w},,,{f:E,g:H,h:W,i:B}])=>{var C=1260*1e3,q=2500;function D(o,t="_blank",i=582,e=670){let s=window.screenLeft??0,n=window.screenTop??0,a=window.innerWidth||document.documentElement.clientWidth||window.screen.width,r=window.innerHeight||document.documentElement.clientHeight||window.screen.height,c=a/2-i/2+s,l=r/2-e/2+n,u=window.open(o,t,`scrollbars=no, width=${i}, height=${e}, top=${l}, left=${c}`);return u?.focus(),u}function z(o){let t=p.findOAuthInfo(o.url),{locale:i="en",expiration:e=C}=t??{},s=new URLSearchParams({locale:i,client_id:"arcgisonline",response_type:"token",expiration:`${e}`,linkUserRequest:"true",showSocialLogins:"true",hideEnterpriseLogins:"false",force_login:"true",parent:window.location.origin,redirect_uri:`https://${o.portalHostname}/home/link_account_callback.html`,state:JSON.stringify({useMessage:!0})}),n=`https://${o.portalHostname}/sharing/oauth2/authorize?${s.toString()}`;D(n)}function y(o){let{config:t,token:i,clientId:e="arcgisonline",redirectToClientUri:s=!1,displaySignoutComplete:n=!1,clientUri:a}=o,r=new URLSearchParams({display:"iframe",client_id:e,...i&&{token:i},parent:window.location.origin,redirect_uri:`${t.baseUrl}/home/check_sign_in_status.html`,state:JSON.stringify({signout:!0,origin:window.location.origin,accountOrigin:`${t.restBaseUrl}/`,redirectToClientUri:s,displaySignoutComplete:n,...a&&{redirectUri:a}})}),c=`${t.restBaseUrl}/oauth2/signout?${r.toString()}`,l=document.createElement("iframe");l.src=c,l.style.display="none",document.body.appendChild(l)}function F(o,t,i){let e=h(o.orgUrlKey,t),s=p.findOAuthInfo(e),{appId:n,locale:a="en",expiration:r=C}=s??{},c=v(o.provider),l=new URLSearchParams({locale:a,client_id:i??n??"arcgisonline",response_type:"token",expiration:`${r}`,parent:window.location.origin,...c==="social"&&{socialLoginProviderName:o.provider},...c==="default"&&{prepopulatedusername:o.username},force_login:"true",redirect_uri:`${e}/home/sign_in_callback.html`,state:JSON.stringify({user:o.username,server:e,portalUrl:e,origin:window.location.origin})}),u=`${I(o,t)}?${l.toString()}`;D(u)}function G({accounts:o,clientId:t="arcgisonline",usersToFilter:i=[],accountsToFilter:e=""}){let s={};return o.reduce((n,a)=>{let r={disabled:a.disabled??!1,allowed:a.clientAppAccessAllowed??!0};return n[a.username]=r,(i.includes(a.username)||i.includes(a.username.toLowerCase())||e==="org"&&a.orgUrlKey||t==="esriapps"&&a.userType!=="both")&&(r.allowed=!1),n},s),s}function Q({account:o,credential:t,clientId:i,portal:e,redirectUri:s}){let n=v(o.provider),a=I(o,e),r=s||j(o,e),c=new URLSearchParams({client_id:i,redirect_uri:r,parent:window.location.origin,response_type:"token",force_login:"false",...t.userId&&{prepopulatedusername:t.userId},...n==="social"&&{socialLoginProviderName:o.provider},expiration:`${(t?.expires??Date.now()+C)-Date.now()}`});return`${a}?${c.toString()}`}function v(o){return V(o)?"social":o==="enterprise"?"enterprise":o.includes("oidc")?"oidc":"default"}function V(o){return["apple","facebook","github","google"].includes(o)}function I(o,t){let i=h(o.orgUrlKey,t).toLowerCase(),e=v(o.provider),s="";switch(e){case"social":s="social/";break;case"enterprise":s="saml/";break;case"oidc":s=`oidc/${o.provider.split("_")[1]}/`;break}return`${i}/sharing/rest/oauth2/${s}authorize`}function h(o,t){return o?.startsWith("https://")?o:o&&t.customBaseUrl?`https://${o}.${t.customBaseUrl}`:`https://${t.portalHostname}`}function j(o,t){return`${h(o.orgUrlKey,t)}/home/accountswitcher-callback.html`}function X(o,t){return p.findCredential(h(o.orgUrlKey,t),o.username)}function Y(o,t){let i=X(o,t);if(i)return i;let e=h(o.orgUrlKey,t),s=`${e}/home/check_sign_in_status.html#state=${JSON.stringify({origin:window.location.origin,server:e,orgKey:e})}`;Z(s,`iframe__for-${e}`)}function Z(o,t){let i=document.createElement("iframe");i.src=o,i.id=t,i.style.display="none",document.body.appendChild(i)}var S=100,b=class extends _{constructor(){super(),this.messages=J({blocking:!0}),this.targetUser="",this.targetToken="",this.accountAccess={},this.remainingSignouts=0,this.signoutHandle=0,this.linkedAccounts=[],this.loading=!1,this.signedInStatus={},this.showAssociatedAccountsWarning=!1,this.signedInAccounts=[],this.clientId="arcgisonline",this.signout=!1,this.signoutOptions={redirectToClientUri:!1,displaySignoutComplete:!1},this.arcgisAccountSwitch=A(),this.arcgisClose=A(),this.arcgisSignoutComplete=A(),this.listenOn(window,"message",this.handleMessageEvent)}static{this.properties={linkedAccounts:16,userAccounts:16,user:16,credential:16,alertOptions:16,loading:16,signedInStatus:16,showAssociatedAccountsWarning:16,signedInAccounts:16,portal:0,clientId:1,redirectUri:1,signout:5,signoutOptions:0}}static{this.styles=M}willUpdate(t){if(t.has("portal")&&(this.user=this.portal?.user),(t.has("portal")||t.has("user"))&&this.portal&&this.user){this.findLinkedUsers();return}if(t.has("linkedAccounts")||t.has("signedInStatus")){if(this.signout){let{signedInStatus:i,linkedAccounts:e,portal:s,signoutOptions:n,clientId:a,user:r,redirectUri:c}=this,l=Object.keys(i).filter(k=>i[k]!==null).map(k=>e.find(U=>U.username===k));this.remainingSignouts=l.length+1;let u=h(s.urlKey??"",s),f=`${u}/sharing/rest`,{displaySignoutComplete:m=!0,redirectToClientUri:g=!0}=n;l.length>0&&(m=!1,g=!1),this.loading=!0;let $=p.findCredential(u,r?.id||r?.username);y({displaySignoutComplete:m,redirectToClientUri:g,clientId:a,config:{baseUrl:u,restBaseUrl:f},token:$?.token,clientUri:g?c:void 0}),this.signoutHandle=window.setTimeout(()=>{this.remainingSignouts-=1,this.finishSignout({accountOrigin:u,redirectToClientUri:g,displaySignoutComplete:m})},q)}return}}handleMessageEvent(t){if(new URL(t.origin).hostname!=="localhost"&&(t.origin.endsWith(".arcgis.com")||t.origin===window.location.origin)){if(typeof t.data=="string"){JSON.parse(t.data).type==="token_exchange"&&this.handleExchangeTokenMessage(t);return}if("type"in t.data)switch(t.data.type){case"signin":this.handleSigninMessage(t);return;case"signout":this.handleSignoutMessage(t);return;case"linkUser":this.handleLinkUserMessage(t);return;case"token_exchange":this.handleExchangeTokenMessage(t);return}if("credential"in t.data){this.handleSigninMessage(t);return}this.handleCheckSignInStatusMessage(t)}}handleSignoutMessage(t){let{error:i,signout:e,accountOrigin:s,redirectToClientUri:n,displaySignoutComplete:a}=t.data;if(this.remainingSignouts-=1,i&&i!=="unknown"){console.error(i),this.showAlert("danger",this.messages.errors.signout);return}e&&(this.user=void 0,this.credential=void 0,this.finishSignout({accountOrigin:s,redirectToClientUri:n,displaySignoutComplete:a}))}handleSigninMessage(t){let{messages:i,clientId:e}=this,{error:s,status:n,state:a,access_token:r,ssl:c,expires_in:l}=t.data;if(s){console.error(s),this.showAlert("danger",i.errors.signin);return}if(n==="success"){let{portal:u,user:f,redirectUri:m}=this,g=this.linkedAccounts.find(U=>U.username===a.user);g?.orgUrlKey===this.portal.urlKey&&p.findCredential(`https://${u.portalHostname}`,f?.username)?.destroy();let $={server:a.portalUrl,userId:a.user,token:r,expires:Number(l)+Date.now(),ssl:c===void 0||c!=="false"};p.registerToken($);let k=Q({account:g,credential:$,clientId:e,portal:u,redirectUri:m});window.self!==window.top?window.top?.postMessage({type:"navigate",url:k}):this.arcgisAccountSwitch.emit({account:g,finishUrl:k})}}handleCheckSignInStatusMessage(t){let{success:i,orgKey:e,server:s,userId:n,token:a,expires:r,ssl:c}=t.data;e&&s&&i&&n&&a&&r&&c!==void 0&&(this.signedInStatus[n]={token:a,expires:r,ssl:c})}async handleLinkUserMessage(t){let{error:i,username:e,access_token:s}=t.data,{portal:n,user:a,linkedAccounts:r,messages:c}=this;if(i){if(i.toString().toLowerCase().includes("user denied your request"))return;this.showAlert("danger",c.errors.accessAccount);return}if(e===a?.username){this.showAlert("danger",c.errors.selfLink);return}if(r.find(u=>u.username===e)){this.showAlert("danger",w(c.errors.alreadyLinked,{username:e}));return}let l=await H(n,e,s);if(l?.length){this.userAccounts=l,this.targetUser=e??"",this.targetToken=s??"",this.showAssociatedAccountsWarning=!0;return}this.linkAccount(e,s)}handleExchangeTokenMessage(t){let i=typeof t.data=="string"?JSON.parse(t.data):t.data;if(!(i.type&&i.type!=="token_exchange")){if(i.error)console.error(i);else if(i.status==="success"&&this.targetUser){let{portal:e,linkedAccounts:s,targetUser:n,clientId:a}=this,r=s.find(m=>m.username===n);if(!r)return;let c=j(r,e),l=h(r.orgUrlKey,e),u=new URLSearchParams({response_type:"token",client_id:a,redirect_uri:c,state:JSON.stringify({user:r.username,portalUrl:l})}),f=`${I(r,e)}?${u.toString()}`;window.opener?(window.opener.location.href=f,window.close()):window.location.href=f}}}finishSignout({accountOrigin:t,redirectToClientUri:i,displaySignoutComplete:e}){this.signoutHandle&&window.clearTimeout(this.signoutHandle),t===window.location.origin&&p.destroyCredentials(),console.info("Signout complete",t,i,e),this.remainingSignouts<=0&&this.arcgisSignoutComplete.emit({accountOrigin:t,redirectToClientUri:i,displaySignoutComplete:e})}async findLinkedUsers(){if(this.loading=!0,!this.portal||!this.user){this.linkedAccounts=[],this.loading=!1;return}this.linkedAccounts=await E(this.portal,this.user),this.linkedAccounts.length&&(this.signedInStatus=this.linkedAccounts.filter(t=>t.orgUrlKey!==this.portal.urlKey).reduce((t,i)=>(t[i.username]=Y(i,this.portal)??null,t),{}),this.accountAccess=G({accounts:this.linkedAccounts,clientId:this.clientId})),this.loading=!1}async linkAccount(t,i){let{portal:e,user:s}=this;if(!e||!s)return;let n=await W({portal:e,user:s,targetUser:t,targetToken:i}),{messages:a}=this;if(n.error){this.showAlert("danger",w(a.errors.linkAccount,{username:t})),this.targetUser="",this.userAccounts=[];return}let r=this.userAccounts?.length?a.success.linkAccountMultiple:a.success.linkAccount;this.showAlert("success",w(r,{username:t})),this.targetUser="",this.userAccounts=[],await N(350),this.findLinkedUsers()}async unlinkAccount(t){if(!this.portal||!this.user)return;let{messages:i,portal:e,user:s}=this,{success:n}=await B({portal:e,user:s,linkedUsername:t.username});n?this.showAlert("success",w(i.success.unlinkAccount,{username:t.username})):this.showAlert("danger",w(i.errors.unlinkAccount,{username:t.username})),await this.findLinkedUsers()}startAccountLink(){z(this.portal)}switchAccount(t){let{portal:i,user:e,clientId:s}=this;if(!i||!e||!t)return;let n=h(e.sourceJSON.orgUrlKey??"",i),a=p.findCredential(n,e.id||e.username);a&&y({config:{baseUrl:n,restBaseUrl:`${n}/sharing/rest`},token:a?.token,clientId:s}),F(t,i,s)}signoutAll(t){let{portal:i,signedInStatus:e,clientId:s}=this;t.forEach(n=>{let a=h(n.orgUrlKey,i),r=`${a}/sharing/rest`,c=e[n.username];y({config:{baseUrl:a,restBaseUrl:r},token:c?.token,clientId:s})})}showAlert(t,i,e){this.alertOptions={kind:t,title:e,message:i}}showUnlinkConfirmation(t){let{messages:i}=this;this.alertOptions={kind:"danger",icon:"exclamation-mark-triangle-f",title:i.unlinkAccount,message:i.unlinkWarning,actions:[{text:i.unlink,kind:"danger",clickHandler:()=>{this.alertOptions=void 0,this.unlinkAccount(t)}}]}}render(){let{linkedAccounts:t,accountAccess:i,user:e,portal:s,messages:n,signout:a}=this;if(!s||!e)return null;if(a){let{signedInAccounts:r}=this;return r.length===0?d`<calcite-loader .label=${n.signingOut} .text=${n.signingOut}></calcite-loader>`:d`<arcgis-portal-account-switcher-signout .portal=${s} .signedInAccounts=${r} @arcgisSignOutSwitchAccount=${c=>{this.switchAccount(c.detail.account)}} @arcgisSignOutAll=${()=>{this.signoutAll(r)}} @arcgisSignOutCloseDialog=${()=>{this.arcgisClose.emit()}}></arcgis-portal-account-switcher-signout>`}return d`<calcite-dialog .heading=${n.switchAccounts} heading-level=2 scale=m width=s open modal .loading=${this.loading} outside-close-disabled @calciteDialogClose=${()=>{this.arcgisClose.emit()}}><calcite-block .heading=${n.currentAccount} heading-level=3 .description=${n.signedInAs} expanded class="current-account-block" tabindex=-1>${K(e.id??e.username,d`<calcite-block class="current-account" .label=${s.urlKey?`${e.username}, ${s.name}`:e.username} heading-level=4 .heading=${e.username} .description=${s.urlKey?`${e.fullName??e.username}, ${s.name}`:e.fullName??e.username}><calcite-avatar slot=content-start inert .fullName=${e.fullName??void 0} .username=${e.username} .userId=${e.id} .thumbnail=${R(e,s)??void 0}></calcite-avatar></calcite-block>`)}</calcite-block>${t.length>0?d`<calcite-block .heading=${n.linkedAccounts} heading-level=3 .description=${n.linkedAccountActions} expanded class="linked-accounts-block"><calcite-button slot=content-end icon-start=plus class="link-account-button" @click=${()=>this.startAccountLink()} .disabled=${t.length>=S}>${n.addAccount}</calcite-button><arcgis-portal-account-switcher-list .portal=${s} .linkedAccounts=${t} .accountAccess=${i} .signedInUsers=${Object.keys(this.signedInStatus).filter(r=>this.signedInStatus[r]!==null)} interactive @arcgisAccountListSwitch=${r=>{this.switchAccount(r.detail.account)}} @arcgisAccountListUnlink=${r=>{this.showUnlinkConfirmation(r.detail.account)}}></arcgis-portal-account-switcher-list></calcite-block>`:d`<calcite-block .heading=${n.linkedAccounts} heading-level=3 expanded class="empty-accounts-block"><div class="empty-accounts-info"><svg class="empty-accounts-icon" width=48 height=48 viewBox="0 0 48 48" fill=none xmlns=http://www.w3.org/2000/svg>${O`<path d=${P.couple??x} fill=currentColor />`}</svg><h4>${n.emptyListTitle}</h4><p>${n.emptyList}</p><calcite-button icon-start=plus class="link-account-button" @click=${()=>this.startAccountLink()} .disabled=${t.length>=S}>${n.linkAccount}</calcite-button></div></calcite-block>`}<calcite-notice kind=info .open=${t.length>=S}><div slot=message>${n.maxAccounts}</div></calcite-notice><calcite-alert .label=${n.alertLabel} slot=alerts .autoClose=${this.alertOptions?.kind!=="danger"} auto-close-duration=fast placement=bottom .kind=${this.alertOptions?.kind} .icon=${this.alertOptions?.icon} .open=${!!this.alertOptions} @calciteAlertClose=${()=>{this.alertOptions=void 0}}>${this.alertOptions?.title&&d`<h4 slot=title class="alert-title">${this.alertOptions.title}</h4>`||""}${this.alertOptions?.message&&d`<p slot=message class=${L({"alert-message":!0,"short-message":!!this.alertOptions?.actions?.length})}>${this.alertOptions.message}</p>`||""}${this.alertOptions?.actions?.map(r=>d`<calcite-button slot=actions-end .kind=${r.kind} .appearance=${r.appearance} @click=${r.clickHandler}>${r.text}</calcite-button>`)}</calcite-alert></calcite-dialog>${this.showAssociatedAccountsWarning&&d`<arcgis-portal-account-switcher-accounts .portal=${s} .targetUser=${this.targetUser} .accounts=${this.userAccounts??[]} @arcgisAccountsLinkAll=${()=>{this.linkAccount(this.targetUser,this.targetToken)}} @arcgisAccountsCloseDialog=${()=>{this.showAssociatedAccountsWarning=!1}}></arcgis-portal-account-switcher-accounts>`||""}`}};T("arcgis-portal-account-switcher",b);return b},"identity/IdentityManager","intl",a,b,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as m}from"./
|
|
2
|
+
import{a as m}from"./YTVLEHJT.js";import{a as h}from"./AYHYABMC.js";import"./OQ3OHDEB.js";import"./I57CRKF7.js";import{K as b,N as a,Q as d,h as c,j as i,v as u}from"./3ZC26CT6.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var g=c`.spacing-y{margin:var(--calcite-spacing-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;function s(o,e){return o.uiElement===e}var n=class extends b{constructor(){super(...arguments),this.messages=h(),this.isRequiredErrors=new Set,this.arcgisAttributeValueChange=u()}static{this.properties={validationMsg:16,attributeKey:1,attribute:0,value:0,renderingInfo:0,isRequiredErrors:0}}static{this.styles=g}willUpdate(e){(e.has("renderingInfo")||e.has("isRequiredErrors"))&&(this.validationMsg=this._getValidationMessage())}_getValidationMessage(){if(this.renderingInfo?.attributeValidationResult)return this.renderingInfo.attributeValidationResult;if(this.isRequiredErrors.has(this.attributeKey))return this.messages.requiredfield??"This is a required field."}renderCheckbox(){return s(this.attribute,"checkbox")?i`<calcite-label class="spacing-y" .for=${this.attributeKey} layout=inline><calcite-checkbox .checked=${this.value} id=${this.attributeKey??a} @calciteCheckboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.checked})} .required=${this.attribute.isRequired??!1} .status=${this.validationMsg?"invalid":"valid"}></calcite-checkbox>${this.attribute.label}</calcite-label>`:null}renderDateInput(){return s(this.attribute,"date")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-input-date-picker id=${this.attributeKey??a} .name=${this.attribute.label} @calciteInputDatePickerChange=${e=>this.isConnected&&this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} overlay-positioning=fixed .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-date-picker></calcite-label>`:null}renderTextInput(){if(!s(this.attribute,"text"))return null;let e=this.attribute.label,t=this.attribute.description;return i`<calcite-label .for=${this.attributeKey}><div class="portal-classification-form-element-tooltip">${e}${this.attribute.labelTooltip&&i`<div><calcite-icon scale=s icon=information .id=${`tooltip-button-${this.attribute.bannerLabel}`} text-label=${this.messages.information??"Information"??a}></calcite-icon><calcite-tooltip .referenceElement=${`tooltip-button-${this.attribute.bannerLabel}`} placement=right>${this.attribute.labelTooltip}</calcite-tooltip></div>`||""}</div><calcite-input-text id=${this.attributeKey??a} .label=${e} .name=${this.attributeKey} @calciteInputTextChange=${r=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:r.target.value})} .placeholder=${t} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-text></calcite-label>`}renderSingleSelect(){return s(this.attribute,"single-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox selection-mode=single id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} .placeholder=${this.attribute.description??this.messages.selectanoption} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} overlay-positioning=fixed validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value} data-testid=${`single-select-${this.attributeKey}`}>${this._renderSingleSelectComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderSingleSelectComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return m(this.renderingInfo?.valueExpressionResult,t=>t.label,t=>i`<calcite-combobox-item .selected=${e===t.value} .heading=${t.label} .value=${t.value} data-testid=${`single-combobox-item-${t.value}`}></calcite-combobox-item>`)}_renderComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return this.renderingInfo?.valueExpressionResult.map(t=>i`<calcite-combobox-item .selected=${e?.includes(t.value)} .heading=${t.label} .value=${t.value} data-testid=${`combobox-item-${t.value}`}></calcite-combobox-item>`)}renderMultiSelect(){return s(this.attribute,"multi-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderGroupedComboboxOptions(){if(!this.renderingInfo?.valueExpressionResult||Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return Object.entries(this.renderingInfo?.valueExpressionResult).map(([t,r])=>i`<calcite-combobox-item .selected=${e?.includes(t)} .heading=${t} .value=${t}>${r.map(l=>i`<calcite-combobox-item .selected=${e?.includes(l.value)} .heading=${l.label} .value=${l.value} data-testid=${`grouped-combobox-item-${l.value}`}></calcite-combobox-item>`)}</calcite-combobox-item>`)}renderMultiGroupedSelectNested(){return s(this.attribute,"multi-grouped-select-nested")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderGroupedComboboxOptions()}</calcite-combobox></calcite-label>`:null}render(){switch(this.attribute.uiElement){case"checkbox":return this.renderCheckbox();case"date":return this.renderDateInput();case"multi-select":return this.renderMultiSelect();case"multi-grouped-select-nested":return this.renderMultiGroupedSelectNested();case"single-select":return this.renderSingleSelect();case"text":return this.renderTextInput();default:return i`<div>Not Implemented Yet.</div>`}}};d("arcgis-portal-classification-form-element",n);export{n as ArcgisPortalClassificationFormElement};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{A as
|
|
2
|
+
import{A as o,B as a,l as r,m as s,z as n}from"./3ZC26CT6.js";var i=class extends a{constructor(t){if(super(t),this.it=s,t.type!==n.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===s||t==null)return this._t=void 0,this.it=t;if(t===r)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var f=o(i);export{f as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{b as Vt,c as Kt}from"./MSSJRDR7.js";import{a as b,b as to,c as oo,d as no,e as ro,g as yt}from"./G44SM52C.js";import{a as De}from"./2FKNF2ZK.js";import{a as $t}from"./
|
|
2
|
+
import{b as Vt,c as Kt}from"./MSSJRDR7.js";import{a as b,b as to,c as oo,d as no,e as ro,g as yt}from"./G44SM52C.js";import{a as De}from"./2FKNF2ZK.js";import{a as $t}from"./AYHYABMC.js";import"./OQ3OHDEB.js";import"./I57CRKF7.js";import{I as _e,J as ke,K as jt,Q as Lt,h as Nt,j as J,n as $e,v as Ot}from"./3ZC26CT6.js";import"./OUMTV5H5.js";import{$ as He,Ba as Ie,Ca as Je,Da as Ve,S as te,a as ft,b as Ge,c as R,ca as eo,g as U,j as L,k as H,s as Yt,sa as ne,ta as wt,va as F,x as ht,y as ce,za as qe}from"./33O4LI3R.js";import{A as qt,Ea as Xt,Fa as Qt,H as Ee,I as X,J as we,K as Fe,T as Jt,X as We,a as Bt,b as Ue,d as Se,e as Ft,f as oe,g as Wt,h as z,i as he,k as Gt,l as Be,m as Ht,o as l,q as ge,qa as Zt,r as mt,t as ze,ua as gt,z as pt}from"./IJ76WUCD.js";import{$ as ct,$a as B,Ha as dt,J as M,R as Ut,Y as T,Ya as ut,ab as fe,d as Dt,ia as Z,na as W,x as lt}from"./GGDOGNH4.js";import{h as zt,o as G}from"./JZ7EM2ZO.js";import"./5PV2GUZW.js";var Ae=class{constructor(e){this.resultMode="continue",this.responseFormat="content",this.middlewares=[],Object.assign(this,e)}getTool(){return We(this._executeWithMiddlewares.bind(this),{name:this.name,description:this.description,returnDirect:this.resultMode==="terminal",schema:this.inputSchema,responseFormat:this.responseFormat==="content-and-artifact"?"content_and_artifact":"content"})}async _executeWithMiddlewares(e,o){let n=async s=>{let a=await this.execute(s.input,s.config);return this._validateOutput(a)},r=await this.middlewares.reduceRight((s,a)=>async i=>await a.handler(i,s),n)({config:o,input:e,tool:this,toolCallId:nn(o)});return this.responseFormat==="content-and-artifact"&&typeof r=="string"?[r,void 0]:r}_validateOutput(e){if(!this.outputSchema)return e;let o=this.outputSchema.safeParse(e);if(!o.success)throw new Error(`FunctionTool output schema validation failed: ${o.error.message}`);return o.data}};function nn(t){let e=t?.toolCall;return typeof e?.id=="string"?e.id:void 0}function sn({apiKey:t,configuration:e={}}){let o=Qt({baseURL:e.baseURL,providerPath:"v1"});return{apiKey:t??e.apiKey??o.apiKey??(dt("LANGSMITH_GATEWAY_API_KEY")||dt("LANGSMITH_API_KEY")),configuration:{...e,baseURL:o.baseURL??`${Xt}/v1`},useResponsesApi:!0}}var Ye={openai:{package:"@langchain/openai",className:"ChatOpenAI"},anthropic:{package:"@langchain/anthropic",className:"ChatAnthropic"},azure_openai:{package:"@langchain/openai",className:"AzureChatOpenAI"},langsmith:{package:"@langchain/openai",className:"ChatOpenAI"},cohere:{package:"@langchain/cohere",className:"ChatCohere"},google:{package:"@langchain/google",className:"ChatGoogle"},"google-vertexai":{package:"@langchain/google-vertexai",className:"ChatVertexAI"},"google-vertexai-web":{package:"@langchain/google-vertexai-web",className:"ChatVertexAI"},"google-genai":{package:"@langchain/google-genai",className:"ChatGoogleGenerativeAI"},ollama:{package:"@langchain/ollama",className:"ChatOllama"},mistralai:{package:"@langchain/mistralai",className:"ChatMistralAI"},mistral:{package:"@langchain/mistralai",className:"ChatMistralAI"},groq:{package:"@langchain/groq",className:"ChatGroq"},bedrock:{package:"@langchain/aws",className:"ChatBedrockConverse"},aws:{package:"@langchain/aws",className:"ChatBedrockConverse"},deepseek:{package:"@langchain/deepseek",className:"ChatDeepSeek"},xai:{package:"@langchain/xai",className:"ChatXAI"},cerebras:{package:"@langchain/cerebras",className:"ChatCerebras"},fireworks:{package:"@langchain/fireworks",className:"ChatFireworks"},together:{package:"@langchain/together-ai",className:"ChatTogetherAI",hasCircularDependency:!0},perplexity:{package:"@langchain/perplexity",className:"ChatPerplexity"}},ao=Object.keys(Ye);async function an(t,e){let o;if(e)o=Ye[e];else{let n=Object.entries(Ye).find(([,r])=>r.className===t);o=n?n[1]:void 0}if(o)try{return(await import(o.package))[o.className]}catch(n){let r=n;if("code"in r&&r.code?.toString().includes("ERR_MODULE_NOT_FOUND")&&"message"in r&&typeof r.message=="string"){let s=(r.message.startsWith("Error: ")?r.message.slice(7):r.message).split("Cannot find package '")[1].split("'")[0];throw new Error(`Unable to import ${s}. Please install with \`npm install ${s}\` or \`pnpm install ${s}\``)}throw n}}async function ln(t,e,o={}){let n=e||cn(t);if(!n)throw new Error(`Unable to infer model provider for { model: ${t} }, please specify modelProvider directly.`);let r=Ye[n];if(!r){let i=ao.join(", ");throw new Error(`Unsupported { modelProvider: ${n} }.
|
|
3
3
|
|
|
4
4
|
Supported model providers are: ${i}`)}let{modelProvider:s,...a}=o;return new(await an(r.className,n))({model:t,...a,...n==="langsmith"?sn(a):{}})}function cn(t){return t.startsWith("gpt-3")||t.startsWith("gpt-4")||t.startsWith("gpt-5")||t.startsWith("o1")||t.startsWith("o3")||t.startsWith("o4")?"openai":t.startsWith("claude")?"anthropic":t.startsWith("command")?"cohere":t.startsWith("accounts/fireworks")?"fireworks":t.startsWith("gemini")?"google-vertexai":t.startsWith("amazon.")?"bedrock":t.startsWith("mistral")?"mistralai":t.startsWith("sonar")||t.startsWith("pplx")?"perplexity":void 0}var so=class Ke extends gt{_llmType(){return"chat_model"}lc_namespace=["langchain","chat_models"];_defaultConfig={};_configurableFields="any";_configPrefix;_queuedMethodOperations={};_modelInstanceCache=new Map;_profile;constructor(e){super(e),this._defaultConfig=e.defaultConfig??{},e.configurableFields==="any"?this._configurableFields="any":this._configurableFields=e.configurableFields??["model","modelProvider"],e.configPrefix?this._configPrefix=e.configPrefix.endsWith("_")?e.configPrefix:`${e.configPrefix}_`:this._configPrefix="",this._queuedMethodOperations=e.queuedMethodOperations??this._queuedMethodOperations,this._profile=e.profile??void 0,this.metadata={...this.metadata,ls_integration:"langchain_init_chat_model"}}async _getModelInstance(e){let o=this._getCacheKey(e),n=this._modelInstanceCache.get(o);if(n)return n;let r={...this._defaultConfig,...this._modelParams(e)},s=await ln(r.model,r.modelProvider,r);for(let[a,i]of Object.entries(this._queuedMethodOperations))a in s&&typeof s[a]=="function"&&(s=await s[a](...i));return this._modelInstanceCache.set(o,s),s}async _generate(e,o,n){return(await this._getModelInstance(o))._generate(e,o??{},n)}bindTools(e,o){let n={...this._queuedMethodOperations};return n.bindTools=[e,o],new Ke({defaultConfig:this._defaultConfig,configurableFields:this._configurableFields,configPrefix:this._configPrefix,queuedMethodOperations:n})}withStructuredOutput=(e,...o)=>{let n={...this._queuedMethodOperations};return n.withStructuredOutput=[e,...o],new Ke({defaultConfig:this._defaultConfig,configurableFields:this._configurableFields,configPrefix:this._configPrefix,queuedMethodOperations:n})};_modelParams(e){let o=e?.configurable??{},n={};for(let[r,s]of Object.entries(o))if(r.startsWith(this._configPrefix)){let a=this._removePrefix(r,this._configPrefix);n[a]=s}return this._configurableFields!=="any"&&(n=Object.fromEntries(Object.entries(n).filter(([r])=>this._configurableFields.includes(r)))),n}_removePrefix(e,o){return e.startsWith(o)?e.slice(o.length):e}withConfig(e){let o={...e||{}},n=this._modelParams(o),r=Object.fromEntries(Object.entries(o).filter(([s])=>s!=="configurable"));return r.configurable=Object.fromEntries(Object.entries(o.configurable||{}).filter(([s])=>this._configPrefix&&!Object.keys(n).includes(this._removePrefix(s,this._configPrefix)))),new X({config:o,bound:new Ke({defaultConfig:{...this._defaultConfig,...n},configurableFields:Array.isArray(this._configurableFields)?[...this._configurableFields]:this._configurableFields,configPrefix:this._configPrefix,queuedMethodOperations:this._queuedMethodOperations})})}async invoke(e,o){let n=await this._getModelInstance(o),r=fe(o);return n.invoke(e,r)}async stream(e,o){let n=new qt({generator:await(await this._getModelInstance(o)).stream(e,o),config:o});return await n.setup,pt.fromAsyncGenerator(n)}async batch(e,o,n){return super.batch(e,o,n)}async*transform(e,o){let n=await this._getModelInstance(o),r=fe(o);yield*n.transform(e,r)}async*streamLog(e,o,n){let r=await this._getModelInstance(o),s=fe(o);yield*r.streamLog(e,s,{...n,_schemaFormat:"original",includeNames:n?.includeNames,includeTypes:n?.includeTypes,includeTags:n?.includeTags,excludeNames:n?.excludeNames,excludeTypes:n?.excludeTypes,excludeTags:n?.excludeTags})}streamEvents(e,o,n){if(o?.version==="v1"||o?.version==="v2"){let a=this,i=o;async function*c(){let d=await a._getModelInstance(i),m={...fe(i),version:i.version,...i.encoding!==void 0?{encoding:i.encoding}:{}},h;i.version==="v1"&&i.encoding==="text/event-stream"||i.version==="v1"||i.version==="v2"&&i.encoding,h=d.streamEvents(e,m,n);for await(let u of h)yield u}return pt.fromAsyncGenerator(c())}let r=this;async function*s(){let a=await r._getModelInstance(o),i=fe(o);yield*a.streamEvents(e,i)}return new Zt(s())}get profile(){if(this._profile)return this._profile;let e=this._getCacheKey({});return this._modelInstanceCache.get(e)?.profile??{}}_getCacheKey(e){let o=e??{};if(o.configurable){let{configurable:n}=o,r={};for(let[s,a]of Object.entries(n))s.startsWith("__pregel_")||(r[s]=a);o={...o,configurable:r}}return JSON.stringify(o)}};async function re(t,e){let{configurableFields:o,configPrefix:n,modelProvider:r,profile:s,...a}={configPrefix:"",...e??{}};if(r===void 0&&t?.includes(":")){let[m,...h]=t.split(":"),u=h.length===0?[m]:[m,h.join(":")];ao.includes(u[0])&&([r,t]=u)}let i=Array.isArray(o)?[...o]:o;!t&&i===void 0&&(i=["model","modelProvider"]),n&&i===void 0&&console.warn(`{ configPrefix: ${n} } has been set but no fields are configurable. Set { configurableFields: [...] } to specify the model params that are configurable.`);let c={...a},d;return i===void 0?d=new so({defaultConfig:{...c,model:t,modelProvider:r},configPrefix:n,profile:s}):(t&&(c.model=t),r&&(c.modelProvider=r),d=new so({defaultConfig:c,configPrefix:n,configurableFields:i,profile:s})),await d._getModelInstance(),d}var Re=class extends Error{constructor(){super("The provided LLM already has bound tools. Please provide an LLM without bound tools to createAgent. The agent will bind the tools provided in the 'tools' parameter.")}},Pe=class extends Error{toolNames;constructor(t){super(`The model has called multiple tools: ${t.join(", ")} to return a structured output. This is not supported. Please provide a single structured output.`),this.toolNames=t}},ye=class extends Error{toolName;errors;constructor(t,e){super(`Failed to parse structured output for tool '${t}':${e.map(o=>`
|
|
5
5
|
- ${o}`).join("")}.`),this.toolName=t,this.errors=e}},be=class extends Error{"~brand"="ToolInvocationError";toolCall;toolError;constructor(t,e){let o=t instanceof Error?t:new Error(String(t)),n=JSON.stringify(e.args);super(`Error invoking tool '${e.name}' with kwargs ${n} with error: ${o.stack}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import c from"./OC3UQR6Z.js";import b from"./3SCRMD7A.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import{a as f}from"./
|
|
2
|
+
import c from"./OC3UQR6Z.js";import b from"./3SCRMD7A.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import{a as f}from"./AYHYABMC.js";import"./OQ3OHDEB.js";import"./I57CRKF7.js";import{K as d,L as h,N as p,Q as g,R as y,h as m,j as a}from"./3ZC26CT6.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,{b:x}])=>{var $=m`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`,n=class extends d{constructor(){super(...arguments),this.messages=f({blocking:!0}),this.icon=null,this.displayName="",this.displayNameHosted="",this.scale="s"}static{this.properties={icon:16,displayName:16,displayNameHosted:16,item:0,serviceInfo:0,portal:0,user:0,scale:3,hideText:5,hideIcon:5,ellipsis:5,showHosted:5}}static{this.styles=$}async load(){this.item&&await this.getItemDisplayInformation()}async getItemDisplayInformation(){let{messages:o,user:r,serviceInfo:l,portal:e,item:t}=this,{displayName:i,displayNameHosted:c,icon:s}=await x({item:t,messages:o,serviceInfo:l,user:r,portal:e||t.portal});this.displayName=i,this.displayNameHosted=c,this.icon=s}render(){let{showHosted:o,displayNameHosted:r,scale:l,icon:e,hideText:t,hideIcon:i,ellipsis:c}=this;if(!e)return null;let s=o?r:this.displayName,v=s?.includes("(")?"":"‭",w=y(`./assets/portal-item-type/icons/${e}16.svg`),u=this.hideText?s:void 0;return a`${!i&&a`<span class="icon"><img src=${w??p} alt=${(u||"")??p} class=${`icon icon--${l}`}></span>`||""}${!t&&a`<span class=${h({text:!0,"text--spaced":!i,"text--ellipsis":c})} .innerHTML=${`${v}${s}`}></span>`||""}`}};g("arcgis-portal-item-type",n);return n},b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as f,b as S,c as O}from"./YRLNSQ23.js";import a from"./3SCRMD7A.js";import"./4KTRAA2J.js";import{d as E}from"./H7DF6TTK.js";import"./KV4ZZSNW.js";import{c as R}from"./2FKNF2ZK.js";import{K as L,L as x,N as U,Q as P,h as I,j as y,v as M}from"./3ZC26CT6.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{execute:K},{a:v,h:w}])=>{function j(t){return t?`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`:""}function V(t){return t&&t.xmin>=-180&&t.xmax<=180&&t.ymin>=-90&&t.ymax<=90&&t.xmin<=t.xmax&&t.ymin<=t.ymax?[[t.xmin,t.ymin],[t.xmax,t.ymax]]:[[-180,-90],[180,90]]}var m=document.createElement("div");m.style.height="532px";m.style.left="-10000px";m.style.position="absolute";m.style.top="-10000px";m.style.width="800px";async function z({item:t,portal:e,serviceInfo:a}){let i=t.thumbnailUrl,n=t.url??"",r=["Map Service","Feature Service","Image Service"];if(i)return i;if(!r.includes(t.type??""))return"";if(t.type==="Map Service"||t.type==="Image Service"||n.includes("/MapServer")){let l=j(t.extent);return l?A({serviceUrl:n,extent:l,size:"800,532",format:"image",serviceInfo:a}):""}return t.type==="Feature Service"?await G(t,e):""}function A({visibleLayers:t,serviceUrl:e,serviceInfo:a,size:i,extent:n,bboxSR:r,imageSR:l,format:h}){if(!a)return"";let s=e,u=s.includes("/MapServer"),p=t,d=s.indexOf("/MapServer");if(!p&&u&&d!==-1){let g=s.indexOf("?");p=g>-1?s.substring(d+11,g):s.substring(d+11),s=g>-1?s.substring(0,d+10)+s.substring(g):s.substring(0,d+10)}u||(u=!!(a.capabilities?.toLowerCase().includes("map")||a.supportedImageFormatTypes));let c=s.indexOf("?"),o;if(c===-1)if(u)o=`${s}/export?`;else{if((a.currentVersion??0)>=10.1)return`${s}/info/thumbnail`;o=`${s}/exportImage?`}else if(u)o=`${s.substring(0,c)}/export${s.substring(c)}&`;else{if((a.currentVersion??0)>=10.1)return`${s.substring(0,c)}/info/thumbnail${s.substring(c)}`;o=`${s.substring(0,c)}/exportImage${s.substring(c)}&`}return o+=`size=${i}&bbox=${n}`,r&&(o+=`&bboxSR=${r}`),l&&(o+=`&imageSR=${l}`),u?(o+=a.supportedImageFormatTypes?.includes("PNG32")?`&format=png32&f=${h}`:`&format=png24&f=${h}`,p&&(o+=`&layers=show:${p}`)):o+=`&format=jpgpng&f=${h}&interpolation=RSP_NearestNeighbor&bandIds=null`,o}async function G(t,e){if(!e||!t.id)return"";m.isConnected||document.body.append(m);let a,i;try{let[{default:n},{default:r},{default:l},h,{default:s},{default:u},{default:p},{default:d}]=await Promise.all([$arcgis.t(m=>({default:m[0]}),"Basemap"),$arcgis.t(m=>({default:m[0]}),"layers/FeatureLayer"),$arcgis.t(m=>({default:m[0]}),"Map"),$arcgis.t(m=>m[0],"rest/print"),$arcgis.t(m=>({default:m[0]}),"rest/support/PrintParameters"),$arcgis.t(m=>({default:m[0]}),"rest/support/PrintTemplate"),$arcgis.t(m=>({default:m[0]}),"smartMapping/heuristics/scaleRange"),$arcgis.t(m=>({default:m[0]}),"views/MapView")]),c=new r({portalItem:{id:t.id,portal:e}}),o=e.defaultBasemap?.id??"",g=o.includes("basemap")?"topo-vector":new n({portalItem:{id:o,portal:e}});a=new l({basemap:g}),i=new d({map:a,container:m}),await i.when();let $=0,b=0;o.includes("basemap")||({minScale:$,maxScale:b}=await p({layer:c,view:i}));let k=await c.queryExtent();if(!k.extent)return"";await i.goTo(k.extent),c.minScale=$,c.maxScale=b,a.add(c),i.scale=b,await new Promise(D=>setTimeout(D,2e3));let N=e.helperServices?.printTask?.url??"https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task",_=new u({format:"png32",exportOptions:{dpi:96,width:800,height:532},layout:"map-only",showLabels:!1,attributionVisible:!1});return(await h.execute(N,new s({view:i,template:_}))).url??""}catch{return""}finally{i?.destroy(),a?.destroy()}}async function F({webMap:t,extent:e,portal:a,spatialReference:i}){let n=a?.helperServices?.printTask?.url;if(!n)return"";let r={Web_Map_as_JSON:JSON.stringify({...t,mapOptions:{showAttribution:!1,extent:{xmin:e[0][0],ymin:e[0][1],xmax:e[1][0],ymax:e[1][1],spatialReference:{wkid:4326}},spatialReference:i},exportOptions:{dpi:96,outputSize:[600,400]},layoutOptions:{}}),Format:"PNG32",Layout_Template:"MAP_ONLY"};return(await K(n,r)).results?.find(l=>l.dataType==="data-file")?.value?.url??""}async function W({item:t,portal:e}){let a=t.url||(e&&t.id?`${v(t.id,e)}/data`:"");if(!a||!e?.defaultBasemap)return"";let i=new URL(a),n=new URL(e.restUrl).hostname,r=E(e);r&&i.hostname===n&&i.searchParams.set("token",r);let l={baseMap:{...e.defaultBasemap.toJSON(),title:"basemap"},operationalLayers:[{url:i.toString(),id:`KML_${t.id}`,opacity:1,title:t.title,visibility:!0,type:"KML"}]};return await F({webMap:l,extent:V(t.extent),portal:e,spatialReference:{wkid:4326}})}async function B({item:t,portal:e}){if(!e||!t.id)return"";let a=v(t.id,e),i={operationalLayers:[],baseMap:{baseMapLayers:[{id:t.id,type:"VectorTileLayer",layerType:"VectorTileLayer",title:t.title,styleUrl:`${a}/resources/styles/root.json`,visibility:!0,opacity:1}],title:"Topographic"},spatialReference:{wkid:102100,latestWkid:3857},authoringApp:"WebMapViewer",authoringAppVersion:"5.3",version:"2.10"};return await F({webMap:i,extent:V(t.extent),portal:e,spatialReference:{wkid:102100}})}async function C({item:t,portal:e,serviceInfo:a}){let i=f(t),n=t.type??"",r;try{R(["Image Service","Map Service","Feature Service"],n)&&(r=await z({item:t,portal:e,serviceInfo:a})||i),n==="Vector Tile Service"&&(r=await B({item:t,portal:e})||i),n==="KML"&&(r=await W({item:t,portal:e})||i)}catch{return{error:{code:"unhandledError"}}}return{result:r??i}}function J(t,e){if(!t)return!1;let a=t.includes("thumbnail/ago_downloaded."),i=t.includes("Utilities/PrintingTools");return!t.includes("images/transparent.gif")&&(e?.isPortal?!i:!a)}function q(t,e){let a=!!e&&w(t,e),i=t.type==="Dashboard";return!S(t)&&a&&i}function H(t,e,a){let i=S(t),n=J(i,e),r=["Feature Service","Vector Tile Service"].includes(t.type)&&!n,l=t.type==="Feature Service"&&t.typeKeywords?.includes("Location Tracking Service"),h=t.typeKeywords?.includes("Table");if(t.type==="Image"||i&&!r||l||h)return!1;let s=t.typeKeywords?.includes("Tiled Imagery"),u=t.type==="Image Service"&&!s||t.type==="Map Service",p=!!a&&w(t,a);return p&&u||p&&t.type==="Feature Service"||t.type==="Vector Tile Service"||p&&t.type==="KML"}var Q=I`:host{display:block;height:100%;position:relative;width:100%}.outer{position:relative;width:100%;height:100%;aspect-ratio:3 / 2;min-height:0}.inner{position:absolute;inset:0;background-color:var(--calcite-color-background)}.inner--loading{animation:thumbnail-shimmer 1s linear infinite;background-image:linear-gradient(to right,var(--calcite-color-background) 0%,var(--calcite-color-foreground-2),var(--calcite-color-background) 40%,var(--calcite-color-background) 100%);background-repeat:no-repeat;background-size:800px 100%}.thumbnail{display:block;width:100%;height:100%;object-fit:cover;opacity:1;transition:opacity .3s linear}.thumbnail--loading{opacity:0}.fallback{display:flex;height:100%;width:100%;align-items:center;justify-content:center;background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-3)}@keyframes thumbnail-shimmer{0%{background-position:-468px 0}to{background-position:468px 0}}`,T=class extends L{constructor(){super(...arguments),this.generating=!1,this.imageError=!1,this.loading=!0,this.thumbnailUri=null,this.useDefaultThumbnail=!1,this.useProduction=!1,this.generate=!1,this.arcgisItemThumbnailGenerated=M()}static{this.properties={imageError:16,loading:16,thumbnailUri:16,useDefaultThumbnail:16,item:0,user:0,portal:0,useProduction:5,generate:5,serviceInfo:0,cacheString:1}}static{this.styles=Q}async generateThumbnail(e=!1){let{item:a,portal:i}=this;if(this.loading=!0,this.generating)return this.thumbnailUri??"";try{this.generating=!0;let n=e?f(a):await C({item:a,portal:i,serviceInfo:this.serviceInfo}),r=typeof n=="string"?n:n.result??f(a);return this.thumbnailUri=r,this.useDefaultThumbnail=!1,this.arcgisItemThumbnailGenerated.emit(r),this.generating=!1,r}catch{return this.generating=!1,""}}willUpdate(e){(e.has("item")||e.has("portal")||e.has("user")||e.has("useProduction")||e.has("cacheString")||e.has("generate"))&&this.updateThumbnail()}async updateThumbnail(){let{item:e,portal:a,user:i}=this;this.imageError=!1,this.useDefaultThumbnail=!1;let n=this.generate&&H(e,a,i),r=this.generate&&q(e,i);n&&await this.generateThumbnail()||(this.thumbnailUri=r?f(e):O(a,e,!1,this.useProduction,this.cacheString),r&&await this.generateThumbnail(!0))}render(){let e=this.thumbnailUri;return this.imageError?null:y`<div class="outer"><div class=${x({inner:!0,"inner--loading":this.loading})}>${e?y`<img class=${x({thumbnail:!0,"thumbnail--loading":this.loading})} src=${e??U} alt @load=${()=>{this.loading=!1}} @error=${()=>{if(!this.useDefaultThumbnail&&this.item){this.loading=!0,this.useDefaultThumbnail=!0,this.thumbnailUri=f(this.item);return}this.imageError=!0,this.loading=!1}}>`:null}</div></div>`}};P("arcgis-portal-item-thumbnail",T);return T},"rest/geoprocessor",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as f}from"./4KTRAA2J.js";import{d as l}from"./H7DF6TTK.js";import{
|
|
2
|
+
import{a as f}from"./4KTRAA2J.js";import{d as l}from"./H7DF6TTK.js";import{R as u}from"./3ZC26CT6.js";function v(e){let a=g(e);return u(`assets/portal-item-thumbnail/${a}`)}function g(e){let a=e.type?.toLowerCase(),r=e.typeKeywords||[];switch(a){case"web mapping application":return"webapp.avif";case"mobile application":return"mobileapp.avif";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets.avif";case"notebook":return"notebook.avif";case"style":return r.includes("Dictionary")?"dictionarystyle.avif":"style.avif";case"feature service":return r.includes("Location Tracking View")?"locationtrackingservice.avif":r.includes("IndoorPositioningDataService")?"indoor-positioning-data-service.avif":"default.avif";case"pro presentation":return"pro-presentation.avif";case"reality mapping project":return"realitymappingproject.avif";case"raster function template":return"rasterfunctiontemplate.avif";case"workforce project":return"workforceproject.avif";case"hub initiative":return"hubinitiative.avif";case"hub page":return"hubpage.avif";case"hub site application":case"site application":return"hubsite.avif";case"hub event":return"hubevent.avif";case"hub project":return"hubproject.avif";case"dashboard":return r.includes("ArcGIS Dashboards")?"dashboards.avif":"opsdashboard.avif";case"geoprocessing service":return r.includes("Notebook Web Tool")?"notebookwebtool.avif":"webtool.avif";case"web scene":case"scene service":return"scene.avif";case"ortho mapping project":return"orthomappingproject.avif";case"ortho mapping template":return"orthomappingtemplate.avif";case"insights theme":return"insightstheme.avif";case"insights workbook package":return"insightsworkbookpackage.avif";case"solution":return"solution.avif";case"mobile scene package":return"mobilescenepackage.avif";case"deep learning package":return"deeplearningpackage.avif";case"big data analytic":return"bigdataanalytic.avif";case"real time analytic":return"realtimeanalytic.avif";case"feed":return"feed.avif";case"excalibur imagery project":return"excaliburimageryproject.avif";case"storymap":return r.includes("storymapcollection")?"storymapcollection.avif":"storymap.avif";case"survey123 add in":return"survey123addin.avif";case"mission":return"mission.avif";case"mission template":return"missiontemplate.avif";case"quickcapture project":return"quickcaptureproject.avif";case"pro report":return"proreport.avif";case"pro package":return"propackage.avif";case"pro report template":return"proreporttemplate.avif";case"urban model":return"urbanmodel.avif";case"urban project":return"urbanproject.avif";case"web experience":return"webexperience.avif";case"web experience template":return"webexperiencetemplate.avif";case"experience builder widget":return"experiencebuilderwidget.avif";case"experience builder widget package":return"experiencebuilderwidgetpackage.avif";case"workflow":return"workflow.avif";case"insights script":return"insightsscript.avif";case"kernel gateway connection":return"kernelgatewayconnection.avif";case"hub initiative template":return"hubinitiativetemplate.avif";case"image service":return r.includes("Tile Imagery")?"tiledimagerylayer.avif":"imagerylayer.avif";case"mission report":return"missionreport.avif";case"administrative report":return"administrativereport.avif";case"storymap theme":return"storymaptheme.avif";case"application theme":return"applicationtheme.avif";case"knowledge graph":return"knowledgegraph.avif";case"knowledge graph configuration":return"knowledgegraphconfiguration.avif";case"knowledge graph layer":return"knowledgegraphlayer.avif";case"knowledge studio project":return"knowledgestudio.avif";case"earth configuration":return"earthconfiguration.avif";case"link chart":return"linkchart.avif";case"investigation":return"investigation.avif";case"apache parquet":return"apacheparquet.avif";case"map showcase":return"mapshowcase.avif";case"curated collection":return"curatedcollection.avif";case"video service":return"mediaservice.avif";case"geodata service":return"geodataservice.avif";case"suitability model":return"suitabilitymodel.avif";case"esri classifier definition":return"classifierdefinition.avif";case"esri spectral library":return"spectrallibrary.avif";case"deep learning studio project":return"deeplearningstudioproject.avif";case"esri classification schema":return"classificationschema.avif";case"insights data engineering workbook":return"dataengineeringworkbook.avif";case"insights data engineering model":return"dataengineeringmodel.avif";case"discussion":return"discussion.avif";case"api key":return"apikey.avif";case"data pipeline":return"datapipeline.avif";case"analysis model":return"analysismodel.avif";case"service connection":return"serviceconnection.avif";case"xr experience":return"xrexperience.avif";case"3dtiles service":return r.includes("GaussianSplat")?"gaussiansplatlayer.avif":"default.avif";default:return"default.avif"}}function m(e){return e.thumbnail??f(e).thumbnail??null}function w(e,a,r=!1,d=!1,i){let s=d?"https://www.arcgis.com/sharing/rest/":e?.restUrl;if(a.thumbnailUrl){let n=new URL(a.thumbnailUrl);return n.searchParams.append("w","400"),i&&n.searchParams.append("t",i),n.href}if(!e||!s)return v(a);let c=l(e),t=c&&!r?`token=${c}`:"",o=`${s??e.restUrl}/content/items/${a.id}`,p=m(a);return p?`${o}/info/${p}?w=400${t?`&${t}`:""}${i?`&t=${i}`:""}`:a.type==="Image"&&!r?`${o}/data?${t}`:v(a)}export{v as a,m as b,w as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{A as
|
|
2
|
+
import{A as w,B as V,C as m,D as h,E as A,F as D,G as y,l as P,z as k}from"./3ZC26CT6.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as m,b as f}from"./V6A6MKLU.js";import c from"./BULPEHX6.js";import{a as W}from"./SLQQ44IA.js";import{a as h,b as d,c as b,d as D,e as M,f as x,g as $,h as L,i as B}from"./4KTRAA2J.js";import{a as C}from"./PKA745KL.js";import a from"./TZ6HFMZZ.js";import{a as R}from"./FJ3I3AJE.js";import{L as v,M as w,O as S,R as A,h as T,j as g}from"./AICPYLWE.js";export default $arcgis.t(([{substitute:k},{a:I},_])=>{var z=T`.badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #dfeffa);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #00619b);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #00619b);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #dfeffa);border:0}.badge--colored{--calcite-chip-icon-color: var(--calcite-color-brand)}.authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #e4f0e4);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #1a6324);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #1a6324);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #e4f0e4)}.deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #fadfdc);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #a82b1e);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #a82b1e);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #fadfdc)}.beta{border:0}.narrow{box-sizing:border-box;width:2rem;--calcite-chip-spacing-unit-l: 0}.narrow--s{width:1.5rem}.narrow--l{width:2.75rem}.tooltip-title{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1);margin:0 0 .25rem;padding:0}.tooltip-text{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-1);margin:0;padding:0}:host-context(.calcite-mode-dark) .badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #214155);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #9fd4f3);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #9fd4f3);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #214155)}:host-context(.calcite-mode-dark) .authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #2b472a);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #a2e4ab);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #a2e4ab);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #2b472a)}:host-context(.calcite-mode-dark) .deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #5e241e);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #5e241e)}`,U=["Operations Dashboard Add In","Operations Dashboard Extension","Operation View","CityEngine Web Scene","Big Data File Share","Globe Document","Map Document","Published Map","Scene Document","Map Template","Mobile Basemap Package","Desktop Add In"],J=["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","StorytellingSwipe"],j={"Geoprocessing Package":".gpk",Layer:".lyr","Layer Package":".lpk","Map Package":".mpk","Scene Package":".spk"},O="",F="template_name";function V(e){let t=decodeURIComponent(e.url||h(e).url||"");return J.find(i=>t.includes(`/apps/${i}/index.html`))}function N(e){return M(e)}function Q(e){return x(e)}function X(e){return $(e)}function E(e){return e.type==="Web Mapping Application"&&p(e,["Web AppBuilder","AppBuilder Extension"])}function P(e,t){return(t?.isPortal??!1)&&d(e).includes("AppBuilder Extension")}function p(e,t){return e.typeKeywords?.some(i=>t.includes(i))}function Y(e,t){return K(e,t)&&!q(e,t)}function K(e,t){let i=["HTML3D/HTML","App Builder","Widget"],a=["HTML3D/HTML","Web AppBuilder","Widget"],r=e.type==="Web Mapping Application",n=r&&p(e,["Web AppBuilder"]),l=r&&p(e,["WABTemplate"]),c=e.type==="AppBuilder Widget Package"&&p(e,i),o=e.type==="Web AppBuilder Widget"&&p(e,a),s=!!e?.owner?.startsWith("esri_")&&r&&p(e,["Web AppBuilder for ArcGIS"]);return n||l||c||o||P(e,t)||s}function Z(e,t){return t?.isPortal&&["Insights Workbook","Insights Page","Insights Model","Insights Theme","Insights Workbook Package","Kernel Gateway Connection","Insights Script","Insights Data Engineering Workbook","Insights Data Engineering Model","Relational Database Connection"].includes(e.type||"")}var q=(e,t)=>(t?.isPortal??!1)&&(E(e)||P(e,t)||m(e)||Z(e,t));function ee(e,t,i){return e.type===t&&(h(e).name?.endsWith(i)??!1)}function te(e){return Object.entries(j).some(([t,i])=>ee(e,t,i))}function ie(e,t){return U.includes(e.type)||te(e)||f(e)||N(e)||m(e)||q(e,t)}function ae(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Credits")}function re(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Subscription")}function oe(e){return b(e)==="org_authoritative"}function G(e){return b(e)==="public_authoritative"}function se(e,t){return t==="Registered API Key Credentials (Standard)"||t==="Registered OAuth 2.0 Credentials (Standard)"?O:e[t].title||O}function Se(e,t,i){let a=[],r=d(e),n=h(e),l=D(e);if((oe(e)||G(e))&&a.push("Authoritative"),b(e)==="deprecated"&&a.push("Deprecated"),Y(e,t)&&a.push("DeprecatedItemType"),L(e)&&a.push("Beta"),e.type==="Solution"&&r.includes("ArcGIS Solution")&&a.push("Solution"),r.includes("Public Data Collection")&&i&&a.push("Public Data Collection"),ie(e,t)&&a.push("Retired"),l.includes("livingatlas")&&a.push("Living Atlas"),l.includes("opendata")&&a.push("Open Data"),ae(e)&&a.push("Premium"),re(e)&&a.push("Subscriber"),n.origin&&a.push("Collaboration"),e.owner!=="esri_apps"&&n.listed&&!t?.isPortal&&a.push("Marketplace"),r.includes("Registered App")){let c=t?.isPortal??!1;if(e.type!=="API Key"&&(!c||e.owner!=="esri_apps")){let o=r.includes("APIToken"),s=r.includes("Personal API Token")&&!c;o?a.push(s?"Registered API Key Credentials (Personal)":"Registered API Key Credentials (Standard)"):a.push(s?"Registered OAuth 2.0 Credentials (Personal)":"Registered OAuth 2.0 Credentials (Standard)")}}return r.includes("hasReplacementItem")&&a.push("Has Replacement"),a}function ne({badgeType:e,i18n:t,portal:i}){let a=i?.isPortal??!1;if(e==="Registered API Key Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}if(e==="Registered OAuth 2.0 Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}return se(t,e)}function le(e){let t={MapSeries:"Series",MapJournal:"Journal",SwipeSpyglass:"Swipe & Spyglass",Shortlist:"Shortlist",Cascade:"Cascade",MapTour:"Tour",StoryMapCrowdsource:"Crowdsource",StorytellingSwipe:"Swipe & Spyglass"},i=d(e).find(r=>r in t);if(i)return t[i];let a=V(e);return a&&t[a]||!1}async function ce({badgeType:e,i18n:t,item:i,locale:a,portal:r,user:n,useProduction:l}){let c=!n||W(n);switch(e){case"Authoritative":{if(G(i)){let o=await _(i,a,r,l),s=t.Authoritative.tooltip,u=r?.isPortal&&!l?r?.name:o?.name||r?.name||i.owner;return k(s.public,{name:u||""})}return t.Authoritative.tooltip.org}case"Deprecated":{let o=i.owner||"",s=await I(o,r,l),u=C(s,a);return k(t.Deprecated.tooltip,{owner:u})}case"DeprecatedItemType":{let o=t.DeprecatedItemType.tooltip;return K(i,r)?o.webAppBuilder:o.general}case"Retired":{let o=t.Retired.tooltip;if(f(i)){let s=le(i);if(s){let u={[F]:s};return k(o.classicStoryMap,u)}return o.classicStoryMapGeneric}return X(i)?o.cityEngine:E(i)||P(i,r)?o.webAppBuilder:m(i)?o.app:Q(i)?o.bdfs:o.general}case"Subscriber":{let o=t.Subscriber.tooltip;return c?o.public:o.org}case"Premium":{let o=t.Premium.tooltip;return c?o.public:o.org}case"Registered":{let o=t.Registered.tooltip;return r?.isPortal?o.enterprise:o.online}case"Personal credential":return t["Personal credential"].tooltip;case"Has Replacement":{let o=t["Has Replacement"];return r.isPortal?(globalThis.location?.href||"").includes("item.html")?o.itemPageTooltip:o.tooltip:o.itemPageTooltip}default:return t[e].tooltip}}function de({badgeType:e,i18n:t,item:i,portal:a}){if(e!=="Has Replacement"||a.isPortal)return null;let r=B(i);return r?{title:t["Has Replacement"].link,href:pe({portal:a,itemId:r})}:null}function pe({itemId:e,portal:t}){return t?.restUrl?`${t.restUrl.replace("sharing/rest","home")}/item.html?id=${e}`:""}function H(){return{loading:!1,title:"",tooltip:"",tooltipLink:null}}var y=class extends v{constructor(){super(...arguments),this._messages=R({name:"portal-item-badges",blocking:!0}),this.tooltipRequestId=0,this.tooltipId=`portal-item-badge-${Math.random().toString(36).slice(2,10)}`,this.details=H(),this.width="full",this.scale="m",this.showTooltip=!1}static{this.properties={details:16,item:0,portal:0,user:0,badgeType:1,width:1,appearance:1,scale:1,showTooltip:5,useProduction:5}}static{this.styles=z}willUpdate(t){(t.has("badgeType")||t.has("item")||t.has("portal")||t.has("user")||t.has("showTooltip")||t.has("useProduction"))&&this.loadDetails()}loadDetails(){if(!this.badgeType||!this.portal){this.details=H();return}let t=ne({badgeType:this.badgeType,i18n:this._messages,portal:this.portal}),i=this.item&&this.portal?de({badgeType:this.badgeType,i18n:this._messages,item:this.item,portal:this.portal}):null;if(!this.showTooltip||!this.item){this.details={loading:!1,title:t,tooltip:"",tooltipLink:i};return}let a=++this.tooltipRequestId;this.details={loading:!0,title:t,tooltip:"",tooltipLink:i},ce({badgeType:this.badgeType,i18n:this._messages,item:this.item,locale:this._messages._lang||"en",portal:this.portal,user:this.user,useProduction:this.useProduction}).then(r=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:r,tooltipLink:i})}).catch(()=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:"",tooltipLink:i})})}render(){if(!this.badgeType)return null;let t=ue[this.badgeType],i=this.width==="narrow",a=this.showTooltip&&(this.details.loading||!!this.details.tooltip||!!this.details.tooltipLink),r={badge:this.badgeType!=="Beta","badge--colored":this.badgeType==="Living Atlas"||this.badgeType==="Open Data"||this.badgeType==="Solution",beta:this.badgeType==="Beta",authoritative:this.badgeType==="Authoritative",deprecated:this.badgeType==="Deprecated"||this.badgeType==="DeprecatedItemType",narrow:i,[`narrow--${this.scale}`]:i};return g`<calcite-chip id=${this.tooltipId??S} class=${w(r)} .value=${this.badgeType} .tabIndex=${this.showTooltip?0:-1} .scale=${this.scale} .appearance=${this.appearance} .label=${this.details.title} .icon=${t}>${i?null:this.details.title}</calcite-chip>${a?g`<calcite-tooltip .referenceElement=${this.tooltipId} close-on-click placement=bottom-start overlay-positioning=fixed offset-distance=6 offset-skidding=0>${i?g`<h3 class="tooltip-title">${this.details.title}</h3>`:null}<p class="tooltip-text"><calcite-loader .hidden=${!this.details.loading} .label=${this._messages.loading} inline scale=s></calcite-loader>${this.details.loading?this._messages.loading:this.details.tooltip}</p>${this.details.tooltipLink?g`<calcite-link @click=${n=>n.stopPropagation()} icon-end=launch .href=${this.details.tooltipLink.href} target=_blank>${this.details.tooltipLink.title}</calcite-link>`:null}</calcite-tooltip>`:null}`}},ue={Authoritative:"check-circle",Beta:"beaker",Collaboration:"collaboration-distributed",Deprecated:"circle-disallowed",DeprecatedItemType:"exclamation-mark-triangle","Has Replacement":"arrow-right-left","Living Atlas":"arcgis-living-atlas",Marketplace:"marketplace","Open Data":"open-data","Personal credential":"user-key",Premium:"shield-coin","Public Data Collection":"pencil",Registered:"key","Registered API Key Credentials (Personal)":"key","Registered API Key Credentials (Standard)":"key","Registered Application":"app-gear","Registered OAuth 2.0 Credentials (Personal)":"app-gear","Registered OAuth 2.0 Credentials (Standard)":"app-gear",Retired:"exclamation-mark-triangle",Solution:"arcgis-solutions",Subscriber:"security"};A("arcgis-portal-item-badge",y);return{a:Se,b:y}},"intl",a,c)
|
|
2
|
+
import{a as m,b as f}from"./V6A6MKLU.js";import c from"./BULPEHX6.js";import{a as W}from"./SLQQ44IA.js";import{a as h,b as d,c as b,d as D,e as M,f as x,g as $,h as L,i as B}from"./4KTRAA2J.js";import{a as C}from"./PKA745KL.js";import a from"./TZ6HFMZZ.js";import{a as R}from"./AYHYABMC.js";import{K as v,L as w,N as S,Q as A,h as T,j as g}from"./3ZC26CT6.js";export default $arcgis.t(([{substitute:k},{a:I},_])=>{var z=T`.badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #dfeffa);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #00619b);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #00619b);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #dfeffa);border:0}.badge--colored{--calcite-chip-icon-color: var(--calcite-color-brand)}.authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #e4f0e4);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #1a6324);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #1a6324);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #e4f0e4)}.deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #fadfdc);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #a82b1e);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #a82b1e);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #fadfdc)}.beta{border:0}.narrow{box-sizing:border-box;width:2rem;--calcite-chip-spacing-unit-l: 0}.narrow--s{width:1.5rem}.narrow--l{width:2.75rem}.tooltip-title{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1);margin:0 0 .25rem;padding:0}.tooltip-text{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-1);margin:0;padding:0}:host-context(.calcite-mode-dark) .badge{--calcite-color-foreground-2: var(--arcgis-item-badge-info-background, #214155);--calcite-color-text-1: var(--arcgis-item-badge-info-foreground, #9fd4f3);--arcgis-item-badge-color: var(--arcgis-item-badge-info-foreground, #9fd4f3);--calcite-chip-background-color: var(--arcgis-item-badge-info-background, #214155)}:host-context(.calcite-mode-dark) .authoritative{--calcite-color-foreground-2: var(--arcgis-item-badge-success-background, #2b472a);--calcite-color-text-1: var(--arcgis-item-badge-success-foreground, #a2e4ab);--arcgis-item-badge-color: var(--arcgis-item-badge-success-foreground, #a2e4ab);--calcite-chip-background-color: var(--arcgis-item-badge-success-background, #2b472a)}:host-context(.calcite-mode-dark) .deprecated{--calcite-color-foreground-2: var(--arcgis-item-badge-danger-background, #5e241e);--calcite-color-text-1: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--arcgis-item-badge-color: var(--arcgis-item-badge-danger-foreground, #ffaaa1);--calcite-chip-background-color: var(--arcgis-item-badge-danger-background, #5e241e)}`,U=["Operations Dashboard Add In","Operations Dashboard Extension","Operation View","CityEngine Web Scene","Big Data File Share","Globe Document","Map Document","Published Map","Scene Document","Map Template","Mobile Basemap Package","Desktop Add In"],J=["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","StorytellingSwipe"],j={"Geoprocessing Package":".gpk",Layer:".lyr","Layer Package":".lpk","Map Package":".mpk","Scene Package":".spk"},O="",F="template_name";function V(e){let t=decodeURIComponent(e.url||h(e).url||"");return J.find(i=>t.includes(`/apps/${i}/index.html`))}function N(e){return M(e)}function Q(e){return x(e)}function X(e){return $(e)}function E(e){return e.type==="Web Mapping Application"&&p(e,["Web AppBuilder","AppBuilder Extension"])}function P(e,t){return(t?.isPortal??!1)&&d(e).includes("AppBuilder Extension")}function p(e,t){return e.typeKeywords?.some(i=>t.includes(i))}function Y(e,t){return K(e,t)&&!q(e,t)}function K(e,t){let i=["HTML3D/HTML","App Builder","Widget"],a=["HTML3D/HTML","Web AppBuilder","Widget"],r=e.type==="Web Mapping Application",n=r&&p(e,["Web AppBuilder"]),l=r&&p(e,["WABTemplate"]),c=e.type==="AppBuilder Widget Package"&&p(e,i),o=e.type==="Web AppBuilder Widget"&&p(e,a),s=!!e?.owner?.startsWith("esri_")&&r&&p(e,["Web AppBuilder for ArcGIS"]);return n||l||c||o||P(e,t)||s}function Z(e,t){return t?.isPortal&&["Insights Workbook","Insights Page","Insights Model","Insights Theme","Insights Workbook Package","Kernel Gateway Connection","Insights Script","Insights Data Engineering Workbook","Insights Data Engineering Model","Relational Database Connection"].includes(e.type||"")}var q=(e,t)=>(t?.isPortal??!1)&&(E(e)||P(e,t)||m(e)||Z(e,t));function ee(e,t,i){return e.type===t&&(h(e).name?.endsWith(i)??!1)}function te(e){return Object.entries(j).some(([t,i])=>ee(e,t,i))}function ie(e,t){return U.includes(e.type)||te(e)||f(e)||N(e)||m(e)||q(e,t)}function ae(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Credits")}function re(e){return(e.owner||"").toLowerCase().includes("esri")&&d(e).includes("Requires Subscription")}function oe(e){return b(e)==="org_authoritative"}function G(e){return b(e)==="public_authoritative"}function se(e,t){return t==="Registered API Key Credentials (Standard)"||t==="Registered OAuth 2.0 Credentials (Standard)"?O:e[t].title||O}function Se(e,t,i){let a=[],r=d(e),n=h(e),l=D(e);if((oe(e)||G(e))&&a.push("Authoritative"),b(e)==="deprecated"&&a.push("Deprecated"),Y(e,t)&&a.push("DeprecatedItemType"),L(e)&&a.push("Beta"),e.type==="Solution"&&r.includes("ArcGIS Solution")&&a.push("Solution"),r.includes("Public Data Collection")&&i&&a.push("Public Data Collection"),ie(e,t)&&a.push("Retired"),l.includes("livingatlas")&&a.push("Living Atlas"),l.includes("opendata")&&a.push("Open Data"),ae(e)&&a.push("Premium"),re(e)&&a.push("Subscriber"),n.origin&&a.push("Collaboration"),e.owner!=="esri_apps"&&n.listed&&!t?.isPortal&&a.push("Marketplace"),r.includes("Registered App")){let c=t?.isPortal??!1;if(e.type!=="API Key"&&(!c||e.owner!=="esri_apps")){let o=r.includes("APIToken"),s=r.includes("Personal API Token")&&!c;o?a.push(s?"Registered API Key Credentials (Personal)":"Registered API Key Credentials (Standard)"):a.push(s?"Registered OAuth 2.0 Credentials (Personal)":"Registered OAuth 2.0 Credentials (Standard)")}}return r.includes("hasReplacementItem")&&a.push("Has Replacement"),a}function ne({badgeType:e,i18n:t,portal:i}){let a=i?.isPortal??!1;if(e==="Registered API Key Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}if(e==="Registered OAuth 2.0 Credentials (Standard)"){let r=t[e].title;return a?r.enterprise:r.online}return se(t,e)}function le(e){let t={MapSeries:"Series",MapJournal:"Journal",SwipeSpyglass:"Swipe & Spyglass",Shortlist:"Shortlist",Cascade:"Cascade",MapTour:"Tour",StoryMapCrowdsource:"Crowdsource",StorytellingSwipe:"Swipe & Spyglass"},i=d(e).find(r=>r in t);if(i)return t[i];let a=V(e);return a&&t[a]||!1}async function ce({badgeType:e,i18n:t,item:i,locale:a,portal:r,user:n,useProduction:l}){let c=!n||W(n);switch(e){case"Authoritative":{if(G(i)){let o=await _(i,a,r,l),s=t.Authoritative.tooltip,u=r?.isPortal&&!l?r?.name:o?.name||r?.name||i.owner;return k(s.public,{name:u||""})}return t.Authoritative.tooltip.org}case"Deprecated":{let o=i.owner||"",s=await I(o,r,l),u=C(s,a);return k(t.Deprecated.tooltip,{owner:u})}case"DeprecatedItemType":{let o=t.DeprecatedItemType.tooltip;return K(i,r)?o.webAppBuilder:o.general}case"Retired":{let o=t.Retired.tooltip;if(f(i)){let s=le(i);if(s){let u={[F]:s};return k(o.classicStoryMap,u)}return o.classicStoryMapGeneric}return X(i)?o.cityEngine:E(i)||P(i,r)?o.webAppBuilder:m(i)?o.app:Q(i)?o.bdfs:o.general}case"Subscriber":{let o=t.Subscriber.tooltip;return c?o.public:o.org}case"Premium":{let o=t.Premium.tooltip;return c?o.public:o.org}case"Registered":{let o=t.Registered.tooltip;return r?.isPortal?o.enterprise:o.online}case"Personal credential":return t["Personal credential"].tooltip;case"Has Replacement":{let o=t["Has Replacement"];return r.isPortal?(globalThis.location?.href||"").includes("item.html")?o.itemPageTooltip:o.tooltip:o.itemPageTooltip}default:return t[e].tooltip}}function de({badgeType:e,i18n:t,item:i,portal:a}){if(e!=="Has Replacement"||a.isPortal)return null;let r=B(i);return r?{title:t["Has Replacement"].link,href:pe({portal:a,itemId:r})}:null}function pe({itemId:e,portal:t}){return t?.restUrl?`${t.restUrl.replace("sharing/rest","home")}/item.html?id=${e}`:""}function H(){return{loading:!1,title:"",tooltip:"",tooltipLink:null}}var y=class extends v{constructor(){super(...arguments),this._messages=R({name:"portal-item-badges",blocking:!0}),this.tooltipRequestId=0,this.tooltipId=`portal-item-badge-${Math.random().toString(36).slice(2,10)}`,this.details=H(),this.width="full",this.scale="m",this.showTooltip=!1}static{this.properties={details:16,item:0,portal:0,user:0,badgeType:1,width:1,appearance:1,scale:1,showTooltip:5,useProduction:5}}static{this.styles=z}willUpdate(t){(t.has("badgeType")||t.has("item")||t.has("portal")||t.has("user")||t.has("showTooltip")||t.has("useProduction"))&&this.loadDetails()}loadDetails(){if(!this.badgeType||!this.portal){this.details=H();return}let t=ne({badgeType:this.badgeType,i18n:this._messages,portal:this.portal}),i=this.item&&this.portal?de({badgeType:this.badgeType,i18n:this._messages,item:this.item,portal:this.portal}):null;if(!this.showTooltip||!this.item){this.details={loading:!1,title:t,tooltip:"",tooltipLink:i};return}let a=++this.tooltipRequestId;this.details={loading:!0,title:t,tooltip:"",tooltipLink:i},ce({badgeType:this.badgeType,i18n:this._messages,item:this.item,locale:this._messages._lang||"en",portal:this.portal,user:this.user,useProduction:this.useProduction}).then(r=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:r,tooltipLink:i})}).catch(()=>{a===this.tooltipRequestId&&(this.details={loading:!1,title:t,tooltip:"",tooltipLink:i})})}render(){if(!this.badgeType)return null;let t=ue[this.badgeType],i=this.width==="narrow",a=this.showTooltip&&(this.details.loading||!!this.details.tooltip||!!this.details.tooltipLink),r={badge:this.badgeType!=="Beta","badge--colored":this.badgeType==="Living Atlas"||this.badgeType==="Open Data"||this.badgeType==="Solution",beta:this.badgeType==="Beta",authoritative:this.badgeType==="Authoritative",deprecated:this.badgeType==="Deprecated"||this.badgeType==="DeprecatedItemType",narrow:i,[`narrow--${this.scale}`]:i};return g`<calcite-chip id=${this.tooltipId??S} class=${w(r)} .value=${this.badgeType} .tabIndex=${this.showTooltip?0:-1} .scale=${this.scale} .appearance=${this.appearance} .label=${this.details.title} .icon=${t}>${i?null:this.details.title}</calcite-chip>${a?g`<calcite-tooltip .referenceElement=${this.tooltipId} close-on-click placement=bottom-start overlay-positioning=fixed offset-distance=6 offset-skidding=0>${i?g`<h3 class="tooltip-title">${this.details.title}</h3>`:null}<p class="tooltip-text"><calcite-loader .hidden=${!this.details.loading} .label=${this._messages.loading} inline scale=s></calcite-loader>${this.details.loading?this._messages.loading:this.details.tooltip}</p>${this.details.tooltipLink?g`<calcite-link @click=${n=>n.stopPropagation()} icon-end=launch .href=${this.details.tooltipLink.href} target=_blank>${this.details.tooltipLink.title}</calcite-link>`:null}</calcite-tooltip>`:null}`}},ue={Authoritative:"check-circle",Beta:"beaker",Collaboration:"collaboration-distributed",Deprecated:"circle-disallowed",DeprecatedItemType:"exclamation-mark-triangle","Has Replacement":"arrow-right-left","Living Atlas":"arcgis-living-atlas",Marketplace:"marketplace","Open Data":"open-data","Personal credential":"user-key",Premium:"shield-coin","Public Data Collection":"pencil",Registered:"key","Registered API Key Credentials (Personal)":"key","Registered API Key Credentials (Standard)":"key","Registered Application":"app-gear","Registered OAuth 2.0 Credentials (Personal)":"app-gear","Registered OAuth 2.0 Credentials (Standard)":"app-gear",Retired:"exclamation-mark-triangle",Solution:"arcgis-solutions",Subscriber:"security"};A("arcgis-portal-item-badge",y);return{a:Se,b:y}},"intl",a,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import g from"./R7XRTDY6.js";import"./SRWFOV5W.js";import"./JOUR2FB2.js";import f from"./7HOK3ICE.js";import"./4QYVBXZT.js";import e from"./36WCJDSE.js";import"./4KTRAA2J.js";import d from"./3K3BYENR.js";import"./PKA745KL.js";import"./VDXESPJK.js";import"./DAAON2UO.js";import c from"./TZ6HFMZZ.js";import b from"./TIPQ2ZWK.js";import"./57MT7FOI.js";import"./4XIHI6AF.js";import a from"./C5IKEISI.js";import"./H7DF6TTK.js";import"./KV4ZZSNW.js";import"./2FKNF2ZK.js";import"./AYHYABMC.js";import"./OQ3OHDEB.js";import"./I57CRKF7.js";import{Q as r}from"./3ZC26CT6.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,,,e])=>{var t=class extends e{constructor(){super(...arguments),this.entityType="group",this.selected=null}static{this.properties={entityType:32,selected:0}}};r("arcgis-portal-group-picker",t);return t},a,b,c,d,e,f,g)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as l,c}from"./VDXESPJK.js";import"./DAAON2UO.js";import{
|
|
2
|
+
import{a as l,c}from"./VDXESPJK.js";import"./DAAON2UO.js";import{K as a,L as s,M as n,Q as i,h as r,j as e}from"./3ZC26CT6.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var m=r`:host{display:block}.banner{font-weight:var(--calcite-font-weight-bold);font-size:var(--calcite-font-size-0);line-height:1.25rem;font-family:var(--calcite-sans-family);text-align:center;padding:.75rem 2rem;border-bottom:1px solid var(--calcite-color-border-1)}.banner--bottom{border-bottom:none;border-top:1px solid var(--calcite-color-border-1)}.banner__text{margin:0;padding:0;overflow-wrap:break-word}`,t=class extends a{constructor(){super(...arguments),this.position="top"}static{this.properties={config:0,position:1}}static{this.styles=m}render(){let{position:b,config:o}=this;return o?.enabled?e`<div style=${n({backgroundColor:o.bgColor,color:o.fontColor})} class=${s({banner:!0,"banner--bottom":b==="bottom"})}><p class="banner__text">${l(c(o.text))}</p></div>`:null}};i("arcgis-portal-info-banner",t);export{t as ArcgisPortalInfoBanner};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import c from"./5CBLAWTC.js";import b from"./5SKCVK2P.js";import a from"./C5FTQSU6.js";import"./2FKNF2ZK.js";import"./AYHYABMC.js";import"./OQ3OHDEB.js";import"./I57CRKF7.js";import"./3ZC26CT6.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
|