@yoopta/editor 1.9.0-rc

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 (39) hide show
  1. package/README.md +99 -0
  2. package/dist/YoptaEditor.d.ts +4 -0
  3. package/dist/components/Editor/Editor.d.ts +15 -0
  4. package/dist/components/Editor/TextLeaf/TextLeaf.d.ts +9 -0
  5. package/dist/components/Editor/constants.d.ts +16 -0
  6. package/dist/components/Editor/plugins/deleteFragment.d.ts +2 -0
  7. package/dist/components/Editor/plugins/nonEmptyEditor.d.ts +2 -0
  8. package/dist/components/Editor/plugins/pasteHtml.d.ts +3 -0
  9. package/dist/components/Editor/plugins/shortcuts.d.ts +2 -0
  10. package/dist/components/Editor/plugins/voids.d.ts +2 -0
  11. package/dist/components/Editor/utils.d.ts +6 -0
  12. package/dist/components/ElementOptions/ElementOptions.d.ts +18 -0
  13. package/dist/components/ElementOptions/Overlay.d.ts +7 -0
  14. package/dist/components/ElementWrapper/ElementActions.d.ts +12 -0
  15. package/dist/components/ElementWrapper/ElementWrapper.d.ts +12 -0
  16. package/dist/components/LinkInput/index.d.ts +8 -0
  17. package/dist/components/NoSsr/NoSsr.d.ts +7 -0
  18. package/dist/components/YoptaEditor/YoptaEditor.d.ts +31 -0
  19. package/dist/contexts/NodeSettingsContext/NodeSettingsContext.d.ts +26 -0
  20. package/dist/contexts/YoptaEditor/YoptaContext.d.ts +28 -0
  21. package/dist/hooks/useDragDrop.d.ts +25 -0
  22. package/dist/hooks/useHover.d.ts +2 -0
  23. package/dist/hooks/useIntersetionObserver.d.ts +12 -0
  24. package/dist/hooks/useScrollToElement.d.ts +1 -0
  25. package/dist/index.d.ts +38 -0
  26. package/dist/index.js +13 -0
  27. package/dist/types/eventHandlers.d.ts +104 -0
  28. package/dist/types.d.ts +24 -0
  29. package/dist/utils/deepClone.d.ts +1 -0
  30. package/dist/utils/deserializeHTML.d.ts +4 -0
  31. package/dist/utils/generateId.d.ts +1 -0
  32. package/dist/utils/hotkeys.d.ts +41 -0
  33. package/dist/utils/marks.d.ts +13 -0
  34. package/dist/utils/nodes.d.ts +5 -0
  35. package/dist/utils/plugins.d.ts +64 -0
  36. package/dist/utils/serializeHTML.d.ts +2 -0
  37. package/dist/utils/storage.d.ts +6 -0
  38. package/dist/utils/validate.d.ts +1 -0
  39. package/package.json +74 -0
package/README.md ADDED
@@ -0,0 +1,99 @@
1
+ <h2 align="center">Yopta-Editor v1 🎉</h2>
2
+ <p align="center">Yopta-Editor - is an open source notion-like editor 💥</p>
3
+ <div align="center">
4
+ <img width="574" alt="Screen Shot 2023-01-25 at 16 04 29" src="https://user-images.githubusercontent.com/29093118/215324525-882bf403-646c-4267-bb5f-c0f37509ac09.png">
5
+ </div>
6
+
7
+ <div align="center">
8
+
9
+ </div>
10
+
11
+ <p align="center">
12
+ <a target="_blank" rel="noopener noreferrer" href="https://yopage.co/blog/0zntIA46L4/W0epdDpnRa">Full docs</a> |
13
+ <a target="_blank" rel="noopener noreferrer" href="https://yopage.co/blog/0zntIA46L4/qOQqVaxxRZ">Get started</a> |
14
+ <a target="_blank" rel="noopener noreferrer" href="https://yopage.co/blog/0zntIA46L4/kUoZ2DoHnG">API</a> |
15
+ <a target="_blank" rel="noopener noreferrer" href="https://yopage.co/blog/0zntIA46L4/qo9nK4lDG5">FAQs</a> |
16
+ <a target="_blank" rel="noopener noreferrer" href="https://yoopta-editor.vercel.app/basic">Examples</a>
17
+ </p>
18
+
19
+ ### Features
20
+
21
+ - Triggering by "/" to show list of elements and search needed element by typing
22
+ - Drag and drop beetween elements
23
+ - Redo/Undo your changes (Ctrl-Z/Ctrl-V)
24
+ - Offline ready mode
25
+ - Shortcuts
26
+ - A cool representation of the data in JSON format, so you can easily save the content data to the database and validate
27
+ You can import two plugins from library: `<YoptaEditor />` and `<YoptaRender />`. <br>
28
+ `<YoptaEditor />` - it's for building beautiful content <br>
29
+ `<YoptaRender />` - it's just for rendering from your saved data, without any editor tools and libraries, so it make you page loading faster
30
+ - Custom styling
31
+ ...and other
32
+
33
+ ### Install
34
+
35
+ yarn add yoopta-editor
36
+ or
37
+ npm install yoopta-editor
38
+
39
+ ### Peer dependencies
40
+
41
+ yarn add react react-dom slate slate-react
42
+ or
43
+ npm install react react-dom slate slate-react
44
+
45
+ ### Quickstart
46
+
47
+ ```jsx
48
+ import { YoptaEditor } from '@yoopta/editor';
49
+ import { useState } from 'react';
50
+
51
+ import 'yoopta-editor/dist/index.css';
52
+
53
+ function App() {
54
+ const [editorValue, setEditorValue] = useState([]);
55
+
56
+ const onChange = (data) => setEditorValue(data);
57
+
58
+ return (
59
+ <div>
60
+ <YoptaEditor value={editorValue} onChange={onChange} />
61
+ </div>
62
+ );
63
+ }
64
+ ```
65
+
66
+ ### Check out other DEMO's 👇
67
+
68
+ - <a target="_blank" rel="noopener noreferrer" href="https://yoopta-editor.vercel.app/basic">Basic usage</a>
69
+ - <a target="_blank" rel="noopener noreferrer" href="https://yoopta-editor.vercel.app/offline">Offline mode</a>
70
+ - <a target="_blank" rel="noopener noreferrer" href="https://yoopta-editor.vercel.app/media">Working with media</a>
71
+ - <a target="_blank" rel="noopener noreferrer" href="https://yoopta-editor.vercel.app/render">Just rendering</a>
72
+ - <a target="_blank" rel="noopener noreferrer" href="https://yoopta-editor.vercel.app/styling">Custom styling</a>
73
+ <br>
74
+ <br>
75
+
76
+ <div style="padding: 10px">❗ Yopta-Editor is on <span style="color: #007aff">BETA</span> version now. The core functionality works, but you may encounter some bugs.
77
+ I have big plans for the v2 version with a lot of cool features and improvements.
78
+ Let's build together the best open source editor ever ☝ <br>
79
+ Read more about future plans <a target="_blank" rel="noopener noreferrer" href="https://yopage.co/blog/0zntIA46L4/5iK8VNiBI8">"What's next Lebovski?"</a>
80
+ </div>
81
+ <br>
82
+ <div style="padding: 10px; marging: 10px">
83
+ 📝 This WYSIWYG editor build on top of <a target="_blank" rel="noopener noreferrer" href="https://github.com/ianstormtaylor/slate">Slate JS framework</a> <br>
84
+ 💙 SlateJS - is the best tool for building rich-text editors. It has beautiful design and great API
85
+ </div>
86
+
87
+ ## Donation.
88
+
89
+ ### If you like this open source project you can support me using <a href="https://buy.stripe.com/9AQcQo6G57dyexGeUU">Stripe link</a> 💙
90
+
91
+ ### Used by
92
+
93
+ - <a href="https://tapflow.co/">Tapflow - The perfect tool for building and selling online courses</a>
94
+ - <a href="https://equalize.team">Equalize.team</a>
95
+ - <a href="https://yopage.co/">Yopage.co - blogging platform</a>
96
+
97
+ ### License
98
+
99
+ MIT LICENSE
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { YoptaEditorProps } from './components/YoptaEditor/YoptaEditor';
3
+ declare const YoptaEditor: (props: YoptaEditorProps) => JSX.Element;
4
+ export { YoptaEditor };
@@ -0,0 +1,15 @@
1
+ import { ReactNode } from 'react';
2
+ import { ParentYoptaPlugin, YoptaPluginType } from '../../utils/plugins';
3
+ import { YoptaMark } from '../../utils/marks';
4
+ import { YoEditor, YoptaBaseElement } from '../../types';
5
+ type YoptaProps = {
6
+ editor: YoEditor;
7
+ placeholder?: string;
8
+ readOnly?: boolean;
9
+ plugins: ParentYoptaPlugin[];
10
+ children: ReactNode | ReactNode[];
11
+ marks: YoptaMark[];
12
+ PLUGINS_MAP: Record<YoptaBaseElement<string>['type'], YoptaPluginType<any, YoptaBaseElement<string>>>;
13
+ };
14
+ declare const EditorYopta: ({ editor, placeholder, marks, readOnly, children, plugins, PLUGINS_MAP }: YoptaProps) => JSX.Element;
15
+ export { EditorYopta };
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { RenderLeafProps } from 'slate-react';
3
+ import { YoptaPluginType } from '../../../utils/plugins';
4
+ type LeafProps = RenderLeafProps & {
5
+ placeholder?: YoptaPluginType['placeholder'];
6
+ leaf: any;
7
+ };
8
+ declare const TextLeaf: import("react").MemoExoticComponent<({ attributes, children, placeholder, leaf }: LeafProps) => JSX.Element>;
9
+ export { TextLeaf };
@@ -0,0 +1,16 @@
1
+ export declare const ELEMENT_TYPES_MAP: {
2
+ 'block-quote': string;
3
+ 'bulleted-list': string;
4
+ 'numbered-list': string;
5
+ 'list-item': string;
6
+ 'heading-one': string;
7
+ 'heading-two': string;
8
+ 'heading-three': string;
9
+ link: string;
10
+ image: string;
11
+ video: string;
12
+ paragraph: string;
13
+ callout: string;
14
+ code: string;
15
+ embed: string;
16
+ };
@@ -0,0 +1,2 @@
1
+ import { YoEditor } from '../../../types';
2
+ export declare const withDeleteFragment: (editor: YoEditor) => YoEditor;
@@ -0,0 +1,2 @@
1
+ import { YoEditor } from '../../../types';
2
+ export declare const withNonEmptyEditor: (editor: YoEditor) => YoEditor;
@@ -0,0 +1,3 @@
1
+ import { YoEditor } from '../../../types';
2
+ declare const withHtml: (editor: YoEditor) => YoEditor;
3
+ export { withHtml };
@@ -0,0 +1,2 @@
1
+ import { YoEditor } from '../../../types';
2
+ export declare const withShortcuts: (editor: YoEditor) => YoEditor;
@@ -0,0 +1,2 @@
1
+ import { YoEditor } from '../../../types';
2
+ export declare const withVoidNodes: (editor: YoEditor) => YoEditor;
@@ -0,0 +1,6 @@
1
+ import { YoptaBaseElement } from '../../types';
2
+ import { YoptaPluginType, YoptaRenderElementFunc } from '../../utils/plugins';
3
+ export declare const getDefaultParagraphLine: (id: string) => YoptaBaseElement<'paragraph'>;
4
+ export declare function getRenderFunctionFactory(plugin: YoptaPluginType): YoptaRenderElementFunc;
5
+ export declare function isElementHasText(element: YoptaBaseElement<string>): boolean;
6
+ export declare function toggleMark(editor: any, mark: any, only?: boolean): void;
@@ -0,0 +1,18 @@
1
+ import { CSSProperties, MouseEvent, ReactNode } from 'react';
2
+ type RenderProps = {
3
+ handleDelete?: () => void;
4
+ handleDuplicate?: () => void;
5
+ handleCopy?: () => void;
6
+ };
7
+ type Props = {
8
+ style: CSSProperties | undefined;
9
+ onClose: (e?: MouseEvent) => void;
10
+ additionalFields?: any;
11
+ element: any;
12
+ render?: (props: RenderProps) => ReactNode;
13
+ onDelete?: () => void;
14
+ onDuplicate?: () => void;
15
+ onCopy?: () => void;
16
+ };
17
+ declare const ElementOptions: ({ onClose, style, element, render, ...props }: Props) => JSX.Element;
18
+ export { ElementOptions };
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ type Props = {
3
+ onClose: () => void;
4
+ children: ReactNode;
5
+ };
6
+ declare const Overlay: ({ children, onClose }: Props) => import("react").ReactPortal;
7
+ export { Overlay };
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { NodeSettingsContextHandlers, NodeSettingsContextValues } from '../../contexts/NodeSettingsContext/NodeSettingsContext';
3
+ import { Editor } from 'slate';
4
+ import { YoptaBaseElement } from '../../types';
5
+ type Props = {
6
+ editor: Editor;
7
+ element: YoptaBaseElement<string>;
8
+ values: NodeSettingsContextValues;
9
+ handlers: NodeSettingsContextHandlers;
10
+ };
11
+ declare const ElementActions: ({ element, editor, values, handlers }: Props) => JSX.Element;
12
+ export { ElementActions };
@@ -0,0 +1,12 @@
1
+ import { ReactElement } from 'react';
2
+ import { RenderElementProps } from 'slate-react';
3
+ import { YoptaElementConfig } from '../../types';
4
+ type Props = RenderElementProps & {
5
+ nodeType: YoptaElementConfig['nodeType'];
6
+ render: (props: RenderElementProps) => ReactElement;
7
+ };
8
+ declare const ElementWrapper: {
9
+ ({ children, element, attributes, nodeType, render }: Props): JSX.Element;
10
+ displayName: string;
11
+ };
12
+ export { ElementWrapper };
@@ -0,0 +1,8 @@
1
+ declare const LinkInput: ({ onClose, linkUrl, onRemove, onAdd, placeholder }: {
2
+ onClose: any;
3
+ linkUrl: any;
4
+ onRemove: any;
5
+ onAdd: any;
6
+ placeholder: any;
7
+ }) => JSX.Element;
8
+ export { LinkInput };
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ type Props = {
3
+ children: ReactNode;
4
+ fallback?: any;
5
+ };
6
+ declare const NoSSR: ({ children, fallback }: Props) => any;
7
+ export default NoSSR;
@@ -0,0 +1,31 @@
1
+ import { Key, ReactNode } from 'react';
2
+ import { Descendant } from 'slate';
3
+ import { YoptaMark } from '../../utils/marks';
4
+ import { YoptaPlugin } from '../../utils/plugins';
5
+ import { LOCAL_STORAGE_NAME_TYPE } from '../../utils/storage';
6
+ export type YoptaNodeElementSettings = {
7
+ options?: {
8
+ handlers?: {
9
+ onCopy?: () => void;
10
+ onDelete?: () => void;
11
+ onDuplicate?: () => void;
12
+ };
13
+ };
14
+ drag?: boolean;
15
+ plus?: boolean;
16
+ };
17
+ export type YoptaEditorProps = {
18
+ onChange: (_value: Descendant[]) => void;
19
+ value: Descendant[];
20
+ key?: Key;
21
+ placeholder?: string;
22
+ plugins: YoptaPlugin<any, any>[];
23
+ children: ReactNode | ReactNode[];
24
+ readOnly?: boolean;
25
+ autoFocus?: boolean;
26
+ shouldStoreInLocalStorage?: LOCAL_STORAGE_NAME_TYPE;
27
+ marks: YoptaMark[];
28
+ nodeElementSettings: YoptaNodeElementSettings;
29
+ };
30
+ declare const YoptaEditor: ({ key, value, plugins, marks, readOnly, children, onChange, placeholder, autoFocus, shouldStoreInLocalStorage, }: YoptaEditorProps) => JSX.Element;
31
+ export { YoptaEditor };
@@ -0,0 +1,26 @@
1
+ import { CSSProperties, MouseEvent, ReactNode } from 'react';
2
+ import { YoptaBaseElement } from '../../types';
3
+ import { DragDropValues, DragDropHandlers } from '../../hooks/useDragDrop';
4
+ export type HoveredElement = YoptaBaseElement<string> | null;
5
+ export type NodeSettingsContextValues = DragDropValues & {
6
+ hoveredElement: HoveredElement;
7
+ isElementOptionsOpen: boolean;
8
+ nodeSettingsPos?: CSSProperties | null;
9
+ };
10
+ export type NodeSettingsContextHandlers = DragDropHandlers & {
11
+ openNodeSettings: (_dragRef: any, _node: HoveredElement) => void;
12
+ closeNodeSettings: () => void;
13
+ hoverIn: (_e: MouseEvent<HTMLDivElement>, _node: YoptaBaseElement<string>) => void;
14
+ triggerPlusButton: (_node: HoveredElement) => void;
15
+ deleteNode: () => void;
16
+ duplicateNode: () => void;
17
+ copyLinkNode: () => void;
18
+ changeHoveredNode: (_hoveredProps: HoveredElement) => void;
19
+ };
20
+ export type NodeSettingsContextType = [NodeSettingsContextValues, NodeSettingsContextHandlers];
21
+ type NodeSettingsProps = {
22
+ children: ReactNode;
23
+ };
24
+ declare const NodeSettingsProvider: ({ children }: NodeSettingsProps) => JSX.Element;
25
+ declare const useElementSettings: () => NodeSettingsContextType;
26
+ export { NodeSettingsProvider, useElementSettings };
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ import { YoptaBaseElement } from '../../types';
3
+ import { YoptaPlugin, YoptaPluginType } from '../../utils/plugins';
4
+ import { YoptaMark } from '../../utils/marks';
5
+ export type HoveredElement = YoptaBaseElement<string> | null;
6
+ export type YoptaContextValues = {
7
+ marks: MarksMap;
8
+ plugins: PluginsMap;
9
+ };
10
+ export type YoptaContextHandlers = {};
11
+ export type YoptaContextType = YoptaContextValues;
12
+ type NodeSettingsProps = {
13
+ children: ReactNode;
14
+ plugins: YoptaPlugin<any, any>[];
15
+ marks: YoptaMark[];
16
+ };
17
+ type PluginsMap = Record<string, Pick<YoptaPluginType, 'type' | 'createElement' | 'defineElement'>>;
18
+ type MarksMap = {
19
+ [x: string]: {
20
+ toggle: (options?: {
21
+ only: boolean;
22
+ }) => void;
23
+ isActive: boolean;
24
+ };
25
+ };
26
+ declare const YoptaContextProvider: ({ children, plugins: pluginList, marks: markList }: NodeSettingsProps) => JSX.Element;
27
+ declare const useYopta: () => YoptaContextValues;
28
+ export { YoptaContextProvider, useYopta };
@@ -0,0 +1,25 @@
1
+ import { DragEvent } from 'react';
2
+ import { Node, NodeEntry } from 'slate';
3
+ import { YoEditor, YoptaBaseElement } from '../types';
4
+ export type DraggedNode = {
5
+ path: number[] | null;
6
+ element: Pick<YoptaBaseElement<string>, 'id' | 'type'> | null;
7
+ parent: NodeEntry<Node> | null;
8
+ };
9
+ export type DndState = {
10
+ from: DraggedNode;
11
+ to: DraggedNode;
12
+ };
13
+ export type DragDropValues = {
14
+ dndState: DndState;
15
+ disableWhileDrag: boolean;
16
+ DRAG_MAP: Map<YoptaBaseElement<string>['id'], YoptaBaseElement<string>>;
17
+ };
18
+ export type DragDropHandlers = {
19
+ onDrop: (_e: DragEvent<HTMLDivElement>) => void;
20
+ onDragEnter: (_e: DragEvent<HTMLDivElement>) => void;
21
+ onDragEnd: (_e: any) => void;
22
+ onDragStart: (_e: any, from: DraggedNode) => void;
23
+ };
24
+ export declare const DEFAULT_DRAG_STATE: DndState;
25
+ export declare const useDragDrop: (editor: YoEditor) => [DragDropValues, DragDropHandlers];
@@ -0,0 +1,2 @@
1
+ import { RefObject } from 'react';
2
+ export declare function useHover<T extends HTMLElement>(): [RefObject<T>, boolean];
@@ -0,0 +1,12 @@
1
+ /**
2
+ *
3
+ * @param {DOM Ref} elementRef - DOM ref for checking the intersection
4
+ * @param {Observer Params} - https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
5
+ * @returns {IntersectionObserverEntry} - https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry
6
+ */
7
+ export declare function useIntersectionObserver(elementRef: any, { threshold, root, rootMargin, freezeOnceVisible }?: {
8
+ threshold?: number | undefined;
9
+ root?: null | undefined;
10
+ rootMargin?: string | undefined;
11
+ freezeOnceVisible?: boolean | undefined;
12
+ }): IntersectionObserverEntry | Record<string, unknown>;
@@ -0,0 +1 @@
1
+ export declare const useScrollToElement: () => null;
@@ -0,0 +1,38 @@
1
+ /// <reference types="react" />
2
+ import { YoptaPlugin, mergePlugins, createYoptaPlugin } from './utils/plugins';
3
+ import classnames from 'classnames';
4
+ import { useElementSettings } from './contexts/NodeSettingsContext/NodeSettingsContext';
5
+ export { classnames as cx };
6
+ export { isKeyHotkey, isHotkey, isCodeHotkey } from 'is-hotkey';
7
+ export { YoptaEditor } from './YoptaEditor';
8
+ export { isValidYoptaNodes } from './utils/validate';
9
+ export { generateId } from './utils/generateId';
10
+ export { HOTKEYS } from './utils/hotkeys';
11
+ export { useYopta } from './contexts/YoptaEditor/YoptaContext';
12
+ export { deepClone } from './utils/deepClone';
13
+ export { createYoptaMark } from './utils/marks';
14
+ export { isElementActive, getElementByPath } from './utils/nodes';
15
+ export type { YoptaPluginType, YoptaPluginEventHandlers, HandlersOptions } from './utils/plugins';
16
+ export type { YoptaMarksConfig, YoptaMark } from './utils/marks';
17
+ export type { YoEditor, RenderElementProps, YoptaBaseElement, Modify } from './types';
18
+ declare const UI_HELPERS: {
19
+ ElementOptions: ({ onClose, style, element, render, ...props }: {
20
+ style: import("react").CSSProperties | undefined;
21
+ onClose: (e?: import("react").MouseEvent<Element, MouseEvent> | undefined) => void;
22
+ additionalFields?: any;
23
+ element: any;
24
+ render?: ((props: {
25
+ handleDelete?: (() => void) | undefined;
26
+ handleDuplicate?: (() => void) | undefined;
27
+ handleCopy?: (() => void) | undefined;
28
+ }) => import("react").ReactNode) | undefined;
29
+ onDelete?: (() => void) | undefined;
30
+ onDuplicate?: (() => void) | undefined;
31
+ onCopy?: (() => void) | undefined;
32
+ }) => JSX.Element;
33
+ Overlay: ({ children, onClose }: {
34
+ onClose: () => void;
35
+ children: import("react").ReactNode;
36
+ }) => import("react").ReactPortal;
37
+ };
38
+ export { YoptaPlugin, mergePlugins, createYoptaPlugin, useElementSettings, UI_HELPERS };
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import*as n from"react";import r,{useState as o,useEffect as i,useContext as a,useMemo as s,memo as l,useRef as c,useCallback as d}from"react";import{createPortal as u}from"react-dom";import{ReactEditor as f,useSlate as p,useSelected as h,Editable as g,withReact as v,Slate as y}from"slate-react";import{Editor as m,Path as b,Transforms as w,Element as _,Operation as x,Text as j,Range as O,Node as E,createEditor as k}from"slate";import{randomFillSync as P}from"crypto";function S(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function N(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}var D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},C=200,A="__lodash_hash_undefined__",T="[object Function]",B="[object GeneratorFunction]",L=/^\[object .+?Constructor\]$/,M="object"==typeof D&&D&&D.Object===Object&&D,z="object"==typeof self&&self&&self.Object===Object&&self,R=M||z||Function("return this")();function F(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var o=e.length,i=n+(r?1:-1);for(;r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,I,n);var r=n-1,o=e.length;for(;++r<o;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function H(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)if(n(t,e[r]))return!0;return!1}function I(e){return e!=e}function W(e,t){return e.has(t)}function U(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var V,K=Array.prototype,Z=Function.prototype,G=Object.prototype,$=R["__core-js_shared__"],q=(V=/[^.]+$/.exec($&&$.keys&&$.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"",Y=Z.toString,J=G.hasOwnProperty,X=G.toString,Q=RegExp("^"+Y.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=K.splice,te=fe(R,"Map"),ne=fe(R,"Set"),re=fe(Object,"create");function oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ie(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ae(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function se(e){var t=-1,n=e?e.length:0;for(this.__data__=new ae;++t<n;)this.add(e[t])}function le(e,t){for(var n,r,o=e.length;o--;)if((n=e[o][0])===(r=t)||n!=n&&r!=r)return o;return-1}function ce(e){if(!pe(e)||(t=e,q&&q in t))return!1;var t,n=function(e){var t=pe(e)?X.call(e):"";return t==T||t==B}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?Q:L;return n.test(function(e){if(null!=e){try{return Y.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}oe.prototype.clear=function(){this.__data__=re?re(null):{}},oe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},oe.prototype.get=function(e){var t=this.__data__;if(re){var n=t[e];return n===A?void 0:n}return J.call(t,e)?t[e]:void 0},oe.prototype.has=function(e){var t=this.__data__;return re?void 0!==t[e]:J.call(t,e)},oe.prototype.set=function(e,t){return this.__data__[e]=re&&void 0===t?A:t,this},ie.prototype.clear=function(){this.__data__=[]},ie.prototype.delete=function(e){var t=this.__data__,n=le(t,e);return!(n<0)&&(n==t.length-1?t.pop():ee.call(t,n,1),!0)},ie.prototype.get=function(e){var t=this.__data__,n=le(t,e);return n<0?void 0:t[n][1]},ie.prototype.has=function(e){return le(this.__data__,e)>-1},ie.prototype.set=function(e,t){var n=this.__data__,r=le(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ae.prototype.clear=function(){this.__data__={hash:new oe,map:new(te||ie),string:new oe}},ae.prototype.delete=function(e){return ue(this,e).delete(e)},ae.prototype.get=function(e){return ue(this,e).get(e)},ae.prototype.has=function(e){return ue(this,e).has(e)},ae.prototype.set=function(e,t){return ue(this,e).set(e,t),this},se.prototype.add=se.prototype.push=function(e){return this.__data__.set(e,A),this},se.prototype.has=function(e){return this.__data__.has(e)};var de=ne&&1/U(new ne([,-0]))[1]==1/0?function(e){return new ne(e)}:function(){};function ue(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function fe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ce(n)?n:void 0}function pe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var he,ge=function(e,t){return e&&e.length?function(e,t,n){var r=-1,o=F,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=H;else if(i>=C){var c=t?null:de(e);if(c)return U(c);a=!1,o=W,l=new se}else l=t?[]:s;e:for(;++r<i;){var d=e[r],u=t?t(d):d;if(d=n||0!==d?d:0,a&&u==u){for(var f=l.length;f--;)if(l[f]===u)continue e;t&&l.push(u),s.push(d)}else o(l,u,n)||(l!==s&&l.push(u),s.push(d))}return s}(e,void 0,t):[]};class ve{constructor(e){he.set(this,void 0),function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===r?o.call(e,n):o?o.value=n:t.set(e,n)}(this,he,Object.freeze(Object.assign({},e)),"f")}extend(e){const t=Object.freeze(Object.assign(Object.assign({},N(this,he,"f")),e));return new ve(t)}get getPlugin(){return N(this,he,"f")}}function ye(e){return new ve(e)}function me(e){const t=e.map((e=>{const t=e.getPlugin,{childPlugin:n}=t,r=S(t,["childPlugin"]);return n?[r,Object.assign(Object.assign({},n.getPlugin),{hasParent:!0})]:r})).flat();return ge(t,((e,t)=>e.type===t.type))}he=new WeakMap;var be,we={};
2
+ /*!
3
+ Copyright (c) 2018 Jed Watson.
4
+ Licensed under the MIT License (MIT), see
5
+ http://jedwatson.github.io/classnames
6
+ */
7
+ be={get exports(){return we},set exports(e){we=e}},function(){var e={}.hasOwnProperty;function t(){for(var n=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)n.push(o);else if(Array.isArray(o)){if(o.length){var a=t.apply(null,o);a&&n.push(a)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){n.push(o.toString());continue}for(var s in o)e.call(o,s)&&o[s]&&n.push(s)}}}return n.join(" ")}be.exports?(t.default=t,be.exports=t):window.classNames=t}();var _e=we;function xe(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var je="paEOBcSs",Oe="LPlx-dkm",Ee="ayJsc1Kl",ke="HTcTBLMx",Pe="_4OLqGzhH";xe(".paEOBcSs{inset:0;overflow:hidden;pointer-events:none;position:fixed;z-index:999}.LPlx-dkm,.ayJsc1Kl{position:relative;z-index:0}.ayJsc1Kl{pointer-events:auto}.HTcTBLMx{height:100vh;left:0;position:fixed;top:0;width:100vw}._4OLqGzhH{pointer-events:auto;position:relative;top:100%}");const Se=({children:n,onClose:r})=>{const[a]=o((()=>document.createElement("div")));return i((()=>(a.className="yopta-overlay",document.body.appendChild(a),()=>{document.body.removeChild(a)})),[a]),u(e("div",Object.assign({className:je},{children:[t("div",{className:Oe}),e("div",Object.assign({className:Ee},{children:[t("div",{className:ke,onClick:r}),t("div",Object.assign({className:Pe,onClick:e=>e.stopPropagation()},{children:n}))]}))]})),a)};var Ne;function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},De.apply(this,arguments)}var Ce,Ae=function(e){return n.createElement("svg",De({viewBox:"0 0 16 16",className:"trash_svg__trash",style:{width:16,height:16,display:"block",fill:"currentColor",flexShrink:0,backfaceVisibility:"hidden"}},e),Ne||(Ne=n.createElement("path",{d:"M4.862 15.429h6.283c1.045 0 1.722-.636 1.77-1.689l.465-9.85h.752c.342 0 .608-.26.608-.602a.594.594 0 0 0-.608-.595H11.09V1.668C11.09.622 10.427 0 9.292 0H6.694C5.566 0 4.896.622 4.896 1.668v1.025H1.861a.598.598 0 1 0 0 1.196h.76l.464 9.858c.048 1.053.718 1.682 1.777 1.682Zm1.292-13.7c0-.355.246-.58.63-.58h2.42c.382 0 .628.225.628.58v.964H6.154V1.73ZM4.992 14.22c-.376 0-.65-.274-.67-.677L3.864 3.89h8.251l-.444 9.652c-.014.403-.287.677-.677.677H4.992Zm.991-1.1c.288 0 .472-.185.465-.452l-.205-7.164c-.007-.274-.198-.451-.472-.451-.287 0-.471.184-.464.45l.205 7.165c.007.273.198.451.471.451Zm2.017 0c.287 0 .479-.185.479-.452V5.503c0-.267-.192-.451-.479-.451s-.479.184-.479.45v7.165c0 .267.192.451.479.451Zm2.017 0c.273 0 .458-.179.464-.452l.212-7.164c.007-.267-.184-.451-.464-.451-.274 0-.465.177-.472.45l-.212 7.165c-.007.267.184.451.472.451Z"})))};function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(this,arguments)}var Be,Le=function(e){return n.createElement("svg",Te({viewBox:"0 0 16 16",className:"duplicate_svg__duplicate",style:{width:16,height:16,display:"block",fill:"currentColor",flexShrink:0,backfaceVisibility:"hidden"}},e),Ce||(Ce=n.createElement("path",{d:"M2.839 12.152H4v1.033c0 1.456.759 2.214 2.242 2.214h6.918c1.477 0 2.242-.758 2.242-2.214V6.212c0-1.456-.765-2.215-2.242-2.215H12V2.965c0-1.456-.766-2.215-2.242-2.215H2.839C1.362.75.597 1.502.597 2.965V9.93c0 1.463.765 2.221 2.242 2.221Zm.082-1.34c-.636 0-.984-.328-.984-.99v-6.74c0-.664.348-.999.984-.999h6.76c.63 0 .985.335.985.998v.916H6.243c-1.483 0-2.242.759-2.242 2.215v4.6h-1.08Zm3.397 3.248c-.635 0-.977-.329-.977-.992v-6.74c0-.663.342-.991.977-.991h6.761c.629 0 .984.328.984.991v6.74c0 .663-.355.992-.984.992H6.32Z"})))};function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Me.apply(this,arguments)}var ze=function(e){return n.createElement("svg",Me({viewBox:"0 0 16 16",className:"copy_svg__link",style:{width:16,height:16,display:"block",fill:"currentColor",flexShrink:0,backfaceVisibility:"hidden"}},e),Be||(Be=n.createElement("path",{d:"m7.7 10.895 1.038-1.046c-.82-.076-1.394-.335-1.818-.76-1.155-1.154-1.155-2.795-.007-3.943l2.27-2.27c1.155-1.155 2.789-1.155 3.944 0 1.162 1.169 1.155 2.796.007 3.944l-1.176 1.176a2.74 2.74 0 0 1 .17 1.634l1.963-1.955c1.682-1.675 1.688-4.054-.007-5.75C12.389.225 10.01.238 8.335 1.913L5.956 4.298c-1.675 1.675-1.688 4.054.007 5.749.403.396.943.697 1.736.848Zm.6-5.763L7.27 6.178c.813.075 1.394.342 1.811.759 1.162 1.162 1.162 2.795.007 3.944l-2.27 2.27c-1.155 1.155-2.782 1.155-3.944 0-1.162-1.163-1.155-2.796 0-3.945L4.042 8.03a2.788 2.788 0 0 1-.17-1.634L1.915 8.352c-1.682 1.674-1.688 4.06.007 5.755 1.695 1.696 4.074 1.682 5.749.007l2.372-2.379c1.682-1.681 1.688-4.06-.007-5.749-.396-.403-.936-.704-1.736-.854Z"})))},Re={};!function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Boolean]",s="[object Date]",l="[object Function]",c="[object GeneratorFunction]",d="[object Map]",u="[object Number]",f="[object Object]",p="[object Promise]",h="[object RegExp]",g="[object Set]",v="[object String]",y="[object Symbol]",m="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",_="[object Float32Array]",x="[object Float64Array]",j="[object Int8Array]",O="[object Int16Array]",E="[object Int32Array]",k="[object Uint8Array]",P="[object Uint8ClampedArray]",S="[object Uint16Array]",N="[object Uint32Array]",C=/\w*$/,A=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,B={};B[i]=B["[object Array]"]=B[b]=B[w]=B[a]=B[s]=B[_]=B[x]=B[j]=B[O]=B[E]=B[d]=B[u]=B[f]=B[h]=B[g]=B[v]=B[y]=B[k]=B[P]=B[S]=B[N]=!0,B["[object Error]"]=B[l]=B[m]=!1;var L="object"==typeof D&&D&&D.Object===Object&&D,M="object"==typeof self&&self&&self.Object===Object&&self,z=L||M||Function("return this")(),R=t&&!t.nodeType&&t,F=R&&e&&!e.nodeType&&e,H=F&&F.exports===R;function I(e,t){return e.set(t[0],t[1]),e}function W(e,t){return e.add(t),e}function U(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function V(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function K(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Z(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var $=Array.prototype,q=Function.prototype,Y=Object.prototype,J=z["__core-js_shared__"],X=function(){var e=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Q=q.toString,ee=Y.hasOwnProperty,te=Y.toString,ne=RegExp("^"+Q.call(ee).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=H?z.Buffer:void 0,oe=z.Symbol,ie=z.Uint8Array,ae=Z(Object.getPrototypeOf,Object),se=Object.create,le=Y.propertyIsEnumerable,ce=$.splice,de=Object.getOwnPropertySymbols,ue=re?re.isBuffer:void 0,fe=Z(Object.keys,Object),pe=Re(z,"DataView"),he=Re(z,"Map"),ge=Re(z,"Promise"),ve=Re(z,"Set"),ye=Re(z,"WeakMap"),me=Re(Object,"create"),be=Ue(pe),we=Ue(he),_e=Ue(ge),xe=Ue(ve),je=Ue(ye),Oe=oe?oe.prototype:void 0,Ee=Oe?Oe.valueOf:void 0;function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){this.__data__=new Pe(e)}function De(e,t){var n=Ke(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Ze(e)}(e)&&ee.call(e,"callee")&&(!le.call(e,"callee")||te.call(e)==i)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,o=!!r;for(var a in e)!t&&!ee.call(e,a)||o&&("length"==a||Ie(a,r))||n.push(a);return n}function Ce(e,t,n){var r=e[t];ee.call(e,t)&&Ve(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Ae(e,t){for(var n=e.length;n--;)if(Ve(e[n][0],t))return n;return-1}function Te(e,t,n,r,o,p,m){var D;if(r&&(D=p?r(e,o,p,m):r(e)),void 0!==D)return D;if(!qe(e))return e;var A=Ke(e);if(A){if(D=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(e,D)}else{var T=He(e),L=T==l||T==c;if(Ge(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(T==f||T==i||L&&!p){if(V(e))return p?e:{};if(D=function(e){return"function"!=typeof e.constructor||We(e)?{}:(t=ae(e),qe(t)?se(t):{});var t}(L?{}:e),!t)return function(e,t){return Me(e,Fe(e),t)}(e,function(e,t){return e&&Me(t,Ye(t),e)}(D,e))}else{if(!B[T])return p?e:{};D=function(e,t,n,r){var o=e.constructor;switch(t){case b:return Le(e);case a:case s:return new o(+e);case w:return function(e,t){var n=t?Le(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case _:case x:case j:case O:case E:case k:case P:case S:case N:return function(e,t){var n=t?Le(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case d:return function(e,t,n){var r=t?n(K(e),!0):K(e);return U(r,I,new e.constructor)}(e,r,n);case u:case v:return new o(e);case h:return function(e){var t=new e.constructor(e.source,C.exec(e));return t.lastIndex=e.lastIndex,t}(e);case g:return function(e,t,n){var r=t?n(G(e),!0):G(e);return U(r,W,new e.constructor)}(e,r,n);case y:return i=e,Ee?Object(Ee.call(i)):{}}var i}(e,T,Te,t)}}m||(m=new Ne);var M=m.get(e);if(M)return M;if(m.set(e,D),!A)var z=n?function(e){return function(e,t,n){var r=t(e);return Ke(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ye,Fe)}(e):Ye(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(z||e,(function(o,i){z&&(o=e[i=o]),Ce(D,i,Te(o,t,n,r,i,e,m))})),D}function Be(e){return!(!qe(e)||(t=e,X&&X in t))&&($e(e)||V(e)?ne:A).test(Ue(e));var t}function Le(e){var t=new e.constructor(e.byteLength);return new ie(t).set(new ie(e)),t}function Me(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o],s=r?r(n[a],e[a],a,n,e):void 0;Ce(n,a,void 0===s?e[a]:s)}return n}function ze(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Re(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Be(n)?n:void 0}ke.prototype.clear=function(){this.__data__=me?me(null):{}},ke.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},ke.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return ee.call(t,e)?t[e]:void 0},ke.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ee.call(t,e)},ke.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?r:t,this},Pe.prototype.clear=function(){this.__data__=[]},Pe.prototype.delete=function(e){var t=this.__data__,n=Ae(t,e);return!(n<0)&&(n==t.length-1?t.pop():ce.call(t,n,1),!0)},Pe.prototype.get=function(e){var t=this.__data__,n=Ae(t,e);return n<0?void 0:t[n][1]},Pe.prototype.has=function(e){return Ae(this.__data__,e)>-1},Pe.prototype.set=function(e,t){var n=this.__data__,r=Ae(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Se.prototype.clear=function(){this.__data__={hash:new ke,map:new(he||Pe),string:new ke}},Se.prototype.delete=function(e){return ze(this,e).delete(e)},Se.prototype.get=function(e){return ze(this,e).get(e)},Se.prototype.has=function(e){return ze(this,e).has(e)},Se.prototype.set=function(e,t){return ze(this,e).set(e,t),this},Ne.prototype.clear=function(){this.__data__=new Pe},Ne.prototype.delete=function(e){return this.__data__.delete(e)},Ne.prototype.get=function(e){return this.__data__.get(e)},Ne.prototype.has=function(e){return this.__data__.has(e)},Ne.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Pe){var o=r.__data__;if(!he||o.length<n-1)return o.push([e,t]),this;r=this.__data__=new Se(o)}return r.set(e,t),this};var Fe=de?Z(de,Object):function(){return[]},He=function(e){return te.call(e)};function Ie(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||T.test(e))&&e>-1&&e%1==0&&e<t}function We(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function Ue(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ve(e,t){return e===t||e!=e&&t!=t}(pe&&He(new pe(new ArrayBuffer(1)))!=w||he&&He(new he)!=d||ge&&He(ge.resolve())!=p||ve&&He(new ve)!=g||ye&&He(new ye)!=m)&&(He=function(e){var t=te.call(e),n=t==f?e.constructor:void 0,r=n?Ue(n):void 0;if(r)switch(r){case be:return w;case we:return d;case _e:return p;case xe:return g;case je:return m}return t});var Ke=Array.isArray;function Ze(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}(e.length)&&!$e(e)}var Ge=ue||function(){return!1};function $e(e){var t=qe(e)?te.call(e):"";return t==l||t==c}function qe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return Ze(e)?De(e):function(e){if(!We(e))return fe(e);var t=[];for(var n in Object(e))ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Te(e,!0,!0)}}({get exports(){return Re},set exports(e){Re=e}},Re);var Fe=Re;function He(e){return"function"==typeof window.structuredClone?window.structuredClone(e):Fe(e)}const Ie={from:{path:null,element:null,parent:null},to:{path:null,element:null,parent:null}};let We,Ue,Ve=(e=21)=>{var t;t=e-=0,!We||We.length<t?(We=Buffer.allocUnsafe(128*t),P(We),Ue=0):Ue+t>We.length&&(P(We),Ue=0),Ue+=t;let n="";for(let t=Ue-e;t<Ue;t++)n+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&We[t]];return n};const Ke=()=>Ve();var Ze=!1;if("undefined"!=typeof window){var Ge={get passive(){Ze=!0}};window.addEventListener("testPassive",null,Ge),window.removeEventListener("testPassive",null,Ge)}var $e="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),qe=[],Ye=!1,Je=-1,Xe=void 0,Qe=void 0,et=void 0,tt=function(e){return qe.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},nt=function(e){var t=e||window.event;return!!tt(t.target)||(t.touches.length>1||(t.preventDefault&&t.preventDefault(),!1))},rt=function(e,t){if(e){if(!qe.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};qe=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(qe),[n]),$e?window.requestAnimationFrame((function(){if(void 0===Qe){Qe={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,t=e.scrollY,n=e.scrollX,r=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-t,document.body.style.left=-n,setTimeout((function(){return window.requestAnimationFrame((function(){var e=r-window.innerHeight;e&&t>=r&&(document.body.style.top=-(t+e))}))}),300)}})):function(e){if(void 0===et){var t=!!e&&!0===e.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(t&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);et=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}void 0===Xe&&(Xe=document.body.style.overflow,document.body.style.overflow="hidden")}(t),$e&&(e.ontouchstart=function(e){1===e.targetTouches.length&&(Je=e.targetTouches[0].clientY)},e.ontouchmove=function(t){1===t.targetTouches.length&&function(e,t){var n=e.targetTouches[0].clientY-Je;!tt(e.target)&&(t&&0===t.scrollTop&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?nt(e):e.stopPropagation())}(t,e)},Ye||(document.addEventListener("touchmove",nt,Ze?{passive:!1}:void 0),Ye=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},ot=function(e){e?(qe=qe.filter((function(t){return t.targetElement!==e})),$e&&(e.ontouchstart=null,e.ontouchmove=null,Ye&&0===qe.length&&(document.removeEventListener("touchmove",nt,Ze?{passive:!1}:void 0),Ye=!1)),$e?function(){if(void 0!==Qe){var e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);document.body.style.position=Qe.position,document.body.style.top=Qe.top,document.body.style.left=Qe.left,window.scrollTo(t,e),Qe=void 0}}():(void 0!==et&&(document.body.style.paddingRight=et,et=void 0),void 0!==Xe&&(document.body.style.overflow=Xe,Xe=void 0))):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.")},it=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},at={"text/plain":"Text","text/html":"Url",default:"Text"},st="Copy to clipboard: #{key}, Enter";var lt=function(e,t){var n,r,o,i,a,s,l=!1;t||(t={}),n=t.debug||!1;try{if(o=it(),i=document.createRange(),a=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=at[t.format]||at.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(s),i.selectNodeContents(s),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:st),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),s&&document.body.removeChild(s),o()}return l};const ct=e=>({id:e,type:"paragraph",nodeType:"block",children:[{text:""}]});function dt(e,t,n=!1){n&&Object.keys(m.marks(e)||{}).forEach((t=>{m.removeMark(e,t)})),!function(e,t){const n=m.marks(e);return!!(null==n?void 0:n[t])}(e,t)?m.addMark(e,t,!0):m.removeMark(e,t)}const ut={hoveredElement:null,isElementOptionsOpen:!1,nodeSettingsPos:null,dndState:Ie,disableWhileDrag:!1,DRAG_MAP:new Map},ft=r.createContext([ut,{openNodeSettings:(e,t)=>{},closeNodeSettings:()=>{},hoverIn:(e,t)=>{},triggerPlusButton:e=>{},deleteNode:()=>{},duplicateNode:()=>{},copyLinkNode:()=>{},onDrop:e=>{},onDragEnd:e=>{},onDragEnter:e=>{},onDragStart:e=>{},changeHoveredNode:e=>{}}]),pt=({children:e})=>{const n=p(),[r,i]=(e=>{const[t,n]=o(!1),[r,i]=o(Ie),[a]=o((()=>new Map)),s=t=>{var n;t.preventDefault(),t.stopPropagation();const r=t.target.closest("[data-element-id]");if(r){const{elementId:t,elementType:o}=r.dataset;if(!t||!o)return;const s=a.get(t);if(null===(n=s.data)||void 0===n?void 0:n.skipDrag)return;const l=f.findPath(e,s);i((e=>({from:e.from,to:{path:l,element:{id:t,type:o},parent:null}})))}};return[{dndState:r,disableWhileDrag:t,DRAG_MAP:a},{onDrop:t=>{try{m.withoutNormalizing(e,(()=>{var n,o;if(t.preventDefault(),t.stopPropagation(),(null===(n=r.from.element)||void 0===n?void 0:n.id)===(null===(o=r.to.element)||void 0===o?void 0:o.id))return;const i=r.from.path,s=a.get(r.to.element.id);let l=f.findPath(e,s);if(!i||!l)return;const[c,d]=m.node(e,i),[u,p]=m.parent(e,d);if(console.log("fromPath",i),console.log("fromElementPath",d),console.log("toPath",l),console.log("toPath next",b.next(l)),console.log("fromElementNode",c),console.log("parentElementNode",u),l.length>1){const t=He(c);l.length>i.length?(w.insertNodes(e,t,{at:l.length===i.length?l:b.next(l),match:e=>_.isElement(e),mode:"lowest"}),w.removeNodes(e,{at:i,match:e=>_.isElement(e)&&e.id===(null==t?void 0:t.id),mode:"lowest"})):(w.removeNodes(e,{at:i,match:e=>_.isElement(e)&&e.id===(null==t?void 0:t.id),mode:"lowest"}),w.insertNodes(e,t,{at:l.length===i.length?l:b.next(l),match:e=>_.isElement(e),mode:"lowest"})),1===u.children.length&&_.isElement(u.children[0])&&w.removeNodes(e,{at:p,match:e=>_.isElement(e)&&u.id===e.id,mode:"lowest"})}else w.moveNodes(e,{at:i,to:l,match:e=>_.isElement(e)&&_.isElement(c)&&c.type===e.type,mode:"lowest"});t.dataTransfer.clearData(),a.clear()}))}catch(e){console.error(e)}},onDragEnd:e=>{e.stopPropagation(),e.target.removeAttribute("draggable"),e.target.ondragstart=null,e.target.ondragend=null,e.target.ondragenter=null,e.target.ondragover=null,n(!1),i(Ie)},onDragEnter:s,onDragStart:(e,t)=>{n(!0),e.dataTransfer.setData("Text",""),e.dataTransfer.effectAllowed="move";const r=document.getElementById("yopta-contenteditable");r&&(r.ondragenter=e=>s(e),r.ondragover=e=>(e.stopPropagation(),e.preventDefault(),!1),i((e=>({to:e.to,from:t}))))}}]})(n),[a,l]=o(null),[c,d]=o((()=>(({children:e})=>{if(1===e.length)return e[0];return null})(n))),[u,h]=o(!1),g=Object.assign({hoveredElement:c,isElementOptionsOpen:u,nodeSettingsPos:a},r),v=s((()=>Object.assign({hoverIn:(e,t)=>{var n;if(u)return e.preventDefault();(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.skipSettings)||d(t)},changeHoveredNode:e=>d(e),triggerPlusButton:e=>{m.withoutNormalizing(n,(()=>{if(!n.selection||!e)return;const t=f.findPath(n,e),r=b.next([t[0]]),o=ct(Ke());w.insertNodes(n,o,{at:r,select:!0}),d(o)}))},openNodeSettings:(e,t)=>{if(rt(document.body,{reserveScrollBarGap:!0}),h(!0),e.current){const t=e.current.getBoundingClientRect();l({left:t.left+t.width+10,top:t.top})}},closeNodeSettings:()=>{ot(document.body),h(!1),l(null)},deleteNode:()=>{if(c)try{m.withoutNormalizing(n,(()=>{var e;const t=f.findPath(n,c),[r,o]=m.parent(n,t);if(!t)return;let i="highest";if(_.isElement(r)){if(1===r.children.length&&_.isElement(r.children[0]))return w.removeNodes(n,{at:o,match:e=>_.isElement(e)&&e.id===r.id,mode:"highest"}),d(null),void v.closeNodeSettings();(null===(e=r.data)||void 0===e?void 0:e.depth)>0&&(i="lowest")}w.removeNodes(n,{at:t,match:e=>_.isElement(e),mode:i}),d(null),v.closeNodeSettings()}))}catch(e){console.log({error:e})}},duplicateNode:()=>{m.withoutNormalizing(n,(()=>{if(!c)return;const e=f.findPath(n,c),t=b.next(e),r=He(c);r.id=Ke(),w.insertNodes(n,r,{at:t,match:e=>_.isElement(e),mode:"highest",select:!0}),f.focus(n),d(null),v.closeNodeSettings()}))},copyLinkNode:()=>{0===window.location.hash.length?lt(`${window.location.href}#${null==c?void 0:c.id}`):lt(`${window.location.href.split("#")[0]}#${null==c?void 0:c.id}`),v.closeNodeSettings()}},i)),[c,u,r,n.children]),y=s((()=>[g,v]),[c,u,r,n.selection,n.children]);return t(ft.Provider,Object.assign({value:y},{children:e}))},ht=()=>a(ft);var gt="MUvwxbsq",vt="e0a5j3Um",yt="FbReVPRq",mt="_99KXF-1a",bt="jSzfTzxQ",wt="-jJPYNyV";xe(".MUvwxbsq{align-items:center;background:linear-gradient(90deg,rgba(49,49,47,.99),#262625);border-radius:4px;box-shadow:0 0 0 1px hsla(0,0%,6%,.05),0 3px 6px hsla(0,0%,6%,.1),0 9px 24px hsla(0,0%,6%,.2);display:flex;flex-direction:column;height:auto;max-height:70vh;max-width:calc(100vw - 24px);min-width:200px;opacity:1;overflow:hidden;position:fixed;transform-origin:0 top;width:auto}.e0a5j3Um{flex-grow:1;margin-bottom:0;margin-right:0;min-height:0;overflow:hidden auto;transform:translateZ(0);width:100%;z-index:1}.FbReVPRq{box-shadow:0 -1px 0 rgba(55,53,47,.09);padding-bottom:6px;padding-top:6px}._99KXF-1a{align-items:center;background:inherit;border:none;border-radius:3px;color:#fff;cursor:pointer;display:flex;font-size:14px;line-height:120%;margin-left:4px;margin-right:4px;min-height:28px;transition:background 20ms ease-in 0s;user-select:none;width:calc(100% - 8px)}._99KXF-1a:hover{background-color:#383835;color:#fff}.jSzfTzxQ{align-items:center;color:#fff;display:flex;justify-content:center;margin-left:10px;margin-right:4px}.-jJPYNyV{flex:1 1 auto;margin-left:6px;margin-right:6px;overflow:hidden;text-align:left;text-overflow:ellipsis}.-jJPYNyV,._7aysWAsq{min-width:0;white-space:nowrap}._7aysWAsq{color:rgba(55,53,47,.5);flex-shrink:0;font-size:12px;margin-left:auto;margin-right:12px}");const _t=n=>{var{onClose:r,style:o,element:i,render:a}=n,s=S(n,["onClose","style","element","render"]);const l=p(),[,c]=ht();m.isVoid(l,i);const d=()=>{var e;c.deleteNode(),null===(e=s.onDelete)||void 0===e||e.call(s)},u=()=>{var e;c.duplicateNode(),null===(e=s.onDuplicate)||void 0===e||e.call(s)},f=()=>{var e;c.copyLinkNode(),null===(e=s.onCopy)||void 0===e||e.call(s)};return t(Se,a?Object.assign({onClose:r},{children:t("div",Object.assign({style:o,className:gt},{children:a({handleDelete:d,handleDuplicate:u,handleCopy:f})}))}):Object.assign({onClose:r},{children:t("div",Object.assign({style:o,className:gt},{children:t("div",Object.assign({className:vt},{children:e("div",Object.assign({className:yt},{children:[e("button",Object.assign({type:"button",className:mt,onClick:d},{children:[t("div",Object.assign({className:bt},{children:t(Ae,{})})),t("div",Object.assign({className:wt},{children:"Delete"}))]})),e("button",Object.assign({type:"button",className:mt,onClick:u},{children:[t("div",Object.assign({className:bt},{children:t(Le,{})})),t("div",Object.assign({className:wt},{children:"Duplicate"}))]})),e("button",Object.assign({type:"button",className:mt,onClick:f},{children:[t("div",Object.assign({className:bt},{children:t(ze,{})})),t("div",Object.assign({className:wt},{children:"Copy link to block"}))]}))]}))}))}))}))};var xt={};Object.defineProperty(xt,"__esModule",{value:!0});for(var jt="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),Ot={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Et={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:jt?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},kt={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},Pt=1;Pt<20;Pt++)kt["f"+Pt]=111+Pt;function St(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return Nt(e,t)})),o=function(e){return r.some((function(t){return Dt(t,e)}))};return null==n?o:o(n)}function Nt(e,t){var n=t&&t.byKey,r={},o=(e=e.replace("++","+add")).split("+"),i=o.length;for(var a in Ot)r[Ot[a]]=!1;var s=!0,l=!1,c=void 0;try{for(var d,u=o[Symbol.iterator]();!(s=(d=u.next()).done);s=!0){var f=d.value,p=f.endsWith("?")&&f.length>1;p&&(f=f.slice(0,-1));var h=At(f),g=Ot[h];if(f.length>1&&!g&&!Et[f]&&!kt[h])throw new TypeError('Unknown modifier: "'+f+'"');1!==i&&g||(n?r.key=h:r.which=Ct(f)),g&&(r[g]=!p||null)}}catch(e){l=!0,c=e}finally{try{!s&&u.return&&u.return()}finally{if(l)throw c}}return r}function Dt(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function Ct(e){return e=At(e),kt[e]||e.toUpperCase().charCodeAt(0)}function At(e){return e=e.toLowerCase(),e=Et[e]||e}xt.default=St;var Tt=xt.isHotkey=St,Bt=xt.isCodeHotkey=function(e,t){return St(e,t)},Lt=xt.isKeyHotkey=function(e,t){return St(e,{byKey:!0},t)};xt.parseHotkey=Nt,xt.compareHotkey=Dt,xt.toKeyCode=Ct,xt.toKeyName=At;const Mt=({children:e,fallback:t=null})=>{const[n,r]=o(!1);return i((()=>r(!0)),[]),n?e:t};
8
+ /*!
9
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
10
+ *
11
+ * Copyright (c) 2014-2017, Jon Schlinkert.
12
+ * Released under the MIT License.
13
+ */function zt(e){return"[object Object]"===Object.prototype.toString.call(e)}function Rt(e){var t,n;return!1!==zt(e)&&(void 0===(t=e.constructor)||!1!==zt(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}var Ft={isHistory:e=>Rt(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||x.isOperationList(e.redos[0]))&&(0===e.undos.length||x.isOperationList(e.undos[0]))},Ht=new WeakMap,It=new WeakMap,Wt={isHistoryEditor:e=>Ft.isHistory(e.history)&&m.isEditor(e),isMerging:e=>It.get(e),isSaving:e=>Ht.get(e),redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=Wt.isMerging(e);It.set(e,!1),t(),It.set(e,n)},withoutSaving(e,t){var n=Wt.isSaving(e);Ht.set(e,!1),t(),Ht.set(e,n)}},Ut=(e,t)=>"set_selection"===e.type||(!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!b.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!b.equals(e.path,t.path))),Vt=(e,t)=>"set_selection"!==e.type||null!=e.properties&&null!=e.newProperties,Kt=(e,t)=>!(!t||"set_selection"!==e.type||"set_selection"!==t.type),Zt=e=>"set_selection"!==e.type;function Gt(e){return!!Array.isArray(e)&&0!==e.length}const $t="yopta-content";var qt="zPVjjfLH";xe(".zPVjjfLH:after{color:#aaa;content:attr(data-placeholder);font-size:75%;font-style:inherit;font-weight:inherit;padding-left:5px;position:absolute;text-indent:2px;top:50%;transform:translateY(-50%);user-select:none}");const Yt={margin:"1px 0",whiteSpace:"pre-wrap",wordBreak:"break-word",color:"inherit",fontSize:"inherit",lineHeight:"inherit",fontWeight:"inherit"},Jt=l((({attributes:e,children:n,placeholder:r,leaf:o})=>{const i=h();return t("span",Object.assign({},e,{"data-placeholder":r,style:Yt,className:_e({[qt]:o.withPlaceholder&&r&&i})},{children:n}))}));Jt.displayName="TextLeaf";var Xt;function Qt(){return Qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qt.apply(this,arguments)}var en,tn=function(e){return n.createElement("svg",Qt({viewBox:"0 0 10 10",fill:"currentColor",style:{width:14,height:14,display:"block",flexShrink:0,backfaceVisibility:"hidden"}},e),Xt||(Xt=n.createElement("path",{d:"M3 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm4-8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"})))};function nn(){return nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nn.apply(this,arguments)}var rn=function(e){return n.createElement("svg",nn({viewBox:"0 0 16 16",fill:"currentColor",style:{width:16,height:16,display:"block",flexShrink:0,backfaceVisibility:"hidden"}},e),en||(en=n.createElement("path",{d:"M7.977 14.963c.407 0 .747-.324.747-.723V8.72h5.362c.399 0 .74-.34.74-.747a.746.746 0 0 0-.74-.738H8.724V1.706c0-.398-.34-.722-.747-.722a.732.732 0 0 0-.739.722v5.529h-5.37a.746.746 0 0 0-.74.738c0 .407.341.747.74.747h5.37v5.52c0 .399.332.723.739.723z"})))},on="Y0x3bgxC",an="Mg5hGGcZ",sn="fEkHlPAj",ln="iGNgkZSV",cn="WCf8syAw",dn="_8YAWEzlv",un="EWcKBllR";xe('.Y0x3bgxC{display:flex;left:-50px;opacity:0;position:absolute;top:2px;transition:opacity .18s ease-in}.Mg5hGGcZ{opacity:1}.fEkHlPAj{all:unset;align-items:center;background-color:inherit;background-color:transparent;border-radius:6px;color:rgba(55,53,47,.35);cursor:pointer;display:flex;height:24px;justify-content:center;margin:0 1px;padding:0;position:relative;transition:background-color .18s cubic-bezier(.4,0,.2,1);width:auto;width:18px}.fEkHlPAj:active,.fEkHlPAj:focus,.fEkHlPAj:hover{background-color:rgba(55,54,47,.08)}.iGNgkZSV{width:24px}.WCf8syAw{position:relative;transition:opacity .18s cubic-bezier(.4,0,.2,1)}._8YAWEzlv:after{background-color:#007aff;bottom:-7px;content:"";height:3px;left:50%;position:absolute;transform:translateX(-50%);width:100%}.EWcKBllR:before{top:-5px}.EWcKBllR:after,.EWcKBllR:before{background-color:inherit;content:"";height:3px;left:50%;position:absolute;transform:translateX(-50%);width:100%}.EWcKBllR:after{bottom:-7px}');const fn=({element:n,editor:r,values:o,handlers:i})=>{const a=c(null),{hoveredElement:s,isElementOptionsOpen:l,nodeSettingsPos:d}=o,{onDragEnd:u,onDragStart:p,openNodeSettings:h,closeNodeSettings:g,triggerPlusButton:v}=i,y=e=>{e.stopPropagation();const t=a.current,o=document.querySelector(`[data-element-id="${null==n?void 0:n.id}"]`),i=f.findPath(r,n),s=m.parent(r,i);_.isElement(n)&&(null==t||t.setAttribute("draggable","false"),o&&(o.setAttribute("draggable","true"),o.ondragstart=e=>{const t={path:i,element:{id:n.id,type:n.type},parent:s};p(e,t)},o.ondragend=u))},b=(null==s?void 0:s.id)===n.id;return e("div",Object.assign({contentEditable:!1,className:_e(on,{[an]:b})},{children:[b&&l&&t(_t,{element:n,style:d||void 0,onClose:g}),t("button",Object.assign({type:"button",onMouseDown:y,className:_e(sn,ln),onClick:()=>v(n)},{children:t(rn,{})})),t("button",Object.assign({type:"button",onMouseDown:y,className:sn,onClick:()=>h(a,n),ref:a},{children:t(tn,{})}))]}))},pn=({children:n,element:r,attributes:o,nodeType:i,render:a})=>{var l;const c=p(),[d,u]=ht(),f="inline"===i,{hoverIn:h,onDrop:g}=u,{dndState:v,DRAG_MAP:y}=d,m=s((()=>{var e,t;if(null===v.from.element||null===v.to.element)return{isDragging:!1,isDragOver:!1,isDragSelf:!1};const n=(null===(e=d.dndState.from.element)||void 0===e?void 0:e.id)===r.id,o=(null===(t=d.dndState.to.element)||void 0===t?void 0:t.id)===r.id;return{isDragging:n,isDragOver:o,isDragSelf:n&&o}}),[d.dndState.from,d.dndState.to]),b=null===(l=r.data)||void 0===l?void 0:l.skipSettings,{isDragging:w,isDragOver:_,isDragSelf:x}=m,j={opacity:w?.7:1};return y.set(r.id,r),f?a({attributes:o,element:r,children:n}):e("div",Object.assign({"data-element-id":r.id,"data-element-type":r.type,onMouseEnter:e=>{b||h(e,r)},onDrop:g,className:_e(cn,{[dn]:_,[un]:x}),style:j},o,{children:[b?null:t(fn,{editor:c,element:r,handlers:u,values:d}),a({attributes:o,element:r,children:n})]}))};pn.displayName="ElementWrapper";const hn={bold:"mod+b",italic:"mod+i",compose:["down","left","right","up","backspace","enter"],arrowLeft:"left",arrowUp:"up",arrowDown:"down",arrowRight:"right",ctrlLeft:"ctrl+left",escape:"esc",ctrlRight:"ctrl+right",deleteBackward:"shift?+backspace",backspace:"backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",shiftEnter:"shift+enter",enter:"enter",space:"space",undo:"mod+z",select:"mod+a",shiftTab:"shift+tab",tab:"tab",cmd:"mod",cmdEnter:"mod+enter",kekCeburek:"mod+enter"},gn={moveLineBackward:"opt+up",moveLineForward:"opt+down",ctrlLeft:"opt+left",ctrlRight:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},vn={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},yn=e=>{const t=hn[e],n=gn[e],r=vn[e],o=t&&Lt(t),i=n&&Lt(n),a=r&&Lt(r);return e=>!(!o||!o(e))||(!(!i||!i(e))||!(!a||!a(e)))},mn={isBold:yn("bold"),isCompose:yn("compose"),isArrowLeft:yn("arrowLeft"),isArrowRight:yn("arrowRight"),isArrowUp:yn("arrowUp"),isArrowDown:yn("arrowDown"),isDeleteBackward:yn("deleteBackward"),isDeleteForward:yn("deleteForward"),isDeleteLineBackward:yn("deleteLineBackward"),isDeleteLineForward:yn("deleteLineForward"),isDeleteWordBackward:yn("deleteWordBackward"),isDeleteWordForward:yn("deleteWordForward"),isExtendBackward:yn("extendBackward"),isExtendForward:yn("extendForward"),isExtendLineBackward:yn("extendLineBackward"),isExtendLineForward:yn("extendLineForward"),isItalic:yn("italic"),isMoveLineBackward:yn("moveLineBackward"),isMoveLineForward:yn("moveLineForward"),isCtrlLeft:yn("ctrlLeft"),isCtrlRight:yn("ctrlRight"),isRedo:yn("redo"),isShiftEnter:yn("shiftEnter"),isEnter:yn("enter"),isTransposeCharacter:yn("transposeCharacter"),isUndo:yn("undo"),isSpace:yn("space"),isSelect:yn("select"),isTab:yn("tab"),isShiftTab:yn("shiftTab"),isBackspace:yn("backspace"),isCmdEnter:yn("cmdEnter"),isCmd:yn("cmd"),isEscape:yn("escape"),isKekceburek:yn("kekCeburek")},bn=(e,t)=>!!((e,t)=>{const{selection:n}=e;if(!n)return!1;const[r]=Array.from(m.nodes(e,{at:m.unhangRange(e,n),match:e=>!m.isEditor(e)&&_.isElement(e)&&e.type===t}));return r})(e,t),wn=(e,t,n="lowest")=>{var r;const o=Array.from(m.nodes(e,{match:t=>m.isEditor(e)&&_.isElement(t),at:t||(null===(r=e.selection)||void 0===r?void 0:r.anchor.path),mode:n}))[0];return o?o[0]:e.children[0]};function _n(e,t){var n,r;if(j.isText(e))return function(e){const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.replace(/[&<>"']/g,(e=>t[e]))}(e.text);const o=e.children.map((e=>_n(e,t))).join(""),i=t[e.type];return"function"==typeof(null===(r=null===(n=i.exports)||void 0===n?void 0:n.html)||void 0===r?void 0:r.serialize)?i.exports.html.serialize(e,o):o}function xn(e,t){return e.map((e=>_n(e,t))).join("")}const jn={hotkeys:mn,defaultNode:ct(Ke())},On=({editor:n,placeholder:o,marks:a,readOnly:l,children:u,plugins:p,PLUGINS_MAP:h})=>{i((()=>{const e=window.location.hash.length>0?window.location.hash.replace("#",""):null;if(e){const t=document.getElementById(e)||document.querySelector(`[data-element-id="${e}"]`);t&&window.scrollTo({top:t.offsetTop,behavior:"smooth"})}}),[]);const v=c(null),[{disableWhileDrag:y},{changeHoveredNode:x}]=ht(),j=y||l,E=s((()=>e=>{const r=h[e.element.type],o=function(e){return"function"==typeof e.renderer?e.renderer:e.renderer.editor}(r)(n,r);return t(pn,Object.assign({element:e.element,attributes:e.attributes,nodeType:e.element.nodeType,render:o},{children:e.children}))}),[p,n]),k=s((()=>e=>{const t=[],[r,o]=e;return p.forEach((o=>{const i=o.decorator;"function"==typeof i&&_.isElement(r)&&r.type===o.type&&t.push(...i(n)(e))})),n.selection&&!m.isEditor(r)&&""===m.string(n,[o[0]])&&O.includes(n.selection,o)&&O.isCollapsed(n.selection)&&t.push(Object.assign(Object.assign({},n.selection),{withPlaceholder:!0})),t}),[p,n]),P=s((()=>e=>{var r;const i=Object.assign({},e);let s;p.forEach((e=>{if(e.leaf){const t=e.leaf(n)(i);t&&(i.children=t)}})),a.forEach((e=>{i.leaf[e.type]&&(i.children=e.render(i))}));const l=null===(r=i.children.props)||void 0===r?void 0:r.parent;if(!function(e){var t,n;return 1!==(null===(t=null==e?void 0:e.children)||void 0===t?void 0:t.length)||0!==(null===(n=null==e?void 0:e.children[0])||void 0===n?void 0:n.text.length)}(l)){const e=h[null==l?void 0:l.type];s=null===(null==e?void 0:e.placeholder)?null:(null==e?void 0:e.placeholder)||o}return t(Jt,Object.assign({},i,{placeholder:s}))}),[p,n]),S=s((()=>{const e=p.map((e=>Object.keys(e.events||{}))).flat().filter(((e,t,n)=>n.indexOf(e)===t)),t={};return e.forEach((e=>{t[e]=function(t){p.forEach((r=>{var o;if(null===(o=r.events)||void 0===o?void 0:o[e]){r.events[e](n,jn)(t)}}))}})),t}),[p,n]),N=d((e=>{m.withoutNormalizing(n,(()=>{var t;if(!n.selection)return;const r=ct(Ke());null==a||a.forEach((t=>{t.hotkey&&Lt(t.hotkey)(e)&&(e.preventDefault(),dt(n,t.type,!1))})),null===(t=S.onKeyDown)||void 0===t||t.call(S,e);const o=m.above(n,{match:e=>!m.isEditor(e),mode:"lowest"});if(mn.isEnter(e)){if(e.isDefaultPrevented())return;e.preventDefault();const t=Object.keys(m.marks(n)||{});t.length>0&&t.forEach((e=>m.removeMark(n,e)));const i=b.parent(n.selection.anchor.path),a=m.string(n,i),s=o&&o[0].type!==r.type;if(s&&0===a.length)return void w.setNodes(n,r,{at:i});if(m.isStart(n,n.selection.anchor,n.selection.anchor.path)&&s){const[e]=o;return w.setNodes(n,r,{at:i}),w.delete(n,{unit:"block"}),w.insertNodes(n,He(e),{at:b.next(i)}),void w.select(n,{path:[b.next(n.selection.anchor.path)[0]+1,0],offset:0})}return w.splitNodes(n,{always:!0}),w.setNodes(n,r),void x(r)}if(mn.isShiftEnter(e)){if(e.isDefaultPrevented())return;e.preventDefault(),n.insertText("\n")}if(mn.isSelect(e)){if(e.isDefaultPrevented())return;e.preventDefault();const t=m.above(n,{at:n.selection.anchor.path,match:e=>!m.isEditor(e)&&_.isElement(e)});if(!t)return;const r=m.string(n,t[1]);return O.isExpanded(n.selection)||0===r.length?void w.select(n,[]):void w.select(n,t[1])}}))}),[]),D=s((()=>r.Children.count(u)>0?r.Children.map(u,(e=>r.isValidElement(e)?r.cloneElement(e,Object.assign(Object.assign({},e.props),{plugins:p,marks:a.map((e=>e.type)),editorRef:v,PLUGINS_MAP:h})):null)):null),[p,a,v.current]);return e("div",Object.assign({id:"yopta-editor",ref:v,onMouseDown:e=>{l||(e.preventDefault(),e.currentTarget===e.target&&n.selection&&m.withoutNormalizing(n,(()=>{const e=[n.children.length-1,0],t=wn(n,e,"highest"),r=m.string(n,e);console.log("lastNode",t),console.log("lastNodeText",r);const o={anchor:{path:e,offset:0},focus:{path:e,offset:0}};if("paragraph"===t.type&&0===r.length)return w.select(n,{path:o.anchor.path,offset:0}),x(t),f.focus(n);const i=ct(Ke());x(i),w.insertNodes(n,i,{at:[n.children.length],select:!0}),f.focus(n)})))}},{children:[D,t(g,Object.assign({id:"yopta-contenteditable",renderLeaf:P,renderElement:E,readOnly:j,decorate:k,onCopy:e=>{if(e.preventDefault(),!n.selection)return;if(O.isCollapsed(n.selection))return;const t=xn(m.fragment(n,n.selection),n.plugins);return e.clipboardData.setData("text/html",t),e.clipboardData},autoFocus:!0,spellCheck:!0},S,{onKeyDown:N,onMouseDown:e=>{var t;null===(t=S.onMouseDown)||void 0===t||t.call(S,e),(e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()})(e)}}))]}))};function En(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kn=new WeakMap,Pn=new WeakMap;class Sn{}class Nn extends Sn{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super();var{offset:t,path:n}=e;this.offset=t,this.path=n}}class Dn extends Sn{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super();var{offset:t,path:n}=e;this.offset=t,this.path=n}}var Cn=e=>Pn.get(e);function An(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?An(Object(n),!0).forEach((function(t){En(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):An(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bn=new WeakSet,Ln=e=>{var t=[],n=e=>{if(null!=e){var r=t[t.length-1];if("string"==typeof e){var o={text:e};Bn.add(o),e=o}if(j.isText(e)){var i=e;j.isText(r)&&Bn.has(r)&&Bn.has(i)&&j.equals(r,i,{loose:!0})?r.text+=i.text:t.push(i)}else if(_.isElement(e))t.push(e);else{if(!(e instanceof Sn))throw new Error("Unexpected hyperscript child object: ".concat(e));var a=t[t.length-1];j.isText(a)||(n(""),a=t[t.length-1]),e instanceof Nn?((e,t)=>{var n=e.text.length;kn.set(e,[n,t])})(a,e):e instanceof Dn&&((e,t)=>{var n=e.text.length;Pn.set(e,[n,t])})(a,e)}}};for(var r of e.flat(1/0))n(r);return t};function Mn(e,t,n){return Tn(Tn({},t),{},{children:Ln(n)})}function zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(n),!0).forEach((function(t){En(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Fn,Hn={anchor:function(e,t,n){return new Nn(t)},cursor:function(e,t,n){return[new Nn(t),new Dn(t)]},editor:(Fn=k,(e,t,n)=>{var r,o=[];for(var i of n)O.isRange(i)?r=i:o.push(i);var a,s=Ln(o),l={},c=Fn();for(var[d,u]of(Object.assign(c,t),c.children=s,E.texts(c))){var f=(a=d,kn.get(a)),p=Cn(d);if(null!=f){var[h]=f;l.anchor={path:u,offset:h}}if(null!=p){var[g]=p;l.focus={path:u,offset:g}}}if(l.anchor&&!l.focus)throw new Error("Slate hyperscript ranges must have both `<anchor />` and `<focus />` defined if one is defined, but you only defined `<anchor />`. For collapsed selections, use `<cursor />` instead.");if(!l.anchor&&l.focus)throw new Error("Slate hyperscript ranges must have both `<anchor />` and `<focus />` defined if one is defined, but you only defined `<focus />`. For collapsed selections, use `<cursor />` instead.");return null!=r?c.selection=r:O.isRange(l)&&(c.selection=l),c}),element:Mn,focus:function(e,t,n){return new Dn(t)},fragment:function(e,t,n){return Ln(n)},selection:function(e,t,n){var r=n.find((e=>e instanceof Nn)),o=n.find((e=>e instanceof Dn));if(!r||null==r.offset||null==r.path)throw new Error("The <selection> hyperscript tag must have an <anchor> tag as a child with `path` and `offset` attributes defined.");if(!o||null==o.offset||null==o.path)throw new Error("The <selection> hyperscript tag must have a <focus> tag as a child with `path` and `offset` attributes defined.");return Tn({anchor:{offset:r.offset,path:r.path},focus:{offset:o.offset,path:o.path}},t)},text:function(e,t,n){var r=Ln(n);if(r.length>1)throw new Error("The <text> hyperscript tag must only contain a single node's worth of children.");var[o]=r;if(null==o&&(o={text:""}),!j.isText(o))throw new Error("\n The <text> hyperscript tag can only contain text content as children.");return Bn.delete(o),Object.assign(o,t),o}},In=e=>function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];var a=e[t];if(!a)throw new Error("No hyperscript creator found for tag: <".concat(t,">"));return null==n&&(n={}),Rt(n)||(o=[n].concat(o),n={}),a(t,n,o=o.filter((e=>Boolean(e))).flat())},Wn=e=>{var t={},n=function(n){var r=e[n];if("object"!=typeof r)throw new Error("Properties specified for a hyperscript shorthand should be an object, but for the custom element <".concat(n,"> tag you passed: ").concat(r));t[n]=(e,t,n)=>Mn(0,Rn(Rn({},r),t),n)};for(var r in e)n(r);return t},Un=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{elements:t={}}=e,n=Wn(t),r=Rn(Rn(Rn({},Hn),n),e.creators);return In(r)}();const Vn={DEL:()=>({strikethrough:!0}),EM:()=>({italic:!0}),I:()=>({italic:!0}),S:()=>({strikethrough:!0}),STRONG:()=>({bold:!0}),U:()=>({underline:!0})},Kn=(e,t)=>{var n,r,o,i;if(3===e.nodeType)return e.textContent;if(1!==e.nodeType)return null;if("BR"===e.nodeName)return"\n";const{nodeName:a}=e;let s=e,l=Array.from(s.childNodes).map((e=>Kn(e,t))).flat();if(0===l.length&&(l=[{text:""}]),"BODY"===e.nodeName)return Un("fragment",{},l);if(t[a]){const s=t[a];if(s){let t=s.defineElement();if("function"==typeof(null===(r=null===(n=s.exports)||void 0===n?void 0:n.html.deserialize)||void 0===r?void 0:r.parse)){const n=null===(i=null===(o=s.exports)||void 0===o?void 0:o.html.deserialize)||void 0===i?void 0:i.parse(e);t=Object.assign(Object.assign({},t),{data:n})}return Un("element",t,l)}}if(j.isTextList(l))return Un("element",t.P.defineElement(),l);if(Vn[a]){const t=Vn[a](e);return l.map((e=>j.isText(e)?Un("text",t,e):e))}return l};function Zn(e,t){const n=function(e){const t={};return Object.keys(e).forEach((n=>{var r,o,i,a,s,l,c,d;const u=e[n];if(null===(o=null===(r=u.exports)||void 0===r?void 0:r.html.deserialize)||void 0===o?void 0:o.nodeName){if(Array.isArray(null===(a=null===(i=u.exports)||void 0===i?void 0:i.html.deserialize)||void 0===a?void 0:a.nodeName))return void(null===(l=null===(s=u.exports)||void 0===s?void 0:s.html.deserialize)||void 0===l||l.nodeName.forEach((e=>{t[e]=u})));t[null===(d=null===(c=u.exports)||void 0===c?void 0:c.html.deserialize)||void 0===d?void 0:d.nodeName]=u}})),t}(t),r=(new DOMParser).parseFromString(e,"text/html");return Kn(r.body,n)}const Gn=r.createContext({marks:{},plugins:{}}),$n=({children:e,plugins:n,marks:r})=>{const o=p(),i=s((()=>{const e=me(n),t={};return e.forEach((e=>{const{createElement:n,defineElement:r,type:o,options:i}=e;t[e.type]={createElement:n,defineElement:r,type:o,options:i}})),t}),[n]),a=e=>{const t=m.marks(o);return!!(null==t?void 0:t[e])},l=s((()=>{const e={};return r.forEach((t=>{e[t.type]={toggle:e=>((e,t=!1)=>{t&&Object.keys(m.marks(o)||{}).forEach((e=>{m.removeMark(o,e)})),a(e)?m.removeMark(o,e):m.addMark(o,e,!0)})(t.type,null==e?void 0:e.only),isActive:a(t.type)}})),e}),[r,o.selection]),c=s((()=>({plugins:i,marks:l})),[o.selection,l,i]);return t(Gn.Provider,Object.assign({value:c},{children:e}))},qn=()=>a(Gn),Yn=({key:e,value:n,plugins:r,marks:a,readOnly:l,children:c,onChange:u,placeholder:p,autoFocus:h=!0,shouldStoreInLocalStorage:g})=>{const P=function(e){return"object"==typeof e&&e.name?e.name:$t}(g),[S,N]=o((()=>function(e,t,n){const r=[{id:Ke(),type:"paragraph",children:[{text:""}]}],o=Gt(n)?n:r;if(!t)return localStorage.removeItem(e),o;try{const t=JSON.parse(localStorage.getItem(e)||"[]");return Gt(t)?t:o}catch(t){return localStorage.removeItem(e),r}}(P,g,n))),D=d((e=>{if(u(e),N(e),!g)return;if(B.operations.some((e=>"set_selection"!==e.type)))try{const t=JSON.stringify(e);localStorage.setItem(P,t)}catch(e){}}),[g]),C=s((()=>{const e=me(r),t=function(e){const t={};return e.forEach((e=>t[e.type]=e)),t}(e);return{yoptaPlugins:e,PLUGINS_MAP:t}}),[r]),{yoptaPlugins:A,PLUGINS_MAP:T}=C,B=s((()=>{let e=(e=>{const{insertData:t}=e;return e.insertData=n=>{if(e.selection&&O.isExpanded(e.selection))return;const r=n.getData("text/html");if(r){const t=Zn(r,e.plugins);w.insertFragment(e,t)}else t(n)},e})((e=>{const{deleteFragment:t}=e;return e.deleteFragment=()=>{const{selection:n}=e;if(!n)return;const[,r]=m.first(e,[0]),[,o]=m.last(e,[e.children.length-1]),i=m.range(e,r,o),a=O.equals(n,i);if(console.log({isAllNodesSelected:a,fullRange:i}),a)return w.removeNodes(e,{mode:"highest",hanging:!0}),void w.select(e,[0]);t()},e})((e=>{const{normalizeNode:t}=e;return e.normalizeNode=n=>{const[r]=n;if(m.isEditor(r)&&0===e.children.length){const t=ct(Ke());w.insertNodes(e,t,{at:[0]})}else t(n)},e})((e=>{const{insertBreak:t,deleteBackward:n}=e;return e.insertBreak=()=>{if(!e.selection||!O.isCollapsed(e.selection))return t();const n=b.parent(e.selection.anchor.path),r=E.get(e,n);_.isElement(r)&&m.isVoid(e,r)?m.insertNode(e,{id:Ke(),type:"paragraph",children:[{text:""}],nodeType:"block"}):t()},e.deleteBackward=t=>{if(!e.selection||!O.isCollapsed(e.selection)||0!==e.selection.anchor.offset)return n(t);const r=b.parent(e.selection.anchor.path),o=E.get(e,r);if(0===E.string(o).length&&b.hasPrevious(r)){const t=b.previous(r),n=E.get(e,t);if(_.isElement(n)&&m.isVoid(e,n))return w.removeNodes(e),w.select(e,t)}n(t)},e})((e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:e}=t,{redos:n}=e;if(n.length>0){var r=n[n.length-1];Wt.withoutSaving(t,(()=>{m.withoutNormalizing(t,(()=>{for(var e of r)t.apply(e)}))})),e.redos.pop(),e.undos.push(r)}},t.undo=()=>{var{history:e}=t,{undos:n}=e;if(n.length>0){var r=n[n.length-1];Wt.withoutSaving(t,(()=>{m.withoutNormalizing(t,(()=>{var e=r.map(x.inverse).reverse();for(var n of e)t.apply(n)}))})),e.redos.push(r),e.undos.pop()}},t.apply=e=>{var{operations:r,history:o}=t,{undos:i}=o,a=i[i.length-1],s=a&&a[a.length-1],l=Kt(e,s),c=Wt.isSaving(t),d=Wt.isMerging(t);if(null==c&&(c=Vt(e)),c){if(null==d&&(d=null!=a&&(0!==r.length||Ut(e,s)||l)),a&&d)l&&a.pop(),a.push(e);else{var u=[e];i.push(u)}for(;i.length>100;)i.shift();Zt(e)&&(o.redos=[])}n(e)},t})((e=>{const{insertText:t}=e;return e.insertText=n=>{var r,o;const{selection:i}=e;if(" "===n&&i&&O.isCollapsed(i)){const{anchor:a}=i,s=m.above(e,{match:t=>_.isElement(t)&&m.isBlock(e,t),mode:"lowest"});if(!s)return;const[,l]=s,c=m.parent(e,l),[d]=c;if(_.isElement(d)&&!j.isText(d.children[0]))return t(n);const u=s?l:[],f={anchor:a,focus:m.start(e,u)},p=m.string(e,f),h=null===(r=e.shortcuts)||void 0===r?void 0:r[p];if(h)return w.select(e,f),w.delete(e),void(null===(o=h.createElement)||void 0===o||o.call(h,e))}t(n)},e})(v(k())))))));e.plugins=T;const t={};return A.forEach((n=>{var r;n.shortcut&&(Array.isArray(n.shortcut)?n.shortcut.forEach((e=>t[e]=n)):t[n.shortcut]=n),e=(null===(r=n.extendEditor)||void 0===r?void 0:r.call(n,e))||e})),e.shortcuts=t,e}),[A]);return i((()=>{if(h)try{const[,e]=m.first(B,[0]);w.select(B,{anchor:{path:e,offset:0},focus:{path:e,offset:0}}),f.focus(B)}catch(e){}}),[h,B]),t(y,Object.assign({editor:B,value:S,onChange:D},{children:t($n,Object.assign({plugins:r,marks:a},{children:t(pt,{children:t(On,{editor:B,readOnly:l,placeholder:p,plugins:A,children:c,marks:a,PLUGINS_MAP:T})})}))}),e)},Jn=e=>t(Mt,{children:t(Yn,Object.assign({},e,{value:e.value,onChange:e.onChange}))});function Xn({type:e,hotkey:n,className:r}){return{type:e,hotkey:n,render:e=>t("span",Object.assign({},e.attributes,{className:r},{children:e.children}))}}const Qn={ElementOptions:_t,Overlay:Se};export{mn as HOTKEYS,Qn as UI_HELPERS,Jn as YoptaEditor,ve as YoptaPlugin,Xn as createYoptaMark,ye as createYoptaPlugin,_e as cx,He as deepClone,Ke as generateId,wn as getElementByPath,Bt as isCodeHotkey,bn as isElementActive,Tt as isHotkey,Lt as isKeyHotkey,Gt as isValidYoptaNodes,me as mergePlugins,ht as useElementSettings,qn as useYopta};
@@ -0,0 +1,104 @@
1
+ /// <reference types="react" />
2
+ export type EditorEventHandlers = {
3
+ onDOMBeforeInput?: (event: InputEvent) => void;
4
+ onCopy?: React.ClipboardEventHandler;
5
+ onCopyCapture?: React.ClipboardEventHandler;
6
+ onCut?: React.ClipboardEventHandler;
7
+ onCutCapture?: React.ClipboardEventHandler;
8
+ onPaste?: React.ClipboardEventHandler;
9
+ onPasteCapture?: React.ClipboardEventHandler;
10
+ onCompositionEnd?: React.CompositionEventHandler;
11
+ onCompositionEndCapture?: React.CompositionEventHandler;
12
+ onCompositionStart?: React.CompositionEventHandler;
13
+ onCompositionStartCapture?: React.CompositionEventHandler;
14
+ onCompositionUpdate?: React.CompositionEventHandler;
15
+ onCompositionUpdateCapture?: React.CompositionEventHandler;
16
+ onFocus?: React.FocusEventHandler;
17
+ onFocusCapture?: React.FocusEventHandler;
18
+ onBlur?: React.FocusEventHandler;
19
+ onBlurCapture?: React.FocusEventHandler;
20
+ onKeyDown?: React.KeyboardEventHandler;
21
+ onKeyDownCapture?: React.KeyboardEventHandler;
22
+ onKeyPress?: React.KeyboardEventHandler;
23
+ onKeyPressCapture?: React.KeyboardEventHandler;
24
+ onKeyUp?: React.KeyboardEventHandler;
25
+ onKeyUpCapture?: React.KeyboardEventHandler;
26
+ onClick?: React.MouseEventHandler;
27
+ onClickCapture?: React.MouseEventHandler;
28
+ onContextMenu?: React.MouseEventHandler;
29
+ onContextMenuCapture?: React.MouseEventHandler;
30
+ onDblClick?: React.MouseEventHandler;
31
+ onDblClickCapture?: React.MouseEventHandler;
32
+ onDrag?: React.DragEventHandler;
33
+ onDragCapture?: React.DragEventHandler;
34
+ onDragEnd?: React.DragEventHandler;
35
+ onDragEndCapture?: React.DragEventHandler;
36
+ onDragEnter?: React.DragEventHandler;
37
+ onDragEnterCapture?: React.DragEventHandler;
38
+ onDragExit?: React.DragEventHandler;
39
+ onDragExitCapture?: React.DragEventHandler;
40
+ onDragLeave?: React.DragEventHandler;
41
+ onDragLeaveCapture?: React.DragEventHandler;
42
+ onDragOver?: React.DragEventHandler;
43
+ onDragOverCapture?: React.DragEventHandler;
44
+ onDragStart?: React.DragEventHandler;
45
+ onDragStartCapture?: React.DragEventHandler;
46
+ onDrop?: React.DragEventHandler;
47
+ onDropCapture?: React.DragEventHandler;
48
+ onMouseDown?: React.MouseEventHandler;
49
+ onMouseDownCapture?: React.MouseEventHandler;
50
+ onMouseEnter?: React.MouseEventHandler;
51
+ onMouseEnterCapture?: React.MouseEventHandler;
52
+ onMouseLeave?: React.MouseEventHandler;
53
+ onMouseLeaveCapture?: React.MouseEventHandler;
54
+ onMouseMove?: React.MouseEventHandler;
55
+ onMouseMoveCapture?: React.MouseEventHandler;
56
+ onMouseOut?: React.MouseEventHandler;
57
+ onMouseOutCapture?: React.MouseEventHandler;
58
+ onMouseOver?: React.MouseEventHandler;
59
+ onMouseOverCapture?: React.MouseEventHandler;
60
+ onMouseUp?: React.MouseEventHandler;
61
+ onMouseUpCapture?: React.MouseEventHandler;
62
+ onSelect?: React.EventHandler<React.SyntheticEvent>;
63
+ onSelectCapture?: React.EventHandler<React.SyntheticEvent>;
64
+ onTouchCancel?: React.TouchEventHandler;
65
+ onTouchCancelCapture?: React.TouchEventHandler;
66
+ onTouchEnd?: React.TouchEventHandler;
67
+ onTouchEndCapture?: React.TouchEventHandler;
68
+ onTouchMove?: React.TouchEventHandler;
69
+ onTouchMoveCapture?: React.TouchEventHandler;
70
+ onTouchStart?: React.TouchEventHandler;
71
+ onTouchStartCapture?: React.TouchEventHandler;
72
+ onPointerOver?: React.PointerEventHandler;
73
+ onPointerOverCapture?: React.PointerEventHandler;
74
+ onPointerEnter?: React.PointerEventHandler;
75
+ onPointerEnterCapture?: React.PointerEventHandler;
76
+ onPointerDown?: React.PointerEventHandler;
77
+ onPointerDownCapture?: React.PointerEventHandler;
78
+ onPointerMove?: React.PointerEventHandler;
79
+ onPointerMoveCapture?: React.PointerEventHandler;
80
+ onPointerUp?: React.PointerEventHandler;
81
+ onPointerUpCapture?: React.PointerEventHandler;
82
+ onPointerCancel?: React.PointerEventHandler;
83
+ onPointerCancelCapture?: React.PointerEventHandler;
84
+ onPointerOut?: React.PointerEventHandler;
85
+ onPointerOutCapture?: React.PointerEventHandler;
86
+ onPointerLeave?: React.PointerEventHandler;
87
+ onPointerLeaveCapture?: React.PointerEventHandler;
88
+ onGotPointerCapture?: React.PointerEventHandler;
89
+ onGotPointerCaptureCapture?: React.PointerEventHandler;
90
+ onLostPointerCapture?: React.PointerEventHandler;
91
+ onLostPointerCaptureCapture?: React.PointerEventHandler;
92
+ onScroll?: React.UIEventHandler;
93
+ onScrollCapture?: React.UIEventHandler;
94
+ onWheel?: React.WheelEventHandler;
95
+ onWheelCapture?: React.WheelEventHandler;
96
+ onAnimationStart?: React.AnimationEventHandler;
97
+ onAnimationStartCapture?: React.AnimationEventHandler;
98
+ onAnimationEnd?: React.AnimationEventHandler;
99
+ onAnimationEndCapture?: React.AnimationEventHandler;
100
+ onAnimationIteration?: React.AnimationEventHandler;
101
+ onAnimationIterationCapture?: React.AnimationEventHandler;
102
+ onTransitionEnd?: React.TransitionEventHandler;
103
+ onTransitionEndCapture?: React.TransitionEventHandler;
104
+ };
@@ -0,0 +1,24 @@
1
+ import { BaseEditor, BaseElement } from 'slate';
2
+ import { ReactEditor, RenderElementProps as ElementProps } from 'slate-react';
3
+ import { HistoryEditor } from 'slate-history';
4
+ import { YoptaPluginType } from './utils/plugins';
5
+ export type EmptyText = {
6
+ text: string;
7
+ };
8
+ export type YoptaElementConfig = {
9
+ nodeType: 'block' | 'inline' | 'void';
10
+ };
11
+ export type Modify<T, R> = Omit<T, keyof R> & R;
12
+ export type YoptaBaseElement<T> = {
13
+ id: string;
14
+ type: T;
15
+ children: BaseElement['children'];
16
+ data?: any;
17
+ } & YoptaElementConfig;
18
+ export type RenderElementProps<T extends BaseElement = BaseElement> = ElementProps & {
19
+ element: T;
20
+ };
21
+ export interface YoEditor extends BaseEditor, ReactEditor, HistoryEditor {
22
+ shortcuts: Record<string, YoptaPluginType<string>>;
23
+ plugins: Record<YoptaBaseElement<string>['type'], YoptaPluginType<any, YoptaBaseElement<string>>>;
24
+ }
@@ -0,0 +1 @@
1
+ export declare function deepClone(object: any): any;
@@ -0,0 +1,4 @@
1
+ import { YoptaBaseElement } from '../types';
2
+ import { YoptaPluginType } from './plugins';
3
+ export declare function mergePluginTypesToMapHMTLNodeName(plugins: Record<YoptaBaseElement<string>['type'], YoptaPluginType<any, YoptaBaseElement<string>>>): Record<YoptaBaseElement<string>['type'], YoptaPluginType<any, YoptaBaseElement<string>>>;
4
+ export declare function deserializeHtml(htmlString: string, plugins: Record<YoptaBaseElement<string>['type'], YoptaPluginType<any, YoptaBaseElement<string>>>): any;
@@ -0,0 +1 @@
1
+ export declare const generateId: () => string;
@@ -0,0 +1,41 @@
1
+ import { KeyboardEvent } from 'react';
2
+ export declare const HOTKEYS: {
3
+ isBold: (event: KeyboardEvent) => boolean;
4
+ isCompose: (event: KeyboardEvent) => boolean;
5
+ isArrowLeft: (event: KeyboardEvent) => boolean;
6
+ isArrowRight: (event: KeyboardEvent) => boolean;
7
+ isArrowUp: (event: KeyboardEvent) => boolean;
8
+ isArrowDown: (event: KeyboardEvent) => boolean;
9
+ isDeleteBackward: (event: KeyboardEvent) => boolean;
10
+ isDeleteForward: (event: KeyboardEvent) => boolean;
11
+ isDeleteLineBackward: (event: KeyboardEvent) => boolean;
12
+ isDeleteLineForward: (event: KeyboardEvent) => boolean;
13
+ isDeleteWordBackward: (event: KeyboardEvent) => boolean;
14
+ isDeleteWordForward: (event: KeyboardEvent) => boolean;
15
+ isExtendBackward: (event: KeyboardEvent) => boolean;
16
+ isExtendForward: (event: KeyboardEvent) => boolean;
17
+ isExtendLineBackward: (event: KeyboardEvent) => boolean;
18
+ isExtendLineForward: (event: KeyboardEvent) => boolean;
19
+ isItalic: (event: KeyboardEvent) => boolean;
20
+ isMoveLineBackward: (event: KeyboardEvent) => boolean;
21
+ isMoveLineForward: (event: KeyboardEvent) => boolean;
22
+ isCtrlLeft: (event: KeyboardEvent) => boolean;
23
+ isCtrlRight: (event: KeyboardEvent) => boolean;
24
+ isRedo: (event: KeyboardEvent) => boolean;
25
+ isShiftEnter: (event: KeyboardEvent) => boolean;
26
+ isEnter: (event: KeyboardEvent) => boolean;
27
+ isTransposeCharacter: (event: KeyboardEvent) => boolean;
28
+ isUndo: (event: KeyboardEvent) => boolean;
29
+ isSpace: (event: KeyboardEvent) => boolean;
30
+ isSelect: (event: KeyboardEvent) => boolean;
31
+ isTab: (event: KeyboardEvent) => boolean;
32
+ isShiftTab: (event: KeyboardEvent) => boolean;
33
+ isBackspace: (event: KeyboardEvent) => boolean;
34
+ isCmdEnter: (event: KeyboardEvent) => boolean;
35
+ isCmd: (event: KeyboardEvent) => boolean;
36
+ isEscape: (event: KeyboardEvent) => boolean;
37
+ isKekceburek: (event: KeyboardEvent) => boolean;
38
+ };
39
+ export type HOTKEYS_TYPE = {
40
+ [key in keyof typeof HOTKEYS]: (event: KeyboardEvent) => boolean;
41
+ };
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { RenderLeafProps } from 'slate-react';
3
+ export type YoptaMark = {
4
+ type: string;
5
+ hotkey?: string;
6
+ render: (props: RenderLeafProps) => JSX.Element;
7
+ };
8
+ export type YoptaMarksConfig = {
9
+ type: string;
10
+ className: string;
11
+ hotkey?: string;
12
+ };
13
+ export declare function createYoptaMark({ type, hotkey, className }: YoptaMarksConfig): YoptaMark;
@@ -0,0 +1,5 @@
1
+ import { Path } from 'slate';
2
+ import { YoEditor } from '../types';
3
+ export declare const getMatchedNode: (editor: YoEditor, type: string) => false | import("slate").NodeEntry<import("slate").Node>;
4
+ export declare const isElementActive: (editor: YoEditor, type: string) => boolean;
5
+ export declare const getElementByPath: (editor: YoEditor, path?: Path, mode?: 'all' | 'highest' | 'lowest') => any;
@@ -0,0 +1,64 @@
1
+ import { ReactElement } from 'react';
2
+ import { Element, NodeEntry, Range } from 'slate';
3
+ import { RenderLeafProps } from 'slate-react';
4
+ import { YoEditor, RenderElementProps, YoptaBaseElement } from '../types';
5
+ import { EditorEventHandlers } from '../types/eventHandlers';
6
+ import { HOTKEYS_TYPE } from './hotkeys';
7
+ export type HandlersOptions = {
8
+ hotkeys: HOTKEYS_TYPE;
9
+ defaultNode: Element;
10
+ };
11
+ export type DecoratorFn = (nodeEntry: NodeEntry) => Range[];
12
+ export type YoptaPluginEventHandlers = {
13
+ [key in keyof EditorEventHandlers]: (editor: YoEditor, options: HandlersOptions) => EditorEventHandlers[key] | void;
14
+ };
15
+ export type YoptaPluginBaseOptions = Record<string, unknown>;
16
+ export type YoptaRenderElementFunc<P extends YoptaBaseElement<string> = YoptaBaseElement<string>> = (editor: YoEditor, plugin: YoptaPluginType) => (props: RenderElementProps<P>) => ReactElement;
17
+ export type YoptaRender<P extends YoptaBaseElement<string>> = YoptaRenderElementFunc<P>;
18
+ export type ExtendedYoptaRender<P extends YoptaBaseElement<string>> = {
19
+ editor: YoptaRenderElementFunc<P>;
20
+ render: (props: RenderElementProps<P>) => ReactElement;
21
+ };
22
+ export type YoptaRenderer<P extends YoptaBaseElement<string>> = ExtendedYoptaRender<P> | YoptaRender<P>;
23
+ type DeserializeHTML = {
24
+ nodeName: string | string[];
25
+ parse?: (el: HTMLElement) => any;
26
+ };
27
+ type Serializes<T, S> = {
28
+ serialize?: (node: T, text: string) => string;
29
+ deserialize?: S;
30
+ };
31
+ type Exports<T> = {
32
+ html: Serializes<T, DeserializeHTML>;
33
+ markdown: Serializes<T, {
34
+ mark: string;
35
+ parse: (mark: any) => any;
36
+ }>;
37
+ };
38
+ export type YoptaPluginType<O = YoptaPluginBaseOptions, P extends YoptaBaseElement<string> = YoptaBaseElement<string>> = {
39
+ type: string;
40
+ renderer: YoptaRenderer<P>;
41
+ shortcut?: string | string[];
42
+ decorator?: (editor: YoEditor) => DecoratorFn;
43
+ events?: YoptaPluginEventHandlers;
44
+ extendEditor?: (editor: YoEditor) => YoEditor;
45
+ leaf?: (editor: YoEditor) => (props: RenderLeafProps) => any;
46
+ placeholder?: string | null;
47
+ options?: O;
48
+ childPlugin?: YoptaPlugin<any, any>;
49
+ hasParent?: boolean;
50
+ createElement?: (editor: YoEditor) => void;
51
+ defineElement: () => P;
52
+ exports?: Exports<P>;
53
+ };
54
+ export type ParentYoptaPlugin<O = YoptaPluginBaseOptions> = Omit<YoptaPluginType<O>, 'childPlugin' | 'hasParent'>;
55
+ export declare class YoptaPlugin<O extends YoptaPluginBaseOptions, P extends YoptaBaseElement<string>> {
56
+ #private;
57
+ constructor(inputPlugin: YoptaPluginType<O, P>);
58
+ extend(overrides: Partial<YoptaPluginType<O, P>>): YoptaPlugin<O, P>;
59
+ get getPlugin(): YoptaPluginType<O, P>;
60
+ }
61
+ export declare function createYoptaPlugin<O extends YoptaPluginBaseOptions, P extends YoptaBaseElement<string>>(input: YoptaPluginType<O, P>): YoptaPlugin<O, P>;
62
+ export declare function mergePlugins<O extends YoptaPluginBaseOptions, P extends YoptaBaseElement<string>>(plugins: YoptaPlugin<O, P>[]): YoptaPluginType<O, P>[];
63
+ export declare function mergePluginTypesToMap(plugins: YoptaPluginType<any, YoptaBaseElement<string>>[]): Record<YoptaBaseElement<string>['type'], YoptaPluginType<any, YoptaBaseElement<string>>>;
64
+ export {};
@@ -0,0 +1,2 @@
1
+ import { Descendant } from 'slate';
2
+ export declare function serializeHtml(data: Descendant[], pluginsMap: any): string;
@@ -0,0 +1,6 @@
1
+ import { Descendant } from 'slate';
2
+ export type LOCAL_STORAGE_NAME_TYPE = boolean | {
3
+ name: string;
4
+ };
5
+ export declare function getStorageName(shouldStoreInLocalStorage?: LOCAL_STORAGE_NAME_TYPE): string;
6
+ export declare function getInitialState(storageName: string, shouldStoreInLocalStorage?: LOCAL_STORAGE_NAME_TYPE, value?: Descendant[]): Descendant[];
@@ -0,0 +1 @@
1
+ export declare function isValidYoptaNodes(nodes: any): boolean;
package/package.json ADDED
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "@yoopta/editor",
3
+ "version": "1.9.0-rc",
4
+ "license": "MIT",
5
+ "private": false,
6
+ "type": "module",
7
+ "main": "dist/index.js",
8
+ "module": "dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "files": [
11
+ "dist/"
12
+ ],
13
+ "scripts": {
14
+ "prebuild": "rm -rf dist",
15
+ "build:rollup": "rollup -c",
16
+ "build": "rollup -c --environment NODE_ENV:production",
17
+ "dev": "rm -rf dist && rollup -c -w --environment NODE_ENV:development --open",
18
+ "coverage": "vitest run --coverage",
19
+ "test": "vitest",
20
+ "test:ui": "vitest --ui",
21
+ "test:integration": "playwright test"
22
+ },
23
+ "dependencies": {
24
+ "body-scroll-lock": "^4.0.0-beta.0",
25
+ "classnames": "^2.3.1",
26
+ "copy-to-clipboard": "^3.3.2",
27
+ "is-hotkey": "^0.2.0",
28
+ "lodash.clonedeep": "^4.5.0",
29
+ "lodash.uniqwith": "^4.5.0",
30
+ "nanoid": "^4.0.1",
31
+ "slate-history": "^0.66.0",
32
+ "slate-hyperscript": "^0.77.0"
33
+ },
34
+ "peerDependencies": {
35
+ "react": ">=17.0.2",
36
+ "react-dom": ">=17.0.2",
37
+ "slate": ">=0.72.3",
38
+ "slate-react": ">=0.72.4"
39
+ },
40
+ "keywords": [
41
+ "contenteditable",
42
+ "docs",
43
+ "document",
44
+ "edit",
45
+ "editor",
46
+ "editable",
47
+ "html",
48
+ "markdown",
49
+ "medium",
50
+ "paper",
51
+ "react",
52
+ "rich",
53
+ "richtext",
54
+ "richtext",
55
+ "slate",
56
+ "text",
57
+ "notion",
58
+ "wysiwyg",
59
+ "wysiwym"
60
+ ],
61
+ "devDependencies": {
62
+ "@types/lodash.uniqwith": "^4.5.7"
63
+ },
64
+ "description": "<h2 align=\"center\">Yopta-Editor v1 🎉</h2> <p align=\"center\">Yopta-Editor - is an open source notion-like editor 💥</p> <div align=\"center\"> <img width=\"574\" alt=\"Screen Shot 2023-01-25 at 16 04 29\" src=\"https://user-images.githubusercontent.com/29093118/215324525-882bf403-646c-4267-bb5f-c0f37509ac09.png\"> </div>",
65
+ "repository": {
66
+ "type": "git",
67
+ "url": "git+https://github.com/Darginec05/Yopta-Editor.git"
68
+ },
69
+ "author": "https://github.com/Darginec05",
70
+ "bugs": {
71
+ "url": "https://github.com/Darginec05/Yopta-Editor/issues"
72
+ },
73
+ "homepage": "https://github.com/Darginec05/Yopta-Editor#readme"
74
+ }