'use strict';

var constants = require('./chunk-2HrSPdAV.cjs.js');
var i18n = require('i18next');
var yup = require('yup');

function _interopNamespace(e) {
  if (e && e.__esModule) return e;
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () { return e[k]; }
        });
      }
    });
  }
  n.default = e;
  return Object.freeze(n);
}

var yup__namespace = /*#__PURE__*/_interopNamespace(yup);

var DEFAULT_EDITOR_OPTIONS = [constants.EDITOR_OPTIONS.BOLD, constants.EDITOR_OPTIONS.ITALIC, constants.EDITOR_OPTIONS.UNDERLINE, constants.EDITOR_OPTIONS.STRIKETHROUGH, constants.EDITOR_OPTIONS.LINK, constants.EDITOR_OPTIONS.PARAGRAPH, constants.EDITOR_OPTIONS.H1, constants.EDITOR_OPTIONS.H2, constants.EDITOR_OPTIONS.H3, constants.EDITOR_OPTIONS.H4, constants.EDITOR_OPTIONS.H5, constants.EDITOR_OPTIONS.H6, constants.EDITOR_OPTIONS.LIST_BULLETS, constants.EDITOR_OPTIONS.LIST_ORDERED, constants.EDITOR_OPTIONS.CODE];
var EDITOR_PADDING_SIZE = 12;
var EDITOR_BORDER_SIZE = 1;
var EDITOR_LINE_HEIGHT = 21;
var IMAGE_REGEX = new RegExp(/(<img[^>]*?>)(?![\s\S]*<\/figure>)/g);
var IMAGE_REPLACEMENT_PATTERN = "<figure>$1</figure>";
var EMPTY_DIV_REGEX = new RegExp(/<div[^>]*?>\s*(?:<br[^>]*?>)\s*<\/div>/g);
var TRAILING_BR_REGEX = new RegExp(/\s*(?:<br[^>]*?>)+\s*$/);
var LINK_VALIDATION_SCHEMA = yup__namespace.object().shape({
  textContent: yup__namespace.string().required(i18n.t("neetoEditor.error.textRequired")),
  urlString: yup__namespace.string().matches(constants.ALL_PROTOCOL_URL_REGEXP, i18n.t("neetoEditor.error.invalidUrl")).required(i18n.t("neetoEditor.error.urlRequired"))
});

exports.DEFAULT_EDITOR_OPTIONS = DEFAULT_EDITOR_OPTIONS;
exports.EDITOR_BORDER_SIZE = EDITOR_BORDER_SIZE;
exports.EDITOR_LINE_HEIGHT = EDITOR_LINE_HEIGHT;
exports.EDITOR_PADDING_SIZE = EDITOR_PADDING_SIZE;
exports.EMPTY_DIV_REGEX = EMPTY_DIV_REGEX;
exports.IMAGE_REGEX = IMAGE_REGEX;
exports.IMAGE_REPLACEMENT_PATTERN = IMAGE_REPLACEMENT_PATTERN;
exports.LINK_VALIDATION_SCHEMA = LINK_VALIDATION_SCHEMA;
exports.TRAILING_BR_REGEX = TRAILING_BR_REGEX;
//# sourceMappingURL=chunk-BGy3NmZC.cjs.js.map
