@picked/client 0.0.1-dev.1765236221953 → 0.0.1-dev.1765246229329
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/cjs/index.js +1 -1
- package/dist/cjs/plugins/data-layer/index.js +1 -0
- package/dist/esm/index.js +160 -782
- package/dist/esm/plugins/data-layer/index.js +146 -0
- package/dist/esm/plugins/single-page-app/index.js +3 -3
- package/dist/esm/plugins/web-components/index.js +1 -1
- package/dist/esm/plugins/window-object/index.js +1 -1
- package/dist/esm/server/index.js +7 -7
- package/dist/{experience-instance-C4INDX6a.js → experience-instance-Du9C8zgX.js} +7 -7
- package/dist/{supports-BjhuLJ8z.js → supports-DBMT17KZ.js} +10 -10
- package/dist/types/plugins/data-layer/index.d.ts +2 -0
- package/dist/types/plugins/data-layer/index.d.ts.map +1 -0
- package/dist/types/plugins/data-layer/plugin.d.ts +74 -0
- package/dist/types/plugins/data-layer/plugin.d.ts.map +1 -0
- package/dist/types/utils/events.d.ts +5 -0
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/user-session-CRVgPCug.cjs +1 -0
- package/dist/user-session-DejpEbvb.js +650 -0
- package/package.json +7 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,768 +1,146 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
merge(l, h) {
|
|
19
|
-
return {
|
|
20
|
-
...l,
|
|
21
|
-
...h.experience
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}), o = s.map((l) => ({
|
|
25
|
-
name: l.name,
|
|
26
|
-
decisionLogic: l.condition ?? l.decide,
|
|
27
|
-
targetSelectors: l.targets,
|
|
28
|
-
initializeOpenLogic: e.initializeOpen
|
|
29
|
-
})), u = t.components.listStore.map(
|
|
30
|
-
(l) => l.find((h) => h.name === `experience:${e.id}`) || l.find((h) => h.name === "experience"),
|
|
31
|
-
{ skipVoid: !1 }
|
|
32
|
-
), r = s.map((l) => ({
|
|
33
|
-
steps: l.steps,
|
|
34
|
-
nodes: l.nodes,
|
|
35
|
-
edges: l.edges,
|
|
36
|
-
conditionals: l.conditionals
|
|
37
|
-
})), i = e.actions ?? [];
|
|
38
|
-
return {
|
|
39
|
-
id: e.id,
|
|
40
|
-
configStore: o,
|
|
41
|
-
treeStore: r,
|
|
42
|
-
componentStore: u,
|
|
43
|
-
actions: i,
|
|
44
|
-
merge: n.merge
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
function le(t) {
|
|
49
|
-
return w(ue, t);
|
|
50
|
-
}
|
|
51
|
-
const de = k(({ client: t }) => {
|
|
52
|
-
const e = H.store({}), s = I(e, {
|
|
53
|
-
register(r, i) {
|
|
54
|
-
return {
|
|
55
|
-
...r,
|
|
56
|
-
[i.id]: i
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
function n(r) {
|
|
61
|
-
const i = e.getState()[r.id];
|
|
62
|
-
if (i) {
|
|
63
|
-
i.merge({ experience: r, strategy: "override" });
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const l = le({ client: t, experience: r });
|
|
67
|
-
s.register(l);
|
|
68
|
-
}
|
|
69
|
-
const o = e.map((r) => Object.values(r));
|
|
70
|
-
function u(r) {
|
|
71
|
-
return e.map((i) => i[r], { skipVoid: !1 });
|
|
72
|
-
}
|
|
73
|
-
return {
|
|
74
|
-
register: n,
|
|
75
|
-
getById: u,
|
|
76
|
-
listStore: o
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
function pe(t) {
|
|
80
|
-
return w(de, t);
|
|
81
|
-
}
|
|
82
|
-
const ge = (t, e) => {
|
|
83
|
-
e.register(t);
|
|
84
|
-
}, G = (t, e) => {
|
|
85
|
-
const { targetSelectors: s } = e.configStore.getState(), n = _(s, e.id);
|
|
86
|
-
n.forEach(
|
|
87
|
-
({ elements: u }) => u.forEach((r) => Q(r, e.id))
|
|
88
|
-
), X(n, e.id).forEach((u) => {
|
|
89
|
-
t.experienceInstances.spawn(e, u);
|
|
90
|
-
});
|
|
91
|
-
}, M = async (t) => {
|
|
92
|
-
await Promise.all(
|
|
93
|
-
t.experiences.listStore.getState().map(async (e) => {
|
|
94
|
-
await fe(t, e) && G(t, e);
|
|
95
|
-
})
|
|
96
|
-
);
|
|
97
|
-
}, fe = async (t, e) => {
|
|
98
|
-
const { decisionLogic: s, targetSelectors: n } = e.configStore.getState();
|
|
99
|
-
return _(n, e.id).length < 1 || n.length === 0 ? !1 : s && Z(s) ? await E(t, s) === !0 : !0;
|
|
100
|
-
}, me = (t, e, s) => {
|
|
101
|
-
const n = e.name, o = e.setup(t);
|
|
102
|
-
if (o) {
|
|
103
|
-
const u = s[n] ?? {};
|
|
104
|
-
s[n] = Object.freeze({ ...u, ...o });
|
|
105
|
-
}
|
|
106
|
-
}, he = F("component"), ye = k(
|
|
107
|
-
({ client: t, component: e, name: s }) => {
|
|
108
|
-
const n = t.frameworks.getByName(e.frameworkName);
|
|
109
|
-
return {
|
|
110
|
-
name: s,
|
|
111
|
-
component: e,
|
|
112
|
-
frameworkStore: n
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
function Se(t) {
|
|
117
|
-
return w(ye, t);
|
|
118
|
-
}
|
|
119
|
-
const ve = k(({ client: t }) => {
|
|
120
|
-
const e = he.store({}), s = I(e, {
|
|
121
|
-
register(r, i) {
|
|
122
|
-
return {
|
|
123
|
-
...r,
|
|
124
|
-
[i.name]: i
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
function n(r, i) {
|
|
129
|
-
e.getState()[r] && v(
|
|
130
|
-
"warn",
|
|
131
|
-
`Component '${r}' already registered. Registering again will override the previous registration.`
|
|
132
|
-
);
|
|
133
|
-
const h = Se({ client: t, name: r, component: i });
|
|
134
|
-
s.register(h);
|
|
135
|
-
}
|
|
136
|
-
const o = e.map((r) => Object.values(r));
|
|
137
|
-
function u(r) {
|
|
138
|
-
return e.map((i) => i[r], { skipVoid: !1 });
|
|
139
|
-
}
|
|
140
|
-
return {
|
|
141
|
-
register: n,
|
|
142
|
-
getByName: u,
|
|
143
|
-
listStore: o
|
|
144
|
-
};
|
|
145
|
-
});
|
|
146
|
-
function ke(t) {
|
|
147
|
-
return w(ve, t);
|
|
148
|
-
}
|
|
149
|
-
const V = (t, e, s) => {
|
|
150
|
-
s.register(t, e);
|
|
151
|
-
}, we = F("framework"), be = k(({ client: t }) => {
|
|
152
|
-
const e = we.store({}), s = I(e, {
|
|
153
|
-
register(r, i) {
|
|
154
|
-
return {
|
|
155
|
-
...r,
|
|
156
|
-
[i.name]: i.framework
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
function n(r, i) {
|
|
161
|
-
e.getState()[r] && v(
|
|
162
|
-
"warn",
|
|
163
|
-
`Framework '${r}' already registered. Registering again will override the previous registration.`
|
|
164
|
-
), s.register({ name: r, framework: i });
|
|
165
|
-
}
|
|
166
|
-
const o = e.map((r) => Object.values(r));
|
|
167
|
-
function u(r) {
|
|
168
|
-
return e.map((i) => i[r], { skipVoid: !1 });
|
|
169
|
-
}
|
|
170
|
-
return {
|
|
171
|
-
register: n,
|
|
172
|
-
getByName: u,
|
|
173
|
-
listStore: o
|
|
174
|
-
};
|
|
175
|
-
});
|
|
176
|
-
function Fe(t) {
|
|
177
|
-
return w(be, t);
|
|
178
|
-
}
|
|
179
|
-
const Ie = (t, e) => {
|
|
180
|
-
e.register(t.name, t);
|
|
181
|
-
}, xe = 6e3, Ee = B("last_ping", "global"), Pe = (t) => `${t}/api/v1/ping`, Re = async (t) => {
|
|
182
|
-
try {
|
|
183
|
-
const e = Date.now(), s = j.get(Ee);
|
|
184
|
-
let n = 0;
|
|
185
|
-
if (s.isSet() && (n = s.json() ?? 0), n && e - n < xe)
|
|
186
|
-
return !0;
|
|
187
|
-
const o = Pe(t.apiUrl), u = {
|
|
188
|
-
projectId: t.projectId,
|
|
189
|
-
path: window.location.pathname
|
|
190
|
-
}, r = JSON.stringify(u), i = {
|
|
191
|
-
"Content-Type": "application/json"
|
|
192
|
-
}, l = document.getElementById("picked_script"), h = l == null ? void 0 : l.dataset.verceltoken;
|
|
193
|
-
h && (i["x-vercel-protection-bypass"] = h);
|
|
194
|
-
const d = (await fetch(o, {
|
|
195
|
-
method: "POST",
|
|
196
|
-
headers: i,
|
|
197
|
-
body: r
|
|
198
|
-
})).ok;
|
|
199
|
-
return d && s.set(e), d;
|
|
200
|
-
} catch (e) {
|
|
201
|
-
return v("error", e), !1;
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var w = (i, e, t) => e in i ? y(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var o = (i, e, t) => w(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { c as v, a as I, b as S, d as x, e as P, f as k, g as E, h as b, i as F, j as C, p as A, s as B, k as d, l as R, m as j, n as z, o as U, q as O, r as $, t as l } from "../user-session-DejpEbvb.js";
|
|
5
|
+
import { l as c } from "../logger-C9a75KZn.js";
|
|
6
|
+
import { c as K, e as u, d as L } from "../experience-instance-Du9C8zgX.js";
|
|
7
|
+
import { i as ue } from "../experience-instance-Du9C8zgX.js";
|
|
8
|
+
import { createEvent as _ } from "effector";
|
|
9
|
+
import { s as f, a as W, b as D } from "../supports-DBMT17KZ.js";
|
|
10
|
+
import { g as de, k as le, d as he, i as fe, e as ge, c as me, f as ye, h as we, j as ve } from "../supports-DBMT17KZ.js";
|
|
11
|
+
import { c as G, s as h } from "../storage-BLmAhfhl.js";
|
|
12
|
+
import { l as Se, a as xe } from "../storage-BLmAhfhl.js";
|
|
13
|
+
const H = (i, e, t) => {
|
|
14
|
+
const s = e.name, n = e.setup(i);
|
|
15
|
+
if (n) {
|
|
16
|
+
const r = t[s] ?? {};
|
|
17
|
+
t[s] = Object.freeze({ ...r, ...n });
|
|
202
18
|
}
|
|
203
19
|
};
|
|
204
|
-
function
|
|
205
|
-
const e = typeof window < "u",
|
|
206
|
-
client:
|
|
207
|
-
responses:
|
|
208
|
-
fields:
|
|
20
|
+
function q(i) {
|
|
21
|
+
const e = typeof window < "u", t = {
|
|
22
|
+
client: i,
|
|
23
|
+
responses: i.responses.listStore.getState(),
|
|
24
|
+
fields: i.fields.listStore.getState(),
|
|
209
25
|
location: e ? window.location : void 0,
|
|
210
26
|
document: e ? window.document : void 0,
|
|
211
27
|
sessionStorage: e ? window.sessionStorage : void 0,
|
|
212
28
|
localStorage: e ? window.localStorage : void 0
|
|
213
29
|
};
|
|
214
|
-
return Object.freeze(
|
|
215
|
-
}
|
|
216
|
-
const Ae = F("predicate"), $e = k(({ client: t }) => {
|
|
217
|
-
const e = Ae.store({}), s = I(e, {
|
|
218
|
-
register(r, i) {
|
|
219
|
-
return {
|
|
220
|
-
...r,
|
|
221
|
-
[i.name]: {
|
|
222
|
-
name: i.name,
|
|
223
|
-
predicate: i.predicate
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
function n(r, i) {
|
|
229
|
-
e.getState()[r] && v(
|
|
230
|
-
"warn",
|
|
231
|
-
`Predicate '${r}' already registered. Registering again will override the previous registration.`
|
|
232
|
-
), s.register(Object.freeze({ name: r, predicate: i }));
|
|
233
|
-
}
|
|
234
|
-
const o = e.map((r) => Object.values(r));
|
|
235
|
-
function u(r) {
|
|
236
|
-
return e.map((i) => i[r], { skipVoid: !1 });
|
|
237
|
-
}
|
|
238
|
-
return {
|
|
239
|
-
register: n,
|
|
240
|
-
getByName: u,
|
|
241
|
-
listStore: o
|
|
242
|
-
};
|
|
243
|
-
});
|
|
244
|
-
function je(t) {
|
|
245
|
-
return w($e, t);
|
|
246
|
-
}
|
|
247
|
-
const Oe = (t, e, s) => {
|
|
248
|
-
s.register(t, e);
|
|
249
|
-
}, T = F("feature"), Ce = k(({ client: t }) => {
|
|
250
|
-
const e = T.store({}), s = T.store([]), n = I(e, {
|
|
251
|
-
register(d, c) {
|
|
252
|
-
return {
|
|
253
|
-
...d,
|
|
254
|
-
[c.id]: c.feature
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
|
-
function o(d, c) {
|
|
259
|
-
e.getState()[d] && v(
|
|
260
|
-
"warn",
|
|
261
|
-
`Feature '${d}' already registered. Registering again will override the previous registration.`
|
|
262
|
-
);
|
|
263
|
-
const p = {
|
|
264
|
-
id: d,
|
|
265
|
-
feature: {
|
|
266
|
-
...c,
|
|
267
|
-
id: d
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
n.register(
|
|
271
|
-
Object.freeze({
|
|
272
|
-
id: d,
|
|
273
|
-
feature: p
|
|
274
|
-
})
|
|
275
|
-
);
|
|
276
|
-
}
|
|
277
|
-
const u = U(
|
|
278
|
-
async ({
|
|
279
|
-
id: d,
|
|
280
|
-
key: c,
|
|
281
|
-
storage: a = "local"
|
|
282
|
-
}) => {
|
|
283
|
-
const p = B(`feature:${d}:${c}`, "global"), g = (a === "session" ? O : j).get(p).boolean();
|
|
284
|
-
return g === null ? null : { id: d, key: c, bucket: g, storage: a };
|
|
285
|
-
}
|
|
286
|
-
), r = U((d) => {
|
|
287
|
-
if (!d)
|
|
288
|
-
return null;
|
|
289
|
-
const c = B(`feature:${d.id}:${d.key}`, "global");
|
|
290
|
-
(d.storage === "session" ? O : j).set(c, d.bucket);
|
|
291
|
-
}), i = /* @__PURE__ */ new Map(), l = J({
|
|
292
|
-
source: { allFeaturesStore: e, resolvedFeaturesStore: s },
|
|
293
|
-
effect: async ({ allFeaturesStore: d, resolvedFeaturesStore: c }, { id: a, decide: p, key: f }) => {
|
|
294
|
-
const g = c.find(
|
|
295
|
-
($) => $.id === a && $.key === f
|
|
296
|
-
);
|
|
297
|
-
if (g)
|
|
298
|
-
return g;
|
|
299
|
-
const y = d[a];
|
|
300
|
-
if (!y)
|
|
301
|
-
throw new Error(`Feature with id '${a}' not found`);
|
|
302
|
-
const b = i.get(`${a}:${f}`);
|
|
303
|
-
if (b !== void 0) {
|
|
304
|
-
const $ = await b;
|
|
305
|
-
return { id: y.id, bucket: $, key: f, storage: y.feature.storage };
|
|
306
|
-
}
|
|
307
|
-
const A = p();
|
|
308
|
-
i.set(`${a}:${f}`, A);
|
|
309
|
-
const P = await A;
|
|
310
|
-
return { id: y.id, bucket: P, key: f, storage: y.feature.storage };
|
|
311
|
-
}
|
|
312
|
-
});
|
|
313
|
-
x({
|
|
314
|
-
clock: n.register,
|
|
315
|
-
fn: (d) => {
|
|
316
|
-
const { id: c, feature: a } = d;
|
|
317
|
-
return { id: c, key: a.feature.key, storage: a.feature.storage };
|
|
318
|
-
},
|
|
319
|
-
target: u
|
|
320
|
-
}), x({
|
|
321
|
-
source: e,
|
|
322
|
-
clock: l.doneData,
|
|
323
|
-
fn: (d, c) => {
|
|
324
|
-
var y;
|
|
325
|
-
const { id: a, bucket: p, storage: f } = c, g = (y = d[a]) == null ? void 0 : y.feature.key;
|
|
326
|
-
return g ? { key: g, id: a, bucket: p, storage: f } : null;
|
|
327
|
-
},
|
|
328
|
-
target: r
|
|
329
|
-
});
|
|
330
|
-
const h = C({ allFeaturesStore: e, resolvedFeaturesStore: s }).map(
|
|
331
|
-
({
|
|
332
|
-
allFeaturesStore: d,
|
|
333
|
-
resolvedFeaturesStore: c
|
|
334
|
-
}) => Object.values(d).map((a) => {
|
|
335
|
-
const p = c.find(
|
|
336
|
-
(f) => f.id === a.id && f.key === a.feature.key
|
|
337
|
-
);
|
|
338
|
-
return p ? {
|
|
339
|
-
id: a.id,
|
|
340
|
-
name: a.feature.name,
|
|
341
|
-
key: a.feature.key,
|
|
342
|
-
getBucket: () => ({ id: a.id, bucket: p.bucket }),
|
|
343
|
-
isResolved: !0
|
|
344
|
-
} : {
|
|
345
|
-
id: a.id,
|
|
346
|
-
name: a.feature.name,
|
|
347
|
-
key: a.feature.key,
|
|
348
|
-
getBucket: async () => await l(a.feature),
|
|
349
|
-
isResolved: !1
|
|
350
|
-
};
|
|
351
|
-
})
|
|
352
|
-
);
|
|
353
|
-
x({
|
|
354
|
-
clock: l.doneData,
|
|
355
|
-
source: { resolvedFeatures: s },
|
|
356
|
-
filter: ({ resolvedFeatures: d }, { id: c, key: a }) => !d.some(
|
|
357
|
-
(f) => f.id === c && f.key === a
|
|
358
|
-
),
|
|
359
|
-
fn: (d, c) => c,
|
|
360
|
-
target: t.eventBus.prepend((d) => ({
|
|
361
|
-
type: "feature_decide",
|
|
362
|
-
feature: d
|
|
363
|
-
}))
|
|
364
|
-
}), x({
|
|
365
|
-
clock: [u.doneData, l.doneData],
|
|
366
|
-
source: s,
|
|
367
|
-
fn: (d, c) => !c || d.some(
|
|
368
|
-
(p) => p.id === c.id && p.key === c.key
|
|
369
|
-
) ? d : [...d, c],
|
|
370
|
-
target: s
|
|
371
|
-
});
|
|
372
|
-
function S(d) {
|
|
373
|
-
return e.map((c) => c[d], { skipVoid: !1 });
|
|
374
|
-
}
|
|
375
|
-
return {
|
|
376
|
-
register: o,
|
|
377
|
-
getByName: S,
|
|
378
|
-
listStore: h
|
|
379
|
-
};
|
|
380
|
-
});
|
|
381
|
-
function De(t) {
|
|
382
|
-
return w(Ce, t);
|
|
30
|
+
return Object.freeze(t);
|
|
383
31
|
}
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
return {
|
|
389
|
-
// eslint-disable-next-line sonarjs/pseudo-random
|
|
390
|
-
id: re(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
391
|
-
node: e,
|
|
392
|
-
at: Date.now(),
|
|
393
|
-
experienceId: t
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
const Me = k(() => {
|
|
397
|
-
const t = R.store({ entries: [] }), e = R.event(), s = R.event(), n = R.event(), o = R.event();
|
|
398
|
-
t.on(e, (r, i) => ({
|
|
399
|
-
entries: [...r.entries, N(i.experienceId, i.node)]
|
|
400
|
-
})), t.on(s, (r, i) => ({
|
|
401
|
-
entries: [
|
|
402
|
-
...r.entries.slice(0, -1),
|
|
403
|
-
N(i.experienceId, i.node)
|
|
404
|
-
]
|
|
405
|
-
})), t.on(o, (r, i) => i);
|
|
406
|
-
function u(r, i) {
|
|
407
|
-
const l = { lastStepIndex: -1, secondLastStepIndex: -1 };
|
|
408
|
-
for (let h = r.length - 1; h >= 0; h--) {
|
|
409
|
-
const S = r[h], d = S == null ? void 0 : S.node;
|
|
410
|
-
if (!(!d || !ee(d)) && !(i && (S == null ? void 0 : S.experienceId) !== i))
|
|
411
|
-
if (l.lastStepIndex === -1)
|
|
412
|
-
l.lastStepIndex = h;
|
|
413
|
-
else {
|
|
414
|
-
l.secondLastStepIndex = h;
|
|
415
|
-
break;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
return l;
|
|
419
|
-
}
|
|
420
|
-
return t.on(n, (r, i) => {
|
|
421
|
-
const { secondLastStepIndex: l } = u(r.entries, i.experienceId), h = l !== -1 ? r.entries.slice(0, l + 1) : r.entries;
|
|
422
|
-
return {
|
|
423
|
-
...r,
|
|
424
|
-
entries: h
|
|
425
|
-
};
|
|
426
|
-
}), {
|
|
427
|
-
push: e,
|
|
428
|
-
replace: s,
|
|
429
|
-
back: n,
|
|
430
|
-
restore: o,
|
|
431
|
-
entriesStore: t.map((r) => r.entries)
|
|
432
|
-
};
|
|
433
|
-
});
|
|
434
|
-
function Ve() {
|
|
435
|
-
return w(Me);
|
|
436
|
-
}
|
|
437
|
-
const Te = () => D(), Ne = F("field"), ze = k(() => {
|
|
438
|
-
const t = Ne.store({}), e = I(t, {
|
|
439
|
-
register(r, i) {
|
|
440
|
-
return {
|
|
441
|
-
...r,
|
|
442
|
-
[i.field.id]: i.field
|
|
443
|
-
};
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
function s(r) {
|
|
447
|
-
e.register({ field: r });
|
|
448
|
-
}
|
|
449
|
-
const n = t.map((r) => Object.values(r));
|
|
450
|
-
function o(r) {
|
|
451
|
-
return t.map((i) => i[r] || null);
|
|
452
|
-
}
|
|
453
|
-
function u(r) {
|
|
454
|
-
return t.map((i) => Object.values(i).find((l) => l.name === r) || null);
|
|
455
|
-
}
|
|
456
|
-
return {
|
|
457
|
-
register: s,
|
|
458
|
-
getById: o,
|
|
459
|
-
listStore: n,
|
|
460
|
-
getByName: u
|
|
461
|
-
};
|
|
462
|
-
});
|
|
463
|
-
function _e() {
|
|
464
|
-
return w(ze);
|
|
465
|
-
}
|
|
466
|
-
const Le = (t, e) => {
|
|
467
|
-
e.register(t);
|
|
468
|
-
}, He = F("action"), Ge = k(() => {
|
|
469
|
-
const t = He.store({}), e = I(t, {
|
|
470
|
-
register(u, r) {
|
|
471
|
-
return {
|
|
472
|
-
...u,
|
|
473
|
-
[r.name]: {
|
|
474
|
-
name: r.name,
|
|
475
|
-
action: r.action
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
});
|
|
480
|
-
function s(u, r) {
|
|
481
|
-
e.register({ name: u, action: r });
|
|
482
|
-
}
|
|
483
|
-
const n = t.map((u) => Object.values(u));
|
|
484
|
-
function o(u) {
|
|
485
|
-
return t.map((r) => r[u], { skipVoid: !1 });
|
|
486
|
-
}
|
|
487
|
-
return {
|
|
488
|
-
register: s,
|
|
489
|
-
getByName: o,
|
|
490
|
-
listStore: n
|
|
491
|
-
};
|
|
492
|
-
});
|
|
493
|
-
function Ke() {
|
|
494
|
-
return w(Ge);
|
|
495
|
-
}
|
|
496
|
-
const qe = (t, e, s) => {
|
|
497
|
-
s.register(t, e);
|
|
498
|
-
};
|
|
499
|
-
function z(t) {
|
|
500
|
-
return typeof t > "u" || t === null || t === "" || Array.isArray(t) && !t.length;
|
|
501
|
-
}
|
|
502
|
-
const We = F("response"), Ye = k(({ client: t }) => {
|
|
503
|
-
const e = We.store({}), s = D(), n = D(), o = I(e, {
|
|
504
|
-
register(c, a) {
|
|
505
|
-
return {
|
|
506
|
-
...c,
|
|
507
|
-
[a.fieldId]: a.response
|
|
508
|
-
};
|
|
509
|
-
},
|
|
510
|
-
registerBatch(c, a) {
|
|
511
|
-
return {
|
|
512
|
-
...c,
|
|
513
|
-
...a
|
|
514
|
-
};
|
|
515
|
-
},
|
|
516
|
-
clear(c, a) {
|
|
517
|
-
const { [a]: p, ...f } = c;
|
|
518
|
-
return f;
|
|
519
|
-
},
|
|
520
|
-
clearAll() {
|
|
521
|
-
return {};
|
|
522
|
-
}
|
|
523
|
-
});
|
|
524
|
-
function u(c, a) {
|
|
525
|
-
o.register({ fieldId: c, response: a });
|
|
526
|
-
}
|
|
527
|
-
async function r(c) {
|
|
528
|
-
const a = [];
|
|
529
|
-
return await Promise.allSettled(
|
|
530
|
-
Object.entries(c).map(async ([p, f]) => {
|
|
531
|
-
let g = f;
|
|
532
|
-
const y = t.fields.getById(p).getState();
|
|
533
|
-
if (!y) {
|
|
534
|
-
a.push({
|
|
535
|
-
fieldId: p,
|
|
536
|
-
userMessage: `Field '${p}' not found`,
|
|
537
|
-
systemMessage: `No field with ID '${p}' exists. Available field IDs are: ${Object.keys(t.fields.listStore.getState()).join(",")}.`,
|
|
538
|
-
value: g
|
|
539
|
-
});
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
if (y.multiple && (typeof g == "string" || typeof g == "number" || typeof g == "boolean") && (g = [g]), y.validation && !ne(y.validation) && !z(g)) {
|
|
543
|
-
const b = await E(t, y.validation, {
|
|
544
|
-
$input: g
|
|
545
|
-
});
|
|
546
|
-
if (typeof b == "string") {
|
|
547
|
-
a.push({
|
|
548
|
-
fieldId: p,
|
|
549
|
-
userMessage: b,
|
|
550
|
-
systemMessage: `Field validation resulted in an error: ${b}.`,
|
|
551
|
-
value: g
|
|
552
|
-
});
|
|
553
|
-
return;
|
|
554
|
-
}
|
|
555
|
-
if (b === !1) {
|
|
556
|
-
a.push({
|
|
557
|
-
fieldId: p,
|
|
558
|
-
userMessage: "This field is invalid",
|
|
559
|
-
systemMessage: "Field validation resulted in an unspecified error.",
|
|
560
|
-
value: g
|
|
561
|
-
});
|
|
562
|
-
return;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
if (y.required && z(g)) {
|
|
566
|
-
a.push({
|
|
567
|
-
fieldId: p,
|
|
568
|
-
userMessage: "This field is required",
|
|
569
|
-
systemMessage: "Field is required.",
|
|
570
|
-
value: g
|
|
571
|
-
});
|
|
572
|
-
return;
|
|
573
|
-
}
|
|
574
|
-
if (!y.multiple && Array.isArray(g) && g.length > 1) {
|
|
575
|
-
a.push({
|
|
576
|
-
fieldId: p,
|
|
577
|
-
userMessage: "This field expects a single response",
|
|
578
|
-
systemMessage: "Field expects a single response.",
|
|
579
|
-
value: g
|
|
580
|
-
});
|
|
581
|
-
return;
|
|
582
|
-
}
|
|
583
|
-
if (y.options) {
|
|
584
|
-
const b = y.options.map((P) => P.value), A = Array.isArray(g) ? g : [g];
|
|
585
|
-
Array.isArray(g) && (A.every((P) => b.includes(P)) || a.push({
|
|
586
|
-
fieldId: p,
|
|
587
|
-
userMessage: "This field expects a valid option",
|
|
588
|
-
systemMessage: `Field expects a valid option. Valid options are: ${b.join(", ")}`,
|
|
589
|
-
value: g
|
|
590
|
-
}));
|
|
591
|
-
}
|
|
592
|
-
})
|
|
593
|
-
), { responsesToCommit: c, validationErrors: a };
|
|
594
|
-
}
|
|
595
|
-
async function i(c) {
|
|
596
|
-
const { responsesToCommit: a, validationErrors: p } = await r(c);
|
|
597
|
-
return p.length ? { errors: p } : (o.registerBatch(a), { errors: [] });
|
|
598
|
-
}
|
|
599
|
-
const l = e.map((c) => c), h = e.map((c) => Object.keys(c).map((p) => ({
|
|
600
|
-
fieldId: p,
|
|
601
|
-
value: c[p]
|
|
602
|
-
})));
|
|
603
|
-
function S(c) {
|
|
604
|
-
const a = t.fields.getById(c), p = e.map((f) => f[c] || null);
|
|
605
|
-
return C({ f: a, r: p }, ({ f, r: g }) => g || (f != null && f.defaultValue ? f.defaultValue : null));
|
|
606
|
-
}
|
|
607
|
-
function d(c) {
|
|
608
|
-
const a = t.fields.getByName(c);
|
|
609
|
-
return C({ f: a, s: e }, ({ f: p, s: f }) => {
|
|
610
|
-
const g = p && f[p.id] || null;
|
|
611
|
-
return g || (p != null && p.defaultValue ? p.defaultValue : null);
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
return x({
|
|
615
|
-
clock: s,
|
|
616
|
-
target: o.clearAll
|
|
617
|
-
}), x({
|
|
618
|
-
clock: n,
|
|
619
|
-
target: o.clear
|
|
620
|
-
}), {
|
|
621
|
-
register: u,
|
|
622
|
-
clearAll: s,
|
|
623
|
-
clear: n,
|
|
624
|
-
commit: i,
|
|
625
|
-
getResponsesToCommit: r,
|
|
626
|
-
listStore: h,
|
|
627
|
-
getAllStore: l,
|
|
628
|
-
getByFieldId: S,
|
|
629
|
-
getByFieldName: d
|
|
630
|
-
};
|
|
631
|
-
});
|
|
632
|
-
function Je(t) {
|
|
633
|
-
return w(Ye, t);
|
|
634
|
-
}
|
|
635
|
-
const Qe = () => "0.0.1-dev.1765236221953";
|
|
636
|
-
function Xe() {
|
|
637
|
-
if (L()) {
|
|
638
|
-
const t = [
|
|
32
|
+
const N = () => _(), T = () => "0.0.1-dev.1765246229329";
|
|
33
|
+
function V() {
|
|
34
|
+
if (f()) {
|
|
35
|
+
const i = [
|
|
639
36
|
document.currentScript,
|
|
640
37
|
document.getElementById("picked_script"),
|
|
641
38
|
document.getElementById("picked"),
|
|
642
39
|
document.getElementById("cvly"),
|
|
643
40
|
document.getElementById("cvly-x")
|
|
644
41
|
];
|
|
645
|
-
for (const e of
|
|
42
|
+
for (const e of i)
|
|
646
43
|
if (e != null && e.dataset.api)
|
|
647
44
|
return e.dataset.api;
|
|
648
45
|
}
|
|
649
46
|
return "https://api.picked.app";
|
|
650
47
|
}
|
|
651
|
-
function
|
|
652
|
-
if (!
|
|
48
|
+
function J() {
|
|
49
|
+
if (!W())
|
|
653
50
|
return {};
|
|
654
|
-
const
|
|
655
|
-
for (const [
|
|
656
|
-
|
|
657
|
-
for (const
|
|
658
|
-
const
|
|
659
|
-
e[
|
|
660
|
-
}
|
|
661
|
-
const
|
|
662
|
-
if (
|
|
663
|
-
|
|
51
|
+
const i = new URLSearchParams(window.location.search), e = {}, t = /* @__PURE__ */ new Set();
|
|
52
|
+
for (const [n] of i.entries())
|
|
53
|
+
n.startsWith("picked-") && t.add(n);
|
|
54
|
+
for (const n of t) {
|
|
55
|
+
const r = n.replace("picked-", "");
|
|
56
|
+
e[r] = i.getAll(n);
|
|
57
|
+
}
|
|
58
|
+
const s = G("s");
|
|
59
|
+
if (t.size > 0)
|
|
60
|
+
h.set(s, e);
|
|
664
61
|
else {
|
|
665
|
-
const
|
|
666
|
-
if (
|
|
667
|
-
return
|
|
62
|
+
const n = h.get(s);
|
|
63
|
+
if (n)
|
|
64
|
+
return n.json() || {};
|
|
668
65
|
}
|
|
669
66
|
return e;
|
|
670
67
|
}
|
|
671
|
-
|
|
672
|
-
if (ae())
|
|
673
|
-
return crypto.randomUUID();
|
|
674
|
-
const t = Date.now().toString(36), e = Math.random().toString(36).substring(2, 15), s = Math.random().toString(36).substring(2, 15), n = Math.random().toString(36).substring(2, 15);
|
|
675
|
-
return `${t}-${e}-${s}-${n}`;
|
|
676
|
-
}
|
|
677
|
-
const tt = B("session", "global"), st = () => {
|
|
678
|
-
const t = j.get(tt);
|
|
679
|
-
let e;
|
|
680
|
-
t.isSet() && (e = t.json());
|
|
681
|
-
const s = (o) => t.set({ id: o.id, isUser: o.isUser }), n = {
|
|
682
|
-
id: (e == null ? void 0 : e.id) ?? et(),
|
|
683
|
-
isUser: (e == null ? void 0 : e.isUser) ?? void 0,
|
|
684
|
-
setIsUser(o) {
|
|
685
|
-
this.isUser = o, s(this);
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
return s(n), n;
|
|
689
|
-
}, rt = () => oe() ? st() : null;
|
|
690
|
-
class K {
|
|
68
|
+
class g {
|
|
691
69
|
constructor(e) {
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
70
|
+
o(this, "options");
|
|
71
|
+
o(this, "isReady", !1);
|
|
72
|
+
o(this, "project");
|
|
73
|
+
o(this, "plugins", {});
|
|
74
|
+
o(this, "eventBus", N());
|
|
75
|
+
o(this, "organizationId");
|
|
76
|
+
o(this, "projectId");
|
|
77
|
+
o(this, "apiUrl");
|
|
78
|
+
o(this, "session");
|
|
79
|
+
o(this, "precondition");
|
|
80
|
+
o(this, "condition");
|
|
81
|
+
o(this, "searchParams", J());
|
|
82
|
+
o(this, "history", v());
|
|
83
|
+
o(this, "components", I({ client: this }));
|
|
84
|
+
o(this, "experienceInstances", K({ client: this }));
|
|
85
|
+
o(this, "experiences", S({ client: this }));
|
|
86
|
+
o(this, "frameworks", x({ client: this }));
|
|
87
|
+
o(this, "predicates", P({ client: this }));
|
|
88
|
+
o(this, "features", k({ client: this }));
|
|
89
|
+
o(this, "responses", E({ client: this }));
|
|
90
|
+
o(this, "fields", b());
|
|
91
|
+
o(this, "actions", F());
|
|
92
|
+
c("info", "Picked client initializing."), this.organizationId = e.organizationId, this.projectId = e.projectId, this.options = Object.freeze(e), this.apiUrl = e.apiUrl || V(), this.session = C(), this.setupPlugins(), this.setupFeatures(), this.setupPredicates(), this.setupActions(), this.precondition = e.precondition, this.condition = e.condition, this.eventBus({ type: "load", version: T() }), c("info", "Picked client initialized.");
|
|
715
93
|
}
|
|
716
94
|
start() {
|
|
717
|
-
|
|
718
|
-
if (!
|
|
95
|
+
A(this), (async () => {
|
|
96
|
+
if (!f())
|
|
719
97
|
return;
|
|
98
|
+
let t;
|
|
99
|
+
typeof this.precondition > "u" ? t = !0 : typeof this.precondition == "boolean" ? t = this.precondition : t = await u(this, this.precondition) === !0;
|
|
720
100
|
let s;
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
const u = n;
|
|
727
|
-
this.session.setIsUser(u), this.eventBus({ type: "user_decide", value: u });
|
|
101
|
+
t && (this.condition === void 0 ? s = !0 : typeof this.condition == "boolean" ? s = this.condition : s = await u(this, this.condition) === !0);
|
|
102
|
+
const n = t && s === !0;
|
|
103
|
+
if (typeof s == "boolean" && this.session) {
|
|
104
|
+
const r = s;
|
|
105
|
+
this.session.setIsUser(r), this.eventBus({ type: "user_decide", value: r });
|
|
728
106
|
}
|
|
729
|
-
this.eventBus({ type: "initialize" }), document.body &&
|
|
107
|
+
this.eventBus({ type: "initialize" }), document.body && n && l(this), await L(), n && l(this), this.eventBus({ type: "ready" }), this.isReady = !0, this.session && this.eventBus({ type: "session", ...this.session });
|
|
730
108
|
})();
|
|
731
109
|
}
|
|
732
110
|
registerFramework(e) {
|
|
733
|
-
|
|
111
|
+
B(e, this.frameworks);
|
|
734
112
|
}
|
|
735
|
-
registerComponent(e,
|
|
736
|
-
|
|
113
|
+
registerComponent(e, t) {
|
|
114
|
+
d(e, t, this.components);
|
|
737
115
|
}
|
|
738
116
|
registerPlugin(e) {
|
|
739
|
-
|
|
117
|
+
H(this, e, this.plugins);
|
|
740
118
|
}
|
|
741
|
-
registerFeature(e,
|
|
742
|
-
|
|
119
|
+
registerFeature(e, t) {
|
|
120
|
+
R(e, t, this.features);
|
|
743
121
|
}
|
|
744
|
-
registerPredicate(e,
|
|
745
|
-
|
|
122
|
+
registerPredicate(e, t) {
|
|
123
|
+
j(e, t, this.predicates);
|
|
746
124
|
}
|
|
747
125
|
registerField(e) {
|
|
748
|
-
|
|
126
|
+
z(e, this.fields);
|
|
749
127
|
}
|
|
750
|
-
registerAction(e,
|
|
751
|
-
|
|
128
|
+
registerAction(e, t) {
|
|
129
|
+
U(e, t, this.actions);
|
|
752
130
|
}
|
|
753
131
|
registerExperience(e) {
|
|
754
|
-
e.component &&
|
|
132
|
+
e.component && d(`experience:${e.id}`, e.component, this.components), O(e, this.experiences);
|
|
755
133
|
}
|
|
756
134
|
getStateSnapshot() {
|
|
757
|
-
return
|
|
135
|
+
return q(this);
|
|
758
136
|
}
|
|
759
137
|
async launchExperienceById(e) {
|
|
760
|
-
const
|
|
761
|
-
if (!
|
|
762
|
-
|
|
138
|
+
const t = this.experiences.getById(e).getState();
|
|
139
|
+
if (!t) {
|
|
140
|
+
c("warn", `Experience with id '${e}' not found.`);
|
|
763
141
|
return;
|
|
764
142
|
}
|
|
765
|
-
|
|
143
|
+
$(this, t);
|
|
766
144
|
}
|
|
767
145
|
// private async fetchProject() {
|
|
768
146
|
// if (this.project) {
|
|
@@ -775,38 +153,38 @@ class K {
|
|
|
775
153
|
// }
|
|
776
154
|
setupPlugins() {
|
|
777
155
|
var e;
|
|
778
|
-
(e = this.options.plugins) == null || e.forEach((
|
|
779
|
-
if (Array.isArray(
|
|
780
|
-
|
|
781
|
-
this.registerPlugin(
|
|
156
|
+
(e = this.options.plugins) == null || e.forEach((t) => {
|
|
157
|
+
if (Array.isArray(t)) {
|
|
158
|
+
t.forEach((n) => {
|
|
159
|
+
this.registerPlugin(n);
|
|
782
160
|
});
|
|
783
161
|
return;
|
|
784
162
|
}
|
|
785
|
-
const
|
|
786
|
-
if (Array.isArray(
|
|
787
|
-
|
|
163
|
+
const s = typeof t == "function" ? t() : t;
|
|
164
|
+
if (Array.isArray(s)) {
|
|
165
|
+
s.forEach((n) => this.registerPlugin(n));
|
|
788
166
|
return;
|
|
789
167
|
}
|
|
790
|
-
this.registerPlugin(
|
|
168
|
+
this.registerPlugin(s);
|
|
791
169
|
});
|
|
792
170
|
}
|
|
793
171
|
setupFeatures() {
|
|
794
172
|
const e = this.options.features;
|
|
795
|
-
e && (Object.entries(e).forEach(([
|
|
796
|
-
const
|
|
797
|
-
this.registerFeature(
|
|
798
|
-
}), this.searchParams.feature && this.searchParams.feature.forEach((
|
|
173
|
+
e && (Object.entries(e).forEach(([t, s]) => {
|
|
174
|
+
const n = typeof s == "function" ? s() : s;
|
|
175
|
+
this.registerFeature(t, n);
|
|
176
|
+
}), this.searchParams.feature && this.searchParams.feature.forEach((t) => {
|
|
799
177
|
try {
|
|
800
|
-
const [
|
|
801
|
-
if (!
|
|
178
|
+
const [s, n] = t.split(":");
|
|
179
|
+
if (!s || !n)
|
|
802
180
|
return;
|
|
803
|
-
let
|
|
804
|
-
|
|
805
|
-
key: `${
|
|
181
|
+
let r = n;
|
|
182
|
+
r === "true" && (r = !0), r === "false" && (r = !1), this.registerFeature(s, {
|
|
183
|
+
key: `${r}`,
|
|
806
184
|
// use the assigned bucket value as the key
|
|
807
|
-
name:
|
|
185
|
+
name: s,
|
|
808
186
|
// eslint-disable-next-line sonarjs/function-return-type
|
|
809
|
-
decide: () =>
|
|
187
|
+
decide: () => r,
|
|
810
188
|
storage: "session"
|
|
811
189
|
});
|
|
812
190
|
} catch {
|
|
@@ -815,73 +193,73 @@ class K {
|
|
|
815
193
|
}
|
|
816
194
|
setupPredicates() {
|
|
817
195
|
const e = this.options.predicates;
|
|
818
|
-
e && Object.entries(e).forEach(([
|
|
819
|
-
if (typeof
|
|
820
|
-
|
|
196
|
+
e && Object.entries(e).forEach(([t, s]) => {
|
|
197
|
+
if (typeof s != "function") {
|
|
198
|
+
c("warn", `Predicate "${t}" is not a function.`);
|
|
821
199
|
return;
|
|
822
200
|
}
|
|
823
|
-
this.registerPredicate(
|
|
201
|
+
this.registerPredicate(t, s);
|
|
824
202
|
});
|
|
825
203
|
}
|
|
826
204
|
setupActions() {
|
|
827
205
|
const e = this.options.actions;
|
|
828
|
-
e && Object.entries(e).forEach(([
|
|
829
|
-
if (typeof
|
|
830
|
-
|
|
206
|
+
e && Object.entries(e).forEach(([t, s]) => {
|
|
207
|
+
if (typeof s != "function") {
|
|
208
|
+
c("warn", `Action "${t}" is not a function.`);
|
|
831
209
|
return;
|
|
832
210
|
}
|
|
833
|
-
this.registerAction(
|
|
211
|
+
this.registerAction(t, s);
|
|
834
212
|
});
|
|
835
213
|
}
|
|
836
214
|
getPluginConfig(e) {
|
|
837
215
|
return this.plugins[e] ?? {};
|
|
838
216
|
}
|
|
839
217
|
}
|
|
840
|
-
|
|
841
|
-
function
|
|
218
|
+
o(g, "logger", c);
|
|
219
|
+
function m(i) {
|
|
842
220
|
var e;
|
|
843
|
-
return ((e =
|
|
221
|
+
return ((e = i.options) == null ? void 0 : e.some((t) => "condition" in t)) ?? !1;
|
|
844
222
|
}
|
|
845
|
-
function
|
|
846
|
-
return
|
|
223
|
+
function M(i) {
|
|
224
|
+
return i.some((e) => e.condition || m(e));
|
|
847
225
|
}
|
|
848
|
-
async function
|
|
849
|
-
return e.length === 0 || !
|
|
850
|
-
e.map(async (
|
|
851
|
-
if (!(
|
|
226
|
+
async function oe(i, e) {
|
|
227
|
+
return e.length === 0 || !M(e) ? e : (await Promise.all(
|
|
228
|
+
e.map(async (s) => {
|
|
229
|
+
if (!(s.condition ? await u(i, s.condition) : !0))
|
|
852
230
|
return null;
|
|
853
|
-
if (!
|
|
854
|
-
return
|
|
855
|
-
const
|
|
856
|
-
|
|
857
|
-
)).filter((
|
|
858
|
-
return
|
|
231
|
+
if (!s.options || !m(s))
|
|
232
|
+
return s;
|
|
233
|
+
const p = (await Promise.all(
|
|
234
|
+
s.options.map(async (a) => a.condition ? await u(i, a.condition) ? a : null : a)
|
|
235
|
+
)).filter((a) => a !== null);
|
|
236
|
+
return p.length === s.options.length ? s : p.length === 0 ? null : { ...s, options: p };
|
|
859
237
|
})
|
|
860
|
-
)).filter((
|
|
238
|
+
)).filter((s) => s !== null);
|
|
861
239
|
}
|
|
862
|
-
const
|
|
863
|
-
const e = new
|
|
864
|
-
return
|
|
240
|
+
const re = (i) => {
|
|
241
|
+
const e = new g(i);
|
|
242
|
+
return D(e), e;
|
|
865
243
|
};
|
|
866
244
|
export {
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
245
|
+
g as Picked,
|
|
246
|
+
re as createClient,
|
|
247
|
+
G as createStorageKey,
|
|
248
|
+
u as evaluateRuleLogic,
|
|
249
|
+
oe as getStepFields,
|
|
250
|
+
ue as isPickedRoot,
|
|
251
|
+
Se as localStore,
|
|
252
|
+
h as sessionStore,
|
|
253
|
+
xe as subscribe,
|
|
254
|
+
de as supportsCookies,
|
|
255
|
+
le as supportsCryptoRandomUUID,
|
|
256
|
+
f as supportsDocument,
|
|
257
|
+
he as supportsHistory,
|
|
258
|
+
fe as supportsIntersectionObserver,
|
|
259
|
+
ge as supportsLocalStorage,
|
|
260
|
+
me as supportsLocation,
|
|
261
|
+
ye as supportsSessionStorage,
|
|
262
|
+
we as supportsShadowRoot,
|
|
263
|
+
ve as supportsWebComponents,
|
|
264
|
+
W as supportsWindow
|
|
887
265
|
};
|