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

@ferlab/arranger-middleware

Package Overview
Dependencies
Maintainers
10
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ferlab/arranger-middleware - npm Package Compare versions

Comparing version 2.20.0-rc2 to 2.20.0-rc4

78

dist/buildAggregations/createFieldAggregation.js

@@ -7,21 +7,14 @@ "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 _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 _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); }
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) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
var MAX_AGGREGATION_SIZE = 300000;

@@ -33,4 +26,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,9 +36,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, _ref4;
var _graphqlField$buckets, _graphqlField$buckets2, _topHits$__arguments$, _topHits$__arguments$2, _aggs;
var field = _ref3.field,
isNested = _ref3.isNested,
graphqlField = _ref3.graphqlField;
isNested = _ref3.isNested,
graphqlField = _ref3.graphqlField,
termFilters = _ref3.termFilters;
var maxAggregations = (0, _lodash.get)(graphqlField, ['buckets', '__arguments', 0, 'max', 'value'], MAX_AGGREGATION_SIZE);

@@ -57,3 +49,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) {

@@ -66,3 +57,2 @@ innerAggs = _objectSpread(_objectSpread({}, innerAggs), {}, {

}
if (topHits) {

@@ -76,6 +66,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) || [];

@@ -98,4 +86,3 @@ var aggsFilters = terms.content.map(function (sqonFilter) {

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

@@ -107,3 +94,3 @@ } : {}), {}, {

}
})), _defineProperty(_ref4, "".concat(field, ":missing"), _objectSpread(_objectSpread({}, isNested ? {
})), _defineProperty(_aggs, "".concat(field, ":missing"), _objectSpread(_objectSpread({}, isNested ? {
aggs: {

@@ -118,15 +105,23 @@ rn: {

}
})), _ref4;
})), _aggs);
return isNested && termFilters.length > 0 ? wrapNestedFilter(aggs, field, termFilters) : aggs;
};
var wrapNestedFilter = function wrapNestedFilter(aggs, field, termFilters) {
return _defineProperty({}, "".concat(field, ":nested_filtered"), {
filter: {
bool: {
must: termFilters
}
},
aggs: aggs
});
};
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), {

@@ -139,13 +134,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$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) {

@@ -159,3 +155,4 @@ return graphqlField[t];

isNested: isNested,
graphqlField: graphqlField
graphqlField: graphqlField,
termFilters: termFilters
}));

@@ -179,4 +176,3 @@ } else if ([_constants.STATS, _constants.HISTOGRAM].includes(type)) {

};
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL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C4uLmlubmVyQWdncyxcbiAgICAgIFtgJHtmaWVsZH0uaGl0c2BdOiB7XG4gICAgICAgIHRvcF9oaXRzOiB7XG4gICAgICAgICAgX3NvdXJjZTogc291cmNlPy52YWx1ZSB8fCBbXSxcbiAgICAgICAgICBzaXplOiBzaXplPy52YWx1ZSxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgfTtcbiAgfVxuXG4gIGlmICh0ZXJtRmlsdGVyKSB7XG4gICAgY29uc3QgdGVybXMgPSB0ZXJtRmlsdGVyLl9fYXJndW1lbnRzWzBdPy5maWx0ZXI/LnZhbHVlIHx8IFtdO1xuXG4gICAgY29uc3QgYWdnc0ZpbHRlcnMgPSB0ZXJtcy5jb250ZW50Lm1hcCgoc3FvbkZpbHRlcikgPT5cbiAgICAgIG9wU3dpdGNoKHtcbiAgICAgICAgbmVzdGVkRmllbGRzOiBbXSxcbiAgICAgICAgZmlsdGVyOiBub3JtYWxpemVGaWx0ZXJzKHNxb25GaWx0ZXIpLFxuICAgICAgfSksXG4gICAgKTtcblxuICAgIGlubmVyQWdncyA9IHtcbiAgICAgIC4uLmlubmVyQWdncyxcbiAgICAgIC4uLih0ZXJtc1xuICAgICAgICA/IHtcbiAgICAgICAgICAgIHRlcm1fZmlsdGVyczoge1xuICAgICAgICAgICAgICBmaWx0ZXI6IHtcbiAgICAgICAgICAgICAgICBib29sOiB7XG4gICAgICAgICAgICAgICAgICBtdXN0OiBhZ2dzRmlsdGVycyxcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICB9XG4gICAgICAgIDoge30pLFxuICAgIH07XG4gIH1cblxuICBjb25zdCBhZ2dzID0ge1xuICAgIFtmaWVsZF06IHtcbiAgICAgIC4uLighaXNFbXB0eShpbm5lckFnZ3MpID8geyBhZ2dzOiB7IC4uLmlubmVyQWdncyB9IH0gOiB7fSksXG4gICAgICB0ZXJtczogeyBmaWVsZCwgc2l6ZTogb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0gsQ0FBQyxNQUFNLElBQUksQ0FBQzRDLGdCQUFLLEVBQUV0RCxvQkFBUyxDQUFDLENBQUM2RCxRQUFRLENBQUNuRSxJQUFJLENBQUMsRUFBRTtNQUM1QyxPQUFPMUMsTUFBTSxDQUFDNEcsTUFBTSxDQUFDRCxHQUFHLEVBQUVuRSx3QkFBd0IsQ0FBQztRQUFFRSxJQUFJLEVBQUpBLElBQUk7UUFBRUMsS0FBSyxFQUFMQSxLQUFLO1FBQUVDLFlBQVksRUFBWkE7TUFBYSxDQUFDLENBQUMsQ0FBQztJQUNwRixDQUFDLE1BQU0sSUFBSUYsSUFBSSxLQUFLZ0Qsc0JBQVcsRUFBRTtNQUMvQixPQUFPMUYsTUFBTSxDQUFDNEcsTUFBTSxDQUFDRCxHQUFHLEVBQUVmLDZCQUE2QixDQUFDO1FBQUVsRCxJQUFJLEVBQUpBLElBQUk7UUFBRUMsS0FBSyxFQUFMQSxLQUFLO1FBQUVDLFlBQVksRUFBWkE7TUFBYSxDQUFDLENBQUMsQ0FBQztJQUN6RixDQUFDLE1BQU07TUFDTCxPQUFPK0QsR0FBRztJQUNaO0VBQ0YsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQ1IsQ0FBQztBQUFBRyxPQUFBLGNBQUFmLFFBQUEifQ==

@@ -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; }
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZEFnZ3JlZ2F0aW9ucy9nZXROZXN0ZWRTcW9uRmlsdGVycy5qcyJdLCJuYW1lcyI6WyJnZXROZXN0ZWRTcW9uRmlsdGVycyIsInNxb24iLCJuZXN0ZWRGaWVsZHMiLCJhY2N1bXVsYXRvciIsInBhcmVudFBpdm90Iiwib3AiLCJBTkRfT1AiLCJPUl9PUCIsIk5PVF9PUCIsImluY2x1ZGVzIiwiY29udGVudCIsInBpdm90IiwiZm9yRWFjaCIsImMiLCJzcW9uRmllbGQiLCJmaWVsZCIsInNxb25GaWVsZHMiLCJmaWVsZHMiLCJzcGxpdHRlZCIsInNwbGl0IiwicGFyZW50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FFBQVEsQ0FBQ1csUUFBUSxDQUFDdEMsS0FBSyxDQUFDLENBQUMsRUFBRXNDLFFBQVEsQ0FBQzNCLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQzhCLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztNQUN4RixJQUFJSCxRQUFRLENBQUMzQixNQUFNLElBQUkrQixRQUFRLElBQUlwQixXQUFXLEtBQUtrQixVQUFVLEVBQUU7UUFDN0RwQixXQUFXLENBQUNvQixVQUFVLENBQUMsTUFBQUcsTUFBQSxDQUFBMUQsa0JBQUEsQ0FBUW1DLFdBQVcsQ0FBQ29CLFVBQVUsQ0FBQyxJQUFJLEVBQUUsSUFBR3ZCLElBQUksRUFBQztNQUN0RTtJQUNGLENBQUMsQ0FBQztFQUNKO0VBQ0EsT0FBT0csV0FBVztBQUNwQixDQUFDO0FBQUMsSUFBQXdCLFFBQUEsR0FFYSxTQUFBQSxTQUFBQyxLQUFBLEVBQW1DO0VBQUEsSUFBQUMsVUFBQSxHQUFBRCxLQUFBLENBQWhDNUIsSUFBSTtJQUFKQSxJQUFJLEdBQUE2QixVQUFBLGNBQUcsSUFBSSxHQUFBQSxVQUFBO0lBQUU1QixZQUFZLEdBQUEyQixLQUFBLENBQVozQixZQUFZO0VBQ3pDLElBQU02QixVQUFVLEdBQUcsSUFBQUMsNEJBQWdCLEVBQUMvQixJQUFJLENBQUM7RUFDekM7RUFDQSxPQUFPQSxJQUFJLEdBQ1BILG9CQUFvQixDQUFDO0lBQ25CRyxJQUFJLEVBQUU4QixVQUFVO0lBQ2hCN0IsWUFBWSxFQUFaQTtFQUNGLENBQUMsQ0FBQyxHQUNGLENBQUMsQ0FBQztBQUNSLENBQUM7QUFBQStCLE9BQUEsY0FBQUwsUUFBQSJ9

@@ -7,38 +7,25 @@ "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 _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); }
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 _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) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) 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 _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 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) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function createGlobalAggregation(_ref) {
var field = _ref.field,
aggregation = _ref.aggregation;
aggregation = _ref.aggregation;
return _defineProperty({}, "".concat(field, ":").concat(_constants.AGGS_WRAPPER_GLOBAL), {

@@ -49,7 +36,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), {

@@ -60,10 +46,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) {

@@ -82,5 +66,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) {

@@ -92,7 +75,5 @@ return removeFieldFromQuery({

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

@@ -105,6 +86,5 @@ }, {});

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

@@ -116,9 +96,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) {

@@ -128,4 +106,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 || {})) {

@@ -142,16 +120,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);

@@ -164,5 +140,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, '.');

@@ -173,6 +148,17 @@ var nestedPaths = getNestedPathsInField({

});
var contentsFiltered = ((normalizedSqon === null || normalizedSqon === void 0 ? void 0 : normalizedSqon.content) || []).filter(function (c) {
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;
});
var termFilters = contentsFiltered.map(function (filter) {
return (0, _buildQuery.opSwitch)({
nestedFields: [],
filter: filter
});
});
var fieldAggregation = (0, _createFieldAggregation["default"])({
field: field,
graphqlField: graphqlField,
isNested: nestedPaths.length
isNested: nestedPaths.length,
termFilters: termFilters
});

@@ -201,2 +187,2 @@ var aggregation = nestedPaths.reverse().reduce(function (aggs, path) {

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZEFnZ3JlZ2F0aW9ucy9pbmRleC5qcyJdLCJuYW1lcyI6WyJjcmVhdGVHbG9iYWxBZ2dyZWdhdGlvbiIsImZpZWxkIiwiYWdncmVnYXRpb24iLCJBR0dTX1dSQVBQRVJfR0xPQkFMIiwiZ2xvYmFsIiwiYWdncyIsImNyZWF0ZUZpbHRlcmVkQWdncmVnYXRpb24iLCJmaWx0ZXIiLCJPYmplY3QiLCJrZXlzIiwibGVuZ3RoIiwiQUdHU19XUkFQUEVSX0ZJTFRFUkVEIiwicmVtb3ZlRmllbGRGcm9tUXVlcnkiLCJxdWVyeSIsIm5lc3RlZCIsIkVTX05FU1RFRCIsIm5lc3RlZFF1ZXJ5IiwiRVNfUVVFUlkiLCJib29sIiwiRVNfQk9PTCIsInNvbWUiLCJrIiwiY2xlYW5lZCIsImZpbHRlcmVk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EIsWUFBWSxFQUNaYixlQUFlLENBQUM7TUFDZDlCLEtBQUssRUFBTEEsS0FBSztNQUNMWCxLQUFLLEVBQUxBLEtBQUs7TUFDTEMsV0FBVyxFQUFYQSxXQUFXO01BQ1gwQyw0QkFBNEIsRUFBNUJBO0lBQ0YsQ0FBQyxDQUNILENBQUM7RUFDSCxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7RUFFTixJQUFNb0Msb0JBQW9CLEdBQUcsSUFBQUMscUNBQXlCLEVBQUM7SUFDckQzRSxJQUFJLEVBQUpBLElBQUk7SUFDSitDLGlCQUFpQixFQUFqQkEsaUJBQWlCO0lBQ2pCVCw0QkFBNEIsRUFBNUJBO0VBQ0YsQ0FBQyxDQUFDO0VBRUYsT0FBT29DLG9CQUFvQjtBQUM3QiJ9
"use strict";
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", {

@@ -7,31 +8,18 @@ value: true

exports["default"] = void 0;
var _buildQuery = require("../buildQuery");
var _normalizeFilters = _interopRequireDefault(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 _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 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) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
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 _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) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
/*

@@ -44,9 +32,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 +49,2 @@ acc[aggName] = _objectSpread(_objectSpread({}, aggContent), {}, {

};
var wrapInFilterAgg = function wrapInFilterAgg() {

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

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

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

};
var _default = injectNestedFiltersToAggs;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZEFnZ3JlZ2F0aW9ucy9pbmplY3ROZXN0ZWRGaWx0ZXJzVG9BZ2dzLmpzIl0sIm5hbWVzIjpbImluamVjdE5lc3RlZEZpbHRlcnNUb0FnZ3MiLCJhZ2dzIiwibmVzdGVkU3FvbkZpbHRlcnMiLCJhZ2dyZWdhdGlvbnNGaWx0ZXJUaGVtc2VsdmVzIiwiT2JqZWN0IiwiZW50cmllcyIsInJlZHVjZSIsImFjYyIsImFnZ05hbWUiLCJhZ2dDb250ZW50Iiwic2tpcFRvTmV4dExldmVsIiwid3JhcEluRmlsdGVyQWdnIiwibmVzdGVkIiwicGF0aCIsIkFHR1NfV1JBUFBFUl9GSUxURVJFRCIsImZpbHRlciIsImJvb2wiLCJzaG91bGQiLCJzcW9uRmlsdGVyIiwic3BsaXQiLCJjb250ZW50IiwiZmllbGQiLCJtYXAiLCJuZXN0ZWRGaWVsZHMiLCJnbG9iYWwiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQTs7QUFDQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUVB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dzKHtcbiAgICAgICAgICBhZ2dzOiBhZ2dDb250ZW50LmFnZ3MsXG4gICAgICAgICAgbmVzdGVkU3FvbkZpbHRlcnMsXG4gICAgICAgICAgYWdncmVnYXRpb25zRmlsdGVyVGhlbXNlbHZlcyxcbiAgICAgICAgfSksXG4gICAgICB9O1xuICAgICAgcmV0dXJuIGFjYztcbiAgICB9O1xuICAgIGNvbnN0IHdyYXBJbkZpbHRlckFnZyA9ICgpID0+IHtcbiAgICAgIGFjY1thZ2dOYW1lXSA9IHtcbiAgICAgICAgLi4uYWdnQ29udGVudCxcbiAgICAgICAgYWdnczoge1xuICAgICAgICAgIFtgJHthZ2dDb250ZW50Lm5lc3RlZC5wYXRofToke0FHR1NfV1JBUFBFUl9GSUxURVJFRH1gXToge1xuICAgICAgICAgICAgZmlsdGVyOiB7XG4gICAgICAgICAgICAgIGJvb2w6IHtcbiAgICAgICAgICAgICAgICBzaG91bGQ6IG5lc3RlZFNxb25GaWx0ZXJzW2FnZ0NvbnRlbnQubmVzdGVkLnBhdGhdXG4gICAgICAgICAgICAgICAgICAuZmlsdGVyKFxuICAgICAgICAgICAgICAgICAgICAoc3FvbkZpbHRlcikgPT5cbiAgICAgICAgICAgICAgICAgICAgICBhZ2dyZWdhdGlvbnNGaWx0ZXJUaGVtc2VsdmVzIHx8XG4gICAgICAgICAgICAgICAgICAgICAgYWdnTmFtZS5zcGxpdCgnOicpWzBdICE9PSBzcW9uRmlsdGVyLmNvbnRlbnQuZmllbGQsXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAubWFwKChzcW9uRmlsdGVyKSA9PlxuICAgICAgICAgICAgICAgICAgICBvcFN3aXRjaCh7XG4gICAgICAgICAgICAgICAgICAgICAgbmVzdGVkRmllbGRzOiBbXSxcbiAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXI6IG5vcm1hbGl6ZUZpbHRlcnMoc3FvbkZpbHRlciksXG4gICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBhZ2dzOiBpbmplY3ROZXN0ZWRGaWx0ZXJzVG9BZ2dzKHtcbiAgICAgICAgICAgICAgYWdnczogYWdnQ29udGVudC5hZ2dzLFxuICAgICAgICAgICAgICBuZXN0ZWRTcW9uRmlsdGVycyxcbiAgICAgICAgICAgICAgYWdncmVnYXRpb25zRmlsdGVyVGhlbXNlbHZlcyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgIH0sXG4gICAgICAgIH0sXG4gICAgICB9O1xuICAgICAgcmV0dXJuIGFjYztcbiAgICB9O1xuXG4gICAgaWYgKGFnZ0NvbnRlbnQuZ2xvYmFsIHx8IGFnZ0NvbnRlbnQuZmlsdGVyKSB7XG4gICAgICByZXR1cm4gc2tpcFRvTmV4dExldmVsKCk7XG4gICAgfSBlbHNlIGlmIChhZ2dDb250ZW50Lm5lc3RlZCkge1xuICAgICAgaWYgKG5lc3RlZFNxb25GaWx0ZXJzW2FnZ0NvbnRlbnQubmVzdGVkLnBhdGhdKSB7XG4gICAgICAgIHJldHVybiB3cmFwSW5GaWx0ZXJBZ2coKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBza2lwVG9OZXh0TGV2ZWwoKTtcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGFjYztcbiAgICB9XG4gIH0sIGNsb25lRGVlcChhZ2dzKSk7XG5cbmV4cG9ydCBkZWZhdWx0IGluamVjdE5lc3RlZEZpbHRlcnNUb0FnZ3M7XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYnVpbGRRdWVyeSIsInJlcXVpcmUiLCJfbm9ybWFsaXplRmlsdGVycyIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJfY29uc3RhbnRzIiwiX2xvZGFzaCIsIm9ia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ICAgICAgICAgIHNob3VsZDogbmVzdGVkU3FvbkZpbHRlcnNbYWdnQ29udGVudC5uZXN0ZWQucGF0aF1cbiAgICAgICAgICAgICAgICAgIC5maWx0ZXIoXG4gICAgICAgICAgICAgICAgICAgIChzcW9uRmlsdGVyKSA9PlxuICAgICAgICAgICAgICAgICAgICAgIGFnZ3JlZ2F0aW9uc0ZpbHRlclRoZW1zZWx2ZXMgfHxcbiAgICAgICAgICAgICAgICAgICAgICBhZ2dOYW1lLnNwbGl0KCc6JylbMF0gIT09IHNxb25GaWx0ZXIuY29udGVudC5maWVsZCxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIC5tYXAoKHNxb25GaWx0ZXIpID0+XG4gICAgICAgICAgICAgICAgICAgIG9wU3dpdGNoKHtcbiAgICAgICAgICAgICAgICAgICAgICBuZXN0ZWRGaWVsZHM6IFtdLFxuICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcjogbm9ybWFsaXplRmlsdGVycyhzcW9uRmlsdGVyKSxcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGFnZ3M6IGluamVjdE5lc3RlZEZpbHRlcnNUb0FnZ3Moe1xuICAgICAgICAgICAgICBhZ2dzOiBhZ2dDb250ZW50LmFnZ3MsXG4gICAgICAgICAgICAgIG5lc3RlZFNxb25GaWx0ZXJzLFxuICAgICAgICAgICAgICBhZ2dyZWdhdGlvbnNGaWx0ZXJUaGVtc2VsdmVzLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgfSxcbiAgICAgICAgfSxcbiAgICAgIH07XG4gICAgICByZXR1cm4gYWNjO1xuICAgIH07XG5cbiAgICBpZiAoYWdnQ29udGVudC5nbG9iYWwgfHwgYWdnQ29udGVudC5maWx0ZXIpIHtcbiAgICAgIHJldHVybiBza2lwVG9OZXh0TGV2ZWwoKTtcbiAgICB9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QVksRUFBRSxFQUFFO2tCQUNoQi9GLE1BQU0sRUFBRSxJQUFBZ0csNEJBQWdCLEVBQUNQLFVBQVU7Z0JBQ3JDLENBQUMsQ0FBQztjQUFBLENBQ0o7WUFDSjtVQUNGLENBQUM7VUFDRGxCLElBQUksRUFBRUYseUJBQXlCLENBQUM7WUFDOUJFLElBQUksRUFBRVMsVUFBVSxDQUFDVCxJQUFJO1lBQ3JCQyxpQkFBaUIsRUFBakJBLGlCQUFpQjtZQUNqQkMsNEJBQTRCLEVBQTVCQTtVQUNGLENBQUM7UUFDSCxDQUFDO01BQ0YsRUFDRjtNQUNELE9BQU9HLEdBQUc7SUFDWixDQUFDO0lBRUQsSUFBSUksVUFBVSxDQUFDaUIsTUFBTSxJQUFJakIsVUFBVSxDQUFDaEYsTUFBTSxFQUFFO01BQzFDLE9BQU9pRixlQUFlLENBQUMsQ0FBQztJQUMxQixDQUFDLE1BQU0sSUFBSUQsVUFBVSxDQUFDSSxNQUFNLEVBQUU7TUFDNUIsSUFBSVosaUJBQWlCLENBQUNRLFVBQVUsQ0FBQ0ksTUFBTSxDQUFDQyxJQUFJLENBQUMsRUFBRTtRQUM3QyxPQUFPSCxlQUFlLENBQUMsQ0FBQztNQUMxQixDQUFDLE1BQU07UUFDTCxPQUFPRCxlQUFlLENBQUMsQ0FBQztNQUMxQjtJQUNGLENBQUMsTUFBTTtNQUNMLE9BQU9MLEdBQUc7SUFDWjtFQUNGLENBQUMsRUFBRSxJQUFBc0IsaUJBQVMsRUFBQzNCLElBQUksQ0FBQyxDQUFDO0FBQUE7QUFBQyxJQUFBNEIsUUFBQSxHQUVQOUIseUJBQXlCO0FBQUErQixPQUFBLGNBQUFELFFBQUEifQ==
"use strict";
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", {

@@ -8,46 +9,28 @@ value: true

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 _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 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) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
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 _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) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) 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 +44,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 +63,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 +84,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 +100,2 @@ return b.length - a.length;

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

@@ -129,6 +106,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,7 +127,7 @@ return wrapFilter({

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

@@ -165,13 +142,12 @@ esFilter: {

filter: filter,
isNot: true
isNot: op === _constants.IN_OP
});
}
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 +163,5 @@ filter: filter,

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

@@ -209,13 +184,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$, _esFilters$2;
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,5 +200,7 @@ var esFilters = content.map(function (filter) {

});
var isNested = !!((_esFilters$ = esFilters[0]) === null || _esFilters$ === void 0 ? void 0 : _esFilters$.nested);
if (isNested && pivot === ((_esFilters$2 = esFilters[0]) === null || _esFilters$2 === void 0 ? void 0 : _esFilters$2.nested.path)) {
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;
}).includes(pivot)) {
var flattned = esFilters.reduce(function (bools, esFilter) {

@@ -243,9 +217,8 @@ return op === _constants.AND_OP || op === _constants.NOT_OP ? collapseNestedFilters({

}
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({

@@ -267,11 +240,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({

@@ -287,13 +258,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)) {

@@ -362,8 +332,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 {};

@@ -377,2 +345,2 @@ var v = opSwitch({

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9idWlsZFF1ZXJ5L2luZGV4LmpzIl0sIm5hbWVzIjpbIndyYXBGaWx0ZXIiLCJlc0ZpbHRlciIsIm5lc3RlZEZpZWxkcyIsImZpbHRlciIsImlzTm90IiwiY29udGVudCIsImZpZWxkIiwic3BsaXQiLCJzbGljZSIsIm1hcCIsInAiLCJpIiwic2VnbWVudHMiLCJqb2luIiwiaW5jbHVkZXMiLCJyZXZlcnNlIiwicmVkdWNlIiwicGF0aCIsImdldFJlZ2V4RmlsdGVyIiwib3AiLCJ2YWx1ZSIsInJlZ2V4cCIsInJlcGxhY2UiLCJOT1RfSU5fT1AiLCJTT01FX05PVF9JTl9PUCIsImdldFRlcm1GaWx0ZXIiLCJ0ZXJtcyIsIml0ZW0iLCJnZXRGdXp6eUZpbHRlciIsImZpZWxkcyIsInNvcnRlZE5lc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FaeEgsWUFBWTtJQUFXeUgsVUFBVSxHQUFBRCxNQUFBLENBQW5CRSxPQUFPO0VBQzlDLElBQUk1TCxNQUFNLENBQUNELElBQUksQ0FBQzRMLFVBQVUsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDOUssTUFBTSxLQUFLLENBQUMsRUFBRSxPQUFPLENBQUMsQ0FBQztFQUN6RCxJQUFNc0ssQ0FBQyxHQUFHeEIsUUFBUSxDQUFDO0lBQ2pCekYsWUFBWSxFQUFaQSxZQUFZO0lBQ1ovRCxNQUFNLEVBQUUsSUFBQTBMLDRCQUFnQixFQUFDRixVQUFVO0VBQ3JDLENBQUMsQ0FBQztFQUNGRyxPQUFPLENBQUNDLEdBQUcsQ0FBQyxZQUFZLEVBQUVDLElBQUksQ0FBQ0MsU0FBUyxDQUFDZCxDQUFDLENBQUMsQ0FBQztFQUM1QyxPQUFPQSxDQUFDO0FBQ1YifQ==
"use strict";
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", {

@@ -7,32 +8,21 @@ value: true

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 _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 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) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
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; }
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 +33,2 @@ op: op,

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

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

}
function isSpecialFilter(value) {

@@ -60,9 +48,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 +65,5 @@ return _objectSpread(_objectSpread({}, filter), {}, {

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

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

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

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

}
var _default = function _default(filter) {

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

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

@@ -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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DLE9BQUEsQ0FBQXdDLE9BQUEsR0FBQUEsT0FBQTtBQUMzQixJQUFNQyxtQkFBbUIsR0FBRyxRQUFRO0FBQUN6QyxPQUFBLENBQUF5QyxtQkFBQSxHQUFBQSxtQkFBQTtBQUNyQyxJQUFNQyxxQkFBcUIsR0FBRyxVQUFVO0FBQUMxQyxPQUFBLENBQUEwQyxxQkFBQSxHQUFBQSxxQkFBQTtBQUN6QyxJQUFNQyxtQkFBbUIsR0FBRyxRQUFRO0FBQUMzQyxPQUFBLENBQUEyQyxtQkFBQSxHQUFBQSxtQkFBQTtBQUNyQyxJQUFNQyxZQUFZLEdBQUcsY0FBYztBQUFDNUMsT0FBQSxDQUFBNEMsWUFBQSxHQUFBQSxZQUFBIn0=
"use strict";
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", {

@@ -7,52 +8,35 @@ value: true

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 _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 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) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
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 _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) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) 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 +57,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 +80,4 @@ filter_by_term: bucket['term_filters']

}
var _default = flattenAggregations;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9mbGF0dGVuQWdncmVnYXRpb25zLmpzIl0sIm5hbWVzIjpbImZsYXR0ZW5BZ2dyZWdhdGlvbnMiLCJhZ2dyZWdhdGlvbnMiLCJpbmNsdWRlTWlzc2luZyIsIk9iamVjdCIsImVudHJpZXMiLCJyZWR1Y2UiLCJwcnVuZWRBZ2dzIiwia2V5IiwidmFsdWUiLCJzcGxpdCIsImZpZWxkIiwiYWdncmVnYXRpb25UeXBlIiwiU1RBVFMiLCJISVNUT0dSQU0iLCJpbmNsdWRlcyIsIkNBUkRJTkFMSVRZIiwiQXJyYXkiLCJpc0FycmF5IiwiYnVja2V0cyIsIm1pc3NpbmciLCJkb2NfY291bnQiLCJNSVNTSU5HIiwiYnVja2V0X2NvdW50IiwibGVuZ3RoIiwibWFwIiwicm4iLCJidWNrZXQiLCJ0b3BfaGl0cyIsImhpdHMiLCJfc291cmNlIiwiZmlsdGVyX2J5X3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X2NvdW50IDogYnVja2V0LmRvY19jb3VudCxcbiAgICAgICAgICAgICAgLi4uKGJ1Y2tldFtgJHtmaWVsZH0uaGl0c2BdXG4gICAgICAgICAgICAgICAgPyB7XG4gICAgICAgICAgICAgICAgICAgIHRvcF9oaXRzOiBidWNrZXRbYCR7ZmllbGR9LmhpdHNgXT8uaGl0cz8uaGl0c1swXT8uX3NvdXJjZSB8fCB7fSxcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICA6IHt9KSxcbiAgICAgICAgICAgICAgLi4uKGJ1Y2tldFsndGVybV9maWx0ZXJzJ11cbiAgICAgICAgICAgICAgICA/IHtcbiAgICAgICAgICAgICAgICAgICAgZmlsdGVyX2J5X3Rlcm06IGJ1Y2tldFsndGVybV9maWx0ZXJzJ10sXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgOiB7fSksXG4gICAgICAgICAgICB9KSlcbiAgICAgICAgICAgIC5maWx0ZXIoKGIpID0+IGIuZG9jX2NvdW50KSxcbiAgICAgICAgfSxcbiAgICAgIH07XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIC4uLnBydW5lZEFnZ3MsXG4gICAgICAgIC4uLmZsYXR0ZW5BZ2dyZWdhdGlvbnMoeyBhZ2dyZWdhdGlvbnM6IHZhbHVlLCBpbmNsdWRlTWlzc2luZyB9KSxcbiAgICAgIH07XG4gICAgfVxuICB9LCB7fSk7XG59XG5cbmV4cG9ydCBkZWZhdWx0IGZsYXR0ZW5BZ2dyZWdhdGlvbnM7XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbG9kYXNoIiwicmVxdWlyZSIsIl9jb25zdGFudHMiLCJfZXhjbHVkZWQiLCJfb2JqZWN0V2l0aG91dFByb3BlcnRpZXMiLCJzb3VyY2UiLCJleGNsdWRlZCIsInRhcmdldCIsIl9vYmplY3RXaXRob3V0UH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bHVkZU1pc3NpbmcgJiYgbWlzc2luZyAmJiBtaXNzaW5nLmRvY19jb3VudCA+IDBcbiAgICAgICAgICA/IFt7IC4uLm1pc3NpbmcsIGtleTogTUlTU0lORyB9XVxuICAgICAgICAgIDogW10pLFxuICAgICAgXTtcbiAgICAgIGNvbnN0IGJ1Y2tldF9jb3VudCA9IGJ1Y2tldHMubGVuZ3RoO1xuXG4gICAgICByZXR1cm4ge1xuICAgICAgICAuLi5wcnVuZWRBZ2dzLFxuICAgICAgICBbZmllbGRdOiB7XG4gICAgICAgICAgYnVja2V0X2NvdW50LFxuICAgICAgICAgIGJ1Y2tldHM6IGJ1Y2tldHNcbiAgICAgICAgICAgIC5tYXAoKHsgcm4sIC4uLmJ1Y2tldCB9KSA9PiAoe1xuICAgICAgICAgICAgICAuLi5idWNrZXQsXG4gICAgICAgICAgICAgIGRvY19jb3VudDogcm4gPyBybi5kb2NfY291bnQgOiBidWNrZXQuZG9jX2NvdW50LFxuICAgICAgICAgICAgICAuLi4oYnVja2V0W2Ake2ZpZWxkfS5oaXRzYF1cbiAgICAgICAgICAgICAgICA/IHtcbiAgICAgICAgICAgICAgICAgICAgdG9wX2hpdHM6IGJ1Y2tldFtgJHtmaWVsZH0uaGl0c2BdPy5oaXRzPy5oaXRzWzBdPy5fc291cmNlIHx8IHt9LFxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIDoge30pLFxuICAgICAgICAgICAgICAuLi4oYnVja2V0Wyd0ZXJtX2ZpbHRlcnMnXVxuICAgICAgICAgICAgICAgID8ge1xuICAgICAgICAgICAgICAgICAgICBmaWx0ZXJfYnlfdGVybTogYnVja2V0Wyd0ZXJtX2ZpbHRlcnMnXSxcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICA6IHt9KSxcbiAgICAgICAgICAgIH0pKVxuICAgICAgICAgICAgLmZpbHRlcigoYikgPT4gYi5kb2NfY291bnQpLFxuICAgICAgICB9LFxuICAgICAgfTtcbi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R0FDdkI7WUFDRXFCLFFBQVEsRUFBRSxFQUFBTCxPQUFBLEdBQUFJLE1BQU0sSUFBQVYsTUFBQSxDQUFJVixLQUFLLFdBQVEsY0FBQWdCLE9BQUEsd0JBQUFDLFlBQUEsR0FBdkJELE9BQUEsQ0FBeUJNLElBQUksY0FBQUwsWUFBQSx3QkFBQUMsa0JBQUEsR0FBN0JELFlBQUEsQ0FBK0JLLElBQUksQ0FBQyxDQUFDLENBQUMsY0FBQUosa0JBQUEsdUJBQXRDQSxrQkFBQSxDQUF3Q0ssT0FBTyxLQUFJLENBQUM7VUFDaEUsQ0FBQyxHQUNELENBQUMsQ0FBQyxHQUNGSCxNQUFNLENBQUMsY0FBYyxDQUFDLEdBQ3RCO1lBQ0VJLGNBQWMsRUFBRUosTUFBTSxDQUFDLGNBQWM7VUFDdkMsQ0FBQyxHQUNELENBQUMsQ0FBQztRQUFBLENBQ04sQ0FBQyxDQUNGdkYsTUFBTSxDQUFDLFVBQUM0RixDQUFDO1VBQUEsT0FBS0EsQ0FBQyxDQUFDZCxTQUFTO1FBQUE7TUFDOUIsQ0FBQztJQUVMLENBQUMsTUFBTTtNQUNMLE9BQUF4RSxhQUFBLENBQUFBLGFBQUEsS0FDS3VELFVBQVUsR0FDVlAsbUJBQW1CLENBQUM7UUFBRUUsWUFBWSxFQUFFMUMsS0FBSztRQUFFNEMsY0FBYyxFQUFkQTtNQUFlLENBQUMsQ0FBQztJQUVuRTtFQUNGLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQztBQUNSO0FBQUMsSUFBQW1DLFFBQUEsR0FFY3ZDLG1CQUFtQjtBQUFBd0MsT0FBQSxjQUFBRCxRQUFBIn0=
"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,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfYnVpbGRRdWVyeSIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX2ZsYXR0ZW5BZ2dyZWdhdGlvbnMiLCJfYnVpbGRBZ2dyZWdhdGlvbnMiLCJfZXNUb1NhZmVKc0ludCIsIm9iaiIsIl9fZXNNb2R1bGUiLCJfZ2V0UmVxdWlyZVdpbGRjYXJkQ2FjaGUiLCJub2RlSW50ZXJvcCIsIldlYWtNYXAiLCJjYWNoZUJhYmVsSW50ZXJvcCIsImNhY2hlTm9kZUludGVyb3AiLCJfaW50ZXJvcFJlcXVpcmVXaWxkY2FyZCIsIl90eXBlb2YiLCJjYWNoZSIsImhhcyIsImdldCIsIm5ld09iaiIsImhhc1Byb3BlcnR5RGVzY3JpcHRvciIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yIiwia2V5IiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJjYWxsIiwiZGVzYyIsInNldCJdLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBhcyBDT05TVEFO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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 _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 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) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
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 _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" && 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 +65,2 @@ var dateValue = (0, _dateFns.parse)(value);

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

@@ -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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9lc1RvU2FmZUpzSW50LmpzIl0sIm5hbWVzIjpbIngiLCJOdW1iZXIiLCJpc0ludGVnZXIiLCJpc1NhZmVJbnRlZ2VyIiwiRVNfTUFYX0xPTkciXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7ZUFFZSxrQkFBQ0EsQ0FBRDtBQUFBLFNBQVFDLE1BQU0sQ0FBQ0MsU0FBUCxDQUFpQkYsQ0FBakIsS0FBdUIsQ0FBQ0MsTUFBTSxDQUFDRSxhQUFQLENBQXFCSCxDQUFyQixDQUF4QixHQUFrREksc0JBQWxELEdBQWdFSixDQUF4RTtBQUFBLEMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBFU19NQVhfTE9ORyB9IGZyb20gJy4uL2NvbnN0YW50cyc7XG5cbmV4cG9ydCBkZWZhdWx0ICh4KSA9PiAoTnVtYmVyLmlzSW50ZWdlcih4KSAmJiAhTnVtYmVyLmlzU2FmZUludGVnZXIoeCkgPyBFU19NQVhfTE9ORyA6IHgpO1xuIl19
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfY29uc3RhbnRzIiwicmVxdWlyZSIsIl9kZWZhdWx0IiwieCIsIk51bWJlciIsImlzSW50ZWdlciIsImlzU2FmZUludGVnZXIiLCJFU19NQVhfTE9ORyIsImV4cG9ydHMiXSwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbHMvZXNUb1NhZmVKc0ludC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBFU19NQVhfTE9ORyB9IGZyb20gJy4uL2NvbnN0YW50cyc7XG5cbmV4cG9ydCBkZWZhdWx0ICh4KSA9PiAoTnVtYmVyLmlzSW50ZWdlcih4KSAmJiAhTnVtYmVyLmlzU2FmZUludGVnZXIoeCkgPyBFU19NQVhfTE9ORyA6IHgpO1xuIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxJQUFBQSxVQUFBLEdBQUFDLE9BQUE7QUFBMkMsSUFBQUMsUUFBQSxHQUU1QixTQUFBQSxTQUFDQyxDQUFDO0VBQUEsT0FBTUMsTUFBTSxDQUFDQyxTQUFTLENBQUNGLENBQUMsQ0FBQyxJQUFJLENBQUNDLE1BQU0sQ0FBQ0UsYUFBYSxDQUFDSCxDQUFDLENBQUMsR0FBR0ksc0JBQVcsR0FBR0osQ0FBQztBQUFBLENBQUM7QUFBQUssT0FBQSxjQUFBTixRQUFBIn0=
{
"name": "@ferlab/arranger-middleware",
"version": "2.20.0-rc2",
"version": "2.20.0-rc4",
"description": "Arranger Middleware",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -252,1 +252,43 @@ import createFieldAggregation from '../../src/buildAggregations/createFieldAggregation';

});
test('it should generate nested terms filters in aggs ', () => {
const input = {
field: 'donors.zygosity',
graphqlField: {
buckets: {
key: {},
doc_count: {},
},
},
isNested: 1,
termFilters: [
{ terms: { 'donors.parental_origin': ['mother'], boost: 0 } },
{ terms: { 'donors.patient_id': ['PA00001'], boost: 0 } },
],
};
const output = {
'donors.zygosity:nested_filtered': {
filter: {
bool: {
must: [
{ terms: { 'donors.parental_origin': ['mother'], boost: 0 } },
{ terms: { 'donors.patient_id': ['PA00001'], boost: 0 } },
],
},
},
aggs: {
'donors.zygosity': {
aggs: { rn: { reverse_nested: {} } },
terms: { field: 'donors.zygosity', size: 300000 },
},
'donors.zygosity:missing': {
aggs: { rn: { reverse_nested: {} } },
missing: { field: 'donors.zygosity' },
},
},
},
};
expect(createFieldAggregation(input)).toEqual(output);
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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