"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isValidUuid = void 0;
var BASIC_UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/i;

// Modified copy of `uuid-validate` package
var isValidUuid = exports.isValidUuid = function isValidUuid(value) {
  if (typeof value !== 'string') {
    return false;
  }
  var normalizedValue = value.toLowerCase();
  if (!BASIC_UUID_REGEX.test(normalizedValue)) {
    return false;
  }
  var version = normalizedValue[14];
  if (version === '1' || version === '2') {
    return true;
  }
  if (version === '3' || version === '4' || version === '5') {
    var variant = normalizedValue[19];
    return variant === '8' || variant === '9' || variant === 'a' || variant === 'b';
  }
  return false;
};