"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),t=require("@babel/runtime/helpers/slicedToArray"),o=require("lodash");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(e),l=n(r),s=n(t),c=["selectionMode","polygonCoords"];function u(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?u(Object(t),!0).forEach((function(r){i.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}exports.normalizeFilters=function(e){if(null!=e){var r,t=Object.fromEntries(Object.entries(e).filter((function(e){return null!==s.default(e,2)[1]}))),n=o.omit(t,"hasUserConfirmedAllCompaniesLoadAll"),i=n.selectionMode,u=n.polygonCoords,p=l.default(n,c);return"lasso"!==i||(r=u,Boolean(r&&r.length>=3))?a(a(a({},p),void 0!==i&&{selectionMode:i}),void 0!==u&&{polygonCoords:u}):a(a({},p),{},{selectionMode:"radius"},void 0!==u&&{polygonCoords:u})}};
//# sourceMappingURL=normalizeFilters.js.map
