eslint-disable-next-line max-params
554019
function parse (buffer, doc, options, key) {
  switch (doc.type) {
    case 'text':
      return [...buffer, doc.content]
    case 'tag': {
      let children = reactify(doc.children, options, key)
      if (!children.length) {
        children = null
      }
      if (doc.name.startsWith(COMMENT_TAG)) {
        return [...buffer, ...children]
      }
      const tag = options.mappings[doc.name] || DEFAULT_TAG
      if (tag.fromMarkup) {
        doc.attrs = tag.fromMarkup(doc.attrs)
      }
      if (tag === DEFAULT_TAG && !doc.attrs.as) {
        doc.attrs.as = doc.name
      }
      if (doc.attrs.class) {
        // Rename class to className for React compatibility
        doc.attrs.className = doc.attrs.class
        delete doc.attrs.class
      }
      return [...buffer, createElement(tag, { key, ...doc.attrs }, children)]
    }
    default:
      return buffer
  }
}
319747
function updateInfo(info, override, source, sourceId) {
  if (source) {
    if (source.minzoom !== undefined) {
      // eslint-disable-next-line no-param-reassign
      info.minzoom = source.minzoom;
    }
    if (source.maxzoom !== undefined) {
      // eslint-disable-next-line no-param-reassign
      info.maxzoom = source.maxzoom;
    }
  }
  if (sourceId !== undefined) {
    // eslint-disable-next-line no-param-reassign
    info.name = sourceId;
  }
  if (override) {
    _.each(override, (v, k) => {
      if (v === null) {
        // When override.key == null, delete that key
        // eslint-disable-next-line no-param-reassign
        delete info[k];
      } else {
        // override info of the parent
        // eslint-disable-next-line no-param-reassign
        info[k] = v;
      }
    });
  }
}
1229728
function validate_op_args(raw_arg0, op, op_params) {
        const arg0 = undefined === raw_arg0
            ? ALL_ITEMS
            : raw_arg0
            ; // eslint-disable-line indent
        switch (true) {
            case ALL_ITEMS === arg0:
            case arg0 instanceof Query:
            case 'string' === typeof arg0:
            case 'number' === typeof arg0:
                if (op && 'string' !== typeof op) {
                    throw new Error([
                        'When calling a bullpen operation,',
                        'if arg 1 is provided, it must be',
                        'the name of the operation to perform',
                        ].join(' ')); // eslint-disable-line indent
                } else if (op_params && 'object' !== typeof op_params) {
                    throw new Error([
                        'When calling a bullpen operation,',
                        'if arg 2 is provided, it must be a params object',
                        ].join(' ')); // eslint-disable-line indent
                }
                return [ arg0, op, op_params ];
        }
        throw new Error([
            'When calling a bullpen operation, if args are provided,',
            'arg 0 of must be one of:',
            'a string, a number, COLLECTION.ALL_ITEMS, or',
            'an instance of COLLECTION.Query',
            ].join(' ')); // eslint-disable-line indent
    }
847293
function stepThrough(node, debug=false) {
  if (debug) {
    // eslint-disable-next-line
    console.log('\n\nSimplifying: ' + print(node, false, true));
  }

  if(checks.hasUnsupportedNodes(node)) {
    return [];
  }

  let nodeStatus;
  const steps = [];

  const originalExpressionStr = print(node);
  const MAX_STEP_COUNT = 20;
  let iters = 0;

  // Now, step through the math expression until nothing changes
  nodeStatus = step(node);
  while (nodeStatus.hasChanged()) {
    if (debug) {
      logSteps(nodeStatus);
    }
    steps.push(removeUnnecessaryParensInStep(nodeStatus));
    const nextNode = Status.resetChangeGroups(nodeStatus.newNode);
    nodeStatus = step(nextNode);
    if (iters++ === MAX_STEP_COUNT) {
      // eslint-disable-next-line
      console.error('Math error: Potential infinite loop for expression: ' +
                    originalExpressionStr + ', returning no steps');
      return [];
    }
  }

  return steps;
}
530822
function (item) {
        // do not proceed on empty param, but empty strings are in fact valid.
        // eslint-disable-next-line lodash/prefer-is-nil
        if (_.isNull(item) || _.isUndefined(item) || _.isNaN(item)) { return; }

        // create new instance of the item based on the type specified if it is not already
        this.insert((item.constructor === this.Type) ? item :
            // if the property has a create static function, use it.
            // eslint-disable-next-line prefer-spread
            (_.has(this.Type, 'create') ? this.Type.create.apply(this.Type, arguments) : new this.Type(item)));
    }
594669
function(pagedData, previousData){ // eslint-disable-line camelcase
  log.debug('defaultMethod_ForProcessingPagedResults_ForConsignmentProducts');
  if (previousData && previousData.length>0) {
    //log.verbose(JSON.stringify(pagedData.consignment_products,replacer,2));
    if (pagedData.consignment_products && pagedData.consignment_products.length>0) {
      log.debug('previousData: ', previousData.length);
      pagedData.consignment_products = pagedData.consignment_products.concat(previousData); // eslint-disable-line camelcase
      log.debug('combined: ', pagedData.consignment_products.length);
    }
    else {
      pagedData.consignment_products = previousData; // eslint-disable-line camelcase
    }
  }
  //log.silly('finalData: ', pagedData.consignment_products);
  log.debug('finalData.length: ', pagedData.consignment_products.length);
  return Promise.resolve(pagedData.consignment_products);
}
120804
function( max, startFunc ) {
		if ( max < render.state ) {
			render._stateError( startFunc || render.requireMaxState );
		}
	}
681062
function() {
    if ( !this.element ) { // eslint-disable-line no-negated-condition, inline-comments, max-len
      var attrs = assign( {}, this.attributes );
      attrs.id = this.id || this.u_id;
      if ( this.className ) attrs['class'] = this.className;
      this.setElement( document.createElement( this.tagName ) );
      this.setElementAttributes( attrs );
    } else {
      this.setElement( this.element );
    }
    this.element.setAttribute( 'data-bound', true );
  }
247487
function _fnGetMaxLenString( settings, colIdx )
	{
		var s, max=-1, maxIdx = -1;
	
		for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
			s = _fnGetCellData( settings, i, colIdx, 'display' )+'';
			s = s.replace( __re_html_remove, '' );
	
			if ( s.length > max ) {
				max = s.length;
				maxIdx = i;
			}
		}
	
		return maxIdx;
	}
319708
function() {
    // Make sure the true largest value is used for max
    return this.options.line ? { start_value: 0, max: Helpers.max([Helpers.max(this.options.line), Helpers.max(this.flat_data)]) } : { start_value: 0 };
  }
724031
function fixParamsWithParenthesis(fixer) {
                const paramToken = sourceCode.getTokenAfter(firstTokenOfParam);

                /*
                 * ES8 allows Trailing commas in function parameter lists and calls
                 * https://github.com/eslint/eslint/issues/8834
                 */
                const closingParenToken = sourceCode.getTokenAfter(paramToken, astUtils.isClosingParenToken);
                const asyncToken = isAsync ? sourceCode.getTokenBefore(firstTokenOfParam) : null;
                const shouldAddSpaceForAsync = asyncToken && (asyncToken.range[1] === firstTokenOfParam.range[0]);

                return fixer.replaceTextRange([
                    firstTokenOfParam.range[0],
                    closingParenToken.range[1]
                ], `${shouldAddSpaceForAsync ? " " : ""}${paramToken.value}`);
            }
444247
function(bson, ns, cursorId, opts) {
  opts = opts || {};
  this.numberToReturn = opts.numberToReturn || 0;
  this.requestId = _requestId++;
  this.bson = bson;
  this.ns = ns;
  this.cursorId = cursorId;
}
662908
function(target, dist) { // eslint-disable-line complexity
        var compareObject = function(targetObj, distObj) {
            var result = false;

            snippet.forEach(targetObj, function(item, key) {
                result = (item === distObj[key]);

                return result;
            });

            return result;
        };
        var result = true;
        var isDiff;

        if (typeof target !== typeof dist) {
            result = false;
        } else if (_.isArray(target) && target.length !== dist.length) {
            result = false;
        } else if (_.isObject(target)) {
            isDiff = !compareObject(target, dist) || !compareObject(dist, target);

            result = !isDiff;
        } else if (target !== dist) {
            result = false;
        }

        return result;
    }
454306
function(min, max) {
    return function limitHfov(params) {
      var width = params.width;
      var height = params.height;
      if (width > 0 && height > 0) {
        var vmin = convertFov.htov(min, width, height);
        var vmax = convertFov.htov(max, width, height);
        params.fov = clamp(params.fov, vmin, vmax);
      }
      return params;
    };
  }
589305
function(e) {
    const doclets = e.doclets;
    for (let i = 0, ii = doclets.length; i < ii; ++i) {
      const doclet = doclets[i];
      if (doclet.params) {
        const params = doclet.params;
        for (let j = 0, jj = params.length; j < jj; ++j) {
          const param = params[j];
          if (param.type && param.type.names) {
            const type = param.type.names[0];
            if (type in properties) {
              param.type.names[0] = type;
              params.push.apply(params, properties[type].map(p => {
                const property = Object.assign({}, p);
                property.name = `${param.name}.${property.name}`;
                return property;
              }));
            }
          }
        }
      }
    }
  }
297159
function(values) {
    var max = Number.MIN_VALUE,
        min = Number.MAX_VALUE,
        val,
        cc,
        attrs = {};

    if (!(this.scale instanceof jvm.OrdinalScale) && !(this.scale instanceof jvm.SimpleScale)) {
      if (!this.params.min || !this.params.max) {
        for (cc in values) {
          val = parseFloat(values[cc]);
          if (val > max) max = values[cc];
          if (val < min) min = val;
        }
        if (!this.params.min) {
          this.scale.setMin(min);
        }
        if (!this.params.max) {
          this.scale.setMax(max);
        }
        this.params.min = min;
        this.params.max = max;
      }
      for (cc in values) {
        val = parseFloat(values[cc]);
        if (!isNaN(val)) {
          attrs[cc] = this.scale.getValue(val);
        } else {
          attrs[cc] = this.elements[cc].element.style.initial[this.params.attribute];
        }
      }
    } else {
      for (cc in values) {
        if (values[cc]) {
          attrs[cc] = this.scale.getValue(values[cc]);
        } else {
          attrs[cc] = this.elements[cc].element.style.initial[this.params.attribute];
        }
      }
    }

    this.setAttributes(attrs);
    jvm.$.extend(this.values, values);
  }
278993
function configureESLint(options) {
	const ESLintConfig = {
		rules: options.rules
	}

	ESLintConfig.extends = 'xo'
	if (options.esnext) {
		ESLintConfig.extends = 'xo/esnext'
	}

	if (!options.semicolon) {
		ESLintConfig.rules.semi = [2, 'never']
	}

	if (options.space === false) {
		ESLintConfig.rules.indent = [
			2, 'tab', {
				SwitchCase: 1
			}
		]
	} else {
		ESLintConfig.rules.indent = [
			2, parseInt(options.space, 10), {
				SwitchCase: 0
			}
		]
	}

	ESLintConfig.rules['valid-jsdoc'] = [0]
	ESLintConfig.rules['require-jsdoc'] = [0]

	console.debug(stripIndent`
		${clr.title}ESlint Options${clr.title.out}:
	`)
	if (console.canWrite(5)) {
		console.pretty(ESLintConfig, 2)
	}

	return () => new ESLint({
		baseConfig: ESLintConfig,
		fix: true,
		rules: options.rules
	})
}