@arkitektbedriftene/fe-lib 0.4.13 → 0.4.15

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.
@@ -1,34 +1,34 @@
1
- var Ft = Object.defineProperty;
2
- var Ht = (t, e, r) => e in t ? Ft(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var at = (t, e, r) => (Ht(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- import { createHeadlessEditor as Wt } from "@lexical/headless";
5
- import { $generateHtmlFromNodes as Ut } from "@lexical/html";
6
- import { $getRoot as j, ParagraphNode as jt, $createParagraphNode as K, $createTextNode as A, $setSelection as mt, SELECTION_CHANGE_COMMAND as F, $getSelection as L, COMMAND_PRIORITY_CRITICAL as J, $isRangeSelection as T, $isRootOrShadowRoot as Kt, DEPRECATED_$isGridSelection as G, FORMAT_TEXT_COMMAND as B, COMMAND_PRIORITY_LOW as w, KEY_ARROW_DOWN_COMMAND as Yt, KEY_ARROW_UP_COMMAND as qt, KEY_ESCAPE_COMMAND as kt, KEY_SPACE_COMMAND as Gt, $getNearestNodeFromDOMNode as V, KEY_ARROW_LEFT_COMMAND as Xt, $isElementNode as Qt, COMMAND_PRIORITY_NORMAL as Jt, $isParagraphNode as Vt, COMMAND_PRIORITY_HIGH as Zt } from "lexical";
7
- import { trimTextContentFromAnchor as te, $setBlocksType as X, $isAtNodeEnd as lt } from "@lexical/selection";
8
- import { AutoLinkNode as ee, LinkNode as bt, $isLinkNode as W, TOGGLE_LINK_COMMAND as Z } from "@lexical/link";
9
- import { ListNode as vt, ListItemNode as re, $isListNode as tt, INSERT_UNORDERED_LIST_COMMAND as ne, INSERT_ORDERED_LIST_COMMAND as oe, INSERT_CHECK_LIST_COMMAND as Ct, insertList as ie, $isListItemNode as z } from "@lexical/list";
10
- import { HeadingNode as ae, QuoteNode as le, $isHeadingNode as se, $createHeadingNode as ce, $createQuoteNode as de } from "@lexical/rich-text";
11
- import { TableNode as ue, TableRowNode as he, TableCellNode as pe, $getTableCellNodeFromLexicalNode as ge, $deleteTableColumn__EXPERIMENTAL as fe, $deleteTableRow__EXPERIMENTAL as me, $insertTableColumn__EXPERIMENTAL as st, $insertTableRow__EXPERIMENTAL as ct } from "@lexical/table";
12
- import { jsx as n, jsxs as m, Fragment as Y } from "react/jsx-runtime";
13
- import { createContext as ke, useState as b, useRef as et, useCallback as v, useContext as be, useEffect as N, useMemo as Mt, useLayoutEffect as ve } from "react";
14
- import { c as O, s as Lt, D as Tt, T as Ce, a as M, B as P, b as Nt, d as _, u as rt, e as yt, f as Me, g as Le, o as xt, h as Te, i as Et, j as St, F as wt, O as Rt, k as Ne, l as ye, S as xe, m as $, n as I, p as dt, q as Ee, N as Se, r as ut, t as we, v as It, C as Re, w as Ie, x as _e } from "./Checkbox-f4ea3f0b.js";
1
+ var Ht = Object.defineProperty;
2
+ var Wt = (t, e, r) => e in t ? Ht(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var lt = (t, e, r) => (Wt(t, typeof e != "symbol" ? e + "" : e, r), r);
4
+ import { createHeadlessEditor as Ut } from "@lexical/headless";
5
+ import { $generateHtmlFromNodes as jt } from "@lexical/html";
6
+ import { $getRoot as j, ParagraphNode as Kt, $createParagraphNode as K, $createTextNode as A, $setSelection as kt, SELECTION_CHANGE_COMMAND as F, $getSelection as L, COMMAND_PRIORITY_CRITICAL as J, $isRangeSelection as T, $isRootOrShadowRoot as Yt, DEPRECATED_$isGridSelection as G, FORMAT_TEXT_COMMAND as B, COMMAND_PRIORITY_LOW as w, KEY_ARROW_DOWN_COMMAND as qt, KEY_ARROW_UP_COMMAND as Gt, KEY_ESCAPE_COMMAND as bt, KEY_SPACE_COMMAND as Xt, $getNearestNodeFromDOMNode as V, KEY_ARROW_LEFT_COMMAND as Qt, $isElementNode as Jt, COMMAND_PRIORITY_NORMAL as Vt, $isParagraphNode as Zt, COMMAND_PRIORITY_HIGH as te } from "lexical";
7
+ import { trimTextContentFromAnchor as ee, $setBlocksType as X, $isAtNodeEnd as st } from "@lexical/selection";
8
+ import { AutoLinkNode as re, LinkNode as vt, $isLinkNode as W, TOGGLE_LINK_COMMAND as Z } from "@lexical/link";
9
+ import { ListNode as Ct, ListItemNode as ne, $isListNode as tt, INSERT_UNORDERED_LIST_COMMAND as oe, INSERT_ORDERED_LIST_COMMAND as ie, INSERT_CHECK_LIST_COMMAND as Mt, insertList as ae, $isListItemNode as _ } from "@lexical/list";
10
+ import { HeadingNode as le, QuoteNode as se, $isHeadingNode as ce, $createHeadingNode as de, $createQuoteNode as ue } from "@lexical/rich-text";
11
+ import { TableNode as he, TableRowNode as pe, TableCellNode as ge, INSERT_TABLE_COMMAND as fe, $getTableCellNodeFromLexicalNode as me, $deleteTableColumn__EXPERIMENTAL as ke, $deleteTableRow__EXPERIMENTAL as be, $insertTableColumn__EXPERIMENTAL as ct, $insertTableRow__EXPERIMENTAL as dt } from "@lexical/table";
12
+ import { jsx as n, jsxs as f, Fragment as Y } from "react/jsx-runtime";
13
+ import { createContext as ve, useState as b, useRef as et, useCallback as v, useContext as Ce, useEffect as N, useMemo as Lt, useLayoutEffect as Me } from "react";
14
+ import { c as O, s as Tt, D as rt, T as Nt, a as M, B as P, b as yt, d as z, u as nt, e as xt, f as Le, g as Te, o as Et, h as Ne, i as St, j as wt, F as Rt, O as It, k as ye, l as xe, S as Ee, m as $, n as I, p as ut, q as Se, N as we, r as ht, t as Re, v as zt, C as Ie, w as ze, x as _e } from "./Checkbox-38e85f9b.js";
15
15
  import "react-select";
16
- import { LexicalComposer as ze } from "@lexical/react/LexicalComposer.js";
17
- import { RichTextPlugin as $e } from "@lexical/react/LexicalRichTextPlugin.js";
18
- import Oe from "@lexical/react/LexicalErrorBoundary.js";
16
+ import { LexicalComposer as $e } from "@lexical/react/LexicalComposer.js";
17
+ import { RichTextPlugin as Oe } from "@lexical/react/LexicalRichTextPlugin.js";
18
+ import De from "@lexical/react/LexicalErrorBoundary.js";
19
19
  import { useLexicalComposerContext as y } from "@lexical/react/LexicalComposerContext.js";
20
- import { $getNearestNodeOfType as De, $findMatchingParent as _t, mergeRegister as nt, isHTMLElement as ht } from "@lexical/utils";
21
- import { G as p, f as Be } from "./index.esm-3266b7f8.js";
22
- import { ListPlugin as Ae } from "@lexical/react/LexicalListPlugin.js";
23
- import { HistoryPlugin as Pe } from "@lexical/react/LexicalHistoryPlugin.js";
24
- import { TablePlugin as Fe } from "@lexical/react/LexicalTablePlugin.js";
25
- import { TabIndentationPlugin as He } from "@lexical/react/LexicalTabIndentationPlugin.js";
20
+ import { $getNearestNodeOfType as Be, $findMatchingParent as _t, mergeRegister as ot, isHTMLElement as pt } from "@lexical/utils";
21
+ import { G as h, f as Ae } from "./index.esm-3266b7f8.js";
22
+ import { ListPlugin as Pe } from "@lexical/react/LexicalListPlugin.js";
23
+ import { HistoryPlugin as Fe } from "@lexical/react/LexicalHistoryPlugin.js";
24
+ import { TablePlugin as He } from "@lexical/react/LexicalTablePlugin.js";
25
+ import { TabIndentationPlugin as We } from "@lexical/react/LexicalTabIndentationPlugin.js";
26
26
  import "react-dom";
27
27
  import "@radix-ui/react-toolbar";
28
28
  import "@radix-ui/react-dialog";
29
29
  import "@radix-ui/react-dropdown-menu";
30
30
  import "@radix-ui/react-checkbox";
31
- const We = ({
31
+ const Ue = ({
32
32
  text: t,
33
33
  maxChars: e,
34
34
  maxLines: r
@@ -43,55 +43,55 @@ const We = ({
43
43
  t[a] === `
44
44
  ` && l++, a++;
45
45
  return t.slice(0, a).length;
46
- }, Ue = ({
46
+ }, je = ({
47
47
  editor: t,
48
48
  maxChars: e,
49
49
  maxLines: r
50
50
  }) => {
51
- const o = j(), i = o.getTextContent(), l = We({ text: i, maxChars: e, maxLines: r }), a = i.length - l, d = o.select().anchor;
52
- te(t, d, a);
51
+ const o = j(), i = o.getTextContent(), l = Ue({ text: i, maxChars: e, maxLines: r }), a = i.length - l, d = o.select().anchor;
52
+ ee(t, d, a);
53
53
  const c = o.getLastChild();
54
- return c instanceof jt && c.getChildrenSize() === 0 && c.remove(), a;
55
- }, zt = (t) => t[0] === "{", je = (t) => t !== null && typeof t == "object" && "isEmpty" in t, Ke = (t, e) => {
54
+ return c instanceof Kt && c.getChildrenSize() === 0 && c.remove(), a;
55
+ }, $t = (t) => t[0] === "{", Ke = (t) => t !== null && typeof t == "object" && "isEmpty" in t, Ye = (t, e) => {
56
56
  t.update(
57
57
  () => {
58
58
  const r = j();
59
59
  r.clear();
60
60
  const o = K();
61
- o.append(A("")), r.append(o), mt(null);
61
+ o.append(A("")), r.append(o), kt(null);
62
62
  },
63
63
  {
64
64
  tag: e
65
65
  }
66
66
  );
67
- }, Ye = (t, e, r) => {
67
+ }, qe = (t, e, r) => {
68
68
  e.update(
69
69
  () => {
70
70
  const o = j();
71
71
  o.clear();
72
72
  const i = K();
73
- i.append(A(t.trim())), o.append(i), mt(null);
73
+ i.append(A(t.trim())), o.append(i), kt(null);
74
74
  },
75
75
  {
76
76
  tag: r
77
77
  }
78
78
  ), e.blur();
79
- }, un = (t, e, r) => {
79
+ }, pn = (t, e, r) => {
80
80
  let o = 0;
81
- const i = Wt({
81
+ const i = Ut({
82
82
  nodes: e,
83
83
  editable: !1
84
84
  });
85
85
  if (t)
86
86
  try {
87
- if (typeof t == "string" && !zt(t))
87
+ if (typeof t == "string" && !$t(t))
88
88
  i.update(() => {
89
89
  const a = j(), s = K();
90
90
  s.append(A(t.trim())), a.append(s);
91
91
  });
92
92
  else {
93
93
  const a = i.parseEditorState(t, () => {
94
- o = Ue({
94
+ o = je({
95
95
  editor: i,
96
96
  maxLines: r == null ? void 0 : r.maxLines
97
97
  });
@@ -103,45 +103,45 @@ const We = ({
103
103
  }
104
104
  let l = "";
105
105
  return i.update(() => {
106
- l = Ut(i);
106
+ l = jt(i);
107
107
  }), { html: l, trimCount: o };
108
- }, hn = [
109
- ae,
108
+ }, gn = [
110
109
  le,
111
- vt,
110
+ se,
111
+ Ct,
112
+ ne,
112
113
  re,
113
- ee,
114
- bt,
115
- ue,
114
+ vt,
116
115
  he,
117
- pe
118
- ], qe = O({
116
+ pe,
117
+ ge
118
+ ], Ge = O({
119
119
  fontWeight: "bold"
120
- }), Ge = O({
121
- fontStyle: "italic"
122
120
  }), Xe = O({
123
- textDecoration: "underline"
121
+ fontStyle: "italic"
124
122
  }), Qe = O({
125
- listStyleType: "none"
123
+ textDecoration: "underline"
126
124
  }), Je = O({
125
+ listStyleType: "none"
126
+ }), Ve = O({
127
127
  borderLeft: "4px solid #ccc",
128
128
  color: "#666",
129
129
  fontStyle: "italic",
130
130
  margin: "1.5em 10px",
131
131
  padding: "0.5em 10px"
132
- }), Ve = {
133
- quote: Je().className,
132
+ }), Ze = {
133
+ quote: Ve().className,
134
134
  text: {
135
- bold: qe().className,
136
- italic: Ge().className,
137
- underline: Xe().className
135
+ bold: Ge().className,
136
+ italic: Xe().className,
137
+ underline: Qe().className
138
138
  },
139
139
  list: {
140
140
  nested: {
141
- listitem: Qe().className
141
+ listitem: Je().className
142
142
  }
143
143
  }
144
- }, $t = ke({ hasFocus: !1, editorRef: { current: null } }), Ze = ({ onBlur: t }) => {
144
+ }, Ot = ve({ hasFocus: !1, editorRef: { current: null } }), tr = ({ onBlur: t }) => {
145
145
  const [e, r] = b(!1), o = et(null), i = v(() => {
146
146
  r(!0), o.current && window.clearTimeout(o.current);
147
147
  }, []), l = v(() => {
@@ -156,62 +156,65 @@ const We = ({
156
156
  onBlur: l
157
157
  }
158
158
  };
159
- }, ot = () => be($t);
160
- function tr(t) {
161
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 5h6a3.5 3.5 0 0 1 0 7h-6z" } }, { tag: "path", attr: { d: "M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7" } }] })(t);
162
- }
159
+ }, it = () => Ce(Ot);
163
160
  function er(t) {
164
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 8l-4 4l4 4" } }, { tag: "path", attr: { d: "M17 8l4 4l-4 4" } }, { tag: "path", attr: { d: "M14 4l-4 16" } }] })(t);
161
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 5h6a3.5 3.5 0 0 1 0 7h-6z" } }, { tag: "path", attr: { d: "M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7" } }] })(t);
165
162
  }
166
163
  function rr(t) {
167
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 18v-8l-2 2" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
164
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 8l-4 4l4 4" } }, { tag: "path", attr: { d: "M17 8l4 4l-4 4" } }, { tag: "path", attr: { d: "M14 4l-4 16" } }] })(t);
168
165
  }
169
166
  function nr(t) {
170
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
167
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 18v-8l-2 2" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
171
168
  }
172
169
  function or(t) {
173
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 14a2 2 0 1 0 -2 -2" } }, { tag: "path", attr: { d: "M17 16a2 2 0 1 0 2 -2" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
170
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
174
171
  }
175
172
  function ir(t) {
176
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M20 18v-8l-4 6h5" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
173
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 14a2 2 0 1 0 -2 -2" } }, { tag: "path", attr: { d: "M17 16a2 2 0 1 0 2 -2" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
177
174
  }
178
175
  function ar(t) {
179
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17 18h2a2 2 0 1 0 0 -4h-2v-4h4" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
176
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M20 18v-8l-4 6h5" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
180
177
  }
181
178
  function lr(t) {
182
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z" } }, { tag: "path", attr: { d: "M21 12a2 2 0 1 0 -4 0v4" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
179
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17 18h2a2 2 0 1 0 0 -4h-2v-4h4" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
183
180
  }
184
181
  function sr(t) {
185
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M11 5l6 0" } }, { tag: "path", attr: { d: "M7 19l6 0" } }, { tag: "path", attr: { d: "M14 5l-4 14" } }] })(t);
182
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z" } }, { tag: "path", attr: { d: "M21 12a2 2 0 1 0 -4 0v4" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
186
183
  }
187
184
  function cr(t) {
188
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17.5 15.5m-3.5 0a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0" } }, { tag: "path", attr: { d: "M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5" } }, { tag: "path", attr: { d: "M3 13h7" } }, { tag: "path", attr: { d: "M21 12v7" } }] })(t);
185
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M11 5l6 0" } }, { tag: "path", attr: { d: "M7 19l6 0" } }, { tag: "path", attr: { d: "M14 5l-4 14" } }] })(t);
189
186
  }
190
187
  function dr(t) {
191
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" } }, { tag: "path", attr: { d: "M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" } }] })(t);
188
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17.5 15.5m-3.5 0a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0" } }, { tag: "path", attr: { d: "M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5" } }, { tag: "path", attr: { d: "M3 13h7" } }, { tag: "path", attr: { d: "M21 12v7" } }] })(t);
192
189
  }
193
190
  function ur(t) {
194
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M3.5 5.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M3.5 11.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M3.5 17.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M11 6l9 0" } }, { tag: "path", attr: { d: "M11 12l9 0" } }, { tag: "path", attr: { d: "M11 18l9 0" } }] })(t);
191
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" } }, { tag: "path", attr: { d: "M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" } }] })(t);
195
192
  }
196
193
  function hr(t) {
197
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M11 6h9" } }, { tag: "path", attr: { d: "M11 12h9" } }, { tag: "path", attr: { d: "M12 18h8" } }, { tag: "path", attr: { d: "M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4" } }, { tag: "path", attr: { d: "M6 10v-6l-2 2" } }] })(t);
194
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M3.5 5.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M3.5 11.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M3.5 17.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M11 6l9 0" } }, { tag: "path", attr: { d: "M11 12l9 0" } }, { tag: "path", attr: { d: "M11 18l9 0" } }] })(t);
198
195
  }
199
196
  function pr(t) {
200
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M9 6l11 0" } }, { tag: "path", attr: { d: "M9 12l11 0" } }, { tag: "path", attr: { d: "M9 18l11 0" } }, { tag: "path", attr: { d: "M5 6l0 .01" } }, { tag: "path", attr: { d: "M5 12l0 .01" } }, { tag: "path", attr: { d: "M5 18l0 .01" } }] })(t);
197
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M11 6h9" } }, { tag: "path", attr: { d: "M11 12h9" } }, { tag: "path", attr: { d: "M12 18h8" } }, { tag: "path", attr: { d: "M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4" } }, { tag: "path", attr: { d: "M6 10v-6l-2 2" } }] })(t);
201
198
  }
202
199
  function gr(t) {
203
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M10 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" } }, { tag: "path", attr: { d: "M19 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" } }] })(t);
200
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M9 6l11 0" } }, { tag: "path", attr: { d: "M9 12l11 0" } }, { tag: "path", attr: { d: "M9 18l11 0" } }, { tag: "path", attr: { d: "M5 6l0 .01" } }, { tag: "path", attr: { d: "M5 12l0 .01" } }, { tag: "path", attr: { d: "M5 18l0 .01" } }] })(t);
204
201
  }
205
202
  function fr(t) {
206
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M5 7l8 10m-8 0l8 -10" } }, { tag: "path", attr: { d: "M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2" } }] })(t);
203
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M10 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" } }, { tag: "path", attr: { d: "M19 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" } }] })(t);
207
204
  }
208
205
  function mr(t) {
209
- return p({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 5v5a5 5 0 0 0 10 0v-5" } }, { tag: "path", attr: { d: "M5 19h14" } }] })(t);
206
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M5 7l8 10m-8 0l8 -10" } }, { tag: "path", attr: { d: "M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2" } }] })(t);
207
+ }
208
+ function kr(t) {
209
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" } }, { tag: "path", attr: { d: "M4 10l16 0" } }, { tag: "path", attr: { d: "M10 4l0 16" } }] })(t);
210
+ }
211
+ function br(t) {
212
+ return h({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 5v5a5 5 0 0 0 10 0v-5" } }, { tag: "path", attr: { d: "M5 19h14" } }] })(t);
210
213
  }
211
- const kr = Lt("div", {
214
+ const vr = Tt("div", {
212
215
  width: "10rem",
213
216
  display: "flex"
214
- }), Ot = {
217
+ }), Dt = {
215
218
  bullet: "Punktliste",
216
219
  h1: "Overskrift 1",
217
220
  h2: "Overskrift 2",
@@ -223,22 +226,22 @@ const kr = Lt("div", {
223
226
  paragraph: "Normal",
224
227
  quote: "Sitat",
225
228
  check: "Avkrysningsliste"
226
- }, br = {
227
- bullet: /* @__PURE__ */ n(pr, { size: "1.25rem" }),
228
- h1: /* @__PURE__ */ n(rr, { size: "1.25rem" }),
229
- h2: /* @__PURE__ */ n(nr, { size: "1.25rem" }),
230
- h3: /* @__PURE__ */ n(or, { size: "1.25rem" }),
231
- h4: /* @__PURE__ */ n(ir, { size: "1.25rem" }),
232
- h5: /* @__PURE__ */ n(ar, { size: "1.25rem" }),
233
- h6: /* @__PURE__ */ n(lr, { size: "1.25rem" }),
234
- number: /* @__PURE__ */ n(hr, { size: "1.25rem" }),
235
- check: /* @__PURE__ */ n(ur, { size: "1.25rem" }),
236
- paragraph: /* @__PURE__ */ n(cr, { size: "1.25rem" }),
237
- quote: /* @__PURE__ */ n(gr, { size: "1.25rem" })
229
+ }, Cr = {
230
+ bullet: /* @__PURE__ */ n(gr, { size: "1.25rem" }),
231
+ h1: /* @__PURE__ */ n(nr, { size: "1.25rem" }),
232
+ h2: /* @__PURE__ */ n(or, { size: "1.25rem" }),
233
+ h3: /* @__PURE__ */ n(ir, { size: "1.25rem" }),
234
+ h4: /* @__PURE__ */ n(ar, { size: "1.25rem" }),
235
+ h5: /* @__PURE__ */ n(lr, { size: "1.25rem" }),
236
+ h6: /* @__PURE__ */ n(sr, { size: "1.25rem" }),
237
+ number: /* @__PURE__ */ n(pr, { size: "1.25rem" }),
238
+ check: /* @__PURE__ */ n(hr, { size: "1.25rem" }),
239
+ paragraph: /* @__PURE__ */ n(dr, { size: "1.25rem" }),
240
+ quote: /* @__PURE__ */ n(fr, { size: "1.25rem" })
238
241
  }, C = ({
239
242
  blockType: t
240
- }) => /* @__PURE__ */ m(Y, { children: [
241
- /* @__PURE__ */ n(P, { css: { display: "flex", flex: "0 0 auto" }, children: br[t] }),
243
+ }) => /* @__PURE__ */ f(Y, { children: [
244
+ /* @__PURE__ */ n(P, { css: { display: "flex", flex: "0 0 auto" }, children: Cr[t] }),
242
245
  /* @__PURE__ */ n(
243
246
  P,
244
247
  {
@@ -248,40 +251,40 @@ const kr = Lt("div", {
248
251
  textOverflow: "ellipsis",
249
252
  whiteSpace: "nowrap"
250
253
  },
251
- children: Ot[t]
254
+ children: Dt[t]
252
255
  }
253
256
  )
254
- ] }), vr = (t) => {
257
+ ] }), Mr = (t) => {
255
258
  if (!T(t))
256
259
  return null;
257
260
  const e = t.anchor.getNode();
258
261
  let r = e.getKey() === "root" ? e : _t(e, (o) => {
259
262
  const i = o.getParent();
260
- return i !== null && Kt(i);
263
+ return i !== null && Yt(i);
261
264
  });
262
265
  return r === null && (r = e.getTopLevelElementOrThrow()), {
263
266
  anchorNode: e,
264
267
  element: r
265
268
  };
266
- }, Cr = () => {
269
+ }, Lr = () => {
267
270
  const [t] = y(), [e, r] = b("paragraph");
268
271
  N(() => t.registerCommand(
269
272
  F,
270
273
  () => {
271
- const c = L(), g = vr(c);
274
+ const c = L(), g = Mr(c);
272
275
  if (!g)
273
276
  return !1;
274
- const { element: u, anchorNode: f } = g, S = u.getKey();
277
+ const { element: u, anchorNode: m } = g, S = u.getKey();
275
278
  if (t.getElementByKey(S) !== null)
276
279
  if (tt(u)) {
277
- const k = De(
278
- f,
279
- vt
280
+ const k = Be(
281
+ m,
282
+ Ct
280
283
  ), E = k ? k.getListType() : u.getListType();
281
284
  r(E);
282
285
  } else {
283
- const k = se(u) ? u.getTag() : u.getType();
284
- k in Ot && r(k);
286
+ const k = ce(u) ? u.getTag() : u.getType();
287
+ k in Dt && r(k);
285
288
  }
286
289
  return !1;
287
290
  },
@@ -290,14 +293,14 @@ const kr = Lt("div", {
290
293
  const o = (c) => {
291
294
  e !== c && t.update(() => {
292
295
  const g = L();
293
- (T(g) || G(g)) && (X(g, () => ce(c)), r(c));
296
+ (T(g) || G(g)) && (X(g, () => de(c)), r(c));
294
297
  });
295
298
  };
296
- return /* @__PURE__ */ n(kr, { children: /* @__PURE__ */ m(
297
- Tt,
299
+ return /* @__PURE__ */ n(vr, { children: /* @__PURE__ */ f(
300
+ rt,
298
301
  {
299
302
  trigger: /* @__PURE__ */ n(
300
- Ce,
303
+ Nt,
301
304
  {
302
305
  dropdown: !0,
303
306
  css: { display: "flex", width: "100%", overflow: "hidden" },
@@ -320,41 +323,41 @@ const kr = Lt("div", {
320
323
  /* @__PURE__ */ n(M, { onClick: () => o("h5"), children: /* @__PURE__ */ n(C, { blockType: "h5" }) }),
321
324
  /* @__PURE__ */ n(M, { onClick: () => o("h6"), children: /* @__PURE__ */ n(C, { blockType: "h6" }) }),
322
325
  /* @__PURE__ */ n(M, { onClick: () => {
323
- e !== "bullet" && (t.dispatchCommand(ne, void 0), r("bullet"));
326
+ e !== "bullet" && (t.dispatchCommand(oe, void 0), r("bullet"));
324
327
  }, children: /* @__PURE__ */ n(C, { blockType: "bullet" }) }),
325
328
  /* @__PURE__ */ n(M, { onClick: () => {
326
- e !== "number" && (t.dispatchCommand(oe, void 0), r("number"));
329
+ e !== "number" && (t.dispatchCommand(ie, void 0), r("number"));
327
330
  }, children: /* @__PURE__ */ n(C, { blockType: "number" }) }),
328
331
  /* @__PURE__ */ n(M, { onClick: () => {
329
- e !== "check" && (t.dispatchCommand(Ct, void 0), r("check"));
332
+ e !== "check" && (t.dispatchCommand(Mt, void 0), r("check"));
330
333
  }, children: /* @__PURE__ */ n(C, { blockType: "check" }) }),
331
334
  /* @__PURE__ */ n(M, { onClick: () => {
332
335
  e !== "quote" && t.update(() => {
333
336
  const c = L();
334
- (T(c) || G(c)) && (X(c, () => de()), r("quote"));
337
+ (T(c) || G(c)) && (X(c, () => ue()), r("quote"));
335
338
  });
336
339
  }, children: /* @__PURE__ */ n(C, { blockType: "quote" }) })
337
340
  ]
338
341
  }
339
342
  ) });
340
- }, Mr = () => {
343
+ }, Tr = () => {
341
344
  const [t] = y(), [e, r] = b(!1), [o, i] = b(!1), [l, a] = b(!1), [s, d] = b(!1), [c, g] = b(!1), u = v(() => {
342
- const h = L();
343
- T(h) && (r(h.hasFormat("bold")), i(h.hasFormat("italic")), a(h.hasFormat("underline")), d(h.hasFormat("code")), g(h.hasFormat("superscript")));
345
+ const p = L();
346
+ T(p) && (r(p.hasFormat("bold")), i(p.hasFormat("italic")), a(p.hasFormat("underline")), d(p.hasFormat("code")), g(p.hasFormat("superscript")));
344
347
  }, []);
345
- N(() => nt(
348
+ N(() => ot(
346
349
  t.registerCommand(
347
350
  F,
348
351
  () => (u(), !1),
349
352
  J
350
353
  ),
351
- t.registerUpdateListener(({ editorState: h }) => {
352
- h.read(() => {
354
+ t.registerUpdateListener(({ editorState: p }) => {
355
+ p.read(() => {
353
356
  u();
354
357
  });
355
358
  })
356
359
  ), [t, u]);
357
- const f = v(
360
+ const m = v(
358
361
  () => t.dispatchCommand(B, "bold"),
359
362
  [t]
360
363
  ), S = v(
@@ -369,84 +372,84 @@ const kr = Lt("div", {
369
372
  ), E = v(
370
373
  () => t.dispatchCommand(B, "superscript"),
371
374
  [t]
372
- ), D = Mt(() => {
373
- const h = [];
374
- return e && h.push("bold"), o && h.push("italic"), l && h.push("underline"), s && h.push("code"), c && h.push("superscript"), h;
375
+ ), D = Lt(() => {
376
+ const p = [];
377
+ return e && p.push("bold"), o && p.push("italic"), l && p.push("underline"), s && p.push("code"), c && p.push("superscript"), p;
375
378
  }, [e, o, l, s, c]);
376
- return /* @__PURE__ */ m(
377
- Nt,
379
+ return /* @__PURE__ */ f(
380
+ yt,
378
381
  {
379
382
  type: "multiple",
380
383
  "aria-label": "Tekstformattering",
381
384
  value: D,
382
385
  children: [
383
386
  /* @__PURE__ */ n(
384
- _,
387
+ z,
385
388
  {
386
- onClick: f,
389
+ onClick: m,
387
390
  title: "Fet tekst",
388
391
  value: "bold",
389
- children: /* @__PURE__ */ n(tr, { size: "1.25rem" })
392
+ children: /* @__PURE__ */ n(er, { size: "1.25rem" })
390
393
  }
391
394
  ),
392
395
  /* @__PURE__ */ n(
393
- _,
396
+ z,
394
397
  {
395
398
  onClick: S,
396
399
  title: "Kursiv tekst",
397
400
  value: "italic",
398
- children: /* @__PURE__ */ n(sr, { size: "1.25rem" })
401
+ children: /* @__PURE__ */ n(cr, { size: "1.25rem" })
399
402
  }
400
403
  ),
401
404
  /* @__PURE__ */ n(
402
- _,
405
+ z,
403
406
  {
404
407
  onClick: x,
405
408
  title: "Understreket tekst",
406
409
  value: "underline",
407
- children: /* @__PURE__ */ n(mr, { size: "1.25rem" })
410
+ children: /* @__PURE__ */ n(br, { size: "1.25rem" })
408
411
  }
409
412
  ),
410
413
  /* @__PURE__ */ n(
411
- _,
414
+ z,
412
415
  {
413
416
  onClick: k,
414
417
  title: "Kode",
415
418
  value: "code",
416
- children: /* @__PURE__ */ n(er, { size: "1.25rem" })
419
+ children: /* @__PURE__ */ n(rr, { size: "1.25rem" })
417
420
  }
418
421
  ),
419
422
  /* @__PURE__ */ n(
420
- _,
423
+ z,
421
424
  {
422
425
  onClick: E,
423
426
  title: "Superscript",
424
427
  value: "superscript",
425
- children: /* @__PURE__ */ n(fr, { size: "1.25rem" })
428
+ children: /* @__PURE__ */ n(mr, { size: "1.25rem" })
426
429
  }
427
430
  )
428
431
  ]
429
432
  }
430
433
  );
431
- }, Lr = ({ children: t }) => {
432
- const { hasFocus: e, editorRef: r } = ot(), o = e, [i, l] = b(o);
433
- ve(() => {
434
+ }, Nr = ({ children: t }) => {
435
+ const { hasFocus: e, editorRef: r } = it(), o = e, [i, l] = b(o);
436
+ Me(() => {
434
437
  l(o);
435
438
  }, [o]);
436
- const { context: a, refs: s, floatingStyles: d } = rt({
439
+ const { context: a, refs: s, floatingStyles: d } = nt({
437
440
  placement: "top",
438
- whileElementsMounted: yt,
441
+ whileElementsMounted: xt,
439
442
  middleware: [
440
- Me({
443
+ Le({
441
444
  apply: ({ rects: g, elements: u }) => {
442
445
  u.floating.style.minWidth = `${g.reference.width}px`;
443
446
  }
444
447
  }),
445
- Le(),
446
- xt({
448
+ Te(),
449
+ Et({
447
450
  mainAxis: 8
448
451
  }),
449
- Te({
452
+ Ne({
450
453
  padding: 8
451
454
  })
452
455
  ],
@@ -455,13 +458,13 @@ const kr = Lt("div", {
455
458
  elements: {
456
459
  reference: r.current
457
460
  }
458
- }), { getFloatingProps: c } = Et([
459
- St(a, {
461
+ }), { getFloatingProps: c } = St([
462
+ wt(a, {
460
463
  role: "dialog"
461
464
  })
462
465
  ]);
463
- return i ? /* @__PURE__ */ n(wt, { children: /* @__PURE__ */ n(
464
- Rt,
466
+ return i ? /* @__PURE__ */ n(Rt, { children: /* @__PURE__ */ n(
467
+ It,
465
468
  {
466
469
  ref: s.setFloating,
467
470
  style: d,
@@ -472,38 +475,38 @@ const kr = Lt("div", {
472
475
  overflow: "hidden",
473
476
  boxShadow: "$md"
474
477
  },
475
- children: /* @__PURE__ */ n(Tr, { children: t })
478
+ children: /* @__PURE__ */ n(yr, { children: t })
476
479
  }
477
480
  ) }) : null;
478
- }, Tr = ({
481
+ }, yr = ({
479
482
  children: t,
480
483
  ...e
481
- }) => /* @__PURE__ */ m(Ne, { "aria-label": "Formattering", ...e, children: [
482
- /* @__PURE__ */ n(Cr, {}),
483
- /* @__PURE__ */ n(ye, {}),
484
- /* @__PURE__ */ n(Mr, {}),
484
+ }) => /* @__PURE__ */ f(ye, { "aria-label": "Formattering", ...e, children: [
485
+ /* @__PURE__ */ n(Lr, {}),
486
+ /* @__PURE__ */ n(xe, {}),
487
+ /* @__PURE__ */ n(Tr, {}),
485
488
  t
486
489
  ] });
487
- function Nr() {
490
+ function xr() {
488
491
  const [t] = y();
489
- return N(() => nt(
492
+ return N(() => ot(
490
493
  t.registerCommand(
491
- Ct,
492
- () => (ie(t, "check"), !0),
494
+ Mt,
495
+ () => (ae(t, "check"), !0),
493
496
  w
494
497
  ),
495
498
  t.registerCommand(
496
- Yt,
497
- (e) => ft(e, t, !1),
499
+ qt,
500
+ (e) => mt(e, t, !1),
498
501
  w
499
502
  ),
500
503
  t.registerCommand(
501
- qt,
502
- (e) => ft(e, t, !0),
504
+ Gt,
505
+ (e) => mt(e, t, !0),
503
506
  w
504
507
  ),
505
508
  t.registerCommand(
506
- kt,
509
+ bt,
507
510
  (e) => {
508
511
  if (Q() != null) {
509
512
  const o = t.getRootElement();
@@ -514,18 +517,18 @@ function Nr() {
514
517
  w
515
518
  ),
516
519
  t.registerCommand(
517
- Gt,
520
+ Xt,
518
521
  (e) => {
519
522
  const r = Q();
520
523
  return r != null && t.isEditable() ? (t.update(() => {
521
524
  const o = V(r);
522
- z(o) && (e.preventDefault(), o.toggleChecked());
525
+ _(o) && (e.preventDefault(), o.toggleChecked());
523
526
  }), !0) : !1;
524
527
  },
525
528
  w
526
529
  ),
527
530
  t.registerCommand(
528
- Xt,
531
+ Qt,
529
532
  (e) => t.getEditorState().read(() => {
530
533
  const r = L();
531
534
  if (T(r) && r.isCollapsed()) {
@@ -533,9 +536,9 @@ function Nr() {
533
536
  if (i || o.offset === 0) {
534
537
  const l = o.getNode(), a = _t(
535
538
  l,
536
- (s) => Qt(s) && !s.isInline()
539
+ (s) => Jt(s) && !s.isInline()
537
540
  );
538
- if (z(a)) {
541
+ if (_(a)) {
539
542
  const s = a.getParent();
540
543
  if (tt(s) && s.getListType() === "check" && (i || a.getFirstDescendant() === l)) {
541
544
  const d = t.getElementByKey(a.__key);
@@ -550,16 +553,16 @@ function Nr() {
550
553
  w
551
554
  ),
552
555
  t.registerRootListener((e, r) => {
553
- e !== null && (e.addEventListener("click", pt), e.addEventListener("pointerdown", gt)), r !== null && (r.removeEventListener("click", pt), r.removeEventListener("pointerdown", gt));
556
+ e !== null && (e.addEventListener("click", gt), e.addEventListener("pointerdown", ft)), r !== null && (r.removeEventListener("click", gt), r.removeEventListener("pointerdown", ft));
554
557
  })
555
558
  ), [t]), null;
556
559
  }
557
- function Dt(t, e) {
560
+ function Bt(t, e) {
558
561
  const r = t.target;
559
- if (r === null || !ht(r))
562
+ if (r === null || !pt(r))
560
563
  return;
561
564
  const o = r.firstChild;
562
- if (o != null && ht(o) && (o.tagName === "UL" || o.tagName === "OL"))
565
+ if (o != null && pt(o) && (o.tagName === "UL" || o.tagName === "OL"))
563
566
  return;
564
567
  const i = r.parentNode;
565
568
  if (!i || i.__lexicalListType !== "check")
@@ -567,23 +570,23 @@ function Dt(t, e) {
567
570
  const l = t.pageX, a = r.getBoundingClientRect();
568
571
  (r.dir === "rtl" ? l < a.right && l > a.right - 20 : l > a.left && l < a.left + 20) && e();
569
572
  }
570
- function pt(t) {
571
- Dt(t, () => {
572
- const e = t.target, r = yr(e);
573
+ function gt(t) {
574
+ Bt(t, () => {
575
+ const e = t.target, r = Er(e);
573
576
  r != null && r.isEditable() && r.update(() => {
574
577
  if (t.target) {
575
578
  const o = V(e);
576
- z(o) && (e.focus(), o.toggleChecked());
579
+ _(o) && (e.focus(), o.toggleChecked());
577
580
  }
578
581
  });
579
582
  });
580
583
  }
581
- function gt(t) {
582
- Dt(t, () => {
584
+ function ft(t) {
585
+ Bt(t, () => {
583
586
  t.preventDefault();
584
587
  });
585
588
  }
586
- function yr(t) {
589
+ function Er(t) {
587
590
  let e = t;
588
591
  for (; e; ) {
589
592
  if (e.__lexicalEditor)
@@ -597,11 +600,11 @@ function Q() {
597
600
  return t != null && t.tagName === "LI" && t.parentNode != null && // @ts-ignore internal field
598
601
  t.parentNode.__lexicalListType === "check" ? t : null;
599
602
  }
600
- function xr(t, e) {
603
+ function Sr(t, e) {
601
604
  let r = e ? t.getPreviousSibling() : t.getNextSibling(), o = t;
602
- for (; r == null && z(o); )
605
+ for (; r == null && _(o); )
603
606
  o = o.getParentOrThrow().getParent(), o != null && (r = e ? o.getPreviousSibling() : o.getNextSibling());
604
- for (; z(r); ) {
607
+ for (; _(r); ) {
605
608
  const i = e ? r.getLastChild() : r.getFirstChild();
606
609
  if (!tt(i))
607
610
  return r;
@@ -609,13 +612,13 @@ function xr(t, e) {
609
612
  }
610
613
  return null;
611
614
  }
612
- function ft(t, e, r) {
615
+ function mt(t, e, r) {
613
616
  const o = Q();
614
617
  return o != null && e.update(() => {
615
618
  const i = V(o);
616
- if (!z(i))
619
+ if (!_(i))
617
620
  return;
618
- const l = xr(i, r);
621
+ const l = Sr(i, r);
619
622
  if (l != null) {
620
623
  l.selectStart();
621
624
  const a = e.getElementByKey(l.__key);
@@ -625,25 +628,25 @@ function ft(t, e, r) {
625
628
  }
626
629
  }), !1;
627
630
  }
628
- const Er = () => /* @__PURE__ */ m(Y, { children: [
629
- /* @__PURE__ */ n(Ae, {}),
630
- /* @__PURE__ */ n(Fe, {}),
631
+ const wr = () => /* @__PURE__ */ f(Y, { children: [
631
632
  /* @__PURE__ */ n(Pe, {}),
632
- /* @__PURE__ */ n(Nr, {}),
633
- /* @__PURE__ */ n(He, {})
634
- ] }), Sr = ({
633
+ /* @__PURE__ */ n(He, {}),
634
+ /* @__PURE__ */ n(Fe, {}),
635
+ /* @__PURE__ */ n(xr, {}),
636
+ /* @__PURE__ */ n(We, {})
637
+ ] }), Rr = ({
635
638
  state: t
636
639
  }) => {
637
640
  const [e] = y();
638
641
  return N(() => {
639
642
  if (t)
640
643
  try {
641
- if (je(t)) {
642
- t.isEmpty() ? Ke(e) : e.setEditorState(t);
644
+ if (Ke(t)) {
645
+ t.isEmpty() ? Ye(e) : e.setEditorState(t);
643
646
  return;
644
647
  }
645
- if (typeof t == "string" && !zt(t)) {
646
- Ye(t, e);
648
+ if (typeof t == "string" && !$t(t)) {
649
+ qe(t, e);
647
650
  return;
648
651
  }
649
652
  const r = e.parseEditorState(t);
@@ -652,7 +655,7 @@ const Er = () => /* @__PURE__ */ m(Y, { children: [
652
655
  console.error("Could not parse"), console.error(r);
653
656
  }
654
657
  }, []), null;
655
- }, wr = Lt("div", {
658
+ }, Ir = Tt("div", {
656
659
  border: "1px solid $borderDarker",
657
660
  borderRadius: "$md",
658
661
  position: "relative",
@@ -689,7 +692,7 @@ const Er = () => /* @__PURE__ */ m(Y, { children: [
689
692
  }
690
693
  }
691
694
  ]
692
- }), Rr = ({
695
+ }), zr = ({
693
696
  isLoading: t
694
697
  }) => /* @__PURE__ */ n(
695
698
  P,
@@ -701,9 +704,9 @@ const Er = () => /* @__PURE__ */ m(Y, { children: [
701
704
  right: "1rem",
702
705
  display: "flex"
703
706
  },
704
- children: /* @__PURE__ */ n(xe, {})
707
+ children: /* @__PURE__ */ n(Ee, {})
705
708
  }
706
- ), pn = ({
709
+ ), fn = ({
707
710
  isLoading: t,
708
711
  children: e,
709
712
  placeholderText: r,
@@ -717,32 +720,32 @@ const Er = () => /* @__PURE__ */ m(Y, { children: [
717
720
  defaultState: g,
718
721
  css: u
719
722
  }) => {
720
- const { hasFocus: f, attributes: S } = Ze({ onBlur: c }), x = et(null), k = Mt(() => ({ hasFocus: f, editorRef: x }), [f]);
721
- return /* @__PURE__ */ n($t.Provider, { value: k, children: /* @__PURE__ */ m(
722
- ze,
723
+ const { hasFocus: m, attributes: S } = tr({ onBlur: c }), x = et(null), k = Lt(() => ({ hasFocus: m, editorRef: x }), [m]);
724
+ return /* @__PURE__ */ n(Ot.Provider, { value: k, children: /* @__PURE__ */ f(
725
+ $e,
723
726
  {
724
727
  initialConfig: {
725
728
  namespace: "CommentEditor",
726
729
  onError: (E) => {
727
730
  console.error(E);
728
731
  },
729
- theme: Ve,
732
+ theme: Ze,
730
733
  nodes: o,
731
734
  editable: !0
732
735
  },
733
736
  children: [
734
- /* @__PURE__ */ m(
735
- wr,
737
+ /* @__PURE__ */ f(
738
+ Ir,
736
739
  {
737
740
  ref: x,
738
- hasFocus: f,
741
+ hasFocus: m,
739
742
  hideBorder: d,
740
743
  css: u,
741
744
  ...S,
742
745
  children: [
743
746
  l,
744
747
  /* @__PURE__ */ n(
745
- $e,
748
+ Oe,
746
749
  {
747
750
  contentEditable: s,
748
751
  placeholder: r ? /* @__PURE__ */ n(
@@ -759,22 +762,22 @@ const Er = () => /* @__PURE__ */ m(Y, { children: [
759
762
  children: r
760
763
  }
761
764
  ) : null,
762
- ErrorBoundary: Oe
765
+ ErrorBoundary: De
763
766
  }
764
767
  ),
765
- /* @__PURE__ */ n(Er, {}),
768
+ /* @__PURE__ */ n(wr, {}),
766
769
  i,
767
- /* @__PURE__ */ n(Rr, { isLoading: t }),
768
- !l && /* @__PURE__ */ n(Lr, { children: a })
770
+ /* @__PURE__ */ n(zr, { isLoading: t }),
771
+ !l && /* @__PURE__ */ n(Nr, { children: a })
769
772
  ]
770
773
  }
771
774
  ),
772
- /* @__PURE__ */ n(Sr, { state: g }),
775
+ /* @__PURE__ */ n(Rr, { state: g }),
773
776
  /* @__PURE__ */ n(Y, { children: e })
774
777
  ]
775
778
  }
776
779
  ) });
777
- }, gn = O({
780
+ }, mn = O({
778
781
  fontSize: "1rem",
779
782
  lineHeight: "1.5",
780
783
  "h1, h2, h3, h4, h5, h6": {
@@ -945,61 +948,81 @@ const Er = () => /* @__PURE__ */ m(Y, { children: [
945
948
  defaultVariants: {
946
949
  size: "md"
947
950
  }
948
- });
949
- function Ir(t) {
950
- return p({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "circle", attr: { cx: "256", cy: "256", r: "48" } }, { tag: "circle", attr: { cx: "416", cy: "256", r: "48" } }, { tag: "circle", attr: { cx: "96", cy: "256", r: "48" } }] })(t);
951
+ }), kn = () => {
952
+ const [t] = y(), e = v(() => {
953
+ t.dispatchCommand(fe, {
954
+ rows: "3",
955
+ columns: "3",
956
+ includeHeaders: !1
957
+ });
958
+ }, [t]);
959
+ return /* @__PURE__ */ n(
960
+ rt,
961
+ {
962
+ trigger: /* @__PURE__ */ n(Nt, { dropdown: !0, children: "Sett inn" }),
963
+ side: "bottom",
964
+ align: "end",
965
+ children: /* @__PURE__ */ f(M, { onClick: e, children: [
966
+ /* @__PURE__ */ n(kr, { size: "1.25rem" }),
967
+ " Tabell"
968
+ ] })
969
+ }
970
+ );
971
+ };
972
+ function _r(t) {
973
+ return h({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "circle", attr: { cx: "256", cy: "256", r: "48" } }, { tag: "circle", attr: { cx: "416", cy: "256", r: "48" } }, { tag: "circle", attr: { cx: "96", cy: "256", r: "48" } }] })(t);
951
974
  }
952
- const fn = () => {
953
- const [t] = y(), [e, r] = b(null), { hasFocus: o } = ot();
975
+ const bn = () => {
976
+ const [t] = y(), [e, r] = b(null), { hasFocus: o } = it();
954
977
  N(() => {
955
978
  !o && e && r(null);
956
979
  }, [o, e]);
957
- const { refs: i, floatingStyles: l } = rt({
980
+ const { refs: i, floatingStyles: l } = nt({
958
981
  placement: "top-end",
959
982
  open: !!e,
960
983
  elements: {
961
984
  reference: e
962
985
  },
963
- middleware: [xt({ mainAxis: -20, crossAxis: -2 })]
986
+ middleware: [Et({ mainAxis: -20, crossAxis: -2 })]
964
987
  });
965
988
  N(() => t.registerCommand(
966
989
  F,
967
990
  () => {
968
991
  const s = L();
969
992
  if (T(s)) {
970
- const d = s.anchor.getNode(), c = ge(d);
993
+ const d = s.anchor.getNode(), c = me(d);
971
994
  r(c ? t.getElementByKey(c.getKey()) : null);
972
995
  }
973
996
  return !1;
974
997
  },
975
- Jt
998
+ Vt
976
999
  ), [t]);
977
1000
  const a = (s) => () => {
978
1001
  t.update(() => {
979
1002
  switch (s) {
980
1003
  case "add-row-over":
981
- ct(!1);
1004
+ dt(!1);
982
1005
  break;
983
1006
  case "add-row-under":
984
- ct(!0);
1007
+ dt(!0);
985
1008
  break;
986
1009
  case "add-column-left":
987
- st(!1);
1010
+ ct(!1);
988
1011
  break;
989
1012
  case "add-column-right":
990
- st(!0);
1013
+ ct(!0);
991
1014
  break;
992
1015
  case "delete-row":
993
- me();
1016
+ be();
994
1017
  break;
995
1018
  case "delete-column":
996
- fe();
1019
+ ke();
997
1020
  break;
998
1021
  }
999
1022
  });
1000
1023
  };
1001
- return e ? /* @__PURE__ */ m(
1002
- Tt,
1024
+ return e ? /* @__PURE__ */ f(
1025
+ rt,
1003
1026
  {
1004
1027
  trigger: /* @__PURE__ */ n(
1005
1028
  $,
@@ -1010,32 +1033,32 @@ const fn = () => {
1010
1033
  ref: i.setFloating,
1011
1034
  style: l,
1012
1035
  css: { padding: "2px", width: "18px", height: "18px" },
1013
- children: /* @__PURE__ */ n(Ir, {})
1036
+ children: /* @__PURE__ */ n(_r, {})
1014
1037
  }
1015
1038
  ),
1016
1039
  children: [
1017
1040
  /* @__PURE__ */ n(I, { onClick: a("add-row-over"), children: "Legg til rad over" }),
1018
1041
  /* @__PURE__ */ n(I, { onClick: a("add-row-under"), children: "Legg til rad under" }),
1019
- /* @__PURE__ */ n(dt, {}),
1042
+ /* @__PURE__ */ n(ut, {}),
1020
1043
  /* @__PURE__ */ n(I, { onClick: a("add-column-left"), children: "Legg til kolumne venstre" }),
1021
1044
  /* @__PURE__ */ n(I, { onClick: a("add-column-right"), children: "Legg til kolumne høyre" }),
1022
- /* @__PURE__ */ n(dt, {}),
1045
+ /* @__PURE__ */ n(ut, {}),
1023
1046
  /* @__PURE__ */ n(I, { onClick: a("delete-row"), children: "Fjern rad" }),
1024
1047
  /* @__PURE__ */ n(I, { onClick: a("delete-column"), children: "Fjern kolumne" })
1025
1048
  ]
1026
1049
  }
1027
1050
  ) : null;
1028
1051
  };
1029
- function Bt(t) {
1052
+ function At(t) {
1030
1053
  let e = t;
1031
1054
  const r = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi, o = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
1032
1055
  return e = String(e).trim(), e.match(r) || e.match(o) ? e : "https://";
1033
1056
  }
1034
- function At(t) {
1057
+ function Pt(t) {
1035
1058
  const e = t.anchor, r = t.focus, o = t.anchor.getNode(), i = t.focus.getNode();
1036
- return o === i ? o : t.isBackward() ? lt(r) ? o : i : lt(e) ? o : i;
1059
+ return o === i ? o : t.isBackward() ? st(r) ? o : i : st(e) ? o : i;
1037
1060
  }
1038
- const mn = (t) => (R.baseURL = t, R), U = class extends bt {
1061
+ const vn = (t) => (R.baseURL = t, R), U = class extends vt {
1039
1062
  static getType() {
1040
1063
  return "rutine_link";
1041
1064
  }
@@ -1047,7 +1070,7 @@ const mn = (t) => (R.baseURL = t, R), U = class extends bt {
1047
1070
  return r.setAttribute("href", this.getURL()), r.classList.add("rutine-link"), r;
1048
1071
  }
1049
1072
  static importJSON(e) {
1050
- return Pt(e.url);
1073
+ return Ft(e.url);
1051
1074
  }
1052
1075
  exportJSON() {
1053
1076
  return {
@@ -1066,14 +1089,14 @@ const mn = (t) => (R.baseURL = t, R), U = class extends bt {
1066
1089
  }
1067
1090
  };
1068
1091
  let R = U;
1069
- at(R, "baseURL", "");
1070
- function Pt(t) {
1092
+ lt(R, "baseURL", "");
1093
+ function Ft(t) {
1071
1094
  return new R(t);
1072
1095
  }
1073
- function _r(t) {
1096
+ function $r(t) {
1074
1097
  return t instanceof R;
1075
1098
  }
1076
- const zr = ({ onClose: t }) => {
1099
+ const Or = ({ onClose: t }) => {
1077
1100
  const [e] = y(), r = v(
1078
1101
  (i) => {
1079
1102
  e.update(() => {
@@ -1082,23 +1105,23 @@ const zr = ({ onClose: t }) => {
1082
1105
  const a = l.getNodes();
1083
1106
  if (a.length === 1) {
1084
1107
  const s = a[0];
1085
- Vt(s) && s.getChildren().length === 0 && l.insertText(i);
1108
+ Zt(s) && s.getChildren().length === 0 && l.insertText(i);
1086
1109
  }
1087
1110
  }
1088
- }), e.dispatchCommand(Z, Bt(i));
1111
+ }), e.dispatchCommand(Z, At(i));
1089
1112
  },
1090
1113
  [e]
1091
1114
  );
1092
- return /* @__PURE__ */ m("form", { onSubmit: (i) => {
1115
+ return /* @__PURE__ */ f("form", { onSubmit: (i) => {
1093
1116
  r(i.target.url.value), t();
1094
1117
  }, children: [
1095
- /* @__PURE__ */ n(we, { name: "url", label: "URL", type: "url", required: !0 }),
1096
- /* @__PURE__ */ m(It, { children: [
1118
+ /* @__PURE__ */ n(Re, { name: "url", label: "URL", type: "url", required: !0 }),
1119
+ /* @__PURE__ */ f(zt, { children: [
1097
1120
  /* @__PURE__ */ n($, { onClick: t, children: "Avbryt" }),
1098
1121
  /* @__PURE__ */ n($, { type: "submit", variant: "primary", children: "Lagre" })
1099
1122
  ] })
1100
1123
  ] });
1101
- }, $r = ({ onClose: t, getDocs: e }) => {
1124
+ }, Dr = ({ onClose: t, getDocs: e }) => {
1102
1125
  const [r] = y(), [o, i] = b([]), l = e(), a = v(
1103
1126
  (s) => {
1104
1127
  r.update(() => {
@@ -1106,8 +1129,8 @@ const zr = ({ onClose: t }) => {
1106
1129
  if (T(d)) {
1107
1130
  const c = [];
1108
1131
  for (const [g, u] of s.entries()) {
1109
- const f = Pt(u.value);
1110
- f.append(A(u.label)), c.push(f), g !== s.length - 1 && c.push(A(" "));
1132
+ const m = Ft(u.value);
1133
+ m.append(A(u.label)), c.push(m), g !== s.length - 1 && c.push(A(" "));
1111
1134
  }
1112
1135
  d.insertNodes(c);
1113
1136
  }
@@ -1115,9 +1138,9 @@ const zr = ({ onClose: t }) => {
1115
1138
  },
1116
1139
  [r]
1117
1140
  );
1118
- return /* @__PURE__ */ m(Y, { children: [
1119
- /* @__PURE__ */ n(Re, { multi: !0, options: l, onChange: i }),
1120
- /* @__PURE__ */ m(It, { children: [
1141
+ return /* @__PURE__ */ f(Y, { children: [
1142
+ /* @__PURE__ */ n(Ie, { multi: !0, options: l, onChange: i }),
1143
+ /* @__PURE__ */ f(zt, { children: [
1121
1144
  /* @__PURE__ */ n($, { onClick: t, children: "Avbryt" }),
1122
1145
  /* @__PURE__ */ n(
1123
1146
  $,
@@ -1131,7 +1154,7 @@ const zr = ({ onClose: t }) => {
1131
1154
  )
1132
1155
  ] })
1133
1156
  ] });
1134
- }, Or = ({
1157
+ }, Br = ({
1135
1158
  open: t,
1136
1159
  onOpenChange: e,
1137
1160
  getDocs: r
@@ -1139,19 +1162,19 @@ const zr = ({ onClose: t }) => {
1139
1162
  const [o, i] = b("url"), l = () => {
1140
1163
  e(!1);
1141
1164
  };
1142
- return /* @__PURE__ */ m(Ee, { open: t, onOpenChange: e, css: { width: "600px" }, children: [
1143
- /* @__PURE__ */ m(Se, { css: { marginBottom: "$8" }, children: [
1144
- /* @__PURE__ */ n(ut, { active: o === "url", onClick: () => i("url"), children: "URL" }),
1145
- /* @__PURE__ */ n(ut, { active: o === "rutine", onClick: () => i("rutine"), children: "Rutine" })
1165
+ return /* @__PURE__ */ f(Se, { open: t, onOpenChange: e, css: { width: "600px" }, children: [
1166
+ /* @__PURE__ */ f(we, { css: { marginBottom: "$8" }, children: [
1167
+ /* @__PURE__ */ n(ht, { active: o === "url", onClick: () => i("url"), children: "URL" }),
1168
+ /* @__PURE__ */ n(ht, { active: o === "rutine", onClick: () => i("rutine"), children: "Rutine" })
1146
1169
  ] }),
1147
- o === "url" && /* @__PURE__ */ n(zr, { onClose: l }),
1148
- o === "rutine" && /* @__PURE__ */ n($r, { onClose: l, getDocs: r })
1170
+ o === "url" && /* @__PURE__ */ n(Or, { onClose: l }),
1171
+ o === "rutine" && /* @__PURE__ */ n(Dr, { onClose: l, getDocs: r })
1149
1172
  ] });
1150
- }, kn = ({ getDocs: t }) => {
1173
+ }, Cn = ({ getDocs: t }) => {
1151
1174
  const [e] = y(), [r, o] = b(!1), [i, l] = b(!1), a = v(() => {
1152
1175
  const s = L();
1153
1176
  if (T(s)) {
1154
- const d = At(s), c = d.getParent();
1177
+ const d = Pt(s), c = d.getParent();
1155
1178
  o(W(c) || W(d));
1156
1179
  }
1157
1180
  }, []);
@@ -1159,20 +1182,20 @@ const zr = ({ onClose: t }) => {
1159
1182
  F,
1160
1183
  () => (a(), !1),
1161
1184
  J
1162
- ), [e, a]), /* @__PURE__ */ m(Nt, { type: "single", value: r ? "link" : "", children: [
1185
+ ), [e, a]), /* @__PURE__ */ f(yt, { type: "single", value: r ? "link" : "", children: [
1163
1186
  /* @__PURE__ */ n(
1164
- _,
1187
+ z,
1165
1188
  {
1166
1189
  onClick: () => {
1167
1190
  r ? e.dispatchCommand(Z, null) : l(!0);
1168
1191
  },
1169
1192
  title: "Lenke",
1170
1193
  value: "link",
1171
- children: /* @__PURE__ */ n(dr, { size: "1.25rem" })
1194
+ children: /* @__PURE__ */ n(ur, { size: "1.25rem" })
1172
1195
  }
1173
1196
  ),
1174
1197
  /* @__PURE__ */ n(
1175
- Or,
1198
+ Br,
1176
1199
  {
1177
1200
  open: i,
1178
1201
  onOpenChange: l,
@@ -1180,67 +1203,67 @@ const zr = ({ onClose: t }) => {
1180
1203
  }
1181
1204
  )
1182
1205
  ] });
1183
- }, bn = () => {
1184
- const [t] = y(), e = et(null), [r, o] = b(null), [i, l] = b(""), { hasFocus: a } = ot();
1206
+ }, Mn = () => {
1207
+ const [t] = y(), e = et(null), [r, o] = b(null), [i, l] = b(""), { hasFocus: a } = it();
1185
1208
  N(() => {
1186
1209
  r ? t.update(() => {
1187
1210
  l(r.getURL());
1188
1211
  }) : l("");
1189
1212
  }, [t, r]);
1190
- const s = !!(r && i && a), { refs: d, floatingStyles: c, context: g } = rt({
1213
+ const s = !!(r && i && a), { refs: d, floatingStyles: c, context: g } = nt({
1191
1214
  placement: "top",
1192
1215
  strategy: "fixed",
1193
1216
  open: s,
1194
- whileElementsMounted: yt,
1217
+ whileElementsMounted: xt,
1195
1218
  elements: {
1196
1219
  reference: e.current
1197
1220
  },
1198
- middleware: [Ie()]
1199
- }), { getFloatingProps: u } = Et([
1200
- St(g),
1221
+ middleware: [ze()]
1222
+ }), { getFloatingProps: u } = St([
1223
+ wt(g),
1201
1224
  _e(g)
1202
- ]), f = v(() => {
1225
+ ]), m = v(() => {
1203
1226
  var E;
1204
1227
  const k = L();
1205
1228
  if (T(k)) {
1206
- const D = At(k), h = D.getParent();
1229
+ const D = Pt(k), p = D.getParent();
1207
1230
  let H = null;
1208
- if (W(h) ? H = h : W(D) && (H = D), H) {
1209
- const q = window.getSelection(), it = t.getRootElement();
1210
- k !== null && q !== null && it !== null && it.contains(q.anchorNode) && t.isEditable() && (e.current = ((E = q.focusNode) == null ? void 0 : E.parentElement) ?? null);
1231
+ if (W(p) ? H = p : W(D) && (H = D), H) {
1232
+ const q = window.getSelection(), at = t.getRootElement();
1233
+ k !== null && q !== null && at !== null && at.contains(q.anchorNode) && t.isEditable() && (e.current = ((E = q.focusNode) == null ? void 0 : E.parentElement) ?? null);
1211
1234
  }
1212
1235
  o(H);
1213
1236
  }
1214
1237
  }, [t]), S = v(() => {
1215
- r && _r(r) && t.update(() => {
1238
+ r && $r(r) && t.update(() => {
1216
1239
  r.remove();
1217
1240
  }), t.dispatchCommand(Z, null);
1218
1241
  }, [t, r]);
1219
1242
  if (N(() => {
1220
1243
  t.getEditorState().read(() => {
1221
- f();
1244
+ m();
1222
1245
  });
1223
- }, [t, f]), N(() => nt(
1246
+ }, [t, m]), N(() => ot(
1224
1247
  t.registerUpdateListener(({ editorState: k }) => {
1225
1248
  k.read(() => {
1226
- f();
1249
+ m();
1227
1250
  });
1228
1251
  }),
1229
1252
  t.registerCommand(
1230
1253
  F,
1231
- () => (f(), !0),
1254
+ () => (m(), !0),
1232
1255
  w
1233
1256
  ),
1234
1257
  t.registerCommand(
1235
- kt,
1258
+ bt,
1236
1259
  () => r ? (o(null), !0) : !1,
1237
- Zt
1260
+ te
1238
1261
  )
1239
- ), [t, f, r]), !s)
1262
+ ), [t, m, r]), !s)
1240
1263
  return null;
1241
- const x = Bt(i);
1242
- return /* @__PURE__ */ n(wt, { children: /* @__PURE__ */ m(
1243
- Rt,
1264
+ const x = At(i);
1265
+ return /* @__PURE__ */ n(Rt, { children: /* @__PURE__ */ f(
1266
+ It,
1244
1267
  {
1245
1268
  ref: d.setFloating,
1246
1269
  css: {
@@ -1271,30 +1294,31 @@ const zr = ({ onClose: t }) => {
1271
1294
  children: i
1272
1295
  }
1273
1296
  ),
1274
- /* @__PURE__ */ n($, { color: "danger", icon: !0, size: "sm", onClick: S, children: /* @__PURE__ */ n(Be, { size: 24 }) })
1297
+ /* @__PURE__ */ n($, { color: "danger", icon: !0, size: "sm", onClick: S, children: /* @__PURE__ */ n(Ae, { size: 24 }) })
1275
1298
  ]
1276
1299
  }
1277
1300
  ) });
1278
1301
  };
1279
1302
  export {
1280
- Pt as $createRutineLinkNode,
1281
- _r as $isRutineLinkNode,
1282
- Lr as FloatingToolbar,
1283
- bn as LinkEditPlugin,
1284
- kn as LinkToolbarButton,
1285
- pn as RichTextEditor,
1286
- Tr as RichTextToolbar,
1303
+ Ft as $createRutineLinkNode,
1304
+ $r as $isRutineLinkNode,
1305
+ Nr as FloatingToolbar,
1306
+ kn as InsertSelector,
1307
+ Mn as LinkEditPlugin,
1308
+ Cn as LinkToolbarButton,
1309
+ fn as RichTextEditor,
1310
+ yr as RichTextToolbar,
1287
1311
  R as RutineLinkNode,
1288
- mn as RutineLinkNodeInit,
1289
- fn as TableEditPlugin,
1290
- Ke as clearEditorState,
1291
- hn as defaultNodes,
1292
- je as isEditorState,
1293
- zt as isJSON,
1294
- $t as richTextContext,
1295
- gn as richTextCss,
1296
- Ye as setStateFromPlainText,
1297
- un as stateToHTML,
1298
- Ze as useHasFocusWithin,
1299
- ot as useRichTextContext
1312
+ vn as RutineLinkNodeInit,
1313
+ bn as TableEditPlugin,
1314
+ Ye as clearEditorState,
1315
+ gn as defaultNodes,
1316
+ Ke as isEditorState,
1317
+ $t as isJSON,
1318
+ Ot as richTextContext,
1319
+ mn as richTextCss,
1320
+ qe as setStateFromPlainText,
1321
+ pn as stateToHTML,
1322
+ tr as useHasFocusWithin,
1323
+ it as useRichTextContext
1300
1324
  };