@picked/client 0.0.31 → 0.0.32-next.1
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 +2 -2
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +582 -518
- package/dist/esm/plugins/responses-browser-storage/index.js +23 -22
- package/dist/esm/server/index.js +1 -1
- package/dist/{experience-instance-C4INDX6a.js → experience-instance-BmL4VkmP.js} +1 -1
- package/dist/{experience-instance-DjjpHk0t.cjs → experience-instance-IpJwvfUH.cjs} +1 -1
- package/dist/types/entities/action/action.d.ts +5 -3
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts +6 -3
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/predicate/predicate.d.ts +4 -5
- package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
- package/dist/types/entities/response/response.d.ts +4 -1
- package/dist/types/entities/response/response.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/picked.d.ts +11 -7
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var h = (t, e, r) =>
|
|
4
|
-
import { createDomain as
|
|
1
|
+
var ee = Object.defineProperty;
|
|
2
|
+
var te = (t, e, r) => e in t ? ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var h = (t, e, r) => te(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { createDomain as x, createApi as E, createStore as q, createEffect as $, sample as F, attach as re, combine as D, createEvent as U } from "effector";
|
|
5
5
|
import { createFactory as w, invoke as I } from "@withease/factories";
|
|
6
|
-
import { g as
|
|
7
|
-
import { f as
|
|
8
|
-
import { l as
|
|
9
|
-
import { c as
|
|
10
|
-
import { a as
|
|
11
|
-
import { g as
|
|
12
|
-
import { i as
|
|
13
|
-
import { s as
|
|
14
|
-
import { h as
|
|
15
|
-
const
|
|
6
|
+
import { g as K, t as ne, c as se, i as ie, e as P, a as oe, b as ae, d as ce } from "../experience-instance-BmL4VkmP.js";
|
|
7
|
+
import { f as Rt } from "../experience-instance-BmL4VkmP.js";
|
|
8
|
+
import { l as v } from "../logger-C9a75KZn.js";
|
|
9
|
+
import { c as B, l as z, s as O } from "../storage-BLmAhfhl.js";
|
|
10
|
+
import { a as Ct } from "../storage-BLmAhfhl.js";
|
|
11
|
+
import { g as ue } from "../id-BW-g3y32.js";
|
|
12
|
+
import { i as de } from "../object-JwZ58NOH.js";
|
|
13
|
+
import { s as V, a as M, b as le, c as pe, d as fe } from "../supports-BjhuLJ8z.js";
|
|
14
|
+
import { h as Ot, f as Dt, j as Ut, e as Vt, g as Mt, i as Nt, k as Tt } from "../supports-BjhuLJ8z.js";
|
|
15
|
+
const W = x("experience"), ge = w(
|
|
16
16
|
({ client: t, experience: e }) => {
|
|
17
|
-
const r =
|
|
18
|
-
merge(
|
|
17
|
+
const r = W.store(e), n = E(r, {
|
|
18
|
+
merge(a, f) {
|
|
19
19
|
return {
|
|
20
|
-
...
|
|
21
|
-
...
|
|
20
|
+
...a,
|
|
21
|
+
...f.experience
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
}),
|
|
25
|
-
name:
|
|
26
|
-
decisionLogic:
|
|
27
|
-
targetSelectors:
|
|
24
|
+
}), s = r.map((a) => ({
|
|
25
|
+
name: a.name,
|
|
26
|
+
decisionLogic: a.condition ?? a.decide,
|
|
27
|
+
targetSelectors: a.targets,
|
|
28
28
|
initializeOpenLogic: e.initializeOpen
|
|
29
|
-
})),
|
|
30
|
-
(
|
|
29
|
+
})), d = t.components.listStore.map(
|
|
30
|
+
(a) => a.find((f) => f.name === `experience:${e.id}`) || a.find((f) => f.name === "experience"),
|
|
31
31
|
{ skipVoid: !1 }
|
|
32
|
-
),
|
|
33
|
-
steps:
|
|
34
|
-
nodes:
|
|
35
|
-
edges:
|
|
36
|
-
conditionals:
|
|
37
|
-
})),
|
|
32
|
+
), o = r.map((a) => ({
|
|
33
|
+
steps: a.steps,
|
|
34
|
+
nodes: a.nodes,
|
|
35
|
+
edges: a.edges,
|
|
36
|
+
conditionals: a.conditionals
|
|
37
|
+
})), i = e.actions ?? [];
|
|
38
38
|
return {
|
|
39
39
|
id: e.id,
|
|
40
|
-
configStore:
|
|
41
|
-
treeStore:
|
|
42
|
-
componentStore:
|
|
43
|
-
actions:
|
|
40
|
+
configStore: s,
|
|
41
|
+
treeStore: o,
|
|
42
|
+
componentStore: d,
|
|
43
|
+
actions: i,
|
|
44
44
|
merge: n.merge
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
|
-
function
|
|
49
|
-
return I(
|
|
48
|
+
function me(t) {
|
|
49
|
+
return I(ge, t);
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
const e =
|
|
53
|
-
register(
|
|
51
|
+
const he = w(({ client: t }) => {
|
|
52
|
+
const e = W.store({}), r = E(e, {
|
|
53
|
+
register(o, i) {
|
|
54
54
|
return {
|
|
55
|
-
...
|
|
56
|
-
[
|
|
55
|
+
...o,
|
|
56
|
+
[i.id]: i
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
function n(
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
|
|
60
|
+
function n(o) {
|
|
61
|
+
const i = e.getState()[o.id];
|
|
62
|
+
if (i) {
|
|
63
|
+
i.merge({ experience: o, strategy: "override" });
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
r.register(
|
|
66
|
+
const a = me({ client: t, experience: o });
|
|
67
|
+
r.register(a);
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
function
|
|
71
|
-
return e.map((
|
|
69
|
+
const s = e.map((o) => Object.values(o));
|
|
70
|
+
function d(o) {
|
|
71
|
+
return e.map((i) => i[o], { skipVoid: !1 });
|
|
72
72
|
}
|
|
73
73
|
return {
|
|
74
74
|
register: n,
|
|
75
|
-
getById:
|
|
76
|
-
listStore:
|
|
75
|
+
getById: d,
|
|
76
|
+
listStore: s
|
|
77
77
|
};
|
|
78
78
|
});
|
|
79
|
-
function
|
|
80
|
-
return I(
|
|
79
|
+
function ye(t) {
|
|
80
|
+
return I(he, t);
|
|
81
81
|
}
|
|
82
|
-
const
|
|
82
|
+
const Se = (t, e) => {
|
|
83
83
|
e.register(t);
|
|
84
|
-
},
|
|
85
|
-
const { targetSelectors: r } = e.configStore.getState(), n =
|
|
84
|
+
}, Y = (t, e) => {
|
|
85
|
+
const { targetSelectors: r } = e.configStore.getState(), n = K(r, e.id);
|
|
86
86
|
n.forEach(
|
|
87
|
-
({ elements:
|
|
88
|
-
),
|
|
89
|
-
t.experienceInstances.spawn(e,
|
|
87
|
+
({ elements: d }) => d.forEach((o) => ne(o, e.id))
|
|
88
|
+
), se(n, e.id).forEach((d) => {
|
|
89
|
+
t.experienceInstances.spawn(e, d);
|
|
90
90
|
});
|
|
91
|
-
},
|
|
91
|
+
}, T = async (t) => {
|
|
92
92
|
await Promise.all(
|
|
93
93
|
t.experiences.listStore.getState().map(async (e) => {
|
|
94
|
-
await
|
|
94
|
+
await ke(t, e) && Y(t, e);
|
|
95
95
|
})
|
|
96
96
|
);
|
|
97
|
-
},
|
|
97
|
+
}, ke = async (t, e) => {
|
|
98
98
|
const { decisionLogic: r, targetSelectors: n } = e.configStore.getState();
|
|
99
|
-
return
|
|
100
|
-
},
|
|
101
|
-
const n = e.name,
|
|
102
|
-
if (
|
|
103
|
-
const
|
|
104
|
-
r[n] = Object.freeze({ ...
|
|
99
|
+
return K(n, e.id).length < 1 || n.length === 0 ? !1 : r && ie(r) ? await P(t, r) === !0 : !0;
|
|
100
|
+
}, ve = (t, e, r) => {
|
|
101
|
+
const n = e.name, s = e.setup(t);
|
|
102
|
+
if (s) {
|
|
103
|
+
const d = r[n] ?? {};
|
|
104
|
+
r[n] = Object.freeze({ ...d, ...s });
|
|
105
105
|
}
|
|
106
|
-
},
|
|
106
|
+
}, we = x("component"), Ie = w(
|
|
107
107
|
({ client: t, component: e, name: r }) => {
|
|
108
108
|
const n = t.frameworks.getByName(e.frameworkName);
|
|
109
109
|
return {
|
|
@@ -113,95 +113,95 @@ const ge = (t, e) => {
|
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
);
|
|
116
|
-
function
|
|
117
|
-
return I(
|
|
116
|
+
function be(t) {
|
|
117
|
+
return I(Ie, t);
|
|
118
118
|
}
|
|
119
|
-
const
|
|
120
|
-
const e =
|
|
121
|
-
register(
|
|
119
|
+
const Fe = w(({ client: t }) => {
|
|
120
|
+
const e = we.store({}), r = E(e, {
|
|
121
|
+
register(o, i) {
|
|
122
122
|
return {
|
|
123
|
-
...
|
|
124
|
-
[
|
|
123
|
+
...o,
|
|
124
|
+
[i.name]: i
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
|
-
function n(
|
|
129
|
-
e.getState()[
|
|
128
|
+
function n(o, i) {
|
|
129
|
+
e.getState()[o] && v(
|
|
130
130
|
"warn",
|
|
131
|
-
`Component '${
|
|
131
|
+
`Component '${o}' already registered. Registering again will override the previous registration.`
|
|
132
132
|
);
|
|
133
|
-
const
|
|
134
|
-
r.register(
|
|
133
|
+
const f = be({ client: t, name: o, component: i });
|
|
134
|
+
r.register(f);
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
function
|
|
138
|
-
return e.map((
|
|
136
|
+
const s = e.map((o) => Object.values(o));
|
|
137
|
+
function d(o) {
|
|
138
|
+
return e.map((i) => i[o], { skipVoid: !1 });
|
|
139
139
|
}
|
|
140
140
|
return {
|
|
141
141
|
register: n,
|
|
142
|
-
getByName:
|
|
143
|
-
listStore:
|
|
142
|
+
getByName: d,
|
|
143
|
+
listStore: s
|
|
144
144
|
};
|
|
145
145
|
});
|
|
146
|
-
function
|
|
147
|
-
return I(
|
|
146
|
+
function xe(t) {
|
|
147
|
+
return I(Fe, t);
|
|
148
148
|
}
|
|
149
|
-
const
|
|
149
|
+
const _ = (t, e, r) => {
|
|
150
150
|
r.register(t, e);
|
|
151
|
-
},
|
|
152
|
-
const e =
|
|
153
|
-
register(
|
|
151
|
+
}, Ee = x("framework"), je = w(({ client: t }) => {
|
|
152
|
+
const e = Ee.store({}), r = E(e, {
|
|
153
|
+
register(o, i) {
|
|
154
154
|
return {
|
|
155
|
-
...
|
|
156
|
-
[
|
|
155
|
+
...o,
|
|
156
|
+
[i.name]: i.framework
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
|
-
function n(
|
|
161
|
-
e.getState()[
|
|
160
|
+
function n(o, i) {
|
|
161
|
+
e.getState()[o] && v(
|
|
162
162
|
"warn",
|
|
163
|
-
`Framework '${
|
|
164
|
-
), r.register({ name:
|
|
163
|
+
`Framework '${o}' already registered. Registering again will override the previous registration.`
|
|
164
|
+
), r.register({ name: o, framework: i });
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
function
|
|
168
|
-
return e.map((
|
|
166
|
+
const s = e.map((o) => Object.values(o));
|
|
167
|
+
function d(o) {
|
|
168
|
+
return e.map((i) => i[o], { skipVoid: !1 });
|
|
169
169
|
}
|
|
170
170
|
return {
|
|
171
171
|
register: n,
|
|
172
|
-
getByName:
|
|
173
|
-
listStore:
|
|
172
|
+
getByName: d,
|
|
173
|
+
listStore: s
|
|
174
174
|
};
|
|
175
175
|
});
|
|
176
|
-
function
|
|
177
|
-
return I(
|
|
176
|
+
function Pe(t) {
|
|
177
|
+
return I(je, t);
|
|
178
178
|
}
|
|
179
|
-
const
|
|
179
|
+
const Ae = (t, e) => {
|
|
180
180
|
e.register(t.name, t);
|
|
181
|
-
},
|
|
181
|
+
}, Be = 6e3, Re = B("last_ping", "global"), $e = (t) => `${t}/api/v1/ping`, Ce = async (t) => {
|
|
182
182
|
try {
|
|
183
|
-
const e = Date.now(), r =
|
|
183
|
+
const e = Date.now(), r = z.get(Re);
|
|
184
184
|
let n = 0;
|
|
185
|
-
if (r.isSet() && (n = r.json() ?? 0), n && e - n <
|
|
185
|
+
if (r.isSet() && (n = r.json() ?? 0), n && e - n < Be)
|
|
186
186
|
return !0;
|
|
187
|
-
const
|
|
187
|
+
const s = $e(t.apiUrl), d = {
|
|
188
188
|
projectId: t.projectId,
|
|
189
189
|
path: window.location.pathname
|
|
190
|
-
},
|
|
190
|
+
}, o = JSON.stringify(d), i = {
|
|
191
191
|
"Content-Type": "application/json"
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
const
|
|
192
|
+
}, a = document.getElementById("picked_script"), f = a == null ? void 0 : a.dataset.verceltoken;
|
|
193
|
+
f && (i["x-vercel-protection-bypass"] = f);
|
|
194
|
+
const k = (await fetch(s, {
|
|
195
195
|
method: "POST",
|
|
196
|
-
headers:
|
|
197
|
-
body:
|
|
196
|
+
headers: i,
|
|
197
|
+
body: o
|
|
198
198
|
})).ok;
|
|
199
|
-
return
|
|
199
|
+
return k && r.set(e), k;
|
|
200
200
|
} catch (e) {
|
|
201
|
-
return
|
|
201
|
+
return v("error", e), !1;
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
|
-
function
|
|
204
|
+
function J(t) {
|
|
205
205
|
const e = typeof window < "u", r = {
|
|
206
206
|
client: t,
|
|
207
207
|
responses: t.responses.listStore.getState(),
|
|
@@ -213,438 +213,502 @@ function Re(t) {
|
|
|
213
213
|
};
|
|
214
214
|
return Object.freeze(r);
|
|
215
215
|
}
|
|
216
|
-
const
|
|
217
|
-
const e =
|
|
218
|
-
register(
|
|
216
|
+
const ze = x("predicate"), Oe = w(({ client: t }) => {
|
|
217
|
+
const e = ze.store({}), r = E(e, {
|
|
218
|
+
register(i, a) {
|
|
219
219
|
return {
|
|
220
|
-
...
|
|
221
|
-
[
|
|
222
|
-
name:
|
|
223
|
-
predicate:
|
|
220
|
+
...i,
|
|
221
|
+
[a.name]: {
|
|
222
|
+
name: a.name,
|
|
223
|
+
predicate: a.predicate
|
|
224
224
|
}
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
|
-
function n(
|
|
229
|
-
e.getState()[
|
|
228
|
+
function n(i, a) {
|
|
229
|
+
e.getState()[i] && v(
|
|
230
230
|
"warn",
|
|
231
|
-
`Predicate '${
|
|
232
|
-
), r.register(Object.freeze({ name:
|
|
231
|
+
`Predicate '${i}' already registered. Registering again will override the previous registration.`
|
|
232
|
+
), r.register(Object.freeze({ name: i, predicate: a }));
|
|
233
233
|
}
|
|
234
|
-
const
|
|
235
|
-
function
|
|
236
|
-
return e.map((
|
|
234
|
+
const s = e.map((i) => Object.values(i));
|
|
235
|
+
function d(i) {
|
|
236
|
+
return e.map((a) => {
|
|
237
|
+
var f;
|
|
238
|
+
return (f = a[i]) == null ? void 0 : f.predicate;
|
|
239
|
+
}, { skipVoid: !1 });
|
|
240
|
+
}
|
|
241
|
+
function o(i) {
|
|
242
|
+
const a = q(() => {
|
|
243
|
+
}, {
|
|
244
|
+
skipVoid: !1
|
|
245
|
+
}), f = $(async () => {
|
|
246
|
+
const y = d(i).getState();
|
|
247
|
+
if (!y)
|
|
248
|
+
return;
|
|
249
|
+
const k = J(t);
|
|
250
|
+
return () => y(k);
|
|
251
|
+
});
|
|
252
|
+
return F({
|
|
253
|
+
source: { responses: t.responses.listStore, fields: t.fields.listStore },
|
|
254
|
+
target: f
|
|
255
|
+
}), F({
|
|
256
|
+
clock: f.doneData,
|
|
257
|
+
filter: (y) => y !== void 0,
|
|
258
|
+
target: a
|
|
259
|
+
}), f(), a;
|
|
237
260
|
}
|
|
238
261
|
return {
|
|
239
262
|
register: n,
|
|
240
|
-
getByName:
|
|
241
|
-
listStore:
|
|
263
|
+
getByName: d,
|
|
264
|
+
listStore: s,
|
|
265
|
+
getEvokablePredicate: o
|
|
242
266
|
};
|
|
243
267
|
});
|
|
244
|
-
function
|
|
245
|
-
return I(
|
|
268
|
+
function De(t) {
|
|
269
|
+
return I(Oe, t);
|
|
246
270
|
}
|
|
247
|
-
const
|
|
271
|
+
const Ue = (t, e, r) => {
|
|
248
272
|
r.register(t, e);
|
|
249
|
-
},
|
|
250
|
-
const e =
|
|
251
|
-
register(
|
|
273
|
+
}, L = x("feature"), Ve = w(({ client: t }) => {
|
|
274
|
+
const e = L.store({}), r = L.store([]), n = E(e, {
|
|
275
|
+
register(c, u) {
|
|
252
276
|
return {
|
|
253
|
-
...
|
|
254
|
-
[
|
|
277
|
+
...c,
|
|
278
|
+
[u.id]: u.feature
|
|
255
279
|
};
|
|
256
280
|
}
|
|
257
281
|
});
|
|
258
|
-
function
|
|
259
|
-
e.getState()[
|
|
282
|
+
function s(c, u) {
|
|
283
|
+
e.getState()[c] && v(
|
|
260
284
|
"warn",
|
|
261
|
-
`Feature '${
|
|
285
|
+
`Feature '${c}' already registered. Registering again will override the previous registration.`
|
|
262
286
|
);
|
|
263
287
|
const p = {
|
|
264
|
-
id:
|
|
288
|
+
id: c,
|
|
265
289
|
feature: {
|
|
266
|
-
...
|
|
267
|
-
id:
|
|
290
|
+
...u,
|
|
291
|
+
id: c
|
|
268
292
|
}
|
|
269
293
|
};
|
|
270
294
|
n.register(
|
|
271
295
|
Object.freeze({
|
|
272
|
-
id:
|
|
296
|
+
id: c,
|
|
273
297
|
feature: p
|
|
274
298
|
})
|
|
275
299
|
);
|
|
276
300
|
}
|
|
277
|
-
const
|
|
301
|
+
const d = $(
|
|
278
302
|
async ({
|
|
279
|
-
id:
|
|
280
|
-
key:
|
|
281
|
-
storage:
|
|
303
|
+
id: c,
|
|
304
|
+
key: u,
|
|
305
|
+
storage: l = "local"
|
|
282
306
|
}) => {
|
|
283
|
-
const p =
|
|
284
|
-
return
|
|
307
|
+
const p = B(`feature:${c}:${u}`, "global"), S = (l === "session" ? O : z).get(p).boolean();
|
|
308
|
+
return S === null ? null : { id: c, key: u, bucket: S, storage: l };
|
|
285
309
|
}
|
|
286
|
-
),
|
|
287
|
-
if (!
|
|
310
|
+
), o = $((c) => {
|
|
311
|
+
if (!c)
|
|
288
312
|
return null;
|
|
289
|
-
const
|
|
290
|
-
(
|
|
291
|
-
}),
|
|
313
|
+
const u = B(`feature:${c.id}:${c.key}`, "global");
|
|
314
|
+
(c.storage === "session" ? O : z).set(u, c.bucket);
|
|
315
|
+
}), i = /* @__PURE__ */ new Map(), a = re({
|
|
292
316
|
source: { allFeaturesStore: e, resolvedFeaturesStore: r },
|
|
293
|
-
effect: async ({ allFeaturesStore:
|
|
294
|
-
const
|
|
295
|
-
(
|
|
317
|
+
effect: async ({ allFeaturesStore: c, resolvedFeaturesStore: u }, { id: l, decide: p, key: g }) => {
|
|
318
|
+
const S = u.find(
|
|
319
|
+
(R) => R.id === l && R.key === g
|
|
296
320
|
);
|
|
297
|
-
if (
|
|
298
|
-
return
|
|
299
|
-
const
|
|
300
|
-
if (!
|
|
301
|
-
throw new Error(`Feature with id '${
|
|
302
|
-
const
|
|
303
|
-
if (
|
|
304
|
-
const
|
|
305
|
-
return { id:
|
|
321
|
+
if (S)
|
|
322
|
+
return S;
|
|
323
|
+
const b = c[l];
|
|
324
|
+
if (!b)
|
|
325
|
+
throw new Error(`Feature with id '${l}' not found`);
|
|
326
|
+
const j = i.get(`${l}:${g}`);
|
|
327
|
+
if (j !== void 0) {
|
|
328
|
+
const R = await j;
|
|
329
|
+
return { id: b.id, bucket: R, key: g, storage: b.feature.storage };
|
|
306
330
|
}
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
const
|
|
310
|
-
return { id:
|
|
331
|
+
const N = p();
|
|
332
|
+
i.set(`${l}:${g}`, N);
|
|
333
|
+
const Z = await N;
|
|
334
|
+
return { id: b.id, bucket: Z, key: g, storage: b.feature.storage };
|
|
311
335
|
}
|
|
312
336
|
});
|
|
313
|
-
|
|
337
|
+
F({
|
|
314
338
|
clock: n.register,
|
|
315
|
-
fn: (
|
|
316
|
-
const { id:
|
|
317
|
-
return { id:
|
|
339
|
+
fn: (c) => {
|
|
340
|
+
const { id: u, feature: l } = c;
|
|
341
|
+
return { id: u, key: l.feature.key, storage: l.feature.storage };
|
|
318
342
|
},
|
|
319
|
-
target:
|
|
320
|
-
}),
|
|
343
|
+
target: d
|
|
344
|
+
}), F({
|
|
321
345
|
source: e,
|
|
322
|
-
clock:
|
|
323
|
-
fn: (
|
|
324
|
-
var
|
|
325
|
-
const { id:
|
|
326
|
-
return
|
|
346
|
+
clock: a.doneData,
|
|
347
|
+
fn: (c, u) => {
|
|
348
|
+
var b;
|
|
349
|
+
const { id: l, bucket: p, storage: g } = u, S = (b = c[l]) == null ? void 0 : b.feature.key;
|
|
350
|
+
return S ? { key: S, id: l, bucket: p, storage: g } : null;
|
|
327
351
|
},
|
|
328
|
-
target:
|
|
352
|
+
target: o
|
|
329
353
|
});
|
|
330
|
-
const
|
|
354
|
+
const f = D({ allFeaturesStore: e, resolvedFeaturesStore: r }).map(
|
|
331
355
|
({
|
|
332
|
-
allFeaturesStore:
|
|
333
|
-
resolvedFeaturesStore:
|
|
334
|
-
}) => Object.values(
|
|
335
|
-
const p =
|
|
336
|
-
(
|
|
356
|
+
allFeaturesStore: c,
|
|
357
|
+
resolvedFeaturesStore: u
|
|
358
|
+
}) => Object.values(c).map((l) => {
|
|
359
|
+
const p = u.find(
|
|
360
|
+
(g) => g.id === l.id && g.key === l.feature.key
|
|
337
361
|
);
|
|
338
362
|
return p ? {
|
|
339
|
-
id:
|
|
340
|
-
name:
|
|
341
|
-
key:
|
|
342
|
-
getBucket: () => ({ id:
|
|
363
|
+
id: l.id,
|
|
364
|
+
name: l.feature.name,
|
|
365
|
+
key: l.feature.key,
|
|
366
|
+
getBucket: () => ({ id: l.id, bucket: p.bucket }),
|
|
343
367
|
isResolved: !0
|
|
344
368
|
} : {
|
|
345
|
-
id:
|
|
346
|
-
name:
|
|
347
|
-
key:
|
|
348
|
-
getBucket: async () => await
|
|
369
|
+
id: l.id,
|
|
370
|
+
name: l.feature.name,
|
|
371
|
+
key: l.feature.key,
|
|
372
|
+
getBucket: async () => await a(l.feature),
|
|
349
373
|
isResolved: !1
|
|
350
374
|
};
|
|
351
375
|
})
|
|
352
376
|
);
|
|
353
|
-
|
|
354
|
-
clock:
|
|
377
|
+
F({
|
|
378
|
+
clock: a.doneData,
|
|
355
379
|
source: { resolvedFeatures: r },
|
|
356
|
-
filter: ({ resolvedFeatures:
|
|
357
|
-
(
|
|
380
|
+
filter: ({ resolvedFeatures: c }, { id: u, key: l }) => !c.some(
|
|
381
|
+
(g) => g.id === u && g.key === l
|
|
358
382
|
),
|
|
359
|
-
fn: (
|
|
360
|
-
target: t.eventBus.prepend((
|
|
383
|
+
fn: (c, u) => u,
|
|
384
|
+
target: t.eventBus.prepend((c) => ({
|
|
361
385
|
type: "feature_decide",
|
|
362
|
-
feature:
|
|
386
|
+
feature: c
|
|
363
387
|
}))
|
|
364
|
-
}),
|
|
365
|
-
clock: [
|
|
388
|
+
}), F({
|
|
389
|
+
clock: [d.doneData, a.doneData],
|
|
366
390
|
source: r,
|
|
367
|
-
fn: (
|
|
368
|
-
(p) => p.id ===
|
|
369
|
-
) ?
|
|
391
|
+
fn: (c, u) => !u || c.some(
|
|
392
|
+
(p) => p.id === u.id && p.key === u.key
|
|
393
|
+
) ? c : [...c, u],
|
|
370
394
|
target: r
|
|
371
395
|
});
|
|
372
|
-
function
|
|
373
|
-
return
|
|
396
|
+
function y(c) {
|
|
397
|
+
return f.map((u) => u.find((l) => l.id === c));
|
|
398
|
+
}
|
|
399
|
+
function k(c) {
|
|
400
|
+
return e.map((u) => u[c], { skipVoid: !1 });
|
|
401
|
+
}
|
|
402
|
+
function m(c) {
|
|
403
|
+
const u = q(
|
|
404
|
+
async () => {
|
|
405
|
+
},
|
|
406
|
+
{ skipVoid: !1 }
|
|
407
|
+
), l = $(async () => {
|
|
408
|
+
const p = y(c).getState();
|
|
409
|
+
if (p)
|
|
410
|
+
return async () => (await p.getBucket()).bucket;
|
|
411
|
+
});
|
|
412
|
+
return F({
|
|
413
|
+
source: r,
|
|
414
|
+
filter: (p) => p.some((g) => g.id === c),
|
|
415
|
+
target: l
|
|
416
|
+
}), F({
|
|
417
|
+
clock: l.doneData,
|
|
418
|
+
filter: (p) => p !== void 0,
|
|
419
|
+
target: u
|
|
420
|
+
}), l(), u;
|
|
374
421
|
}
|
|
375
422
|
return {
|
|
376
|
-
register:
|
|
377
|
-
|
|
378
|
-
|
|
423
|
+
register: s,
|
|
424
|
+
getById: y,
|
|
425
|
+
getByName: k,
|
|
426
|
+
listStore: f,
|
|
427
|
+
getEvokableFeature: m
|
|
379
428
|
};
|
|
380
429
|
});
|
|
381
|
-
function
|
|
382
|
-
return I(
|
|
430
|
+
function Me(t) {
|
|
431
|
+
return I(Ve, t);
|
|
383
432
|
}
|
|
384
|
-
const
|
|
433
|
+
const Ne = (t, e, r) => {
|
|
385
434
|
r.register(t, e);
|
|
386
|
-
},
|
|
387
|
-
function
|
|
435
|
+
}, A = x("history");
|
|
436
|
+
function G(t, e) {
|
|
388
437
|
return {
|
|
389
438
|
// eslint-disable-next-line sonarjs/pseudo-random
|
|
390
|
-
id:
|
|
439
|
+
id: ue(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
391
440
|
node: e,
|
|
392
441
|
at: Date.now(),
|
|
393
442
|
experienceId: t
|
|
394
443
|
};
|
|
395
444
|
}
|
|
396
|
-
const
|
|
397
|
-
const t =
|
|
398
|
-
t.on(e, (
|
|
399
|
-
entries: [...
|
|
400
|
-
})), t.on(r, (
|
|
445
|
+
const Te = w(() => {
|
|
446
|
+
const t = A.store({ entries: [] }), e = A.event(), r = A.event(), n = A.event(), s = A.event();
|
|
447
|
+
t.on(e, (o, i) => ({
|
|
448
|
+
entries: [...o.entries, G(i.experienceId, i.node)]
|
|
449
|
+
})), t.on(r, (o, i) => ({
|
|
401
450
|
entries: [
|
|
402
|
-
...
|
|
403
|
-
|
|
451
|
+
...o.entries.slice(0, -1),
|
|
452
|
+
G(i.experienceId, i.node)
|
|
404
453
|
]
|
|
405
|
-
})), t.on(
|
|
406
|
-
function
|
|
407
|
-
const
|
|
408
|
-
for (let
|
|
409
|
-
const
|
|
410
|
-
if (!(!
|
|
411
|
-
if (
|
|
412
|
-
|
|
454
|
+
})), t.on(s, (o, i) => i);
|
|
455
|
+
function d(o, i) {
|
|
456
|
+
const a = { lastStepIndex: -1, secondLastStepIndex: -1 };
|
|
457
|
+
for (let f = o.length - 1; f >= 0; f--) {
|
|
458
|
+
const y = o[f], k = y == null ? void 0 : y.node;
|
|
459
|
+
if (!(!k || !oe(k)) && !(i && (y == null ? void 0 : y.experienceId) !== i))
|
|
460
|
+
if (a.lastStepIndex === -1)
|
|
461
|
+
a.lastStepIndex = f;
|
|
413
462
|
else {
|
|
414
|
-
|
|
463
|
+
a.secondLastStepIndex = f;
|
|
415
464
|
break;
|
|
416
465
|
}
|
|
417
466
|
}
|
|
418
|
-
return
|
|
467
|
+
return a;
|
|
419
468
|
}
|
|
420
|
-
return t.on(n, (
|
|
421
|
-
const { secondLastStepIndex:
|
|
469
|
+
return t.on(n, (o, i) => {
|
|
470
|
+
const { secondLastStepIndex: a } = d(o.entries, i.experienceId), f = a !== -1 ? o.entries.slice(0, a + 1) : o.entries;
|
|
422
471
|
return {
|
|
423
|
-
...
|
|
424
|
-
entries:
|
|
472
|
+
...o,
|
|
473
|
+
entries: f
|
|
425
474
|
};
|
|
426
475
|
}), {
|
|
427
476
|
push: e,
|
|
428
477
|
replace: r,
|
|
429
478
|
back: n,
|
|
430
|
-
restore:
|
|
431
|
-
entriesStore: t.map((
|
|
479
|
+
restore: s,
|
|
480
|
+
entriesStore: t.map((o) => o.entries)
|
|
432
481
|
};
|
|
433
482
|
});
|
|
434
|
-
function
|
|
435
|
-
return I(
|
|
483
|
+
function _e() {
|
|
484
|
+
return I(Te);
|
|
436
485
|
}
|
|
437
|
-
const
|
|
438
|
-
const t =
|
|
439
|
-
register(
|
|
486
|
+
const Le = () => U(), Ge = x("field"), He = w(() => {
|
|
487
|
+
const t = Ge.store({}), e = E(t, {
|
|
488
|
+
register(i, a) {
|
|
440
489
|
return {
|
|
441
|
-
...
|
|
442
|
-
[
|
|
490
|
+
...i,
|
|
491
|
+
[a.field.id]: a.field
|
|
443
492
|
};
|
|
444
493
|
}
|
|
445
494
|
});
|
|
446
|
-
function r(
|
|
447
|
-
e.register({ field:
|
|
495
|
+
function r(i) {
|
|
496
|
+
e.register({ field: i });
|
|
448
497
|
}
|
|
449
|
-
function n(
|
|
450
|
-
const
|
|
451
|
-
if (!
|
|
498
|
+
function n(i, a) {
|
|
499
|
+
const f = d(i).getState();
|
|
500
|
+
if (!f)
|
|
452
501
|
return;
|
|
453
|
-
const
|
|
454
|
-
...
|
|
502
|
+
const y = Object.assign({}, f, {
|
|
503
|
+
...a
|
|
455
504
|
});
|
|
456
|
-
e.register({ field: { ...
|
|
505
|
+
e.register({ field: { ...y } });
|
|
457
506
|
}
|
|
458
|
-
const
|
|
459
|
-
function
|
|
460
|
-
return t.map((
|
|
507
|
+
const s = t.map((i) => Object.values(i));
|
|
508
|
+
function d(i) {
|
|
509
|
+
return t.map((a) => a[i] || null);
|
|
461
510
|
}
|
|
462
|
-
function
|
|
463
|
-
return t.map((
|
|
511
|
+
function o(i) {
|
|
512
|
+
return t.map((a) => Object.values(a).find((f) => f.name === i) || null);
|
|
464
513
|
}
|
|
465
514
|
return {
|
|
466
515
|
register: r,
|
|
467
516
|
update: n,
|
|
468
|
-
getById:
|
|
469
|
-
listStore:
|
|
470
|
-
getByName:
|
|
517
|
+
getById: d,
|
|
518
|
+
listStore: s,
|
|
519
|
+
getByName: o
|
|
471
520
|
};
|
|
472
521
|
});
|
|
473
|
-
function
|
|
474
|
-
return I(
|
|
522
|
+
function qe() {
|
|
523
|
+
return I(He);
|
|
475
524
|
}
|
|
476
|
-
const
|
|
525
|
+
const Ke = (t, e) => {
|
|
477
526
|
e.register(t);
|
|
478
|
-
},
|
|
479
|
-
const t =
|
|
480
|
-
register(
|
|
527
|
+
}, We = x("action"), Ye = w(() => {
|
|
528
|
+
const t = We.store({}), e = E(t, {
|
|
529
|
+
register(o, i) {
|
|
481
530
|
return {
|
|
482
|
-
...
|
|
483
|
-
[
|
|
484
|
-
name:
|
|
485
|
-
action:
|
|
531
|
+
...o,
|
|
532
|
+
[i.name]: {
|
|
533
|
+
name: i.name,
|
|
534
|
+
action: i.action
|
|
486
535
|
}
|
|
487
536
|
};
|
|
488
537
|
}
|
|
489
538
|
});
|
|
490
|
-
function r(
|
|
491
|
-
e.register({ name:
|
|
539
|
+
function r(o, i) {
|
|
540
|
+
e.register({ name: o, action: i });
|
|
541
|
+
}
|
|
542
|
+
const n = t.map((o) => Object.values(o));
|
|
543
|
+
function s(o) {
|
|
544
|
+
return t.map((i) => i[o], { skipVoid: !1 });
|
|
492
545
|
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
546
|
+
function d(o) {
|
|
547
|
+
return t.map(
|
|
548
|
+
(i) => {
|
|
549
|
+
const a = i[o];
|
|
550
|
+
return a ? a.action : void 0;
|
|
551
|
+
},
|
|
552
|
+
{ skipVoid: !1 }
|
|
553
|
+
);
|
|
496
554
|
}
|
|
497
555
|
return {
|
|
498
556
|
register: r,
|
|
499
|
-
getByName:
|
|
500
|
-
listStore: n
|
|
557
|
+
getByName: s,
|
|
558
|
+
listStore: n,
|
|
559
|
+
getEvokableAction: d
|
|
501
560
|
};
|
|
502
561
|
});
|
|
503
|
-
function
|
|
504
|
-
return I(
|
|
562
|
+
function Je() {
|
|
563
|
+
return I(Ye);
|
|
505
564
|
}
|
|
506
|
-
const
|
|
565
|
+
const Qe = (t, e, r) => {
|
|
507
566
|
r.register(t, e);
|
|
508
567
|
};
|
|
509
|
-
function
|
|
568
|
+
function H(t) {
|
|
510
569
|
return typeof t > "u" || t === null || t === "" || Array.isArray(t) && !t.length;
|
|
511
570
|
}
|
|
512
|
-
const
|
|
513
|
-
const e =
|
|
514
|
-
register(
|
|
571
|
+
const Xe = x("response"), Ze = w(({ client: t }) => {
|
|
572
|
+
const e = Xe.store({}), r = U(), n = U(), s = E(e, {
|
|
573
|
+
register(m, c) {
|
|
515
574
|
return {
|
|
516
|
-
...
|
|
517
|
-
[
|
|
575
|
+
...m,
|
|
576
|
+
[c.fieldId]: c.response
|
|
518
577
|
};
|
|
519
578
|
},
|
|
520
|
-
registerBatch(
|
|
579
|
+
registerBatch(m, c) {
|
|
521
580
|
return {
|
|
522
|
-
...
|
|
523
|
-
...
|
|
581
|
+
...m,
|
|
582
|
+
...c
|
|
524
583
|
};
|
|
525
584
|
},
|
|
526
|
-
clear(
|
|
527
|
-
const { [
|
|
528
|
-
return
|
|
585
|
+
clear(m, c) {
|
|
586
|
+
const { [c]: u, ...l } = m;
|
|
587
|
+
return l;
|
|
529
588
|
},
|
|
530
589
|
clearAll() {
|
|
531
590
|
return {};
|
|
532
591
|
}
|
|
533
592
|
});
|
|
534
|
-
function
|
|
535
|
-
|
|
593
|
+
function d(m, c) {
|
|
594
|
+
if (typeof m == "string") {
|
|
595
|
+
if (c === void 0)
|
|
596
|
+
throw new Error("Response is required when registering a single field");
|
|
597
|
+
s.register({ fieldId: m, response: c });
|
|
598
|
+
} else
|
|
599
|
+
s.registerBatch(m);
|
|
536
600
|
}
|
|
537
|
-
async function
|
|
538
|
-
const
|
|
601
|
+
async function o(m) {
|
|
602
|
+
const c = [];
|
|
539
603
|
return await Promise.allSettled(
|
|
540
|
-
Object.entries(
|
|
541
|
-
let
|
|
542
|
-
const
|
|
543
|
-
if (!
|
|
544
|
-
|
|
545
|
-
fieldId:
|
|
546
|
-
userMessage: `Field '${
|
|
547
|
-
systemMessage: `No field with ID '${
|
|
548
|
-
value:
|
|
604
|
+
Object.entries(m).map(async ([u, l]) => {
|
|
605
|
+
let p = l;
|
|
606
|
+
const g = t.fields.getById(u).getState();
|
|
607
|
+
if (!g) {
|
|
608
|
+
c.push({
|
|
609
|
+
fieldId: u,
|
|
610
|
+
userMessage: `Field '${u}' not found`,
|
|
611
|
+
systemMessage: `No field with ID '${u}' exists. Available field IDs are: ${Object.keys(t.fields.listStore.getState()).join(",")}.`,
|
|
612
|
+
value: p
|
|
549
613
|
});
|
|
550
614
|
return;
|
|
551
615
|
}
|
|
552
|
-
if (
|
|
553
|
-
const
|
|
554
|
-
$input:
|
|
616
|
+
if (g.multiple && (typeof p == "string" || typeof p == "number" || typeof p == "boolean") && (p = [p]), g.validation && !de(g.validation) && !H(p)) {
|
|
617
|
+
const S = await P(t, g.validation, {
|
|
618
|
+
$input: p
|
|
555
619
|
});
|
|
556
|
-
if (typeof
|
|
557
|
-
|
|
558
|
-
fieldId:
|
|
559
|
-
userMessage:
|
|
560
|
-
systemMessage: `Field validation resulted in an error: ${
|
|
561
|
-
value:
|
|
620
|
+
if (typeof S == "string") {
|
|
621
|
+
c.push({
|
|
622
|
+
fieldId: u,
|
|
623
|
+
userMessage: S,
|
|
624
|
+
systemMessage: `Field validation resulted in an error: ${S}.`,
|
|
625
|
+
value: p
|
|
562
626
|
});
|
|
563
627
|
return;
|
|
564
628
|
}
|
|
565
|
-
if (
|
|
566
|
-
|
|
567
|
-
fieldId:
|
|
629
|
+
if (S === !1) {
|
|
630
|
+
c.push({
|
|
631
|
+
fieldId: u,
|
|
568
632
|
userMessage: "This field is invalid",
|
|
569
633
|
systemMessage: "Field validation resulted in an unspecified error.",
|
|
570
|
-
value:
|
|
634
|
+
value: p
|
|
571
635
|
});
|
|
572
636
|
return;
|
|
573
637
|
}
|
|
574
638
|
}
|
|
575
|
-
if (
|
|
576
|
-
|
|
577
|
-
fieldId:
|
|
639
|
+
if (g.required && H(p)) {
|
|
640
|
+
c.push({
|
|
641
|
+
fieldId: u,
|
|
578
642
|
userMessage: "This field is required",
|
|
579
643
|
systemMessage: "Field is required.",
|
|
580
|
-
value:
|
|
644
|
+
value: p
|
|
581
645
|
});
|
|
582
646
|
return;
|
|
583
647
|
}
|
|
584
|
-
if (!
|
|
585
|
-
|
|
586
|
-
fieldId:
|
|
648
|
+
if (!g.multiple && Array.isArray(p) && p.length > 1) {
|
|
649
|
+
c.push({
|
|
650
|
+
fieldId: u,
|
|
587
651
|
userMessage: "This field expects a single response",
|
|
588
652
|
systemMessage: "Field expects a single response.",
|
|
589
|
-
value:
|
|
653
|
+
value: p
|
|
590
654
|
});
|
|
591
655
|
return;
|
|
592
656
|
}
|
|
593
|
-
if (
|
|
594
|
-
const
|
|
595
|
-
Array.isArray(
|
|
596
|
-
fieldId:
|
|
657
|
+
if (g.options) {
|
|
658
|
+
const S = g.options.map((j) => j.value), b = Array.isArray(p) ? p : [p];
|
|
659
|
+
Array.isArray(p) && (b.every((j) => S.includes(j)) || c.push({
|
|
660
|
+
fieldId: u,
|
|
597
661
|
userMessage: "This field expects a valid option",
|
|
598
|
-
systemMessage: `Field expects a valid option. Valid options are: ${
|
|
599
|
-
value:
|
|
662
|
+
systemMessage: `Field expects a valid option. Valid options are: ${S.join(", ")}`,
|
|
663
|
+
value: p
|
|
600
664
|
}));
|
|
601
665
|
}
|
|
602
666
|
})
|
|
603
|
-
), { responsesToCommit:
|
|
667
|
+
), { responsesToCommit: m, validationErrors: c };
|
|
604
668
|
}
|
|
605
|
-
async function
|
|
606
|
-
const { responsesToCommit:
|
|
607
|
-
return
|
|
669
|
+
async function i(m) {
|
|
670
|
+
const { responsesToCommit: c, validationErrors: u } = await o(m);
|
|
671
|
+
return u.length ? { errors: u } : (s.registerBatch(c), { errors: [] });
|
|
608
672
|
}
|
|
609
|
-
const
|
|
610
|
-
fieldId:
|
|
611
|
-
value:
|
|
673
|
+
const a = e.map((m) => m), f = e.map((m) => Object.keys(m).map((u) => ({
|
|
674
|
+
fieldId: u,
|
|
675
|
+
value: m[u]
|
|
612
676
|
})));
|
|
613
|
-
function
|
|
614
|
-
const
|
|
615
|
-
return
|
|
677
|
+
function y(m) {
|
|
678
|
+
const c = t.fields.getById(m), u = e.map((l) => l[m] || null);
|
|
679
|
+
return D({ f: c, r: u }, ({ f: l, r: p }) => p || (l != null && l.defaultValue ? l.defaultValue : null));
|
|
616
680
|
}
|
|
617
|
-
function
|
|
618
|
-
const
|
|
619
|
-
return
|
|
620
|
-
const
|
|
621
|
-
return
|
|
681
|
+
function k(m) {
|
|
682
|
+
const c = t.fields.getByName(m);
|
|
683
|
+
return D({ f: c, s: e }, ({ f: u, s: l }) => {
|
|
684
|
+
const p = u && l[u.id] || null;
|
|
685
|
+
return p || (u != null && u.defaultValue ? u.defaultValue : null);
|
|
622
686
|
});
|
|
623
687
|
}
|
|
624
|
-
return
|
|
688
|
+
return F({
|
|
625
689
|
clock: r,
|
|
626
|
-
target:
|
|
627
|
-
}),
|
|
690
|
+
target: s.clearAll
|
|
691
|
+
}), F({
|
|
628
692
|
clock: n,
|
|
629
|
-
target:
|
|
693
|
+
target: s.clear
|
|
630
694
|
}), {
|
|
631
|
-
register:
|
|
695
|
+
register: d,
|
|
632
696
|
clearAll: r,
|
|
633
697
|
clear: n,
|
|
634
|
-
commit:
|
|
635
|
-
getResponsesToCommit:
|
|
636
|
-
listStore:
|
|
637
|
-
getAllStore:
|
|
638
|
-
getByFieldId:
|
|
639
|
-
getByFieldName:
|
|
698
|
+
commit: i,
|
|
699
|
+
getResponsesToCommit: o,
|
|
700
|
+
listStore: f,
|
|
701
|
+
getAllStore: a,
|
|
702
|
+
getByFieldId: y,
|
|
703
|
+
getByFieldName: k
|
|
640
704
|
};
|
|
641
705
|
});
|
|
642
|
-
function
|
|
643
|
-
return I(
|
|
706
|
+
function et(t) {
|
|
707
|
+
return I(Ze, t);
|
|
644
708
|
}
|
|
645
|
-
const
|
|
646
|
-
function
|
|
647
|
-
if (
|
|
709
|
+
const tt = () => "0.0.32-next.1";
|
|
710
|
+
function rt() {
|
|
711
|
+
if (V()) {
|
|
648
712
|
const t = [
|
|
649
713
|
document.currentScript,
|
|
650
714
|
document.getElementById("picked_script"),
|
|
@@ -658,70 +722,70 @@ function Ze() {
|
|
|
658
722
|
}
|
|
659
723
|
return "https://api.picked.app";
|
|
660
724
|
}
|
|
661
|
-
function
|
|
725
|
+
function nt() {
|
|
662
726
|
if (!M())
|
|
663
727
|
return {};
|
|
664
728
|
const t = new URLSearchParams(window.location.search), e = {}, r = /* @__PURE__ */ new Set();
|
|
665
|
-
for (const [
|
|
666
|
-
|
|
667
|
-
for (const
|
|
668
|
-
const
|
|
669
|
-
e[
|
|
729
|
+
for (const [s] of t.entries())
|
|
730
|
+
s.startsWith("picked-") && r.add(s);
|
|
731
|
+
for (const s of r) {
|
|
732
|
+
const d = s.replace("picked-", "");
|
|
733
|
+
e[d] = t.getAll(s);
|
|
670
734
|
}
|
|
671
|
-
const n =
|
|
735
|
+
const n = B("s");
|
|
672
736
|
if (r.size > 0)
|
|
673
|
-
|
|
737
|
+
O.set(n, e);
|
|
674
738
|
else {
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
677
|
-
return
|
|
739
|
+
const s = O.get(n);
|
|
740
|
+
if (s)
|
|
741
|
+
return s.json() || {};
|
|
678
742
|
}
|
|
679
743
|
return e;
|
|
680
744
|
}
|
|
681
|
-
function
|
|
682
|
-
if (
|
|
745
|
+
function st() {
|
|
746
|
+
if (pe())
|
|
683
747
|
return crypto.randomUUID();
|
|
684
748
|
const t = Date.now().toString(36), e = Math.random().toString(36).substring(2, 15), r = Math.random().toString(36).substring(2, 15), n = Math.random().toString(36).substring(2, 15);
|
|
685
749
|
return `${t}-${e}-${r}-${n}`;
|
|
686
750
|
}
|
|
687
|
-
const
|
|
688
|
-
const t =
|
|
751
|
+
const it = B("session", "global"), ot = () => {
|
|
752
|
+
const t = z.get(it);
|
|
689
753
|
let e;
|
|
690
754
|
t.isSet() && (e = t.json());
|
|
691
|
-
const r = (
|
|
692
|
-
id:
|
|
693
|
-
isUser:
|
|
694
|
-
identifiers:
|
|
755
|
+
const r = (s) => t.set({
|
|
756
|
+
id: s.id,
|
|
757
|
+
isUser: s.isUser,
|
|
758
|
+
identifiers: s.identifiers
|
|
695
759
|
}), n = {
|
|
696
|
-
id: (e == null ? void 0 : e.id) ??
|
|
760
|
+
id: (e == null ? void 0 : e.id) ?? st(),
|
|
697
761
|
isUser: (e == null ? void 0 : e.isUser) ?? void 0,
|
|
698
762
|
identifiers: (e == null ? void 0 : e.identifiers) ?? void 0,
|
|
699
|
-
setIsUser(
|
|
700
|
-
this.isUser =
|
|
763
|
+
setIsUser(s) {
|
|
764
|
+
this.isUser = s, r(this);
|
|
701
765
|
},
|
|
702
|
-
setIdentifier(
|
|
703
|
-
this.identifiers = { ...this.identifiers, [
|
|
766
|
+
setIdentifier(s, d) {
|
|
767
|
+
this.identifiers = { ...this.identifiers, [s]: d }, r(this);
|
|
704
768
|
},
|
|
705
|
-
removeIdentifier(
|
|
769
|
+
removeIdentifier(s) {
|
|
706
770
|
this.identifiers && (this.identifiers = Object.fromEntries(
|
|
707
|
-
Object.entries(this.identifiers).filter(([
|
|
771
|
+
Object.entries(this.identifiers).filter(([d]) => d !== s)
|
|
708
772
|
), this.identifiers = Object.keys(this.identifiers).length ? this.identifiers : void 0, r(this));
|
|
709
773
|
}
|
|
710
774
|
};
|
|
711
775
|
return r(n), n;
|
|
712
|
-
},
|
|
713
|
-
function
|
|
776
|
+
}, at = () => le() ? ot() : null;
|
|
777
|
+
function ct() {
|
|
714
778
|
if (M())
|
|
715
779
|
return globalThis.window.pickedConfig;
|
|
716
780
|
}
|
|
717
|
-
function
|
|
781
|
+
function ut() {
|
|
718
782
|
if (!M())
|
|
719
783
|
return;
|
|
720
|
-
const t =
|
|
784
|
+
const t = ct(), e = t == null ? void 0 : t.organizationId, r = t == null ? void 0 : t.projectId;
|
|
721
785
|
return e && r ? { organizationId: e, projectId: r } : void 0;
|
|
722
786
|
}
|
|
723
|
-
function
|
|
724
|
-
if (!
|
|
787
|
+
function dt() {
|
|
788
|
+
if (!V())
|
|
725
789
|
return;
|
|
726
790
|
const t = document.getElementById("picked_script") || document.querySelector("script#picked") || // legacy support for 'cvly' script tag
|
|
727
791
|
document.getElementById("cvly");
|
|
@@ -730,16 +794,16 @@ function at() {
|
|
|
730
794
|
const e = t.dataset.organizationid || t.getAttribute("organization-id"), r = t.dataset.projectid || t.getAttribute("project-id");
|
|
731
795
|
return e && r ? { organizationId: e, projectId: r } : void 0;
|
|
732
796
|
}
|
|
733
|
-
function
|
|
797
|
+
function lt(t) {
|
|
734
798
|
const { organizationId: e, projectId: r } = t;
|
|
735
799
|
if (e && r)
|
|
736
800
|
return { organizationId: e, projectId: r };
|
|
737
|
-
const n =
|
|
801
|
+
const n = ut();
|
|
738
802
|
if (n)
|
|
739
803
|
return n;
|
|
740
|
-
const
|
|
741
|
-
if (
|
|
742
|
-
return
|
|
804
|
+
const s = dt();
|
|
805
|
+
if (s)
|
|
806
|
+
return s;
|
|
743
807
|
throw new Error(
|
|
744
808
|
`organizationId and projectId are required. You can provide them via one of:
|
|
745
809
|
(1) createClient({ organizationId, projectId }) options;
|
|
@@ -747,13 +811,13 @@ function ct(t) {
|
|
|
747
811
|
(3) a <script> tag with id 'picked_script', 'picked', or 'cvly' that includes data-organizationid/data-projectid (or organization-id/project-id) attributes.`
|
|
748
812
|
);
|
|
749
813
|
}
|
|
750
|
-
function
|
|
814
|
+
function C(t) {
|
|
751
815
|
return t == null || t === "" || Number.isNaN(t);
|
|
752
816
|
}
|
|
753
|
-
const
|
|
754
|
-
default: (t, e) =>
|
|
755
|
-
append: (t, e) => e && !
|
|
756
|
-
prepend: (t, e) => e && !
|
|
817
|
+
const pt = {
|
|
818
|
+
default: (t, e) => C(t) ? String(e ?? "") : String(t),
|
|
819
|
+
append: (t, e) => e && !C(t) ? `${t} ${e}` : t,
|
|
820
|
+
prepend: (t, e) => e && !C(t) ? `${e} ${t}` : t,
|
|
757
821
|
upper: (t) => typeof t == "string" ? t.toUpperCase() : t,
|
|
758
822
|
lower: (t) => typeof t == "string" ? t.toLowerCase() : t,
|
|
759
823
|
capitalize: (t) => typeof t == "string" ? t.charAt(0).toUpperCase() + t.slice(1) : t,
|
|
@@ -764,75 +828,75 @@ const ut = {
|
|
|
764
828
|
if (Array.isArray(t))
|
|
765
829
|
return e.format(t.map(String));
|
|
766
830
|
if (t instanceof Map) {
|
|
767
|
-
const r = Array.from(t.entries()).map(([n,
|
|
831
|
+
const r = Array.from(t.entries()).map(([n, s]) => `${n}: ${s}`);
|
|
768
832
|
return e.format(r);
|
|
769
833
|
}
|
|
770
834
|
return t instanceof Set ? e.format(Array.from(t).map(String)) : t;
|
|
771
835
|
}
|
|
772
836
|
};
|
|
773
|
-
function
|
|
837
|
+
function ft(t) {
|
|
774
838
|
return typeof t == "object" && t !== null;
|
|
775
839
|
}
|
|
776
|
-
function
|
|
840
|
+
function gt(t, e) {
|
|
777
841
|
let r = e;
|
|
778
842
|
for (const n of t.split("."))
|
|
779
|
-
if (
|
|
843
|
+
if (ft(r) && n in r)
|
|
780
844
|
r = r[n];
|
|
781
845
|
else
|
|
782
846
|
return;
|
|
783
847
|
return typeof r == "function" ? r() : r;
|
|
784
848
|
}
|
|
785
|
-
function
|
|
786
|
-
const r = t.split("|").map((
|
|
787
|
-
let
|
|
788
|
-
for (const
|
|
789
|
-
const [
|
|
790
|
-
|
|
849
|
+
function mt(t, e) {
|
|
850
|
+
const r = t.split("|").map((d) => d.trim()), n = r.shift() ?? "";
|
|
851
|
+
let s = gt(n, e);
|
|
852
|
+
for (const d of r) {
|
|
853
|
+
const [o, ...i] = d.split(":"), a = (o == null ? void 0 : o.trim()) ?? "", f = i.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), y = pt[a];
|
|
854
|
+
y && (s = y(s, f));
|
|
791
855
|
}
|
|
792
|
-
return
|
|
856
|
+
return C(s) ? "" : typeof s == "object" ? JSON.stringify(s) : String(s);
|
|
793
857
|
}
|
|
794
|
-
function
|
|
858
|
+
function ht(t, e) {
|
|
795
859
|
let r = "", n = 0;
|
|
796
860
|
for (; n < t.length; )
|
|
797
861
|
if (t[n] === "{" && t[n + 1] === "{") {
|
|
798
862
|
n += 2;
|
|
799
|
-
let
|
|
863
|
+
let s = "";
|
|
800
864
|
for (; n < t.length; ) {
|
|
801
865
|
if (t[n] === "}" && t[n + 1] === "}") {
|
|
802
866
|
n += 2;
|
|
803
867
|
break;
|
|
804
868
|
}
|
|
805
|
-
|
|
869
|
+
s += t[n++];
|
|
806
870
|
}
|
|
807
|
-
r +=
|
|
871
|
+
r += mt(s.trim(), e);
|
|
808
872
|
} else
|
|
809
873
|
r += t[n++];
|
|
810
874
|
return r;
|
|
811
875
|
}
|
|
812
|
-
class
|
|
876
|
+
class Q {
|
|
813
877
|
constructor(e) {
|
|
814
878
|
h(this, "options");
|
|
815
879
|
h(this, "isReady", !1);
|
|
816
880
|
h(this, "project");
|
|
817
881
|
h(this, "plugins", {});
|
|
818
|
-
h(this, "eventBus",
|
|
882
|
+
h(this, "eventBus", Le());
|
|
819
883
|
h(this, "organizationId");
|
|
820
884
|
h(this, "projectId");
|
|
821
885
|
h(this, "apiUrl");
|
|
822
886
|
h(this, "session");
|
|
823
887
|
h(this, "precondition");
|
|
824
888
|
h(this, "condition");
|
|
825
|
-
h(this, "searchParams",
|
|
826
|
-
h(this, "history",
|
|
827
|
-
h(this, "components",
|
|
828
|
-
h(this, "experienceInstances",
|
|
829
|
-
h(this, "experiences",
|
|
830
|
-
h(this, "frameworks",
|
|
831
|
-
h(this, "predicates",
|
|
832
|
-
h(this, "features",
|
|
833
|
-
h(this, "responses",
|
|
834
|
-
h(this, "fields",
|
|
835
|
-
h(this, "actions",
|
|
889
|
+
h(this, "searchParams", nt());
|
|
890
|
+
h(this, "history", _e());
|
|
891
|
+
h(this, "components", xe({ client: this }));
|
|
892
|
+
h(this, "experienceInstances", ae({ client: this }));
|
|
893
|
+
h(this, "experiences", ye({ client: this }));
|
|
894
|
+
h(this, "frameworks", Pe({ client: this }));
|
|
895
|
+
h(this, "predicates", De({ client: this }));
|
|
896
|
+
h(this, "features", Me({ client: this }));
|
|
897
|
+
h(this, "responses", et({ client: this }));
|
|
898
|
+
h(this, "fields", qe());
|
|
899
|
+
h(this, "actions", Je());
|
|
836
900
|
/**
|
|
837
901
|
* Interpolates a template string using values from the client's response store and/or a provided context.
|
|
838
902
|
* Supports dot-notation, modifiers, and executing functions found in the context.
|
|
@@ -876,66 +940,66 @@ class W {
|
|
|
876
940
|
* // => "Fruits: apple, banana, and cherry"
|
|
877
941
|
*/
|
|
878
942
|
h(this, "renderString", (e, r) => {
|
|
879
|
-
const n = this.responses.listStore.getState().reduce((
|
|
880
|
-
return
|
|
943
|
+
const n = this.responses.listStore.getState().reduce((s, d) => (s[d.fieldId] = d.value, s), {});
|
|
944
|
+
return ht(e, {
|
|
881
945
|
...r,
|
|
882
946
|
responses: n
|
|
883
947
|
});
|
|
884
948
|
});
|
|
885
|
-
|
|
886
|
-
const { organizationId: r, projectId: n } =
|
|
887
|
-
this.organizationId = r, this.projectId = n, this.options = Object.freeze(e), this.apiUrl = e.apiUrl ||
|
|
949
|
+
v("info", "Picked client initializing.");
|
|
950
|
+
const { organizationId: r, projectId: n } = lt(e);
|
|
951
|
+
this.organizationId = r, this.projectId = n, this.options = Object.freeze(e), this.apiUrl = e.apiUrl || rt(), this.session = at(), this.setupPlugins(), this.setupFeatures(), this.setupPredicates(), this.setupActions(), this.precondition = e.precondition, this.condition = e.condition, this.eventBus({ type: "load", version: tt() }), v("info", "Picked client initialized.");
|
|
888
952
|
}
|
|
889
953
|
start() {
|
|
890
|
-
|
|
891
|
-
if (!
|
|
954
|
+
Ce(this), (async () => {
|
|
955
|
+
if (!V())
|
|
892
956
|
return;
|
|
893
957
|
let r;
|
|
894
|
-
typeof this.precondition > "u" ? r = !0 : typeof this.precondition == "boolean" ? r = this.precondition : r = await
|
|
958
|
+
typeof this.precondition > "u" ? r = !0 : typeof this.precondition == "boolean" ? r = this.precondition : r = await P(this, this.precondition) === !0;
|
|
895
959
|
let n;
|
|
896
|
-
r && (this.condition === void 0 ? n = !0 : typeof this.condition == "boolean" ? n = this.condition : n = await
|
|
897
|
-
const
|
|
960
|
+
r && (this.condition === void 0 ? n = !0 : typeof this.condition == "boolean" ? n = this.condition : n = await P(this, this.condition) === !0);
|
|
961
|
+
const s = r && n === !0;
|
|
898
962
|
if (typeof n == "boolean" && this.session) {
|
|
899
|
-
const
|
|
900
|
-
this.session.setIsUser(
|
|
963
|
+
const d = n;
|
|
964
|
+
this.session.setIsUser(d), this.eventBus({ type: "user_decide", value: d });
|
|
901
965
|
}
|
|
902
|
-
this.eventBus({ type: "initialize" }), document.body &&
|
|
966
|
+
this.eventBus({ type: "initialize" }), document.body && s && T(this), await ce(), s && T(this), this.eventBus({ type: "ready" }), this.isReady = !0, this.session && this.eventBus({ type: "session", ...this.session });
|
|
903
967
|
})();
|
|
904
968
|
}
|
|
905
969
|
registerFramework(e) {
|
|
906
|
-
|
|
970
|
+
Ae(e, this.frameworks);
|
|
907
971
|
}
|
|
908
972
|
registerComponent(e, r) {
|
|
909
|
-
|
|
973
|
+
_(e, r, this.components);
|
|
910
974
|
}
|
|
911
975
|
registerPlugin(e) {
|
|
912
|
-
|
|
976
|
+
ve(this, e, this.plugins);
|
|
913
977
|
}
|
|
914
978
|
registerFeature(e, r) {
|
|
915
|
-
|
|
979
|
+
Ne(e, r, this.features);
|
|
916
980
|
}
|
|
917
981
|
registerPredicate(e, r) {
|
|
918
|
-
|
|
982
|
+
Ue(e, r, this.predicates);
|
|
919
983
|
}
|
|
920
984
|
registerField(e) {
|
|
921
|
-
|
|
985
|
+
Ke(e, this.fields);
|
|
922
986
|
}
|
|
923
987
|
registerAction(e, r) {
|
|
924
|
-
|
|
988
|
+
Qe(e, r, this.actions);
|
|
925
989
|
}
|
|
926
990
|
registerExperience(e) {
|
|
927
|
-
e.component &&
|
|
991
|
+
e.component && _(`experience:${e.id}`, e.component, this.components), Se(e, this.experiences);
|
|
928
992
|
}
|
|
929
993
|
getStateSnapshot() {
|
|
930
|
-
return
|
|
994
|
+
return J(this);
|
|
931
995
|
}
|
|
932
996
|
async launchExperienceById(e) {
|
|
933
997
|
const r = this.experiences.getById(e).getState();
|
|
934
998
|
if (!r) {
|
|
935
|
-
|
|
999
|
+
v("warn", `Experience with id '${e}' not found.`);
|
|
936
1000
|
return;
|
|
937
1001
|
}
|
|
938
|
-
|
|
1002
|
+
Y(this, r);
|
|
939
1003
|
}
|
|
940
1004
|
// private async fetchProject() {
|
|
941
1005
|
// if (this.project) {
|
|
@@ -950,14 +1014,14 @@ class W {
|
|
|
950
1014
|
var e;
|
|
951
1015
|
(e = this.options.plugins) == null || e.forEach((r) => {
|
|
952
1016
|
if (Array.isArray(r)) {
|
|
953
|
-
r.forEach((
|
|
954
|
-
this.registerPlugin(
|
|
1017
|
+
r.forEach((s) => {
|
|
1018
|
+
this.registerPlugin(s);
|
|
955
1019
|
});
|
|
956
1020
|
return;
|
|
957
1021
|
}
|
|
958
1022
|
const n = typeof r == "function" ? r() : r;
|
|
959
1023
|
if (Array.isArray(n)) {
|
|
960
|
-
n.forEach((
|
|
1024
|
+
n.forEach((s) => this.registerPlugin(s));
|
|
961
1025
|
return;
|
|
962
1026
|
}
|
|
963
1027
|
this.registerPlugin(n);
|
|
@@ -966,20 +1030,20 @@ class W {
|
|
|
966
1030
|
setupFeatures() {
|
|
967
1031
|
const e = this.options.features;
|
|
968
1032
|
e && (Object.entries(e).forEach(([r, n]) => {
|
|
969
|
-
const
|
|
970
|
-
this.registerFeature(r,
|
|
1033
|
+
const s = typeof n == "function" ? n() : n;
|
|
1034
|
+
this.registerFeature(r, s);
|
|
971
1035
|
}), this.searchParams.feature && this.searchParams.feature.forEach((r) => {
|
|
972
1036
|
try {
|
|
973
|
-
const [n,
|
|
974
|
-
if (!n || !
|
|
1037
|
+
const [n, s] = r.split(":");
|
|
1038
|
+
if (!n || !s)
|
|
975
1039
|
return;
|
|
976
|
-
let
|
|
977
|
-
|
|
978
|
-
key: `${
|
|
1040
|
+
let d = s;
|
|
1041
|
+
d === "true" && (d = !0), d === "false" && (d = !1), this.registerFeature(n, {
|
|
1042
|
+
key: `${d}`,
|
|
979
1043
|
// use the assigned bucket value as the key
|
|
980
1044
|
name: n,
|
|
981
1045
|
// eslint-disable-next-line sonarjs/function-return-type
|
|
982
|
-
decide: () =>
|
|
1046
|
+
decide: () => d,
|
|
983
1047
|
storage: "session"
|
|
984
1048
|
});
|
|
985
1049
|
} catch {
|
|
@@ -990,7 +1054,7 @@ class W {
|
|
|
990
1054
|
const e = this.options.predicates;
|
|
991
1055
|
e && Object.entries(e).forEach(([r, n]) => {
|
|
992
1056
|
if (typeof n != "function") {
|
|
993
|
-
|
|
1057
|
+
v("warn", `Predicate "${r}" is not a function.`);
|
|
994
1058
|
return;
|
|
995
1059
|
}
|
|
996
1060
|
this.registerPredicate(r, n);
|
|
@@ -1000,7 +1064,7 @@ class W {
|
|
|
1000
1064
|
const e = this.options.actions;
|
|
1001
1065
|
e && Object.entries(e).forEach(([r, n]) => {
|
|
1002
1066
|
if (typeof n != "function") {
|
|
1003
|
-
|
|
1067
|
+
v("warn", `Action "${r}" is not a function.`);
|
|
1004
1068
|
return;
|
|
1005
1069
|
}
|
|
1006
1070
|
this.registerAction(r, n);
|
|
@@ -1010,52 +1074,52 @@ class W {
|
|
|
1010
1074
|
return this.plugins[e] ?? {};
|
|
1011
1075
|
}
|
|
1012
1076
|
}
|
|
1013
|
-
h(
|
|
1014
|
-
function
|
|
1077
|
+
h(Q, "logger", v);
|
|
1078
|
+
function X(t) {
|
|
1015
1079
|
var e;
|
|
1016
1080
|
return ((e = t.options) == null ? void 0 : e.some((r) => "condition" in r)) ?? !1;
|
|
1017
1081
|
}
|
|
1018
|
-
function
|
|
1019
|
-
return t.some((e) => e.condition ||
|
|
1082
|
+
function yt(t) {
|
|
1083
|
+
return t.some((e) => e.condition || X(e));
|
|
1020
1084
|
}
|
|
1021
|
-
async function
|
|
1022
|
-
return e.length === 0 || !
|
|
1085
|
+
async function jt(t, e) {
|
|
1086
|
+
return e.length === 0 || !yt(e) ? e : (await Promise.all(
|
|
1023
1087
|
e.map(async (n) => {
|
|
1024
|
-
if (!(n.condition ? await
|
|
1088
|
+
if (!(n.condition ? await P(t, n.condition) : !0))
|
|
1025
1089
|
return null;
|
|
1026
|
-
if (!n.options || !
|
|
1090
|
+
if (!n.options || !X(n))
|
|
1027
1091
|
return n;
|
|
1028
|
-
const
|
|
1029
|
-
n.options.map(async (
|
|
1030
|
-
)).filter((
|
|
1031
|
-
return
|
|
1092
|
+
const o = (await Promise.all(
|
|
1093
|
+
n.options.map(async (a) => a.condition ? await P(t, a.condition) ? a : null : a)
|
|
1094
|
+
)).filter((a) => a !== null);
|
|
1095
|
+
return o.length === n.options.length ? n : o.length === 0 ? null : { ...n, options: o };
|
|
1032
1096
|
})
|
|
1033
1097
|
)).filter((n) => n !== null);
|
|
1034
1098
|
}
|
|
1035
|
-
const
|
|
1036
|
-
const e = new
|
|
1037
|
-
return
|
|
1099
|
+
const Pt = (t) => {
|
|
1100
|
+
const e = new Q(t);
|
|
1101
|
+
return fe(e), e;
|
|
1038
1102
|
};
|
|
1039
1103
|
export {
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1104
|
+
Q as Picked,
|
|
1105
|
+
Pt as createClient,
|
|
1106
|
+
B as createStorageKey,
|
|
1107
|
+
P as evaluateRuleLogic,
|
|
1108
|
+
ct as getPickedConfig,
|
|
1109
|
+
jt as getStepFields,
|
|
1110
|
+
Rt as isPickedRoot,
|
|
1111
|
+
z as localStore,
|
|
1112
|
+
O as sessionStore,
|
|
1113
|
+
Ct as subscribe,
|
|
1114
|
+
Ot as supportsCookies,
|
|
1115
|
+
pe as supportsCryptoRandomUUID,
|
|
1116
|
+
V as supportsDocument,
|
|
1117
|
+
Dt as supportsHistory,
|
|
1118
|
+
Ut as supportsIntersectionObserver,
|
|
1119
|
+
le as supportsLocalStorage,
|
|
1120
|
+
Vt as supportsLocation,
|
|
1121
|
+
Mt as supportsSessionStorage,
|
|
1122
|
+
Nt as supportsShadowRoot,
|
|
1123
|
+
Tt as supportsWebComponents,
|
|
1060
1124
|
M as supportsWindow
|
|
1061
1125
|
};
|