diff --git a/browser/elastic-builder.min.js b/browser/elastic-builder.min.js index 4fc50c44..19e82f4e 100644 --- a/browser/elastic-builder.min.js +++ b/browser/elastic-builder.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.bob=e():t.bob=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=150)}([function(t,e,r){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=r(210),u=n(i),o=r(207),s=n(o),a=r(51),c=n(a);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,c.default)(e)));t.prototype=(0,s.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(u.default?(0,u.default)(t,e):t.__proto__=e)}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(51),i=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,i.default)(e))&&"function"!=typeof e?t:e}},function(t,e,r){"use strict";e.__esModule=!0;var n=r(77),i=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(){function t(t,e){for(var r=0;r-1}function g(t,e){var r=this.__data__,n=k(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}function d(t){var e=-1,r=t?t.length:0;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=Y}function G(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function $(t){return!!t&&"object"==typeof t}function H(t){return"symbol"==typeof t||$(t)&&yt.call(t)==et}function J(t){return null==t?"":x(t)}function U(t,e){return null!=t&&M(t,e,w)}var W="Expected a function",V="__lodash_hash_undefined__",K=1/0,Y=9007199254740991,Z="[object Arguments]",X="[object Function]",tt="[object GeneratorFunction]",et="[object Symbol]",rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,it=/^\./,ut=/^\[object .+?Constructor\]$/,ot=/^(?:0|[1-9]\d*)$/,st="object"==typeof e&&e&&e.Object===Object&&e,at="object"==typeof self&&self&&self.Object===Object&&self,ct=st||at||Function("return this")(),ft=Array.prototype,lt=Function.prototype,ht=Object.prototype,pt=ct["__core-js_shared__"],_t=function(){var t=/[^.]+$/.exec(pt&&pt.keys&&pt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),gt=lt.toString,dt=ht.hasOwnProperty,yt=ht.toString,vt=RegExp("^"+gt.call(dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bt=ct.Symbol,mt=ht.propertyIsEnumerable,Ot=ft.splice,kt=q(ct,"Map"),wt=q(Object,"create"),jt=bt?bt.prototype:void 0,xt=jt?jt.toString:void 0;i.prototype.clear=u,i.prototype.delete=o,i.prototype.get=s,i.prototype.has=a,i.prototype.set=c,f.prototype.clear=l,f.prototype.delete=h,f.prototype.get=p,f.prototype.has=_,f.prototype.set=g,d.prototype.clear=y,d.prototype.delete=v,d.prototype.get=b,d.prototype.has=m,d.prototype.set=O;var At=z(function(t){t=J(t);var e=[];return it.test(t)&&e.push(""),t.replace(/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,function(t,r,n,i){e.push(n?i.replace(/\\(\\)?/g,"$1"):r||t)}),e});z.Cache=d;var St=Array.isArray;t.exports=U}).call(e,r(15))},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(2),c=n(a),f=r(1),l=n(f),h=r(5),p=r(4),_=p.Aggregation,g=p.Script,d=p.util.checkType,y=function(t){function e(t,r,n){(0,u.default)(this,e);var i=(0,c.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r));return h(n)||(i._aggsDef.field=n),i}return(0,l.default)(e,t),(0,s.default)(e,[{key:"field",value:function(t){return this._aggsDef.field=t,this}},{key:"script",value:function(t){return d(t,g),this._aggsDef.script=t,this}},{key:"missing",value:function(t){return this._aggsDef.missing=t,this}},{key:"format",value:function(t){return this._aggsDef.format=t,this}}]),e}(_);t.exports=y},function(t,e,r){"use strict";e.__esModule=!0;var n=r(77),i=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=function(t,e,r){return e in t?(0,i.default)(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(2),c=n(a),f=r(1),l=n(f),h=r(5),p=r(4),_=p.Aggregation,g=p.Script,d=p.util.checkType,y=function(t){function e(t,r,n){(0,u.default)(this,e);var i=(0,c.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r));return h(n)||(i._aggsDef.field=n),i}return(0,l.default)(e,t),(0,s.default)(e,[{key:"field",value:function(t){return this._aggsDef.field=t,this}},{key:"script",value:function(t){return d(t,g),this._aggsDef.script=t,this}}]),e}(_);t.exports=y},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(2),c=n(a),f=r(1),l=n(f),h=r(5),p=r(4),_=p.Aggregation,g=p.util.invalidParam,d=g("","gap_policy","'skip' or 'insert_zeros'"),y=function(t){function e(t,r,n,i){(0,u.default)(this,e);var o=(0,c.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r));return o._refUrl=n,h(i)||(o._aggsDef.buckets_path=i),o}return(0,l.default)(e,t),(0,s.default)(e,[{key:"bucketsPath",value:function(t){return this._aggsDef.buckets_path=t,this}},{key:"gapPolicy",value:function(t){h(t)&&d(t,this._refUrl);var e=t.toLowerCase();return"skip"!==e&&"insert_zeros"!==e&&d(t,this._refUrl),this._aggsDef.gap_policy=e,this}},{key:"format",value:function(t){return this._aggsDef.format=t,this}}]),e}(_);t.exports=y},function(t,e){var r=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(t,e,r){"use strict";function n(t,e,r){return t>=e&&t<=r}var i=r(51),u=function(t){return t&&t.__esModule?t:{default:t}}(i),o=r(93),s=o.inspect,a=r(23),c=r(5),f=r(91),l=r(68),h=r(258),p=r(257);e.checkType=function(t,e){if(!(t instanceof e))throw c(t)?console.warn("Was expecting instance of "+e.name+" but got "+t+"!"):console.warn(s(t)+" is of the type "+(void 0===t?"undefined":(0,u.default)(t))),new TypeError("Argument must be an instance of "+e.name)},e.constructorWrapper=function(t){return function(){for(var e=arguments.length,r=Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:t;i&&console.log("See "+i),console.warn("Got '"+e+"' - '"+n+"'");var u=f(r)?r:s(r);throw new Error("The '"+e+"' parameter should be one of "+u)}}},function(t,e,r){var n=r(62)("wks"),i=r(41),u=r(17).Symbol,o="function"==typeof u;(t.exports=function(t){return n[t]||(n[t]=o&&u[t]||(o?u:i)("Symbol."+t))}).store=n},function(t,e){function r(t,e){for(var r=-1,n=t?t.length:0;++r-1&&t%1==0&&t-1&&t%1==0&&t<=b}function g(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function d(t){return!!t&&"object"==typeof t}function y(t){return l(t)?i(t):o(t)}function v(t){return t}var b=9007199254740991,m="[object Arguments]",O="[object Function]",k="[object GeneratorFunction]",w=/^(?:0|[1-9]\d*)$/,j=Object.prototype,x=j.hasOwnProperty,A=j.toString,S=j.propertyIsEnumerable,q=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),M=function(t,e){return function(r,n){if(null==r)return r;if(!l(r))return t(r,n);for(var i=r.length,u=e?i:-1,o=Object(r);(e?u--:++u-1&&t%1==0&&t<=m}function y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){return!!t&&"object"==typeof t}function b(){return!1}var m=9007199254740991,O="[object Arguments]",k="[object Function]",w="[object GeneratorFunction]",j="[object Map]",x="[object Set]",A=/^\[object .+?Constructor\]$/,S="object"==typeof t&&t&&t.Object===Object&&t,q="object"==typeof self&&self&&self.Object===Object&&self,M=S||q||Function("return this")(),P="object"==typeof e&&e&&!e.nodeType&&e,T=P&&"object"==typeof r&&r&&!r.nodeType&&r,Q=T&&T.exports===P,E=Function.prototype,D=Object.prototype,F=M["__core-js_shared__"],z=function(){var t=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),C=E.toString,R=D.hasOwnProperty,N=D.toString,B=RegExp("^"+C.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),L=Q?M.Buffer:void 0,I=D.propertyIsEnumerable,G=L?L.isBuffer:void 0,$=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),H=s(M,"DataView"),J=s(M,"Map"),U=s(M,"Promise"),W=s(M,"Set"),V=s(M,"WeakMap"),K=!I.call({valueOf:1},"valueOf"),Y=f(H),Z=f(J),X=f(U),tt=f(W),et=f(V),rt=u;(H&&"[object DataView]"!=rt(new H(new ArrayBuffer(1)))||J&&rt(new J)!=j||U&&"[object Promise]"!=rt(U.resolve())||W&&rt(new W)!=x||V&&"[object WeakMap]"!=rt(new V))&&(rt=function(t){var e=N.call(t),r="[object Object]"==e?t.constructor:void 0,n=r?f(r):void 0;if(n)switch(n){case Y:return"[object DataView]";case Z:return j;case X:return"[object Promise]";case tt:return x;case et:return"[object WeakMap]"}return e});var nt=Array.isArray,it=G||b;r.exports=_}).call(e,r(15),r(43)(t))},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(8),u=n(i),o=r(0),s=n(o),a=r(3),c=n(a),f=r(4),l=f.Query,h=f.util,p=h.checkType,_=h.recursiveToJSON,g=function(){function t(e){(0,s.default)(this,t),this._name=e,this._body={},this._opts={}}return(0,c.default)(t,[{key:"filter",value:function(t){return p(t,l),this._body.filter=t,this}},{key:"weight",value:function(t){return this._body.weight=t,this}},{key:"toJSON",value:function(){var t=Object.assign((0,u.default)({},this._name,this._opts),this._body);return _(t)}}]),t}();t.exports=g},function(t,e,r){"use strict";var n=r(93),i=n.inspect,u=r(4),o=u.util.firstDigitPos,s=u.consts.REWRITE_METHOD_SET;e.validateRewiteMethod=function(t,e,r){if(!s.has(t)){var n=t.substring(0,o(t))+"N";if(!s.has(n))throw console.log("See "+r),console.warn("Got '"+e+"' - "+t),new Error("The '"+e+"' parameter should belong to "+i(s))}}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(2),s=n(o),a=r(1),c=n(a),f=r(76),l=function(t){function e(){return(0,u.default)(this,e),(0,s.default)(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return(0,c.default)(e,t),e}(f);t.exports=l},function(t,e,r){var n=r(33);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e,r){var n=r(18),i=r(35);t.exports=r(20)?function(t,e,r){return n.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(2),c=n(a),f=r(213),l=n(f),h=r(1),p=n(h),_=r(23),g=r(14),d=r(4),y=d.util.checkType,v=r(9),b=Object.prototype.hasOwnProperty,m=function(t){function e(t,r,n){(0,u.default)(this,e);var i=(0,c.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r,n));return i._rangeRequiredKeys=["from","to"],i._aggsDef.ranges=[],i}return(0,p.default)(e,t),(0,s.default)(e,[{key:"format",value:function(t){return this._aggsDef.format=t,this}},{key:"range",value:function(t){if(y(t,Object),!this._rangeRequiredKeys.some(b,t))throw new Error("Invalid Range! Range must have at least one of "+this._rangeRequiredKeys);return this._aggsDef.ranges.push(t),this}},{key:"ranges",value:function(t){var e=this;return y(t,Array),g(t,function(t){return e.range(t)}),this}},{key:"missing",value:function(t){return this._aggsDef.missing=t,this}},{key:"keyed",value:function(t){return this._aggsDef.keyed=t,this}},{key:"toJSON",value:function(){if(_(this._aggsDef.ranges))throw new Error("`ranges` cannot be empty.");return(0,l.default)(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"toJSON",this).call(this)}}]),e}(v);t.exports=m},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(12),c=a.recursiveToJSON,f=function(){function t(e){(0,u.default)(this,t),this.queryType=e,this._body={},this._queryOpts=this._body[e]={}}return(0,s.default)(t,[{key:"boost",value:function(t){return this._queryOpts.boost=t,this}},{key:"name",value:function(t){return this._queryOpts._name=t,this}},{key:"getDSL",value:function(){return this.toJSON()}},{key:"toJSON",value:function(){return c(this._body)}}]),t}();t.exports=f},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(8),u=n(i),o=r(0),s=n(o),a=r(3),c=n(a),f=r(2),l=n(f),h=r(1),p=n(h),_=r(5),g=r(4),d=g.Query,y=g.util,v=y.invalidParam,b=y.recursiveToJSON,m=v("","validation_method","'IGNORE_MALFORMED', 'COERCE' or 'STRICT'"),O=function(t){function e(t,r){(0,s.default)(this,e);var n=(0,l.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n._field=null,n._fieldOpts={},_(r)||(n._field=r),n}return(0,p.default)(e,t),(0,c.default)(e,[{key:"field",value:function(t){return this._field=t,this}},{key:"validationMethod",value:function(t){_(t)&&m(t);var e=t.toUpperCase();return"IGNORE_MALFORMED"!==e&&"COERCE"!==e&&"STRICT"!==e&&m(t),this._queryOpts.validation_method=e,this}},{key:"toJSON",value:function(){return b((0,u.default)({},this.queryType,Object.assign((0,u.default)({},this._field,this._fieldOpts),this._queryOpts)))}}]),e}(d);t.exports=O},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){t.exports={}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){"use strict";e.EXECUTION_HINT_SET=new Set(["map","global_ordinals","global_ordinals_hash","global_ordinals_low_cardinality"]),e.UNIT_SET=new Set(["in","inch","yd","yards","ft","feet","km","kilometers","NM","nmi","nauticalmiles","mm","millimeters","cm","centimeters","mi","miles","m","meters"]),e.MODEL_SET=new Set(["simple","linear","ewma","holt","holt_winters"]),e.SORT_MODE_SET=new Set(["min","max","sum","avg","median"]),e.RESCORE_MODE_SET=new Set(["total","multiply","min","max","avg"]),e.REWRITE_METHOD_SET=new Set(["constant_score","constant_score_auto","constant_score_filter","scoring_boolean","constant_score_boolean","top_terms_N","top_terms_boost_N","top_terms_blended_freqs_N"]),e.MULTI_MATCH_TYPE=new Set(["best_fields","most_fields","cross_fields","phrase","phrase_prefix"]),e.SCORE_MODE_SET=new Set(["multiply","sum","first","min","max","avg"]),e.BOOST_MODE_SET=new Set(["multiply","sum","replace","min","max","avg"]),e.FIELD_MODIFIER_SET=new Set(["none","log","log1p","log2p","ln","ln1p","ln2p","square","sqrt","reciprocal"]),e.NESTED_SCORE_MODE_SET=new Set(["none","sum","min","max","avg"]),e.GEO_SHAPE_TYPES=new Set(["point","linestring","polygon","multipoint","multilinestring","multipolygon","geometrycollection","envelope","circle"]),e.GEO_RELATION_SET=new Set(["WITHIN","CONTAINS","DISJOINT","INTERSECTS"])},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(2),c=n(a),f=r(1),l=n(f),h=r(5),p=r(4),_=p.Query,g=function(t){function e(t,r){(0,u.default)(this,e);var n=(0,c.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return h(r)||(n._queryOpts.query=r),n}return(0,l.default)(e,t),(0,s.default)(e,[{key:"analyzer",value:function(t){return this._queryOpts.analyzer=t,this}},{key:"minimumShouldMatch",value:function(t){return this._queryOpts.minimum_should_match=t,this}},{key:"query",value:function(t){return this._queryOpts.query=t,this}}]),e}(_);t.exports=g},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(8),u=n(i),o=r(0),s=n(o),a=r(3),c=n(a),f=r(2),l=n(f),h=r(1),p=n(h),_=r(6),g=r(5),d=r(37),y=function(t){function e(t,r,n){(0,s.default)(this,e);var i=(0,l.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return g(r)||(i._field=r),i}return(0,p.default)(e,t),(0,c.default)(e,[{key:"field",value:function(t){return this._field=t,this}},{key:"toJSON",value:function(){if(!_(this._queryOpts,"query"))throw new Error("Query string is required for full text query!");var t=Object.keys(this._queryOpts),e=1===t.length?this._queryOpts.query:this._queryOpts;return(0,u.default)({},this.queryType,(0,u.default)({},this._field,e))}}]),e}(d);t.exports=y},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(2),c=n(a),f=r(1),l=n(f),h=r(5),p=r(4),_=p.Query,g=p.InnerHits,d=p.util,y=d.checkType,v=d.invalidParam,b=p.consts.NESTED_SCORE_MODE_SET,m=v("","score_mode",b),O=function(t){function e(t,r,n){(0,u.default)(this,e);var i=(0,c.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return i.refUrl=r,h(n)||i.query(n),i}return(0,l.default)(e,t),(0,s.default)(e,[{key:"query",value:function(t){return y(t,_),this._queryOpts.query=t,this}},{key:"scoreMode",value:function(t){h(t)&&m(t);var e=t.toLowerCase();return b.has(e)||m(t),this._queryOpts.score_mode=e,this}},{key:"ignoreUnmapped",value:function(t){return this._queryOpts.ignore_unmapped=t,this}},{key:"innerHits",value:function(t){return y(t,g),this._queryOpts.inner_hits=t,this}}]),e}(_);t.exports=O},function(t,e,r){var n=r(85),i=r(55);t.exports=Object.keys||function(t){return n(t,i)}},function(t,e){var r=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+n).toString(36))}},function(t,e,r){(function(e){function r(t,e){for(var r=-1,n=e.length,i=t.length;++r0&&i(f)?e>1?n(f,e-1,i,o,s):r(s,f):o||(s[s.length]=f)}return s}function i(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r-1&&t%1==0&&t<=_}function h(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function p(t){return!!t&&"object"==typeof t}var _=9007199254740991,g="[object Arguments]",d="[object Function]",y="[object GeneratorFunction]",v="object"==typeof e&&e&&e.Object===Object&&e,b="object"==typeof self&&self&&self.Object===Object&&self,m=v||b||Function("return this")(),O=Object.prototype,k=O.hasOwnProperty,w=O.toString,j=m.Symbol,x=O.propertyIsEnumerable,A=j?j.isConcatSpreadable:void 0,S=Array.isArray;t.exports=o}).call(e,r(15))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(8),u=n(i),o=r(0),s=n(o),a=r(3),c=n(a),f=r(2),l=n(f),h=r(1),p=n(h),_=r(6),g=r(5),d=r(4),y=d.util.invalidParam,v=r(9),b=y("","direction","'asc' or 'desc'"),m=function(t){function e(t,r,n,i){(0,s.default)(this,e);var u=(0,l.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r,n));return g(i)||(u._aggsDef.interval=i),u}return(0,p.default)(e,t),(0,c.default)(e,[{key:"interval",value:function(t){return this._aggsDef.interval=t,this}},{key:"format",value:function(t){return this._aggsDef.format=t,this}},{key:"offset",value:function(t){return this._aggsDef.offset=t,this}},{key:"order",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"desc";g(e)&&b(e);var r=e.toLowerCase();return"asc"!==r&&"desc"!==r&&b(e),_(this._aggsDef,"order")?(Array.isArray(this._aggsDef.order)||(this._aggsDef.order=[this._aggsDef.order]),this._aggsDef.order.push((0,u.default)({},t,r))):this._aggsDef.order=(0,u.default)({},t,r),this}},{key:"minDocCount",value:function(t){return this._aggsDef.min_doc_count=t,this}},{key:"extendedBounds",value:function(t,e){return this._aggsDef.extended_bounds={min:t,max:e},this}},{key:"missing",value:function(t){return this._aggsDef.missing=t,this}},{key:"keyed",value:function(t){return this._aggsDef.keyed=t,this}}]),e}(v);t.exports=m},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(2),c=n(a),f=r(1),l=n(f),h=r(5),p=r(4),_=p.util.invalidParam,g=p.consts.EXECUTION_HINT_SET,d=r(9),y=_("","execution_hint",g),v=function(t){function e(t,r,n,i){(0,u.default)(this,e);var o=(0,c.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r,i));return o._refUrl=n,o}return(0,l.default)(e,t),(0,s.default)(e,[{key:"format",value:function(t){return this._aggsDef.format=t,this}},{key:"minDocCount",value:function(t){return this._aggsDef.min_doc_count=t,this}},{key:"shardMinDocCount",value:function(t){return this._aggsDef.shard_min_doc_count=t,this}},{key:"size",value:function(t){return this._aggsDef.size=t,this}},{key:"shardSize",value:function(t){return this._aggsDef.shard_size=t,this}},{key:"missing",value:function(t){return this._aggsDef.missing=t,this}},{key:"include",value:function(t){return this._aggsDef.include=t,this}},{key:"exclude",value:function(t){return this._aggsDef.exclude=t,this}},{key:"executionHint",value:function(t){h(t)&&y(t,this._refUrl);var e=t.toLowerCase();return g.has(e)||y(t,this._refUrl),this._aggsDef.execution_hint=t,this}}]),e}(d);t.exports=v},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(6),c=r(14),f=r(23),l=r(5),h=r(91),p=r(30),_=r(12),g=_.checkType,d=_.invalidParam,y=_.recursiveToJSON,v="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html",b=d(v,"encoder","'default' or 'html'"),m=d(v,"type","'plain', 'postings' or 'fvh'"),O=d(v,"fragmenter","'simple' or 'span'"),k=function(){function t(e){(0,u.default)(this,t),this._fields={},this._highlight={fields:this._fields},l(e)||(h(e)?this.field(e):this.fields(e))}return(0,s.default)(t,[{key:"_setFieldOption",value:function(t,e,r){if(l(t))return void(this._highlight[e]=r);this.field(t),this._fields[t][e]=r}},{key:"field",value:function(t){return l(t)||a(this._fields,t)||(this._fields[t]={}),this}},{key:"fields",value:function(t){var e=this;return g(t,Array),c(t,function(t){return e.field(t)}),this}},{key:"preTags",value:function(t,e){return this._setFieldOption(e,"pre_tags",h(t)?[t]:t),this}},{key:"postTags",value:function(t,e){return this._setFieldOption(e,"post_tags",h(t)?[t]:t),this}},{key:"styledTagsSchema",value:function(){return this._highlight.tags_schema="styled",this}},{key:"scoreOrder",value:function(t){return this._setFieldOption(t,"order","score"),this}},{key:"fragmentSize",value:function(t,e){return this._setFieldOption(e,"fragment_size",t),this}},{key:"numberOfFragments",value:function(t,e){return this._setFieldOption(e,"number_of_fragments",t),this}},{key:"noMatchSize",value:function(t,e){return this._setFieldOption(e,"no_match_size",t),this}},{key:"highlightQuery",value:function(t,e){return g(t,p),this._setFieldOption(e,"highlight_query",t),this}},{key:"matchedFields",value:function(t,e){if(g(t,Array),f(e))throw new Error("`matched_fields` requires field name to be passed");return this.type("fvh",e),this._setFieldOption(e,"matched_fields",t),this}},{key:"phraseLimit",value:function(t){return this._highlight.phrase_limit=t,this}},{key:"encoder",value:function(t){l(t)&&b(t);var e=t.toLowerCase();return"default"!==e&&"html"!==e&&b(t),this._highlight.encoder=e,this}},{key:"requireFieldMatch",value:function(t,e){return this._setFieldOption(e,"require_field_match",t),this}},{key:"boundaryMaxScan",value:function(t,e){return this._setFieldOption(e,"boundary_max_scan",t),this}},{key:"boundaryChars",value:function(t,e){return this._setFieldOption(e,"boundary_chars",t),this}},{key:"type",value:function(t,e){l(t)&&m(t);var r=t.toLowerCase();return"plain"!==r&&"postings"!==r&&"fvh"!==r&&m(t),this._setFieldOption(e,"type",r),this}},{key:"forceSource",value:function(t,e){return this._setFieldOption(e,"force_source",t),this}},{key:"fragmenter",value:function(t,e){l(t)&&O(t);var r=t.toLowerCase();return"simple"!==r&&"span"!==r&&O(t),this._setFieldOption(e,"fragmenter",r),this}},{key:"toJSON",value:function(){return y(this._highlight)}}]),t}();t.exports=k},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(8),u=n(i),o=r(0),s=n(o),a=r(3),c=n(a),f=r(23),l=r(6),h=r(5),p=r(30),_=r(73),g=r(12),d=g.checkType,y=g.invalidParam,v=g.recursiveToJSON,b=r(36),m=b.SORT_MODE_SET,O=b.UNIT_SET,k="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html",w=y(k,"order","'asc' or 'desc'"),j=y(k,"mode",m),x=y(k,"distance_type","'plane' or 'arc'"),A=y(k,"unit",O),S=function(){function t(e,r){(0,s.default)(this,t),this._field=e,this._opts={},this._geoPoint=null,this._script=null,h(r)||this.order(r)}return(0,c.default)(t,[{key:"order",value:function(t){h(t)&&w(t);var e=t.toLowerCase();return"asc"!==e&&"desc"!==e&&w(t),this._opts.order=e,this}},{key:"mode",value:function(t){h(t)&&j(t);var e=t.toLowerCase();return m.has(e)||j(t),this._opts.mode=e,this}},{key:"nestedPath",value:function(t){return this._opts.nested_path=t,this}},{key:"nestedFilter",value:function(t){return d(t,p),this._opts.nested_filter=t,this}},{key:"missing",value:function(t){return this._opts.missing=t,this}},{key:"unmappedType",value:function(t){return this._opts.unmapped_type=t,this}},{key:"geoDistance",value:function(t){return this._geoPoint=t,this}},{key:"distanceType",value:function(t){h(t)&&x(t);var e=t.toLowerCase();return"plane"!==e&&"arc"!==e&&x(t),this._opts.distance_type=e,this}},{key:"unit",value:function(t){return O.has(t)||A(t),this._opts.unit=t,this}},{key:"script",value:function(t){return d(t,_),this._script=t,this}},{key:"type",value:function(t){return this._opts.type=t,this}},{key:"reverse",value:function(t){return this._opts.reverse=t,this}},{key:"toJSON",value:function(){var t=h(this._geoPoint),e=h(this._script);if(t&&e){if(f(this._opts))return this._field;if(1===Object.keys(this._opts).length&&l(this._opts,"order"))return(0,u.default)({},this._field,this._opts.order)}var r=void 0;return r=t?e?(0,u.default)({},this._field,this._opts):{_script:Object.assign({script:this._script},this._opts)}:{_geo_distance:Object.assign((0,u.default)({},this._field,this._geoPoint),this._opts)},v(r)}}]),t}();t.exports=S},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(2),c=n(a),f=r(1),l=n(f),h=r(38),p=function(t){function e(t,r,n,i){(0,u.default)(this,e);var o=(0,c.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,i));return o._refUrl=r,o}return(0,l.default)(e,t),(0,s.default)(e,[{key:"minimumShouldMatch",value:function(){throw console.log("Please refer "+this._refUrl),new Error("minimumShouldMatch is not supported in "+this.constructor.name)}},{key:"slop",value:function(t){return this._queryOpts.slop=t,this}}]),e}(h);t.exports=p},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(2),c=n(a),f=r(1),l=n(f),h=r(5),p=r(6),_=r(42),g=r(4),d=g.util,y=d.checkType,v=d.invalidParam,b=r(37),m=v("","operator","'AND' or 'OR'"),O=function(t){function e(t,r,n){(0,u.default)(this,e);var i=(0,c.default)(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return i._refUrl=r,i}return(0,l.default)(e,t),(0,s.default)(e,[{key:"field",value:function(t){return p(this._queryOpts,"fields")||(this._queryOpts.fields=[]),this._queryOpts.fields.push(t),this}},{key:"fields",value:function(t){return y(t,Array),p(this._queryOpts,"fields")||(this._queryOpts.fields=[]),this._queryOpts.fields=_(this._queryOpts.fields,t),this}},{key:"defaultOperator",value:function(t){h(t)&&m(t,this._refUrl);var e=t.toUpperCase();return"AND"!==e&&"OR"!==e&&m(t,this._refUrl),this._queryOpts.default_operator=e,this}},{key:"analyzeWildcard",value:function(t){return this._queryOpts.analyze_wildcard=t,this}},{key:"lenient",value:function(t){return this._queryOpts.lenient=t,this}},{key:"quoteFieldSuffix",value:function(t){return this._queryOpts.quote_field_suffix=t,this}},{key:"allFields",value:function(t){return this._queryOpts.all_fields=t,this}}]),e}(b);t.exports=O},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}var i=r(0),u=n(i),o=r(3),s=n(o),a=r(2),c=n(a),f=r(1),l=n(f),h=r(4),p=h.util.checkType,_=r(16),g=function(t){function e(){return(0,u.default)(this,e),(0,c.default)(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return(0,l.default)(e,t),(0,s.default)(e,[{key:"little",value:function(t){return p(t,_),this._queryOpts.little=t,this}},{key:"big",value:function(t){return p(t,_),this._queryOpts.big=t,this}}]),e}(_);t.exports=g},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=r(212),u=n(i),o=r(211),s=n(o),a="function"==typeof s.default&&"symbol"==typeof u.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===a(u.default)?function(t){return void 0===t?"undefined":a(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":void 0===t?"undefined":a(t)}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,r){var n=r(222);t.exports=function(t,e,r){if(n(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports=!0},function(t,e,r){var n=r(27),i=r(238),u=r(55),o=r(61)("IE_PROTO"),s=function(){},a=function(){var t,e=r(79)("iframe"),n=u.length;for(e.style.display="none",r(228).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("