text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getValidSortTypes = exports.itemSortTypes = exports.getChapterSlugErrorMessage = exports.validateChapterSlug = exports.getSlugErrorMessage = exports.validateSlug = void 0;
  function validateSlug(slug) {
      if (!slug)
          return false;
      return /^[0-9a-z\-_]{12,50}$/.test(slug);
  }
  exports.validateSlug = validateSlug;
  function getSlugErrorMessage(slug) {
      return "slug\u306E\u5024\uFF08" + slug + "\uFF09\u304C\u4E0D\u6B63\u3067\u3059\u3002\u5C0F\u6587\u5B57\u306E\u534A\u89D2\u82F1\u6570\u5B57\uFF08a-z0-9\uFF09\u3001\u30CF\u30A4\u30D5\u30F3\uFF08-\uFF09\u3001\u30A2\u30F3\u30C0\u30FC\u30B9\u30B3\u30A2\uFF08_\uFF09\u306E12\u301C50\u5B57\u306E\u7D44\u307F\u5408\u308F\u305B\u306B\u3057\u3066\u304F\u3060\u3055\u3044";
  }
  exports.getSlugErrorMessage = getSlugErrorMessage;
  function validateChapterSlug(slug) {
      if (!slug)
          return false;
      // n.slug.mdも許容
      return (/^[0-9a-z\-_]{1,50}$/.test(slug) || /^[0-9]+.[0-9a-z\-_]{1,50}$/.test(slug));
  }
  exports.validateChapterSlug = validateChapterSlug;
  function getChapterSlugErrorMessage(slug) {
      return "\u30C1\u30E3\u30D7\u30BF\u30FC\u306Eslug\u306E\u5024\uFF08" + slug + "\uFF09\u304C\u4E0D\u6B63\u3067\u3059\u3002\u5C0F\u6587\u5B57\u306E\u534A\u89D2\u82F1\u6570\u5B57\uFF08a-z0-9\uFF09\u3001\u30CF\u30A4\u30D5\u30F3\uFF08-\uFF09\u3001\u30A2\u30F3\u30C0\u30FC\u30B9\u30B3\u30A2\uFF08_\uFF09\u306E1\u301C50\u5B57\u306E\u7D44\u307F\u5408\u308F\u305B\u306B\u3057\u3066\u304F\u3060\u3055\u3044";
  }
  exports.getChapterSlugErrorMessage = getChapterSlugErrorMessage;
  exports.itemSortTypes = ['modified', 'system'];
  function getValidSortTypes(value) {
      var isValid = exports.itemSortTypes.some(function (t) { return t === value; });
      if (isValid)
          return value;
      var defaultType = exports.itemSortTypes[0];
      return defaultType;
  }
  exports.getValidSortTypes = getValidSortTypes;
  