blocfeed 0.18.0 → 0.20.0

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/main.cjs CHANGED
@@ -1,885 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkFBLTAHNW_cjs=require('./chunk-FBLTAHNW.cjs'),react=require('react'),jsxRuntime=require('react/jsx-runtime'),reactDom=require('react-dom'),framerMotion=require('framer-motion');var j=react.createContext(null);function ne(e){let t=react.useMemo(()=>chunkFBLTAHNW_cjs.w({...e.config??{},blocfeed_id:e.blocfeed_id}),[]);react.useEffect(()=>{chunkFBLTAHNW_cjs.t(e.blocfeed_id);},[e.blocfeed_id]);let[i,r]=react.useState(()=>t.getState());return react.useEffect(()=>t.subscribe(r),[t]),react.useEffect(()=>t.setConfig({...e.config??{},blocfeed_id:e.blocfeed_id}),[t,e.config,e.blocfeed_id]),react.useEffect(()=>()=>t.destroy(),[t]),jsxRuntime.jsx(j.Provider,{value:{controller:t,state:i},children:e.children})}var ze="blocfeed-styles-v1",Wt=`
3
- :where([data-blocfeed-ui-root]),
4
- :where([data-blocfeed-ui-root]) * {
5
- box-sizing: border-box;
6
- }
7
-
8
- :where([data-blocfeed-ui-root]) {
9
- --bf-z: 2147483647;
10
- --bf-font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
11
- --bf-panel-bg: rgba(17, 24, 39, 0.98);
12
- --bf-panel-fg: rgb(243, 244, 246);
13
- --bf-muted: rgba(243, 244, 246, 0.72);
14
- --bf-border: rgba(255, 255, 255, 0.14);
15
- --bf-accent: rgb(99, 102, 241);
16
- --bf-danger: rgb(239, 68, 68);
17
- --bf-shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
18
-
19
- /* Ensure widget always floats above customer modals/sidepanels/overlays */
20
- position: fixed;
21
- top: 0;
22
- left: 0;
23
- width: 0;
24
- height: 0;
25
- overflow: visible;
26
- z-index: var(--bf-z);
27
- isolation: isolate;
28
- pointer-events: none;
29
-
30
- font-family: var(--bf-font);
31
- color: var(--bf-panel-fg);
32
- }
33
-
34
- /* ------------------------------------------------------------------ */
35
- /* Light theme */
36
- /* ------------------------------------------------------------------ */
37
-
38
- :where([data-blocfeed-ui-root][data-bf-theme="light"]) {
39
- --bf-panel-bg: rgba(255, 255, 255, 0.98);
40
- --bf-panel-fg: rgb(17, 24, 39);
41
- --bf-muted: rgba(17, 24, 39, 0.6);
42
- --bf-border: rgba(0, 0, 0, 0.12);
43
- --bf-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
44
- }
45
-
46
- :where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-textarea {
47
- border-color: rgba(0, 0, 0, 0.14);
48
- background: rgba(0, 0, 0, 0.04);
49
- color: var(--bf-panel-fg);
50
- }
51
-
52
- :where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-panelHeader {
53
- border-bottom-color: rgba(0, 0, 0, 0.08);
54
- }
55
-
56
- :where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-title {
57
- color: rgba(17, 24, 39, 0.85);
58
- }
59
-
60
- :where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-error {
61
- color: rgb(185, 28, 28);
62
- }
63
-
64
- :where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-watermark a {
65
- color: rgba(17, 24, 39, 0.35);
66
- }
67
-
68
- :where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-watermark {
69
- border-top-color: rgba(0, 0, 0, 0.06);
70
- }
71
-
72
- :where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-highlight {
73
- box-shadow: 0 0 0 9999px rgba(255, 255, 255, 0.42);
74
- }
75
-
76
- :where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-blocker {
77
- background: rgba(255, 255, 255, 0.35);
78
- }
79
-
80
- /* ------------------------------------------------------------------ */
81
- /* Trigger button \u2014 default bottom-right */
82
- /* ------------------------------------------------------------------ */
83
-
84
- :where([data-blocfeed-ui-root]) .bf-trigger {
85
- position: fixed;
86
- right: 18px;
87
- bottom: 18px;
88
- z-index: var(--bf-z);
89
- pointer-events: auto;
90
-
91
- display: inline-flex;
92
- align-items: center;
93
- gap: 10px;
94
- padding: 10px 12px;
95
- border-radius: 999px;
96
- border: 1px solid var(--bf-border);
97
- background: var(--bf-panel-bg);
98
- color: var(--bf-panel-fg);
99
- box-shadow: var(--bf-shadow);
100
- cursor: pointer;
101
- user-select: none;
102
- -webkit-tap-highlight-color: transparent;
103
- }
104
-
105
- :where([data-blocfeed-ui-root]) .bf-trigger:hover {
106
- border-color: var(--bf-accent);
107
- }
108
-
109
- :where([data-blocfeed-ui-root]) .bf-trigger:focus-visible {
110
- outline: 2px solid var(--bf-accent);
111
- outline-offset: 2px;
112
- }
113
-
114
- /* Position variants (item 9) */
115
- :where([data-blocfeed-ui-root]) .bf-trigger-bl {
116
- left: 18px; bottom: 18px; right: auto; top: auto;
117
- }
118
- :where([data-blocfeed-ui-root]) .bf-trigger-tr {
119
- right: 18px; top: 18px; bottom: auto; left: auto;
120
- }
121
- :where([data-blocfeed-ui-root]) .bf-trigger-tl {
122
- left: 18px; top: 18px; right: auto; bottom: auto;
123
- }
124
-
125
- :where([data-blocfeed-ui-root]) .bf-dot {
126
- width: 10px;
127
- height: 10px;
128
- border-radius: 999px;
129
- background: var(--bf-accent);
130
- box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
131
- }
132
-
133
- /* ------------------------------------------------------------------ */
134
- /* Overlay, blocker, highlight */
135
- /* ------------------------------------------------------------------ */
136
-
137
- :where([data-blocfeed-ui-root]) .bf-overlay {
138
- position: fixed;
139
- inset: 0;
140
- z-index: var(--bf-z);
141
- pointer-events: none;
142
- }
143
-
144
- :where([data-blocfeed-ui-root]) .bf-blocker {
145
- position: fixed;
146
- inset: 0;
147
- background: rgba(0, 0, 0, 0.35);
148
- pointer-events: auto;
149
- }
150
-
151
- :where([data-blocfeed-ui-root]) .bf-highlight {
152
- position: fixed;
153
- border: 2px solid var(--bf-accent);
154
- border-radius: 10px;
155
- box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.42);
156
- pointer-events: none;
157
- }
158
-
159
- /* ------------------------------------------------------------------ */
160
- /* Hint bar */
161
- /* ------------------------------------------------------------------ */
162
-
163
- :where([data-blocfeed-ui-root]) .bf-hint {
164
- position: fixed;
165
- top: 16px;
166
- left: 50%;
167
- transform: translateX(-50%);
168
- max-width: min(640px, calc(100vw - 24px));
169
- padding: 10px 12px;
170
- border-radius: 12px;
171
- border: 1px solid var(--bf-border);
172
- background: var(--bf-panel-bg);
173
- box-shadow: var(--bf-shadow);
174
- pointer-events: auto;
175
- display: flex;
176
- align-items: center;
177
- justify-content: space-between;
178
- gap: 12px;
179
- }
180
-
181
- :where([data-blocfeed-ui-root]) .bf-hint p {
182
- margin: 0;
183
- font-size: 13px;
184
- color: var(--bf-muted);
185
- }
186
-
187
- /* ------------------------------------------------------------------ */
188
- /* Buttons */
189
- /* ------------------------------------------------------------------ */
190
-
191
- :where([data-blocfeed-ui-root]) .bf-btn {
192
- border: 1px solid var(--bf-border);
193
- background: transparent;
194
- color: var(--bf-panel-fg);
195
- padding: 8px 10px;
196
- border-radius: 10px;
197
- cursor: pointer;
198
- user-select: none;
199
- }
200
-
201
- :where([data-blocfeed-ui-root]) .bf-btn:focus-visible {
202
- outline: 2px solid var(--bf-accent);
203
- outline-offset: 2px;
204
- }
205
-
206
- :where([data-blocfeed-ui-root]) .bf-btn[disabled] {
207
- opacity: 0.6;
208
- cursor: not-allowed;
209
- }
210
-
211
- :where([data-blocfeed-ui-root]) .bf-btnPrimary {
212
- background: var(--bf-accent);
213
- border-color: rgba(99, 102, 241, 0.6);
214
- color: white;
215
- }
216
-
217
- /* ------------------------------------------------------------------ */
218
- /* Panel */
219
- /* ------------------------------------------------------------------ */
220
-
221
- :where([data-blocfeed-ui-root]) .bf-panel {
222
- position: fixed;
223
- width: 360px;
224
- max-width: calc(100vw - 24px);
225
- border-radius: 14px;
226
- border: 1px solid var(--bf-border);
227
- background: var(--bf-panel-bg);
228
- box-shadow: var(--bf-shadow);
229
- pointer-events: auto;
230
- overflow: hidden;
231
- }
232
-
233
- :where([data-blocfeed-ui-root]) .bf-panelHeader {
234
- display: flex;
235
- align-items: center;
236
- justify-content: space-between;
237
- gap: 8px;
238
- padding: 12px 12px 10px;
239
- border-bottom: 1px solid rgba(255, 255, 255, 0.08);
240
- }
241
-
242
- :where([data-blocfeed-ui-root]) .bf-title {
243
- font-size: 13px;
244
- letter-spacing: 0.3px;
245
- text-transform: uppercase;
246
- color: rgba(243, 244, 246, 0.85);
247
- }
248
-
249
- :where([data-blocfeed-ui-root]) .bf-panelBody {
250
- padding: 12px;
251
- display: grid;
252
- gap: 10px;
253
- }
254
-
255
- /* ------------------------------------------------------------------ */
256
- /* Form elements */
257
- /* ------------------------------------------------------------------ */
258
-
259
- :where([data-blocfeed-ui-root]) .bf-textarea {
260
- width: 100%;
261
- min-height: 96px;
262
- resize: vertical;
263
- padding: 10px 10px;
264
- border-radius: 12px;
265
- border: 1px solid rgba(255, 255, 255, 0.14);
266
- background: rgba(0, 0, 0, 0.18);
267
- color: var(--bf-panel-fg);
268
- font-size: 14px;
269
- line-height: 1.4;
270
- }
271
-
272
- :where([data-blocfeed-ui-root]) .bf-textarea:focus-visible {
273
- outline: 2px solid rgba(99, 102, 241, 0.9);
274
- outline-offset: 2px;
275
- }
276
-
277
- :where([data-blocfeed-ui-root]) .bf-row {
278
- display: flex;
279
- align-items: center;
280
- justify-content: space-between;
281
- gap: 10px;
282
- }
283
-
284
- :where([data-blocfeed-ui-root]) .bf-row label {
285
- font-size: 13px;
286
- color: var(--bf-muted);
287
- display: inline-flex;
288
- align-items: center;
289
- gap: 8px;
290
- user-select: none;
291
- }
292
-
293
- :where([data-blocfeed-ui-root]) .bf-actions {
294
- display: flex;
295
- gap: 10px;
296
- justify-content: flex-end;
297
- padding-top: 4px;
298
- }
299
-
300
- /* ------------------------------------------------------------------ */
301
- /* Status, errors, toast */
302
- /* ------------------------------------------------------------------ */
303
-
304
- :where([data-blocfeed-ui-root]) .bf-status {
305
- font-size: 12px;
306
- color: var(--bf-muted);
307
- display: flex;
308
- align-items: center;
309
- gap: 8px;
310
- }
311
-
312
- :where([data-blocfeed-ui-root]) .bf-error {
313
- font-size: 12px;
314
- color: rgb(254, 202, 202);
315
- }
316
-
317
- :where([data-blocfeed-ui-root]) .bf-toast {
318
- position: fixed;
319
- left: 50%;
320
- bottom: 18px;
321
- transform: translateX(-50%);
322
- z-index: var(--bf-z);
323
- padding: 10px 12px;
324
- border-radius: 12px;
325
- border: 1px solid var(--bf-border);
326
- background: var(--bf-panel-bg);
327
- box-shadow: var(--bf-shadow);
328
- pointer-events: none;
329
- font-size: 13px;
330
- color: rgba(243, 244, 246, 0.9);
331
- }
332
-
333
- /* ------------------------------------------------------------------ */
334
- /* Category pills */
335
- /* ------------------------------------------------------------------ */
336
-
337
- :where([data-blocfeed-ui-root]) .bf-pills {
338
- display: flex;
339
- flex-wrap: wrap;
340
- gap: 6px;
341
- }
342
-
343
- :where([data-blocfeed-ui-root]) .bf-pill {
344
- padding: 4px 10px;
345
- border-radius: 999px;
346
- border: 1px solid var(--bf-border);
347
- background: transparent;
348
- color: var(--bf-muted);
349
- font-size: 12px;
350
- font-family: var(--bf-font);
351
- cursor: pointer;
352
- user-select: none;
353
- transition: border-color 0.15s, color 0.15s, background 0.15s;
354
- }
355
-
356
- :where([data-blocfeed-ui-root]) .bf-pill:hover {
357
- border-color: var(--bf-accent);
358
- color: var(--bf-panel-fg);
359
- }
360
-
361
- :where([data-blocfeed-ui-root]) .bf-pill-active {
362
- border-color: var(--bf-accent);
363
- background: var(--bf-accent);
364
- color: white;
365
- }
366
-
367
- :where([data-blocfeed-ui-root]) .bf-pill[disabled] {
368
- opacity: 0.6;
369
- cursor: not-allowed;
370
- }
371
-
372
- /* ------------------------------------------------------------------ */
373
- /* Capture spinner (item 12) */
374
- /* ------------------------------------------------------------------ */
375
-
376
- :where([data-blocfeed-ui-root]) .bf-spinner {
377
- display: inline-block;
378
- width: 10px;
379
- height: 10px;
380
- border-radius: 50%;
381
- background: var(--bf-accent);
382
- animation: bf-pulse 1s ease-in-out infinite;
383
- }
384
-
385
- @keyframes bf-pulse {
386
- 0%, 100% { opacity: 0.4; transform: scale(0.8); }
387
- 50% { opacity: 1; transform: scale(1.2); }
388
- }
389
-
390
- /* ------------------------------------------------------------------ */
391
- /* Trigger variant: edge-tab */
392
- /* ------------------------------------------------------------------ */
393
-
394
- :where([data-blocfeed-ui-root]) .bf-trigger-edge {
395
- position: fixed;
396
- z-index: var(--bf-z);
397
- pointer-events: auto;
398
- display: flex;
399
- align-items: center;
400
- justify-content: center;
401
- border: 1px solid var(--bf-border);
402
- background: var(--bf-panel-bg);
403
- color: var(--bf-panel-fg);
404
- box-shadow: var(--bf-shadow);
405
- cursor: pointer;
406
- user-select: none;
407
- -webkit-tap-highlight-color: transparent;
408
- overflow: hidden;
409
- padding: 0;
410
- font-family: var(--bf-font);
411
- font-size: 12px;
412
- letter-spacing: 0.5px;
413
- }
414
-
415
- :where([data-blocfeed-ui-root]) .bf-trigger-edge:focus-visible {
416
- outline: 2px solid var(--bf-accent);
417
- outline-offset: 2px;
418
- }
419
-
420
- :where([data-blocfeed-ui-root]) .bf-trigger-edge-left {
421
- left: 0;
422
- right: auto;
423
- border-radius: 0 6px 6px 0;
424
- border-left: none;
425
- }
426
-
427
- :where([data-blocfeed-ui-root]) .bf-trigger-edge-right {
428
- right: 0;
429
- left: auto;
430
- border-radius: 6px 0 0 6px;
431
- border-right: none;
432
- }
433
-
434
- /* ------------------------------------------------------------------ */
435
- /* Trigger variant: minimal */
436
- /* ------------------------------------------------------------------ */
437
-
438
- :where([data-blocfeed-ui-root]) .bf-trigger-minimal {
439
- position: fixed;
440
- right: 18px;
441
- bottom: 18px;
442
- z-index: var(--bf-z);
443
- pointer-events: auto;
444
- display: inline-flex;
445
- align-items: center;
446
- background: transparent;
447
- border: none;
448
- box-shadow: none;
449
- padding: 8px 4px;
450
- font-family: var(--bf-font);
451
- font-size: 13px;
452
- color: var(--bf-panel-fg);
453
- cursor: pointer;
454
- user-select: none;
455
- -webkit-tap-highlight-color: transparent;
456
- }
457
-
458
- :where([data-blocfeed-ui-root]) .bf-trigger-minimal.bf-trigger-bl {
459
- left: 18px; bottom: 18px; right: auto; top: auto;
460
- }
461
- :where([data-blocfeed-ui-root]) .bf-trigger-minimal.bf-trigger-tr {
462
- right: 18px; top: 18px; bottom: auto; left: auto;
463
- }
464
- :where([data-blocfeed-ui-root]) .bf-trigger-minimal.bf-trigger-tl {
465
- left: 18px; top: 18px; right: auto; bottom: auto;
466
- }
467
-
468
- :where([data-blocfeed-ui-root]) .bf-trigger-minimal:focus-visible {
469
- outline: 2px solid var(--bf-accent);
470
- outline-offset: 2px;
471
- }
472
-
473
- /* ------------------------------------------------------------------ */
474
- /* Screen reader only */
475
- /* ------------------------------------------------------------------ */
476
-
477
- :where([data-blocfeed-ui-root]) .bf-sr-only {
478
- position: absolute;
479
- width: 1px;
480
- height: 1px;
481
- padding: 0;
482
- margin: -1px;
483
- overflow: hidden;
484
- clip: rect(0, 0, 0, 0);
485
- white-space: nowrap;
486
- border: 0;
487
- }
488
-
489
- /* ------------------------------------------------------------------ */
490
- /* Queue badge */
491
- /* ------------------------------------------------------------------ */
492
-
493
- :where([data-blocfeed-ui-root]) .bf-badge {
494
- display: inline-flex;
495
- align-items: center;
496
- justify-content: center;
497
- min-width: 16px;
498
- height: 16px;
499
- padding: 0 4px;
500
- border-radius: 999px;
501
- background: var(--bf-danger);
502
- color: white;
503
- font-size: 10px;
504
- font-weight: 600;
505
- line-height: 1;
506
- flex-shrink: 0;
507
- }
508
-
509
- :where([data-blocfeed-ui-root]) .bf-badge-float {
510
- position: absolute;
511
- top: -4px;
512
- right: -4px;
513
- }
514
-
515
- /* ------------------------------------------------------------------ */
516
- /* Typewriter cursor */
517
- /* ------------------------------------------------------------------ */
518
-
519
- :where([data-blocfeed-ui-root]) .bf-cursor {
520
- display: inline-block;
521
- width: 1px;
522
- height: 1em;
523
- background: var(--bf-panel-fg);
524
- margin-left: 1px;
525
- vertical-align: text-bottom;
526
- animation: bf-blink 1s steps(2) infinite;
527
- }
528
-
529
- @keyframes bf-blink {
530
- 0% { opacity: 1; }
531
- 50% { opacity: 0; }
532
- }
533
-
534
- /* ------------------------------------------------------------------ */
535
- /* Panel / toast / hint entrance animations */
536
- /* ------------------------------------------------------------------ */
537
-
538
- :where([data-blocfeed-ui-root]) .bf-panel {
539
- animation: bf-panel-in 0.2s ease-out;
540
- }
541
-
542
- @keyframes bf-panel-in {
543
- from { opacity: 0; transform: translateY(8px); }
544
- to { opacity: 1; transform: translateY(0); }
545
- }
546
-
547
- :where([data-blocfeed-ui-root]) .bf-toast {
548
- animation: bf-toast-in 0.25s ease-out;
549
- }
550
-
551
- @keyframes bf-toast-in {
552
- from { opacity: 0; transform: translateX(-50%) translateY(12px); }
553
- to { opacity: 1; transform: translateX(-50%) translateY(0); }
554
- }
555
-
556
- :where([data-blocfeed-ui-root]) .bf-hint {
557
- animation: bf-hint-in 0.2s ease-out;
558
- }
559
-
560
- @keyframes bf-hint-in {
561
- from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
562
- to { opacity: 1; transform: translateX(-50%) translateY(0); }
563
- }
564
-
565
- /* ------------------------------------------------------------------ */
566
- /* Security warning banner */
567
- /* ------------------------------------------------------------------ */
568
-
569
- :where([data-blocfeed-ui-root]) .bf-security-banner {
570
- position: fixed;
571
- top: 8px;
572
- right: 8px;
573
- z-index: var(--bf-z);
574
- max-width: 360px;
575
- padding: 10px 14px;
576
- border-radius: 10px;
577
- border-left: 3px solid var(--bf-danger);
578
- background: rgba(239, 68, 68, 0.12);
579
- color: rgb(254, 202, 202);
580
- font-family: var(--bf-font);
581
- font-size: 12px;
582
- line-height: 1.5;
583
- pointer-events: auto;
584
- animation: bf-panel-in 0.2s ease-out;
585
- }
586
-
587
- :where([data-blocfeed-ui-root][data-bf-theme="light"]) .bf-security-banner {
588
- background: rgba(239, 68, 68, 0.08);
589
- color: rgb(185, 28, 28);
590
- }
591
-
592
- :where([data-blocfeed-ui-root]) .bf-security-banner strong {
593
- display: block;
594
- margin-bottom: 4px;
595
- font-size: 13px;
596
- }
597
-
598
- :where([data-blocfeed-ui-root]) .bf-security-banner-dismiss {
599
- position: absolute;
600
- top: 6px;
601
- right: 6px;
602
- background: none;
603
- border: none;
604
- color: inherit;
605
- opacity: 0.6;
606
- cursor: pointer;
607
- padding: 2px 4px;
608
- font-size: 14px;
609
- line-height: 1;
610
- }
611
-
612
- :where([data-blocfeed-ui-root]) .bf-security-banner-dismiss:hover {
613
- opacity: 1;
614
- }
615
-
616
- /* ------------------------------------------------------------------ */
617
- /* Reduced motion */
618
- /* ------------------------------------------------------------------ */
619
-
620
- /* ------------------------------------------------------------------ */
621
- /* Video recording */
622
- /* ------------------------------------------------------------------ */
623
-
624
- :where([data-blocfeed-ui-root]) .bf-record-btn {
625
- display: inline-flex;
626
- align-items: center;
627
- gap: 6px;
628
- padding: 6px 10px;
629
- border-radius: 10px;
630
- border: 1px solid var(--bf-border);
631
- background: transparent;
632
- color: var(--bf-panel-fg);
633
- font-size: 13px;
634
- font-family: var(--bf-font);
635
- cursor: pointer;
636
- user-select: none;
637
- }
638
-
639
- :where([data-blocfeed-ui-root]) .bf-record-btn:hover {
640
- border-color: var(--bf-danger);
641
- color: var(--bf-danger);
642
- }
643
-
644
- :where([data-blocfeed-ui-root]) .bf-record-btn:focus-visible {
645
- outline: 2px solid var(--bf-accent);
646
- outline-offset: 2px;
647
- }
648
-
649
- :where([data-blocfeed-ui-root]) .bf-record-btn[disabled] {
650
- opacity: 0.6;
651
- cursor: not-allowed;
652
- }
653
-
654
- /* ---- Voice feedback button ---- */
655
-
656
- :where([data-blocfeed-ui-root]) .bf-voice-btn {
657
- display: inline-flex;
658
- align-items: center;
659
- gap: 6px;
660
- padding: 6px 12px;
661
- border-radius: 6px;
662
- border: 1px solid var(--bf-border);
663
- background: transparent;
664
- color: var(--bf-panel-fg);
665
- font-size: 13px;
666
- cursor: pointer;
667
- transition: background 0.15s, border-color 0.15s;
668
- }
669
-
670
- :where([data-blocfeed-ui-root]) .bf-voice-btn:hover {
671
- background: rgba(128,128,128,0.1);
672
- }
673
-
674
- :where([data-blocfeed-ui-root]) .bf-voice-btn:focus-visible {
675
- outline: 2px solid var(--bf-accent);
676
- outline-offset: 2px;
677
- }
678
-
679
- :where([data-blocfeed-ui-root]) .bf-voice-btn[disabled] {
680
- opacity: 0.6;
681
- cursor: not-allowed;
682
- }
683
-
684
- :where([data-blocfeed-ui-root]) .bf-voice-btn-active {
685
- border-color: var(--bf-danger);
686
- color: var(--bf-danger);
687
- }
688
-
689
- :where([data-blocfeed-ui-root]) .bf-mic-icon {
690
- flex-shrink: 0;
691
- }
692
-
693
- :where([data-blocfeed-ui-root]) .bf-recording-indicator {
694
- display: flex;
695
- align-items: center;
696
- gap: 8px;
697
- font-size: 12px;
698
- color: var(--bf-danger);
699
- }
700
-
701
- :where([data-blocfeed-ui-root]) .bf-rec-dot {
702
- width: 8px;
703
- height: 8px;
704
- border-radius: 50%;
705
- background: var(--bf-danger);
706
- flex-shrink: 0;
707
- }
708
-
709
- :where([data-blocfeed-ui-root]) .bf-rec-dot-pulse {
710
- animation: bf-rec-pulse 1s ease-in-out infinite;
711
- }
712
-
713
- @keyframes bf-rec-pulse {
714
- 0%, 100% { opacity: 1; }
715
- 50% { opacity: 0.3; }
716
- }
717
-
718
- :where([data-blocfeed-ui-root]) .bf-video-preview {
719
- position: relative;
720
- border-radius: 8px;
721
- overflow: hidden;
722
- border: 1px solid var(--bf-border);
723
- }
724
-
725
- :where([data-blocfeed-ui-root]) .bf-video-preview video {
726
- width: 100%;
727
- max-height: 120px;
728
- object-fit: contain;
729
- display: block;
730
- background: black;
731
- }
732
-
733
- :where([data-blocfeed-ui-root]) .bf-video-remove {
734
- position: absolute;
735
- top: 4px;
736
- right: 4px;
737
- background: rgba(0, 0, 0, 0.7);
738
- border: none;
739
- color: white;
740
- border-radius: 50%;
741
- width: 20px;
742
- height: 20px;
743
- font-size: 12px;
744
- cursor: pointer;
745
- display: flex;
746
- align-items: center;
747
- justify-content: center;
748
- line-height: 1;
749
- }
750
-
751
- :where([data-blocfeed-ui-root]) .bf-video-remove:hover {
752
- background: rgba(0, 0, 0, 0.9);
753
- }
754
-
755
- :where([data-blocfeed-ui-root]) .bf-video-meta {
756
- font-size: 11px;
757
- color: var(--bf-muted);
758
- padding: 4px 8px;
759
- }
760
-
761
- /* ------------------------------------------------------------------ */
762
- /* Floating recording bar (shown during active recording) */
763
- /* ------------------------------------------------------------------ */
764
-
765
- :where([data-blocfeed-ui-root]) .bf-recording-bar {
766
- position: fixed;
767
- z-index: var(--bf-z);
768
- display: flex;
769
- align-items: center;
770
- gap: 10px;
771
- padding: 8px 14px;
772
- border-radius: 20px;
773
- background: var(--bf-bg);
774
- border: 1px solid var(--bf-danger);
775
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.25);
776
- font-size: 13px;
777
- color: var(--bf-fg);
778
- pointer-events: auto;
779
- animation: bf-slideUp 0.2s ease-out;
780
- }
781
-
782
- :where([data-blocfeed-ui-root]) .bf-recording-bar.bf-pos-bottom-right {
783
- bottom: 24px;
784
- right: 24px;
785
- }
786
-
787
- :where([data-blocfeed-ui-root]) .bf-recording-bar.bf-pos-bottom-left {
788
- bottom: 24px;
789
- left: 24px;
790
- }
791
-
792
- :where([data-blocfeed-ui-root]) .bf-recording-bar.bf-pos-top-right {
793
- top: 24px;
794
- right: 24px;
795
- }
796
-
797
- :where([data-blocfeed-ui-root]) .bf-recording-bar.bf-pos-top-left {
798
- top: 24px;
799
- left: 24px;
800
- }
801
-
802
- :where([data-blocfeed-ui-root]) .bf-recording-bar-timer {
803
- color: var(--bf-danger);
804
- font-weight: 500;
805
- font-variant-numeric: tabular-nums;
806
- }
807
-
808
- :where([data-blocfeed-ui-root]) .bf-recording-bar-stop {
809
- padding: 4px 12px;
810
- border-radius: 12px;
811
- border: 1px solid var(--bf-danger);
812
- background: transparent;
813
- color: var(--bf-danger);
814
- font-size: 12px;
815
- font-weight: 600;
816
- cursor: pointer;
817
- transition: background 0.15s, color 0.15s;
818
- }
819
-
820
- :where([data-blocfeed-ui-root]) .bf-recording-bar-stop:hover {
821
- background: var(--bf-danger);
822
- color: #fff;
823
- }
824
-
825
- /* ------------------------------------------------------------------ */
826
- /* Watermark */
827
- /* ------------------------------------------------------------------ */
828
-
829
- :where([data-blocfeed-ui-root]) .bf-watermark {
830
- padding: 6px 12px;
831
- border-top: 1px solid rgba(255, 255, 255, 0.06);
832
- text-align: center;
833
- }
834
-
835
- :where([data-blocfeed-ui-root]) .bf-watermark a {
836
- font-size: 10px;
837
- color: rgba(243, 244, 246, 0.35);
838
- text-decoration: none;
839
- }
840
-
841
- :where([data-blocfeed-ui-root]) .bf-watermark a:hover {
842
- color: var(--bf-accent);
843
- }
844
-
845
- :where([data-blocfeed-ui-root]) .bf-watermark .bf-my-feedback-link {
846
- display: block;
847
- margin-bottom: 2px;
848
- font-size: 10px;
849
- color: var(--bf-accent);
850
- opacity: 0.7;
851
- }
852
-
853
- :where([data-blocfeed-ui-root]) .bf-watermark .bf-my-feedback-link:hover {
854
- opacity: 1;
855
- }
856
-
857
- :where([data-blocfeed-ui-root]) .bf-toast-link {
858
- display: block;
859
- margin-top: 4px;
860
- font-size: 11px;
861
- color: var(--bf-accent);
862
- pointer-events: auto;
863
- text-decoration: none;
864
- }
865
-
866
- :where([data-blocfeed-ui-root]) .bf-toast-link:hover {
867
- text-decoration: underline;
868
- }
869
-
870
- /* ------------------------------------------------------------------ */
871
- /* Reduced motion */
872
- /* ------------------------------------------------------------------ */
873
-
874
- @media (prefers-reduced-motion: reduce) {
875
- :where([data-blocfeed-ui-root]) .bf-panel,
876
- :where([data-blocfeed-ui-root]) .bf-toast,
877
- :where([data-blocfeed-ui-root]) .bf-hint,
878
- :where([data-blocfeed-ui-root]) .bf-cursor,
879
- :where([data-blocfeed-ui-root]) .bf-rec-dot-pulse,
880
- :where([data-blocfeed-ui-root]) .bf-recording-bar {
881
- animation: none;
882
- }
883
- }
884
- `;function Ie(){if(!chunkFBLTAHNW_cjs.a()||document.getElementById(ze))return;let e=document.createElement("style");e.id=ze,e.textContent=Wt,document.head.appendChild(e);}var Ae={triggerLabel:"Feedback",panelTitle:"Feedback",hintText:"Click an element to attach your feedback. Press Esc to cancel.",cancelButton:"Cancel",rePickButton:"Re-pick",closeButton:"Close",textareaPlaceholder:"What's happening? What did you expect?",screenshotElement:"Screenshot element",screenshotFullPage:"Full page",capturingText:"Capturing screenshots\u2026",submittingText:"Submitting\u2026",successText:"Sent. Thank you!",toastText:"Feedback sent",sendButton:"Send",categoryBug:"Bug",categoryFeature:"Feature",categoryUx:"UX",categoryGeneral:"General",recordButton:"Record",stopRecordButton:"Stop",recordingText:"Recording\u2026",recordingDeniedText:"Screen share was denied",videoPreviewLabel:"Video attached",removeVideoButton:"Remove",voiceButton:"Voice",voiceStopButton:"Stop",voiceRecordingText:"Recording\u2026",voiceTranscribingText:"Transcribing\u2026",voiceDeniedText:"Microphone access was denied",voiceErrorText:"Voice transcription failed. Please type instead.",voiceEmptyText:"No speech detected. Try again or type instead."};function _e(e){return e?{...Ae,...e}:Ae}function se(){let e=react.useContext(j);if(!e)throw new Error("useBlocFeed must be used within a <BlocFeedProvider />");return {state:e.state,controller:e.controller,start:e.controller.start,stop:e.controller.stop,clearSelection:e.controller.clearSelection,submit:e.controller.submit,startRecording:e.controller.startRecording,stopRecording:e.controller.stopRecording,removeVideo:e.controller.removeVideo,track:chunkFBLTAHNW_cjs.u}}function y(e){switch(e){case "bottom-left":return "bf-trigger bf-trigger-bl";case "top-right":return "bf-trigger bf-trigger-tr";case "top-left":return "bf-trigger bf-trigger-tl";default:return "bf-trigger"}}function g({size:e=14}){return jsxRuntime.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M20 6L9 17l-5-5",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function We({size:e=14}){return jsxRuntime.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntime.jsx("path",{d:"M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function Oe({size:e=16}){return jsxRuntime.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[jsxRuntime.jsx("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M22 6l-10 7L2 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function De({position:e,onClick:t,isVisible:i,label:r,queueCount:a,showSuccess:p}){return i?jsxRuntime.jsxs("button",{className:y(e),type:"button",onClick:t,"aria-label":r,children:[p?jsxRuntime.jsx("span",{style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"bf-dot","aria-hidden":"true"}),r]}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]}):null}function h(){let[e,t]=react.useState(()=>typeof window>"u"?false:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return react.useEffect(()=>{let i=window.matchMedia("(prefers-reduced-motion: reduce)"),r=a=>t(a.matches);return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[]),e}var Ut={duration:.18,ease:"easeOut"},Xt={duration:0};function $e({position:e,onClick:t,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?Xt:Ut;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:y(e),type:"button",onClick:t,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:c,whileTap:{scale:.92},style:{overflow:"hidden"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:c,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(framerMotion.motion.span,{className:"bf-dot","aria-hidden":"true",animate:o?{}:{scale:n?1:[1,1.2,1],boxShadow:n?"0 0 0 4px rgba(99, 102, 241, 0.18)":["0 0 0 4px rgba(99, 102, 241, 0.18)","0 0 0 8px rgba(99, 102, 241, 0.28)","0 0 0 4px rgba(99, 102, 241, 0.18)"]},transition:n||o?c:{duration:2,repeat:1/0,ease:"easeInOut"}}),jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:n&&jsxRuntime.jsx(framerMotion.motion.span,{initial:{opacity:0,x:o?0:-6},animate:{opacity:1,x:0},exit:{opacity:0,x:o?0:-6},transition:c,style:{whiteSpace:"nowrap"},children:r},"label")}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"dot")})}var Qt={duration:.18,ease:"easeOut"},Ue={duration:0};function Ye({position:e,onClick:t,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?Ue:Qt;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsxs(framerMotion.motion.div,{className:y(e),initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{y:8,opacity:0},transition:c,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),style:{background:"transparent",border:"none",boxShadow:"none",padding:0},children:[jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:n&&jsxRuntime.jsx(framerMotion.motion.div,{initial:{opacity:0,y:o?0:4},animate:{opacity:1,y:0},exit:{opacity:0,y:o?0:4},transition:c,style:{position:"absolute",bottom:"calc(100% + 8px)",left:"50%",transform:"translateX(-50%)",padding:"6px 12px",borderRadius:"8px",background:"var(--bf-panel-bg)",border:"1px solid var(--bf-border)",boxShadow:"var(--bf-shadow)",whiteSpace:"nowrap",fontSize:"12px",color:"var(--bf-panel-fg)",pointerEvents:"none"},children:r},"tooltip")}),jsxRuntime.jsxs(framerMotion.motion.button,{type:"button",onClick:t,"aria-label":r,style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"40px",borderRadius:"50%",border:"1px solid var(--bf-border)",background:"var(--bf-panel-bg)",color:"var(--bf-panel-fg)",boxShadow:"var(--bf-shadow)",cursor:"pointer",padding:0},animate:o?{}:{y:[0,-3,0]},transition:o?Ue:{y:{duration:3,repeat:1/0,ease:"easeInOut"}},whileHover:{scale:1.1,borderColor:"var(--bf-accent)"},whileTap:{scale:.9},children:[p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:c,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:16})},"success"):jsxRuntime.jsx(We,{size:16}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge bf-badge-float","aria-label":`${a} queued`,children:a})]})]},"bubble")})}var Zt={duration:.2,ease:"easeOut"},eo={duration:0};function je(e){return e==="bottom-left"||e==="top-left"}function to(e){return `bf-trigger-edge ${je(e)?"bf-trigger-edge-left":"bf-trigger-edge-right"}`}function Qe({position:e,onClick:t,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=je(e),c=h(),x=c?eo:Zt;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:to(e),type:"button",onClick:t,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{opacity:0,width:0},animate:{opacity:1,width:n?140:22,height:n?40:90},exit:{width:0,opacity:0},transition:x,whileTap:{scale:.97},style:{top:"50%",translateY:"-50%"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:x,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(framerMotion.motion.span,{animate:{rotate:c||n?0:o?-90:90,opacity:n?1:.6},transition:x,style:{display:"flex",alignItems:"center",gap:"8px",whiteSpace:"nowrap",fontSize:"12px",letterSpacing:"0.5px",textTransform:"uppercase"},children:[n&&jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:{duration:.12},style:{width:"6px",height:"6px",borderRadius:"50%",background:"var(--bf-accent)",flexShrink:0}}),r]}),jsxRuntime.jsx(framerMotion.motion.span,{"aria-hidden":"true",animate:{opacity:n?1:0},transition:{duration:.12},style:{position:"absolute",top:0,bottom:0,[o?"left":"right"]:0,width:"2px",background:"var(--bf-accent)"}}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"edge-tab")})}var io={duration:.18,ease:"easeOut"},ao={duration:0};function Je({delay:e,hovered:t,reduced:i}){return i?null:jsxRuntime.jsx(framerMotion.motion.span,{"aria-hidden":"true",style:{position:"absolute",width:"10px",height:"10px",borderRadius:"50%",border:"2px solid var(--bf-accent)",pointerEvents:"none"},animate:t?{scale:1,opacity:0}:{scale:[1,1.8],opacity:[.5,0]},transition:t?{duration:.15}:{duration:2,repeat:1/0,delay:e,ease:"easeOut"}})}function et({position:e,onClick:t,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?ao:io;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:y(e),type:"button",onClick:t,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:c,whileTap:{scale:.92},style:{overflow:"hidden"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:c,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("span",{style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:"10px",height:"10px",flexShrink:0},children:[jsxRuntime.jsx(Je,{delay:0,hovered:n,reduced:o}),jsxRuntime.jsx(Je,{delay:.7,hovered:n,reduced:o}),jsxRuntime.jsx(framerMotion.motion.span,{className:"bf-dot","aria-hidden":"true",style:{position:"relative",zIndex:1}})]}),jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:n&&jsxRuntime.jsx(framerMotion.motion.span,{initial:{opacity:0,x:o?0:-6},animate:{opacity:1,x:0},exit:{opacity:0,x:o?0:-6},transition:c,style:{whiteSpace:"nowrap"},children:r},"label")}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"pulse-ring")})}var lo={duration:.18,ease:"easeOut"},fo={duration:0};function po(e){switch(e){case "bottom-left":return "bf-trigger-minimal bf-trigger-bl";case "top-right":return "bf-trigger-minimal bf-trigger-tr";case "top-left":return "bf-trigger-minimal bf-trigger-tl";default:return "bf-trigger-minimal"}}function rt({position:e,onClick:t,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?fo:lo;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsxs(framerMotion.motion.button,{className:po(e),type:"button",onClick:t,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{opacity:0,y:o?0:5},animate:{opacity:n?1:.65,y:0},exit:{opacity:0,y:o?0:5},transition:c,whileTap:{scale:.95},children:[p?jsxRuntime.jsx("span",{style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{children:r}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge",style:{marginLeft:"4px"},"aria-label":`${a} queued`,children:a})]}),!o&&jsxRuntime.jsx(framerMotion.motion.span,{"aria-hidden":"true",style:{position:"absolute",bottom:4,left:4,right:4,height:"2px",background:"var(--bf-accent)",borderRadius:"1px",transformOrigin:"left"},initial:false,animate:{scaleX:n?1:0},transition:c})]},"minimal")})}var go={duration:.18,ease:"easeOut"},mo={duration:0};function at({position:e,onClick:t,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?mo:go;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:y(e),type:"button",onClick:t,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:c,whileTap:{scale:.9},style:{overflow:"hidden"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:c,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(framerMotion.motion.span,{style:{display:"inline-flex",flexShrink:0},animate:o?{}:n?{scale:1.2,rotate:0}:{rotate:[-5,5,-5]},transition:n||o?c:{duration:3,repeat:1/0,ease:"easeInOut"},children:jsxRuntime.jsx(Oe,{size:16})}),jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:n&&jsxRuntime.jsx(framerMotion.motion.span,{initial:{opacity:0,x:o?0:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:o?0:-8},transition:c,style:{whiteSpace:"nowrap"},children:r},"label")}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"icon-pop")})}var yo={duration:.18,ease:"easeOut"},wo={duration:0};function ct({position:e,onClick:t,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),o=h(),c=o?wo:yo;return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:y(e),type:"button",onClick:t,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:c,whileTap:{scale:.92},style:{overflow:"hidden"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:c,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("span",{style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:"10px",height:"10px",flexShrink:0},children:[jsxRuntime.jsx(framerMotion.motion.span,{"aria-hidden":"true",style:{width:"10px",height:"10px",borderRadius:"50%",background:"var(--bf-accent)",position:"relative",zIndex:1},animate:o?{}:{opacity:n?1:[.5,1,.5],boxShadow:n?"0 0 8px 2px var(--bf-accent)":["0 0 4px 1px var(--bf-accent)","0 0 12px 4px var(--bf-accent)","0 0 4px 1px var(--bf-accent)"]},transition:n||o?c:{duration:2,repeat:1/0,ease:"easeInOut"}}),!n&&!o&&jsxRuntime.jsx(framerMotion.motion.span,{"aria-hidden":"true",style:{position:"absolute",width:"18px",height:"2px",background:"linear-gradient(90deg, var(--bf-accent), transparent)",transformOrigin:"left center",left:"5px",top:"4px"},animate:{rotate:[0,360]},transition:{duration:4,repeat:1/0,ease:"linear"}})]}),jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:n&&jsxRuntime.jsx(framerMotion.motion.span,{initial:{opacity:0,x:o?0:-6},animate:{opacity:1,x:0},exit:{opacity:0,x:o?0:-6},transition:c,style:{whiteSpace:"nowrap"},children:r},"label")}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"beacon")})}var Bo={duration:.18,ease:"easeOut"},Po={duration:0};function pt({position:e,onClick:t,isVisible:i,label:r,queueCount:a,showSuccess:p}){let[n,l]=react.useState(false),[o,c]=react.useState(0),x=h(),z=x?Po:Bo,f=react.useRef(null);react.useEffect(()=>{if(f.current&&(clearInterval(f.current),f.current=null),!i||n||x){c(n||x?r.length:0);return}let b=8,T=r.length*2+b*2,m=0;return f.current=setInterval(()=>{m=(m+1)%T,m<=r.length?c(m):m<=r.length+b?c(r.length):m<=r.length*2+b?c(r.length*2+b-m):c(0);},100),()=>{f.current&&(clearInterval(f.current),f.current=null);}},[i,n,x,r]);let S=r.slice(0,o);return jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"wait",children:i&&jsxRuntime.jsx(framerMotion.motion.button,{className:y(e),type:"button",onClick:t,onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),"aria-label":r,initial:{opacity:0,y:x?0:5},animate:{opacity:1,y:0},exit:{opacity:0,y:x?0:5},transition:z,whileTap:{scale:.95},style:{minWidth:"44px"},children:p?jsxRuntime.jsx(framerMotion.motion.span,{initial:{scale:0},animate:{scale:1},transition:z,style:{display:"inline-flex",color:"var(--bf-accent)"},children:jsxRuntime.jsx(g,{size:14})},"success"):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"bf-dot","aria-hidden":"true"}),jsxRuntime.jsxs("span",{style:{whiteSpace:"nowrap",minWidth:"1ch"},children:[S,jsxRuntime.jsx("span",{className:"bf-cursor","aria-hidden":"true"})]}),a>0&&jsxRuntime.jsx("span",{className:"bf-badge","aria-label":`${a} queued`,children:a})]})},"typewriter")})}function ut(e){switch(e){case "dot":return $e;case "bubble":return Ye;case "edge-tab":return Qe;case "pulse-ring":return et;case "minimal":return rt;case "icon-pop":return at;case "beacon":return ct;case "typewriter":return pt;default:return De}}function bt(e,t,i){return Math.max(t,Math.min(i,e))}function Mo(e,t,i="bottom-right"){let a=window.innerWidth,p=window.innerHeight,n;n=bt(e.x,12,Math.max(12,a-t-12));let l=e.y+e.height+12,o=Math.max(12,e.y-240);return {top:l+240<=p?l:o,left:n}}function Lo(e){let{rect:t}=e,i={left:`${t.x}px`,top:`${t.y}px`,width:`${Math.max(0,t.width)}px`,height:`${Math.max(0,t.height)}px`};return jsxRuntime.jsx("div",{className:"bf-highlight",style:i,"aria-hidden":"true"})}function zo(e){let t=react.useRef(null);return react.useEffect(()=>{if(!e||!t.current)return;let i=t.current,r=i.querySelector(".bf-textarea");r?.focus();let a=n=>{if(n.key!=="Tab")return;let l=i.querySelectorAll('button:not([disabled]), textarea:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(l.length===0)return;let o=l[0],c=l[l.length-1];n.shiftKey&&document.activeElement===o?(n.preventDefault(),c.focus()):!n.shiftKey&&document.activeElement===c&&(n.preventDefault(),o.focus());},p=n=>{let l=n.target;l&&(i.contains(l)||(n.stopImmediatePropagation(),r?.focus()));};return document.addEventListener("keydown",a,{capture:true}),document.addEventListener("focusin",p,{capture:true}),()=>{document.removeEventListener("keydown",a,{capture:true}),document.removeEventListener("focusin",p,{capture:true});}},[e]),t}function Io(e,t){return e?typeof e=="function"?e(t):e.some(i=>i.endsWith("*")?t.startsWith(i.slice(0,-1)):t===i):true}var de=new Set,gt=false;function Ao(){if(gt||typeof window>"u")return;gt=true;let e=history.pushState,t=history.replaceState,i=()=>{for(let r of de)r();};history.pushState=function(...r){e.apply(this,r),setTimeout(i,0);},history.replaceState=function(...r){t.apply(this,r),setTimeout(i,0);};}function _o(e){let[t,i]=react.useState(()=>typeof window<"u"?window.location.pathname:"/");return react.useEffect(()=>{if(typeof window>"u")return;let r=()=>i(window.location.pathname);return window.addEventListener("popstate",r),Ao(),de.add(r),()=>{window.removeEventListener("popstate",r),de.delete(r);}},[]),Io(e,t)}function Wo(e){let[t,i]=react.useState(()=>!e||e==="dark"?"dark":e==="light"?"light":typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");return react.useEffect(()=>{if(e!=="auto"){i(e==="light"?"light":"dark");return}let r=window.matchMedia("(prefers-color-scheme: dark)"),a=p=>i(p.matches?"dark":"light");return i(r.matches?"dark":"light"),r.addEventListener("change",a),()=>r.removeEventListener("change",a)},[e]),t}var Oo=["bug","feature","ux","general"],Ho={bug:"categoryBug",feature:"categoryFeature",ux:"categoryUx",general:"categoryGeneral"};function Y(e){let t=Math.floor(e/1e3),i=Math.floor(t/60),r=t%60;return `${i}:${String(r).padStart(2,"0")}`}function Do(e){return e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Vo(e){let{state:t,controller:i,start:r,stop:a,clearSelection:p,submit:n}=se(),l=e.config.ui?.position,o=_e(e.config.ui?.strings),c=e.config.ui?.branding!==false,[x,z]=react.useState(null),[f,S]=react.useState(""),[b,T]=react.useState(e.config.capture?.element??true),[m,B]=react.useState(e.config.capture?.fullPage??false),[ht,pe]=react.useState(null),[D,ue]=react.useState(void 0),be=e.config.ui?.categories??Oo,xt=e.config.recording?.enabled===true&&chunkFBLTAHNW_cjs.l(),vt=e.config.recording?.maxDurationMs??3e4,ge=i.getConfig().voice,yt=ge?.enabled===true&&chunkFBLTAHNW_cjs.n(),wt=ge?.maxDurationMs??6e4,[kt,Tt]=react.useState(false),[te,Et]=react.useState(0);react.useEffect(()=>{let s=window.setTimeout(()=>{let v=chunkFBLTAHNW_cjs.C();Et(v.findings.length);},500);return ()=>window.clearTimeout(s)},[]),react.useImperativeHandle(e.handleRef,()=>({open:r,close:a,submit:s=>n(s),startRecording:()=>i.startRecording(),stopRecording:()=>i.stopRecording(),get isOpen(){return t.phase!=="idle"}}),[r,a,n,i,t.phase]);let me=t.phase==="review"||t.phase==="capturing"||t.phase==="submitting"||t.phase==="error"||t.phase==="success",St=zo(me),[Bt,Pt]=react.useState(0);react.useEffect(()=>{t.phase==="idle"&&Pt(chunkFBLTAHNW_cjs.i());},[t.phase]);let[Ct,he]=react.useState(false),xe=react.useRef(t.phase);react.useEffect(()=>{if(xe.current==="success"&&t.phase==="idle"){he(true);let s=window.setTimeout(()=>he(false),1500);return ()=>window.clearTimeout(s)}xe.current=t.phase;},[t.phase]),react.useEffect(()=>{let s=e.config.ui?.shortcut;if(!s)return;let v=s.toLowerCase().split("+").map(N=>N.trim()),C=v[v.length-1]||"",I=new Set(v.slice(0,-1)),we=N=>{let Mt=/Mac|iPod|iPhone|iPad/.test(navigator.platform);if(I.has("mod")){if(Mt?!N.metaKey:!N.ctrlKey)return}else if(I.has("ctrl")&&!N.ctrlKey||(I.has("meta")||I.has("cmd"))&&!N.metaKey)return;I.has("shift")&&!N.shiftKey||(I.has("alt")||I.has("option"))&&!N.altKey||N.key.toLowerCase()===C&&(N.preventDefault(),t.phase==="idle"?r():a());};return document.addEventListener("keydown",we),()=>document.removeEventListener("keydown",we)},[e.config.ui?.shortcut,t.phase,r,a]),react.useEffect(()=>i.subscribeHover(z),[i]),react.useEffect(()=>{let s=i.__unsafeGetSelectedElement();if(!s||t.phase==="idle"||t.phase==="picking"){pe(null);return}let v=()=>{pe(chunkFBLTAHNW_cjs.b(s.getBoundingClientRect()));};v();let C=()=>v();return window.addEventListener("scroll",C,{capture:true,passive:true}),window.addEventListener("resize",C,{passive:true}),()=>{window.removeEventListener("scroll",C,{capture:true}),window.removeEventListener("resize",C);}},[i,t.phase,t.selection?.selector]),react.useEffect(()=>{t.phase==="review"&&(S(""),T(e.config.capture?.element??true),B(e.config.capture?.fullPage??false),ue(void 0),V(null));},[t.phase,t.selection?.selector,e.config.capture?.element,e.config.capture?.fullPage]),react.useEffect(()=>{if(t.phase!=="success")return;let s=window.setTimeout(()=>a(),1200);return ()=>window.clearTimeout(s)},[t.phase,a]);let E=t.phase==="capturing"||t.phase==="submitting",M=t.phase==="picking"?x?.rect??null:ht??t.selection?.rect??null,oe=react.useMemo(()=>M?Mo(M,360,l):null,[M?.x,M?.y,M?.width,M?.height,l]),ve=t.lastError?.message,re=react.useCallback(()=>{let s={capture:{element:b,fullPage:m}};D&&(s.category=D),n(f,s);},[n,f,b,m,D]),Nt=react.useCallback(s=>{(s.metaKey||s.ctrlKey)&&s.key==="Enter"&&f.trim().length>0&&!E&&(s.preventDefault(),re());},[re,f,E]),[ye,V]=react.useState(null),Ft=react.useCallback(async()=>{if(t.voiceRecording){i.stopVoice();return}V(null);let s=await i.startVoice();if(s?.text)S(v=>v?v+" "+s.text:s.text);else if(s?.warning)V(o.voiceEmptyText);else if(!s){let v=i.getState().lastError;if(v){let C=v.message?.toLowerCase()??"";C.includes("denied")||C.includes("permission")||C.includes("not allowed")?V(o.voiceDeniedText):V(o.voiceErrorText);}}},[t.voiceRecording,i,o]),Rt=ut(e.config.ui?.triggerStyle);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Rt,{position:l,onClick:()=>r(),isVisible:t.phase==="idle",label:e.config.ui?.triggerLabel??o.triggerLabel,queueCount:Bt,showSuccess:Ct}),t.phase!=="idle"&&t.phase!=="recording"&&jsxRuntime.jsxs("div",{className:"bf-overlay",role:"presentation",children:[t.phase!=="picking"&&jsxRuntime.jsx("div",{className:"bf-blocker",role:"presentation",onClick:()=>a()}),M&&jsxRuntime.jsx(Lo,{rect:M}),t.phase==="picking"&&jsxRuntime.jsxs("div",{className:"bf-hint",role:"status","aria-live":"polite",children:[jsxRuntime.jsx("p",{id:"bf-hint-text",children:o.hintText}),jsxRuntime.jsx("button",{type:"button",className:"bf-btn",onClick:()=>a(),"aria-label":o.cancelButton,children:o.cancelButton})]}),me&&oe&&jsxRuntime.jsxs("div",{ref:St,className:"bf-panel",style:{left:oe.left,top:oe.top},role:"dialog","aria-modal":"true","aria-label":"Feedback form",children:[jsxRuntime.jsxs("div",{className:"bf-panelHeader",children:[jsxRuntime.jsx("div",{className:"bf-title",id:"bf-panel-title",children:o.panelTitle}),jsxRuntime.jsxs("div",{className:"bf-row",style:{justifyContent:"flex-end"},children:[jsxRuntime.jsx("button",{type:"button",className:"bf-btn",onClick:()=>p(),disabled:E,"aria-label":o.rePickButton,children:o.rePickButton}),jsxRuntime.jsx("button",{type:"button",className:"bf-btn",onClick:()=>a(),disabled:E,"aria-label":o.closeButton,children:o.closeButton})]})]}),jsxRuntime.jsxs("div",{className:"bf-panelBody",children:[jsxRuntime.jsx("textarea",{className:"bf-textarea",placeholder:o.textareaPlaceholder,value:f,onChange:s=>S(s.target.value),onKeyDown:Nt,disabled:E,"aria-label":o.panelTitle}),be.length>0&&jsxRuntime.jsx("div",{className:"bf-pills",role:"group","aria-label":"Feedback category",children:be.map(s=>jsxRuntime.jsx("button",{type:"button",className:`bf-pill${D===s?" bf-pill-active":""}`,onClick:()=>ue(D===s?void 0:s),disabled:E,children:o[Ho[s]]},s))}),jsxRuntime.jsxs("div",{className:"bf-row",role:"group","aria-label":o.screenshotElement,children:[jsxRuntime.jsxs("label",{children:[jsxRuntime.jsx("input",{type:"checkbox",checked:b,onChange:s=>T(s.target.checked),disabled:E}),o.screenshotElement]}),jsxRuntime.jsxs("label",{children:[jsxRuntime.jsx("input",{type:"checkbox",checked:m,onChange:s=>B(s.target.checked),disabled:E}),o.screenshotFullPage]})]}),yt&&t.phase==="review"&&!t.voiceTranscribing&&jsxRuntime.jsx("button",{type:"button",className:`bf-voice-btn${t.voiceRecording?" bf-voice-btn-active":""}`,onClick:Ft,disabled:E,"aria-label":t.voiceRecording?o.voiceStopButton:o.voiceButton,children:t.voiceRecording?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{className:"bf-rec-dot bf-rec-dot-pulse","aria-hidden":"true"}),o.voiceRecordingText," ",Y(t.voiceElapsedMs??0)," / ",Y(wt)," \u2014 ",o.voiceStopButton]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("svg",{className:"bf-mic-icon",viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[jsxRuntime.jsx("rect",{x:"9",y:"1",width:"6",height:"11",rx:"3"}),jsxRuntime.jsx("path",{d:"M19 10v1a7 7 0 0 1-14 0v-1"}),jsxRuntime.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"23"}),jsxRuntime.jsx("line",{x1:"8",y1:"23",x2:"16",y2:"23"})]}),o.voiceButton]})}),t.voiceTranscribing&&jsxRuntime.jsxs("div",{className:"bf-status",role:"status","aria-live":"polite",children:[jsxRuntime.jsx("span",{className:"bf-spinner","aria-hidden":"true"}),o.voiceTranscribingText]}),ye&&!t.voiceRecording&&!t.voiceTranscribing&&jsxRuntime.jsx("div",{className:"bf-error",role:"alert",children:ye}),xt&&t.phase==="review"&&!t.video&&jsxRuntime.jsxs("button",{type:"button",className:"bf-record-btn",onClick:()=>i.startRecording(),disabled:E,"aria-label":o.recordButton,children:[jsxRuntime.jsx("span",{className:"bf-rec-dot","aria-hidden":"true"}),o.recordButton]}),t.video&&t.phase==="review"&&jsxRuntime.jsxs("div",{className:"bf-video-preview",children:[jsxRuntime.jsx("video",{src:t.video.blobUrl,controls:true,muted:true,playsInline:true}),jsxRuntime.jsx("button",{type:"button",className:"bf-video-remove",onClick:()=>i.removeVideo(),"aria-label":o.removeVideoButton,children:"\xD7"}),jsxRuntime.jsxs("div",{className:"bf-video-meta",children:[o.videoPreviewLabel," (",Y(t.video.durationMs),", ",Do(t.video.sizeBytes),")"]})]}),t.phase==="capturing"&&jsxRuntime.jsxs("div",{className:"bf-status",role:"status","aria-live":"polite",children:[jsxRuntime.jsx("span",{className:"bf-spinner","aria-hidden":"true"}),o.capturingText]}),t.phase==="submitting"&&jsxRuntime.jsxs("div",{className:"bf-status",role:"status","aria-live":"polite",children:[jsxRuntime.jsx("span",{className:"bf-spinner","aria-hidden":"true"}),o.submittingText]}),t.phase==="success"&&jsxRuntime.jsx("div",{className:"bf-status",role:"status","aria-live":"polite",children:o.successText}),t.phase==="error"&&ve&&jsxRuntime.jsx("div",{className:"bf-error",role:"alert",children:ve}),jsxRuntime.jsxs("div",{className:"bf-actions",children:[jsxRuntime.jsx("button",{type:"button",className:"bf-btn",onClick:()=>a(),disabled:E,"aria-label":o.cancelButton,children:o.cancelButton}),jsxRuntime.jsx("button",{type:"button",className:"bf-btn bf-btnPrimary",onClick:re,disabled:E||f.trim().length===0,"aria-label":o.sendButton,children:o.sendButton})]})]}),c&&jsxRuntime.jsxs("div",{className:"bf-watermark",children:[(()=>{let s=chunkFBLTAHNW_cjs.q();return s?jsxRuntime.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"bf-my-feedback-link",children:"View my feedback"}):null})(),jsxRuntime.jsx("a",{href:"https://blocfeed.com",target:"_blank",rel:"noopener noreferrer",children:"Powered by BlocFeed"})]})]})]}),t.phase==="recording"&&jsxRuntime.jsxs("div",{className:`bf-recording-bar bf-pos-${l}`,role:"status","aria-live":"polite","data-blocfeed-ui":"true",children:[jsxRuntime.jsx("span",{className:"bf-rec-dot bf-rec-dot-pulse","aria-hidden":"true"}),jsxRuntime.jsxs("span",{className:"bf-recording-bar-timer",children:[o.recordingText," ",Y(t.recordingElapsedMs??0)," / ",Y(vt)]}),jsxRuntime.jsx("button",{type:"button",className:"bf-recording-bar-stop",onClick:()=>i.stopRecording(),"aria-label":o.stopRecordButton,children:o.stopRecordButton})]}),t.phase==="success"&&jsxRuntime.jsxs("div",{className:"bf-toast",role:"status","aria-live":"polite",children:[o.toastText,(()=>{let s=chunkFBLTAHNW_cjs.q();return s?jsxRuntime.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"bf-toast-link",children:"View my feedback"}):null})()]}),te>0&&!kt&&jsxRuntime.jsxs("div",{className:"bf-security-banner",role:"alert",children:[jsxRuntime.jsx("button",{type:"button",className:"bf-security-banner-dismiss",onClick:()=>Tt(true),"aria-label":"Dismiss",children:"\xD7"}),jsxRuntime.jsx("strong",{children:"Security Warning"}),te," potential secret",te>1?"s":""," exposed in client code. Check your environment variables."]})]})}var $o=react.forwardRef(function(t,i){let r={...t.config??{},blocfeed_id:t.blocfeed_id},[a,p]=react.useState(null),n=_o(r.ui?.showOn),l=Wo(r.ui?.theme?.mode),o=!!r.diagnostics;react.useEffect(()=>{if(o)return chunkFBLTAHNW_cjs.x(r.diagnostics),()=>chunkFBLTAHNW_cjs.y()},[o]);let c=!!r.security;react.useEffect(()=>{c&&chunkFBLTAHNW_cjs.B(r.security);},[c]);let x=react.useRef(t.config?.metadata?.enrich);x.current=t.config?.metadata?.enrich;let z=react.useMemo(()=>{if(t.config)return {...t.config,metadata:{...t.config.metadata,enrich:async f=>{let S=x.current,b=S?await S(f):{},T=chunkFBLTAHNW_cjs.z(),m=chunkFBLTAHNW_cjs.C(),B=chunkFBLTAHNW_cjs.j();return {...b,...T.consoleLogs.length>0?{_consoleLogs:T.consoleLogs}:{},...T.networkErrors.length>0?{_networkErrors:T.networkErrors}:{},...m.findings.length>0?{_securityFindings:m.findings}:{},...B.length>0?{_clickEvents:B}:{}}}}}},[]);return react.useEffect(()=>{Ie();let f=document.createElement("div");f.setAttribute("data-blocfeed-ui-root","true"),f.setAttribute("data-blocfeed-ui","true"),f.setAttribute("data-bf-theme",l);let S=r.ui?.zIndex;typeof S=="number"&&f.style.setProperty("--bf-z",String(S));let b=r.ui?.theme;b&&(b.accentColor&&f.style.setProperty("--bf-accent",b.accentColor),b.panelBackground&&f.style.setProperty("--bf-panel-bg",b.panelBackground),b.panelForeground&&f.style.setProperty("--bf-panel-fg",b.panelForeground),b.fontFamily&&f.style.setProperty("--bf-font",b.fontFamily));let T=B=>B.stopPropagation(),m=["pointerdown","pointerup","mousedown","mouseup","click","touchstart","touchend"];for(let B of m)f.addEventListener(B,T);try{document.body.appendChild(f);}catch{return}return p(f),()=>{for(let B of m)f.removeEventListener(B,T);f.remove(),p(null);}},[r.ui?.zIndex,r.ui?.theme?.accentColor,r.ui?.theme?.panelBackground,r.ui?.theme?.panelForeground,r.ui?.theme?.fontFamily,l]),!n||!a?null:reactDom.createPortal(jsxRuntime.jsx(ne,{blocfeed_id:r.blocfeed_id,...z?{config:z}:{},children:jsxRuntime.jsx(Vo,{config:r,handleRef:i})}),a)});var Di={init(e){chunkFBLTAHNW_cjs.t(e);},identify(e){chunkFBLTAHNW_cjs.s(e);},track:chunkFBLTAHNW_cjs.u};
885
- Object.defineProperty(exports,"BehavioralTracker",{enumerable:true,get:function(){return chunkFBLTAHNW_cjs.v}});Object.defineProperty(exports,"track",{enumerable:true,get:function(){return chunkFBLTAHNW_cjs.u}});exports.BlocFeed=Di;exports.BlocFeedProvider=ne;exports.BlocFeedWidget=$o;exports.useBlocFeed=se;
2
+ 'use strict';var chunkX4ON6DOW_cjs=require('./chunk-X4ON6DOW.cjs');Object.defineProperty(exports,"BehavioralTracker",{enumerable:true,get:function(){return chunkX4ON6DOW_cjs.s}});Object.defineProperty(exports,"BlocFeed",{enumerable:true,get:function(){return chunkX4ON6DOW_cjs.F}});Object.defineProperty(exports,"BlocFeedProvider",{enumerable:true,get:function(){return chunkX4ON6DOW_cjs.u}});Object.defineProperty(exports,"BlocFeedWidget",{enumerable:true,get:function(){return chunkX4ON6DOW_cjs.D}});Object.defineProperty(exports,"SDK_VERSION",{enumerable:true,get:function(){return chunkX4ON6DOW_cjs.E}});Object.defineProperty(exports,"track",{enumerable:true,get:function(){return chunkX4ON6DOW_cjs.r}});Object.defineProperty(exports,"useBlocFeed",{enumerable:true,get:function(){return chunkX4ON6DOW_cjs.C}});