"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const tslib_es6 = require("../../../../../../../tslib@2.6.2/node_modules/tslib/tslib.es6.js");
const heyListen_es = require("../../../../../../../hey-listen@1.0.8/node_modules/hey-listen/dist/hey-listen.es.js");
const cubicBezier = require("../../../../../../../popmotion@11.0.3/node_modules/popmotion/dist/es/easing/cubic-bezier.js");
const index = require("../../../../../../../popmotion@11.0.3/node_modules/popmotion/dist/es/easing/index.js");
var easingLookup = {
  linear: index.linear,
  easeIn: index.easeIn,
  easeInOut: index.easeInOut,
  easeOut: index.easeOut,
  circIn: index.circIn,
  circInOut: index.circInOut,
  circOut: index.circOut,
  backIn: index.backIn,
  backInOut: index.backInOut,
  backOut: index.backOut,
  anticipate: index.anticipate,
  bounceIn: index.bounceIn,
  bounceInOut: index.bounceInOut,
  bounceOut: index.bounceOut
};
var easingDefinitionToFunction = function(definition) {
  if (Array.isArray(definition)) {
    heyListen_es.invariant(definition.length === 4, "Cubic bezier arrays must contain four numerical values.");
    var _a = tslib_es6.__read(definition, 4), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3];
    return cubicBezier.cubicBezier(x1, y1, x2, y2);
  } else if (typeof definition === "string") {
    heyListen_es.invariant(easingLookup[definition] !== void 0, "Invalid easing type '".concat(definition, "'"));
    return easingLookup[definition];
  }
  return definition;
};
var isEasingArray = function(ease) {
  return Array.isArray(ease) && typeof ease[0] !== "number";
};
exports.easingDefinitionToFunction = easingDefinitionToFunction;
exports.isEasingArray = isEasingArray;
//# sourceMappingURL=easing.js.map
