reactjs-tiptap-editor 0.0.44 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ var s = (e, t, o) => t in e ? p(e, t, { enumerable: !0, configurable: !0, writab
3
3
  var n = (e, t, o) => s(e, typeof t != "symbol" ? t + "" : t, o);
4
4
  import { useMemo as g, useEffect as u } from "react";
5
5
  import { proxy as m, useSnapshot as c } from "valtio";
6
- import { m as h } from "./utils-T9ISD9dj.js";
6
+ import { m as h } from "./utils-BGidOjdA.js";
7
7
  const b = {
8
8
  "editor.remove": "Remove",
9
9
  "editor.copy": "Copy",
@@ -160,7 +160,8 @@ const b = {
160
160
  "editor.textDirection.rtl.tooltip": "Right to Left",
161
161
  "editor.attachment.tooltip": "Attachment",
162
162
  "editor.attachment.uploading": "Uploading",
163
- "editor.attachment.please_upload": "Please upload the file"
163
+ "editor.attachment.please_upload": "Please upload the file",
164
+ "editor.imageGif.tooltip": "Gif"
164
165
  }, f = b, k = {
165
166
  "editor.remove": "Remover",
166
167
  "editor.copy": "Copiar",
@@ -317,7 +318,8 @@ const b = {
317
318
  "editor.textDirection.rtl.tooltip": "Direita para Esquerda",
318
319
  "editor.attachment.tooltip": "Anexo",
319
320
  "editor.attachment.uploading": "Enviando",
320
- "editor.attachment.please_upload": "Por favor, envie o arquivo"
321
+ "editor.attachment.please_upload": "Por favor, envie o arquivo",
322
+ "editor.imageGif.tooltip": "Gif"
321
323
  }, C = k, F = {
322
324
  "editor.remove": "Xóa",
323
325
  "editor.copy": "Sao chép",
@@ -474,7 +476,8 @@ const b = {
474
476
  "editor.textDirection.rtl.tooltip": "Phải sang Trái",
475
477
  "editor.attachment.tooltip": "Đính kèm",
476
478
  "editor.attachment.uploading": "Đang tải lên",
477
- "editor.attachment.please_upload": "Vui lòng tải lên tệp"
479
+ "editor.attachment.please_upload": "Vui lòng tải lên tệp",
480
+ "editor.imageGif.tooltip": "Gif"
478
481
  }, T = F, _ = {
479
482
  "editor.remove": "移除",
480
483
  "editor.copy": "复制",
@@ -631,7 +634,8 @@ const b = {
631
634
  "editor.textDirection.rtl.tooltip": "从右到左",
632
635
  "editor.attachment.tooltip": "附件",
633
636
  "editor.attachment.uploading": "上传中",
634
- "editor.attachment.please_upload": "请上传文件"
637
+ "editor.attachment.please_upload": "请上传文件",
638
+ "editor.imageGif.tooltip": "Gif"
635
639
  }, x = _, A = "en", D = 200, I = D - 80, w = 20, z = 1e5, P = 16, N = 10, M = 10, U = 2, H = [
636
640
  "#000000",
637
641
  "#262626",
@@ -715,13 +719,13 @@ const b = {
715
719
  "js",
716
720
  "ts",
717
721
  "bash"
718
- ], O = {
722
+ ], G = {
719
723
  html: "HTML",
720
724
  css: "CSS",
721
725
  js: "JavaScript",
722
726
  ts: "TypeScript",
723
727
  bash: "Bash"
724
- }, j = [
728
+ }, O = [
725
729
  "10px",
726
730
  "11px",
727
731
  "12px",
@@ -736,7 +740,7 @@ const b = {
736
740
  "36px",
737
741
  "48px",
738
742
  "72px"
739
- ], G = "default";
743
+ ], j = "default";
740
744
  var v = /* @__PURE__ */ ((e) => (e[e["size-small"] = 200] = "size-small", e[e["size-medium"] = 500] = "size-medium", e["size-large"] = "100%", e))(v || {}), E = /* @__PURE__ */ ((e) => (e[e["size-small"] = 480] = "size-small", e[e["size-medium"] = 640] = "size-medium", e["size-large"] = "100%", e))(E || {});
741
745
  const X = ["100%", "115%", "150%", "200%", "250%", "300%"], K = "1", V = [
742
746
  "bold",
@@ -842,12 +846,12 @@ export {
842
846
  q as D,
843
847
  I as E,
844
848
  v as I,
845
- O as M,
849
+ G as M,
846
850
  M as T,
847
851
  E as V,
848
852
  W as a,
849
- j as b,
850
- G as c,
853
+ O as b,
854
+ j as c,
851
855
  K as d,
852
856
  X as e,
853
857
  z as f,
@@ -1 +1 @@
1
- "use strict";var f=Object.defineProperty;var _=(e,t,o)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var n=(e,t,o)=>_(e,typeof t!="symbol"?t+"":t,o);const p=require("react"),s=require("valtio"),T=require("./utils-DsfrMoWH.cjs"),F={"editor.remove":"Remove","editor.copy":"Copy","editor.words":"WORDS","editor.characters":"CHARACTERS","editor.default":"Default","editor.recent":"Recently Used","editor.nofill":"No Fill","editor.format":"Format Painter","editor.delete":"Delete","editor.edit":"Edit","editor.settings":"Settings","editor.table_of_content":"Table of Content","editor.draghandle.tooltip":"Modify","editor.copyToClipboard":"CopyToClipboard","editor.importWord.tooltip":"Import Word","editor.slash":"Press '/' for commands","editor.slash.empty":"No Result","editor.slash.format":"Format","editor.slash.insert":"Insert","editor.slash.embed":"Embed Services","editor.content":"Please input content","editor.fontFamily.tooltip":"Font Family","editor.fontFamily.default.tooltip":"Default","editor.moremark":"More Text Styles","editor.size.small.tooltip":"Small","editor.size.medium.tooltip":"Medium","editor.size.large.tooltip":"Cover","editor.bold.tooltip":"Bold","editor.italic.tooltip":"Italic","editor.underline.tooltip":"Underline","editor.strike.tooltip":"Strike","editor.color.tooltip":"Color","editor.color.more":"More Colors","editor.highlight.tooltip":"Highlight","editor.lineheight.tooltip":"Line Height","editor.heading.tooltip":"Headings","editor.heading.h1.tooltip":"Heading 1","editor.heading.h2.tooltip":"Heading 2","editor.heading.h3.tooltip":"Heading 3","editor.heading.h4.tooltip":"Heading 4","editor.heading.h5.tooltip":"Heading 5","editor.heading.h6.tooltip":"Heading 6","editor.paragraph.tooltip":"Paragraph","editor.textalign.tooltip":"Align","editor.textalign.left.tooltip":"Left","editor.textalign.center.tooltip":"Center","editor.textalign.right.tooltip":"Right","editor.textalign.justify.tooltip":"Justify","editor.indent":"Indent","editor.indent.indent":"Increase Indent","editor.indent.outdent":"Decrease Indent","editor.fontSize.tooltip":"Font size","editor.fontSize.default.tooltip":"Default","editor.superscript.tooltip":"Superscript","editor.subscript.tooltip":"Subscript","editor.bulletlist.tooltip":"Bullet List","editor.orderedlist.tooltip":"Ordered List","editor.tasklist.tooltip":"Task List","editor.indent.tooltip":"Indent","editor.outdent.tooltip":"Outdent","editor.columns.tooltip":"Columns","editor.link.tooltip":"Link","editor.link.unlink.tooltip":"UnLink","editor.link.open.tooltip":"Open Link","editor.link.edit.tooltip":"Edit Link","editor.link.dialog.title":"Insert Link","editor.link.dialog.link":"Link","editor.link.dialog.text":"Text","editor.link.dialog.openInNewTab":"Open In New Tab","editor.link.dialog.link.placeholder":"Link Address","editor.link.dialog.text.placeholder":"Add Description","editor.link.dialog.button.apply":"Apply","editor.image.tooltip":"Image","editor.image.dragger.tooltip":"Click or drag the image to the area to upload","editor.image.float.left.tooltip":"Float left","editor.image.float.none.tooltip":"Float none","editor.image.float.right.tooltip":"Float right","editor.image.dialog.title":"Add an image","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Upload","editor.image.dialog.uploading":"Uploading","editor.image.dialog.form.link":"Link","editor.image.dialog.placeholder":"Link","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Lock original aspect ratio","editor.image.dialog.form.file":"File","editor.image.dialog.button.apply":"apply","editor.video.tooltip":"Video","editor.video.dialog.tab.upload":"Upload","editor.video.dialog.uploading":"Uploading","editor.video.dialog.title":"Embed or upload a video","editor.video.dialog.link":"link","editor.video.dialog.placeholder":"Link","editor.video.dialog.button.apply":"apply","editor.table.tooltip":"Table","editor.table.menu.insert_table":"Insert Table","editor.table.menu.insert_table.with_header_row":"With header row","editor.table.menu.add_column_before":"Add Column Before","editor.table.menu.add_column_after":"Add Column After","editor.table.menu.delete_column":"Delete Column","editor.table.menu.add_row_before":"Add Row Before","editor.table.menu.add_row_after":"Add Row After","editor.table.menu.delete_row":"Delete Row","editor.table.menu.merge_or_split_cells":"Merge Or Split Cells","editor.table.menu.delete_table":"Delete Table","editor.blockquote.tooltip":"Blockquote","editor.horizontalrule.tooltip":"Horizontal Rule","editor.code.tooltip":"Code","editor.codeblock.tooltip":"Code Block","editor.clear.tooltip":"Clear Format","editor.undo.tooltip":"Undo","editor.redo.tooltip":"Redo","editor.fullscreen.tooltip.fullscreen":"Fullscreen","editor.fullscreen.tooltip.exit":"Fullscreen Exit","editor.imageUpload.fileTypeNotSupported":"File type not supported","editor.imageUpload.fileSizeTooBig":"File size too big, Maximum size is","editor.table.menu.insertColumnBefore":"Insert Column Before","editor.table.menu.insertColumnAfter":"Insert Column After","editor.table.menu.deleteColumn":"Delete Column","editor.table.menu.insertRowAbove":"Insert Row Above","editor.table.menu.insertRowBelow":"Insert Row Below","editor.table.menu.deleteRow":"Delete Row","editor.table.menu.mergeCells":"Merge Cells","editor.table.menu.splitCells":"Split Cells","editor.table.menu.deleteTable":"Delete Table","editor.table.menu.setCellsBgColor":"Cell Background Color","editor.emoji.tooltip":"Emoji","editor.iframe.tooltip":"Iframe","editor.searchAndReplace.tooltip":"Search and Replace","editor.search.dialog.text":"Search","editor.replace.dialog.text":"Replace","editor.replaceAll.dialog.text":"Replace All","editor.previous.dialog.text":"Previous","editor.next.dialog.text":"Next",no_result_found:"No results found","Smileys & People":"Smileys & People","Animals & Nature":"Animals & Nature","Food & Drink":"Food & Drink",Activity:"Activity","Travel & Places":"Travel & Places",Object:"Objects",Symbol:"Symbols",Flags:"Flags","Frequently used":"Frequently used","editor.formula.dialog.text":"Formula","editor.katex.tooltip":"Math Formula","editor.exportPdf.tooltip":"Export PDF","editor.exportWord.tooltip":"Export Word","editor.importWrod.tooltip":"Import Word","editor.textDirection.tooltip":"Text Direction","editor.textDirection.auto.tooltip":"Auto","editor.textDirection.ltr.tooltip":"Left to Right","editor.textDirection.rtl.tooltip":"Right to Left","editor.attachment.tooltip":"Attachment","editor.attachment.uploading":"Uploading","editor.attachment.please_upload":"Please upload the file"},g=F,A={"editor.remove":"Remover","editor.copy":"Copiar","editor.words":"PALAVRAS","editor.characters":"CARACTERES","editor.default":"Padrão","editor.recent":"Usado recentemente","editor.nofill":"Sem preenchimento","editor.format":"Format Painter","editor.delete":"Deletar","editor.edit":"Editar","editor.settings":"Configurações","editor.table_of_content":"Tabela de conteúdos","editor.draghandle.tooltip":"Modificar","editor.copyToClipboard":"Copiar para a área de transferência","editor.importWord.tooltip":"Importar Word","editor.slash":"Pressione '/' para comandos","editor.slash.empty":"Nenhum resultado","editor.slash.format":"Formato","editor.slash.insert":"Inserir","editor.slash.embed":"Incorporar serviços","editor.content":"Por favor, insira o conteúdo","editor.fontFamily.tooltip":"Fonte","editor.fontFamily.default.tooltip":"Padrão","editor.moremark":"Mais estilos de texto","editor.size.small.tooltip":"Pequeno","editor.size.medium.tooltip":"Médio","editor.size.large.tooltip":"Grande","editor.bold.tooltip":"Negrito","editor.italic.tooltip":"Itálico","editor.underline.tooltip":"Sublinhado","editor.strike.tooltip":"Riscado","editor.color.tooltip":"Cor","editor.color.more":"Mais cores","editor.highlight.tooltip":"Destaque","editor.lineheight.tooltip":"Altura da linha","editor.heading.tooltip":"Cabeçalhos","editor.heading.h1.tooltip":"Cabeçalho 1","editor.heading.h2.tooltip":"Cabeçalho 2","editor.heading.h3.tooltip":"Cabeçalho 3","editor.heading.h4.tooltip":"Cabeçalho 4","editor.heading.h5.tooltip":"Cabeçalho 5","editor.heading.h6.tooltip":"Cabeçalho 6","editor.paragraph.tooltip":"Parágrafo","editor.textalign.tooltip":"Alinhar","editor.textalign.left.tooltip":"Esquerda","editor.textalign.center.tooltip":"Centro","editor.textalign.right.tooltip":"Direita","editor.textalign.justify.tooltip":"Justificar","editor.indent":"Recuo","editor.indent.indent":"Aumentar recuo","editor.indent.outdent":"Diminuir recuo","editor.fontSize.tooltip":"Tamanho da fonte","editor.fontSize.default.tooltip":"Padrão","editor.superscript.tooltip":"Sobrescrito","editor.subscript.tooltip":"Subscrito","editor.bulletlist.tooltip":"Lista de marcadores","editor.orderedlist.tooltip":"Lista numerada","editor.tasklist.tooltip":"Lista de tarefas","editor.indent.tooltip":"Recuo","editor.outdent.tooltip":"Diminuir recuo","editor.columns.tooltip":"Colunas","editor.link.tooltip":"Link","editor.link.unlink.tooltip":"Desvincular","editor.link.open.tooltip":"Abrir link","editor.link.edit.tooltip":"Editar link","editor.link.dialog.title":"Inserir link","editor.link.dialog.link":"Link","editor.link.dialog.text":"Texto","editor.link.dialog.openInNewTab":"Abrir em nova guia","editor.link.dialog.link.placeholder":"Endereço do link","editor.link.dialog.text.placeholder":"Texto do link","editor.link.dialog.button.apply":"Aplicar","editor.image.tooltip":"Imagem","editor.image.dragger.tooltip":"Clique ou arraste a imagem para a área de upload","editor.image.float.left.tooltip":"Flutuar à esquerda","editor.image.float.none.tooltip":"Nenhum flutuante","editor.image.float.right.tooltip":"Flutuar à direita","editor.image.dialog.title":"Adicionar uma imagem","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Enviar","editor.image.dialog.uploading":"Enviando","editor.image.dialog.form.link":"Link","editor.image.dialog.placeholder":"Link","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Bloquear proporção original","editor.image.dialog.form.file":"Arquivo","editor.image.dialog.button.apply":"aplicar","editor.video.tooltip":"Vídeo","editor.video.dialog.tab.upload":"Enviar","editor.video.dialog.uploading":"Enviando","editor.video.dialog.title":"Incorporar ou enviar um vídeo","editor.video.dialog.link":"link","editor.video.dialog.placeholder":"Link","editor.video.dialog.button.apply":"aplicar","editor.table.tooltip":"Tabela","editor.table.menu.insert_table":"Inserir tabela","editor.table.menu.insert_table.with_header_row":"Com linha de cabeçalho","editor.table.menu.add_column_before":"Adicionar coluna antes","editor.table.menu.add_column_after":"Adicionar coluna depois","editor.table.menu.delete_column":"Excluir coluna","editor.table.menu.add_row_before":"Adicionar linha antes","editor.table.menu.add_row_after":"Adicionar linha depois","editor.table.menu.delete_row":"Deletar linha","editor.table.menu.merge_or_split_cells":"Mesclar ou dividir células","editor.table.menu.delete_table":"Deletar tabela","editor.blockquote.tooltip":"Citação","editor.horizontalrule.tooltip":"Regra horizontal","editor.code.tooltip":"Código","editor.codeblock.tooltip":"Bloco de código","editor.clear.tooltip":"Limpar formato","editor.undo.tooltip":"Desfazer","editor.redo.tooltip":"Refazer","editor.fullscreen.tooltip.fullscreen":"Tela cheia","editor.fullscreen.tooltip.exit":"Sair da tela cheia","editor.imageUpload.fileTypeNotSupported":"Tipo de arquivo não suportado","editor.imageUpload.fileSizeTooBig":"Tamanho do arquivo muito grande, tamanho máximo é","editor.table.menu.insertColumnBefore":"Inserir coluna antes","editor.table.menu.insertColumnAfter":"Inserir coluna depois","editor.table.menu.deleteColumn":"Excluir coluna","editor.table.menu.insertRowAbove":"Inserir linha acima","editor.table.menu.insertRowBelow":"Inserir linha abaixo","editor.table.menu.deleteRow":"Deletar linha","editor.table.menu.mergeCells":"Mesclar células","editor.table.menu.splitCells":"Dividir células","editor.table.menu.deleteTable":"Deletar tabela","editor.table.menu.setCellsBgColor":"Cor de fundo da célula","editor.emoji.tooltip":"Emoji","editor.iframe.tooltip":"Iframe","editor.searchAndReplace.tooltip":"Pesquisar e substituir","editor.search.dialog.text":"Pesquisar","editor.replace.dialog.text":"Substituir","editor.replaceAll.dialog.text":"Substituir tudo","editor.previous.dialog.text":"Anterior","editor.next.dialog.text":"Próximo",no_result_found:"Nenhum resultado encontrado","Smileys & People":"Emoticons & Pessoas","Animals & Nature":"Animais & Natureza","Food & Drink":"Comida & Bebida",Activity:"Atividade","Travel & Places":"Viagem & Lugares",Object:"Objetos",Symbol:"Símbolos",Flags:"Bandeiras","Frequently used":"Frequentemente usado","editor.formula.dialog.text":"Fórmula","editor.katex.tooltip":"Fórmula matemática","editor.exportPdf.tooltip":"Exportar PDF","editor.exportWord.tooltip":"Exportar Word","editor.importWrod.tooltip":"Importar Word","editor.textDirection.tooltip":"Direção do texto","editor.textDirection.auto.tooltip":"Automático","editor.textDirection.ltr.tooltip":"Esquerda para Direita","editor.textDirection.rtl.tooltip":"Direita para Esquerda","editor.attachment.tooltip":"Anexo","editor.attachment.uploading":"Enviando","editor.attachment.please_upload":"Por favor, envie o arquivo"},u=A,C={"editor.remove":"Xóa","editor.copy":"Sao chép","editor.words":"TỪ","editor.characters":"KÝ TỰ","editor.default":"Mặc định","editor.recent":"Đã sử dụng gần đây","editor.nofill":"Không tô","editor.format":"Format Painter","editor.delete":"Xóa","editor.edit":"Chỉnh sửa","editor.settings":"Cài đặt","editor.table_of_content":"Mục lục","editor.draghandle.tooltip":"Sửa đổi","editor.copyToClipboard":"CopyToClipboard","editor.importWord.tooltip":"Nhập Word","editor.slash":"Nhấn '/' để biết lệnh","editor.slash.empty":"Không có kết quả","editor.slash.format":"Định dạng","editor.slash.insert":"Chèn","editor.slash.embed":"Dịch vụ nhúng","editor.content":"Vui lòng nhập nội dung","editor.moremark":"Nhiều kiểu văn bản hơn","editor.size.small.tooltip":"Nhỏ","editor.fontFamily.tooltip":"Phông chữ","editor.fontFamily.default.tooltip":"Mặc định","editor.size.medium.tooltip":"Trung bình","editor.size.large.tooltip":"Lớn","editor.bold.tooltip":"Đậm","editor.italic.tooltip":"In nghiêng","editor.underline.tooltip":"Gạch chân","editor.strike.tooltip":"Gạch","editor.color.tooltip":"Màu","editor.color.more":"Nhiều màu hơn","editor.highlight.tooltip":"Đánh dấu","editor.lineheight.tooltip":"Chiều cao dòng","editor.heading.tooltip":"Tiêu đề","editor.heading.h1.tooltip":"Tiêu đề 1","editor.heading.h2.tooltip":"Tiêu đề 2","editor.heading.h3.tooltip":"Tiêu đề 3","editor.heading.h4.tooltip":"Tiêu đề 4","editor.heading.h5.tooltip":"Tiêu đề 5","editor.heading.h6.tooltip":"Tiêu đề 6","editor.paragraph.tooltip":"Đoạn văn","editor.textalign.tooltip":"Căn chỉnh","editor.textalign.left.tooltip":"Trái","editor.textalign.center.tooltip":"Giữa","editor.textalign.right.tooltip":"Phải","editor.textalign.justify.tooltip":"Căn đều","editor.indent":"Thụt lề","editor.indent.indent":"Tăng thụt lề","editor.indent.outdent":"Giảm thụt lề","editor.fontSize.tooltip":"Kích thước phông chữ","editor.fontSize.default.tooltip":"Mặc định","editor.superscript.tooltip":"Chỉ số trên","editor.subscript.tooltip":"Chỉ số dưới","editor.bulletlist.tooltip":"Danh sách dấu đầu dòng","editor.orderedlist.tooltip":"Danh sách có thứ tự","editor.tasklist.tooltip":"Danh sách tác vụ","editor.indent.tooltip":"Tăng thụt lề","editor.outdent.tooltip":"Giảm thụt lề","editor.columns.tooltip":"Cột","editor.link.tooltip":"Liên kết","editor.link.unlink.tooltip":"Hủy liên kết","editor.link.open.tooltip":"Mở liên kết","editor.link.edit.tooltip":"Chỉnh sửa liên kết","editor.link.dialog.title":"Chèn liên kết","editor.link.dialog.link":"Liên kết","editor.link.dialog.text":"Văn bản","editor.link.dialog.openInNewTab":"Mở trong tab mới","editor.link.dialog.link.placeholder":"Địa chỉ liên kết","editor.link.dialog.text.placeholder":"Thêm mô tả","editor.link.dialog.button.apply":"Áp dụng","editor.image.tooltip":"Hình ảnh","editor.image.dragger.tooltip":"Nhấp hoặc kéo hình ảnh đến khu vực để tải lên","editor.image.float.left.tooltip":"Trôi sang trái","editor.image.float.none.tooltip":"Trôi không","editor.image.float.right.tooltip":"Trôi sang phải","editor.image.dialog.title":"Thêm hình ảnh","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Tải lên","editor.image.dialog.uploading":"Đang tải lên","editor.image.dialog.form.link":"Liên kết","editor.image.dialog.placeholder":"Liên kết","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Khóa tỷ lệ khung hình gốc","editor.image.dialog.form.file":"Tệp","editor.image.dialog.button.apply":"áp dụng","editor.video.tooltip":"Video","editor.video.dialog.tab.upload":"Tải lên","editor.video.dialog.uploading":"Đang tải lên","editor.video.dialog.title":"Nhúng hoặc tải lên video","editor.video.dialog.link":"liên kết","editor.video.dialog.placeholder":"Liên kết","editor.video.dialog.button.apply":"áp dụng","editor.table.tooltip":"Bảng","editor.table.menu.insert_table":"Chèn Bảng","editor.table.menu.insert_table.with_header_row":"Có hàng tiêu đề","editor.table.menu.add_column_before":"Thêm Cột Trước","editor.table.menu.add_column_after":"Thêm Cột Sau","editor.table.menu.delete_column":"Xóa Cột","editor.table.menu.add_row_before":"Thêm Hàng Trước","editor.table.menu.add_row_after":"Thêm Hàng Sau","editor.table.menu.delete_row":"Xóa Hàng","editor.table.menu.merge_or_split_cells":"Gộp Hoặc Tách Ô","editor.table.menu.delete_table":"Xóa Bảng","editor.blockquote.tooltip":"Blockquote","editor.horizontalrule.tooltip":"Quy tắc ngang","editor.code.tooltip":"Mã","editor.codeblock.tooltip":"Khối mã","editor.clear.tooltip":"Xóa định dạng","editor.undo.tooltip":"Hoàn tác","editor.redo.tooltip":"Làm lại","editor.fullscreen.tooltip.fullscreen":"Toàn màn hình","editor.fullscreen.tooltip.exit":"Thoát toàn màn hình","editor.imageUpload.fileTypeNotSupported":"Loại tệp không được hỗ trợ","editor.imageUpload.fileSizeTooBig":"Kích thước tệp quá lớn, Kích thước tối đa là","editor.table.menu.insertColumnBefore":"Chèn cột trước","editor.table.menu.insertColumnAfter":"Chèn cột sau","editor.table.menu.deleteColumn":"Xóa cột","editor.table.menu.insertRowAbove":"Chèn hàng ở trên","editor.table.menu.insertRowBelow":"Chèn hàng ở dưới","editor.table.menu.deleteRow":"Xóa hàng","editor.table.menu.mergeCells":"Gộp các ô","editor.table.menu.splitCells":"Chia ô","editor.table.menu.deleteTable":"Xóa bảng","editor.table.menu.setCellsBgColor":"Màu nền ô","editor.emoji.tooltip":"Biểu tượng","editor.iframe.tooltip":"Iframe","editor.searchAndReplace.tooltip":"Tìm kiếm và thay thế","editor.search.dialog.text":"Tìm kiếm","editor.replace.dialog.text":"Thay thế","editor.replaceAll.dialog.text":"Thay thế tất cả","editor.previous.dialog.text":"Trước","editor.next.dialog.text":"Tiếp theo",no_result_found:"Không tìm thấy kết quả","Smileys & People":"Cười & Mọi người","Animals & Nature":"Động vật & Thiên nhiên","Food & Drink":"Thức ăn & Đồ uống",Activity:"Hoạt động","Travel & Places":"Du lịch & Địa điểm",Object:"Vật",Symbol:"Ký hiệu",Flags:"Cờ","Frequently used":"Thường xuyên sử dụng","editor.formula.dialog.text":"Công thức","editor.katex.tooltip":"Công thức toán học","editor.exportPdf.tooltip":"Xuất PDF","editor.exportWord.tooltip":"Xuất Word","editor.importWrod.tooltip":"Nhập Word","editor.textDirection.tooltip":"Hướng văn bản","editor.textDirection.auto.tooltip":"Tự động","editor.textDirection.ltr.tooltip":"Trái sang Phải","editor.textDirection.rtl.tooltip":"Phải sang Trái","editor.attachment.tooltip":"Đính kèm","editor.attachment.uploading":"Đang tải lên","editor.attachment.please_upload":"Vui lòng tải lên tệp"},m=C,k={"editor.remove":"移除","editor.copy":"复制","editor.words":"字数","editor.characters":"字符数","editor.default":"默认","editor.recent":"最近使用","editor.nofill":"无填充","editor.format":"格式刷","editor.delete":"删除","editor.edit":"编辑","editor.settings":"设置","editor.table_of_content":"目录","editor.draghandle.tooltip":"修改","editor.copyToClipboard":"复制到剪贴板","editor.importWord.tooltip":"导入 Word","editor.slash":"按 '/' 使用命令","editor.slash.empty":"无结果","editor.slash.format":"格式","editor.slash.insert":"插入","editor.slash.embed":"嵌入服务","editor.content":"请输入内容","editor.fontFamily.tooltip":"字体","editor.fontFamily.default.tooltip":"默认","editor.moremark":"更多文本样式","editor.size.small.tooltip":"小","editor.size.medium.tooltip":"中","editor.size.large.tooltip":"封面","editor.bold.tooltip":"粗体","editor.italic.tooltip":"斜体","editor.underline.tooltip":"下划线","editor.strike.tooltip":"删除线","editor.color.tooltip":"颜色","editor.color.more":"更多颜色","editor.highlight.tooltip":"高亮","editor.lineheight.tooltip":"行高","editor.heading.tooltip":"标题","editor.heading.h1.tooltip":"标题 1","editor.heading.h2.tooltip":"标题 2","editor.heading.h3.tooltip":"标题 3","editor.heading.h4.tooltip":"标题 4","editor.heading.h5.tooltip":"标题 5","editor.heading.h6.tooltip":"标题 6","editor.paragraph.tooltip":"段落","editor.textalign.tooltip":"对齐","editor.textalign.left.tooltip":"左对齐","editor.textalign.center.tooltip":"居中","editor.textalign.right.tooltip":"右对齐","editor.textalign.justify.tooltip":"两端对齐","editor.indent":"缩进","editor.indent.indent":"增加缩进","editor.indent.outdent":"减少缩进","editor.fontSize.tooltip":"字号","editor.fontSize.default.tooltip":"默认","editor.superscript.tooltip":"上标","editor.subscript.tooltip":"下标","editor.bulletlist.tooltip":"无序列表","editor.orderedlist.tooltip":"有序列表","editor.tasklist.tooltip":"任务列表","editor.indent.tooltip":"缩进","editor.outdent.tooltip":"减少缩进","editor.columns.tooltip":"列","editor.link.tooltip":"链接","editor.link.unlink.tooltip":"取消链接","editor.link.open.tooltip":"打开链接","editor.link.edit.tooltip":"编辑链接","editor.link.dialog.title":"插入链接","editor.link.dialog.link":"链接","editor.link.dialog.text":"文本","editor.link.dialog.openInNewTab":"在新标签页中打开","editor.link.dialog.link.placeholder":"链接地址","editor.link.dialog.text.placeholder":"添加描述","editor.link.dialog.button.apply":"应用","editor.image.tooltip":"图片","editor.image.dragger.tooltip":"点击或拖拽图片到此区域上传","editor.image.float.left.tooltip":"左浮动","editor.image.float.none.tooltip":"无浮动","editor.image.float.right.tooltip":"右浮动","editor.image.dialog.title":"添加图片","editor.image.dialog.tab.url":"链接","editor.image.dialog.tab.upload":"上传","editor.image.dialog.uploading":"上传中","editor.image.dialog.form.link":"链接","editor.image.dialog.placeholder":"链接","editor.image.dialog.form.alt":"替代文本","editor.image.dialog.form.aspectRatio":"锁定原始宽高比","editor.image.dialog.form.file":"文件","editor.image.dialog.button.apply":"应用","editor.video.tooltip":"视频","editor.video.dialog.tab.upload":"上传","editor.video.dialog.uploading":"上传中","editor.video.dialog.title":"嵌入或上传视频","editor.video.dialog.link":"链接","editor.video.dialog.placeholder":"链接","editor.video.dialog.button.apply":"应用","editor.table.tooltip":"表格","editor.table.menu.insert_table":"插入表格","editor.table.menu.insert_table.with_header_row":"带标题行","editor.table.menu.add_column_before":"在前面插入列","editor.table.menu.add_column_after":"在后面插入列","editor.table.menu.delete_column":"删除列","editor.table.menu.add_row_before":"在上方插入行","editor.table.menu.add_row_after":"在下方插入行","editor.table.menu.delete_row":"删除行","editor.table.menu.merge_or_split_cells":"合并或拆分单元格","editor.table.menu.delete_table":"删除表格","editor.blockquote.tooltip":"引用","editor.horizontalrule.tooltip":"水平线","editor.code.tooltip":"代码","editor.codeblock.tooltip":"代码块","editor.clear.tooltip":"清除格式","editor.undo.tooltip":"撤销","editor.redo.tooltip":"重做","editor.fullscreen.tooltip.fullscreen":"全屏","editor.fullscreen.tooltip.exit":"退出全屏","editor.imageUpload.fileTypeNotSupported":"不支持的文件类型","editor.imageUpload.fileSizeTooBig":"文件大小超出限制,最大大小为","editor.table.menu.insertColumnBefore":"在前面插入列","editor.table.menu.insertColumnAfter":"在后面插入列","editor.table.menu.deleteColumn":"删除列","editor.table.menu.insertRowAbove":"在上方插入行","editor.table.menu.insertRowBelow":"在下方插入行","editor.table.menu.deleteRow":"删除行","editor.table.menu.mergeCells":"合并单元格","editor.table.menu.splitCells":"拆分单元格","editor.table.menu.deleteTable":"删除表格","editor.table.menu.setCellsBgColor":"设置单元格背景色","editor.emoji.tooltip":"表情","editor.iframe.tooltip":"内嵌框架","editor.searchAndReplace.tooltip":"搜索和替换","editor.search.dialog.text":"搜索","editor.replace.dialog.text":"替换","editor.replaceAll.dialog.text":"全部替换","editor.previous.dialog.text":"上一个","editor.next.dialog.text":"下一个",no_result_found:"未找到结果","Smileys & People":"笑脸和人","Animals & Nature":"动物和自然","Food & Drink":"食物和饮料",Activity:"活动","Travel & Places":"旅行和地点",Object:"物体",Symbol:"符号",Flags:"旗帜","Frequently used":"常用","editor.formula.dialog.text":"公式","editor.katex.tooltip":"数学公式","editor.exportPdf.tooltip":"导出 PDF","editor.exportWord.tooltip":"导出 Word","editor.importWrod.tooltip":"导入 Word","editor.textDirection.tooltip":"文本方向","editor.textDirection.auto.tooltip":"自动","editor.textDirection.ltr.tooltip":"从左到右","editor.textDirection.rtl.tooltip":"从右到左","editor.attachment.tooltip":"附件","editor.attachment.uploading":"上传中","editor.attachment.please_upload":"请上传文件"},c=k,E="en",x=200,D=x-80,L=20,v=1e5,I=16,S=10,y=10,B=2,R=["#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E9E9E9","#F5F5F5","#FAFAFA","#FFFFFF","#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96","#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB","#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2","#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB","#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F","#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"],w=["Inter","Comic Sans MS, Comic Sans","serif","monospace","cursive"],N=["html","css","js","ts","bash"],U={html:"HTML",css:"CSS",js:"JavaScript",ts:"TypeScript",bash:"Bash"},z=["10px","11px","12px","14px","16px","18px","20px","22px","24px","26px","28px","36px","48px","72px"],M="default";var h=(e=>(e[e["size-small"]=200]="size-small",e[e["size-medium"]=500]="size-medium",e["size-large"]="100%",e))(h||{}),b=(e=>(e[e["size-small"]=480]="size-small",e[e["size-medium"]=640]="size-medium",e["size-large"]="100%",e))(b||{});const P=["100%","115%","150%","200%","250%","300%"],H="1",O=["bold","italic","underline","strike","code","link","divider","color","highlight","textAlign"],i={lang:E,message:{en:g,vi:m,zh_CN:c,pt_BR:u}};class W{constructor(){n(this,"emitter");this.emitter=T.mitt()}get lang(){return i.lang}set lang(t){if(!this.isLangSupported(t)){console.warn(`Can't find the current language "${t}", Using language "${i.lang}" by default`);return}i.lang=t,this.emitter.emit("lang",t)}get message(){return i.message}set message(t){i.message=t}loadLangMessage(t){return this.message[t]}isLangSupported(t){return Object.keys(this.message).includes(t)}setLang(t){this.lang=t}registerWatchLang(t){return this.emitter.on("lang",t),{unsubscribe:()=>{this.emitter.off("lang",t)}}}setMessage(t,o){this.message[t]=o}buildLocalesHandler(t){t||(t=this.lang);const o=this.loadLangMessage(t);return function(a){return o[a]||a}}}const l=new W,r=s.proxy({lang:i.lang});function q(){const e=s.useSnapshot(r),t=p.useMemo(()=>l.buildLocalesHandler(e.lang),[e.lang]);return p.useEffect(()=>{const o=l.registerWatchLang(d=>{r.lang=d});return()=>{o.unsubscribe()}},[]),{lang:e.lang,t}}const G={t:e=>l.buildLocalesHandler(r.lang)(e)},j=l;exports.BUBBLE_TEXT_LIST=O;exports.COLORS_LIST=R;exports.DEFAULT_FONT_FAMILY_LIST=w;exports.DEFAULT_FONT_SIZE_LIST=z;exports.DEFAULT_FONT_SIZE_VALUE=M;exports.DEFAULT_LANGUAGE_CODE_BLOCK=N;exports.DEFAULT_LINE_HEIGHT=H;exports.DEFAULT_LINE_HEIGHT_LIST=P;exports.EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME=D;exports.IMAGE_MAX_SIZE=v;exports.IMAGE_MIN_SIZE=L;exports.IMAGE_SIZE=h;exports.IMAGE_THROTTLE_WAIT_TIME=I;exports.MAP_LANGUAGE_CODE_LABELS=U;exports.TABLE_DEFAULT_SELECTED_GRID_SIZE=B;exports.TABLE_INIT_GRID_SIZE=S;exports.TABLE_MAX_GRID_SIZE=y;exports.VIDEO_SIZE=b;exports.en=g;exports.locale=j;exports.localeActions=G;exports.pt_BR=u;exports.useLocale=q;exports.vi=m;exports.zh_CN=c;
1
+ "use strict";var f=Object.defineProperty;var _=(e,t,o)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var n=(e,t,o)=>_(e,typeof t!="symbol"?t+"":t,o);const p=require("react"),s=require("valtio"),T=require("./utils-CI1TaU6F.cjs"),F={"editor.remove":"Remove","editor.copy":"Copy","editor.words":"WORDS","editor.characters":"CHARACTERS","editor.default":"Default","editor.recent":"Recently Used","editor.nofill":"No Fill","editor.format":"Format Painter","editor.delete":"Delete","editor.edit":"Edit","editor.settings":"Settings","editor.table_of_content":"Table of Content","editor.draghandle.tooltip":"Modify","editor.copyToClipboard":"CopyToClipboard","editor.importWord.tooltip":"Import Word","editor.slash":"Press '/' for commands","editor.slash.empty":"No Result","editor.slash.format":"Format","editor.slash.insert":"Insert","editor.slash.embed":"Embed Services","editor.content":"Please input content","editor.fontFamily.tooltip":"Font Family","editor.fontFamily.default.tooltip":"Default","editor.moremark":"More Text Styles","editor.size.small.tooltip":"Small","editor.size.medium.tooltip":"Medium","editor.size.large.tooltip":"Cover","editor.bold.tooltip":"Bold","editor.italic.tooltip":"Italic","editor.underline.tooltip":"Underline","editor.strike.tooltip":"Strike","editor.color.tooltip":"Color","editor.color.more":"More Colors","editor.highlight.tooltip":"Highlight","editor.lineheight.tooltip":"Line Height","editor.heading.tooltip":"Headings","editor.heading.h1.tooltip":"Heading 1","editor.heading.h2.tooltip":"Heading 2","editor.heading.h3.tooltip":"Heading 3","editor.heading.h4.tooltip":"Heading 4","editor.heading.h5.tooltip":"Heading 5","editor.heading.h6.tooltip":"Heading 6","editor.paragraph.tooltip":"Paragraph","editor.textalign.tooltip":"Align","editor.textalign.left.tooltip":"Left","editor.textalign.center.tooltip":"Center","editor.textalign.right.tooltip":"Right","editor.textalign.justify.tooltip":"Justify","editor.indent":"Indent","editor.indent.indent":"Increase Indent","editor.indent.outdent":"Decrease Indent","editor.fontSize.tooltip":"Font size","editor.fontSize.default.tooltip":"Default","editor.superscript.tooltip":"Superscript","editor.subscript.tooltip":"Subscript","editor.bulletlist.tooltip":"Bullet List","editor.orderedlist.tooltip":"Ordered List","editor.tasklist.tooltip":"Task List","editor.indent.tooltip":"Indent","editor.outdent.tooltip":"Outdent","editor.columns.tooltip":"Columns","editor.link.tooltip":"Link","editor.link.unlink.tooltip":"UnLink","editor.link.open.tooltip":"Open Link","editor.link.edit.tooltip":"Edit Link","editor.link.dialog.title":"Insert Link","editor.link.dialog.link":"Link","editor.link.dialog.text":"Text","editor.link.dialog.openInNewTab":"Open In New Tab","editor.link.dialog.link.placeholder":"Link Address","editor.link.dialog.text.placeholder":"Add Description","editor.link.dialog.button.apply":"Apply","editor.image.tooltip":"Image","editor.image.dragger.tooltip":"Click or drag the image to the area to upload","editor.image.float.left.tooltip":"Float left","editor.image.float.none.tooltip":"Float none","editor.image.float.right.tooltip":"Float right","editor.image.dialog.title":"Add an image","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Upload","editor.image.dialog.uploading":"Uploading","editor.image.dialog.form.link":"Link","editor.image.dialog.placeholder":"Link","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Lock original aspect ratio","editor.image.dialog.form.file":"File","editor.image.dialog.button.apply":"apply","editor.video.tooltip":"Video","editor.video.dialog.tab.upload":"Upload","editor.video.dialog.uploading":"Uploading","editor.video.dialog.title":"Embed or upload a video","editor.video.dialog.link":"link","editor.video.dialog.placeholder":"Link","editor.video.dialog.button.apply":"apply","editor.table.tooltip":"Table","editor.table.menu.insert_table":"Insert Table","editor.table.menu.insert_table.with_header_row":"With header row","editor.table.menu.add_column_before":"Add Column Before","editor.table.menu.add_column_after":"Add Column After","editor.table.menu.delete_column":"Delete Column","editor.table.menu.add_row_before":"Add Row Before","editor.table.menu.add_row_after":"Add Row After","editor.table.menu.delete_row":"Delete Row","editor.table.menu.merge_or_split_cells":"Merge Or Split Cells","editor.table.menu.delete_table":"Delete Table","editor.blockquote.tooltip":"Blockquote","editor.horizontalrule.tooltip":"Horizontal Rule","editor.code.tooltip":"Code","editor.codeblock.tooltip":"Code Block","editor.clear.tooltip":"Clear Format","editor.undo.tooltip":"Undo","editor.redo.tooltip":"Redo","editor.fullscreen.tooltip.fullscreen":"Fullscreen","editor.fullscreen.tooltip.exit":"Fullscreen Exit","editor.imageUpload.fileTypeNotSupported":"File type not supported","editor.imageUpload.fileSizeTooBig":"File size too big, Maximum size is","editor.table.menu.insertColumnBefore":"Insert Column Before","editor.table.menu.insertColumnAfter":"Insert Column After","editor.table.menu.deleteColumn":"Delete Column","editor.table.menu.insertRowAbove":"Insert Row Above","editor.table.menu.insertRowBelow":"Insert Row Below","editor.table.menu.deleteRow":"Delete Row","editor.table.menu.mergeCells":"Merge Cells","editor.table.menu.splitCells":"Split Cells","editor.table.menu.deleteTable":"Delete Table","editor.table.menu.setCellsBgColor":"Cell Background Color","editor.emoji.tooltip":"Emoji","editor.iframe.tooltip":"Iframe","editor.searchAndReplace.tooltip":"Search and Replace","editor.search.dialog.text":"Search","editor.replace.dialog.text":"Replace","editor.replaceAll.dialog.text":"Replace All","editor.previous.dialog.text":"Previous","editor.next.dialog.text":"Next",no_result_found:"No results found","Smileys & People":"Smileys & People","Animals & Nature":"Animals & Nature","Food & Drink":"Food & Drink",Activity:"Activity","Travel & Places":"Travel & Places",Object:"Objects",Symbol:"Symbols",Flags:"Flags","Frequently used":"Frequently used","editor.formula.dialog.text":"Formula","editor.katex.tooltip":"Math Formula","editor.exportPdf.tooltip":"Export PDF","editor.exportWord.tooltip":"Export Word","editor.importWrod.tooltip":"Import Word","editor.textDirection.tooltip":"Text Direction","editor.textDirection.auto.tooltip":"Auto","editor.textDirection.ltr.tooltip":"Left to Right","editor.textDirection.rtl.tooltip":"Right to Left","editor.attachment.tooltip":"Attachment","editor.attachment.uploading":"Uploading","editor.attachment.please_upload":"Please upload the file","editor.imageGif.tooltip":"Gif"},g=F,A={"editor.remove":"Remover","editor.copy":"Copiar","editor.words":"PALAVRAS","editor.characters":"CARACTERES","editor.default":"Padrão","editor.recent":"Usado recentemente","editor.nofill":"Sem preenchimento","editor.format":"Format Painter","editor.delete":"Deletar","editor.edit":"Editar","editor.settings":"Configurações","editor.table_of_content":"Tabela de conteúdos","editor.draghandle.tooltip":"Modificar","editor.copyToClipboard":"Copiar para a área de transferência","editor.importWord.tooltip":"Importar Word","editor.slash":"Pressione '/' para comandos","editor.slash.empty":"Nenhum resultado","editor.slash.format":"Formato","editor.slash.insert":"Inserir","editor.slash.embed":"Incorporar serviços","editor.content":"Por favor, insira o conteúdo","editor.fontFamily.tooltip":"Fonte","editor.fontFamily.default.tooltip":"Padrão","editor.moremark":"Mais estilos de texto","editor.size.small.tooltip":"Pequeno","editor.size.medium.tooltip":"Médio","editor.size.large.tooltip":"Grande","editor.bold.tooltip":"Negrito","editor.italic.tooltip":"Itálico","editor.underline.tooltip":"Sublinhado","editor.strike.tooltip":"Riscado","editor.color.tooltip":"Cor","editor.color.more":"Mais cores","editor.highlight.tooltip":"Destaque","editor.lineheight.tooltip":"Altura da linha","editor.heading.tooltip":"Cabeçalhos","editor.heading.h1.tooltip":"Cabeçalho 1","editor.heading.h2.tooltip":"Cabeçalho 2","editor.heading.h3.tooltip":"Cabeçalho 3","editor.heading.h4.tooltip":"Cabeçalho 4","editor.heading.h5.tooltip":"Cabeçalho 5","editor.heading.h6.tooltip":"Cabeçalho 6","editor.paragraph.tooltip":"Parágrafo","editor.textalign.tooltip":"Alinhar","editor.textalign.left.tooltip":"Esquerda","editor.textalign.center.tooltip":"Centro","editor.textalign.right.tooltip":"Direita","editor.textalign.justify.tooltip":"Justificar","editor.indent":"Recuo","editor.indent.indent":"Aumentar recuo","editor.indent.outdent":"Diminuir recuo","editor.fontSize.tooltip":"Tamanho da fonte","editor.fontSize.default.tooltip":"Padrão","editor.superscript.tooltip":"Sobrescrito","editor.subscript.tooltip":"Subscrito","editor.bulletlist.tooltip":"Lista de marcadores","editor.orderedlist.tooltip":"Lista numerada","editor.tasklist.tooltip":"Lista de tarefas","editor.indent.tooltip":"Recuo","editor.outdent.tooltip":"Diminuir recuo","editor.columns.tooltip":"Colunas","editor.link.tooltip":"Link","editor.link.unlink.tooltip":"Desvincular","editor.link.open.tooltip":"Abrir link","editor.link.edit.tooltip":"Editar link","editor.link.dialog.title":"Inserir link","editor.link.dialog.link":"Link","editor.link.dialog.text":"Texto","editor.link.dialog.openInNewTab":"Abrir em nova guia","editor.link.dialog.link.placeholder":"Endereço do link","editor.link.dialog.text.placeholder":"Texto do link","editor.link.dialog.button.apply":"Aplicar","editor.image.tooltip":"Imagem","editor.image.dragger.tooltip":"Clique ou arraste a imagem para a área de upload","editor.image.float.left.tooltip":"Flutuar à esquerda","editor.image.float.none.tooltip":"Nenhum flutuante","editor.image.float.right.tooltip":"Flutuar à direita","editor.image.dialog.title":"Adicionar uma imagem","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Enviar","editor.image.dialog.uploading":"Enviando","editor.image.dialog.form.link":"Link","editor.image.dialog.placeholder":"Link","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Bloquear proporção original","editor.image.dialog.form.file":"Arquivo","editor.image.dialog.button.apply":"aplicar","editor.video.tooltip":"Vídeo","editor.video.dialog.tab.upload":"Enviar","editor.video.dialog.uploading":"Enviando","editor.video.dialog.title":"Incorporar ou enviar um vídeo","editor.video.dialog.link":"link","editor.video.dialog.placeholder":"Link","editor.video.dialog.button.apply":"aplicar","editor.table.tooltip":"Tabela","editor.table.menu.insert_table":"Inserir tabela","editor.table.menu.insert_table.with_header_row":"Com linha de cabeçalho","editor.table.menu.add_column_before":"Adicionar coluna antes","editor.table.menu.add_column_after":"Adicionar coluna depois","editor.table.menu.delete_column":"Excluir coluna","editor.table.menu.add_row_before":"Adicionar linha antes","editor.table.menu.add_row_after":"Adicionar linha depois","editor.table.menu.delete_row":"Deletar linha","editor.table.menu.merge_or_split_cells":"Mesclar ou dividir células","editor.table.menu.delete_table":"Deletar tabela","editor.blockquote.tooltip":"Citação","editor.horizontalrule.tooltip":"Regra horizontal","editor.code.tooltip":"Código","editor.codeblock.tooltip":"Bloco de código","editor.clear.tooltip":"Limpar formato","editor.undo.tooltip":"Desfazer","editor.redo.tooltip":"Refazer","editor.fullscreen.tooltip.fullscreen":"Tela cheia","editor.fullscreen.tooltip.exit":"Sair da tela cheia","editor.imageUpload.fileTypeNotSupported":"Tipo de arquivo não suportado","editor.imageUpload.fileSizeTooBig":"Tamanho do arquivo muito grande, tamanho máximo é","editor.table.menu.insertColumnBefore":"Inserir coluna antes","editor.table.menu.insertColumnAfter":"Inserir coluna depois","editor.table.menu.deleteColumn":"Excluir coluna","editor.table.menu.insertRowAbove":"Inserir linha acima","editor.table.menu.insertRowBelow":"Inserir linha abaixo","editor.table.menu.deleteRow":"Deletar linha","editor.table.menu.mergeCells":"Mesclar células","editor.table.menu.splitCells":"Dividir células","editor.table.menu.deleteTable":"Deletar tabela","editor.table.menu.setCellsBgColor":"Cor de fundo da célula","editor.emoji.tooltip":"Emoji","editor.iframe.tooltip":"Iframe","editor.searchAndReplace.tooltip":"Pesquisar e substituir","editor.search.dialog.text":"Pesquisar","editor.replace.dialog.text":"Substituir","editor.replaceAll.dialog.text":"Substituir tudo","editor.previous.dialog.text":"Anterior","editor.next.dialog.text":"Próximo",no_result_found:"Nenhum resultado encontrado","Smileys & People":"Emoticons & Pessoas","Animals & Nature":"Animais & Natureza","Food & Drink":"Comida & Bebida",Activity:"Atividade","Travel & Places":"Viagem & Lugares",Object:"Objetos",Symbol:"Símbolos",Flags:"Bandeiras","Frequently used":"Frequentemente usado","editor.formula.dialog.text":"Fórmula","editor.katex.tooltip":"Fórmula matemática","editor.exportPdf.tooltip":"Exportar PDF","editor.exportWord.tooltip":"Exportar Word","editor.importWrod.tooltip":"Importar Word","editor.textDirection.tooltip":"Direção do texto","editor.textDirection.auto.tooltip":"Automático","editor.textDirection.ltr.tooltip":"Esquerda para Direita","editor.textDirection.rtl.tooltip":"Direita para Esquerda","editor.attachment.tooltip":"Anexo","editor.attachment.uploading":"Enviando","editor.attachment.please_upload":"Por favor, envie o arquivo","editor.imageGif.tooltip":"Gif"},u=A,C={"editor.remove":"Xóa","editor.copy":"Sao chép","editor.words":"TỪ","editor.characters":"KÝ TỰ","editor.default":"Mặc định","editor.recent":"Đã sử dụng gần đây","editor.nofill":"Không tô","editor.format":"Format Painter","editor.delete":"Xóa","editor.edit":"Chỉnh sửa","editor.settings":"Cài đặt","editor.table_of_content":"Mục lục","editor.draghandle.tooltip":"Sửa đổi","editor.copyToClipboard":"CopyToClipboard","editor.importWord.tooltip":"Nhập Word","editor.slash":"Nhấn '/' để biết lệnh","editor.slash.empty":"Không có kết quả","editor.slash.format":"Định dạng","editor.slash.insert":"Chèn","editor.slash.embed":"Dịch vụ nhúng","editor.content":"Vui lòng nhập nội dung","editor.moremark":"Nhiều kiểu văn bản hơn","editor.size.small.tooltip":"Nhỏ","editor.fontFamily.tooltip":"Phông chữ","editor.fontFamily.default.tooltip":"Mặc định","editor.size.medium.tooltip":"Trung bình","editor.size.large.tooltip":"Lớn","editor.bold.tooltip":"Đậm","editor.italic.tooltip":"In nghiêng","editor.underline.tooltip":"Gạch chân","editor.strike.tooltip":"Gạch","editor.color.tooltip":"Màu","editor.color.more":"Nhiều màu hơn","editor.highlight.tooltip":"Đánh dấu","editor.lineheight.tooltip":"Chiều cao dòng","editor.heading.tooltip":"Tiêu đề","editor.heading.h1.tooltip":"Tiêu đề 1","editor.heading.h2.tooltip":"Tiêu đề 2","editor.heading.h3.tooltip":"Tiêu đề 3","editor.heading.h4.tooltip":"Tiêu đề 4","editor.heading.h5.tooltip":"Tiêu đề 5","editor.heading.h6.tooltip":"Tiêu đề 6","editor.paragraph.tooltip":"Đoạn văn","editor.textalign.tooltip":"Căn chỉnh","editor.textalign.left.tooltip":"Trái","editor.textalign.center.tooltip":"Giữa","editor.textalign.right.tooltip":"Phải","editor.textalign.justify.tooltip":"Căn đều","editor.indent":"Thụt lề","editor.indent.indent":"Tăng thụt lề","editor.indent.outdent":"Giảm thụt lề","editor.fontSize.tooltip":"Kích thước phông chữ","editor.fontSize.default.tooltip":"Mặc định","editor.superscript.tooltip":"Chỉ số trên","editor.subscript.tooltip":"Chỉ số dưới","editor.bulletlist.tooltip":"Danh sách dấu đầu dòng","editor.orderedlist.tooltip":"Danh sách có thứ tự","editor.tasklist.tooltip":"Danh sách tác vụ","editor.indent.tooltip":"Tăng thụt lề","editor.outdent.tooltip":"Giảm thụt lề","editor.columns.tooltip":"Cột","editor.link.tooltip":"Liên kết","editor.link.unlink.tooltip":"Hủy liên kết","editor.link.open.tooltip":"Mở liên kết","editor.link.edit.tooltip":"Chỉnh sửa liên kết","editor.link.dialog.title":"Chèn liên kết","editor.link.dialog.link":"Liên kết","editor.link.dialog.text":"Văn bản","editor.link.dialog.openInNewTab":"Mở trong tab mới","editor.link.dialog.link.placeholder":"Địa chỉ liên kết","editor.link.dialog.text.placeholder":"Thêm mô tả","editor.link.dialog.button.apply":"Áp dụng","editor.image.tooltip":"Hình ảnh","editor.image.dragger.tooltip":"Nhấp hoặc kéo hình ảnh đến khu vực để tải lên","editor.image.float.left.tooltip":"Trôi sang trái","editor.image.float.none.tooltip":"Trôi không","editor.image.float.right.tooltip":"Trôi sang phải","editor.image.dialog.title":"Thêm hình ảnh","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Tải lên","editor.image.dialog.uploading":"Đang tải lên","editor.image.dialog.form.link":"Liên kết","editor.image.dialog.placeholder":"Liên kết","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Khóa tỷ lệ khung hình gốc","editor.image.dialog.form.file":"Tệp","editor.image.dialog.button.apply":"áp dụng","editor.video.tooltip":"Video","editor.video.dialog.tab.upload":"Tải lên","editor.video.dialog.uploading":"Đang tải lên","editor.video.dialog.title":"Nhúng hoặc tải lên video","editor.video.dialog.link":"liên kết","editor.video.dialog.placeholder":"Liên kết","editor.video.dialog.button.apply":"áp dụng","editor.table.tooltip":"Bảng","editor.table.menu.insert_table":"Chèn Bảng","editor.table.menu.insert_table.with_header_row":"Có hàng tiêu đề","editor.table.menu.add_column_before":"Thêm Cột Trước","editor.table.menu.add_column_after":"Thêm Cột Sau","editor.table.menu.delete_column":"Xóa Cột","editor.table.menu.add_row_before":"Thêm Hàng Trước","editor.table.menu.add_row_after":"Thêm Hàng Sau","editor.table.menu.delete_row":"Xóa Hàng","editor.table.menu.merge_or_split_cells":"Gộp Hoặc Tách Ô","editor.table.menu.delete_table":"Xóa Bảng","editor.blockquote.tooltip":"Blockquote","editor.horizontalrule.tooltip":"Quy tắc ngang","editor.code.tooltip":"Mã","editor.codeblock.tooltip":"Khối mã","editor.clear.tooltip":"Xóa định dạng","editor.undo.tooltip":"Hoàn tác","editor.redo.tooltip":"Làm lại","editor.fullscreen.tooltip.fullscreen":"Toàn màn hình","editor.fullscreen.tooltip.exit":"Thoát toàn màn hình","editor.imageUpload.fileTypeNotSupported":"Loại tệp không được hỗ trợ","editor.imageUpload.fileSizeTooBig":"Kích thước tệp quá lớn, Kích thước tối đa là","editor.table.menu.insertColumnBefore":"Chèn cột trước","editor.table.menu.insertColumnAfter":"Chèn cột sau","editor.table.menu.deleteColumn":"Xóa cột","editor.table.menu.insertRowAbove":"Chèn hàng ở trên","editor.table.menu.insertRowBelow":"Chèn hàng ở dưới","editor.table.menu.deleteRow":"Xóa hàng","editor.table.menu.mergeCells":"Gộp các ô","editor.table.menu.splitCells":"Chia ô","editor.table.menu.deleteTable":"Xóa bảng","editor.table.menu.setCellsBgColor":"Màu nền ô","editor.emoji.tooltip":"Biểu tượng","editor.iframe.tooltip":"Iframe","editor.searchAndReplace.tooltip":"Tìm kiếm và thay thế","editor.search.dialog.text":"Tìm kiếm","editor.replace.dialog.text":"Thay thế","editor.replaceAll.dialog.text":"Thay thế tất cả","editor.previous.dialog.text":"Trước","editor.next.dialog.text":"Tiếp theo",no_result_found:"Không tìm thấy kết quả","Smileys & People":"Cười & Mọi người","Animals & Nature":"Động vật & Thiên nhiên","Food & Drink":"Thức ăn & Đồ uống",Activity:"Hoạt động","Travel & Places":"Du lịch & Địa điểm",Object:"Vật",Symbol:"Ký hiệu",Flags:"Cờ","Frequently used":"Thường xuyên sử dụng","editor.formula.dialog.text":"Công thức","editor.katex.tooltip":"Công thức toán học","editor.exportPdf.tooltip":"Xuất PDF","editor.exportWord.tooltip":"Xuất Word","editor.importWrod.tooltip":"Nhập Word","editor.textDirection.tooltip":"Hướng văn bản","editor.textDirection.auto.tooltip":"Tự động","editor.textDirection.ltr.tooltip":"Trái sang Phải","editor.textDirection.rtl.tooltip":"Phải sang Trái","editor.attachment.tooltip":"Đính kèm","editor.attachment.uploading":"Đang tải lên","editor.attachment.please_upload":"Vui lòng tải lên tệp","editor.imageGif.tooltip":"Gif"},m=C,k={"editor.remove":"移除","editor.copy":"复制","editor.words":"字数","editor.characters":"字符数","editor.default":"默认","editor.recent":"最近使用","editor.nofill":"无填充","editor.format":"格式刷","editor.delete":"删除","editor.edit":"编辑","editor.settings":"设置","editor.table_of_content":"目录","editor.draghandle.tooltip":"修改","editor.copyToClipboard":"复制到剪贴板","editor.importWord.tooltip":"导入 Word","editor.slash":"按 '/' 使用命令","editor.slash.empty":"无结果","editor.slash.format":"格式","editor.slash.insert":"插入","editor.slash.embed":"嵌入服务","editor.content":"请输入内容","editor.fontFamily.tooltip":"字体","editor.fontFamily.default.tooltip":"默认","editor.moremark":"更多文本样式","editor.size.small.tooltip":"小","editor.size.medium.tooltip":"中","editor.size.large.tooltip":"封面","editor.bold.tooltip":"粗体","editor.italic.tooltip":"斜体","editor.underline.tooltip":"下划线","editor.strike.tooltip":"删除线","editor.color.tooltip":"颜色","editor.color.more":"更多颜色","editor.highlight.tooltip":"高亮","editor.lineheight.tooltip":"行高","editor.heading.tooltip":"标题","editor.heading.h1.tooltip":"标题 1","editor.heading.h2.tooltip":"标题 2","editor.heading.h3.tooltip":"标题 3","editor.heading.h4.tooltip":"标题 4","editor.heading.h5.tooltip":"标题 5","editor.heading.h6.tooltip":"标题 6","editor.paragraph.tooltip":"段落","editor.textalign.tooltip":"对齐","editor.textalign.left.tooltip":"左对齐","editor.textalign.center.tooltip":"居中","editor.textalign.right.tooltip":"右对齐","editor.textalign.justify.tooltip":"两端对齐","editor.indent":"缩进","editor.indent.indent":"增加缩进","editor.indent.outdent":"减少缩进","editor.fontSize.tooltip":"字号","editor.fontSize.default.tooltip":"默认","editor.superscript.tooltip":"上标","editor.subscript.tooltip":"下标","editor.bulletlist.tooltip":"无序列表","editor.orderedlist.tooltip":"有序列表","editor.tasklist.tooltip":"任务列表","editor.indent.tooltip":"缩进","editor.outdent.tooltip":"减少缩进","editor.columns.tooltip":"列","editor.link.tooltip":"链接","editor.link.unlink.tooltip":"取消链接","editor.link.open.tooltip":"打开链接","editor.link.edit.tooltip":"编辑链接","editor.link.dialog.title":"插入链接","editor.link.dialog.link":"链接","editor.link.dialog.text":"文本","editor.link.dialog.openInNewTab":"在新标签页中打开","editor.link.dialog.link.placeholder":"链接地址","editor.link.dialog.text.placeholder":"添加描述","editor.link.dialog.button.apply":"应用","editor.image.tooltip":"图片","editor.image.dragger.tooltip":"点击或拖拽图片到此区域上传","editor.image.float.left.tooltip":"左浮动","editor.image.float.none.tooltip":"无浮动","editor.image.float.right.tooltip":"右浮动","editor.image.dialog.title":"添加图片","editor.image.dialog.tab.url":"链接","editor.image.dialog.tab.upload":"上传","editor.image.dialog.uploading":"上传中","editor.image.dialog.form.link":"链接","editor.image.dialog.placeholder":"链接","editor.image.dialog.form.alt":"替代文本","editor.image.dialog.form.aspectRatio":"锁定原始宽高比","editor.image.dialog.form.file":"文件","editor.image.dialog.button.apply":"应用","editor.video.tooltip":"视频","editor.video.dialog.tab.upload":"上传","editor.video.dialog.uploading":"上传中","editor.video.dialog.title":"嵌入或上传视频","editor.video.dialog.link":"链接","editor.video.dialog.placeholder":"链接","editor.video.dialog.button.apply":"应用","editor.table.tooltip":"表格","editor.table.menu.insert_table":"插入表格","editor.table.menu.insert_table.with_header_row":"带标题行","editor.table.menu.add_column_before":"在前面插入列","editor.table.menu.add_column_after":"在后面插入列","editor.table.menu.delete_column":"删除列","editor.table.menu.add_row_before":"在上方插入行","editor.table.menu.add_row_after":"在下方插入行","editor.table.menu.delete_row":"删除行","editor.table.menu.merge_or_split_cells":"合并或拆分单元格","editor.table.menu.delete_table":"删除表格","editor.blockquote.tooltip":"引用","editor.horizontalrule.tooltip":"水平线","editor.code.tooltip":"代码","editor.codeblock.tooltip":"代码块","editor.clear.tooltip":"清除格式","editor.undo.tooltip":"撤销","editor.redo.tooltip":"重做","editor.fullscreen.tooltip.fullscreen":"全屏","editor.fullscreen.tooltip.exit":"退出全屏","editor.imageUpload.fileTypeNotSupported":"不支持的文件类型","editor.imageUpload.fileSizeTooBig":"文件大小超出限制,最大大小为","editor.table.menu.insertColumnBefore":"在前面插入列","editor.table.menu.insertColumnAfter":"在后面插入列","editor.table.menu.deleteColumn":"删除列","editor.table.menu.insertRowAbove":"在上方插入行","editor.table.menu.insertRowBelow":"在下方插入行","editor.table.menu.deleteRow":"删除行","editor.table.menu.mergeCells":"合并单元格","editor.table.menu.splitCells":"拆分单元格","editor.table.menu.deleteTable":"删除表格","editor.table.menu.setCellsBgColor":"设置单元格背景色","editor.emoji.tooltip":"表情","editor.iframe.tooltip":"内嵌框架","editor.searchAndReplace.tooltip":"搜索和替换","editor.search.dialog.text":"搜索","editor.replace.dialog.text":"替换","editor.replaceAll.dialog.text":"全部替换","editor.previous.dialog.text":"上一个","editor.next.dialog.text":"下一个",no_result_found:"未找到结果","Smileys & People":"笑脸和人","Animals & Nature":"动物和自然","Food & Drink":"食物和饮料",Activity:"活动","Travel & Places":"旅行和地点",Object:"物体",Symbol:"符号",Flags:"旗帜","Frequently used":"常用","editor.formula.dialog.text":"公式","editor.katex.tooltip":"数学公式","editor.exportPdf.tooltip":"导出 PDF","editor.exportWord.tooltip":"导出 Word","editor.importWrod.tooltip":"导入 Word","editor.textDirection.tooltip":"文本方向","editor.textDirection.auto.tooltip":"自动","editor.textDirection.ltr.tooltip":"从左到右","editor.textDirection.rtl.tooltip":"从右到左","editor.attachment.tooltip":"附件","editor.attachment.uploading":"上传中","editor.attachment.please_upload":"请上传文件","editor.imageGif.tooltip":"Gif"},c=k,E="en",x=200,D=x-80,L=20,v=1e5,I=16,S=10,y=10,B=2,R=["#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E9E9E9","#F5F5F5","#FAFAFA","#FFFFFF","#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96","#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB","#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2","#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB","#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F","#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"],w=["Inter","Comic Sans MS, Comic Sans","serif","monospace","cursive"],N=["html","css","js","ts","bash"],U={html:"HTML",css:"CSS",js:"JavaScript",ts:"TypeScript",bash:"Bash"},z=["10px","11px","12px","14px","16px","18px","20px","22px","24px","26px","28px","36px","48px","72px"],M="default";var h=(e=>(e[e["size-small"]=200]="size-small",e[e["size-medium"]=500]="size-medium",e["size-large"]="100%",e))(h||{}),b=(e=>(e[e["size-small"]=480]="size-small",e[e["size-medium"]=640]="size-medium",e["size-large"]="100%",e))(b||{});const P=["100%","115%","150%","200%","250%","300%"],H="1",G=["bold","italic","underline","strike","code","link","divider","color","highlight","textAlign"],i={lang:E,message:{en:g,vi:m,zh_CN:c,pt_BR:u}};class O{constructor(){n(this,"emitter");this.emitter=T.mitt()}get lang(){return i.lang}set lang(t){if(!this.isLangSupported(t)){console.warn(`Can't find the current language "${t}", Using language "${i.lang}" by default`);return}i.lang=t,this.emitter.emit("lang",t)}get message(){return i.message}set message(t){i.message=t}loadLangMessage(t){return this.message[t]}isLangSupported(t){return Object.keys(this.message).includes(t)}setLang(t){this.lang=t}registerWatchLang(t){return this.emitter.on("lang",t),{unsubscribe:()=>{this.emitter.off("lang",t)}}}setMessage(t,o){this.message[t]=o}buildLocalesHandler(t){t||(t=this.lang);const o=this.loadLangMessage(t);return function(a){return o[a]||a}}}const l=new O,r=s.proxy({lang:i.lang});function W(){const e=s.useSnapshot(r),t=p.useMemo(()=>l.buildLocalesHandler(e.lang),[e.lang]);return p.useEffect(()=>{const o=l.registerWatchLang(d=>{r.lang=d});return()=>{o.unsubscribe()}},[]),{lang:e.lang,t}}const q={t:e=>l.buildLocalesHandler(r.lang)(e)},j=l;exports.BUBBLE_TEXT_LIST=G;exports.COLORS_LIST=R;exports.DEFAULT_FONT_FAMILY_LIST=w;exports.DEFAULT_FONT_SIZE_LIST=z;exports.DEFAULT_FONT_SIZE_VALUE=M;exports.DEFAULT_LANGUAGE_CODE_BLOCK=N;exports.DEFAULT_LINE_HEIGHT=H;exports.DEFAULT_LINE_HEIGHT_LIST=P;exports.EDITOR_UPDATE_WATCH_THROTTLE_WAIT_TIME=D;exports.IMAGE_MAX_SIZE=v;exports.IMAGE_MIN_SIZE=L;exports.IMAGE_SIZE=h;exports.IMAGE_THROTTLE_WAIT_TIME=I;exports.MAP_LANGUAGE_CODE_LABELS=U;exports.TABLE_DEFAULT_SELECTED_GRID_SIZE=B;exports.TABLE_INIT_GRID_SIZE=S;exports.TABLE_MAX_GRID_SIZE=y;exports.VIDEO_SIZE=b;exports.en=g;exports.locale=j;exports.localeActions=q;exports.pt_BR=u;exports.useLocale=W;exports.vi=m;exports.zh_CN=c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./utils-DsfrMoWH.cjs"),t=require("./locales-DW0kNOk_.cjs");exports.Attachment=e.Attachment;exports.BaseKit=e.BaseKit;exports.Blockquote=e.Blockquote;exports.Bold=e.Bold;exports.BulletList=e.BulletList;exports.Clear=e.Clear;exports.Code=e.Code;exports.CodeBlock=e.CodeBlock;exports.Color=e.Color;exports.Column=e.Column;exports.ColumnActionButton=e.ColumnActionButton;exports.Emoji=e.Emoji;exports.Excalidraw=e.Excalidraw;exports.ExportPdf=e.ExportPdf;exports.ExportWord=e.ExportWord;exports.FontFamily=e.FontFamily;exports.FontSize=e.FontSize;exports.FormatPainter=e.FormatPainter;exports.Heading=e.Heading;exports.Highlight=e.Highlight;exports.History=e.History;exports.HorizontalRule=e.HorizontalRule;exports.Iframe=e.Iframe;exports.Image=e.Image;exports.ImageUpload=e.ImageUpload;exports.ImportWord=e.ImportWord;exports.Indent=e.Indent;exports.Italic=e.Italic;exports.Katex=e.Katex;exports.LineHeight=e.LineHeight;exports.Link=e.Link;exports.Mention=e.Mention;exports.MoreMark=e.MoreMark;exports.MultiColumn=e.MultiColumn;exports.OrderedList=e.OrderedList;exports.SearchAndReplace=e.SearchAndReplace;exports.SlashCommand=e.SlashCommand;exports.Strike=e.Strike;exports.SubAndSuperScript=e.SubAndSuperScript;exports.Table=e.Table;exports.TableOfContents=e.TableOfContents;exports.TaskList=e.TaskList;exports.TextAlign=e.TextAlign;exports.TextDirection=e.TextDirection;exports.Underline=e.Underline;exports.Video=e.Video;exports.VideoUpload=e.VideoUpload;exports.default=e.RichTextEditor;exports.en=t.en;exports.locale=t.locale;exports.pt_BR=t.pt_BR;exports.vi=t.vi;exports.zh_CN=t.zh_CN;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./utils-CI1TaU6F.cjs"),t=require("./locales-QV4-bvb6.cjs");exports.Attachment=e.Attachment;exports.BaseKit=e.BaseKit;exports.Blockquote=e.Blockquote;exports.Bold=e.Bold;exports.BulletList=e.BulletList;exports.Clear=e.Clear;exports.Code=e.Code;exports.CodeBlock=e.CodeBlock;exports.Color=e.Color;exports.Column=e.Column;exports.ColumnActionButton=e.ColumnActionButton;exports.Emoji=e.Emoji;exports.Excalidraw=e.Excalidraw;exports.ExportPdf=e.ExportPdf;exports.ExportWord=e.ExportWord;exports.FontFamily=e.FontFamily;exports.FontSize=e.FontSize;exports.FormatPainter=e.FormatPainter;exports.Heading=e.Heading;exports.Highlight=e.Highlight;exports.History=e.History;exports.HorizontalRule=e.HorizontalRule;exports.Iframe=e.Iframe;exports.Image=e.Image;exports.ImageGif=e.ImageGif;exports.ImageUpload=e.ImageUpload;exports.ImportWord=e.ImportWord;exports.Indent=e.Indent;exports.Italic=e.Italic;exports.Katex=e.Katex;exports.LineHeight=e.LineHeight;exports.Link=e.Link;exports.Mention=e.Mention;exports.MoreMark=e.MoreMark;exports.MultiColumn=e.MultiColumn;exports.OrderedList=e.OrderedList;exports.SearchAndReplace=e.SearchAndReplace;exports.SlashCommand=e.SlashCommand;exports.Strike=e.Strike;exports.SubAndSuperScript=e.SubAndSuperScript;exports.Table=e.Table;exports.TableOfContents=e.TableOfContents;exports.TaskList=e.TaskList;exports.TextAlign=e.TextAlign;exports.TextDirection=e.TextDirection;exports.Underline=e.Underline;exports.Video=e.Video;exports.VideoUpload=e.VideoUpload;exports.default=e.RichTextEditor;exports.en=t.en;exports.locale=t.locale;exports.pt_BR=t.pt_BR;exports.vi=t.vi;exports.zh_CN=t.zh_CN;
@@ -1,5 +1,5 @@
1
- import { W as e, k as o, h as t, B as i, e as l, f as n, C as r, a as d, c as m, v as p, x as c, E as u, N as C, A as x, G as g, F as h, b as k, u as B, H as S, d as f, j as I, i as A, y as H, q as L, r as T, D as z, n as E, I as F, K as M, o as b, L as R, Q as U, M as v, w as y, O as K, z as O, p as P, S as V, l as W, t as j, J as q, g as w, T as D, P as N, U as _, V as G, s as J, R as Q } from "./utils-T9ISD9dj.js";
2
- import { m as Y, k as Z, p as $, v as aa, z as sa } from "./locales-OugoBR7C.js";
1
+ import { W as e, k as o, h as t, B as i, e as l, f as n, C as r, a as d, c as m, v as p, x as c, E as u, N as C, A as g, G as x, F as f, b as h, u as k, H as B, d as I, j as S, i as A, y as H, q as L, X as T, r as z, D as E, n as F, I as M, K as b, o as R, L as U, Q as v, M as y, w as K, O, z as P, p as V, S as W, l as j, t as q, J as w, g as D, T as G, P as N, U as _, V as J, s as Q, R as X } from "./utils-BGidOjdA.js";
2
+ import { m as Z, k as $, p as aa, v as sa, z as ea } from "./locales-BWnJn4at.js";
3
3
  export {
4
4
  e as Attachment,
5
5
  o as BaseKit,
@@ -14,44 +14,45 @@ export {
14
14
  c as ColumnActionButton,
15
15
  u as Emoji,
16
16
  C as Excalidraw,
17
- x as ExportPdf,
18
- g as ExportWord,
19
- h as FontFamily,
20
- k as FontSize,
21
- B as FormatPainter,
22
- S as Heading,
23
- f as Highlight,
24
- I as History,
17
+ g as ExportPdf,
18
+ x as ExportWord,
19
+ f as FontFamily,
20
+ h as FontSize,
21
+ k as FormatPainter,
22
+ B as Heading,
23
+ I as Highlight,
24
+ S as History,
25
25
  A as HorizontalRule,
26
26
  H as Iframe,
27
27
  L as Image,
28
- T as ImageUpload,
29
- z as ImportWord,
30
- E as Indent,
31
- F as Italic,
32
- M as Katex,
33
- b as LineHeight,
34
- R as Link,
35
- U as Mention,
36
- v as MoreMark,
37
- y as MultiColumn,
38
- K as OrderedList,
39
- O as SearchAndReplace,
40
- P as SlashCommand,
41
- V as Strike,
42
- W as SubAndSuperScript,
43
- j as Table,
44
- q as TableOfContents,
45
- w as TaskList,
46
- D as TextAlign,
28
+ T as ImageGif,
29
+ z as ImageUpload,
30
+ E as ImportWord,
31
+ F as Indent,
32
+ M as Italic,
33
+ b as Katex,
34
+ R as LineHeight,
35
+ U as Link,
36
+ v as Mention,
37
+ y as MoreMark,
38
+ K as MultiColumn,
39
+ O as OrderedList,
40
+ P as SearchAndReplace,
41
+ V as SlashCommand,
42
+ W as Strike,
43
+ j as SubAndSuperScript,
44
+ q as Table,
45
+ w as TableOfContents,
46
+ D as TaskList,
47
+ G as TextAlign,
47
48
  N as TextDirection,
48
49
  _ as Underline,
49
- G as Video,
50
- J as VideoUpload,
51
- Q as default,
52
- Y as en,
53
- Z as locale,
54
- $ as pt_BR,
55
- aa as vi,
56
- sa as zh_CN
50
+ J as Video,
51
+ Q as VideoUpload,
52
+ X as default,
53
+ Z as en,
54
+ $ as locale,
55
+ aa as pt_BR,
56
+ sa as vi,
57
+ ea as zh_CN
57
58
  };
@@ -1,4 +1,4 @@
1
- "use strict";const ke=require("tippy.js"),m=require("./vendor-B2T_cfgG.cjs"),L=require("react"),re=require("react-dom");function lt(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:s}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return s},get tr(){return r=n.selection,s=n.doc,o=n.storedMarks,n}}}class ct{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:n,state:r}=this,{view:s}=n,{tr:o}=r,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>{const d=l(...u)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:s,state:o}=this,{view:i}=s,a=[],l=!!t,c=t||o.tr,u=()=>(!l&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(c),a.every(p=>p===!0)),d={...Object.fromEntries(Object.entries(r).map(([p,h])=>[p,(...g)=>{const b=this.buildProps(c,n),y=h(...g)(b);return a.push(y),d}])),run:u};return d}createCan(t){const{rawCommands:n,state:r}=this,s=!1,o=t||r.tr,i=this.buildProps(o,s);return{...Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...u)=>c(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,s)}}buildProps(t,n=!0){const{rawCommands:r,editor:s,state:o}=this,{view:i}=s,a={tr:t,editor:s,view:i,state:lt({state:o,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}class Te{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){const r=this.callbacks[t];return r&&r.forEach(s=>s.apply(this,n)),this}off(t,n){const r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(s=>s!==n):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function S(e,t,n){return e.config[t]===void 0&&e.parent?S(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?S(e.parent,t,n):null}):e.config[t]}function dt(e){const t=e.filter(s=>s.type==="extension"),n=e.filter(s=>s.type==="node"),r=e.filter(s=>s.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function se(e){const t=[],{nodeExtensions:n,markExtensions:r}=dt(e),s=[...n,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(i=>{const a={name:i.name,options:i.options,storage:i.storage,extensions:s},l=S(i,"addGlobalAttributes",a);if(!l)return;l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([p,h])=>{t.push({type:d,name:p,attribute:{...o,...h}})})})})}),s.forEach(i=>{const a={name:i.name,options:i.options,storage:i.storage},l=S(i,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{const p={...o,...d};typeof(p==null?void 0:p.default)=="function"&&(p.default=p.default()),p!=null&&p.isRequired&&(p==null?void 0:p.default)===void 0&&delete p.default,t.push({type:i.name,name:u,attribute:p})})}),t}function R(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function x(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([s,o])=>{if(!r[s]){r[s]=o;return}if(s==="class"){const a=o?o.split(" "):[],l=r[s]?r[s].split(" "):[],c=a.filter(u=>!l.includes(u));r[s]=[...l,...c].join(" ")}else if(s==="style"){const a=o?o.split(";").map(u=>u.trim()).filter(Boolean):[],l=r[s]?r[s].split(";").map(u=>u.trim()).filter(Boolean):[],c=new Map;l.forEach(u=>{const[d,p]=u.split(":").map(h=>h.trim());c.set(d,p)}),a.forEach(u=>{const[d,p]=u.split(":").map(h=>h.trim());c.set(d,p)}),r[s]=Array.from(c.entries()).map(([u,d])=>`${u}: ${d}`).join("; ")}else r[s]=o}),r},{})}function ot(e,t){return t.filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>x(n,r),{})}function oe(e){return typeof e=="function"}function E(e,t=void 0,...n){return oe(e)?t?e.bind(t)(...n):e(...n):e}function we(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Ee(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function jt(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const s=t.reduce((o,i)=>{const a=i.attribute.parseHTML?i.attribute.parseHTML(n):Ee(n.getAttribute(i.name));return a==null?o:{...o,[i.name]:a}},{});return{...r,...s}}}}function Ft(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&we(n)?!1:n!=null))}function Ce(e,t){var n;const r=se(e),{nodeExtensions:s,markExtensions:o}=dt(e),i=(n=s.find(c=>S(c,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(s.map(c=>{const u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:t},p=e.reduce((y,T)=>{const v=S(T,"extendNodeSchema",d);return{...y,...v?v(c):{}}},{}),h=Ft({...p,content:E(S(c,"content",d)),marks:E(S(c,"marks",d)),group:E(S(c,"group",d)),inline:E(S(c,"inline",d)),atom:E(S(c,"atom",d)),selectable:E(S(c,"selectable",d)),draggable:E(S(c,"draggable",d)),code:E(S(c,"code",d)),whitespace:E(S(c,"whitespace",d)),defining:E(S(c,"defining",d)),isolating:E(S(c,"isolating",d)),attrs:Object.fromEntries(u.map(y=>{var T;return[y.name,{default:(T=y==null?void 0:y.attribute)===null||T===void 0?void 0:T.default}]}))}),f=E(S(c,"parseHTML",d));f&&(h.parseDOM=f.map(y=>jt(y,u)));const g=S(c,"renderHTML",d);g&&(h.toDOM=y=>g({node:y,HTMLAttributes:ot(y,u)}));const b=S(c,"renderText",d);return b&&(h.toText=b),[c.name,h]})),l=Object.fromEntries(o.map(c=>{const u=r.filter(b=>b.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:t},p=e.reduce((b,y)=>{const T=S(y,"extendMarkSchema",d);return{...b,...T?T(c):{}}},{}),h=Ft({...p,inclusive:E(S(c,"inclusive",d)),excludes:E(S(c,"excludes",d)),group:E(S(c,"group",d)),spanning:E(S(c,"spanning",d)),code:E(S(c,"code",d)),attrs:Object.fromEntries(u.map(b=>{var y;return[b.name,{default:(y=b==null?void 0:b.attribute)===null||y===void 0?void 0:y.default}]}))}),f=E(S(c,"parseHTML",d));f&&(h.parseDOM=f.map(b=>jt(b,u)));const g=S(c,"renderHTML",d);return g&&(h.toDOM=b=>g({mark:b,HTMLAttributes:ot(b,u)})),[c.name,h]}));return new m.Schema({topNode:i,nodes:a,marks:l})}function St(e,t){return t.nodes[e]||t.marks[e]||null}function zt(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}const xe=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(s,o,i,a)=>{var l,c;const u=((c=(l=s.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:s,pos:o,parent:i,index:a}))||s.textContent||"%leaf%";n+=s.isAtom&&!s.isText?u:u.slice(0,Math.max(0,r-o))}),n};function It(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class ut{constructor(t){this.find=t.find,this.handler=t.handler}}const Ae=(e,t)=>{if(It(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function tt(e){var t;const{editor:n,from:r,to:s,text:o,rules:i,plugin:a}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((t=c.nodeBefore||c.nodeAfter)===null||t===void 0)&&t.marks.find(p=>p.type.spec.code))return!1;let u=!1;const d=xe(c)+o;return i.forEach(p=>{if(u)return;const h=Ae(d,p.find);if(!h)return;const f=l.state.tr,g=lt({state:l.state,transaction:f}),b={from:r-(h[0].length-o.length),to:s},{commands:y,chain:T,can:v}=new ct({editor:n,state:g});p.handler({state:g,range:b,match:h,commands:y,chain:T,can:v})===null||!f.steps.length||(f.setMeta(a,{transform:f,from:r,to:s,text:o}),l.dispatch(f),u=!0)}),u}function Le(e){const{editor:t,rules:n}=e,r=new m.Plugin({state:{init(){return null},apply(s,o){const i=s.getMeta(r);if(i)return i;const a=s.getMeta("applyInputRules");return!!a&&setTimeout(()=>{const{from:c,text:u}=a,d=c+u.length;tt({editor:t,from:c,to:d,text:u,rules:n,plugin:r})}),s.selectionSet||s.docChanged?null:o}},props:{handleTextInput(s,o,i,a){return tt({editor:t,from:o,to:i,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:o}=s.state.selection;o&&tt({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(s,o){if(o.key!=="Enter")return!1;const{$cursor:i}=s.state.selection;return i?tt({editor:t,from:i.pos,to:i.pos,text:`
1
+ "use strict";const ke=require("tippy.js"),m=require("./vendor-BHlXBvPI.cjs"),L=require("react"),re=require("react-dom");function lt(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:s}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return s},get tr(){return r=n.selection,s=n.doc,o=n.storedMarks,n}}}class ct{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:n,state:r}=this,{view:s}=n,{tr:o}=r,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>{const d=l(...u)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,n=!0){const{rawCommands:r,editor:s,state:o}=this,{view:i}=s,a=[],l=!!t,c=t||o.tr,u=()=>(!l&&n&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(c),a.every(p=>p===!0)),d={...Object.fromEntries(Object.entries(r).map(([p,h])=>[p,(...g)=>{const b=this.buildProps(c,n),y=h(...g)(b);return a.push(y),d}])),run:u};return d}createCan(t){const{rawCommands:n,state:r}=this,s=!1,o=t||r.tr,i=this.buildProps(o,s);return{...Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...u)=>c(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,s)}}buildProps(t,n=!0){const{rawCommands:r,editor:s,state:o}=this,{view:i}=s,a={tr:t,editor:s,view:i,state:lt({state:o,transaction:t}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(t,n),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}class Te{constructor(){this.callbacks={}}on(t,n){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(n),this}emit(t,...n){const r=this.callbacks[t];return r&&r.forEach(s=>s.apply(this,n)),this}off(t,n){const r=this.callbacks[t];return r&&(n?this.callbacks[t]=r.filter(s=>s!==n):delete this.callbacks[t]),this}removeAllListeners(){this.callbacks={}}}function S(e,t,n){return e.config[t]===void 0&&e.parent?S(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?S(e.parent,t,n):null}):e.config[t]}function dt(e){const t=e.filter(s=>s.type==="extension"),n=e.filter(s=>s.type==="node"),r=e.filter(s=>s.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function se(e){const t=[],{nodeExtensions:n,markExtensions:r}=dt(e),s=[...n,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach(i=>{const a={name:i.name,options:i.options,storage:i.storage,extensions:s},l=S(i,"addGlobalAttributes",a);if(!l)return;l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([p,h])=>{t.push({type:d,name:p,attribute:{...o,...h}})})})})}),s.forEach(i=>{const a={name:i.name,options:i.options,storage:i.storage},l=S(i,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([u,d])=>{const p={...o,...d};typeof(p==null?void 0:p.default)=="function"&&(p.default=p.default()),p!=null&&p.isRequired&&(p==null?void 0:p.default)===void 0&&delete p.default,t.push({type:i.name,name:u,attribute:p})})}),t}function R(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function x(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([s,o])=>{if(!r[s]){r[s]=o;return}if(s==="class"){const a=o?o.split(" "):[],l=r[s]?r[s].split(" "):[],c=a.filter(u=>!l.includes(u));r[s]=[...l,...c].join(" ")}else if(s==="style"){const a=o?o.split(";").map(u=>u.trim()).filter(Boolean):[],l=r[s]?r[s].split(";").map(u=>u.trim()).filter(Boolean):[],c=new Map;l.forEach(u=>{const[d,p]=u.split(":").map(h=>h.trim());c.set(d,p)}),a.forEach(u=>{const[d,p]=u.split(":").map(h=>h.trim());c.set(d,p)}),r[s]=Array.from(c.entries()).map(([u,d])=>`${u}: ${d}`).join("; ")}else r[s]=o}),r},{})}function ot(e,t){return t.filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>x(n,r),{})}function oe(e){return typeof e=="function"}function E(e,t=void 0,...n){return oe(e)?t?e.bind(t)(...n):e(...n):e}function we(e={}){return Object.keys(e).length===0&&e.constructor===Object}function Ee(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function jt(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const s=t.reduce((o,i)=>{const a=i.attribute.parseHTML?i.attribute.parseHTML(n):Ee(n.getAttribute(i.name));return a==null?o:{...o,[i.name]:a}},{});return{...r,...s}}}}function Ft(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&we(n)?!1:n!=null))}function Ce(e,t){var n;const r=se(e),{nodeExtensions:s,markExtensions:o}=dt(e),i=(n=s.find(c=>S(c,"topNode")))===null||n===void 0?void 0:n.name,a=Object.fromEntries(s.map(c=>{const u=r.filter(y=>y.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:t},p=e.reduce((y,T)=>{const v=S(T,"extendNodeSchema",d);return{...y,...v?v(c):{}}},{}),h=Ft({...p,content:E(S(c,"content",d)),marks:E(S(c,"marks",d)),group:E(S(c,"group",d)),inline:E(S(c,"inline",d)),atom:E(S(c,"atom",d)),selectable:E(S(c,"selectable",d)),draggable:E(S(c,"draggable",d)),code:E(S(c,"code",d)),whitespace:E(S(c,"whitespace",d)),defining:E(S(c,"defining",d)),isolating:E(S(c,"isolating",d)),attrs:Object.fromEntries(u.map(y=>{var T;return[y.name,{default:(T=y==null?void 0:y.attribute)===null||T===void 0?void 0:T.default}]}))}),f=E(S(c,"parseHTML",d));f&&(h.parseDOM=f.map(y=>jt(y,u)));const g=S(c,"renderHTML",d);g&&(h.toDOM=y=>g({node:y,HTMLAttributes:ot(y,u)}));const b=S(c,"renderText",d);return b&&(h.toText=b),[c.name,h]})),l=Object.fromEntries(o.map(c=>{const u=r.filter(b=>b.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:t},p=e.reduce((b,y)=>{const T=S(y,"extendMarkSchema",d);return{...b,...T?T(c):{}}},{}),h=Ft({...p,inclusive:E(S(c,"inclusive",d)),excludes:E(S(c,"excludes",d)),group:E(S(c,"group",d)),spanning:E(S(c,"spanning",d)),code:E(S(c,"code",d)),attrs:Object.fromEntries(u.map(b=>{var y;return[b.name,{default:(y=b==null?void 0:b.attribute)===null||y===void 0?void 0:y.default}]}))}),f=E(S(c,"parseHTML",d));f&&(h.parseDOM=f.map(b=>jt(b,u)));const g=S(c,"renderHTML",d);return g&&(h.toDOM=b=>g({mark:b,HTMLAttributes:ot(b,u)})),[c.name,h]}));return new m.Schema({topNode:i,nodes:a,marks:l})}function St(e,t){return t.nodes[e]||t.marks[e]||null}function zt(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}const xe=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(s,o,i,a)=>{var l,c;const u=((c=(l=s.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:s,pos:o,parent:i,index:a}))||s.textContent||"%leaf%";n+=s.isAtom&&!s.isText?u:u.slice(0,Math.max(0,r-o))}),n};function It(e){return Object.prototype.toString.call(e)==="[object RegExp]"}class ut{constructor(t){this.find=t.find,this.handler=t.handler}}const Ae=(e,t)=>{if(It(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function tt(e){var t;const{editor:n,from:r,to:s,text:o,rules:i,plugin:a}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((t=c.nodeBefore||c.nodeAfter)===null||t===void 0)&&t.marks.find(p=>p.type.spec.code))return!1;let u=!1;const d=xe(c)+o;return i.forEach(p=>{if(u)return;const h=Ae(d,p.find);if(!h)return;const f=l.state.tr,g=lt({state:l.state,transaction:f}),b={from:r-(h[0].length-o.length),to:s},{commands:y,chain:T,can:v}=new ct({editor:n,state:g});p.handler({state:g,range:b,match:h,commands:y,chain:T,can:v})===null||!f.steps.length||(f.setMeta(a,{transform:f,from:r,to:s,text:o}),l.dispatch(f),u=!0)}),u}function Le(e){const{editor:t,rules:n}=e,r=new m.Plugin({state:{init(){return null},apply(s,o){const i=s.getMeta(r);if(i)return i;const a=s.getMeta("applyInputRules");return!!a&&setTimeout(()=>{const{from:c,text:u}=a,d=c+u.length;tt({editor:t,from:c,to:d,text:u,rules:n,plugin:r})}),s.selectionSet||s.docChanged?null:o}},props:{handleTextInput(s,o,i,a){return tt({editor:t,from:o,to:i,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:o}=s.state.selection;o&&tt({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(s,o){if(o.key!=="Enter")return!1;const{$cursor:i}=s.state.selection;return i?tt({editor:t,from:i.pos,to:i.pos,text:`
2
2
  `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Oe(e){return typeof e=="number"}class Pe{constructor(t){this.find=t.find,this.handler=t.handler}}const He=(e,t,n)=>{if(It(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(s=>{const o=[s.text];return o.index=s.index,o.input=e,o.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(s.replaceWith)),o}):[]};function _e(e){const{editor:t,state:n,from:r,to:s,rule:o,pasteEvent:i,dropEvent:a}=e,{commands:l,chain:c,can:u}=new ct({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,s,(h,f)=>{if(!h.isTextblock||h.type.spec.code)return;const g=Math.max(r,f),b=Math.min(s,f+h.content.size),y=h.textBetween(g-f,b-f,void 0,"");He(y,o.find,i).forEach(v=>{if(v.index===void 0)return;const M=g+v.index+1,w=M+v[0].length,k={from:n.tr.mapping.map(M),to:n.tr.mapping.map(w)},A=o.handler({state:n,range:k,match:v,commands:l,chain:c,can:u,pasteEvent:i,dropEvent:a});d.push(A)})}),d.every(h=>h!==null)}const Re=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function Ie(e){const{editor:t,rules:n}=e;let r=null,s=!1,o=!1,i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a=typeof DragEvent<"u"?new DragEvent("drop"):null;const l=({state:u,from:d,to:p,rule:h,pasteEvt:f})=>{const g=u.tr,b=lt({state:u,transaction:g});if(!(!_e({editor:t,state:b,from:Math.max(d-1,0),to:p.b-1,rule:h,pasteEvent:f,dropEvent:a})||!g.steps.length))return a=typeof DragEvent<"u"?new DragEvent("drop"):null,i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g};return n.map(u=>new m.Plugin({view(d){const p=h=>{var f;r=!((f=d.dom.parentElement)===null||f===void 0)&&f.contains(h.target)?d.dom.parentElement:null};return window.addEventListener("dragstart",p),{destroy(){window.removeEventListener("dragstart",p)}}},props:{handleDOMEvents:{drop:(d,p)=>(o=r===d.dom.parentElement,a=p,!1),paste:(d,p)=>{var h;const f=(h=p.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return i=p,s=!!(f!=null&&f.includes("data-pm-slice")),!1}}},appendTransaction:(d,p,h)=>{const f=d[0],g=f.getMeta("uiEvent")==="paste"&&!s,b=f.getMeta("uiEvent")==="drop"&&!o,y=f.getMeta("applyPasteRules"),T=!!y;if(!g&&!b&&!T)return;if(T){const{from:w,text:k}=y,A=w+k.length,O=Re(k);return l({rule:u,state:h,from:w,to:{b:A},pasteEvt:O})}const v=p.doc.content.findDiffStart(h.doc.content),M=p.doc.content.findDiffEnd(h.doc.content);if(!(!Oe(v)||!M||v===M.b))return l({rule:u,state:h,from:v,to:M,pasteEvt:i})}}))}function De(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}class J{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=J.resolve(t),this.schema=Ce(this.extensions,n),this.setupExtensions()}static resolve(t){const n=J.sort(J.flatten(t)),r=De(n.map(s=>s.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(s=>`'${s}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},s=S(n,"addExtensions",r);return s?[n,...this.flatten(s())]:n}).flat(10)}static sort(t){return t.sort((r,s)=>{const o=S(r,"priority")||100,i=S(s,"priority")||100;return o>i?-1:o<i?1:0})}get commands(){return this.extensions.reduce((t,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:St(n.name,this.schema)},s=S(n,"addCommands",r);return s?{...t,...s()}:t},{})}get plugins(){const{editor:t}=this,n=J.sort([...this.extensions].reverse()),r=[],s=[],o=n.map(i=>{const a={name:i.name,options:i.options,storage:i.storage,editor:t,type:St(i.name,this.schema)},l=[],c=S(i,"addKeyboardShortcuts",a);let u={};if(i.type==="mark"&&S(i,"exitable",a)&&(u.ArrowRight=()=>I.handleExit({editor:t,mark:i})),c){const g=Object.fromEntries(Object.entries(c()).map(([b,y])=>[b,()=>y({editor:t})]));u={...u,...g}}const d=m.keymap(u);l.push(d);const p=S(i,"addInputRules",a);zt(i,t.options.enableInputRules)&&p&&r.push(...p());const h=S(i,"addPasteRules",a);zt(i,t.options.enablePasteRules)&&h&&s.push(...h());const f=S(i,"addProseMirrorPlugins",a);if(f){const g=f();l.push(...g)}return l}).flat();return[Le({editor:t,rules:r}),...Ie({editor:t,rules:s}),...o]}get attributes(){return se(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=dt(this.extensions);return Object.fromEntries(n.filter(r=>!!S(r,"addNodeView")).map(r=>{const s=this.attributes.filter(l=>l.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:t,type:R(r.name,this.schema)},i=S(r,"addNodeView",o);if(!i)return[];const a=(l,c,u,d,p)=>{const h=ot(l,s);return i()({node:l,view:c,getPos:u,decorations:d,innerDecorations:p,editor:t,extension:r,HTMLAttributes:h})};return[r.name,a]}))}setupExtensions(){this.extensions.forEach(t=>{var n;this.editor.extensionStorage[t.name]=t.storage;const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:St(t.name,this.schema)};t.type==="mark"&&(!((n=E(S(t,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(t.name);const s=S(t,"onBeforeCreate",r),o=S(t,"onCreate",r),i=S(t,"onUpdate",r),a=S(t,"onSelectionUpdate",r),l=S(t,"onTransaction",r),c=S(t,"onFocus",r),u=S(t,"onBlur",r),d=S(t,"onDestroy",r);s&&this.editor.on("beforeCreate",s),o&&this.editor.on("create",o),i&&this.editor.on("update",i),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}}function Ne(e){return Object.prototype.toString.call(e).slice(8,-1)}function et(e){return Ne(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function pt(e,t){const n={...e};return et(e)&&et(t)&&Object.keys(t).forEach(r=>{et(t[r])&&et(e[r])?n[r]=pt(e[r],t[r]):n[r]=t[r]}),n}class H{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=E(S(this,"addOptions",{name:this.name}))),this.storage=E(S(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new H(t)}configure(t={}){const n=this.extend({...this.config,addOptions:()=>pt(this.options,t)});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new H({...this.config,...t});return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=E(S(n,"addOptions",{name:n.name})),n.storage=E(S(n,"addStorage",{name:n.name,options:n.options})),n}}function ie(e,t,n){const{from:r,to:s}=t,{blockSeparator:o=`
3
3
 
4
4
  `,textSerializers:i={}}=n||{};let a="";return e.nodesBetween(r,s,(l,c,u,d)=>{var p;l.isBlock&&c>r&&(a+=o);const h=i==null?void 0:i[l.type.name];if(h)return u&&(a+=h({node:l,pos:c,parent:u,index:d,range:t})),!1;l.isText&&(a+=(p=l==null?void 0:l.text)===null||p===void 0?void 0:p.slice(Math.max(r,c)-c,s-c))}),a}function ae(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const $e=H.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new m.Plugin({key:new m.PluginKey("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:s}=t,{ranges:o}=s,i=Math.min(...o.map(u=>u.$from.pos)),a=Math.max(...o.map(u=>u.$to.pos)),l=ae(n);return ie(r,{from:i,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),Be=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),je=(e=!1)=>({commands:t})=>t.setContent("",e),Fe=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:s}=r;return n&&s.forEach(({$from:o,$to:i})=>{e.doc.nodesBetween(o.pos,i.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=t,d=c.resolve(u.map(l)),p=c.resolve(u.map(l+a.nodeSize)),h=d.blockRange(p);if(!h)return;const f=m.liftTarget(h);if(a.type.isTextblock){const{defaultType:g}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(h.start,g)}(f||f===0)&&t.lift(h,f)})}),!0},ze=e=>t=>e(t),Ve=()=>({state:e,dispatch:t})=>m.createParagraphNear(e,t),We=(e,t)=>({editor:n,tr:r})=>{const{state:s}=n,o=s.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const i=r.mapping.map(t);return r.insert(i,o.content),r.setSelection(new m.TextSelection(r.doc.resolve(i-1))),!0},Ke=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===r.type){if(t){const a=s.before(o),l=s.after(o);e.delete(a,l).scrollIntoView()}return!0}return!1},qe=e=>({tr:t,state:n,dispatch:r})=>{const s=R(e,n.schema),o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===s){if(r){const l=o.before(i),c=o.after(i);t.delete(l,c).scrollIntoView()}return!0}return!1},Ue=e=>({tr:t,dispatch:n})=>{const{from:r,to:s}=e;return n&&t.delete(r,s),!0},Ge=()=>({state:e,dispatch:t})=>m.deleteSelection(e,t),Je=()=>({commands:e})=>e.keyboardShortcut("Enter"),Ye=()=>({state:e,dispatch:t})=>m.exitCode(e,t);function it(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(s=>n.strict?t[s]===e[s]:It(t[s])?t[s].test(e[s]):t[s]===e[s]):!0}function xt(e,t,n={}){return e.find(r=>r.type===t&&it(r.attrs,n))}function Xe(e,t,n={}){return!!xt(e,t,n)}function ht(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const s=xt([...r.node.marks],t,n);if(!s)return;let o=r.index,i=e.start()+r.offset,a=o+1,l=i+r.node.nodeSize;for(xt([...r.node.marks],t,n);o>0&&s.isInSet(e.parent.child(o-1).marks);)o-=1,i-=e.parent.child(o).nodeSize;for(;a<e.parent.childCount&&Xe([...e.parent.child(a).marks],t,n);)l+=e.parent.child(a).nodeSize,a+=1;return{from:i,to:l}}function F(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const Qe=(e,t={})=>({tr:n,state:r,dispatch:s})=>{const o=F(e,r.schema),{doc:i,selection:a}=n,{$from:l,from:c,to:u}=a;if(s){const d=ht(l,o,t);if(d&&d.from<=c&&d.to>=u){const p=m.TextSelection.create(i,d.from,d.to);n.setSelection(p)}}return!0},Ze=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function Dt(e){return e instanceof m.TextSelection}function N(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function le(e,t=null){if(!t)return null;const n=m.Selection.atStart(e),r=m.Selection.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const s=n.from,o=r.to;return t==="all"?m.TextSelection.create(e,N(0,s,o),N(e.content.size,s,o)):m.TextSelection.create(e,N(t,s,o),N(t,s,o))}function ft(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const tn=(e=null,t={})=>({editor:n,view:r,tr:s,dispatch:o})=>{t={scrollIntoView:!0,...t};const i=()=>{ft()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(o&&e===null&&!Dt(n.state.selection))return i(),!0;const a=le(s.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||s.setSelection(a),l&&s.storedMarks&&s.setStoredMarks(s.storedMarks),i()),!0},en=(e,t)=>n=>e.every((r,s)=>t(r,{...n,index:s})),nn=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),ce=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&ce(r)}return e};function nt(e){const t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return ce(n)}function at(e,t,n){n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,s=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return m.Fragment.fromArray(e.map(a=>t.nodeFromJSON(a)));const i=t.nodeFromJSON(e);return n.errorOnInvalidContent&&i.check(),i}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),at("",t,n)}if(s){if(n.errorOnInvalidContent){let i=!1,a="";const l=new m.Schema({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(i=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?m.DOMParser.fromSchema(l).parseSlice(nt(e),n.parseOptions):m.DOMParser.fromSchema(l).parse(nt(e),n.parseOptions),n.errorOnInvalidContent&&i)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const o=m.DOMParser.fromSchema(t);return n.slice?o.parseSlice(nt(e),n.parseOptions).content:o.parse(nt(e),n.parseOptions)}return at("",t,n)}function rn(e,t,n){const r=e.steps.length-1;if(r<t)return;const s=e.steps[r];if(!(s instanceof m.ReplaceStep||s instanceof m.ReplaceAroundStep))return;const o=e.mapping.maps[r];let i=0;o.forEach((a,l,c,u)=>{i===0&&(i=u)}),e.setSelection(m.Selection.near(e.doc.resolve(i),n))}const sn=e=>!("type"in e),on=(e,t,n)=>({tr:r,dispatch:s,editor:o})=>{var i;if(s){n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;try{a=at(t,o.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:(i=n.errorOnInvalidContent)!==null&&i!==void 0?i:o.options.enableContentCheck})}catch(f){return o.emit("contentError",{editor:o,error:f,disableCollaboration:()=>{console.error("[tiptap error]: Unable to disable collaboration at this point in time")}}),!1}let{from:l,to:c}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},u=!0,d=!0;if((sn(a)?a:[a]).forEach(f=>{f.check(),u=u?f.isText&&f.marks.length===0:!1,d=d?f.isBlock:!1}),l===c&&d){const{parent:f}=r.doc.resolve(l);f.isTextblock&&!f.type.spec.code&&!f.childCount&&(l-=1,c+=1)}let h;u?(Array.isArray(t)?h=t.map(f=>f.text||"").join(""):typeof t=="object"&&t&&t.text?h=t.text:h=t,r.insertText(h,l,c)):(h=a,r.replaceWith(l,c,h)),n.updateSelection&&rn(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:l,text:h}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:l,text:h})}return!0},an=()=>({state:e,dispatch:t})=>m.joinUp(e,t),ln=()=>({state:e,dispatch:t})=>m.joinDown(e,t),cn=()=>({state:e,dispatch:t})=>m.joinBackward(e,t),dn=()=>({state:e,dispatch:t})=>m.joinForward(e,t),un=()=>({state:e,dispatch:t,tr:n})=>{try{const r=m.joinPoint(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},pn=()=>({state:e,dispatch:t,tr:n})=>{try{const r=m.joinPoint(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},hn=()=>({state:e,dispatch:t})=>m.joinTextblockBackward(e,t),fn=()=>({state:e,dispatch:t})=>m.joinTextblockForward(e,t);function de(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function mn(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,s,o,i;for(let a=0;a<t.length-1;a+=1){const l=t[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))ft()||de()?i=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),s&&(n=`Ctrl-${n}`),i&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}const gn=e=>({editor:t,view:n,tr:r,dispatch:s})=>{const o=mn(e).split(/-(?!$)/),i=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const u=c.map(r.mapping);u&&s&&r.maybeStep(u)}),!0};function Q(e,t,n={}){const{from:r,to:s,empty:o}=e.selection,i=t?R(t,e.schema):null,a=[];e.doc.nodesBetween(r,s,(d,p)=>{if(d.isText)return;const h=Math.max(r,p),f=Math.min(s,p+d.nodeSize);a.push({node:d,from:h,to:f})});const l=s-r,c=a.filter(d=>i?i.name===d.node.type.name:!0).filter(d=>it(d.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((d,p)=>d+p.to-p.from,0)>=l}const yn=(e,t={})=>({state:n,dispatch:r})=>{const s=R(e,n.schema);return Q(n,s,t)?m.lift(n,r):!1},bn=()=>({state:e,dispatch:t})=>m.liftEmptyBlock(e,t),vn=e=>({state:t,dispatch:n})=>{const r=R(e,t.schema);return m.liftListItem(r)(t,n)},Sn=()=>({state:e,dispatch:t})=>m.newlineInCode(e,t);function mt(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Vt(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,s)=>(n.includes(s)||(r[s]=e[s]),r),{})}const Mn=(e,t)=>({tr:n,state:r,dispatch:s})=>{let o=null,i=null;const a=mt(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(o=R(e,r.schema)),a==="mark"&&(i=F(e,r.schema)),s&&n.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&n.setNodeMarkup(u,void 0,Vt(c.attrs,t)),i&&c.marks.length&&c.marks.forEach(d=>{i===d.type&&n.addMark(u,u+c.nodeSize,i.create(Vt(d.attrs,t)))})})}),!0):!1},kn=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),Tn=()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),wn=()=>({state:e,dispatch:t})=>m.selectNodeBackward(e,t),En=()=>({state:e,dispatch:t})=>m.selectNodeForward(e,t),Cn=()=>({state:e,dispatch:t})=>m.selectParentNode(e,t),xn=()=>({state:e,dispatch:t})=>m.selectTextblockEnd(e,t),An=()=>({state:e,dispatch:t})=>m.selectTextblockStart(e,t);function At(e,t,n={},r={}){return at(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}const Ln=(e,t=!1,n={},r={})=>({editor:s,tr:o,dispatch:i,commands:a})=>{var l,c;const{doc:u}=o;if(n.preserveWhitespace!=="full"){const d=At(e,s.schema,n,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:s.options.enableContentCheck});return i&&o.replaceWith(0,u.content.size,d).setMeta("preventUpdate",!t),!0}return i&&o.setMeta("preventUpdate",!t),a.insertContentAt({from:0,to:u.content.size},e,{parseOptions:n,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:s.options.enableContentCheck})};function Z(e,t){const n=F(t,e.schema),{from:r,to:s,empty:o}=e.selection,i=[];o?(e.storedMarks&&i.push(...e.storedMarks),i.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,s,l=>{i.push(...l.marks)});const a=i.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function On(e,t){const n=new m.Transform(e);return t.forEach(r=>{r.steps.forEach(s=>{n.step(s)})}),n}function Pn(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function Hn(e,t){const n=[];return e.descendants((r,s)=>{t(r)&&n.push({node:r,pos:s})}),n}function _n(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,(s,o)=>{n(s)&&r.push({node:s,pos:o})}),r}function ue(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function gt(e){return t=>ue(t.$from,e)}function Rn(e,t){const n=m.DOMSerializer.fromSchema(t).serializeFragment(e),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(n),s.innerHTML}function In(e,t){const n={from:0,to:e.content.size};return ie(e,n,t)}function Dn(e,t){const n=R(t,e.schema),{from:r,to:s}=e.selection,o=[];e.doc.nodesBetween(r,s,a=>{o.push(a)});const i=o.reverse().find(a=>a.type.name===n.name);return i?{...i.attrs}:{}}function pe(e,t){const n=mt(typeof t=="string"?t:t.name,e.schema);return n==="node"?Dn(e,t):n==="mark"?Z(e,t):{}}function Nn(e,t=JSON.stringify){const n={};return e.filter(r=>{const s=t(r);return Object.prototype.hasOwnProperty.call(n,s)?!1:n[s]=!0})}function $n(e){const t=Nn(e);return t.length===1?t:t.filter((n,r)=>!t.filter((o,i)=>i!==r).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function Bn(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((s,o)=>{const i=[];if(s.ranges.length)s.forEach((a,l)=>{i.push({from:a,to:l})});else{const{from:a,to:l}=n[o];if(a===void 0||l===void 0)return;i.push({from:a,to:l})}i.forEach(({from:a,to:l})=>{const c=t.slice(o).map(a,-1),u=t.slice(o).map(l),d=t.invert().map(c,-1),p=t.invert().map(u);r.push({oldRange:{from:d,to:p},newRange:{from:c,to:u}})})}),$n(r)}function Nt(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(s=>{const o=n.resolve(e),i=ht(o,s.type);i&&r.push({mark:s,...i})}):n.nodesBetween(e,t,(s,o)=>{!s||(s==null?void 0:s.nodeSize)===void 0||r.push(...s.marks.map(i=>({from:o,to:o+s.nodeSize,mark:i})))}),r}function st(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const s=e.find(o=>o.type===t&&o.name===r);return s?s.attribute.keepOnSplit:!1}))}function Lt(e,t,n={}){const{empty:r,ranges:s}=e.selection,o=t?F(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(d=>o?o.name===d.type.name:!0).find(d=>it(d.attrs,n,{strict:!1}));let i=0;const a=[];if(s.forEach(({$from:d,$to:p})=>{const h=d.pos,f=p.pos;e.doc.nodesBetween(h,f,(g,b)=>{if(!g.isText&&!g.marks.length)return;const y=Math.max(h,b),T=Math.min(f,b+g.nodeSize),v=T-y;i+=v,a.push(...g.marks.map(M=>({mark:M,from:y,to:T})))})}),i===0)return!1;const l=a.filter(d=>o?o.name===d.mark.type.name:!0).filter(d=>it(d.mark.attrs,n,{strict:!1})).reduce((d,p)=>d+p.to-p.from,0),c=a.filter(d=>o?d.mark.type!==o&&d.mark.type.excludes(o):!0).reduce((d,p)=>d+p.to-p.from,0);return(l>0?l+c:l)>=i}function he(e,t,n={}){if(!t)return Q(e,null,n)||Lt(e,null,n);const r=mt(t,e.schema);return r==="node"?Q(e,t,n):r==="mark"?Lt(e,t,n):!1}function Ot(e,t){const{nodeExtensions:n}=dt(t),r=n.find(i=>i.name===e);if(!r)return!1;const s={name:r.name,options:r.options,storage:r.storage},o=E(S(r,"group",s));return typeof o!="string"?!1:o.split(" ").includes("list")}function yt(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return/^\s*$/m.test((r=e.text)!==null&&r!==void 0?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let s=!0;return e.content.forEach(o=>{s!==!1&&(yt(o,{ignoreWhitespace:n,checkChildren:t})||(s=!1))}),s}return!1}function fe(e){return e instanceof m.NodeSelection}function jn(e,t,n){const s=e.state.doc.content.size,o=N(t,0,s),i=N(n,0,s),a=e.coordsAtPos(o),l=e.coordsAtPos(i,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),p=Math.max(a.right,l.right),h=p-d,f=u-c,y={top:c,bottom:u,left:d,right:p,width:h,height:f,x:d,y:c};return{...y,toJSON:()=>y}}function Fn(e,t,n){var r;const{selection:s}=t;let o=null;if(Dt(s)&&(o=s.$cursor),o){const a=(r=e.storedMarks)!==null&&r!==void 0?r:o.marks();return!!n.isInSet(a)||!a.some(l=>l.type.excludes(n))}const{ranges:i}=s;return i.some(({$from:a,$to:l})=>{let c=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,l.pos,(u,d,p)=>{if(c)return!1;if(u.isInline){const h=!p||p.type.allowsMarkType(n),f=!!n.isInSet(u.marks)||!u.marks.some(g=>g.type.excludes(n));c=h&&f}return!c}),c})}const zn=(e,t={})=>({tr:n,state:r,dispatch:s})=>{const{selection:o}=n,{empty:i,ranges:a}=o,l=F(e,r.schema);if(s)if(i){const c=Z(r,l);n.addStoredMark(l.create({...c,...t}))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;r.doc.nodesBetween(u,d,(p,h)=>{const f=Math.max(h,u),g=Math.min(h+p.nodeSize,d);p.marks.find(y=>y.type===l)?p.marks.forEach(y=>{l===y.type&&n.addMark(f,g,l.create({...y.attrs,...t}))}):n.addMark(f,g,l.create(t))})});return Fn(r,n,l)},Vn=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Wn=(e,t={})=>({state:n,dispatch:r,chain:s})=>{const o=R(e,n.schema);return o.isTextblock?s().command(({commands:i})=>m.setBlockType(o,t)(n)?!0:i.clearNodes()).command(({state:i})=>m.setBlockType(o,t)(i,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Kn=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,s=N(e,0,r.content.size),o=m.NodeSelection.create(r,s);t.setSelection(o)}return!0},qn=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:s,to:o}=typeof e=="number"?{from:e,to:e}:e,i=m.TextSelection.atStart(r).from,a=m.TextSelection.atEnd(r).to,l=N(s,i,a),c=N(o,i,a),u=m.TextSelection.create(r,l,c);t.setSelection(u)}return!0},Un=e=>({state:t,dispatch:n})=>{const r=R(e,t.schema);return m.sinkListItem(r)(t,n)};function Wt(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(s=>t==null?void 0:t.includes(s.type.name));e.tr.ensureMarks(r)}}const Gn=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:s})=>{const{selection:o,doc:i}=t,{$from:a,$to:l}=o,c=s.extensionManager.attributes,u=st(c,a.node().type.name,a.node().attrs);if(o instanceof m.NodeSelection&&o.node.isBlock)return!a.parentOffset||!m.canSplit(i,a.pos)?!1:(r&&(e&&Wt(n,s.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,p=a.depth===0?void 0:Pn(a.node(-1).contentMatchAt(a.indexAfter(-1)));let h=d&&p?[{type:p,attrs:u}]:void 0,f=m.canSplit(t.doc,t.mapping.map(a.pos),1,h);if(!h&&!f&&m.canSplit(t.doc,t.mapping.map(a.pos),1,p?[{type:p}]:void 0)&&(f=!0,h=p?[{type:p,attrs:u}]:void 0),r){if(f&&(o instanceof m.TextSelection&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,h),p&&!d&&!a.parentOffset&&a.parent.type!==p)){const g=t.mapping.map(a.before()),b=t.doc.resolve(g);a.node(-1).canReplaceWith(b.index(),b.index()+1,p)&&t.setNodeMarkup(t.mapping.map(a.before()),p)}e&&Wt(n,s.extensionManager.splittableMarks),t.scrollIntoView()}return f},Jn=(e,t={})=>({tr:n,state:r,dispatch:s,editor:o})=>{var i;const a=R(e,r.schema),{$from:l,$to:c}=r.selection,u=r.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(c))return!1;const d=l.node(-1);if(d.type!==a)return!1;const p=o.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(s){let y=m.Fragment.empty;const T=l.index(-1)?1:l.index(-2)?2:3;for(let O=l.depth-T;O>=l.depth-3;O-=1)y=m.Fragment.from(l.node(O).copy(y));const v=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,M={...st(p,l.node().type.name,l.node().attrs),...t},w=((i=a.contentMatch.defaultType)===null||i===void 0?void 0:i.createAndFill(M))||void 0;y=y.append(m.Fragment.from(a.createAndFill(null,w)||void 0));const k=l.before(l.depth-(T-1));n.replace(k,l.after(-v),new m.Slice(y,4-T,0));let A=-1;n.doc.nodesBetween(k,n.doc.content.size,(O,C)=>{if(A>-1)return!1;O.isTextblock&&O.content.size===0&&(A=C+1)}),A>-1&&n.setSelection(m.TextSelection.near(n.doc.resolve(A))),n.scrollIntoView()}return!0}const h=c.pos===l.end()?d.contentMatchAt(0).defaultType:null,f={...st(p,d.type.name,d.attrs),...t},g={...st(p,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,c.pos);const b=h?[{type:a,attrs:f},{type:h,attrs:g}]:[{type:a,attrs:f}];if(!m.canSplit(n.doc,l.pos,2))return!1;if(s){const{selection:y,storedMarks:T}=r,{splittableMarks:v}=o.extensionManager,M=T||y.$to.parentOffset&&y.$from.marks();if(n.split(l.pos,2,b).scrollIntoView(),!M||!s)return!0;const w=M.filter(k=>v.includes(k.type.name));n.ensureMarks(w)}return!0},Mt=(e,t)=>{const n=gt(i=>i.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const s=e.doc.nodeAt(r);return n.node.type===(s==null?void 0:s.type)&&m.canJoin(e.doc,n.pos)&&e.join(n.pos),!0},kt=(e,t)=>{const n=gt(i=>i.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const s=e.doc.nodeAt(r);return n.node.type===(s==null?void 0:s.type)&&m.canJoin(e.doc,r)&&e.join(r),!0},Yn=(e,t,n,r={})=>({editor:s,tr:o,state:i,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:p}=s.extensionManager,h=R(e,i.schema),f=R(t,i.schema),{selection:g,storedMarks:b}=i,{$from:y,$to:T}=g,v=y.blockRange(T),M=b||g.$to.parentOffset&&g.$from.marks();if(!v)return!1;const w=gt(k=>Ot(k.type.name,d))(g);if(v.depth>=1&&w&&v.depth-w.depth<=1){if(w.node.type===h)return c.liftListItem(f);if(Ot(w.node.type.name,d)&&h.validContent(w.node.content)&&a)return l().command(()=>(o.setNodeMarkup(w.pos,h),!0)).command(()=>Mt(o,h)).command(()=>kt(o,h)).run()}return!n||!M||!a?l().command(()=>u().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>Mt(o,h)).command(()=>kt(o,h)).run():l().command(()=>{const k=u().wrapInList(h,r),A=M.filter(O=>p.includes(O.type.name));return o.ensureMarks(A),k?!0:c.clearNodes()}).wrapInList(h,r).command(()=>Mt(o,h)).command(()=>kt(o,h)).run()},Xn=(e,t={},n={})=>({state:r,commands:s})=>{const{extendEmptyMarkRange:o=!1}=n,i=F(e,r.schema);return Lt(r,i,t)?s.unsetMark(i,{extendEmptyMarkRange:o}):s.setMark(i,t)},Qn=(e,t,n={})=>({state:r,commands:s})=>{const o=R(e,r.schema),i=R(t,r.schema),a=Q(r,o,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?s.setNode(i,l):s.setNode(o,{...l,...n})},Zn=(e,t={})=>({state:n,commands:r})=>{const s=R(e,n.schema);return Q(n,s,t)?r.lift(s):r.wrapIn(s,t)},tr=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const s=n[r];let o;if(s.spec.isInputRules&&(o=s.getState(e))){if(t){const i=e.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l-=1)i.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=i.doc.resolve(o.from).marks();i.replaceWith(o.from,o.to,e.schema.text(o.text,l))}else i.delete(o.from,o.to)}return!0}}return!1},er=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:s}=n;return r||t&&s.forEach(o=>{e.removeMark(o.$from.pos,o.$to.pos)}),!0},nr=(e,t={})=>({tr:n,state:r,dispatch:s})=>{var o;const{extendEmptyMarkRange:i=!1}=t,{selection:a}=n,l=F(e,r.schema),{$from:c,empty:u,ranges:d}=a;if(!s)return!0;if(u&&i){let{from:p,to:h}=a;const f=(o=c.marks().find(b=>b.type===l))===null||o===void 0?void 0:o.attrs,g=ht(c,l,f);g&&(p=g.from,h=g.to),n.removeMark(p,h,l)}else d.forEach(p=>{n.removeMark(p.$from.pos,p.$to.pos,l)});return n.removeStoredMark(l),!0},rr=(e,t={})=>({tr:n,state:r,dispatch:s})=>{let o=null,i=null;const a=mt(typeof e=="string"?e:e.name,r.schema);return a?(a==="node"&&(o=R(e,r.schema)),a==="mark"&&(i=F(e,r.schema)),s&&n.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;r.doc.nodesBetween(c,u,(d,p)=>{o&&o===d.type&&n.setNodeMarkup(p,void 0,{...d.attrs,...t}),i&&d.marks.length&&d.marks.forEach(h=>{if(i===h.type){const f=Math.max(p,c),g=Math.min(p+d.nodeSize,u);n.addMark(f,g,i.create({...h.attrs,...t}))}})})}),!0):!1},sr=(e,t={})=>({state:n,dispatch:r})=>{const s=R(e,n.schema);return m.wrapIn(s,t)(n,r)},or=(e,t={})=>({state:n,dispatch:r})=>{const s=R(e,n.schema);return m.wrapInList(s,t)(n,r)};var ir=Object.freeze({__proto__:null,blur:Be,clearContent:je,clearNodes:Fe,command:ze,createParagraphNear:Ve,cut:We,deleteCurrentNode:Ke,deleteNode:qe,deleteRange:Ue,deleteSelection:Ge,enter:Je,exitCode:Ye,extendMarkRange:Qe,first:Ze,focus:tn,forEach:en,insertContent:nn,insertContentAt:on,joinBackward:cn,joinDown:ln,joinForward:dn,joinItemBackward:un,joinItemForward:pn,joinTextblockBackward:hn,joinTextblockForward:fn,joinUp:an,keyboardShortcut:gn,lift:yn,liftEmptyBlock:bn,liftListItem:vn,newlineInCode:Sn,resetAttributes:Mn,scrollIntoView:kn,selectAll:Tn,selectNodeBackward:wn,selectNodeForward:En,selectParentNode:Cn,selectTextblockEnd:xn,selectTextblockStart:An,setContent:Ln,setMark:zn,setMeta:Vn,setNode:Wn,setNodeSelection:Kn,setTextSelection:qn,sinkListItem:Un,splitBlock:Gn,splitListItem:Jn,toggleList:Yn,toggleMark:Xn,toggleNode:Qn,toggleWrap:Zn,undoInputRule:tr,unsetAllMarks:er,unsetMark:nr,updateAttributes:rr,wrapIn:sr,wrapInList:or});const ar=H.create({name:"commands",addCommands(){return{...ir}}}),lr=H.create({name:"editable",addProseMirrorPlugins(){return[new m.Plugin({key:new m.PluginKey("editable"),props:{editable:()=>this.editor.options.editable}})]}}),cr=H.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new m.Plugin({key:new m.PluginKey("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),dr=H.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:p,parent:h}=d,f=d.parent.isTextblock&&p>0?a.doc.resolve(p-1):d,g=f.parent.type.spec.isolating,b=d.pos-d.parentOffset,y=g&&f.parent.childCount===1?b===d.pos:m.Selection.atStart(c).from===p;return!u||!h.type.isTextblock||h.textContent.length||!y||y&&d.parent.type.name==="paragraph"?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},s={...r},o={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return ft()||de()?o:s},addProseMirrorPlugins(){return[new m.Plugin({key:new m.PluginKey("clearDocument"),appendTransaction:(e,t,n)=>{const r=e.some(g=>g.docChanged)&&!t.doc.eq(n.doc),s=e.some(g=>g.getMeta("preventClearDocument"));if(!r||s)return;const{empty:o,from:i,to:a}=t.selection,l=m.Selection.atStart(t.doc).from,c=m.Selection.atEnd(t.doc).to;if(o||!(i===l&&a===c)||!yt(n.doc))return;const p=n.tr,h=lt({state:n,transaction:p}),{commands:f}=new ct({editor:this.editor,state:h});if(f.clearNodes(),!!p.steps.length)return p}})]}}),ur=H.create({name:"tabindex",addProseMirrorPlugins(){return[new m.Plugin({key:new m.PluginKey("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class K{get name(){return this.node.type.name}constructor(t,n,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=s}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new K(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new K(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new K(t,this.editor)}get children(){const t=[];return this.node.content.forEach((n,r)=>{const s=n.isBlock&&!n.isTextblock,o=this.pos+r+1,i=this.resolvedPos.doc.resolve(o);if(!s&&i.depth<=this.depth)return;const a=new K(i,this.editor,s,s?n:null);s&&(a.actualDepth=this.depth+1),t.push(new K(i,this.editor,s,s?n:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,s=this.parent;for(;s&&!r;){if(s.node.type.name===t)if(Object.keys(n).length>0){const o=s.node.attrs,i=Object.keys(n);for(let a=0;a<i.length;a+=1){const l=i[a];if(o[l]!==n[l])break}}else r=s;s=s.parent}return r}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;const o=Object.keys(n);return this.children.forEach(i=>{r&&s.length>0||(i.node.type.name===t&&o.every(l=>n[l]===i.node.attrs[l])&&s.push(i),!(r&&s.length>0)&&(s=s.concat(i.querySelectorAll(t,n,r))))}),s}setAttribute(t){const n=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,t).setTextSelection(n.from).run()}}const pr=e=>new m.Plugin({key:new m.PluginKey("tiptapDrop"),props:{handleDrop:(t,n,r,s)=>{e(n,r,s)}}}),hr=e=>new m.Plugin({key:new m.PluginKey("tiptapPaste"),props:{handlePaste:(t,n,r)=>{e(n,r)}}}),fr=`.ProseMirror {
@@ -1,5 +1,5 @@
1
1
  import Ve from "tippy.js";
2
- import { P, a as I, N as Z, S as G, f as We, c as jt, T as Ke, l as Ue, b as qe, d as D, e as Ge, g as Je, j as Ye, h as Xe, i as Qe, k as Ze, m as Me, n as tn, o as en, p as nn, q as rn, r as sn, s as on, t as an, u as ln, v as cn, w as dn, x as un, y as Yt, z as pn, A as lt, F as ct, B as hn, C as fn, D as mn, E as gn, G as yn, H as bn, I as Se, J as Et, R as vn, K as Mn, L as Sn, M as Xt, O as ke, Q as kn, U as wn, V as Tn, W as En, X as Cn, Y as An, Z as ut, _ as Ft, $ as xn, a0 as Ln, a1 as On, a2 as Hn, a3 as _n, a4 as Rn, a5 as Pn, a6 as In, a7 as Qt, a8 as Zt, a9 as te, aa as $n, ab as Dn, ac as ee, ad as Nn, ae as we, af as Bn, ag as jn } from "./vendor-C6gAEa0t.js";
2
+ import { P, a as I, N as Z, S as G, f as We, c as jt, T as Ke, l as Ue, b as qe, d as D, e as Ge, g as Je, j as Ye, h as Xe, i as Qe, k as Ze, m as Me, n as tn, o as en, p as nn, q as rn, r as sn, s as on, t as an, u as ln, v as cn, w as dn, x as un, y as Yt, z as pn, A as lt, F as ct, B as hn, C as fn, D as mn, E as gn, G as yn, H as bn, I as Se, J as Et, R as vn, K as Mn, L as Sn, M as Xt, O as ke, Q as kn, U as wn, V as Tn, W as En, X as Cn, Y as An, Z as ut, _ as Ft, $ as xn, a0 as Ln, a1 as On, a2 as Hn, a3 as _n, a4 as Rn, a5 as Pn, a6 as In, a7 as Qt, a8 as Zt, a9 as te, aa as $n, ab as Dn, ac as ee, ad as Nn, ae as we, af as Bn, ag as jn } from "./vendor-BU8RNhp0.js";
3
3
  import O, { forwardRef as Fn, useRef as zn, useState as zt, useDebugValue as Te, useEffect as Vt, createContext as Ee, useContext as Ce } from "react";
4
4
  import Vn, { flushSync as Wn } from "react-dom";
5
5
  function mt(e) {