@picked/client 0.0.65-next.3 → 0.0.65-next.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/{api-DqWHooZI.cjs → api-CmAd6sW9.cjs} +1 -1
- package/dist/{api-BKpqWJH7.js → api-D8nOMgTS.js} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/content/asset-library.mdx +43 -0
- package/dist/esm/index.js +214 -187
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/server/index.js +1 -1
- package/dist/{plugin-Bv6xMnkt.js → plugin-CLknL2nH.js} +1 -1
- package/dist/{plugin-DfQQmpnX.cjs → plugin-RiQ2AtIj.cjs} +1 -1
- package/dist/types/exports.d.ts +3 -0
- package/dist/types/exports.d.ts.map +1 -1
- package/dist/types/utils/html-asset-value.d.ts +20 -0
- package/dist/types/utils/html-asset-value.d.ts.map +1 -0
- package/dist/types/utils/rehydrate-scripts.d.ts +35 -0
- package/dist/types/utils/rehydrate-scripts.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { a as i, c as a, d as o, f as s, i as c, l, m as u, n as d, o as f, r as
|
|
|
5
5
|
import { a as _, i as v, r as ee, s as y, t as b } from "../dom-BwmTHeT7.js";
|
|
6
6
|
import { l as x, n as S, r as C, u as w } from "../experience-instance-DCcKZrdI.js";
|
|
7
7
|
import { i as T, n as E, r as D, t as O } from "../storage-1MW3-_As.js";
|
|
8
|
-
import { n as te, r as ne } from "../api-
|
|
8
|
+
import { n as te, r as ne } from "../api-D8nOMgTS.js";
|
|
9
9
|
import { t as re } from "../id-Bo4RBeOs.js";
|
|
10
10
|
import { attach as k, combine as A, createApi as j, createDomain as M, createEffect as N, createEvent as P, createStore as F, sample as I } from "effector";
|
|
11
11
|
import { createFactory as L, invoke as R } from "@withease/factories";
|
|
@@ -323,70 +323,70 @@ function V(e) {
|
|
|
323
323
|
function H(e) {
|
|
324
324
|
return Array.isArray(e);
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function Ce(e) {
|
|
327
327
|
return e instanceof Promise;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function we(e) {
|
|
330
330
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.keys(e).length === 1;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function U(e) {
|
|
333
333
|
if (Se(e)) return e;
|
|
334
334
|
let t = parseFloat(`${e}`);
|
|
335
335
|
return isNaN(t) ? 0 : t;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function W(e) {
|
|
338
338
|
return `${e}`;
|
|
339
339
|
}
|
|
340
|
-
var
|
|
340
|
+
var Te = {
|
|
341
341
|
"==": (e, t) => e == t,
|
|
342
342
|
"===": (e, t) => e === t,
|
|
343
343
|
"!=": (e, t) => e != t,
|
|
344
344
|
"!==": (e, t) => e !== t,
|
|
345
|
-
">": (e, t) =>
|
|
346
|
-
">=": (e, t) =>
|
|
345
|
+
">": (e, t) => U(e) > U(t),
|
|
346
|
+
">=": (e, t) => U(e) >= U(t),
|
|
347
347
|
"<": (e, t, n) => {
|
|
348
|
-
let r =
|
|
348
|
+
let r = U(e), i = U(t);
|
|
349
349
|
if (n === void 0) return r < i;
|
|
350
|
-
let a =
|
|
350
|
+
let a = U(n);
|
|
351
351
|
return r < i && i < a;
|
|
352
352
|
},
|
|
353
353
|
"<=": (e, t, n) => {
|
|
354
|
-
let r =
|
|
354
|
+
let r = U(e), i = U(t);
|
|
355
355
|
if (n === void 0) return r <= i;
|
|
356
|
-
let a =
|
|
356
|
+
let a = U(n);
|
|
357
357
|
return r <= i && i <= a;
|
|
358
358
|
},
|
|
359
|
-
"!!": async (e) => await
|
|
360
|
-
"!": async (e) => !await
|
|
361
|
-
"%": (e, t) =>
|
|
359
|
+
"!!": async (e) => await K(e),
|
|
360
|
+
"!": async (e) => !await K(e),
|
|
361
|
+
"%": (e, t) => U(e) % U(t),
|
|
362
362
|
log: (e) => (console.log(e), e),
|
|
363
|
-
in: (e, t) => t ? V(t) ? t.indexOf(
|
|
364
|
-
cat: (...e) => e.map(
|
|
363
|
+
in: (e, t) => t ? V(t) ? t.indexOf(W(e)) !== -1 : H(t) ? t.includes(e) : !1 : !1,
|
|
364
|
+
cat: (...e) => e.map(W).join(""),
|
|
365
365
|
substr: (e, t, n) => {
|
|
366
|
-
let r =
|
|
366
|
+
let r = W(e), i = U(t);
|
|
367
367
|
if (n === void 0) return r.substr(i);
|
|
368
|
-
let a =
|
|
368
|
+
let a = U(n);
|
|
369
369
|
if (a < 0) {
|
|
370
370
|
let e = r.substr(i);
|
|
371
371
|
return e.substr(0, e.length + a);
|
|
372
372
|
}
|
|
373
373
|
return r.substr(i, a);
|
|
374
374
|
},
|
|
375
|
-
"+": (...e) => e.reduce((e, t) =>
|
|
376
|
-
"*": (...e) => e.reduce((e, t) =>
|
|
375
|
+
"+": (...e) => e.reduce((e, t) => U(e) + U(t), 0),
|
|
376
|
+
"*": (...e) => e.reduce((e, t) => U(e) * U(t), 1),
|
|
377
377
|
"-": (e, t) => {
|
|
378
|
-
let n =
|
|
379
|
-
return t === void 0 ? -n : n -
|
|
378
|
+
let n = U(e);
|
|
379
|
+
return t === void 0 ? -n : n - U(t);
|
|
380
380
|
},
|
|
381
|
-
"/": (e, t) =>
|
|
382
|
-
min: (...e) => Math.min(...e.map(
|
|
383
|
-
max: (...e) => Math.max(...e.map(
|
|
381
|
+
"/": (e, t) => U(e) / U(t),
|
|
382
|
+
min: (...e) => Math.min(...e.map(U)),
|
|
383
|
+
max: (...e) => Math.max(...e.map(U)),
|
|
384
384
|
merge: (...e) => e.reduce((e, t) => H(t) ? e.concat(t) : e.concat([t]), []),
|
|
385
385
|
var(e, t) {
|
|
386
386
|
let n = arguments.length > 1 ? t : null;
|
|
387
387
|
if (e === "" || e === "." || e == null) return this;
|
|
388
388
|
if (typeof e == "number" && Array.isArray(this)) return e >= 0 && e < this.length ? this[e] : n;
|
|
389
|
-
let r =
|
|
389
|
+
let r = W(e);
|
|
390
390
|
if (r === "" || r === ".") return this;
|
|
391
391
|
let i = r.split("."), a = this;
|
|
392
392
|
for (let e of i) {
|
|
@@ -401,16 +401,16 @@ var we = {
|
|
|
401
401
|
async missing(...e) {
|
|
402
402
|
let t = H(e[0]) ? e[0] : e, n = [];
|
|
403
403
|
for (let e of t) {
|
|
404
|
-
let t = await
|
|
404
|
+
let t = await G({ var: e }, this);
|
|
405
405
|
(t === null || t === "") && n.push(`${e}`);
|
|
406
406
|
}
|
|
407
407
|
return n;
|
|
408
408
|
},
|
|
409
409
|
async missing_some(e, t) {
|
|
410
|
-
let n = await
|
|
410
|
+
let n = await G({ missing: t }, this);
|
|
411
411
|
if (!H(n) || !H(t)) return [];
|
|
412
412
|
let r = n.filter(V);
|
|
413
|
-
return t.filter(V).length - r.length >=
|
|
413
|
+
return t.filter(V).length - r.length >= U(e) ? [] : r;
|
|
414
414
|
},
|
|
415
415
|
invoke(...e) {
|
|
416
416
|
let [t, ...n] = e;
|
|
@@ -424,97 +424,97 @@ var we = {
|
|
|
424
424
|
let [t, i] = e;
|
|
425
425
|
n = t, r = i;
|
|
426
426
|
}
|
|
427
|
-
return !V(n) || !V(r) ? !1 : new RegExp(n, r).test(
|
|
427
|
+
return !V(n) || !V(r) ? !1 : new RegExp(n, r).test(W(t));
|
|
428
428
|
},
|
|
429
429
|
throw(e) {
|
|
430
|
-
throw Error(
|
|
430
|
+
throw Error(W(e));
|
|
431
431
|
}
|
|
432
432
|
};
|
|
433
|
-
async function
|
|
433
|
+
async function G(e, t) {
|
|
434
434
|
if (!e) return e;
|
|
435
|
-
if (
|
|
436
|
-
if (H(e)) return Promise.all(e.map((e) =>
|
|
437
|
-
if (!
|
|
438
|
-
let n =
|
|
435
|
+
if (Ce(e)) return G(await e, t);
|
|
436
|
+
if (H(e)) return Promise.all(e.map((e) => G(e, t)));
|
|
437
|
+
if (!we(e)) return e;
|
|
438
|
+
let n = Ee(e), r = n ? e[n] ?? [] : [];
|
|
439
439
|
switch (H(r) || (r = [r]), n) {
|
|
440
440
|
case "if":
|
|
441
441
|
case "?:":
|
|
442
|
-
for (let e = 0; e < r.length - 1; e += 2) if (await
|
|
443
|
-
return r.length % 2 == 1 ?
|
|
442
|
+
for (let e = 0; e < r.length - 1; e += 2) if (await K(await G(r[e], t))) return G(r[e + 1], t);
|
|
443
|
+
return r.length % 2 == 1 ? G(r[r.length - 1], t) : null;
|
|
444
444
|
case "and": {
|
|
445
445
|
let e = null;
|
|
446
|
-
for (let n of r) if (e = await
|
|
446
|
+
for (let n of r) if (e = await G(n, t), !await K(e)) return e;
|
|
447
447
|
return e;
|
|
448
448
|
}
|
|
449
449
|
case "or": {
|
|
450
450
|
let e = null;
|
|
451
|
-
for (let n of r) if (e = await
|
|
451
|
+
for (let n of r) if (e = await G(n, t), await K(e)) return e;
|
|
452
452
|
return e;
|
|
453
453
|
}
|
|
454
454
|
case "map": {
|
|
455
|
-
let e = await
|
|
456
|
-
return H(e) ? await Promise.all(e.map((e) =>
|
|
455
|
+
let e = await G(r[0], t);
|
|
456
|
+
return H(e) ? await Promise.all(e.map((e) => G(r[1], e))) : [];
|
|
457
457
|
}
|
|
458
458
|
case "filter": {
|
|
459
|
-
let e = await
|
|
459
|
+
let e = await G(r[0], t);
|
|
460
460
|
return H(e) ? (await Promise.all(e.map(async (e) => ({
|
|
461
461
|
item: e,
|
|
462
|
-
shouldInclude: await
|
|
462
|
+
shouldInclude: await K(await G(r[1], e))
|
|
463
463
|
})))).filter(({ shouldInclude: e }) => e).map(({ item: e }) => e) : [];
|
|
464
464
|
}
|
|
465
465
|
case "reduce": {
|
|
466
|
-
let e = await
|
|
467
|
-
if (!H(e)) return r.length > 2 ? await
|
|
468
|
-
let n = r[1], i = r.length > 2 ? await
|
|
469
|
-
for (let t of e) i = await
|
|
466
|
+
let e = await G(r[0], t);
|
|
467
|
+
if (!H(e)) return r.length > 2 ? await G(r[2], t) : null;
|
|
468
|
+
let n = r[1], i = r.length > 2 ? await G(r[2], t) : null;
|
|
469
|
+
for (let t of e) i = await G(n, {
|
|
470
470
|
current: t,
|
|
471
471
|
accumulator: i
|
|
472
472
|
});
|
|
473
473
|
return i;
|
|
474
474
|
}
|
|
475
475
|
case "all": {
|
|
476
|
-
let e = await
|
|
476
|
+
let e = await G(r[0], t);
|
|
477
477
|
if (!H(e) || e.length === 0) return !1;
|
|
478
|
-
for (let t of e) if (!await
|
|
478
|
+
for (let t of e) if (!await K(await G(r[1], t))) return !1;
|
|
479
479
|
return !0;
|
|
480
480
|
}
|
|
481
481
|
case "some": {
|
|
482
|
-
let e = await
|
|
482
|
+
let e = await G(r[0], t);
|
|
483
483
|
if (!H(e)) return !1;
|
|
484
|
-
for (let t of e) if (await
|
|
484
|
+
for (let t of e) if (await K(await G(r[1], t))) return !0;
|
|
485
485
|
return !1;
|
|
486
486
|
}
|
|
487
487
|
case "none": {
|
|
488
|
-
let e = await
|
|
488
|
+
let e = await G(r[0], t);
|
|
489
489
|
if (!H(e)) return !0;
|
|
490
|
-
for (let t of e) if (await
|
|
490
|
+
for (let t of e) if (await K(await G(r[1], t))) return !1;
|
|
491
491
|
return !0;
|
|
492
492
|
}
|
|
493
493
|
case "catch": try {
|
|
494
|
-
return await
|
|
494
|
+
return await G(r[0], t);
|
|
495
495
|
} catch (e) {
|
|
496
|
-
return
|
|
496
|
+
return we(e) ? await G(e, t) : r[1] ? await G(r[1], e) : e instanceof Error ? e.message : e;
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
let i = await Promise.all(r.map((e) =>
|
|
499
|
+
let i = await Promise.all(r.map((e) => G(e, t))), a = n ? Te[n] : void 0;
|
|
500
500
|
if (!a) throw Error(`Unrecognized operation ${n}`);
|
|
501
501
|
return a.apply(t, i);
|
|
502
502
|
}
|
|
503
|
-
async function
|
|
504
|
-
return
|
|
503
|
+
async function K(e) {
|
|
504
|
+
return Ce(e) ? K(await e) : !(Array.isArray(e) && e.length === 0) && !!e;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Ee(e) {
|
|
507
507
|
return Object.keys(e)[0];
|
|
508
508
|
}
|
|
509
509
|
//#endregion
|
|
510
510
|
//#region src/lifecycle/rules-logic.ts
|
|
511
|
-
function
|
|
511
|
+
function q(e, t, n) {
|
|
512
512
|
return new Proxy(Object.create(null), { get(r, i) {
|
|
513
513
|
if (typeof i != "string") return;
|
|
514
514
|
let a = e.find((e) => e.key === i);
|
|
515
|
-
if (a !== void 0) return async () => n.has(i) ? !1 : await
|
|
515
|
+
if (a !== void 0) return async () => n.has(i) ? !1 : await G(a.logic, {
|
|
516
516
|
...t,
|
|
517
|
-
conditions:
|
|
517
|
+
conditions: q(e, t, new Set(n).add(i))
|
|
518
518
|
}) === !0;
|
|
519
519
|
} });
|
|
520
520
|
}
|
|
@@ -555,9 +555,9 @@ var De = L(({ client: e }) => k({
|
|
|
555
555
|
features: u,
|
|
556
556
|
...s
|
|
557
557
|
};
|
|
558
|
-
return await
|
|
558
|
+
return await G(o, {
|
|
559
559
|
...d,
|
|
560
|
-
conditions:
|
|
560
|
+
conditions: q(a, d, /* @__PURE__ */ new Set())
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
563
|
}));
|
|
@@ -797,8 +797,8 @@ var Le = (e, t, n) => {
|
|
|
797
797
|
name: e,
|
|
798
798
|
predicate: t
|
|
799
799
|
});
|
|
800
|
-
},
|
|
801
|
-
let t =
|
|
800
|
+
}, Y = M("feature"), Re = L(({ client: e }) => {
|
|
801
|
+
let t = Y.store({}), n = Y.store([]), i = j(t, { register(e, t) {
|
|
802
802
|
return {
|
|
803
803
|
...e,
|
|
804
804
|
[t.id]: t.feature
|
|
@@ -959,16 +959,16 @@ var Le = (e, t, n) => {
|
|
|
959
959
|
getEvokableFeature: p
|
|
960
960
|
};
|
|
961
961
|
});
|
|
962
|
-
function
|
|
963
|
-
return R(
|
|
962
|
+
function ze(e) {
|
|
963
|
+
return R(Re, e);
|
|
964
964
|
}
|
|
965
|
-
var
|
|
965
|
+
var Be = (e, t, n) => {
|
|
966
966
|
n.register({
|
|
967
967
|
id: e,
|
|
968
968
|
feature: t
|
|
969
969
|
});
|
|
970
|
-
},
|
|
971
|
-
function
|
|
970
|
+
}, X = M("history");
|
|
971
|
+
function Ve(e, t) {
|
|
972
972
|
return {
|
|
973
973
|
id: re(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
974
974
|
node: t,
|
|
@@ -976,9 +976,9 @@ function He(e, t) {
|
|
|
976
976
|
experienceId: e
|
|
977
977
|
};
|
|
978
978
|
}
|
|
979
|
-
var
|
|
980
|
-
let e =
|
|
981
|
-
e.on(t, (e, t) => ({ entries: [...e.entries,
|
|
979
|
+
var He = L(() => {
|
|
980
|
+
let e = X.store({ entries: [] }), t = X.event(), n = X.event(), r = X.event(), i = X.event();
|
|
981
|
+
e.on(t, (e, t) => ({ entries: [...e.entries, Ve(t.experienceId, t.node)] })), e.on(n, (e, t) => ({ entries: [...e.entries.slice(0, -1), Ve(t.experienceId, t.node)] })), e.on(i, (e, t) => t);
|
|
982
982
|
function a(e, t) {
|
|
983
983
|
let n = {
|
|
984
984
|
lastStepIndex: -1,
|
|
@@ -1008,20 +1008,20 @@ var Ue = L(() => {
|
|
|
1008
1008
|
entriesStore: e.map((e) => e.entries)
|
|
1009
1009
|
};
|
|
1010
1010
|
});
|
|
1011
|
-
function
|
|
1012
|
-
return R(
|
|
1011
|
+
function Ue() {
|
|
1012
|
+
return R(He);
|
|
1013
1013
|
}
|
|
1014
1014
|
//#endregion
|
|
1015
1015
|
//#region src/utils/events.ts
|
|
1016
|
-
var
|
|
1016
|
+
var We = 0, Ge = (e) => {
|
|
1017
1017
|
let t = F([]);
|
|
1018
1018
|
return t.on(e, (e, t) => [...e, {
|
|
1019
|
-
id:
|
|
1019
|
+
id: We++,
|
|
1020
1020
|
at: /* @__PURE__ */ new Date(),
|
|
1021
1021
|
payload: t
|
|
1022
1022
|
}]), t;
|
|
1023
|
-
},
|
|
1024
|
-
let e =
|
|
1023
|
+
}, Ke = M("field"), qe = L(() => {
|
|
1024
|
+
let e = Ke.store({}), t = j(e, {
|
|
1025
1025
|
register(e, t) {
|
|
1026
1026
|
return {
|
|
1027
1027
|
...e,
|
|
@@ -1069,13 +1069,13 @@ var Ge = 0, Ke = (e) => {
|
|
|
1069
1069
|
getByName: c
|
|
1070
1070
|
};
|
|
1071
1071
|
});
|
|
1072
|
-
function
|
|
1073
|
-
return R(
|
|
1072
|
+
function Je() {
|
|
1073
|
+
return R(qe);
|
|
1074
1074
|
}
|
|
1075
1075
|
//#endregion
|
|
1076
1076
|
//#region src/entities/step/step.ts
|
|
1077
|
-
var
|
|
1078
|
-
let e =
|
|
1077
|
+
var Ye = M("step"), Xe = L(() => {
|
|
1078
|
+
let e = Ye.store({}), t = j(e, { register(e, t) {
|
|
1079
1079
|
return {
|
|
1080
1080
|
...e,
|
|
1081
1081
|
[t.step.id]: t.step
|
|
@@ -1099,16 +1099,16 @@ var Xe = M("step"), Ze = L(() => {
|
|
|
1099
1099
|
indexStore: e
|
|
1100
1100
|
};
|
|
1101
1101
|
});
|
|
1102
|
-
function
|
|
1103
|
-
return R(
|
|
1102
|
+
function Ze() {
|
|
1103
|
+
return R(Xe);
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function Qe(e, t) {
|
|
1106
1106
|
t.register(e);
|
|
1107
1107
|
}
|
|
1108
1108
|
//#endregion
|
|
1109
1109
|
//#region src/entities/content/content.ts
|
|
1110
|
-
var
|
|
1111
|
-
let e =
|
|
1110
|
+
var $e = M("content"), et = L(() => {
|
|
1111
|
+
let e = $e.store({}), t = j(e, { register(e, t) {
|
|
1112
1112
|
return {
|
|
1113
1113
|
...e,
|
|
1114
1114
|
[t.content.id]: t.content
|
|
@@ -1128,16 +1128,16 @@ var et = M("content"), tt = L(() => {
|
|
|
1128
1128
|
indexStore: e
|
|
1129
1129
|
};
|
|
1130
1130
|
});
|
|
1131
|
-
function
|
|
1132
|
-
return R(
|
|
1131
|
+
function tt() {
|
|
1132
|
+
return R(et);
|
|
1133
1133
|
}
|
|
1134
|
-
function
|
|
1134
|
+
function nt(e, t) {
|
|
1135
1135
|
t.register(e);
|
|
1136
1136
|
}
|
|
1137
1137
|
//#endregion
|
|
1138
1138
|
//#region src/entities/action/action.ts
|
|
1139
|
-
var
|
|
1140
|
-
let t =
|
|
1139
|
+
var rt = M("action"), it = L(({ client: e }) => {
|
|
1140
|
+
let t = rt.store({}), n = j(t, { register(e, t) {
|
|
1141
1141
|
return {
|
|
1142
1142
|
...e,
|
|
1143
1143
|
[t.key]: {
|
|
@@ -1195,10 +1195,10 @@ var it = M("action"), at = L(({ client: e }) => {
|
|
|
1195
1195
|
getEvokableAction: s
|
|
1196
1196
|
};
|
|
1197
1197
|
});
|
|
1198
|
-
function
|
|
1199
|
-
return R(
|
|
1198
|
+
function at(e) {
|
|
1199
|
+
return R(it, e);
|
|
1200
1200
|
}
|
|
1201
|
-
var
|
|
1201
|
+
var ot = (e, t, n) => {
|
|
1202
1202
|
n.register({
|
|
1203
1203
|
key: e,
|
|
1204
1204
|
action: t
|
|
@@ -1206,7 +1206,7 @@ var st = (e, t, n) => {
|
|
|
1206
1206
|
};
|
|
1207
1207
|
//#endregion
|
|
1208
1208
|
//#region src/entities/response/response-validation.ts
|
|
1209
|
-
function
|
|
1209
|
+
function Z(e, t, n, r) {
|
|
1210
1210
|
return {
|
|
1211
1211
|
fieldKey: e.key,
|
|
1212
1212
|
userMessage: n,
|
|
@@ -1214,62 +1214,62 @@ function X(e, t, n, r) {
|
|
|
1214
1214
|
value: t
|
|
1215
1215
|
};
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function Q(e) {
|
|
1218
1218
|
return e === null || e === "" || Array.isArray(e) && !e.length;
|
|
1219
1219
|
}
|
|
1220
|
-
function
|
|
1220
|
+
function st(e) {
|
|
1221
1221
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1223
|
+
function ct(e) {
|
|
1224
1224
|
try {
|
|
1225
1225
|
return JSON.stringify(e), !0;
|
|
1226
1226
|
} catch {
|
|
1227
1227
|
return !1;
|
|
1228
1228
|
}
|
|
1229
1229
|
}
|
|
1230
|
-
function
|
|
1230
|
+
function lt(e, t) {
|
|
1231
1231
|
return t.find((t) => t.key === e) ?? null;
|
|
1232
1232
|
}
|
|
1233
|
-
function
|
|
1233
|
+
function ut(e, t) {
|
|
1234
1234
|
return e.multiple && (typeof t == "string" || typeof t == "number" || typeof t == "boolean") ? [t] : t;
|
|
1235
1235
|
}
|
|
1236
|
-
function
|
|
1237
|
-
if (e.type !== "object" ||
|
|
1236
|
+
function dt(e, t) {
|
|
1237
|
+
if (e.type !== "object" || Q(t)) return null;
|
|
1238
1238
|
if (e.multiple) {
|
|
1239
|
-
if (!Array.isArray(t)) return
|
|
1239
|
+
if (!Array.isArray(t)) return Z(e, t, "This field expects multiple values", "Field expects an array of objects.");
|
|
1240
1240
|
for (let n of t) {
|
|
1241
|
-
if (typeof n != "object" || !n) return
|
|
1242
|
-
if (!
|
|
1241
|
+
if (typeof n != "object" || !n) return Z(e, t, "This field expects object values", "Field expects an array of objects, but received non-object value.");
|
|
1242
|
+
if (!ct(n)) return Z(e, t, "This field contains non-serializable data", "Field value contains non-JSON-serializable data (functions, circular references, etc.).");
|
|
1243
1243
|
}
|
|
1244
1244
|
return null;
|
|
1245
1245
|
}
|
|
1246
|
-
return Array.isArray(t) ?
|
|
1246
|
+
return Array.isArray(t) ? Z(e, t, "This field expects a single value", "Field expects a single object, not an array.") : typeof t != "object" || !t ? Z(e, t, "This field expects an object value", "Field expects an object value.") : ct(t) ? null : Z(e, t, "This field contains non-serializable data", "Field value contains non-JSON-serializable data (functions, circular references, etc.).");
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1249
|
-
if (
|
|
1248
|
+
function ft(e, t) {
|
|
1249
|
+
if (Q(t) || !Array.isArray(e.options) || e.options.length === 0) return null;
|
|
1250
1250
|
let n = Array.isArray(t) ? t : [t];
|
|
1251
1251
|
if (e.type === "object") {
|
|
1252
1252
|
let r = new Set(e.options.map((e) => JSON.stringify(e.value)));
|
|
1253
|
-
return n.every((e) => r.has(JSON.stringify(e))) ? null :
|
|
1253
|
+
return n.every((e) => r.has(JSON.stringify(e))) ? null : Z(e, t, "This field expects a valid option", "Field expects a valid option from the defined choices.");
|
|
1254
1254
|
}
|
|
1255
1255
|
let r = e.options.map((e) => e.value);
|
|
1256
|
-
return n.every((e) => !
|
|
1256
|
+
return n.every((e) => !st(e) || e === null ? !1 : r.includes(e)) ? null : Z(e, t, "This field expects a valid option", `Field expects a valid option. Valid options are: ${r.join(", ")}`);
|
|
1257
1257
|
}
|
|
1258
|
-
async function
|
|
1259
|
-
if (n.validation && !e(n.validation) && !
|
|
1258
|
+
async function pt(t, n, r, i) {
|
|
1259
|
+
if (n.validation && !e(n.validation) && !Q(r)) {
|
|
1260
1260
|
let e = i ? {
|
|
1261
1261
|
$input: r,
|
|
1262
1262
|
responses: i
|
|
1263
1263
|
} : { $input: r }, a = await t(n.validation, e);
|
|
1264
|
-
if (typeof a == "string") return
|
|
1265
|
-
if (a === !1) return
|
|
1264
|
+
if (typeof a == "string") return Z(n, r, a, `Field validation resulted in an error: ${a}.`);
|
|
1265
|
+
if (a === !1) return Z(n, r, "This field is invalid", "Field validation resulted in an unspecified error.");
|
|
1266
1266
|
}
|
|
1267
|
-
return n.required &&
|
|
1267
|
+
return n.required && Q(r) ? Z(n, r, "This field is required", "Field is required.") : !n.multiple && Array.isArray(r) && r.length > 1 ? Z(n, r, "This field expects a single response", "Field expects a single response.") : null;
|
|
1268
1268
|
}
|
|
1269
1269
|
//#endregion
|
|
1270
1270
|
//#region src/entities/response/response.ts
|
|
1271
|
-
var
|
|
1272
|
-
let t =
|
|
1271
|
+
var mt = M("response"), ht = L(({ client: e }) => {
|
|
1272
|
+
let t = mt.store({}), r = P(), i = P(), a = j(t, {
|
|
1273
1273
|
register(e, t) {
|
|
1274
1274
|
return {
|
|
1275
1275
|
...e,
|
|
@@ -1308,7 +1308,7 @@ var ht = M("response"), gt = L(({ client: e }) => {
|
|
|
1308
1308
|
...t,
|
|
1309
1309
|
...n
|
|
1310
1310
|
}, o = Object.entries(n), c = await Promise.allSettled(o.map(async ([t, n]) => {
|
|
1311
|
-
let o =
|
|
1311
|
+
let o = lt(t, e);
|
|
1312
1312
|
if (!o) {
|
|
1313
1313
|
r.push({
|
|
1314
1314
|
fieldKey: t,
|
|
@@ -1318,17 +1318,17 @@ var ht = M("response"), gt = L(({ client: e }) => {
|
|
|
1318
1318
|
});
|
|
1319
1319
|
return;
|
|
1320
1320
|
}
|
|
1321
|
-
let c =
|
|
1321
|
+
let c = ut(o, n), l = await pt(s, o, c, a);
|
|
1322
1322
|
if (l) {
|
|
1323
1323
|
r.push(l);
|
|
1324
1324
|
return;
|
|
1325
1325
|
}
|
|
1326
|
-
let u =
|
|
1326
|
+
let u = dt(o, c);
|
|
1327
1327
|
if (u) {
|
|
1328
1328
|
r.push(u);
|
|
1329
1329
|
return;
|
|
1330
1330
|
}
|
|
1331
|
-
let d =
|
|
1331
|
+
let d = ft(o, c);
|
|
1332
1332
|
if (d) {
|
|
1333
1333
|
r.push(d);
|
|
1334
1334
|
return;
|
|
@@ -1407,13 +1407,13 @@ var ht = M("response"), gt = L(({ client: e }) => {
|
|
|
1407
1407
|
getByFieldName: _
|
|
1408
1408
|
};
|
|
1409
1409
|
});
|
|
1410
|
-
function
|
|
1411
|
-
return R(
|
|
1410
|
+
function gt(e) {
|
|
1411
|
+
return R(ht, e);
|
|
1412
1412
|
}
|
|
1413
1413
|
//#endregion
|
|
1414
1414
|
//#region src/entities/condition/condition.ts
|
|
1415
|
-
var
|
|
1416
|
-
let e =
|
|
1415
|
+
var _t = M("condition"), vt = L(() => {
|
|
1416
|
+
let e = _t.store({}), t = j(e, { register(e, t) {
|
|
1417
1417
|
return {
|
|
1418
1418
|
...e,
|
|
1419
1419
|
[t.condition.id]: t.condition
|
|
@@ -1437,12 +1437,12 @@ var vt = M("condition"), yt = L(() => {
|
|
|
1437
1437
|
indexStore: e
|
|
1438
1438
|
};
|
|
1439
1439
|
});
|
|
1440
|
-
function
|
|
1441
|
-
return R(
|
|
1440
|
+
function yt() {
|
|
1441
|
+
return R(vt);
|
|
1442
1442
|
}
|
|
1443
1443
|
//#endregion
|
|
1444
1444
|
//#region src/utils/api-url.ts
|
|
1445
|
-
function
|
|
1445
|
+
function bt() {
|
|
1446
1446
|
if (c()) {
|
|
1447
1447
|
let e = [
|
|
1448
1448
|
document.currentScript,
|
|
@@ -1457,7 +1457,7 @@ function xt() {
|
|
|
1457
1457
|
}
|
|
1458
1458
|
//#endregion
|
|
1459
1459
|
//#region src/utils/search-params.ts
|
|
1460
|
-
function
|
|
1460
|
+
function xt() {
|
|
1461
1461
|
if (!s()) return {};
|
|
1462
1462
|
let e = new URLSearchParams(window.location.search), t = {}, n = /* @__PURE__ */ new Set();
|
|
1463
1463
|
for (let [t] of e.entries()) t.startsWith("picked-") && n.add(t);
|
|
@@ -1475,13 +1475,13 @@ function St() {
|
|
|
1475
1475
|
}
|
|
1476
1476
|
//#endregion
|
|
1477
1477
|
//#region src/entities/session/session.ts
|
|
1478
|
-
var
|
|
1479
|
-
function
|
|
1478
|
+
var St = O("session", "global");
|
|
1479
|
+
function Ct() {
|
|
1480
1480
|
return p() ? crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).substring(2, 15)}-${Math.random().toString(36).substring(2, 15)}-${Math.random().toString(36).substring(2, 15)}`;
|
|
1481
1481
|
}
|
|
1482
|
-
function
|
|
1482
|
+
function wt() {
|
|
1483
1483
|
if (!m()) return null;
|
|
1484
|
-
let e = E.get(
|
|
1484
|
+
let e = E.get(St);
|
|
1485
1485
|
if (!e.isSet()) return null;
|
|
1486
1486
|
try {
|
|
1487
1487
|
return e.json();
|
|
@@ -1489,8 +1489,8 @@ function Tt() {
|
|
|
1489
1489
|
return null;
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
|
-
var
|
|
1493
|
-
let e =
|
|
1492
|
+
var Tt = L(() => {
|
|
1493
|
+
let e = wt(), t = { id: e?.id ?? Ct() };
|
|
1494
1494
|
e?.isUser !== void 0 && (t.isUser = e.isUser), e?.identifiers && Object.keys(e.identifiers).length > 0 && (t.identifiers = e.identifiers);
|
|
1495
1495
|
let n = F(t), r = j(n, {
|
|
1496
1496
|
setIsUser: (e, t) => ({
|
|
@@ -1519,7 +1519,7 @@ var Et = L(() => {
|
|
|
1519
1519
|
source: n,
|
|
1520
1520
|
effect: (e) => {
|
|
1521
1521
|
if (m()) try {
|
|
1522
|
-
E.get(
|
|
1522
|
+
E.get(St).set(e);
|
|
1523
1523
|
} catch {}
|
|
1524
1524
|
}
|
|
1525
1525
|
})
|
|
@@ -1530,39 +1530,39 @@ var Et = L(() => {
|
|
|
1530
1530
|
removeIdentifier: r.removeIdentifier
|
|
1531
1531
|
};
|
|
1532
1532
|
});
|
|
1533
|
-
function
|
|
1534
|
-
return R(
|
|
1533
|
+
function Et() {
|
|
1534
|
+
return R(Tt, void 0);
|
|
1535
1535
|
}
|
|
1536
1536
|
//#endregion
|
|
1537
1537
|
//#region src/utils/picked-config.ts
|
|
1538
|
-
function
|
|
1538
|
+
function Dt() {
|
|
1539
1539
|
if (s()) return globalThis.window.pickedConfig;
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1542
|
-
if (s()) return
|
|
1541
|
+
function Ot() {
|
|
1542
|
+
if (s()) return Dt()?.projectId;
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1544
|
+
function kt() {
|
|
1545
1545
|
if (!c()) return;
|
|
1546
1546
|
let e = document.getElementById("picked_script") || document.querySelector("script#picked") || document.getElementById("cvly");
|
|
1547
1547
|
if (e) return e.dataset.projectid || e.getAttribute("project-id") || void 0;
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function At(e) {
|
|
1550
1550
|
if (e.projectId) return e.projectId;
|
|
1551
|
-
let t =
|
|
1551
|
+
let t = Ot();
|
|
1552
1552
|
if (t) return t;
|
|
1553
|
-
let n =
|
|
1553
|
+
let n = kt();
|
|
1554
1554
|
if (n) return n;
|
|
1555
1555
|
throw Error("projectId is required. You can provide it via one of:\n (1) createClient({ projectId }) options;\n (2) window.pickedConfig = { projectId };\n (3) a <script> tag with id 'picked_script', 'picked', or 'cvly' that includes a data-projectid (or project-id) attribute.");
|
|
1556
1556
|
}
|
|
1557
1557
|
//#endregion
|
|
1558
1558
|
//#region src/utils/render-string.ts
|
|
1559
|
-
function
|
|
1559
|
+
function $(e) {
|
|
1560
1560
|
return e == null || e === "" || Number.isNaN(e);
|
|
1561
1561
|
}
|
|
1562
|
-
var
|
|
1563
|
-
default: (e, t) =>
|
|
1564
|
-
append: (e, t) => t &&
|
|
1565
|
-
prepend: (e, t) => t &&
|
|
1562
|
+
var jt = {
|
|
1563
|
+
default: (e, t) => $(e) ? String(t ?? "") : String(e),
|
|
1564
|
+
append: (e, t) => t && !$(e) ? `${e} ${t}` : e,
|
|
1565
|
+
prepend: (e, t) => t && !$(e) ? `${t} ${e}` : e,
|
|
1566
1566
|
upper: (e) => typeof e == "string" ? e.toUpperCase() : e,
|
|
1567
1567
|
lower: (e) => typeof e == "string" ? e.toLowerCase() : e,
|
|
1568
1568
|
capitalize: (e) => typeof e == "string" ? e.charAt(0).toUpperCase() + e.slice(1) : e,
|
|
@@ -1580,24 +1580,24 @@ var Mt = {
|
|
|
1580
1580
|
return e instanceof Set ? t.format(Array.from(e).map(String)) : e;
|
|
1581
1581
|
}
|
|
1582
1582
|
};
|
|
1583
|
-
function
|
|
1583
|
+
function Mt(e) {
|
|
1584
1584
|
return typeof e == "object" && !!e;
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function Nt(e, t) {
|
|
1587
1587
|
let n = t;
|
|
1588
|
-
for (let t of e.split(".")) if (
|
|
1588
|
+
for (let t of e.split(".")) if (Mt(n) && t in n) n = n[t];
|
|
1589
1589
|
else return;
|
|
1590
1590
|
return typeof n == "function" ? n() : n;
|
|
1591
1591
|
}
|
|
1592
|
-
function
|
|
1593
|
-
let n = e.split("|").map((e) => e.trim()), r =
|
|
1592
|
+
function Pt(e, t) {
|
|
1593
|
+
let n = e.split("|").map((e) => e.trim()), r = Nt(n.shift() ?? "", t);
|
|
1594
1594
|
for (let e of n) {
|
|
1595
|
-
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o =
|
|
1595
|
+
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o = jt[i];
|
|
1596
1596
|
o && (r = o(r, a));
|
|
1597
1597
|
}
|
|
1598
|
-
return
|
|
1598
|
+
return $(r) ? "" : typeof r == "object" ? JSON.stringify(r) : String(r);
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1600
|
+
function Ft(e, t) {
|
|
1601
1601
|
let n = "", r = 0;
|
|
1602
1602
|
for (; r < e.length;) if (e[r] === "{" && e[r + 1] === "{") {
|
|
1603
1603
|
r += 2;
|
|
@@ -1609,13 +1609,13 @@ function It(e, t) {
|
|
|
1609
1609
|
}
|
|
1610
1610
|
i += e[r++];
|
|
1611
1611
|
}
|
|
1612
|
-
n +=
|
|
1612
|
+
n += Pt(i.trim(), t);
|
|
1613
1613
|
} else n += e[r++];
|
|
1614
1614
|
return n;
|
|
1615
1615
|
}
|
|
1616
1616
|
//#endregion
|
|
1617
1617
|
//#region src/picked.ts
|
|
1618
|
-
var
|
|
1618
|
+
var It = class {
|
|
1619
1619
|
static logger = r;
|
|
1620
1620
|
options;
|
|
1621
1621
|
dataSource = null;
|
|
@@ -1627,21 +1627,21 @@ var $ = class {
|
|
|
1627
1627
|
apiUrl;
|
|
1628
1628
|
dashboardUrl;
|
|
1629
1629
|
documentationSiteUrl;
|
|
1630
|
-
session =
|
|
1631
|
-
searchParams =
|
|
1632
|
-
history =
|
|
1630
|
+
session = Et();
|
|
1631
|
+
searchParams = xt();
|
|
1632
|
+
history = Ue();
|
|
1633
1633
|
components = he({ client: this });
|
|
1634
1634
|
experienceInstances = S({ client: this });
|
|
1635
1635
|
experiences = se({ client: this });
|
|
1636
1636
|
frameworks = ve({ client: this });
|
|
1637
1637
|
predicates = Ie({ client: this });
|
|
1638
|
-
features =
|
|
1639
|
-
conditions =
|
|
1640
|
-
fields =
|
|
1641
|
-
responses =
|
|
1642
|
-
steps =
|
|
1643
|
-
contents =
|
|
1644
|
-
actions =
|
|
1638
|
+
features = ze({ client: this });
|
|
1639
|
+
conditions = yt();
|
|
1640
|
+
fields = Je();
|
|
1641
|
+
responses = gt({ client: this });
|
|
1642
|
+
steps = Ze();
|
|
1643
|
+
contents = tt();
|
|
1644
|
+
actions = at({ client: this });
|
|
1645
1645
|
conditionResults = C();
|
|
1646
1646
|
stateSnapshotStore = xe({ client: this });
|
|
1647
1647
|
evaluateRuleLogicFx = Oe({ client: this });
|
|
@@ -1656,14 +1656,14 @@ var $ = class {
|
|
|
1656
1656
|
effect: (e, { template: t, context: n }) => {
|
|
1657
1657
|
let r = {};
|
|
1658
1658
|
for (let t of e) r[t.fieldKey] = t.value;
|
|
1659
|
-
return
|
|
1659
|
+
return Ft(t, {
|
|
1660
1660
|
...n,
|
|
1661
1661
|
responses: r
|
|
1662
1662
|
});
|
|
1663
1663
|
}
|
|
1664
1664
|
});
|
|
1665
1665
|
constructor(e) {
|
|
1666
|
-
this.events =
|
|
1666
|
+
this.events = Ge(this.eventBus), this.projectId = At(e), this.options = Object.freeze(e), this.apiUrl = e.apiUrl || bt(), this.dashboardUrl = e.dashboardUrl ?? "https://dashboard.picked.app", this.documentationSiteUrl = e.documentationSiteUrl ?? "https://docs.picked.app", this.start = this.lifecycle.start, this.readyStore = this.lifecycle.readyStore, this.preconditionPassedStore = this.lifecycle.preconditionPassedStore, this.conditionPassedStore = this.lifecycle.conditionPassedStore, this.lifecycleStageStore = this.lifecycle.lifecycleStageStore, this.setupPlugins(), this.setupFeatures(), this.setupPredicates(), this.setupActions(), this.setupComponents(), this.lifecycle.setPrecondition(e.precondition), this.lifecycle.setCondition(e.condition), this.eventBus({
|
|
1667
1667
|
type: "load",
|
|
1668
1668
|
version: ne()
|
|
1669
1669
|
}), this.maybeStartPreviewBridge();
|
|
@@ -1683,7 +1683,7 @@ var $ = class {
|
|
|
1683
1683
|
t?.onStart && this.lifecycle.registerPluginStartHook(t.onStart);
|
|
1684
1684
|
};
|
|
1685
1685
|
registerFeature = (e, t) => {
|
|
1686
|
-
|
|
1686
|
+
Be(e, t, this.features);
|
|
1687
1687
|
};
|
|
1688
1688
|
registerPredicate = (e, t) => {
|
|
1689
1689
|
Le(e, t, this.predicates);
|
|
@@ -1695,13 +1695,13 @@ var $ = class {
|
|
|
1695
1695
|
this.fields.register(e);
|
|
1696
1696
|
};
|
|
1697
1697
|
registerStep = (e) => {
|
|
1698
|
-
|
|
1698
|
+
Qe(e, this.steps);
|
|
1699
1699
|
};
|
|
1700
1700
|
registerContent = (e) => {
|
|
1701
|
-
|
|
1701
|
+
nt(e, this.contents);
|
|
1702
1702
|
};
|
|
1703
1703
|
registerAction = (e, t) => {
|
|
1704
|
-
|
|
1704
|
+
ot(e, t, this.actions);
|
|
1705
1705
|
};
|
|
1706
1706
|
registerExperience = (e) => {
|
|
1707
1707
|
e.component && B(`experience:${e.id}`, e.component, this.components), this.experiences.register(e);
|
|
@@ -1786,23 +1786,50 @@ var $ = class {
|
|
|
1786
1786
|
});
|
|
1787
1787
|
}
|
|
1788
1788
|
getPluginConfig = (e) => this.plugins[e] ?? {};
|
|
1789
|
-
};
|
|
1789
|
+
}, Lt = "application/picked-javascript", Rt = "application/picked-module", zt = "data-picked-hydrated";
|
|
1790
|
+
async function Bt(e) {
|
|
1791
|
+
if (!("document" in globalThis)) return;
|
|
1792
|
+
let t = "application/picked-module", n = "data-picked-hydrated";
|
|
1793
|
+
function r(e, t) {
|
|
1794
|
+
let r = document.createElement("script");
|
|
1795
|
+
for (let t of Array.from(e.attributes)) t.name !== "type" && r.setAttribute(t.name, t.value);
|
|
1796
|
+
t && r.setAttribute("type", t), r.setAttribute(n, ""), e.src ? r.async = !1 : r.textContent = e.textContent;
|
|
1797
|
+
let i = e.src ? new Promise((e) => {
|
|
1798
|
+
r.addEventListener("load", () => e(), { once: !0 }), r.addEventListener("error", () => e(), { once: !0 });
|
|
1799
|
+
}) : null;
|
|
1800
|
+
return e.replaceWith(r), i;
|
|
1801
|
+
}
|
|
1802
|
+
let i = Array.from(e.querySelectorAll(`script[type="application/picked-javascript"]:not([${n}]), script[type="${t}"]:not([${n}])`)).filter((e) => e instanceof HTMLScriptElement);
|
|
1803
|
+
for (let e of i) {
|
|
1804
|
+
if (!e.isConnected) continue;
|
|
1805
|
+
let n = r(e, e.getAttribute("type") === t ? "module" : null);
|
|
1806
|
+
n && await n;
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
function Vt() {
|
|
1810
|
+
return `<script>(${Bt.toString()})(document)<\/script>`;
|
|
1811
|
+
}
|
|
1812
|
+
//#endregion
|
|
1813
|
+
//#region src/utils/html-asset-value.ts
|
|
1814
|
+
function Ht(e) {
|
|
1815
|
+
return typeof e == "object" && !!e && "id" in e && typeof e.id == "string" && "content" in e && (typeof e.content == "string" || e.content === null);
|
|
1816
|
+
}
|
|
1790
1817
|
//#endregion
|
|
1791
1818
|
//#region src/entities/component/lazyComponent.ts
|
|
1792
|
-
function
|
|
1819
|
+
function Ut(e) {
|
|
1793
1820
|
return {
|
|
1794
1821
|
$$type: "lazy-component",
|
|
1795
1822
|
load: e
|
|
1796
1823
|
};
|
|
1797
1824
|
}
|
|
1798
|
-
function
|
|
1825
|
+
function Wt(e) {
|
|
1799
1826
|
return typeof e == "object" && !!e && "$$type" in e && e.$$type === "lazy-component";
|
|
1800
1827
|
}
|
|
1801
1828
|
//#endregion
|
|
1802
1829
|
//#region src/exports.ts
|
|
1803
|
-
var
|
|
1804
|
-
let t = new
|
|
1830
|
+
var Gt = (e) => {
|
|
1831
|
+
let t = new It(e);
|
|
1805
1832
|
return u(t), t;
|
|
1806
1833
|
};
|
|
1807
1834
|
//#endregion
|
|
1808
|
-
export {
|
|
1835
|
+
export { zt as PICKED_HYDRATED_ATTR, Rt as PICKED_MODULE_SCRIPT_TYPE, Lt as PICKED_SCRIPT_TYPE, It as Picked, Vt as buildRehydrateBootstrap, Gt as createClient, le as createPluginEffect, O as createStorageKey, n as evaluateRuleLogic, Dt as getPickedConfig, Ht as isHtmlAssetValue, h as isInsideIframe, Wt as isLazyLoader, _ as isPickedRoot, Ut as lazyComponent, E as localStore, Bt as rehydrateScripts, D as sessionStore, T as subscribe, d as supportsCookies, p as supportsCryptoRandomUUID, c as supportsDocument, i as supportsHistory, f as supportsIntersectionObserver, m as supportsLocalStorage, a as supportsLocation, l as supportsSessionStorage, g as supportsShadowRoot, o as supportsWebComponents, s as supportsWindow };
|