Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@arranger/middleware

Package Overview
Dependencies
Maintainers
11
Versions
251
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arranger/middleware - npm Package Compare versions

Comparing version 2.17.0 to 2.19.3

dist/buildAggregations/createFieldAggregation.js.map

55

dist/buildAggregations/createFieldAggregation.js

@@ -7,21 +7,11 @@ "use strict";

exports["default"] = void 0;
var _lodash = require("lodash");
var _constants = require("../constants");
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
var _buildQuery = require("../buildQuery");
var _normalizeFilters = _interopRequireDefault(require("../buildQuery/normalizeFilters"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var MAX_AGGREGATION_SIZE = 300000;

@@ -33,4 +23,4 @@ var HISTOGRAM_INTERVAL_DEFAULT = 1000;

var type = _ref.type,
field = _ref.field,
graphqlField = _ref.graphqlField;
field = _ref.field,
graphqlField = _ref.graphqlField;
var args = (0, _lodash.get)(graphqlField, [type, '__arguments', 0]) || {};

@@ -43,10 +33,8 @@ return _defineProperty({}, "".concat(field, ":").concat(type), _defineProperty({}, type, _objectSpread({

};
var createTermAggregation = function createTermAggregation(_ref3) {
var _graphqlField$buckets, _graphqlField$buckets2, _topHits$__arguments$, _topHits$__arguments$2, _aggs;
var field = _ref3.field,
isNested = _ref3.isNested,
graphqlField = _ref3.graphqlField,
termFilters = _ref3.termFilters;
isNested = _ref3.isNested,
graphqlField = _ref3.graphqlField,
termFilters = _ref3.termFilters;
var maxAggregations = (0, _lodash.get)(graphqlField, ['buckets', '__arguments', 0, 'max', 'value'], MAX_AGGREGATION_SIZE);

@@ -58,3 +46,2 @@ var termFilter = (graphqlField === null || graphqlField === void 0 ? void 0 : (_graphqlField$buckets = graphqlField.buckets) === null || _graphqlField$buckets === void 0 ? void 0 : _graphqlField$buckets.filter_by_term) || null;

var innerAggs = {};
if (isNested) {

@@ -67,3 +54,2 @@ innerAggs = _objectSpread(_objectSpread({}, innerAggs), {}, {

}
if (topHits) {

@@ -77,6 +63,4 @@ innerAggs = _objectSpread(_objectSpread({}, innerAggs), {}, _defineProperty({}, "".concat(field, ".hits"), {

}
if (termFilter) {
var _termFilter$__argumen, _termFilter$__argumen2;
var terms = ((_termFilter$__argumen = termFilter.__arguments[0]) === null || _termFilter$__argumen === void 0 ? void 0 : (_termFilter$__argumen2 = _termFilter$__argumen.filter) === null || _termFilter$__argumen2 === void 0 ? void 0 : _termFilter$__argumen2.value) || [];

@@ -99,3 +83,2 @@ var aggsFilters = terms.content.map(function (sqonFilter) {

}
var aggs = (_aggs = {}, _defineProperty(_aggs, field, _objectSpread(_objectSpread({}, !(0, _isEmpty["default"])(innerAggs) ? {

@@ -121,3 +104,2 @@ aggs: _objectSpread({}, innerAggs)

};
var wrapNestedFilter = function wrapNestedFilter(aggs, field, termFilters) {

@@ -133,13 +115,10 @@ return _defineProperty({}, "".concat(field, ":nested_filtered"), {

};
var getPrecisionThreshold = function getPrecisionThreshold(graphqlField) {
var _args$precision_thres;
var args = (0, _lodash.get)(graphqlField, [_constants.CARDINALITY, '__arguments', 0], {});
return (args === null || args === void 0 ? void 0 : (_args$precision_thres = args.precision_threshold) === null || _args$precision_thres === void 0 ? void 0 : _args$precision_thres.value) || CARDINALITY_DEFAULT_PRECISION_THRESHOLD;
};
var computeCardinalityAggregation = function computeCardinalityAggregation(_ref5) {
var field = _ref5.field,
graphqlField = _ref5.graphqlField;
graphqlField = _ref5.graphqlField;
return _defineProperty({}, "".concat(field, ":").concat(_constants.CARDINALITY), {

@@ -152,15 +131,14 @@ cardinality: {

};
/**
* graphqlFields: output from `graphql-fields` (https://github.com/robrichard/graphql-fields)
*/
var _default = function _default(_ref7) {
var field = _ref7.field,
_ref7$graphqlField = _ref7.graphqlField,
graphqlField = _ref7$graphqlField === void 0 ? {} : _ref7$graphqlField,
_ref7$isNested = _ref7.isNested,
isNested = _ref7$isNested === void 0 ? false : _ref7$isNested,
_ref7$termFilters = _ref7.termFilters,
termFilters = _ref7$termFilters === void 0 ? [] : _ref7$termFilters;
_ref7$graphqlField = _ref7.graphqlField,
graphqlField = _ref7$graphqlField === void 0 ? {} : _ref7$graphqlField,
_ref7$isNested = _ref7.isNested,
isNested = _ref7$isNested === void 0 ? false : _ref7$isNested,
_ref7$termFilters = _ref7.termFilters,
termFilters = _ref7$termFilters === void 0 ? [] : _ref7$termFilters;
var types = [_constants.BUCKETS, _constants.STATS, _constants.HISTOGRAM, _constants.BUCKET_COUNT, _constants.CARDINALITY, _constants.TOPHITS].filter(function (t) {

@@ -194,4 +172,3 @@ return graphqlField[t];

};
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZEFnZ3JlZ2F0aW9ucy9jcmVhdGVGaWVsZEFnZ3JlZ2F0aW9uLmpzIl0sIm5hbWVzIjpbIk1BWF9BR0dSRUdBVElPTl9TSVpFIiwiSElTVE9HUkFNX0lOVEVSVkFMX0RFRkFVTFQiLCJDQVJESU5BTElUWV9ERUZBVUxUX1BSRUNJU0lPTl9USFJFU0hPTEQiLCJjcmVhdGVOdW1lcmljQWdncmVnYXRpb24iLCJ0eXBlIiwiZmllbGQiLCJncmFwaHFsRmllbGQiLCJhcmdzIiwiSElTVE9HUkFNIiwiaW50ZXJ2YWwiLCJjcmVhdGVUZXJtQWdncmVnYXRpb24iLCJpc05lc3RlZCIsInRlcm1GaWx0ZXJzIiwibWF4QWdncmVnYXRpb25zIiwidGVybUZpbHRlciIsImJ1Y2tldHMiLCJmaWx0ZXJfYnlfdGVybSIsInRvcEhpdHMiLCJ0b3BfaGl0cyIsInNvdXJjZSIsIl9fYXJndW1lbnRzIiwiX3NvdXJjZSIsInNpemUiLCJpbm5lckFnZ3MiLCJybiIsInJldmVyc2VfbmVzdGVkIiwidmFsdWUiLCJ0ZXJtcyIsImZpbHRlciIsImFnZ3NGaWx0ZXJzIiwiY29udGVudCIsIm1hcCIsInNxb25GaWx0ZXIiLCJuZXN0ZWRGaWVsZHMiLCJ0ZXJtX2ZpbHRlcnMiLCJib29sIiwibXVzdCIsImFnZ3MiLCJtaXNzaW5nIiwibGVuZ3RoIiwid3JhcE5lc3RlZEZpbHRlciIsImdldFByZWNpc2lvblRocmVzaG9s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1cbiAgaWYgKHRvcEhpdHMpIHtcbiAgICBpbm5lckFnZ3MgPSB7XG4gICAgICAuLi5pbm5lckFnZ3MsXG4gICAgICBbYCR7ZmllbGR9LmhpdHNgXToge1xuICAgICAgICB0b3BfaGl0czoge1xuICAgICAgICAgIF9zb3VyY2U6IHNvdXJjZT8udmFsdWUgfHwgW10sXG4gICAgICAgICAgc2l6ZTogc2l6ZT8udmFsdWUsXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgIH07XG4gIH1cblxuICBpZiAodGVybUZpbHRlcikge1xuICAgIGNvbnN0IHRlcm1zID0gdGVybUZpbHRlci5fX2FyZ3VtZW50c1swXT8uZmlsdGVyPy52YWx1ZSB8fCBbXTtcblxuICAgIGNvbnN0IGFnZ3NGaWx0ZXJzID0gdGVybXMuY29udGVudC5tYXAoKHNxb25GaWx0ZXIpID0+XG4gICAgICBvcFN3aXRjaCh7XG4gICAgICAgIG5lc3RlZEZpZWxkczogW10sXG4gICAgICAgIGZpbHRlcjogbm9ybWFsaXplRmlsdGVycyhzcW9uRmlsdGVyKSxcbiAgICAgIH0pLFxuICAgICk7XG5cbiAgICBpbm5lckFnZ3MgPSB7XG4gICAgICAuLi5pbm5lckFnZ3MsXG4gICAgICAuLi4odGVybXNcbiAgICAgICAgPyB7XG4gICAgICAgICAgICB0ZXJtX2ZpbHRlcnM6IHtcbiAgICAgICAgICAgICAgZmlsdGVyOiB7XG4gICAgICAgICAgICAgICAgYm9vbDoge1xuICAgICAgICAgICAgICAgICAgbXVzdDogYWdnc0ZpbHRlcnMsXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgfVxuICAgICAgICA6IHt9KSxcbiAgICB9O1xuICB9XG5cbiAgY29uc3QgYWdncyA9IHtcbiAgICBbZmllbGRdOiB7XG4gICAgICAuLi4oIWlzRW1wdHkoaW5uZXJBZ2dzKSA/IHsgYWdnczogeyAuLi5pbm5lckFnZ3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sSUFBSSxFQUFKQSxJQUFJO1FBQUVDLEtBQUssRUFBTEEsS0FBSztRQUFFQyxZQUFZLEVBQVpBO01BQWEsQ0FBQyxDQUFDLENBQUM7SUFDekYsQ0FBQyxNQUFNO01BQ0wsT0FBT21ELEdBQUc7SUFDWjtFQUNGLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUNSLENBQUM7QUFBQSJ9

@@ -7,36 +7,25 @@ "use strict";

exports["default"] = void 0;
var _constants = require("../constants");
var _normalizeFilters = _interopRequireDefault(require("../buildQuery/normalizeFilters"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
var getNestedSqonFilters = function getNestedSqonFilters(_ref) {
var _ref$sqon = _ref.sqon,
sqon = _ref$sqon === void 0 ? null : _ref$sqon,
nestedFields = _ref.nestedFields,
_ref$accumulator = _ref.accumulator,
accumulator = _ref$accumulator === void 0 ? {} : _ref$accumulator,
_ref$parentPivot = _ref.parentPivot,
parentPivot = _ref$parentPivot === void 0 ? '.' : _ref$parentPivot;
sqon = _ref$sqon === void 0 ? null : _ref$sqon,
nestedFields = _ref.nestedFields,
_ref$accumulator = _ref.accumulator,
accumulator = _ref$accumulator === void 0 ? {} : _ref$accumulator,
_ref$parentPivot = _ref.parentPivot,
parentPivot = _ref$parentPivot === void 0 ? '.' : _ref$parentPivot;
var op = sqon.op;
if ([_constants.AND_OP, _constants.OR_OP, _constants.NOT_OP].includes(op)) {
var _sqon$content = sqon.content,
content = _sqon$content === void 0 ? [] : _sqon$content,
pivot = sqon.pivot; // console.log('sqon: ', JSON.stringify(sqon, null, 2));
content = _sqon$content === void 0 ? [] : _sqon$content,
pivot = sqon.pivot;
// console.log('sqon: ', JSON.stringify(sqon, null, 2));
content.forEach(function (c) {

@@ -52,4 +41,4 @@ return getNestedSqonFilters({

var _sqon$content2 = sqon.content,
sqonField = _sqon$content2.field,
sqonFields = _sqon$content2.fields;
sqonField = _sqon$content2.field,
sqonFields = _sqon$content2.fields;
var fields = sqonFields || [sqonField];

@@ -60,3 +49,2 @@ fields.forEach(function (field) {

var isNested = nestedFields.includes(splitted.slice(0, splitted.length - 1).join('.'));
if (splitted.length && isNested && parentPivot !== parentPath) {

@@ -67,12 +55,10 @@ accumulator[parentPath] = [].concat(_toConsumableArray(accumulator[parentPath] || []), [sqon]);

}
return accumulator;
};
var _default = function _default(_ref2) {
var _ref2$sqon = _ref2.sqon,
sqon = _ref2$sqon === void 0 ? null : _ref2$sqon,
nestedFields = _ref2.nestedFields;
var normalized = (0, _normalizeFilters["default"])(sqon); // console.log('normalized: ', JSON.stringify(normalized, null, 2));
sqon = _ref2$sqon === void 0 ? null : _ref2$sqon,
nestedFields = _ref2.nestedFields;
var normalized = (0, _normalizeFilters["default"])(sqon);
// console.log('normalized: ', JSON.stringify(normalized, null, 2));
return sqon ? getNestedSqonFilters({

@@ -83,4 +69,3 @@ sqon: normalized,

};
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZEFnZ3JlZ2F0aW9ucy9nZXROZXN0ZWRTcW9uRmlsdGVycy5qcyJdLCJuYW1lcyI6WyJnZXROZXN0ZWRTcW9uRmlsdGVycyIsInNxb24iLCJuZXN0ZWRGaWVsZHMiLCJhY2N1bXVsYXRvciIsInBhcmVudFBpdm90Iiwib3AiLCJBTkRfT1AiLCJPUl9PUCIsIk5PVF9PUCIsImluY2x1ZGVzIiwiY29udGVudCIsInBpdm90IiwiZm9yRWFjaCIsImMiLCJzcW9uRmllbGQiLCJmaWVsZCIsInNxb25GaWVsZHMiLCJmaWVsZHMiLCJzcGxpdHRlZCIsInNwbGl0IiwicGFyZW50UGF0aCIsInNsaWNlIiwibGVuZ3RoIiwiam9pbiIsImlzTmVzdGVkIiwibm9ybWFsaXplZCJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBOztBQUNBOzs7Ozs7Ozs7Ozs7Ozs7O0FBRUEsSUFBTUEsb0JBQW9CLEdBQUcsU0FBdkJBLG9CQUF1QixPQUt2QjtBQUFBLHVCQUpKQyxJQUlJO0FBQUEsTUFKSkEsSUFJSSwwQkFKRyxJQUlIO0FBQUEsTUFISkMsWUFHSSxRQUhKQSxZQUdJO0FBQUEsOEJBRkpDLFdBRUk7QUFBQSxNQUZKQSxXQUVJLGlDQUZVLEVBRVY7QUFBQSw4QkFESkMsV0FDSTtBQUFBLE1BREpBLFdBQ0ksaUNBRFUsR0FDVjtBQUFBLE1BQ0lDLEVBREosR0FDV0osSUFEWCxDQUNJSSxFQURKOztBQUVKLE1BQUksQ0FBQ0MsaUJBQUQsRUFBU0MsZ0JBQVQsRUFBZ0JDLGlCQUFoQixFQUF3QkMsUUFBeEIsQ0FBaUNKLEVBQWpDLENB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7TUFDdkMsSUFBTUMsVUFBVSxHQUFHRixRQUFRLENBQUNHLEtBQUssQ0FBQyxDQUFDLEVBQUVILFFBQVEsQ0FBQ0ksTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDQyxJQUFJLENBQUMsR0FBRyxDQUFDO01BQ25FLElBQU1DLFFBQVEsR0FBR3RCLFlBQVksQ0FBQ08sUUFBUSxDQUFDUyxRQUFRLENBQUNHLEtBQUssQ0FBQyxDQUFDLEVBQUVILFFBQVEsQ0FBQ0ksTUFBTSxHQUFHLENBQUMsQ0FBQyxDQUFDQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7TUFDeEYsSUFBSUwsUUFBUSxDQUFDSSxNQUFNLElBQUlFLFFBQVEsSUFBSXBCLFdBQVcsS0FBS2dCLFVBQVUsRUFBRTtRQUM3RGpCLFdBQVcsQ0FBQ2lCLFVBQVUsQ0FBQyxnQ0FBUWpCLFdBQVcsQ0FBQ2lCLFVBQVUsQ0FBQyxJQUFJLEVBQUUsSUFBR25CLElBQUksRUFBQztNQUN0RTtJQUNGLENBQUMsQ0FBQztFQUNKO0VBQ0EsT0FBT0UsV0FBVztBQUNwQixDQUFDO0FBQUMsZUFFYSx5QkFBbUM7RUFBQSx1QkFBaENGLElBQUk7SUFBSkEsSUFBSSwyQkFBRyxJQUFJO0lBQUVDLFlBQVksU0FBWkEsWUFBWTtFQUN6QyxJQUFNdUIsVUFBVSxHQUFHLElBQUFDLDRCQUFnQixFQUFDekIsSUFBSSxDQUFDO0VBQ3pDO0VBQ0EsT0FBT0EsSUFBSSxHQUNQRCxvQkFBb0IsQ0FBQztJQUNuQkMsSUFBSSxFQUFFd0IsVUFBVTtJQUNoQnZCLFlBQVksRUFBWkE7RUFDRixDQUFDLENBQUMsR0FDRixDQUFDLENBQUM7QUFDUixDQUFDO0FBQUEifQ==

@@ -7,40 +7,22 @@ "use strict";

exports["default"] = _default;
var _lodash = require("lodash");
var _injectNestedFiltersToAggs = _interopRequireDefault(require("./injectNestedFiltersToAggs"));
var _getNestedSqonFilters = _interopRequireDefault(require("./getNestedSqonFilters"));
var _constants = require("../constants");
var _createFieldAggregation = _interopRequireDefault(require("./createFieldAggregation"));
var _normalizeFilters = _interopRequireDefault(require("../buildQuery/normalizeFilters"));
var _buildQuery = require("../buildQuery");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function createGlobalAggregation(_ref) {
var field = _ref.field,
aggregation = _ref.aggregation;
aggregation = _ref.aggregation;
return _defineProperty({}, "".concat(field, ":").concat(_constants.AGGS_WRAPPER_GLOBAL), {

@@ -51,7 +33,6 @@ global: {},

}
function createFilteredAggregation(_ref3) {
var field = _ref3.field,
filter = _ref3.filter,
aggregation = _ref3.aggregation;
filter = _ref3.filter,
aggregation = _ref3.aggregation;
return Object.keys(filter || {}).length ? _defineProperty({}, "".concat(field, ":").concat(_constants.AGGS_WRAPPER_FILTERED), {

@@ -62,10 +43,8 @@ filter: filter,

}
function removeFieldFromQuery(_ref5) {
var field = _ref5.field,
query = _ref5.query;
query = _ref5.query;
var nested = (0, _lodash.get)(query, _constants.ES_NESTED);
var nestedQuery = (0, _lodash.get)(nested, _constants.ES_QUERY);
var bool = (0, _lodash.get)(query, _constants.ES_BOOL);
if (['terms', 'range'].some(function (k) {

@@ -84,5 +63,4 @@ return (0, _lodash.get)(query, [k, field]);

var _ref7 = _slicedToArray(_ref6, 2),
type = _ref7[0],
values = _ref7[1];
type = _ref7[0],
values = _ref7[1];
var filteredValues = values.map(function (value) {

@@ -94,7 +72,5 @@ return removeFieldFromQuery({

}).filter(Boolean);
if (filteredValues.length > 0) {
acc[type] = filteredValues;
}
return acc;

@@ -107,6 +83,5 @@ }, {});

}
function getNestedPathsInField(_ref9) {
var field = _ref9.field,
nestedFields = _ref9.nestedFields;
nestedFields = _ref9.nestedFields;
return field.split('.').map(function (s, i, arr) {

@@ -118,9 +93,7 @@ return arr.slice(0, i + 1).join('.');

}
function wrapWithFilters(_ref10) {
var field = _ref10.field,
query = _ref10.query,
aggregationsFilterThemselves = _ref10.aggregationsFilterThemselves,
aggregation = _ref10.aggregation;
query = _ref10.query,
aggregationsFilterThemselves = _ref10.aggregationsFilterThemselves,
aggregation = _ref10.aggregation;
if (!aggregationsFilterThemselves) {

@@ -130,4 +103,4 @@ var cleanedQuery = removeFieldFromQuery({

query: query
}); // TODO: better way to figure out that the field wasn't found
});
// TODO: better way to figure out that the field wasn't found
if (!(0, _lodash.isEqual)(cleanedQuery || {}, query || {})) {

@@ -144,16 +117,14 @@ return createGlobalAggregation({

}
return aggregation;
}
/**
* graphqlFields: output from `graphql-fields` (https://github.com/robrichard/graphql-fields)
*/
function _default(_ref11) {
var sqon = _ref11.sqon,
graphqlFields = _ref11.graphqlFields,
nestedFields = _ref11.nestedFields,
aggregationsFilterThemselves = _ref11.aggregationsFilterThemselves,
query = _ref11.query;
graphqlFields = _ref11.graphqlFields,
nestedFields = _ref11.nestedFields,
aggregationsFilterThemselves = _ref11.aggregationsFilterThemselves,
query = _ref11.query;
var normalizedSqon = (0, _normalizeFilters["default"])(sqon);

@@ -166,5 +137,4 @@ var nestedSqonFilters = (0, _getNestedSqonFilters["default"])({

var _ref13 = _slicedToArray(_ref12, 2),
fieldKey = _ref13[0],
graphqlField = _ref13[1];
fieldKey = _ref13[0],
graphqlField = _ref13[1];
var field = fieldKey.replace(/__/g, '.');

@@ -177,3 +147,2 @@ var nestedPaths = getNestedPathsInField({

var _c$content, _c$content$field, _c$content2, _c$content2$field, _c$content3;
return aggregationsFilterThemselves ? (_c$content = c.content) === null || _c$content === void 0 ? void 0 : (_c$content$field = _c$content.field) === null || _c$content$field === void 0 ? void 0 : _c$content$field.startsWith(nestedPaths) : ((_c$content2 = c.content) === null || _c$content2 === void 0 ? void 0 : (_c$content2$field = _c$content2.field) === null || _c$content2$field === void 0 ? void 0 : _c$content2$field.startsWith(nestedPaths)) && ((_c$content3 = c.content) === null || _c$content3 === void 0 ? void 0 : _c$content3.field) !== field;

@@ -215,2 +184,2 @@ });

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZEFnZ3JlZ2F0aW9ucy9pbmRleC5qcyJdLCJuYW1lcyI6WyJjcmVhdGVHbG9iYWxBZ2dyZWdhdGlvbiIsImZpZWxkIiwiYWdncmVnYXRpb24iLCJBR0dTX1dSQVBQRVJfR0xPQkFMIiwiZ2xvYmFsIiwiYWdncyIsImNyZWF0ZUZpbHRlcmVkQWdncmVnYXRpb24iLCJmaWx0ZX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opRequireDefault(require("../buildQuery/normalizeFilters"));
var _constants = require("../constants");
var _lodash = require("lodash");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
/*

@@ -44,9 +29,8 @@ * due to this problem: https://github.com/kids-first/kf-portal-ui/issues/488

var aggs = _ref.aggs,
nestedSqonFilters = _ref.nestedSqonFilters,
aggregationsFilterThemselves = _ref.aggregationsFilterThemselves;
nestedSqonFilters = _ref.nestedSqonFilters,
aggregationsFilterThemselves = _ref.aggregationsFilterThemselves;
return Object.entries(aggs).reduce(function (acc, _ref2) {
var _ref3 = _slicedToArray(_ref2, 2),
aggName = _ref3[0],
aggContent = _ref3[1];
aggName = _ref3[0],
aggContent = _ref3[1];
var skipToNextLevel = function skipToNextLevel() {

@@ -62,3 +46,2 @@ acc[aggName] = _objectSpread(_objectSpread({}, aggContent), {}, {

};
var wrapInFilterAgg = function wrapInFilterAgg() {

@@ -88,3 +71,2 @@ acc[aggName] = _objectSpread(_objectSpread({}, aggContent), {}, {

};
if (aggContent.global || aggContent.filter) {

@@ -103,5 +85,4 @@ return skipToNextLevel();

};
var _default = injectNestedFiltersToAggs;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZEFnZ3JlZ2F0aW9ucy9pbmplY3ROZXN0ZWRGaWx0ZXJzVG9BZ2dzLmpzIl0sIm5hbWVzIjpbImluamVjdE5lc3RlZEZpbHRlcnNUb0FnZ3MiLCJhZ2dzIiwibmVzdGVkU3FvbkZpbHRlcnMiLCJhZ2dyZWdhdGlvbnNGaWx0ZXJUaGVtc2VsdmVzIiwiT2JqZWN0IiwiZW50cmllcyIsInJlZHVjZSIsImFjYyIsImFnZ05hbWUiLCJhZ2dDb250ZW50Iiwic2tpcFRvTmV4dExldmVsIiwid3JhcEluRmlsdGVyQWdnIiwibmVzdGVkIiwicGF0aCIsIkFHR1NfV1JBUFBFUl9GSUxURVJFRCIsImZpbHRlciIsImJvb2wiLCJzaG91bGQiLCJzcW9uRmlsdGVyIiwic3BsaXQiLCJjb250ZW50IiwiZmllbGQiLCJtYXAiLCJuZXN0ZWRGaWVsZHMiLCJnbG9iYWwiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQTs7QUFDQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVBOzs7OztBQUtBLElBQU1BLHlCQUF5QixHQUFHLFNBQTVCQSx5QkFBNEI7QUFBQSxNQUFHQyxJQU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FvbkZpbHRlcnMsXG4gICAgICAgICAgYWdncmVnYXRpb25zRmlsdGVyVGhlbXNlbHZlcyxcbiAgICAgICAgfSksXG4gICAgICB9O1xuICAgICAgcmV0dXJuIGFjYztcbiAgICB9O1xuICAgIGNvbnN0IHdyYXBJbkZpbHRlckFnZyA9ICgpID0+IHtcbiAgICAgIGFjY1thZ2dOYW1lXSA9IHtcbiAgICAgICAgLi4uYWdnQ29udGVudCxcbiAgICAgICAgYWdnczoge1xuICAgICAgICAgIFtgJHthZ2dDb250ZW50Lm5lc3RlZC5wYXRofToke0FHR1NfV1JBUFBFUl9GSUxURVJFRH1gXToge1xuICAgICAgICAgICAgZmlsdGVyOiB7XG4gICAgICAgICAgICAgIGJvb2w6IHtcbiAgICAgICAgICAgICAgICBzaG91bGQ6IG5lc3RlZFNxb25GaWx0ZXJzW2FnZ0NvbnRlbnQubmVzdGVkLnBhdGhdXG4gICAgICAgICAgICAgICAgICAuZmlsdGVyKFxuICAgICAgICAgICAgICAgICAgICAoc3FvbkZpbHRlcikgPT5cbiAgICAgICAgICAgICAgICAgICAgICBhZ2dyZWdhdGlvbnNGaWx0ZXJUaGVtc2VsdmVzIHx8XG4gICAgICAgICAgICAgICAgICAgICAgYWdnTmFtZS5zcGxpdCgnOicpWzBdICE9PSBzcW9uRmlsdGVyLmNvbnRlbnQuZmllbGQsXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAubWFwKChzcW9uRmlsdGVyKSA9PlxuICAgICAgICAgICAgICAgICAgICBvcFN3aXRjaCh7XG4gICAgICAgICAgICAgICAgICAgICAgbmVzdGVkRmllbGRzOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXI6IG5vcm1hbGl6ZUZpbHRlcnMoc3FvbkZpbHRlciksXG4gICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBh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QuZmllbGQsXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAubWFwKChzcW9uRmlsdGVyKSA9PlxuICAgICAgICAgICAgICAgICAgICBvcFN3aXRjaCh7XG4gICAgICAgICAgICAgICAgICAgICAgbmVzdGVkRmllbGRzOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXI6IG5vcm1hbGl6ZUZpbHRlcnMoc3FvbkZpbHRlciksXG4gICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBhZ2dzOiBpbmplY3ROZXN0ZWRGaWx0ZXJzVG9BZ2dzKHtcbiAgICAgICAgICAgICAgYWdnczogYWdnQ29udGVudC5hZ2dzLFxuICAgICAgICAgICAgICBuZXN0ZWRTcW9uRmlsdGVycyxcbiAgICAgICAgICAgICAgYWdncmVnYXRpb25zRmlsdGVyVGhlbXNlbHZlcyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICB9O1xuICAgICAgcmV0dXJuIGFjYztcbiAgICB9O1xuXG4gICAgaWYgKGFnZ0NvbnRlbnQuZ2xvYmFsIHx8IGFnZ0NvbnRlbnQuZmlsdGVyKSB7XG4gICAgICByZXR1cm4gc2tpcFRvTmV4dExldmVsKCk7XG4gICAgfSBlbHNlIGlmIChhZ2dDb250ZW50Lm5lc3RlZCkge1xuICAgICAgaWYgKG5lc3RlZFNxb25GaWx0ZXJzW2FnZ0NvbnRlbnQubmVzdGVkLnBhdGhdKSB7XG4gICAgICAgIHJldHVybiB3cmFwSW5GaWx0ZXJBZ2coKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBza2lwVG9OZXh0TGV2ZWwoKTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGFjYztcbiAgICB9XG4gIH0sIGNsb25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xQixDQUFDLE1BQU07UUFDTCxPQUFPRCxlQUFlLEVBQUU7TUFDMUI7SUFDRixDQUFDLE1BQU07TUFDTCxPQUFPSCxHQUFHO0lBQ1o7RUFDRixDQUFDLEVBQUUsSUFBQW9CLGlCQUFTLEVBQUMxQixJQUFJLENBQUMsQ0FBQztBQUFBO0FBQUMsZUFFUEQseUJBQXlCO0FBQUEifQ==

@@ -8,46 +8,26 @@ "use strict";

exports.opSwitch = void 0;
var _lodash = _interopRequireDefault(require("lodash"));
var _constants = require("../constants");
var _normalizeFilters = _interopRequireDefault(require("./normalizeFilters"));
var _esFilter = require("../utils/esFilter");
var _wrappers;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
var wrapFilter = function wrapFilter(_ref) {
var esFilter = _ref.esFilter,
nestedFields = _ref.nestedFields,
filter = _ref.filter,
isNot = _ref.isNot;
nestedFields = _ref.nestedFields,
filter = _ref.filter,
isNot = _ref.isNot;
return filter.content.field.split('.').slice(0, -1).map(function (p, i, segments) {

@@ -61,13 +41,10 @@ return segments.slice(0, i + 1).join('.');

};
function getRegexFilter(_ref2) {
var nestedFields = _ref2.nestedFields,
filter = _ref2.filter;
filter = _ref2.filter;
var op = filter.op,
_filter$content = filter.content,
field = _filter$content.field,
_filter$content$value = _slicedToArray(_filter$content.value, 1),
value = _filter$content$value[0];
_filter$content = filter.content,
field = _filter$content.field,
_filter$content$value = _slicedToArray(_filter$content.value, 1),
value = _filter$content$value[0];
var esFilter = wrapFilter({

@@ -83,12 +60,10 @@ filter: filter,

}
function getTermFilter(_ref3) {
var _terms;
var nestedFields = _ref3.nestedFields,
filter = _ref3.filter;
filter = _ref3.filter;
var op = filter.op,
_filter$content2 = filter.content,
value = _filter$content2.value,
field = _filter$content2.field;
_filter$content2 = filter.content,
value = _filter$content2.value,
field = _filter$content2.field;
var esFilter = wrapFilter({

@@ -106,10 +81,10 @@ filter: filter,

}
function getFuzzyFilter(_ref4) {
var nestedFields = _ref4.nestedFields,
filter = _ref4.filter;
filter = _ref4.filter;
var content = filter.content;
var value = content.value,
fields = content.fields; // group queries by their nesting level
fields = content.fields;
// group queries by their nesting level
var sortedNested = nestedFields.slice().sort(function (a, b) {

@@ -122,3 +97,2 @@ return b.length - a.length;

}) || '';
if (acc[group]) {

@@ -129,6 +103,6 @@ acc[group].push(field);

}
return acc;
}, {}); // construct one multi match per nested group
}, {});
// construct one multi match per nested group
return (0, _esFilter.wrapShould)(Object.values(nestedMap).map(function (fields) {

@@ -150,6 +124,5 @@ return wrapFilter({

}
function getMissingFilter(_ref6) {
var nestedFields = _ref6.nestedFields,
filter = _ref6.filter;
filter = _ref6.filter;
var field = filter.content.field;

@@ -168,10 +141,9 @@ return wrapFilter({

}
function getRangeFilter(_ref7) {
var nestedFields = _ref7.nestedFields,
filter = _ref7.filter;
filter = _ref7.filter;
var op = filter.op,
_filter$content3 = filter.content,
field = _filter$content3.field,
value = _filter$content3.value;
_filter$content3 = filter.content,
field = _filter$content3.field,
value = _filter$content3.value;
return wrapFilter({

@@ -187,6 +159,5 @@ filter: filter,

}
function collapseNestedFilters(_ref8) {
var esFilter = _ref8.esFilter,
bools = _ref8.bools;
bools = _ref8.bools;
var filterIsNested = (0, _esFilter.isNested)(esFilter);

@@ -209,13 +180,10 @@ var basePath = [].concat(_toConsumableArray(filterIsNested ? [_constants.ES_NESTED, _constants.ES_QUERY] : []), [_constants.ES_BOOL]);

}
var wrappers = (_wrappers = {}, _defineProperty(_wrappers, _constants.AND_OP, _esFilter.wrapMust), _defineProperty(_wrappers, _constants.OR_OP, _esFilter.wrapShould), _defineProperty(_wrappers, _constants.NOT_OP, _esFilter.wrapMustNot), _wrappers);
function getGroupFilter(_ref9) {
var _esFilters$;
var nestedFields = _ref9.nestedFields,
_ref9$filter = _ref9.filter,
content = _ref9$filter.content,
op = _ref9$filter.op,
pivot = _ref9$filter.pivot;
_ref9$filter = _ref9.filter,
content = _ref9$filter.content,
op = _ref9$filter.op,
pivot = _ref9$filter.pivot;
var applyBooleanWrapper = wrappers[op];

@@ -228,7 +196,5 @@ var esFilters = content.map(function (filter) {

});
var isNested = !!((_esFilters$ = esFilters[0]) === null || _esFilters$ === void 0 ? void 0 : _esFilters$.nested);
var isNested = !!((_esFilters$ = esFilters[0]) !== null && _esFilters$ !== void 0 && _esFilters$.nested);
if (isNested && esFilters.map(function (f) {
var _f$nested;
return (_f$nested = f.nested) === null || _f$nested === void 0 ? void 0 : _f$nested.path;

@@ -247,9 +213,8 @@ }).includes(pivot)) {

}
function getSetFilter(_ref10) {
var nestedFields = _ref10.nestedFields,
filter = _ref10.filter,
_ref10$filter = _ref10.filter,
content = _ref10$filter.content,
op = _ref10$filter.op;
filter = _ref10.filter,
_ref10$filter = _ref10.filter,
content = _ref10$filter.content,
op = _ref10$filter.op;
return wrapFilter({

@@ -271,11 +236,9 @@ isNot: op === _constants.NOT_IN_OP,

}
var getBetweenFilter = function getBetweenFilter(_ref11) {
var _field2;
var nestedFields = _ref11.nestedFields,
filter = _ref11.filter;
filter = _ref11.filter;
var _filter$content4 = filter.content,
field = _filter$content4.field,
value = _filter$content4.value;
field = _filter$content4.field,
value = _filter$content4.value;
return wrapFilter({

@@ -291,13 +254,12 @@ filter: filter,

};
var opSwitch = function opSwitch(_ref12) {
var nestedFields = _ref12.nestedFields,
filter = _ref12.filter;
filter = _ref12.filter;
var op = filter.op,
pivot = filter.pivot,
value = filter.content.value; // we need a way to handle object fields before the following error is valid
pivot = filter.pivot,
value = filter.content.value;
// we need a way to handle object fields before the following error is valid
// if (pivot && pivot !== '.' && !nestedFields.includes(pivot)) {
// throw new Error(`Invalid pivot field "${pivot}", not a nested field`);
// }
if ([_constants.OR_OP, _constants.AND_OP, _constants.NOT_OP].includes(op)) {

@@ -366,8 +328,6 @@ return getGroupFilter({

};
exports.opSwitch = opSwitch;
function _default(_ref13) {
var nestedFields = _ref13.nestedFields,
rawFilters = _ref13.filters;
rawFilters = _ref13.filters;
if (Object.keys(rawFilters || {}).length === 0) return {};

@@ -379,2 +339,2 @@ return opSwitch({

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZFF1ZXJ5L2luZGV4LmpzIl0sIm5hbWVzIjpbIndyYXBGaWx0ZXIiLCJlc0ZpbHRlciIsIm5lc3RlZEZpZWxkcyIsImZpbHRlciIsImlzTm90IiwiY29udGVudCIsImZpZWxkIiwic3BsaXQiLCJzbGljZSIsIm1hcCIsInAiLCJpIiwic2VnbWVudHMiLCJqb2luIiwiaW5jbHVkZXMiLCJyZXZlcnNlIiwicmVkdWNlIiwicGF0aCIsImdldFJlZ2V4RmlsdGVyIiwib3AiLCJ2YWx1ZSIsInJlZ2V4cCIsInJlcGxhY2UiLCJOT1RfSU5fT1AiLCJTT01FX05PVF9JTl9PUCIsImdldFRlcm1GaWx0ZXIiLCJ0ZXJtcyIsIml0ZW0iLCJnZXRGdXp6eUZpbHRlciIsImZpZWxkcyIsInNvcnRlZE5lc3RlZCIsInNvcnQiLCJhIiwiYiIsImxlbmd0aCIsIm5lc3RlZE1hcCIsImFjYyIsImdyb3VwIiwiZmluZCIsInkiLCJwdXNoIiwiT2JqZWN0IiwidmFsdWVzIiwiRVNfV0lMRENBUkQiLCJnZXRNaXNzaW5nRmlsdGVyIiwiZXhpc3RzIiwiYm9vc3QiLCJnZXRSYW5nZUZpbHRlciIsInJhbmdlIiwiR1RfT1AiLCJHVEVfT1AiLCJfIiwibWF4IiwibWluIiwiY29sbGFwc2VOZXN0ZWRGaWx0ZXJzIiwiYm9vbHMiLCJmaWx0ZXJJc05lc3RlZCIsImJhc2VQYXRoIiwiRVNfTkVTVEVEIiwiRVNfUVVFUlkiLCJFU19CT09MIiwiRVNfTVVTVCIsIkVTX01VU1RfTk9UIiwiZ2V0IiwiZm91bmQiLCJib29sIiwid3JhcHBlcnMiLCJBTkRfT1AiLCJ3cmFwTXVzdCIsIk9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UFBTSxJQUFJb0csb0JBQVMsS0FBS2xGLEVBQUUsRUFBRTtJQUMzQixPQUFPUyxjQUFjLENBQUM7TUFBRTVCLFlBQVksRUFBWkEsWUFBWTtNQUFFQyxNQUFNLEVBQU5BO0lBQU8sQ0FBQyxDQUFDO0VBQ2pELENBQUMsTUFBTTtJQUNMLE1BQU0sSUFBSXFHLEtBQUssQ0FBQyxZQUFZLENBQUM7RUFDL0I7QUFDRixDQUFDO0FBQUM7QUFFYSwwQkFBaUQ7RUFBQSxJQUFyQ3RHLFlBQVksVUFBWkEsWUFBWTtJQUFXdUcsVUFBVSxVQUFuQkMsT0FBTztFQUM5QyxJQUFJOUQsTUFBTSxDQUFDK0QsSUFBSSxDQUFDRixVQUFVLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQ3JFLE1BQU0sS0FBSyxDQUFDLEVBQUUsT0FBTyxDQUFDLENBQUM7RUFDekQsT0FBTzhDLFFBQVEsQ0FBQztJQUNkaEYsWUFBWSxFQUFaQSxZQUFZO0lBQ1pDLE1BQU0sRUFBRSxJQUFBeUcsNEJBQWdCLEVBQUNILFVBQVU7RUFDckMsQ0FBQyxDQUFDO0FBQ0oifQ==

@@ -7,32 +7,19 @@ "use strict";

exports["default"] = void 0;
var _lodash = require("lodash");
var _constants = require("../constants");
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
// _UNFLAT_KEY_ is a ephemeral mark for groupingOptimizer to not apply grouping
var _UNFLAT_KEY_ = '__unflat__';
function groupingOptimizer(_ref) {
var op = _ref.op,
content = _ref.content,
pivot = _ref.pivot;
content = _ref.content,
pivot = _ref.pivot;
return {

@@ -43,3 +30,2 @@ op: op,

var samePivot = f.pivot === pivot || !f.pivot;
if (f.op === op && !f[_UNFLAT_KEY_] && samePivot) {

@@ -53,3 +39,2 @@ return [].concat(_toConsumableArray(filters), _toConsumableArray(f.content));

}
function isSpecialFilter(value) {

@@ -60,9 +45,7 @@ return [_constants.REGEX, _constants.SET_ID, _constants.MISSING].some(function (x) {

}
var applyDefaultPivots = function applyDefaultPivots(filter) {
var content = filter.content,
_filter$pivot = filter.pivot,
pivot = _filter$pivot === void 0 ? null : _filter$pivot;
_filter$pivot = filter.pivot,
pivot = _filter$pivot === void 0 ? null : _filter$pivot;
var value = content.value;
if (value) {

@@ -79,7 +62,5 @@ return _objectSpread(_objectSpread({}, filter), {}, {

};
function normalizeFilters(filter) {
var op = filter.op,
content = filter.content;
content = filter.content;
if (!op) {

@@ -90,5 +71,3 @@ throw Error("Must specify \"op\" in filters: ".concat(filter));

}
var value = content.value;
if (_constants.OP_ALIASES[op]) {

@@ -131,3 +110,2 @@ return normalizeFilters(_objectSpread(_objectSpread({}, filter), {}, {

}
var _default = function _default(filter) {

@@ -137,4 +115,3 @@ var output = filter ? applyDefaultPivots(normalizeFilters(filter)) : filter;

};
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZFF1ZXJ5L25vcm1hbGl6ZUZpbHRlcnMuanMiXSwibmFtZXMiOlsiX1VORkxBVF9LRVlfIiwiZ3JvdXBpbmdPcHRpbWl6ZXIiLCJvcCIsImNvbnRlbnQiLCJwaXZvdCIsIm1hcCIsI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BQ0Y7QUFBQyxlQUVjLGtCQUFDQSxNQUFNLEVBQUs7RUFDekIsSUFBTWlCLE1BQU0sR0FBR2pCLE1BQU0sR0FBR0Qsa0JBQWtCLENBQUNkLGdCQUFnQixDQUFDZSxNQUFNLENBQUMsQ0FBQyxHQUFHQSxNQUFNO0VBQzdFLE9BQU9pQixNQUFNO0FBQ2YsQ0FBQztBQUFBIn0=

@@ -6,3 +6,3 @@ "use strict";

});
exports.BUCKET_COUNT = exports.AGGS_WRAPPER_NESTED = exports.AGGS_WRAPPER_FILTERED = exports.AGGS_WRAPPER_GLOBAL = exports.TOPHITS = exports.CARDINALITY = exports.HISTOGRAM = exports.STATS = exports.BUCKETS = exports.ES_ARRANGER_SET_TYPE = exports.ES_ARRANGER_SET_INDEX = exports.ES_MAX_LONG = exports.ES_DATE_FORMAT = exports.ES_PHRASE_PREFIX = exports.ES_TYPE = exports.ES_FIELDS = exports.ES_MULTI_MATCH = exports.ES_PATH = exports.ES_QUERY = exports.ES_BOOL = exports.ES_PREFIX = exports.ES_NESTED = exports.ES_SHOULD = exports.ES_MUST_NOT = exports.ES_MUST = exports.ES_WILDCARD = exports.ARRAY_CONTENT = exports.DATE_FORMAT = exports.OP_ALIASES = exports.SET_ID = exports.MISSING = exports.REGEX = exports.BETWEEN_OP = exports.LTE_OP = exports.LT_OP = exports.GTE_OP = exports.GT_OP = exports.NOT_OP = exports.OR_OP = exports.AND_OP = exports.FILTER_OP = exports.SOME_NOT_IN_OP = exports.ALL_OP = exports.NOT_IN_OP = exports.IN_OP = void 0;
exports.TOPHITS = exports.STATS = exports.SOME_NOT_IN_OP = exports.SET_ID = exports.REGEX = exports.OR_OP = exports.OP_ALIASES = exports.NOT_OP = exports.NOT_IN_OP = exports.MISSING = exports.LT_OP = exports.LTE_OP = exports.IN_OP = exports.HISTOGRAM = exports.GT_OP = exports.GTE_OP = exports.FILTER_OP = exports.ES_WILDCARD = exports.ES_TYPE = exports.ES_SHOULD = exports.ES_QUERY = exports.ES_PREFIX = exports.ES_PHRASE_PREFIX = exports.ES_PATH = exports.ES_NESTED = exports.ES_MUST_NOT = exports.ES_MUST = exports.ES_MULTI_MATCH = exports.ES_MAX_LONG = exports.ES_FIELDS = exports.ES_DATE_FORMAT = exports.ES_BOOL = exports.ES_ARRANGER_SET_TYPE = exports.ES_ARRANGER_SET_INDEX = exports.DATE_FORMAT = exports.CARDINALITY = exports.BUCKET_COUNT = exports.BUCKETS = exports.BETWEEN_OP = exports.ARRAY_CONTENT = exports.AND_OP = exports.ALL_OP = exports.AGGS_WRAPPER_NESTED = exports.AGGS_WRAPPER_GLOBAL = exports.AGGS_WRAPPER_FILTERED = void 0;
// sqon ops

@@ -33,4 +33,5 @@ var IN_OP = 'in';

exports.LTE_OP = LTE_OP;
var BETWEEN_OP = 'between'; // special values
var BETWEEN_OP = 'between';
// special values
exports.BETWEEN_OP = BETWEEN_OP;

@@ -41,4 +42,5 @@ var REGEX = '*';

exports.MISSING = MISSING;
var SET_ID = 'set_id:'; // sqon op aliases
var SET_ID = 'set_id:';
// sqon op aliases
exports.SET_ID = SET_ID;

@@ -56,4 +58,5 @@ var OP_ALIASES = {

exports.DATE_FORMAT = DATE_FORMAT;
var ARRAY_CONTENT = [IN_OP, NOT_IN_OP, SOME_NOT_IN_OP, GT_OP, GTE_OP, LT_OP, LTE_OP]; // elasticsearch values
var ARRAY_CONTENT = [IN_OP, NOT_IN_OP, SOME_NOT_IN_OP, GT_OP, GTE_OP, LT_OP, LTE_OP];
// elasticsearch values
exports.ARRAY_CONTENT = ARRAY_CONTENT;

@@ -112,2 +115,2 @@ var ES_WILDCARD = 'wildcard';

exports.BUCKET_COUNT = BUCKET_COUNT;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9jb25zdGFudHMuanMiXSwibmFtZXMiOlsiSU5fT1AiLCJOT1RfSU5fT1AiLCJBTExfT1AiLCJTT01FX05PVF9JTl9PUCIs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MscUJBQXFCLEdBQUcsZUFBZTtBQUFDO0FBQzlDLElBQU1DLG9CQUFvQixHQUFHLGVBQWU7QUFBQztBQUU3QyxJQUFNQyxPQUFPLEdBQUcsU0FBUztBQUFDO0FBQzFCLElBQU1DLEtBQUssR0FBRyxPQUFPO0FBQUM7QUFDdEIsSUFBTUMsU0FBUyxHQUFHLFdBQVc7QUFBQztBQUM5QixJQUFNQyxXQUFXLEdBQUcsYUFBYTtBQUFDO0FBQ2xDLElBQU1DLE9BQU8sR0FBRyxVQUFVO0FBQUM7QUFDM0IsSUFBTUMsbUJBQW1CLEdBQUcsUUFBUTtBQUFDO0FBQ3JDLElBQU1DLHFCQUFxQixHQUFHLFVBQVU7QUFBQztBQUN6QyxJQUFNQyxtQkFBbUIsR0FBRyxRQUFRO0FBQUM7QUFDckMsSUFBTUMsWUFBWSxHQUFHLGNBQWM7QUFBQyJ9

@@ -7,52 +7,33 @@ "use strict";

exports["default"] = void 0;
var _lodash = require("lodash");
var _constants = require("./constants");
var _excluded = ["rn"];
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function flattenAggregations(_ref) {
var aggregations = _ref.aggregations,
_ref$includeMissing = _ref.includeMissing,
includeMissing = _ref$includeMissing === void 0 ? true : _ref$includeMissing;
_ref$includeMissing = _ref.includeMissing,
includeMissing = _ref$includeMissing === void 0 ? true : _ref$includeMissing;
return Object.entries(aggregations).reduce(function (prunedAggs, _ref2) {
var _ref3 = _slicedToArray(_ref2, 2),
key = _ref3[0],
value = _ref3[1];
key = _ref3[0],
value = _ref3[1];
var _key$split = key.split(':'),
_key$split2 = _slicedToArray(_key$split, 2),
field = _key$split2[0],
_key$split2$ = _key$split2[1],
aggregationType = _key$split2$ === void 0 ? null : _key$split2$;
_key$split2 = _slicedToArray(_key$split, 2),
field = _key$split2[0],
_key$split2$ = _key$split2[1],
aggregationType = _key$split2$ === void 0 ? null : _key$split2$;
if (aggregationType === 'missing') {

@@ -73,11 +54,9 @@ return prunedAggs;

buckets: buckets.map(function (_ref4) {
var _bucket$, _bucket$$hits, _bucket$$hits$hits$;
var _bucket, _bucket$hits, _bucket$hits$hits$;
var rn = _ref4.rn,
bucket = _objectWithoutProperties(_ref4, ["rn"]);
bucket = _objectWithoutProperties(_ref4, _excluded);
return _objectSpread(_objectSpread(_objectSpread({}, bucket), {}, {
doc_count: rn ? rn.doc_count : bucket.doc_count
}, bucket["".concat(field, ".hits")] ? {
top_hits: ((_bucket$ = bucket["".concat(field, ".hits")]) === null || _bucket$ === void 0 ? void 0 : (_bucket$$hits = _bucket$.hits) === null || _bucket$$hits === void 0 ? void 0 : (_bucket$$hits$hits$ = _bucket$$hits.hits[0]) === null || _bucket$$hits$hits$ === void 0 ? void 0 : _bucket$$hits$hits$._source) || {}
top_hits: ((_bucket = bucket["".concat(field, ".hits")]) === null || _bucket === void 0 ? void 0 : (_bucket$hits = _bucket.hits) === null || _bucket$hits === void 0 ? void 0 : (_bucket$hits$hits$ = _bucket$hits.hits[0]) === null || _bucket$hits$hits$ === void 0 ? void 0 : _bucket$hits$hits$._source) || {}
} : {}), bucket['term_filters'] ? {

@@ -98,5 +77,4 @@ filter_by_term: bucket['term_filters']

}
var _default = flattenAggregations;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2V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cyxcbiAgICAgICAgLi4uKGluY2x1ZGVNaXNzaW5nICYmIG1pc3NpbmcgJiYgbWlzc2luZy5kb2NfY291bnQgPiAwXG4gICAgICAgICAgPyBbeyAuLi5taXNzaW5nLCBrZXk6IE1JU1NJTkcgfV1cbiAgICAgICAgICA6IFtdKSxcbiAgICAgIF07XG4gICAgICBjb25zdCBidWNrZXRfY291bnQgPSBidWNrZXRzLmxlbmd0aDtcblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgLi4ucHJ1bmVkQWdncyxcbiAgICAgICAgW2ZpZWxkXToge1xuICAgICAgICAgIGJ1Y2tldF9jb3VudCxcbiAgICAgICAgICBidWNrZXRzOiBidWNrZXRzXG4gICAgICAgICAgICAubWFwKCh7IHJuLCAuLi5idWNrZXQgfSkgPT4gKHtcbiAgICAgICAgICAgICAgLi4uYnVja2V0LFxuICAgICAgICAgICAgICBkb2NfY291bnQ6IHJuID8gcm4uZG9jX2NvdW50IDogYnVja2V0LmRvY19jb3VudCxcbiAgICAgICAgICAgICAgLi4uKGJ1Y2tldFtgJHtmaWVsZH0uaGl0c2BdXG4gICAgICAgICAgICAgICAgPyB7XG4gICAgICAgICAgICAgICAgICAgIHRvcF9oaXRzOiBidWNrZXRbYCR7ZmllbGR9LmhpdHNgXT8uaGl0cz8uaGl0c1swXT8uX3NvdXJjZSB8fCB7fSxcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICA6IHt9KSxcbiAgICAgICAgICAgICAgLi4uKGJ1Y2tldFsndGVybV9maWx0ZXJzJ11cbiAgICAgICAgICAgICAgICA/IHtcbiAgICAgICAgICAgICAgICAgICAgZmlsdGVyX2J5X3Rlcm06IGJ1Y2tldFsndGVybV9maWx0ZXJzJ10sXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgOiB7fSksXG4gICAgICAgICAgICB9KSlcbiAgICAgICAgICAgIC5maWx0ZXIoKGIpID0+IGIuZG9jX2NvdW50KSxcbiAgICAgICA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1pc3NpbmcgJiYgbWlzc2luZyAmJiBtaXNzaW5nLmRvY19jb3VudCA+IDBcbiAgICAgICAgICA/IFt7IC4uLm1pc3NpbmcsIGtleTogTUlTU0lORyB9XVxuICAgICAgICAgIDogW10pLFxuICAgICAgXTtcbiAgICAgIGNvbnN0IGJ1Y2tldF9jb3VudCA9IGJ1Y2tldHMubGVuZ3RoO1xuXG4gICAgICByZXR1cm4ge1xuICAgICAgICAuLi5wcnVuZWRBZ2dzLFxuICAgICAgICBbZmllbGRdOiB7XG4gICAgICAgICAgYnVja2V0X2NvdW50LFxuICAgICAgICAgIGJ1Y2tldHM6IGJ1Y2tldHNcbiAgICAgICAgICAgIC5tYXAoKHsgcm4sIC4uLmJ1Y2tldCB9KSA9PiAoe1xuICAgICAgICAgICAgICAuLi5idWNrZXQsXG4gICAgICAgICAgICAgIGRvY19jb3VudDogcm4gPyBybi5kb2NfY291bnQgOiBidWNrZXQuZG9jX2NvdW50LFxuICAgICAgICAgICAgICAuLi4oYnVja2V0W2Ake2ZpZWxkfS5oaXRzYF1cbiAgICAgICAgICAgICAgICA/IHtcbiAgICAgICAgICAgICAgICAgICAgdG9wX2hpdHM6IGJ1Y2tldFtgJHtmaWVsZH0uaGl0c2BdPy5oaXRzPy5oaXRzWzBdPy5fc291cmNlIHx8IHt9LFxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIDoge30pLFxuICAgICAgICAgICAgICAuLi4oYnVja2V0Wyd0ZXJtX2ZpbHRlcnMnXVxuICAgICAgICAgICAgICAgID8ge1xuICAgICAgICAgICAgICAgICAgICBmaWx0ZXJfYnlfdGVybTogYnVja2V0Wyd0ZXJtX2ZpbHRlcnMnXSxcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICA6IHt9KSxcbiAgICAgICAgICAgIH0pKVxuICAgICAgICAgICAgLmZpbHRlcigoYikgPT4gYi5kb2NfY291bnQpLFxuICAgICAgICB9LFxuICAgICAgfTtcbiAgICB9I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UsWUFBQUQsTUFBTSxXQUFJakIsS0FBSyxXQUFRLDREQUF2QixRQUF5Qm1CLElBQUksdUVBQTdCLGFBQStCQSxJQUFJLENBQUMsQ0FBQyxDQUFDLHVEQUF0QyxtQkFBd0NDLE9BQU8sS0FBSSxDQUFDO1VBQ2hFLENBQUMsR0FDRCxDQUFDLENBQUMsR0FDRkgsTUFBTSxDQUFDLGNBQWMsQ0FBQyxHQUN0QjtZQUNFSSxjQUFjLEVBQUVKLE1BQU0sQ0FBQyxjQUFjO1VBQ3ZDLENBQUMsR0FDRCxDQUFDLENBQUM7UUFBQSxDQUNOLENBQUMsQ0FDRkssTUFBTSxDQUFDLFVBQUNDLENBQUM7VUFBQSxPQUFLQSxDQUFDLENBQUNaLFNBQVM7UUFBQTtNQUM5QixDQUFDO0lBRUwsQ0FBQyxNQUFNO01BQ0wsdUNBQ0tmLFVBQVUsR0FDVk4sbUJBQW1CLENBQUM7UUFBRUMsWUFBWSxFQUFFTyxLQUFLO1FBQUVOLGNBQWMsRUFBZEE7TUFBZSxDQUFDLENBQUM7SUFFbkU7RUFDRixDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDUjtBQUFDLGVBRWNGLG1CQUFtQjtBQUFBIn0=
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "buildQuery", {
exports.CONSTANTS = void 0;
Object.defineProperty(exports, "buildAggregations", {
enumerable: true,
get: function get() {
return _buildQuery["default"];
return _buildAggregations["default"];
}
});
Object.defineProperty(exports, "flattenAggregations", {
Object.defineProperty(exports, "buildQuery", {
enumerable: true,
get: function get() {
return _flattenAggregations["default"];
return _buildQuery["default"];
}
});
Object.defineProperty(exports, "buildAggregations", {
Object.defineProperty(exports, "esToSafeJsInt", {
enumerable: true,
get: function get() {
return _buildAggregations["default"];
return _esToSafeJsInt["default"];
}
});
Object.defineProperty(exports, "esToSafeJsInt", {
Object.defineProperty(exports, "flattenAggregations", {
enumerable: true,
get: function get() {
return _esToSafeJsInt["default"];
return _flattenAggregations["default"];
}
});
exports.CONSTANTS = void 0;
var _CONSTANTS = _interopRequireWildcard(require("./constants"));
exports.CONSTANTS = _CONSTANTS;
var _buildQuery = _interopRequireDefault(require("./buildQuery"));
var _flattenAggregations = _interopRequireDefault(require("./flattenAggregations"));
var _buildAggregations = _interopRequireDefault(require("./buildAggregations"));
var _esToSafeJsInt = _interopRequireDefault(require("./utils/esToSafeJsInt"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ0E7O0FBQ0E7O0FBQ0E7O0FBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBhcyBDT05TVEFOVFMgZnJvbSAnLi9jb25zdGFudHMnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBidWlsZFF1ZXJ5IH0gZnJvbSAnLi9idWlsZFF1ZXJ5JztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgZmxhdHRlbkFnZ3JlZ2F0aW9ucyB9IGZyb20gJy4vZmxhdHRlbkFnZ3JlZ2F0aW9ucyc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIGJ1aWxkQWdncmVnYXRpb25zIH0gZnJvbSAnLi9idWlsZEFnZ3JlZ2F0aW9ucyc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIGVzVG9TYWZlSnNJbnQgfSBmcm9tICcuL3V0aWxzL2VzVG9TYWZlSnNJbnQnO1xuIl19
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vc3JjL2luZGV4LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGFzIENPTlNUQU5UUyBmcm9tICcuL2NvbnN0YW50cyc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIGJ1aWxkUXVlcnkgfSBmcm9tICcuL2J1aWxkUXVlcnknO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBmbGF0dGVuQWdncmVnYXRpb25zIH0gZnJvbSAnLi9mbGF0dGVuQWdncmVnYXRpb25zJztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgYnVpbGRBZ2dyZWdhdGlvbnMgfSBmcm9tICcuL2J1aWxkQWdncmVnYXRpb25zJztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgZXNUb1NhZmVKc0ludCB9IGZyb20gJy4vdXRpbHMvZXNUb1NhZmVKc0ludCc7XG4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQWlFO0FBQUE7QUFBQSJ9
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isNested = isNested;
exports.mergePath = mergePath;
exports.isNested = isNested;
exports.readPath = readPath;
exports.toEsRangeValue = toEsRangeValue;
exports.wrapBool = wrapBool;
exports.wrapMust = wrapMust;
exports.wrapMustNot = wrapMustNot;
exports.wrapMust = wrapMust;
exports.wrapNested = wrapNested;
exports.wrapShould = wrapShould;
exports.wrapNested = wrapNested;
exports.wrapBool = wrapBool;
exports.toEsRangeValue = toEsRangeValue;
var _lodash = _interopRequireDefault(require("lodash"));
var _dateFns = require("date-fns");
var CONSTANTS = _interopRequireWildcard(require("../constants"));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function mergePath(target, _ref, data) {
var _ref2 = _toArray(_ref),
key = _ref2[0],
path = _ref2.slice(1);
key = _ref2[0],
path = _ref2.slice(1);
return _objectSpread(_objectSpread({}, target), {}, _defineProperty({}, key, path.length ? mergePath(_lodash["default"].get(target, key, {}), path, data) : data));
}
function isNested(filter) {
return filter && filter.hasOwnProperty(CONSTANTS.ES_NESTED);
}
function readPath(filter) {
return _lodash["default"].get(filter, [CONSTANTS.ES_NESTED, CONSTANTS.ES_PATH], '');
}
function wrapMustNot(value) {
return wrapBool(CONSTANTS.ES_MUST_NOT, value);
}
function wrapMust(value) {
return wrapBool(CONSTANTS.ES_MUST, value);
}
function wrapShould(value) {
return wrapBool(CONSTANTS.ES_SHOULD, value);
}
function wrapNested(esFilter, path) {
var _CONSTANTS$ES_NESTED;
return _defineProperty({}, CONSTANTS.ES_NESTED, (_CONSTANTS$ES_NESTED = {}, _defineProperty(_CONSTANTS$ES_NESTED, CONSTANTS.ES_PATH, path), _defineProperty(_CONSTANTS$ES_NESTED, CONSTANTS.ES_QUERY, esFilter[CONSTANTS.ES_BOOL] ? esFilter : wrapMust(esFilter)), _CONSTANTS$ES_NESTED));
}
function wrapBool(op, value) {
return _defineProperty({}, CONSTANTS.ES_BOOL, _defineProperty({}, op, Array.isArray(value) ? value : [value]));
}
function toEsRangeValue(value) {

@@ -90,2 +63,2 @@ var dateValue = (0, _dateFns.parse)(value);

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9lc0ZpbHRlci5qcyJdLCJuYW1lcyI6WyJtZXJnZVBhdGgiLCJ0YXJnZXQiLCJkYXRhIiwia2V5IiwicGF0aCIsImxlbmd0aCIsIl8iLCJnZXQiLCJpc05lc3RlZCIsImZpbHRlciIsImhhc093blByb3BlcnR5IiwiQ09OU1RBTlRTIiwiRVNfTkVTVEVEIiwicmVhZFBhdGgiLCJFU19QQVRIIiwid3JhcE11c3ROb3QiLCJ2YWx1ZSIsIndyYXBCb29sIiwiRVNfTVVTVF9OT1QiLCJ3cmFwTXVzdCIsIkVTX01VU1QiLCJ3cmFwU2hvdWxkIiwiRVNfU0hPVUxEIiwid3JhcE5lc3RlZCIsImVzRmlsdGVyIiwiRVNfUVVFUlkiLCJFU19CT09MIiwib3AiLCJBcnJheSIsImlzQXJyYXkiLCJ0b0VzUmFuZ2VWYWx1ZSIsImRhdGVWYWx1ZSIsIkRBVEVfRk9STUFUIiwiRVNfREFURV9GT1JNQVQiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7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TLENBQUNXLFNBQVMsRUFBRU4sS0FBSyxDQUFDO0FBQzdDO0FBRU8sU0FBU08sVUFBVSxDQUFDQyxRQUFRLEVBQUVwQixJQUFJLEVBQUU7RUFBQTtFQUN6QywyQkFDR08sU0FBUyxDQUFDQyxTQUFTLG9FQUNqQkQsU0FBUyxDQUFDRyxPQUFPLEVBQUdWLElBQUkseUNBQ3hCTyxTQUFTLENBQUNjLFFBQVEsRUFBR0QsUUFBUSxDQUFDYixTQUFTLENBQUNlLE9BQU8sQ0FBQyxHQUFHRixRQUFRLEdBQUdMLFFBQVEsQ0FBQ0ssUUFBUSxDQUFDO0FBR3ZGO0FBRU8sU0FBU1AsUUFBUSxDQUFDVSxFQUFFLEVBQUVYLEtBQUssRUFBRTtFQUNsQywyQkFDR0wsU0FBUyxDQUFDZSxPQUFPLHNCQUNmQyxFQUFFLEVBQUdDLEtBQUssQ0FBQ0MsT0FBTyxDQUFDYixLQUFLLENBQUMsR0FBR0EsS0FBSyxHQUFHLENBQUNBLEtBQUssQ0FBQztBQUdsRDtBQUVPLFNBQVNjLGNBQWMsQ0FBQ2QsS0FBSyxFQUFFO0VBQ3BDLElBQU1lLFNBQVMsR0FBRyxJQUFBQyxjQUFLLEVBQUNoQixLQUFLLENBQUM7RUFDOUIsT0FBTyxJQUFBaUIsZUFBTSxFQUFDRixTQUFTLEVBQUVwQixTQUFTLENBQUN1QixXQUFXLENBQUMsS0FBS2xCLEtBQUssR0FDckQsSUFBQWlCLGVBQU0sRUFBQ0YsU0FBUyxFQUFFcEIsU0FBUyxDQUFDd0IsY0FBYyxDQUFDLEdBQzNDbkIsS0FBSztBQUNYIn0=

@@ -7,10 +7,7 @@ "use strict";

exports["default"] = void 0;
var _constants = require("../constants");
var _default = function _default(x) {
return Number.isInteger(x) && !Number.isSafeInteger(x) ? _constants.ES_MAX_LONG : x;
};
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIj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QUFNQyxNQUFNLENBQUNDLFNBQVMsQ0FBQ0YsQ0FBQyxDQUFDLElBQUksQ0FBQ0MsTUFBTSxDQUFDRSxhQUFhLENBQUNILENBQUMsQ0FBQyxHQUFHSSxzQkFBVyxHQUFHSixDQUFDO0FBQUEsQ0FBQztBQUFBIn0=
{
"name": "@arranger/middleware",
"version": "2.17.0",
"version": "2.19.3",
"description": "Arranger Middleware",

@@ -14,3 +14,3 @@ "main": "dist/index.js",

"flow": "flow",
"test": "jest"
"test": "jest --version && jest"
},

@@ -28,13 +28,12 @@ "repository": {

"devDependencies": {
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-export-namespace-from": "^7.5.2",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/plugin-proposal-optional-chaining": "^7.2.0",
"@babel/preset-env": "^7.5.5",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/register": "^7.5.5",
"babel-core": "7.0.0-bridge.0",
"@babel/cli": "^7.19.3",
"@babel/core": "^7.19.6",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@babel/plugin-proposal-object-rest-spread": "^7.19.4",
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
"@babel/preset-env": "^7.19.4",
"@babel/preset-flow": "^7.18.6",
"@babel/preset-react": "^7.18.6",
"@babel/register": "^7.18.9",
"babel-eslint": "^8.2.1",

@@ -47,2 +46,3 @@ "eslint": "^4.1.1",

"husky": "^4.3.0",
"jest": "^29.2.2",
"prettier": "^2.1.2",

@@ -76,3 +76,3 @@ "pretty-quick": "^3.0.2"

},
"gitHead": "05887c16ed354f324047e262b58f1b2050f97a05"
"gitHead": "c0fcce42f647bf70cdf3797c53af3985e690a8b8"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc