@arcgis/portal-components 6.0.0-next.29 → 6.0.0-next.30

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.
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import b from"./W5AV2JMK.js";import a from"./OQ2JULON.js";import"./4VLEUN7I.js";import"./KV4ZZSNW.js";import{c as O}from"./FN2QMDEW.js";import{a as S}from"./WQOCWSJC.js";import{f as P}from"./XX6BL3DR.js";import"./657KMT6Y.js";import{K as q,Q as F,g as h,h as _,j as y,v as g}from"./OUFJRLPQ.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([z,L,b,{d:T},{r:V}])=>{var G=_`: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 D({item:t,layers:e}){let{url:a}=t,l=new Map;if(!a)return{result:l};try{let s=(await b(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 r=(await b(`${i}/${n}`,{cacheBust:!0,query:{f:"json"},responseType:"json"})).data;l.set(n,r.fields??[])})),{result:l}}catch(s){return console.error("Error getting layer fields:",s),{error:{code:"unhandledError"}}}}var w=t=>{let{url:e}=t;return e?e.replace("/rest/services","/rest/admin/services").replace(/\/$/u,""):null};async function x({fields:t,item:e,portal:a,layerId:l}){let s=w(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await T({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 R({fields:t,item:e,portal:a,layerId:l}){let s=w(e);if(!s)return{error:{code:"unhandledError",message:"A feature service URL is required."}};try{let i=await T({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 E(t){let{url:e}=t;if(!e)return{error:{code:"unhandledError"}};try{return{result:(await b(e,{query:{f:"json"}})).data}}catch(a){return console.error("Error getting service info:",a),{error:{code:"unhandledError"}}}}var M=(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.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.range[0]===l.range[0]&&a.range[1]===l.range[1]:!0},N=(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?M(i,n)||s.push({name:i.name,domain:i.domain}):l.push(i)}return{missingFields:l,modifiedFields:s}},k=t=>{switch(t){case"esriGeometryPolyline":case"esriGeometryPolygon":return[...$];case"esriGeometryPoint":return[...B];default:return[]}},I=t=>t==="esriGeometryPoint"?[...U]:[],v=t=>t==="esriGeometryPoint"?[...K]:[],$=[{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}],B=[{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}],U=[{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}],K=[{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 Y(t){if(t.geometryType==="polyline"||t.geometryType==="polygon"){let e=t.capabilities;return e?.data?.supportsAttachment&&e?.operations?.supportsQueryAttachments}return!0}var H=t=>t.every(Y),j=["point","polyline","polygon"],W=t=>t?.type==="Feature Service",C=t=>W(t)&&!t.typeKeywords.some(e=>["View Service","Multi Services View"].includes(e)),f=class extends q{constructor(){super(...arguments),this.messages=S({blocking:!0}),this.initCount=0,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.canShowAddGPSMetadata=!1,this.supportsAttachments=!0,this.areSourceSchemaChangesAllowed=!0,this.messageOverrides={},this.arcgisPropertyChange=P()("canShowAddGPSMetadata","supportsAttachments","areSourceSchemaChangesAllowed"),this.arcgisGPSMetadataFieldsAdded=g(),this.arcgisReadOnlyMode=g()}static{this.properties={loadedItem:16,gpsFieldFixesBySet:16,addFieldsDisabled:16,initializing:16,hasLineOrPolygonLayer:16,hasPointFeatureLayer:16,addingGPSFieldMetadata:16,item:0,itemId:1,portal:0,canShowAddGPSMetadata:32,supportsAttachments:32,areSourceSchemaChangesAllowed:32,messageOverrides:0}}static{this.styles=G}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.initItem()}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;if(l?.type&&!C(l)){this.resetItemState(),this.initializing=!1;return}let n=l?await l.load():await new L({id:s,portal:i}).load();if(!this.isCurrentInitialization(a))return;if(!C(n)){this.resetItemState(),this.initializing=!1;return}this.loadedItem=n;let r=!e&&this.layersLoaded?[...this.pointLayers,...this.lineOrPolygonLayers]:await this.getFeatureLayers(n);if(!this.isCurrentInitialization(a))return;if(r.length===0){this.resetItemState(),this.initializing=!1;return}let m=await V(n.id,n.portal,{relationshipType:"Service2Service"});if(!this.isCurrentInitialization(a))return;if(m?.data?.relatedItems?.some(o=>["WMTS","Map Service","Vector Tile Service"].includes(o.type))){this.resetItemState(),this.initializing=!1;return}this.layersLoaded=!0,this.pointLayers=r.filter(o=>o.geometryType==="point"),this.lineOrPolygonLayers=r.filter(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasLineOrPolygonLayer=r.some(o=>o.geometryType==="polyline"||o.geometryType==="polygon"),this.hasPointFeatureLayer=r.some(o=>o.geometryType==="point"),h(()=>this.canShowAddGPSMetadata=!0);let{result:u}=await E(n);if(!this.isCurrentInitialization(a))return;let{result:c,error:d}=await D({item:n,layers:r});if(!this.isCurrentInitialization(a))return;if(d){this.resetItemState(),this.initializing=!1;return}let p=c??new Map;this.gpsFieldFixesBySet={base:this.analyzeFieldSet([...this.pointLayers,...this.lineOrPolygonLayers],p,"base"),gnss:this.analyzeFieldSet(this.pointLayers,p,"gnss"),rangefinder:this.analyzeFieldSet(this.pointLayers,p,"rangefinder")},h(()=>{this.supportsAttachments=H(r),this.areSourceSchemaChangesAllowed=u?.sourceSchemaChangesAllowed!==!1}),this.addFieldsDisabled=!this.supportsAttachments||!this.areSourceSchemaChangesAllowed,this.initializing=!1}isCurrentInitialization(e){return e===this.initCount}resetItemState(){h(()=>{this.canShowAddGPSMetadata=!1,this.supportsAttachments=!0,this.areSourceSchemaChangesAllowed=!0}),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 z.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){let a=e;return e.type==="feature"&&j.some(l=>l===a.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)??[],r=this.getCompatibleEsriGeometryType(i),m=r?l==="base"?k(r):l==="gnss"?I(r):v(r):[],u=N(m,n);(u.missingFields.length>0||u.modifiedFields.length>0)&&s.push({layerId:i.layerId,fieldsToAdd:u.missingFields,domainsToUpdate:u.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)return;if(a.isReadOnly){this.arcgisReadOnlyMode.emit();return}this.addingGPSFieldMetadata=[...this.addingGPSFieldMetadata,e];let i=[...this.pointLayers,...this.lineOrPolygonLayers];try{let n=s[e],r=(await Promise.all(n.filter(({fieldsToAdd:d})=>d.length>0).map(async({fieldsToAdd:d,layerId:p})=>await x({fields:d,item:l,layerId:p,portal:a})))).every(({error:d})=>!d),m=r?await Promise.all(n.filter(({domainsToUpdate:d})=>d.length>0).map(async({domainsToUpdate:d,layerId:p})=>await R({fields:d,item:l,layerId:p,portal:a}))):[],u=r&&m.every(({error:d})=>!d);if(!u||this.loadedItem!==l)return;let c;if(await O(async()=>{if(this.loadedItem!==l)return!0;let{result:d,error:p}=await D({item:l,layers:i});if(p||this.loadedItem!==l)return!0;if(!d)return!1;let o=e==="base"?i:i.filter(A=>A.geometryType==="point");return this.analyzeFieldSet(o,d,e).length>0?!1:(c=d,!0)},10)||console.warn("Fields were not verified on the service.",{itemId:l.id,fieldSet:e}),!c||this.loadedItem!==l)return;await this.initItem({showLoading:!1}),r&&u&&this.gpsFieldFixesBySet&&!this.hasFieldChanges(e)&&this.arcgisGPSMetadataFieldsAdded.emit(e)}finally{this.addingGPSFieldMetadata=this.addingGPSFieldMetadata.filter(n=>n!==e)}}showAdvancedFields(){let e=this.gpsFieldFixesBySet;return!this.hasPointFeatureLayer||!e?!1:this.hasFieldChanges("base")?this.pointLayers.some(a=>a.layerId==null?!1:["gnss","rangefinder"].some(l=>{let s=l==="gnss"?I("esriGeometryPoint"):v("esriGeometryPoint");return(e[l].find(({layerId:i})=>i===a.layerId)?.fieldsToAdd??[]).length<s.length})):!0}renderAddFieldsControl(e,a=!1){let l=this.gpsFieldFixesBySet;if(!a&&l&&!this.hasFieldChanges(e))return y`<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 y`<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?y`<div class="scrim-container"><calcite-block scale=m expanded>${this.initializing&&y`<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()&&y`<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}};F("arcgis-portal-add-gps-metadata",f);return f},"layers/Layer","portal/PortalItem","request",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"./365ICWHN.js";import b from"./TIPQ2ZWK.js";import{a as R}from"./S4Y7FPSQ.js";import{a as F}from"./MLTZSPZQ.js";import{a as N}from"./2W3O3KBH.js";import a from"./OQ2JULON.js";import"./4VLEUN7I.js";import"./KV4ZZSNW.js";import{b as E}from"./FN2QMDEW.js";import{a as J}from"./WQOCWSJC.js";import"./XX6BL3DR.js";import"./657KMT6Y.js";import{I as y,J as S,K as x,L as T,N as K,Q as M,j as d,k as L,v as A}from"./OUFJRLPQ.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([p,{substitute:w},,,{f:H,g:W,h:D,i:B}])=>{var O=1260*1e3,z=2500;function j(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 G(o){let t=p.findOAuthInfo(o.url),{locale:i="en",expiration:e=O}=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()}`;j(n)}function b(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 Q(o,t,i){let e=h(o.orgUrlKey,t),s=p.findOAuthInfo(e),{appId:n,locale:a="en",expiration:r=O}=s??{},c=I(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=`${_(o,t)}?${l.toString()}`;j(u)}function V({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 X({account:o,credential:t,clientId:i,portal:e,redirectUri:s}){let n=I(o.provider),a=_(o,e),r=s||q(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()+O)-Date.now()}`});return`${a}?${c.toString()}`}function I(o){return Y(o)?"social":o==="enterprise"?"enterprise":o.includes("oidc")?"oidc":"default"}function Y(o){return["apple","facebook","github","google"].includes(o)}function _(o,t){let i=h(o.orgUrlKey,t).toLowerCase(),e=I(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 q(o,t){return`${h(o.orgUrlKey,t)}/home/accountswitcher-callback.html`}function Z(o,t){return p.findCredential(h(o.orgUrlKey,t),o.username)}function tt(o,t){let i=Z(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})}`;et(s,`iframe__for-${e}`)}function et(o,t){let i=document.createElement("iframe");i.src=o,i.id=t,i.style.display="none",document.body.appendChild(i)}var C=100,v=class extends x{constructor(){super(),this.messages=J({blocking:!0}),this.targetUser="",this.targetToken="",this.accountAccess={},this.remainingSignouts=0,this.signoutHandle=0,this.rootDialogRef=y(),this.dialogAlertRef=y(),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=N}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);b({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})},z)}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=X({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 W(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=q(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=`${_(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 H(this.portal,this.user),this.linkedAccounts.length&&(this.signedInStatus=this.linkedAccounts.filter(t=>t.orgUrlKey!==this.portal.urlKey).reduce((t,i)=>(t[i.username]=tt(i,this.portal)??null,t),{}),this.accountAccess=V({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 D({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 E(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(){G(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.username);a&&b({config:{baseUrl:n,restBaseUrl:`${n}/sharing/rest`},token:a?.token,clientId:s}),Q(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];b({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()}} ${S(this.rootDialogRef)}><calcite-block .heading=${n.currentAccount} heading-level=3 .description=${n.signedInAs} expanded class="current-account-block" tabindex=-1>${R(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=${F(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>=C}>${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>${L`<path d=${P.couple??K} 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>=C}>${n.linkAccount}</calcite-button></div></calcite-block>`}<calcite-notice kind=info .open=${t.length>=C}><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}} @calciteAlertOpen=${async()=>{await this.rootDialogRef?.value?.updateFocusTrapElements(this.dialogAlertRef?.value),this.dialogAlertRef?.value?.autoClose===!1&&this.dialogAlertRef?.value?.setFocus()}} ${S(this.dialogAlertRef)}>${this.alertOptions?.title&&d`<h4 slot=title class="alert-title">${this.alertOptions.title}</h4>`||""}${this.alertOptions?.message&&d`<p slot=message class=${T({"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>`||""}`}};M("arcgis-portal-account-switcher",v);return v},"identity/IdentityManager","intl",a,b,c)
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{P as r,y as e}from"./OUFJRLPQ.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";var s=e(r,{"arcgis-portal-account-switcher":[()=>import("./VDBJFYFR.js"),"clientId,messages:,portal:,redirectUri,signout,signoutOptions:"],"arcgis-portal-account-switcher-accounts":[()=>import("./QE64NUUD.js"),"accounts:,messages:,portal:,targetUser"],"arcgis-portal-account-switcher-list":[()=>import("./COET6FWR.js"),"accountAccess:,actions:,interactive,linkedAccounts:,messages:,portal:,signedInUsers:"],"arcgis-portal-account-switcher-signout":[()=>import("./DSJOBYW5.js"),"messages:,portal:,signedInAccounts:"],"arcgis-portal-add-gps-metadata":[()=>import("./VWLUIB7M.js"),"canShowAddGPSMetadata:,item:,itemId,messageOverrides:,messages:,portal:"],"arcgis-portal-ai-assistant":[()=>import("./CFNR4XS2.js"),"autoDestroyDisabled,config:,currentContext:,defaultClosed,disabledAgents:,entityToolPresets:,navigationTargetMap:,observabilityEnabled,portal:,t9n:,tools:,user:"],"arcgis-portal-ai-assistant-interrupt":[()=>import("./R3IQ7OYN.js"),"_messages:,entityRequest:,message,options:,pickerMessages:,portal:,requestId,type"],"arcgis-portal-browser":[()=>import("./FICE62PO.js"),"_messages:,alwaysShowContent,alwaysShowPagination,alwaysShowSelection,formFactor,height,hideContentTop,hideFilters,hideTopBar,loading,panel,preview,rangeFormatter:,response:,searchTerm,selected:,showPreSearch,store:;scrollToTop"],"arcgis-portal-browser-actions":[()=>import("./NK474LV6.js"),"_messages:,actions:,selection:;restoreFocus"],"arcgis-portal-browser-filter-status":[()=>import("./LGRW3SGR.js"),"_messages:,browserWidth,componentWidth,filters:,hiddenFilterIds:"],"arcgis-portal-browser-pagination":[()=>import("./YMVVEC2R.js"),"_messages:,num,start,store:,total;nextPage"],"arcgis-portal-browser-search":[()=>import("./7DBQRL5U.js"),"_messages:,allowClear,placeholder,store:,term;setFocus"],"arcgis-portal-browser-sort":[()=>import("./GJP72ONW.js"),"_messages:,appearance,field,options:,order,showText,useDeleted"],"arcgis-portal-browser-top-bar":[()=>import("./SCZ2GY3E.js"),"_messages:,filtersDisabled,store:"],"arcgis-portal-browser-view":[()=>import("./HH5DBWJ2.js"),"options:,store:,view,viewText"],"arcgis-portal-classification-banner":[()=>import("./Z7DRFGQ6.js"),"autoDestroyDisabled,messages:,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],"arcgis-portal-classification-config":[()=>import("./W2MFAJEG.js"),"autoDestroyDisabled,messages:,portalItem:,status,valid,values;destroy,resetForm,validateForm"],"arcgis-portal-classification-favorite":[()=>import("./GQTAE72S.js"),"attributeExpressionResults:,classificationValue:,favoriteClassifications:,messages:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],"arcgis-portal-classification-form-element":[()=>import("./UOY4FZLR.js"),"attribute:,attributeKey,isRequiredErrors:,messages:,renderingInfo:,value:"],"arcgis-portal-delete-items":[()=>import("./YKFYCIOS.js"),"active,disableLinks,fieldDeleteMessages:,itemIds:,items:,messages:,portal:,user:"],"arcgis-portal-delete-items-review":[()=>import("./DOU2QZP5.js"),"items:,messages:,portal:,user:"],"arcgis-portal-entity-picker":[()=>import("./TRPOPI34.js"),"_messages:,entityType,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-extent-picker":[()=>import("./2XRZP4QI.js"),"active,contentOnly,extentService,extentValue:,isArea,itemId,messages:,portal:;;getExtent"],"arcgis-portal-extent-picker-coord-field":[()=>import("./4XFXM76G.js"),"errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],"arcgis-portal-field-delete":[()=>import("./K6NEES4K.js"),"config:,fieldNames:,layer:,mapView:,messages:,options:"],"arcgis-portal-group-badges":[()=>import("./CHJAALGF.js"),"_messages:,appearance,empty,group:,portal:,scale,showTooltips,width"],"arcgis-portal-group-browser":[()=>import("./K6YTIB74.js"),"_browserMessages:,_messages:,alwaysShowSelection,cards:,fetch:,filters:,formFactor,hasIndoorsSpaces,height,hidePreviewBadges,hidePreviewFooter,hideTopBar,loading,messageOverrides:,num,portal:,preflight:,preview,q,searchParamInteraction:,searchTerm,searchUser,selected:,selection,sort:,store:,view;clearFilters,refresh"],"arcgis-portal-group-browser-card":[()=>import("./P4XDOAK2.js"),"browser:,cardProps:,group:;restoreFocus"],"arcgis-portal-group-browser-preview":[()=>import("./HNVQMOOU.js"),"currentResponse:,group:,hideBadges,hidePreviewFooter,messages:,portal:,previewFooterActionsSpaced,user:;setFocus"],"arcgis-portal-group-browser-preview-card":[()=>import("./FCGMSMBW.js"),"baseUrl,hideItemType,hideOwner,hideThumbnail,interactive,item:,link,newTab,portal:,showBadges,showDateUpdated,showOwnerPopup,showSummary,user:;restoreFocus"],"arcgis-portal-group-card":[()=>import("./OHEJPZ35.js"),"disabled,group:,hideBadges,hideDateUpdated,hideOwner,hideViewableBy,indeterminate,link,linkHandler:,messages:,name,newTab,portal:,preview,previewed,selected,selection,showDateCreated,showSummary,user:,view;restoreFocus"],"arcgis-portal-group-picker":[()=>import("./MDOMTVQY.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-group-thumbnail":[()=>import("./BNDM7DRY.js"),"group:,portal:,scale,tooltip"],"arcgis-portal-info-banner":[()=>import("./GRQLUOSD.js"),"config:,position"],"arcgis-portal-item-actions":[()=>import("./TABWX4F2.js"),"actions:,item:,keyHandler:,label,messages:,portal:,previewText,showFavorite,showPreview,tabIndexOverride,user:;setFocus"],"arcgis-portal-item-badges":[()=>import("./ITGOCCZZ.js"),"appearance,empty,item:,portal:,scale,showTooltips,useProduction,user:,width"],"arcgis-portal-item-badge":[()=>import("./Z55T6COF.js"),"_messages:,appearance,badgeType,item:,portal:,scale,showTooltip,useProduction,user:,width"],"arcgis-portal-item-card":[()=>import("./JTSFNRWR.js"),"actions:,allowedGeometries:,disabled,disableSelection,groups:,hideActionsStart,item:,link,linkHandler:,messages:,name,newTab,portal:,preview,previewed,recycleBin,selected,selectedItems:,selection,showAccess,showBadges,showBadgeTooltips,showDateUpdated,showFavorite,showFavoriteInActionsMenu,showItemType,showItemTypeHosted,showOwner,showSummary,showThumbnail,useProduction,user:,userGroups:,userPopupZIndex,view;restoreFocus"],"arcgis-portal-item-card-sublayer-select":[()=>import("./NO5VHQVY.js"),"allowedGeometries:,appearance,disabled,item:,messageOverrides:,messages:,portal:,selectedItems:,selection,width"],"arcgis-portal-item-favorite":[()=>import("./6P7WYZZS.js"),"iconOnly,item:,messages:,portal:,scale,showTooltip,user:,width;setFocus"],"arcgis-portal-item-picker":[()=>import("./YF4HTCBB.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-item-share-summary":[()=>import("./EQZYUMUN.js"),"autoFetchGroups,groups:,item:,messageOverrides:,messages:,overlayPositioning,portal:,scale,showHoverText,showText,userGroups:;fetchGroups,setFocus"],"arcgis-portal-item-share-summary-editable":[()=>import("./76IANSI7.js"),"allowEdit,autoFetchGroups,groups:,item:,messageOverrides:,messages:,overlayPositioning,portal:,scale,showHoverText,showText,userGroups:;fetchGroups,setFocus"],"arcgis-portal-item-thumbnail":[()=>import("./MSOJ4BDB.js"),"cacheString,generate,item:,portal:,serviceInfo:,useProduction,user:;generateThumbnail"],"arcgis-portal-item-type":[()=>import("./NNILBERZ.js"),"ellipsis,hideIcon,hideText,item:,messages:,portal:,scale,serviceInfo:,showHosted,user:"],"arcgis-portal-mentionable-text-area":[()=>import("./OW67EEOH.js"),"disabled,maxLength,placeholder,popoverListLabel,popoverPlacement,portal:,readOnly,rows,scale,starters:,user:,value;closePopover,focusTextArea,selectItem"],"arcgis-portal-navigation":[()=>import("./L3A3L7FY.js"),"clientId,currentPathname,disableNotebookServer,disableTrackViewer,maxWidth,messages:,portal:,portalItem:,product,productHref,projectMenuIcon,projectMenuOptions:,projectMenuSaveIndicator,projectTitle,projectTitleSave:"],"arcgis-portal-replacement-item-redirect":[()=>import("./XMFA6QY6.js"),"itemId,messages:,portal:,user:;setFocus"],"arcgis-portal-review-related-items":[()=>import("./ZJQ55GQG.js"),"browserMessages:,deleteMessages:,messages:,portal:,relatedItems:,relatedItemsCount,showDependentItems,sourceItem:,user:"],"arcgis-portal-sublayer-type":[()=>import("./XLR4JEUA.js"),"geometry,hideIcon,hideName,hideType,messages:,name,renderer:,scale,type,underline"],"arcgis-portal-user-avatar":[()=>import("./X4EHFUD4.js"),"checkOnline,description,heading,hideAvatar,messages:,portal:,scale,showName,underline,user:,username,wrap"],"arcgis-portal-user-picker":[()=>import("./AEJPC2Q5.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-user-popup":[()=>import("./IMFTTYIV.js"),"appearance,avatarAriaHidden,baseUrl,checkOnline,fullName,item:,messages:,portal:,scale,showAvatar,showName,showUsername,underline,user:,username,wrap,zIndex;openPopup,setFocus"],"arcgis-portal-voice-input":[()=>import("./WUPQROF4.js"),"language;clearText,startListening,stopListening"]});s({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-portal-account-switcher,arcgis-portal-account-switcher-accounts,arcgis-portal-account-switcher-list,arcgis-portal-account-switcher-signout,arcgis-portal-add-gps-metadata,arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-browser,arcgis-portal-browser-actions,arcgis-portal-browser-filter-status,arcgis-portal-browser-pagination,arcgis-portal-browser-search,arcgis-portal-browser-sort,arcgis-portal-browser-top-bar,arcgis-portal-browser-view,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-delete-items,arcgis-portal-delete-items-review,arcgis-portal-entity-picker,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-group-badges,arcgis-portal-group-browser,arcgis-portal-group-browser-card,arcgis-portal-group-browser-preview,arcgis-portal-group-browser-preview-card,arcgis-portal-group-card,arcgis-portal-group-picker,arcgis-portal-group-thumbnail,arcgis-portal-info-banner,arcgis-portal-item-actions,arcgis-portal-item-badges,arcgis-portal-item-badge,arcgis-portal-item-card,arcgis-portal-item-card-sublayer-select,arcgis-portal-item-favorite,arcgis-portal-item-picker,arcgis-portal-item-share-summary,arcgis-portal-item-share-summary-editable,arcgis-portal-item-thumbnail,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-navigation,arcgis-portal-replacement-item-redirect,arcgis-portal-review-related-items,arcgis-portal-sublayer-type,arcgis-portal-user-avatar,arcgis-portal-user-picker,arcgis-portal-user-popup,arcgis-portal-voice-input){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,r)
2
+ import{P as r,y as e}from"./OUFJRLPQ.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";var s=e(r,{"arcgis-portal-account-switcher":[()=>import("./JD6QT6IC.js"),"clientId,messages:,portal:,redirectUri,signout,signoutOptions:"],"arcgis-portal-account-switcher-accounts":[()=>import("./QE64NUUD.js"),"accounts:,messages:,portal:,targetUser"],"arcgis-portal-account-switcher-list":[()=>import("./COET6FWR.js"),"accountAccess:,actions:,interactive,linkedAccounts:,messages:,portal:,signedInUsers:"],"arcgis-portal-account-switcher-signout":[()=>import("./DSJOBYW5.js"),"messages:,portal:,signedInAccounts:"],"arcgis-portal-add-gps-metadata":[()=>import("./F5T3DTCW.js"),"areSourceSchemaChangesAllowed:,canShowAddGPSMetadata:,item:,itemId,messageOverrides:,messages:,portal:,supportsAttachments:"],"arcgis-portal-ai-assistant":[()=>import("./CFNR4XS2.js"),"autoDestroyDisabled,config:,currentContext:,defaultClosed,disabledAgents:,entityToolPresets:,navigationTargetMap:,observabilityEnabled,portal:,t9n:,tools:,user:"],"arcgis-portal-ai-assistant-interrupt":[()=>import("./R3IQ7OYN.js"),"_messages:,entityRequest:,message,options:,pickerMessages:,portal:,requestId,type"],"arcgis-portal-browser":[()=>import("./FICE62PO.js"),"_messages:,alwaysShowContent,alwaysShowPagination,alwaysShowSelection,formFactor,height,hideContentTop,hideFilters,hideTopBar,loading,panel,preview,rangeFormatter:,response:,searchTerm,selected:,showPreSearch,store:;scrollToTop"],"arcgis-portal-browser-actions":[()=>import("./NK474LV6.js"),"_messages:,actions:,selection:;restoreFocus"],"arcgis-portal-browser-filter-status":[()=>import("./LGRW3SGR.js"),"_messages:,browserWidth,componentWidth,filters:,hiddenFilterIds:"],"arcgis-portal-browser-pagination":[()=>import("./YMVVEC2R.js"),"_messages:,num,start,store:,total;nextPage"],"arcgis-portal-browser-search":[()=>import("./7DBQRL5U.js"),"_messages:,allowClear,placeholder,store:,term;setFocus"],"arcgis-portal-browser-sort":[()=>import("./GJP72ONW.js"),"_messages:,appearance,field,options:,order,showText,useDeleted"],"arcgis-portal-browser-top-bar":[()=>import("./SCZ2GY3E.js"),"_messages:,filtersDisabled,store:"],"arcgis-portal-browser-view":[()=>import("./HH5DBWJ2.js"),"options:,store:,view,viewText"],"arcgis-portal-classification-banner":[()=>import("./Z7DRFGQ6.js"),"autoDestroyDisabled,messages:,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],"arcgis-portal-classification-config":[()=>import("./W2MFAJEG.js"),"autoDestroyDisabled,messages:,portalItem:,status,valid,values;destroy,resetForm,validateForm"],"arcgis-portal-classification-favorite":[()=>import("./GQTAE72S.js"),"attributeExpressionResults:,classificationValue:,favoriteClassifications:,messages:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],"arcgis-portal-classification-form-element":[()=>import("./UOY4FZLR.js"),"attribute:,attributeKey,isRequiredErrors:,messages:,renderingInfo:,value:"],"arcgis-portal-delete-items":[()=>import("./YKFYCIOS.js"),"active,disableLinks,fieldDeleteMessages:,itemIds:,items:,messages:,portal:,user:"],"arcgis-portal-delete-items-review":[()=>import("./DOU2QZP5.js"),"items:,messages:,portal:,user:"],"arcgis-portal-entity-picker":[()=>import("./TRPOPI34.js"),"_messages:,entityType,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-extent-picker":[()=>import("./2XRZP4QI.js"),"active,contentOnly,extentService,extentValue:,isArea,itemId,messages:,portal:;;getExtent"],"arcgis-portal-extent-picker-coord-field":[()=>import("./4XFXM76G.js"),"errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],"arcgis-portal-field-delete":[()=>import("./K6NEES4K.js"),"config:,fieldNames:,layer:,mapView:,messages:,options:"],"arcgis-portal-group-badges":[()=>import("./CHJAALGF.js"),"_messages:,appearance,empty,group:,portal:,scale,showTooltips,width"],"arcgis-portal-group-browser":[()=>import("./K6YTIB74.js"),"_browserMessages:,_messages:,alwaysShowSelection,cards:,fetch:,filters:,formFactor,hasIndoorsSpaces,height,hidePreviewBadges,hidePreviewFooter,hideTopBar,loading,messageOverrides:,num,portal:,preflight:,preview,q,searchParamInteraction:,searchTerm,searchUser,selected:,selection,sort:,store:,view;clearFilters,refresh"],"arcgis-portal-group-browser-card":[()=>import("./P4XDOAK2.js"),"browser:,cardProps:,group:;restoreFocus"],"arcgis-portal-group-browser-preview":[()=>import("./HNVQMOOU.js"),"currentResponse:,group:,hideBadges,hidePreviewFooter,messages:,portal:,previewFooterActionsSpaced,user:;setFocus"],"arcgis-portal-group-browser-preview-card":[()=>import("./FCGMSMBW.js"),"baseUrl,hideItemType,hideOwner,hideThumbnail,interactive,item:,link,newTab,portal:,showBadges,showDateUpdated,showOwnerPopup,showSummary,user:;restoreFocus"],"arcgis-portal-group-card":[()=>import("./OHEJPZ35.js"),"disabled,group:,hideBadges,hideDateUpdated,hideOwner,hideViewableBy,indeterminate,link,linkHandler:,messages:,name,newTab,portal:,preview,previewed,selected,selection,showDateCreated,showSummary,user:,view;restoreFocus"],"arcgis-portal-group-picker":[()=>import("./MDOMTVQY.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-group-thumbnail":[()=>import("./BNDM7DRY.js"),"group:,portal:,scale,tooltip"],"arcgis-portal-info-banner":[()=>import("./GRQLUOSD.js"),"config:,position"],"arcgis-portal-item-actions":[()=>import("./TABWX4F2.js"),"actions:,item:,keyHandler:,label,messages:,portal:,previewText,showFavorite,showPreview,tabIndexOverride,user:;setFocus"],"arcgis-portal-item-badges":[()=>import("./ITGOCCZZ.js"),"appearance,empty,item:,portal:,scale,showTooltips,useProduction,user:,width"],"arcgis-portal-item-badge":[()=>import("./Z55T6COF.js"),"_messages:,appearance,badgeType,item:,portal:,scale,showTooltip,useProduction,user:,width"],"arcgis-portal-item-card":[()=>import("./JTSFNRWR.js"),"actions:,allowedGeometries:,disabled,disableSelection,groups:,hideActionsStart,item:,link,linkHandler:,messages:,name,newTab,portal:,preview,previewed,recycleBin,selected,selectedItems:,selection,showAccess,showBadges,showBadgeTooltips,showDateUpdated,showFavorite,showFavoriteInActionsMenu,showItemType,showItemTypeHosted,showOwner,showSummary,showThumbnail,useProduction,user:,userGroups:,userPopupZIndex,view;restoreFocus"],"arcgis-portal-item-card-sublayer-select":[()=>import("./NO5VHQVY.js"),"allowedGeometries:,appearance,disabled,item:,messageOverrides:,messages:,portal:,selectedItems:,selection,width"],"arcgis-portal-item-favorite":[()=>import("./6P7WYZZS.js"),"iconOnly,item:,messages:,portal:,scale,showTooltip,user:,width;setFocus"],"arcgis-portal-item-picker":[()=>import("./YF4HTCBB.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-item-share-summary":[()=>import("./EQZYUMUN.js"),"autoFetchGroups,groups:,item:,messageOverrides:,messages:,overlayPositioning,portal:,scale,showHoverText,showText,userGroups:;fetchGroups,setFocus"],"arcgis-portal-item-share-summary-editable":[()=>import("./76IANSI7.js"),"allowEdit,autoFetchGroups,groups:,item:,messageOverrides:,messages:,overlayPositioning,portal:,scale,showHoverText,showText,userGroups:;fetchGroups,setFocus"],"arcgis-portal-item-thumbnail":[()=>import("./MSOJ4BDB.js"),"cacheString,generate,item:,portal:,serviceInfo:,useProduction,user:;generateThumbnail"],"arcgis-portal-item-type":[()=>import("./NNILBERZ.js"),"ellipsis,hideIcon,hideText,item:,messages:,portal:,scale,serviceInfo:,showHosted,user:"],"arcgis-portal-mentionable-text-area":[()=>import("./OW67EEOH.js"),"disabled,maxLength,placeholder,popoverListLabel,popoverPlacement,portal:,readOnly,rows,scale,starters:,user:,value;closePopover,focusTextArea,selectItem"],"arcgis-portal-navigation":[()=>import("./L3A3L7FY.js"),"clientId,currentPathname,disableNotebookServer,disableTrackViewer,maxWidth,messages:,portal:,portalItem:,product,productHref,projectMenuIcon,projectMenuOptions:,projectMenuSaveIndicator,projectTitle,projectTitleSave:"],"arcgis-portal-replacement-item-redirect":[()=>import("./XMFA6QY6.js"),"itemId,messages:,portal:,user:;setFocus"],"arcgis-portal-review-related-items":[()=>import("./ZJQ55GQG.js"),"browserMessages:,deleteMessages:,messages:,portal:,relatedItems:,relatedItemsCount,showDependentItems,sourceItem:,user:"],"arcgis-portal-sublayer-type":[()=>import("./XLR4JEUA.js"),"geometry,hideIcon,hideName,hideType,messages:,name,renderer:,scale,type,underline"],"arcgis-portal-user-avatar":[()=>import("./X4EHFUD4.js"),"checkOnline,description,heading,hideAvatar,messages:,portal:,scale,showName,underline,user:,username,wrap"],"arcgis-portal-user-picker":[()=>import("./AEJPC2Q5.js"),"_messages:,entityType:,icon,initialScope,initialSearchTerm,messageOverrides:,mode,num,portal:,query,scopeSelectionDisabled,selected:,selectionMode;setFocus,togglePicker"],"arcgis-portal-user-popup":[()=>import("./IMFTTYIV.js"),"appearance,avatarAriaHidden,baseUrl,checkOnline,fullName,item:,messages:,portal:,scale,showAvatar,showName,showUsername,underline,user:,username,wrap,zIndex;openPopup,setFocus"],"arcgis-portal-voice-input":[()=>import("./WUPQROF4.js"),"language;clearText,startListening,stopListening"]});s({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-portal-account-switcher,arcgis-portal-account-switcher-accounts,arcgis-portal-account-switcher-list,arcgis-portal-account-switcher-signout,arcgis-portal-add-gps-metadata,arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-browser,arcgis-portal-browser-actions,arcgis-portal-browser-filter-status,arcgis-portal-browser-pagination,arcgis-portal-browser-search,arcgis-portal-browser-sort,arcgis-portal-browser-top-bar,arcgis-portal-browser-view,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-delete-items,arcgis-portal-delete-items-review,arcgis-portal-entity-picker,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-group-badges,arcgis-portal-group-browser,arcgis-portal-group-browser-card,arcgis-portal-group-browser-preview,arcgis-portal-group-browser-preview-card,arcgis-portal-group-card,arcgis-portal-group-picker,arcgis-portal-group-thumbnail,arcgis-portal-info-banner,arcgis-portal-item-actions,arcgis-portal-item-badges,arcgis-portal-item-badge,arcgis-portal-item-card,arcgis-portal-item-card-sublayer-select,arcgis-portal-item-favorite,arcgis-portal-item-picker,arcgis-portal-item-share-summary,arcgis-portal-item-share-summary-editable,arcgis-portal-item-thumbnail,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-navigation,arcgis-portal-replacement-item-redirect,arcgis-portal-review-related-items,arcgis-portal-sublayer-type,arcgis-portal-user-avatar,arcgis-portal-user-picker,arcgis-portal-user-popup,arcgis-portal-voice-input){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,r)
@@ -1,22 +1,23 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import { c as v } from "../../chunks/runtime.js";
3
- import { keyed as x } from "lit/directives/keyed.js";
4
- import { LitElement as T, createEvent as $, safeClassMap as M, nothing as K } from "@arcgis/lumina";
2
+ import { c as T } from "../../chunks/runtime.js";
3
+ import { keyed as M } from "lit/directives/keyed.js";
4
+ import { LitElement as K, createEvent as $, safeClassMap as R, nothing as E } from "@arcgis/lumina";
5
5
  import { html as d, svg as N } from "lit";
6
- import { s as E } from "../../chunks/portal-account-switcher.js";
7
- import { g as H, a as P, l as W, u as B } from "../../chunks/user.js";
6
+ import { s as H } from "../../chunks/portal-account-switcher.js";
7
+ import { g as P, a as W, l as B, u as D } from "../../chunks/user.js";
8
8
  import p from "@arcgis/core/identity/IdentityManager.js";
9
- import { t as R } from "../../chunks/functionalities.js";
10
- import { u as J } from "../../chunks/useT9n.js";
11
- import { m as D } from "../../chunks/icons.js";
9
+ import { t as J } from "../../chunks/functionalities.js";
10
+ import { u as j } from "../../chunks/useT9n.js";
11
+ import { m as q } from "../../chunks/icons.js";
12
12
  import { substitute as w } from "@arcgis/core/intl.js";
13
- import { g as j } from "../../chunks/services.js";
14
- const y = 1260 * 1e3, q = 2500;
13
+ import { g as z } from "../../chunks/services.js";
14
+ import { createRef as C, ref as L } from "lit/directives/ref.js";
15
+ const y = 1260 * 1e3, F = 2500;
15
16
  function _(r, e = "_blank", s = 582, t = 670) {
16
17
  const i = window.screenLeft ?? 0, n = window.screenTop ?? 0, a = window.innerWidth || document.documentElement.clientWidth || window.screen.width, o = window.innerHeight || document.documentElement.clientHeight || window.screen.height, c = a / 2 - s / 2 + i, l = o / 2 - t / 2 + n, u = window.open(r, e, `scrollbars=no, width=${s}, height=${t}, top=${l}, left=${c}`);
17
18
  return u?.focus(), u;
18
19
  }
19
- function z(r) {
20
+ function G(r) {
20
21
  const e = p.findOAuthInfo(r.url), { locale: s = "en", expiration: t = y } = e ?? {}, i = new URLSearchParams({
21
22
  locale: s,
22
23
  // Linking accounts ALWAYS uses the "arcgisonline" client id
@@ -58,7 +59,7 @@ function U(r) {
58
59
  }), c = `${e.restBaseUrl}/oauth2/signout?${o.toString()}`, l = document.createElement("iframe");
59
60
  l.src = c, l.style.display = "none", document.body.appendChild(l);
60
61
  }
61
- function F(r, e, s) {
62
+ function Q(r, e, s) {
62
63
  const t = h(r.orgUrlKey, e), i = p.findOAuthInfo(t), { appId: n, locale: a = "en", expiration: o = y } = i ?? {}, c = b(r.provider), l = new URLSearchParams({
63
64
  locale: a,
64
65
  client_id: s ?? n ?? "arcgisonline",
@@ -78,7 +79,7 @@ function F(r, e, s) {
78
79
  }), u = `${I(r, e)}?${l.toString()}`;
79
80
  _(u);
80
81
  }
81
- function G({
82
+ function V({
82
83
  accounts: r,
83
84
  clientId: e = "arcgisonline",
84
85
  usersToFilter: s = [],
@@ -93,14 +94,14 @@ function G({
93
94
  return n[a.username] = o, (s.includes(a.username) || s.includes(a.username.toLowerCase()) || t === "org" && a.orgUrlKey || e === "esriapps" && a.userType !== "both") && (o.allowed = !1), n;
94
95
  }, i), i;
95
96
  }
96
- function Q({
97
+ function X({
97
98
  account: r,
98
99
  credential: e,
99
100
  clientId: s,
100
101
  portal: t,
101
102
  redirectUri: i
102
103
  }) {
103
- const n = b(r.provider), a = I(r, t), o = i || C(r, t), c = new URLSearchParams({
104
+ const n = b(r.provider), a = I(r, t), o = i || x(r, t), c = new URLSearchParams({
104
105
  client_id: s,
105
106
  redirect_uri: o,
106
107
  parent: window.location.origin,
@@ -113,9 +114,9 @@ function Q({
113
114
  return `${a}?${c.toString()}`;
114
115
  }
115
116
  function b(r) {
116
- return V(r) ? "social" : r === "enterprise" ? "enterprise" : r.includes("oidc") ? "oidc" : "default";
117
+ return Y(r) ? "social" : r === "enterprise" ? "enterprise" : r.includes("oidc") ? "oidc" : "default";
117
118
  }
118
- function V(r) {
119
+ function Y(r) {
119
120
  return ["apple", "facebook", "github", "google"].includes(r);
120
121
  }
121
122
  function I(r, e) {
@@ -137,14 +138,14 @@ function I(r, e) {
137
138
  function h(r, e) {
138
139
  return r?.startsWith("https://") ? r : r && e.customBaseUrl ? `https://${r}.${e.customBaseUrl}` : `https://${e.portalHostname}`;
139
140
  }
140
- function C(r, e) {
141
+ function x(r, e) {
141
142
  return `${h(r.orgUrlKey, e)}/home/accountswitcher-callback.html`;
142
143
  }
143
- function X(r, e) {
144
+ function Z(r, e) {
144
145
  return p.findCredential(h(r.orgUrlKey, e), r.username);
145
146
  }
146
- function Y(r, e) {
147
- const s = X(r, e);
147
+ function ee(r, e) {
148
+ const s = Z(r, e);
148
149
  if (s)
149
150
  return s;
150
151
  const t = h(r.orgUrlKey, e), i = `${t}/home/check_sign_in_status.html#state=${JSON.stringify({
@@ -152,16 +153,16 @@ function Y(r, e) {
152
153
  server: t,
153
154
  orgKey: t
154
155
  })}`;
155
- Z(i, `iframe__for-${t}`);
156
+ te(i, `iframe__for-${t}`);
156
157
  }
157
- function Z(r, e) {
158
+ function te(r, e) {
158
159
  const s = document.createElement("iframe");
159
160
  s.src = r, s.id = e, s.style.display = "none", document.body.appendChild(s);
160
161
  }
161
162
  const S = 100;
162
- class ee extends T {
163
+ class se extends K {
163
164
  constructor() {
164
- 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 = {
165
+ super(), this.messages = j({ blocking: !0 }), this.targetUser = "", this.targetToken = "", this.accountAccess = {}, this.remainingSignouts = 0, this.signoutHandle = 0, this.rootDialogRef = C(), this.dialogAlertRef = C(), this.linkedAccounts = [], this.loading = !1, this.signedInStatus = {}, this.showAssociatedAccountsWarning = !1, this.signedInAccounts = [], this.clientId = "arcgisonline", this.signout = !1, this.signoutOptions = {
165
166
  redirectToClientUri: !1,
166
167
  displaySignoutComplete: !1
167
168
  }, this.arcgisAccountSwitch = $(), this.arcgisClose = $(), this.arcgisSignoutComplete = $(), this.listenOn(window, "message", this.handleMessageEvent);
@@ -170,7 +171,7 @@ class ee extends T {
170
171
  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 };
171
172
  }
172
173
  static {
173
- this.styles = E;
174
+ this.styles = H;
174
175
  }
175
176
  willUpdate(e) {
176
177
  if (e.has("portal") && (this.user = this.portal?.user), (e.has("portal") || e.has("user")) && this.portal && this.user) {
@@ -181,20 +182,20 @@ class ee extends T {
181
182
  if (this.signout) {
182
183
  const { signedInStatus: s, linkedAccounts: t, portal: i, signoutOptions: n, clientId: a, user: o, redirectUri: c } = this, l = Object.keys(s).filter((k) => s[k] !== null).map((k) => t.find((O) => O.username === k));
183
184
  this.remainingSignouts = l.length + 1;
184
- const u = h(i.urlKey ?? "", i), f = `${u}/sharing/rest`;
185
- let { displaySignoutComplete: m = !0, redirectToClientUri: g = !0 } = n;
186
- l.length > 0 && (m = !1, g = !1), this.loading = !0;
185
+ const u = h(i.urlKey ?? "", i), m = `${u}/sharing/rest`;
186
+ let { displaySignoutComplete: f = !0, redirectToClientUri: g = !0 } = n;
187
+ l.length > 0 && (f = !1, g = !1), this.loading = !0;
187
188
  const A = p.findCredential(u, o?.id || o?.username);
188
189
  U({
189
- displaySignoutComplete: m,
190
+ displaySignoutComplete: f,
190
191
  redirectToClientUri: g,
191
192
  clientId: a,
192
- config: { baseUrl: u, restBaseUrl: f },
193
+ config: { baseUrl: u, restBaseUrl: m },
193
194
  token: A?.token,
194
195
  clientUri: g ? c : void 0
195
196
  }), this.signoutHandle = window.setTimeout(() => {
196
- this.remainingSignouts -= 1, this.finishSignout({ accountOrigin: u, redirectToClientUri: g, displaySignoutComplete: m });
197
- }, q);
197
+ this.remainingSignouts -= 1, this.finishSignout({ accountOrigin: u, redirectToClientUri: g, displaySignoutComplete: f });
198
+ }, F);
198
199
  }
199
200
  return;
200
201
  }
@@ -242,8 +243,8 @@ class ee extends T {
242
243
  return;
243
244
  }
244
245
  if (n === "success") {
245
- const { portal: u, user: f, redirectUri: m } = this, g = this.linkedAccounts.find((L) => L.username === a.user);
246
- g?.orgUrlKey === this.portal.urlKey && p.findCredential(`https://${u.portalHostname}`, f?.username)?.destroy();
246
+ const { portal: u, user: m, redirectUri: f } = this, g = this.linkedAccounts.find((v) => v.username === a.user);
247
+ g?.orgUrlKey === this.portal.urlKey && p.findCredential(`https://${u.portalHostname}`, m?.username)?.destroy();
247
248
  const A = {
248
249
  server: a.portalUrl,
249
250
  userId: a.user,
@@ -252,12 +253,12 @@ class ee extends T {
252
253
  ssl: c === void 0 || c !== "false"
253
254
  };
254
255
  p.registerToken(A);
255
- const k = Q({
256
+ const k = X({
256
257
  account: g,
257
258
  credential: A,
258
259
  clientId: t,
259
260
  portal: u,
260
- redirectUri: m
261
+ redirectUri: f
261
262
  });
262
263
  window.self !== window.top ? window.top?.postMessage({ type: "navigate", url: k }) : this.arcgisAccountSwitch.emit({ account: g, finishUrl: k });
263
264
  }
@@ -282,7 +283,7 @@ class ee extends T {
282
283
  this.showAlert("danger", w(c.errors.alreadyLinked, { username: t }));
283
284
  return;
284
285
  }
285
- const l = await H(n, t, i);
286
+ const l = await P(n, t, i);
286
287
  if (l?.length) {
287
288
  this.userAccounts = l, this.targetUser = t ?? "", this.targetToken = i ?? "", this.showAssociatedAccountsWarning = !0;
288
289
  return;
@@ -295,10 +296,10 @@ class ee extends T {
295
296
  if (s.error)
296
297
  console.error(s);
297
298
  else if (s.status === "success" && this.targetUser) {
298
- const { portal: t, linkedAccounts: i, targetUser: n, clientId: a } = this, o = i.find((m) => m.username === n);
299
+ const { portal: t, linkedAccounts: i, targetUser: n, clientId: a } = this, o = i.find((f) => f.username === n);
299
300
  if (!o)
300
301
  return;
301
- const c = C(o, t), l = h(o.orgUrlKey, t), u = new URLSearchParams({
302
+ const c = x(o, t), l = h(o.orgUrlKey, t), u = new URLSearchParams({
302
303
  // eslint-disable-next-line @typescript-eslint/naming-convention
303
304
  response_type: "token",
304
305
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -306,8 +307,8 @@ class ee extends T {
306
307
  // eslint-disable-next-line @typescript-eslint/naming-convention
307
308
  redirect_uri: c,
308
309
  state: JSON.stringify({ user: o.username, portalUrl: l })
309
- }), f = `${I(o, t)}?${u.toString()}`;
310
- window.opener ? (window.opener.location.href = f, window.close()) : window.location.href = f;
310
+ }), m = `${I(o, t)}?${u.toString()}`;
311
+ window.opener ? (window.opener.location.href = m, window.close()) : window.location.href = m;
311
312
  }
312
313
  }
313
314
  }
@@ -319,35 +320,35 @@ class ee extends T {
319
320
  this.linkedAccounts = [], this.loading = !1;
320
321
  return;
321
322
  }
322
- this.linkedAccounts = await P(this.portal, this.user), this.linkedAccounts.length && (this.signedInStatus = this.linkedAccounts.filter((e) => e.orgUrlKey !== this.portal.urlKey).reduce((e, s) => (e[s.username] = Y(s, this.portal) ?? null, e), {}), this.accountAccess = G({ accounts: this.linkedAccounts, clientId: this.clientId })), this.loading = !1;
323
+ this.linkedAccounts = await W(this.portal, this.user), this.linkedAccounts.length && (this.signedInStatus = this.linkedAccounts.filter((e) => e.orgUrlKey !== this.portal.urlKey).reduce((e, s) => (e[s.username] = ee(s, this.portal) ?? null, e), {}), this.accountAccess = V({ accounts: this.linkedAccounts, clientId: this.clientId })), this.loading = !1;
323
324
  }
324
325
  async linkAccount(e, s) {
325
326
  const { portal: t, user: i } = this;
326
327
  if (!t || !i)
327
328
  return;
328
- const n = await W({ portal: t, user: i, targetUser: e, targetToken: s }), { messages: a } = this;
329
+ const n = await B({ portal: t, user: i, targetUser: e, targetToken: s }), { messages: a } = this;
329
330
  if (n.error) {
330
331
  this.showAlert("danger", w(a.errors.linkAccount, { username: e })), this.targetUser = "", this.userAccounts = [];
331
332
  return;
332
333
  }
333
334
  const o = this.userAccounts?.length ? a.success.linkAccountMultiple : a.success.linkAccount;
334
- this.showAlert("success", w(o, { username: e })), this.targetUser = "", this.userAccounts = [], await R(350), this.findLinkedUsers();
335
+ this.showAlert("success", w(o, { username: e })), this.targetUser = "", this.userAccounts = [], await J(350), this.findLinkedUsers();
335
336
  }
336
337
  async unlinkAccount(e) {
337
338
  if (!this.portal || !this.user)
338
339
  return;
339
- const { messages: s, portal: t, user: i } = this, { success: n } = await B({ portal: t, user: i, linkedUsername: e.username });
340
+ const { messages: s, portal: t, user: i } = this, { success: n } = await D({ portal: t, user: i, linkedUsername: e.username });
340
341
  n ? this.showAlert("success", w(s.success.unlinkAccount, { username: e.username })) : this.showAlert("danger", w(s.errors.unlinkAccount, { username: e.username })), await this.findLinkedUsers();
341
342
  }
342
343
  startAccountLink() {
343
- z(this.portal);
344
+ G(this.portal);
344
345
  }
345
346
  switchAccount(e) {
346
347
  const { portal: s, user: t, clientId: i } = this;
347
348
  if (!s || !t || !e)
348
349
  return;
349
350
  const n = h(t.sourceJSON.orgUrlKey ?? "", s), a = p.findCredential(n, t.username);
350
- a && U({ config: { baseUrl: n, restBaseUrl: `${n}/sharing/rest` }, token: a?.token, clientId: i }), F(e, s, i);
351
+ a && U({ config: { baseUrl: n, restBaseUrl: `${n}/sharing/rest` }, token: a?.token, clientId: i }), Q(e, s, i);
351
352
  }
352
353
  signoutAll(e) {
353
354
  const { portal: s, signedInStatus: t, clientId: i } = this;
@@ -397,20 +398,22 @@ class ee extends T {
397
398
  }
398
399
  return d`<calcite-dialog .heading=${n.switchAccounts} heading-level=2 scale=m width=s open modal .loading=${this.loading} outside-close-disabled @calciteDialogClose=${() => {
399
400
  this.arcgisClose.emit();
400
- }}><calcite-block .heading=${n.currentAccount} heading-level=3 .description=${n.signedInAs} expanded class="current-account-block" tabindex=-1>${x(t.id ?? t.username, d`<calcite-block class="current-account" .label=${i.urlKey ? `${t.username}, ${i.name}` : t.username} heading-level=4 .heading=${t.username} .description=${i.urlKey ? `${t.fullName ?? t.username}, ${i.name}` : t.fullName ?? t.username}><calcite-avatar slot=content-start inert .fullName=${t.fullName ?? void 0} .username=${t.username} .userId=${t.id} .thumbnail=${j(t, i) ?? void 0}></calcite-avatar></calcite-block>`)}</calcite-block>${e.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=${e.length >= S}>${n.addAccount}</calcite-button><arcgis-portal-account-switcher-list .portal=${i} .linkedAccounts=${e} .accountAccess=${s} .signedInUsers=${Object.keys(this.signedInStatus).filter((o) => this.signedInStatus[o] !== null)} interactive @arcgisAccountListSwitch=${(o) => {
401
+ }} ${L(this.rootDialogRef)}><calcite-block .heading=${n.currentAccount} heading-level=3 .description=${n.signedInAs} expanded class="current-account-block" tabindex=-1>${M(t.id ?? t.username, d`<calcite-block class="current-account" .label=${i.urlKey ? `${t.username}, ${i.name}` : t.username} heading-level=4 .heading=${t.username} .description=${i.urlKey ? `${t.fullName ?? t.username}, ${i.name}` : t.fullName ?? t.username}><calcite-avatar slot=content-start inert .fullName=${t.fullName ?? void 0} .username=${t.username} .userId=${t.id} .thumbnail=${z(t, i) ?? void 0}></calcite-avatar></calcite-block>`)}</calcite-block>${e.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=${e.length >= S}>${n.addAccount}</calcite-button><arcgis-portal-account-switcher-list .portal=${i} .linkedAccounts=${e} .accountAccess=${s} .signedInUsers=${Object.keys(this.signedInStatus).filter((o) => this.signedInStatus[o] !== null)} interactive @arcgisAccountListSwitch=${(o) => {
401
402
  this.switchAccount(o.detail.account);
402
403
  }} @arcgisAccountListUnlink=${(o) => {
403
404
  this.showUnlinkConfirmation(o.detail.account);
404
- }}></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>${N`<path d=${D.couple ?? K} fill=currentColor />`}</svg><h4>${n.emptyListTitle}</h4><p>${n.emptyList}</p><calcite-button icon-start=plus class="link-account-button" @click=${() => this.startAccountLink()} .disabled=${e.length >= S}>${n.linkAccount}</calcite-button></div></calcite-block>`}<calcite-notice kind=info .open=${e.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=${() => {
405
+ }}></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>${N`<path d=${q.couple ?? E} fill=currentColor />`}</svg><h4>${n.emptyListTitle}</h4><p>${n.emptyList}</p><calcite-button icon-start=plus class="link-account-button" @click=${() => this.startAccountLink()} .disabled=${e.length >= S}>${n.linkAccount}</calcite-button></div></calcite-block>`}<calcite-notice kind=info .open=${e.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=${() => {
405
406
  this.alertOptions = void 0;
406
- }}>${this.alertOptions?.title && d`<h4 slot=title class="alert-title">${this.alertOptions.title}</h4>` || ""}${this.alertOptions?.message && d`<p slot=message class=${M({ "alert-message": !0, "short-message": !!this.alertOptions?.actions?.length })}>${this.alertOptions.message}</p>` || ""}${this.alertOptions?.actions?.map((o) => d`<calcite-button slot=actions-end .kind=${o.kind} .appearance=${o.appearance} @click=${o.clickHandler}>${o.text}</calcite-button>`)}</calcite-alert></calcite-dialog>${this.showAssociatedAccountsWarning && d`<arcgis-portal-account-switcher-accounts .portal=${i} .targetUser=${this.targetUser} .accounts=${this.userAccounts ?? []} @arcgisAccountsLinkAll=${() => {
407
+ }} @calciteAlertOpen=${async () => {
408
+ await this.rootDialogRef?.value?.updateFocusTrapElements(this.dialogAlertRef?.value), this.dialogAlertRef?.value?.autoClose === !1 && this.dialogAlertRef?.value?.setFocus();
409
+ }} ${L(this.dialogAlertRef)}>${this.alertOptions?.title && d`<h4 slot=title class="alert-title">${this.alertOptions.title}</h4>` || ""}${this.alertOptions?.message && d`<p slot=message class=${R({ "alert-message": !0, "short-message": !!this.alertOptions?.actions?.length })}>${this.alertOptions.message}</p>` || ""}${this.alertOptions?.actions?.map((o) => d`<calcite-button slot=actions-end .kind=${o.kind} .appearance=${o.appearance} @click=${o.clickHandler}>${o.text}</calcite-button>`)}</calcite-alert></calcite-dialog>${this.showAssociatedAccountsWarning && d`<arcgis-portal-account-switcher-accounts .portal=${i} .targetUser=${this.targetUser} .accounts=${this.userAccounts ?? []} @arcgisAccountsLinkAll=${() => {
407
410
  this.linkAccount(this.targetUser, this.targetToken);
408
411
  }} @arcgisAccountsCloseDialog=${() => {
409
412
  this.showAssociatedAccountsWarning = !1;
410
413
  }}></arcgis-portal-account-switcher-accounts>` || ""}`;
411
414
  }
412
415
  }
413
- v("arcgis-portal-account-switcher", ee);
416
+ T("arcgis-portal-account-switcher", se);
414
417
  export {
415
- ee as ArcgisPortalAccountSwitcher
418
+ se as ArcgisPortalAccountSwitcher
416
419
  };
@@ -21,6 +21,12 @@ import type { T9nMeta } from "@arcgis/lumina/controllers";
21
21
  * be updated with the rangefinder fields, and the table and polygon will be ignored as those fields do not apply.
22
22
  */
23
23
  export abstract class ArcgisPortalAddGpsMetadata extends LitElement {
24
+ /**
25
+ * Whether the service allows source schema changes. Starts true so that errors are only set after checks finish.
26
+ *
27
+ * @default false
28
+ */
29
+ get areSourceSchemaChangesAllowed(): true;
24
30
  /**
25
31
  * Whether the item supports displaying GPS metadata controls. Remains false until compatibility checks finish.
26
32
  *
@@ -58,10 +64,16 @@ export abstract class ArcgisPortalAddGpsMetadata extends LitElement {
58
64
  laserRangefinderFields: string;
59
65
  }>;
60
66
  accessor portal: Portal;
67
+ /**
68
+ * Whether all supported layers support attachments. Starts true so that errors are only set after checks finish.
69
+ *
70
+ * @default false
71
+ */
72
+ get supportsAttachments(): true;
61
73
  /** Emitted when fields are successfully added/repaired. */
62
74
  readonly arcgisGPSMetadataFieldsAdded: import("@arcgis/lumina").TargetedEvent<this, GPSMetadataFieldSet>;
63
- /** Emitted when GPS metadata control visibility changes. */
64
- readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "canShowAddGPSMetadata"; }>;
75
+ /** Emitted when GPS metadata control visibility or service capabilities change. */
76
+ readonly arcgisPropertyChange: import("@arcgis/lumina").TargetedEvent<this, { name: "canShowAddGPSMetadata" | "supportsAttachments" | "areSourceSchemaChangesAllowed"; }>;
65
77
  readonly arcgisReadOnlyMode: import("@arcgis/lumina").TargetedEvent<this, void>;
66
78
  readonly "@eventTypes": {
67
79
  arcgisGPSMetadataFieldsAdded: ArcgisPortalAddGpsMetadata["arcgisGPSMetadataFieldsAdded"]["detail"];