@bigbinary/neeto-editor 1.47.107 → 1.47.109

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 (89) hide show
  1. package/dist/Attachments.js +52 -0
  2. package/dist/Attachments.js.map +1 -0
  3. package/dist/Editor.js +22376 -0
  4. package/dist/Editor.js.map +1 -0
  5. package/dist/EditorContent.js +250 -0
  6. package/dist/EditorContent.js.map +1 -0
  7. package/dist/FormikEditor.js +199 -0
  8. package/dist/FormikEditor.js.map +1 -0
  9. package/dist/Menu.js +106 -0
  10. package/dist/Menu.js.map +1 -0
  11. package/dist/chunk-BFTU3MAI.js +8 -0
  12. package/dist/chunk-BFTU3MAI.js.map +1 -0
  13. package/dist/chunk-BJhk4N3E.js +25765 -0
  14. package/dist/chunk-BJhk4N3E.js.map +1 -0
  15. package/dist/chunk-BR5ZkH7J.js +16238 -0
  16. package/dist/chunk-BR5ZkH7J.js.map +1 -0
  17. package/dist/chunk-C2dztUxs.js +4 -0
  18. package/dist/chunk-C2dztUxs.js.map +1 -0
  19. package/dist/chunk-CAGz17QN.js +571 -0
  20. package/dist/chunk-CAGz17QN.js.map +1 -0
  21. package/dist/chunk-CUwAOdCi.js +12640 -0
  22. package/dist/chunk-CUwAOdCi.js.map +1 -0
  23. package/dist/chunk-DNMH2cJJ.js +84 -0
  24. package/dist/chunk-DNMH2cJJ.js.map +1 -0
  25. package/dist/chunk-Dq9G_Haj.js +6729 -0
  26. package/dist/chunk-Dq9G_Haj.js.map +1 -0
  27. package/dist/chunk-DxGDZoUl.js +19 -0
  28. package/dist/chunk-DxGDZoUl.js.map +1 -0
  29. package/dist/chunk-sfpDYWCU.js +19022 -0
  30. package/dist/chunk-sfpDYWCU.js.map +1 -0
  31. package/dist/chunk-zRPC4lVr.js +9073 -0
  32. package/dist/chunk-zRPC4lVr.js.map +1 -0
  33. package/dist/cjs/Attachments.cjs.js +58 -0
  34. package/dist/cjs/Attachments.cjs.js.map +1 -0
  35. package/dist/cjs/Editor.cjs.js +22473 -0
  36. package/dist/cjs/Editor.cjs.js.map +1 -0
  37. package/dist/cjs/EditorContent.cjs.js +264 -0
  38. package/dist/cjs/EditorContent.cjs.js.map +1 -0
  39. package/dist/cjs/FormikEditor.cjs.js +206 -0
  40. package/dist/cjs/FormikEditor.cjs.js.map +1 -0
  41. package/dist/cjs/Menu.cjs.js +112 -0
  42. package/dist/cjs/Menu.cjs.js.map +1 -0
  43. package/dist/cjs/chunk-2HrSPdAV.cjs.js +92 -0
  44. package/dist/cjs/chunk-2HrSPdAV.cjs.js.map +1 -0
  45. package/dist/cjs/chunk-8GIxbIj_.cjs.js +597 -0
  46. package/dist/cjs/chunk-8GIxbIj_.cjs.js.map +1 -0
  47. package/dist/cjs/chunk-B6qYtOJe.cjs.js +6 -0
  48. package/dist/cjs/chunk-B6qYtOJe.cjs.js.map +1 -0
  49. package/dist/cjs/chunk-BGy3NmZC.cjs.js +49 -0
  50. package/dist/cjs/chunk-BGy3NmZC.cjs.js.map +1 -0
  51. package/dist/cjs/chunk-BJu3ubxk.cjs.js +11 -0
  52. package/dist/cjs/chunk-BJu3ubxk.cjs.js.map +1 -0
  53. package/dist/cjs/chunk-BzUZpT8V.cjs.js +6770 -0
  54. package/dist/cjs/chunk-BzUZpT8V.cjs.js.map +1 -0
  55. package/dist/cjs/chunk-CSn1uTr2.cjs.js +12645 -0
  56. package/dist/cjs/chunk-CSn1uTr2.cjs.js.map +1 -0
  57. package/dist/cjs/chunk-CdckCFos.cjs.js +25777 -0
  58. package/dist/cjs/chunk-CdckCFos.cjs.js.map +1 -0
  59. package/dist/cjs/chunk-De3nCFAF.cjs.js +16258 -0
  60. package/dist/cjs/chunk-De3nCFAF.cjs.js.map +1 -0
  61. package/dist/cjs/chunk-DjozIdFz.cjs.js +9135 -0
  62. package/dist/cjs/chunk-DjozIdFz.cjs.js.map +1 -0
  63. package/dist/cjs/chunk-krXdNjm-.cjs.js +19151 -0
  64. package/dist/cjs/chunk-krXdNjm-.cjs.js.map +1 -0
  65. package/dist/cjs/constants.cjs.js +13 -0
  66. package/dist/cjs/constants.cjs.js.map +1 -0
  67. package/dist/cjs/index.cjs.js +159 -0
  68. package/dist/cjs/index.cjs.js.map +1 -0
  69. package/dist/cjs/utils.cjs.js +27 -0
  70. package/dist/cjs/utils.cjs.js.map +1 -0
  71. package/dist/codeblockHighlight.js +15155 -0
  72. package/dist/codeblockHighlight.js.map +1 -0
  73. package/dist/constants.js +6 -0
  74. package/dist/constants.js.map +1 -0
  75. package/dist/editor-content.min.css +1 -0
  76. package/dist/editor-output-pdf-email.css +1 -0
  77. package/dist/editor-output-pdf-email.js +4 -0
  78. package/dist/editor-output-pdf-email.js.map +1 -0
  79. package/dist/editor-output.js +4 -0
  80. package/dist/editor-output.js.map +1 -0
  81. package/dist/editor-stats.html +4842 -0
  82. package/dist/editorUtils.js +170 -0
  83. package/dist/headerLinks.js +59 -0
  84. package/dist/headerLinks.js.map +1 -0
  85. package/dist/index.js +142 -0
  86. package/dist/index.js.map +1 -0
  87. package/dist/utils.js +15 -0
  88. package/dist/utils.js.map +1 -0
  89. package/package.json +3 -2
@@ -0,0 +1,250 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
3
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
4
+ import { useState, useRef, useEffect, memo } from 'react';
5
+ import classnames from 'classnames';
6
+ import DOMPurify from 'dompurify';
7
+ import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
8
+ import { isNil } from 'ramda';
9
+ import { createRoot } from 'react-dom/client';
10
+ import { a as EDITOR_SIZES } from './chunk-DNMH2cJJ.js';
11
+ import { n } from './chunk-C2dztUxs.js';
12
+ import '@bigbinary/neeto-cist';
13
+ import './chunk-DxGDZoUl.js';
14
+ import { c as convertPlainTextToHtml, s as substituteVariables, a as applySyntaxHighlightingAndLineNumbers, b as applyLineHighlighting } from './chunk-CUwAOdCi.js';
15
+ import { r as removeEmptyTags, E as EDITOR_CONTENT_DEFAULT_CONFIGURATION, S as SANITIZE_OPTIONS, b as EDITOR_CONTENT_CLASS_NAME } from './chunk-BR5ZkH7J.js';
16
+ import { useOnClickOutside } from '@bigbinary/neeto-commons-frontend/react-utils';
17
+ import Close from '@bigbinary/neeto-icons/Close';
18
+ import Button from '@bigbinary/neetoui/Button';
19
+ import Spinner from '@bigbinary/neetoui/Spinner';
20
+ import { createPortal } from 'react-dom';
21
+ import { useTranslation } from 'react-i18next';
22
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
23
+ import 'i18next';
24
+ import 'yup';
25
+ import './chunk-BFTU3MAI.js';
26
+ import 'react-dom/server';
27
+ import '@babel/runtime/helpers/toConsumableArray';
28
+
29
+ var css = "@charset \"UTF-8\";.neeto-editor__callout{border-radius:8px;margin:16px 0;padding:16px;position:relative}.neeto-editor__callout .callout-container{align-items:flex-start;display:flex;gap:12px}.neeto-editor__callout .callout-container .callout-emoji{flex-shrink:0;line-height:1}.neeto-editor__callout .callout-container .callout-content{flex-grow:1;min-width:0;outline:none}.neeto-editor__callout .callout-container .callout-content p{margin:0}.neeto-editor__callout .callout-container .callout-content h1:first-child,.neeto-editor__callout .callout-container .callout-content h2:first-child,.neeto-editor__callout .callout-container .callout-content h3:first-child,.neeto-editor__callout .callout-container .callout-content h4:first-child,.neeto-editor__callout .callout-container .callout-content h5:first-child,.neeto-editor__callout .callout-container .callout-content h6:first-child{margin-top:0}.neeto-editor__callout .callout-container .callout-content>p:first-child{margin-top:0}.neeto-editor__callout--default{background-color:#f6f7f8;background-color:rgb(var(--neeto-editor-gray-100))}.neeto-editor__callout--info{background-color:#e2f2ff;background-color:rgb(var(--neeto-editor-info-100))}.neeto-editor__callout--warning{background-color:#fbf2e1;background-color:rgb(var(--neeto-editor-warning-100))}.neeto-editor__callout--error{background-color:#feecf0;background-color:rgb(var(--neeto-editor-error-100))}.neeto-editor__callout--success{background-color:#ebfffa;background-color:rgb(var(--neeto-editor-success-100))}.neeto-ui-dropdown__popup .neeto-ui-dropdown__popup-menu.neeto-editor-callout-dropdown{padding:8px;width:200px}.neeto-editor-callout-dropdown{display:flex;flex-direction:column;gap:8px}.neeto-editor-callout-dropdown .neeto-editor-callout-dropdown__section{width:100%}.neeto-editor-callout-dropdown .neeto-editor-callout-dropdown__section .neeto-editor-callout-dropdown__section-title{color:rgb(var(--neeto-ui-gray-600));font-size:10px;font-weight:500;letter-spacing:.5px;margin-bottom:4px;padding:0 4px;text-transform:uppercase}.neeto-editor-callout-dropdown .neeto-editor-callout-dropdown__section .neeto-editor-callout-dropdown__options-grid{display:flex;flex-direction:column;gap:2px}.neeto-editor-callout-dropdown__type-option{align-items:center;background:none;border:none;border-radius:4px;cursor:pointer;display:flex;font-size:12px;padding-block:6px;padding-inline:8px;text-align:start;transition:all .15s ease;width:100%}.neeto-editor-callout-dropdown__type-option .neeto-editor-callout-dropdown__type-emoji{align-items:center;display:flex;flex-shrink:0;font-size:14px;height:16px;justify-content:center;margin-inline-end:8px;width:16px}.neeto-editor-callout-dropdown__type-option .neeto-editor-callout-dropdown__type-label{color:rgb(var(--neeto-ui-gray-800));flex:1;font-weight:500}.neeto-editor-callout-dropdown__type-option:hover{background-color:rgb(var(--neeto-ui-gray-50))}.neeto-editor-callout-dropdown__type-option--selected{background-color:rgb(var(--neeto-ui-primary-50));border:1px solid rgb(var(--neeto-ui-primary-200))}.neeto-editor-callout-dropdown__type-option--selected .neeto-editor-callout-dropdown__type-label{color:rgb(var(--neeto-ui-primary-900))}.neeto-editor-callout-dropdown__current-emoji{display:inline-block}.ProseMirror ul[data-type=todoList],.neeto-editor-content ul[data-type=todoList]{list-style:none;margin-inline-start:0;padding:0}.ProseMirror ul[data-type=todoList] li,.neeto-editor-content ul[data-type=todoList] li{align-items:flex-start;display:flex;position:relative}.ProseMirror ul[data-type=todoList] li>label,.neeto-editor-content ul[data-type=todoList] li>label{flex:0 0 auto;margin-inline-end:.5rem;pointer-events:none;-moz-user-select:none;user-select:none;z-index:1}.ProseMirror ul[data-type=todoList] li>div,.neeto-editor-content ul[data-type=todoList] li>div{flex:1 1 auto;min-height:1.5rem}.ProseMirror ul[data-type=todoList] input[type=checkbox],.neeto-editor-content ul[data-type=todoList] input[type=checkbox]{border-color:rgb(var(--neeto-ui-gray-800));border-radius:0;border-width:1px;color:rgb(var(--neeto-ui-primary-500));cursor:pointer;pointer-events:auto;position:relative;top:-2px;z-index:2}.ProseMirror ul[data-type=todoList] input[type=checkbox]:checked,.neeto-editor-content ul[data-type=todoList] input[type=checkbox]:checked{border-color:rgb(var(--neeto-ui-primary-500))}.ProseMirror ul[data-type=todoList] ul[data-type=todoList],.neeto-editor-content ul[data-type=todoList] ul[data-type=todoList]{margin:0}.ProseMirror ul[data-type=todoList] li[data-checked=true]>div p,.neeto-editor-content ul[data-type=todoList] li[data-checked=true]>div p{opacity:.65;text-decoration:line-through}.neeto-editor-content .hljs{background:#282c34;color:#abb2bf}.neeto-editor-content .hljs-comment,.neeto-editor-content .hljs-quote{color:#5c6370;font-style:italic}.neeto-editor-content .hljs-doctag,.neeto-editor-content .hljs-formula,.neeto-editor-content .hljs-keyword{color:#c678dd}.neeto-editor-content .hljs-deletion,.neeto-editor-content .hljs-name,.neeto-editor-content .hljs-section,.neeto-editor-content .hljs-selector-tag,.neeto-editor-content .hljs-subst{color:#e06c75}.neeto-editor-content .hljs-literal{color:#56b6c2}.neeto-editor-content .hljs-addition,.neeto-editor-content .hljs-attribute,.neeto-editor-content .hljs-meta .hljs-string,.neeto-editor-content .hljs-regexp,.neeto-editor-content .hljs-string{color:#98c379}.neeto-editor-content .hljs-attr,.neeto-editor-content .hljs-number,.neeto-editor-content .hljs-selector-attr,.neeto-editor-content .hljs-selector-class,.neeto-editor-content .hljs-selector-pseudo,.neeto-editor-content .hljs-template-variable,.neeto-editor-content .hljs-type,.neeto-editor-content .hljs-variable{color:#d19a66}.neeto-editor-content .hljs-bullet,.neeto-editor-content .hljs-link,.neeto-editor-content .hljs-meta,.neeto-editor-content .hljs-selector-id,.neeto-editor-content .hljs-symbol,.neeto-editor-content .hljs-title{color:#61aeee}.neeto-editor-content .hljs-built_in,.neeto-editor-content .hljs-class .hljs-title,.neeto-editor-content .hljs-title.class_{color:#e6c07b}.neeto-editor-content .hljs-emphasis{font-style:italic}.neeto-editor-content .hljs-strong{font-weight:700}.neeto-editor-content .hljs-link{text-decoration:underline}.neeto-ui-theme--dark .hljs{background:#fafafa;color:#383a42}.neeto-ui-theme--dark .hljs-comment,.neeto-ui-theme--dark .hljs-quote{color:#a0a1a7;font-style:italic}.neeto-ui-theme--dark .hljs-doctag,.neeto-ui-theme--dark .hljs-formula,.neeto-ui-theme--dark .hljs-keyword{color:#a626a4}.neeto-ui-theme--dark .hljs-deletion,.neeto-ui-theme--dark .hljs-name,.neeto-ui-theme--dark .hljs-section,.neeto-ui-theme--dark .hljs-selector-tag,.neeto-ui-theme--dark .hljs-subst{color:#e45649}.neeto-ui-theme--dark .hljs-literal{color:#0184bb}.neeto-ui-theme--dark .hljs-addition,.neeto-ui-theme--dark .hljs-attribute,.neeto-ui-theme--dark .hljs-meta .hljs-string,.neeto-ui-theme--dark .hljs-regexp,.neeto-ui-theme--dark .hljs-string{color:#50a14f}.neeto-ui-theme--dark .hljs-attr,.neeto-ui-theme--dark .hljs-number,.neeto-ui-theme--dark .hljs-selector-attr,.neeto-ui-theme--dark .hljs-selector-class,.neeto-ui-theme--dark .hljs-selector-pseudo,.neeto-ui-theme--dark .hljs-template-variable,.neeto-ui-theme--dark .hljs-type,.neeto-ui-theme--dark .hljs-variable{color:#986801}.neeto-ui-theme--dark .hljs-bullet,.neeto-ui-theme--dark .hljs-link,.neeto-ui-theme--dark .hljs-meta,.neeto-ui-theme--dark .hljs-selector-id,.neeto-ui-theme--dark .hljs-symbol,.neeto-ui-theme--dark .hljs-title{color:#4078f2}.neeto-ui-theme--dark .hljs-built_in,.neeto-ui-theme--dark .hljs-class .hljs-title,.neeto-ui-theme--dark .hljs-title.class_{color:#c18401}.neeto-ui-theme--dark .hljs-emphasis{font-style:italic}.neeto-ui-theme--dark .hljs-strong{font-weight:700}.neeto-ui-theme--dark .hljs-link{text-decoration:underline}.neeto-ui-theme--light .hljs{background:#282c34;color:#abb2bf}.neeto-ui-theme--light .hljs-comment,.neeto-ui-theme--light .hljs-quote{color:#5c6370;font-style:italic}.neeto-ui-theme--light .hljs-doctag,.neeto-ui-theme--light .hljs-formula,.neeto-ui-theme--light .hljs-keyword{color:#c678dd}.neeto-ui-theme--light .hljs-deletion,.neeto-ui-theme--light .hljs-name,.neeto-ui-theme--light .hljs-section,.neeto-ui-theme--light .hljs-selector-tag,.neeto-ui-theme--light .hljs-subst{color:#e06c75}.neeto-ui-theme--light .hljs-literal{color:#56b6c2}.neeto-ui-theme--light .hljs-addition,.neeto-ui-theme--light .hljs-attribute,.neeto-ui-theme--light .hljs-meta .hljs-string,.neeto-ui-theme--light .hljs-regexp,.neeto-ui-theme--light .hljs-string{color:#98c379}.neeto-ui-theme--light .hljs-attr,.neeto-ui-theme--light .hljs-number,.neeto-ui-theme--light .hljs-selector-attr,.neeto-ui-theme--light .hljs-selector-class,.neeto-ui-theme--light .hljs-selector-pseudo,.neeto-ui-theme--light .hljs-template-variable,.neeto-ui-theme--light .hljs-type,.neeto-ui-theme--light .hljs-variable{color:#d19a66}.neeto-ui-theme--light .hljs-bullet,.neeto-ui-theme--light .hljs-link,.neeto-ui-theme--light .hljs-meta,.neeto-ui-theme--light .hljs-selector-id,.neeto-ui-theme--light .hljs-symbol,.neeto-ui-theme--light .hljs-title{color:#61aeee}.neeto-ui-theme--light .hljs-built_in,.neeto-ui-theme--light .hljs-class .hljs-title,.neeto-ui-theme--light .hljs-title.class_{color:#e6c07b}.neeto-ui-theme--light .hljs-emphasis{font-style:italic}.neeto-ui-theme--light .hljs-strong{font-weight:700}.neeto-ui-theme--light .hljs-link{text-decoration:underline}.neeto-ui-theme--light,:root{--neeto-editor-white:255,255,255;--neeto-editor-black:12,17,29;--neeto-editor-gray-800:16,24,40;--neeto-editor-gray-700:29,41,57;--neeto-editor-gray-600:52,64,84;--neeto-editor-gray-500:135,146,157;--neeto-editor-gray-400:194,200,204;--neeto-editor-gray-300:216,220,222;--neeto-editor-gray-200:233,235,237;--neeto-editor-gray-100:246,247,248;--neeto-editor-gray-50:250,250,250;--neeto-editor-primary-800:0,102,83;--neeto-editor-primary-600:0,122,100;--neeto-editor-primary-500:0,128,104;--neeto-editor-primary-100:225,243,238;--neeto-editor-primary-50:240,249,247;--neeto-editor-accent-800:9,90,186;--neeto-editor-accent-600:13,102,208;--neeto-editor-accent-500:20,115,230;--neeto-editor-accent-100:230,244,255;--neeto-editor-accent-50:239,248,255;--neeto-editor-success-800:1,121,93;--neeto-editor-success-600:1,141,109;--neeto-editor-success-500:2,162,124;--neeto-editor-success-100:235,255,250;--neeto-editor-error-800:187,18,26;--neeto-editor-error-600:201,37,45;--neeto-editor-error-500:215,55,63;--neeto-editor-error-100:254,236,240;--neeto-editor-info-800:9,90,186;--neeto-editor-info-600:13,102,208;--neeto-editor-info-500:20,115,230;--neeto-editor-info-100:226,242,255;--neeto-editor-warning-800:189,100,13;--neeto-editor-warning-600:203,111,16;--neeto-editor-warning-500:218,123,17;--neeto-editor-warning-100:251,242,225;--neeto-editor-pastel-silver:232,233,237;--neeto-editor-pastel-red:255,229,229;--neeto-editor-pastel-yellow:254,243,197;--neeto-editor-pastel-green:211,249,232;--neeto-editor-pastel-blue:236,244,255;--neeto-editor-pastel-purple:238,235,255;--neeto-editor-pastel-pink:253,226,241;--neeto-editor-rounded-none:0;--neeto-editor-rounded-sm:3px;--neeto-editor-rounded:5px;--neeto-editor-rounded-md:6px;--neeto-editor-rounded-lg:8px;--neeto-editor-rounded-xl:12px;--neeto-editor-rounded-full:999px;--neeto-editor-font-thin:100;--neeto-editor-font-extralight:200;--neeto-editor-font-light:300;--neeto-editor-font-normal:400;--neeto-editor-font-medium:500;--neeto-editor-font-semibold:600;--neeto-editor-font-bold:700;--neeto-editor-font-extrabold:800;--neeto-editor-font-black:900;--neeto-editor-content-h1-margin:1.5rem 0 0.25rem;--neeto-editor-content-h2-margin:1.5rem 0 0.25rem;--neeto-editor-content-h3-margin:1.5rem 0 0.25rem;--neeto-editor-content-h4-margin:1.5rem 0 0.25rem;--neeto-editor-content-h5-margin:1.5rem 0 0.25rem;--neeto-editor-content-h6-margin:1.5rem 0 0.25rem;--neeto-editor-content-heading-font-weight:600;--neeto-editor-content-heading-font-weight-bold:bold;--neeto-editor-content-heading-color:12,17,29,1;--neeto-editor-content-heading-line-height:1.25;--neeto-editor-content-paragraph-color:54,55,55,1;--neeto-editor-content-paragraph-font-weight:400;--neeto-editor-content-paragraph-line-height:1.6;--neeto-editor-content-paragraph-margin-bottom:0.5rem;--neeto-editor-content-list-padding-inline-start:2rem;--neeto-editor-content-list-margin-bottom:1rem;--neeto-editor-content-list-item-margin-bottom:0.5rem;--neeto-editor-content-list-item-margin-top:0.5rem;--neeto-editor-content-code-font-size:85%;--neeto-editor-content-code-background-color:40,44,52,1;--neeto-editor-content-code-line-number-color:89,99,110,1;--neeto-editor-content-code-color:171,178,191,1;--neeto-editor-content-inline-code-color:31,35,40,1;--neeto-editor-content-inline-code-background-color:239,242,246,1;--neeto-editor-content-code-padding:0.2em 0.4em;--neeto-editor-content-blockquote-color:89,99,110,1;--neeto-editor-content-blockquote-border-color:209,217,224,1;--neeto-editor-content-blockquote-border-inline-start-width:4px;--neeto-editor-content-blockquote-margin-bottom:1rem;--neeto-editor-content-blockquote-padding-inline-start:0.75rem;--neeto-editor-content-image-border-color:228,228,231;--neeto-editor-content-image-border-radius:8px;--neeto-editor-highlight-text-1:#32302c;--neeto-editor-highlight-text-2:#787774;--neeto-editor-highlight-text-3:#9f6b53;--neeto-editor-highlight-text-4:#d9730d;--neeto-editor-highlight-text-5:#cb912f;--neeto-editor-highlight-text-6:#448361;--neeto-editor-highlight-text-7:#337ea9;--neeto-editor-highlight-text-8:#9065b0;--neeto-editor-highlight-text-9:#c14c8a;--neeto-editor-highlight-text-10:#d44c47;--neeto-editor-highlight-text-11:#6364dc;--neeto-editor-highlight-text-12:#d99641;--neeto-editor-highlight-text-13:#5a8cd7;--neeto-editor-highlight-text-14:#48a869;--neeto-editor-highlight-text-15:#dc3232;--neeto-editor-highlight-text-16:#af50dc;--neeto-editor-highlight-bg-1:#ff0;--neeto-editor-highlight-bg-2:#e3e3de;--neeto-editor-highlight-bg-3:#dfcece;--neeto-editor-highlight-bg-4:#f9e0c8;--neeto-editor-highlight-bg-5:#f7e7b6;--neeto-editor-highlight-bg-6:#d0e0cd;--neeto-editor-highlight-bg-7:#c0dfec;--neeto-editor-highlight-bg-8:#e3cef3;--neeto-editor-highlight-bg-9:#f4cdde;--neeto-editor-highlight-bg-10:#f9c7ca;--neeto-editor-highlight-bg-11:#b69cff;--neeto-editor-highlight-bg-12:#d9730d;--neeto-editor-highlight-bg-13:#4a85e8;--neeto-editor-highlight-bg-14:#00ff01;--neeto-editor-highlight-bg-15:red;--neeto-editor-highlight-bg-16:#f0f}.neeto-ui-theme--dark{--neeto-editor-white:18,18,18;--neeto-editor-black:224,224,224;--neeto-editor-gray-50:10,10,10;--neeto-editor-gray-100:30,30,30;--neeto-editor-gray-200:44,44,44;--neeto-editor-gray-300:57,57,57;--neeto-editor-gray-400:73,73,73;--neeto-editor-gray-500:92,92,92;--neeto-editor-gray-600:124,124,124;--neeto-editor-gray-700:162,162,162;--neeto-editor-gray-800:200,200,200;--neeto-editor-primary-800:0,245,200;--neeto-editor-primary-600:0,224,183;--neeto-editor-primary-500:0,204,167;--neeto-editor-primary-100:0,61,49;--neeto-editor-primary-50:0,41,33;--neeto-editor-accent-800:142,189,245;--neeto-editor-accent-600:105,167,242;--neeto-editor-accent-500:67,144,239;--neeto-editor-accent-100:10,56,113;--neeto-editor-accent-50:7,37,75;--neeto-editor-error-800:247,109,116;--neeto-editor-error-600:236,91,98;--neeto-editor-error-500:227,72,80;--neeto-editor-error-100:129,33,38;--neeto-editor-success-800:0,245,200;--neeto-editor-success-600:0,224,183;--neeto-editor-success-500:0,204,167;--neeto-editor-success-100:0,61,49;--neeto-editor-warning-800:249,164,63;--neeto-editor-warning-600:242,148,35;--neeto-editor-warning-500:230,134,25;--neeto-editor-warning-100:131,74,11;--neeto-editor-info-800:142,189,245;--neeto-editor-info-600:105,167,242;--neeto-editor-info-500:67,144,239;--neeto-editor-info-100:10,56,113;--neeto-editor-pastel-silver:167,168,170;--neeto-editor-pastel-red:183,164,165;--neeto-editor-pastel-yellow:182,175,143;--neeto-editor-pastel-green:152,179,167;--neeto-editor-pastel-blue:170,175,183;--neeto-editor-pastel-purple:171,169,183;--neeto-editor-pastel-pink:181,162,174;--neeto-editor-content-heading-color:224,224,224,1;--neeto-editor-content-paragraph-color:224,224,224,1;--neeto-editor-content-code-background-color:246,248,250,1;--neeto-editor-content-code-line-number-color:89,99,110,1;--neeto-editor-content-code-color:31,35,40,1;--neeto-editor-content-inline-code-color:212,223,243,1;--neeto-editor-content-inline-code-background-color:67,73,84,1;--neeto-editor-content-blockquote-color:145,152,161,1;--neeto-editor-content-blockquote-border-color:61,68,77,1;--neeto-editor-highlight-text-1:#cdcdcd;--neeto-editor-highlight-text-2:#b4b4b4;--neeto-editor-highlight-text-3:#c89678;--neeto-editor-highlight-text-4:#f0b464;--neeto-editor-highlight-text-5:#e6be78;--neeto-editor-highlight-text-6:#78be96;--neeto-editor-highlight-text-7:#64b4dc;--neeto-editor-highlight-text-8:#be96e6;--neeto-editor-highlight-text-9:#dc78be;--neeto-editor-highlight-text-10:#e6786e;--neeto-editor-highlight-text-11:#9b9cff;--neeto-editor-highlight-text-12:#f5b464;--neeto-editor-highlight-text-13:#78aaf5;--neeto-editor-highlight-text-14:#64c887;--neeto-editor-highlight-text-15:#fa6e6e;--neeto-editor-highlight-text-16:#dc82ff;--neeto-editor-highlight-bg-1:#646400;--neeto-editor-highlight-bg-2:#41413c;--neeto-editor-highlight-bg-3:#413737;--neeto-editor-highlight-bg-4:#504130;--neeto-editor-highlight-bg-5:#554e2d;--neeto-editor-highlight-bg-6:#2d412a;--neeto-editor-highlight-bg-7:#234452;--neeto-editor-highlight-bg-8:#413055;--neeto-editor-highlight-bg-9:#552d44;--neeto-editor-highlight-bg-10:#553030;--neeto-editor-highlight-bg-11:#32145a;--neeto-editor-highlight-bg-12:#643c0a;--neeto-editor-highlight-bg-13:#193c6e;--neeto-editor-highlight-bg-14:#00500a;--neeto-editor-highlight-bg-15:#6e0f0f;--neeto-editor-highlight-bg-16:#640a64}.neeto-ui-theme--dark .neeto-editor-content.neeto-editor-size--small{--neeto-editor-content-heading-color:224,224,224,1;--neeto-editor-content-paragraph-color:224,224,224,1}.neeto-ui-theme--light .neeto-editor-content{--neeto-editor-content-heading-color:12,17,29,1;--neeto-editor-content-paragraph-color:54,55,55,1}.neeto-ui-theme--light .neeto-editor-content.neeto-editor-size--small{--neeto-editor-content-heading-color:31,35,40,1;--neeto-editor-content-paragraph-color:31,35,40,1}.neeto-editor-content{-moz-tab-size:2;-o-tab-size:2;tab-size:2;white-space:pre-wrap;word-break:break-word}.neeto-editor-content hr{border-color:#363737;border-color:rgba(var(--neeto-editor-content-paragraph-color));margin:.5rem 0;opacity:.2}.neeto-editor-content .table-responsive{-webkit-overflow-scrolling:touch;margin:1rem 0;overflow-x:auto}.neeto-editor-content .table-responsive.neeto-editor-table--left table td,.neeto-editor-content .table-responsive.neeto-editor-table--left table th{text-align:start!important}.neeto-editor-content .table-responsive.neeto-editor-table--center table td,.neeto-editor-content .table-responsive.neeto-editor-table--center table th{text-align:center!important}.neeto-editor-content .table-responsive.neeto-editor-table--right table td,.neeto-editor-content .table-responsive.neeto-editor-table--right table th{text-align:end!important}.neeto-editor-content.neeto-editor-size--small{--neeto-editor-content-heading-color:31,35,40,1;--neeto-editor-content-paragraph-color:31,35,40,1;--neeto-editor-content-h1-font-size:1.75rem;--neeto-editor-content-h2-font-size:1.3125rem;--neeto-editor-content-h3-font-size:1.09375rem;--neeto-editor-content-h4-font-size:0.875rem;--neeto-editor-content-h5-font-size:0.765625rem;--neeto-editor-content-h6-font-size:0.74375rem;--neeto-editor-content-paragraph-font-size:0.875rem;--neeto-editor-content-paragraph-line-height:1.5;--neeto-editor-content-list-padding-inline-start:1.5rem;--neeto-editor-content-list-item-margin-bottom:0.25rem;--neeto-editor-content-list-item-margin-top:0.25rem}.neeto-editor-content.neeto-editor-size--medium{--neeto-editor-content-h1-font-size:2rem;--neeto-editor-content-h2-font-size:1.5rem;--neeto-editor-content-h3-font-size:1.25rem;--neeto-editor-content-h4-font-size:1rem;--neeto-editor-content-h5-font-size:0.875rem;--neeto-editor-content-h6-font-size:0.75rem;--neeto-editor-content-paragraph-font-size:1rem}@media only screen and (max-width:767px){.neeto-editor-content.neeto-editor-size--medium{--neeto-editor-content-h1-font-size:1.375rem;--neeto-editor-content-h2-font-size:1.25rem;--neeto-editor-content-h3-font-size:1.125rem}}.neeto-editor-content.neeto-editor-size--large{--neeto-editor-content-h1-font-size:2.375rem;--neeto-editor-content-h2-font-size:1.93rem;--neeto-editor-content-h3-font-size:1.633rem;--neeto-editor-content-h4-font-size:1.336rem;--neeto-editor-content-h5-font-size:0.986rem;--neeto-editor-content-h6-font-size:0.796rem;--neeto-editor-content-paragraph-font-size:1.125rem}@media only screen and (max-width:767px){.neeto-editor-content.neeto-editor-size--large{--neeto-editor-content-h1-font-size:2.125rem;--neeto-editor-content-h2-font-size:1.7266rem;--neeto-editor-content-h3-font-size:1.4609rem;--neeto-editor-content-h4-font-size:1.1953rem;--neeto-editor-content-h5-font-size:0.875rem;--neeto-editor-content-h6-font-size:0.75rem;--neeto-editor-content-paragraph-font-size:1rem}}.neeto-editor-content h1,.neeto-editor-content h2,.neeto-editor-content h3,.neeto-editor-content h4,.neeto-editor-content h5,.neeto-editor-content h6{color:#0c111d;color:rgba(var(--neeto-editor-content-heading-color));font-weight:600;font-weight:var(--neeto-editor-content-heading-font-weight)}.neeto-editor-content h1 strong,.neeto-editor-content h2 strong,.neeto-editor-content h3 strong,.neeto-editor-content h4 strong,.neeto-editor-content h5 strong,.neeto-editor-content h6 strong{font-weight:700!important;font-weight:var(--neeto-editor-content-heading-font-weight-bold)!important}.neeto-editor-content h1{font-size:var(--neeto-editor-content-h1-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h1-margin)}.neeto-editor-content h2{font-size:var(--neeto-editor-content-h2-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h2-margin)}.neeto-editor-content h3{font-size:var(--neeto-editor-content-h3-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h3-margin)}.neeto-editor-content h4{font-size:var(--neeto-editor-content-h4-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h4-margin)}.neeto-editor-content h5{font-size:var(--neeto-editor-content-h5-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h5-margin)}.neeto-editor-content h6{font-size:var(--neeto-editor-content-h6-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h6-margin)}.neeto-editor-content .header-wrapper{position:relative}.neeto-editor-content .header-wrapper__link{position:absolute;top:50%}.neeto-editor-content .header-wrapper h1,.neeto-editor-content .header-wrapper h2,.neeto-editor-content .header-wrapper h3,.neeto-editor-content .header-wrapper h4,.neeto-editor-content .header-wrapper h5,.neeto-editor-content .header-wrapper h6{line-height:1.25;line-height:var(--neeto-editor-content-heading-line-height);transition:color .15s ease-in}.neeto-editor-content .header-wrapper .header-link-icon-wrapper{align-items:center;display:flex;height:100%;inset-inline-start:-1.5625rem;opacity:0;position:absolute;transition:opacity .15s ease-in;width:1.5625rem}.neeto-editor-content .header-wrapper .header-link-icon-wrapper svg{fill:#006653;fill:rgb(var(--neeto-editor-primary-800));transition:fill .15s ease-in}.neeto-editor-content .header-wrapper:hover .header-link-icon-wrapper{opacity:1}.neeto-editor-content .header-wrapper:hover svg{fill:#095aba;fill:rgb(var(--neeto-editor-accent-800))}.neeto-editor-content p{color:#363737;color:rgba(var(--neeto-editor-content-paragraph-color));font-size:var(--neeto-editor-content-paragraph-font-size);font-weight:400;font-weight:var(--neeto-editor-content-paragraph-font-weight);line-height:1.6;line-height:var(--neeto-editor-content-paragraph-line-height);margin-bottom:.5rem;margin-bottom:var(--neeto-editor-content-paragraph-margin-bottom);margin-top:0;min-height:1.3rem}.neeto-editor-content p:empty:after{content:\" \"}.neeto-editor-content p:empty{line-height:1;margin-bottom:0;min-height:1rem}.neeto-editor-content p:last-child{margin-bottom:0}.neeto-editor-content p strong{font-weight:600!important}.neeto-editor-content div{color:#363737;color:rgba(var(--neeto-editor-content-paragraph-color));font-size:var(--neeto-editor-content-paragraph-font-size);font-weight:400;font-weight:var(--neeto-editor-content-paragraph-font-weight);line-height:1.6;line-height:var(--neeto-editor-content-paragraph-line-height)}.neeto-editor-content code{background-color:#282c34;background-color:rgba(var(--neeto-editor-content-code-background-color));border-color:#282c34;border-color:rgba(var(--neeto-editor-content-code-background-color));border-radius:3px;border-radius:var(--neeto-editor-rounded-sm);color:#abb2bf;color:rgba(var(--neeto-editor-content-code-color));font-family:SFMono-Regular,Menlo,Consolas,PT Mono,Liberation Mono,Courier,monospace;font-size:85%;font-size:var(--neeto-editor-content-code-font-size);padding:.2em .4em;padding:var(--neeto-editor-content-code-padding)}.neeto-editor-content code *{font-size:inherit!important}.neeto-editor-content h1 code,.neeto-editor-content h2 code,.neeto-editor-content h3 code,.neeto-editor-content h4 code,.neeto-editor-content h5 code,.neeto-editor-content h6 code,.neeto-editor-content li code,.neeto-editor-content p code,.neeto-editor-content table td code,.neeto-editor-content table th code{background-color:#eff2f6;background-color:rgba(var(--neeto-editor-content-inline-code-background-color));border-radius:3px;border-radius:var(--neeto-editor-rounded-sm);color:#1f2328;color:rgba(var(--neeto-editor-content-inline-code-color));font-size:85%;font-size:var(--neeto-editor-content-code-font-size)}.neeto-editor-content pre{background-color:#282c34;background-color:rgba(var(--neeto-editor-content-code-background-color));border-color:#282c34;border-color:rgba(var(--neeto-editor-content-code-background-color));border-radius:8px;border-radius:var(--neeto-editor-rounded-lg);counter-reset:line-number;font-size:var(--neeto-editor-content-paragraph-font-size);line-height:1.5;margin-bottom:1rem;margin-top:1rem;max-width:100%;padding:0;position:relative}.neeto-editor-content pre,.neeto-editor-content pre div{color:#abb2bf;color:rgba(var(--neeto-editor-content-code-color))}.neeto-editor-content pre .neeto-editor-codeblock-options{align-items:center;display:flex;gap:.25rem;inset-inline-end:.25rem;opacity:0;position:absolute;top:.25rem;visibility:hidden}.neeto-editor-content pre .neeto-editor-codeblock-options__menu{display:flex;flex-direction:column;gap:.25rem}.neeto-editor-content pre .neeto-editor-codeblock-options__input{margin:.25rem}.neeto-editor-content pre:hover .neeto-editor-codeblock-options{opacity:1;visibility:visible}.neeto-editor-content pre:hover .copy-button{opacity:1;visibility:visible}.neeto-editor-content pre .copy-button{inset-inline-end:.25rem;opacity:0;position:absolute;top:.25rem;visibility:hidden}.neeto-editor-content pre[data-linenumbers] .highlight-line{padding-inline-start:3.125rem;position:relative}.neeto-editor-content pre[data-linenumbers] .highlight-line:before{align-items:center;color:#59636e;color:rgba(var(--neeto-editor-content-code-line-number-color));content:counter(line-number);counter-increment:line-number;display:flex;font-size:85%;font-weight:400;height:100%;inset-inline-start:0;justify-content:flex-end;padding-inline-end:1rem;padding-inline-start:.625rem;position:absolute;width:3.125rem}.neeto-editor-content pre[data-linenumbers] .highlight-line:last-child:before{content:\"\"}.neeto-editor-content pre>code{background-color:transparent;border-radius:0;border-radius:8px;border-radius:var(--neeto-editor-rounded-lg);border-width:0;color:inherit;display:block;font-size:85%;font-size:var(--neeto-editor-content-code-font-size);font-weight:400;line-height:inherit;overflow-x:auto;padding:.75rem;white-space:pre!important;width:100%}.neeto-editor-content pre[data-linenumbers]>code{padding-inline-start:0}.neeto-editor-content blockquote{border-inline-start-color:#d1d9e0;border-inline-start-color:rgba(var(--neeto-editor-content-blockquote-border-color));border-inline-start-width:4px;border-inline-start-width:var(--neeto-editor-content-blockquote-border-inline-start-width);color:#59636e;color:rgba(var(--neeto-editor-content-blockquote-color));font-weight:500;font-weight:var(--neeto-editor-font-medium);margin-bottom:1rem;margin-bottom:var(--neeto-editor-content-blockquote-margin-bottom);padding-inline-start:.75rem;padding-inline-start:var(--neeto-editor-content-blockquote-padding-inline-start);quotes:\"“\" \"”\" \"‘\" \"’\"}.neeto-editor-content blockquote div,.neeto-editor-content blockquote p{color:inherit}.neeto-editor-content blockquote>p:before{content:\"\"!important}.neeto-editor-content blockquote>p:after{content:\"\"!important}.neeto-editor-content ol,.neeto-editor-content ul{list-style:revert;margin-bottom:1rem;margin-bottom:var(--neeto-editor-content-list-margin-bottom);padding-inline-start:2rem;padding-inline-start:var(--neeto-editor-content-list-padding-inline-start)}.neeto-editor-content ol li,.neeto-editor-content ul li{color:#363737;color:rgba(var(--neeto-editor-content-paragraph-color));font-size:var(--neeto-editor-content-paragraph-font-size);font-weight:400;font-weight:var(--neeto-editor-content-paragraph-font-weight);line-height:1.6;line-height:var(--neeto-editor-content-paragraph-line-height)}.neeto-editor-content ol li:before,.neeto-editor-content ul li:before{background-color:#363737;background-color:rgba(var(--neeto-editor-content-paragraph-color))}.neeto-editor-content ol li>p,.neeto-editor-content ul li>p{margin-bottom:.5rem!important;margin-bottom:var(--neeto-editor-content-list-item-margin-bottom)!important;margin-top:.5rem!important;margin-top:var(--neeto-editor-content-list-item-margin-top)!important}.neeto-editor-content ol+p,.neeto-editor-content ul+p{margin-top:.5rem!important;margin-top:var(--neeto-editor-content-list-item-margin-top)!important}.neeto-editor-content a[href]{color:#095aba;color:rgb(var(--neeto-editor-accent-800));font-weight:inherit}.neeto-editor-content .neeto-editor__video-wrapper{display:flex;margin:1rem 0;padding-inline-start:3px}.neeto-editor-content .neeto-editor__video-wrapper.neeto-editor__video--bordered iframe,.neeto-editor-content .neeto-editor__video-wrapper.neeto-editor__video--bordered video{border:1px solid #e4e4e7;border-color:rgba(var(--neeto-editor-content-image-border-color));border-radius:8px;border-radius:var(--neeto-editor-content-image-border-radius)}.neeto-editor-content .neeto-editor__video-wrapper .neeto-editor__video-iframe{display:inline-block;height:auto!important;max-width:100%;vertical-align:top}.neeto-editor-content .neeto-editor__video-wrapper .neeto-editor__video-iframe iframe{aspect-ratio:16/9;width:100%}.neeto-editor-content .neeto-editor__video-wrapper .neeto-editor__video-iframe.neeto-editor-aspect-1-1 iframe{aspect-ratio:1/1;width:100%}.neeto-editor-content .neeto-editor__video-wrapper .neeto-editor__video-iframe.neeto-editor-aspect-16-9 iframe{aspect-ratio:16/9;width:100%}.neeto-editor-content .neeto-editor__video-wrapper .neeto-editor__video-iframe.neeto-editor-aspect-9-16 iframe{aspect-ratio:9/16;width:100%}.neeto-editor-content .neeto-editor__video-wrapper .neeto-editor__video-iframe.neeto-editor-aspect-4-3 iframe{aspect-ratio:4/3;width:100%}.neeto-editor-content .neeto-editor__video-wrapper .neeto-editor__video-iframe.neeto-editor-aspect-3-2 iframe{aspect-ratio:3/2;width:100%}.neeto-editor-content .neeto-editor__video--left{justify-content:flex-start}.neeto-editor-content .neeto-editor__video--right{justify-content:flex-end}.neeto-editor-content .neeto-editor__video--center{justify-content:center}.neeto-editor-content mark{border-radius:3px;border-radius:var(--neeto-editor-rounded-sm);padding:0}.neeto-editor-content [data-type=mention]{color:#095aba;color:rgb(var(--neeto-editor-accent-800))}.neeto-editor-content [data-type=special-mention]{color:#095aba;color:rgb(var(--neeto-editor-accent-800))}.neeto-editor-content table{border:1px solid #d8dcde;border:1px solid rgba(var(--neeto-editor-gray-300));border-collapse:separate;border-radius:3px;border-radius:var(--neeto-editor-rounded-sm);border-spacing:0;min-width:300px;overflow:hidden;table-layout:fixed}.neeto-editor-content table td,.neeto-editor-content table th{border-inline-start:1px solid #d8dcde;border-inline-start:1px solid rgba(var(--neeto-editor-gray-300));border-top:1px solid #d8dcde;border-top:1px solid rgba(var(--neeto-editor-gray-300));padding-block:8px;padding-inline:12px;position:relative;text-align:start}.neeto-editor-content table td:first-child,.neeto-editor-content table th:first-child{border-inline-start:none}.neeto-editor-content table th{background:#f6f7f8;background:rgb(var(--neeto-editor-gray-100));border-top:none}.neeto-editor-content table td{background:#fff;background:rgb(var(--neeto-editor-white))}.neeto-editor-content--hidden{display:none}.neeto-editor__image-wrapper{color:inherit!important;display:flex;font-weight:400!important;margin:1rem 0;padding-inline-start:3px;text-decoration:none}.neeto-editor__image-wrapper.neeto-editor__image--bordered img,.neeto-editor__image-wrapper.neeto-editor__image--bordered video{border:1px solid #e4e4e7;border-color:rgba(var(--neeto-editor-content-image-border-color));border-radius:8px;border-radius:var(--neeto-editor-content-image-border-radius)}.neeto-editor__image-wrapper figure{cursor:pointer;display:inline-block;margin:0;max-width:100%;overflow:hidden;position:relative;vertical-align:top}.neeto-editor__image-wrapper .neeto-editor__image{display:inline-block;height:auto!important;max-width:100%;min-height:52px;vertical-align:top}.neeto-editor__image-wrapper .neeto-editor__image img,.neeto-editor__image-wrapper .neeto-editor__image video{display:inline-block;height:auto;vertical-align:top!important;width:100%}.neeto-editor__image-wrapper .neeto-editor__image img.hidden,.neeto-editor__image-wrapper .neeto-editor__image video.hidden{display:none}.neeto-editor__image-wrapper .neeto-editor__image img{cursor:zoom-in}.neeto-editor__image-wrapper .neeto-editor__image-placeholder{align-items:center;border:1px solid;border-radius:8px;display:flex;height:200px;justify-content:center;width:400px}.neeto-editor__image-wrapper figcaption div{color:#344054;color:rgb(var(--neeto-editor-gray-600));font-size:.875rem;font-weight:400;font-weight:var(--neeto-editor-font-normal);line-height:1.4;text-align:center}.neeto-editor__image-wrapper figcaption div a{display:inline-block;margin:0;text-align:center}.neeto-editor__image-wrapper figcaption.is-empty div:before{color:#87929d;color:rgb(var(--neeto-editor-gray-500));content:\"Add a caption\";inset:0;position:absolute}.neeto-editor__image-wrapper:has(img:not([src])),.neeto-editor__image-wrapper:has(video:not([src]):not(:has(source[src]))){display:none}.neeto-editor-content figcaption{color:#6b7280;font-size:.875rem;font-weight:400;line-height:1.4;max-width:100%;text-align:center}.neeto-editor__image--left{justify-content:flex-start}.neeto-editor__image--center{justify-content:center}.neeto-editor__image--right{justify-content:flex-end}.selected-text{background-color:#d8dcde;background-color:rgb(var(--neeto-editor-gray-300));padding-block:2px;padding-inline:0}.ne-image-preview-wrapper{align-items:center;background:rgba(16,24,40,.5);background:rgba(var(--neeto-editor-gray-800),.5);display:none;height:100%;inset-inline-start:0;justify-content:center;position:fixed;top:0;width:100%;z-index:999999}.ne-image-preview-wrapper.active{display:flex}.ne-image-preview-wrapper .ne-image-preview{background:#fff;background:rgb(var(--neeto-editor-white));display:flex;flex-direction:column;gap:10px;max-height:90vh;max-width:60vw;opacity:0;transition:opacity .1s ease-in-out}.ne-image-preview-wrapper .ne-image-preview img{background:#fff;background:rgb(var(--neeto-editor-white));max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;overflow:hidden;padding:10px;width:-moz-fit-content;width:fit-content}.ne-image-preview-wrapper .ne-image-preview.image-loaded{align-items:center;background:transparent;border-radius:10px;display:flex;opacity:1}.ne-image-preview-wrapper .ne-image-preview__caption{color:#101828;color:rgb(var(--neeto-editor-gray-800));line-height:1.5;margin-top:auto;text-align:center;width:100%}.ne-image-preview-wrapper .close-button{align-items:center;background-color:#fff;background-color:rgb(var(--neeto-editor-white));border-radius:999px;border-radius:var(--neeto-editor-rounded-full);cursor:pointer;display:flex;height:30px;inset-inline-end:12px;justify-content:center;position:absolute;top:12px;width:30px}.ne-image-preview-wrapper .image-preview{max-height:70%;max-width:70%}.ne-image-preview-wrapper__spinner{position:absolute}.ne-image-preview-wrapper__spinner i{background-color:#d8dcde;background-color:rgb(var(--neeto-editor-gray-300))}";
30
+ n(css,{});
31
+
32
+ var ImagePreview = function ImagePreview(_ref) {
33
+ var imagePreviewDetails = _ref.imagePreviewDetails,
34
+ setImagePreviewDetails = _ref.setImagePreviewDetails;
35
+ var _useState = useState(true),
36
+ _useState2 = _slicedToArray(_useState, 2),
37
+ isLoading = _useState2[0],
38
+ setIsLoading = _useState2[1];
39
+ var _useTranslation = useTranslation(),
40
+ t = _useTranslation.t;
41
+ var imagePreviewRef = useRef(null);
42
+ useOnClickOutside(imagePreviewRef, function () {
43
+ return setImagePreviewDetails(null);
44
+ }, {
45
+ enabled: true
46
+ });
47
+ useEffect(function () {
48
+ if (!imagePreviewRef.current) return;
49
+ imagePreviewRef.current.setAttribute("tabindex", "-1");
50
+ imagePreviewRef.current.focus();
51
+ }, []);
52
+ var handleKeyDown = function handleKeyDown(e) {
53
+ e.stopPropagation();
54
+ e.key === "Escape" && setImagePreviewDetails(null);
55
+ };
56
+ return /*#__PURE__*/createPortal(/*#__PURE__*/jsxs("div", {
57
+ className: "ne-image-preview-wrapper active",
58
+ children: [isLoading && /*#__PURE__*/jsx(Spinner, {
59
+ className: "ne-image-preview-wrapper__spinner"
60
+ }), !isLoading && /*#__PURE__*/jsx("div", {
61
+ className: "close-button",
62
+ children: /*#__PURE__*/jsx(Button, {
63
+ icon: Close,
64
+ style: "secondary",
65
+ onClick: function onClick() {
66
+ return setImagePreviewDetails(null);
67
+ }
68
+ })
69
+ }), /*#__PURE__*/jsxs("div", {
70
+ className: classnames("ne-image-preview", {
71
+ "image-loaded": !isLoading
72
+ }),
73
+ children: [/*#__PURE__*/jsx("img", {
74
+ alt: t("neetoEditor.editorContent.imagePreviewAltText"),
75
+ ref: imagePreviewRef,
76
+ src: imagePreviewDetails.src,
77
+ onKeyDown: handleKeyDown,
78
+ onLoad: function onLoad() {
79
+ return setIsLoading(false);
80
+ }
81
+ }), imagePreviewDetails && /*#__PURE__*/jsx("p", {
82
+ className: "ne-image-preview__caption",
83
+ children: imagePreviewDetails.caption
84
+ })]
85
+ })]
86
+ }), document.body);
87
+ };
88
+
89
+ var buildLinkSVG = function buildLinkSVG() {
90
+ var svgNS = "http://www.w3.org/2000/svg";
91
+ var svgWrapper = document.createElement("span");
92
+ svgWrapper.classList.add("header-link-icon-wrapper");
93
+ var svg = document.createElementNS(svgNS, "svg");
94
+ svg.setAttribute("aria-hidden", "true");
95
+ svg.setAttribute("height", "20");
96
+ svg.setAttribute("viewBox", "0 0 16 16");
97
+ svg.setAttribute("width", "20");
98
+ var path = document.createElementNS(svgNS, "path");
99
+ path.setAttribute("d", "M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z");
100
+ svg.appendChild(path);
101
+ svgWrapper.appendChild(svg);
102
+ return svgWrapper;
103
+ };
104
+ var convertTextToId = function convertTextToId(text) {
105
+ return text.trim().toLowerCase().replace(/[^a-z0-9\s]/g, "").replace(/\s+/g, "-");
106
+ };
107
+ var buildHeaderLinks = function buildHeaderLinks(editorContentNode) {
108
+ var headerTags = editorContentNode.querySelectorAll("h1, h2, h3, h4, h5, h6");
109
+ var usedIds = new Map();
110
+ headerTags.forEach(function (heading) {
111
+ if (heading.getAttribute("data-link") === "false") {
112
+ return;
113
+ }
114
+ var headingId = convertTextToId(heading.textContent);
115
+ if (usedIds.has(headingId)) {
116
+ var count = usedIds.get(headingId);
117
+ usedIds.set(headingId, count + 1);
118
+ headingId = "".concat(headingId, "-").concat(count);
119
+ } else usedIds.set(headingId, 1);
120
+ heading.setAttribute("id", headingId);
121
+ var wrapper = document.createElement("div");
122
+ var anchor = document.createElement("a");
123
+ wrapper.classList.add("header-wrapper");
124
+ anchor.setAttribute("href", "#".concat(headingId));
125
+ anchor.classList.add("header-wrapper__link");
126
+ anchor.appendChild(buildLinkSVG());
127
+ wrapper.appendChild(heading.cloneNode(true));
128
+ wrapper.appendChild(anchor);
129
+ heading.replaceWith(wrapper);
130
+ });
131
+ };
132
+
133
+ var handleTodoCheckboxClick = function handleTodoCheckboxClick(event, editorContentRef, onChange) {
134
+ if (!(event.target.type === "checkbox" && event.target.closest('ul[data-type="todoList"] li[data-type="taskItem"]'))) {
135
+ return;
136
+ }
137
+ var checkbox = event.target;
138
+ var listItem = checkbox.closest("li");
139
+ if (listItem) {
140
+ listItem.setAttribute("data-checked", checkbox.checked.toString());
141
+ if (checkbox.checked) {
142
+ checkbox.setAttribute("checked", "checked");
143
+ } else {
144
+ checkbox.removeAttribute("checked");
145
+ }
146
+ onChange === null || onChange === void 0 || onChange(editorContentRef === null || editorContentRef === void 0 ? void 0 : editorContentRef.innerHTML);
147
+ }
148
+ };
149
+ var syncTodoCheckboxStates = function syncTodoCheckboxStates(editorContentRef) {
150
+ if (!editorContentRef) return;
151
+ var todoItems = editorContentRef.querySelectorAll("ul[data-type=\"todoList\"] li[data-type=\"taskItem\"]");
152
+ todoItems.forEach(function (listItem) {
153
+ var isChecked = listItem.getAttribute("data-checked") === "true";
154
+ var checkbox = listItem.querySelector('input[type="checkbox"]');
155
+ if (checkbox) {
156
+ checkbox.checked = isChecked;
157
+ if (isChecked) {
158
+ checkbox.setAttribute("checked", "checked");
159
+ } else {
160
+ checkbox.removeAttribute("checked");
161
+ }
162
+ }
163
+ });
164
+ };
165
+
166
+ var _excluded = ["content", "variables", "className", "size", "configuration", "onChange", "onClick"];
167
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
168
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
169
+ var EditorContent = function EditorContent(_ref) {
170
+ var _ref$content = _ref.content,
171
+ content = _ref$content === void 0 ? "" : _ref$content,
172
+ _ref$variables = _ref.variables,
173
+ variables = _ref$variables === void 0 ? [] : _ref$variables,
174
+ className = _ref.className,
175
+ _ref$size = _ref.size,
176
+ size = _ref$size === void 0 ? EDITOR_SIZES.SMALL : _ref$size,
177
+ _ref$configuration = _ref.configuration,
178
+ configuration = _ref$configuration === void 0 ? EDITOR_CONTENT_DEFAULT_CONFIGURATION : _ref$configuration,
179
+ onChange = _ref.onChange,
180
+ onClick = _ref.onClick,
181
+ otherProps = _objectWithoutProperties(_ref, _excluded);
182
+ var _useState = useState(null),
183
+ _useState2 = _slicedToArray(_useState, 2),
184
+ imagePreviewDetails = _useState2[0],
185
+ setImagePreviewDetails = _useState2[1];
186
+ var editorContentRef = useRef(null);
187
+ var htmlContent = convertPlainTextToHtml(substituteVariables(applySyntaxHighlightingAndLineNumbers(removeEmptyTags(content)), variables));
188
+ var sanitize = DOMPurify.sanitize;
189
+ var handleContentClick = function handleContentClick(event) {
190
+ handleTodoCheckboxClick(event, editorContentRef.current, onChange);
191
+ onClick === null || onClick === void 0 || onClick(event);
192
+ };
193
+ var injectCopyButtonToCodeBlocks = function injectCopyButtonToCodeBlocks() {
194
+ var _editorContentRef$cur;
195
+ var preTags = (_editorContentRef$cur = editorContentRef.current) === null || _editorContentRef$cur === void 0 ? void 0 : _editorContentRef$cur.querySelectorAll(".".concat(EDITOR_CONTENT_CLASS_NAME, " pre"));
196
+ preTags.forEach(function (preTag) {
197
+ var button = document.createElement("div");
198
+ button.className = "neeto-editor-codeblock-options";
199
+ var root = createRoot(button);
200
+ root.render(/*#__PURE__*/jsx(CopyToClipboardButton, {
201
+ size: "small",
202
+ style: "tertiary",
203
+ value: preTag.textContent
204
+ }));
205
+ preTag.appendChild(button);
206
+ });
207
+ };
208
+ var bindImageClickListener = function bindImageClickListener() {
209
+ var _editorContentRef$cur2;
210
+ var figureTags = (_editorContentRef$cur2 = editorContentRef.current) === null || _editorContentRef$cur2 === void 0 ? void 0 : _editorContentRef$cur2.querySelectorAll(".".concat(EDITOR_CONTENT_CLASS_NAME, " figure"));
211
+ figureTags.forEach(function (figureTag) {
212
+ var image = figureTag.querySelector("img");
213
+ var link = figureTag.querySelector("a");
214
+ if (isNil(image) || isNil(link)) return;
215
+ figureTag.addEventListener("click", function (event) {
216
+ event.preventDefault();
217
+ var caption = figureTag.querySelector("figcaption").innerText;
218
+ setImagePreviewDetails({
219
+ src: image.src,
220
+ caption: caption
221
+ });
222
+ });
223
+ });
224
+ };
225
+ useEffect(function () {
226
+ injectCopyButtonToCodeBlocks();
227
+ bindImageClickListener();
228
+ syncTodoCheckboxStates(editorContentRef.current);
229
+ applyLineHighlighting(editorContentRef.current);
230
+ configuration.enableHeaderLinks && buildHeaderLinks(editorContentRef.current);
231
+ }, [content]);
232
+ return /*#__PURE__*/jsxs(Fragment, {
233
+ children: [/*#__PURE__*/jsx("div", _objectSpread({
234
+ "data-testid": "neeto-editor-content",
235
+ ref: editorContentRef,
236
+ className: classnames(EDITOR_CONTENT_CLASS_NAME, _defineProperty(_defineProperty({}, className, className), "neeto-editor-size--".concat(size), true)),
237
+ dangerouslySetInnerHTML: {
238
+ __html: sanitize(htmlContent, SANITIZE_OPTIONS)
239
+ },
240
+ onClick: handleContentClick
241
+ }, otherProps)), imagePreviewDetails && /*#__PURE__*/jsx(ImagePreview, {
242
+ imagePreviewDetails: imagePreviewDetails,
243
+ setImagePreviewDetails: setImagePreviewDetails
244
+ })]
245
+ });
246
+ };
247
+ var index = /*#__PURE__*/memo(EditorContent);
248
+
249
+ export { index as default };
250
+ //# sourceMappingURL=EditorContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorContent.js","sources":["../src/components/EditorContent/ImagePreview.jsx","../src/components/EditorContent/utils/headers.js","../src/components/EditorContent/utils/todoCheckbox.js","../src/components/EditorContent/index.jsx"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport { useOnClickOutside } from \"neetocommons/react-utils\";\nimport { Close } from \"neetoicons\";\nimport { Button, Spinner } from \"neetoui\";\nimport { createPortal } from \"react-dom\";\nimport { useTranslation } from \"react-i18next\";\n\nconst ImagePreview = ({ imagePreviewDetails, setImagePreviewDetails }) => {\n const [isLoading, setIsLoading] = useState(true);\n\n const { t } = useTranslation();\n\n const imagePreviewRef = useRef(null);\n\n useOnClickOutside(imagePreviewRef, () => setImagePreviewDetails(null), {\n enabled: true,\n });\n\n useEffect(() => {\n if (!imagePreviewRef.current) return;\n\n imagePreviewRef.current.setAttribute(\"tabindex\", \"-1\");\n imagePreviewRef.current.focus();\n }, []);\n\n const handleKeyDown = e => {\n e.stopPropagation();\n e.key === \"Escape\" && setImagePreviewDetails(null);\n };\n\n return createPortal(\n <div className=\"ne-image-preview-wrapper active\">\n {isLoading && <Spinner className=\"ne-image-preview-wrapper__spinner\" />}\n {!isLoading && (\n <div className=\"close-button\">\n <Button\n icon={Close}\n style=\"secondary\"\n onClick={() => setImagePreviewDetails(null)}\n />\n </div>\n )}\n <div\n className={classnames(\"ne-image-preview\", {\n \"image-loaded\": !isLoading,\n })}\n >\n <img\n alt={t(\"neetoEditor.editorContent.imagePreviewAltText\")}\n ref={imagePreviewRef}\n src={imagePreviewDetails.src}\n onKeyDown={handleKeyDown}\n onLoad={() => setIsLoading(false)}\n />\n {imagePreviewDetails && (\n <p className=\"ne-image-preview__caption\">\n {imagePreviewDetails.caption}\n </p>\n )}\n </div>\n </div>,\n document.body\n );\n};\n\nexport default ImagePreview;\n","const buildLinkSVG = () => {\n const svgNS = \"http://www.w3.org/2000/svg\";\n\n const svgWrapper = document.createElement(\"span\");\n svgWrapper.classList.add(\"header-link-icon-wrapper\");\n const svg = document.createElementNS(svgNS, \"svg\");\n svg.setAttribute(\"aria-hidden\", \"true\");\n svg.setAttribute(\"height\", \"20\");\n svg.setAttribute(\"viewBox\", \"0 0 16 16\");\n svg.setAttribute(\"width\", \"20\");\n\n const path = document.createElementNS(svgNS, \"path\");\n path.setAttribute(\n \"d\",\n \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n );\n\n svg.appendChild(path);\n svgWrapper.appendChild(svg);\n\n return svgWrapper;\n};\n\nconst convertTextToId = text =>\n text\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9\\s]/g, \"\")\n .replace(/\\s+/g, \"-\");\n\nexport const buildHeaderLinks = editorContentNode => {\n const headerTags = editorContentNode.querySelectorAll(\n \"h1, h2, h3, h4, h5, h6\"\n );\n const usedIds = new Map();\n\n headerTags.forEach(heading => {\n if (heading.getAttribute(\"data-link\") === \"false\") {\n return;\n }\n\n let headingId = convertTextToId(heading.textContent);\n if (usedIds.has(headingId)) {\n const count = usedIds.get(headingId);\n usedIds.set(headingId, count + 1);\n headingId = `${headingId}-${count}`;\n } else usedIds.set(headingId, 1);\n\n heading.setAttribute(\"id\", headingId);\n\n const wrapper = document.createElement(\"div\");\n const anchor = document.createElement(\"a\");\n\n wrapper.classList.add(\"header-wrapper\");\n anchor.setAttribute(\"href\", `#${headingId}`);\n anchor.classList.add(\"header-wrapper__link\");\n anchor.appendChild(buildLinkSVG());\n\n wrapper.appendChild(heading.cloneNode(true));\n wrapper.appendChild(anchor);\n heading.replaceWith(wrapper);\n });\n};\n","export const handleTodoCheckboxClick = (event, editorContentRef, onChange) => {\n if (\n !(\n event.target.type === \"checkbox\" &&\n event.target.closest('ul[data-type=\"todoList\"] li[data-type=\"taskItem\"]')\n )\n ) {\n return;\n }\n\n const checkbox = event.target;\n const listItem = checkbox.closest(\"li\");\n\n if (listItem) {\n listItem.setAttribute(\"data-checked\", checkbox.checked.toString());\n\n if (checkbox.checked) {\n checkbox.setAttribute(\"checked\", \"checked\");\n } else {\n checkbox.removeAttribute(\"checked\");\n }\n\n onChange?.(editorContentRef?.innerHTML);\n }\n};\n\nexport const syncTodoCheckboxStates = editorContentRef => {\n if (!editorContentRef) return;\n\n const todoItems = editorContentRef.querySelectorAll(\n `ul[data-type=\"todoList\"] li[data-type=\"taskItem\"]`\n );\n\n todoItems.forEach(listItem => {\n const isChecked = listItem.getAttribute(\"data-checked\") === \"true\";\n const checkbox = listItem.querySelector('input[type=\"checkbox\"]');\n\n if (checkbox) {\n checkbox.checked = isChecked;\n\n if (isChecked) {\n checkbox.setAttribute(\"checked\", \"checked\");\n } else {\n checkbox.removeAttribute(\"checked\");\n }\n }\n });\n};\n","import { memo, useEffect, useRef, useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport DOMPurify from \"dompurify\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { isNil } from \"ramda\";\nimport { createRoot } from \"react-dom/client\";\n\nimport { EDITOR_SIZES } from \"src/common/constants\";\nimport \"src/styles/editor/editor-content.scss\";\nimport { removeEmptyTags } from \"utils\";\n\nimport {\n EDITOR_CONTENT_CLASS_NAME,\n EDITOR_CONTENT_DEFAULT_CONFIGURATION,\n SANITIZE_OPTIONS,\n} from \"./constants\";\nimport ImagePreview from \"./ImagePreview\";\nimport {\n substituteVariables,\n applyLineHighlighting,\n applySyntaxHighlightingAndLineNumbers,\n convertPlainTextToHtml,\n} from \"./utils\";\nimport { buildHeaderLinks } from \"./utils/headers\";\nimport {\n handleTodoCheckboxClick,\n syncTodoCheckboxStates,\n} from \"./utils/todoCheckbox\";\n\nconst EditorContent = ({\n content = \"\",\n variables = [],\n className,\n size = EDITOR_SIZES.SMALL,\n configuration = EDITOR_CONTENT_DEFAULT_CONFIGURATION,\n onChange,\n onClick,\n ...otherProps\n}) => {\n const [imagePreviewDetails, setImagePreviewDetails] = useState(null);\n const editorContentRef = useRef(null);\n\n const htmlContent = convertPlainTextToHtml(\n substituteVariables(\n applySyntaxHighlightingAndLineNumbers(removeEmptyTags(content)),\n variables\n )\n );\n const sanitize = DOMPurify.sanitize;\n\n const handleContentClick = event => {\n handleTodoCheckboxClick(event, editorContentRef.current, onChange);\n\n onClick?.(event);\n };\n\n const injectCopyButtonToCodeBlocks = () => {\n const preTags = editorContentRef.current?.querySelectorAll(\n `.${EDITOR_CONTENT_CLASS_NAME} pre`\n );\n\n preTags.forEach(preTag => {\n const button = document.createElement(\"div\");\n button.className = \"neeto-editor-codeblock-options\";\n const root = createRoot(button);\n root.render(\n <CopyToClipboardButton\n size=\"small\"\n style=\"tertiary\"\n value={preTag.textContent}\n />\n );\n preTag.appendChild(button);\n });\n };\n\n const bindImageClickListener = () => {\n const figureTags = editorContentRef.current?.querySelectorAll(\n `.${EDITOR_CONTENT_CLASS_NAME} figure`\n );\n\n figureTags.forEach(figureTag => {\n const image = figureTag.querySelector(\"img\");\n const link = figureTag.querySelector(\"a\");\n if (isNil(image) || isNil(link)) return;\n\n figureTag.addEventListener(\"click\", event => {\n event.preventDefault();\n const caption = figureTag.querySelector(\"figcaption\").innerText;\n setImagePreviewDetails({ src: image.src, caption });\n });\n });\n };\n\n useEffect(() => {\n injectCopyButtonToCodeBlocks();\n bindImageClickListener();\n syncTodoCheckboxStates(editorContentRef.current);\n applyLineHighlighting(editorContentRef.current);\n configuration.enableHeaderLinks &&\n buildHeaderLinks(editorContentRef.current);\n }, [content]);\n\n return (\n <>\n <div\n data-testid=\"neeto-editor-content\"\n ref={editorContentRef}\n className={classnames(EDITOR_CONTENT_CLASS_NAME, {\n [className]: className,\n [`neeto-editor-size--${size}`]: true,\n })}\n dangerouslySetInnerHTML={{\n __html: sanitize(htmlContent, SANITIZE_OPTIONS),\n }}\n onClick={handleContentClick}\n {...otherProps}\n />\n {imagePreviewDetails && (\n <ImagePreview {...{ imagePreviewDetails, setImagePreviewDetails }} />\n )}\n </>\n );\n};\n\nexport default memo(EditorContent);\n"],"names":["ImagePreview","_ref","imagePreviewDetails","setImagePreviewDetails","_useState","useState","_useState2","_slicedToArray","isLoading","setIsLoading","_useTranslation","useTranslation","t","imagePreviewRef","useRef","useOnClickOutside","enabled","useEffect","current","setAttribute","focus","handleKeyDown","e","stopPropagation","key","createPortal","_jsxs","className","children","_jsx","Spinner","Button","icon","Close","style","onClick","classnames","alt","ref","src","onKeyDown","onLoad","caption","document","body","buildLinkSVG","svgNS","svgWrapper","createElement","classList","add","svg","createElementNS","path","appendChild","convertTextToId","text","trim","toLowerCase","replace","buildHeaderLinks","editorContentNode","headerTags","querySelectorAll","usedIds","Map","forEach","heading","getAttribute","headingId","textContent","has","count","get","set","concat","wrapper","anchor","cloneNode","replaceWith","handleTodoCheckboxClick","event","editorContentRef","onChange","target","type","closest","checkbox","listItem","checked","toString","removeAttribute","innerHTML","syncTodoCheckboxStates","todoItems","isChecked","querySelector","EditorContent","_ref$content","content","_ref$variables","variables","_ref$size","size","EDITOR_SIZES","SMALL","_ref$configuration","configuration","EDITOR_CONTENT_DEFAULT_CONFIGURATION","otherProps","_objectWithoutProperties","_excluded","htmlContent","convertPlainTextToHtml","substituteVariables","applySyntaxHighlightingAndLineNumbers","removeEmptyTags","sanitize","DOMPurify","handleContentClick","injectCopyButtonToCodeBlocks","_editorContentRef$cur","preTags","EDITOR_CONTENT_CLASS_NAME","preTag","button","root","createRoot","render","CopyToClipboardButton","value","bindImageClickListener","_editorContentRef$cur2","figureTags","figureTag","image","link","isNil","addEventListener","preventDefault","innerText","applyLineHighlighting","enableHeaderLinks","_Fragment","_objectSpread","_defineProperty","dangerouslySetInnerHTML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AAA,qBAAqB,CAAC3D,gBAAgB,CAAChE,OAAO,CAAC;IAC/CyF,aAAa,CAACmC,iBAAiB,IAC7BlF,gBAAgB,CAACsB,gBAAgB,CAAChE,OAAO,CAAC;AAC9C,EAAA,CAAC,EAAE,CAACiF,OAAO,CAAC,CAAC;EAEb,oBACEzE,IAAA,CAAAqH,QAAA,EAAA;IAAAnH,QAAA,EAAA,cACEC,GAAA,CAAA,KAAA,EAAAmH,aAAA,CAAA;AACE,MAAA,aAAA,EAAY,sBAAsB;AAClC1G,MAAAA,GAAG,EAAE4C,gBAAiB;AACtBvD,MAAAA,SAAS,EAAES,UAAU,CAACuF,yBAAyB,EAAAsB,eAAA,CAAAA,eAAA,CAAA,EAAA,EAC5CtH,SAAS,EAAGA,SAAS,yBAAAgD,MAAA,CACC4B,IAAI,CAAA,EAAK,IAAI,CACrC,CAAE;AACH2C,MAAAA,uBAAuB,EAAE;AACvBC,QAAAA,MAAM,EAAE9B,QAAQ,CAACL,WAAW,EAAEoC,gBAAgB;OAC9C;AACFjH,MAAAA,OAAO,EAAEoF;KAAmB,EACxBV,UAAU,CACf,CAAC,EACD3G,mBAAmB,iBAClB2B,GAAA,CAAC7B,YAAY,EAAA;AAAOE,MAAAA,mBAAmB,EAAnBA,mBAAmB;AAAEC,MAAAA,sBAAsB,EAAtBA;AAAsB,KAAK,CACrE;AAAA,GACD,CAAC;AAEP,CAAC;AAED,YAAA,aAAekJ,IAAI,CAACpD,aAAa,CAAC;;;;"}
@@ -0,0 +1,199 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
+ import { memo, forwardRef } from 'react';
4
+ import { FastField } from 'formik';
5
+ import { noop } from '@bigbinary/neeto-cist';
6
+ import { path, pluck } from 'ramda';
7
+ import Editor from './Editor.js';
8
+ import { jsx } from 'react/jsx-runtime';
9
+ import '@babel/runtime/helpers/toConsumableArray';
10
+ import '@babel/runtime/helpers/slicedToArray';
11
+ import './chunk-sfpDYWCU.js';
12
+ import './chunk-C2dztUxs.js';
13
+ import 'i18next';
14
+ import '@bigbinary/neeto-icons/TextH1';
15
+ import '@bigbinary/neeto-icons/TextH2';
16
+ import '@bigbinary/neeto-icons/TextH3';
17
+ import '@bigbinary/neeto-icons/TextH4';
18
+ import '@bigbinary/neeto-icons/TextH5';
19
+ import '@bigbinary/neeto-icons/TextP';
20
+ import './chunk-Dq9G_Haj.js';
21
+ import './chunk-DNMH2cJJ.js';
22
+ import './chunk-DxGDZoUl.js';
23
+ import 'yup';
24
+ import 'tippy.js';
25
+ import 'react-dom';
26
+ import 'classnames';
27
+ import 'tippy.js/dist/svg-arrow.css';
28
+ import '@bigbinary/neeto-icons/Link';
29
+ import '@bigbinary/neeto-icons/Column';
30
+ import '@bigbinary/neeto-icons/Down';
31
+ import '@bigbinary/neetoui/Dropdown';
32
+ import 'react-i18next';
33
+ import '@bigbinary/neeto-icons/Close';
34
+ import '@bigbinary/neetoui/Button';
35
+ import '@bigbinary/neeto-commons-frontend/utils';
36
+ import '@bigbinary/neeto-icons/Check';
37
+ import '@bigbinary/neetoui/Label';
38
+ import '@bigbinary/neeto-icons/Quote';
39
+ import '@bigbinary/neeto-icons/Attachment';
40
+ import '@bigbinary/neeto-icons/CodeBlock';
41
+ import '@bigbinary/neeto-icons/Code';
42
+ import '@bigbinary/neeto-icons/Highlight';
43
+ import '@bigbinary/neeto-icons/TextBold';
44
+ import '@bigbinary/neeto-icons/TextCross';
45
+ import '@bigbinary/neeto-icons/TextItalic';
46
+ import '@bigbinary/neeto-icons/Underline';
47
+ import '@bigbinary/neeto-icons/ListDot';
48
+ import '@bigbinary/neeto-icons/ListNumber';
49
+ import '@bigbinary/neeto-icons/ImageUpload';
50
+ import '@bigbinary/neeto-icons/Video';
51
+ import '@bigbinary/neeto-icons/Undo';
52
+ import '@bigbinary/neeto-icons/Redo';
53
+ import '@bigbinary/neeto-icons/Email';
54
+ import '@bigbinary/neetoui/Avatar';
55
+ import '@bigbinary/neetoui/Typography';
56
+ import '@bigbinary/neeto-icons/Smiley';
57
+ import '@babel/runtime/helpers/asyncToGenerator';
58
+ import '@babel/runtime/helpers/classCallCheck';
59
+ import '@babel/runtime/helpers/createClass';
60
+ import '@babel/runtime/helpers/possibleConstructorReturn';
61
+ import '@babel/runtime/helpers/getPrototypeOf';
62
+ import '@babel/runtime/helpers/inherits';
63
+ import '@babel/runtime/regenerator';
64
+ import 'emoji-mart';
65
+ import 'axios';
66
+ import '@bigbinary/neeto-commons-frontend/react-utils';
67
+ import '@bigbinary/neeto-icons/Customize';
68
+ import '@bigbinary/neeto-icons/Refresh';
69
+ import '@bigbinary/neetoui/Input';
70
+ import 'react-colorful';
71
+ import '@bigbinary/neeto-image-uploader-frontend';
72
+ import '@bigbinary/neetoui/Modal';
73
+ import '@bigbinary/neetoui/Tab';
74
+ import '@bigbinary/neetoui/Toastr';
75
+ import './chunk-zRPC4lVr.js';
76
+ import 'zustand/shallow';
77
+ import 'zustand';
78
+ import './chunk-BFTU3MAI.js';
79
+ import '@bigbinary/neeto-icons/LeftAlign';
80
+ import '@bigbinary/neeto-icons/CenterAlign';
81
+ import '@bigbinary/neeto-icons/RightAlign';
82
+ import '@bigbinary/neeto-icons/Delete';
83
+ import '@bigbinary/neeto-icons/CustomSize';
84
+ import '@bigbinary/neeto-icons/BorderDisable';
85
+ import '@bigbinary/neeto-icons/BorderEnable';
86
+ import '@bigbinary/neeto-icons/AspectRatio11';
87
+ import '@bigbinary/neeto-icons/AspectRatio169';
88
+ import '@bigbinary/neeto-icons/AspectRatio916';
89
+ import '@bigbinary/neeto-icons/AspectRatio43';
90
+ import '@bigbinary/neeto-icons/AspectRatio32';
91
+ import '@bigbinary/neeto-commons-frontend/initializers';
92
+ import '@bigbinary/neetoui/Tooltip';
93
+ import '@bigbinary/neetoui/formik/Form';
94
+ import '@bigbinary/neetoui/formik/Input';
95
+ import '@bigbinary/neetoui/formik/ActionBlock';
96
+ import '@bigbinary/neetoui/Checkbox';
97
+ import '@bigbinary/neeto-icons/Checkbox';
98
+ import '@bigbinary/neeto-icons/File';
99
+ import '@bigbinary/neeto-icons/Flag';
100
+ import '@bigbinary/neeto-icons/misc/Info';
101
+ import '@bigbinary/neeto-icons/misc/Warning';
102
+ import '@bigbinary/neeto-icons/misc/Danger';
103
+ import '@bigbinary/neeto-icons/misc/Megaphone';
104
+ import '@bigbinary/neeto-icons/misc/Success';
105
+ import '@bigbinary/neeto-icons/MenuHorizontal';
106
+ import '@bigbinary/neeto-molecules/DynamicVariables';
107
+ import '@tippyjs/react';
108
+ import './chunk-BR5ZkH7J.js';
109
+ import '@tanstack/react-query';
110
+ import 'react-dom/server';
111
+ import 'yjs';
112
+ import '@bigbinary/neeto-molecules/CopyToClipboardButton';
113
+ import '@bigbinary/neetoui/Spinner';
114
+ import '@bigbinary/neeto-icons/AspectRatio';
115
+ import '@bigbinary/neeto-icons/Blockquote';
116
+ import '@bigbinary/neeto-icons/Minus';
117
+ import '@bigbinary/neeto-icons/Notes';
118
+ import '@bigbinary/neeto-icons/MessageSquare';
119
+ import '@bigbinary/neeto-molecules/Search';
120
+ import '@bigbinary/neetoui/Select';
121
+ import '@bigbinary/neeto-icons/DeleteRow';
122
+ import '@bigbinary/neeto-icons/DeleteColumn';
123
+ import '@bigbinary/neeto-icons/DeleteTable';
124
+ import '@bigbinary/neeto-icons/InsertRow';
125
+ import '@bigbinary/neeto-icons/InsertColumn';
126
+ import '@bigbinary/neeto-icons/MergeSplit';
127
+ import '@bigbinary/neeto-icons/ToggleHeaderRow';
128
+ import '@bigbinary/neeto-icons/Edit';
129
+ import '@bigbinary/neeto-icons/Articles';
130
+ import './chunk-CAGz17QN.js';
131
+ import '@bigbinary/neeto-commons-frontend/react-utils/useOnClickOutside';
132
+ import '@bigbinary/neeto-icons/MenuVertical';
133
+ import '@bigbinary/neetoui/Alert';
134
+
135
+ var _excluded = ["name", "onChange", "shouldUpdate", "attachments", "mentions", "variables"];
136
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
137
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
138
+ var FormikEditor = function FormikEditor(_ref, ref) {
139
+ var name = _ref.name,
140
+ _ref$onChange = _ref.onChange,
141
+ _onChange = _ref$onChange === void 0 ? noop : _ref$onChange,
142
+ shouldUpdate = _ref.shouldUpdate,
143
+ _ref$attachments = _ref.attachments,
144
+ attachments = _ref$attachments === void 0 ? [] : _ref$attachments,
145
+ _ref$mentions = _ref.mentions,
146
+ mentions = _ref$mentions === void 0 ? [] : _ref$mentions,
147
+ _ref$variables = _ref.variables,
148
+ variables = _ref$variables === void 0 ? [] : _ref$variables,
149
+ otherProps = _objectWithoutProperties(_ref, _excluded);
150
+ // Similar to the `shouldComponentUpdate` logic of FastField component.
151
+ // https://github.com/jaredpalmer/formik/blob/main/packages/formik/src/FastField.tsx#L75-L93
152
+ // Additionally calls the shouldUpdate function passed from the host application and compares to
153
+ // the rest of the values.
154
+ var internalShouldUpdate = function internalShouldUpdate(prevProps, nextProps) {
155
+ var prevFormikProps = prevProps.formik;
156
+ var nextFormikProps = nextProps.formik;
157
+ var pathParts = name.split(".");
158
+ var prevError = path(pathParts, prevFormikProps.errors);
159
+ var nextError = path(pathParts, nextFormikProps.errors);
160
+ var prevTouched = path(pathParts, prevFormikProps.touched);
161
+ var nextTouched = path(pathParts, nextFormikProps.touched);
162
+ var prevAttachments = pluck("signedId", prevProps.attachments).join("|");
163
+ var nextAttachments = pluck("signedId", nextProps.attachments).join("|");
164
+ return prevError !== nextError || prevTouched !== nextTouched || Object.keys(nextProps).length !== Object.keys(prevProps).length || prevFormikProps.isSubmitting !== nextFormikProps.isSubmitting || prevAttachments !== nextAttachments || Boolean(shouldUpdate === null || shouldUpdate === void 0 ? void 0 : shouldUpdate(prevProps, nextProps));
165
+ };
166
+ return /*#__PURE__*/jsx(FastField, {
167
+ attachments: attachments,
168
+ mentions: mentions,
169
+ name: name,
170
+ variables: variables,
171
+ shouldUpdate: internalShouldUpdate,
172
+ children: function children(_ref2) {
173
+ var field = _ref2.field,
174
+ form = _ref2.form,
175
+ meta = _ref2.meta;
176
+ return /*#__PURE__*/jsx(Editor, _objectSpread({
177
+ attachments: attachments,
178
+ mentions: mentions,
179
+ name: name,
180
+ ref: ref,
181
+ variables: variables,
182
+ error: meta.touched ? meta.error : "",
183
+ initialValue: field.value,
184
+ onBlur: function onBlur() {
185
+ form.setFieldTouched(name, true);
186
+ },
187
+ onChange: function onChange(value) {
188
+ form.setFieldValue(name, value);
189
+ _onChange === null || _onChange === void 0 || _onChange(value);
190
+ }
191
+ }, otherProps));
192
+ }
193
+ });
194
+ };
195
+ FormikEditor.displayName = "FormikNeetoEditor";
196
+ var FormikEditor_default = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(FormikEditor));
197
+
198
+ export { FormikEditor_default as default };
199
+ //# sourceMappingURL=FormikEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormikEditor.js","sources":["../src/components/Editor/FormikEditor.jsx"],"sourcesContent":["import { forwardRef, memo } from \"react\";\n\nimport { FastField } from \"formik\";\nimport { noop } from \"neetocist\";\nimport { path, pluck } from \"ramda\";\n\nimport Editor from \".\";\n\nconst FormikEditor = (\n {\n name,\n onChange = noop,\n shouldUpdate,\n attachments = [],\n mentions = [],\n variables = [],\n ...otherProps\n },\n ref\n) => {\n // Similar to the `shouldComponentUpdate` logic of FastField component.\n // https://github.com/jaredpalmer/formik/blob/main/packages/formik/src/FastField.tsx#L75-L93\n // Additionally calls the shouldUpdate function passed from the host application and compares to\n // the rest of the values.\n const internalShouldUpdate = (prevProps, nextProps) => {\n const prevFormikProps = prevProps.formik;\n const nextFormikProps = nextProps.formik;\n\n const pathParts = name.split(\".\");\n const prevError = path(pathParts, prevFormikProps.errors);\n const nextError = path(pathParts, nextFormikProps.errors);\n const prevTouched = path(pathParts, prevFormikProps.touched);\n const nextTouched = path(pathParts, nextFormikProps.touched);\n const prevAttachments = pluck(\"signedId\", prevProps.attachments).join(\"|\");\n const nextAttachments = pluck(\"signedId\", nextProps.attachments).join(\"|\");\n\n return (\n prevError !== nextError ||\n prevTouched !== nextTouched ||\n Object.keys(nextProps).length !== Object.keys(prevProps).length ||\n prevFormikProps.isSubmitting !== nextFormikProps.isSubmitting ||\n prevAttachments !== nextAttachments ||\n Boolean(shouldUpdate?.(prevProps, nextProps))\n );\n };\n\n return (\n <FastField\n {...{ attachments, mentions, name, variables }}\n shouldUpdate={internalShouldUpdate}\n >\n {({ field, form, meta }) => (\n <Editor\n {...{ attachments, mentions, name, ref, variables }}\n error={meta.touched ? meta.error : \"\"}\n initialValue={field.value}\n onBlur={() => {\n form.setFieldTouched(name, true);\n }}\n onChange={value => {\n form.setFieldValue(name, value);\n onChange?.(value);\n }}\n {...otherProps}\n />\n )}\n </FastField>\n );\n};\n\nFormikEditor.displayName = \"FormikNeetoEditor\";\n\nexport default memo(forwardRef(FormikEditor));\n"],"names":["FormikEditor","_ref","ref","name","_ref$onChange","onChange","noop","shouldUpdate","_ref$attachments","attachments","_ref$mentions","mentions","_ref$variables","variables","otherProps","_objectWithoutProperties","_excluded","internalShouldUpdate","prevProps","nextProps","prevFormikProps","formik","nextFormikProps","pathParts","split","prevError","path","errors","nextError","prevTouched","touched","nextTouched","prevAttachments","pluck","join","nextAttachments","Object","keys","length","isSubmitting","Boolean","_jsx","FastField","children","_ref2","field","form","meta","Editor","_objectSpread","error","initialValue","value","onBlur","set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