define('ember-overlays/raf', ['exports'], function (exports) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  exports.default = function () {
    var timer = void 0,
        frame = void 0;
    var promise = new Promise(function (resolve) {
      if (typeof requestAnimationFrame === 'undefined') {
        timer = setTimeout(resolve, 33); // 33ms is 30hz
      } else {
        frame = requestAnimationFrame(resolve);
      }
    });
    promise.__ec_cancel__ = function () {
      if (timer != null) {
        clearTimeout(timer);
      } else {
        cancelAnimationFrame(frame);
      }
    };
    return promise;
  };

  // native promise gives us real request-animation-frame
  // timing. Ember's RSVP uses setTimeout. :-(
  var Promise = window.Promise || Ember.RSVP.Promise; // Cancelable promise-driven requestAnimationFrame with fallbacks.
});