@fynd-design-engineering/fynd-one-v2 3.3.45 → 3.3.47
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/form/download-file.js +1 -1
- package/dist/form/download-file.js.map +2 -2
- package/dist/global/contact-popup.js +10 -1
- package/dist/global/contact-popup.js.map +2 -2
- package/dist/hacktimus/2025.js +1 -0
- package/dist/hacktimus/2025.js.map +7 -0
- package/package.json +1 -1
- package/dist/analytics/debug.js +0 -153
- package/dist/analytics/debug.js.map +0 -7
- package/dist/analytics/form-success.js +0 -74
- package/dist/analytics/form-success.js.map +0 -7
- package/dist/analytics/main.js +0 -98
- package/dist/analytics/main.js.map +0 -7
- package/dist/files.html +0 -479
- package/dist/posthog/attributes.js +0 -1
- package/dist/posthog/attributes.js.map +0 -7
- package/dist/posthog/form-success.js +0 -74
- package/dist/posthog/form-success.js.map +0 -7
- package/dist/posthog/index.js +0 -147
- package/dist/posthog/index.js.map +0 -7
- package/dist/posthog/main.js +0 -1
- package/dist/posthog/main.js.map +0 -7
package/dist/files.html
DELETED
|
@@ -1,479 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Development Files Glossary</title>
|
|
7
|
-
<style>
|
|
8
|
-
body {
|
|
9
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
10
|
-
margin: 0;
|
|
11
|
-
padding: 20px;
|
|
12
|
-
background-color: #f5f5f5;
|
|
13
|
-
}
|
|
14
|
-
.container {
|
|
15
|
-
max-width: 1200px;
|
|
16
|
-
margin: 0 auto;
|
|
17
|
-
background: white;
|
|
18
|
-
padding: 30px;
|
|
19
|
-
border-radius: 8px;
|
|
20
|
-
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
21
|
-
}
|
|
22
|
-
h1 {
|
|
23
|
-
color: #333;
|
|
24
|
-
text-align: center;
|
|
25
|
-
margin-bottom: 30px;
|
|
26
|
-
}
|
|
27
|
-
.file-grid {
|
|
28
|
-
display: grid;
|
|
29
|
-
gap: 20px;
|
|
30
|
-
}
|
|
31
|
-
.file-item {
|
|
32
|
-
border: 1px solid #ddd;
|
|
33
|
-
border-radius: 6px;
|
|
34
|
-
padding: 15px;
|
|
35
|
-
background: #fafafa;
|
|
36
|
-
}
|
|
37
|
-
.file-location {
|
|
38
|
-
font-weight: bold;
|
|
39
|
-
color: #0066cc;
|
|
40
|
-
margin-bottom: 10px;
|
|
41
|
-
}
|
|
42
|
-
.file-location a {
|
|
43
|
-
color: #0066cc;
|
|
44
|
-
text-decoration: none;
|
|
45
|
-
}
|
|
46
|
-
.file-location a:hover {
|
|
47
|
-
text-decoration: underline;
|
|
48
|
-
}
|
|
49
|
-
.import-suggestion {
|
|
50
|
-
background: #f0f0f0;
|
|
51
|
-
padding: 10px;
|
|
52
|
-
border-radius: 4px;
|
|
53
|
-
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
54
|
-
font-size: 14px;
|
|
55
|
-
word-break: break-all;
|
|
56
|
-
border-left: 4px solid #0066cc;
|
|
57
|
-
}
|
|
58
|
-
.copy-btn {
|
|
59
|
-
background: #0066cc;
|
|
60
|
-
color: white;
|
|
61
|
-
border: none;
|
|
62
|
-
padding: 5px 10px;
|
|
63
|
-
border-radius: 4px;
|
|
64
|
-
cursor: pointer;
|
|
65
|
-
font-size: 12px;
|
|
66
|
-
margin-top: 5px;
|
|
67
|
-
}
|
|
68
|
-
.copy-btn:hover {
|
|
69
|
-
background: #0052a3;
|
|
70
|
-
}
|
|
71
|
-
.stats {
|
|
72
|
-
text-align: center;
|
|
73
|
-
margin-bottom: 20px;
|
|
74
|
-
color: #666;
|
|
75
|
-
}
|
|
76
|
-
</style>
|
|
77
|
-
</head>
|
|
78
|
-
<body>
|
|
79
|
-
<div class="container">
|
|
80
|
-
<h1>Development Files Glossary</h1>
|
|
81
|
-
<div class="stats">
|
|
82
|
-
<p>Total files: 29</p>
|
|
83
|
-
<p>Server: <a href="http://localhost:3000" target="_blank">http://localhost:3000</a></p>
|
|
84
|
-
</div>
|
|
85
|
-
<div class="file-grid">
|
|
86
|
-
|
|
87
|
-
<div class="file-item">
|
|
88
|
-
<div class="file-location">
|
|
89
|
-
<a href="http://localhost:3000/.DS_Store" target="_blank">http://localhost:3000/.DS_Store</a>
|
|
90
|
-
</div>
|
|
91
|
-
<div class="import-suggestion">
|
|
92
|
-
<script defer src="http://localhost:3000/.DS_Store"></script>
|
|
93
|
-
<br>
|
|
94
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/.DS_Store\"></script>')">
|
|
95
|
-
Copy
|
|
96
|
-
</button>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<div class="file-item">
|
|
101
|
-
<div class="file-location">
|
|
102
|
-
<a href="http://localhost:3000/analytics/debug.js" target="_blank">http://localhost:3000/analytics/debug.js</a>
|
|
103
|
-
</div>
|
|
104
|
-
<div class="import-suggestion">
|
|
105
|
-
<script defer src="http://localhost:3000/analytics/debug.js"></script>
|
|
106
|
-
<br>
|
|
107
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/analytics/debug.js\"></script>')">
|
|
108
|
-
Copy
|
|
109
|
-
</button>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
|
|
113
|
-
<div class="file-item">
|
|
114
|
-
<div class="file-location">
|
|
115
|
-
<a href="http://localhost:3000/analytics/form-success.js" target="_blank">http://localhost:3000/analytics/form-success.js</a>
|
|
116
|
-
</div>
|
|
117
|
-
<div class="import-suggestion">
|
|
118
|
-
<script defer src="http://localhost:3000/analytics/form-success.js"></script>
|
|
119
|
-
<br>
|
|
120
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/analytics/form-success.js\"></script>')">
|
|
121
|
-
Copy
|
|
122
|
-
</button>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
|
|
126
|
-
<div class="file-item">
|
|
127
|
-
<div class="file-location">
|
|
128
|
-
<a href="http://localhost:3000/analytics/main.js" target="_blank">http://localhost:3000/analytics/main.js</a>
|
|
129
|
-
</div>
|
|
130
|
-
<div class="import-suggestion">
|
|
131
|
-
<script defer src="http://localhost:3000/analytics/main.js"></script>
|
|
132
|
-
<br>
|
|
133
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/analytics/main.js\"></script>')">
|
|
134
|
-
Copy
|
|
135
|
-
</button>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
|
-
<div class="file-item">
|
|
140
|
-
<div class="file-location">
|
|
141
|
-
<a href="http://localhost:3000/files.html" target="_blank">http://localhost:3000/files.html</a>
|
|
142
|
-
</div>
|
|
143
|
-
<div class="import-suggestion">
|
|
144
|
-
<script defer src="http://localhost:3000/files.html"></script>
|
|
145
|
-
<br>
|
|
146
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/files.html\"></script>')">
|
|
147
|
-
Copy
|
|
148
|
-
</button>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
|
|
152
|
-
<div class="file-item">
|
|
153
|
-
<div class="file-location">
|
|
154
|
-
<a href="http://localhost:3000/form/download-file.js" target="_blank">http://localhost:3000/form/download-file.js</a>
|
|
155
|
-
</div>
|
|
156
|
-
<div class="import-suggestion">
|
|
157
|
-
<script defer src="http://localhost:3000/form/download-file.js"></script>
|
|
158
|
-
<br>
|
|
159
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/form/download-file.js\"></script>')">
|
|
160
|
-
Copy
|
|
161
|
-
</button>
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
|
|
165
|
-
<div class="file-item">
|
|
166
|
-
<div class="file-location">
|
|
167
|
-
<a href="http://localhost:3000/global/loader.js" target="_blank">http://localhost:3000/global/loader.js</a>
|
|
168
|
-
</div>
|
|
169
|
-
<div class="import-suggestion">
|
|
170
|
-
<script defer src="http://localhost:3000/global/loader.js"></script>
|
|
171
|
-
<br>
|
|
172
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/global/loader.js\"></script>')">
|
|
173
|
-
Copy
|
|
174
|
-
</button>
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
|
|
178
|
-
<div class="file-item">
|
|
179
|
-
<div class="file-location">
|
|
180
|
-
<a href="http://localhost:3000/global/style.css" target="_blank">http://localhost:3000/global/style.css</a>
|
|
181
|
-
</div>
|
|
182
|
-
<div class="import-suggestion">
|
|
183
|
-
<link href="http://localhost:3000/global/style.css" rel="stylesheet" type="text/css"/>
|
|
184
|
-
<br>
|
|
185
|
-
<button class="copy-btn" onclick="copyToClipboard('<link href=\"http://localhost:3000/global/style.css\" rel=\"stylesheet\" type=\"text/css\"/>')">
|
|
186
|
-
Copy
|
|
187
|
-
</button>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
|
|
191
|
-
<div class="file-item">
|
|
192
|
-
<div class="file-location">
|
|
193
|
-
<a href="http://localhost:3000/home/index.js" target="_blank">http://localhost:3000/home/index.js</a>
|
|
194
|
-
</div>
|
|
195
|
-
<div class="import-suggestion">
|
|
196
|
-
<script defer src="http://localhost:3000/home/index.js"></script>
|
|
197
|
-
<br>
|
|
198
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/home/index.js\"></script>')">
|
|
199
|
-
Copy
|
|
200
|
-
</button>
|
|
201
|
-
</div>
|
|
202
|
-
</div>
|
|
203
|
-
|
|
204
|
-
<div class="file-item">
|
|
205
|
-
<div class="file-location">
|
|
206
|
-
<a href="http://localhost:3000/marquee/index.js" target="_blank">http://localhost:3000/marquee/index.js</a>
|
|
207
|
-
</div>
|
|
208
|
-
<div class="import-suggestion">
|
|
209
|
-
<script defer src="http://localhost:3000/marquee/index.js"></script>
|
|
210
|
-
<br>
|
|
211
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/marquee/index.js\"></script>')">
|
|
212
|
-
Copy
|
|
213
|
-
</button>
|
|
214
|
-
</div>
|
|
215
|
-
</div>
|
|
216
|
-
|
|
217
|
-
<div class="file-item">
|
|
218
|
-
<div class="file-location">
|
|
219
|
-
<a href="http://localhost:3000/navigation/announcement/index.js" target="_blank">http://localhost:3000/navigation/announcement/index.js</a>
|
|
220
|
-
</div>
|
|
221
|
-
<div class="import-suggestion">
|
|
222
|
-
<script defer src="http://localhost:3000/navigation/announcement/index.js"></script>
|
|
223
|
-
<br>
|
|
224
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/navigation/announcement/index.js\"></script>')">
|
|
225
|
-
Copy
|
|
226
|
-
</button>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
|
|
230
|
-
<div class="file-item">
|
|
231
|
-
<div class="file-location">
|
|
232
|
-
<a href="http://localhost:3000/navigation/context-menu/index.js" target="_blank">http://localhost:3000/navigation/context-menu/index.js</a>
|
|
233
|
-
</div>
|
|
234
|
-
<div class="import-suggestion">
|
|
235
|
-
<script defer src="http://localhost:3000/navigation/context-menu/index.js"></script>
|
|
236
|
-
<br>
|
|
237
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/navigation/context-menu/index.js\"></script>')">
|
|
238
|
-
Copy
|
|
239
|
-
</button>
|
|
240
|
-
</div>
|
|
241
|
-
</div>
|
|
242
|
-
|
|
243
|
-
<div class="file-item">
|
|
244
|
-
<div class="file-location">
|
|
245
|
-
<a href="http://localhost:3000/navigation/desktop/index.js" target="_blank">http://localhost:3000/navigation/desktop/index.js</a>
|
|
246
|
-
</div>
|
|
247
|
-
<div class="import-suggestion">
|
|
248
|
-
<script defer src="http://localhost:3000/navigation/desktop/index.js"></script>
|
|
249
|
-
<br>
|
|
250
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/navigation/desktop/index.js\"></script>')">
|
|
251
|
-
Copy
|
|
252
|
-
</button>
|
|
253
|
-
</div>
|
|
254
|
-
</div>
|
|
255
|
-
|
|
256
|
-
<div class="file-item">
|
|
257
|
-
<div class="file-location">
|
|
258
|
-
<a href="http://localhost:3000/navigation/mobile/index.js" target="_blank">http://localhost:3000/navigation/mobile/index.js</a>
|
|
259
|
-
</div>
|
|
260
|
-
<div class="import-suggestion">
|
|
261
|
-
<script defer src="http://localhost:3000/navigation/mobile/index.js"></script>
|
|
262
|
-
<br>
|
|
263
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/navigation/mobile/index.js\"></script>')">
|
|
264
|
-
Copy
|
|
265
|
-
</button>
|
|
266
|
-
</div>
|
|
267
|
-
</div>
|
|
268
|
-
|
|
269
|
-
<div class="file-item">
|
|
270
|
-
<div class="file-location">
|
|
271
|
-
<a href="http://localhost:3000/navigation/scroll/index.js" target="_blank">http://localhost:3000/navigation/scroll/index.js</a>
|
|
272
|
-
</div>
|
|
273
|
-
<div class="import-suggestion">
|
|
274
|
-
<script defer src="http://localhost:3000/navigation/scroll/index.js"></script>
|
|
275
|
-
<br>
|
|
276
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/navigation/scroll/index.js\"></script>')">
|
|
277
|
-
Copy
|
|
278
|
-
</button>
|
|
279
|
-
</div>
|
|
280
|
-
</div>
|
|
281
|
-
|
|
282
|
-
<div class="file-item">
|
|
283
|
-
<div class="file-location">
|
|
284
|
-
<a href="http://localhost:3000/navigation/style.css" target="_blank">http://localhost:3000/navigation/style.css</a>
|
|
285
|
-
</div>
|
|
286
|
-
<div class="import-suggestion">
|
|
287
|
-
<link href="http://localhost:3000/navigation/style.css" rel="stylesheet" type="text/css"/>
|
|
288
|
-
<br>
|
|
289
|
-
<button class="copy-btn" onclick="copyToClipboard('<link href=\"http://localhost:3000/navigation/style.css\" rel=\"stylesheet\" type=\"text/css\"/>')">
|
|
290
|
-
Copy
|
|
291
|
-
</button>
|
|
292
|
-
</div>
|
|
293
|
-
</div>
|
|
294
|
-
|
|
295
|
-
<div class="file-item">
|
|
296
|
-
<div class="file-location">
|
|
297
|
-
<a href="http://localhost:3000/posthog/form-success.js" target="_blank">http://localhost:3000/posthog/form-success.js</a>
|
|
298
|
-
</div>
|
|
299
|
-
<div class="import-suggestion">
|
|
300
|
-
<script defer src="http://localhost:3000/posthog/form-success.js"></script>
|
|
301
|
-
<br>
|
|
302
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/posthog/form-success.js\"></script>')">
|
|
303
|
-
Copy
|
|
304
|
-
</button>
|
|
305
|
-
</div>
|
|
306
|
-
</div>
|
|
307
|
-
|
|
308
|
-
<div class="file-item">
|
|
309
|
-
<div class="file-location">
|
|
310
|
-
<a href="http://localhost:3000/posthog/index.js" target="_blank">http://localhost:3000/posthog/index.js</a>
|
|
311
|
-
</div>
|
|
312
|
-
<div class="import-suggestion">
|
|
313
|
-
<script defer src="http://localhost:3000/posthog/index.js"></script>
|
|
314
|
-
<br>
|
|
315
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/posthog/index.js\"></script>')">
|
|
316
|
-
Copy
|
|
317
|
-
</button>
|
|
318
|
-
</div>
|
|
319
|
-
</div>
|
|
320
|
-
|
|
321
|
-
<div class="file-item">
|
|
322
|
-
<div class="file-location">
|
|
323
|
-
<a href="http://localhost:3000/posthog/main.js" target="_blank">http://localhost:3000/posthog/main.js</a>
|
|
324
|
-
</div>
|
|
325
|
-
<div class="import-suggestion">
|
|
326
|
-
<script defer src="http://localhost:3000/posthog/main.js"></script>
|
|
327
|
-
<br>
|
|
328
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/posthog/main.js\"></script>')">
|
|
329
|
-
Copy
|
|
330
|
-
</button>
|
|
331
|
-
</div>
|
|
332
|
-
</div>
|
|
333
|
-
|
|
334
|
-
<div class="file-item">
|
|
335
|
-
<div class="file-location">
|
|
336
|
-
<a href="http://localhost:3000/quick-fix/reload.js" target="_blank">http://localhost:3000/quick-fix/reload.js</a>
|
|
337
|
-
</div>
|
|
338
|
-
<div class="import-suggestion">
|
|
339
|
-
<script defer src="http://localhost:3000/quick-fix/reload.js"></script>
|
|
340
|
-
<br>
|
|
341
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/quick-fix/reload.js\"></script>')">
|
|
342
|
-
Copy
|
|
343
|
-
</button>
|
|
344
|
-
</div>
|
|
345
|
-
</div>
|
|
346
|
-
|
|
347
|
-
<div class="file-item">
|
|
348
|
-
<div class="file-location">
|
|
349
|
-
<a href="http://localhost:3000/test/sample.js" target="_blank">http://localhost:3000/test/sample.js</a>
|
|
350
|
-
</div>
|
|
351
|
-
<div class="import-suggestion">
|
|
352
|
-
<script defer src="http://localhost:3000/test/sample.js"></script>
|
|
353
|
-
<br>
|
|
354
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/test/sample.js\"></script>')">
|
|
355
|
-
Copy
|
|
356
|
-
</button>
|
|
357
|
-
</div>
|
|
358
|
-
</div>
|
|
359
|
-
|
|
360
|
-
<div class="file-item">
|
|
361
|
-
<div class="file-location">
|
|
362
|
-
<a href="http://localhost:3000/testimonials/index.js" target="_blank">http://localhost:3000/testimonials/index.js</a>
|
|
363
|
-
</div>
|
|
364
|
-
<div class="import-suggestion">
|
|
365
|
-
<script defer src="http://localhost:3000/testimonials/index.js"></script>
|
|
366
|
-
<br>
|
|
367
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/testimonials/index.js\"></script>')">
|
|
368
|
-
Copy
|
|
369
|
-
</button>
|
|
370
|
-
</div>
|
|
371
|
-
</div>
|
|
372
|
-
|
|
373
|
-
<div class="file-item">
|
|
374
|
-
<div class="file-location">
|
|
375
|
-
<a href="http://localhost:3000/tracking/fill-form-fields.js" target="_blank">http://localhost:3000/tracking/fill-form-fields.js</a>
|
|
376
|
-
</div>
|
|
377
|
-
<div class="import-suggestion">
|
|
378
|
-
<script defer src="http://localhost:3000/tracking/fill-form-fields.js"></script>
|
|
379
|
-
<br>
|
|
380
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/tracking/fill-form-fields.js\"></script>')">
|
|
381
|
-
Copy
|
|
382
|
-
</button>
|
|
383
|
-
</div>
|
|
384
|
-
</div>
|
|
385
|
-
|
|
386
|
-
<div class="file-item">
|
|
387
|
-
<div class="file-location">
|
|
388
|
-
<a href="http://localhost:3000/tracking/form-tracker.js" target="_blank">http://localhost:3000/tracking/form-tracker.js</a>
|
|
389
|
-
</div>
|
|
390
|
-
<div class="import-suggestion">
|
|
391
|
-
<script defer src="http://localhost:3000/tracking/form-tracker.js"></script>
|
|
392
|
-
<br>
|
|
393
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/tracking/form-tracker.js\"></script>')">
|
|
394
|
-
Copy
|
|
395
|
-
</button>
|
|
396
|
-
</div>
|
|
397
|
-
</div>
|
|
398
|
-
|
|
399
|
-
<div class="file-item">
|
|
400
|
-
<div class="file-location">
|
|
401
|
-
<a href="http://localhost:3000/tracking/page-categories.js" target="_blank">http://localhost:3000/tracking/page-categories.js</a>
|
|
402
|
-
</div>
|
|
403
|
-
<div class="import-suggestion">
|
|
404
|
-
<script defer src="http://localhost:3000/tracking/page-categories.js"></script>
|
|
405
|
-
<br>
|
|
406
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/tracking/page-categories.js\"></script>')">
|
|
407
|
-
Copy
|
|
408
|
-
</button>
|
|
409
|
-
</div>
|
|
410
|
-
</div>
|
|
411
|
-
|
|
412
|
-
<div class="file-item">
|
|
413
|
-
<div class="file-location">
|
|
414
|
-
<a href="http://localhost:3000/tracking/user-journey.js" target="_blank">http://localhost:3000/tracking/user-journey.js</a>
|
|
415
|
-
</div>
|
|
416
|
-
<div class="import-suggestion">
|
|
417
|
-
<script defer src="http://localhost:3000/tracking/user-journey.js"></script>
|
|
418
|
-
<br>
|
|
419
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/tracking/user-journey.js\"></script>')">
|
|
420
|
-
Copy
|
|
421
|
-
</button>
|
|
422
|
-
</div>
|
|
423
|
-
</div>
|
|
424
|
-
|
|
425
|
-
<div class="file-item">
|
|
426
|
-
<div class="file-location">
|
|
427
|
-
<a href="http://localhost:3000/tracking/utm-links.js" target="_blank">http://localhost:3000/tracking/utm-links.js</a>
|
|
428
|
-
</div>
|
|
429
|
-
<div class="import-suggestion">
|
|
430
|
-
<script defer src="http://localhost:3000/tracking/utm-links.js"></script>
|
|
431
|
-
<br>
|
|
432
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/tracking/utm-links.js\"></script>')">
|
|
433
|
-
Copy
|
|
434
|
-
</button>
|
|
435
|
-
</div>
|
|
436
|
-
</div>
|
|
437
|
-
|
|
438
|
-
<div class="file-item">
|
|
439
|
-
<div class="file-location">
|
|
440
|
-
<a href="http://localhost:3000/utils/sample.js" target="_blank">http://localhost:3000/utils/sample.js</a>
|
|
441
|
-
</div>
|
|
442
|
-
<div class="import-suggestion">
|
|
443
|
-
<script defer src="http://localhost:3000/utils/sample.js"></script>
|
|
444
|
-
<br>
|
|
445
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/utils/sample.js\"></script>')">
|
|
446
|
-
Copy
|
|
447
|
-
</button>
|
|
448
|
-
</div>
|
|
449
|
-
</div>
|
|
450
|
-
|
|
451
|
-
<div class="file-item">
|
|
452
|
-
<div class="file-location">
|
|
453
|
-
<a href="http://localhost:3000/validations/localhost.js" target="_blank">http://localhost:3000/validations/localhost.js</a>
|
|
454
|
-
</div>
|
|
455
|
-
<div class="import-suggestion">
|
|
456
|
-
<script defer src="http://localhost:3000/validations/localhost.js"></script>
|
|
457
|
-
<br>
|
|
458
|
-
<button class="copy-btn" onclick="copyToClipboard('<script defer src=\"http://localhost:3000/validations/localhost.js\"></script>')">
|
|
459
|
-
Copy
|
|
460
|
-
</button>
|
|
461
|
-
</div>
|
|
462
|
-
</div>
|
|
463
|
-
|
|
464
|
-
</div>
|
|
465
|
-
</div>
|
|
466
|
-
|
|
467
|
-
<script>
|
|
468
|
-
function copyToClipboard(text) {
|
|
469
|
-
navigator.clipboard.writeText(text).then(() => {
|
|
470
|
-
// Visual feedback
|
|
471
|
-
event.target.textContent = 'Copied!';
|
|
472
|
-
setTimeout(() => {
|
|
473
|
-
event.target.textContent = 'Copy';
|
|
474
|
-
}, 1000);
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
</script>
|
|
478
|
-
</body>
|
|
479
|
-
</html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(()=>{var o=[{attribute:"data-ph",attributeValue:"book-a-demo",condition:"href",conditionValue:"/contact-us"},{attribute:"data-ph",attributeValue:"sign-in",condition:"href",conditionValue:"https://console.fynd.com/auth/sign-in"},{attribute:"data-ph",attributeValue:"sign-up",condition:"href",conditionValue:"https://console.fynd.com/auth/sign-up"}];function s(n,e,t){switch(e.toLowerCase()){case"href":return u(n,t);case"text":return d(n,t);case"class":return n.classList.contains(t);case"id":return n.id===t;default:return!1}}function u(n,e){let t=n.getAttribute("href")||"";if(!t)return!1;try{let i;if(t.startsWith("http://")||t.startsWith("https://")?i=new URL(t):t.startsWith("/")?i=new URL(t,window.location.origin):i=new URL(t,window.location.href),e.startsWith("http://")||e.startsWith("https://"))try{let a=new URL(e);return i.origin===a.origin&&i.pathname===a.pathname}catch{return t.includes(e)}return i.pathname.includes(e)}catch{return t.includes(e)}}function d(n,e){let i=(n.textContent?.trim().toLowerCase()||"").replace(/\s+/g," "),a=e.toLowerCase().replace(/\s+/g," ");return i.includes(a)}function b(n=o){document.querySelectorAll("a").forEach(t=>{n.forEach(i=>{t.hasAttribute(i.attribute)&&t.getAttribute(i.attribute)===i.attributeValue||s(t,i.condition,i.conditionValue)&&t.setAttribute(i.attribute,i.attributeValue)})})}function c(n=o){document.querySelectorAll("a").forEach(t=>{n.forEach(i=>{t.hasAttribute(i.attribute)&&t.getAttribute(i.attribute)===i.attributeValue||s(t,i.condition,i.conditionValue)&&t.setAttribute(i.attribute,i.attributeValue)})})}var r=class{constructor(e=o){this.observer=null;this.config=e}updateConfig(e){this.config=e}tagExistingLinks(){document.querySelectorAll("a").forEach(t=>{this.config.forEach(i=>{this.shouldTagLink(t,i)&&this.tagLink(t,i)})})}startObserving(){this.observer=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.forEach(i=>{if(i.nodeType===Node.ELEMENT_NODE){let a=i;a.tagName==="A"&&this.processAnchor(a),a.querySelectorAll("a").forEach(g=>{this.processAnchor(g)})}})})}),this.observer.observe(document.body,{childList:!0,subtree:!0})}stopObserving(){this.observer&&(this.observer.disconnect(),this.observer=null)}processAnchor(e){this.config.forEach(t=>{this.shouldTagLink(e,t)&&this.tagLink(e,t)})}shouldTagLink(e,t){return e.hasAttribute(t.attribute)&&e.getAttribute(t.attribute)===t.attributeValue?!1:s(e,t.condition,t.conditionValue)}tagLink(e,t){e.setAttribute(t.attribute,t.attributeValue)}};function f(n){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{c(n)}):c(n)}function h(n){let e=()=>{let t=new r(n);t.tagExistingLinks(),t.startObserving()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}h();})();
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../bin/live-reload.js", "../../src/posthog/attributes.ts"],
|
|
4
|
-
"sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n console.log(\"Live reload disabled: not running on localhost\");\n}\n", "interface LinkTaggingRule {\n attribute: string;\n attributeValue: string;\n condition: string;\n conditionValue: string;\n }\n \n const DEFAULT_TAGGING_CONFIG: LinkTaggingRule[] = [\n {\n attribute: \"data-ph\",\n attributeValue: \"book-a-demo\",\n condition: \"href\",\n conditionValue: \"/contact-us\"\n },\n {\n attribute: \"data-ph\",\n attributeValue: \"sign-in\",\n condition: \"href\",\n conditionValue: \"https://console.fynd.com/auth/sign-in\"\n },\n {\n attribute: \"data-ph\",\n attributeValue: \"sign-up\",\n condition: \"href\",\n conditionValue: \"https://console.fynd.com/auth/sign-up\"\n }\n ];\n \n function matchesCondition(anchor: HTMLAnchorElement, condition: string, conditionValue: string): boolean {\n switch (condition.toLowerCase()) {\n case 'href':\n return matchesHref(anchor, conditionValue);\n case 'text':\n return matchesText(anchor, conditionValue);\n case 'class':\n return anchor.classList.contains(conditionValue);\n case 'id':\n return anchor.id === conditionValue;\n default:\n return false;\n }\n }\n \n function matchesHref(anchor: HTMLAnchorElement, conditionValue: string): boolean {\n const href = anchor.getAttribute('href') || '';\n if (!href) return false;\n \n try {\n let url: URL;\n \n if (href.startsWith('http://') || href.startsWith('https://')) {\n url = new URL(href);\n } else if (href.startsWith('/')) {\n url = new URL(href, window.location.origin);\n } else {\n url = new URL(href, window.location.href);\n }\n \n if (conditionValue.startsWith('http://') || conditionValue.startsWith('https://')) {\n try {\n const conditionUrl = new URL(conditionValue);\n return url.origin === conditionUrl.origin && url.pathname === conditionUrl.pathname;\n } catch {\n return href.includes(conditionValue);\n }\n }\n \n return url.pathname.includes(conditionValue);\n } catch (error) {\n return href.includes(conditionValue);\n }\n }\n \n function matchesText(anchor: HTMLAnchorElement, conditionValue: string): boolean {\n const textContent = anchor.textContent?.trim().toLowerCase() || '';\n const normalizedText = textContent.replace(/\\s+/g, ' ');\n const normalizedCondition = conditionValue.toLowerCase().replace(/\\s+/g, ' ');\n \n return normalizedText.includes(normalizedCondition);\n }\n \n function tagLinks(config: LinkTaggingRule[] = DEFAULT_TAGGING_CONFIG): void {\n const anchorTags = document.querySelectorAll('a');\n \n anchorTags.forEach((anchor) => {\n config.forEach((rule) => {\n if (anchor.hasAttribute(rule.attribute) && \n anchor.getAttribute(rule.attribute) === rule.attributeValue) {\n return;\n }\n \n if (matchesCondition(anchor, rule.condition, rule.conditionValue)) {\n anchor.setAttribute(rule.attribute, rule.attributeValue);\n }\n });\n });\n }\n \n function tagLinksAdvanced(config: LinkTaggingRule[] = DEFAULT_TAGGING_CONFIG): void {\n const anchorTags = document.querySelectorAll('a');\n \n anchorTags.forEach((anchor) => {\n config.forEach((rule) => {\n if (anchor.hasAttribute(rule.attribute) && \n anchor.getAttribute(rule.attribute) === rule.attributeValue) {\n return;\n }\n \n if (matchesCondition(anchor, rule.condition, rule.conditionValue)) {\n anchor.setAttribute(rule.attribute, rule.attributeValue);\n }\n });\n });\n }\n \n class GenericLinkTagger {\n private config: LinkTaggingRule[];\n private observer: MutationObserver | null = null;\n \n constructor(config: LinkTaggingRule[] = DEFAULT_TAGGING_CONFIG) {\n this.config = config;\n }\n \n updateConfig(config: LinkTaggingRule[]): void {\n this.config = config;\n }\n \n tagExistingLinks(): void {\n const anchorTags = document.querySelectorAll('a');\n \n anchorTags.forEach((anchor) => {\n this.config.forEach((rule) => {\n if (this.shouldTagLink(anchor, rule)) {\n this.tagLink(anchor, rule);\n }\n });\n });\n }\n \n startObserving(): void {\n this.observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n mutation.addedNodes.forEach((node) => {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n \n if (element.tagName === 'A') {\n this.processAnchor(element as HTMLAnchorElement);\n }\n \n const anchorTags = element.querySelectorAll('a');\n anchorTags.forEach((anchor) => {\n this.processAnchor(anchor);\n });\n }\n });\n });\n });\n \n this.observer.observe(document.body, {\n childList: true,\n subtree: true\n });\n }\n \n stopObserving(): void {\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n }\n \n private processAnchor(anchor: HTMLAnchorElement): void {\n this.config.forEach((rule) => {\n if (this.shouldTagLink(anchor, rule)) {\n this.tagLink(anchor, rule);\n }\n });\n }\n \n private shouldTagLink(anchor: HTMLAnchorElement, rule: LinkTaggingRule): boolean {\n if (anchor.hasAttribute(rule.attribute) && \n anchor.getAttribute(rule.attribute) === rule.attributeValue) {\n return false;\n }\n \n return matchesCondition(anchor, rule.condition, rule.conditionValue);\n }\n \n private tagLink(anchor: HTMLAnchorElement, rule: LinkTaggingRule): void {\n anchor.setAttribute(rule.attribute, rule.attributeValue);\n }\n }\n \n function initGenericLinkTagger(config?: LinkTaggingRule[]): void {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', () => {\n tagLinksAdvanced(config);\n });\n } else {\n tagLinksAdvanced(config);\n }\n }\n \n function initGenericLinkTaggerWithObserver(config?: LinkTaggingRule[]): void {\n const runTagger = () => {\n const tagger = new GenericLinkTagger(config);\n tagger.tagExistingLinks();\n tagger.startObserving();\n };\n \n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', runTagger);\n } else {\n runTagger();\n }\n }\n \n initGenericLinkTaggerWithObserver();\n \n export { \n GenericLinkTagger, \n tagLinks, \n tagLinksAdvanced, \n initGenericLinkTagger, \n initGenericLinkTaggerWithObserver,\n DEFAULT_TAGGING_CONFIG,\n type LinkTaggingRule\n };"],
|
|
5
|
-
"mappings": ";;;AACA,MACE,OAAO,SAAS,aAAa,eAC7B,OAAO,SAAS,aAAa,aAC7B;AACA,QAAI,YAAY,GAAG,uBAAY,UAAU,EAAE;AAAA,MAAiB;AAAA,MAAU,MACpE,SAAS,OAAO;AAAA,IAClB;AAAA,EACF,OAAO;AACL,YAAQ,IAAI,gDAAgD;AAAA,EAC9D;;;ACHE,MAAM,yBAA4C;AAAA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2B,MAAgC;AAC/E,UAAI,OAAO,aAAa,KAAK,SAAS,KAClC,OAAO,aAAa,KAAK,SAAS,MAAM,KAAK,gBAAgB;AAC/D,eAAO;AAAA,MACT;AAEA,aAAO,iBAAiB,QAAQ,KAAK,WAAW,KAAK,cAAc;AAAA,IACrE;AAAA,IAEQ,QAAQ,QAA2B,MAA6B;AACtE,aAAO,aAAa,KAAK,WAAW,KAAK,cAAc;AAAA,IACzD;AAAA,EACF;AAEA,WAAS,sBAAsB,QAAkC;AAC/D,QAAI,SAAS,eAAe,WAAW;AACrC,eAAS,iBAAiB,oBAAoB,MAAM;AAClD,yBAAiB,MAAM;AAAA,MACzB,CAAC;AAAA,IACH,OAAO;AACL,uBAAiB,MAAM;AAAA,IACzB;AAAA,EACF;AAEA,WAAS,kCAAkC,QAAkC;AAC3E,UAAM,YAAY,MAAM;AACtB,YAAM,SAAS,IAAI,kBAAkB,MAAM;AAC3C,aAAO,iBAAiB;AACxB,aAAO,eAAe;AAAA,IACxB;AAEA,QAAI,SAAS,eAAe,WAAW;AACrC,eAAS,iBAAiB,oBAAoB,SAAS;AAAA,IACzD,OAAO;AACL,gBAAU;AAAA,IACZ;AAAA,EACF;AAEA,oCAAkC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
(() => {
|
|
3
|
-
// bin/live-reload.js
|
|
4
|
-
if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
|
|
5
|
-
new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
|
|
6
|
-
"change",
|
|
7
|
-
() => location.reload()
|
|
8
|
-
);
|
|
9
|
-
} else {
|
|
10
|
-
console.log("Live reload disabled: not running on localhost");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// src/posthog/form-success.ts
|
|
14
|
-
var FORM_SUCCESS_STORAGE_KEY = "form_success_tracking";
|
|
15
|
-
var SESSION_DURATION_MS = 10 * 60 * 1e3;
|
|
16
|
-
function getFormName() {
|
|
17
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
18
|
-
const formName = urlParams.get("form_name");
|
|
19
|
-
return formName ? decodeURIComponent(formName) : null;
|
|
20
|
-
}
|
|
21
|
-
function hasFormSuccessBeenTracked(formName) {
|
|
22
|
-
try {
|
|
23
|
-
const storedData = sessionStorage.getItem(FORM_SUCCESS_STORAGE_KEY);
|
|
24
|
-
if (!storedData) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
const parsedData = JSON.parse(storedData);
|
|
28
|
-
const currentTime = Date.now();
|
|
29
|
-
const timeDifference = currentTime - parsedData.timestamp;
|
|
30
|
-
if (timeDifference > SESSION_DURATION_MS) {
|
|
31
|
-
sessionStorage.removeItem(FORM_SUCCESS_STORAGE_KEY);
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
return parsedData.formName === formName;
|
|
35
|
-
} catch (error) {
|
|
36
|
-
console.error("Error checking form success tracking:", error);
|
|
37
|
-
sessionStorage.removeItem(FORM_SUCCESS_STORAGE_KEY);
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function markFormSuccessAsTracked(formName) {
|
|
42
|
-
try {
|
|
43
|
-
const trackingData = {
|
|
44
|
-
timestamp: Date.now(),
|
|
45
|
-
formName
|
|
46
|
-
};
|
|
47
|
-
sessionStorage.setItem(FORM_SUCCESS_STORAGE_KEY, JSON.stringify(trackingData));
|
|
48
|
-
} catch (error) {
|
|
49
|
-
console.error("Error storing form success tracking data:", error);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
53
|
-
const currentFormName = getFormName();
|
|
54
|
-
if (!currentFormName) {
|
|
55
|
-
console.log("No form name found in URL parameters");
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
if (hasFormSuccessBeenTracked(currentFormName)) {
|
|
59
|
-
console.log(`Form success for "${currentFormName}" already tracked in this session`);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (window.posthog && window.getTrackingPropertiesWithForm) {
|
|
63
|
-
window.posthog.capture(
|
|
64
|
-
"fynd_form_success",
|
|
65
|
-
window.getTrackingPropertiesWithForm(currentFormName)
|
|
66
|
-
);
|
|
67
|
-
markFormSuccessAsTracked(currentFormName);
|
|
68
|
-
console.log(`Form success tracked for "${currentFormName}"`);
|
|
69
|
-
} else {
|
|
70
|
-
console.warn("PostHog or tracking functions not available");
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
})();
|
|
74
|
-
//# sourceMappingURL=form-success.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../bin/live-reload.js", "../../src/posthog/form-success.ts"],
|
|
4
|
-
"sourcesContent": ["// Only enable live reload when running on localhost\nif (\n window.location.hostname === \"localhost\" ||\n window.location.hostname === \"127.0.0.1\"\n) {\n new EventSource(`${SERVE_ORIGIN}/esbuild`).addEventListener(\"change\", () =>\n location.reload()\n );\n} else {\n console.log(\"Live reload disabled: not running on localhost\");\n}\n", "// Type definitions (if not already defined elsewhere)\ninterface TrackingProperties {\n source_page: string;\n fynd_product: string;\n interface: string;\n device_type: string;\n utm_source: string;\n utm_medium: string;\n utm_campaign: string;\n referrer: string;\n}\n\ninterface TrackingPropertiesWithForm extends TrackingProperties {\n form_name: string;\n}\n\ninterface PostHog {\n capture: (eventName: string, properties: TrackingProperties | TrackingPropertiesWithForm) => void;\n}\n\n// Global declarations (if not already defined elsewhere)\ndeclare global {\n interface Window {\n getTrackingPropertiesWithForm: (formName: string) => TrackingPropertiesWithForm;\n posthog: PostHog;\n }\n}\n\n// This export statement makes the file a module and allows global declarations to work\nexport { };\n\n// Session storage key for tracking form success events\nconst FORM_SUCCESS_STORAGE_KEY = 'form_success_tracking';\nconst SESSION_DURATION_MS = 10 * 60 * 1000; // 10 minutes in milliseconds\n\ninterface FormSuccessData {\n timestamp: number;\n formName: string;\n}\n\nfunction getFormName(): string | null {\n const urlParams: URLSearchParams = new URLSearchParams(window.location.search);\n const formName: string | null = urlParams.get(\"form_name\");\n return formName ? decodeURIComponent(formName) : null;\n}\n\nfunction hasFormSuccessBeenTracked(formName: string): boolean {\n try {\n const storedData: string | null = sessionStorage.getItem(FORM_SUCCESS_STORAGE_KEY);\n\n if (!storedData) {\n return false;\n }\n\n const parsedData: FormSuccessData = JSON.parse(storedData);\n const currentTime: number = Date.now();\n const timeDifference: number = currentTime - parsedData.timestamp;\n\n // Check if the session has expired (more than 10 minutes)\n if (timeDifference > SESSION_DURATION_MS) {\n // Session expired, remove old data\n sessionStorage.removeItem(FORM_SUCCESS_STORAGE_KEY);\n return false;\n }\n\n // Check if the same form success was already tracked in this session\n return parsedData.formName === formName;\n } catch (error) {\n console.error('Error checking form success tracking:', error);\n // If there's an error, clear the storage and allow tracking\n sessionStorage.removeItem(FORM_SUCCESS_STORAGE_KEY);\n return false;\n }\n}\n\nfunction markFormSuccessAsTracked(formName: string): void {\n try {\n const trackingData: FormSuccessData = {\n timestamp: Date.now(),\n formName: formName\n };\n\n sessionStorage.setItem(FORM_SUCCESS_STORAGE_KEY, JSON.stringify(trackingData));\n } catch (error) {\n console.error('Error storing form success tracking data:', error);\n }\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", function (): void {\n const currentFormName: string | null = getFormName();\n\n if (!currentFormName) {\n console.log('No form name found in URL parameters');\n return;\n }\n\n // Check if form success has already been tracked for this form in the current session\n if (hasFormSuccessBeenTracked(currentFormName)) {\n console.log(`Form success for \"${currentFormName}\" already tracked in this session`);\n return;\n }\n\n if (window.posthog && window.getTrackingPropertiesWithForm) {\n window.posthog.capture(\n \"fynd_form_success\",\n window.getTrackingPropertiesWithForm(currentFormName)\n );\n\n // Mark this form success as tracked\n markFormSuccessAsTracked(currentFormName);\n console.log(`Form success tracked for \"${currentFormName}\"`);\n } else {\n console.warn(\"PostHog or tracking functions not available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