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