"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const Slate = require("slate");
const closest = (editor, options) => {
  const entries = Slate.Editor.levels(editor, {
    at: options.at,
    match: (node) => {
      return !Slate.Text.isText(node) && options.match(node);
    },
    reverse: true
  });
  for (const entry of entries) {
    return entry;
  }
  return void 0;
};
exports.closest = closest;
//# sourceMappingURL=closest.cjs.map
