@chaibuilder/sdk 0.1.3 → 0.1.4
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.
- package/dist/{AddBlocks-0916e841.cjs → AddBlocks-1f683caa.cjs} +1 -1
- package/dist/{AddBlocks-c195f577.js → AddBlocks-b6a12d50.js} +1 -1
- package/dist/{BrandingOptions-742992b6.cjs → BrandingOptions-02e4ebcf.cjs} +1 -1
- package/dist/{BrandingOptions-766c19c6.js → BrandingOptions-1190723a.js} +1 -1
- package/dist/{CanvasArea-25800a3e.js → CanvasArea-15458836.js} +2 -2
- package/dist/{CanvasArea-e855c4a2.cjs → CanvasArea-f5d27245.cjs} +2 -2
- package/dist/{Layers-a2169d0b.cjs → Layers-06fa708d.cjs} +1 -1
- package/dist/{Layers-f7e792f6.js → Layers-ff4ef9c0.js} +2 -2
- package/dist/{MarkAsGlobalBlock-6bac1842.js → MarkAsGlobalBlock-dea26aa7.js} +1 -1
- package/dist/{MarkAsGlobalBlock-6187e6fd.cjs → MarkAsGlobalBlock-fa0e0543.cjs} +1 -1
- package/dist/{PagesPanel-0827c264.js → PagesPanel-3e9163c4.js} +2 -2
- package/dist/{PagesPanel-5698953d.cjs → PagesPanel-b08e1357.cjs} +1 -1
- package/dist/{ProjectPanel-e577029a.js → ProjectPanel-17c5f131.js} +5 -5
- package/dist/ProjectPanel-f0b94e3f.cjs +1 -0
- package/dist/{Settings-b214f859.js → Settings-6f2e86a9.js} +1 -1
- package/dist/{Settings-bee21026.cjs → Settings-739cff3b.cjs} +1 -1
- package/dist/{SidePanels-03fa10e8.js → SidePanels-96e64da9.js} +2 -2
- package/dist/{SidePanels-934159a4.cjs → SidePanels-ce4d41d5.cjs} +1 -1
- package/dist/{Topbar-9bc8c9cf.js → Topbar-08d10607.js} +1 -1
- package/dist/{Topbar-c083cc2a.cjs → Topbar-b97472fc.cjs} +1 -1
- package/dist/add-page-modal-3275cfb2.cjs +1 -0
- package/dist/{add-page-modal-63858244.js → add-page-modal-bcd9249e.js} +13 -12
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/delete-page-modal-420a17e3.cjs +1 -0
- package/dist/{delete-page-modal-def9012d.js → delete-page-modal-fa7b4272.js} +4 -4
- package/dist/index-133d90a5.cjs +2 -0
- package/dist/{index-390f7bef.js → index-3f65447f.js} +184 -179
- package/dist/{page-viewer-83ce2c70.cjs → page-viewer-139bfb2a.cjs} +1 -1
- package/dist/{page-viewer-41cbb548.js → page-viewer-f1452439.js} +2 -2
- package/dist/{project-general-setting-2c8bed74.cjs → project-general-setting-0d7715b8.cjs} +1 -1
- package/dist/{project-general-setting-0262fe62.js → project-general-setting-e5d14fa6.js} +1 -1
- package/dist/server.cjs +1 -0
- package/dist/server.d.ts +142 -0
- package/dist/server.js +126 -0
- package/dist/single-page-detail-54d7feca.cjs +1 -0
- package/dist/{single-page-detail-924d57fc.js → single-page-detail-74f88ed2.js} +14 -13
- package/dist/useMutation-7d536740.cjs +1 -0
- package/dist/useMutation-97876a40.js +126 -0
- package/dist/usePageActions-ac9ad321.cjs +1 -0
- package/dist/{usePageActions-f86f6f65.js → usePageActions-de3b7515.js} +12 -11
- package/dist/useProjectActions-3b1dbb5e.js +18 -0
- package/dist/useProjectActions-41af0f70.cjs +1 -0
- package/package.json +7 -2
- package/dist/ProjectPanel-a3cb7396.cjs +0 -1
- package/dist/add-page-modal-cb367c9d.cjs +0 -1
- package/dist/delete-page-modal-1e3914e3.cjs +0 -1
- package/dist/index-207f2cbf.cjs +0 -2
- package/dist/index-824a7bd0.js +0 -188
- package/dist/index-ebd86d7f.cjs +0 -2
- package/dist/single-page-detail-cfeae896.cjs +0 -1
- package/dist/usePageActions-3bed2330.cjs +0 -1
- package/dist/useProjectActions-1de05f63.js +0 -17
- package/dist/useProjectActions-5092ed79.cjs +0 -1
|
@@ -22,11 +22,11 @@ import { FlagsProvider as mo } from "flagged";
|
|
|
22
22
|
import * as pe from "react";
|
|
23
23
|
import Es, { createContext as go, useReducer as yo, useEffect as ke, useDebugValue as vo, useCallback as X, useContext as bo, useMemo as wo, useState as So, Suspense as Gt, lazy as $t } from "react";
|
|
24
24
|
import { DndProvider as xo } from "react-dnd";
|
|
25
|
-
import { flatten as be, find as Ae, filter as te, map as ue, omit as Tn, isEmpty as Me, isString as Ps, set as ut, get as ee, has as Os, includes as de, without as Yr, forIn as Zr, findIndex as Sn, last as ko, startsWith as ei, first as
|
|
25
|
+
import { flatten as be, find as Ae, filter as te, map as ue, omit as Tn, isEmpty as Me, isString as Ps, set as ut, get as ee, has as Os, includes as de, without as Yr, forIn as Zr, findIndex as Sn, last as ko, startsWith as ei, first as Be, isNull as os, each as We, pick as Gs, sortBy as Ws, isObject as Ao } from "lodash";
|
|
26
26
|
import { getBackendOptions as Eo, MultiBackend as Po } from "@minoru/react-dnd-treeview";
|
|
27
27
|
import { u as en, c as ti, B as Oo, S as _o, T as Co, a as Io } from "./useBuilderProp-81a14920.js";
|
|
28
|
-
import { atom as N, useAtomValue as ne, useAtom as Y, useSetAtom as Xe, getDefaultStore as
|
|
29
|
-
import { c as
|
|
28
|
+
import { atom as N, useAtomValue as ne, useAtom as Y, useSetAtom as Xe, getDefaultStore as jo } from "jotai";
|
|
29
|
+
import { c as Bo } from "./utils-ac68b2c8.js";
|
|
30
30
|
import { useHotkeys as Le } from "react-hotkeys-hook";
|
|
31
31
|
import ni from "flat-to-nested";
|
|
32
32
|
import { g as He, c as Cn, B as as, a as Ro } from "./Class-e34b2337.js";
|
|
@@ -91,12 +91,12 @@ function Fe(e, t) {
|
|
|
91
91
|
typeof i == "function" ? i(r(s)) : i
|
|
92
92
|
)), t && (s.write = t), s;
|
|
93
93
|
}
|
|
94
|
-
const Hs = (e) => "init" in e, Js = (e) => !!e.write,
|
|
95
|
-
|
|
96
|
-
}).finally(() =>
|
|
94
|
+
const Hs = (e) => "init" in e, Js = (e) => !!e.write, Bn = /* @__PURE__ */ new WeakMap(), Zo = (e, t) => {
|
|
95
|
+
Bn.set(e, t), e.catch(() => {
|
|
96
|
+
}).finally(() => Bn.delete(e));
|
|
97
97
|
}, Xs = (e, t) => {
|
|
98
|
-
const n =
|
|
99
|
-
n && (
|
|
98
|
+
const n = Bn.get(e);
|
|
99
|
+
n && (Bn.delete(e), n(t));
|
|
100
100
|
}, Ys = (e, t) => {
|
|
101
101
|
e.status = "fulfilled", e.value = t;
|
|
102
102
|
}, Zs = (e, t) => {
|
|
@@ -116,26 +116,26 @@ const Hs = (e) => "init" in e, Js = (e) => !!e.write, jn = /* @__PURE__ */ new W
|
|
|
116
116
|
}
|
|
117
117
|
}, d = (p, v, I) => {
|
|
118
118
|
const w = /* @__PURE__ */ new Map();
|
|
119
|
-
let
|
|
119
|
+
let j = !1;
|
|
120
120
|
I.forEach((E, S) => {
|
|
121
|
-
!E && S === p && (E = v), E && (w.set(S, E), v.d.get(S) !== E && (
|
|
122
|
-
}), (
|
|
121
|
+
!E && S === p && (E = v), E && (w.set(S, E), v.d.get(S) !== E && (j = !0));
|
|
122
|
+
}), (j || v.d.size !== w.size) && (v.d = w);
|
|
123
123
|
}, u = (p, v, I) => {
|
|
124
|
-
const w = i(p),
|
|
124
|
+
const w = i(p), j = {
|
|
125
125
|
d: (w == null ? void 0 : w.d) || /* @__PURE__ */ new Map(),
|
|
126
126
|
v
|
|
127
127
|
};
|
|
128
|
-
if (I && d(p,
|
|
128
|
+
if (I && d(p, j, I), w && zt(w, j) && w.d === j.d)
|
|
129
129
|
return w;
|
|
130
|
-
if (w && gt(w) && gt(
|
|
131
|
-
if (w.d ===
|
|
130
|
+
if (w && gt(w) && gt(j) && ta(w, j)) {
|
|
131
|
+
if (w.d === j.d)
|
|
132
132
|
return w;
|
|
133
|
-
|
|
133
|
+
j.v = w.v;
|
|
134
134
|
}
|
|
135
|
-
return a(p,
|
|
135
|
+
return a(p, j), j;
|
|
136
136
|
}, f = (p, v, I, w) => {
|
|
137
137
|
if (ea(v)) {
|
|
138
|
-
let
|
|
138
|
+
let j;
|
|
139
139
|
const E = new Promise((S, Q) => {
|
|
140
140
|
let $ = !1;
|
|
141
141
|
v.then(
|
|
@@ -161,7 +161,7 @@ const Hs = (e) => "init" in e, Js = (e) => !!e.write, jn = /* @__PURE__ */ new W
|
|
|
161
161
|
Zs(E, G), Q(G), (l == null ? void 0 : l.d) !== h.d && F(p, h, l == null ? void 0 : l.d);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
),
|
|
164
|
+
), j = (G) => {
|
|
165
165
|
$ || ($ = !0, G.then(
|
|
166
166
|
(l) => Ys(E, l),
|
|
167
167
|
(l) => Zs(E, l)
|
|
@@ -169,16 +169,16 @@ const Hs = (e) => "init" in e, Js = (e) => !!e.write, jn = /* @__PURE__ */ new W
|
|
|
169
169
|
};
|
|
170
170
|
});
|
|
171
171
|
return E.orig = v, E.status = "pending", Zo(E, (S) => {
|
|
172
|
-
S &&
|
|
172
|
+
S && j(S), w == null || w();
|
|
173
173
|
}), u(p, E, I);
|
|
174
174
|
}
|
|
175
175
|
return u(p, v, I);
|
|
176
176
|
}, m = (p, v, I) => {
|
|
177
|
-
const w = i(p),
|
|
177
|
+
const w = i(p), j = {
|
|
178
178
|
d: (w == null ? void 0 : w.d) || /* @__PURE__ */ new Map(),
|
|
179
179
|
e: v
|
|
180
180
|
};
|
|
181
|
-
return I && d(p,
|
|
181
|
+
return I && d(p, j, I), w && er(w, j) && w.d === j.d ? w : (a(p, j), j);
|
|
182
182
|
}, b = (p) => {
|
|
183
183
|
const v = i(p);
|
|
184
184
|
if (v && (v.d.forEach(($, G) => {
|
|
@@ -191,7 +191,7 @@ const Hs = (e) => "init" in e, Js = (e) => !!e.write, jn = /* @__PURE__ */ new W
|
|
|
191
191
|
return v;
|
|
192
192
|
const I = /* @__PURE__ */ new Map();
|
|
193
193
|
let w = !0;
|
|
194
|
-
const
|
|
194
|
+
const j = ($) => {
|
|
195
195
|
if ($ === p) {
|
|
196
196
|
const l = i($);
|
|
197
197
|
if (l)
|
|
@@ -211,12 +211,12 @@ const Hs = (e) => "init" in e, Js = (e) => !!e.write, jn = /* @__PURE__ */ new W
|
|
|
211
211
|
get setSelf() {
|
|
212
212
|
return !S && Js(p) && (S = (...$) => {
|
|
213
213
|
if (!w)
|
|
214
|
-
return
|
|
214
|
+
return B(p, ...$);
|
|
215
215
|
}), S;
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
218
|
try {
|
|
219
|
-
const $ = p.read(
|
|
219
|
+
const $ = p.read(j, Q);
|
|
220
220
|
return f(
|
|
221
221
|
p,
|
|
222
222
|
$,
|
|
@@ -245,7 +245,7 @@ const Hs = (e) => "init" in e, Js = (e) => !!e.write, jn = /* @__PURE__ */ new W
|
|
|
245
245
|
});
|
|
246
246
|
};
|
|
247
247
|
w(p);
|
|
248
|
-
const
|
|
248
|
+
const j = (E) => {
|
|
249
249
|
const S = t.get(E);
|
|
250
250
|
S == null || S.t.forEach((Q) => {
|
|
251
251
|
var $;
|
|
@@ -259,14 +259,14 @@ const Hs = (e) => "init" in e, Js = (e) => !!e.write, jn = /* @__PURE__ */ new W
|
|
|
259
259
|
}
|
|
260
260
|
l || v.forEach((h) => h.delete(Q));
|
|
261
261
|
}
|
|
262
|
-
|
|
262
|
+
j(Q);
|
|
263
263
|
}
|
|
264
264
|
});
|
|
265
265
|
};
|
|
266
|
-
|
|
266
|
+
j(p);
|
|
267
267
|
}, D = (p, ...v) => {
|
|
268
268
|
let I = !0;
|
|
269
|
-
const w = (S) => xn(b(S)),
|
|
269
|
+
const w = (S) => xn(b(S)), j = (S, ...Q) => {
|
|
270
270
|
let $;
|
|
271
271
|
if (S === p) {
|
|
272
272
|
if (!Hs(S))
|
|
@@ -279,9 +279,9 @@ const Hs = (e) => "init" in e, Js = (e) => !!e.write, jn = /* @__PURE__ */ new W
|
|
|
279
279
|
const G = T();
|
|
280
280
|
}
|
|
281
281
|
return $;
|
|
282
|
-
}, E = p.write(w,
|
|
282
|
+
}, E = p.write(w, j, ...v);
|
|
283
283
|
return I = !1, E;
|
|
284
|
-
},
|
|
284
|
+
}, B = (p, ...v) => {
|
|
285
285
|
const I = D(p, ...v), w = T();
|
|
286
286
|
return I;
|
|
287
287
|
}, x = (p, v) => {
|
|
@@ -289,11 +289,11 @@ const Hs = (e) => "init" in e, Js = (e) => !!e.write, jn = /* @__PURE__ */ new W
|
|
|
289
289
|
t: new Set(v && [v]),
|
|
290
290
|
l: /* @__PURE__ */ new Set()
|
|
291
291
|
};
|
|
292
|
-
if (t.set(p, I), b(p).d.forEach((w,
|
|
293
|
-
const E = t.get(
|
|
294
|
-
E ? E.t.add(p) :
|
|
292
|
+
if (t.set(p, I), b(p).d.forEach((w, j) => {
|
|
293
|
+
const E = t.get(j);
|
|
294
|
+
E ? E.t.add(p) : j !== p && x(j, p);
|
|
295
295
|
}), b(p), Js(p) && p.onMount) {
|
|
296
|
-
const w = p.onMount((...
|
|
296
|
+
const w = p.onMount((...j) => B(p, ...j));
|
|
297
297
|
w && (I.u = w);
|
|
298
298
|
}
|
|
299
299
|
return I;
|
|
@@ -302,7 +302,7 @@ const Hs = (e) => "init" in e, Js = (e) => !!e.write, jn = /* @__PURE__ */ new W
|
|
|
302
302
|
const I = (v = t.get(p)) == null ? void 0 : v.u;
|
|
303
303
|
I && I(), t.delete(p);
|
|
304
304
|
const w = i(p);
|
|
305
|
-
w && (gt(w) && Xs(w.v), w.d.forEach((
|
|
305
|
+
w && (gt(w) && Xs(w.v), w.d.forEach((j, E) => {
|
|
306
306
|
if (E !== p) {
|
|
307
307
|
const S = t.get(E);
|
|
308
308
|
S && (S.t.delete(p), C(E, S) && k(E));
|
|
@@ -310,40 +310,40 @@ const Hs = (e) => "init" in e, Js = (e) => !!e.write, jn = /* @__PURE__ */ new W
|
|
|
310
310
|
}));
|
|
311
311
|
}, F = (p, v, I) => {
|
|
312
312
|
const w = new Set(v.d.keys());
|
|
313
|
-
I == null || I.forEach((
|
|
313
|
+
I == null || I.forEach((j, E) => {
|
|
314
314
|
if (w.has(E)) {
|
|
315
315
|
w.delete(E);
|
|
316
316
|
return;
|
|
317
317
|
}
|
|
318
318
|
const S = t.get(E);
|
|
319
319
|
S && (S.t.delete(p), C(E, S) && k(E));
|
|
320
|
-
}), w.forEach((
|
|
321
|
-
const E = t.get(
|
|
322
|
-
E ? E.t.add(p) : t.has(p) && x(
|
|
320
|
+
}), w.forEach((j) => {
|
|
321
|
+
const E = t.get(j);
|
|
322
|
+
E ? E.t.add(p) : t.has(p) && x(j, p);
|
|
323
323
|
});
|
|
324
324
|
}, T = () => {
|
|
325
325
|
let p;
|
|
326
326
|
for (; n.size; ) {
|
|
327
327
|
const v = Array.from(n);
|
|
328
328
|
n.clear(), v.forEach(([I, w]) => {
|
|
329
|
-
const
|
|
330
|
-
if (
|
|
331
|
-
|
|
329
|
+
const j = i(I);
|
|
330
|
+
if (j) {
|
|
331
|
+
j.d !== (w == null ? void 0 : w.d) && F(I, j, w == null ? void 0 : w.d);
|
|
332
332
|
const E = t.get(I);
|
|
333
333
|
E && !// TODO This seems pretty hacky. Hope to fix it.
|
|
334
334
|
// Maybe we could `mountDependencies` in `setAtomState`?
|
|
335
|
-
(w && !gt(w) && (zt(w,
|
|
335
|
+
(w && !gt(w) && (zt(w, j) || er(w, j))) && E.l.forEach((S) => S());
|
|
336
336
|
}
|
|
337
337
|
});
|
|
338
338
|
}
|
|
339
339
|
};
|
|
340
340
|
return {
|
|
341
341
|
get: g,
|
|
342
|
-
set:
|
|
342
|
+
set: B,
|
|
343
343
|
sub: (p, v) => {
|
|
344
|
-
const I = O(p), w = T(),
|
|
345
|
-
return
|
|
346
|
-
|
|
344
|
+
const I = O(p), w = T(), j = I.l;
|
|
345
|
+
return j.add(v), () => {
|
|
346
|
+
j.delete(v), y(p);
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
349
|
};
|
|
@@ -378,7 +378,7 @@ function la(e, t) {
|
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
380
|
const y = (D) => {
|
|
381
|
-
const
|
|
381
|
+
const B = D(r), x = D(e), F = s(x, B == null ? void 0 : B.arr).keyList.indexOf(O);
|
|
382
382
|
if (F < 0 || F >= x.length) {
|
|
383
383
|
const T = i[s(i).keyList.indexOf(O)];
|
|
384
384
|
if (T)
|
|
@@ -386,12 +386,12 @@ function la(e, t) {
|
|
|
386
386
|
throw new Error("splitAtom: index out of bounds for read");
|
|
387
387
|
}
|
|
388
388
|
return x[F];
|
|
389
|
-
}, A = (D,
|
|
389
|
+
}, A = (D, B, x) => {
|
|
390
390
|
const k = D(r), F = D(e), R = s(F, k == null ? void 0 : k.arr).keyList.indexOf(O);
|
|
391
391
|
if (R < 0 || R >= F.length)
|
|
392
392
|
throw new Error("splitAtom: index out of bounds for write");
|
|
393
393
|
const p = ua(x) ? x(F[R]) : x;
|
|
394
|
-
|
|
394
|
+
B(e, [
|
|
395
395
|
...F.slice(0, R),
|
|
396
396
|
p,
|
|
397
397
|
...F.slice(R + 1)
|
|
@@ -730,31 +730,31 @@ const Is = N((e) => {
|
|
|
730
730
|
);
|
|
731
731
|
});
|
|
732
732
|
Is.debugLabel = "selectedBlocksAtom";
|
|
733
|
-
const
|
|
733
|
+
const js = N((e) => {
|
|
734
734
|
const t = e(Is);
|
|
735
735
|
return t.length === 0 ? null : t.length === 1 ? t[0] : {
|
|
736
736
|
type: "Multiple",
|
|
737
737
|
id: ue(t, "id")
|
|
738
738
|
};
|
|
739
739
|
});
|
|
740
|
-
|
|
741
|
-
const
|
|
742
|
-
const t = e(Is), n = ue(t,
|
|
740
|
+
js.debugLabel = "selectedBlockAtom";
|
|
741
|
+
const ja = (e) => ee(e, "parent", null), Ba = N((e) => {
|
|
742
|
+
const t = e(Is), n = ue(t, ja);
|
|
743
743
|
return te(e(we), (s) => de(n, s._id));
|
|
744
744
|
});
|
|
745
|
-
|
|
745
|
+
Ba.debugLabel = "selectedBlocksParentsAtom";
|
|
746
746
|
const di = N(() => !1);
|
|
747
747
|
di.debugLabel = "selectedBlockFlexChildAtom";
|
|
748
748
|
const fi = N(() => !1);
|
|
749
749
|
fi.debugLabel = "selectedBlockGridChildAtom";
|
|
750
|
-
const
|
|
751
|
-
|
|
750
|
+
const Bs = N("");
|
|
751
|
+
Bs.debugLabel = "styleStateAtom";
|
|
752
752
|
const hi = pt("styleBreakpoint", "xs");
|
|
753
753
|
hi.debugLabel = "styleBreakpointAtom";
|
|
754
754
|
const cd = () => ({
|
|
755
755
|
flexChild: ne(di),
|
|
756
756
|
gridChild: ne(fi)
|
|
757
|
-
}), ud = () => ne(
|
|
757
|
+
}), ud = () => ne(js), mt = () => {
|
|
758
758
|
const [e, t] = Y(Cs), n = X(
|
|
759
759
|
(s) => {
|
|
760
760
|
t((r) => de(r, s) ? Yr(r, s) : [...r, s]);
|
|
@@ -927,7 +927,7 @@ const ld = () => {
|
|
|
927
927
|
return !f && u && (i[0]._parent = u._parent), e({
|
|
928
928
|
type: "set_blocks",
|
|
929
929
|
payload: ir(t, a || null, d || null, i, f)
|
|
930
|
-
}), s([(m =
|
|
930
|
+
}), s([(m = Be(i)) == null ? void 0 : m._id]), Be(i);
|
|
931
931
|
},
|
|
932
932
|
[t, e, s, n]
|
|
933
933
|
);
|
|
@@ -1010,7 +1010,7 @@ const mi = () => Y(gn), Ta = (e) => {
|
|
|
1010
1010
|
// @ts-ignore
|
|
1011
1011
|
n.includes(e(a)._id)
|
|
1012
1012
|
)
|
|
1013
|
-
), i =
|
|
1013
|
+
), i = Be(e(gn));
|
|
1014
1014
|
We(o, (a) => {
|
|
1015
1015
|
const d = e(a), u = ee(d, i.prop, `${lt},`), { baseClasses: f, classes: m } = Ta(u);
|
|
1016
1016
|
r({
|
|
@@ -1071,8 +1071,8 @@ function bi(e) {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
function Ka(e) {
|
|
1073
1073
|
let t = [];
|
|
1074
|
-
const n = ee(
|
|
1075
|
-
ut(
|
|
1074
|
+
const n = ee(Be(e), "parent", null);
|
|
1075
|
+
ut(Be(e), "parent", null);
|
|
1076
1076
|
const s = [vi.convert(Si(e))];
|
|
1077
1077
|
Ds(s, !0);
|
|
1078
1078
|
let r = Rs(s, e[0]._id);
|
|
@@ -1092,7 +1092,7 @@ function za(e) {
|
|
|
1092
1092
|
const t = Va(Si(e));
|
|
1093
1093
|
Ds(t);
|
|
1094
1094
|
const n = Rs(t, null), s = bi(n), r = {};
|
|
1095
|
-
return We(s, (o) => ut(r,
|
|
1095
|
+
return We(s, (o) => ut(r, Be(o).blockId, o)), [n, r];
|
|
1096
1096
|
}
|
|
1097
1097
|
const xi = () => {
|
|
1098
1098
|
const [e] = yi(), { currentPage: t } = Qa(), n = ne(we);
|
|
@@ -1282,7 +1282,7 @@ const fd = () => {
|
|
|
1282
1282
|
[t, s, e, n]
|
|
1283
1283
|
);
|
|
1284
1284
|
}, mc = N(null, (e, t, { blockIds: n, fullClasses: s, dispatch: r }) => {
|
|
1285
|
-
const o =
|
|
1285
|
+
const o = Be(e(gn)), i = te(
|
|
1286
1286
|
e(_s),
|
|
1287
1287
|
(a) => (
|
|
1288
1288
|
// @ts-ignore
|
|
@@ -1295,7 +1295,7 @@ const fd = () => {
|
|
|
1295
1295
|
We(u, (b) => {
|
|
1296
1296
|
const g = new RegExp(`(^| )${b.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
1297
1297
|
f = f.replace(g, " ").replace(/ +/g, " ").trim();
|
|
1298
|
-
const O =
|
|
1298
|
+
const O = Be(b.split(":"));
|
|
1299
1299
|
de(["2xl", "xl", "lg", "md", "sm"], O) && u.push(b.split(":").pop().trim());
|
|
1300
1300
|
}), We(u, (b) => {
|
|
1301
1301
|
const g = new RegExp(`(^| )${b.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
@@ -1318,15 +1318,15 @@ const fd = () => {
|
|
|
1318
1318
|
},
|
|
1319
1319
|
[e, t]
|
|
1320
1320
|
);
|
|
1321
|
-
},
|
|
1322
|
-
const t =
|
|
1321
|
+
}, ji = N((e) => {
|
|
1322
|
+
const t = Be(e(gn)), n = e(js);
|
|
1323
1323
|
if (!t || t.blockId !== ee(n, "_id", null))
|
|
1324
1324
|
return [];
|
|
1325
1325
|
const r = ee(n, t.prop, `${lt},`).replace(lt, "").split(",").join(" ");
|
|
1326
1326
|
return te(ue(r.trim().split(" "), Cn), (o) => !os(o));
|
|
1327
|
-
}), xd = () => ne(
|
|
1328
|
-
const t = e(Ei), n = e(
|
|
1329
|
-
let o = te(e(
|
|
1327
|
+
}), xd = () => ne(ji), ur = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, gc = N((e) => {
|
|
1328
|
+
const t = e(Ei), n = e(Bs), s = e(_i), r = yc(t);
|
|
1329
|
+
let o = te(e(ji), { mod: n });
|
|
1330
1330
|
return ei(n, "_") || (o = te(o, (i) => r.includes(i.mq))), o = o.sort((i, a) => ur[i.mq] - ur[a.mq]), s || (o = te(o, { dark: !1 })), o;
|
|
1331
1331
|
}), yc = (e) => {
|
|
1332
1332
|
let t = [];
|
|
@@ -1354,13 +1354,13 @@ const fd = () => {
|
|
|
1354
1354
|
break;
|
|
1355
1355
|
}
|
|
1356
1356
|
return t;
|
|
1357
|
-
}, kd = () => ne(gc), Ad = () => Y(
|
|
1357
|
+
}, kd = () => ne(gc), Ad = () => Y(Bs), Bi = N(null, (e, t, { blockIds: n, props: s, dispatch: r }) => {
|
|
1358
1358
|
r({
|
|
1359
1359
|
type: "update_props_realtime",
|
|
1360
1360
|
payload: { ids: n, props: s }
|
|
1361
1361
|
});
|
|
1362
1362
|
}), Ed = () => {
|
|
1363
|
-
const { createSnapshot: e } = $n(), t = Se(), n = Xe(
|
|
1363
|
+
const { createSnapshot: e } = $n(), t = Se(), n = Xe(Bi);
|
|
1364
1364
|
return X(
|
|
1365
1365
|
(s, r) => {
|
|
1366
1366
|
n({ blockIds: s, props: r, dispatch: t }), e();
|
|
@@ -1368,7 +1368,7 @@ const fd = () => {
|
|
|
1368
1368
|
[e, t, n]
|
|
1369
1369
|
);
|
|
1370
1370
|
}, Pd = () => {
|
|
1371
|
-
const e = Se(), t = Xe(
|
|
1371
|
+
const e = Se(), t = Xe(Bi);
|
|
1372
1372
|
return X(
|
|
1373
1373
|
(n, s) => {
|
|
1374
1374
|
t({ blockIds: n, props: s, dispatch: e });
|
|
@@ -1398,7 +1398,7 @@ const fd = () => {
|
|
|
1398
1398
|
openModal: n,
|
|
1399
1399
|
closeModal: s
|
|
1400
1400
|
};
|
|
1401
|
-
}, _d = () => ne(ki), bc = N(""), wc = N(null), Cd = () => Y(bc), Id = () => Y(wc), Sc = pt("selectedBreakpoints", ["XS", "MD", "XL"]),
|
|
1401
|
+
}, _d = () => ne(ki), bc = N(""), wc = N(null), Cd = () => Y(bc), Id = () => Y(wc), Sc = pt("selectedBreakpoints", ["XS", "MD", "XL"]), jd = () => {
|
|
1402
1402
|
const [e, t] = Y(Sc);
|
|
1403
1403
|
return [e, t];
|
|
1404
1404
|
}, xc = () => {
|
|
@@ -1406,7 +1406,7 @@ const fd = () => {
|
|
|
1406
1406
|
return () => {
|
|
1407
1407
|
n([]), r([]), s(""), t(), e({ undoCount: 0, redoCount: 0 });
|
|
1408
1408
|
};
|
|
1409
|
-
}, kc = N({ en: {} }),
|
|
1409
|
+
}, kc = N({ en: {} }), Bd = () => {
|
|
1410
1410
|
const [e, t] = Y(kc), n = X(
|
|
1411
1411
|
(s, r, o) => {
|
|
1412
1412
|
ut(e, `${s}.${r}`, o), t(e);
|
|
@@ -1427,7 +1427,7 @@ const fd = () => {
|
|
|
1427
1427
|
return { content: ee(t, s, ee(t, e, "")), propKey: e };
|
|
1428
1428
|
}, Cc = () => {
|
|
1429
1429
|
const [e, t] = gi(), n = en("previewComponent");
|
|
1430
|
-
return /* @__PURE__ */ _.jsxs("div", { className:
|
|
1430
|
+
return /* @__PURE__ */ _.jsxs("div", { className: Bo("fixed inset-0 z-[999] bg-background", e ? "block" : "hidden"), children: [
|
|
1431
1431
|
/* @__PURE__ */ _.jsx(Oo, { size: "sm", className: "absolute right-0 top-0 m-4", onClick: () => t(!1), children: "Close Preview" }),
|
|
1432
1432
|
/* @__PURE__ */ _.jsx("div", { children: n ? /* @__PURE__ */ _.jsx(Gt, { fallback: /* @__PURE__ */ _.jsx(_o, { className: "h-96 w-full" }), children: Es.createElement(n) }) : null })
|
|
1433
1433
|
] });
|
|
@@ -1441,24 +1441,24 @@ const fd = () => {
|
|
|
1441
1441
|
{},
|
|
1442
1442
|
[e, s]
|
|
1443
1443
|
);
|
|
1444
|
-
},
|
|
1444
|
+
}, jc = (e, t) => {
|
|
1445
1445
|
const n = [];
|
|
1446
1446
|
let s = Ae(e, { _id: t }), r = ee(s, "_parent", "");
|
|
1447
1447
|
for (; Ps(r) && !Me(r); )
|
|
1448
1448
|
n.push(s == null ? void 0 : s._parent), s = Ae(e, { _id: r }), r = s == null ? void 0 : s._parent;
|
|
1449
1449
|
return be(n);
|
|
1450
|
-
}, Di = N([]),
|
|
1450
|
+
}, Di = N([]), Bc = () => {
|
|
1451
1451
|
const [e] = mt(), t = ne(we), [, n] = Y(Di);
|
|
1452
1452
|
ke(() => {
|
|
1453
1453
|
let s = [];
|
|
1454
|
-
const r =
|
|
1455
|
-
Ps(r) && (s = [r, ...
|
|
1454
|
+
const r = Be(e);
|
|
1455
|
+
Ps(r) && (s = [r, ...jc(t, r)]), n(s);
|
|
1456
1456
|
}, [e, t, n]);
|
|
1457
|
-
}, Td = () => ne(Di), Rc = $t(() => import("./SidePanels-
|
|
1457
|
+
}, Td = () => ne(Di), Rc = $t(() => import("./SidePanels-96e64da9.js")), Dc = $t(() => import("./Topbar-08d10607.js")), Mc = $t(() => import("./CanvasArea-15458836.js")), Lc = $t(() => import("./Settings-6f2e86a9.js")), Nc = () => {
|
|
1458
1458
|
const [e] = ba(qn), t = (n) => {
|
|
1459
1459
|
n.preventDefault();
|
|
1460
1460
|
};
|
|
1461
|
-
return Ic(),
|
|
1461
|
+
return Ic(), Bc(), ke(() => (e !== "SAVED" ? window.onbeforeunload = () => "" : window.onbeforeunload = null, () => {
|
|
1462
1462
|
window.onbeforeunload = null;
|
|
1463
1463
|
}), [e]), /* @__PURE__ */ _.jsx("div", { className: "h-screen w-screen bg-background text-foreground", children: /* @__PURE__ */ _.jsxs(Co, { children: [
|
|
1464
1464
|
/* @__PURE__ */ _.jsxs(
|
|
@@ -1478,7 +1478,7 @@ const fd = () => {
|
|
|
1478
1478
|
),
|
|
1479
1479
|
/* @__PURE__ */ _.jsx(Cc, {})
|
|
1480
1480
|
] }) });
|
|
1481
|
-
}, Tc =
|
|
1481
|
+
}, Tc = jo();
|
|
1482
1482
|
N({});
|
|
1483
1483
|
function lr(e, t, n, s, r) {
|
|
1484
1484
|
for (t = t.split ? t.split(".") : t, s = 0; s < t.length; s++)
|
|
@@ -1506,7 +1506,7 @@ function Dn(e, t) {
|
|
|
1506
1506
|
function yn(e, t) {
|
|
1507
1507
|
return typeof t === e;
|
|
1508
1508
|
}
|
|
1509
|
-
var
|
|
1509
|
+
var je = yn.bind(null, "function"), bt = yn.bind(null, "string"), yt = yn.bind(null, "undefined"), $c = yn.bind(null, "boolean");
|
|
1510
1510
|
yn.bind(null, "symbol");
|
|
1511
1511
|
function Ti(e) {
|
|
1512
1512
|
return e === null;
|
|
@@ -1528,7 +1528,7 @@ function Kc(e) {
|
|
|
1528
1528
|
return e && (typeof e == "object" || e !== null);
|
|
1529
1529
|
}
|
|
1530
1530
|
function zc(e) {
|
|
1531
|
-
return
|
|
1531
|
+
return je(e.constructor) ? e.constructor.name : null;
|
|
1532
1532
|
}
|
|
1533
1533
|
function Gc(e) {
|
|
1534
1534
|
return e instanceof Error || bt(e.message) && e.constructor && Qc(e.constructor.stackTraceLimit);
|
|
@@ -1842,7 +1842,7 @@ function ru(e) {
|
|
|
1842
1842
|
}
|
|
1843
1843
|
var Wt = {};
|
|
1844
1844
|
function vr(e, t) {
|
|
1845
|
-
Wt[e] &&
|
|
1845
|
+
Wt[e] && je(Wt[e]) && (Wt[e](t), delete Wt[e]);
|
|
1846
1846
|
}
|
|
1847
1847
|
function qi(e, t, n) {
|
|
1848
1848
|
return new Promise(function(s, r) {
|
|
@@ -1862,10 +1862,10 @@ function $i(e, t, n) {
|
|
|
1862
1862
|
if (d.processIndex && d.processIndex.length) {
|
|
1863
1863
|
d.processIndex.forEach(function(f) {
|
|
1864
1864
|
var m = i.actions[f], b = m.plugin, g = m.payload.type, O = s[b][g];
|
|
1865
|
-
if (O &&
|
|
1865
|
+
if (O && je(O)) {
|
|
1866
1866
|
var C = function(A, D) {
|
|
1867
|
-
return A === void 0 && (A = {}), D === void 0 && (D = {}), [Te, vt].reduce(function(
|
|
1868
|
-
return A.hasOwnProperty(x) && D[x] && D[x] !== A[x] && (
|
|
1867
|
+
return A === void 0 && (A = {}), D === void 0 && (D = {}), [Te, vt].reduce(function(B, x) {
|
|
1868
|
+
return A.hasOwnProperty(x) && D[x] && D[x] !== A[x] && (B[x] = D[x]), B;
|
|
1869
1869
|
}, A);
|
|
1870
1870
|
}(m.payload, a);
|
|
1871
1871
|
O({ payload: C, config: o[b].config, instance: n });
|
|
@@ -1890,15 +1890,15 @@ var ts = function(e) {
|
|
|
1890
1890
|
return y.pluginName;
|
|
1891
1891
|
}));
|
|
1892
1892
|
var O = function(y, A) {
|
|
1893
|
-
return function(D,
|
|
1894
|
-
var k =
|
|
1893
|
+
return function(D, B, x) {
|
|
1894
|
+
var k = B.config, F = B.name, T = F + "." + D.type;
|
|
1895
1895
|
x && (T = x.event);
|
|
1896
|
-
var R = D.type.match(St) ? function(p, v, I, w,
|
|
1896
|
+
var R = D.type.match(St) ? function(p, v, I, w, j) {
|
|
1897
1897
|
return function(E, S) {
|
|
1898
1898
|
var Q = w ? w.name : p, $ = S && tn(S) ? S : I;
|
|
1899
1899
|
if (w && (!($ = S && tn(S) ? S : [p]).includes(p) || $.length !== 1))
|
|
1900
1900
|
throw new Error("Method " + v + " can only abort " + p + " plugin. " + JSON.stringify($) + " input valid");
|
|
1901
|
-
return q({},
|
|
1901
|
+
return q({}, j, { abort: { reason: E, plugins: $, caller: v, _: Q } });
|
|
1902
1902
|
};
|
|
1903
1903
|
}(F, T, A, x, D) : function(p, v) {
|
|
1904
1904
|
return function() {
|
|
@@ -1908,43 +1908,43 @@ var ts = function(e) {
|
|
|
1908
1908
|
return { payload: iu(D), instance: y, config: k || {}, abort: R };
|
|
1909
1909
|
};
|
|
1910
1910
|
}(s, g), C = t.exact.reduce(function(y, A) {
|
|
1911
|
-
var D = A.pluginName,
|
|
1912
|
-
return
|
|
1911
|
+
var D = A.pluginName, B = A.methodName, x = !1;
|
|
1912
|
+
return B.match(/^initialize/) || B.match(/^reset/) || (x = !u[D].loaded), f.offline && B.match(/^(page|track|identify)/) && (x = !0), y["" + D] = x, y;
|
|
1913
1913
|
}, {});
|
|
1914
1914
|
return Promise.resolve(t.exact.reduce(function(y, A, D) {
|
|
1915
1915
|
try {
|
|
1916
|
-
var
|
|
1916
|
+
var B = A.pluginName;
|
|
1917
1917
|
return Promise.resolve(y).then(function(x) {
|
|
1918
1918
|
function k() {
|
|
1919
1919
|
return Promise.resolve(x);
|
|
1920
1920
|
}
|
|
1921
1921
|
var F = function() {
|
|
1922
|
-
if (t.namespaced && t.namespaced[
|
|
1923
|
-
return Promise.resolve(t.namespaced[
|
|
1922
|
+
if (t.namespaced && t.namespaced[B])
|
|
1923
|
+
return Promise.resolve(t.namespaced[B].reduce(function(T, R, p) {
|
|
1924
1924
|
try {
|
|
1925
1925
|
return Promise.resolve(T).then(function(v) {
|
|
1926
|
-
return R.method &&
|
|
1926
|
+
return R.method && je(R.method) ? (function(E, S) {
|
|
1927
1927
|
var Q = Er(E);
|
|
1928
1928
|
if (Q && Q.name === S) {
|
|
1929
1929
|
var $ = Er(Q.method);
|
|
1930
1930
|
throw new Error([S + " plugin is calling method " + E, "Plugins cant call self", "Use " + Q.method + " " + ($ ? "or " + $.method : "") + " in " + S + " plugin insteadof " + E].join(`
|
|
1931
1931
|
`));
|
|
1932
1932
|
}
|
|
1933
|
-
}(R.methodName, R.pluginName), Promise.resolve(R.method({ payload: v, instance: s, abort: (I = v, w =
|
|
1934
|
-
return q({}, I, { abort: { reason: E, plugins: S || [w], caller: m, from:
|
|
1933
|
+
}(R.methodName, R.pluginName), Promise.resolve(R.method({ payload: v, instance: s, abort: (I = v, w = B, j = R.pluginName, function(E, S) {
|
|
1934
|
+
return q({}, I, { abort: { reason: E, plugins: S || [w], caller: m, from: j || w } });
|
|
1935
1935
|
}), config: Sr(R.pluginName, u, o), plugins: u })).then(function(E) {
|
|
1936
1936
|
var S = he(E) ? E : {};
|
|
1937
1937
|
return Promise.resolve(q({}, v, S));
|
|
1938
1938
|
})) : v;
|
|
1939
|
-
var I, w,
|
|
1939
|
+
var I, w, j;
|
|
1940
1940
|
});
|
|
1941
1941
|
} catch (v) {
|
|
1942
1942
|
return Promise.reject(v);
|
|
1943
1943
|
}
|
|
1944
1944
|
}, Promise.resolve(n))).then(function(T) {
|
|
1945
|
-
x[
|
|
1945
|
+
x[B] = T;
|
|
1946
1946
|
});
|
|
1947
|
-
x[
|
|
1947
|
+
x[B] = n;
|
|
1948
1948
|
}();
|
|
1949
1949
|
return F && F.then ? F.then(k) : k();
|
|
1950
1950
|
});
|
|
@@ -1952,9 +1952,9 @@ var ts = function(e) {
|
|
|
1952
1952
|
return Promise.reject(x);
|
|
1953
1953
|
}
|
|
1954
1954
|
}, Promise.resolve({}))).then(function(y) {
|
|
1955
|
-
return Promise.resolve(t.exact.reduce(function(A, D,
|
|
1955
|
+
return Promise.resolve(t.exact.reduce(function(A, D, B) {
|
|
1956
1956
|
try {
|
|
1957
|
-
var x = t.exact.length ===
|
|
1957
|
+
var x = t.exact.length === B + 1, k = D.pluginName, F = o[k];
|
|
1958
1958
|
return Promise.resolve(A).then(function(T) {
|
|
1959
1959
|
var R = y[k] ? y[k] : {};
|
|
1960
1960
|
if (b && (R = T), ss(R, k))
|
|
@@ -1965,9 +1965,9 @@ var ts = function(e) {
|
|
|
1965
1965
|
return a.dispatch({ type: "queue", plugin: k, payload: R, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(T);
|
|
1966
1966
|
var p = O(y[k], o[k]);
|
|
1967
1967
|
return Promise.resolve(F[m]({ abort: p.abort, payload: R, instance: s, config: Sr(k, u, o), plugins: u })).then(function(v) {
|
|
1968
|
-
var I = he(v) ? v : {}, w = q({}, T, I),
|
|
1969
|
-
if (ss(
|
|
1970
|
-
ns({ data:
|
|
1968
|
+
var I = he(v) ? v : {}, w = q({}, T, I), j = y[k];
|
|
1969
|
+
if (ss(j, k))
|
|
1970
|
+
ns({ data: j, method: m, instance: s, pluginName: k, store: a });
|
|
1971
1971
|
else {
|
|
1972
1972
|
var E = m + ":" + k;
|
|
1973
1973
|
(E.match(/:/g) || []).length < 2 && !m.match(br) && !m.match(wr) && s.dispatch(q({}, b ? w : R, { type: E, _: { called: E, from: "submethod" } }));
|
|
@@ -2076,28 +2076,28 @@ function ou(e, t, n) {
|
|
|
2076
2076
|
}, 0);
|
|
2077
2077
|
});
|
|
2078
2078
|
}
|
|
2079
|
-
var
|
|
2079
|
+
var B = function() {
|
|
2080
2080
|
if (u !== U.bootstrap)
|
|
2081
2081
|
return /^ready:([^:]*)$/.test(u) && setTimeout(function() {
|
|
2082
2082
|
return $i(r, t, e);
|
|
2083
2083
|
}, 0), Promise.resolve(function(x, k, F, T, R) {
|
|
2084
2084
|
try {
|
|
2085
|
-
var p =
|
|
2085
|
+
var p = je(k) ? k() : k, v = x.type, I = v.replace(St, "");
|
|
2086
2086
|
if (x._ && x._.called)
|
|
2087
2087
|
return Promise.resolve(x);
|
|
2088
|
-
var w = F.getState(),
|
|
2088
|
+
var w = F.getState(), j = (Q = p, ($ = w.plugins) === void 0 && ($ = {}), (G = x.options) === void 0 && (G = {}), Object.keys(Q).filter(function(l) {
|
|
2089
2089
|
var h = G.plugins || {};
|
|
2090
2090
|
return $c(h[l]) ? h[l] : h.all !== !1 && (!$[l] || $[l].enabled !== !1);
|
|
2091
2091
|
}).map(function(l) {
|
|
2092
2092
|
return Q[l];
|
|
2093
2093
|
}));
|
|
2094
|
-
v === U.initializeStart && x.fromEnable && (
|
|
2094
|
+
v === U.initializeStart && x.fromEnable && (j = Object.keys(w.plugins).filter(function(l) {
|
|
2095
2095
|
var h = w.plugins[l];
|
|
2096
2096
|
return x.plugins.includes(l) && !h.initialized;
|
|
2097
2097
|
}).map(function(l) {
|
|
2098
2098
|
return p[l];
|
|
2099
2099
|
}));
|
|
2100
|
-
var E =
|
|
2100
|
+
var E = j.map(function(l) {
|
|
2101
2101
|
return l.name;
|
|
2102
2102
|
}), S = function(l, h, M) {
|
|
2103
2103
|
var V = kr(l).map(function(z) {
|
|
@@ -2109,7 +2109,7 @@ function ou(e, t, n) {
|
|
|
2109
2109
|
}), se = J[0], H = J[1], Pe = J[2];
|
|
2110
2110
|
return se.length && (z.beforeNS[oe] = se), H.length && (z.duringNS[oe] = H), Pe.length && (z.afterNS[oe] = Pe), z;
|
|
2111
2111
|
}, { before: V[0], beforeNS: {}, during: V[1], duringNS: {}, after: V[2], afterNS: {} });
|
|
2112
|
-
}(v,
|
|
2112
|
+
}(v, j);
|
|
2113
2113
|
return Promise.resolve(ts({ action: x, data: { exact: S.before, namespaced: S.beforeNS }, state: w, allPlugins: p, allMatches: S, instance: F, store: T, EVENTS: R })).then(function(l) {
|
|
2114
2114
|
function h() {
|
|
2115
2115
|
var z = function() {
|
|
@@ -2141,7 +2141,7 @@ function ou(e, t, n) {
|
|
|
2141
2141
|
return a = 1, o(x);
|
|
2142
2142
|
});
|
|
2143
2143
|
}();
|
|
2144
|
-
return Promise.resolve(
|
|
2144
|
+
return Promise.resolve(B && B.then ? B.then(d) : d(B));
|
|
2145
2145
|
} catch (x) {
|
|
2146
2146
|
return Promise.reject(x);
|
|
2147
2147
|
}
|
|
@@ -2346,7 +2346,7 @@ function Ir(e, t, n) {
|
|
|
2346
2346
|
var s, r, o = Kn();
|
|
2347
2347
|
return t && (Wt[o] = (s = t, r = function(i) {
|
|
2348
2348
|
for (var a, d = i || Array.prototype.slice.call(arguments), u = 0; u < d.length; u++)
|
|
2349
|
-
if (
|
|
2349
|
+
if (je(d[u])) {
|
|
2350
2350
|
a = d[u];
|
|
2351
2351
|
break;
|
|
2352
2352
|
}
|
|
@@ -2358,7 +2358,7 @@ function Ir(e, t, n) {
|
|
|
2358
2358
|
function xu(e) {
|
|
2359
2359
|
e === void 0 && (e = {});
|
|
2360
2360
|
var t = e.reducers || {}, n = e.initialUser || {}, s = (e.plugins || []).reduce(function(l, h) {
|
|
2361
|
-
if (
|
|
2361
|
+
if (je(h))
|
|
2362
2362
|
return l.middlewares = l.middlewares.concat(h), l;
|
|
2363
2363
|
if (h.NAMESPACE && (h.name = h.NAMESPACE), !h.name)
|
|
2364
2364
|
throw new Error("https://lytics.dev/errors/1");
|
|
@@ -2394,7 +2394,7 @@ function xu(e) {
|
|
|
2394
2394
|
throw new Error("Abort disabled inListener");
|
|
2395
2395
|
}, y = Xc(), A = yr(r), D = q({}, A, n, y.an_uid ? { userId: y.an_uid } : {}, y.an_aid ? { anonymousId: y.an_aid } : {});
|
|
2396
2396
|
D.anonymousId || (D.anonymousId = Kn());
|
|
2397
|
-
var
|
|
2397
|
+
var B = q({ enable: function(l, h) {
|
|
2398
2398
|
return new Promise(function(M) {
|
|
2399
2399
|
S.dispatch({ type: U.enablePlugin, plugins: rs(l), _: { originalAction: U.enablePlugin } }, M, [h]);
|
|
2400
2400
|
});
|
|
@@ -2446,11 +2446,11 @@ function xu(e) {
|
|
|
2446
2446
|
S.dispatch({ type: U.resetStart }, h, l);
|
|
2447
2447
|
});
|
|
2448
2448
|
}, ready: function(l) {
|
|
2449
|
-
return x && l({ plugins:
|
|
2449
|
+
return x && l({ plugins: B, instance: k }), k.on(U.ready, function(h) {
|
|
2450
2450
|
l(h), x = !0;
|
|
2451
2451
|
});
|
|
2452
2452
|
}, on: function(l, h) {
|
|
2453
|
-
if (!l || !
|
|
2453
|
+
if (!l || !je(h))
|
|
2454
2454
|
return !1;
|
|
2455
2455
|
if (l === U.bootstrap)
|
|
2456
2456
|
throw new Error(".on disabled for " + l);
|
|
@@ -2484,7 +2484,7 @@ function xu(e) {
|
|
|
2484
2484
|
return g(oe, W);
|
|
2485
2485
|
};
|
|
2486
2486
|
}, once: function(l, h) {
|
|
2487
|
-
if (!l || !
|
|
2487
|
+
if (!l || !je(h))
|
|
2488
2488
|
return !1;
|
|
2489
2489
|
if (l === U.bootstrap)
|
|
2490
2490
|
throw new Error(".once disabled for " + l);
|
|
@@ -2501,7 +2501,7 @@ function xu(e) {
|
|
|
2501
2501
|
throw new Error("reserved action " + h.type);
|
|
2502
2502
|
var M = q({}, h, { _: q({ originalAction: h.type }, l._ || {}) });
|
|
2503
2503
|
S.dispatch(M);
|
|
2504
|
-
}, enablePlugin:
|
|
2504
|
+
}, enablePlugin: B.enable, disablePlugin: B.disable, plugins: B, storage: { getItem: r.getItem, setItem: function(l, h, M) {
|
|
2505
2505
|
S.dispatch({ type: U.setItemStart, key: l, value: h, options: M });
|
|
2506
2506
|
}, removeItem: function(l, h) {
|
|
2507
2507
|
S.dispatch({ type: U.removeItemStart, key: l, options: h });
|
|
@@ -2524,10 +2524,10 @@ function xu(e) {
|
|
|
2524
2524
|
return Object.keys(l).reduce(function(h, M) {
|
|
2525
2525
|
return bu.includes(M) || (h[M] = l[M]), h;
|
|
2526
2526
|
}, {});
|
|
2527
|
-
}(e),
|
|
2527
|
+
}(e), j = s.pluginsArray.reduce(function(l, h) {
|
|
2528
2528
|
var M = h.name, V = h.config, z = h.loaded, W = s.pluginEnabled[M];
|
|
2529
2529
|
return l[M] = { enabled: W, initialized: !!W && !h.initialize, loaded: !!z({ config: V }), config: V }, l;
|
|
2530
|
-
}, {}), E = { context: w, user: D, plugins:
|
|
2530
|
+
}, {}), E = { context: w, user: D, plugins: j }, S = Ui(function(l) {
|
|
2531
2531
|
for (var h = Object.keys(l), M = {}, V = 0; V < h.length; V++) {
|
|
2532
2532
|
var z = h[V];
|
|
2533
2533
|
typeof l[z] === Ue && (M[z] = l[z]);
|
|
@@ -2571,7 +2571,7 @@ function xu(e) {
|
|
|
2571
2571
|
});
|
|
2572
2572
|
return S.dispatch({ type: U.registerPlugins, plugins: Q, enabled: s.pluginEnabled }), s.pluginsArray.map(function(l, h) {
|
|
2573
2573
|
var M = l.bootstrap, V = l.config, z = l.name;
|
|
2574
|
-
M &&
|
|
2574
|
+
M && je(M) && M({ instance: k, config: V, payload: l }), S.dispatch({ type: U.registerPluginType(z), name: z, enabled: s.pluginEnabled[z], plugin: l }), s.pluginsArray.length === h + 1 && S.dispatch({ type: U.initializeStart, plugins: $, disabled: G });
|
|
2575
2575
|
}), Su(function(l) {
|
|
2576
2576
|
S.dispatch({ type: l ? U.offline : U.online });
|
|
2577
2577
|
}), function(l, h, M) {
|
|
@@ -2673,8 +2673,8 @@ function Gn(e, t) {
|
|
|
2673
2673
|
function _n(e, t, n) {
|
|
2674
2674
|
return { location: e, current: t, previous: n };
|
|
2675
2675
|
}
|
|
2676
|
-
var
|
|
2677
|
-
function
|
|
2676
|
+
var ju = { setItem: Cu, getItem: eo, removeItem: Iu };
|
|
2677
|
+
function Bu(e, t, n) {
|
|
2678
2678
|
return t in e ? Object.defineProperty(e, t, {
|
|
2679
2679
|
value: n,
|
|
2680
2680
|
enumerable: !0,
|
|
@@ -2682,7 +2682,7 @@ function ju(e, t, n) {
|
|
|
2682
2682
|
writable: !0
|
|
2683
2683
|
}) : e[t] = n, e;
|
|
2684
2684
|
}
|
|
2685
|
-
function
|
|
2685
|
+
function jr(e, t) {
|
|
2686
2686
|
var n = Object.keys(e);
|
|
2687
2687
|
if (Object.getOwnPropertySymbols) {
|
|
2688
2688
|
var s = Object.getOwnPropertySymbols(e);
|
|
@@ -2692,12 +2692,12 @@ function Br(e, t) {
|
|
|
2692
2692
|
}
|
|
2693
2693
|
return n;
|
|
2694
2694
|
}
|
|
2695
|
-
function
|
|
2695
|
+
function Br(e) {
|
|
2696
2696
|
for (var t = 1; t < arguments.length; t++) {
|
|
2697
2697
|
var n = arguments[t] != null ? arguments[t] : {};
|
|
2698
|
-
t % 2 ?
|
|
2699
|
-
|
|
2700
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2698
|
+
t % 2 ? jr(Object(n), !0).forEach(function(s) {
|
|
2699
|
+
Bu(e, s, n[s]);
|
|
2700
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : jr(Object(n)).forEach(function(s) {
|
|
2701
2701
|
Object.defineProperty(e, s, Object.getOwnPropertyDescriptor(n, s));
|
|
2702
2702
|
});
|
|
2703
2703
|
}
|
|
@@ -2705,11 +2705,11 @@ function jr(e) {
|
|
|
2705
2705
|
}
|
|
2706
2706
|
function Ru() {
|
|
2707
2707
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = {
|
|
2708
|
-
storage:
|
|
2708
|
+
storage: ju
|
|
2709
2709
|
};
|
|
2710
|
-
return xu(
|
|
2710
|
+
return xu(Br(Br({}, t), e));
|
|
2711
2711
|
}
|
|
2712
|
-
const Du = "@chaibuilder/sdk", Mu = "0.1.
|
|
2712
|
+
const Du = "@chaibuilder/sdk", Mu = "0.1.4", Lu = "module", Nu = [
|
|
2713
2713
|
"dist"
|
|
2714
2714
|
], Tu = "dist/core.js", Fu = !1, Uu = {
|
|
2715
2715
|
".": {
|
|
@@ -2732,6 +2732,11 @@ const Du = "@chaibuilder/sdk", Mu = "0.1.3", Lu = "module", Nu = [
|
|
|
2732
2732
|
require: "./dist/lib.cjs",
|
|
2733
2733
|
types: "./dist/lib.d.ts"
|
|
2734
2734
|
},
|
|
2735
|
+
"./server": {
|
|
2736
|
+
import: "./dist/server.js",
|
|
2737
|
+
require: "./dist/server.cjs",
|
|
2738
|
+
types: "./dist/server.d.ts"
|
|
2739
|
+
},
|
|
2735
2740
|
"./styles": {
|
|
2736
2741
|
import: "./dist/style.css",
|
|
2737
2742
|
require: "./dist/style.css"
|
|
@@ -3172,8 +3177,8 @@ function io(e) {
|
|
|
3172
3177
|
}, O = () => new Promise((y) => {
|
|
3173
3178
|
var A;
|
|
3174
3179
|
r = (D) => {
|
|
3175
|
-
const
|
|
3176
|
-
return
|
|
3180
|
+
const B = s || !m();
|
|
3181
|
+
return B && y(D), B;
|
|
3177
3182
|
}, (A = e.onPause) == null || A.call(e);
|
|
3178
3183
|
}).then(() => {
|
|
3179
3184
|
var y;
|
|
@@ -3191,7 +3196,7 @@ function io(e) {
|
|
|
3191
3196
|
var F;
|
|
3192
3197
|
if (s)
|
|
3193
3198
|
return;
|
|
3194
|
-
const D = e.retry ?? (qt ? 0 : 3),
|
|
3199
|
+
const D = e.retry ?? (qt ? 0 : 3), B = e.retryDelay ?? nl, x = typeof B == "function" ? B(n, A) : B, k = D === !0 || typeof D == "number" && n < D || typeof D == "function" && D(n, A);
|
|
3195
3200
|
if (t || !k) {
|
|
3196
3201
|
g(A);
|
|
3197
3202
|
return;
|
|
@@ -3278,7 +3283,7 @@ var ae = sl(), et, Kr, oo = (Kr = class {
|
|
|
3278
3283
|
clearGcTimeout() {
|
|
3279
3284
|
c(this, et) && (clearTimeout(c(this, et)), P(this, et, void 0));
|
|
3280
3285
|
}
|
|
3281
|
-
}, et = new WeakMap(), Kr), Pt, Ot, me, Qe, ge, ie, rn, tt, _t,
|
|
3286
|
+
}, et = new WeakMap(), Kr), Pt, Ot, me, Qe, ge, ie, rn, tt, _t, jn, xe, Re, zr, rl = (zr = class extends oo {
|
|
3282
3287
|
constructor(t) {
|
|
3283
3288
|
super();
|
|
3284
3289
|
L(this, _t);
|
|
@@ -3291,7 +3296,7 @@ var ae = sl(), et, Kr, oo = (Kr = class {
|
|
|
3291
3296
|
L(this, ie, void 0);
|
|
3292
3297
|
L(this, rn, void 0);
|
|
3293
3298
|
L(this, tt, void 0);
|
|
3294
|
-
P(this, tt, !1), P(this, rn, t.defaultOptions), K(this, _t,
|
|
3299
|
+
P(this, tt, !1), P(this, rn, t.defaultOptions), K(this, _t, jn).call(this, t.options), P(this, ie, []), P(this, me, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, P(this, Pt, t.state || il(this.options)), this.state = c(this, Pt), this.scheduleGc();
|
|
3295
3300
|
}
|
|
3296
3301
|
get meta() {
|
|
3297
3302
|
return this.options.meta;
|
|
@@ -3366,9 +3371,9 @@ var ae = sl(), et, Kr, oo = (Kr = class {
|
|
|
3366
3371
|
else if (c(this, Qe))
|
|
3367
3372
|
return (u = c(this, ge)) == null || u.continueRetry(), c(this, Qe);
|
|
3368
3373
|
}
|
|
3369
|
-
if (t && K(this, _t,
|
|
3374
|
+
if (t && K(this, _t, jn).call(this, t), !this.options.queryFn) {
|
|
3370
3375
|
const g = c(this, ie).find((O) => O.options.queryFn);
|
|
3371
|
-
g && K(this, _t,
|
|
3376
|
+
g && K(this, _t, jn).call(this, g.options);
|
|
3372
3377
|
}
|
|
3373
3378
|
process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
|
|
3374
3379
|
"As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"
|
|
@@ -3451,7 +3456,7 @@ var ae = sl(), et, Kr, oo = (Kr = class {
|
|
|
3451
3456
|
networkMode: a.options.networkMode
|
|
3452
3457
|
})), P(this, Qe, c(this, ge).promise), c(this, Qe);
|
|
3453
3458
|
}
|
|
3454
|
-
}, Pt = new WeakMap(), Ot = new WeakMap(), me = new WeakMap(), Qe = new WeakMap(), ge = new WeakMap(), ie = new WeakMap(), rn = new WeakMap(), tt = new WeakMap(), _t = new WeakSet(),
|
|
3459
|
+
}, Pt = new WeakMap(), Ot = new WeakMap(), me = new WeakMap(), Qe = new WeakMap(), ge = new WeakMap(), ie = new WeakMap(), rn = new WeakMap(), tt = new WeakMap(), _t = new WeakSet(), jn = function(t) {
|
|
3455
3460
|
this.options = { ...c(this, rn), ...t }, this.updateGcTime(this.options.gcTime);
|
|
3456
3461
|
}, xe = new WeakSet(), Re = function(t) {
|
|
3457
3462
|
const n = (s) => {
|
|
@@ -3657,7 +3662,7 @@ var Oe, Gr, ol = (Gr = class extends vn {
|
|
|
3657
3662
|
this.execute(this.state.variables);
|
|
3658
3663
|
}
|
|
3659
3664
|
async execute(t) {
|
|
3660
|
-
var r, o, i, a, d, u, f, m, b, g, O, C, y, A, D,
|
|
3665
|
+
var r, o, i, a, d, u, f, m, b, g, O, C, y, A, D, B, x, k, F, T;
|
|
3661
3666
|
const n = () => (P(this, Ct, io({
|
|
3662
3667
|
fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
|
|
3663
3668
|
onFail: (R, p) => {
|
|
@@ -3710,7 +3715,7 @@ var Oe, Gr, ol = (Gr = class extends vn {
|
|
|
3710
3715
|
t,
|
|
3711
3716
|
this.state.context,
|
|
3712
3717
|
this
|
|
3713
|
-
)), await ((
|
|
3718
|
+
)), await ((B = (D = this.options).onError) == null ? void 0 : B.call(
|
|
3714
3719
|
D,
|
|
3715
3720
|
R,
|
|
3716
3721
|
t,
|
|
@@ -3883,8 +3888,8 @@ function ll(e) {
|
|
|
3883
3888
|
var O, C, y, A, D;
|
|
3884
3889
|
const r = t.options, o = (y = (C = (O = t.fetchOptions) == null ? void 0 : O.meta) == null ? void 0 : C.fetchMore) == null ? void 0 : y.direction, i = ((A = t.state.data) == null ? void 0 : A.pages) || [], a = ((D = t.state.data) == null ? void 0 : D.pageParams) || [], d = { pages: [], pageParams: [] };
|
|
3885
3890
|
let u = !1;
|
|
3886
|
-
const f = (
|
|
3887
|
-
Object.defineProperty(
|
|
3891
|
+
const f = (B) => {
|
|
3892
|
+
Object.defineProperty(B, "signal", {
|
|
3888
3893
|
enumerable: !0,
|
|
3889
3894
|
get: () => (t.signal.aborted ? u = !0 : t.signal.addEventListener("abort", () => {
|
|
3890
3895
|
u = !0;
|
|
@@ -3892,11 +3897,11 @@ function ll(e) {
|
|
|
3892
3897
|
});
|
|
3893
3898
|
}, m = t.options.queryFn || (() => Promise.reject(
|
|
3894
3899
|
new Error(`Missing queryFn: '${t.options.queryHash}'`)
|
|
3895
|
-
)), b = async (
|
|
3900
|
+
)), b = async (B, x, k) => {
|
|
3896
3901
|
if (u)
|
|
3897
3902
|
return Promise.reject();
|
|
3898
|
-
if (x == null &&
|
|
3899
|
-
return Promise.resolve(
|
|
3903
|
+
if (x == null && B.pages.length)
|
|
3904
|
+
return Promise.resolve(B);
|
|
3900
3905
|
const F = {
|
|
3901
3906
|
queryKey: t.queryKey,
|
|
3902
3907
|
pageParam: x,
|
|
@@ -3908,24 +3913,24 @@ function ll(e) {
|
|
|
3908
3913
|
F
|
|
3909
3914
|
), { maxPages: R } = t.options, p = k ? Zu : Yu;
|
|
3910
3915
|
return {
|
|
3911
|
-
pages: p(
|
|
3912
|
-
pageParams: p(
|
|
3916
|
+
pages: p(B.pages, T, R),
|
|
3917
|
+
pageParams: p(B.pageParams, x, R)
|
|
3913
3918
|
};
|
|
3914
3919
|
};
|
|
3915
3920
|
let g;
|
|
3916
3921
|
if (o && i.length) {
|
|
3917
|
-
const
|
|
3922
|
+
const B = o === "backward", x = B ? dl : Ur, k = {
|
|
3918
3923
|
pages: i,
|
|
3919
3924
|
pageParams: a
|
|
3920
3925
|
}, F = x(r, k);
|
|
3921
|
-
g = await b(k, F,
|
|
3926
|
+
g = await b(k, F, B);
|
|
3922
3927
|
} else {
|
|
3923
3928
|
g = await b(
|
|
3924
3929
|
d,
|
|
3925
3930
|
a[0] ?? r.initialPageParam
|
|
3926
3931
|
);
|
|
3927
|
-
const
|
|
3928
|
-
for (let x = 1; x <
|
|
3932
|
+
const B = e ?? i.length;
|
|
3933
|
+
for (let x = 1; x < B; x++) {
|
|
3929
3934
|
const k = Ur(r, g);
|
|
3930
3935
|
g = await b(g, k);
|
|
3931
3936
|
}
|
|
@@ -3967,20 +3972,20 @@ function dl(e, { pages: t, pageParams: n }) {
|
|
|
3967
3972
|
n
|
|
3968
3973
|
);
|
|
3969
3974
|
}
|
|
3970
|
-
var re, Ve, Ke, It,
|
|
3975
|
+
var re, Ve, Ke, It, jt, ze, Bt, Rt, Jr, fl = (Jr = class {
|
|
3971
3976
|
constructor(e = {}) {
|
|
3972
3977
|
L(this, re, void 0);
|
|
3973
3978
|
L(this, Ve, void 0);
|
|
3974
3979
|
L(this, Ke, void 0);
|
|
3975
3980
|
L(this, It, void 0);
|
|
3976
|
-
L(this, Bt, void 0);
|
|
3977
|
-
L(this, ze, void 0);
|
|
3978
3981
|
L(this, jt, void 0);
|
|
3982
|
+
L(this, ze, void 0);
|
|
3983
|
+
L(this, Bt, void 0);
|
|
3979
3984
|
L(this, Rt, void 0);
|
|
3980
|
-
P(this, re, e.queryCache || new ol()), P(this, Ve, e.mutationCache || new ul()), P(this, Ke, e.defaultOptions || {}), P(this, It, /* @__PURE__ */ new Map()), P(this,
|
|
3985
|
+
P(this, re, e.queryCache || new ol()), P(this, Ve, e.mutationCache || new ul()), P(this, Ke, e.defaultOptions || {}), P(this, It, /* @__PURE__ */ new Map()), P(this, jt, /* @__PURE__ */ new Map()), P(this, ze, 0);
|
|
3981
3986
|
}
|
|
3982
3987
|
mount() {
|
|
3983
|
-
wn(this, ze)._++, c(this, ze) === 1 && (P(this,
|
|
3988
|
+
wn(this, ze)._++, c(this, ze) === 1 && (P(this, Bt, Mn.subscribe(() => {
|
|
3984
3989
|
Mn.isFocused() && (this.resumePausedMutations(), c(this, re).onFocus());
|
|
3985
3990
|
})), P(this, Rt, Ln.subscribe(() => {
|
|
3986
3991
|
Ln.isOnline() && (this.resumePausedMutations(), c(this, re).onOnline());
|
|
@@ -3988,7 +3993,7 @@ var re, Ve, Ke, It, Bt, ze, jt, Rt, Jr, fl = (Jr = class {
|
|
|
3988
3993
|
}
|
|
3989
3994
|
unmount() {
|
|
3990
3995
|
var e, t;
|
|
3991
|
-
wn(this, ze)._--, c(this, ze) === 0 && ((e = c(this,
|
|
3996
|
+
wn(this, ze)._--, c(this, ze) === 0 && ((e = c(this, Bt)) == null || e.call(this), P(this, Bt, void 0), (t = c(this, Rt)) == null || t.call(this), P(this, Rt, void 0));
|
|
3992
3997
|
}
|
|
3993
3998
|
isFetching(e) {
|
|
3994
3999
|
return c(this, re).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
@@ -4121,13 +4126,13 @@ var re, Ve, Ke, It, Bt, ze, jt, Rt, Jr, fl = (Jr = class {
|
|
|
4121
4126
|
}), n;
|
|
4122
4127
|
}
|
|
4123
4128
|
setMutationDefaults(e, t) {
|
|
4124
|
-
c(this,
|
|
4129
|
+
c(this, jt).set(nn(e), {
|
|
4125
4130
|
mutationKey: e,
|
|
4126
4131
|
defaultOptions: t
|
|
4127
4132
|
});
|
|
4128
4133
|
}
|
|
4129
4134
|
getMutationDefaults(e) {
|
|
4130
|
-
const t = [...c(this,
|
|
4135
|
+
const t = [...c(this, jt).values()];
|
|
4131
4136
|
let n = {};
|
|
4132
4137
|
return t.forEach((s) => {
|
|
4133
4138
|
sn(e, s.mutationKey) && (n = { ...n, ...s.defaultOptions });
|
|
@@ -4158,7 +4163,7 @@ var re, Ve, Ke, It, Bt, ze, jt, Rt, Jr, fl = (Jr = class {
|
|
|
4158
4163
|
clear() {
|
|
4159
4164
|
c(this, re).clear(), c(this, Ve).clear();
|
|
4160
4165
|
}
|
|
4161
|
-
}, re = new WeakMap(), Ve = new WeakMap(), Ke = new WeakMap(), It = new WeakMap(),
|
|
4166
|
+
}, re = new WeakMap(), Ve = new WeakMap(), Ke = new WeakMap(), It = new WeakMap(), jt = new WeakMap(), ze = new WeakMap(), Bt = new WeakMap(), Rt = new WeakMap(), Jr), le, Z, Dt, ce, st, Mt, Ie, cn, Lt, Nt, rt, it, Ge, ot, at, Ht, un, ys, ln, vs, dn, bs, fn, ws, hn, Ss, pn, xs, mn, ks, Nn, ao, Xr, hl = (Xr = class extends vn {
|
|
4162
4167
|
constructor(t, n) {
|
|
4163
4168
|
super();
|
|
4164
4169
|
L(this, at);
|
|
@@ -4307,13 +4312,13 @@ var re, Ve, Ke, It, Bt, ze, jt, Rt, Jr, fl = (Jr = class {
|
|
|
4307
4312
|
), C = !0);
|
|
4308
4313
|
}
|
|
4309
4314
|
c(this, Ie) && (m = c(this, Ie), y = c(this, Lt), b = Date.now(), O = "error");
|
|
4310
|
-
const A = g === "fetching", D = O === "pending",
|
|
4315
|
+
const A = g === "fetching", D = O === "pending", B = O === "error", x = D && A;
|
|
4311
4316
|
return {
|
|
4312
4317
|
status: O,
|
|
4313
4318
|
fetchStatus: g,
|
|
4314
4319
|
isPending: D,
|
|
4315
4320
|
isSuccess: O === "success",
|
|
4316
|
-
isError:
|
|
4321
|
+
isError: B,
|
|
4317
4322
|
isInitialLoading: x,
|
|
4318
4323
|
isLoading: x,
|
|
4319
4324
|
data: y,
|
|
@@ -4327,10 +4332,10 @@ var re, Ve, Ke, It, Bt, ze, jt, Rt, Jr, fl = (Jr = class {
|
|
|
4327
4332
|
isFetchedAfterMount: f.dataUpdateCount > u.dataUpdateCount || f.errorUpdateCount > u.errorUpdateCount,
|
|
4328
4333
|
isFetching: A,
|
|
4329
4334
|
isRefetching: A && !D,
|
|
4330
|
-
isLoadingError:
|
|
4335
|
+
isLoadingError: B && f.dataUpdatedAt === 0,
|
|
4331
4336
|
isPaused: g === "paused",
|
|
4332
4337
|
isPlaceholderData: C,
|
|
4333
|
-
isRefetchError:
|
|
4338
|
+
isRefetchError: B && f.dataUpdatedAt !== 0,
|
|
4334
4339
|
isStale: Qs(t, n),
|
|
4335
4340
|
refetch: this.refetch
|
|
4336
4341
|
};
|
|
@@ -4610,7 +4615,7 @@ const lo = () => {
|
|
|
4610
4615
|
return t || (t = localStorage.getItem("currentPage")), [
|
|
4611
4616
|
t || "",
|
|
4612
4617
|
(n) => {
|
|
4613
|
-
localStorage.setItem("currentPage", n), e.setQueryData(["currentPage"], n);
|
|
4618
|
+
localStorage.setItem("currentPage", n || ""), e.setQueryData(["currentPage"], n || "");
|
|
4614
4619
|
}
|
|
4615
4620
|
];
|
|
4616
4621
|
}, Ks = () => {
|
|
@@ -4622,14 +4627,14 @@ const lo = () => {
|
|
|
4622
4627
|
return !e && s && t(s.homepage), s;
|
|
4623
4628
|
}
|
|
4624
4629
|
});
|
|
4625
|
-
},
|
|
4630
|
+
}, jl = () => {
|
|
4626
4631
|
const { data: e } = Ks(), t = Vs(), n = e == null ? void 0 : e.uuid;
|
|
4627
4632
|
return Jn({
|
|
4628
4633
|
queryKey: ["pages", n],
|
|
4629
4634
|
queryFn: async () => await fetch(`${t}/pages`).then((r) => r.json()) || [],
|
|
4630
4635
|
enabled: !!n
|
|
4631
4636
|
});
|
|
4632
|
-
},
|
|
4637
|
+
}, Bl = () => {
|
|
4633
4638
|
const [e, t] = lo(), { data: n } = Ks(), s = Vs();
|
|
4634
4639
|
return Jn({
|
|
4635
4640
|
queryKey: ["page_data", e],
|
|
@@ -4639,8 +4644,8 @@ const lo = () => {
|
|
|
4639
4644
|
},
|
|
4640
4645
|
enabled: !!e
|
|
4641
4646
|
});
|
|
4642
|
-
}, Rl = $t(() => import("./PagesPanel-
|
|
4643
|
-
const { data: e, isLoading: t } = Ks(), { data: n, isLoading: s } =
|
|
4647
|
+
}, Rl = $t(() => import("./PagesPanel-3e9163c4.js")), Dl = $t(() => import("./ProjectPanel-17c5f131.js")), Ml = () => {
|
|
4648
|
+
const { data: e, isLoading: t } = Ks(), { data: n, isLoading: s } = jl(), { data: r } = Bl();
|
|
4644
4649
|
return t || !e ? /* @__PURE__ */ _.jsx("div", { children: "Loading..." }) : s || !n ? /* @__PURE__ */ _.jsx("div", { children: "Loading..." }) : r ? /* @__PURE__ */ _.jsx("div", { className: "bg-background text-foreground", children: /* @__PURE__ */ _.jsx(
|
|
4645
4650
|
Ju,
|
|
4646
4651
|
{
|
|
@@ -4680,7 +4685,7 @@ export {
|
|
|
4680
4685
|
kd as K,
|
|
4681
4686
|
cd as L,
|
|
4682
4687
|
Wa as M,
|
|
4683
|
-
|
|
4688
|
+
jl as N,
|
|
4684
4689
|
Ks as O,
|
|
4685
4690
|
yd as P,
|
|
4686
4691
|
ld as Q,
|
|
@@ -4710,7 +4715,7 @@ export {
|
|
|
4710
4715
|
xi as ac,
|
|
4711
4716
|
bd as ad,
|
|
4712
4717
|
wd as ae,
|
|
4713
|
-
|
|
4718
|
+
Bd as af,
|
|
4714
4719
|
xd as ag,
|
|
4715
4720
|
rc as ah,
|
|
4716
4721
|
rd as ai,
|
|
@@ -4725,7 +4730,7 @@ export {
|
|
|
4725
4730
|
$n as c,
|
|
4726
4731
|
md as d,
|
|
4727
4732
|
hd as e,
|
|
4728
|
-
|
|
4733
|
+
jd as f,
|
|
4729
4734
|
Oa as g,
|
|
4730
4735
|
mt as h,
|
|
4731
4736
|
mi as i,
|