@picked/client 0.0.1-dev.1787788898336 → 0.0.1-dev.1788925875333
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/.tsbuildinfo +1 -1
- package/dist/{api-DU4j3Qw0.js → api-DbMJli3H.js} +1 -1
- package/dist/{api-9gq3GBPF.cjs → api-qiqq8lgz.cjs} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
- package/dist/cjs/plugins/telemetry/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/reference/dashboard/fields.mdx +17 -11
- package/dist/docs/reference/sdk/features.md +5 -0
- package/dist/docs/reference/sdk/fields.md +38 -6
- package/dist/docs/reference/sdk/type-generation.md +18 -7
- package/dist/docs/reference/tools/mcp.md +3 -1
- package/dist/esm/index.js +448 -430
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/plugins/responses-browser-storage/index.js +50 -16
- package/dist/esm/plugins/responses-indexeddb/index.js +1 -1
- package/dist/esm/plugins/telemetry/index.js +6 -3
- package/dist/esm/server/index.js +1 -1
- package/dist/{plugin-rwzR9hVc.cjs → plugin-BcLaCLm1.cjs} +1 -1
- package/dist/{plugin-CYXHEafF.js → plugin-De_BJSwE.js} +3 -2
- package/dist/provider-C_9u0yGJ.cjs +1 -0
- package/dist/{provider-BWDd3oaq.js → provider-ovM-CBX_.js} +15 -11
- package/dist/types/client.d.ts +21 -0
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/data-source/provider.d.ts +3 -3
- package/dist/types/data-source/provider.d.ts.map +1 -1
- package/dist/types/data-source/request-observer.d.ts +23 -19
- package/dist/types/data-source/request-observer.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +26 -7
- package/dist/types/entities/field/field.d.ts.map +1 -1
- package/dist/types/entities/field/policies.d.ts +35 -0
- package/dist/types/entities/field/policies.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lifecycle/lifecycle.d.ts +1 -1
- package/dist/types/lifecycle/lifecycle.d.ts.map +1 -1
- package/dist/types/picked.d.ts +4 -13
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +3 -8
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +11 -0
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/telemetry/plugin.d.ts +2 -2
- package/dist/types/plugins/telemetry/plugin.d.ts.map +1 -1
- package/dist/types/utils/client-telemetry.d.ts +25 -0
- package/dist/types/utils/client-telemetry.d.ts.map +1 -0
- package/dist/{version-BaI_1eQx.cjs → version-BvLZaTMC.cjs} +1 -1
- package/dist/{version-DXDZM7eT.js → version-VvasRUfR.js} +2 -2
- package/package.json +3 -3
- package/dist/provider-lgLyP_0N.cjs +0 -1
- package/dist/types/ping.d.ts +0 -11
- package/dist/types/ping.d.ts.map +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -4,16 +4,15 @@ import { t as r } from "../logger-DMN6TxJJ.js";
|
|
|
4
4
|
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, p, r as m, s as h, t as g, u as _ } from "../supports-CO9bJGNl.js";
|
|
5
5
|
import { a as v, i as y, r as ee, s as b, t as x } from "../dom-BqcToNL0.js";
|
|
6
6
|
import { l as S, n as C, r as w, u as T } from "../experience-instance-DGk11d8a.js";
|
|
7
|
-
import { i as
|
|
8
|
-
import { i as
|
|
9
|
-
import { t as
|
|
10
|
-
import { n as
|
|
11
|
-
import { attach as
|
|
12
|
-
import { createFactory as
|
|
13
|
-
import { sendPing as de } from "@picked/delivery-api-client";
|
|
7
|
+
import { i as E, n as D, r as O, t as k } from "../storage-1MW3-_As.js";
|
|
8
|
+
import { i as te, n as ne, r as re, t as ie } from "../version-VvasRUfR.js";
|
|
9
|
+
import { t as ae } from "../id-Bo4RBeOs.js";
|
|
10
|
+
import { n as oe, r as se, t as ce } from "../inert-script-report-B_bMPRzp.js";
|
|
11
|
+
import { attach as A, combine as j, createApi as M, createDomain as N, createEffect as P, createEvent as F, createStore as I, is as le, sample as L } from "effector";
|
|
12
|
+
import { createFactory as R, invoke as z } from "@withease/factories";
|
|
14
13
|
//#region src/entities/experience/experience.ts
|
|
15
|
-
var
|
|
16
|
-
let i =
|
|
14
|
+
var B = N("experience"), ue = R(({ client: e, experience: r }) => {
|
|
15
|
+
let i = B.store(r), a = M(i, { merge(e, t) {
|
|
17
16
|
return {
|
|
18
17
|
...e,
|
|
19
18
|
...t.experience
|
|
@@ -23,7 +22,7 @@ var z = M("experience"), fe = L(({ client: e, experience: r }) => {
|
|
|
23
22
|
decisionLogic: e.condition,
|
|
24
23
|
targetSelectors: e.targets,
|
|
25
24
|
initializeOpenLogic: e.initializeOpen
|
|
26
|
-
})), s =
|
|
25
|
+
})), s = j(i, e.components.listStore, (e, t) => (e.componentName ? t.find((t) => t.name === e.componentName) : void 0) || t.find((t) => t.name === `experience:${e.id}`) || t.find((e) => e.name === "experience"), { skipVoid: !1 }), c = j(i, e.steps.indexStore, e.conditions.indexStore, (e, t, n) => {
|
|
27
26
|
let r = e.nodes.filter(T).map((e) => t[e.stepId]).filter((e) => e !== void 0), i = e.nodes.filter(S).map((e) => n[e.conditionId]).filter((e) => e !== void 0);
|
|
28
27
|
return {
|
|
29
28
|
steps: r,
|
|
@@ -31,7 +30,7 @@ var z = M("experience"), fe = L(({ client: e, experience: r }) => {
|
|
|
31
30
|
edges: e.edges,
|
|
32
31
|
conditions: i
|
|
33
32
|
};
|
|
34
|
-
}), l = r.actions ?? [], u, d =
|
|
33
|
+
}), l = r.actions ?? [], u, d = A({
|
|
35
34
|
source: o,
|
|
36
35
|
effect: (t, n) => {
|
|
37
36
|
let i = y(t.targetSelectors, r.id);
|
|
@@ -39,18 +38,18 @@ var z = M("experience"), fe = L(({ client: e, experience: r }) => {
|
|
|
39
38
|
n ? e.experienceInstances.spawn(u, t, n) : e.experienceInstances.spawn(u, t);
|
|
40
39
|
});
|
|
41
40
|
}
|
|
42
|
-
}), f =
|
|
41
|
+
}), f = j({
|
|
43
42
|
preconditionPassed: e.preconditionPassedStore,
|
|
44
43
|
isUser: e.session.store.map((e) => e.isUser, { skipVoid: !1 }),
|
|
45
44
|
config: o
|
|
46
|
-
}), p =
|
|
45
|
+
}), p = A({
|
|
47
46
|
source: f,
|
|
48
47
|
effect: async ({ preconditionPassed: i, isUser: a, config: o }) => {
|
|
49
48
|
if (!i || !a) return !1;
|
|
50
49
|
let { decisionLogic: s, targetSelectors: c } = o;
|
|
51
50
|
return c.length === 0 || y(c, r.id).length < 1 ? !1 : s === void 0 || !t(s) || await n(e, s) === !0;
|
|
52
51
|
}
|
|
53
|
-
}), m =
|
|
52
|
+
}), m = P(async () => {
|
|
54
53
|
if (!e.contentLoader) return !0;
|
|
55
54
|
try {
|
|
56
55
|
await e.contentLoader({
|
|
@@ -61,26 +60,26 @@ var z = M("experience"), fe = L(({ client: e, experience: r }) => {
|
|
|
61
60
|
`${r.id}`;
|
|
62
61
|
}
|
|
63
62
|
return !0;
|
|
64
|
-
}), h =
|
|
65
|
-
return
|
|
63
|
+
}), h = F(), g = F(), _ = B.createStore(void 0, { skipVoid: !1 }).on(h, (e, t) => t).on(g, (e, t) => t);
|
|
64
|
+
return L({
|
|
66
65
|
clock: h,
|
|
67
66
|
target: p
|
|
68
|
-
}),
|
|
67
|
+
}), L({
|
|
69
68
|
clock: p.doneData,
|
|
70
69
|
source: _,
|
|
71
70
|
filter: (e, t) => t,
|
|
72
71
|
fn: (e) => e,
|
|
73
72
|
target: d
|
|
74
|
-
}),
|
|
73
|
+
}), L({
|
|
75
74
|
clock: p.doneData,
|
|
76
75
|
filter: Boolean,
|
|
77
76
|
target: m
|
|
78
|
-
}),
|
|
77
|
+
}), L({
|
|
79
78
|
clock: g,
|
|
80
79
|
source: _,
|
|
81
80
|
fn: (e) => e,
|
|
82
81
|
target: d
|
|
83
|
-
}),
|
|
82
|
+
}), L({
|
|
84
83
|
clock: g,
|
|
85
84
|
target: m
|
|
86
85
|
}), u = {
|
|
@@ -99,22 +98,22 @@ var z = M("experience"), fe = L(({ client: e, experience: r }) => {
|
|
|
99
98
|
prepareExperienceContentFx: m
|
|
100
99
|
}, u;
|
|
101
100
|
});
|
|
102
|
-
function
|
|
103
|
-
return
|
|
101
|
+
function de(e) {
|
|
102
|
+
return z(ue, e);
|
|
104
103
|
}
|
|
105
|
-
var
|
|
106
|
-
let t =
|
|
104
|
+
var fe = R(({ client: e }) => {
|
|
105
|
+
let t = B.store({}), n = M(t, { register(e, t) {
|
|
107
106
|
return {
|
|
108
107
|
...e,
|
|
109
108
|
[t.id]: t
|
|
110
109
|
};
|
|
111
|
-
} }), r =
|
|
112
|
-
n.register(
|
|
110
|
+
} }), r = F(), i = P((t) => {
|
|
111
|
+
n.register(de({
|
|
113
112
|
client: e,
|
|
114
113
|
experience: t
|
|
115
114
|
}));
|
|
116
115
|
});
|
|
117
|
-
|
|
116
|
+
L({
|
|
118
117
|
clock: r,
|
|
119
118
|
source: t,
|
|
120
119
|
filter: (e, t) => e[t.id] !== void 0,
|
|
@@ -127,7 +126,7 @@ var me = L(({ client: e }) => {
|
|
|
127
126
|
experience: t,
|
|
128
127
|
strategy: "override"
|
|
129
128
|
});
|
|
130
|
-
}),
|
|
129
|
+
}), L({
|
|
131
130
|
clock: r,
|
|
132
131
|
source: t,
|
|
133
132
|
filter: (e, t) => e[t.id] === void 0,
|
|
@@ -141,7 +140,7 @@ var me = L(({ client: e }) => {
|
|
|
141
140
|
function s(e) {
|
|
142
141
|
return t.map((t) => Object.values(t).find((t) => t.key === e) ?? t[e], { skipVoid: !1 });
|
|
143
142
|
}
|
|
144
|
-
let c =
|
|
143
|
+
let c = A({
|
|
145
144
|
source: t,
|
|
146
145
|
effect: (e, t) => {
|
|
147
146
|
let n = "key" in t ? Object.values(e).find((e) => e.key === t.key) : e[t.id];
|
|
@@ -159,7 +158,7 @@ var me = L(({ client: e }) => {
|
|
|
159
158
|
getById: o,
|
|
160
159
|
getByKey: s,
|
|
161
160
|
launch: c,
|
|
162
|
-
open:
|
|
161
|
+
open: A({
|
|
163
162
|
source: {
|
|
164
163
|
experiences: t,
|
|
165
164
|
instances: e.experienceInstances.listStore
|
|
@@ -187,7 +186,7 @@ var me = L(({ client: e }) => {
|
|
|
187
186
|
}
|
|
188
187
|
}),
|
|
189
188
|
listStore: a,
|
|
190
|
-
initialiseExperiencesFx:
|
|
189
|
+
initialiseExperiencesFx: A({
|
|
191
190
|
source: a,
|
|
192
191
|
effect: (e) => {
|
|
193
192
|
for (let t of e) t.initialiseRequested(void 0);
|
|
@@ -195,48 +194,48 @@ var me = L(({ client: e }) => {
|
|
|
195
194
|
})
|
|
196
195
|
};
|
|
197
196
|
});
|
|
198
|
-
function
|
|
199
|
-
return
|
|
197
|
+
function pe(e) {
|
|
198
|
+
return z(fe, e);
|
|
200
199
|
}
|
|
201
|
-
var
|
|
200
|
+
var me = async (e) => {
|
|
202
201
|
await e.experiences.initialiseExperiencesFx();
|
|
203
202
|
};
|
|
204
203
|
//#endregion
|
|
205
204
|
//#region src/entities/plugin/plugin.ts
|
|
206
|
-
function
|
|
207
|
-
return
|
|
205
|
+
function he(e) {
|
|
206
|
+
return P(async () => {
|
|
208
207
|
await e();
|
|
209
208
|
});
|
|
210
209
|
}
|
|
211
|
-
var
|
|
210
|
+
var ge = (e, t, n) => {
|
|
212
211
|
let r = t.name, i = t.setup(e), a = n[r] ?? {};
|
|
213
212
|
n[r] = Object.freeze({
|
|
214
213
|
...a,
|
|
215
214
|
...i
|
|
216
215
|
});
|
|
217
|
-
},
|
|
216
|
+
}, _e = N("component"), ve = R(({ client: e, component: t, name: n }) => ({
|
|
218
217
|
name: n,
|
|
219
218
|
component: t,
|
|
220
219
|
frameworkStore: e.frameworks.getByName(t.frameworkName)
|
|
221
220
|
}));
|
|
222
|
-
function
|
|
223
|
-
return
|
|
221
|
+
function ye(e) {
|
|
222
|
+
return z(ve, e);
|
|
224
223
|
}
|
|
225
|
-
var
|
|
226
|
-
let t =
|
|
224
|
+
var be = R(({ client: e }) => {
|
|
225
|
+
let t = _e.store({}), n = M(t, { register(e, t) {
|
|
227
226
|
return {
|
|
228
227
|
...e,
|
|
229
228
|
[t.name]: t
|
|
230
229
|
};
|
|
231
|
-
} }), i =
|
|
232
|
-
|
|
230
|
+
} }), i = F();
|
|
231
|
+
L({
|
|
233
232
|
clock: i,
|
|
234
233
|
source: t,
|
|
235
234
|
filter: (e, { name: t }) => e[t] !== void 0,
|
|
236
235
|
fn: (e, { name: t }) => `Component '${t}' already registered. Registering again will override the previous registration.`
|
|
237
|
-
}).watch((e) => /* @__PURE__ */ r("warn", e)),
|
|
236
|
+
}).watch((e) => /* @__PURE__ */ r("warn", e)), L({
|
|
238
237
|
clock: i,
|
|
239
|
-
fn: ({ name: t, component: n }) =>
|
|
238
|
+
fn: ({ name: t, component: n }) => ye({
|
|
240
239
|
client: e,
|
|
241
240
|
name: t,
|
|
242
241
|
component: n
|
|
@@ -253,27 +252,27 @@ var Se = L(({ client: e }) => {
|
|
|
253
252
|
listStore: a
|
|
254
253
|
};
|
|
255
254
|
});
|
|
256
|
-
function
|
|
257
|
-
return
|
|
255
|
+
function xe(e) {
|
|
256
|
+
return z(be, e);
|
|
258
257
|
}
|
|
259
|
-
var
|
|
258
|
+
var Se = (e, t, n) => {
|
|
260
259
|
n.register({
|
|
261
260
|
name: e,
|
|
262
261
|
component: t
|
|
263
262
|
});
|
|
264
|
-
},
|
|
265
|
-
let t =
|
|
263
|
+
}, Ce = N("framework"), we = R((e) => {
|
|
264
|
+
let t = Ce.store({}), n = M(t, { register(e, t) {
|
|
266
265
|
return {
|
|
267
266
|
...e,
|
|
268
267
|
[t.name]: t.framework
|
|
269
268
|
};
|
|
270
|
-
} }), i =
|
|
271
|
-
|
|
269
|
+
} }), i = F();
|
|
270
|
+
L({
|
|
272
271
|
clock: i,
|
|
273
272
|
source: t,
|
|
274
273
|
filter: (e, { name: t }) => e[t] !== void 0,
|
|
275
274
|
fn: (e, { name: t }) => `Framework '${t}' already registered. Registering again will override the previous registration.`
|
|
276
|
-
}).watch((e) => /* @__PURE__ */ r("warn", e)),
|
|
275
|
+
}).watch((e) => /* @__PURE__ */ r("warn", e)), L({
|
|
277
276
|
clock: i,
|
|
278
277
|
target: n.register
|
|
279
278
|
});
|
|
@@ -287,106 +286,106 @@ var we = (e, t, n) => {
|
|
|
287
286
|
listStore: a
|
|
288
287
|
};
|
|
289
288
|
});
|
|
290
|
-
function
|
|
291
|
-
return
|
|
289
|
+
function Te(e) {
|
|
290
|
+
return z(we, e);
|
|
292
291
|
}
|
|
293
|
-
var
|
|
292
|
+
var Ee = (e, t) => {
|
|
294
293
|
t.register({
|
|
295
294
|
name: e.name,
|
|
296
295
|
framework: e
|
|
297
296
|
});
|
|
298
|
-
},
|
|
297
|
+
}, De = R(({ client: e }) => {
|
|
299
298
|
let t = "window" in globalThis, n = {
|
|
300
299
|
location: t ? globalThis.location : void 0,
|
|
301
300
|
document: t ? globalThis.document : void 0,
|
|
302
301
|
sessionStorage: t ? globalThis.sessionStorage : void 0,
|
|
303
302
|
localStorage: t ? globalThis.localStorage : void 0
|
|
304
303
|
};
|
|
305
|
-
return
|
|
304
|
+
return j(e.responses.listStore, e.fields.listStore, (t, r) => Object.freeze({
|
|
306
305
|
client: e,
|
|
307
306
|
responses: t,
|
|
308
307
|
fields: r,
|
|
309
308
|
...n
|
|
310
309
|
}));
|
|
311
310
|
});
|
|
312
|
-
function
|
|
313
|
-
return
|
|
311
|
+
function Oe(e) {
|
|
312
|
+
return z(De, e);
|
|
314
313
|
}
|
|
315
314
|
//#endregion
|
|
316
315
|
//#region src/logic-engine.ts
|
|
317
|
-
function
|
|
316
|
+
function ke(e) {
|
|
318
317
|
return typeof e == "number" && !isNaN(e);
|
|
319
318
|
}
|
|
320
|
-
function
|
|
319
|
+
function V(e) {
|
|
321
320
|
return typeof e == "string";
|
|
322
321
|
}
|
|
323
|
-
function
|
|
322
|
+
function H(e) {
|
|
324
323
|
return Array.isArray(e);
|
|
325
324
|
}
|
|
326
|
-
function
|
|
325
|
+
function Ae(e) {
|
|
327
326
|
return e instanceof Promise;
|
|
328
327
|
}
|
|
329
|
-
function
|
|
328
|
+
function je(e) {
|
|
330
329
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.keys(e).length === 1;
|
|
331
330
|
}
|
|
332
|
-
function
|
|
333
|
-
if (
|
|
331
|
+
function U(e) {
|
|
332
|
+
if (ke(e)) return e;
|
|
334
333
|
let t = parseFloat(`${e}`);
|
|
335
334
|
return isNaN(t) ? 0 : t;
|
|
336
335
|
}
|
|
337
|
-
function
|
|
336
|
+
function W(e) {
|
|
338
337
|
return `${e}`;
|
|
339
338
|
}
|
|
340
|
-
var
|
|
339
|
+
var Me = {
|
|
341
340
|
"==": (e, t) => e == t,
|
|
342
341
|
"===": (e, t) => e === t,
|
|
343
342
|
"!=": (e, t) => e != t,
|
|
344
343
|
"!==": (e, t) => e !== t,
|
|
345
|
-
">": (e, t) =>
|
|
346
|
-
">=": (e, t) =>
|
|
344
|
+
">": (e, t) => U(e) > U(t),
|
|
345
|
+
">=": (e, t) => U(e) >= U(t),
|
|
347
346
|
"<": (e, t, n) => {
|
|
348
|
-
let r =
|
|
347
|
+
let r = U(e), i = U(t);
|
|
349
348
|
if (n === void 0) return r < i;
|
|
350
|
-
let a =
|
|
349
|
+
let a = U(n);
|
|
351
350
|
return r < i && i < a;
|
|
352
351
|
},
|
|
353
352
|
"<=": (e, t, n) => {
|
|
354
|
-
let r =
|
|
353
|
+
let r = U(e), i = U(t);
|
|
355
354
|
if (n === void 0) return r <= i;
|
|
356
|
-
let a =
|
|
355
|
+
let a = U(n);
|
|
357
356
|
return r <= i && i <= a;
|
|
358
357
|
},
|
|
359
|
-
"!!": async (e) => await
|
|
360
|
-
"!": async (e) => !await
|
|
361
|
-
"%": (e, t) =>
|
|
358
|
+
"!!": async (e) => await K(e),
|
|
359
|
+
"!": async (e) => !await K(e),
|
|
360
|
+
"%": (e, t) => U(e) % U(t),
|
|
362
361
|
log: (e) => (console.log(e), e),
|
|
363
|
-
in: (e, t) => t ?
|
|
364
|
-
cat: (...e) => e.map(
|
|
362
|
+
in: (e, t) => t ? V(t) ? t.indexOf(W(e)) !== -1 : H(t) ? t.includes(e) : !1 : !1,
|
|
363
|
+
cat: (...e) => e.map(W).join(""),
|
|
365
364
|
substr: (e, t, n) => {
|
|
366
|
-
let r =
|
|
365
|
+
let r = W(e), i = U(t);
|
|
367
366
|
if (n === void 0) return r.substr(i);
|
|
368
|
-
let a =
|
|
367
|
+
let a = U(n);
|
|
369
368
|
if (a < 0) {
|
|
370
369
|
let e = r.substr(i);
|
|
371
370
|
return e.substr(0, e.length + a);
|
|
372
371
|
}
|
|
373
372
|
return r.substr(i, a);
|
|
374
373
|
},
|
|
375
|
-
"+": (...e) => e.reduce((e, t) =>
|
|
376
|
-
"*": (...e) => e.reduce((e, t) =>
|
|
374
|
+
"+": (...e) => e.reduce((e, t) => U(e) + U(t), 0),
|
|
375
|
+
"*": (...e) => e.reduce((e, t) => U(e) * U(t), 1),
|
|
377
376
|
"-": (e, t) => {
|
|
378
|
-
let n =
|
|
379
|
-
return t === void 0 ? -n : n -
|
|
377
|
+
let n = U(e);
|
|
378
|
+
return t === void 0 ? -n : n - U(t);
|
|
380
379
|
},
|
|
381
|
-
"/": (e, t) =>
|
|
382
|
-
min: (...e) => Math.min(...e.map(
|
|
383
|
-
max: (...e) => Math.max(...e.map(
|
|
384
|
-
merge: (...e) => e.reduce((e, t) =>
|
|
380
|
+
"/": (e, t) => U(e) / U(t),
|
|
381
|
+
min: (...e) => Math.min(...e.map(U)),
|
|
382
|
+
max: (...e) => Math.max(...e.map(U)),
|
|
383
|
+
merge: (...e) => e.reduce((e, t) => H(t) ? e.concat(t) : e.concat([t]), []),
|
|
385
384
|
var(e, t) {
|
|
386
385
|
let n = arguments.length > 1 ? t : null;
|
|
387
386
|
if (e === "" || e === "." || e == null) return this;
|
|
388
387
|
if (typeof e == "number" && Array.isArray(this)) return e >= 0 && e < this.length ? this[e] : n;
|
|
389
|
-
let r =
|
|
388
|
+
let r = W(e);
|
|
390
389
|
if (r === "" || r === ".") return this;
|
|
391
390
|
let i = r.split("."), a = this;
|
|
392
391
|
for (let e of i) {
|
|
@@ -399,126 +398,126 @@ var Pe = {
|
|
|
399
398
|
return a === void 0 ? n : a;
|
|
400
399
|
},
|
|
401
400
|
async missing(...e) {
|
|
402
|
-
let t =
|
|
401
|
+
let t = H(e[0]) ? e[0] : e, n = [];
|
|
403
402
|
for (let e of t) {
|
|
404
|
-
let t = await
|
|
403
|
+
let t = await G({ var: e }, this);
|
|
405
404
|
(t === null || t === "") && n.push(`${e}`);
|
|
406
405
|
}
|
|
407
406
|
return n;
|
|
408
407
|
},
|
|
409
408
|
async missing_some(e, t) {
|
|
410
|
-
let n = await
|
|
411
|
-
if (!
|
|
412
|
-
let r = n.filter(
|
|
413
|
-
return t.filter(
|
|
409
|
+
let n = await G({ missing: t }, this);
|
|
410
|
+
if (!H(n) || !H(t)) return [];
|
|
411
|
+
let r = n.filter(V);
|
|
412
|
+
return t.filter(V).length - r.length >= U(e) ? [] : r;
|
|
414
413
|
},
|
|
415
414
|
invoke(...e) {
|
|
416
415
|
let [t, ...n] = e;
|
|
417
416
|
return typeof t == "function" ? Reflect.apply(t, null, n) : null;
|
|
418
417
|
},
|
|
419
|
-
startsWith: (e, t) =>
|
|
420
|
-
endsWith: (e, t) =>
|
|
418
|
+
startsWith: (e, t) => V(e) && V(t) && e.startsWith(t),
|
|
419
|
+
endsWith: (e, t) => V(e) && V(t) && e.endsWith(t),
|
|
421
420
|
regexp_matches(e, t) {
|
|
422
421
|
let n = e, r = "";
|
|
423
|
-
if (
|
|
422
|
+
if (H(e)) {
|
|
424
423
|
let [t, i] = e;
|
|
425
424
|
n = t, r = i;
|
|
426
425
|
}
|
|
427
|
-
return !
|
|
426
|
+
return !V(n) || !V(r) ? !1 : new RegExp(n, r).test(W(t));
|
|
428
427
|
},
|
|
429
428
|
throw(e) {
|
|
430
|
-
throw Error(
|
|
429
|
+
throw Error(W(e));
|
|
431
430
|
}
|
|
432
431
|
};
|
|
433
|
-
async function
|
|
432
|
+
async function G(e, t) {
|
|
434
433
|
if (!e) return e;
|
|
435
|
-
if (
|
|
436
|
-
if (
|
|
437
|
-
if (!
|
|
438
|
-
let n =
|
|
439
|
-
switch (
|
|
434
|
+
if (Ae(e)) return G(await e, t);
|
|
435
|
+
if (H(e)) return Promise.all(e.map((e) => G(e, t)));
|
|
436
|
+
if (!je(e)) return e;
|
|
437
|
+
let n = Ne(e), r = n ? e[n] ?? [] : [];
|
|
438
|
+
switch (H(r) || (r = [r]), n) {
|
|
440
439
|
case "if":
|
|
441
440
|
case "?:":
|
|
442
|
-
for (let e = 0; e < r.length - 1; e += 2) if (await
|
|
443
|
-
return r.length % 2 == 1 ?
|
|
441
|
+
for (let e = 0; e < r.length - 1; e += 2) if (await K(await G(r[e], t))) return G(r[e + 1], t);
|
|
442
|
+
return r.length % 2 == 1 ? G(r[r.length - 1], t) : null;
|
|
444
443
|
case "and": {
|
|
445
444
|
let e = null;
|
|
446
|
-
for (let n of r) if (e = await
|
|
445
|
+
for (let n of r) if (e = await G(n, t), !await K(e)) return e;
|
|
447
446
|
return e;
|
|
448
447
|
}
|
|
449
448
|
case "or": {
|
|
450
449
|
let e = null;
|
|
451
|
-
for (let n of r) if (e = await
|
|
450
|
+
for (let n of r) if (e = await G(n, t), await K(e)) return e;
|
|
452
451
|
return e;
|
|
453
452
|
}
|
|
454
453
|
case "map": {
|
|
455
|
-
let e = await
|
|
456
|
-
return
|
|
454
|
+
let e = await G(r[0], t);
|
|
455
|
+
return H(e) ? await Promise.all(e.map((e) => G(r[1], e))) : [];
|
|
457
456
|
}
|
|
458
457
|
case "filter": {
|
|
459
|
-
let e = await
|
|
460
|
-
return
|
|
458
|
+
let e = await G(r[0], t);
|
|
459
|
+
return H(e) ? (await Promise.all(e.map(async (e) => ({
|
|
461
460
|
item: e,
|
|
462
|
-
shouldInclude: await
|
|
461
|
+
shouldInclude: await K(await G(r[1], e))
|
|
463
462
|
})))).filter(({ shouldInclude: e }) => e).map(({ item: e }) => e) : [];
|
|
464
463
|
}
|
|
465
464
|
case "reduce": {
|
|
466
|
-
let e = await
|
|
467
|
-
if (!
|
|
468
|
-
let n = r[1], i = r.length > 2 ? await
|
|
469
|
-
for (let t of e) i = await
|
|
465
|
+
let e = await G(r[0], t);
|
|
466
|
+
if (!H(e)) return r.length > 2 ? await G(r[2], t) : null;
|
|
467
|
+
let n = r[1], i = r.length > 2 ? await G(r[2], t) : null;
|
|
468
|
+
for (let t of e) i = await G(n, {
|
|
470
469
|
current: t,
|
|
471
470
|
accumulator: i
|
|
472
471
|
});
|
|
473
472
|
return i;
|
|
474
473
|
}
|
|
475
474
|
case "all": {
|
|
476
|
-
let e = await
|
|
477
|
-
if (!
|
|
478
|
-
for (let t of e) if (!await
|
|
475
|
+
let e = await G(r[0], t);
|
|
476
|
+
if (!H(e) || e.length === 0) return !1;
|
|
477
|
+
for (let t of e) if (!await K(await G(r[1], t))) return !1;
|
|
479
478
|
return !0;
|
|
480
479
|
}
|
|
481
480
|
case "some": {
|
|
482
|
-
let e = await
|
|
483
|
-
if (!
|
|
484
|
-
for (let t of e) if (await
|
|
481
|
+
let e = await G(r[0], t);
|
|
482
|
+
if (!H(e)) return !1;
|
|
483
|
+
for (let t of e) if (await K(await G(r[1], t))) return !0;
|
|
485
484
|
return !1;
|
|
486
485
|
}
|
|
487
486
|
case "none": {
|
|
488
|
-
let e = await
|
|
489
|
-
if (!
|
|
490
|
-
for (let t of e) if (await
|
|
487
|
+
let e = await G(r[0], t);
|
|
488
|
+
if (!H(e)) return !0;
|
|
489
|
+
for (let t of e) if (await K(await G(r[1], t))) return !1;
|
|
491
490
|
return !0;
|
|
492
491
|
}
|
|
493
492
|
case "catch": try {
|
|
494
|
-
return await
|
|
493
|
+
return await G(r[0], t);
|
|
495
494
|
} catch (e) {
|
|
496
|
-
return
|
|
495
|
+
return je(e) ? await G(e, t) : r[1] ? await G(r[1], e) : e instanceof Error ? e.message : e;
|
|
497
496
|
}
|
|
498
497
|
}
|
|
499
|
-
let i = await Promise.all(r.map((e) =>
|
|
498
|
+
let i = await Promise.all(r.map((e) => G(e, t))), a = n ? Me[n] : void 0;
|
|
500
499
|
if (!a) throw Error(`Unrecognized operation ${n}`);
|
|
501
500
|
return a.apply(t, i);
|
|
502
501
|
}
|
|
503
|
-
async function
|
|
504
|
-
return
|
|
502
|
+
async function K(e) {
|
|
503
|
+
return Ae(e) ? K(await e) : !(Array.isArray(e) && e.length === 0) && !!e;
|
|
505
504
|
}
|
|
506
|
-
function
|
|
505
|
+
function Ne(e) {
|
|
507
506
|
return Object.keys(e)[0];
|
|
508
507
|
}
|
|
509
508
|
//#endregion
|
|
510
509
|
//#region src/lifecycle/rules-logic.ts
|
|
511
|
-
function
|
|
510
|
+
function Pe(e, t, n) {
|
|
512
511
|
return new Proxy(Object.create(null), { get(r, i) {
|
|
513
512
|
if (typeof i != "string") return;
|
|
514
513
|
let a = e.find((e) => e.key === i);
|
|
515
|
-
if (a !== void 0) return async () => !n.has(i) && await
|
|
514
|
+
if (a !== void 0) return async () => !n.has(i) && await G(a.logic, {
|
|
516
515
|
...t,
|
|
517
|
-
conditions:
|
|
516
|
+
conditions: Pe(e, t, new Set(n).add(i))
|
|
518
517
|
}) === !0;
|
|
519
518
|
} });
|
|
520
519
|
}
|
|
521
|
-
var
|
|
520
|
+
var Fe = R(({ client: e }) => A({
|
|
522
521
|
source: {
|
|
523
522
|
stateSnapshot: e.stateSnapshotStore,
|
|
524
523
|
predicates: e.predicates.listStore,
|
|
@@ -555,149 +554,130 @@ var Le = L(({ client: e }) => k({
|
|
|
555
554
|
features: u,
|
|
556
555
|
...s
|
|
557
556
|
};
|
|
558
|
-
return await
|
|
557
|
+
return await G(o, {
|
|
559
558
|
...d,
|
|
560
|
-
conditions:
|
|
559
|
+
conditions: Pe(a, d, /* @__PURE__ */ new Set())
|
|
561
560
|
});
|
|
562
561
|
}
|
|
563
562
|
}));
|
|
564
|
-
function
|
|
565
|
-
return
|
|
563
|
+
function Ie(e) {
|
|
564
|
+
return z(Fe, e);
|
|
566
565
|
}
|
|
567
566
|
//#endregion
|
|
568
|
-
//#region src/
|
|
569
|
-
var
|
|
570
|
-
|
|
571
|
-
let t = Date.now(), n = E.get(Be), r = 0;
|
|
572
|
-
if (n.isSet() && (r = n.json() ?? 0), r && t - r < ze) return !0;
|
|
573
|
-
let i = {}, a = document.getElementById("picked_script")?.dataset.verceltoken;
|
|
574
|
-
a && (i["x-vercel-protection-bypass"] = a);
|
|
575
|
-
let o = await de(e.apiUrl, {
|
|
576
|
-
projectId: e.projectId,
|
|
577
|
-
path: window.location.pathname
|
|
578
|
-
}, { headers: i });
|
|
579
|
-
return o && n.set(t), o;
|
|
580
|
-
} catch {
|
|
581
|
-
return !1;
|
|
582
|
-
}
|
|
583
|
-
}, K = M("lifecycle"), He = L(({ client: e }) => {
|
|
584
|
-
let t = K.store(!1), r = F(void 0, {
|
|
567
|
+
//#region src/lifecycle/lifecycle.ts
|
|
568
|
+
var q = N("lifecycle"), Le = R(({ client: e }) => {
|
|
569
|
+
let t = q.store(!1), r = I(void 0, {
|
|
585
570
|
skipVoid: !1,
|
|
586
|
-
domain:
|
|
587
|
-
}), i =
|
|
571
|
+
domain: q
|
|
572
|
+
}), i = I(void 0, {
|
|
588
573
|
skipVoid: !1,
|
|
589
|
-
domain:
|
|
590
|
-
}), a =
|
|
574
|
+
domain: q
|
|
575
|
+
}), a = q.store("idle"), o = q.store([]), s = I(void 0, {
|
|
591
576
|
skipVoid: !1,
|
|
592
|
-
domain:
|
|
593
|
-
}), l =
|
|
577
|
+
domain: q
|
|
578
|
+
}), l = I(void 0, {
|
|
594
579
|
skipVoid: !1,
|
|
595
|
-
domain:
|
|
596
|
-
}), u =
|
|
580
|
+
domain: q
|
|
581
|
+
}), u = F(), d = F(), f = F(), p = F(), m = F(), h = F();
|
|
597
582
|
o.on(p, (e, t) => [...e, t]), s.on(m, (e, t) => t), l.on(h, (e, t) => t), t.on(d, () => !0);
|
|
598
|
-
let g =
|
|
599
|
-
Ve(e);
|
|
600
|
-
}), _ = N(async () => {
|
|
583
|
+
let g = P(async () => {
|
|
601
584
|
await ee();
|
|
602
|
-
}),
|
|
603
|
-
await
|
|
604
|
-
}),
|
|
585
|
+
}), _ = P(async () => {
|
|
586
|
+
await me(e);
|
|
587
|
+
}), v = A({ effect: _ }), y = A({
|
|
605
588
|
source: o,
|
|
606
589
|
effect: async (e) => {
|
|
607
590
|
for (let t of e) await t();
|
|
608
591
|
}
|
|
609
|
-
}),
|
|
592
|
+
}), b = A({
|
|
610
593
|
source: s,
|
|
611
594
|
effect: async (t) => t === void 0 ? !0 : typeof t == "boolean" ? t : await n(e, t) === !0
|
|
612
|
-
}),
|
|
595
|
+
}), x = A({
|
|
613
596
|
source: l,
|
|
614
597
|
effect: async (t) => t === void 0 ? !0 : typeof t == "boolean" ? t : await n(e, t) === !0
|
|
615
|
-
}),
|
|
598
|
+
}), S = L({
|
|
616
599
|
clock: u,
|
|
617
600
|
source: a,
|
|
618
601
|
filter: (e) => e === "idle" && c(),
|
|
619
602
|
fn: () => void 0
|
|
620
603
|
});
|
|
621
|
-
|
|
622
|
-
clock:
|
|
604
|
+
L({
|
|
605
|
+
clock: S,
|
|
623
606
|
fn: () => "starting",
|
|
624
607
|
target: a
|
|
625
|
-
}),
|
|
626
|
-
clock:
|
|
608
|
+
}), S.watch(e.performance.markBegin), d.watch(e.performance.measure), L({
|
|
609
|
+
clock: S,
|
|
610
|
+
target: y
|
|
611
|
+
}), L({
|
|
612
|
+
clock: S,
|
|
627
613
|
target: g
|
|
628
|
-
}),
|
|
629
|
-
clock:
|
|
614
|
+
}), L({
|
|
615
|
+
clock: y.done,
|
|
630
616
|
target: b
|
|
631
|
-
}),
|
|
632
|
-
clock:
|
|
633
|
-
target: _
|
|
634
|
-
}), I({
|
|
635
|
-
clock: b.done,
|
|
636
|
-
target: x
|
|
637
|
-
}), I({
|
|
638
|
-
clock: x.doneData,
|
|
617
|
+
}), L({
|
|
618
|
+
clock: b.doneData,
|
|
639
619
|
target: r
|
|
640
|
-
}),
|
|
641
|
-
clock: S.doneData,
|
|
642
|
-
target: i
|
|
643
|
-
}), I({
|
|
620
|
+
}), L({
|
|
644
621
|
clock: x.doneData,
|
|
622
|
+
target: i
|
|
623
|
+
}), L({
|
|
624
|
+
clock: b.doneData,
|
|
645
625
|
filter: (e) => e,
|
|
646
|
-
target:
|
|
647
|
-
}),
|
|
648
|
-
clock:
|
|
626
|
+
target: x
|
|
627
|
+
}), L({
|
|
628
|
+
clock: x.doneData,
|
|
649
629
|
target: e.session.setIsUser
|
|
650
|
-
}),
|
|
651
|
-
clock:
|
|
630
|
+
}), L({
|
|
631
|
+
clock: x.doneData,
|
|
652
632
|
fn: (e) => ({
|
|
653
633
|
type: "user_decide",
|
|
654
634
|
value: e
|
|
655
635
|
}),
|
|
656
636
|
target: e.eventBus
|
|
657
|
-
}),
|
|
658
|
-
clock:
|
|
637
|
+
}), L({
|
|
638
|
+
clock: b.doneData,
|
|
659
639
|
filter: (e) => !e,
|
|
660
640
|
fn: () => void 0,
|
|
661
641
|
target: f
|
|
662
|
-
}),
|
|
663
|
-
clock:
|
|
642
|
+
}), L({
|
|
643
|
+
clock: x.doneData,
|
|
664
644
|
fn: () => void 0,
|
|
665
645
|
target: f
|
|
666
|
-
}),
|
|
646
|
+
}), L({
|
|
667
647
|
clock: f,
|
|
668
648
|
fn: () => ({ type: "initialize" }),
|
|
669
649
|
target: e.eventBus
|
|
670
650
|
});
|
|
671
|
-
let
|
|
672
|
-
|
|
651
|
+
let C = I(!1).on(g.done, () => !0), w = I(!1).on(f, () => !0), T = I(!1).on(v.done, () => !0), E = j(r, i, (e, t) => e === !0 && t === !0);
|
|
652
|
+
L({
|
|
673
653
|
clock: f,
|
|
674
654
|
source: E,
|
|
675
655
|
filter: (e) => e,
|
|
676
656
|
fn: () => void 0,
|
|
677
|
-
target:
|
|
657
|
+
target: _
|
|
678
658
|
});
|
|
679
|
-
let D =
|
|
680
|
-
|
|
659
|
+
let D = j(C, w, E, (e, t, n) => e && t && n);
|
|
660
|
+
L({
|
|
681
661
|
clock: D,
|
|
682
662
|
filter: (e) => e,
|
|
683
663
|
fn: () => void 0,
|
|
684
|
-
target:
|
|
664
|
+
target: v
|
|
685
665
|
});
|
|
686
|
-
let O =
|
|
687
|
-
return
|
|
666
|
+
let O = j(C, w, E, T, (e, t, n, r) => e && t && (!n || r));
|
|
667
|
+
return L({
|
|
688
668
|
clock: O,
|
|
689
669
|
filter: (e) => e,
|
|
690
670
|
fn: () => void 0,
|
|
691
671
|
target: d
|
|
692
|
-
}),
|
|
672
|
+
}), L({
|
|
693
673
|
clock: d,
|
|
694
674
|
fn: () => "ready",
|
|
695
675
|
target: a
|
|
696
|
-
}),
|
|
676
|
+
}), L({
|
|
697
677
|
clock: d,
|
|
698
678
|
fn: () => ({ type: "ready" }),
|
|
699
679
|
target: e.eventBus
|
|
700
|
-
}),
|
|
680
|
+
}), L({
|
|
701
681
|
clock: d,
|
|
702
682
|
source: e.session.store,
|
|
703
683
|
fn: ({ id: e, isUser: t, identifiers: n }) => ({
|
|
@@ -707,14 +687,14 @@ var ze = 6e3, Be = O("last_ping", "global"), Ve = async (e) => {
|
|
|
707
687
|
identifiers: n
|
|
708
688
|
}),
|
|
709
689
|
target: e.eventBus
|
|
710
|
-
}),
|
|
690
|
+
}), L({
|
|
711
691
|
clock: [
|
|
692
|
+
y.fail,
|
|
712
693
|
b.fail,
|
|
713
694
|
x.fail,
|
|
714
|
-
|
|
695
|
+
_.fail,
|
|
715
696
|
v.fail,
|
|
716
|
-
|
|
717
|
-
_.fail
|
|
697
|
+
g.fail
|
|
718
698
|
],
|
|
719
699
|
fn: () => "failed",
|
|
720
700
|
target: a
|
|
@@ -729,13 +709,13 @@ var ze = 6e3, Be = O("last_ping", "global"), Ve = async (e) => {
|
|
|
729
709
|
setCondition: h
|
|
730
710
|
};
|
|
731
711
|
});
|
|
732
|
-
function
|
|
733
|
-
return
|
|
712
|
+
function Re(e) {
|
|
713
|
+
return z(Le, e);
|
|
734
714
|
}
|
|
735
715
|
//#endregion
|
|
736
716
|
//#region src/entities/predicate/predicate.ts
|
|
737
|
-
var
|
|
738
|
-
let t =
|
|
717
|
+
var ze = N("predicate"), Be = R(({ client: e }) => {
|
|
718
|
+
let t = ze.store({}), n = M(t, { register(e, t) {
|
|
739
719
|
return {
|
|
740
720
|
...e,
|
|
741
721
|
[t.name]: {
|
|
@@ -743,13 +723,13 @@ var We = M("predicate"), Ge = L(({ client: e }) => {
|
|
|
743
723
|
predicate: t.predicate
|
|
744
724
|
}
|
|
745
725
|
};
|
|
746
|
-
} }), i =
|
|
747
|
-
|
|
726
|
+
} }), i = F();
|
|
727
|
+
L({
|
|
748
728
|
clock: i,
|
|
749
729
|
source: t,
|
|
750
730
|
filter: (e, { name: t }) => e[t] !== void 0,
|
|
751
731
|
fn: (e, { name: t }) => `Predicate '${t}' already registered. Registering again will override the previous registration.`
|
|
752
|
-
}).watch((e) => /* @__PURE__ */ r("warn", e)),
|
|
732
|
+
}).watch((e) => /* @__PURE__ */ r("warn", e)), L({
|
|
753
733
|
clock: i,
|
|
754
734
|
fn: ({ name: e, predicate: t }) => Object.freeze({
|
|
755
735
|
name: e,
|
|
@@ -762,7 +742,7 @@ var We = M("predicate"), Ge = L(({ client: e }) => {
|
|
|
762
742
|
return t.map((t) => t[e]?.predicate, { skipVoid: !1 });
|
|
763
743
|
}
|
|
764
744
|
function s(t) {
|
|
765
|
-
let n =
|
|
745
|
+
let n = I(() => void 0, { skipVoid: !1 }), r = A({
|
|
766
746
|
source: {
|
|
767
747
|
predicate: o(t),
|
|
768
748
|
snapshot: e.stateSnapshotStore
|
|
@@ -774,13 +754,13 @@ var We = M("predicate"), Ge = L(({ client: e }) => {
|
|
|
774
754
|
});
|
|
775
755
|
}
|
|
776
756
|
});
|
|
777
|
-
return
|
|
757
|
+
return L({
|
|
778
758
|
source: {
|
|
779
759
|
responses: e.responses.listStore,
|
|
780
760
|
fields: e.fields.listStore
|
|
781
761
|
},
|
|
782
762
|
target: r
|
|
783
|
-
}),
|
|
763
|
+
}), L({
|
|
784
764
|
clock: r.doneData,
|
|
785
765
|
filter: (e) => e !== void 0,
|
|
786
766
|
target: n
|
|
@@ -793,26 +773,26 @@ var We = M("predicate"), Ge = L(({ client: e }) => {
|
|
|
793
773
|
getEvokablePredicate: s
|
|
794
774
|
};
|
|
795
775
|
});
|
|
796
|
-
function
|
|
797
|
-
return
|
|
776
|
+
function Ve(e) {
|
|
777
|
+
return z(Be, e);
|
|
798
778
|
}
|
|
799
|
-
var
|
|
779
|
+
var He = (e, t, n) => {
|
|
800
780
|
n.register({
|
|
801
781
|
name: e,
|
|
802
782
|
predicate: t
|
|
803
783
|
});
|
|
804
|
-
},
|
|
805
|
-
function
|
|
784
|
+
}, J = N("history");
|
|
785
|
+
function Ue(e, t) {
|
|
806
786
|
return {
|
|
807
|
-
id:
|
|
787
|
+
id: ae(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
808
788
|
node: t,
|
|
809
789
|
at: Date.now(),
|
|
810
790
|
experienceId: e
|
|
811
791
|
};
|
|
812
792
|
}
|
|
813
|
-
var
|
|
814
|
-
let e =
|
|
815
|
-
e.on(t, (e, t) => ({ entries: [...e.entries,
|
|
793
|
+
var We = R(() => {
|
|
794
|
+
let e = J.store({ entries: [] }), t = J.event(), n = J.event(), r = J.event(), i = J.event();
|
|
795
|
+
e.on(t, (e, t) => ({ entries: [...e.entries, Ue(t.experienceId, t.node)] })), e.on(n, (e, t) => ({ entries: [...e.entries.slice(0, -1), Ue(t.experienceId, t.node)] })), e.on(i, (e, t) => t);
|
|
816
796
|
function a(e, t) {
|
|
817
797
|
let n = {
|
|
818
798
|
lastStepIndex: -1,
|
|
@@ -842,32 +822,49 @@ var Ye = L(() => {
|
|
|
842
822
|
entriesStore: e.map((e) => e.entries)
|
|
843
823
|
};
|
|
844
824
|
});
|
|
845
|
-
function
|
|
846
|
-
return
|
|
825
|
+
function Ge() {
|
|
826
|
+
return z(We);
|
|
847
827
|
}
|
|
848
828
|
//#endregion
|
|
849
829
|
//#region src/utils/events.ts
|
|
850
|
-
var
|
|
851
|
-
let t =
|
|
830
|
+
var Ke = 0, qe = (e) => {
|
|
831
|
+
let t = I([]);
|
|
852
832
|
return t.on(e, (e, t) => [...e, {
|
|
853
|
-
id:
|
|
833
|
+
id: Ke++,
|
|
854
834
|
at: /* @__PURE__ */ new Date(),
|
|
855
835
|
payload: t
|
|
856
836
|
}]), t;
|
|
857
|
-
}
|
|
858
|
-
|
|
837
|
+
};
|
|
838
|
+
//#endregion
|
|
839
|
+
//#region src/entities/field/policies.ts
|
|
840
|
+
function Je(e) {
|
|
841
|
+
let { doNotTrackValue: t, doNotStoreValue: n } = e ?? {}, r = e?.trackValue ?? t === !1, i = e?.storeValue ?? n === !1;
|
|
842
|
+
return {
|
|
843
|
+
trackValue: r,
|
|
844
|
+
storeValue: i,
|
|
845
|
+
doNotTrackValue: !r,
|
|
846
|
+
doNotStoreValue: !i
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
//#endregion
|
|
850
|
+
//#region src/entities/field/field.ts
|
|
851
|
+
var Ye = N("field"), Xe = R(() => {
|
|
852
|
+
let e = Ye.store({}), t = M(e, {
|
|
859
853
|
register(e, t) {
|
|
854
|
+
let n = Object.assign({}, t.field, { policies: Je(t.field.policies) });
|
|
860
855
|
return {
|
|
861
856
|
...e,
|
|
862
|
-
[
|
|
857
|
+
[n.id]: n
|
|
863
858
|
};
|
|
864
859
|
},
|
|
865
860
|
updateByKey(e, t) {
|
|
866
861
|
let n = Object.values(e).find((e) => e.key === t.fieldKey);
|
|
867
|
-
|
|
862
|
+
if (!n) return e;
|
|
863
|
+
let r = Object.assign({}, n, t.updates);
|
|
864
|
+
return {
|
|
868
865
|
...e,
|
|
869
|
-
[n.id]: Object.assign({},
|
|
870
|
-
}
|
|
866
|
+
[n.id]: Object.assign({}, r, { policies: Je(r.policies) })
|
|
867
|
+
};
|
|
871
868
|
}
|
|
872
869
|
});
|
|
873
870
|
function n(e) {
|
|
@@ -903,13 +900,13 @@ var Ze = 0, Qe = (e) => {
|
|
|
903
900
|
getByName: c
|
|
904
901
|
};
|
|
905
902
|
});
|
|
906
|
-
function
|
|
907
|
-
return
|
|
903
|
+
function Ze() {
|
|
904
|
+
return z(Xe);
|
|
908
905
|
}
|
|
909
906
|
//#endregion
|
|
910
907
|
//#region src/entities/step/step.ts
|
|
911
|
-
var
|
|
912
|
-
let e =
|
|
908
|
+
var Qe = N("step"), $e = R(() => {
|
|
909
|
+
let e = Qe.store({}), t = M(e, { register(e, t) {
|
|
913
910
|
return {
|
|
914
911
|
...e,
|
|
915
912
|
[t.step.id]: t.step
|
|
@@ -933,16 +930,16 @@ var nt = M("step"), rt = L(() => {
|
|
|
933
930
|
indexStore: e
|
|
934
931
|
};
|
|
935
932
|
});
|
|
936
|
-
function
|
|
937
|
-
return
|
|
933
|
+
function et() {
|
|
934
|
+
return z($e);
|
|
938
935
|
}
|
|
939
|
-
function
|
|
936
|
+
function tt(e, t) {
|
|
940
937
|
t.register(e);
|
|
941
938
|
}
|
|
942
939
|
//#endregion
|
|
943
940
|
//#region src/entities/content/content.ts
|
|
944
|
-
var
|
|
945
|
-
let e =
|
|
941
|
+
var nt = N("content"), rt = R(() => {
|
|
942
|
+
let e = nt.store({}), t = M(e, {
|
|
946
943
|
register(e, t) {
|
|
947
944
|
return {
|
|
948
945
|
...e,
|
|
@@ -983,16 +980,16 @@ var ot = M("content"), st = L(() => {
|
|
|
983
980
|
indexStore: e
|
|
984
981
|
};
|
|
985
982
|
});
|
|
986
|
-
function
|
|
987
|
-
return
|
|
983
|
+
function it() {
|
|
984
|
+
return z(rt);
|
|
988
985
|
}
|
|
989
|
-
function
|
|
986
|
+
function at(e, t) {
|
|
990
987
|
t.register(e);
|
|
991
988
|
}
|
|
992
989
|
//#endregion
|
|
993
990
|
//#region src/entities/action/action.ts
|
|
994
|
-
var
|
|
995
|
-
let t =
|
|
991
|
+
var ot = N("action"), st = R(({ client: e }) => {
|
|
992
|
+
let t = ot.store({}), n = M(t, { register(e, t) {
|
|
996
993
|
return {
|
|
997
994
|
...e,
|
|
998
995
|
[t.key]: {
|
|
@@ -1000,13 +997,13 @@ var ut = M("action"), dt = L(({ client: e }) => {
|
|
|
1000
997
|
action: t.action
|
|
1001
998
|
}
|
|
1002
999
|
};
|
|
1003
|
-
} }), i =
|
|
1004
|
-
|
|
1000
|
+
} }), i = F();
|
|
1001
|
+
L({
|
|
1005
1002
|
clock: i,
|
|
1006
1003
|
source: t,
|
|
1007
1004
|
filter: (e, { key: t }) => e[t] !== void 0,
|
|
1008
1005
|
fn: (e, { key: t }) => `Action '${t}' already registered. Registering again will override the previous registration.`
|
|
1009
|
-
}).watch((e) => /* @__PURE__ */ r("warn", e)),
|
|
1006
|
+
}).watch((e) => /* @__PURE__ */ r("warn", e)), L({
|
|
1010
1007
|
clock: i,
|
|
1011
1008
|
fn: ({ key: e, action: t }) => Object.freeze({
|
|
1012
1009
|
key: e,
|
|
@@ -1019,7 +1016,7 @@ var ut = M("action"), dt = L(({ client: e }) => {
|
|
|
1019
1016
|
return t.map((t) => t[e]?.action, { skipVoid: !1 });
|
|
1020
1017
|
}
|
|
1021
1018
|
function s(t, n) {
|
|
1022
|
-
let r =
|
|
1019
|
+
let r = I(() => void 0, { skipVoid: !1 }), i = n ? { experience: n.experience } : null, a = A({
|
|
1023
1020
|
source: {
|
|
1024
1021
|
action: o(t),
|
|
1025
1022
|
snapshot: e.stateSnapshotStore
|
|
@@ -1031,13 +1028,13 @@ var ut = M("action"), dt = L(({ client: e }) => {
|
|
|
1031
1028
|
}, i);
|
|
1032
1029
|
}
|
|
1033
1030
|
});
|
|
1034
|
-
return
|
|
1031
|
+
return L({
|
|
1035
1032
|
source: {
|
|
1036
1033
|
responses: e.responses.listStore,
|
|
1037
1034
|
fields: e.fields.listStore
|
|
1038
1035
|
},
|
|
1039
1036
|
target: a
|
|
1040
|
-
}),
|
|
1037
|
+
}), L({
|
|
1041
1038
|
clock: a.doneData,
|
|
1042
1039
|
filter: (e) => e !== void 0,
|
|
1043
1040
|
target: r
|
|
@@ -1050,10 +1047,10 @@ var ut = M("action"), dt = L(({ client: e }) => {
|
|
|
1050
1047
|
getEvokableAction: s
|
|
1051
1048
|
};
|
|
1052
1049
|
});
|
|
1053
|
-
function
|
|
1054
|
-
return
|
|
1050
|
+
function ct(e) {
|
|
1051
|
+
return z(st, e);
|
|
1055
1052
|
}
|
|
1056
|
-
var
|
|
1053
|
+
var lt = (e, t, n) => {
|
|
1057
1054
|
n.register({
|
|
1058
1055
|
key: e,
|
|
1059
1056
|
action: t
|
|
@@ -1061,7 +1058,7 @@ var pt = (e, t, n) => {
|
|
|
1061
1058
|
};
|
|
1062
1059
|
//#endregion
|
|
1063
1060
|
//#region src/entities/response/response-validation.ts
|
|
1064
|
-
function
|
|
1061
|
+
function Y(e, t, n, r) {
|
|
1065
1062
|
return {
|
|
1066
1063
|
fieldKey: e.key,
|
|
1067
1064
|
userMessage: n,
|
|
@@ -1069,62 +1066,62 @@ function J(e, t, n, r) {
|
|
|
1069
1066
|
value: t
|
|
1070
1067
|
};
|
|
1071
1068
|
}
|
|
1072
|
-
function
|
|
1069
|
+
function X(e) {
|
|
1073
1070
|
return e === null || e === "" || Array.isArray(e) && !e.length;
|
|
1074
1071
|
}
|
|
1075
|
-
function
|
|
1072
|
+
function ut(e) {
|
|
1076
1073
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
1077
1074
|
}
|
|
1078
|
-
function
|
|
1075
|
+
function dt(e) {
|
|
1079
1076
|
try {
|
|
1080
1077
|
return JSON.stringify(e), !0;
|
|
1081
1078
|
} catch {
|
|
1082
1079
|
return !1;
|
|
1083
1080
|
}
|
|
1084
1081
|
}
|
|
1085
|
-
function
|
|
1082
|
+
function ft(e, t) {
|
|
1086
1083
|
return t.find((t) => t.key === e) ?? null;
|
|
1087
1084
|
}
|
|
1088
|
-
function
|
|
1085
|
+
function pt(e, t) {
|
|
1089
1086
|
return e.multiple && (typeof t == "string" || typeof t == "number" || typeof t == "boolean") ? [t] : t;
|
|
1090
1087
|
}
|
|
1091
|
-
function
|
|
1092
|
-
if (e.type !== "object" ||
|
|
1088
|
+
function mt(e, t) {
|
|
1089
|
+
if (e.type !== "object" || X(t)) return null;
|
|
1093
1090
|
if (e.multiple) {
|
|
1094
|
-
if (!Array.isArray(t)) return
|
|
1091
|
+
if (!Array.isArray(t)) return Y(e, t, "This field expects multiple values", "Field expects an array of objects.");
|
|
1095
1092
|
for (let n of t) {
|
|
1096
|
-
if (typeof n != "object" || !n) return
|
|
1097
|
-
if (!
|
|
1093
|
+
if (typeof n != "object" || !n) return Y(e, t, "This field expects object values", "Field expects an array of objects, but received non-object value.");
|
|
1094
|
+
if (!dt(n)) return Y(e, t, "This field contains non-serializable data", "Field value contains non-JSON-serializable data (functions, circular references, etc.).");
|
|
1098
1095
|
}
|
|
1099
1096
|
return null;
|
|
1100
1097
|
}
|
|
1101
|
-
return Array.isArray(t) ?
|
|
1098
|
+
return Array.isArray(t) ? Y(e, t, "This field expects a single value", "Field expects a single object, not an array.") : typeof t != "object" || !t ? Y(e, t, "This field expects an object value", "Field expects an object value.") : dt(t) ? null : Y(e, t, "This field contains non-serializable data", "Field value contains non-JSON-serializable data (functions, circular references, etc.).");
|
|
1102
1099
|
}
|
|
1103
|
-
function
|
|
1104
|
-
if (
|
|
1100
|
+
function ht(e, t) {
|
|
1101
|
+
if (X(t) || !Array.isArray(e.options) || e.options.length === 0) return null;
|
|
1105
1102
|
let n = Array.isArray(t) ? t : [t];
|
|
1106
1103
|
if (e.type === "object") {
|
|
1107
1104
|
let r = new Set(e.options.map((e) => JSON.stringify(e.value)));
|
|
1108
|
-
return n.every((e) => r.has(JSON.stringify(e))) ? null :
|
|
1105
|
+
return n.every((e) => r.has(JSON.stringify(e))) ? null : Y(e, t, "This field expects a valid option", "Field expects a valid option from the defined choices.");
|
|
1109
1106
|
}
|
|
1110
1107
|
let r = e.options.map((e) => e.value);
|
|
1111
|
-
return n.every((e) => !
|
|
1108
|
+
return n.every((e) => !ut(e) || e === null ? !1 : r.includes(e)) ? null : Y(e, t, "This field expects a valid option", `Field expects a valid option. Valid options are: ${r.join(", ")}`);
|
|
1112
1109
|
}
|
|
1113
|
-
async function
|
|
1114
|
-
if (n.validation && !e(n.validation) && !
|
|
1110
|
+
async function gt(t, n, r, i) {
|
|
1111
|
+
if (n.validation && !e(n.validation) && !X(r)) {
|
|
1115
1112
|
let e = i ? {
|
|
1116
1113
|
$input: r,
|
|
1117
1114
|
responses: i
|
|
1118
1115
|
} : { $input: r }, a = await t(n.validation, e);
|
|
1119
|
-
if (typeof a == "string") return
|
|
1120
|
-
if (a === !1) return
|
|
1116
|
+
if (typeof a == "string") return Y(n, r, a, `Field validation resulted in an error: ${a}.`);
|
|
1117
|
+
if (a === !1) return Y(n, r, "This field is invalid", "Field validation resulted in an unspecified error.");
|
|
1121
1118
|
}
|
|
1122
|
-
return n.required &&
|
|
1119
|
+
return n.required && X(r) ? Y(n, r, "This field is required", "Field is required.") : !n.multiple && Array.isArray(r) && r.length > 1 ? Y(n, r, "This field expects a single response", "Field expects a single response.") : null;
|
|
1123
1120
|
}
|
|
1124
1121
|
//#endregion
|
|
1125
1122
|
//#region src/entities/response/response.ts
|
|
1126
|
-
var
|
|
1127
|
-
let t =
|
|
1123
|
+
var _t = N("response"), vt = R(({ client: e }) => {
|
|
1124
|
+
let t = _t.store({}), r = F(), i = F(), a = M(t, {
|
|
1128
1125
|
register(e, t) {
|
|
1129
1126
|
return {
|
|
1130
1127
|
...e,
|
|
@@ -1153,7 +1150,7 @@ var xt = M("response"), St = L(({ client: e }) => {
|
|
|
1153
1150
|
});
|
|
1154
1151
|
} else a.registerBatch(e);
|
|
1155
1152
|
}
|
|
1156
|
-
let s = (t, r) => n(e, t, r), c =
|
|
1153
|
+
let s = (t, r) => n(e, t, r), c = A({
|
|
1157
1154
|
source: {
|
|
1158
1155
|
allFields: e.fields.listStore,
|
|
1159
1156
|
existingResponses: t
|
|
@@ -1163,7 +1160,7 @@ var xt = M("response"), St = L(({ client: e }) => {
|
|
|
1163
1160
|
...t,
|
|
1164
1161
|
...n
|
|
1165
1162
|
}, o = Object.entries(n), c = await Promise.allSettled(o.map(async ([t, n]) => {
|
|
1166
|
-
let o =
|
|
1163
|
+
let o = ft(t, e);
|
|
1167
1164
|
if (!o) {
|
|
1168
1165
|
r.push({
|
|
1169
1166
|
fieldKey: t,
|
|
@@ -1173,17 +1170,17 @@ var xt = M("response"), St = L(({ client: e }) => {
|
|
|
1173
1170
|
});
|
|
1174
1171
|
return;
|
|
1175
1172
|
}
|
|
1176
|
-
let c =
|
|
1173
|
+
let c = pt(o, n), l = await gt(s, o, c, a);
|
|
1177
1174
|
if (l) {
|
|
1178
1175
|
r.push(l);
|
|
1179
1176
|
return;
|
|
1180
1177
|
}
|
|
1181
|
-
let u =
|
|
1178
|
+
let u = mt(o, c);
|
|
1182
1179
|
if (u) {
|
|
1183
1180
|
r.push(u);
|
|
1184
1181
|
return;
|
|
1185
1182
|
}
|
|
1186
|
-
let d =
|
|
1183
|
+
let d = ht(o, c);
|
|
1187
1184
|
if (d) {
|
|
1188
1185
|
r.push(d);
|
|
1189
1186
|
return;
|
|
@@ -1211,7 +1208,7 @@ var xt = M("response"), St = L(({ client: e }) => {
|
|
|
1211
1208
|
async function l(e) {
|
|
1212
1209
|
return c(e);
|
|
1213
1210
|
}
|
|
1214
|
-
let u =
|
|
1211
|
+
let u = A({
|
|
1215
1212
|
source: t,
|
|
1216
1213
|
effect: async (e, t) => {
|
|
1217
1214
|
let { responsesToCommit: n, validationErrors: r } = await c(t);
|
|
@@ -1226,7 +1223,7 @@ var xt = M("response"), St = L(({ client: e }) => {
|
|
|
1226
1223
|
value: t
|
|
1227
1224
|
})));
|
|
1228
1225
|
function m(e) {
|
|
1229
|
-
return
|
|
1226
|
+
return j({
|
|
1230
1227
|
f: e,
|
|
1231
1228
|
s: t
|
|
1232
1229
|
}, ({ f: e, s: t }) => {
|
|
@@ -1243,10 +1240,10 @@ var xt = M("response"), St = L(({ client: e }) => {
|
|
|
1243
1240
|
function _(t) {
|
|
1244
1241
|
return m(e.fields.getByName(t));
|
|
1245
1242
|
}
|
|
1246
|
-
return
|
|
1243
|
+
return L({
|
|
1247
1244
|
clock: r,
|
|
1248
1245
|
target: a.clearAll
|
|
1249
|
-
}),
|
|
1246
|
+
}), L({
|
|
1250
1247
|
clock: i,
|
|
1251
1248
|
target: a.clear
|
|
1252
1249
|
}), {
|
|
@@ -1262,13 +1259,13 @@ var xt = M("response"), St = L(({ client: e }) => {
|
|
|
1262
1259
|
getByFieldName: _
|
|
1263
1260
|
};
|
|
1264
1261
|
});
|
|
1265
|
-
function
|
|
1266
|
-
return
|
|
1262
|
+
function yt(e) {
|
|
1263
|
+
return z(vt, e);
|
|
1267
1264
|
}
|
|
1268
1265
|
//#endregion
|
|
1269
1266
|
//#region src/entities/condition/condition.ts
|
|
1270
|
-
var
|
|
1271
|
-
let e =
|
|
1267
|
+
var bt = N("condition"), xt = R(() => {
|
|
1268
|
+
let e = bt.store({}), t = M(e, { register(e, t) {
|
|
1272
1269
|
return {
|
|
1273
1270
|
...e,
|
|
1274
1271
|
[t.condition.id]: t.condition
|
|
@@ -1292,12 +1289,12 @@ var wt = M("condition"), Tt = L(() => {
|
|
|
1292
1289
|
indexStore: e
|
|
1293
1290
|
};
|
|
1294
1291
|
});
|
|
1295
|
-
function
|
|
1296
|
-
return
|
|
1292
|
+
function St() {
|
|
1293
|
+
return z(xt);
|
|
1297
1294
|
}
|
|
1298
1295
|
//#endregion
|
|
1299
1296
|
//#region src/utils/api-url.ts
|
|
1300
|
-
function
|
|
1297
|
+
function Ct() {
|
|
1301
1298
|
if (c()) {
|
|
1302
1299
|
let e = [
|
|
1303
1300
|
document.currentScript,
|
|
@@ -1312,7 +1309,7 @@ function Dt() {
|
|
|
1312
1309
|
}
|
|
1313
1310
|
//#endregion
|
|
1314
1311
|
//#region src/utils/search-params.ts
|
|
1315
|
-
function
|
|
1312
|
+
function wt() {
|
|
1316
1313
|
if (!s()) return {};
|
|
1317
1314
|
let e = new URLSearchParams(window.location.search), t = {}, n = /* @__PURE__ */ new Set();
|
|
1318
1315
|
for (let [t] of e.entries()) t.startsWith("picked-") && n.add(t);
|
|
@@ -1320,35 +1317,35 @@ function Ot() {
|
|
|
1320
1317
|
let n = r.replace("picked-", "");
|
|
1321
1318
|
t[n] = e.getAll(r);
|
|
1322
1319
|
}
|
|
1323
|
-
let r =
|
|
1324
|
-
if (n.size > 0)
|
|
1320
|
+
let r = k("s");
|
|
1321
|
+
if (n.size > 0) O.set(r, t);
|
|
1325
1322
|
else {
|
|
1326
|
-
let e =
|
|
1323
|
+
let e = O.get(r);
|
|
1327
1324
|
if (e) return e.json() || {};
|
|
1328
1325
|
}
|
|
1329
1326
|
return t;
|
|
1330
1327
|
}
|
|
1331
1328
|
//#endregion
|
|
1332
1329
|
//#region src/utils/user-timing.ts
|
|
1333
|
-
var
|
|
1334
|
-
function
|
|
1330
|
+
var Tt = "picked:start:begin", Et = "picked:start";
|
|
1331
|
+
function Dt() {
|
|
1335
1332
|
try {
|
|
1336
1333
|
return s() && !!p.window && "performance" in p;
|
|
1337
1334
|
} catch {
|
|
1338
1335
|
return !1;
|
|
1339
1336
|
}
|
|
1340
1337
|
}
|
|
1341
|
-
function
|
|
1338
|
+
function Ot() {
|
|
1342
1339
|
let e = null, t = null;
|
|
1343
1340
|
return {
|
|
1344
1341
|
markBegin: () => {
|
|
1345
|
-
if (
|
|
1346
|
-
e = performance.mark(
|
|
1342
|
+
if (Dt()) try {
|
|
1343
|
+
e = performance.mark(Tt).startTime;
|
|
1347
1344
|
} catch {}
|
|
1348
1345
|
},
|
|
1349
1346
|
measure: () => {
|
|
1350
|
-
if (!(!
|
|
1351
|
-
t = performance.measure(
|
|
1347
|
+
if (!(!Dt() || e === null)) try {
|
|
1348
|
+
t = performance.measure(Et, { start: e });
|
|
1352
1349
|
} catch {}
|
|
1353
1350
|
},
|
|
1354
1351
|
get startMeasure() {
|
|
@@ -1357,14 +1354,27 @@ function Mt() {
|
|
|
1357
1354
|
};
|
|
1358
1355
|
}
|
|
1359
1356
|
//#endregion
|
|
1357
|
+
//#region src/utils/client-telemetry.ts
|
|
1358
|
+
function kt() {
|
|
1359
|
+
let e = null;
|
|
1360
|
+
return {
|
|
1361
|
+
observeDeliveryAPIRequests: (t) => {
|
|
1362
|
+
e = t;
|
|
1363
|
+
},
|
|
1364
|
+
get deliveryAPIRequestObserver() {
|
|
1365
|
+
return e;
|
|
1366
|
+
}
|
|
1367
|
+
};
|
|
1368
|
+
}
|
|
1369
|
+
//#endregion
|
|
1360
1370
|
//#region src/entities/session/session.ts
|
|
1361
|
-
var
|
|
1362
|
-
function
|
|
1371
|
+
var At = k("session", "global");
|
|
1372
|
+
function jt() {
|
|
1363
1373
|
return m() ? 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)}`;
|
|
1364
1374
|
}
|
|
1365
|
-
function
|
|
1375
|
+
function Mt() {
|
|
1366
1376
|
if (!h()) return null;
|
|
1367
|
-
let e =
|
|
1377
|
+
let e = D.get(At);
|
|
1368
1378
|
if (!e.isSet()) return null;
|
|
1369
1379
|
try {
|
|
1370
1380
|
return e.json();
|
|
@@ -1372,10 +1382,10 @@ function Ft() {
|
|
|
1372
1382
|
return null;
|
|
1373
1383
|
}
|
|
1374
1384
|
}
|
|
1375
|
-
var
|
|
1376
|
-
let e =
|
|
1385
|
+
var Nt = R(() => {
|
|
1386
|
+
let e = Mt(), t = { id: e?.id ?? jt() };
|
|
1377
1387
|
e?.isUser !== void 0 && (t.isUser = e.isUser), e?.identifiers && Object.keys(e.identifiers).length > 0 && (t.identifiers = e.identifiers);
|
|
1378
|
-
let n =
|
|
1388
|
+
let n = I(t), r = M(n, {
|
|
1379
1389
|
setIsUser: (e, t) => ({
|
|
1380
1390
|
...e,
|
|
1381
1391
|
isUser: t
|
|
@@ -1395,15 +1405,15 @@ var It = L(() => {
|
|
|
1395
1405
|
let i = { id: e.id };
|
|
1396
1406
|
return e.isUser !== void 0 && (i.isUser = e.isUser), Object.keys(r).length > 0 && (i.identifiers = r), i;
|
|
1397
1407
|
}
|
|
1398
|
-
}), i =
|
|
1408
|
+
}), i = A({
|
|
1399
1409
|
source: n,
|
|
1400
1410
|
effect: (e) => {
|
|
1401
1411
|
if (h()) try {
|
|
1402
|
-
|
|
1412
|
+
D.get(At).set(e);
|
|
1403
1413
|
} catch {}
|
|
1404
1414
|
}
|
|
1405
1415
|
});
|
|
1406
|
-
return
|
|
1416
|
+
return L({
|
|
1407
1417
|
source: n,
|
|
1408
1418
|
target: i
|
|
1409
1419
|
}), {
|
|
@@ -1413,39 +1423,39 @@ var It = L(() => {
|
|
|
1413
1423
|
removeIdentifier: r.removeIdentifier
|
|
1414
1424
|
};
|
|
1415
1425
|
});
|
|
1416
|
-
function
|
|
1417
|
-
return
|
|
1426
|
+
function Pt() {
|
|
1427
|
+
return z(Nt, void 0);
|
|
1418
1428
|
}
|
|
1419
1429
|
//#endregion
|
|
1420
1430
|
//#region src/utils/picked-config.ts
|
|
1421
|
-
function
|
|
1431
|
+
function Ft() {
|
|
1422
1432
|
if (s()) return globalThis.window.pickedConfig;
|
|
1423
1433
|
}
|
|
1424
|
-
function
|
|
1425
|
-
if (s()) return
|
|
1434
|
+
function It() {
|
|
1435
|
+
if (s()) return Ft()?.projectId;
|
|
1426
1436
|
}
|
|
1427
|
-
function
|
|
1437
|
+
function Lt() {
|
|
1428
1438
|
if (!c()) return;
|
|
1429
1439
|
let e = document.getElementById("picked_script") || document.querySelector("script#picked") || document.getElementById("cvly");
|
|
1430
1440
|
if (e) return e.dataset.projectid || e.getAttribute("project-id") || void 0;
|
|
1431
1441
|
}
|
|
1432
|
-
function
|
|
1442
|
+
function Rt(e) {
|
|
1433
1443
|
if (e.projectId) return e.projectId;
|
|
1434
|
-
let t =
|
|
1444
|
+
let t = It();
|
|
1435
1445
|
if (t) return t;
|
|
1436
|
-
let n =
|
|
1446
|
+
let n = Lt();
|
|
1437
1447
|
if (n) return n;
|
|
1438
1448
|
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.");
|
|
1439
1449
|
}
|
|
1440
1450
|
//#endregion
|
|
1441
1451
|
//#region src/utils/render-string.ts
|
|
1442
|
-
function
|
|
1452
|
+
function Z(e) {
|
|
1443
1453
|
return e == null || e === "" || Number.isNaN(e);
|
|
1444
1454
|
}
|
|
1445
|
-
var
|
|
1446
|
-
default: (e, t) =>
|
|
1447
|
-
append: (e, t) => t && !
|
|
1448
|
-
prepend: (e, t) => t && !
|
|
1455
|
+
var zt = {
|
|
1456
|
+
default: (e, t) => Z(e) ? String(t ?? "") : String(e),
|
|
1457
|
+
append: (e, t) => t && !Z(e) ? `${e} ${t}` : e,
|
|
1458
|
+
prepend: (e, t) => t && !Z(e) ? `${t} ${e}` : e,
|
|
1449
1459
|
upper: (e) => typeof e == "string" ? e.toUpperCase() : e,
|
|
1450
1460
|
lower: (e) => typeof e == "string" ? e.toLowerCase() : e,
|
|
1451
1461
|
capitalize: (e) => typeof e == "string" ? e.charAt(0).toUpperCase() + e.slice(1) : e,
|
|
@@ -1463,24 +1473,24 @@ var Ht = {
|
|
|
1463
1473
|
return e instanceof Set ? t.format(Array.from(e).map(String)) : e;
|
|
1464
1474
|
}
|
|
1465
1475
|
};
|
|
1466
|
-
function
|
|
1476
|
+
function Bt(e) {
|
|
1467
1477
|
return typeof e == "object" && !!e;
|
|
1468
1478
|
}
|
|
1469
|
-
function
|
|
1479
|
+
function Vt(e, t) {
|
|
1470
1480
|
let n = t;
|
|
1471
|
-
for (let t of e.split(".")) if (
|
|
1481
|
+
for (let t of e.split(".")) if (Bt(n) && t in n) n = n[t];
|
|
1472
1482
|
else return;
|
|
1473
1483
|
return typeof n == "function" ? n() : n;
|
|
1474
1484
|
}
|
|
1475
|
-
function
|
|
1476
|
-
let n = e.split("|").map((e) => e.trim()), r =
|
|
1485
|
+
function Ht(e, t) {
|
|
1486
|
+
let n = e.split("|").map((e) => e.trim()), r = Vt(n.shift() ?? "", t);
|
|
1477
1487
|
for (let e of n) {
|
|
1478
|
-
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o =
|
|
1488
|
+
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o = zt[i];
|
|
1479
1489
|
o && (r = o(r, a));
|
|
1480
1490
|
}
|
|
1481
|
-
return
|
|
1491
|
+
return Z(r) ? "" : typeof r == "object" ? JSON.stringify(r) : String(r);
|
|
1482
1492
|
}
|
|
1483
|
-
function
|
|
1493
|
+
function Ut(e, t) {
|
|
1484
1494
|
let n = "", r = 0;
|
|
1485
1495
|
for (; r < e.length;) if (e[r] === "{" && e[r + 1] === "{") {
|
|
1486
1496
|
r += 2;
|
|
@@ -1492,19 +1502,19 @@ function Kt(e, t) {
|
|
|
1492
1502
|
}
|
|
1493
1503
|
i += e[r++];
|
|
1494
1504
|
}
|
|
1495
|
-
n +=
|
|
1505
|
+
n += Ht(i.trim(), t);
|
|
1496
1506
|
} else n += e[r++];
|
|
1497
1507
|
return n;
|
|
1498
1508
|
}
|
|
1499
1509
|
//#endregion
|
|
1500
1510
|
//#region src/utils/preview-session.ts
|
|
1501
|
-
var
|
|
1502
|
-
function
|
|
1503
|
-
return !s() || !g() ? !1 : !!
|
|
1511
|
+
var Wt = "preview-token";
|
|
1512
|
+
function Gt() {
|
|
1513
|
+
return !s() || !g() ? !1 : !!wt()[Wt]?.[0];
|
|
1504
1514
|
}
|
|
1505
1515
|
//#endregion
|
|
1506
1516
|
//#region src/picked.ts
|
|
1507
|
-
var
|
|
1517
|
+
var Kt = class {
|
|
1508
1518
|
static logger = r;
|
|
1509
1519
|
options;
|
|
1510
1520
|
dataSource = null;
|
|
@@ -1513,66 +1523,63 @@ var Yt = class {
|
|
|
1513
1523
|
contentLoader;
|
|
1514
1524
|
previewEmbedderOrigins = null;
|
|
1515
1525
|
plugins = {};
|
|
1516
|
-
|
|
1517
|
-
setDeliveryRequestObserver = (e) => {
|
|
1518
|
-
this.deliveryObserver = e;
|
|
1519
|
-
};
|
|
1526
|
+
telemetry = kt();
|
|
1520
1527
|
dataProviders = /* @__PURE__ */ new Map();
|
|
1521
|
-
eventBus =
|
|
1528
|
+
eventBus = F();
|
|
1522
1529
|
events;
|
|
1523
1530
|
projectId;
|
|
1524
1531
|
apiUrl;
|
|
1525
1532
|
dashboardUrl;
|
|
1526
1533
|
documentationSiteUrl;
|
|
1527
|
-
session =
|
|
1528
|
-
performance =
|
|
1529
|
-
searchParams =
|
|
1530
|
-
history =
|
|
1531
|
-
components =
|
|
1534
|
+
session = Pt();
|
|
1535
|
+
performance = Ot();
|
|
1536
|
+
searchParams = wt();
|
|
1537
|
+
history = Ge();
|
|
1538
|
+
components = xe({ client: this });
|
|
1532
1539
|
experienceInstances = C({ client: this });
|
|
1533
|
-
experiences =
|
|
1534
|
-
frameworks =
|
|
1535
|
-
predicates =
|
|
1536
|
-
features =
|
|
1537
|
-
conditions =
|
|
1538
|
-
fields =
|
|
1539
|
-
responses =
|
|
1540
|
-
steps =
|
|
1541
|
-
contents =
|
|
1542
|
-
actions =
|
|
1540
|
+
experiences = pe({ client: this });
|
|
1541
|
+
frameworks = Te({ client: this });
|
|
1542
|
+
predicates = Ve({ client: this });
|
|
1543
|
+
features = ne({ client: this });
|
|
1544
|
+
conditions = St();
|
|
1545
|
+
fields = Ze();
|
|
1546
|
+
responses = yt({ client: this });
|
|
1547
|
+
steps = et();
|
|
1548
|
+
contents = it();
|
|
1549
|
+
actions = ct({ client: this });
|
|
1543
1550
|
conditionResults = w();
|
|
1544
|
-
stateSnapshotStore =
|
|
1545
|
-
evaluateRuleLogicFx =
|
|
1551
|
+
stateSnapshotStore = Oe({ client: this });
|
|
1552
|
+
evaluateRuleLogicFx = Ie({ client: this });
|
|
1546
1553
|
start;
|
|
1547
1554
|
readyStore;
|
|
1548
1555
|
preconditionPassedStore;
|
|
1549
1556
|
conditionPassedStore;
|
|
1550
1557
|
lifecycleStageStore;
|
|
1551
|
-
lifecycle =
|
|
1552
|
-
renderStringFx =
|
|
1558
|
+
lifecycle = Re({ client: this });
|
|
1559
|
+
renderStringFx = A({
|
|
1553
1560
|
source: this.responses.listStore,
|
|
1554
1561
|
effect: (e, { template: t, context: n }) => {
|
|
1555
1562
|
let r = {};
|
|
1556
1563
|
for (let t of e) r[t.fieldKey] = t.value;
|
|
1557
|
-
return
|
|
1564
|
+
return Ut(t, {
|
|
1558
1565
|
...n,
|
|
1559
1566
|
responses: r
|
|
1560
1567
|
});
|
|
1561
1568
|
}
|
|
1562
1569
|
});
|
|
1563
1570
|
constructor(e) {
|
|
1564
|
-
this.events =
|
|
1571
|
+
this.events = qe(this.eventBus), this.projectId = Rt(e), this.options = Object.freeze(e), this.apiUrl = e.apiUrl || Ct(), 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.setupFields(), this.setupComponents(), this.lifecycle.setPrecondition(e.precondition), this.lifecycle.setCondition(e.condition), this.eventBus({
|
|
1565
1572
|
type: "load",
|
|
1566
|
-
version:
|
|
1573
|
+
version: ie()
|
|
1567
1574
|
}), this.maybeStartPreviewChannel();
|
|
1568
1575
|
}
|
|
1569
1576
|
dataProviderFor(e) {
|
|
1570
1577
|
let t = e ?? "", n = this.dataProviders.get(t);
|
|
1571
1578
|
if (n) return n;
|
|
1572
|
-
let r = import("../provider-
|
|
1579
|
+
let r = import("../provider-ovM-CBX_.js").then((t) => t.createPickedDataProvider({
|
|
1573
1580
|
apiUrl: this.apiUrl,
|
|
1574
1581
|
projectId: this.projectId,
|
|
1575
|
-
getRequestObserver: () => this.
|
|
1582
|
+
getRequestObserver: () => this.telemetry.deliveryAPIRequestObserver,
|
|
1576
1583
|
...e !== void 0 && { previewToken: e }
|
|
1577
1584
|
}));
|
|
1578
1585
|
return this.dataProviders.set(t, r), r;
|
|
@@ -1586,24 +1593,24 @@ var Yt = class {
|
|
|
1586
1593
|
return (await this.dataProviderFor(t?.previewToken)).getContent(e, t?.signal === void 0 ? void 0 : { signal: t.signal });
|
|
1587
1594
|
}
|
|
1588
1595
|
maybeStartPreviewChannel() {
|
|
1589
|
-
|
|
1596
|
+
Gt() && import("../preview-channel-CSr96XAo.js").then((e) => e.initPreviewChannel(this)).catch(() => void 0);
|
|
1590
1597
|
}
|
|
1591
1598
|
registerFramework = (e) => {
|
|
1592
|
-
|
|
1599
|
+
Ee(e, this.frameworks);
|
|
1593
1600
|
};
|
|
1594
1601
|
registerComponent = (e, t) => {
|
|
1595
|
-
|
|
1602
|
+
Se(e, t, this.components);
|
|
1596
1603
|
};
|
|
1597
1604
|
registerPlugin = (e) => {
|
|
1598
|
-
|
|
1605
|
+
ge(this, e, this.plugins);
|
|
1599
1606
|
let t = this.plugins[e.name];
|
|
1600
1607
|
t?.onStart && this.lifecycle.registerPluginStartHook(t.onStart);
|
|
1601
1608
|
};
|
|
1602
1609
|
registerFeature = (e, t) => {
|
|
1603
|
-
|
|
1610
|
+
te(e, t, this.features);
|
|
1604
1611
|
};
|
|
1605
1612
|
registerPredicate = (e, t) => {
|
|
1606
|
-
|
|
1613
|
+
He(e, t, this.predicates);
|
|
1607
1614
|
};
|
|
1608
1615
|
registerCondition = (e) => {
|
|
1609
1616
|
this.conditions.register(e);
|
|
@@ -1612,19 +1619,19 @@ var Yt = class {
|
|
|
1612
1619
|
this.fields.register(e);
|
|
1613
1620
|
};
|
|
1614
1621
|
registerStep = (e) => {
|
|
1615
|
-
|
|
1622
|
+
tt(e, this.steps);
|
|
1616
1623
|
};
|
|
1617
1624
|
registerContent = (e) => {
|
|
1618
|
-
|
|
1625
|
+
at(e, this.contents);
|
|
1619
1626
|
};
|
|
1620
1627
|
patchContent = (e, t) => {
|
|
1621
1628
|
this.contents.patch(e, t);
|
|
1622
1629
|
};
|
|
1623
1630
|
registerAction = (e, t) => {
|
|
1624
|
-
|
|
1631
|
+
lt(e, t, this.actions);
|
|
1625
1632
|
};
|
|
1626
1633
|
registerExperience = (e) => {
|
|
1627
|
-
e.component &&
|
|
1634
|
+
e.component && Se(`experience:${e.id}`, e.component, this.components), this.experiences.register(e);
|
|
1628
1635
|
};
|
|
1629
1636
|
launchExperienceById = async (e, t) => {
|
|
1630
1637
|
this.experiences.launch({
|
|
@@ -1667,12 +1674,13 @@ var Yt = class {
|
|
|
1667
1674
|
this.registerFeature(e, n);
|
|
1668
1675
|
}), this.searchParams.feature && this.searchParams.feature.forEach((e) => {
|
|
1669
1676
|
try {
|
|
1670
|
-
let t =
|
|
1677
|
+
let t = re(e);
|
|
1671
1678
|
if (!t) return;
|
|
1672
1679
|
let { id: n, bucket: r } = t;
|
|
1673
1680
|
this.registerFeature(n, {
|
|
1674
1681
|
key: `${r}`,
|
|
1675
1682
|
name: n,
|
|
1683
|
+
enabled: !0,
|
|
1676
1684
|
decide: () => r,
|
|
1677
1685
|
storage: "session"
|
|
1678
1686
|
});
|
|
@@ -1699,6 +1707,16 @@ var Yt = class {
|
|
|
1699
1707
|
this.registerAction(e, t);
|
|
1700
1708
|
});
|
|
1701
1709
|
}
|
|
1710
|
+
setupFields() {
|
|
1711
|
+
let e = this.options.fields;
|
|
1712
|
+
e && Object.entries(e).forEach(([e, t]) => {
|
|
1713
|
+
let n = typeof t == "function" ? t() : t;
|
|
1714
|
+
this.registerField({
|
|
1715
|
+
...n,
|
|
1716
|
+
key: n.key ?? e
|
|
1717
|
+
});
|
|
1718
|
+
});
|
|
1719
|
+
}
|
|
1702
1720
|
setupComponents() {
|
|
1703
1721
|
let e = this.options.components;
|
|
1704
1722
|
e && Object.entries(e).forEach(([e, t]) => {
|
|
@@ -1706,8 +1724,8 @@ var Yt = class {
|
|
|
1706
1724
|
});
|
|
1707
1725
|
}
|
|
1708
1726
|
getPluginConfig = (e) => this.plugins[e] ?? {};
|
|
1709
|
-
},
|
|
1710
|
-
async function
|
|
1727
|
+
}, qt = "application/picked-javascript", Jt = "application/picked-module", Yt = "data-picked-hydrated";
|
|
1728
|
+
async function Xt(e) {
|
|
1711
1729
|
if (!("document" in globalThis)) return;
|
|
1712
1730
|
let t = "application/picked-module", n = "data-picked-hydrated";
|
|
1713
1731
|
function r(e) {
|
|
@@ -1736,42 +1754,42 @@ async function $t(e) {
|
|
|
1736
1754
|
a && await a;
|
|
1737
1755
|
}
|
|
1738
1756
|
}
|
|
1739
|
-
function
|
|
1740
|
-
return `<script>(${
|
|
1757
|
+
function Zt() {
|
|
1758
|
+
return `<script>(${Xt.toString()})(document)<\/script>`;
|
|
1741
1759
|
}
|
|
1742
1760
|
//#endregion
|
|
1743
1761
|
//#region src/utils/html-asset-value.ts
|
|
1744
|
-
function
|
|
1762
|
+
function Qt(e) {
|
|
1745
1763
|
return typeof e == "object" && !!e && "id" in e && typeof e.id == "string" && "content" in e && (typeof e.content == "string" || e.content === null);
|
|
1746
1764
|
}
|
|
1747
1765
|
//#endregion
|
|
1748
1766
|
//#region src/entities/component/lazyComponent.ts
|
|
1749
|
-
function
|
|
1767
|
+
function $t(e) {
|
|
1750
1768
|
return {
|
|
1751
1769
|
$$type: "lazy-component",
|
|
1752
1770
|
load: e
|
|
1753
1771
|
};
|
|
1754
1772
|
}
|
|
1755
|
-
function
|
|
1773
|
+
function en(e) {
|
|
1756
1774
|
return typeof e == "object" && !!e && "$$type" in e && e.$$type === "lazy-component";
|
|
1757
1775
|
}
|
|
1758
1776
|
//#endregion
|
|
1759
1777
|
//#region src/entities/content/reference.ts
|
|
1760
|
-
function Z(e) {
|
|
1761
|
-
return typeof e == "object" && !!e && !Array.isArray(e) && "contentEntryId" in e && typeof e.contentEntryId == "string";
|
|
1762
|
-
}
|
|
1763
1778
|
function Q(e) {
|
|
1764
|
-
return
|
|
1779
|
+
return typeof e == "object" && !!e && !Array.isArray(e) && "contentEntryId" in e && typeof e.contentEntryId == "string";
|
|
1765
1780
|
}
|
|
1766
1781
|
function $(e) {
|
|
1782
|
+
return Q(e) ? e.contentEntryId : null;
|
|
1783
|
+
}
|
|
1784
|
+
function tn(e) {
|
|
1767
1785
|
let t = Array.isArray(e) ? e : [e], n = [];
|
|
1768
|
-
for (let e of t)
|
|
1786
|
+
for (let e of t) Q(e) && n.push(e.contentEntryId);
|
|
1769
1787
|
return n;
|
|
1770
1788
|
}
|
|
1771
|
-
function
|
|
1789
|
+
function nn(e, t) {
|
|
1772
1790
|
return t === null ? null : e[t] ?? null;
|
|
1773
1791
|
}
|
|
1774
|
-
function
|
|
1792
|
+
function rn(e, t) {
|
|
1775
1793
|
let n = [];
|
|
1776
1794
|
for (let r of t) {
|
|
1777
1795
|
let t = e[r];
|
|
@@ -1779,29 +1797,29 @@ function on(e, t) {
|
|
|
1779
1797
|
}
|
|
1780
1798
|
return n;
|
|
1781
1799
|
}
|
|
1782
|
-
function
|
|
1783
|
-
if (
|
|
1784
|
-
let n = Q(t);
|
|
1785
|
-
return e.indexStore.map((e) => an(e, n), { skipVoid: !1 });
|
|
1786
|
-
}
|
|
1787
|
-
function cn(e, t) {
|
|
1788
|
-
if (ue.store(t)) return A(t, e.indexStore, (e, t) => on(t, $(e)));
|
|
1800
|
+
function an(e, t) {
|
|
1801
|
+
if (le.store(t)) return j(t, e.indexStore, (e, t) => nn(t, $(e)));
|
|
1789
1802
|
let n = $(t);
|
|
1790
|
-
return e.indexStore.map((e) =>
|
|
1803
|
+
return e.indexStore.map((e) => nn(e, n), { skipVoid: !1 });
|
|
1804
|
+
}
|
|
1805
|
+
function on(e, t) {
|
|
1806
|
+
if (le.store(t)) return j(t, e.indexStore, (e, t) => rn(t, tn(e)));
|
|
1807
|
+
let n = tn(t);
|
|
1808
|
+
return e.indexStore.map((e) => rn(e, n), { skipVoid: !1 });
|
|
1791
1809
|
}
|
|
1792
1810
|
//#endregion
|
|
1793
1811
|
//#region src/exports.ts
|
|
1794
|
-
var
|
|
1795
|
-
let t = new
|
|
1812
|
+
var sn = (e) => {
|
|
1813
|
+
let t = new Kt(e);
|
|
1796
1814
|
return u(t), t;
|
|
1797
1815
|
};
|
|
1798
1816
|
//#endregion
|
|
1799
1817
|
//#region src/typed-content.ts
|
|
1800
|
-
function
|
|
1818
|
+
function cn(e) {
|
|
1801
1819
|
return typeof e.data == "object";
|
|
1802
1820
|
}
|
|
1803
|
-
function
|
|
1804
|
-
return e.map((e) => !e || !
|
|
1821
|
+
function ln(e) {
|
|
1822
|
+
return e.map((e) => !e || !cn(e) ? null : e, { skipVoid: !1 });
|
|
1805
1823
|
}
|
|
1806
1824
|
//#endregion
|
|
1807
|
-
export {
|
|
1825
|
+
export { Yt as PICKED_HYDRATED_ATTR, Jt as PICKED_MODULE_SCRIPT_TYPE, qt as PICKED_SCRIPT_TYPE, Wt as PREVIEW_TOKEN_PARAM, Kt as Picked, Zt as buildRehydrateBootstrap, sn as createClient, he as createPluginEffect, k as createStorageKey, an as deriveReference, on as deriveReferences, n as evaluateRuleLogic, Ft as getPickedConfig, Q as isContentReference, Qt as isHtmlAssetValue, g as isInsideIframe, en as isLazyLoader, v as isPickedRoot, Gt as isPreviewSession, $t as lazyComponent, D as localStore, ce as onInertScriptSubtrees, $ as readReferenceId, tn as readReferenceIds, Xt as rehydrateScripts, oe as reportInertScriptSubtrees, se as resetInertScriptReport, O as sessionStore, E as subscribe, d as supportsCookies, m as supportsCryptoRandomUUID, c as supportsDocument, i as supportsHistory, f as supportsIntersectionObserver, h as supportsLocalStorage, a as supportsLocation, l as supportsSessionStorage, _ as supportsShadowRoot, o as supportsWebComponents, s as supportsWindow, ln as toTypedContentStore };
|