import { n as e } from "./button-BsvHGWPc.js";
import { r as t } from "./grid-dI94AAbi.js";
import { i as n, n as r, r as i } from "./modal-DLRYn-Lr.js";
import { n as a } from "./input-CCdBtl-C.js";
import { t as o } from "./check-box-sfGjYczQ.js";
import { n as s } from "./radio-group-BAeJjyZ5.js";
import { a as c, i as l, n as u, r as d, t as f } from "./types-D9Wj9wrg.js";
import { useCallback as p, useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
import { cn as v } from "@ryuzaki13/react-foundation-lib/utils";
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
import { AlignCenter as S, AlignJustify as C, AlignLeft as w, AlignRight as T, AtSign as E, BookType as D, BrushCleaning as O, Clock as k, ExternalLink as A, Languages as ee, Link as te, MessageSquareQuote as ne, Phone as re, PictureInPicture as ie, Redo as ae, Shredder as oe, Undo as se } from "lucide-react";
import { formatPhone as ce } from "@ryuzaki13/react-foundation-lib/formatters";
import { isSafe as j, validateUrl as le } from "@ryuzaki13/react-foundation-lib/validators";
import { $generateHtmlFromNodes as ue, $generateNodesFromDOM as de } from "@lexical/html";
import { $isListItemNode as fe, $isListNode as M, INSERT_ORDERED_LIST_COMMAND as pe, INSERT_UNORDERED_LIST_COMMAND as me, ListItemNode as he, ListNode as ge, REMOVE_LIST_COMMAND as N } from "@lexical/list";
import { LexicalComposer as _e } from "@lexical/react/LexicalComposer";
import { ContentEditable as ve } from "@lexical/react/LexicalContentEditable";
import { LexicalErrorBoundary as ye } from "@lexical/react/LexicalErrorBoundary";
import { HistoryPlugin as be } from "@lexical/react/LexicalHistoryPlugin";
import { ListPlugin as xe } from "@lexical/react/LexicalListPlugin";
import { OnChangePlugin as Se } from "@lexical/react/LexicalOnChangePlugin";
import { RichTextPlugin as Ce } from "@lexical/react/LexicalRichTextPlugin";
import { $createHeadingNode as we, $createQuoteNode as Te, $isHeadingNode as Ee, $isQuoteNode as De, HeadingNode as Oe, QuoteNode as ke } from "@lexical/rich-text";
import { useLexicalComposerContext as P } from "@lexical/react/LexicalComposerContext";
import { $applyNodeReplacement as F, $createParagraphNode as I, $createTextNode as L, $getRoot as Ae, $getSelection as R, $isRangeSelection as z, ElementNode as je, FORMAT_ELEMENT_COMMAND as Me, FORMAT_TEXT_COMMAND as Ne, REDO_COMMAND as Pe, UNDO_COMMAND as Fe } from "lexical";
import { $isLinkNode as B, LinkNode as Ie } from "@lexical/link";
import { $setBlocksType as V } from "@lexical/selection";
import { $findMatchingParent as Le } from "@lexical/utils";
var H = {
	toolbar: "shIOqq",
	groupControls: "YM-4Dq"
};
//#endregion
//#region src/text-editor/toolbar/ToolbarControl.tsx
function U({ isActive: t, disabled: n, style: r, title: i, icon: a, onClick: o }) {
	return /* @__PURE__ */ b(e, {
		title: i,
		disabled: n,
		appearance: "outline",
		tone: t ? "info" : void 0,
		onMouseDown: (e) => {
			e.preventDefault(), o?.(r || "");
		},
		icon: a
	});
}
//#endregion
//#region src/text-editor/toolbar/AlignmentControls.tsx
function Re({ onAlignmentChange: e, activeAlignment: t }) {
	return /* @__PURE__ */ x("div", {
		className: H.groupControls,
		children: [
			/* @__PURE__ */ b(U, {
				title: "По левому краю",
				icon: /* @__PURE__ */ b(w, {}),
				isActive: t === "left",
				onClick: () => e("left")
			}),
			/* @__PURE__ */ b(U, {
				title: "По центру",
				icon: /* @__PURE__ */ b(S, {}),
				isActive: t === "center",
				onClick: () => e("center")
			}),
			/* @__PURE__ */ b(U, {
				title: "По правому краю",
				icon: /* @__PURE__ */ b(T, {}),
				isActive: t === "right",
				onClick: () => e("right")
			}),
			/* @__PURE__ */ b(U, {
				title: "По ширине",
				icon: /* @__PURE__ */ b(C, {}),
				isActive: t === "justify",
				onClick: () => e("justify")
			})
		]
	});
}
//#endregion
//#region src/text-editor/toolbar/HistoryControls.tsx
function ze({ onUndo: e, onRedo: t }) {
	return /* @__PURE__ */ x("div", {
		className: H.groupControls,
		children: [/* @__PURE__ */ b(U, {
			title: "Отменить последнее действие",
			icon: /* @__PURE__ */ b(se, {}),
			onClick: e
		}), /* @__PURE__ */ b(U, {
			title: "Повторить предыдущее действие",
			icon: /* @__PURE__ */ b(ae, {}),
			onClick: t
		})]
	});
}
//#endregion
//#region src/text-editor/toolbar/LinkButtons.tsx
function Be({ disabled: e, onClick: t }) {
	return /* @__PURE__ */ x("div", {
		className: H.groupControls,
		children: [
			/* @__PURE__ */ b(U, {
				title: "Добавить ссылку на статью",
				icon: /* @__PURE__ */ b(te, {}),
				onClick: () => t(f.LOCAL_LINK)
			}),
			/* @__PURE__ */ b(U, {
				title: "Добавить ссылку",
				disabled: e,
				icon: /* @__PURE__ */ b(A, {}),
				onClick: () => t(f.LINK)
			}),
			/* @__PURE__ */ b(U, {
				title: "Добавить телефон",
				disabled: e,
				icon: /* @__PURE__ */ b(re, {}),
				onClick: () => t(f.PHONE)
			}),
			/* @__PURE__ */ b(U, {
				title: "Добавить email",
				disabled: e,
				icon: /* @__PURE__ */ b(E, {}),
				onClick: () => t(f.EMAIL)
			})
		]
	});
}
//#endregion
//#region src/text-editor/toolbar/TagButtons.tsx
function Ve({ onClick: e }) {
	return /* @__PURE__ */ x("div", {
		className: H.groupControls,
		children: [
			/* @__PURE__ */ b(U, {
				title: "Вставить Аббревиатуру",
				icon: /* @__PURE__ */ b(D, {}),
				onClick: () => e(u.abbr)
			}),
			/* @__PURE__ */ b(U, {
				title: "Вставить Код языка",
				icon: /* @__PURE__ */ b(ee, {}),
				onClick: () => e(u.lang)
			}),
			/* @__PURE__ */ b(U, {
				title: "Вставить Дату/время",
				icon: /* @__PURE__ */ b(k, {}),
				onClick: () => e(u.time)
			}),
			/* @__PURE__ */ b(U, {
				title: "Вставить Ссылку на источник",
				icon: /* @__PURE__ */ b(ne, {}),
				onClick: () => e(u.cite)
			}),
			/* @__PURE__ */ b(U, {
				title: "Вставить Удалённый фрагмент",
				icon: /* @__PURE__ */ b(oe, {}),
				onClick: () => e(u.del)
			}),
			/* @__PURE__ */ b(U, {
				title: "Вставить Добавленный фрагмент",
				icon: /* @__PURE__ */ b(ie, {}),
				onClick: () => e(u.ins)
			})
		]
	});
}
//#endregion
//#region src/text-editor/toolbar/TextEditorToolbarLexical.tsx
function He({ toolbarComponents: e, state: t, onBlockStyleToggle: n, onInlineStyleToggle: r, onAlignmentChange: i, onLinkClick: a, onTagClick: o, onUndo: s, onRedo: c, onCleanTag: u }) {
	let f = {
		history: !0,
		...e || {}
	};
	return /* @__PURE__ */ x("div", {
		className: H.toolbar,
		children: [
			f.blocks && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("div", {
				className: H.groupControls,
				children: d.map((e) => /* @__PURE__ */ b(U, {
					isActive: e.style === t.blockType,
					style: e.style,
					title: e.label,
					icon: e.icon,
					onClick: n
				}, e.style))
			}), /* @__PURE__ */ b("hr", {})] }),
			f.inline && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("div", {
				className: H.groupControls,
				children: l.map((e) => /* @__PURE__ */ b(U, {
					isActive: !!t.activeInlineStyles[e.style],
					title: e.label,
					style: e.style,
					icon: e.icon,
					disabled: t.isTextUnselected,
					onClick: r
				}, e.style))
			}), /* @__PURE__ */ b("hr", {})] }),
			f.alignment && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(Re, {
				activeAlignment: t.activeAlignment,
				onAlignmentChange: i
			}), /* @__PURE__ */ b("hr", {})] }),
			f.links && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(Be, {
				disabled: t.isTextUnselected,
				onClick: a
			}), /* @__PURE__ */ b("hr", {})] }),
			f.tags && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(Ve, { onClick: o }), /* @__PURE__ */ b("hr", {})] }),
			f.history && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(ze, {
				onUndo: s,
				onRedo: c
			}), /* @__PURE__ */ b("hr", {})] }),
			/* @__PURE__ */ b(U, {
				disabled: t.isTextUnselected,
				title: "Очистить выбранный тег",
				icon: /* @__PURE__ */ b(O, {}),
				onClick: u
			})
		]
	});
}
//#endregion
//#region src/text-editor/lexical/plugins/InitialHtmlPlugin.tsx
function Ue({ initialHTML: e, shouldSkip: t }) {
	let [n] = P(), r = g(!1);
	return m(() => {
		t || !e || r.current || typeof window > "u" || (r.current = !0, n.update(() => {
			let t = Ae(), r = new DOMParser().parseFromString(e, "text/html"), i = de(n, r);
			if (t.clear(), i.length === 0) {
				t.append(I());
				return;
			}
			t.append(...i);
		}));
	}, [
		n,
		e,
		t
	]), null;
}
//#endregion
//#region src/text-editor/model/textEditorTypes.ts
var W = {
	blockType: "unstyled",
	isTextUnselected: !0,
	activeInlineStyles: {
		BOLD: !1,
		ITALIC: !1,
		UNDERLINE: !1,
		STRIKETHROUGH: !1,
		HIGHLIGHT: !1,
		CODE: !1
	},
	activeAlignment: null
}, We = (e) => {
	switch (e) {
		case "h3": return "header-three";
		case "h4": return "header-four";
		case "h5": return "header-five";
		case "h6": return "header-six";
		default: return "unstyled";
	}
}, Ge = (e) => {
	switch (e) {
		case "header-three": return "h3";
		case "header-four": return "h4";
		case "header-five": return "h5";
		case "header-six": return "h6";
		default: return null;
	}
}, Ke = (e) => {
	switch (e) {
		case "BOLD": return "bold";
		case "ITALIC": return "italic";
		case "UNDERLINE": return "underline";
		case "STRIKETHROUGH": return "strikethrough";
		case "HIGHLIGHT": return "highlight";
		case "CODE": return "code";
		default: return null;
	}
}, qe = () => {
	let e = R();
	if (!z(e)) return "unstyled";
	let t = e.anchor.getNode().getTopLevelElementOrThrow();
	if (fe(t)) {
		let e = t.getParent();
		if (M(e)) return e.getListType() === "bullet" ? "unordered-list-item" : "ordered-list-item";
	}
	return M(t) ? t.getListType() === "bullet" ? "unordered-list-item" : "ordered-list-item" : Ee(t) ? We(t.getTag()) : De(t) ? "blockquote" : t.getType() === "paragraph" ? "unstyled" : t.getType();
}, Je = () => {
	let e = R();
	if (!z(e)) return null;
	let t = e.anchor.getNode().getTopLevelElementOrThrow().getFormatType();
	switch (t) {
		case "left":
		case "center":
		case "right":
		case "justify": return t;
		default: return null;
	}
}, Ye = () => {
	let e = R();
	return z(e) ? {
		blockType: qe(),
		isTextUnselected: e.isCollapsed(),
		activeInlineStyles: {
			BOLD: e.hasFormat("bold"),
			ITALIC: e.hasFormat("italic"),
			UNDERLINE: e.hasFormat("underline"),
			STRIKETHROUGH: e.hasFormat("strikethrough"),
			HIGHLIGHT: e.hasFormat("highlight"),
			CODE: e.hasFormat("code")
		},
		activeAlignment: Je()
	} : W;
};
//#endregion
//#region src/text-editor/lexical/plugins/SelectionStatePlugin.tsx
function Xe({ onEditorReady: e, onStateChange: t }) {
	let [n] = P();
	return m(() => (e(n), n.registerUpdateListener(({ editorState: e }) => {
		e.read(() => {
			t(Ye());
		});
	})), [
		n,
		e,
		t
	]), null;
}
//#endregion
//#region src/text-editor/lib/serialization/createLexicalRaw.ts
var Ze = (e) => ({
	format: "lexical",
	version: 1,
	editorState: e.toJSON()
}), G = (e) => {
	let t = 0, n = e;
	for (; n;) t += 1, n = n.getParent();
	return t;
}, Qe = (e) => {
	if (!(e instanceof HTMLAnchorElement)) return { node: null };
	let t = e.textContent;
	return (t === null || t === "") && e.children.length === 0 ? { node: null } : { node: q(e.getAttribute("href") || "", {
		rel: e.getAttribute("rel"),
		target: e.getAttribute("target"),
		title: e.getAttribute("title"),
		ariaLabel: e.getAttribute("aria-label"),
		qrCode: e.getAttribute("data-qr-code") === "true",
		add: null,
		text: t
	}) };
}, K = class e extends Ie {
	__ariaLabel;
	__qrCode;
	__add;
	__text;
	static getType() {
		return "accessible-link";
	}
	static clone(t) {
		return new e(t.__url, {
			rel: t.__rel,
			target: t.__target,
			title: t.__title,
			ariaLabel: t.__ariaLabel,
			qrCode: t.__qrCode,
			add: t.__add,
			text: t.__text
		}, t.__key);
	}
	constructor(e = "", t = {}, n) {
		super(e, t, n);
		let { ariaLabel: r = null, qrCode: i = !1, add: a = null, text: o = null } = t;
		this.__ariaLabel = r, this.__qrCode = i, this.__add = a, this.__text = o;
	}
	static importDOM() {
		return { a: () => ({
			conversion: Qe,
			priority: 2
		}) };
	}
	static importJSON(e) {
		return q().updateFromJSON(e);
	}
	updateFromJSON(e) {
		return super.updateFromJSON(e).setAriaLabel(e.ariaLabel || null).setQrCode(!!e.qrCode).setAdd(e.add || null).setText(e.text || null);
	}
	exportJSON() {
		return {
			...super.exportJSON(),
			type: "accessible-link",
			version: 1,
			ariaLabel: this.getAriaLabel(),
			qrCode: this.getQrCode(),
			add: this.getAdd(),
			text: this.getText()
		};
	}
	createDOM(e) {
		let t = super.createDOM(e);
		return this.applyAccessibleAttributes(null, t), t;
	}
	updateDOM(e, t, n) {
		let r = super.updateDOM(e, t, n);
		return this.applyAccessibleAttributes(e, t), r;
	}
	applyAccessibleAttributes(e, t) {
		t instanceof HTMLAnchorElement && ((!e || e.__ariaLabel !== this.__ariaLabel) && (this.__ariaLabel ? t.setAttribute("aria-label", this.__ariaLabel) : t.removeAttribute("aria-label")), (!e || e.__qrCode !== this.__qrCode) && t.setAttribute("data-qr-code", this.__qrCode ? "true" : "false"));
	}
	insertNewAfter(e, t = !0) {
		let n = q(this.__url, {
			rel: this.__rel,
			target: this.__target,
			title: this.__title,
			ariaLabel: this.__ariaLabel,
			qrCode: this.__qrCode,
			add: this.__add,
			text: this.__text
		});
		return this.insertAfter(n, t), n;
	}
	getAriaLabel() {
		return this.getLatest().__ariaLabel;
	}
	setAriaLabel(e) {
		let t = this.getWritable();
		return t.__ariaLabel = e, this;
	}
	getQrCode() {
		return this.getLatest().__qrCode;
	}
	setQrCode(e) {
		let t = this.getWritable();
		return t.__qrCode = e, this;
	}
	getAdd() {
		return this.getLatest().__add;
	}
	setAdd(e) {
		let t = this.getWritable();
		return t.__add = e, this;
	}
	getText() {
		return this.getLatest().__text;
	}
	setText(e) {
		let t = this.getWritable();
		return t.__text = e, this;
	}
}, q = (e = "", t) => F(new K(e, t)), J = (e) => e instanceof K, Y = (e) => {
	let t = {};
	return Array.from(e.attributes).forEach((e) => {
		e.name !== "class" && (t[e.name] = e.value);
	}), t;
}, X = (e) => {
	if (!(e instanceof HTMLElement)) return { node: null };
	let t = e.tagName.toLowerCase();
	if (![
		"abbr",
		"span",
		"time",
		"cite",
		"del",
		"ins"
	].includes(t)) return { node: null };
	let n = e.textContent;
	return (n === null || n === "") && e.children.length === 0 ? { node: null } : { node: Q(t, Y(e), n) };
}, Z = class e extends je {
	__tag;
	__attributes;
	__text;
	static getType() {
		return "semantic-tag";
	}
	static clone(t) {
		return new e(t.__tag, t.__attributes, t.__text, t.__key);
	}
	constructor(e = "span", t = {}, n = null, r) {
		super(r), this.__tag = e, this.__attributes = t, this.__text = n;
	}
	static importDOM() {
		return {
			abbr: () => ({
				conversion: X,
				priority: 2
			}),
			span: () => ({
				conversion: X,
				priority: 2
			}),
			time: () => ({
				conversion: X,
				priority: 2
			}),
			cite: () => ({
				conversion: X,
				priority: 2
			}),
			del: () => ({
				conversion: X,
				priority: 2
			}),
			ins: () => ({
				conversion: X,
				priority: 2
			})
		};
	}
	static importJSON(e) {
		return Q(e.tag, e.attributes, e.text).updateFromJSON(e);
	}
	updateFromJSON(e) {
		return super.updateFromJSON(e).setTag(e.tag).setAttributes(e.attributes || {}).setText(e.text || null);
	}
	exportJSON() {
		return {
			...super.exportJSON(),
			type: "semantic-tag",
			version: 1,
			tag: this.getTag(),
			attributes: this.getAttributes(),
			text: this.getText()
		};
	}
	createDOM(e) {
		let t = document.createElement(this.__tag);
		return this.applyEditorAttributes(t), t;
	}
	updateDOM(e, t) {
		return e.__tag !== this.__tag || (this.applyEditorAttributes(t), !1);
	}
	exportDOM() {
		let e = document.createElement(this.__tag);
		return Object.entries(this.__attributes).forEach(([t, n]) => {
			e.setAttribute(t, n);
		}), { element: e };
	}
	applyEditorAttributes(e) {
		e.classList.add("custom-tag-highlight"), Array.from(e.attributes).forEach((t) => {
			t.name !== "class" && e.removeAttribute(t.name);
		}), Object.entries(this.__attributes).forEach(([t, n]) => {
			e.setAttribute(t, n);
		});
	}
	insertNewAfter(e, t = !0) {
		let n = Q(this.__tag, this.__attributes, this.__text);
		return this.insertAfter(n, t), n;
	}
	canInsertTextBefore() {
		return !1;
	}
	canInsertTextAfter() {
		return !1;
	}
	canBeEmpty() {
		return !1;
	}
	isInline() {
		return !0;
	}
	getTag() {
		return this.getLatest().__tag;
	}
	setTag(e) {
		let t = this.getWritable();
		return t.__tag = e, this;
	}
	getAttributes() {
		return this.getLatest().__attributes;
	}
	setAttributes(e) {
		let t = this.getWritable();
		return t.__attributes = e, this;
	}
	getText() {
		return this.getLatest().__text;
	}
	setText(e) {
		let t = this.getWritable();
		return t.__text = e, this;
	}
}, Q = (e, t = {}, n = null) => F(new Z(e, t, n)), $e = (e) => e instanceof Z;
//#endregion
//#region src/text-editor/model/hooks/useTextEditorLexicalActions.ts
function et({ editor: e, toolbarState: t, hasLocalLinkDialog: n, onOpenLinkDialog: r, onOpenTagDialog: i }) {
	let a = p((n) => {
		if (e) {
			if (n === "unordered-list-item") {
				if (t.blockType === "unordered-list-item") {
					e.dispatchCommand(N, void 0);
					return;
				}
				e.dispatchCommand(me, void 0);
				return;
			}
			if (n === "ordered-list-item") {
				if (t.blockType === "ordered-list-item") {
					e.dispatchCommand(N, void 0);
					return;
				}
				e.dispatchCommand(pe, void 0);
				return;
			}
			e.update(() => {
				let e = R();
				if (!z(e)) return;
				if (n === "unstyled" || n === "paragraph") {
					V(e, () => I());
					return;
				}
				if (n === "blockquote") {
					V(e, () => Te());
					return;
				}
				let t = Ge(n);
				t && V(e, () => we(t));
			});
		}
	}, [e, t.blockType]), o = p((t) => {
		if (!e) return;
		let n = Ke(t);
		n && e.dispatchCommand(Ne, n);
	}, [e]), s = p((t) => {
		e && e.dispatchCommand(Me, t);
	}, [e]), c = p(() => {
		e && e.dispatchCommand(Fe, void 0);
	}, [e]), l = p(() => {
		e && e.dispatchCommand(Pe, void 0);
	}, [e]), u = p(() => {
		if (!e) return "";
		let t = "";
		return e.getEditorState().read(() => {
			let e = R();
			z(e) && (t = e.getTextContent());
		}), t;
	}, [e]), d = p((t) => {
		e && (e.update(() => {
			let e = R();
			if (!z(e)) return;
			let n = e.getTextContent(), r = t.text.length > 0 ? t.text : n;
			if (!r.trim()) return;
			let i = q(t.url, {
				target: "_blank",
				rel: "noopener noreferrer",
				ariaLabel: t.ariaLabel || n || r,
				qrCode: t.qrCode,
				add: t.add || null,
				text: r
			}), a = L(r);
			i.append(a), e.insertNodes([i]);
		}), requestAnimationFrame(() => {
			e.focus();
		}));
	}, [e]), m = p((e, t, n, r, i) => {
		d({
			url: e,
			text: t,
			add: n,
			ariaLabel: r,
			qrCode: i
		});
	}, [d]), h = p((e, t) => {
		d({
			url: e,
			text: t,
			add: "",
			ariaLabel: "Внутренняя ссылка на статью: " + t,
			qrCode: !1
		});
	}, [d]), g = p(() => {
		if (!e) return "";
		let t = "";
		return e.getEditorState().read(() => {
			let e = R();
			if (!z(e)) {
				t = "";
				return;
			}
			let n = e.getTextContent(), r = e.anchor.getNode(), i = Le(r, (e) => J(e) || B(e));
			if (J(i)) {
				t = {
					url: i.getURL(),
					ariaLabel: i.getAriaLabel() || "",
					text: i.getText() || n,
					add: i.getAdd() || "",
					qrCode: i.getQrCode()
				};
				return;
			}
			if (B(i)) {
				t = {
					url: i.getURL(),
					ariaLabel: "",
					text: n,
					add: "",
					qrCode: !1
				};
				return;
			}
			t = n;
		}), t;
	}, [e]), _ = p((e) => {
		e === f.LOCAL_LINK && !n || r(e);
	}, [n, r]), v = p((t, n, r) => {
		e && (e.update(() => {
			let e = R();
			if (!z(e)) return;
			let i = e.getTextContent().trim(), a = n || i || r.title || r["aria-label"] || Object.values(r).join(" ") || t;
			if (!a.trim()) return;
			let o = Q(t, r, a);
			o.append(L(a)), e.insertNodes([o]);
		}), requestAnimationFrame(() => {
			e.focus();
		}));
	}, [e]);
	return {
		handleAddLink: m,
		handleAddLocalLink: h,
		handleAlignmentChange: s,
		handleBlockStyleToggle: a,
		handleCleanSemanticTag: p(() => {
			e && e.update(() => {
				let e = R();
				if (!z(e) || e.isCollapsed()) return;
				let t = e.getNodes(), n = /* @__PURE__ */ new Set();
				t.forEach((e) => {
					let t = e;
					for (; t;) $e(t) && n.add(t), t = t.getParent();
				}), Array.from(n).sort((e, t) => G(t) - G(e)).forEach((e) => {
					e.isAttached() && (e.getChildren().forEach((t) => e.insertBefore(t)), e.remove());
				});
			});
		}, [e]),
		handleInlineStyleToggle: o,
		handleLinkClick: _,
		handleRedo: l,
		handleTagClick: p((e) => {
			i(e);
		}, [i]),
		handleUndo: c,
		getCurrentSelectionText: u,
		getSelectedLinkState: g,
		insertSemanticTagAtSelection: v
	};
}
var $ = {
	textEditor: "_75LW3N",
	textEditorContent: "PLiHsN",
	focused: "m-jmCu",
	wrapper: "_4NWAs0"
};
//#endregion
//#region src/text-editor/EmailDialog.tsx
function tt({ onClose: t, onConfirm: o, initialState: s }) {
	let c = j(s) && typeof s == "string" ? {
		text: "",
		add: "",
		ariaLabel: "",
		url: s
	} : s, [l, u] = _(() => j(c) ? c.url ?? "" : ""), [d, f] = _(() => j(c) ? c.ariaLabel ?? "" : ""), [p, m] = _(null), h = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e) ? !0 : (m("Некорректный email адрес"), !1), g = (e) => {
		if (e.preventDefault(), h(l)) {
			if (!d) {
				m("Добавьте описание для email");
				return;
			}
			o(`mailto:${l}`, "", "", d, !1), y();
		}
	}, y = () => {
		u(""), f(""), m(null), t();
	};
	return /* @__PURE__ */ x(r, {
		isOpen: !0,
		onClose: y,
		title: "Ссылка на email",
		size: "md",
		children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ x("div", {
			className: v("flexColumn", "gapMd"),
			children: [
				/* @__PURE__ */ b(a, {
					label: "Email адрес",
					value: l,
					onChange: u,
					placeholder: "some_email@mail.ru"
				}),
				p && /* @__PURE__ */ x("div", {
					className: "textColorDanger",
					children: [
						/* @__PURE__ */ b("strong", { children: "Ошибка ввода:" }),
						" ",
						/* @__PURE__ */ b("span", {
							className: "fontItalic",
							children: p
						})
					]
				}),
				/* @__PURE__ */ b(a, {
					label: "Текст для экранных читалок",
					value: d,
					onChange: f,
					placeholder: "Электронная почта руководителя городской думмы"
				})
			]
		}) }), /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b(e, {
			appearance: "outline",
			tone: "error",
			onClick: y,
			children: "Отмена"
		}), /* @__PURE__ */ b(e, {
			appearance: "outline",
			tone: "success",
			onClick: g,
			disabled: !l || !d,
			children: "Подтвердить"
		})] })]
	});
}
//#endregion
//#region src/text-editor/LinkDialog.tsx
function nt({ onClose: s, onConfirm: c, initialState: l }) {
	let u = j(l) && typeof l == "string" ? {
		text: "",
		add: "",
		ariaLabel: "",
		url: l
	} : l, [d, f] = _(() => j(u) ? u.url ?? "" : ""), [p, m] = _(() => j(u) ? u.ariaLabel ?? "" : ""), [h, g] = _(null), [v, y] = _(!1), S = (e) => {
		f(e), h && g(null);
	}, C = (e) => {
		e.preventDefault();
		let t = le(d);
		if (!t.isValid) {
			g(t.error);
			return;
		}
		if (!p) {
			g("добавьте описание для ссылки");
			return;
		}
		c(d.startsWith("http") ? d : `https://${d}`, "", "", p, v), w();
	}, w = () => {
		f(""), m(""), g(null), s();
	};
	return /* @__PURE__ */ x(r, {
		isOpen: !0,
		onClose: w,
		title: "Ссылка на внешний url",
		size: "md",
		children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ x(t, {
			gap: "md",
			children: [
				/* @__PURE__ */ b(a, {
					label: "Полный URL адрес",
					value: d,
					onChange: S,
					placeholder: "https://somesite.ru"
				}),
				h && /* @__PURE__ */ x("div", {
					className: "textColorDanger",
					children: [
						/* @__PURE__ */ b("strong", { children: "Ошибка ввода:" }),
						" ",
						/* @__PURE__ */ b("span", {
							className: "fontItalic",
							children: h
						})
					]
				}),
				/* @__PURE__ */ b(a, {
					label: "Текст для экранных читалок",
					value: p,
					onChange: m,
					placeholder: "Ссылка на официальный сайт городской думмы"
				}),
				/* @__PURE__ */ b(o, {
					title: "Показать кнопку для генерации QR кода ссылки",
					value: v,
					onChange: y
				})
			]
		}) }), /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b(e, {
			appearance: "outline",
			tone: "error",
			onClick: w,
			children: "Отмена"
		}), /* @__PURE__ */ b(e, {
			appearance: "outline",
			tone: "success",
			onClick: C,
			disabled: !d || !p,
			children: "Подтвердить"
		})] })]
	});
}
//#endregion
//#region src/text-editor/PhoneDialog.tsx
function rt({ onClose: o, onConfirm: s, initialState: c }) {
	let l = j(c) && typeof c == "string" ? {
		text: "",
		add: "",
		ariaLabel: "",
		url: c
	} : c, u = j(l) ? (l.url ?? "").replace(/\D/g, "").slice(0, 11).replace(/^7/, "") : "", d = j(l) ? l.add ? (l.add ?? "").replace(/\D/g, "") : (l.url ?? "").replace(/\D/g, "").slice(11) : "", [f, p] = _(u), [m, h] = _(d), [g, y] = _(() => j(l) ? l.ariaLabel ?? "" : ""), [S, C] = _(null), w = (e) => {
		e = e.replace(/\D/g, ""), e.length <= 10 ? (p(e), C(null)) : C("нельзя ввести более 10 цифр");
	}, T = (e) => e.length === 10 || (C("номер телефона должен содержать 10 цифр"), !1), E = (e) => {
		if (e.preventDefault(), !T(f)) return;
		if (!g) {
			C("добавьте описание для телефона");
			return;
		}
		let t = ce(f);
		s(`tel:${`+7${f}`}`, m ? `${t} доб. ${m}` : t, m, g, !1), D();
	}, D = () => {
		p(""), y(""), C(null), o();
	};
	return /* @__PURE__ */ x(r, {
		isOpen: !0,
		onClose: D,
		title: "Ссылка на телефон",
		size: "md",
		children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ x(t, {
			gap: "md",
			children: [
				/* @__PURE__ */ x("div", {
					className: v("flex", "alignItemsEnd", "gapSm"),
					children: [/* @__PURE__ */ b(a, {
						label: "Номер телефона без 7-ки",
						description: "Вводится только номер (10) цифр без каких-либо дополнительных символов. Ссылка будет привязана к текущему выделенному фрагменту текста. Поэтому текст самой ссылки можно оформить грамотно, например: +7 (3522) 12-34-56 доб. 100",
						value: f,
						onChange: w,
						placeholder: "3522123456",
						className: "flex1"
					}), /* @__PURE__ */ b(a, {
						label: "Добавочный номер",
						value: m,
						onChange: h,
						placeholder: "100"
					})]
				}),
				S && /* @__PURE__ */ x("div", {
					className: "textColorDanger",
					children: [
						/* @__PURE__ */ b("strong", { children: "Ошибка ввода:" }),
						" ",
						/* @__PURE__ */ b("span", {
							className: "fontItalic",
							children: S
						})
					]
				}),
				/* @__PURE__ */ b(a, {
					label: "Текст для экранных читалок",
					description: "Обязательное поле для организации доступности ссылки для лиц с ОВЗ, использующих скринридеры",
					value: g,
					onChange: y,
					placeholder: "Контактный телефон директора"
				})
			]
		}) }), /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b(e, {
			appearance: "solid",
			tone: "error",
			onClick: D,
			children: "Отмена"
		}), /* @__PURE__ */ b(e, {
			appearance: "solid",
			tone: "success",
			onClick: E,
			disabled: !f || !g,
			children: "Подтвердить"
		})] })]
	});
}
//#endregion
//#region src/text-editor/SemanticDialog.tsx
function it({ onClose: o, onConfirm: s, config: c, initialText: l = "", initialState: u = {} }) {
	let [d, f] = _(l), [p, m] = _(() => c.fields.reduce((e, t) => (e[t.name] = u[t.name] ?? "", e), {})), [h, g] = _({}), v = (e, t) => {
		m((n) => ({
			...n,
			[e]: t
		})), g((t) => ({
			...t,
			[e]: null
		}));
	}, y = () => {
		let e = {}, t = !0;
		d.trim() || (e.text = "Обязательное поле", t = !1);
		for (let n of c.fields) {
			let r = p[n.name]?.trim();
			if (n.required && !r) e[n.name] = "Обязательное поле", t = !1;
			else if (n.validate) {
				let i = n.validate(r);
				i && (e[n.name] = i, t = !1);
			}
		}
		return g(e), t;
	};
	return /* @__PURE__ */ x(r, {
		isOpen: !0,
		onClose: o,
		title: `Вставка <${c.tagName}>`,
		size: "md",
		children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ x(t, {
			gap: "md",
			children: [
				/* @__PURE__ */ x("div", { children: [
					c.description,
					".",
					/* @__PURE__ */ b("br", {})
				] }),
				/* @__PURE__ */ x("div", { children: [
					/* @__PURE__ */ b("strong", { children: "Пример:" }),
					" ",
					c.example
				] }),
				/* @__PURE__ */ b(a, {
					label: c.title,
					description: `Данный текст будет вставлен в редактор и обёрнуть в специальный семантический тег ${c.tagName}`,
					value: d,
					onChange: f,
					error: h.text ?? void 0,
					required: !0
				}),
				c.fields.map((e) => /* @__PURE__ */ b(a, {
					label: e.label,
					description: e.description,
					placeholder: e.placeholder,
					value: p[e.name] ?? "",
					onChange: (t) => v(e.name, t),
					error: h[e.name] ?? void 0,
					required: e.required
				}, e.name))
			]
		}) }), /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b(e, {
			appearance: "solid",
			tone: "error",
			onClick: o,
			children: "Отмена"
		}), /* @__PURE__ */ b(e, {
			appearance: "solid",
			tone: "success",
			onClick: () => {
				y() && (s(c.tagName, d.trim(), p), o());
			},
			children: "Подтвердить"
		})] })]
	});
}
//#endregion
//#region src/text-editor/semanticTagConfigs.tsx
var at = {
	[u.abbr]: {
		tagName: "abbr",
		title: "Аббревиатура",
		description: "Обозначает аббревиатуры и сокращения, при наведении покажет расшифровку",
		example: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("abbr", {
			title: "Национальное управление по аэронавтике и исследованию космического пространства",
			children: "НАСА"
		}), /* @__PURE__ */ b("div", {
			className: "marginTopMd",
			children: /* @__PURE__ */ b("code", { children: "<abbr title=\"Национальное управление по аэронавтике и исследованию космического пространства\">НАСА</abbr>" })
		})] }),
		fields: [{
			name: "title",
			label: "Расшифровка",
			description: "Появится как подсказка и будет прочитана скринридером",
			placeholder: "например: HyperText Markup Language",
			required: !0
		}]
	},
	[u.lang]: {
		tagName: "span",
		title: "Текст на другом языке",
		description: "Указывает язык фрагмента текста, если он отличается от основного языка страницы, скринридер прочитает это слово с французским произношением",
		example: /* @__PURE__ */ x(y, { children: [
			/* @__PURE__ */ b("span", {
				lang: "fr",
				children: "Bonjour!"
			}),
			" — сказал турист.",
			/* @__PURE__ */ b("div", {
				className: "marginTopMd",
				children: /* @__PURE__ */ b("code", { children: "<span lang=\"fr\">Bonjour!</span> — сказал турист." })
			})
		] }),
		fields: [{
			name: "lang",
			label: "Код языка",
			placeholder: "en, fr, ru",
			required: !0,
			validate: (e) => /^[a-z]{2,3}(-[A-Z]{2})?$/.test(e) ? null : "Неверный код языка (например, en или en-US)"
		}]
	},
	[u.time]: {
		tagName: "time",
		title: "Дата/время",
		description: "",
		example: "",
		fields: [{
			name: "datetime",
			label: "Дата/время (machine-readable)",
			description: "Формат ISO 8601: 2025-05-18, 14:30, 2025-05-18T14:30",
			placeholder: "например: 2025-05-18T14:30",
			required: !0
		}]
	},
	[u.cite]: {
		tagName: "cite",
		title: "Цитата источника",
		description: "Обозначает название книги, статьи, фильма или другого произведения, на которое вы ссылаетесь",
		example: /* @__PURE__ */ x(y, { children: [
			"По словам Эйнштейна: ",
			/* @__PURE__ */ b("cite", { children: "«Воображение важнее знания»" }),
			".",
			/* @__PURE__ */ b("div", {
				className: "marginTopMd",
				children: /* @__PURE__ */ b("code", { children: "По словам Эйнштейна: <cite>«Воображение важнее знания»</cite>." })
			})
		] }),
		fields: [{
			name: "title",
			label: "Название источника",
			description: "Будет отображаться как подсказка",
			placeholder: "например: Википедия",
			required: !1
		}]
	},
	[u.del]: {
		tagName: "del",
		title: "Изменения в тексте",
		description: "Удаленный фрагмент",
		example: /* @__PURE__ */ x(y, { children: [
			"Проект сдачи: ",
			/* @__PURE__ */ b("del", { children: "1 июня" }),
			" ",
			/* @__PURE__ */ b("ins", { children: "15 июня" }),
			/* @__PURE__ */ b("div", {
				className: "marginTopMd",
				children: /* @__PURE__ */ b("code", { children: "Проект сдачи: <del>1 июня</del> <ins>15 июня</ins>" })
			})
		] }),
		fields: [{
			name: "datetime",
			label: "Когда был удалён",
			description: "Формат ISO 8601: 2025-05-18T14:30",
			placeholder: "например: 2025-05-18T14:30",
			required: !1
		}, {
			name: "cite",
			label: "Источник/обоснование",
			description: "Ссылка на объяснение причины",
			placeholder: "например: https://example.com/edit-log",
			required: !1
		}]
	},
	[u.ins]: {
		tagName: "ins",
		title: "Изменения в тексте",
		description: "Новый добавленный текст",
		example: /* @__PURE__ */ x(y, { children: [
			"Проект сдачи: ",
			/* @__PURE__ */ b("del", { children: "1 июня" }),
			" ",
			/* @__PURE__ */ b("ins", { children: "15 июня" }),
			/* @__PURE__ */ b("div", {
				className: "marginTopMd",
				children: /* @__PURE__ */ b("code", { children: "Проект сдачи: <del>1 июня</del> <ins>15 июня</ins>" })
			})
		] }),
		fields: [{
			name: "datetime",
			label: "Когда был добавлен",
			description: "Формат ISO 8601: 2025-05-18T14:30",
			placeholder: "например: 2025-05-18T14:30",
			required: !1
		}, {
			name: "cite",
			label: "Источник/обоснование",
			description: "Ссылка на объяснение причины",
			placeholder: "например: https://example.com/edit-log",
			required: !1
		}]
	}
};
//#endregion
//#region src/text-editor/TimeDialog.tsx
function ot({ onClose: o, onConfirm: c, initialState: l }) {
	let [u, d] = _(() => l?.mode ?? "date"), [f, p] = _(() => l?.from ?? ""), [m, h] = _(() => l?.to ?? ""), [g, v] = _({}), S = () => {
		let e = {}, t = (e) => /^\d{4}-\d{2}-\d{2}$/.test(e), n = (e) => /^\d{2}:\d{2}$/.test(e), r = (e) => /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/.test(e), i = (e, i, a) => {
			if (!i) return `${e} обязательно`;
			if (a === "date" && !t(i)) return "Неверный формат даты (ГГГГ-ММ-ДД)";
			if (a === "time" && !n(i)) return "Неверный формат времени (ЧЧ:ММ)";
			if (a === "datetime" && !r(i)) return "Неверный формат даты и времени (ГГГГ-ММ-ДДTЧЧ:ММ)";
		};
		switch (u) {
			case "date":
				e.from = i("Дата", f, "date");
				break;
			case "time":
				e.from = i("Время", f, "time");
				break;
			case "datetime":
				e.from = i("Дата и время", f, "datetime");
				break;
			case "range-time":
				e.from = i("Время начала", f, "time"), e.to = i("Время окончания", m, "time");
				break;
			case "range-date":
				e.from = i("Дата начала", f, "date"), e.to = i("Дата окончания", m, "date");
				break;
			case "range-datetime": e.from = i("Начало", f, "datetime"), e.to = i("Окончание", m, "datetime");
		}
		return v(e), Object.values(e).every((e) => !e);
	};
	return /* @__PURE__ */ x(r, {
		isOpen: !0,
		onClose: o,
		title: "Вставка <time>",
		size: "md",
		children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ x(t, {
			gap: "md",
			children: [/* @__PURE__ */ x(s, {
				label: "Тип значения",
				value: u,
				onChange: d,
				children: [
					/* @__PURE__ */ b(s.Option, {
						label: "Дата",
						value: "date"
					}),
					/* @__PURE__ */ b(s.Option, {
						label: "Дата и время",
						value: "datetime"
					}),
					/* @__PURE__ */ b(s.Option, {
						label: "Время",
						value: "time"
					}),
					/* @__PURE__ */ b(s.Option, {
						label: "Диапазон дат",
						value: "range-date"
					}),
					/* @__PURE__ */ b(s.Option, {
						label: "Диапазон времени",
						value: "range-time"
					}),
					/* @__PURE__ */ b(s.Option, {
						label: "Диапазон даты и времени",
						value: "range-datetime"
					})
				]
			}), /* @__PURE__ */ b(t, {
				gap: "md",
				children: (() => {
					switch (u) {
						case "date":
						case "datetime":
						case "time": return /* @__PURE__ */ b(a, {
							label: "Значение",
							placeholder: u === "time" ? "09:00" : u === "date" ? "2025-05-18" : "2025-05-18T09:00",
							value: f,
							onChange: p,
							error: g.from
						});
						case "range-time":
						case "range-date":
						case "range-datetime": return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(a, {
							label: "С",
							placeholder: u.includes("time") ? "09:00" : u.includes("date") ? "2025-05-18" : "2025-05-18T09:00",
							value: f,
							onChange: p,
							error: g.from
						}), /* @__PURE__ */ b(a, {
							label: "По",
							placeholder: u.includes("time") ? "17:00" : u.includes("date") ? "2025-05-22" : "2025-05-22T17:00",
							value: m,
							onChange: h,
							error: g.to
						})] });
					}
				})()
			})]
		}) }), /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b(e, {
			appearance: "solid",
			tone: "error",
			onClick: o,
			children: "Отмена"
		}), /* @__PURE__ */ b(e, {
			appearance: "solid",
			tone: "success",
			onClick: () => {
				if (!S()) return;
				let e = m ? `${f}/${m}` : f;
				c("time", e, { datetime: e }), o();
			},
			children: "Подтвердить"
		})] })]
	});
}
//#endregion
//#region src/text-editor/TextEditorDialogs.tsx
function st({ linkTypeDialog: e, tagTypeDialog: t, localLinkDialogComponent: n, onCloseLinkDialog: r, onCloseTagDialog: i, onAddLink: a, onAddLocalLink: o, onInsertSemanticTag: s, getCurrentSelectionText: c, getSelectedLinkState: l }) {
	let d = n;
	return /* @__PURE__ */ x(y, { children: [
		e === f.LOCAL_LINK && d ? /* @__PURE__ */ b(d, {
			isOpen: !0,
			onClose: r,
			onConfirm: o
		}) : null,
		e === f.LINK ? /* @__PURE__ */ b(nt, {
			initialState: l(),
			onClose: r,
			onConfirm: a
		}) : null,
		e === f.PHONE ? /* @__PURE__ */ b(rt, {
			initialState: l(),
			onClose: r,
			onConfirm: a
		}) : null,
		e === f.EMAIL ? /* @__PURE__ */ b(tt, {
			initialState: l(),
			onClose: r,
			onConfirm: a
		}) : null,
		t && (t === u.time ? /* @__PURE__ */ b(ot, {
			onClose: i,
			onConfirm: s
		}) : /* @__PURE__ */ b(it, {
			onClose: i,
			onConfirm: s,
			config: at[t],
			initialText: c()
		}))
	] });
}
//#endregion
//#region src/text-editor/TextEditorLexicalClient.tsx
function ct({ initialData: e, onChange: t, toolbarComponents: n, businessAdapters: r }) {
	let i = r?.LocalLinkDialogComponent, [a, o] = _(!1), [s, l] = _(W), [u, d] = _(null), [f, m] = _(null), [g, y] = _(null), S = c(e?.raw) ? e.raw : null, C = !!S, w = h(() => {
		if (S) return JSON.stringify(S.editorState);
	}, [S]), T = p((e) => {
		console.error("Ошибка редактора Lexical", e);
	}, []), E = p((e, n) => {
		let r = "";
		e.read(() => {
			r = ue(n, null);
		}), t({
			raw: Ze(e),
			html: r
		});
	}, [t]), D = p((e) => {
		m(e);
	}, []), O = p((e) => {
		y(e);
	}, []), k = et({
		editor: u,
		toolbarState: s,
		hasLocalLinkDialog: !!i,
		onOpenLinkDialog: D,
		onOpenTagDialog: O
	}), A = h(() => ({
		namespace: "KtkTextEditorLexical",
		onError: T,
		theme: {
			paragraph: "paragraph",
			text: {
				code: "lexicalTextCode",
				highlight: "lexicalTextHighlight",
				underline: "lexicalTextUnderline",
				strikethrough: "lexicalTextStrikethrough"
			}
		},
		nodes: [
			Oe,
			ke,
			ge,
			he,
			K,
			Z
		],
		editorState: w
	}), [T, w]);
	return /* @__PURE__ */ x("div", {
		className: $.textEditor,
		children: [/* @__PURE__ */ b("div", {
			className: v($.textEditorContent, { [$.focused]: a }),
			children: /* @__PURE__ */ x(_e, {
				initialConfig: A,
				children: [
					/* @__PURE__ */ b(He, {
						toolbarComponents: n,
						state: s,
						onBlockStyleToggle: k.handleBlockStyleToggle,
						onInlineStyleToggle: k.handleInlineStyleToggle,
						onAlignmentChange: k.handleAlignmentChange,
						onLinkClick: k.handleLinkClick,
						onTagClick: k.handleTagClick,
						onUndo: k.handleUndo,
						onRedo: k.handleRedo,
						onCleanTag: k.handleCleanSemanticTag
					}),
					/* @__PURE__ */ b(Ce, {
						contentEditable: /* @__PURE__ */ b(ve, {
							className: "lexicalEditorContentEditable",
							onFocus: () => o(!0),
							onBlur: () => o(!1)
						}),
						placeholder: /* @__PURE__ */ b("div", {
							className: "lexicalEditorPlaceholder",
							children: "Введите текст..."
						}),
						ErrorBoundary: ye
					}),
					/* @__PURE__ */ b(be, {}),
					/* @__PURE__ */ b(xe, {}),
					/* @__PURE__ */ b(Xe, {
						onEditorReady: d,
						onStateChange: l
					}),
					/* @__PURE__ */ b(Ue, {
						initialHTML: e?.html,
						shouldSkip: C
					}),
					/* @__PURE__ */ b(Se, {
						onChange: E,
						ignoreSelectionChange: !0
					})
				]
			})
		}), /* @__PURE__ */ b(st, {
			linkTypeDialog: f,
			tagTypeDialog: g,
			localLinkDialogComponent: i,
			onCloseLinkDialog: () => m(null),
			onCloseTagDialog: () => y(null),
			onAddLink: k.handleAddLink,
			onAddLocalLink: k.handleAddLocalLink,
			onInsertSemanticTag: k.insertSemanticTagAtSelection,
			getCurrentSelectionText: k.getCurrentSelectionText,
			getSelectedLinkState: k.getSelectedLinkState
		})]
	});
}
//#endregion
export { ct as TextEditorLexicalClient };

//# sourceMappingURL=TextEditorLexicalClient-C6b5N8AO.js.map