@arkitektbedriftene/fe-lib 1.4.1 → 2.0.0

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,55 +1,56 @@
1
- var Jt = Object.defineProperty;
2
- var Xt = (t, e, r) => e in t ? Jt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var ht = (t, e, r) => (Xt(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- import { createHeadlessEditor as Qt } from "@lexical/headless";
5
- import { $generateHtmlFromNodes as Vt } from "@lexical/html";
6
- import { $getRoot as q, ParagraphNode as Zt, $createParagraphNode as Y, $createTextNode as I, $setSelection as G, SELECTION_CHANGE_COMMAND as F, $getSelection as T, COMMAND_PRIORITY_CRITICAL as tt, $isRangeSelection as L, $isRootOrShadowRoot as te, FORMAT_TEXT_COMMAND as D, COMMAND_PRIORITY_LOW as _, KEY_ARROW_DOWN_COMMAND as ee, KEY_ARROW_UP_COMMAND as re, KEY_ESCAPE_COMMAND as Mt, KEY_SPACE_COMMAND as ne, $getNearestNodeFromDOMNode as et, KEY_ARROW_LEFT_COMMAND as oe, $isElementNode as ie, COMMAND_PRIORITY_NORMAL as ae, $createRangeSelection as Tt, COMMAND_PRIORITY_HIGH as le } from "lexical";
7
- import { trimTextContentFromAnchor as se, $setBlocksType as Q, $isAtNodeEnd as pt } from "@lexical/selection";
8
- import { LinkNode as $, AutoLinkNode as Lt, $isLinkNode as W, TOGGLE_LINK_COMMAND as J } from "@lexical/link";
9
- import { ListNode as rt, ListItemNode as yt, $isListNode as nt, INSERT_UNORDERED_LIST_COMMAND as ce, INSERT_ORDERED_LIST_COMMAND as de, INSERT_CHECK_LIST_COMMAND as xt, insertList as ue, $isListItemNode as A } from "@lexical/list";
10
- import { HeadingNode as Nt, QuoteNode as St, $isHeadingNode as he, $createHeadingNode as pe, $createQuoteNode as ge } from "@lexical/rich-text";
11
- import { TableNode as wt, TableRowNode as Et, TableCellNode as _t, INSERT_TABLE_COMMAND as fe, $getTableCellNodeFromLexicalNode as me, $deleteTableColumn__EXPERIMENTAL as ke, $deleteTableRow__EXPERIMENTAL as be, $insertTableColumn__EXPERIMENTAL as gt, $insertTableRow__EXPERIMENTAL as ft } from "@lexical/table";
12
- import { jsx as n, jsxs as p, Fragment as H } from "react/jsx-runtime";
13
- import { createContext as ve, useState as k, useRef as ot, useCallback as v, useContext as Ce, useEffect as x, useMemo as Rt, useLayoutEffect as Me } from "react";
14
- import { DropdownMenu as it, ToolbarButton as It, DropdownMenuIconItem as M, Box as P, ToolbarToggleGroup as zt, ToolbarToggleItem as O, OverlayCard as Ot, Toolbar as Te, ToolbarSeparator as Le, styled as ye, Spinner as $t, Button as w, DropdownMenuItem as z, DropdownMenuSeparator as mt, Dialog as xe, NavBar as Ne, NavBarItem as V, TextInput as Se, DialogActions as at, Combobox as we } from "./ui.es.js";
15
- import { LexicalComposer as Ee } from "@lexical/react/LexicalComposer.js";
16
- import { RichTextPlugin as _e } from "@lexical/react/LexicalRichTextPlugin.js";
17
- import Re from "@lexical/react/LexicalErrorBoundary.js";
18
- import { useFloating as lt, autoUpdate as At, size as Ie, flip as ze, offset as Bt, shift as Oe, useInteractions as Dt, useRole as Pt, FloatingPortal as Ft, inline as $e, useDismiss as Ae } from "@floating-ui/react";
19
- import { useLexicalComposerContext as y } from "@lexical/react/LexicalComposerContext.js";
20
- import { $getNearestNodeOfType as Be, $findMatchingParent as Ht, mergeRegister as st, isHTMLElement as kt } from "@lexical/utils";
21
- import { G as g, e as De } from "./index.esm-67eba761.js";
22
- import { s as Pe, c as Fe } from "./stitches.config-00c23cdb.js";
23
- import { ListPlugin as He } from "@lexical/react/LexicalListPlugin.js";
24
- import { HistoryPlugin as Ue } from "@lexical/react/LexicalHistoryPlugin.js";
25
- import { TablePlugin as We } from "@lexical/react/LexicalTablePlugin.js";
26
- import { TabIndentationPlugin as je } from "@lexical/react/LexicalTabIndentationPlugin.js";
1
+ var ee = Object.defineProperty;
2
+ var re = (t, r, e) => r in t ? ee(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
+ var I = (t, r, e) => (re(t, typeof r != "symbol" ? r + "" : r, e), e);
4
+ import { createHeadlessEditor as ne } from "@lexical/headless";
5
+ import { $generateHtmlFromNodes as oe } from "@lexical/html";
6
+ import { $getRoot as X, ParagraphNode as ie, $createParagraphNode as U, $createTextNode as $, $setSelection as Q, DecoratorNode as ae, $applyNodeReplacement as le, SELECTION_CHANGE_COMMAND as j, $getSelection as _, COMMAND_PRIORITY_CRITICAL as at, $isRangeSelection as T, $isRootOrShadowRoot as xt, FORMAT_TEXT_COMMAND as F, COMMAND_PRIORITY_LOW as R, KEY_ARROW_DOWN_COMMAND as se, KEY_ARROW_UP_COMMAND as ce, KEY_ESCAPE_COMMAND as Lt, KEY_SPACE_COMMAND as de, $getNearestNodeFromDOMNode as lt, KEY_ARROW_LEFT_COMMAND as he, $isElementNode as ue, createCommand as ge, $insertNodes as pe, COMMAND_PRIORITY_EDITOR as me, COMMAND_PRIORITY_NORMAL as fe, $createRangeSelection as yt, COMMAND_PRIORITY_HIGH as ke } from "lexical";
7
+ import { trimTextContentFromAnchor as be, $setBlocksType as nt, $isAtNodeEnd as ft } from "@lexical/selection";
8
+ import { LinkNode as B, AutoLinkNode as Nt, $isLinkNode as Y, TOGGLE_LINK_COMMAND as V } from "@lexical/link";
9
+ import { ListNode as st, ListItemNode as wt, $isListNode as ct, INSERT_UNORDERED_LIST_COMMAND as Ce, INSERT_ORDERED_LIST_COMMAND as ve, INSERT_CHECK_LIST_COMMAND as St, insertList as Me, $isListItemNode as P } from "@lexical/list";
10
+ import { HeadingNode as Et, QuoteNode as It, $isHeadingNode as _e, $createHeadingNode as Te, $createQuoteNode as xe } from "@lexical/rich-text";
11
+ import { TableNode as Rt, TableRowNode as Ot, TableCellNode as $t, INSERT_TABLE_COMMAND as Le, $getTableCellNodeFromLexicalNode as ye, $deleteTableColumn__EXPERIMENTAL as Ne, $deleteTableRow__EXPERIMENTAL as we, $insertTableColumn__EXPERIMENTAL as kt, $insertTableRow__EXPERIMENTAL as bt } from "@lexical/table";
12
+ import { jsx as o, jsxs as h, Fragment as H } from "react/jsx-runtime";
13
+ import { createContext as Se, useState as p, useRef as K, useCallback as C, useContext as Ee, useEffect as x, useMemo as zt, useLayoutEffect as Ie } from "react";
14
+ import { DropdownMenu as dt, ToolbarButton as At, DropdownMenuIconItem as v, Box as W, ToolbarToggleGroup as Dt, ToolbarToggleItem as D, OverlayCard as Bt, Toolbar as Re, ToolbarSeparator as Oe, styled as $e, Spinner as ht, Dialog as Pt, DialogHeader as ze, TextInput as Ht, DialogActions as Z, Button as y, DropdownMenuItem as A, DropdownMenuSeparator as Ct, NavBar as Ae, NavBarItem as ot, Combobox as De } from "./ui.es.js";
15
+ import { LexicalComposer as Be } from "@lexical/react/LexicalComposer.js";
16
+ import { RichTextPlugin as Pe } from "@lexical/react/LexicalRichTextPlugin.js";
17
+ import He from "@lexical/react/LexicalErrorBoundary.js";
18
+ import { useFloating as ut, autoUpdate as Ft, size as Fe, flip as We, offset as Wt, shift as Ue, useInteractions as Ut, useRole as jt, FloatingPortal as Kt, inline as je, useDismiss as Ke } from "@floating-ui/react";
19
+ import { useLexicalComposerContext as L } from "@lexical/react/LexicalComposerContext.js";
20
+ import { $getNearestNodeOfType as qe, $findMatchingParent as qt, mergeRegister as tt, isHTMLElement as vt, $wrapNodeInElement as Ye } from "@lexical/utils";
21
+ import { G as m, f as Ge, g as Je } from "./index.esm-297793f7.js";
22
+ import { s as Xe, c as Qe } from "./stitches.config-00c23cdb.js";
23
+ import { ListPlugin as Ve } from "@lexical/react/LexicalListPlugin.js";
24
+ import { HistoryPlugin as Ze } from "@lexical/react/LexicalHistoryPlugin.js";
25
+ import { TablePlugin as tr } from "@lexical/react/LexicalTablePlugin.js";
26
+ import { TabIndentationPlugin as er } from "@lexical/react/LexicalTabIndentationPlugin.js";
27
+ import { useLexicalComposerContext as rr } from "@lexical/react/LexicalComposerContext";
27
28
  import "@stitches/react";
28
- const Ke = ({
29
+ const nr = ({
29
30
  text: t,
30
- maxChars: e,
31
- maxLines: r
31
+ maxChars: r,
32
+ maxLines: e
32
33
  }) => {
33
34
  if (t.length === 0)
34
35
  return 0;
35
- const o = typeof r == "number", i = typeof e == "number";
36
- if (!o && !i)
36
+ const n = typeof e == "number", i = typeof r == "number";
37
+ if (!n && !i)
37
38
  return t.length;
38
- let l = 0, a = 0;
39
- for (; a < t.length && (!o || l < r) && (!i || a < e); )
40
- t[a] === `
41
- ` && l++, a++;
42
- return t.slice(0, a).length;
43
- }, qe = ({
39
+ let a = 0, l = 0;
40
+ for (; l < t.length && (!n || a < e) && (!i || l < r); )
41
+ t[l] === `
42
+ ` && a++, l++;
43
+ return t.slice(0, l).length;
44
+ }, or = ({
44
45
  editor: t,
45
- maxChars: e,
46
- maxLines: r
46
+ maxChars: r,
47
+ maxLines: e
47
48
  }) => {
48
- const o = q(), i = o.getTextContent(), l = Ke({ text: i, maxChars: e, maxLines: r }), a = i.length - l, d = o.select().anchor;
49
- se(t, d, a);
50
- const c = o.getLastChild();
51
- return c instanceof Zt && c.getChildrenSize() === 0 && c.remove(), a;
52
- }, Ut = {
49
+ const n = X(), i = n.getTextContent(), a = nr({ text: i, maxChars: r, maxLines: e }), l = i.length - a, d = n.select().anchor;
50
+ be(t, d, l);
51
+ const c = n.getLastChild();
52
+ return c instanceof ie && c.getChildrenSize() === 0 && c.remove(), l;
53
+ }, Yt = {
53
54
  quote: "ain-rich-text-quote",
54
55
  text: {
55
56
  bold: "ain-rich-text-bold",
@@ -61,192 +62,332 @@ const Ke = ({
61
62
  listitem: "ain-rich-text-nested-list-item"
62
63
  }
63
64
  }
64
- }, Wt = (t) => t[0] === "{", Ye = (t) => t !== null && typeof t == "object" && "isEmpty" in t, Ge = (t, e) => {
65
+ }, Gt = (t) => t[0] === "{", ir = (t) => t !== null && typeof t == "object" && "isEmpty" in t, ar = (t, r) => {
65
66
  t.update(
66
67
  () => {
67
- const r = q();
68
- r.clear();
69
- const o = Y();
70
- o.append(I("")), r.append(o), G(null);
68
+ const e = X();
69
+ e.clear();
70
+ const n = U();
71
+ n.append($("")), e.append(n), Q(null);
71
72
  },
72
73
  {
73
- tag: e
74
+ tag: r
74
75
  }
75
76
  );
76
- }, Je = (t, e, r) => {
77
- e.update(
77
+ }, lr = (t, r, e) => {
78
+ r.update(
78
79
  () => {
79
- const o = q();
80
- o.clear();
81
- const i = Y();
82
- i.append(I(t.trim())), o.append(i), G(null);
80
+ const n = X();
81
+ n.clear();
82
+ const i = U();
83
+ i.append($(t.trim())), n.append(i), Q(null);
83
84
  },
84
85
  {
85
- tag: r
86
+ tag: e
86
87
  }
87
- ), e.blur();
88
- }, sn = (t, e, r) => {
89
- let o = 0;
90
- const i = Qt({
91
- nodes: e,
88
+ ), r.blur();
89
+ }, yn = async (t, r, e) => {
90
+ var l;
91
+ let n = 0;
92
+ const i = ne({
93
+ nodes: r,
92
94
  editable: !1,
93
- theme: Ut
95
+ theme: Yt
94
96
  });
95
97
  if (t)
96
98
  try {
97
- if (typeof t == "string" && !Wt(t))
99
+ if (typeof t == "string" && !Gt(t))
98
100
  i.update(() => {
99
- const a = q(), s = Y();
100
- s.append(I(t.trim())), a.append(s);
101
+ const s = X(), d = U();
102
+ d.append($(t.trim())), s.append(d);
101
103
  });
102
104
  else {
103
- const a = i.parseEditorState(t, () => {
104
- (r == null ? void 0 : r.maxLines) !== void 0 && (o = qe({
105
+ const s = i.parseEditorState(t, () => {
106
+ (e == null ? void 0 : e.maxLines) !== void 0 && (n = or({
105
107
  editor: i,
106
- maxLines: r.maxLines
108
+ maxLines: e.maxLines
107
109
  }));
108
110
  });
109
- a.isEmpty() || i.setEditorState(a);
111
+ s.isEmpty() || i.setEditorState(s);
110
112
  }
111
- } catch (a) {
112
- console.error(a);
113
+ } catch (s) {
114
+ console.error(s);
113
115
  }
114
- let l = "";
115
- return i.update(() => {
116
- var a;
117
- r != null && r.updateFn && ((a = r.updateFn) == null || a.call(r)), l = Vt(i);
118
- }), { html: l, trimCount: o };
116
+ await ((l = e == null ? void 0 : e.updateFn) == null ? void 0 : l.call(e, i));
117
+ let a = "";
118
+ return i.read(() => {
119
+ a = oe(i);
120
+ }), { html: a, trimCount: n };
119
121
  };
120
- class j extends $ {
122
+ class G extends B {
121
123
  static getType() {
122
124
  return "target-link";
123
125
  }
124
- constructor(e, r, o) {
126
+ constructor(r, e, n) {
125
127
  let i = !1;
126
- const l = { ...r };
128
+ const a = { ...e };
127
129
  try {
128
- const a = new URL(e);
129
- window.location.hostname !== a.hostname && (i = !0);
130
+ const l = new URL(r);
131
+ window.location.hostname !== l.hostname && (i = !0);
130
132
  } catch {
131
133
  }
132
- i && (l.target = "_blank", l.rel = "noopener noreferrer"), super(e, l, o);
134
+ i && (a.target = "_blank", a.rel = "noopener noreferrer"), super(r, a, n);
133
135
  }
134
- static clone(e) {
135
- return new j(
136
- e.__url,
137
- { rel: e.__rel, target: e.__target, title: e.__title },
138
- e.__key
136
+ static clone(r) {
137
+ return new G(
138
+ r.__url,
139
+ { rel: r.__rel, target: r.__target, title: r.__title },
140
+ r.__key
139
141
  );
140
142
  }
141
143
  exportJSON() {
142
144
  return super.exportJSON();
143
145
  }
146
+ static importJSON(r) {
147
+ return B.importJSON(r);
148
+ }
149
+ }
150
+ const Jt = Se({ hasFocus: !1, editorRef: { current: null }, signUrl: void 0 }), sr = ({ onBlur: t }) => {
151
+ const [r, e] = p(!1), n = K(null), i = C(() => {
152
+ e(!0), n.current && window.clearTimeout(n.current);
153
+ }, []), a = C(() => {
154
+ n.current = window.setTimeout(() => {
155
+ e(!1), t == null || t();
156
+ }, 0);
157
+ }, [t]);
158
+ return {
159
+ hasFocus: r,
160
+ attributes: {
161
+ onFocus: i,
162
+ onBlur: a
163
+ }
164
+ };
165
+ }, et = () => Ee(Jt), cr = (t) => t.startsWith("https://devfilesab.blob.core.windows.net") || t.startsWith("https://filesab.blob.core.windows.net");
166
+ function dr({
167
+ src: t,
168
+ altText: r,
169
+ width: e,
170
+ height: n,
171
+ maxWidth: i
172
+ }) {
173
+ const { signUrl: a } = et(), [l, s] = p(cr(t) ? "" : t), d = K(!1);
174
+ return x(() => {
175
+ const c = async () => {
176
+ s(await (a == null ? void 0 : a(t)) ?? t);
177
+ };
178
+ !l && !d.current && (d.current = !0, c());
179
+ }, []), l ? /* @__PURE__ */ o(
180
+ "img",
181
+ {
182
+ src: l,
183
+ alt: r,
184
+ style: {
185
+ height: n,
186
+ maxWidth: i,
187
+ width: e
188
+ }
189
+ }
190
+ ) : /* @__PURE__ */ o("span", {});
191
+ }
192
+ function hr(t) {
193
+ const r = t, { alt: e, src: n, width: i, height: a } = r;
194
+ return { node: gt({ altText: e, height: a, src: n, width: i }) };
195
+ }
196
+ class z extends ae {
197
+ constructor(e, n, i, a, l, s) {
198
+ super(s);
199
+ I(this, "__src");
200
+ I(this, "__altText");
201
+ I(this, "__width");
202
+ I(this, "__height");
203
+ I(this, "__maxWidth");
204
+ this.__src = e, this.__altText = n, this.__maxWidth = i, this.__width = a || "inherit", this.__height = l || "inherit";
205
+ }
206
+ static getType() {
207
+ return "image";
208
+ }
209
+ static clone(e) {
210
+ return new z(
211
+ e.__src,
212
+ e.__altText,
213
+ e.__maxWidth,
214
+ e.__width,
215
+ e.__height,
216
+ e.__key
217
+ );
218
+ }
144
219
  static importJSON(e) {
145
- return $.importJSON(e);
220
+ const { altText: n, height: i, width: a, maxWidth: l, src: s } = e;
221
+ return gt({
222
+ altText: n,
223
+ height: i,
224
+ maxWidth: l,
225
+ src: s,
226
+ width: a
227
+ });
228
+ }
229
+ exportDOM() {
230
+ const e = document.createElement("img");
231
+ return e.setAttribute("src", this.__src), e.setAttribute("alt", this.__altText), e.setAttribute("width", this.__width.toString()), e.setAttribute("height", this.__height.toString()), { element: e };
232
+ }
233
+ static importDOM() {
234
+ return {
235
+ img: (e) => ({
236
+ conversion: hr,
237
+ priority: 0
238
+ })
239
+ };
240
+ }
241
+ exportJSON() {
242
+ return {
243
+ altText: this.getAltText(),
244
+ height: this.__height === "inherit" ? 0 : this.__height,
245
+ maxWidth: this.__maxWidth,
246
+ src: this.getSrc(),
247
+ type: "image",
248
+ version: 1,
249
+ width: this.__width === "inherit" ? 0 : this.__width
250
+ };
251
+ }
252
+ setSrc(e) {
253
+ const n = this.getWritable();
254
+ n.__src = e;
255
+ }
256
+ setWidthAndHeight(e, n) {
257
+ const i = this.getWritable();
258
+ i.__width = e, i.__height = n;
259
+ }
260
+ // View
261
+ createDOM(e) {
262
+ const n = document.createElement("span"), a = e.theme.image;
263
+ return a !== void 0 && (n.className = a), n;
264
+ }
265
+ updateDOM() {
266
+ return !1;
267
+ }
268
+ getSrc() {
269
+ return this.__src;
270
+ }
271
+ getAltText() {
272
+ return this.__altText;
273
+ }
274
+ decorate() {
275
+ return /* @__PURE__ */ o(
276
+ dr,
277
+ {
278
+ src: this.__src,
279
+ altText: this.__altText,
280
+ width: this.__width,
281
+ height: this.__height,
282
+ maxWidth: this.__maxWidth
283
+ }
284
+ );
146
285
  }
147
286
  }
148
- const cn = [
149
- Nt,
150
- St,
151
- rt,
152
- yt,
153
- Lt,
154
- $,
155
- wt,
287
+ function gt({
288
+ altText: t,
289
+ height: r,
290
+ maxWidth: e = 500,
291
+ src: n,
292
+ width: i,
293
+ key: a
294
+ }) {
295
+ return le(
296
+ new z(n, t, e, i, r, a)
297
+ );
298
+ }
299
+ function Nn(t) {
300
+ return t instanceof z;
301
+ }
302
+ const wn = [
156
303
  Et,
157
- _t
158
- ], dn = [
159
- Nt,
160
- St,
161
- rt,
162
- yt,
163
- Lt,
164
- $,
304
+ It,
305
+ st,
165
306
  wt,
307
+ Nt,
308
+ B,
309
+ Rt,
310
+ Ot,
311
+ $t,
312
+ z
313
+ ], Sn = [
166
314
  Et,
167
- _t,
168
- j,
315
+ It,
316
+ st,
317
+ wt,
318
+ Nt,
319
+ B,
320
+ Rt,
321
+ Ot,
322
+ $t,
323
+ z,
324
+ G,
169
325
  {
170
- replace: $,
171
- with: (t) => new j(
326
+ replace: B,
327
+ with: (t) => new G(
172
328
  t.getURL(),
173
329
  { rel: t.__rel, target: t.__target, title: t.__title }
174
330
  )
175
331
  }
176
- ], jt = ve({ hasFocus: !1, editorRef: { current: null } }), Xe = ({ onBlur: t }) => {
177
- const [e, r] = k(!1), o = ot(null), i = v(() => {
178
- r(!0), o.current && window.clearTimeout(o.current);
179
- }, []), l = v(() => {
180
- o.current = window.setTimeout(() => {
181
- r(!1), t == null || t();
182
- }, 0);
183
- }, [t]);
184
- return {
185
- hasFocus: e,
186
- attributes: {
187
- onFocus: i,
188
- onBlur: l
189
- }
190
- };
191
- }, ct = () => Ce(jt);
192
- function Qe(t) {
193
- return g({ 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);
332
+ ];
333
+ function ur(t) {
334
+ return m({ 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);
194
335
  }
195
- function Ve(t) {
196
- return g({ 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);
336
+ function gr(t) {
337
+ return m({ 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);
197
338
  }
198
- function Ze(t) {
199
- return g({ 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);
339
+ function pr(t) {
340
+ return m({ 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);
200
341
  }
201
- function tr(t) {
202
- return g({ 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);
342
+ function mr(t) {
343
+ return m({ 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);
203
344
  }
204
- function er(t) {
205
- return g({ 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);
345
+ function fr(t) {
346
+ return m({ 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);
206
347
  }
207
- function rr(t) {
208
- return g({ 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);
348
+ function kr(t) {
349
+ return m({ 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);
209
350
  }
210
- function nr(t) {
211
- return g({ 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);
351
+ function br(t) {
352
+ return m({ 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);
212
353
  }
213
- function or(t) {
214
- return g({ 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);
354
+ function Cr(t) {
355
+ return m({ 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);
215
356
  }
216
- function ir(t) {
217
- return g({ 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);
357
+ function vr(t) {
358
+ return m({ 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);
218
359
  }
219
- function ar(t) {
220
- return g({ 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);
360
+ function Mr(t) {
361
+ return m({ 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);
221
362
  }
222
- function lr(t) {
223
- return g({ 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);
363
+ function _r(t) {
364
+ return m({ 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);
224
365
  }
225
- function sr(t) {
226
- return g({ 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);
366
+ function Tr(t) {
367
+ return m({ 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);
227
368
  }
228
- function cr(t) {
229
- return g({ 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);
369
+ function xr(t) {
370
+ return m({ 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);
230
371
  }
231
- function dr(t) {
232
- return g({ 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);
372
+ function Lr(t) {
373
+ return m({ 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);
233
374
  }
234
- function ur(t) {
235
- return g({ 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);
375
+ function yr(t) {
376
+ return m({ 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);
236
377
  }
237
- function hr(t) {
238
- return g({ 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);
378
+ function Nr(t) {
379
+ return m({ 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);
239
380
  }
240
- function pr(t) {
241
- return g({ 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);
381
+ function wr(t) {
382
+ return m({ 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);
242
383
  }
243
- function gr(t) {
244
- return g({ 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);
384
+ function Sr(t) {
385
+ return m({ 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);
245
386
  }
246
- const fr = Pe("div", {
387
+ const Er = Xe("div", {
247
388
  width: "10rem",
248
389
  display: "flex"
249
- }), Kt = {
390
+ }), Xt = {
250
391
  bullet: "Punktliste",
251
392
  h1: "Overskrift 1",
252
393
  h2: "Overskrift 2",
@@ -258,24 +399,24 @@ const fr = Pe("div", {
258
399
  paragraph: "Normal",
259
400
  quote: "Sitat",
260
401
  check: "Avkrysningsliste"
261
- }, mr = {
262
- bullet: /* @__PURE__ */ n(dr, { size: "1.25rem" }),
263
- h1: /* @__PURE__ */ n(Ze, { size: "1.25rem" }),
264
- h2: /* @__PURE__ */ n(tr, { size: "1.25rem" }),
265
- h3: /* @__PURE__ */ n(er, { size: "1.25rem" }),
266
- h4: /* @__PURE__ */ n(rr, { size: "1.25rem" }),
267
- h5: /* @__PURE__ */ n(nr, { size: "1.25rem" }),
268
- h6: /* @__PURE__ */ n(or, { size: "1.25rem" }),
269
- number: /* @__PURE__ */ n(cr, { size: "1.25rem" }),
270
- check: /* @__PURE__ */ n(sr, { size: "1.25rem" }),
271
- paragraph: /* @__PURE__ */ n(ar, { size: "1.25rem" }),
272
- quote: /* @__PURE__ */ n(ur, { size: "1.25rem" })
273
- }, C = ({
402
+ }, Ir = {
403
+ bullet: /* @__PURE__ */ o(Lr, { size: "1.25rem" }),
404
+ h1: /* @__PURE__ */ o(pr, { size: "1.25rem" }),
405
+ h2: /* @__PURE__ */ o(mr, { size: "1.25rem" }),
406
+ h3: /* @__PURE__ */ o(fr, { size: "1.25rem" }),
407
+ h4: /* @__PURE__ */ o(kr, { size: "1.25rem" }),
408
+ h5: /* @__PURE__ */ o(br, { size: "1.25rem" }),
409
+ h6: /* @__PURE__ */ o(Cr, { size: "1.25rem" }),
410
+ number: /* @__PURE__ */ o(xr, { size: "1.25rem" }),
411
+ check: /* @__PURE__ */ o(Tr, { size: "1.25rem" }),
412
+ paragraph: /* @__PURE__ */ o(Mr, { size: "1.25rem" }),
413
+ quote: /* @__PURE__ */ o(yr, { size: "1.25rem" })
414
+ }, M = ({
274
415
  blockType: t
275
- }) => /* @__PURE__ */ p(H, { children: [
276
- /* @__PURE__ */ n(P, { css: { display: "flex", flex: "0 0 auto" }, children: mr[t] }),
277
- /* @__PURE__ */ n(
278
- P,
416
+ }) => /* @__PURE__ */ h(H, { children: [
417
+ /* @__PURE__ */ o(W, { css: { display: "flex", flex: "0 0 auto" }, children: Ir[t] }),
418
+ /* @__PURE__ */ o(
419
+ W,
279
420
  {
280
421
  css: {
281
422
  flex: "1 1 auto",
@@ -283,204 +424,204 @@ const fr = Pe("div", {
283
424
  textOverflow: "ellipsis",
284
425
  whiteSpace: "nowrap"
285
426
  },
286
- children: Kt[t]
427
+ children: Xt[t]
287
428
  }
288
429
  )
289
- ] }), kr = (t) => {
290
- if (!L(t))
430
+ ] }), Rr = (t) => {
431
+ if (!T(t))
291
432
  return null;
292
- const e = t.anchor.getNode();
293
- let r = e.getKey() === "root" ? e : Ht(e, (o) => {
294
- const i = o.getParent();
295
- return i !== null && te(i);
433
+ const r = t.anchor.getNode();
434
+ let e = r.getKey() === "root" ? r : qt(r, (n) => {
435
+ const i = n.getParent();
436
+ return i !== null && xt(i);
296
437
  });
297
- return r === null && (r = e.getTopLevelElementOrThrow()), {
298
- anchorNode: e,
299
- element: r
438
+ return e === null && (e = r.getTopLevelElementOrThrow()), {
439
+ anchorNode: r,
440
+ element: e
300
441
  };
301
- }, br = () => {
302
- const [t] = y(), [e, r] = k("paragraph");
442
+ }, Or = () => {
443
+ const [t] = L(), [r, e] = p("paragraph");
303
444
  x(() => t.registerCommand(
304
- F,
445
+ j,
305
446
  () => {
306
- const c = T(), u = kr(c);
447
+ const c = _(), u = Rr(c);
307
448
  if (!u)
308
449
  return !1;
309
- const { element: h, anchorNode: m } = u, E = h.getKey();
310
- if (t.getElementByKey(E) !== null)
311
- if (nt(h)) {
312
- const b = Be(
313
- m,
314
- rt
315
- ), S = b ? b.getListType() : h.getListType();
316
- r(S);
450
+ const { element: g, anchorNode: b } = u, N = g.getKey();
451
+ if (t.getElementByKey(N) !== null)
452
+ if (ct(g)) {
453
+ const k = qe(
454
+ b,
455
+ st
456
+ ), w = k ? k.getListType() : g.getListType();
457
+ e(w);
317
458
  } else {
318
- const b = he(h) ? h.getTag() : h.getType();
319
- b in Kt && r(b);
459
+ const k = _e(g) ? g.getTag() : g.getType();
460
+ k in Xt && e(k);
320
461
  }
321
462
  return !1;
322
463
  },
323
- tt
464
+ at
324
465
  ), [t]);
325
- const o = (c) => {
326
- e !== c && t.update(() => {
327
- const u = T();
328
- L(u) && (Q(u, () => pe(c)), r(c));
466
+ const n = (c) => {
467
+ r !== c && t.update(() => {
468
+ const u = _();
469
+ T(u) && (nt(u, () => Te(c)), e(c));
329
470
  });
330
471
  };
331
- return /* @__PURE__ */ n(fr, { children: /* @__PURE__ */ p(
332
- it,
472
+ return /* @__PURE__ */ o(Er, { children: /* @__PURE__ */ h(
473
+ dt,
333
474
  {
334
- trigger: /* @__PURE__ */ n(
335
- It,
475
+ trigger: /* @__PURE__ */ o(
476
+ At,
336
477
  {
337
478
  dropdown: !0,
338
479
  css: { display: "flex", width: "100%", overflow: "hidden" },
339
- children: /* @__PURE__ */ n(C, { blockType: e })
480
+ children: /* @__PURE__ */ o(M, { blockType: r })
340
481
  }
341
482
  ),
342
483
  side: "bottom",
343
484
  align: "start",
344
485
  children: [
345
- /* @__PURE__ */ n(M, { onClick: () => {
346
- e !== "paragraph" && t.update(() => {
347
- const c = T();
348
- L(c) && (Q(c, () => Y()), r("paragraph"));
486
+ /* @__PURE__ */ o(v, { onClick: () => {
487
+ r !== "paragraph" && t.update(() => {
488
+ const c = _();
489
+ T(c) && (nt(c, () => U()), e("paragraph"));
349
490
  });
350
- }, children: /* @__PURE__ */ n(C, { blockType: "paragraph" }) }),
351
- /* @__PURE__ */ n(M, { onClick: () => o("h1"), children: /* @__PURE__ */ n(C, { blockType: "h1" }) }),
352
- /* @__PURE__ */ n(M, { onClick: () => o("h2"), children: /* @__PURE__ */ n(C, { blockType: "h2" }) }),
353
- /* @__PURE__ */ n(M, { onClick: () => o("h3"), children: /* @__PURE__ */ n(C, { blockType: "h3" }) }),
354
- /* @__PURE__ */ n(M, { onClick: () => o("h4"), children: /* @__PURE__ */ n(C, { blockType: "h4" }) }),
355
- /* @__PURE__ */ n(M, { onClick: () => o("h5"), children: /* @__PURE__ */ n(C, { blockType: "h5" }) }),
356
- /* @__PURE__ */ n(M, { onClick: () => o("h6"), children: /* @__PURE__ */ n(C, { blockType: "h6" }) }),
357
- /* @__PURE__ */ n(M, { onClick: () => {
358
- e !== "bullet" && (t.dispatchCommand(ce, void 0), r("bullet"));
359
- }, children: /* @__PURE__ */ n(C, { blockType: "bullet" }) }),
360
- /* @__PURE__ */ n(M, { onClick: () => {
361
- e !== "number" && (t.dispatchCommand(de, void 0), r("number"));
362
- }, children: /* @__PURE__ */ n(C, { blockType: "number" }) }),
363
- /* @__PURE__ */ n(M, { onClick: () => {
364
- e !== "check" && (t.dispatchCommand(xt, void 0), r("check"));
365
- }, children: /* @__PURE__ */ n(C, { blockType: "check" }) }),
366
- /* @__PURE__ */ n(M, { onClick: () => {
367
- e !== "quote" && t.update(() => {
368
- const c = T();
369
- L(c) && (Q(c, () => ge()), r("quote"));
491
+ }, children: /* @__PURE__ */ o(M, { blockType: "paragraph" }) }),
492
+ /* @__PURE__ */ o(v, { onClick: () => n("h1"), children: /* @__PURE__ */ o(M, { blockType: "h1" }) }),
493
+ /* @__PURE__ */ o(v, { onClick: () => n("h2"), children: /* @__PURE__ */ o(M, { blockType: "h2" }) }),
494
+ /* @__PURE__ */ o(v, { onClick: () => n("h3"), children: /* @__PURE__ */ o(M, { blockType: "h3" }) }),
495
+ /* @__PURE__ */ o(v, { onClick: () => n("h4"), children: /* @__PURE__ */ o(M, { blockType: "h4" }) }),
496
+ /* @__PURE__ */ o(v, { onClick: () => n("h5"), children: /* @__PURE__ */ o(M, { blockType: "h5" }) }),
497
+ /* @__PURE__ */ o(v, { onClick: () => n("h6"), children: /* @__PURE__ */ o(M, { blockType: "h6" }) }),
498
+ /* @__PURE__ */ o(v, { onClick: () => {
499
+ r !== "bullet" && (t.dispatchCommand(Ce, void 0), e("bullet"));
500
+ }, children: /* @__PURE__ */ o(M, { blockType: "bullet" }) }),
501
+ /* @__PURE__ */ o(v, { onClick: () => {
502
+ r !== "number" && (t.dispatchCommand(ve, void 0), e("number"));
503
+ }, children: /* @__PURE__ */ o(M, { blockType: "number" }) }),
504
+ /* @__PURE__ */ o(v, { onClick: () => {
505
+ r !== "check" && (t.dispatchCommand(St, void 0), e("check"));
506
+ }, children: /* @__PURE__ */ o(M, { blockType: "check" }) }),
507
+ /* @__PURE__ */ o(v, { onClick: () => {
508
+ r !== "quote" && t.update(() => {
509
+ const c = _();
510
+ T(c) && (nt(c, () => xe()), e("quote"));
370
511
  });
371
- }, children: /* @__PURE__ */ n(C, { blockType: "quote" }) })
512
+ }, children: /* @__PURE__ */ o(M, { blockType: "quote" }) })
372
513
  ]
373
514
  }
374
515
  ) });
375
- }, vr = () => {
376
- const [t] = y(), [e, r] = k(!1), [o, i] = k(!1), [l, a] = k(!1), [s, d] = k(!1), [c, u] = k(!1), h = v(() => {
377
- const f = T();
378
- L(f) && (r(f.hasFormat("bold")), i(f.hasFormat("italic")), a(f.hasFormat("underline")), d(f.hasFormat("code")), u(f.hasFormat("superscript")));
516
+ }, $r = () => {
517
+ const [t] = L(), [r, e] = p(!1), [n, i] = p(!1), [a, l] = p(!1), [s, d] = p(!1), [c, u] = p(!1), g = C(() => {
518
+ const f = _();
519
+ T(f) && (e(f.hasFormat("bold")), i(f.hasFormat("italic")), l(f.hasFormat("underline")), d(f.hasFormat("code")), u(f.hasFormat("superscript")));
379
520
  }, []);
380
- x(() => st(
521
+ x(() => tt(
381
522
  t.registerCommand(
382
- F,
383
- () => (h(), !1),
384
- tt
523
+ j,
524
+ () => (g(), !1),
525
+ at
385
526
  ),
386
527
  t.registerUpdateListener(({ editorState: f }) => {
387
528
  f.read(() => {
388
- h();
529
+ g();
389
530
  });
390
531
  })
391
- ), [t, h]);
392
- const m = v(
393
- () => t.dispatchCommand(D, "bold"),
532
+ ), [t, g]);
533
+ const b = C(
534
+ () => t.dispatchCommand(F, "bold"),
394
535
  [t]
395
- ), E = v(
396
- () => t.dispatchCommand(D, "italic"),
536
+ ), N = C(
537
+ () => t.dispatchCommand(F, "italic"),
397
538
  [t]
398
- ), N = v(
399
- () => t.dispatchCommand(D, "underline"),
539
+ ), S = C(
540
+ () => t.dispatchCommand(F, "underline"),
400
541
  [t]
401
- ), b = v(
402
- () => t.dispatchCommand(D, "code"),
542
+ ), k = C(
543
+ () => t.dispatchCommand(F, "code"),
403
544
  [t]
404
- ), S = v(
405
- () => t.dispatchCommand(D, "superscript"),
545
+ ), w = C(
546
+ () => t.dispatchCommand(F, "superscript"),
406
547
  [t]
407
- ), B = Rt(() => {
548
+ ), E = zt(() => {
408
549
  const f = [];
409
- return e && f.push("bold"), o && f.push("italic"), l && f.push("underline"), s && f.push("code"), c && f.push("superscript"), f;
410
- }, [e, o, l, s, c]);
411
- return /* @__PURE__ */ p(
412
- zt,
550
+ return r && f.push("bold"), n && f.push("italic"), a && f.push("underline"), s && f.push("code"), c && f.push("superscript"), f;
551
+ }, [r, n, a, s, c]);
552
+ return /* @__PURE__ */ h(
553
+ Dt,
413
554
  {
414
555
  type: "multiple",
415
556
  "aria-label": "Tekstformattering",
416
- value: B,
557
+ value: E,
417
558
  children: [
418
- /* @__PURE__ */ n(O, { onClick: m, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ n(Qe, { size: "1.25rem" }) }),
419
- /* @__PURE__ */ n(
420
- O,
559
+ /* @__PURE__ */ o(D, { onClick: b, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ o(ur, { size: "1.25rem" }) }),
560
+ /* @__PURE__ */ o(
561
+ D,
421
562
  {
422
- onClick: E,
563
+ onClick: N,
423
564
  title: "Kursiv tekst",
424
565
  value: "italic",
425
- children: /* @__PURE__ */ n(ir, { size: "1.25rem" })
566
+ children: /* @__PURE__ */ o(vr, { size: "1.25rem" })
426
567
  }
427
568
  ),
428
- /* @__PURE__ */ n(
429
- O,
569
+ /* @__PURE__ */ o(
570
+ D,
430
571
  {
431
- onClick: N,
572
+ onClick: S,
432
573
  title: "Understreket tekst",
433
574
  value: "underline",
434
- children: /* @__PURE__ */ n(gr, { size: "1.25rem" })
575
+ children: /* @__PURE__ */ o(Sr, { size: "1.25rem" })
435
576
  }
436
577
  ),
437
- /* @__PURE__ */ n(O, { onClick: b, title: "Kode", value: "code", children: /* @__PURE__ */ n(Ve, { size: "1.25rem" }) }),
438
- /* @__PURE__ */ n(
439
- O,
578
+ /* @__PURE__ */ o(D, { onClick: k, title: "Kode", value: "code", children: /* @__PURE__ */ o(gr, { size: "1.25rem" }) }),
579
+ /* @__PURE__ */ o(
580
+ D,
440
581
  {
441
- onClick: S,
582
+ onClick: w,
442
583
  title: "Superscript",
443
584
  value: "superscript",
444
- children: /* @__PURE__ */ n(hr, { size: "1.25rem" })
585
+ children: /* @__PURE__ */ o(Nr, { size: "1.25rem" })
445
586
  }
446
587
  )
447
588
  ]
448
589
  }
449
590
  );
450
- }, Cr = ({ children: t }) => {
451
- const { hasFocus: e, editorRef: r } = ct(), o = e, [i, l] = k(o);
452
- Me(() => {
453
- l(o);
454
- }, [o]);
455
- const { context: a, refs: s, floatingStyles: d } = lt({
591
+ }, zr = ({ children: t }) => {
592
+ const { hasFocus: r, editorRef: e } = et(), n = r, [i, a] = p(n);
593
+ Ie(() => {
594
+ a(n);
595
+ }, [n]);
596
+ const { context: l, refs: s, floatingStyles: d } = ut({
456
597
  placement: "top",
457
- whileElementsMounted: At,
598
+ whileElementsMounted: Ft,
458
599
  middleware: [
459
- Ie({
460
- apply: ({ rects: u, elements: h }) => {
461
- h.floating.style.minWidth = `${u.reference.width}px`;
600
+ Fe({
601
+ apply: ({ rects: u, elements: g }) => {
602
+ g.floating.style.minWidth = `${u.reference.width}px`;
462
603
  }
463
604
  }),
464
- ze(),
465
- Bt({
605
+ We(),
606
+ Wt({
466
607
  mainAxis: 8
467
608
  }),
468
- Oe({
609
+ Ue({
469
610
  padding: 8
470
611
  })
471
612
  ],
472
613
  open: i,
473
- onOpenChange: l,
614
+ onOpenChange: a,
474
615
  elements: {
475
- reference: r.current
616
+ reference: e.current
476
617
  }
477
- }), { getFloatingProps: c } = Dt([
478
- Pt(a, {
618
+ }), { getFloatingProps: c } = Ut([
619
+ jt(l, {
479
620
  role: "dialog"
480
621
  })
481
622
  ]);
482
- return i ? /* @__PURE__ */ n(Ft, { children: /* @__PURE__ */ n(
483
- Ot,
623
+ return i ? /* @__PURE__ */ o(Kt, { children: /* @__PURE__ */ o(
624
+ Bt,
484
625
  {
485
626
  ref: s.setFloating,
486
627
  style: d,
@@ -491,187 +632,207 @@ const fr = Pe("div", {
491
632
  overflow: "hidden",
492
633
  boxShadow: "$md"
493
634
  },
494
- children: /* @__PURE__ */ n(Mr, { children: t })
635
+ children: /* @__PURE__ */ o(Ar, { children: t })
495
636
  }
496
637
  ) }) : null;
497
- }, Mr = ({
638
+ }, Ar = ({
498
639
  children: t,
499
- ...e
500
- }) => /* @__PURE__ */ p(Te, { "aria-label": "Formattering", ...e, children: [
501
- /* @__PURE__ */ n(br, {}),
502
- /* @__PURE__ */ n(Le, {}),
503
- /* @__PURE__ */ n(vr, {}),
640
+ ...r
641
+ }) => /* @__PURE__ */ h(Re, { "aria-label": "Formattering", ...r, children: [
642
+ /* @__PURE__ */ o(Or, {}),
643
+ /* @__PURE__ */ o(Oe, {}),
644
+ /* @__PURE__ */ o($r, {}),
504
645
  t
505
646
  ] });
506
- function Tr() {
507
- const [t] = y();
508
- return x(() => st(
647
+ function Dr() {
648
+ const [t] = L();
649
+ return x(() => tt(
509
650
  t.registerCommand(
510
- xt,
511
- () => (ue(t, "check"), !0),
512
- _
651
+ St,
652
+ () => (Me(t, "check"), !0),
653
+ R
513
654
  ),
514
655
  t.registerCommand(
515
- ee,
516
- (e) => Ct(e, t, !1),
517
- _
656
+ se,
657
+ (r) => Tt(r, t, !1),
658
+ R
518
659
  ),
519
660
  t.registerCommand(
520
- re,
521
- (e) => Ct(e, t, !0),
522
- _
661
+ ce,
662
+ (r) => Tt(r, t, !0),
663
+ R
523
664
  ),
524
665
  t.registerCommand(
525
- Mt,
526
- (e) => {
527
- if (Z() != null) {
528
- const o = t.getRootElement();
529
- return o != null && o.focus(), !0;
666
+ Lt,
667
+ (r) => {
668
+ if (it() != null) {
669
+ const n = t.getRootElement();
670
+ return n != null && n.focus(), !0;
530
671
  }
531
672
  return !1;
532
673
  },
533
- _
674
+ R
534
675
  ),
535
676
  t.registerCommand(
536
- ne,
537
- (e) => {
538
- const r = Z();
539
- return r != null && t.isEditable() ? (t.update(() => {
540
- const o = et(r);
541
- A(o) && (e.preventDefault(), o.toggleChecked());
677
+ de,
678
+ (r) => {
679
+ const e = it();
680
+ return e != null && t.isEditable() ? (t.update(() => {
681
+ const n = lt(e);
682
+ P(n) && (r.preventDefault(), n.toggleChecked());
542
683
  }), !0) : !1;
543
684
  },
544
- _
685
+ R
545
686
  ),
546
687
  t.registerCommand(
547
- oe,
548
- (e) => t.getEditorState().read(() => {
549
- const r = T();
550
- if (L(r) && r.isCollapsed()) {
551
- const { anchor: o } = r, i = o.type === "element";
552
- if (i || o.offset === 0) {
553
- const l = o.getNode(), a = Ht(
554
- l,
555
- (s) => ie(s) && !s.isInline()
688
+ he,
689
+ (r) => t.getEditorState().read(() => {
690
+ const e = _();
691
+ if (T(e) && e.isCollapsed()) {
692
+ const { anchor: n } = e, i = n.type === "element";
693
+ if (i || n.offset === 0) {
694
+ const a = n.getNode(), l = qt(
695
+ a,
696
+ (s) => ue(s) && !s.isInline()
556
697
  );
557
- if (A(a)) {
558
- const s = a.getParent();
559
- if (nt(s) && s.getListType() === "check" && (i || a.getFirstDescendant() === l)) {
560
- const d = t.getElementByKey(a.__key);
698
+ if (P(l)) {
699
+ const s = l.getParent();
700
+ if (ct(s) && s.getListType() === "check" && (i || l.getFirstDescendant() === a)) {
701
+ const d = t.getElementByKey(l.__key);
561
702
  if (d != null && document.activeElement !== d)
562
- return d.focus(), e.preventDefault(), !0;
703
+ return d.focus(), r.preventDefault(), !0;
563
704
  }
564
705
  }
565
706
  }
566
707
  }
567
708
  return !1;
568
709
  }),
569
- _
710
+ R
570
711
  ),
571
- t.registerRootListener((e, r) => {
572
- e !== null && (e.addEventListener("click", bt), e.addEventListener("pointerdown", vt)), r !== null && (r.removeEventListener("click", bt), r.removeEventListener("pointerdown", vt));
712
+ t.registerRootListener((r, e) => {
713
+ r !== null && (r.addEventListener("click", Mt), r.addEventListener("pointerdown", _t)), e !== null && (e.removeEventListener("click", Mt), e.removeEventListener("pointerdown", _t));
573
714
  })
574
715
  ), [t]), null;
575
716
  }
576
- function qt(t, e) {
577
- const r = t.target;
578
- if (r === null || !kt(r))
717
+ function Qt(t, r) {
718
+ const e = t.target;
719
+ if (e === null || !vt(e))
579
720
  return;
580
- const o = r.firstChild;
581
- if (o != null && kt(o) && (o.tagName === "UL" || o.tagName === "OL"))
721
+ const n = e.firstChild;
722
+ if (n != null && vt(n) && (n.tagName === "UL" || n.tagName === "OL"))
582
723
  return;
583
- const i = r.parentNode;
724
+ const i = e.parentNode;
584
725
  if (!i || i.__lexicalListType !== "check")
585
726
  return;
586
- const l = t.pageX, a = r.getBoundingClientRect();
587
- (r.dir === "rtl" ? l < a.right && l > a.right - 20 : l > a.left && l < a.left + 20) && e();
727
+ const a = t.pageX, l = e.getBoundingClientRect();
728
+ (e.dir === "rtl" ? a < l.right && a > l.right - 20 : a > l.left && a < l.left + 20) && r();
588
729
  }
589
- function bt(t) {
590
- qt(t, () => {
591
- const e = t.target, r = Lr(e);
592
- r != null && r.isEditable() && r.update(() => {
730
+ function Mt(t) {
731
+ Qt(t, () => {
732
+ const r = t.target, e = Br(r);
733
+ e != null && e.isEditable() && e.update(() => {
593
734
  if (t.target) {
594
- const o = et(e);
595
- A(o) && (e.focus(), o.toggleChecked());
735
+ const n = lt(r);
736
+ P(n) && (r.focus(), n.toggleChecked());
596
737
  }
597
738
  });
598
739
  });
599
740
  }
600
- function vt(t) {
601
- qt(t, () => {
741
+ function _t(t) {
742
+ Qt(t, () => {
602
743
  t.preventDefault();
603
744
  });
604
745
  }
605
- function Lr(t) {
606
- let e = t;
607
- for (; e; ) {
608
- if (e.__lexicalEditor)
609
- return e.__lexicalEditor;
610
- e = e.parentNode;
746
+ function Br(t) {
747
+ let r = t;
748
+ for (; r; ) {
749
+ if (r.__lexicalEditor)
750
+ return r.__lexicalEditor;
751
+ r = r.parentNode;
611
752
  }
612
753
  return null;
613
754
  }
614
- function Z() {
755
+ function it() {
615
756
  const t = document.activeElement;
616
757
  return t != null && t.tagName === "LI" && t.parentNode != null && // @ts-ignore internal field
617
758
  t.parentNode.__lexicalListType === "check" ? t : null;
618
759
  }
619
- function yr(t, e) {
620
- let r = e ? t.getPreviousSibling() : t.getNextSibling(), o = t;
621
- for (; r == null && A(o); )
622
- o = o.getParentOrThrow().getParent(), o != null && (r = e ? o.getPreviousSibling() : o.getNextSibling());
623
- for (; A(r); ) {
624
- const i = e ? r.getLastChild() : r.getFirstChild();
625
- if (!nt(i))
626
- return r;
627
- r = e ? i.getLastChild() : i.getFirstChild();
760
+ function Pr(t, r) {
761
+ let e = r ? t.getPreviousSibling() : t.getNextSibling(), n = t;
762
+ for (; e == null && P(n); )
763
+ n = n.getParentOrThrow().getParent(), n != null && (e = r ? n.getPreviousSibling() : n.getNextSibling());
764
+ for (; P(e); ) {
765
+ const i = r ? e.getLastChild() : e.getFirstChild();
766
+ if (!ct(i))
767
+ return e;
768
+ e = r ? i.getLastChild() : i.getFirstChild();
628
769
  }
629
770
  return null;
630
771
  }
631
- function Ct(t, e, r) {
632
- const o = Z();
633
- return o != null && e.update(() => {
634
- const i = et(o);
635
- if (!A(i))
772
+ function Tt(t, r, e) {
773
+ const n = it();
774
+ return n != null && r.update(() => {
775
+ const i = lt(n);
776
+ if (!P(i))
636
777
  return;
637
- const l = yr(i, r);
638
- if (l != null) {
639
- l.selectStart();
640
- const a = e.getElementByKey(l.__key);
641
- a != null && (t.preventDefault(), setTimeout(() => {
642
- a.focus();
778
+ const a = Pr(i, e);
779
+ if (a != null) {
780
+ a.selectStart();
781
+ const l = r.getElementByKey(a.__key);
782
+ l != null && (t.preventDefault(), setTimeout(() => {
783
+ l.focus();
643
784
  }, 0));
644
785
  }
645
786
  }), !1;
646
787
  }
647
- const xr = () => /* @__PURE__ */ p(H, { children: [
648
- /* @__PURE__ */ n(He, {}),
649
- /* @__PURE__ */ n(We, {}),
650
- /* @__PURE__ */ n(Ue, {}),
651
- /* @__PURE__ */ n(Tr, {}),
652
- /* @__PURE__ */ n(je, {})
653
- ] }), Nr = ({
788
+ const Vt = ge("INSERT_IMAGE_COMMAND");
789
+ function Hr() {
790
+ const [t] = rr();
791
+ return x(() => {
792
+ if (!t.hasNodes([z]))
793
+ throw new Error("ImagePlugin: ImageNode not registered on editor");
794
+ return tt(
795
+ t.registerCommand(
796
+ Vt,
797
+ (r) => {
798
+ const e = gt(r);
799
+ return pe([e]), xt(e.getParentOrThrow()) && Ye(e, U).selectEnd(), !0;
800
+ },
801
+ me
802
+ )
803
+ );
804
+ }, [t]), null;
805
+ }
806
+ const Fr = () => /* @__PURE__ */ h(H, { children: [
807
+ /* @__PURE__ */ o(Ve, {}),
808
+ /* @__PURE__ */ o(tr, {}),
809
+ /* @__PURE__ */ o(Ze, {}),
810
+ /* @__PURE__ */ o(Dr, {}),
811
+ /* @__PURE__ */ o(er, {}),
812
+ /* @__PURE__ */ o(Hr, {})
813
+ ] }), Wr = ({
654
814
  state: t
655
815
  }) => {
656
- const [e] = y();
816
+ const [r] = L(), e = K(!1);
657
817
  return x(() => {
658
- if (t)
818
+ !t || e.current || (e.current = !0, window.queueMicrotask(() => {
659
819
  try {
660
- if (Ye(t)) {
661
- t.isEmpty() ? Ge(e) : e.setEditorState(t);
820
+ if (ir(t)) {
821
+ t.isEmpty() ? ar(r) : r.setEditorState(t);
662
822
  return;
663
823
  }
664
- if (typeof t == "string" && !Wt(t)) {
665
- Je(t, e);
824
+ if (typeof t == "string" && !Gt(t)) {
825
+ lr(t, r);
666
826
  return;
667
827
  }
668
- const r = e.parseEditorState(t);
669
- r.isEmpty() || e.setEditorState(r);
670
- } catch (r) {
671
- console.error("Could not parse"), console.error(r);
828
+ const n = r.parseEditorState(t);
829
+ n.isEmpty() || r.setEditorState(n);
830
+ } catch (n) {
831
+ console.error("Could not parse"), console.error(n);
672
832
  }
833
+ }));
673
834
  }, []), null;
674
- }, Sr = ye("div", {
835
+ }, Ur = $e("div", {
675
836
  border: "1px solid $borderDarker",
676
837
  borderRadius: "$md",
677
838
  position: "relative",
@@ -708,10 +869,10 @@ const xr = () => /* @__PURE__ */ p(H, { children: [
708
869
  }
709
870
  }
710
871
  ]
711
- }), wr = ({
872
+ }), jr = ({
712
873
  isLoading: t
713
- }) => /* @__PURE__ */ n(
714
- P,
874
+ }) => /* @__PURE__ */ o(
875
+ W,
715
876
  {
716
877
  css: {
717
878
  visibility: t ? "visible" : "hidden",
@@ -720,52 +881,56 @@ const xr = () => /* @__PURE__ */ p(H, { children: [
720
881
  right: "1rem",
721
882
  display: "flex"
722
883
  },
723
- children: /* @__PURE__ */ n($t, {})
884
+ children: /* @__PURE__ */ o(ht, {})
724
885
  }
725
- ), un = ({
886
+ ), En = ({
726
887
  isLoading: t,
727
- children: e,
728
- placeholderText: r,
729
- nodes: o,
888
+ children: r,
889
+ placeholderText: e,
890
+ nodes: n,
730
891
  plugins: i,
731
- toolbar: l,
732
- toolbarContent: a,
892
+ toolbar: a,
893
+ toolbarContent: l,
733
894
  content: s,
734
895
  hideBorder: d,
735
896
  onBlur: c,
736
897
  defaultState: u,
737
- css: h
898
+ css: g,
899
+ signUrl: b
738
900
  }) => {
739
- const { hasFocus: m, attributes: E } = Xe({ onBlur: c }), N = ot(null), b = Rt(() => ({ hasFocus: m, editorRef: N }), [m]);
740
- return /* @__PURE__ */ n(jt.Provider, { value: b, children: /* @__PURE__ */ p(
741
- Ee,
901
+ const { hasFocus: N, attributes: S } = sr({ onBlur: c }), k = K(null), w = zt(
902
+ () => ({ hasFocus: N, editorRef: k, signUrl: b }),
903
+ [N, b]
904
+ );
905
+ return /* @__PURE__ */ o(Jt.Provider, { value: w, children: /* @__PURE__ */ h(
906
+ Be,
742
907
  {
743
908
  initialConfig: {
744
909
  namespace: "ain-rich-text",
745
- onError: (S) => {
746
- console.error(S);
910
+ onError: (E) => {
911
+ console.error(E);
747
912
  },
748
- theme: Ut,
749
- nodes: o,
913
+ theme: Yt,
914
+ nodes: n,
750
915
  editable: !0
751
916
  },
752
917
  children: [
753
- /* @__PURE__ */ p(
754
- Sr,
918
+ /* @__PURE__ */ h(
919
+ Ur,
755
920
  {
756
- ref: N,
757
- hasFocus: m,
921
+ ref: k,
922
+ hasFocus: N,
758
923
  hideBorder: d,
759
- css: h,
760
- ...E,
924
+ css: g,
925
+ ...S,
761
926
  children: [
762
- l,
763
- /* @__PURE__ */ n(
764
- _e,
927
+ a,
928
+ /* @__PURE__ */ o(
929
+ Pe,
765
930
  {
766
931
  contentEditable: s,
767
- placeholder: r ? /* @__PURE__ */ n(
768
- P,
932
+ placeholder: e ? /* @__PURE__ */ o(
933
+ W,
769
934
  {
770
935
  css: {
771
936
  position: "absolute",
@@ -775,25 +940,25 @@ const xr = () => /* @__PURE__ */ p(H, { children: [
775
940
  pointerEvents: "none",
776
941
  fontSize: "$sm"
777
942
  },
778
- children: r
943
+ children: e
779
944
  }
780
945
  ) : null,
781
- ErrorBoundary: Re
946
+ ErrorBoundary: He
782
947
  }
783
948
  ),
784
- /* @__PURE__ */ n(xr, {}),
949
+ /* @__PURE__ */ o(Fr, {}),
785
950
  i,
786
- /* @__PURE__ */ n(wr, { isLoading: t }),
787
- !l && /* @__PURE__ */ n(Cr, { children: a })
951
+ /* @__PURE__ */ o(jr, { isLoading: t }),
952
+ !a && /* @__PURE__ */ o(zr, { children: l })
788
953
  ]
789
954
  }
790
955
  ),
791
- /* @__PURE__ */ n(Nr, { state: u }),
792
- /* @__PURE__ */ n(H, { children: e })
956
+ /* @__PURE__ */ o(Wr, { state: u }),
957
+ /* @__PURE__ */ o(H, { children: r })
793
958
  ]
794
959
  }
795
960
  ) });
796
- }, Er = {
961
+ }, Kr = {
797
962
  fontSize: "1rem",
798
963
  lineHeight: "1.5",
799
964
  "h1, h2, h3, h4, h5, h6": {
@@ -983,129 +1148,187 @@ const xr = () => /* @__PURE__ */ p(H, { children: [
983
1148
  defaultVariants: {
984
1149
  size: "md"
985
1150
  }
986
- }, hn = Fe(Er), pn = () => {
987
- const [t] = y(), e = v(() => {
988
- t.dispatchCommand(fe, {
1151
+ }, In = Qe(Kr), qr = ({
1152
+ uploadFile: t,
1153
+ ...r
1154
+ }) => {
1155
+ const [e] = L(), [n, i] = p(null), a = async (s) => {
1156
+ var c;
1157
+ const d = (c = s.target.files) == null ? void 0 : c[0];
1158
+ if (d) {
1159
+ const u = await t.uploadFile({ file: d });
1160
+ i(u);
1161
+ }
1162
+ }, l = () => {
1163
+ n && !t.isLoading && (e.dispatchCommand(Vt, {
1164
+ src: n,
1165
+ altText: `Image: ${n}`
1166
+ }), r.onOpenChange(!1));
1167
+ };
1168
+ return /* @__PURE__ */ h(Pt, { ...r, children: [
1169
+ /* @__PURE__ */ o(ze, { children: "Sett inn bilde" }),
1170
+ t.isLoading && /* @__PURE__ */ o(ht, {}),
1171
+ /* @__PURE__ */ o(
1172
+ Ht,
1173
+ {
1174
+ type: "file",
1175
+ accept: "image/png, image/jpeg",
1176
+ onChange: a,
1177
+ disabled: t.isLoading
1178
+ }
1179
+ ),
1180
+ /* @__PURE__ */ h(Z, { children: [
1181
+ /* @__PURE__ */ o(y, { onClick: () => r.onOpenChange(!1), children: "Avbryt" }),
1182
+ /* @__PURE__ */ o(
1183
+ y,
1184
+ {
1185
+ variant: "primary",
1186
+ disabled: !n || t.isLoading,
1187
+ onClick: l,
1188
+ children: "Sett inn"
1189
+ }
1190
+ )
1191
+ ] })
1192
+ ] });
1193
+ }, Rn = ({ uploadFile: t }) => {
1194
+ const [r] = L(), [e, n] = p(!1), i = C(() => {
1195
+ r.dispatchCommand(Le, {
989
1196
  rows: "3",
990
1197
  columns: "3",
991
1198
  includeHeaders: !1
992
1199
  });
993
- }, [t]);
994
- return /* @__PURE__ */ n(
995
- it,
996
- {
997
- trigger: /* @__PURE__ */ n(It, { dropdown: !0, children: "Sett inn" }),
998
- side: "bottom",
999
- align: "end",
1000
- children: /* @__PURE__ */ p(M, { onClick: e, children: [
1001
- /* @__PURE__ */ n(pr, { size: "1.25rem" }),
1002
- " Tabell"
1003
- ] })
1004
- }
1005
- );
1200
+ }, [r]);
1201
+ return /* @__PURE__ */ h(H, { children: [
1202
+ /* @__PURE__ */ h(
1203
+ dt,
1204
+ {
1205
+ trigger: /* @__PURE__ */ o(At, { dropdown: !0, children: "Sett inn" }),
1206
+ side: "bottom",
1207
+ align: "end",
1208
+ children: [
1209
+ /* @__PURE__ */ h(v, { onClick: i, children: [
1210
+ /* @__PURE__ */ o(wr, { size: "1.25rem" }),
1211
+ " Tabell"
1212
+ ] }),
1213
+ t && /* @__PURE__ */ h(v, { onClick: () => n(!0), children: [
1214
+ /* @__PURE__ */ o(Ge, { size: "1.25rem" }),
1215
+ " Bilde"
1216
+ ] })
1217
+ ]
1218
+ }
1219
+ ),
1220
+ t && /* @__PURE__ */ o(
1221
+ qr,
1222
+ {
1223
+ open: e,
1224
+ onOpenChange: n,
1225
+ uploadFile: t
1226
+ }
1227
+ )
1228
+ ] });
1006
1229
  };
1007
- function _r(t) {
1008
- return g({ 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);
1230
+ function Yr(t) {
1231
+ return m({ 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);
1009
1232
  }
1010
- const gn = () => {
1011
- const [t] = y(), [e, r] = k(null), { hasFocus: o } = ct();
1233
+ const On = () => {
1234
+ const [t] = L(), [r, e] = p(null), { hasFocus: n } = et();
1012
1235
  x(() => {
1013
- !o && e && r(null);
1014
- }, [o, e]);
1015
- const { refs: i, floatingStyles: l } = lt({
1236
+ !n && r && e(null);
1237
+ }, [n, r]);
1238
+ const { refs: i, floatingStyles: a } = ut({
1016
1239
  placement: "top-end",
1017
- open: !!e,
1240
+ open: !!r,
1018
1241
  elements: {
1019
- reference: e
1242
+ reference: r
1020
1243
  },
1021
- middleware: [Bt({ mainAxis: -20, crossAxis: -2 })]
1244
+ middleware: [Wt({ mainAxis: -20, crossAxis: -2 })]
1022
1245
  });
1023
1246
  x(() => t.registerCommand(
1024
- F,
1247
+ j,
1025
1248
  () => {
1026
- const s = T();
1027
- if (L(s)) {
1028
- const d = s.anchor.getNode(), c = me(d);
1029
- r(c ? t.getElementByKey(c.getKey()) : null);
1249
+ const s = _();
1250
+ if (T(s)) {
1251
+ const d = s.anchor.getNode(), c = ye(d);
1252
+ e(c ? t.getElementByKey(c.getKey()) : null);
1030
1253
  }
1031
1254
  return !1;
1032
1255
  },
1033
- ae
1256
+ fe
1034
1257
  ), [t]);
1035
- const a = (s) => () => {
1258
+ const l = (s) => () => {
1036
1259
  t.update(() => {
1037
1260
  switch (s) {
1038
1261
  case "add-row-over":
1039
- ft(!1);
1262
+ bt(!1);
1040
1263
  break;
1041
1264
  case "add-row-under":
1042
- ft(!0);
1265
+ bt(!0);
1043
1266
  break;
1044
1267
  case "add-column-left":
1045
- gt(!1);
1268
+ kt(!1);
1046
1269
  break;
1047
1270
  case "add-column-right":
1048
- gt(!0);
1271
+ kt(!0);
1049
1272
  break;
1050
1273
  case "delete-row":
1051
- be();
1274
+ we();
1052
1275
  break;
1053
1276
  case "delete-column":
1054
- ke();
1277
+ Ne();
1055
1278
  break;
1056
1279
  }
1057
1280
  });
1058
1281
  };
1059
- return e ? /* @__PURE__ */ p(
1060
- it,
1282
+ return r ? /* @__PURE__ */ h(
1283
+ dt,
1061
1284
  {
1062
- trigger: /* @__PURE__ */ n(
1063
- w,
1285
+ trigger: /* @__PURE__ */ o(
1286
+ y,
1064
1287
  {
1065
1288
  icon: !0,
1066
1289
  variant: "primary",
1067
1290
  color: "secondary",
1068
1291
  ref: i.setFloating,
1069
- style: l,
1292
+ style: a,
1070
1293
  css: { padding: "2px", width: "18px", height: "18px" },
1071
- children: /* @__PURE__ */ n(_r, {})
1294
+ children: /* @__PURE__ */ o(Yr, {})
1072
1295
  }
1073
1296
  ),
1074
1297
  children: [
1075
- /* @__PURE__ */ n(z, { onClick: a("add-row-over"), children: "Legg til rad over" }),
1076
- /* @__PURE__ */ n(z, { onClick: a("add-row-under"), children: "Legg til rad under" }),
1077
- /* @__PURE__ */ n(mt, {}),
1078
- /* @__PURE__ */ n(z, { onClick: a("add-column-left"), children: "Legg til kolonne venstre" }),
1079
- /* @__PURE__ */ n(z, { onClick: a("add-column-right"), children: "Legg til kolonne høyre" }),
1080
- /* @__PURE__ */ n(mt, {}),
1081
- /* @__PURE__ */ n(z, { onClick: a("delete-row"), children: "Fjern rad" }),
1082
- /* @__PURE__ */ n(z, { onClick: a("delete-column"), children: "Fjern kolonne" })
1298
+ /* @__PURE__ */ o(A, { onClick: l("add-row-over"), children: "Legg til rad over" }),
1299
+ /* @__PURE__ */ o(A, { onClick: l("add-row-under"), children: "Legg til rad under" }),
1300
+ /* @__PURE__ */ o(Ct, {}),
1301
+ /* @__PURE__ */ o(A, { onClick: l("add-column-left"), children: "Legg til kolonne venstre" }),
1302
+ /* @__PURE__ */ o(A, { onClick: l("add-column-right"), children: "Legg til kolonne høyre" }),
1303
+ /* @__PURE__ */ o(Ct, {}),
1304
+ /* @__PURE__ */ o(A, { onClick: l("delete-row"), children: "Fjern rad" }),
1305
+ /* @__PURE__ */ o(A, { onClick: l("delete-column"), children: "Fjern kolonne" })
1083
1306
  ]
1084
1307
  }
1085
1308
  ) : null;
1086
1309
  };
1087
- function dt(t) {
1088
- let e = t;
1089
- 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;
1090
- return e = String(e).trim(), e.match(r) || e.match(o) ? e : "https://";
1310
+ function pt(t) {
1311
+ let r = t;
1312
+ const e = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi, n = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
1313
+ return r = String(r).trim(), r.match(e) || r.match(n) ? r : "https://";
1091
1314
  }
1092
- function Yt(t) {
1093
- const e = t.anchor, r = t.focus, o = t.anchor.getNode(), i = t.focus.getNode();
1094
- return o === i ? o : t.isBackward() ? pt(r) ? o : i : pt(e) ? o : i;
1315
+ function Zt(t) {
1316
+ const r = t.anchor, e = t.focus, n = t.anchor.getNode(), i = t.focus.getNode();
1317
+ return n === i ? n : t.isBackward() ? ft(e) ? n : i : ft(r) ? n : i;
1095
1318
  }
1096
- const fn = (t) => (R.baseURL = t, R), K = class extends $ {
1319
+ const $n = (t) => (O.baseURL = t, O), J = class extends B {
1097
1320
  static getType() {
1098
1321
  return "rutine_link";
1099
1322
  }
1100
- static clone(e) {
1101
- return new K(e.__url, {}, e.__key);
1323
+ static clone(r) {
1324
+ return new J(r.__url, {}, r.__key);
1102
1325
  }
1103
- createDOM(e) {
1104
- const r = super.createDOM(e);
1105
- return r.setAttribute("href", this.getURL()), r.setAttribute("target", "_blank"), r.setAttribute("rel", "noopener noreferrer"), r.classList.add("rutine-link"), r;
1326
+ createDOM(r) {
1327
+ const e = super.createDOM(r);
1328
+ return e.setAttribute("href", this.getURL()), e.setAttribute("target", "_blank"), e.setAttribute("rel", "noopener noreferrer"), e.classList.add("rutine-link"), e;
1106
1329
  }
1107
- static importJSON(e) {
1108
- return Gt(e.url);
1330
+ static importJSON(r) {
1331
+ return te(r.url);
1109
1332
  }
1110
1333
  exportJSON() {
1111
1334
  return {
@@ -1117,265 +1340,265 @@ const fn = (t) => (R.baseURL = t, R), K = class extends $ {
1117
1340
  }
1118
1341
  getURL() {
1119
1342
  try {
1120
- return new URL(this.__url, K.baseURL).toString();
1343
+ return new URL(this.__url, J.baseURL).toString();
1121
1344
  } catch {
1122
1345
  return "";
1123
1346
  }
1124
1347
  }
1125
1348
  };
1126
- let R = K;
1127
- ht(R, "baseURL", "");
1128
- function Gt(t) {
1129
- return new R(t);
1349
+ let O = J;
1350
+ I(O, "baseURL", "");
1351
+ function te(t) {
1352
+ return new O(t);
1130
1353
  }
1131
- function Rr(t) {
1132
- return t instanceof R;
1354
+ function Gr(t) {
1355
+ return t instanceof O;
1133
1356
  }
1134
- const Ir = ({ onClose: t }) => {
1135
- const [e] = y(), r = v(
1357
+ const Jr = ({ onClose: t }) => {
1358
+ const [r] = L(), e = C(
1136
1359
  (i) => {
1137
- e.update(() => {
1138
- const l = T();
1139
- if (L(l) && l.isCollapsed()) {
1140
- const a = I(i);
1141
- l.insertNodes([a]);
1142
- const s = Tt();
1143
- s.setTextNodeRange(a, 0, a, i.length), G(s);
1360
+ r.update(() => {
1361
+ const a = _();
1362
+ if (T(a) && a.isCollapsed()) {
1363
+ const l = $(i);
1364
+ a.insertNodes([l]);
1365
+ const s = yt();
1366
+ s.setTextNodeRange(l, 0, l, i.length), Q(s);
1144
1367
  }
1145
- e.dispatchCommand(J, dt(i));
1368
+ r.dispatchCommand(V, pt(i));
1146
1369
  });
1147
1370
  },
1148
- [e]
1371
+ [r]
1149
1372
  );
1150
- return /* @__PURE__ */ p("form", { onSubmit: (i) => {
1151
- r(i.currentTarget.url.value), t();
1373
+ return /* @__PURE__ */ h("form", { onSubmit: (i) => {
1374
+ e(i.currentTarget.url.value), t();
1152
1375
  }, children: [
1153
- /* @__PURE__ */ n(Se, { name: "url", label: "URL", type: "url", required: !0 }),
1154
- /* @__PURE__ */ p(at, { children: [
1155
- /* @__PURE__ */ n(w, { onClick: t, children: "Avbryt" }),
1156
- /* @__PURE__ */ n(w, { type: "submit", variant: "primary", children: "Sett inn" })
1376
+ /* @__PURE__ */ o(Ht, { name: "url", label: "URL", type: "url", required: !0 }),
1377
+ /* @__PURE__ */ h(Z, { children: [
1378
+ /* @__PURE__ */ o(y, { onClick: t, children: "Avbryt" }),
1379
+ /* @__PURE__ */ o(y, { type: "submit", variant: "primary", children: "Sett inn" })
1157
1380
  ] })
1158
1381
  ] });
1159
- }, zr = ({
1382
+ }, Xr = ({
1160
1383
  onClose: t,
1161
- getDocs: e
1384
+ getDocs: r
1162
1385
  }) => {
1163
- const [r] = y(), [o, i] = k([]), l = e(), a = v(
1386
+ const [e] = L(), [n, i] = p([]), a = r(), l = C(
1164
1387
  (s) => {
1165
- r.update(() => {
1166
- const d = T();
1167
- if (L(d)) {
1388
+ e.update(() => {
1389
+ const d = _();
1390
+ if (T(d)) {
1168
1391
  const c = [];
1169
- for (const [u, h] of s.entries()) {
1170
- const m = Gt(h.value);
1171
- m.append(I(h.label)), c.push(m), u !== s.length - 1 && c.push(I(" "));
1392
+ for (const [u, g] of s.entries()) {
1393
+ const b = te(g.value);
1394
+ b.append($(g.label)), c.push(b), u !== s.length - 1 && c.push($(" "));
1172
1395
  }
1173
1396
  d.insertNodes(c);
1174
1397
  }
1175
1398
  });
1176
1399
  },
1177
- [r]
1400
+ [e]
1178
1401
  );
1179
- return /* @__PURE__ */ p(H, { children: [
1180
- /* @__PURE__ */ n(
1181
- we,
1402
+ return /* @__PURE__ */ h(H, { children: [
1403
+ /* @__PURE__ */ o(
1404
+ De,
1182
1405
  {
1183
1406
  isMulti: !0,
1184
- options: l,
1407
+ options: a,
1185
1408
  onChange: (s) => i(s)
1186
1409
  }
1187
1410
  ),
1188
- /* @__PURE__ */ p(at, { children: [
1189
- /* @__PURE__ */ n(w, { onClick: t, children: "Avbryt" }),
1190
- /* @__PURE__ */ n(
1191
- w,
1411
+ /* @__PURE__ */ h(Z, { children: [
1412
+ /* @__PURE__ */ o(y, { onClick: t, children: "Avbryt" }),
1413
+ /* @__PURE__ */ o(
1414
+ y,
1192
1415
  {
1193
1416
  variant: "primary",
1194
1417
  onClick: () => {
1195
- a(o), t();
1418
+ l(n), t();
1196
1419
  },
1197
1420
  children: "Sett inn"
1198
1421
  }
1199
1422
  )
1200
1423
  ] })
1201
1424
  ] });
1202
- }, Or = ({
1425
+ }, Qr = ({
1203
1426
  onClose: t,
1204
- uploadFile: e
1427
+ uploadFile: r
1205
1428
  }) => {
1206
- const [r] = y(), [o, i] = k(null), l = async (s) => {
1429
+ const [e] = L(), [n, i] = p(null), a = async (s) => {
1207
1430
  var c;
1208
1431
  const d = (c = s.target.files) == null ? void 0 : c[0];
1209
1432
  if (d) {
1210
- const u = await e.uploadFile({ file: d });
1433
+ const u = await r.uploadFile({ file: d });
1211
1434
  i({
1212
1435
  name: d.name,
1213
1436
  url: u
1214
1437
  });
1215
1438
  }
1216
- }, a = v(() => {
1217
- r.update(() => {
1218
- if (!o)
1439
+ }, l = C(() => {
1440
+ e.update(() => {
1441
+ if (!n)
1219
1442
  return;
1220
- const s = T();
1221
- if (L(s) && s.isCollapsed()) {
1222
- const d = I(o.name);
1443
+ const s = _();
1444
+ if (T(s) && s.isCollapsed()) {
1445
+ const d = $(n.name);
1223
1446
  s.insertNodes([d]);
1224
- const c = Tt();
1225
- c.setTextNodeRange(d, 0, d, o.name.length), G(c);
1447
+ const c = yt();
1448
+ c.setTextNodeRange(d, 0, d, n.name.length), Q(c);
1226
1449
  }
1227
- r.dispatchCommand(J, dt(o.url));
1450
+ e.dispatchCommand(V, pt(n.url));
1228
1451
  });
1229
- }, [r, o]);
1230
- return /* @__PURE__ */ p(H, { children: [
1231
- e.isLoading && /* @__PURE__ */ n($t, {}),
1232
- /* @__PURE__ */ n(
1452
+ }, [e, n]);
1453
+ return /* @__PURE__ */ h(H, { children: [
1454
+ r.isLoading && /* @__PURE__ */ o(ht, {}),
1455
+ /* @__PURE__ */ o(
1233
1456
  "input",
1234
1457
  {
1235
1458
  type: "file",
1236
- onChange: l,
1237
- disabled: e.isLoading
1459
+ onChange: a,
1460
+ disabled: r.isLoading
1238
1461
  }
1239
1462
  ),
1240
- /* @__PURE__ */ p(at, { children: [
1241
- /* @__PURE__ */ n(w, { onClick: t, children: "Avbryt" }),
1242
- /* @__PURE__ */ n(
1243
- w,
1463
+ /* @__PURE__ */ h(Z, { children: [
1464
+ /* @__PURE__ */ o(y, { onClick: t, children: "Avbryt" }),
1465
+ /* @__PURE__ */ o(
1466
+ y,
1244
1467
  {
1245
1468
  variant: "primary",
1246
1469
  onClick: () => {
1247
- a(), t();
1470
+ l(), t();
1248
1471
  },
1249
- disabled: !o,
1472
+ disabled: !n,
1250
1473
  children: "Sett inn"
1251
1474
  }
1252
1475
  )
1253
1476
  ] })
1254
1477
  ] });
1255
- }, $r = ({
1478
+ }, Vr = ({
1256
1479
  open: t,
1257
- onOpenChange: e,
1258
- getDocs: r,
1259
- uploadFile: o
1480
+ onOpenChange: r,
1481
+ getDocs: e,
1482
+ uploadFile: n
1260
1483
  }) => {
1261
- const [i, l] = k("url"), a = () => {
1262
- e(!1);
1484
+ const [i, a] = p("url"), l = () => {
1485
+ r(!1);
1263
1486
  };
1264
- return /* @__PURE__ */ p(xe, { open: t, onOpenChange: e, css: { width: "600px" }, children: [
1265
- /* @__PURE__ */ p(Ne, { css: { marginBottom: "$8" }, children: [
1266
- /* @__PURE__ */ n(V, { active: i === "url", onClick: () => l("url"), children: "URL" }),
1267
- r && /* @__PURE__ */ n(
1268
- V,
1487
+ return /* @__PURE__ */ h(Pt, { open: t, onOpenChange: r, css: { width: "600px" }, children: [
1488
+ /* @__PURE__ */ h(Ae, { css: { marginBottom: "$8" }, children: [
1489
+ /* @__PURE__ */ o(ot, { active: i === "url", onClick: () => a("url"), children: "URL" }),
1490
+ e && /* @__PURE__ */ o(
1491
+ ot,
1269
1492
  {
1270
1493
  active: i === "rutine",
1271
- onClick: () => l("rutine"),
1494
+ onClick: () => a("rutine"),
1272
1495
  children: "Rutine"
1273
1496
  }
1274
1497
  ),
1275
- o && /* @__PURE__ */ n(V, { active: i === "file", onClick: () => l("file"), children: "Fil" })
1498
+ n && /* @__PURE__ */ o(ot, { active: i === "file", onClick: () => a("file"), children: "Fil" })
1276
1499
  ] }),
1277
- i === "url" && /* @__PURE__ */ n(Ir, { onClose: a }),
1278
- i === "rutine" && r && /* @__PURE__ */ n(zr, { onClose: a, getDocs: r }),
1279
- i === "file" && o && /* @__PURE__ */ n(Or, { onClose: a, uploadFile: o })
1500
+ i === "url" && /* @__PURE__ */ o(Jr, { onClose: l }),
1501
+ i === "rutine" && e && /* @__PURE__ */ o(Xr, { onClose: l, getDocs: e }),
1502
+ i === "file" && n && /* @__PURE__ */ o(Qr, { onClose: l, uploadFile: n })
1280
1503
  ] });
1281
- }, mn = ({
1504
+ }, zn = ({
1282
1505
  getDocs: t,
1283
- uploadFile: e
1506
+ uploadFile: r
1284
1507
  }) => {
1285
- const [r] = y(), [o, i] = k(!1), [l, a] = k(!1), s = v(() => {
1286
- const d = T();
1287
- if (L(d)) {
1288
- const c = Yt(d), u = c.getParent();
1289
- i(W(u) || W(c));
1508
+ const [e] = L(), [n, i] = p(!1), [a, l] = p(!1), s = C(() => {
1509
+ const d = _();
1510
+ if (T(d)) {
1511
+ const c = Zt(d), u = c.getParent();
1512
+ i(Y(u) || Y(c));
1290
1513
  }
1291
1514
  }, []);
1292
- return x(() => r.registerCommand(
1293
- F,
1515
+ return x(() => e.registerCommand(
1516
+ j,
1294
1517
  () => (s(), !1),
1295
- tt
1296
- ), [r, s]), /* @__PURE__ */ p(zt, { type: "single", value: o ? "link" : "", children: [
1297
- /* @__PURE__ */ n(
1298
- O,
1518
+ at
1519
+ ), [e, s]), /* @__PURE__ */ h(Dt, { type: "single", value: n ? "link" : "", children: [
1520
+ /* @__PURE__ */ o(
1521
+ D,
1299
1522
  {
1300
1523
  onClick: () => {
1301
- o ? r.dispatchCommand(J, null) : a(!0);
1524
+ n ? e.dispatchCommand(V, null) : l(!0);
1302
1525
  },
1303
1526
  title: "Lenke",
1304
1527
  value: "link",
1305
- children: /* @__PURE__ */ n(lr, { size: "1.25rem" })
1528
+ children: /* @__PURE__ */ o(_r, { size: "1.25rem" })
1306
1529
  }
1307
1530
  ),
1308
- /* @__PURE__ */ n(
1309
- $r,
1531
+ /* @__PURE__ */ o(
1532
+ Vr,
1310
1533
  {
1311
- open: l,
1312
- onOpenChange: a,
1534
+ open: a,
1535
+ onOpenChange: l,
1313
1536
  getDocs: t,
1314
- uploadFile: e
1537
+ uploadFile: r
1315
1538
  }
1316
1539
  )
1317
1540
  ] });
1318
- }, kn = () => {
1319
- const [t] = y(), e = ot(null), [r, o] = k(null), [i, l] = k(""), { hasFocus: a } = ct();
1541
+ }, An = () => {
1542
+ const [t] = L(), r = K(null), [e, n] = p(null), [i, a] = p(""), { hasFocus: l } = et();
1320
1543
  x(() => {
1321
- r ? t.update(() => {
1322
- l(r.getURL());
1323
- }) : l("");
1324
- }, [t, r]);
1325
- const s = !!(r && i && a), { refs: d, floatingStyles: c, context: u } = lt({
1544
+ e ? t.update(() => {
1545
+ a(e.getURL());
1546
+ }) : a("");
1547
+ }, [t, e]);
1548
+ const s = !!(e && i && l), { refs: d, floatingStyles: c, context: u } = ut({
1326
1549
  placement: "top",
1327
1550
  strategy: "fixed",
1328
1551
  open: s,
1329
- whileElementsMounted: At,
1552
+ whileElementsMounted: Ft,
1330
1553
  elements: {
1331
- reference: e.current
1554
+ reference: r.current
1332
1555
  },
1333
- middleware: [$e()]
1334
- }), { getFloatingProps: h } = Dt([
1335
- Pt(u),
1336
- Ae(u)
1337
- ]), m = v(() => {
1338
- var S;
1339
- const b = T();
1340
- if (L(b)) {
1341
- const B = Yt(b), f = B.getParent();
1342
- let U = null;
1343
- if (W(f) ? U = f : W(B) && (U = B), U) {
1344
- const X = window.getSelection(), ut = t.getRootElement();
1345
- b !== null && X !== null && ut !== null && ut.contains(X.anchorNode) && t.isEditable() && (e.current = ((S = X.focusNode) == null ? void 0 : S.parentElement) ?? null);
1556
+ middleware: [je()]
1557
+ }), { getFloatingProps: g } = Ut([
1558
+ jt(u),
1559
+ Ke(u)
1560
+ ]), b = C(() => {
1561
+ var w;
1562
+ const k = _();
1563
+ if (T(k)) {
1564
+ const E = Zt(k), f = E.getParent();
1565
+ let q = null;
1566
+ if (Y(f) ? q = f : Y(E) && (q = E), q) {
1567
+ const rt = window.getSelection(), mt = t.getRootElement();
1568
+ k !== null && rt !== null && mt !== null && mt.contains(rt.anchorNode) && t.isEditable() && (r.current = ((w = rt.focusNode) == null ? void 0 : w.parentElement) ?? null);
1346
1569
  }
1347
- o(U);
1570
+ n(q);
1348
1571
  }
1349
- }, [t]), E = v(() => {
1350
- r && Rr(r) && t.update(() => {
1351
- r.remove();
1352
- }), t.dispatchCommand(J, null);
1353
- }, [t, r]);
1572
+ }, [t]), N = C(() => {
1573
+ e && Gr(e) && t.update(() => {
1574
+ e.remove();
1575
+ }), t.dispatchCommand(V, null);
1576
+ }, [t, e]);
1354
1577
  if (x(() => {
1355
1578
  t.getEditorState().read(() => {
1356
- m();
1579
+ b();
1357
1580
  });
1358
- }, [t, m]), x(() => st(
1359
- t.registerUpdateListener(({ editorState: b }) => {
1360
- b.read(() => {
1361
- m();
1581
+ }, [t, b]), x(() => tt(
1582
+ t.registerUpdateListener(({ editorState: k }) => {
1583
+ k.read(() => {
1584
+ b();
1362
1585
  });
1363
1586
  }),
1364
1587
  t.registerCommand(
1365
- F,
1366
- () => (m(), !0),
1367
- _
1588
+ j,
1589
+ () => (b(), !0),
1590
+ R
1368
1591
  ),
1369
1592
  t.registerCommand(
1370
- Mt,
1371
- () => r ? (o(null), !0) : !1,
1372
- le
1593
+ Lt,
1594
+ () => e ? (n(null), !0) : !1,
1595
+ ke
1373
1596
  )
1374
- ), [t, m, r]), !s)
1597
+ ), [t, b, e]), !s)
1375
1598
  return null;
1376
- const N = dt(i);
1377
- return /* @__PURE__ */ n(Ft, { children: /* @__PURE__ */ p(
1378
- Ot,
1599
+ const S = pt(i);
1600
+ return /* @__PURE__ */ o(Kt, { children: /* @__PURE__ */ h(
1601
+ Bt,
1379
1602
  {
1380
1603
  ref: d.setFloating,
1381
1604
  css: {
@@ -1386,10 +1609,10 @@ const Ir = ({ onClose: t }) => {
1386
1609
  alignItems: "center"
1387
1610
  },
1388
1611
  style: c,
1389
- ...h(),
1612
+ ...g(),
1390
1613
  children: [
1391
- /* @__PURE__ */ n(
1392
- P,
1614
+ /* @__PURE__ */ o(
1615
+ W,
1393
1616
  {
1394
1617
  as: "a",
1395
1618
  css: {
@@ -1399,41 +1622,44 @@ const Ir = ({ onClose: t }) => {
1399
1622
  textOverflow: "ellipsis",
1400
1623
  marginRight: "$4"
1401
1624
  },
1402
- href: N,
1403
- title: N,
1625
+ href: S,
1626
+ title: S,
1404
1627
  target: "_blank",
1405
1628
  rel: "noreferrer",
1406
1629
  children: i
1407
1630
  }
1408
1631
  ),
1409
- /* @__PURE__ */ n(w, { color: "danger", icon: !0, size: "sm", onClick: E, children: /* @__PURE__ */ n(De, { size: 24 }) })
1632
+ /* @__PURE__ */ o(y, { color: "danger", icon: !0, size: "sm", onClick: N, children: /* @__PURE__ */ o(Je, { size: 24 }) })
1410
1633
  ]
1411
1634
  }
1412
1635
  ) });
1413
1636
  };
1414
1637
  export {
1415
- Gt as $createRutineLinkNode,
1416
- Rr as $isRutineLinkNode,
1417
- Cr as FloatingToolbar,
1418
- pn as InsertSelector,
1419
- kn as LinkEditPlugin,
1420
- j as LinkTargetNode,
1421
- mn as LinkToolbarButton,
1422
- un as RichTextEditor,
1423
- Mr as RichTextToolbar,
1424
- R as RutineLinkNode,
1425
- fn as RutineLinkNodeInit,
1426
- gn as TableEditPlugin,
1427
- Ge as clearEditorState,
1428
- cn as defaultNodes,
1429
- dn as defaultViewNodes,
1430
- Ye as isEditorState,
1431
- Wt as isJSON,
1432
- jt as richTextContext,
1433
- hn as richTextCss,
1434
- Er as richTextStyleObj,
1435
- Je as setStateFromPlainText,
1436
- sn as stateToHTML,
1437
- Xe as useHasFocusWithin,
1438
- ct as useRichTextContext
1638
+ gt as $createImageNode,
1639
+ te as $createRutineLinkNode,
1640
+ Nn as $isImageNode,
1641
+ Gr as $isRutineLinkNode,
1642
+ zr as FloatingToolbar,
1643
+ z as ImageNode,
1644
+ Rn as InsertSelector,
1645
+ An as LinkEditPlugin,
1646
+ G as LinkTargetNode,
1647
+ zn as LinkToolbarButton,
1648
+ En as RichTextEditor,
1649
+ Ar as RichTextToolbar,
1650
+ O as RutineLinkNode,
1651
+ $n as RutineLinkNodeInit,
1652
+ On as TableEditPlugin,
1653
+ ar as clearEditorState,
1654
+ wn as defaultNodes,
1655
+ Sn as defaultViewNodes,
1656
+ ir as isEditorState,
1657
+ Gt as isJSON,
1658
+ Jt as richTextContext,
1659
+ In as richTextCss,
1660
+ Kr as richTextStyleObj,
1661
+ lr as setStateFromPlainText,
1662
+ yn as stateToHTML,
1663
+ sr as useHasFocusWithin,
1664
+ et as useRichTextContext
1439
1665
  };