var a=function(){var r=function(n,t){r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,e){o.__proto__=e}||function(o,e){for(var m in e)if(Object.prototype.hasOwnProperty.call(e,m))o[m]=e[m]};return r(n,t)};return function(n,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(n,t);function o(){this.constructor=n}n.prototype=t===null?Object.create(t):(o.prototype=t.prototype,new o)}}();import{CommandChain as u}from"../AbstractCommand";import{AndCommand as p,OrCommand as i}from"./logic";import{EqCommand as s}from"./eq";import{NeqCommand as d}from"./neq";import{LtCommand as f}from"./lt";import{LteCommand as C}from"./lte";import{GtCommand as h}from"./gt";import{GteCommand as c}from"./gte";import{InCommand as l}from"./in";import{NinCommand as y}from"./nin";import{ExistsCommand as w}from"./exists";import{ModCommand as _}from"./mod";import{AllCommand as x}from"./all";import{ElemMatchCommand as O}from"./elemMatch";var v=function(r){a(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}n.prototype.appendCommand=function(t){t=n.unchain(t);if(this.lastCmd instanceof p){this.lastCmd.pushCommand(t)}else{this.lastCmd=new p([this.lastCmd,t])}return this};n.prototype.and=function(t){return this.appendCommand(t)};n.prototype.or=function(t){t=n.unchain(t);if(this.lastCmd instanceof i){this.lastCmd.pushCommand(t)}else{this.lastCmd=new i([this.lastCmd,t])}return this};n.prototype.not=function(t){return this.appendCommand(t)};n.prototype.nor=function(t){return this.appendCommand(t)};n.prototype.eq=function(t){return this.appendCommand(new s(t))};n.prototype.neq=function(t){return this.appendCommand(new d(t))};n.prototype.lt=function(t){return this.appendCommand(new f(t))};n.prototype.lte=function(t){return this.appendCommand(new C(t))};n.prototype.gt=function(t){return this.appendCommand(new h(t))};n.prototype.gte=function(t){return this.appendCommand(new c(t))};n.prototype.in=function(t){return this.appendCommand(new l(t))};n.prototype.nin=function(t){return this.appendCommand(new y(t))};n.prototype.exists=function(t){return this.appendCommand(new w(t))};n.prototype.mod=function(t,o){return this.appendCommand(new _(t,o))};n.prototype.all=function(t){return this.appendCommand(new x(t))};n.prototype.elemMatch=function(t){return this.appendCommand(new O(n.unchain(t)))};n.prototype.size=function(t){return this.appendCommand(t)};return n}(u);export{v as QueryChain};