"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isPerformanceAPIAvailable = isPerformanceAPIAvailable;
exports.isPerformanceObserverAvailable = isPerformanceObserverAvailable;
exports.isPerformanceObserverLongTaskAvailable = isPerformanceObserverLongTaskAvailable;
var hasRequiredPerformanceAPIs;
function isPerformanceAPIAvailable() {
  if (hasRequiredPerformanceAPIs === undefined) {
    hasRequiredPerformanceAPIs = typeof window !== 'undefined' && 'performance' in window && ['measure', 'clearMeasures', 'clearMarks', 'getEntriesByName', 'getEntriesByType', 'now'].every(function (api) {
      return !!performance[api];
    });
  }
  return hasRequiredPerformanceAPIs;
}
function isPerformanceObserverAvailable() {
  return !!(typeof window !== 'undefined' && 'PerformanceObserver' in window);
}
function isPerformanceObserverLongTaskAvailable() {
  return isPerformanceObserverAvailable() && PerformanceObserver.supportedEntryTypes && PerformanceObserver.supportedEntryTypes.includes('longtask');
}