@superbright/indexeddb-orm 1.0.40 → 1.0.42
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/README.md +4 -15
- package/dist/base/furniture.d.ts +2 -2
- package/dist/features/analytics/analytics.cjs +1 -1
- package/dist/features/analytics/analytics.cjs.map +1 -1
- package/dist/features/analytics/analytics.d.ts +25 -25
- package/dist/features/analytics/analytics.mjs +181 -228
- package/dist/features/analytics/analytics.mjs.map +1 -1
- package/package.json +18 -20
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import { convertKeysToSnakeCase as
|
|
2
|
-
import { normalizeToStringArray as
|
|
3
|
-
import { useAnalytics as
|
|
4
|
-
import { object as c, string as e, number as t, enum as
|
|
5
|
-
const
|
|
1
|
+
import { convertKeysToSnakeCase as b, convertKeysToCamelCase as l } from "../../utils/casing.mjs";
|
|
2
|
+
import { normalizeToStringArray as x } from "../../utils/collections.mjs";
|
|
3
|
+
import { useAnalytics as C } from "./AnalyticsProvider.mjs";
|
|
4
|
+
import { object as c, string as e, number as t, enum as p, any as U, unknown as T, boolean as y, array as g, union as A } from "../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.mjs";
|
|
5
|
+
const fe = ["location", "budget", "size", "other"], w = [
|
|
6
6
|
"cost_low_to_high",
|
|
7
7
|
"cost_high_to_low",
|
|
8
8
|
"newest",
|
|
9
9
|
"relevance"
|
|
10
|
-
],
|
|
10
|
+
], O = [
|
|
11
11
|
"Skip",
|
|
12
12
|
"Continue",
|
|
13
13
|
"Back"
|
|
14
|
-
],
|
|
14
|
+
], S = c({
|
|
15
15
|
propertyId: e().min(1, "propertyId is required"),
|
|
16
16
|
propertySlug: e().min(1, "propertySlug is required"),
|
|
17
17
|
propertyName: e().min(1, "propertyName is required")
|
|
18
|
-
}), d =
|
|
18
|
+
}), d = S.extend({
|
|
19
19
|
propertyName: e().min(1, "propertyName is required")
|
|
20
|
-
}),
|
|
20
|
+
}), V = d.extend({
|
|
21
21
|
totalUnitsAvailable: t().int().nonnegative(),
|
|
22
22
|
resultsUnitCount: t().int().nonnegative(),
|
|
23
23
|
unitCountDate: e().optional()
|
|
24
|
-
}),
|
|
24
|
+
}), M = d.extend({
|
|
25
25
|
totalUnitsAvailable: t().int().nonnegative(),
|
|
26
26
|
resultsUnitCount: t().int().nonnegative(),
|
|
27
27
|
unitCountDate: e().optional()
|
|
28
|
-
}),
|
|
28
|
+
}), N = d.extend({
|
|
29
29
|
totalUnitsAvailable: t().int().nonnegative(),
|
|
30
30
|
resultsUnitCount: t().int().nonnegative(),
|
|
31
31
|
unitCountDate: e().optional(),
|
|
32
|
-
lifestylePreferences:
|
|
33
|
-
}),
|
|
32
|
+
lifestylePreferences: T().optional()
|
|
33
|
+
}), v = d.extend({
|
|
34
34
|
funnelStep: t().int().nonnegative(),
|
|
35
35
|
profileQuestion: e().min(1, "profileQuestion is required"),
|
|
36
|
-
interactedElement:
|
|
36
|
+
interactedElement: p(O),
|
|
37
37
|
questionEnum: e().optional()
|
|
38
|
-
}),
|
|
39
|
-
selectedAnswersEnumArray:
|
|
38
|
+
}), B = v.extend({
|
|
39
|
+
selectedAnswersEnumArray: U().transform((s) => x(s)).refine((s) => Array.isArray(s), {
|
|
40
40
|
message: "selectedAnswersEnumArray must resolve to an array"
|
|
41
41
|
})
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
S.extend({
|
|
44
44
|
unitId: e().min(1, "unitId is required"),
|
|
45
45
|
unitName: e().min(1, "unitName is required"),
|
|
46
46
|
unitSlug: e().min(1, "unitSlug is required")
|
|
47
47
|
});
|
|
48
|
-
const
|
|
48
|
+
const a = d.extend({
|
|
49
49
|
unitId: e().min(1, "unitId is required"),
|
|
50
50
|
unitName: e().min(1, "unitName is required"),
|
|
51
51
|
unitSlug: e().min(1, "unitSlug is required")
|
|
52
|
-
}),
|
|
52
|
+
}), k = a.extend({
|
|
53
53
|
buttonName: e().min(1, "buttonName is required"),
|
|
54
54
|
formName: e().min(1, "formName is required"),
|
|
55
55
|
styleId: e().min(1, "styleId is required"),
|
|
56
56
|
styleName: e().min(1, "styleName is required"),
|
|
57
57
|
unitBedrooms: t().int().nonnegative(),
|
|
58
|
-
favoritedUnit:
|
|
59
|
-
}),
|
|
58
|
+
favoritedUnit: y()
|
|
59
|
+
}), f = a.extend({
|
|
60
60
|
roomName: e().min(1, "roomName is required"),
|
|
61
61
|
unitBedrooms: t().int().nonnegative(),
|
|
62
62
|
styleId: e().min(1, "styleId is required"),
|
|
63
63
|
styleName: e().min(1, "styleName is required"),
|
|
64
|
-
favoritedUnit:
|
|
65
|
-
}),
|
|
64
|
+
favoritedUnit: y()
|
|
65
|
+
}), _ = a.extend({
|
|
66
66
|
roomName: e().min(1, "roomName is required"),
|
|
67
67
|
unitBedrooms: t().int().nonnegative(),
|
|
68
68
|
styleId: e().min(1, "styleId is required"),
|
|
69
69
|
styleName: e().min(1, "styleName is required"),
|
|
70
70
|
furnitureId: e().min(1, "furnitureId is required"),
|
|
71
71
|
furnitureName: e().min(1, "furnitureName is required"),
|
|
72
|
-
type:
|
|
73
|
-
|
|
72
|
+
type: p(["click", "hover_on", "hover_off"]),
|
|
73
|
+
brandName: e().min(1, "brandName is required"),
|
|
74
74
|
category: e().min(1, "category is required")
|
|
75
|
-
}), Q =
|
|
75
|
+
}), Q = a.extend({
|
|
76
76
|
roomName: e().min(1, "roomName is required"),
|
|
77
77
|
unitBedrooms: t().int().nonnegative(),
|
|
78
78
|
styleId: e().min(1, "styleId is required"),
|
|
@@ -81,148 +81,148 @@ const o = d.extend({
|
|
|
81
81
|
furnitureName: e().min(1, "furnitureName is required"),
|
|
82
82
|
link: e().min(1, "link is required"),
|
|
83
83
|
type: e().min(1, "type is required"),
|
|
84
|
-
favoritedUnit:
|
|
85
|
-
|
|
84
|
+
favoritedUnit: y(),
|
|
85
|
+
brandName: e().min(1, "brandName is required"),
|
|
86
86
|
category: e().min(1, "category is required")
|
|
87
|
-
}), D =
|
|
87
|
+
}), D = a.extend({
|
|
88
88
|
roomName: e().min(1, "roomName is required"),
|
|
89
89
|
unitBedrooms: t().int().nonnegative(),
|
|
90
90
|
styleId: e().min(1, "styleId is required"),
|
|
91
91
|
styleName: e().min(1, "styleName is required"),
|
|
92
92
|
furnitureId: e().min(1, "furnitureId is required"),
|
|
93
93
|
furnitureName: e().min(1, "furnitureName is required"),
|
|
94
|
-
|
|
94
|
+
brandName: e().min(1, "brandName is required"),
|
|
95
95
|
category: e().min(1, "category is required")
|
|
96
|
-
}), R =
|
|
96
|
+
}), R = a.extend({
|
|
97
97
|
roomName: e().min(1, "roomName is required"),
|
|
98
98
|
unitBedrooms: t().int().nonnegative(),
|
|
99
99
|
styleId: e().min(1, "styleId is required"),
|
|
100
100
|
styleName: e().min(1, "styleName is required"),
|
|
101
101
|
furnitureId: e().min(1, "furnitureId is required"),
|
|
102
102
|
furnitureName: e().min(1, "furnitureName is required"),
|
|
103
|
-
|
|
103
|
+
brandName: e().min(1, "brandName is required"),
|
|
104
104
|
category: e().min(1, "category is required")
|
|
105
|
-
}), L =
|
|
106
|
-
method:
|
|
105
|
+
}), L = a.extend({
|
|
106
|
+
method: p(["Prev", "Next"]),
|
|
107
107
|
roomName: e().min(1, "roomName is required"),
|
|
108
108
|
unitBedrooms: t().int().nonnegative(),
|
|
109
109
|
styleId: e().min(1, "styleId is required"),
|
|
110
110
|
styleName: e().min(1, "styleName is required"),
|
|
111
111
|
furnitureId: e().min(1, "furnitureId is required"),
|
|
112
112
|
furnitureName: e().min(1, "furnitureName is required"),
|
|
113
|
-
|
|
113
|
+
brandName: e().min(1, "brandName is required"),
|
|
114
114
|
category: e().min(1, "category is required")
|
|
115
|
-
}),
|
|
115
|
+
}), F = a.extend({
|
|
116
116
|
roomName: e().min(1, "roomName is required"),
|
|
117
117
|
unitBedrooms: t().int().nonnegative(),
|
|
118
118
|
styleId: e().min(1, "styleId is required"),
|
|
119
119
|
styleName: e().min(1, "styleName is required"),
|
|
120
|
-
method:
|
|
121
|
-
}), z =
|
|
120
|
+
method: p(["Navigation", "Map"])
|
|
121
|
+
}), z = F.extend({
|
|
122
122
|
timeInRoom: t().int().nonnegative()
|
|
123
|
-
}), W =
|
|
123
|
+
}), W = a.extend({
|
|
124
124
|
roomName: e().min(1, "roomName is required"),
|
|
125
125
|
unitBedrooms: t().int().nonnegative(),
|
|
126
126
|
styleId: e().min(1, "styleId is required"),
|
|
127
127
|
styleName: e().min(1, "styleName is required"),
|
|
128
|
-
method:
|
|
128
|
+
method: p(["On Click Play"]),
|
|
129
129
|
videoCurrentTime: t().int().nonnegative(),
|
|
130
130
|
videoDuration: t().int().nonnegative(),
|
|
131
131
|
videoPercent: t().int().nonnegative(),
|
|
132
132
|
videoFilename: e().min(1, "videoFilename is required")
|
|
133
|
-
}), j =
|
|
133
|
+
}), j = a.extend({
|
|
134
134
|
utmSource: e().min(1, "utm_source is required"),
|
|
135
135
|
utmMedium: e().min(1, "utm_medium is required"),
|
|
136
136
|
utmName: e().min(1, "utm_name is required"),
|
|
137
137
|
unitBedrooms: t().int().nonnegative(),
|
|
138
138
|
styleId: e().min(1, "styleId is required"),
|
|
139
139
|
styleName: e().min(1, "styleName is required"),
|
|
140
|
-
favoritedUnit:
|
|
141
|
-
}),
|
|
140
|
+
favoritedUnit: y()
|
|
141
|
+
}), E = a.extend({
|
|
142
142
|
fullUrl: e().min(1, "fullUrl is required"),
|
|
143
143
|
datestamp: e().min(1, "datestamp is required")
|
|
144
|
-
}), G =
|
|
144
|
+
}), G = E.extend({
|
|
145
145
|
pageName: e().min(1, "pageName is required")
|
|
146
|
-
}), H =
|
|
146
|
+
}), H = E.extend({
|
|
147
147
|
roomName: e().min(1, "roomName is required")
|
|
148
|
-
}), J =
|
|
148
|
+
}), J = a.extend({
|
|
149
149
|
unitBedrooms: t().int().nonnegative()
|
|
150
|
-
}),
|
|
150
|
+
}), K = a.extend({
|
|
151
151
|
utmSource: e().min(1, "utm_source is required"),
|
|
152
152
|
utmMedium: e().min(1, "utm_medium is required"),
|
|
153
153
|
utmName: e().min(1, "utm_name is required")
|
|
154
|
-
}), q =
|
|
154
|
+
}), q = a.extend({
|
|
155
155
|
toastCopy: e().min(1, "toastCopy is required")
|
|
156
|
-
}),
|
|
156
|
+
}), $ = a.extend({
|
|
157
157
|
unitBedrooms: t().int().nonnegative(),
|
|
158
158
|
styleId: e().min(1, "styleId is required"),
|
|
159
159
|
styleName: e().min(1, "styleName is required")
|
|
160
|
-
}),
|
|
160
|
+
}), X = d, Y = d.extend({
|
|
161
161
|
name: e().min(1, "name is required")
|
|
162
|
-
}),
|
|
162
|
+
}), Z = c({
|
|
163
163
|
name: e().min(1, "name is required"),
|
|
164
164
|
properties: c({
|
|
165
|
-
propertyContextSchema:
|
|
165
|
+
propertyContextSchema: S,
|
|
166
166
|
buttonName: e().min(1, "buttonName is required"),
|
|
167
167
|
formName: e().min(1, "formName is required"),
|
|
168
168
|
pageName: e().min(1, "pageName is required"),
|
|
169
169
|
fieldName: e().min(1, "fieldName is required")
|
|
170
170
|
})
|
|
171
|
-
}),
|
|
171
|
+
}), ee = c({
|
|
172
172
|
name: e().min(1, "name is required"),
|
|
173
173
|
properties: c({
|
|
174
|
-
propertyContextSchema:
|
|
174
|
+
propertyContextSchema: S,
|
|
175
175
|
buttonName: e().min(1, "buttonName is required"),
|
|
176
176
|
formName: e().min(1, "formName is required"),
|
|
177
177
|
pageName: e().min(1, "pageName is required"),
|
|
178
|
-
bedrooms:
|
|
178
|
+
bedrooms: g(A([e(), t()])).optional(),
|
|
179
179
|
price: t().nullable().optional()
|
|
180
180
|
})
|
|
181
|
-
}),
|
|
182
|
-
bedrooms:
|
|
181
|
+
}), ne = d.extend({
|
|
182
|
+
bedrooms: g(t()).optional(),
|
|
183
183
|
price_min: t().optional(),
|
|
184
184
|
price_max: t().optional(),
|
|
185
|
-
highlights:
|
|
185
|
+
highlights: g(e()).optional(),
|
|
186
186
|
page_name: e().optional()
|
|
187
|
-
}),
|
|
188
|
-
favoritedUnit:
|
|
187
|
+
}), te = a.extend({
|
|
188
|
+
favoritedUnit: y(),
|
|
189
189
|
unitIndex: t().int().nonnegative()
|
|
190
|
-
}),
|
|
190
|
+
}), P = U().transform((s) => x(s)).refine((s) => Array.isArray(s), {
|
|
191
191
|
message: "Selection must resolve to an array"
|
|
192
192
|
}), ie = d.extend({
|
|
193
193
|
filterIndex: t().int().nonnegative(),
|
|
194
194
|
filterLabel: e().min(1, "filterLabel is required"),
|
|
195
|
-
selectedFiltersEnum:
|
|
195
|
+
selectedFiltersEnum: P,
|
|
196
196
|
filterName: e().optional()
|
|
197
197
|
}), I = d.extend({
|
|
198
198
|
filterIndex: t().int().nonnegative(),
|
|
199
199
|
filterLabel: e().min(1, "filterLabel is required"),
|
|
200
|
-
selectedFiltersEnum:
|
|
201
|
-
}), h =
|
|
200
|
+
selectedFiltersEnum: P
|
|
201
|
+
}), h = S.extend({
|
|
202
202
|
sortIndex: t().int().nonnegative(),
|
|
203
|
-
sortEnum:
|
|
204
|
-
}),
|
|
203
|
+
sortEnum: p(w)
|
|
204
|
+
}), re = d.extend({
|
|
205
205
|
sortIndex: t().int().nonnegative(),
|
|
206
|
-
sortEnum:
|
|
206
|
+
sortEnum: p(w),
|
|
207
207
|
resultsUnitCount: t().int().nonnegative(),
|
|
208
208
|
unitCountDate: e().optional()
|
|
209
|
-
}),
|
|
210
|
-
fullQuestionnaireSchemaJson:
|
|
209
|
+
}), ae = S.extend({
|
|
210
|
+
fullQuestionnaireSchemaJson: T().optional(),
|
|
211
211
|
resultsJson: c({
|
|
212
212
|
type: e().optional(),
|
|
213
213
|
total: t().int().nonnegative().optional(),
|
|
214
|
-
units:
|
|
214
|
+
units: g(
|
|
215
215
|
c({
|
|
216
216
|
unitId: e().min(1, "unitId is required"),
|
|
217
217
|
unitName: e().optional()
|
|
218
218
|
})
|
|
219
219
|
).optional()
|
|
220
220
|
}).optional()
|
|
221
|
-
}),
|
|
222
|
-
favoritedUnit:
|
|
221
|
+
}), oe = a.extend({
|
|
222
|
+
favoritedUnit: y(),
|
|
223
223
|
unitIndex: t().int().nonnegative()
|
|
224
|
-
}),
|
|
225
|
-
favoritedUnit:
|
|
224
|
+
}), se = a.extend({
|
|
225
|
+
favoritedUnit: y(),
|
|
226
226
|
unitIndex: t().int().nonnegative()
|
|
227
227
|
}), ue = d.extend({
|
|
228
228
|
unitId: e().min(1, "unitId is required"),
|
|
@@ -232,102 +232,93 @@ const o = d.extend({
|
|
|
232
232
|
unitCountDate: e().optional(),
|
|
233
233
|
unitIndex: t().int().nonnegative()
|
|
234
234
|
});
|
|
235
|
-
function
|
|
236
|
-
const s =
|
|
237
|
-
return (
|
|
238
|
-
const n =
|
|
239
|
-
s.track(
|
|
235
|
+
function me() {
|
|
236
|
+
const s = C();
|
|
237
|
+
return (u, m) => {
|
|
238
|
+
const n = m == null ? m : b(m);
|
|
239
|
+
s.track(u, n);
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
const
|
|
243
|
-
const
|
|
244
|
-
if (!
|
|
245
|
-
n != null && n.isDev && console.warn(
|
|
246
|
-
`[Analytics] Invalid payload for "${s}":`,
|
|
247
|
-
r.error.flatten()
|
|
248
|
-
);
|
|
242
|
+
const de = (s, u, m, n) => (r) => {
|
|
243
|
+
const o = l(r), i = u.safeParse(o);
|
|
244
|
+
if (!i.success) {
|
|
245
|
+
n != null && n.isDev && console.warn(`[Analytics] Invalid payload for "${s}":`, i.error.issues);
|
|
249
246
|
return;
|
|
250
247
|
}
|
|
251
|
-
|
|
252
|
-
skipKeyTransform: n == null ? void 0 : n.skipKeyTransform
|
|
253
|
-
});
|
|
248
|
+
m(s, r);
|
|
254
249
|
};
|
|
255
|
-
function
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
s(
|
|
259
|
-
}, n = (
|
|
250
|
+
function le(s, u = !1) {
|
|
251
|
+
const m = (r, o) => {
|
|
252
|
+
const i = b(o);
|
|
253
|
+
s(r, i);
|
|
254
|
+
}, n = (r, o) => de(r, o, m, { isDev: u });
|
|
260
255
|
return {
|
|
261
|
-
trackViewAllUnits: (
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
),
|
|
256
|
+
trackViewAllUnits: (r) => {
|
|
257
|
+
const o = l(
|
|
258
|
+
r
|
|
259
|
+
), i = V.safeParse({
|
|
265
260
|
unitCountDate: (/* @__PURE__ */ new Date()).toISOString(),
|
|
266
|
-
...
|
|
261
|
+
...o
|
|
267
262
|
});
|
|
268
|
-
if (!
|
|
269
|
-
|
|
263
|
+
if (!i.success) {
|
|
264
|
+
u && console.warn('[Analytics] Invalid payload for "View All Units":', i.error.flatten());
|
|
270
265
|
return;
|
|
271
266
|
}
|
|
272
|
-
|
|
267
|
+
m("View All Units", i.data);
|
|
273
268
|
},
|
|
274
|
-
trackQuestionnaireSkip: (
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
),
|
|
278
|
-
...
|
|
269
|
+
trackQuestionnaireSkip: (r) => {
|
|
270
|
+
const o = l(
|
|
271
|
+
r
|
|
272
|
+
), i = v.safeParse({
|
|
273
|
+
...o,
|
|
279
274
|
interactedElement: "Skip"
|
|
280
275
|
});
|
|
281
|
-
if (!
|
|
282
|
-
|
|
276
|
+
if (!i.success) {
|
|
277
|
+
u && console.warn('[Analytics] Invalid payload for "Questionnaire Navigated" (Skip):', i.error.flatten());
|
|
283
278
|
return;
|
|
284
279
|
}
|
|
285
|
-
|
|
280
|
+
m("Questionnaire Navigated", i.data);
|
|
286
281
|
},
|
|
287
|
-
trackQuestionnaireContinue: (
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
),
|
|
291
|
-
...
|
|
282
|
+
trackQuestionnaireContinue: (r) => {
|
|
283
|
+
const o = l(
|
|
284
|
+
r
|
|
285
|
+
), i = B.safeParse({
|
|
286
|
+
...o,
|
|
292
287
|
interactedElement: "Continue"
|
|
293
288
|
});
|
|
294
|
-
if (!
|
|
295
|
-
|
|
289
|
+
if (!i.success) {
|
|
290
|
+
u && console.warn('[Analytics] Invalid payload for "Questionnaire Navigated" (Continue):', i.error.flatten());
|
|
296
291
|
return;
|
|
297
292
|
}
|
|
298
|
-
|
|
293
|
+
m("Questionnaire Navigated", i.data);
|
|
299
294
|
},
|
|
300
|
-
trackQuestionnaireBack: (
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
),
|
|
304
|
-
...
|
|
295
|
+
trackQuestionnaireBack: (r) => {
|
|
296
|
+
const o = l(
|
|
297
|
+
r
|
|
298
|
+
), i = v.safeParse({
|
|
299
|
+
...o,
|
|
305
300
|
interactedElement: "Back"
|
|
306
301
|
});
|
|
307
|
-
if (!
|
|
308
|
-
|
|
302
|
+
if (!i.success) {
|
|
303
|
+
u && console.warn('[Analytics] Invalid payload for "Questionnaire Navigated" (Back):', i.error.flatten());
|
|
309
304
|
return;
|
|
310
305
|
}
|
|
311
|
-
|
|
306
|
+
m("Questionnaire Navigated", i.data);
|
|
312
307
|
},
|
|
313
|
-
trackClickUnit: n("Unit Card Clicked",
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
trackLoadMore: (i) => {
|
|
320
|
-
const a = l(
|
|
321
|
-
i
|
|
322
|
-
), r = V.safeParse({
|
|
308
|
+
trackClickUnit: n("Unit Card Clicked", oe),
|
|
309
|
+
trackHoverUnit: n("Unit Hovered", te),
|
|
310
|
+
trackLoadMore: (r) => {
|
|
311
|
+
const o = l(
|
|
312
|
+
r
|
|
313
|
+
), i = M.safeParse({
|
|
323
314
|
unitCountDate: (/* @__PURE__ */ new Date()).toISOString(),
|
|
324
|
-
...
|
|
315
|
+
...o
|
|
325
316
|
});
|
|
326
|
-
if (!
|
|
327
|
-
|
|
317
|
+
if (!i.success) {
|
|
318
|
+
u && console.warn('[Analytics] Invalid payload for "More Units Loaded":', i.error.flatten());
|
|
328
319
|
return;
|
|
329
320
|
}
|
|
330
|
-
|
|
321
|
+
m("More Units Loaded", i.data);
|
|
331
322
|
},
|
|
332
323
|
trackFilterOpened: n("Filter Opened", ie),
|
|
333
324
|
trackFilterCanceled: n(
|
|
@@ -338,24 +329,24 @@ function ce(s, m = !1) {
|
|
|
338
329
|
"Filter Applied",
|
|
339
330
|
I
|
|
340
331
|
),
|
|
341
|
-
trackOpenSort: (
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
),
|
|
332
|
+
trackOpenSort: (r) => {
|
|
333
|
+
const o = l(
|
|
334
|
+
r
|
|
335
|
+
), i = re.safeParse({
|
|
345
336
|
unitCountDate: (/* @__PURE__ */ new Date()).toISOString(),
|
|
346
|
-
...
|
|
337
|
+
...o
|
|
347
338
|
});
|
|
348
|
-
if (!
|
|
349
|
-
|
|
339
|
+
if (!i.success) {
|
|
340
|
+
u && console.warn('[Analytics] Invalid payload for "Sort Opened":', i.error.flatten());
|
|
350
341
|
return;
|
|
351
342
|
}
|
|
352
|
-
|
|
343
|
+
m("Sort Opened", i.data);
|
|
353
344
|
},
|
|
354
345
|
trackSelectSort: n("Sort Applied", h),
|
|
355
346
|
trackCancelSort: n("Sort Canceled", h),
|
|
356
347
|
trackClickUnitFavorites: n(
|
|
357
348
|
"Unit Favorited",
|
|
358
|
-
|
|
349
|
+
se
|
|
359
350
|
),
|
|
360
351
|
trackUnitUnfavorited: n(
|
|
361
352
|
"Unit Unfavorited",
|
|
@@ -363,182 +354,144 @@ function ce(s, m = !1) {
|
|
|
363
354
|
),
|
|
364
355
|
trackQuestionnaireResult: n(
|
|
365
356
|
"Questionnaire Submitted",
|
|
366
|
-
|
|
357
|
+
ae
|
|
367
358
|
),
|
|
368
359
|
trackScheduleTourFormInteracted: n(
|
|
369
360
|
"Schedule Tour Form Interacted",
|
|
370
|
-
|
|
371
|
-
{ skipKeyTransform: !0 }
|
|
361
|
+
N
|
|
372
362
|
),
|
|
373
363
|
trackScheduleTourFormSubmitted: n(
|
|
374
364
|
"Schedule Tour Form Submitted",
|
|
375
|
-
|
|
376
|
-
{ skipKeyTransform: !0 }
|
|
365
|
+
N
|
|
377
366
|
),
|
|
378
367
|
trackScheduleTourUrlClicked: n(
|
|
379
368
|
"Schedule Tour URL Clicked",
|
|
380
|
-
|
|
381
|
-
{ skipKeyTransform: !0 }
|
|
369
|
+
N
|
|
382
370
|
),
|
|
383
371
|
trackGetInTouchFormOpened: n(
|
|
384
372
|
"Form Opened",
|
|
385
|
-
|
|
386
|
-
{ skipKeyTransform: !0 }
|
|
373
|
+
k
|
|
387
374
|
),
|
|
388
375
|
trackGetInTouchFormSubmitted: n(
|
|
389
376
|
"Form Submitted",
|
|
390
|
-
|
|
391
|
-
{ skipKeyTransform: !0 }
|
|
377
|
+
k
|
|
392
378
|
),
|
|
393
379
|
trackStyleDrawerOpened: n(
|
|
394
380
|
"Style Menu Opened",
|
|
395
|
-
|
|
396
|
-
{ skipKeyTransform: !0 }
|
|
381
|
+
f
|
|
397
382
|
),
|
|
398
383
|
trackStyleDrawerChanged: n(
|
|
399
384
|
"Style Changed",
|
|
400
|
-
|
|
401
|
-
{ skipKeyTransform: !0 }
|
|
385
|
+
f
|
|
402
386
|
),
|
|
403
387
|
trackOpeningStyleImpression: n(
|
|
404
388
|
"Opening Style Modal Impression",
|
|
405
|
-
|
|
406
|
-
{ skipKeyTransform: !0 }
|
|
389
|
+
f
|
|
407
390
|
),
|
|
408
391
|
trackOpeningStyleSlected: n(
|
|
409
392
|
"Opening Style Selected",
|
|
410
|
-
|
|
411
|
-
{ skipKeyTransform: !0 }
|
|
393
|
+
f
|
|
412
394
|
),
|
|
413
395
|
trackFurnitureViewed: n(
|
|
414
396
|
"Furniture Viewed",
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
),
|
|
418
|
-
// for debugging:
|
|
419
|
-
// trackFurnitureViewed: (payload: AnalyticsPayload<typeof furnitureInteractionSchema>) => {
|
|
420
|
-
// // eslint-disable-next-line no-console
|
|
421
|
-
// console.log("[trackFurnitureViewed] received:", payload);
|
|
422
|
-
// // eslint-disable-next-line no-console
|
|
423
|
-
// console.log("[trackFurnitureViewed] after camelCase transform:", convertKeysToCamelCase(payload));
|
|
424
|
-
// createStrictTracker(
|
|
425
|
-
// "Furniture Viewed",
|
|
426
|
-
// furnitureInteractionSchema,
|
|
427
|
-
// { skipKeyTransform: true },
|
|
428
|
-
// )(payload);
|
|
429
|
-
// },
|
|
397
|
+
_
|
|
398
|
+
),
|
|
430
399
|
trackFurnitureExternalUrlClicked: n(
|
|
431
400
|
"Purchase Link Clicked",
|
|
432
|
-
Q
|
|
433
|
-
{ skipKeyTransform: !0 }
|
|
401
|
+
Q
|
|
434
402
|
),
|
|
435
403
|
trackFurnitureSaved: n(
|
|
436
404
|
"Furniture Saved",
|
|
437
|
-
D
|
|
438
|
-
{ skipKeyTransform: !0 }
|
|
405
|
+
D
|
|
439
406
|
),
|
|
440
407
|
trackFurnitureModalOpened: n(
|
|
441
408
|
"Furniture Modal Opened",
|
|
442
|
-
R
|
|
443
|
-
{ skipKeyTransform: !0 }
|
|
409
|
+
R
|
|
444
410
|
),
|
|
445
411
|
trackFurnitureCarouselToggled: n(
|
|
446
412
|
"Furniture Carousel Toggled",
|
|
447
|
-
L
|
|
448
|
-
{ skipKeyTransform: !0 }
|
|
413
|
+
L
|
|
449
414
|
),
|
|
450
415
|
trackRoomEntered: n(
|
|
451
416
|
"Room Entered",
|
|
452
|
-
|
|
453
|
-
{ skipKeyTransform: !0 }
|
|
417
|
+
F
|
|
454
418
|
),
|
|
455
419
|
trackRoomLeft: n(
|
|
456
420
|
"Room Left",
|
|
457
|
-
z
|
|
458
|
-
{ skipKeyTransform: !0 }
|
|
421
|
+
z
|
|
459
422
|
),
|
|
460
423
|
trackVideoStarted: n(
|
|
461
424
|
"Video Started",
|
|
462
|
-
W
|
|
463
|
-
{ skipKeyTransform: !0 }
|
|
425
|
+
W
|
|
464
426
|
),
|
|
465
427
|
trackEmailRedirect: n(
|
|
466
428
|
"Email Tracked",
|
|
467
|
-
j
|
|
468
|
-
{ skipKeyTransform: !0 }
|
|
429
|
+
j
|
|
469
430
|
),
|
|
470
431
|
trackToastImpression: n(
|
|
471
432
|
"Toast Impression",
|
|
472
|
-
q
|
|
473
|
-
{ skipKeyTransform: !0 }
|
|
433
|
+
q
|
|
474
434
|
),
|
|
475
435
|
trackToastClicked: n(
|
|
476
436
|
"Toast Clicked",
|
|
477
|
-
q
|
|
478
|
-
{ skipKeyTransform: !0 }
|
|
437
|
+
q
|
|
479
438
|
),
|
|
480
439
|
trackToastClosed: n(
|
|
481
440
|
"Toast Closed",
|
|
482
|
-
q
|
|
483
|
-
{ skipKeyTransform: !0 }
|
|
441
|
+
q
|
|
484
442
|
),
|
|
485
443
|
trackContentModalOpened: n(
|
|
486
444
|
"Content Modal Opened",
|
|
487
|
-
|
|
488
|
-
{ skipKeyTransform: !0 }
|
|
445
|
+
$
|
|
489
446
|
),
|
|
490
447
|
trackBuildingDetailsModalOpened: n(
|
|
491
448
|
"Building Details Modal",
|
|
492
|
-
|
|
449
|
+
X
|
|
493
450
|
),
|
|
494
451
|
trackSubscriptionImpression: n(
|
|
495
452
|
"Subscription Impression",
|
|
496
|
-
|
|
453
|
+
Y
|
|
497
454
|
),
|
|
498
455
|
trackSubscriptionInteracted: n(
|
|
499
456
|
"Subscription Interacted",
|
|
500
|
-
|
|
457
|
+
Z
|
|
501
458
|
),
|
|
502
459
|
trackSubscriptionSubmitted: n(
|
|
503
460
|
"Subscription Submitted",
|
|
504
|
-
|
|
461
|
+
ee
|
|
505
462
|
),
|
|
506
463
|
trackSubscriptionRemoved: n(
|
|
507
464
|
"Subscription Removed",
|
|
508
|
-
|
|
465
|
+
ne
|
|
509
466
|
),
|
|
510
467
|
trackWebPageViewed: n(
|
|
511
468
|
"Page Viewed",
|
|
512
|
-
G
|
|
513
|
-
{ skipKeyTransform: !0 }
|
|
469
|
+
G
|
|
514
470
|
),
|
|
515
471
|
trackWebPageRoomViewed: n(
|
|
516
472
|
"Page Viewed",
|
|
517
|
-
H
|
|
518
|
-
{ skipKeyTransform: !0 }
|
|
473
|
+
H
|
|
519
474
|
),
|
|
520
475
|
trackEmbedPageViewed: n(
|
|
521
476
|
"Embed Impression",
|
|
522
|
-
J
|
|
523
|
-
{ skipKeyTransform: !0 }
|
|
477
|
+
J
|
|
524
478
|
),
|
|
525
|
-
trackEmailClick: (
|
|
526
|
-
`Email Interaction - ${
|
|
527
|
-
|
|
528
|
-
{ skipKeyTransform: !0 }
|
|
479
|
+
trackEmailClick: (r) => n(
|
|
480
|
+
`Email Interaction - ${r.event_name}`,
|
|
481
|
+
K
|
|
529
482
|
)
|
|
530
483
|
};
|
|
531
484
|
}
|
|
532
485
|
function ge() {
|
|
533
|
-
const { isDev: s } =
|
|
534
|
-
return
|
|
486
|
+
const { isDev: s } = C(), u = me();
|
|
487
|
+
return le(u, s);
|
|
535
488
|
}
|
|
536
489
|
export {
|
|
537
|
-
|
|
538
|
-
|
|
490
|
+
fe as QuestionEnumValues,
|
|
491
|
+
O as QuestionnaireInteractionValues,
|
|
539
492
|
w as SortEnumValues,
|
|
540
|
-
|
|
541
|
-
|
|
493
|
+
le as buildTrackingEvents,
|
|
494
|
+
me as useTrackEvent,
|
|
542
495
|
ge as useTrackingEvents
|
|
543
496
|
};
|
|
544
497
|
//# sourceMappingURL=analytics.mjs.map
|