@layers-app/editor 0.5.4-optimization → 0.5.6-optimization

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.
Files changed (138) hide show
  1. package/README.md +19 -0
  2. package/dist/index.cjs +2 -0
  3. package/dist/index.js +12 -10
  4. package/dist/layers.7jmq6tBR.js +2227 -0
  5. package/dist/layers.B90YwJga.js +4 -0
  6. package/dist/layers.C03OvlLb.js +6 -0
  7. package/dist/layers.CJiIq6YQ.js +1 -0
  8. package/dist/layers.CXffIp2y.js +864 -0
  9. package/dist/layers.CZPeYQ9g.js +3 -0
  10. package/dist/layers.CZ_Lt7IL.js +7 -0
  11. package/dist/layers.Ci1-qkbn.js +341 -0
  12. package/dist/layers.Cnm-pECN.js +2 -0
  13. package/dist/layers.D6d62qQ_.js +6774 -0
  14. package/dist/layers.DNCgFYS7.js +27 -0
  15. package/dist/layers.Dev6Yrwi.js +530 -0
  16. package/dist/layers.Dgok89qX.js +1 -0
  17. package/dist/layers.Dq3o7sh3.js +7723 -0
  18. package/dist/layers.Duy8YzsH.js +2511 -0
  19. package/dist/layers.QjAkD17S.js +3677 -0
  20. package/package.json +73 -17
  21. package/dist/layers.0EAb8Ajx.js +0 -65
  22. package/dist/layers.1Mvzm38Y.js +0 -501
  23. package/dist/layers.2wIERhxO.js +0 -41
  24. package/dist/layers.694DrE1_.js +0 -931
  25. package/dist/layers.7JqFgE4-.js +0 -15
  26. package/dist/layers.B-5aeeDH.js +0 -1359
  27. package/dist/layers.B0winug5.js +0 -59
  28. package/dist/layers.B1S8ufDn.js +0 -40
  29. package/dist/layers.B3JNY9Km.js +0 -42
  30. package/dist/layers.B6W2tqC0.js +0 -40
  31. package/dist/layers.B7Olyhe8.js +0 -1089
  32. package/dist/layers.BCuuRSaf.js +0 -37
  33. package/dist/layers.BESPlBGC.js +0 -32
  34. package/dist/layers.BJDrjORS.js +0 -244
  35. package/dist/layers.BJTh7mUo.js +0 -1265
  36. package/dist/layers.BLL-019k.js +0 -39
  37. package/dist/layers.BNJiP8Pw.js +0 -2966
  38. package/dist/layers.BNvAl5dS.js +0 -14
  39. package/dist/layers.BThP74aw.js +0 -32
  40. package/dist/layers.BZ4laUeR.js +0 -40
  41. package/dist/layers.BZByPNdY.js +0 -37
  42. package/dist/layers.B_5zMrI3.js +0 -38
  43. package/dist/layers.B_7N5yjX.js +0 -32
  44. package/dist/layers.BbCfEXyj.js +0 -55
  45. package/dist/layers.BdvfoI4U.js +0 -44
  46. package/dist/layers.BiJ8hfRt.js +0 -1510
  47. package/dist/layers.BiJBOHr0.js +0 -84
  48. package/dist/layers.Bk3_8qR9.js +0 -48146
  49. package/dist/layers.BkPPOKBy.js +0 -32
  50. package/dist/layers.BnZcjRLr.js +0 -32
  51. package/dist/layers.BpilXLfW.js +0 -6
  52. package/dist/layers.BqpcWKH6.js +0 -2479
  53. package/dist/layers.Br7D0wMN.js +0 -39
  54. package/dist/layers.BsAu1GXs.js +0 -42
  55. package/dist/layers.Bv5sK47C.js +0 -769
  56. package/dist/layers.BxEdkUpI.js +0 -1088
  57. package/dist/layers.BxUBbVsO.js +0 -41
  58. package/dist/layers.Bzalhqz_.js +0 -39
  59. package/dist/layers.C-dS7ntQ.js +0 -41
  60. package/dist/layers.C0Lgw_Sx.js +0 -11688
  61. package/dist/layers.C5BFsvzI.js +0 -803
  62. package/dist/layers.C5WLg9ed.js +0 -21763
  63. package/dist/layers.C6lAFlKZ.js +0 -186
  64. package/dist/layers.C8_lu5UH.js +0 -23
  65. package/dist/layers.CGwNL7dH.js +0 -791
  66. package/dist/layers.CI739wqN.js +0 -39
  67. package/dist/layers.CKaj4dG4.js +0 -41
  68. package/dist/layers.CLRiSwgi.js +0 -904
  69. package/dist/layers.CN1QkD6D.js +0 -38
  70. package/dist/layers.CPY6U3g-.js +0 -1034
  71. package/dist/layers.CRSjdIG6.js +0 -1619
  72. package/dist/layers.CUHkTCid.js +0 -6
  73. package/dist/layers.CUPMw0sy.js +0 -40
  74. package/dist/layers.CWb6LiAY.js +0 -40
  75. package/dist/layers.C_XsSNQo.js +0 -42
  76. package/dist/layers.CbmlFoXt.js +0 -33
  77. package/dist/layers.CfGeHh-g.js +0 -36
  78. package/dist/layers.CiJxVu9b.js +0 -36
  79. package/dist/layers.Cj4ezyVr.js +0 -33
  80. package/dist/layers.Cpb-MRZn.js +0 -960
  81. package/dist/layers.CqVTtuYm.js +0 -6
  82. package/dist/layers.CskURloi.js +0 -39
  83. package/dist/layers.CtTD47i4.js +0 -41
  84. package/dist/layers.CxcvEfKe.js +0 -36
  85. package/dist/layers.D-U9uIsP.js +0 -40
  86. package/dist/layers.D10WeKck.js +0 -2235
  87. package/dist/layers.D4T8fTcj.js +0 -1223
  88. package/dist/layers.D4jK2Tet.js +0 -39
  89. package/dist/layers.D7jGxypv.js +0 -8
  90. package/dist/layers.DBosqi2D.js +0 -19
  91. package/dist/layers.DGtETOVJ.js +0 -304
  92. package/dist/layers.DKENAsMv.js +0 -220
  93. package/dist/layers.DLwuMfdd.js +0 -84
  94. package/dist/layers.DN9HoVxI.js +0 -18
  95. package/dist/layers.DOBSfaUM.js +0 -35
  96. package/dist/layers.DOKLQ6A3.js +0 -373
  97. package/dist/layers.DPuVWH3L.js +0 -40
  98. package/dist/layers.DQVXh43C.js +0 -42
  99. package/dist/layers.DSTh89J8.js +0 -42
  100. package/dist/layers.DUsIfvNt.js +0 -46859
  101. package/dist/layers.DVfpGIrv.js +0 -41
  102. package/dist/layers.DWSkLlGf.js +0 -41
  103. package/dist/layers.DX1RI3m3.js +0 -32
  104. package/dist/layers.DdMwmP4m.js +0 -37
  105. package/dist/layers.DhkyREpW.js +0 -793
  106. package/dist/layers.Dj-f1_6N.js +0 -34
  107. package/dist/layers.DjUOC4st.js +0 -16
  108. package/dist/layers.DjhJT1nZ.js +0 -21938
  109. package/dist/layers.Djl9Gz6s.js +0 -282
  110. package/dist/layers.Dn2AP7iE.js +0 -1283
  111. package/dist/layers.Dqbek_0L.js +0 -40
  112. package/dist/layers.DsDjOLHs.js +0 -437
  113. package/dist/layers.DsOaqGXW.js +0 -8
  114. package/dist/layers.DuE1l7lR.js +0 -41
  115. package/dist/layers.DxA6ocdw.js +0 -70
  116. package/dist/layers.DxHlP7Pb.js +0 -39
  117. package/dist/layers.Dy1naDTQ.js +0 -14
  118. package/dist/layers.DyZ5R-vS.js +0 -37
  119. package/dist/layers.H2Kl_PC2.js +0 -40
  120. package/dist/layers.IW4NBP9k.js +0 -39
  121. package/dist/layers.LGx1jmqd.js +0 -40
  122. package/dist/layers.NABwYdw5.js +0 -35
  123. package/dist/layers.NtwvbkGN.js +0 -1580
  124. package/dist/layers.O-bFTk-n.js +0 -268
  125. package/dist/layers.R_udKe_N.js +0 -38
  126. package/dist/layers.TdTDbIzb.js +0 -1126
  127. package/dist/layers.WLeJl9el.js +0 -202
  128. package/dist/layers.b0h5ZBmD.js +0 -61
  129. package/dist/layers.dEHKcy8J.js +0 -320
  130. package/dist/layers.eTredPK_.js +0 -36
  131. package/dist/layers.gIdzfQAa.js +0 -5
  132. package/dist/layers.huV95Ipe.js +0 -295
  133. package/dist/layers.jU4W5PG5.js +0 -9166
  134. package/dist/layers.lCpg7dOn.js +0 -21
  135. package/dist/layers.mQcENPPW.js +0 -802
  136. package/dist/layers.nPQCmYXI.js +0 -423
  137. package/dist/layers.ntC1foLT.js +0 -39
  138. package/dist/layers.uHy1yMbq.js +0 -6
@@ -0,0 +1,2227 @@
1
+ var Tt = Object.defineProperty;
2
+ var Lt = (t, e, o) => e in t ? Tt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
+ var ye = (t, e, o) => Lt(t, typeof e != "symbol" ? e + "" : e, o);
4
+ import { jsx as l, jsxs as Q, Fragment as Re } from "react/jsx-runtime";
5
+ import { useMemo as ie, createContext as Ce, useContext as X, useState as q, useEffect as O, useCallback as H, useRef as ce, lazy as Rt, Suspense as Dt } from "react";
6
+ import { initReactI18next as Ft, useTranslation as Ot, I18nextProvider as Ut } from "react-i18next";
7
+ import { $generateHtmlFromNodes as $e, $generateNodesFromDOM as je } from "@lexical/html";
8
+ import { CollaborationPlugin as zt } from "@lexical/react/LexicalCollaborationPlugin";
9
+ import { LexicalComposer as Bt } from "@lexical/react/LexicalComposer";
10
+ import { createEmptyHistoryState as jt, HistoryPlugin as bt } from "@lexical/react/LexicalHistoryPlugin";
11
+ import { LoadingOverlay as qt } from "@mantine/core";
12
+ import { UNDO_COMMAND as yt, COMMAND_PRIORITY_NORMAL as He, REDO_COMMAND as _t, $getNodeByKey as ae, $nodesOfType as wt, COMMAND_PRIORITY_LOW as B, $getSelection as ne, $isRangeSelection as Te, createCommand as Wt, COMMAND_PRIORITY_EDITOR as Kt, COPY_COMMAND as $t, $getRoot as _e, $createParagraphNode as Ht, PASTE_COMMAND as Ct, $insertNodes as qe, BLUR_COMMAND as Vt, FOCUS_COMMAND as Yt, KEY_ENTER_COMMAND as Jt, DELETE_CHARACTER_COMMAND as Gt, KEY_ESCAPE_COMMAND as Zt, $setSelection as Qt, KEY_DOWN_COMMAND as Xt, KEY_ARROW_UP_COMMAND as eo, KEY_ARROW_LEFT_COMMAND as to, KEY_ARROW_DOWN_COMMAND as oo, DROP_COMMAND as ao, COMMAND_PRIORITY_HIGH as Ve, KEY_ARROW_RIGHT_COMMAND as no, INSERT_PARAGRAPH_COMMAND as io, KEY_BACKSPACE_COMMAND as ro } from "lexical";
13
+ import { WebsocketProvider as kt } from "y-websocket";
14
+ import so from "i18next";
15
+ import { useLexicalComposerContext as vt } from "@lexical/react/LexicalComposerContext";
16
+ import { mergeRegister as De, registerNestedElementResolver as lo } from "@lexical/utils";
17
+ import { F as co, E as uo, L as Ye } from "./layers.CXffIp2y.js";
18
+ import { $ as Fe, a as Je, b as Oe, c as Ue, E as de, d as le, e as mo, f as ho, M as po, g as go } from "./layers.Dq3o7sh3.js";
19
+ import { C as fo, a as bo, b as yo, E as _o, M as wo, c as Co, d as ko, L as vo, e as So, f as Ao, g as xo, S as Eo, h as Io, N as Mo, F as Po, i as No, j as To, B as Lo, k as Ro, T as Do, A as Fo, l as Oo, m as Uo, n as zo, o as Bo, p as jo, q as qo, r as Wo, s as Ko, t as $o, u as Ge, v as Ho } from "./layers.D6d62qQ_.js";
20
+ import { Array as Ze, Map as Qe, YArrayEvent as Vo, Doc as Yo } from "yjs";
21
+ import { ClearEditorPlugin as Jo } from "@lexical/react/LexicalClearEditorPlugin";
22
+ import { ClickableLinkPlugin as Go } from "@lexical/react/LexicalClickableLinkPlugin";
23
+ import { LexicalErrorBoundary as Zo } from "@lexical/react/LexicalErrorBoundary";
24
+ import { HashtagPlugin as Qo } from "@lexical/react/LexicalHashtagPlugin";
25
+ import { HorizontalRulePlugin as Xo } from "@lexical/react/LexicalHorizontalRulePlugin";
26
+ import { OnChangePlugin as ea } from "@lexical/react/LexicalOnChangePlugin";
27
+ import { RichTextPlugin as ta } from "@lexical/react/LexicalRichTextPlugin";
28
+ import { createPortal as Xe } from "react-dom";
29
+ import { $unwrapMarkNode as oa, $wrapSelectionInMarkNode as aa, $getMarkIDs as na } from "@lexical/mark";
30
+ import { createDOMRange as ia, createRectsFromDOMRange as ra } from "@lexical/selection";
31
+ import { debounce as sa } from "lodash-es";
32
+ import { CommentComposer as la, CommentsPanel as da } from "@layers-app/shared";
33
+ import { TOGGLE_CONNECT_COMMAND as ca } from "@lexical/yjs";
34
+ import { T as et, F as tt, D as ua } from "./layers.Duy8YzsH.js";
35
+ import { V as ma, M as ha, F as pa, a as ga } from "./layers.Ci1-qkbn.js";
36
+ import { c as fa, O as ba, k as ya, d as _a, s as wa, a as Ca, b as ot, e as at, p as ka, f as va, K as Sa, g as Aa, h as xa, R as Ea } from "./layers.Dev6Yrwi.js";
37
+ import { useDebouncedCallback as nt } from "@mantine/hooks";
38
+ const Ia = "0.5.6-optimization", Ma = {
39
+ version: Ia
40
+ }, Pa = /* @__PURE__ */ JSON.parse(`{"placeholder":"Write something, or press '/' for commands...","heading":{"h1":"Heading 1","h2":"Heading 2","h3":"Heading 3","name":"Heading"},"close":"Close","upload":"Upload","unsavedChanges":{"title":"Unsaved changes","message":"Are you sure you want to close the page? All unsaved data will be lost.","cancel":"Cancel","closeWithoutSaving":"Close without saving"},"menu":{"heading":{"title":"Headings","hintShowCase":"Your Ideas, Documents, and Plans. United. Welcome to {{projectName}} — this is a connected workspace where work becomes better and faster.","h1":{"subtitle":"Large Heading","hintDescription":"H1 is used to create the main heading of a page or section, which sets the overall theme. It is also used to automatically generate the table of contents for a document.","keywords":{"header1":"header1","headerOne":"headerone","h1":"h1"}},"h2":{"subtitle":"Medium Heading","hintDescription":"H2 is used to create a secondary heading of a page or section, which sets a general theme. It is also used to automatically generate the table of contents for a document.","keywords":{"header2":"header2","headerTwo":"headertwo","h2":"h2"}},"h3":{"subtitle":"Small Heading","hintDescription":"H3 is used to create a subheading of a page or section, which sets a general theme. It is also used to automatically generate the table of contents for a document.","keywords":{"header3":"header3","headerThree":"headerthree","h3":"h3"}}},"lists":{"title":"Lists","numberList":{"name":"Numbered List","subtitle":"A simple numbered list","hint":{"firstItem":"First item","secondItem":"Second item","firstSubItem":"First sub-item","secondSubItem":"Second sub-item","firstSubSubItem":"First sub-sub-item","secondSubSubItem":"Second sub-sub-item","description":"This tool creates a list with items that are automatically numbered when new rows are added."}},"bulletList":{"name":"Bulleted List","subtitle":"Automatically marked list","hint":{"firstItem":"First item","secondItem":"Second item","firstSubItem":"First sub-item","secondSubItem":"Second sub-item","firstSubSubItem":"First sub-sub-item","secondSubSubItem":"Second sub-sub-item","description":"This tool creates a list with items that are automatically marked with bullets when new rows are added."}},"checkList":{"name":"Checklist","subtitle":"Easy task management","hint":{"indeterminate":"Indeterminate","unchecked":"Unchecked","checked":"Checked","description":"Creates a task list with the ability to mark completed items and sub-items."}}},"main":{"title":"Basics","paragraph":{"name":"Paragraph","subtitle":"Simply start typing regular text","hint":{"text":"Your Ideas, Documents, and Plans. United. Welcome to {{projectName}} — this is a connected workspace where work becomes better and faster.","description":"A few lines of text, left-aligned, imitating a text block."}},"quote":{"name":"Quote","subtitle":"Write down a quote","hint":{"text":"/quote Your Ideas, Documents, and Plans. United. Welcome to {{projectName}} — this is a connected workspace where work becomes better and faster. Stay focused, stay aligned, and achieve more with Layers.","description":"Used to insert quotes or highlight important text blocks. It is visually separated from the main text."}},"collapse":{"name":"Collapsible","subtitle":"Hide block content","hint":{"firstItemEmpty":"First item is empty","secondItem":"Second item","firstSubItemEmpty":"First sub-item is empty","secondSubItem":"Second sub-item","firstSubSubItemEmpty":"First sub-sub-item is empty","secondSubSubItem":"Second sub-sub-item","description":"Used to create blocks with content that can be hidden or shown when clicked. Almost any other block can be placed inside such a list."}},"horizontal-rule":{"name":"Divider","subtitle":"Visualizes block dividers","hint":{"topText":"Pressed the slash. Then entered something...","bottomText":"The next day, everything became clearer and more understandable. As if what was unknown yesterday became completely familiar and ordinary today. Take, for example...","description":"Used to visually separate sections or blocks of text on a page."}},"table":{"name":"Table","subtitle":"Add a simple table to your page","hint":{"firstRow":"First cell filled with text","secondRow":"And another cell with text","description":"A tool for creating tables with multiple rows and columns to organize data."}},"grid":{"name":"Grid","subtitle":"Up to 4 columns of blocks","hint":{"firstColumn":"The next day, everything became clearer and more understandable. As if what was unknown yesterday became completely familiar and ordinary today. Take, for example...","secondColumn":"Your Ideas, Documents, and Plans. United. Welcome to {{projectName}} — this is a connected workspace where work becomes better and faster.","description":"A tool for dividing a document into multiple columns, into which any blocks can be placed."}},"code":{"name":"Code","subtitle":"Write a code snippet","copy":"Copy code","exitCommandText":"Shift + Enter to exit code block","collapsible":{"hidden":"Collapse code","expand":"Expand code"},"hint":{"description":"A tool for inserting code snippets with syntax highlighting."}},"callout":{"name":"Callout","subtitle":"Make writing stand out","hint":{"description":"-."}}},"callout":{"title":"Callout","default":{"name":"Default","hint":{"description":"A few lines of text aligned to the left, simulating a text block.","body":"/callout Your Ideas, Documents, and Plans. Unified. Welcome to {{projectName}} — a connected workspace where work gets better and faster. Your Ideas and Plans. Unified. Welcome to {{projectName}} — a connected workspace where work gets better and faster. Your Ideas, Documents, and Plans. Unified. Welcome to {{projectName}} — a connected workspace where work gets better and faster."},"keywords":{"callout":"callout","type":"default"},"subtitle":"Default callout"},"success":{"name":"Success","subtitle":"Successful notification","keywords":{"callout":"callout","type":"success"}},"warning":{"name":"Warning","hint":{"description":"A few lines of text aligned to the left, simulating a text block."},"keywords":{"callout":"callout","type":"warning"},"subtitle":"Important notification"},"alert":{"name":"Alert","hint":{"description":"A few lines of text aligned to the left, simulating a text block."},"keywords":{"callout":"callout","type":"alert"},"subtitle":"Critical notification"}},"media":{"title":"Media","photo":{"name":"Image","hint":{"description":"A tool for adding an image to a page."},"subtitle":"Upload and place via link"},"form":{"name":"Form","subtitle":"Add a form"},"video":{"name":"Video","hint":{"description":"A tool for embedding video on a page."},"subtitle":"Add a video"},"file":{"name":"File","hint":{"description":"Upload any files up to 500 MB in size, and they will be available for download to anyone you share the link to this page with."},"subtitle":"Add a file"},"audio":{"name":"Audio","hint":{"description":"Upload any audio files up to 5 MB in size, and they will be available for download and listening to anyone you share the link to this page with."},"subtitle":"Add a audio"},"excalidraw":{"name":"Paint","hint":{"description":"Draw any scheme or kind landscape. Free creativity where everything is in your hands."},"keywords":{"video":"draw"},"subtitle":"Work with vector graphics"}},"other":{"title":"Other","documents":{"empty":"You have no nested documents","name":"Nested Documents","subtitle":"Displays a list of nested documents"},"emoji":{"name":"Emoji","subtitle":"Add emoji"}},"integrations":{"title":"Integrations"}},"toolbar":{"turnInto":"Turn into","bold":"Bold","italic":"Italic","underline":"Underline","strike":"Strikethrough","superscript":"Superscript","subscript":"Subscript","align":"Alignment","left":"Align Left","center":"Align Center","right":"Align Right","justify":"Justify","indent":"Indent","outdent":"Outdent","color":"Color","code":"Code","link":"Add Link","clear":"Clear Formatting","comment":"Comment"},"link":{"linkName":"Link name","link":"Link","save":"Save","remove":"Remove","edit":"Edit","copy":"Copy"},"contextMenu":{"copy":"Copy","cut":"Cut","paste":"Paste","delete":"Delete","add":"Add","selectAll":"Select All","duplicate":"Duplicate","appearance":"Appearance"},"colors":{"lastTimeUsed":"Last Used","color":"Color","background":"Background","theme":"Theme","colors":{"standard":"Standard","gray":"Gray","brown":"Brown","orange":"Orange","yellow":"Yellow","green":"Green","blue":"Blue","purple":"Purple","pink":"Pink","red":"Red"},"callout":{"success":"Success","alert":"Alert","warning":"Warning"}},"video":{"insert":"Embed","apply":"Apply","worksWith":"Works with","add_video":"Add Video"},"swagger":{"insert":"Swagger","worksWith":"Works with","add":"Add Swagger"},"image":{"add_photo":"Add Image","preview":"Preview"},"file":{"add_file":"Add File"},"audio":{"add_audio":"Add Audio"},"mention":{"mark":"Mark someone"},"validation":{"link":"Invalid Link","shouldNotExceed":"File size should not exceed {{maxSize}} MB.","doNotUploadMoreThanSingleFile":"Please upload no more than one file.","swaggerUnavailable":"Swagger documentation is unavailable. Please make sure the URL is correct and the server is responding."},"table":{"background_one":"Cell Background Color","background_other":"Cells background color","settings":"Settings","menu":{"addColAfter":"Add Column Right","addColBefore":"Add Column Left","addRowAbove":"Add Row Above","addRowBelow":"Add Row Below","deleteCol":"Delete Column","deleteRow":"Delete Row","mergeCells":"Merge Cells","disconnectCells":"Disconnect Cells","splitCell":"Split Cell","deleteTable":"Delete Table","insertRow_one":"Insert row","insertRow_other":"Insert {{count}} rows","deleteRow_one":"Delete row","deleteRow_other":"Delete {{count}} rows","insertCol_one":"Insert column","insertCol_other":"Insert {{count}} columns","deleteCol_one":"Delete column","deleteCol_other":"Delete {{count}} columns","headTable_col":"{{value}} row column","headTable_row":"{{value}} row header","below":"Below","above":"Above","left":"Left","right":"Right","row":"Row","rows":"Rows","column":"Column","columns":"Columns"}},"column":{"name":"Insert Grid","insert":"Insert","columns":"Columns","addRight":"Add a column to the right","addLeft":"Add a column to the left","moveLeft":"Move a column to the left","changeColor":"Change the column color","moveRight":"Move a column to the right","deleteColumn":"Delete a column"},"hoverOptions":{"addNewBlockBelow":"Add block below","addNewBlockAbove":"Add block above","drag":"Drag","click":"Click","clickAction":"To open the menu","dragAction":"To move"},"embed":{"placeholder":"Enter a valid embed URL","insert":"Embed","addEmbed":"Add Embed"},"content":"Content","emoji":{"emojis":"Emoji","icons":"Icons","search":"Search","searchResults":"Search result","searchNoResults":"Emoji not found","remove":"Remove","emojiCategory":{"frequent":"Frequently used","people":"Emotions and people","nature":"Animals and nature","foods":"Food and drinks","activity":"Activities","places":"Travel and Places","objects":"Items","symbols":"Symbols","flags":"Flags"}},"form":{"url":"Enter a valid URL."},"noTitle":"No title","gallery":{"download":"Download","close":"Close","errorFile":"Failed to download file"},"emptyPageOptions":{"heading":"A Heading that will automatically generate an interactive table of contents","grid":"The grid will help structure the page horizontally","template":"Create from Template","list":"Numbered list, for easy outlining of the meeting","code":"Code block with syntax support","callout":"Callout for highlighting","table":"Table, to find dependencies in the data","integrations":"Many integrations from third-party services"},"comments":{"title":"Comments","edited":"edited","filter":{"resolved":"Resolved","open":"Open","all":"All","selectUsers":"Filter by users","searchPlaceholder":"Search users","emptyPlaceholder":"No users found","byStatus":"Filter by status","byPerson":"Filter by person"},"generalComment":"Add general comment","addComment":"Add a comment","replyComment":"Enter your reply","inputEditor":{"uploadFiles":"Upload files","sendMessage":"Send message","editMessage":"Edit message","clear":"Clear","clearModal":{"title":"Clear input","description":{"both":"Are you sure you want to delete the text and files?","text":"Are you sure you want to delete the text?","files":"Are you sure you want to delete the files?","empty":"Clear the input field?"}},"discardModal":{"title":"Exit without saving","description":"If you exit now, all unsaved changes will be lost.","labels":{"confirm":"Yes, exit","cancel":"Close"}},"cancelCommentModal":{"description":"If you leave now, your draft comment will be discarded and it won’t be posted."}},"notifications":{"title":"Notify me about:","description":"You will always be notified about mentions","options":{"all":"All comments","replies":"Replies"},"uploadMessages":{"tooManyFiles":"You can upload no more than 10 files!","fileTooLarge":"File(s) larger than 5MB will not be uploaded!","fileLimit":"You have reached the limit of 10 files"}},"actionTooltips":{"resolve":"Resolve","reopen":"Re-open","addReaction":"Add reaction","reactionLimit":"You’ve reached the reaction limit","reply":"Reply"},"menuActions":{"edit":"Edit","delete":"Delete","download":"Download"},"deleteModal":{"title":{"thread":"Delete Thread","general":"Delete General Discussion","comment":"Delete Reply"},"description":{"thread":"Are you sure you want to delete this thread and all its replies?","general":"Are you sure you want to delete this general discussion and all its replies?","comment":"Are you sure you want to delete this reply?"},"actions":{"cancel":"Cancel","remove":"Remove","delete":"Delete"}},"repliesToggle":{"show_one":"Show {{count}} more comment","show_other":"Show {{count}} more comments","hide":"Hide replies"},"emptyState":{"not-resolved":"No open comments","resolved":"No resolved comments","all":"No comments","userFilter":"No comments found for the selected user"}},"ai":{"placeholder":"Custom prompt","copied":"copied","copy":"copy","back":"Back","menu":{"style":{"professional":"Professional","straightforward":"Straightforward","passiveAggressive":"Passive-aggressive","friendly":"Friendly","poetic":"Poetic","passive_aggressive":"Passive aggressive","pirate":"Pirate"},"main":{"modifySelection":"Modify selection","improveWriting":"Improve writing","fixMistakes":"Fix mistakes","simplify":"Simplify","addMoreDetail":"Add more detail","generate":"Generate","summarise":"Summarise","translate":"Translate into...","changeStyle":"Change style to...","explain":"Explain"},"answer":{"replaceSelection":"Replace selection","addTextInline":"Add text inline","addBelowParagraph":"Add below paragraph","modifyFurther":"Modify further","continueWriting":"Continue writing","regenerate":"Regenerate","otherOptions":"Other options","discard":"Discard"},"languages":{"arabic":"Arabic","bengali":"Bengali","chinese":"Chinese","dutch":"Dutch","english":"English","french":"French","german":"German","hindi":"Hindi","japanese":"Japanese","korean":"Korean","nepali":"Nepali","portuguese":"Portuguese","spanish":"Spanish"}}},"actions":{"delete":"Delete","align":"Alignment"},"cancel":"Cancel"}`), Na = {
41
+ editor: Pa
42
+ }, Ta = /* @__PURE__ */ JSON.parse(`{"placeholder":"Escribe algo o pulsa '/' para comandos...","heading":{"h1":"Encabezado 1","h2":"Encabezado 2","h3":"Encabezado 3","name":"Encabezado"},"close":"Cerrar","upload":"Subir","unsavedChanges":{"title":"Cambios no guardados","message":"¿Está seguro de que desea cerrar la página? Todos los datos no guardados se perderán.","cancel":"Cancelar","closeWithoutSaving":"Cerrar sin guardar"},"menu":{"heading":{"title":"Encabezados","hintShowCase":"Tus ideas, documentos y planes. Unidos. Bienvenido a {{projectName}}: un espacio de trabajo conectado donde el trabajo mejora y se acelera.","h1":{"subtitle":"Encabezado grande","hintDescription":"H1 se utiliza para crear el encabezado principal de una página o sección, estableciendo el tema general. También se utiliza para generar automáticamente el índice de contenidos del documento.","keywords":{"header1":"encabezado1","headerOne":"encabezadouno","h1":"h1"}},"h2":{"subtitle":"Encabezado mediano","hintDescription":"H2 se utiliza para crear un encabezado secundario de una página o sección, estableciendo un tema general. También se utiliza para generar automáticamente el índice de contenidos.","keywords":{"header2":"encabezado2","headerTwo":"encabezadodos","h2":"h2"}},"h3":{"subtitle":"Encabezado pequeño","hintDescription":"H3 se utiliza para crear un subencabezado de una página o sección. También genera automáticamente el índice de contenidos.","keywords":{"header3":"encabezado3","headerThree":"encabezadotres","h3":"h3"}}},"lists":{"title":"Listas","numberList":{"name":"Lista numerada","subtitle":"Una lista numerada simple","hint":{"firstItem":"Primer elemento","secondItem":"Segundo elemento","firstSubItem":"Primer subelemento","secondSubItem":"Segundo subelemento","firstSubSubItem":"Primer sub-subelemento","secondSubSubItem":"Segundo sub-subelemento","description":"Esta herramienta crea una lista con elementos que se numeran automáticamente al agregar nuevas filas."}},"bulletList":{"name":"Lista con viñetas","subtitle":"Lista con marcadores automáticos","hint":{"firstItem":"Primer elemento","secondItem":"Segundo elemento","firstSubItem":"Primer subelemento","secondSubItem":"Segundo subelemento","firstSubSubItem":"Primer sub-subelemento","secondSubSubItem":"Segundo sub-subelemento","description":"Crea una lista cuyos elementos están marcados automáticamente con viñetas."}},"checkList":{"name":"Lista de tareas","subtitle":"Gestión de tareas fácil","hint":{"indeterminate":"Indeterminado","unchecked":"No marcado","checked":"Marcado","description":"Crea una lista de tareas con opción de marcar como completadas."}}},"main":{"title":"Elementos básicos","paragraph":{"name":"Párrafo","subtitle":"Comienza a escribir texto normal","hint":{"text":"Tus ideas, documentos y planes. Unidos. Bienvenido a {{projectName}}: un espacio de trabajo conectado donde el trabajo mejora y se acelera.","description":"Un bloque de texto alineado a la izquierda."}},"quote":{"name":"Cita","subtitle":"Escribe una cita","hint":{"text":"/quote Tus ideas, documentos y planes. Unidos. Bienvenido a {{projectName}}: un espacio de trabajo conectado donde el trabajo mejora y se acelera.","description":"Inserta citas o destaca bloques de texto importantes."}},"collapse":{"name":"Plegable","subtitle":"Oculta contenido del bloque","hint":{"firstItemEmpty":"Primer elemento vacío","secondItem":"Segundo elemento","firstSubItemEmpty":"Primer subelemento vacío","secondSubItem":"Segundo subelemento","firstSubSubItemEmpty":"Primer sub-subelemento vacío","secondSubSubItem":"Segundo sub-subelemento","description":"Crea bloques cuyo contenido se puede ocultar o mostrar al hacer clic."}},"horizontal-rule":{"name":"Divisor","subtitle":"Visualiza divisores de bloques","hint":{"topText":"Presionó la barra diagonal. Luego ingresó algo...","bottomText":"Al día siguiente, todo quedó más claro. Lo que ayer era desconocido, hoy es familiar. Por ejemplo...","description":"Separa visualmente secciones o bloques de texto."}},"table":{"name":"Tabla","subtitle":"Agrega una tabla simple a la página","hint":{"firstRow":"Primera celda con texto","secondRow":"Otra celda con texto","description":"Crea tablas con múltiples filas y columnas para organizar datos."}},"grid":{"name":"Cuadrícula","subtitle":"Hasta 4 columnas de bloques","hint":{"firstColumn":"Al día siguiente todo fue más claro...","secondColumn":"Tus ideas, documentos y planes. Unidos...","description":"Divide el documento en múltiples columnas que pueden contener bloques."}},"code":{"name":"Código","subtitle":"Escribe un fragmento de código","copy":"Copiar código","exitCommandText":"Shift + Enter para salir del bloque","collapsible":{"hidden":"Colapsar código","expand":"Expandir código"},"hint":{"description":"Inserta fragmentos de código con resaltado de sintaxis."}},"callout":{"name":"Llamado","subtitle":"Destaca un bloque de texto","hint":{"description":"-."}}},"callout":{"title":"Llamado","default":{"name":"Por defecto","hint":{"description":"Bloque de texto alineado a la izquierda.","body":"/callout Tus ideas, documentos y planes. Unidos. Bienvenido a {{projectName}}..."},"keywords":{"callout":"llamado","type":"default"},"subtitle":"Llamado por defecto"},"success":{"name":"Éxito","subtitle":"Notificación de éxito","keywords":{"callout":"llamado","type":"success"}},"warning":{"name":"Advertencia","hint":{"description":"Bloque de texto alineado a la izquierda."},"keywords":{"callout":"llamado","type":"warning"},"subtitle":"Notificación importante"},"alert":{"name":"Alerta","hint":{"description":"Bloque de texto alineado a la izquierda."},"keywords":{"callout":"llamado","type":"alert"},"subtitle":"Notificación crítica"}},"media":{"title":"Multimedia","photo":{"name":"Imagen","hint":{"description":"Agrega una imagen a la página."},"subtitle":"Sube o enlaza una imagen"},"form":{"name":"Formulario","subtitle":"Agrega un formulario"},"video":{"name":"Video","hint":{"description":"Incrusta un video en la página."},"subtitle":"Agrega un video"},"file":{"name":"Archivo","hint":{"description":"Sube archivos de hasta 500 MB para que puedan ser descargados por quienes tengan el enlace."},"subtitle":"Agrega un archivo"},"audio":{"name":"Audio","hint":{"description":"Sube archivos de audio de hasta 5 MB para compartir y escuchar."},"subtitle":"Agrega un audio"},"excalidraw":{"name":"Dibujo","hint":{"description":"Dibuja cualquier esquema o paisaje. Creatividad sin límites."},"keywords":{"video":"dibujo"},"subtitle":"Trabaja con gráficos vectoriales"}},"other":{"title":"Otros","documents":{"empty":"No tienes documentos anidados","name":"Documentos Anidados","subtitle":"Muestra una lista de documentos anidados"},"emoji":{"name":"Emoji","subtitle":"Agrega emoji"}},"integrations":{"title":"Integraciones"}},"toolbar":{"turnInto":"Convertir en","bold":"Negrita","italic":"Cursiva","underline":"Subrayado","strike":"Tachado","superscript":"Superíndice","subscript":"Subíndice","align":"Alineación","left":"Alinear a la izquierda","center":"Alinear al centro","right":"Alinear a la derecha","justify":"Justificar","indent":"Aumentar sangría","outdent":"Disminuir sangría","color":"Color","code":"Código","link":"Agregar enlace","clear":"Quitar formato","comment":"Comentario"},"link":{"linkName":"Nombre del enlace","link":"Enlace","save":"Guardar","remove":"Eliminar","edit":"Editar","copy":"Copiar"},"contextMenu":{"copy":"Copiar","cut":"Cortar","paste":"Pegar","delete":"Eliminar","add":"Agregar","selectAll":"Seleccionar todo","duplicate":"Duplicar","appearance":"Apariencia"},"colors":{"lastTimeUsed":"Último uso","color":"Color","background":"Fondo","theme":"Tema","colors":{"standard":"Estándar","gray":"Gris","brown":"Marrón","orange":"Naranja","yellow":"Amarillo","green":"Verde","blue":"Azul","purple":"Púrpura","pink":"Rosa","red":"Rojo"},"callout":{"success":"Éxito","alert":"Alerta","warning":"Advertencia"}},"video":{"insert":"Insertar","apply":"Aplicar","worksWith":"Funciona con","add_video":"Agregar video"},"swagger":{"insert":"Swagger","worksWith":"Funciona con","add":"Agregar Swagger"},"image":{"add_photo":"Agregar imagen","preview":"Vista previa"},"file":{"add_file":"Agregar archivo"},"audio":{"add_audio":"Agregar audio"},"mention":{"mark":"Mencionar a alguien"},"validation":{"link":"Enlace inválido","shouldNotExceed":"El tamaño del archivo no debe exceder {{maxSize}} MB.","doNotUploadMoreThanSingleFile":"Por favor, no subas más de un archivo.","swaggerUnavailable":"La documentación de Swagger no está disponible. Asegúrese de que la URL sea correcta y que el servidor esté respondiendo."},"table":{"background_one":"Color de fondo de celda","background_other":"Color de fondo de las celdas","settings":"Configuraciones","menu":{"addColAfter":"Agregar columna a la derecha","addColBefore":"Agregar columna a la izquierda","addRowAbove":"Agregar fila arriba","addRowBelow":"Agregar fila abajo","deleteCol":"Eliminar columna","deleteRow":"Eliminar fila","mergeCells":"Combinar celdas","disconnectCells":"Desconectar celdas","splitCell":"Dividir celda","deleteTable":"Eliminar tabla","insertRow_one":"Insertar fila","insertRow_other":"Insertar {{count}} filas","deleteRow_one":"Eliminar fila","deleteRow_other":"Eliminar {{count}} filas","insertCol_one":"Insertar columna","insertCol_other":"Insertar {{count}} columnas","deleteCol_one":"Eliminar columna","deleteCol_other":"Eliminar {{count}} columnas","headTable_col":"Columna de fila {{value}}","headTable_row":"Encabezado de fila {{value}}","below":"Debajo","above":"Arriba","left":"Izquierda","right":"Derecha","row":"Fila","rows":"Filas","column":"Columna","columns":"Columnas"}},"column":{"name":"Insertar cuadrícula","insert":"Insertar","columns":"Columnas","addRight":"Agregar columna a la derecha","addLeft":"Agregar columna a la izquierda","moveLeft":"Mover columna a la izquierda","changeColor":"Cambiar color de la columna","moveRight":"Mover columna a la derecha","deleteColumn":"Eliminar columna"},"hoverOptions":{"addNewBlockBelow":"Agregar bloque debajo","addNewBlockAbove":"Agregar bloque arriba","drag":"Arrastrar","click":"Clic","clickAction":"Para abrir el menú","dragAction":"Para mover"},"embed":{"placeholder":"Introduce una URL válida para incrustar","insert":"Insertar","addEmbed":"Agregar incrustación"},"content":"Contenido","emoji":{"emojis":"Emoji","icons":"Íconos","search":"Buscar","searchResults":"Resultado de búsqueda","searchNoResults":"Emoji no encontrado","remove":"Eliminar","emojiCategory":{"frequent":"Usados frecuentemente","people":"Emociones y personas","nature":"Animales y naturaleza","foods":"Comida y bebidas","activity":"Actividades","places":"Viajes y lugares","objects":"Objetos","symbols":"Símbolos","flags":"Banderas"}},"form":{"url":"Introduce una URL válida."},"noTitle":"Sin título","gallery":{"download":"Descargar","close":"Cerrar","errorFile":"No se pudo descargar el archivo"},"emptyPageOptions":{"heading":"Un encabezado que generará automáticamente un índice interactivo","grid":"La cuadrícula ayuda a estructurar horizontalmente la página","list":"Lista numerada para estructurar fácilmente reuniones","template":"Crear desde plantilla","code":"Bloque de código con resaltado de sintaxis","callout":"Llamado para resaltar información","table":"Tabla para encontrar dependencias en los datos","integrations":"Muchas integraciones de servicios externos"},"comments":{"title":"Comentarios","edited":"editado","filter":{"resolved":"Resueltos","open":"Abiertos","all":"Todos","selectUsers":"Filtrar por usuarios","searchPlaceholder":"Buscar usuarios","emptyPlaceholder":"No se encontraron usuarios","byStatus":"Filtrar por estado","byPerson":"Filtrar por persona"},"generalComment":"Agregar comentario general","addComment":"Agregar comentario","replyComment":"Escribe tu respuesta","inputEditor":{"uploadFiles":"Subir archivos","sendMessage":"Enviar mensaje","editMessage":"Editar mensaje","clear":"Limpiar","clearModal":{"title":"Limpiar entrada","description":{"both":"¿Está seguro de que desea eliminar el texto y los archivos?","text":"¿Está seguro de que desea eliminar el texto?","files":"¿Está seguro de que desea eliminar los archivos?","empty":"¿Limpiar el campo de entrada?"}},"discardModal":{"title":"Salir sin guardar","description":"Si sales ahora, se perderán todos los cambios no guardados.","labels":{"confirm":"Sí, salir","cancel":"Cerrar"}},"cancelCommentModal":{"description":"Si sales ahora, tu borrador de comentario se eliminará y no se publicará."}},"notifications":{"title":"Notificarme sobre:","description":"Siempre recibirás notificaciones sobre menciones","options":{"all":"Todos los comentarios","replies":"Respuestas"},"uploadMessages":{"tooManyFiles":"¡Puedes subir como máximo 10 archivos!","fileTooLarge":"¡Los archivos de más de 5 MB no se subirán!","fileLimit":"Has alcanzado el límite de 10 archivos"}},"actionTooltips":{"resolve":"Resolver","reopen":"Reabrir","addReaction":"Agregar reacción","reactionLimit":"Has alcanzado el límite de reacciones","reply":"Responder"},"menuActions":{"edit":"Editar","delete":"Eliminar","download":"Descargar"},"deleteModal":{"title":{"thread":"Eliminar hilo","general":"Eliminar discusión general","comment":"Eliminar respuesta"},"description":{"thread":"¿Estás seguro de que deseas eliminar este hilo y todas sus respuestas?","general":"¿Estás seguro de que deseas eliminar esta discusión general y todas sus respuestas?","comment":"¿Estás seguro de que deseas eliminar esta respuesta?"},"actions":{"cancel":"Cancelar","remove":"Quitar","delete":"Eliminar"}},"repliesToggle":{"show_one":"Mostrar {{count}} comentario más","show_other":"Mostrar {{count}} comentarios más","hide":"Ocultar respuestas"},"emptyState":{"not-resolved":"No hay comentarios abiertos","resolved":"No hay comentarios resueltos","all":"No hay comentarios","userFilter":"No se encontraron comentarios para el usuario seleccionado"}},"ai":{"placeholder":"Prompt personalizado","copied":"copiado","copy":"copiar","back":"Atrás","menu":{"style":{"professional":"Profesional","straightforward":"Directo","passiveAggressive":"Pasivo-agresivo","friendly":"Amistoso","poetic":"Poético","passive_aggressive":"Pasivo agresivo","pirate":"Pirata"},"main":{"modifySelection":"Modificar selección","improveWriting":"Mejorar redacción","fixMistakes":"Corregir errores","simplify":"Simplificar","addMoreDetail":"Agregar más detalle","generate":"Generar","summarise":"Resumir","translate":"Traducir a...","changeStyle":"Cambiar estilo a...","explain":"Explicar"},"answer":{"replaceSelection":"Reemplazar selección","addTextInline":"Agregar texto en línea","addBelowParagraph":"Agregar debajo del párrafo","modifyFurther":"Modificar más","continueWriting":"Seguir escribiendo","regenerate":"Regenerar","otherOptions":"Otras opciones","discard":"Descartar"},"languages":{"arabic":"Árabe","bengali":"Bengalí","chinese":"Chino","dutch":"Holandés","english":"Inglés","french":"Francés","german":"Alemán","hindi":"Hindi","japanese":"Japonés","korean":"Coreano","nepali":"Nepalí","portuguese":"Portugués","spanish":"Español"}}},"actions":{"delete":"Eliminar","align":"Alineación"},"cancel":"Cancelar"}`), La = {
43
+ editor: Ta
44
+ }, Ra = /* @__PURE__ */ JSON.parse(`{"placeholder":"Напишите что-нибудь, или нажмите '/' для команд...","upload":"Загрузить","heading":{"h1":"Заголовок 1","h2":"Заголовок 2","h3":"Заголовок 3","name":"Заголовок"},"close":"Закрыть","unsavedChanges":{"title":"Несохранённые изменения","message":"Вы действительно хотите закрыть страницу? Все несохранённые данные будут потеряны.","cancel":"Отмена","closeWithoutSaving":"Закрыть без сохранения"},"menu":{"heading":{"title":"Заголовоки","hintShowCase":"Ваши Идеи, Документы и Планы. Объединены. Добро пожаловать в {{projectName}} — это связанное рабочее пространство, где работа становится лучше и быстрее.","h1":{"subtitle":"Большой заголовок","hintDescription":"H1 используется для создания основного заголовка страницы или раздела, который задает общую тему. Так же используется для автоматического формирования содержания документа.","keywords":{"heading":"оглавление","header1":"заголовок1","headerOne":"заголовокодин","h1":"з1"}},"h2":{"subtitle":"средний заголовок","hintDescription":"H2 используется для создания дополнительного заголовка страницы или раздела, который задает общую тему. Так же используется для автоматического формирования содержания документа.","keywords":{"heading":"оглавление","header2":"заголовок2","headerTwo":"заголовокдва","h2":"з2"}},"h3":{"subtitle":"Маленький заголовок","hintDescription":"H3 используется для создания подзаголовка страницы или раздела, который задает общую тему. Так же используется для автоматического формирования содержания документа.","keywords":{"heading":"оглавление","header3":"заголовок3","headerThree":"заголовоктри","h3":"з3"}}},"lists":{"title":"Списки","numberList":{"name":"Нумерованный Список","subtitle":"Простой нумерованный список","hint":{"firstItem":"Первый пункт","secondItem":"Второй пункт","firstSubItem":"Первый подпункт","secondSubItem":"Второй подпункт","firstSubSubItem":"Первый подподпункт","secondSubSubItem":"Второй подподпункт","description":"Этот инструмент создает список с элементами, которые автоматически нумеруются при добавлении новых строк."},"keywords":{"headingList":"нумерованныйсписок","heading":"нумерация","markers":"цифры"}},"bulletList":{"name":"Маркированный список","subtitle":"Автоматически маркированный список","hint":{"firstItem":"Первый пункт","secondItem":"Второй пункт","firstSubItem":"Первый подпункт","secondSubItem":"Второй подпункт","firstSubSubItem":"Первый подподпункт","secondSubSubItem":"Второй подподпункт","description":"Этот инструмент создает список с элементами, которые маркируются автоматически при добавлении новых строк."},"keywords":{"headingList":"маркированныйсписок","heading":"маркеры","markers":"точки","bulletsAlt1":"буллеты","bulletsAlt2":"булеты"}},"checkList":{"name":"Чек-лист","subtitle":"Простое управление задачами","hint":{"indeterminate":"Неопределен","unchecked":"Неотмечен","checked":"Отмечен","description":"Создает список задач с возможностью отметки выполненных пунктов и подпунктов"},"keywords":{"headingList":"списокзадач","heading":"чеклист","markers":"флажки","shoppingList":"списокпокупок"}}},"main":{"title":"Базовые","paragraph":{"name":"Парараграф","subtitle":"Просто начнийте писать обычным текстом","hint":{"text":"Ваши Идеи, Документы и Планы. Объединены. Добро пожаловать в {{projectName}} — это связанное рабочее пространство, где работа становится лучше и быстрее.","description":"Несколько строк текста, выровненных по левому краю, имитирующих текстовый блок"},"keywords":{"paragraph":"параграф","text":"текст"}},"quote":{"name":"Цитата","subtitle":"Запишите цитату","hint":{"text":"/quote Ваши Идеи, Документы и Планы. Объединены. Добро пожаловать в {{projectName}} — это связанное рабочее пространство, где работа становится лучше и быстрее. Оставайтесь сосредоточенными, действуйте слаженно и добивайтесь большего с Layers.","description":"Используется для вставки цитат или выделения важных блоков текста. Визуально выносится отдельно от основного текста"},"keywords":{"quote":"цитата","mark":"кавычки","citation":"цитирование"}},"collapse":{"name":"Сворачиваемый","subtitle":"Прячет содержимое блока","hint":{"firstItemEmpty":"Первый пункт пустой","secondItem":"Второй пункт","firstSubItemEmpty":"Первый подпункт пустой","secondSubItem":"Второй подпункт","firstSubSubItemEmpty":"Первый подподпункт пустой ","secondSubSubItem":"Второй подподпункт","description":"Используется для создания блоков с содержимым, которое можно скрыть или показать при нажатии. Внутри такого списка может быть почти любой другой блок"},"keywords":{"collapsibleList":"сворачиваемыйсписок","expandList":"раскрыть","hideList":"скрыть","turnList":"свернуть"}},"horizontal-rule":{"name":"Разделитель","subtitle":"Визуализирует разделитель блоков","hint":{"topText":"нажал на слэш. Потом что-то ввёл...","bottomText":"На следующий день всё стало яснее и понятнее. Будто то, что ещё вчера было чем-то неизведанным сегодня стало совершенно знакомым и обыденным. Вот взять, к примеру","description":"Используется для визуального разделения разделов или блоков текста на странице"},"keywords":{"divider":"разделитель","horizontalLine":"линия","border":"граница"}},"table":{"name":"Таблица","subtitle":"Добавьте на свою страницу простую таблицу","hint":{"firstRow":"Первая ячейка заполненная текстом","secondRow":"И ещё одна с текстом ячейка","description":"Инструмент для создания таблиц с несколькими строками и столбцами для организации данных"},"keywords":{"table":"таблица"}},"grid":{"name":"Сетка","subtitle":"До 4-х колонок из блоков","hint":{"firstColumn":"На следующий день всё стало яснее и понятнее. Будто то, что ещё вчера было чем-то неизведанным сегодня стало совершенно знакомым и обыденным. Вот взять, к примеру","secondColumn":"Ваши Идеи, Документы и Планы. Объединены. Добро пожаловать в {{projectName}} — это связанное рабочее пространство, где работа становится лучше и быстрее.","description":"Инструмент для разделения докуента на несколько столбцов, в которые можно помещать любые блоки"},"keywords":{"net":"сетка","grid":"грид","columns":"столбцы"}},"code":{"name":"Код","subtitle":"Запишите фрагмент кода","copy":"Копировать код","exitCommandText":"Shift + Enter чтобы выйти из блока кода","collapsible":{"hidden":"Свернуть код","expand":"Развернуть код"},"hint":{"description":"Инструмент для вставки фрагментов программного кода с подсветкой синтаксиса"},"keywords":{"code":"код","snippet":"сниппет"}}},"media":{"title":"Медиа","photo":{"name":"Картинка","hint":{"description":"Инструмент для добавления изображения на страницу"},"keywords":{"picture":"картинка","display":"изображение","meme":"мем","drawing":"иллюстрация","memePic":"пикча"},"subtitle":"Загрузите и разместите с помощью ссылки"},"form":{"name":"Форма","subtitle":"Добавьте форму"},"video":{"name":"Видео","hint":{"description":"Инструмент для вставки видео на страницу"},"keywords":{"video":"видео"},"subtitle":"Добавьте видео"},"file":{"name":"Файл","hint":{"description":"Загружайте любые файлы объёмом до 500 Мб и они будут доступны для скачивания всем, с кем вы поделитесь ссылкой на эту страницу."},"keywords":{"video":"файл"},"subtitle":"Добавьте файл"},"audio":{"name":"Аудио","hint":{"description":"Загружайте любые аудиофайлы объёмом до 5 Мб и они будут доступны для скачивания и прослушивания всем, с кем вы поделитесь ссылкой на эту страницу."},"keywords":{"video":"аудио"},"subtitle":"Добавьте аудио"},"excalidraw":{"name":"Доска для рисования","hint":{"description":"Нарисуй любую схему или концепт. Полная свобода творчества — всё в твоих руках."},"keywords":{"draw":"рисовать","drawing":"рисовалка"},"subtitle":"Работайте с векторной графикой"}},"callout":{"title":"Уведомления","default":{"name":"По умолчанию","hint":{"description":"Несколько строк текста, выровненных по левому краю, имитирующих текстовый блок.","body":"/callout Ваши Идеи, Документы и Планы. Объединены. Добро пожаловать в {{projectName}} — это связанное рабочее пространство, где работа становится лучше и быстрее. Ваши Идеи и Планы. Объединены. Добро пожаловать в {{projectName}} — это связанное рабочее пространство, где работа становится лучше и быстрее. Ваши Идеи, Документы и Планы. Объединены. Добро пожаловать в {{projectName}} — это связанное рабочее пространство, где работа"},"keywords":{"callout":"оповещение","type":"поумолчанию"},"subtitle":"Уведомление по умолчанию"},"success":{"name":"Успех","subtitle":"Успешное уведомления","keywords":{"callout":"оповещение","type":"успех"}},"warning":{"name":"Предупреждение","hint":{"description":"Несколько строк текста, выровненных по левому краю, имитирующих текстовый блок."},"keywords":{"callout":"оповещение","type":"предупреждение"},"subtitle":"Важное уведомления"},"alert":{"name":"Внимание","hint":{"description":"Несколько строк текста, выровненных по левому краю, имитирующих текстовый блок."},"keywords":{"callout":"оповещение","type":"внимание"},"subtitle":"Критическое уведомление"}},"other":{"title":"Прочее","documents":{"empty":"У вас нет вложенных документов","name":"Вложенные документы","subtitle":"Отображает список вложенных документов"},"emoji":{"name":"Эмодзи","subtitle":"Добавьте эмодзи"}},"integrations":{"title":"Интеграции"}},"toolbar":{"turnInto":"Превратить в","bold":"Жирный","italic":"Курсив","underline":"Подчеркнутый","strike":"Зачеркнутый","superscript":"Надстрочный","subscript":"Подстрочный","align":"Выравнивание","left":"По левому краю","center":"По центру","right":"По правому краю","justify":"Выравнивание по ширине","indent":"Отступ","outdent":"Отступ","color":"Цвет","code":"Код","link":"Добавить ссылку","clear":"Очистить формат","comment":"Комментарий"},"link":{"linkName":"Название ссылки","link":"Ссылка","save":"Сохранить","remove":"Удалить","edit":"Редактировать","copy":"Копировать"},"contextMenu":{"copy":"Копировать","cut":"Вырезать","paste":"Вставить","delete":"Удалить","add":"Добавить","selectAll":"Выбрать все","duplicate":"Дублировать","appearance":"Внешний вид"},"colors":{"lastTimeUsed":"Последнее раз использовался","color":"Цвет","background":"Фон","theme":"Темы","colors":{"standard":"Стандартный","gray":"Серый","brown":"Коричневый","orange":"Оранжевый","yellow":"Желтый","green":"Зеленый","blue":"Синий","purple":"Фиолетовый","pink":"Розовый","red":"Красный"},"callout":{"success":"Успех","alert":"Внимание","warning":"Предупреждение"}},"video":{"insert":"Встроить","apply":"Применить","worksWith":"Работает с","add_video":"Добавить видео"},"swagger":{"insert":"Swagger","worksWith":"Works with","add":"Добавить Swagger"},"image":{"add_photo":"Добавить картинку","preview":"Превью"},"file":{"add_file":"Добавить файл"},"audio":{"add_audio":"Добавить аудио"},"mention":{"mark":"Отменить кого-то"},"validation":{"link":"Неверная ссылка","shouldNotExceed":"Размер файла не должен превышать {{maxSize}} МБ.","doNotUploadMoreThanSingleFile":"Пожалуйста, загружайте не более одного файла.","swaggerUnavailable":"Swagger-документация недоступна. Убедитесь, что адрес указан правильно и сервер отвечает."},"table":{"background_one":"Цвет фона ячейки","background_few":"Цвет фона ячеек","background_other":"Цвет фона ячеек","settings":"Настройки","menu":{"addColAfter":"Добавить столбец справа","addColBefore":"Добавить столбец слева","addRowAbove":"Добавить строку выше","addRowBelow":"Добавить строку ниже","deleteCol":"Удалить столбец","deleteRow":"Удалить строку","mergeCells":"Объединить ячейки","disconnectCells":"Разъединить ячейки","splitCell":"Разделить ячейку","deleteTable":"Удалить таблицу","insertRow_one":"Вставить строку","insertRow_few":"Вставить {{count}} строки","insertRow_many":"Вставить {{count}} строк","deleteRow_one":"Удалить строку","deleteRow_few":"Удалить {{count}} строки","deleteRow_many":"Удалить {{count}} строк","insertCol_one":"Вставить столбец","insertCol_few":"Вставить {{count}} столбца","insertCol_many":"Вставить {{count}} столбец","deleteCol_one":"Удалить столбец","deleteCol_few":"Удалить {{count}} столбца","deleteCol_many":"Удалить {{count}} столбец","headTable_col":"{{value}} заголовок столбца","headTable_row":"{{value}} заголовок строки","below":"ниже","above":"выше","left":"слева","right":"справа","row":"cтроку","rows":"cтроки","column":"cтолбец","columns":"cтолбца"}},"column":{"name":"Вставить сетку","insert":"Вставить","columns":"Колонки","addRight":"Добавить колонку справа","addLeft":"Добавить колонку слева","moveLeft":"Переместить колонку влево","moveRight":"Переместить колонку вправо","deleteColumn":"Удалить колонку","changeColor":"Поменять цвет колонки"},"hoverOptions":{"addNewBlockBelow":"Добавить блок выше","addNewBlockAbove":"Добавить блок ниже","drag":"Перетащите","click":"Нажмите","clickAction":"Чтобы открыть меню","dragAction":"Чтобы переместить"},"embed":{"placeholder":"Введите действительный URL-адрес для встраивания","insert":"Встроить","addEmbed":"Встроить внешний контент"},"content":"Содержание","emoji":{"emojis":"Эмодзи","icons":"Иконки","search":"Поиск","searchResults":"Результат поиска","searchNoResults":"Эмодзи не найдено","remove":"Удалить","emojiCategory":{"frequent":"Часто используемые","people":"Эмоции и люди","nature":"Животные и природа","foods":"Еда и напитки","activity":"Активности","places":"Путешествия и места","objects":"Предметы","symbols":"Символы","flags":"Флаги"}},"form":{"url":"Укажите правильный URL."},"noTitle":"Без названия","gallery":{"download":"Загрузить","close":"Закрыть","errorFile":"Не удалось загрузить файл"},"emptyPageOptions":{"heading":"Заголовок, который автоматически создаст интерактивное оглавление","template":"Создать из шаблона","grid":"Сетка поможет структурировать страницу по горизонтали","list":"Нумерованный список для удобного планирования встречи","code":"Блок кода с поддержкой синтаксиса","callout":"Выделенный блок для акцента","table":"Таблица для поиска зависимостей в данных","integrations":"Множество интеграций от сторонних сервисов"},"comments":{"title":"Комментарии","edited":"изменено","filter":{"resolved":"Решённые","open":"Открытые","all":"Все","selectUsers":"Фильтр по пользователю","searchPlaceholder":"Поиск по пользователю","emptyPlaceholder":"Пользователи отсутствуют","byStatus":"Фильтр по статусу","byPerson":"Фильтр по пользователю"},"generalComment":"Добавьте общий комментарий","addComment":"Добавьте комментарий","replyComment":"Введите ответ","inputEditor":{"uploadFiles":"Добавить файлы","sendMessage":"Отправить сообщение","editMessage":"Редактировать сообщение","clear":"Очистить","clearModal":{"title":"Очистить ввод","description":{"both":"Вы уверены, что хотите удалить текст и файлы?","text":"Вы уверены, что хотите удалить текст?","files":"Вы уверены, что хотите удалить файлы?","empty":"Очистить поле ввода?"}},"discardModal":{"title":"Выйти без сохранения","description":"Если вы выйдете сейчас, все несохранённые изменения будут потеряны.","labels":{"confirm":"Да, выйти","cancel":"Закрыть"}},"cancelCommentModal":{"description":"Если вы выйдете сейчас, черновик комментария будет удалён и он не будет опубликован."}},"notifications":{"title":"Уведомлять меня:","description":"Вы всегда будете получать уведомления при упоминаниях","options":{"all":"Все комментарии","replies":"Ответы"},"uploadMessages":{"tooManyFiles":"Можно загрузить не более 10 файлов!","fileTooLarge":"Файл(ы) больше 5MB не будут загружены!","fileLimit":"Вы достигли лимита, 10 файлов"}},"actionTooltips":{"resolve":"Отметить как решённый","reopen":"Открыть снова","addReaction":"Добавить реакцию","reactionLimit":"Вы достигли лимита реакций","reply":"Ответить"},"menuActions":{"edit":"Редактировать","delete":"Удалить","download":"Скачать"},"deleteModal":{"title":{"thread":"Удалить тред","general":"Удалить обсуждение","comment":"Удалить ответ"},"description":{"thread":"Вы уверены, что хотите удалить этот тред и все ответы к нему?","general":"Вы уверены, что хотите удалить это обсуждение и все связанные ответы?","comment":"Вы уверены, что хотите удалить этот ответ?"},"actions":{"cancel":"Отмена","remove":"Удалить","delete":"Удалить"}},"repliesToggle":{"show_one":"Показать ещё {{count}} комментарий","show_other":"Показать ещё {{count}} комментариев","hide":"Скрыть ответы"},"emptyState":{"not-resolved":"Нет открытых комментариев","resolved":"Нет решённых комментариев","all":"Нет комментариев","userFilter":"По выбранному пользователю комментариев не найдено"}},"actions":{"delete":"Удалить","align":"Выравнивание"},"ai":{"placeholder":"Пользовательский запрос","copied":"скопировано","copy":"копировать","back":"Назад","menu":{"style":{"professional":"Профессиональный","straightforward":"Простой и понятный","friendly":"Дружелюбный","poetic":"Поэтический","passiveAggressive":"Пассивно-агрессивный","pirate":"Пиратский"},"main":{"modifySelection":"Изменить выделение","improveWriting":"Улучшить текст","fixMistakes":"Исправить ошибки","simplify":"Упростить","addMoreDetail":"Добавить подробности","generate":"Сгенерировать","summarise":"Резюме","translate":"Перевести на...","changeStyle":"Изменить стиль на...","explain":"Объяснить"},"answer":{"replaceSelection":"Заменить выделение","addTextInline":"Добавить текст в строку","addBelowParagraph":"Добавить под абзацем","modifyFurther":"Дополнительно изменить","continueWriting":"Продолжить написание","regenerate":"Сгенерировать заново","otherOptions":"Другие варианты","discard":"Удалить"},"languages":{"arabic":"Арабский","bengali":"Бенгальский","chinese":"Китайский","dutch":"Голландский","english":"Английский","french":"Французский","german":"Немецкий","hindi":"Хинди","japanese":"Японский","korean":"Корейский","nepali":"Непальский","portuguese":"Португальский","spanish":"Испанский"}}},"cancel":"Отменить"}`), Da = {
45
+ editor: Ra
46
+ }, Fa = { color: "Color", background: "Background", colors: { standard: "Standard", gray: "Gray", brown: "Brown", orange: "Orange", yellow: "Yellow", green: "Green", blue: "Blue", purple: "Purple", pink: "Pink", red: "Red" } }, Oa = { gallery: "Gallery", upload: "Upload", uploadFile: "Upload file", maxFileSize: "Maximum file size - {{maxSize}}MB", link: "Link", pasteLink: "Paste image link...", pasteVideoLink: "Paste video link...", pasteAudioLink: "Paste audio link...", pasteFileLink: "Paste file link...", submitLink: "Apply", worksWithAnyImage: "Works with any image from the Internet", worksWithAnyFile: "Works with any files from the Internet", worksWithAnyVideo: "Works with MP4 video files, as well as YouTube, VK Video, and RuTube", worksWithAnyAudio: "Works with MP3 audio files", searchImage: "Search image...", noResult: "No images found for your query", change: "Change cover", invalidLink: "Invalid link", loadMore: "Load more", dragOrClickToChoose: "Drop file here or click to select", notSupported: "This file type is not supported" }, Ua = { gallery: "Gallery", link: "Link", search: "Search", upload: "Upload", uploadFile: "Upload file", change: "Change", remove: "Remove", error: "Error", dragOrClickToChoose: "Drag the file here or click to select", maxFileSize: "Maximum file size is {{maxSize}} MB", pasteLink: "Paste the image link...", submitLink: "Apply", worksWithAnyImage: "Works with any images from the Internet", noImages: "No images", errors: { typeIsNotAllowed: "This file type is not supported", shouldNotExceed: "File size should not exceed {{maxSize}} MB.", doNotUploadMoreThanSingleFile: "Please upload no more than one file.", invalidLink: "Invalid link" } }, za = { title: "Comments", edited: "edited", filter: { resolved: "Resolved", open: "Open", all: "All", selectUsers: "Filter by users", searchPlaceholder: "Search users", emptyPlaceholder: "No users found", byStatus: "Filter by status", byPerson: "Filter by person" }, generalComment: "Add general comment", addComment: "Add a comment", replyComment: "Enter your reply", inputEditor: { uploadFiles: "Upload files", sendMessage: "Send message", editMessage: "Edit message", clear: "Clear", clearModal: { title: "Clear input", description: { both: "Are you sure you want to delete the text and files?", text: "Are you sure you want to delete the text?", files: "Are you sure you want to delete the files?", empty: "Clear the input field?" } }, discardModal: { title: "Exit without saving", description: "If you exit now, all unsaved changes will be lost.", labels: { confirm: "Yes, exit", cancel: "Close" } }, cancelCommentModal: { description: "If you leave now, your draft comment will be discarded and it won’t be posted." } }, notifications: { title: "Notify me about:", description: "You will always be notified about mentions", options: { all: "All comments", replies: "Replies" }, uploadMessages: { tooManyFiles: "You can upload no more than 10 files!", fileTooLarge: "File(s) larger than 5MB will not be uploaded!", fileLimit: "You have reached the limit of 10 files" } }, actionTooltips: { resolve: "Resolve", reopen: "Re-open", addReaction: "Add reaction", reactionLimit: "You’ve reached the reaction limit", reply: "Reply" }, menuActions: { edit: "Edit", delete: "Delete", download: "Download" }, deleteModal: { title: { thread: "Delete Thread", general: "Delete General Discussion", comment: "Delete Reply" }, description: { thread: "Are you sure you want to delete this thread and all its replies?", general: "Are you sure you want to delete this general discussion and all its replies?", comment: "Are you sure you want to delete this reply?" }, actions: { cancel: "Cancel", remove: "Remove", delete: "Delete" } }, repliesToggle: { show_one: "Show {{count}} more comment", show_other: "Show {{count}} more comments", hide: "Hide replies" }, emptyState: { "not-resolved": "No open comments", resolved: "No resolved comments", all: "No comments", userFilter: "No comments found for the selected user" } }, Ba = { save: "Save" }, ja = { searchResults: "Search results", icons: "Icons", searchNoResults: "No results found", categories: { activity: "Activities", custom: "Custom", flags: "Flags", foods: "Food and drinks", frequent: "Frequently used", nature: "Animals and nature", objects: "Objects", people: "Emotions and people", places: "Travel and places", symbols: "Symbols" } }, qa = "Emojis", Wa = "Remove", Ka = "Search", $a = "No category", Ha = {
47
+ colorPicker: Fa,
48
+ changeCover: Oa,
49
+ dropZone: Ua,
50
+ comments: za,
51
+ customDrawer: Ba,
52
+ emojiPicker: ja,
53
+ emojis: qa,
54
+ remove: Wa,
55
+ search: Ka,
56
+ noCat: $a
57
+ }, Va = { color: "Color", background: "Fondo", colors: { standard: "Estándar", gray: "Gris", brown: "Marrón", orange: "Naranja", yellow: "Amarillo", green: "Verde", blue: "Azul", purple: "Morado", pink: "Rosa", red: "Rojo" } }, Ya = { gallery: "Galería", upload: "Subir", uploadFile: "Subir archivo", maxFileSize: "Tamaño máximo del archivo - {{maxSize}}MB", link: "Enlace", pasteLink: "Pegar enlace de imagen...", pasteVideoLink: "Pegar enlace de video...", pasteAudioLink: "Pegar enlace de audio...", pasteFileLink: "Pegar enlace de archivo...", submitLink: "Aplicar", worksWithAnyImage: "Funciona con cualquier imagen de Internet", worksWithAnyFile: "Funciona con cualquier archivo de Internet", worksWithAnyVideo: "Funciona con archivos MP4, así como con YouTube, VK Video y RuTube", worksWithAnyAudio: "Funciona con archivos de audio MP3", searchImage: "Buscar imagen...", noResult: "No se encontraron imágenes para tu búsqueda", change: "Cambiar portada", invalidLink: "Enlace inválido", loadMore: "Cargar más", dragOrClickToChoose: "Suelta el archivo aquí o haz clic para seleccionarlo", notSupported: "Este tipo de archivo no es compatible" }, Ja = { gallery: "Galería", link: "Enlace", search: "Buscar", upload: "Subir", uploadFile: "Subir archivo", change: "Cambiar", remove: "Eliminar", error: "Error", dragOrClickToChoose: "Arrastra el archivo aquí o haz clic para seleccionarlo", maxFileSize: "El tamaño máximo del archivo es {{maxSize}} MB", pasteLink: "Pegar enlace de imagen...", submitLink: "Aplicar", worksWithAnyImage: "Funciona con cualquier imagen de Internet", noImages: "No hay imágenes", errors: { typeIsNotAllowed: "Este tipo de archivo no es compatible", shouldNotExceed: "El archivo no debe exceder de {{maxSize}} MB.", doNotUploadMoreThanSingleFile: "Por favor, sube solo un archivo.", invalidLink: "Enlace inválido" } }, Ga = { title: "Comentarios", edited: "editado", filter: { resolved: "Resueltos", open: "Abiertos", all: "Todos", selectUsers: "Filtrar por usuarios", searchPlaceholder: "Buscar usuarios", emptyPlaceholder: "No se encontraron usuarios", byStatus: "Filtrar por estado", byPerson: "Filtrar por persona" }, generalComment: "Agregar comentario general", addComment: "Agregar comentario", replyComment: "Escribe tu respuesta", inputEditor: { uploadFiles: "Subir archivos", sendMessage: "Enviar mensaje", editMessage: "Editar mensaje", clear: "Limpiar", clearModal: { title: "Limpiar entrada", description: { both: "¿Está seguro de que desea eliminar el texto y los archivos?", text: "¿Está seguro de que desea eliminar el texto?", files: "¿Está seguro de que desea eliminar los archivos?", empty: "¿Limpiar el campo de entrada?" } }, discardModal: { title: "Salir sin guardar", description: "Si sales ahora, se perderán todos los cambios no guardados.", labels: { confirm: "Sí, salir", cancel: "Cerrar" } }, cancelCommentModal: { description: "Si sales ahora, tu borrador de comentario se eliminará y no se publicará." } }, notifications: { title: "Notificarme sobre:", description: "Siempre recibirás notificaciones sobre menciones", options: { all: "Todos los comentarios", replies: "Respuestas" }, uploadMessages: { tooManyFiles: "¡Puedes subir como máximo 10 archivos!", fileTooLarge: "¡Los archivos de más de 5 MB no se subirán!", fileLimit: "Has alcanzado el límite de 10 archivos" } }, actionTooltips: { resolve: "Resolver", reopen: "Reabrir", addReaction: "Agregar reacción", reactionLimit: "Has alcanzado el límite de reacciones", reply: "Responder" }, menuActions: { edit: "Editar", delete: "Eliminar", download: "Descargar" }, deleteModal: { title: { thread: "Eliminar hilo", general: "Eliminar discusión general", comment: "Eliminar respuesta" }, description: { thread: "¿Estás seguro de que deseas eliminar este hilo y todas sus respuestas?", general: "¿Estás seguro de que deseas eliminar esta discusión general y todas sus respuestas?", comment: "¿Estás seguro de que deseas eliminar esta respuesta?" }, actions: { cancel: "Cancelar", remove: "Quitar", delete: "Eliminar" } }, repliesToggle: { show_one: "Mostrar {{count}} comentario más", show_other: "Mostrar {{count}} comentarios más", hide: "Ocultar respuestas" }, emptyState: { "not-resolved": "No hay comentarios abiertos", resolved: "No hay comentarios resueltos", all: "No hay comentarios", userFilter: "No se encontraron comentarios para el usuario seleccionado" } }, Za = { save: "Guardar" }, Qa = { searchResults: "Resultados de búsqueda", icons: "Iconos", searchNoResults: "No se encontraron resultados", categories: { activity: "Actividades", custom: "Personalizado", flags: "Banderas", foods: "Comida y bebidas", frequent: "Usados frecuentemente", nature: "Animales y naturaleza", objects: "Objetos", people: "Emociones y personas", places: "Viajes y lugares", symbols: "Símbolos" } }, Xa = "Emojis", en = "Eliminar", tn = "Buscar", on = "Sin categoría", an = {
58
+ colorPicker: Va,
59
+ changeCover: Ya,
60
+ dropZone: Ja,
61
+ comments: Ga,
62
+ customDrawer: Za,
63
+ emojiPicker: Qa,
64
+ emojis: Xa,
65
+ remove: en,
66
+ search: tn,
67
+ noCat: on
68
+ }, nn = { color: "Цвет", background: "Подложка", colors: { standard: "Стандартный", gray: "Серый", brown: "Коричневый", orange: "Оранжевый", yellow: "Желтый", green: "Зеленый", blue: "Синий", purple: "Фиолетовый", pink: "Розовый", red: "Красный" } }, rn = { gallery: "Галерея", upload: "Загрузить", uploadFile: "Загрузить файл", maxFileSize: "Максимальный вес файла - {{maxSize}}МБ", link: "Ссылка", pasteLink: "Вставьте ссылку на изображение...", pasteVideoLink: "Вставьте ссылку на видео...", pasteAudioLink: "Вставьте ссылку на аудио...", pasteFileLink: "Вставьте ссылку на файл...", submitLink: "Применить", worksWithAnyImage: "Работает с любыми изображениями из Интернета", worksWithAnyFile: "Работает с любыми файлами из Интернета", worksWithAnyVideo: "Работает с видеофайлами формата mp4, а также с YouTube, VK Video и RuTube", worksWithAnyAudio: "Работает с аудиофайлами формата mp3", searchImage: "Поиск изображения...", noResult: "По вашему запросу изображений не найдено", change: "Изменить обложку", invalidLink: "Неверная ссылка", dragOrClickToChoose: "Перетащите файл сюда или нажмите, чтобы выбрать", loadMore: "Загрузить ещё", notSupported: "Этот тип файла не поддерживается" }, sn = { gallery: "Галерея", link: "Ссылка", search: "Поиск", upload: "Загрузить", uploadFile: "Загрузить файл", change: "Изменить", remove: "Удалить", error: "Ошибка", dragOrClickToChoose: "Перетащите файл сюда или кликните, чтобы выбрать", maxFileSize: "Максимальный размер файла — {{maxSize}} МБ", pasteLink: "Вставьте ссылку на изображение...", submitLink: "Применить", worksWithAnyImage: "Работает с любым изображением из Интернета", noImages: "Нет изображений", errors: { typeIsNotAllowed: "Этот тип файла не поддерживается", shouldNotExceed: "Размер файла не должен превышать {{maxSize}} МБ.", doNotUploadMoreThanSingleFile: "Пожалуйста, загружайте не более одного файла.", invalidLink: "Недопустимая ссылка" } }, ln = { title: "Комментарии", edited: "изменено", filter: { resolved: "Решённые", open: "Открытые", all: "Все", selectUsers: "Фильтр по пользователю", searchPlaceholder: "Поиск по пользователю", emptyPlaceholder: "Пользователи отсутствуют", byStatus: "Фильтр по статусу", byPerson: "Фильтр по пользователю" }, generalComment: "Добавьте общий комментарий", addComment: "Добавьте комментарий", replyComment: "Введите ответ", inputEditor: { uploadFiles: "Добавить файлы", sendMessage: "Отправить сообщение", editMessage: "Редактировать сообщение", clear: "Очистить", clearModal: { title: "Очистить ввод", description: { both: "Вы уверены, что хотите удалить текст и файлы?", text: "Вы уверены, что хотите удалить текст?", files: "Вы уверены, что хотите удалить файлы?", empty: "Очистить поле ввода?" } }, discardModal: { title: "Выйти без сохранения", description: "Если вы выйдете сейчас, все несохранённые изменения будут потеряны.", labels: { confirm: "Да, выйти", cancel: "Закрыть" } }, cancelCommentModal: { description: "Если вы выйдете сейчас, черновик комментария будет удалён и он не будет опубликован." } }, notifications: { title: "Уведомлять меня:", description: "Вы всегда будете получать уведомления при упоминаниях", options: { all: "Все комментарии", replies: "Ответы" }, uploadMessages: { tooManyFiles: "Можно загрузить не более 10 файлов!", fileTooLarge: "Файл(ы) больше 5MB не будут загружены!", fileLimit: "Вы достигли лимита, 10 файлов" } }, actionTooltips: { resolve: "Отметить как решённый", reopen: "Открыть снова", addReaction: "Добавить реакцию", reactionLimit: "Вы достигли лимита реакций", reply: "Ответить" }, menuActions: { edit: "Редактировать", delete: "Удалить", download: "Скачать" }, deleteModal: { title: { thread: "Удалить тред", general: "Удалить обсуждение", comment: "Удалить ответ" }, description: { thread: "Вы уверены, что хотите удалить этот тред и все ответы к нему?", general: "Вы уверены, что хотите удалить это обсуждение и все связанные ответы?", comment: "Вы уверены, что хотите удалить этот ответ?" }, actions: { cancel: "Отмена", remove: "Удалить", delete: "Удалить" } }, repliesToggle: { show_one: "Показать ещё {{count}} комментарий", show_other: "Показать ещё {{count}} комментариев", hide: "Скрыть ответы" }, emptyState: { "not-resolved": "Нет открытых комментариев", resolved: "Нет решённых комментариев", all: "Нет комментариев", userFilter: "По выбранному пользователю комментариев не найдено" } }, dn = { save: "Сохранить" }, cn = { searchResults: "Результаты поиска", searchNoResults: "Результаты не найдены", icons: "Иконки", categories: { activity: "Активности", custom: "Свои", flags: "Флаги", foods: "Еда и напитки", frequent: "Часто используемые", nature: "Животные и природа", objects: "Предметы", people: "Эмоции и люди", places: "Путешествия и места", symbols: "Символы" } }, un = "Эмодзи", mn = "Удалить", hn = "Поиск", pn = "Нет категории", gn = {
69
+ colorPicker: nn,
70
+ changeCover: rn,
71
+ dropZone: sn,
72
+ comments: ln,
73
+ customDrawer: dn,
74
+ emojiPicker: cn,
75
+ emojis: un,
76
+ remove: mn,
77
+ search: hn,
78
+ noCat: pn
79
+ }, ze = so.createInstance();
80
+ ze.use(Ft).init({
81
+ resources: {
82
+ en: { translation: Na, ui: Ha },
83
+ ru: { translation: Da, ui: gn },
84
+ es: { translation: La, ui: an }
85
+ },
86
+ lng: "en",
87
+ // default language
88
+ fallbackLng: "en",
89
+ interpolation: {
90
+ escapeValue: !1
91
+ // для React не нужно экранирование
92
+ }
93
+ }).then(() => {
94
+ }).catch((t) => {
95
+ });
96
+ const it = {
97
+ blockCursor: "dsd__theme__blockCursor",
98
+ characterLimit: "dsd__theme__characterLimit",
99
+ code: "dsd__theme__code",
100
+ codeCollapsed: "dsd__theme__code_сollapsed",
101
+ codeHighlight: {
102
+ atrule: "dsd__theme__tokenAttr",
103
+ attr: "dsd__theme__tokenAttr",
104
+ boolean: "dsd__theme__tokenProperty",
105
+ builtin: "dsd__theme__tokenSelector",
106
+ cdata: "dsd__theme__tokenComment",
107
+ char: "dsd__theme__tokenSelector",
108
+ class: "dsd__theme__tokenFunction",
109
+ "class-name": "dsd__theme__tokenFunction",
110
+ comment: "dsd__theme__tokenComment",
111
+ constant: "dsd__theme__tokenProperty",
112
+ deleted: "dsd__theme__tokenProperty",
113
+ doctype: "dsd__theme__tokenComment",
114
+ entity: "dsd__theme__tokenOperator",
115
+ function: "dsd__theme__tokenFunction",
116
+ important: "dsd__theme__tokenVariable",
117
+ inserted: "dsd__theme__tokenSelector",
118
+ keyword: "dsd__theme__tokenAttr",
119
+ namespace: "dsd__theme__tokenVariable",
120
+ number: "dsd__theme__tokenProperty",
121
+ operator: "dsd__theme__tokenOperator",
122
+ prolog: "dsd__theme__tokenComment",
123
+ property: "dsd__theme__tokenProperty",
124
+ punctuation: "dsd__theme__tokenPunctuation",
125
+ regex: "dsd__theme__tokenVariable",
126
+ selector: "dsd__theme__tokenSelector",
127
+ string: "dsd__theme__tokenSelector",
128
+ symbol: "dsd__theme__tokenProperty",
129
+ tag: "dsd__theme__tokenProperty",
130
+ url: "dsd__theme__tokenOperator",
131
+ variable: "dsd__theme__tokenVariable"
132
+ },
133
+ embedBlock: {
134
+ base: "dsd__theme__embedBlock",
135
+ focus: "dsd__theme__embedBlockFocus"
136
+ },
137
+ hashtag: "dsd__theme__hashtag",
138
+ heading: {
139
+ h1: "dsd__theme__h1",
140
+ h2: "dsd__theme__h2",
141
+ h3: "dsd__theme__h3",
142
+ h4: "dsd__theme__h4",
143
+ h5: "dsd__theme__h5",
144
+ h6: "dsd__theme__h6"
145
+ },
146
+ excalidraw: "editor-excalidraw",
147
+ image: "editor-image",
148
+ indent: "dsd__theme__indent",
149
+ inlineImage: "inline-editor-image",
150
+ layoutContainer: "dsd__theme__layoutContainer",
151
+ layoutItem: "dsd__theme__layoutItem",
152
+ layoutDivider: "dsd__theme__layoutDivider",
153
+ calloutIcon: "dsd__theme__callout-icon",
154
+ callout: "dsd__theme__callout-container",
155
+ calloutWrapper: "dsd__theme__callout-wrapper",
156
+ calloutContainer: "dsd__theme__callout-main-container",
157
+ link: "dsd__theme__link",
158
+ list: {
159
+ checklist: "dsd__theme__checklist",
160
+ listitem: "dsd__theme__listItem",
161
+ listitemChecked: "dsd__theme__listItemChecked",
162
+ listitemUnchecked: "dsd__theme__listItemUnchecked",
163
+ nested: {
164
+ listitem: "dsd__theme__nestedListItem"
165
+ },
166
+ olDepth: [
167
+ "dsd__theme__ol1",
168
+ "dsd__theme__ol2",
169
+ "dsd__theme__ol3",
170
+ "dsd__theme__ol4",
171
+ "dsd__theme__ol5"
172
+ ],
173
+ ul: "dsd__theme__ul"
174
+ },
175
+ listitemIndeterminate: "dsd__theme__listIndeterminate",
176
+ mark: "dsd__theme__mark",
177
+ markOverlap: "dsd__theme__markOverlap",
178
+ paragraph: "dsd__theme__paragraph",
179
+ quote: "dsd__theme__quote",
180
+ rtl: "dsd__theme__rtl",
181
+ table: "dsd__theme__table",
182
+ tableAddColumns: "dsd__theme__tableAddColumns",
183
+ tableAddRows: "dsd__theme__tableAddRows",
184
+ tableCell: "dsd__theme__tableCell",
185
+ tableCellActionButton: "dsd__theme__tableCellActionButton",
186
+ tableCellActionButtonContainer: "dsd__theme__tableCellActionButtonContainer",
187
+ tableCellEditing: "dsd__theme__tableCellEditing",
188
+ tableCellHeader: "dsd__theme__tableCellHeader",
189
+ tableCellPrimarySelected: "dsd__theme__tableCellPrimarySelected",
190
+ tableCellResizer: "dsd__theme__tableCellResizer",
191
+ tableCellSelected: "dsd__theme__tableCellSelected",
192
+ tableCellSortedIndicator: "dsd__theme__tableCellSortedIndicator",
193
+ tableResizeRuler: "dsd__theme__tableCellResizeRuler",
194
+ tableSelected: "dsd__theme__tableSelected",
195
+ tableSelection: "dsd__theme__tableSelection",
196
+ tableScrollableWrapper: "dsd__theme__table-scrollable-wrapper",
197
+ text: {
198
+ bold: "dsd__theme__textBold",
199
+ code: "dsd__theme__textCode",
200
+ italic: "dsd__theme__textItalic",
201
+ strikethrough: "dsd__theme__textStrikethrough",
202
+ subscript: "dsd__theme__textSubscript",
203
+ superscript: "dsd__theme__textSuperscript",
204
+ underline: "dsd__theme__textUnderline",
205
+ underlineStrikethrough: "dsd__theme__textUnderlineStrikethrough"
206
+ }
207
+ }, fn = (t) => {
208
+ const e = {
209
+ ...it,
210
+ text: {
211
+ ...it.text
212
+ }
213
+ };
214
+ return t === "comment" && e.text && (delete e.text.strikethrough, delete e.text.underlineStrikethrough), e;
215
+ }, ke = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", bn = ke && "documentMode" in document ? document.documentMode : null;
216
+ var ft;
217
+ const yn = (ft = navigator.userAgentData) == null ? void 0 : ft.platform, _n = ke && /macOS|iPod|iPhone|iPad/.test(yn);
218
+ ke && "InputEvent" in window && !bn && "getTargetRanges" in new window.InputEvent("input");
219
+ const Li = ke && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), St = Ce([
220
+ (t) => () => {
221
+ },
222
+ (t) => {
223
+ }
224
+ ]), wn = ({
225
+ children: t
226
+ }) => {
227
+ const e = ie(() => {
228
+ let o = null;
229
+ const n = /* @__PURE__ */ new Set();
230
+ return [
231
+ (i) => (i(o), n.add(i), () => {
232
+ n.delete(i);
233
+ }),
234
+ (i) => {
235
+ o = i;
236
+ for (const r of n)
237
+ r(i);
238
+ }
239
+ ];
240
+ }, []);
241
+ return /* @__PURE__ */ l(St.Provider, { value: e, children: t });
242
+ }, Ri = () => {
243
+ const [t, e] = X(St), [o, n] = q(null);
244
+ return O(() => t((i) => {
245
+ n(i);
246
+ }), [t]), [o, e];
247
+ };
248
+ function xe(t) {
249
+ if (t && t.includes("unsplash"))
250
+ return null;
251
+ const e = /[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i, o = t == null ? void 0 : t.match(e);
252
+ return o && (t.startsWith("/v1/attachments/") || t.includes(window.location.origin)) ? o[0] : null;
253
+ }
254
+ function rt(t, e, o) {
255
+ t.update(
256
+ () => {
257
+ const n = ae(e);
258
+ Ue(n) || Oe(n) ? n.setSrc(o) : Fe(n) && o.trim() && n.setId(o);
259
+ },
260
+ { tag: "historic" }
261
+ );
262
+ }
263
+ const V = /* @__PURE__ */ new Map();
264
+ function Cn({ editor: t }) {
265
+ const { fetchDeleteMedia: e, fetchRestoreMedia: o, commentOptions: n } = X(ve), { pageId: i } = n || { pageId: null };
266
+ return O(() => () => {
267
+ V.clear();
268
+ }, [i]), O(() => {
269
+ if (t)
270
+ return t.getEditorState().read(() => {
271
+ var h;
272
+ const r = ((h = t.getDecorators) == null ? void 0 : h.call(t)) || t._decorators, a = /* @__PURE__ */ new Map();
273
+ for (const [m, w] of Object.entries(r)) {
274
+ const f = w.props, b = w._self, A = Ue(b) || Fe(b) || Je(b) || Oe(b);
275
+ if (!f && A)
276
+ continue;
277
+ const k = (f == null ? void 0 : f.src) || (f == null ? void 0 : f.videoID);
278
+ if (k != null && k.trim() && !(k != null && k.includes("unsplash")) && xe(k)) {
279
+ const P = a.get(k) || [], I = P.includes(m) ? P : [...P, m];
280
+ a.set(k, I);
281
+ }
282
+ }
283
+ for (const [m, w] of a.entries())
284
+ V.set(m, {
285
+ mediaNodeKeys: w
286
+ });
287
+ }), t.registerDecoratorListener(
288
+ (r) => {
289
+ var m;
290
+ const a = /* @__PURE__ */ new Map();
291
+ let h = !1;
292
+ for (const [w, f] of Object.entries(r)) {
293
+ const b = f == null ? void 0 : f.props, y = f == null ? void 0 : f._self, A = Fe(y) || Ue(y) || Je(y) || Oe(y);
294
+ if (A && ((m = b == null ? void 0 : b.src) != null && m.includes("unsplash")) || !b && A) continue;
295
+ const k = b.src || b.videoID;
296
+ if (!k) continue;
297
+ if (k.trim() === "") return;
298
+ const P = a.get(k) || [];
299
+ !P.includes(w) && xe(b == null ? void 0 : b.src) && a.set(k, [...P, w]);
300
+ }
301
+ for (const [w, f] of V.entries()) {
302
+ const b = a.get(w);
303
+ if (Array.isArray(f.mediaNodeKeys) && f.mediaNodeKeys.length > 0 && (!b || b.length === 0)) {
304
+ const y = xe(w);
305
+ if (y && e) {
306
+ const A = t.registerCommand(
307
+ yt,
308
+ () => !0,
309
+ He
310
+ );
311
+ e(y, () => {
312
+ A();
313
+ }), V.set(w, { mediaNodeKeys: [] });
314
+ }
315
+ }
316
+ }
317
+ for (const [w] of V.entries())
318
+ a.has(w) || V.set(w, { mediaNodeKeys: [] });
319
+ if (V.size > 0)
320
+ for (const [w, f] of a.entries()) {
321
+ const b = V.get(w);
322
+ if (b && Array.isArray(b.mediaNodeKeys) && b.mediaNodeKeys.length === 0 && f.length > 0) {
323
+ rt(t, f[0], " "), h = !0;
324
+ const y = xe(w);
325
+ if (V.set(w, { mediaNodeKeys: f }), y && o) {
326
+ const A = t.registerCommand(
327
+ _t,
328
+ () => !0,
329
+ He
330
+ );
331
+ o(y, () => {
332
+ A(), rt(t, f[0], w);
333
+ });
334
+ }
335
+ }
336
+ }
337
+ if (!h)
338
+ for (const [w, f] of a.entries())
339
+ V.set(w, { mediaNodeKeys: f });
340
+ }
341
+ );
342
+ }, [t, o, e]), V;
343
+ }
344
+ const st = window.location.hostname, kn = st !== "playground.lexical.dev" && st !== "lexical-playground.vercel.app", vn = new URLSearchParams(window.location.search), lt = (t) => vn.get(t) === "true", { isShowTreeView: Sn, isMaxLength: An } = {
345
+ isShowTreeView: lt("showTreeView"),
346
+ isMaxLength: lt("isMaxLength")
347
+ }, we = {
348
+ disableBeforeInput: !1,
349
+ emptyEditor: kn,
350
+ isAutocomplete: !1,
351
+ isCharLimit: !1,
352
+ isCharLimitUtf8: !1,
353
+ isCollab: !1,
354
+ isMaxLength: An,
355
+ isRichText: !0,
356
+ measureTypingPerf: !1,
357
+ shouldUseLexicalContextMenu: !1,
358
+ showNestedEditorTreeView: !1,
359
+ showTableOfContents: !1,
360
+ showTreeView: Sn,
361
+ tableCellBackgroundColor: !0,
362
+ tableCellMerge: !0
363
+ }, Di = {
364
+ ...we
365
+ }, At = Ce({
366
+ setOption: (t, e) => {
367
+ },
368
+ settings: we
369
+ });
370
+ function xn() {
371
+ const t = {}, e = new URLSearchParams(window.location.search);
372
+ for (const o of Object.keys(we)) {
373
+ const n = e.get(o);
374
+ n !== null && (t[o] = n === "true");
375
+ }
376
+ return t;
377
+ }
378
+ const En = ({
379
+ children: t
380
+ }) => {
381
+ const [e, o] = q(() => ({
382
+ ...we,
383
+ ...xn()
384
+ })), n = H((r, a) => {
385
+ o((h) => ({
386
+ ...h,
387
+ [r]: a
388
+ })), we[r] === a ? dt(r, null) : dt(r, a);
389
+ }, []), i = ie(() => ({ setOption: n, settings: e }), [n, e]);
390
+ return /* @__PURE__ */ l(At.Provider, { value: i, children: t });
391
+ }, In = () => X(At);
392
+ function dt(t, e) {
393
+ const o = new URL(window.location.href), n = new URLSearchParams(o.search);
394
+ e !== null ? n.has(t) ? n.set(t, String(e)) : n.append(t, String(e)) : n.has(t) && n.delete(t), o.search = n.toString(), window.history.pushState(null, "", o.toString());
395
+ }
396
+ const xt = Ce({}), Mn = ({
397
+ children: t
398
+ }) => {
399
+ const e = ie(
400
+ () => ({ historyState: jt() }),
401
+ []
402
+ );
403
+ return /* @__PURE__ */ l(xt.Provider, { value: e, children: t });
404
+ }, Et = () => X(xt), It = Ce(void 0), Le = {}, Pn = 1e3, Nn = ({
405
+ children: t
406
+ }) => {
407
+ const [e, o] = q(Le), n = H(
408
+ (i, r) => o(i ? { duration: r, message: i } : Le),
409
+ []
410
+ );
411
+ return O(() => {
412
+ if (e.message) {
413
+ const i = setTimeout(
414
+ () => o(Le),
415
+ e.duration ?? Pn
416
+ );
417
+ return () => clearTimeout(i);
418
+ }
419
+ }, [e]), /* @__PURE__ */ Q(It.Provider, { value: n, children: [
420
+ t,
421
+ e.message && /* @__PURE__ */ l(co, { children: e.message })
422
+ ] });
423
+ }, Fi = () => {
424
+ const t = X(It);
425
+ if (console.log("ctx", t), !t)
426
+ throw new Error("Missing FlashMessageContext");
427
+ return t;
428
+ };
429
+ function ct(t, e, o, n, i, r) {
430
+ return {
431
+ authorId: e,
432
+ text: t,
433
+ edited: !1,
434
+ reactions: [],
435
+ deleted: r === void 0 ? !1 : r,
436
+ id: o,
437
+ files: n ?? [],
438
+ clientKey: crypto.randomUUID(),
439
+ timeStamp: i === void 0 ? performance.timeOrigin + performance.now() : i,
440
+ type: "comment"
441
+ };
442
+ }
443
+ function Tn(t, e, o, n, i) {
444
+ return {
445
+ id: o.id,
446
+ quote: t,
447
+ deleted: o.deleted ?? !1,
448
+ type: "thread",
449
+ resolution: o.resolution ?? null,
450
+ clientKey: crypto.randomUUID(),
451
+ edited: !1,
452
+ text: n,
453
+ reactions: [],
454
+ files: [],
455
+ authorId: e,
456
+ timeStamp: new Date(o.updatedAt).getTime(),
457
+ children: []
458
+ };
459
+ }
460
+ const Ln = async (t, e, o) => e.length ? (await Promise.all(
461
+ e.map(
462
+ (i) => new Promise((r, a) => {
463
+ o({
464
+ file: i.file,
465
+ commentId: t,
466
+ onSuccess: (h) => {
467
+ r(h);
468
+ },
469
+ onError: (h) => {
470
+ console.error(h), a(null);
471
+ }
472
+ });
473
+ })
474
+ )
475
+ )).filter((i) => i !== null) : [];
476
+ function ut(t, e, o) {
477
+ const n = new Set(e.map((r) => r.id));
478
+ return [...t.filter(
479
+ (r) => !("id" in r) || !n.has(r.id)
480
+ ), ...o];
481
+ }
482
+ const mt = (t) => {
483
+ if (!t) return;
484
+ const e = document.querySelector(`li[data-id="${t}"]`);
485
+ e && e.scrollIntoView({
486
+ behavior: "smooth",
487
+ block: "center"
488
+ });
489
+ }, Be = (t) => {
490
+ const e = t.type.startsWith("image/");
491
+ return {
492
+ id: t.id,
493
+ file: t,
494
+ isImage: e,
495
+ src: e ? URL.createObjectURL(t) : ""
496
+ };
497
+ };
498
+ function ht(t) {
499
+ return t.type === "thread" ? {
500
+ children: Array.from(t.children),
501
+ id: t.id,
502
+ clientKey: t.clientKey,
503
+ deleted: t.deleted,
504
+ quote: t.quote,
505
+ type: "thread",
506
+ timeStamp: t.timeStamp,
507
+ reactions: t.reactions,
508
+ edited: t.edited,
509
+ authorId: t.authorId,
510
+ text: t.text,
511
+ resolution: t.resolution,
512
+ files: t.files
513
+ } : {
514
+ children: Array.from(t.children),
515
+ id: t.id,
516
+ clientKey: t.clientKey,
517
+ deleted: t.deleted,
518
+ edited: t.edited,
519
+ reactions: t.reactions,
520
+ type: "general",
521
+ quote: t.quote,
522
+ files: t.files,
523
+ timeStamp: t.timeStamp,
524
+ authorId: t.authorId,
525
+ text: t.text,
526
+ resolution: t.resolution
527
+ };
528
+ }
529
+ async function Rn(t, e, o, n, i, r) {
530
+ const a = t.filter((m) => !m.deleted).map(async (m) => {
531
+ const w = e.get(m.id);
532
+ let f = "";
533
+ if (w)
534
+ for (const I of w) {
535
+ const F = o.getElementByKey(I);
536
+ F != null && F.textContent && (f && (f += `
537
+ `), f += F.textContent);
538
+ }
539
+ const y = (await r({ commentId: m.id })).map((I) => Be(I)), { content: A } = await i({ commentId: m.id }), k = await Promise.all(
540
+ m.children.filter((I) => !I.deleted).map(async (I) => {
541
+ const { content: F } = await i({
542
+ commentId: I.id
543
+ }), d = (await r({
544
+ commentId: I.id
545
+ })).map(
546
+ (z) => Be(z)
547
+ );
548
+ return {
549
+ ...Dn(I),
550
+ files: d,
551
+ reactions: F
552
+ };
553
+ })
554
+ ), P = {
555
+ id: m.id,
556
+ authorId: m.authorId,
557
+ resolution: m.resolution,
558
+ timeStamp: new Date(m.updatedAt).getTime(),
559
+ text: m.text,
560
+ children: k,
561
+ clientKey: crypto.randomUUID(),
562
+ reactions: A,
563
+ files: y
564
+ };
565
+ return m.commentType === "REVIEW" ? { ...P, type: "general", quote: n } : f ? { ...P, type: "thread", quote: f } : null;
566
+ });
567
+ return (await Promise.all(a)).filter(Boolean);
568
+ }
569
+ function Dn(t) {
570
+ return {
571
+ authorId: t.authorId,
572
+ text: t.text,
573
+ reactions: [],
574
+ files: [],
575
+ edited: t.edited,
576
+ id: t.id,
577
+ clientKey: crypto.randomUUID(),
578
+ timeStamp: new Date(t.updatedAt).getTime(),
579
+ type: "comment",
580
+ deleted: t.deleted
581
+ };
582
+ }
583
+ function U(t) {
584
+ const e = t._changeListeners;
585
+ for (const o of e)
586
+ o();
587
+ }
588
+ class Fn {
589
+ constructor(e) {
590
+ ye(this, "_editor");
591
+ ye(this, "_comments");
592
+ ye(this, "_changeListeners");
593
+ ye(this, "_collabProvider");
594
+ this._comments = [], this._editor = e, this._collabProvider = null, this._changeListeners = /* @__PURE__ */ new Set();
595
+ }
596
+ isCollaborative() {
597
+ return this._collabProvider !== null;
598
+ }
599
+ getComments() {
600
+ return this._comments;
601
+ }
602
+ addComment(e, o, n) {
603
+ const i = Array.from(this._comments), r = this._getCollabComments();
604
+ if (o !== void 0 && e.type === "comment")
605
+ for (let a = 0; a < i.length; a++) {
606
+ const h = i[a];
607
+ if ((h.type === "thread" || h.type === "general") && h.id === o.id) {
608
+ const m = ht(
609
+ h
610
+ );
611
+ i.splice(a, 1, m);
612
+ const w = n !== void 0 ? n : m.children.length;
613
+ if (this.isCollaborative() && r !== null) {
614
+ const f = r.get(a).get("comments");
615
+ this._withRemoteTransaction(() => {
616
+ const b = this._createCollabSharedMap(e);
617
+ f.insert(w, [b]);
618
+ });
619
+ }
620
+ m.children.splice(w, 0, e);
621
+ break;
622
+ }
623
+ }
624
+ else {
625
+ const a = n !== void 0 ? n : i.length;
626
+ this.isCollaborative() && r !== null && this._withRemoteTransaction(() => {
627
+ const h = this._createCollabSharedMap(e);
628
+ r.insert(a, [h]);
629
+ }), i.splice(a, 0, e);
630
+ }
631
+ this._comments = i, U(this);
632
+ }
633
+ updateThreadId(e, o, n, i, r, a, h) {
634
+ const m = Array.from(this._comments), w = new Date(i).getTime();
635
+ if (h)
636
+ for (let f = 0; f < m.length; f++) {
637
+ const b = m[f];
638
+ if (b.id === h.id && Array.isArray(b.children)) {
639
+ const y = {
640
+ ...b,
641
+ children: [...b.children]
642
+ }, A = y.children.findIndex(
643
+ (k) => k.id === o || k.tempId === o
644
+ );
645
+ if (A !== -1) {
646
+ const k = { ...y.children[A] };
647
+ k.id = n, k.timeStamp = w, k.files = a, k.tempId = n, y.children.splice(A, 1, k), m.splice(f, 1, y);
648
+ }
649
+ break;
650
+ }
651
+ }
652
+ else {
653
+ for (let f = 0; f < m.length; f++) {
654
+ const b = m[f];
655
+ if (b.id === o || b.tempId === o) {
656
+ const y = { ...b };
657
+ y.id = n, y.timeStamp = w, y.files = a, y.tempId = n, m.splice(f, 1, y);
658
+ break;
659
+ }
660
+ }
661
+ r === "thread" && e.update(() => {
662
+ var b;
663
+ const f = wt(
664
+ de
665
+ ).filter((y) => y.__extendIds.includes(o));
666
+ for (const y of f)
667
+ (b = e.getElementByKey(y.__key)) == null || b.setAttribute("data-key", n), y.updateExtendId(o, n);
668
+ });
669
+ }
670
+ this._comments = m, U(this);
671
+ }
672
+ deleteCommentOrThread(e, o) {
673
+ const n = Array.from(this._comments);
674
+ let i = null;
675
+ if (o !== void 0)
676
+ for (let r = 0; r < n.length; r++) {
677
+ const a = n[r];
678
+ if ((a.type === "thread" || a.type === "general") && a.id === o.id) {
679
+ const h = ht(
680
+ a
681
+ );
682
+ n.splice(r, 1, h);
683
+ const m = h.children;
684
+ i = m.indexOf(e), i !== -1 && (m[i].deleted = !0);
685
+ break;
686
+ }
687
+ }
688
+ else
689
+ i = n.indexOf(e), i !== -1 && (n[i].deleted = !0);
690
+ return this._comments = n, U(this), null;
691
+ }
692
+ registerOnChange(e) {
693
+ const o = this._changeListeners;
694
+ return o.add(e), () => {
695
+ o.delete(e);
696
+ };
697
+ }
698
+ updateCurrentContent(e, o, n, i) {
699
+ this._comments = this._comments.map((r) => {
700
+ const { deletedFile: a, newFiles: h } = o;
701
+ if (i && r.id === i && r.type !== "comment")
702
+ return {
703
+ ...r,
704
+ children: r.children.map(
705
+ (m) => {
706
+ if (m.id !== n) return m;
707
+ const w = ut(
708
+ m.files,
709
+ a,
710
+ h
711
+ );
712
+ return {
713
+ ...m,
714
+ text: e,
715
+ edited: !0,
716
+ files: w
717
+ };
718
+ }
719
+ )
720
+ };
721
+ if (r.id === n) {
722
+ const m = ut(
723
+ r.files,
724
+ a,
725
+ h
726
+ );
727
+ return {
728
+ ...r,
729
+ text: e,
730
+ edited: !0,
731
+ files: m
732
+ };
733
+ }
734
+ return r;
735
+ }), U(this);
736
+ }
737
+ updateCurrentQuote(e, o) {
738
+ this._comments = this._comments.map((n) => n.id === o ? { ...n, quote: e } : n), U(this);
739
+ }
740
+ replaceOptimisticPhotos(e, o, n) {
741
+ this._comments = this._comments.map((i) => {
742
+ const r = i.type !== "comment";
743
+ if (n && r && i.id === n)
744
+ return {
745
+ ...i,
746
+ children: i.children.map(
747
+ (a) => {
748
+ if (a.id !== o) return a;
749
+ const h = a.files.filter(
750
+ (m) => {
751
+ var w;
752
+ return !((w = m.id) != null && w.startsWith("temp-"));
753
+ }
754
+ );
755
+ return {
756
+ ...a,
757
+ files: [...h, ...e]
758
+ };
759
+ }
760
+ )
761
+ };
762
+ if (i.id === o) {
763
+ const a = i.files.filter(
764
+ (h) => {
765
+ var m;
766
+ return !((m = h.id) != null && m.startsWith("temp-"));
767
+ }
768
+ );
769
+ return {
770
+ ...i,
771
+ files: [...a, ...e]
772
+ };
773
+ }
774
+ return i;
775
+ }), U(this);
776
+ }
777
+ restoreLastDeletedComment(e, o) {
778
+ o ? this._comments = this._comments.map((n) => {
779
+ if (n.id === o) {
780
+ const i = n;
781
+ if (Array.isArray(i.children))
782
+ return {
783
+ ...i,
784
+ children: i.children.map(
785
+ (r) => r.id === e ? { ...r, deleted: !1 } : r
786
+ )
787
+ };
788
+ }
789
+ return n;
790
+ }) : this._comments = this._comments.map(
791
+ (n) => n.id === e ? { ...n, deleted: !1 } : n
792
+ ), U(this);
793
+ }
794
+ async initializeComments(e, o, n, i, r, a, h) {
795
+ const m = await Rn(
796
+ e,
797
+ o,
798
+ n,
799
+ i,
800
+ r,
801
+ a
802
+ );
803
+ this._comments = m.flat(), h(!1), U(this);
804
+ }
805
+ _withRemoteTransaction(e) {
806
+ const o = this._collabProvider;
807
+ o !== null && o.doc.transact(e, this);
808
+ }
809
+ _withLocalTransaction(e) {
810
+ const o = this._collabProvider;
811
+ try {
812
+ this._collabProvider = null, e();
813
+ } finally {
814
+ this._collabProvider = o;
815
+ }
816
+ }
817
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
818
+ _getCollabComments() {
819
+ const e = this._collabProvider;
820
+ return e !== null ? e.doc.get("comments", Ze) : null;
821
+ }
822
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
823
+ _createCollabSharedMap(e) {
824
+ const o = new Qe(), n = e.type, i = e.id;
825
+ if (o.set("type", n), o.set("id", i), n === "comment")
826
+ o.set("author", e.authorId), o.set("content", e.text), o.set("deleted", e.deleted), o.set("timeStamp", e.timeStamp);
827
+ else {
828
+ e.type === "thread" && o.set("quote", e.quote);
829
+ const r = new Ze();
830
+ e.children.forEach(
831
+ (a, h) => {
832
+ const m = this._createCollabSharedMap(a);
833
+ r.insert(h, [m]);
834
+ }
835
+ ), o.set("comments", r);
836
+ }
837
+ return o;
838
+ }
839
+ resolveThreat(e, o) {
840
+ this._comments = this._comments.map(
841
+ (n) => n.id === e.id ? { ...n, resolution: o } : n
842
+ ), U(this);
843
+ }
844
+ addReaction(e, o, n) {
845
+ n ? this._comments = this._comments.map((i) => i.id === n.id && "children" in i ? {
846
+ ...i,
847
+ children: i.children.map(
848
+ (r) => r.id === o.id ? {
849
+ ...r,
850
+ reactions: [...r.reactions || [], e]
851
+ } : r
852
+ )
853
+ } : i) : this._comments = this._comments.map(
854
+ (i) => i.id === o.id ? { ...i, reactions: [...i.reactions || [], e] } : i
855
+ ), U(this);
856
+ }
857
+ replaceReaction(e, o, n, i) {
858
+ this._comments = this._comments.map((r) => {
859
+ if (i) {
860
+ if (r.id === i.id && "children" in r)
861
+ return {
862
+ ...r,
863
+ children: r.children.map((a) => {
864
+ if (a.id !== n.id) return a;
865
+ const h = (a.reactions || []).filter(
866
+ (m) => m.id !== e
867
+ );
868
+ return {
869
+ ...a,
870
+ reactions: [...h, o]
871
+ };
872
+ })
873
+ };
874
+ } else if (r.id === n.id) {
875
+ const a = (r.reactions || []).filter(
876
+ (h) => h.id !== e
877
+ );
878
+ return {
879
+ ...r,
880
+ reactions: [...a, o]
881
+ };
882
+ }
883
+ return r;
884
+ }), U(this);
885
+ }
886
+ removeImageOrPhoto(e, o, n, i) {
887
+ this._comments = this._comments.map((r) => r.id === n ? i && "children" in r ? {
888
+ ...r,
889
+ children: r.children.map(
890
+ (a) => a.id === i ? {
891
+ ...a,
892
+ [e]: a[e].filter(({ id: h }) => h !== o)
893
+ } : a
894
+ )
895
+ } : {
896
+ ...r,
897
+ [e]: r[e].filter(({ id: a }) => a !== o)
898
+ } : r), U(this);
899
+ }
900
+ registerCollaboration(e) {
901
+ this._collabProvider = e;
902
+ const o = this._getCollabComments(), n = () => {
903
+ e.connect();
904
+ }, i = () => {
905
+ try {
906
+ e.disconnect();
907
+ } catch {
908
+ }
909
+ }, r = this._editor.registerCommand(
910
+ ca,
911
+ (h) => (n !== void 0 && i !== void 0 && (h ? (console.log("Comments connected!"), n()) : (console.log("Comments disconnected!"), i())), !1),
912
+ B
913
+ ), a = (h, m) => {
914
+ if (m.origin !== this)
915
+ for (let w = 0; w < h.length; w++) {
916
+ const f = h[w];
917
+ if (f instanceof Vo) {
918
+ const b = f.target, y = f.delta;
919
+ let A = 0;
920
+ for (let k = 0; k < y.length; k++) {
921
+ const P = y[k], I = P.insert, F = P.retain, N = P.delete, d = b.parent, z = b === o ? void 0 : d instanceof Qe && this._comments.find((R) => R.id === d.get("id"));
922
+ if (Array.isArray(I))
923
+ I.slice().reverse().forEach((R) => {
924
+ const W = R.get("id"), v = R.get("type") === "thread" ? Tn(
925
+ R.get("quote"),
926
+ R.get("author"),
927
+ R.get("comments").toArray().map(
928
+ (u) => ct(
929
+ u.get("content"),
930
+ u.get("author"),
931
+ u.get("id"),
932
+ [],
933
+ u.get("timeStamp"),
934
+ u.get("deleted")
935
+ )
936
+ ),
937
+ W
938
+ ) : ct(
939
+ R.get("content"),
940
+ R.get("author"),
941
+ W,
942
+ [],
943
+ R.get("timeStamp"),
944
+ R.get("deleted")
945
+ );
946
+ this._withLocalTransaction(() => {
947
+ this.addComment(
948
+ v,
949
+ z,
950
+ A
951
+ );
952
+ });
953
+ });
954
+ else if (typeof F == "number")
955
+ A += F;
956
+ else if (typeof N == "number")
957
+ for (let R = 0; R < N; R++) {
958
+ const W = z === void 0 || z === !1 ? this._comments[A] : z.children[A];
959
+ this._withLocalTransaction(() => {
960
+ this.deleteCommentOrThread(
961
+ W,
962
+ z
963
+ );
964
+ }), A++;
965
+ }
966
+ }
967
+ }
968
+ }
969
+ };
970
+ return o === null ? () => null : (o.observeDeep(a), n(), () => {
971
+ o.unobserveDeep(a), r(), this._collabProvider = null;
972
+ });
973
+ }
974
+ }
975
+ function On(t) {
976
+ const [e, o] = q(
977
+ t.getComments()
978
+ );
979
+ return O(() => t.registerOnChange(() => {
980
+ o(t.getComments());
981
+ }), [t]), e;
982
+ }
983
+ const Un = Wt(
984
+ "INSERT_INLINE_COMMAND"
985
+ );
986
+ function zn(t, e) {
987
+ for (const [o, n] of t.entries())
988
+ if (n.has(e))
989
+ return o;
990
+ return null;
991
+ }
992
+ function Bn() {
993
+ const [t] = vt(), e = ie(() => new Fn(t), [t]), o = ce(null), [n, i] = q([]), [r, a] = q({
994
+ value: "",
995
+ files: []
996
+ }), [h, m] = q(!1), [w, f] = q(!1), b = ce([]), y = ce(
997
+ []
998
+ ), { i18n: A } = Ot(), k = A.language, P = A.getResourceBundle(
999
+ k,
1000
+ "translation"
1001
+ ), [I, F] = q({
1002
+ resolved: "not-resolved",
1003
+ feedback: !1,
1004
+ filteredUsers: []
1005
+ }), { currentUser: N, commentOptions: d, workspaceMembers: z } = X(ve) ?? {}, R = (d == null ? void 0 : d.pageId) ?? "", W = (d == null ? void 0 : d.workspaceInfo) ?? {
1006
+ title: "",
1007
+ icon: ""
1008
+ }, K = (d == null ? void 0 : d.showComments) ?? !1, v = (d == null ? void 0 : d.setShowComments) ?? (() => {
1009
+ }), u = (d == null ? void 0 : d.commentActions) ?? {}, T = On(e), E = ie(() => /* @__PURE__ */ new Map(), []);
1010
+ O(() => (typeof (u == null ? void 0 : u.fetchCommentsApi) == "function" && (f(!0), setTimeout(() => {
1011
+ u.fetchCommentsApi({
1012
+ pageId: R,
1013
+ onSuccess: async (s) => {
1014
+ await e.initializeComments(
1015
+ s,
1016
+ E,
1017
+ t,
1018
+ JSON.stringify(W),
1019
+ u == null ? void 0 : u.getReactionsApi,
1020
+ u == null ? void 0 : u.getPhotosApi,
1021
+ f
1022
+ );
1023
+ }
1024
+ });
1025
+ }, 100)), () => {
1026
+ v(!1);
1027
+ }), []), O(() => {
1028
+ const s = setTimeout(() => {
1029
+ T.forEach((c) => {
1030
+ c.type === "general" && e.updateCurrentQuote(
1031
+ JSON.stringify(d == null ? void 0 : d.workspaceInfo),
1032
+ c.id
1033
+ );
1034
+ });
1035
+ }, 300);
1036
+ return () => clearTimeout(s);
1037
+ }, [d == null ? void 0 : d.workspaceInfo]);
1038
+ const $ = H(() => {
1039
+ t.update(() => {
1040
+ const s = ne();
1041
+ s !== null && (s.dirty = !0);
1042
+ }), m(!1), a({ value: "", files: [] });
1043
+ }, [t]), ee = H(
1044
+ async (s) => {
1045
+ const c = s.resolution !== "ACCEPTED" ? "ACCEPTED" : "REJECTED", p = JSON.parse(
1046
+ JSON.stringify(e._comments)
1047
+ );
1048
+ t.update(() => {
1049
+ wt(de).filter(
1050
+ (_) => _.__extendIds[0] === s.id
1051
+ ).forEach((_) => {
1052
+ "resolveThreat" in _ && _.resolveThreat(c);
1053
+ });
1054
+ }), e.resolveThreat(s, c), await (u == null ? void 0 : u.resolveCommentApi({
1055
+ threatId: s.id,
1056
+ resolveValue: c,
1057
+ onSuccess: () => {
1058
+ },
1059
+ onError: () => {
1060
+ e._comments = p, U(e);
1061
+ }
1062
+ }));
1063
+ },
1064
+ [e, t, E]
1065
+ ), J = H(
1066
+ async (s, c, p) => {
1067
+ const g = JSON.parse(
1068
+ JSON.stringify(e._comments)
1069
+ ), _ = "temp-" + Date.now() + "-" + Math.random().toString(36).substring(2, 9), S = encodeURIComponent(s), M = {
1070
+ id: _,
1071
+ commentId: c.id,
1072
+ userId: (N == null ? void 0 : N.id) ?? "",
1073
+ reaction: s,
1074
+ createdAt: (/* @__PURE__ */ new Date()).toISOString(),
1075
+ deletedAt: "1970-01-01T00:00:00.000+00:00",
1076
+ version: 0,
1077
+ parentType: "COMMENT",
1078
+ parentId: c.id,
1079
+ deleted: !1
1080
+ };
1081
+ e.addReaction(M, c, p);
1082
+ try {
1083
+ await (u == null ? void 0 : u.commentReactionApi({
1084
+ commentId: c.id,
1085
+ author: (N == null ? void 0 : N.id) ?? "",
1086
+ emojiValue: S,
1087
+ onSuccess: async (x) => {
1088
+ e.replaceReaction(
1089
+ M.id,
1090
+ x,
1091
+ c,
1092
+ p
1093
+ );
1094
+ },
1095
+ onError: () => {
1096
+ e._comments = g, U(e);
1097
+ }
1098
+ }));
1099
+ } catch (x) {
1100
+ console.error("Unexpected error:", x);
1101
+ }
1102
+ },
1103
+ [e, N, u]
1104
+ ), ue = H(
1105
+ async (s, c, p) => {
1106
+ const g = JSON.parse(
1107
+ JSON.stringify(e._comments)
1108
+ );
1109
+ e.removeImageOrPhoto(
1110
+ "reactions",
1111
+ s,
1112
+ c.id,
1113
+ p == null ? void 0 : p.id
1114
+ );
1115
+ try {
1116
+ await (u == null ? void 0 : u.deleteReactionApi({
1117
+ reactionId: s,
1118
+ onSuccess: async () => {
1119
+ },
1120
+ onError: () => {
1121
+ e._comments = g, U(e);
1122
+ }
1123
+ }));
1124
+ } catch (_) {
1125
+ console.log(_);
1126
+ }
1127
+ },
1128
+ [e, t, E]
1129
+ ), me = sa((s, c) => {
1130
+ e.updateCurrentQuote(s, c);
1131
+ }, 500), te = H(
1132
+ async (s, c) => {
1133
+ const p = s.id;
1134
+ try {
1135
+ await (u == null ? void 0 : u.deleteCommentApi({
1136
+ deleteCommentId: p,
1137
+ onSuccess: async () => {
1138
+ if (s.type === "comment" && c) {
1139
+ const g = e.deleteCommentOrThread(
1140
+ s,
1141
+ c
1142
+ );
1143
+ if (y.current = [
1144
+ { comments: s, id: c.id },
1145
+ ...y.current
1146
+ ], !g) return;
1147
+ const { markedComment: _, index: S } = g;
1148
+ e.addComment(_, c, S);
1149
+ } else {
1150
+ e.deleteCommentOrThread(s);
1151
+ const g = c !== void 0 ? c.id : s.id, _ = E.get(g);
1152
+ _ !== void 0 && setTimeout(() => {
1153
+ t.update(() => {
1154
+ for (const S of _) {
1155
+ const M = ae(S);
1156
+ le(M) && (M.deleteID(g), M.getIDs().length === 0 && oa(M));
1157
+ }
1158
+ });
1159
+ });
1160
+ }
1161
+ }
1162
+ }));
1163
+ } catch (g) {
1164
+ console.log(g);
1165
+ }
1166
+ },
1167
+ [e, t, E]
1168
+ );
1169
+ function L(s, c, p, g, _, S) {
1170
+ e.updateThreadId(
1171
+ t,
1172
+ s,
1173
+ c,
1174
+ p,
1175
+ g,
1176
+ _,
1177
+ S
1178
+ );
1179
+ }
1180
+ const Se = H(
1181
+ (s, c, p, g) => {
1182
+ e.addComment(s, p, void 0), c && (t.update(() => {
1183
+ if (Te(g)) {
1184
+ const _ = g.isBackward(), S = s.id;
1185
+ aa(g, _, S, (M) => {
1186
+ const x = new de(M, null);
1187
+ return K || s.type === "thread" && setTimeout(() => {
1188
+ t.update(() => {
1189
+ x.selectStart();
1190
+ });
1191
+ }, 300), x;
1192
+ });
1193
+ }
1194
+ }), m(!1)), I.resolved === "resolved" && F({
1195
+ ...I,
1196
+ resolved: "not-resolved"
1197
+ });
1198
+ },
1199
+ [e, t, I.resolved]
1200
+ );
1201
+ O(() => {
1202
+ const s = [];
1203
+ if (n.length !== 0) {
1204
+ for (let c = 0; c < n.length; c++) {
1205
+ const p = n[0], g = E.get(p);
1206
+ if (g !== void 0)
1207
+ for (const _ of g) {
1208
+ const S = t.getElementByKey(_);
1209
+ if (S !== null) {
1210
+ S.classList.add("selected"), s.push(S);
1211
+ const M = S.getAttribute("data-key");
1212
+ if (M) {
1213
+ if (K) {
1214
+ const x = b.current, D = x.length !== n.length || x.some((j, Y) => j !== n[Y]);
1215
+ n.length === 1 && D && mt(M);
1216
+ } else
1217
+ setTimeout(() => {
1218
+ mt(M);
1219
+ }, 500);
1220
+ v(!0);
1221
+ }
1222
+ }
1223
+ }
1224
+ }
1225
+ return b.current = [...n], () => {
1226
+ for (let c = 0; c < s.length; c++)
1227
+ s[c].classList.remove("selected");
1228
+ };
1229
+ }
1230
+ }, [n, t, E]);
1231
+ const Ee = async (s, c, p, g) => {
1232
+ const _ = p, S = JSON.parse(JSON.stringify(e._comments));
1233
+ e.updateCurrentContent(
1234
+ s.value,
1235
+ c,
1236
+ p,
1237
+ g
1238
+ ), c.deletedFile.map((D) => D.id ? he(D.id, p, g) : Promise.resolve());
1239
+ const x = (await Ln(
1240
+ _,
1241
+ c.newFiles,
1242
+ u == null ? void 0 : u.uploadCommentFileApi
1243
+ )).map(
1244
+ (D) => Be(D)
1245
+ );
1246
+ if (e.replaceOptimisticPhotos(
1247
+ x,
1248
+ p,
1249
+ g
1250
+ ), s.restore)
1251
+ try {
1252
+ await (u == null ? void 0 : u.updateCommentTextApi({
1253
+ commentId: _,
1254
+ textValue: s.value,
1255
+ onSuccess: () => {
1256
+ },
1257
+ onError: () => {
1258
+ e._comments = S, U(e);
1259
+ }
1260
+ }));
1261
+ } catch (D) {
1262
+ console.error(D);
1263
+ }
1264
+ }, he = async (s, c, p) => {
1265
+ try {
1266
+ await (u == null ? void 0 : u.deleteCommentImageApi({
1267
+ photoToRemove: s,
1268
+ onSuccess: () => e.removeImageOrPhoto(
1269
+ "files",
1270
+ s,
1271
+ c,
1272
+ p
1273
+ )
1274
+ }));
1275
+ } catch (g) {
1276
+ console.log(g);
1277
+ }
1278
+ }, pe = async (s, c) => {
1279
+ try {
1280
+ await (u == null ? void 0 : u.restoreCommentApi({
1281
+ commentId: s,
1282
+ onSuccess: () => {
1283
+ e.restoreLastDeletedComment(s, c);
1284
+ }
1285
+ }));
1286
+ } catch (p) {
1287
+ console.log(p);
1288
+ }
1289
+ };
1290
+ O(() => {
1291
+ if (!K) return;
1292
+ const s = (c) => {
1293
+ c.key === "Escape" && v(!1);
1294
+ };
1295
+ return document.addEventListener("keydown", s), () => {
1296
+ document.removeEventListener("keydown", s);
1297
+ };
1298
+ }, [K]), O(() => {
1299
+ const s = /* @__PURE__ */ new Map();
1300
+ return De(
1301
+ lo(
1302
+ t,
1303
+ de,
1304
+ (c) => mo(c.getIDs()),
1305
+ (c, p) => {
1306
+ c.getIDs().forEach((_) => {
1307
+ p.addID(_);
1308
+ });
1309
+ }
1310
+ ),
1311
+ t.registerMutationListener(
1312
+ de,
1313
+ (c) => {
1314
+ t.getEditorState().read(() => {
1315
+ for (const [p, g] of c) {
1316
+ const _ = ae(p);
1317
+ let S = [];
1318
+ const M = zn(E, p);
1319
+ g === "destroyed" ? S = s.get(p) || [] : le(_) && (S = _.getIDs()), g === "created" && M && setTimeout(() => {
1320
+ const x = e.getComments().find((D) => D.id === (_ == null ? void 0 : _.__extendIds[0]));
1321
+ x && x.deleted && pe(x.id);
1322
+ }, 500);
1323
+ for (let x = 0; x < S.length; x++) {
1324
+ const D = S[x];
1325
+ let j = E.get(D);
1326
+ if (s.set(p, S), g === "destroyed") {
1327
+ let Y = !1;
1328
+ for (const [G, oe] of c)
1329
+ if (oe === "created") {
1330
+ const re = ae(G);
1331
+ le(re) && re.getIDs().some((Pe) => S.includes(Pe)) && (Y = !0);
1332
+ }
1333
+ if (!Y) {
1334
+ j !== void 0 && (j.delete(p), j.size === 0 && E.delete(D));
1335
+ const G = e.getComments().find(
1336
+ (oe) => oe.tempId === M || oe.id === M
1337
+ );
1338
+ G && !G.deleted && te(G);
1339
+ }
1340
+ } else
1341
+ j === void 0 && (j = /* @__PURE__ */ new Set(), E.set(D, j)), j.has(p) || j.add(p);
1342
+ }
1343
+ }
1344
+ });
1345
+ },
1346
+ { skipInitialization: !1 }
1347
+ ),
1348
+ t.registerUpdateListener(({ editorState: c }) => {
1349
+ c.read(() => {
1350
+ const p = ne();
1351
+ let g = !1;
1352
+ if (Te(p)) {
1353
+ const _ = p.anchor.getNode();
1354
+ if (ho(_)) {
1355
+ const S = na(
1356
+ _,
1357
+ p.anchor.offset
1358
+ );
1359
+ if (S !== null) {
1360
+ i((x) => x[0] === S[0] ? x : S), g = !0;
1361
+ const M = E.get(S[0]);
1362
+ t.update(() => {
1363
+ if (!M) return;
1364
+ let x = "", D = null;
1365
+ for (const j of M) {
1366
+ const Y = ae(j);
1367
+ Y instanceof de && (x && (x += `
1368
+ `), x += Y.getTextContent(), D || (D = Y.__extendIds[0]));
1369
+ }
1370
+ x && D && me(x, D);
1371
+ });
1372
+ }
1373
+ }
1374
+ }
1375
+ g || i(
1376
+ (_) => _.length === 0 ? _ : []
1377
+ );
1378
+ });
1379
+ }),
1380
+ t.registerCommand(
1381
+ Un,
1382
+ () => {
1383
+ const c = window.getSelection();
1384
+ return c !== null && c.removeAllRanges(), m(!0), !0;
1385
+ },
1386
+ Kt
1387
+ ),
1388
+ t.registerCommand(
1389
+ $t,
1390
+ (c) => {
1391
+ if (!(c != null && c.clipboardData)) return !1;
1392
+ c.preventDefault();
1393
+ const p = ne();
1394
+ if (!p || !p.getNodes().some(
1395
+ (M) => le(M) || le(M.getParent())
1396
+ ))
1397
+ return !1;
1398
+ const S = p.getTextContent();
1399
+ return c.clipboardData.setData("text/plain", S), !0;
1400
+ },
1401
+ B
1402
+ )
1403
+ );
1404
+ }, [t, E]);
1405
+ const Ie = H(
1406
+ (s, c, p) => {
1407
+ t.getEditorState().read(() => {
1408
+ const g = ne();
1409
+ if (Te(g)) {
1410
+ c.current = g.clone();
1411
+ const _ = g.anchor, S = g.focus, M = ia(
1412
+ t,
1413
+ _.getNode(),
1414
+ _.offset,
1415
+ S.getNode(),
1416
+ S.offset
1417
+ );
1418
+ if (M !== null && s !== null) {
1419
+ const { left: x, bottom: D, top: j, width: Y } = M.getBoundingClientRect(), G = ra(t, M), oe = s.offsetHeight || 200, re = window.pageYOffset || document.documentElement.scrollTop, Pe = window.innerHeight - D > oe + 20;
1420
+ let Ne = G.length === 1 ? x + Y / 2 - 125 : x - 125;
1421
+ Ne < 10 && (Ne = 10), s.style.left = `${Ne}px`, s.style.top = Pe ? `${D + 10 + re}px` : `${j - oe - 55 + re}px`;
1422
+ const We = G.length, { container: Ke, elements: fe } = p, Mt = fe.length;
1423
+ for (let Z = 0; Z < We; Z++) {
1424
+ const se = G[Z];
1425
+ let be = fe[Z];
1426
+ be === void 0 && (be = document.createElement("span"), fe[Z] = be, Ke.appendChild(be));
1427
+ const Pt = document.body.scrollHeight > window.innerHeight ? 0 : 8, Nt = "255, 212, 0";
1428
+ be.style.cssText = `position:absolute;top:${se.top + re}px;left:${se.left + Pt}px;height:${se.height}px;width:${se.width}px;background-color:rgba(${Nt}, 0.3);pointer-events:none;z-index:5;`;
1429
+ }
1430
+ for (let Z = Mt - 1; Z >= We; Z--) {
1431
+ const se = fe[Z];
1432
+ Ke.removeChild(se), fe.pop();
1433
+ }
1434
+ }
1435
+ }
1436
+ });
1437
+ },
1438
+ [t]
1439
+ ), ge = (s, c) => {
1440
+ t.update(
1441
+ () => {
1442
+ const g = Array.from(s).filter(
1443
+ (S) => !!ae(S)
1444
+ )[0], _ = ae(g);
1445
+ le(_) && _.selectStart();
1446
+ },
1447
+ {
1448
+ onUpdate() {
1449
+ c && c.focus();
1450
+ }
1451
+ }
1452
+ );
1453
+ }, Ae = (s) => t.getEditorState().read(() => s ? s.getTextContent() : "") ?? "", Me = {
1454
+ currentUser: N,
1455
+ workspaceMembers: z,
1456
+ commentOptions: d,
1457
+ selectMarkNode: ge
1458
+ };
1459
+ return /* @__PURE__ */ Q(Re, { children: [
1460
+ h && Xe(
1461
+ /* @__PURE__ */ l(
1462
+ la,
1463
+ {
1464
+ updateLocation: Ie,
1465
+ setCommentValue: a,
1466
+ commentValue: r,
1467
+ handleBlur: $,
1468
+ submitAddComment: Se,
1469
+ getSelectionText: Ae,
1470
+ updateThreadId: L,
1471
+ providedUser: N,
1472
+ provideCommentOptions: d,
1473
+ composerLocales: P.editor.comments,
1474
+ children: ({ editorRef: s }) => /* @__PURE__ */ l(
1475
+ gt,
1476
+ {
1477
+ initialContent: "",
1478
+ outputFormat: "html",
1479
+ debounce: 1,
1480
+ editorRef: s,
1481
+ mode: "comment",
1482
+ shiftEnterInsertNewLine: !0,
1483
+ onChange: (c) => {
1484
+ typeof c == "string" && a((p) => ({
1485
+ ...p,
1486
+ value: c
1487
+ }));
1488
+ }
1489
+ }
1490
+ )
1491
+ }
1492
+ ),
1493
+ document.body
1494
+ ),
1495
+ K && Xe(
1496
+ /* @__PURE__ */ l(
1497
+ da,
1498
+ {
1499
+ comments: T,
1500
+ submitAddComment: Se,
1501
+ isLoading: w,
1502
+ deleteCommentOrThread: te,
1503
+ activeIDs: n,
1504
+ restoreComment: pe,
1505
+ deleteCommentImage: he,
1506
+ commentsFilter: I,
1507
+ setCommentsFilter: F,
1508
+ markNodeMap: E,
1509
+ locales: P.editor,
1510
+ listRef: o,
1511
+ addCommentReaction: J,
1512
+ updateCommentTextOrImage: Ee,
1513
+ resolveThreat: ee,
1514
+ removeCommentReactions: ue,
1515
+ updateThreadId: L,
1516
+ storeOptions: Me,
1517
+ getEditor: ({
1518
+ setCommentValue: s,
1519
+ initialContent: c = "",
1520
+ editorRef: p
1521
+ }) => /* @__PURE__ */ l(
1522
+ gt,
1523
+ {
1524
+ initialContent: c,
1525
+ outputFormat: "html",
1526
+ debounce: 1,
1527
+ mode: "comment",
1528
+ shiftEnterInsertNewLine: !0,
1529
+ editorRef: p,
1530
+ onChange: (g) => {
1531
+ s == null || s((_) => ({
1532
+ ..._,
1533
+ value: g
1534
+ }));
1535
+ }
1536
+ }
1537
+ )
1538
+ }
1539
+ ),
1540
+ document.body
1541
+ )
1542
+ ] });
1543
+ }
1544
+ function jn({
1545
+ editor: t,
1546
+ outputFormat: e,
1547
+ debounceMs: o = 500,
1548
+ onChange: n,
1549
+ onBlur: i,
1550
+ isCommentVariant: r,
1551
+ checkIsEmpty: a,
1552
+ onChangeCommand: h
1553
+ }) {
1554
+ const m = nt(
1555
+ (b) => {
1556
+ h && b.dispatchCommand(h, !0);
1557
+ },
1558
+ 100
1559
+ ), w = nt(
1560
+ (b, y) => {
1561
+ if (e === "html")
1562
+ b.read(() => {
1563
+ let k = $e(y, null);
1564
+ const P = _e();
1565
+ P && (a() && (k = ""), P.getChildrenSize() === 0 && (y.update(() => {
1566
+ P.append(Ht());
1567
+ }), k = ""));
1568
+ const I = _e().getTextContent();
1569
+ n(k, I);
1570
+ });
1571
+ else {
1572
+ const A = b.toJSON();
1573
+ n(A);
1574
+ }
1575
+ },
1576
+ o
1577
+ ), f = (b, y) => {
1578
+ if (i)
1579
+ if (e === "html")
1580
+ y.update(() => {
1581
+ const A = $e(y, null);
1582
+ i(A);
1583
+ });
1584
+ else {
1585
+ const A = b.toJSON();
1586
+ i(A);
1587
+ }
1588
+ };
1589
+ return O(() => t.registerCommand(
1590
+ Ct,
1591
+ (y) => {
1592
+ if (!r)
1593
+ return !1;
1594
+ try {
1595
+ const A = y.clipboardData || window.clipboardData;
1596
+ if (!A || !A.getData(
1597
+ "application/x-lexical-editor"
1598
+ ))
1599
+ return !1;
1600
+ const P = A.getData("text/html");
1601
+ if (!P)
1602
+ return !1;
1603
+ const F = new DOMParser().parseFromString(P, "text/html"), N = je(t, F);
1604
+ return qe(N), !0;
1605
+ } catch {
1606
+ return !1;
1607
+ }
1608
+ },
1609
+ B
1610
+ ), [t, r]), {
1611
+ triggerOnChangeCommand: m,
1612
+ onChangeValue: w,
1613
+ onBlurValue: f
1614
+ };
1615
+ }
1616
+ const qn = {
1617
+ toolbar: { comment: !1, default: !0, editor: !1 },
1618
+ componentPicker: { comment: !0, default: !0, editor: !0 },
1619
+ // ComponentPickerPlugin
1620
+ floatingTextToolbar: { comment: !0, default: !0, editor: !0 },
1621
+ floatingLinkEditor: { comment: !0, default: !0, editor: !0 },
1622
+ actionMenu: { comment: !1, default: !0, editor: !0 },
1623
+ mediaActions: { comment: !1, default: !0, editor: !0 },
1624
+ richText: { comment: !0, default: !0, editor: !0 },
1625
+ // RichTextPlugin
1626
+ history: { comment: !1, default: !0, editor: !0 },
1627
+ // HistoryPlugin
1628
+ treeView: { comment: !1, default: !0, editor: !0 },
1629
+ // TreeViewPlugin
1630
+ actionsInspector: { comment: !1, default: !0, editor: !0 },
1631
+ // ActionsPlugin
1632
+ onChange: { comment: !0, default: !0, editor: !0 },
1633
+ // OnChangePlugin
1634
+ blur: { comment: !0, default: !0, editor: !0 },
1635
+ // BlurPlugin
1636
+ focus: { comment: !0, default: !0, editor: !0 },
1637
+ // FocusPlugin
1638
+ autoFocus: { comment: !0, default: !0, editor: !0 },
1639
+ // CustomAutoFocusPlugin
1640
+ placeholder: { comment: !0, default: !0, editor: !0 },
1641
+ // CustomPlaceholder
1642
+ clearEditor: { comment: !0, default: !1, editor: !1 },
1643
+ // ClearEditorPlugin
1644
+ maxLength: { comment: !1, default: !0, editor: !0 },
1645
+ // MaxLengthPlugin
1646
+ emoji: { comment: !0, default: !0, editor: !0 },
1647
+ // EmojiPickerPlugin
1648
+ hashtag: { comment: !1, default: !0, editor: !0 },
1649
+ // HashtagPlugin
1650
+ markdownShortcut: { comment: !1, default: !0, editor: !0 },
1651
+ // MarkdownShortcutPlugin
1652
+ extendCode: { comment: !1, default: !0, editor: !0 },
1653
+ // ExtendCodePlugin
1654
+ codeHighlight: { comment: !1, default: !0, editor: !0 },
1655
+ // CodeHighlightPlugin
1656
+ list: { comment: !0, default: !0, editor: !0 },
1657
+ // ListPlugin
1658
+ checkList: { comment: !0, default: !0, editor: !0 },
1659
+ // CheckListPlugin
1660
+ listMaxIndent: { comment: !0, default: !0, editor: !0 },
1661
+ // ListMaxIndentLevelPlugin
1662
+ link: { comment: !0, default: !0, editor: !0 },
1663
+ // LinkPlugin
1664
+ clickableLink: { comment: !0, default: !0, editor: !0 },
1665
+ // LexicalClickableLinkPlugin
1666
+ horizontalRule: { comment: !1, default: !0, editor: !0 },
1667
+ // HorizontalRulePlugin
1668
+ tabFocus: { comment: !0, default: !0, editor: !0 },
1669
+ // TabFocusPlugin
1670
+ tabIndentation: { comment: !0, default: !0, editor: !0 },
1671
+ // TabIndentationPlugin
1672
+ collapsible: { comment: !1, default: !0, editor: !0 },
1673
+ // CollapsiblePlugin
1674
+ callout: { comment: !1, default: !0, editor: !0 },
1675
+ // CalloutPlugin
1676
+ layout: { comment: !1, default: !0, editor: !0 },
1677
+ // LayoutPlugin
1678
+ table: { comment: !1, default: !0, editor: !0 },
1679
+ // Table plugin
1680
+ draggableBlock: { comment: !1, default: !0, editor: !0 },
1681
+ // DraggableBlockPlugin
1682
+ newParagraph: { comment: !0, default: !0, editor: !0 },
1683
+ // NewParagraph
1684
+ tableOfContents: { comment: !1, default: !0, editor: !0 },
1685
+ // TableOfContentsPlugin
1686
+ embed: { comment: !1, default: !0, editor: !0 },
1687
+ // EmbedPlugin
1688
+ swagger: { comment: !1, default: !0, editor: !0 },
1689
+ // SwaggerPlugin
1690
+ images: { comment: !1, default: !0, editor: !0 },
1691
+ // ImagesPlugin
1692
+ video: { comment: !1, default: !0, editor: !0 },
1693
+ // VideoPlugin
1694
+ audio: { comment: !1, default: !0, editor: !0 },
1695
+ // MusicPlugin
1696
+ file: { comment: !1, default: !0, editor: !0 },
1697
+ // FilePlugin
1698
+ excalidraw: { comment: !1, default: !0, editor: !0 },
1699
+ // ExcalidrawPlugin
1700
+ childDocs: { comment: !1, default: !0, editor: !0 },
1701
+ // ChildDocsPlugin
1702
+ comment: { comment: !1, default: !0, editor: !0 },
1703
+ // CommentPlugin (если нужны треды и в default)
1704
+ form: { comment: !1, default: !0, editor: !0 },
1705
+ // FormPlugin
1706
+ select: { comment: !1, default: !0, editor: !0 }
1707
+ // SelectPlugin
1708
+ }, pt = Rt(() => import("./layers.D6d62qQ_.js").then((t) => t.ac));
1709
+ function C(t, e) {
1710
+ const o = qn[t];
1711
+ return o ? o[e] : !0;
1712
+ }
1713
+ function Wn(t) {
1714
+ const {
1715
+ onRef: e,
1716
+ floatingAnchorElem: o,
1717
+ isSmallWidthViewport: n,
1718
+ maxHeight: i,
1719
+ showTextToolbar: r,
1720
+ mode: a,
1721
+ isLoading: h,
1722
+ editor: m,
1723
+ onBlur: w,
1724
+ onFocus: f,
1725
+ onChange: b,
1726
+ outputFormat: y,
1727
+ debounceMs: A
1728
+ } = t, k = a === "editor", P = a === "comment", [I, F] = q(!1), { excludeNodes: N } = X(ve), {
1729
+ settings: { isRichText: d, showTreeView: z, isMaxLength: R }
1730
+ } = In(), { historyState: W } = Et(), { triggerOnChangeCommand: K, onChangeValue: v, onBlurValue: u } = jn({
1731
+ editor: m,
1732
+ outputFormat: y,
1733
+ debounceMs: A,
1734
+ onChange: b,
1735
+ onBlur: w,
1736
+ isCommentVariant: P,
1737
+ checkIsEmpty: fa,
1738
+ onChangeCommand: ba
1739
+ });
1740
+ let T = {};
1741
+ i ? T = { maxHeight: i } : k && (T = { overflowY: "hidden" });
1742
+ const E = k ? /* @__PURE__ */ l("div", { className: "editor-scroller", style: T, children: /* @__PURE__ */ l("div", { className: "editor", ref: e, children: /* @__PURE__ */ l("div", { className: "content-editable-wrapper", children: /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l(Ye, {}) }) }) }) }) : /* @__PURE__ */ l("div", { className: "editor-scroller", style: T, children: /* @__PURE__ */ l("div", { className: "editor", ref: e, children: /* @__PURE__ */ l(Ye, {}) }) });
1743
+ return /* @__PURE__ */ Q(Re, { children: [
1744
+ C("toolbar", a) && !k && /* @__PURE__ */ l(et, { mode: a }),
1745
+ C("componentPicker", a) && /* @__PURE__ */ l(
1746
+ fo,
1747
+ {
1748
+ mode: a,
1749
+ opened: I,
1750
+ setOpenedMenu: F
1751
+ }
1752
+ ),
1753
+ C("history", a) && /* @__PURE__ */ l(bt, { externalHistoryState: W }),
1754
+ C("floatingTextToolbar", a) && o && !n && (k ? /* @__PURE__ */ l(
1755
+ tt,
1756
+ {
1757
+ anchorElem: o,
1758
+ component: /* @__PURE__ */ l(et, { mode: a, isFloating: !0 })
1759
+ }
1760
+ ) : /* @__PURE__ */ l(tt, { anchorElem: o })),
1761
+ /* @__PURE__ */ Q("div", { className: `editor-container ${d ? "" : "plain-text"}`, children: [
1762
+ C("placeholder", a) && /* @__PURE__ */ l(bo, {}),
1763
+ C("autoFocus", a) && /* @__PURE__ */ l(yo, { isLoading: h }),
1764
+ C("emoji", a) && /* @__PURE__ */ l(_o, {}),
1765
+ C("hashtag", a) && /* @__PURE__ */ l(Qo, {}),
1766
+ C("clearEditor", a) && /* @__PURE__ */ l(Jo, {}),
1767
+ C("richText", a) && /* @__PURE__ */ l(
1768
+ ta,
1769
+ {
1770
+ contentEditable: E,
1771
+ ErrorBoundary: Zo
1772
+ }
1773
+ ),
1774
+ C("markdownShortcut", a) && /* @__PURE__ */ l(wo, {}),
1775
+ C("extendCode", a) && /* @__PURE__ */ l(Co, {}),
1776
+ C("codeHighlight", a) && /* @__PURE__ */ l(ko, {}),
1777
+ C("list", a) && /* @__PURE__ */ l(vo, {}),
1778
+ C("checkList", a) && /* @__PURE__ */ l(So, {}),
1779
+ C("listMaxIndent", a) && /* @__PURE__ */ l(Ao, { maxDepth: 7 }),
1780
+ C("link", a) && /* @__PURE__ */ l(xo, {}),
1781
+ C("comment", a) && /* @__PURE__ */ l(Bn, {}),
1782
+ pt && C("excalidraw", a) && /* @__PURE__ */ l(Dt, { children: /* @__PURE__ */ l(pt, {}) }),
1783
+ C("swagger", a) && /* @__PURE__ */ l(Eo, {}),
1784
+ C("childDocs", a) && /* @__PURE__ */ l(Io, {}),
1785
+ C("newParagraph", a) && /* @__PURE__ */ l(Mo, {}),
1786
+ C("form", a) && /* @__PURE__ */ l(Po, {}),
1787
+ C("video", a) && !N.video && /* @__PURE__ */ l(ma, {}),
1788
+ C("audio", a) && !N.audio && /* @__PURE__ */ l(ha, {}),
1789
+ C("file", a) && !N.file && /* @__PURE__ */ l(pa, {}),
1790
+ C("embed", a) && /* @__PURE__ */ l(No, {}),
1791
+ C("images", a) && !N.photo && /* @__PURE__ */ l(ga, {}),
1792
+ C("onChange", a) && /* @__PURE__ */ l(
1793
+ ea,
1794
+ {
1795
+ ignoreSelectionChange: !0,
1796
+ onChange: ($, ee) => {
1797
+ v($, ee), K(ee);
1798
+ }
1799
+ }
1800
+ ),
1801
+ C("maxLength", a) && R && /* @__PURE__ */ l(To, { maxLength: 30 }),
1802
+ C("blur", a) && /* @__PURE__ */ l(Lo, { onBlur: u }),
1803
+ C("focus", a) && /* @__PURE__ */ l(Ro, { onFocus: f }),
1804
+ C("treeView", a) && z && /* @__PURE__ */ l(Do, {}),
1805
+ C("actionsInspector", a) && z && /* @__PURE__ */ l(
1806
+ Fo,
1807
+ {
1808
+ isRichText: !0,
1809
+ shouldPreserveNewLinesInMarkdown: !0
1810
+ }
1811
+ ),
1812
+ C("select", a) && /* @__PURE__ */ l(Oo, { editor: m }),
1813
+ C("clickableLink", a) && /* @__PURE__ */ l(Go, {}),
1814
+ C("horizontalRule", a) && /* @__PURE__ */ l(Xo, {}),
1815
+ C("tabFocus", a) && /* @__PURE__ */ l(Uo, {}),
1816
+ C("tabIndentation", a) && /* @__PURE__ */ l(zo, {}),
1817
+ C("collapsible", a) && /* @__PURE__ */ l(Bo, {}),
1818
+ C("callout", a) && /* @__PURE__ */ l(jo, {}),
1819
+ C("layout", a) && /* @__PURE__ */ l(qo, {}),
1820
+ C("table", a) && o && (k || !n) && /* @__PURE__ */ l(
1821
+ Wo,
1822
+ {
1823
+ floatingAnchorElem: o,
1824
+ isSmallWidthViewport: n
1825
+ }
1826
+ ),
1827
+ C("draggableBlock", a) && o && !n && /* @__PURE__ */ l(
1828
+ ua,
1829
+ {
1830
+ isShowAddButton: !0,
1831
+ anchorElem: o
1832
+ }
1833
+ ),
1834
+ o && /* @__PURE__ */ Q(Re, { children: [
1835
+ C("floatingLinkEditor", a) && /* @__PURE__ */ l(
1836
+ Ko,
1837
+ {
1838
+ anchorElem: o,
1839
+ showTextToolbar: r
1840
+ }
1841
+ ),
1842
+ C("actionMenu", a) && /* @__PURE__ */ l($o, { anchorElem: o }),
1843
+ C("mediaActions", a) && /* @__PURE__ */ l(po, { anchorElem: o })
1844
+ ] })
1845
+ ] }),
1846
+ C("tableOfContents", a) && (k ? N.contents && /* @__PURE__ */ l(Ge, {}) : (N.contents || N.contents === void 0) && /* @__PURE__ */ l(Ge, {})),
1847
+ C("emptyPage", a) && k && /* @__PURE__ */ l(uo, { editor: m })
1848
+ ] });
1849
+ }
1850
+ function Kn(t) {
1851
+ const {
1852
+ mode: e,
1853
+ maxHeight: o,
1854
+ disable: n,
1855
+ isErrorWs: i,
1856
+ content: r,
1857
+ isLoading: a,
1858
+ imperativeHandleRef: h,
1859
+ editorRef: m,
1860
+ onBlur: w,
1861
+ onFocus: f,
1862
+ onChange: b,
1863
+ outputFormat: y,
1864
+ debounceMs: A
1865
+ } = t, [k, P] = q(null), [I, F] = q(!1), N = ce(!1), [d, ...z] = vt(), { shiftEnterInsertNewLine: R } = X(ve);
1866
+ Cn({
1867
+ editor: d
1868
+ }), O(() => {
1869
+ d && (d.setEditable(!n), m && (m.current = d), i && d.update(() => {
1870
+ if (typeof r == "string") {
1871
+ _e().clear();
1872
+ const T = new DOMParser().parseFromString(r, "text/html"), E = je(d, T);
1873
+ _e().select(), qe(E);
1874
+ } else {
1875
+ const v = d.parseEditorState(
1876
+ JSON.stringify(r)
1877
+ );
1878
+ d.setEditorState(v);
1879
+ }
1880
+ }));
1881
+ }, [i]), O(() => {
1882
+ function v() {
1883
+ d.dispatchCommand(Aa, !0);
1884
+ }
1885
+ function u(E) {
1886
+ const $ = E.target, J = ($.tagName.toLowerCase() === "img" ? $.closest("div.resizable-container__inner") : null) || xa($);
1887
+ if (!J || $.classList.contains("dsd__theme__table-scrollable-wrapper"))
1888
+ return;
1889
+ (J.classList.contains("selected-block") || J.querySelector(".selected-block")) && (E.preventDefault(), d.dispatchCommand(Ea, {
1890
+ x: E.clientX,
1891
+ y: E.clientY,
1892
+ target: J
1893
+ }));
1894
+ }
1895
+ window.addEventListener("scroll", v);
1896
+ const T = d.getRootElement();
1897
+ return T == null || T.addEventListener("contextmenu", u), () => {
1898
+ window.removeEventListener("scroll", v), T == null || T.removeEventListener("contextmenu", u);
1899
+ };
1900
+ }, [d]);
1901
+ const W = (v) => {
1902
+ v !== null && P(v);
1903
+ };
1904
+ return O(() => {
1905
+ const v = (u) => {
1906
+ const T = navigator.platform.toUpperCase().includes("MAC"), E = T && u.metaKey && !u.shiftKey && u.code === "KeyZ" || !T && u.ctrlKey && !u.shiftKey && u.code === "KeyZ", $ = T && u.metaKey && u.shiftKey && u.code === "KeyZ" || !T && u.ctrlKey && u.shiftKey && u.code === "KeyZ";
1907
+ E && (u.preventDefault(), d.dispatchCommand(yt, void 0)), $ && (u.preventDefault(), d.dispatchCommand(_t, void 0));
1908
+ };
1909
+ return De(
1910
+ d.registerCommand(
1911
+ Vt,
1912
+ () => (window.addEventListener("keydown", v), !1),
1913
+ B
1914
+ ),
1915
+ d.registerCommand(
1916
+ Yt,
1917
+ () => (window.removeEventListener("keydown", v), !1),
1918
+ B
1919
+ )
1920
+ );
1921
+ }, [d]), O(() => {
1922
+ const v = () => {
1923
+ const u = ke && window.matchMedia("(max-width: 600px)").matches;
1924
+ u !== I && F(u);
1925
+ };
1926
+ return v(), window.addEventListener("resize", v), () => {
1927
+ window.removeEventListener("resize", v);
1928
+ };
1929
+ }, [I]), O(() => De(
1930
+ d.registerCommand(
1931
+ Jt,
1932
+ (v) => {
1933
+ const u = ne();
1934
+ return ya(
1935
+ d,
1936
+ u,
1937
+ h,
1938
+ v,
1939
+ R
1940
+ );
1941
+ },
1942
+ B
1943
+ ),
1944
+ d.registerCommand(
1945
+ Gt,
1946
+ () => _a(),
1947
+ B
1948
+ ),
1949
+ d.registerCommand(
1950
+ Zt,
1951
+ (v) => ne() ? (d.blur(), Qt(null), wa(v), !0) : !1,
1952
+ B
1953
+ ),
1954
+ d.registerCommand(
1955
+ Xt,
1956
+ (v) => Ca(d, v),
1957
+ B
1958
+ ),
1959
+ d.registerCommand(
1960
+ eo,
1961
+ () => ot(),
1962
+ B
1963
+ ),
1964
+ d.registerCommand(
1965
+ to,
1966
+ () => ot(),
1967
+ B
1968
+ ),
1969
+ d.registerCommand(
1970
+ oo,
1971
+ () => at(),
1972
+ B
1973
+ ),
1974
+ d.registerCommand(
1975
+ Ct,
1976
+ (v) => ka(v, h),
1977
+ B
1978
+ ),
1979
+ d.registerCommand(
1980
+ ao,
1981
+ (v) => va(v, h),
1982
+ Ve
1983
+ ),
1984
+ d.registerCommand(
1985
+ no,
1986
+ () => at(),
1987
+ B
1988
+ ),
1989
+ d.registerCommand(
1990
+ io,
1991
+ () => {
1992
+ const v = ne();
1993
+ v.format = 0, v.setStyle("");
1994
+ const u = v.insertParagraph();
1995
+ return u && (u.__format = 0), !0;
1996
+ },
1997
+ B
1998
+ ),
1999
+ d.registerCommand(
2000
+ ro,
2001
+ (v) => Sa(d, v, h),
2002
+ Ve
2003
+ )
2004
+ ), [d]), /* @__PURE__ */ l(Wn, { ...{
2005
+ onRef: W,
2006
+ floatingAnchorElem: k,
2007
+ isSmallWidthViewport: I,
2008
+ maxHeight: o,
2009
+ showTextToolbar: N,
2010
+ mode: e,
2011
+ isLoading: a,
2012
+ editor: d,
2013
+ onBlur: w,
2014
+ onFocus: f,
2015
+ onChange: b,
2016
+ outputFormat: y,
2017
+ debounceMs: A
2018
+ } });
2019
+ }
2020
+ function $n(t) {
2021
+ const e = new URL(t), o = `${e.origin}${e.pathname}`, n = e.searchParams.get("token");
2022
+ return { baseUrl: o, token: n };
2023
+ }
2024
+ function Hn(t, e, o = "http://localhost") {
2025
+ const n = Vn(t, e), { baseUrl: i, token: r } = $n(o);
2026
+ let a = {};
2027
+ return r && (a = {
2028
+ params: {
2029
+ token: r
2030
+ }
2031
+ }), new kt(i, t, n, {
2032
+ connect: !1,
2033
+ ...a
2034
+ });
2035
+ }
2036
+ function Vn(t, e) {
2037
+ let o = e.get(t);
2038
+ return o === void 0 ? (o = new Yo(), e.set(t, o)) : o.load(), o;
2039
+ }
2040
+ const Yn = _n ? "" : "os-windows", Jn = ({ children: t }) => /* @__PURE__ */ l("div", { className: `doc-space-styles-provider ${Yn}`, children: t }), ve = Ce({
2041
+ maxFileSize: 5,
2042
+ disable: !1,
2043
+ excludeNodes: {},
2044
+ imagePickerSettings: {},
2045
+ pages: []
2046
+ }), Gn = [], gt = ({
2047
+ initialContent: t,
2048
+ onChange: e,
2049
+ outputFormat: o,
2050
+ mode: n,
2051
+ maxHeight: i,
2052
+ onBlur: r,
2053
+ onFocus: a,
2054
+ fetchUploadMedia: h,
2055
+ fetchPromptResult: m,
2056
+ fetchDeleteMedia: w,
2057
+ fetchRestoreMedia: f,
2058
+ currentUser: b,
2059
+ commentOptions: y,
2060
+ workspaceMembers: A = Gn,
2061
+ maxFileSize: k,
2062
+ contentModalUploadImage: P,
2063
+ maxImageSizeError: I,
2064
+ debounce: F,
2065
+ disable: N,
2066
+ ws: d,
2067
+ excludeNodes: z = {},
2068
+ imagePickerSettings: R = {},
2069
+ childPages: W,
2070
+ language: K,
2071
+ shiftEnterInsertNewLine: v,
2072
+ editorRef: u
2073
+ }) => {
2074
+ const T = n || "default", E = t || "<p></p>";
2075
+ let $ = !!(d != null && d.url);
2076
+ const { historyState: ee } = Et(), J = ce({}), ue = ce(null), [me, te] = q("initial"), [L, Se] = q(
2077
+ null
2078
+ ), Ee = H((s) => {
2079
+ s.update(() => {
2080
+ if (typeof E == "string") {
2081
+ const p = new DOMParser().parseFromString(E, "text/html"), g = je(s, p);
2082
+ _e().select(), qe(g);
2083
+ }
2084
+ });
2085
+ }, []), he = ie(() => (window.editorAppVersion = `version @layers-app/editor:${Ma.version}`, T === "comment" && document.body.setAttribute("mode", "true"), {
2086
+ editorState: null,
2087
+ namespace: "layers",
2088
+ nodes: go(T),
2089
+ onError: (s) => {
2090
+ throw s;
2091
+ },
2092
+ theme: fn(T)
2093
+ }), []);
2094
+ O(() => {
2095
+ K && ze.changeLanguage(K);
2096
+ }, [K]);
2097
+ const pe = () => typeof E == "string" ? Ee : JSON.stringify(E), Ie = H(
2098
+ (s, c) => {
2099
+ const p = Hn(s, c, d == null ? void 0 : d.url);
2100
+ return p.on("status", (g) => {
2101
+ g.status === "connecting" && te(g.status);
2102
+ }), setTimeout(() => Se(p), 0), p;
2103
+ },
2104
+ []
2105
+ ), ge = H(() => {
2106
+ var g;
2107
+ const s = L.awareness, p = Array.from(
2108
+ s.getStates().entries()
2109
+ ).map(([_, S]) => ({
2110
+ id: String(_),
2111
+ userId: _,
2112
+ name: S.name,
2113
+ color: S.color,
2114
+ awarenessData: S.awarenessData
2115
+ })).filter(
2116
+ (_, S, M) => S === M.findIndex((x) => x.name === _.name)
2117
+ );
2118
+ (g = d == null ? void 0 : d.getActiveUsers) == null || g.call(d, p);
2119
+ }, [L]);
2120
+ O(() => {
2121
+ if (L != null)
2122
+ return L.awareness.on("update", ge), () => L.awareness.off("update", ge);
2123
+ }, [L, ge]), O(() => {
2124
+ if (L != null && L.ws) {
2125
+ const s = L.ws;
2126
+ let c = 0;
2127
+ s ? (s.addEventListener("message", (p) => {
2128
+ if (typeof p.data != "string") {
2129
+ c === 1 && te("connected"), c++;
2130
+ return;
2131
+ }
2132
+ const g = JSON.parse(p.data);
2133
+ g["active-users"] && console.log("message", g["active-users"]), g.error && (g.error === "Unauthorized" ? (console.error(
2134
+ "Connection unauthorized: You are not authorized to access this WebSocket."
2135
+ ), L.disconnect()) : g.error === "No token provided" ? (console.error("No token provided: You must provide a token."), L.disconnect()) : (console.error("Unknown error:", g.error), L.disconnect()), te("error"));
2136
+ }), s.addEventListener("close", (p) => {
2137
+ console.error("WebSocket connection closed:", p), te("error");
2138
+ })) : console.error("WebSocket is not initialized yet.");
2139
+ }
2140
+ }, [L == null ? void 0 : L.ws]), O(() => () => {
2141
+ L instanceof kt && (L.destroy(), L.disconnect());
2142
+ }, [L]), $ || (he.editorState = pe());
2143
+ const Ae = me === "connecting" && $, Me = ie(() => {
2144
+ const s = { ...z };
2145
+ return h || (s.photo = !0, s.video = !0, s.audio = !0, s.file = !0), n !== "editor" && (s.childDocs = !0), {
2146
+ fetchDeleteMedia: w,
2147
+ fetchUploadMedia: h,
2148
+ fetchRestoreMedia: f,
2149
+ fetchPromptResult: m,
2150
+ currentUser: b,
2151
+ maxFileSize: k || 5,
2152
+ contentModalUploadImage: P,
2153
+ maxImageSizeError: I,
2154
+ commentOptions: y,
2155
+ shiftEnterInsertNewLine: v,
2156
+ workspaceMembers: A,
2157
+ disable: N || !1,
2158
+ mode: T,
2159
+ excludeNodes: s,
2160
+ imagePickerSettings: R,
2161
+ imperativeHandleRef: J,
2162
+ maxHeight: i,
2163
+ pages: W || []
2164
+ };
2165
+ }, [b, y, W]);
2166
+ return /* @__PURE__ */ l(ve.Provider, { value: Me, children: /* @__PURE__ */ l(Ut, { i18n: ze, children: /* @__PURE__ */ l(Jn, { children: /* @__PURE__ */ Q(Nn, { children: [
2167
+ /* @__PURE__ */ l("div", { ref: ue }),
2168
+ /* @__PURE__ */ Q("div", { className: `doc-space-editor-wrapper ${T}`, children: [
2169
+ /* @__PURE__ */ l(
2170
+ qt,
2171
+ {
2172
+ visible: Ae,
2173
+ overlayProps: { radius: "sm", blur: 2 }
2174
+ }
2175
+ ),
2176
+ /* @__PURE__ */ l(En, { children: /* @__PURE__ */ Q(Bt, { initialConfig: he, children: [
2177
+ d && me !== "error" ? /* @__PURE__ */ l(
2178
+ zt,
2179
+ {
2180
+ id: d.id,
2181
+ providerFactory: Ie,
2182
+ username: d.user.name,
2183
+ cursorColor: d.user.color,
2184
+ awarenessData: d.user.awarenessData,
2185
+ shouldBootstrap: !0,
2186
+ cursorsContainerRef: ue,
2187
+ initialEditorState: pe()
2188
+ }
2189
+ ) : /* @__PURE__ */ l(bt, { externalHistoryState: ee }),
2190
+ /* @__PURE__ */ l(Mn, { children: /* @__PURE__ */ l(Ho, { children: /* @__PURE__ */ l(wn, { children: /* @__PURE__ */ l("div", { className: "editor-shell", children: /* @__PURE__ */ l(
2191
+ Kn,
2192
+ {
2193
+ editorRef: u,
2194
+ maxHeight: i,
2195
+ mode: T,
2196
+ disable: N || !1,
2197
+ isErrorWs: me === "error",
2198
+ content: E,
2199
+ isLoading: Ae,
2200
+ imperativeHandleRef: J,
2201
+ onBlur: r,
2202
+ onFocus: a,
2203
+ onChange: e,
2204
+ outputFormat: o,
2205
+ debounceMs: F
2206
+ }
2207
+ ) }) }) }) })
2208
+ ] }) })
2209
+ ] })
2210
+ ] }) }) }) });
2211
+ };
2212
+ export {
2213
+ ve as C,
2214
+ gt as E,
2215
+ Li as I,
2216
+ Jn as S,
2217
+ ke as a,
2218
+ Et as b,
2219
+ In as c,
2220
+ Fi as d,
2221
+ Di as e,
2222
+ _n as f,
2223
+ Un as g,
2224
+ V as m,
2225
+ it as t,
2226
+ Ri as u
2227
+ };