Liferay.Loader.define("data-engine-js-components-web@1.0.79/js/custom/form-report/utils/searchLocation",["module","exports","require","./data"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.transformSearchLocationValues=void 0;var o=a("./data");const e=(e,t)=>{try{return JSON.parse(e)}catch(e){return console.error(e),void 0!==t?t:{}}},r=(t,a)=>{let r={},s=[...t],c=[];return Object.values(t).forEach((({label:n,name:l,type:i})=>{if("search_location"===i){const t=e(n,{address:"Address",city:"City",country:"Country",place:"Search Location","postal-code":"Postal Code",state:"State"}),s=Object.keys(t),i={},d={},{values:u}=a[l],y=s.map((a=>(Array.isArray(u)&&((0,o.toArray)(u).forEach((t=>{const o=i[a]||[],r=e(t,{});i[a]=[...o,{value:r[a]}]})),d[a]={totalEntries:Object.keys(i[a]).length,type:a,values:i[a]}),{columns:{},label:t[a],name:a,options:{},parentFieldName:l,rows:{},type:a})));r[l]=d,c=c.concat([...y])}else r=a,s=t})),{data:r,fields:c.length?s.filter((e=>"search_location"!==e.type)).concat(c):s}};t.transformSearchLocationValues=r}}));
//# sourceMappingURL=searchLocation.js.map