/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
var d=[{name:"objectid",type:"oid",alias:"ObjectID",description:"Unique identifier for each record in the dataset.",choiceList:null,length:null},{name:"globalid",type:"globalid",alias:"GlobalID",description:"Globally unique identifier for the record.",choiceList:null,length:null},{name:"created_date",type:"date",alias:"Created On",description:"Date when the record was created.",choiceList:null,length:null},{name:"created_user",type:"string",alias:"Created By",description:"User who created the record.",choiceList:null,length:255},{name:"last_edited_date",type:"date",alias:"Last Edited On",description:"Date when the record was last edited.",choiceList:null,length:null},{name:"last_edited_user",type:"string",alias:"Last Edited By",description:"User who last edited the record.",choiceList:null,length:255}],c="fieldInspections",u="manageSpatialData",p="placesOfInterest",l={};function y(e){return(e?l[e]:void 0)??Object.values(l).find(t=>!!t?.initialTemplate)}function o(e){if(!e?.featureLayer){let{sourceBuildSolution:r,templateId:s,...n}=e??{};return n}let{sourceBuildSolution:t,templateId:a,...i}=e;return{...i,featureLayer:{...e.featureLayer,layers:e.featureLayer.layers.map(({systemFields:r,...s})=>s)}}}function m(e){let t=o(e);return{...t,solution:{...t.solution,strings:t.solution.strings.map((a,i)=>({_idx:i,...a}))},items:t.items.map((a,i)=>({_idx:i,...a})),featureLayer:{...t.featureLayer,layers:t.featureLayer.layers.map((a,i)=>({_idx:i,...a,customFields:a.customFields.map((r,s)=>({_idx:s,...r})),requiredFields:a.requiredFields.map((r,s)=>({_idx:s,...r}))}))}}}function h(e,t){return{...e,layers:e.layers.map(a=>{let i=t?.layers.find(s=>s.id===a.id),r=i?.systemFields?.length?i.systemFields:d;return{...a,systemFields:r}})}}export{c as a,u as b,p as c,l as d,y as e,o as f,m as g,h};
