@rqmii_immersive/agent-react-sdk 5.4.1 → 5.4.2
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/embed.js +217 -217
- package/dist/embed.js.map +1 -1
- package/dist/ui/chat/footer.test.d.ts +2 -0
- package/dist/ui/chat/footer.test.d.ts.map +1 -0
- package/dist/ui/chat/primitives.d.ts.map +1 -1
- package/dist/ui/languages/text.d.ts.map +1 -1
- package/dist/ui/languages/translations/af.d.ts.map +1 -1
- package/dist/ui/languages/translations/ar-eg.d.ts.map +1 -1
- package/dist/ui/languages/translations/ar-sa.d.ts.map +1 -1
- package/dist/ui/languages/translations/az.d.ts.map +1 -1
- package/dist/ui/languages/translations/be.d.ts.map +1 -1
- package/dist/ui/languages/translations/bg.d.ts.map +1 -1
- package/dist/ui/languages/translations/bn.d.ts.map +1 -1
- package/dist/ui/languages/translations/bs.d.ts.map +1 -1
- package/dist/ui/languages/translations/ca.d.ts.map +1 -1
- package/dist/ui/languages/translations/cs.d.ts.map +1 -1
- package/dist/ui/languages/translations/cy.d.ts.map +1 -1
- package/dist/ui/languages/translations/da.d.ts.map +1 -1
- package/dist/ui/languages/translations/de.d.ts.map +1 -1
- package/dist/ui/languages/translations/el.d.ts.map +1 -1
- package/dist/ui/languages/translations/en.d.ts.map +1 -1
- package/dist/ui/languages/translations/es.d.ts.map +1 -1
- package/dist/ui/languages/translations/et.d.ts.map +1 -1
- package/dist/ui/languages/translations/eu.d.ts.map +1 -1
- package/dist/ui/languages/translations/fa.d.ts.map +1 -1
- package/dist/ui/languages/translations/fi.d.ts.map +1 -1
- package/dist/ui/languages/translations/fr.d.ts.map +1 -1
- package/dist/ui/languages/translations/gl.d.ts.map +1 -1
- package/dist/ui/languages/translations/gu.d.ts.map +1 -1
- package/dist/ui/languages/translations/hi.d.ts.map +1 -1
- package/dist/ui/languages/translations/hr.d.ts.map +1 -1
- package/dist/ui/languages/translations/hu.d.ts.map +1 -1
- package/dist/ui/languages/translations/id.d.ts.map +1 -1
- package/dist/ui/languages/translations/it.d.ts.map +1 -1
- package/dist/ui/languages/translations/ja.d.ts.map +1 -1
- package/dist/ui/languages/translations/kk.d.ts.map +1 -1
- package/dist/ui/languages/translations/kn.d.ts.map +1 -1
- package/dist/ui/languages/translations/ko.d.ts.map +1 -1
- package/dist/ui/languages/translations/lt.d.ts.map +1 -1
- package/dist/ui/languages/translations/lv.d.ts.map +1 -1
- package/dist/ui/languages/translations/mk.d.ts.map +1 -1
- package/dist/ui/languages/translations/ml.d.ts.map +1 -1
- package/dist/ui/languages/translations/mr.d.ts.map +1 -1
- package/dist/ui/languages/translations/ms.d.ts.map +1 -1
- package/dist/ui/languages/translations/nl.d.ts.map +1 -1
- package/dist/ui/languages/translations/no.d.ts.map +1 -1
- package/dist/ui/languages/translations/pa.d.ts.map +1 -1
- package/dist/ui/languages/translations/pl.d.ts.map +1 -1
- package/dist/ui/languages/translations/pt.d.ts.map +1 -1
- package/dist/ui/languages/translations/ro.d.ts.map +1 -1
- package/dist/ui/languages/translations/ru.d.ts.map +1 -1
- package/dist/ui/languages/translations/sk.d.ts.map +1 -1
- package/dist/ui/languages/translations/sl.d.ts.map +1 -1
- package/dist/ui/languages/translations/sq.d.ts.map +1 -1
- package/dist/ui/languages/translations/sr.d.ts.map +1 -1
- package/dist/ui/languages/translations/sv.d.ts.map +1 -1
- package/dist/ui/languages/translations/sw.d.ts.map +1 -1
- package/dist/ui/languages/translations/ta.d.ts.map +1 -1
- package/dist/ui/languages/translations/te.d.ts.map +1 -1
- package/dist/ui/languages/translations/th.d.ts.map +1 -1
- package/dist/ui/languages/translations/tl.d.ts.map +1 -1
- package/dist/ui/languages/translations/tr.d.ts.map +1 -1
- package/dist/ui/languages/translations/uk.d.ts.map +1 -1
- package/dist/ui/languages/translations/ur.d.ts.map +1 -1
- package/dist/ui/languages/translations/vi.d.ts.map +1 -1
- package/dist/ui/languages/translations/zh.d.ts.map +1 -1
- package/dist/ui/languages/types.d.ts +1 -0
- package/dist/ui/languages/types.d.ts.map +1 -1
- package/dist/ui.cjs +27 -27
- package/dist/ui.cjs.map +1 -1
- package/dist/ui.js +1035 -1006
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui/languages/translations/ar.d.ts +0 -4
- package/dist/ui/languages/translations/ar.d.ts.map +0 -1
package/dist/ui.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as de, u as Ea, g as He, j as ge, h as pe, i as oa, l as
|
|
2
|
-
import { E as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { A as de, u as Ea, g as He, j as ge, h as pe, i as oa, l as ra, k as sa, R as za, c as wa } from "./RqmiiCloudAvatarPlayer-Cit_rrpj.js";
|
|
2
|
+
import { E as hi, d as gi } from "./RqmiiCloudAvatarPlayer-Cit_rrpj.js";
|
|
3
|
+
import { jsx as t, jsxs as v, Fragment as Te } from "react/jsx-runtime";
|
|
4
|
+
import L, { useContext as Sa, createContext as xa, forwardRef as la, createElement as Ae, useState as y, useEffect as I, useRef as R, useLayoutEffect as We, useCallback as ie, useMemo as $ } from "react";
|
|
5
|
+
const Ma = {
|
|
6
6
|
sendMessage: "Stuur 'n boodskap",
|
|
7
7
|
send: "Stuur",
|
|
8
8
|
close: "Sluit",
|
|
@@ -44,7 +44,8 @@ const wa = {
|
|
|
44
44
|
leadFormName: "Naam",
|
|
45
45
|
leadFormEmail: "E-pos",
|
|
46
46
|
leadFormPhone: "Foon",
|
|
47
|
-
leadFormMessage: "Jou boodskap"
|
|
47
|
+
leadFormMessage: "Jou boodskap",
|
|
48
|
+
poweredBy: "Aangedryf deur {brand}"
|
|
48
49
|
}, Pa = {
|
|
49
50
|
sendMessage: "Dërgo një mesazh",
|
|
50
51
|
send: "Dërgo",
|
|
@@ -87,7 +88,8 @@ const wa = {
|
|
|
87
88
|
leadFormName: "Emri",
|
|
88
89
|
leadFormEmail: "Email",
|
|
89
90
|
leadFormPhone: "Telefoni",
|
|
90
|
-
leadFormMessage: "Mesazhi juaj"
|
|
91
|
+
leadFormMessage: "Mesazhi juaj",
|
|
92
|
+
poweredBy: "Mundësuar nga {brand}"
|
|
91
93
|
}, Ca = {
|
|
92
94
|
sendMessage: "اكتب رسالة",
|
|
93
95
|
send: "إرسال",
|
|
@@ -130,50 +132,8 @@ const wa = {
|
|
|
130
132
|
leadFormName: "الاسم",
|
|
131
133
|
leadFormEmail: "البريد الإلكتروني",
|
|
132
134
|
leadFormPhone: "رقم الهاتف",
|
|
133
|
-
leadFormMessage: "رسالتك"
|
|
134
|
-
|
|
135
|
-
sendMessage: "اكتب رسالة",
|
|
136
|
-
send: "إرسال",
|
|
137
|
-
close: "إغلاق",
|
|
138
|
-
minimize: "تصغير",
|
|
139
|
-
maximize: "تكبير",
|
|
140
|
-
call: "اتصل",
|
|
141
|
-
listening: "يستمع",
|
|
142
|
-
processing: "يعالج",
|
|
143
|
-
talkToInterrupt: "تحدث للمقاطعة",
|
|
144
|
-
startVoice: "بدء الصوت",
|
|
145
|
-
stopVoice: "إيقاف الصوت",
|
|
146
|
-
endCall: "إنهاء المكالمة",
|
|
147
|
-
openChat: "فتح المحادثة",
|
|
148
|
-
connectionFailed: "فشل الاتصال",
|
|
149
|
-
retry: "إعادة المحاولة",
|
|
150
|
-
loading: "جار التحميل",
|
|
151
|
-
creditsExhausted: "نفذ الرصيد",
|
|
152
|
-
creditsExhaustedDetail: "نفذ رصيد هذه الجلسة.",
|
|
153
|
-
consentTitle: "الموافقة على الخصوصية",
|
|
154
|
-
consentBody: "بالمتابعة، أنت توافق على جمع ومعالجة بياناتك كما هو موضح في",
|
|
155
|
-
consentAccept: "قبول",
|
|
156
|
-
consentDecline: "رفض",
|
|
157
|
-
consentTermsLink: "شروط الخدمة",
|
|
158
|
-
consentPrivacyLink: "سياسة الخصوصية",
|
|
159
|
-
refresh: "تحديث",
|
|
160
|
-
ratingQuestion: "كيف كانت هذه المحادثة؟",
|
|
161
|
-
ratingThankYou: "شكرًا على ملاحظاتك!",
|
|
162
|
-
youEnded: "لقد أنهيت المحادثة",
|
|
163
|
-
agentEnded: "أنهى الوكيل المحادثة",
|
|
164
|
-
sessionIdLabel: "المعرّف:",
|
|
165
|
-
tellUsMore: "أخبرنا المزيد",
|
|
166
|
-
feedbackSubtitle: "تساعدنا ملاحظاتك في تحسين خدمتنا ودعمك بشكل أفضل في المستقبل.",
|
|
167
|
-
feedbackPlaceholder: "أخبرنا المزيد عن تجربتك…",
|
|
168
|
-
submit: "إرسال",
|
|
169
|
-
leadFormTitle: "معلومات التواصل",
|
|
170
|
-
leadFormSuccess: "شكرًا لك! تم إرسال بياناتك.",
|
|
171
|
-
leadFormRequiredError: "يرجى تعبئة جميع الحقول المطلوبة.",
|
|
172
|
-
leadFormGenericError: "حدث خطأ ما. حاول مرة أخرى.",
|
|
173
|
-
leadFormName: "الاسم",
|
|
174
|
-
leadFormEmail: "البريد الإلكتروني",
|
|
175
|
-
leadFormPhone: "رقم الهاتف",
|
|
176
|
-
leadFormMessage: "رسالتك"
|
|
135
|
+
leadFormMessage: "رسالتك",
|
|
136
|
+
poweredBy: "بواسطة {brand}"
|
|
177
137
|
}, Aa = {
|
|
178
138
|
sendMessage: "اكتب رسالة",
|
|
179
139
|
send: "إرسال",
|
|
@@ -216,8 +176,9 @@ const wa = {
|
|
|
216
176
|
leadFormName: "الاسم",
|
|
217
177
|
leadFormEmail: "البريد الإلكتروني",
|
|
218
178
|
leadFormPhone: "رقم الهاتف",
|
|
219
|
-
leadFormMessage: "رسالتك"
|
|
220
|
-
|
|
179
|
+
leadFormMessage: "رسالتك",
|
|
180
|
+
poweredBy: "بواسطة {brand}"
|
|
181
|
+
}, La = {
|
|
221
182
|
sendMessage: "Mesaj göndər",
|
|
222
183
|
send: "Göndər",
|
|
223
184
|
close: "Bağla",
|
|
@@ -259,8 +220,9 @@ const wa = {
|
|
|
259
220
|
leadFormName: "Ad",
|
|
260
221
|
leadFormEmail: "E-poçt",
|
|
261
222
|
leadFormPhone: "Telefon",
|
|
262
|
-
leadFormMessage: "Mesajınız"
|
|
263
|
-
|
|
223
|
+
leadFormMessage: "Mesajınız",
|
|
224
|
+
poweredBy: "Dəstəkləyən {brand}"
|
|
225
|
+
}, _a = {
|
|
264
226
|
sendMessage: "Bidali mezua",
|
|
265
227
|
send: "Bidali",
|
|
266
228
|
close: "Itxi",
|
|
@@ -302,8 +264,9 @@ const wa = {
|
|
|
302
264
|
leadFormName: "Izena",
|
|
303
265
|
leadFormEmail: "Helbide elektronikoa",
|
|
304
266
|
leadFormPhone: "Telefonoa",
|
|
305
|
-
leadFormMessage: "Zure mezua"
|
|
306
|
-
|
|
267
|
+
leadFormMessage: "Zure mezua",
|
|
268
|
+
poweredBy: "Garapena: {brand}"
|
|
269
|
+
}, qa = {
|
|
307
270
|
sendMessage: "Адправіць паведамленне",
|
|
308
271
|
send: "Адправіць",
|
|
309
272
|
close: "Зачыніць",
|
|
@@ -345,8 +308,9 @@ const wa = {
|
|
|
345
308
|
leadFormName: "Імя",
|
|
346
309
|
leadFormEmail: "Электронная пошта",
|
|
347
310
|
leadFormPhone: "Тэлефон",
|
|
348
|
-
leadFormMessage: "Ваша паведамленне"
|
|
349
|
-
|
|
311
|
+
leadFormMessage: "Ваша паведамленне",
|
|
312
|
+
poweredBy: "Працуе на {brand}"
|
|
313
|
+
}, Ia = {
|
|
350
314
|
sendMessage: "একটি বার্তা পাঠান",
|
|
351
315
|
send: "পাঠান",
|
|
352
316
|
close: "বন্ধ করুন",
|
|
@@ -388,8 +352,9 @@ const wa = {
|
|
|
388
352
|
leadFormName: "নাম",
|
|
389
353
|
leadFormEmail: "ইমেইল",
|
|
390
354
|
leadFormPhone: "ফোন",
|
|
391
|
-
leadFormMessage: "আপনার বার্তা"
|
|
392
|
-
|
|
355
|
+
leadFormMessage: "আপনার বার্তা",
|
|
356
|
+
poweredBy: "পরিচালিত {brand}"
|
|
357
|
+
}, Va = {
|
|
393
358
|
sendMessage: "Pošalji poruku",
|
|
394
359
|
send: "Pošalji",
|
|
395
360
|
close: "Zatvori",
|
|
@@ -431,8 +396,9 @@ const wa = {
|
|
|
431
396
|
leadFormName: "Ime",
|
|
432
397
|
leadFormEmail: "E-mail",
|
|
433
398
|
leadFormPhone: "Telefon",
|
|
434
|
-
leadFormMessage: "Vaša poruka"
|
|
435
|
-
|
|
399
|
+
leadFormMessage: "Vaša poruka",
|
|
400
|
+
poweredBy: "Pokreće {brand}"
|
|
401
|
+
}, Na = {
|
|
436
402
|
sendMessage: "Изпрати съобщение",
|
|
437
403
|
send: "Изпрати",
|
|
438
404
|
close: "Затвори",
|
|
@@ -474,8 +440,9 @@ const wa = {
|
|
|
474
440
|
leadFormName: "Име",
|
|
475
441
|
leadFormEmail: "Имейл",
|
|
476
442
|
leadFormPhone: "Телефон",
|
|
477
|
-
leadFormMessage: "Вашето съобщение"
|
|
478
|
-
|
|
443
|
+
leadFormMessage: "Вашето съобщение",
|
|
444
|
+
poweredBy: "Предоставено от {brand}"
|
|
445
|
+
}, ja = {
|
|
479
446
|
sendMessage: "Enviar un missatge",
|
|
480
447
|
send: "Enviar",
|
|
481
448
|
close: "Tancar",
|
|
@@ -517,8 +484,9 @@ const wa = {
|
|
|
517
484
|
leadFormName: "Nom",
|
|
518
485
|
leadFormEmail: "Correu electrònic",
|
|
519
486
|
leadFormPhone: "Telèfon",
|
|
520
|
-
leadFormMessage: "El teu missatge"
|
|
521
|
-
|
|
487
|
+
leadFormMessage: "El teu missatge",
|
|
488
|
+
poweredBy: "Desenvolupat per {brand}"
|
|
489
|
+
}, Da = {
|
|
522
490
|
sendMessage: "发送消息",
|
|
523
491
|
send: "发送",
|
|
524
492
|
close: "关闭",
|
|
@@ -560,7 +528,8 @@ const wa = {
|
|
|
560
528
|
leadFormName: "姓名",
|
|
561
529
|
leadFormEmail: "电子邮箱",
|
|
562
530
|
leadFormPhone: "电话",
|
|
563
|
-
leadFormMessage: "您的留言"
|
|
531
|
+
leadFormMessage: "您的留言",
|
|
532
|
+
poweredBy: "技术支持:{brand}"
|
|
564
533
|
}, Ba = {
|
|
565
534
|
sendMessage: "Pošalji poruku",
|
|
566
535
|
send: "Pošalji",
|
|
@@ -603,8 +572,9 @@ const wa = {
|
|
|
603
572
|
leadFormName: "Ime",
|
|
604
573
|
leadFormEmail: "E-mail",
|
|
605
574
|
leadFormPhone: "Telefon",
|
|
606
|
-
leadFormMessage: "Vaša poruka"
|
|
607
|
-
|
|
575
|
+
leadFormMessage: "Vaša poruka",
|
|
576
|
+
poweredBy: "Pokreće {brand}"
|
|
577
|
+
}, Ra = {
|
|
608
578
|
sendMessage: "Poslat zprávu",
|
|
609
579
|
send: "Odeslat",
|
|
610
580
|
close: "Zavřít",
|
|
@@ -646,8 +616,9 @@ const wa = {
|
|
|
646
616
|
leadFormName: "Jméno",
|
|
647
617
|
leadFormEmail: "E-mail",
|
|
648
618
|
leadFormPhone: "Telefon",
|
|
649
|
-
leadFormMessage: "Vaše zpráva"
|
|
650
|
-
|
|
619
|
+
leadFormMessage: "Vaše zpráva",
|
|
620
|
+
poweredBy: "Běží na {brand}"
|
|
621
|
+
}, Ga = {
|
|
651
622
|
sendMessage: "Send en besked",
|
|
652
623
|
send: "Send",
|
|
653
624
|
close: "Luk",
|
|
@@ -689,8 +660,9 @@ const wa = {
|
|
|
689
660
|
leadFormName: "Navn",
|
|
690
661
|
leadFormEmail: "E-mail",
|
|
691
662
|
leadFormPhone: "Telefon",
|
|
692
|
-
leadFormMessage: "Din besked"
|
|
693
|
-
|
|
663
|
+
leadFormMessage: "Din besked",
|
|
664
|
+
poweredBy: "Drevet af {brand}"
|
|
665
|
+
}, Ua = {
|
|
694
666
|
sendMessage: "Stuur een bericht",
|
|
695
667
|
send: "Verzenden",
|
|
696
668
|
close: "Sluiten",
|
|
@@ -732,8 +704,9 @@ const wa = {
|
|
|
732
704
|
leadFormName: "Naam",
|
|
733
705
|
leadFormEmail: "E-mail",
|
|
734
706
|
leadFormPhone: "Telefoon",
|
|
735
|
-
leadFormMessage: "Uw bericht"
|
|
736
|
-
|
|
707
|
+
leadFormMessage: "Uw bericht",
|
|
708
|
+
poweredBy: "Mogelijk gemaakt door {brand}"
|
|
709
|
+
}, Ka = {
|
|
737
710
|
sendMessage: "Send a message",
|
|
738
711
|
send: "Send",
|
|
739
712
|
close: "Close",
|
|
@@ -775,8 +748,9 @@ const wa = {
|
|
|
775
748
|
leadFormName: "Name",
|
|
776
749
|
leadFormEmail: "Email",
|
|
777
750
|
leadFormPhone: "Phone",
|
|
778
|
-
leadFormMessage: "Your message"
|
|
779
|
-
|
|
751
|
+
leadFormMessage: "Your message",
|
|
752
|
+
poweredBy: "Powered by {brand}"
|
|
753
|
+
}, Oa = {
|
|
780
754
|
sendMessage: "Saada sõnum",
|
|
781
755
|
send: "Saada",
|
|
782
756
|
close: "Sulge",
|
|
@@ -818,8 +792,9 @@ const wa = {
|
|
|
818
792
|
leadFormName: "Nimi",
|
|
819
793
|
leadFormEmail: "E-post",
|
|
820
794
|
leadFormPhone: "Telefon",
|
|
821
|
-
leadFormMessage: "Teie sõnum"
|
|
822
|
-
|
|
795
|
+
leadFormMessage: "Teie sõnum",
|
|
796
|
+
poweredBy: "Toetab {brand}"
|
|
797
|
+
}, Ya = {
|
|
823
798
|
sendMessage: "Lähetä viesti",
|
|
824
799
|
send: "Lähetä",
|
|
825
800
|
close: "Sulje",
|
|
@@ -861,8 +836,9 @@ const wa = {
|
|
|
861
836
|
leadFormName: "Nimi",
|
|
862
837
|
leadFormEmail: "Sähköposti",
|
|
863
838
|
leadFormPhone: "Puhelin",
|
|
864
|
-
leadFormMessage: "Viestisi"
|
|
865
|
-
|
|
839
|
+
leadFormMessage: "Viestisi",
|
|
840
|
+
poweredBy: "Palvelun tarjoaa {brand}"
|
|
841
|
+
}, Qa = {
|
|
866
842
|
sendMessage: "Envoyer un message",
|
|
867
843
|
send: "Envoyer",
|
|
868
844
|
close: "Fermer",
|
|
@@ -904,8 +880,9 @@ const wa = {
|
|
|
904
880
|
leadFormName: "Nom",
|
|
905
881
|
leadFormEmail: "E-mail",
|
|
906
882
|
leadFormPhone: "Téléphone",
|
|
907
|
-
leadFormMessage: "Votre message"
|
|
908
|
-
|
|
883
|
+
leadFormMessage: "Votre message",
|
|
884
|
+
poweredBy: "Propulsé par {brand}"
|
|
885
|
+
}, Ha = {
|
|
909
886
|
sendMessage: "Enviar unha mensaxe",
|
|
910
887
|
send: "Enviar",
|
|
911
888
|
close: "Pechar",
|
|
@@ -947,8 +924,9 @@ const wa = {
|
|
|
947
924
|
leadFormName: "Nome",
|
|
948
925
|
leadFormEmail: "Correo electrónico",
|
|
949
926
|
leadFormPhone: "Teléfono",
|
|
950
|
-
leadFormMessage: "A túa mensaxe"
|
|
951
|
-
|
|
927
|
+
leadFormMessage: "A túa mensaxe",
|
|
928
|
+
poweredBy: "Desenvolvido por {brand}"
|
|
929
|
+
}, Wa = {
|
|
952
930
|
sendMessage: "Nachricht senden",
|
|
953
931
|
send: "Senden",
|
|
954
932
|
close: "Schließen",
|
|
@@ -990,8 +968,9 @@ const wa = {
|
|
|
990
968
|
leadFormName: "Name",
|
|
991
969
|
leadFormEmail: "E-Mail",
|
|
992
970
|
leadFormPhone: "Telefon",
|
|
993
|
-
leadFormMessage: "Ihre Nachricht"
|
|
994
|
-
|
|
971
|
+
leadFormMessage: "Ihre Nachricht",
|
|
972
|
+
poweredBy: "Bereitgestellt von {brand}"
|
|
973
|
+
}, $a = {
|
|
995
974
|
sendMessage: "Αποστολή μηνύματος",
|
|
996
975
|
send: "Αποστολή",
|
|
997
976
|
close: "Κλείσιμο",
|
|
@@ -1033,8 +1012,9 @@ const wa = {
|
|
|
1033
1012
|
leadFormName: "Όνομα",
|
|
1034
1013
|
leadFormEmail: "E-mail",
|
|
1035
1014
|
leadFormPhone: "Τηλέφωνο",
|
|
1036
|
-
leadFormMessage: "Το μήνυμά σας"
|
|
1037
|
-
|
|
1015
|
+
leadFormMessage: "Το μήνυμά σας",
|
|
1016
|
+
poweredBy: "Με την υποστήриξη του {brand}"
|
|
1017
|
+
}, Za = {
|
|
1038
1018
|
sendMessage: "સંદેશ મોકલો",
|
|
1039
1019
|
send: "મોકલો",
|
|
1040
1020
|
close: "બંધ કરો",
|
|
@@ -1076,8 +1056,9 @@ const wa = {
|
|
|
1076
1056
|
leadFormName: "નામ",
|
|
1077
1057
|
leadFormEmail: "ઇમેઇલ",
|
|
1078
1058
|
leadFormPhone: "ફોન",
|
|
1079
|
-
leadFormMessage: "તમારો સંદેશ"
|
|
1080
|
-
|
|
1059
|
+
leadFormMessage: "તમારો સંદેશ",
|
|
1060
|
+
poweredBy: "સંચાલિત {brand}"
|
|
1061
|
+
}, Ja = {
|
|
1081
1062
|
sendMessage: "संदेश भेजें",
|
|
1082
1063
|
send: "भेजें",
|
|
1083
1064
|
close: "बंद करें",
|
|
@@ -1119,8 +1100,9 @@ const wa = {
|
|
|
1119
1100
|
leadFormName: "नाम",
|
|
1120
1101
|
leadFormEmail: "ईमेल",
|
|
1121
1102
|
leadFormPhone: "फ़ोन",
|
|
1122
|
-
leadFormMessage: "आपका संदेश"
|
|
1123
|
-
|
|
1103
|
+
leadFormMessage: "आपका संदेश",
|
|
1104
|
+
poweredBy: "द्वारा संचालित {brand}"
|
|
1105
|
+
}, Xa = {
|
|
1124
1106
|
sendMessage: "Üzenet küldése",
|
|
1125
1107
|
send: "Küldés",
|
|
1126
1108
|
close: "Bezárás",
|
|
@@ -1162,8 +1144,9 @@ const wa = {
|
|
|
1162
1144
|
leadFormName: "Név",
|
|
1163
1145
|
leadFormEmail: "E-mail",
|
|
1164
1146
|
leadFormPhone: "Telefon",
|
|
1165
|
-
leadFormMessage: "Üzenete"
|
|
1166
|
-
|
|
1147
|
+
leadFormMessage: "Üzenete",
|
|
1148
|
+
poweredBy: "Működteti a(z) {brand}"
|
|
1149
|
+
}, en = {
|
|
1167
1150
|
sendMessage: "Kirim pesan",
|
|
1168
1151
|
send: "Kirim",
|
|
1169
1152
|
close: "Tutup",
|
|
@@ -1205,8 +1188,9 @@ const wa = {
|
|
|
1205
1188
|
leadFormName: "Nama",
|
|
1206
1189
|
leadFormEmail: "Email",
|
|
1207
1190
|
leadFormPhone: "Telepon",
|
|
1208
|
-
leadFormMessage: "Pesan Anda"
|
|
1209
|
-
|
|
1191
|
+
leadFormMessage: "Pesan Anda",
|
|
1192
|
+
poweredBy: "Didukung oleh {brand}"
|
|
1193
|
+
}, an = {
|
|
1210
1194
|
sendMessage: "Invia un messaggio",
|
|
1211
1195
|
send: "Invia",
|
|
1212
1196
|
close: "Chiudi",
|
|
@@ -1248,8 +1232,9 @@ const wa = {
|
|
|
1248
1232
|
leadFormName: "Nome",
|
|
1249
1233
|
leadFormEmail: "E-mail",
|
|
1250
1234
|
leadFormPhone: "Telefono",
|
|
1251
|
-
leadFormMessage: "Il tuo messaggio"
|
|
1252
|
-
|
|
1235
|
+
leadFormMessage: "Il tuo messaggio",
|
|
1236
|
+
poweredBy: "Offerto da {brand}"
|
|
1237
|
+
}, nn = {
|
|
1253
1238
|
sendMessage: "メッセージを送信",
|
|
1254
1239
|
send: "送信",
|
|
1255
1240
|
close: "閉じる",
|
|
@@ -1291,8 +1276,9 @@ const wa = {
|
|
|
1291
1276
|
leadFormName: "お名前",
|
|
1292
1277
|
leadFormEmail: "メールアドレス",
|
|
1293
1278
|
leadFormPhone: "電話番号",
|
|
1294
|
-
leadFormMessage: "メッセージ"
|
|
1295
|
-
|
|
1279
|
+
leadFormMessage: "メッセージ",
|
|
1280
|
+
poweredBy: "提供: {brand}"
|
|
1281
|
+
}, tn = {
|
|
1296
1282
|
sendMessage: "ಸಂದೇಶ ಕಳುಹಿಸಿ",
|
|
1297
1283
|
send: "ಕಳುಹಿಸಿ",
|
|
1298
1284
|
close: "ಮುಚ್ಚಿ",
|
|
@@ -1334,8 +1320,9 @@ const wa = {
|
|
|
1334
1320
|
leadFormName: "ಹೆಸರು",
|
|
1335
1321
|
leadFormEmail: "ಇಮೇಲ್",
|
|
1336
1322
|
leadFormPhone: "ಫೋನ್",
|
|
1337
|
-
leadFormMessage: "ನಿಮ್ಮ ಸಂದೇಶ"
|
|
1338
|
-
|
|
1323
|
+
leadFormMessage: "ನಿಮ್ಮ ಸಂದೇಶ",
|
|
1324
|
+
poweredBy: "ನಡೆಸುವವರು {brand}"
|
|
1325
|
+
}, on = {
|
|
1339
1326
|
sendMessage: "Хабарлама жіберу",
|
|
1340
1327
|
send: "Жіберу",
|
|
1341
1328
|
close: "Жабу",
|
|
@@ -1377,8 +1364,9 @@ const wa = {
|
|
|
1377
1364
|
leadFormName: "Аты",
|
|
1378
1365
|
leadFormEmail: "Электрондық пошта",
|
|
1379
1366
|
leadFormPhone: "Телефон",
|
|
1380
|
-
leadFormMessage: "Сіздің хабарламаңыз"
|
|
1381
|
-
|
|
1367
|
+
leadFormMessage: "Сіздің хабарламаңыз",
|
|
1368
|
+
poweredBy: "Қолдаушы {brand}"
|
|
1369
|
+
}, rn = {
|
|
1382
1370
|
sendMessage: "메시지 보내기",
|
|
1383
1371
|
send: "보내기",
|
|
1384
1372
|
close: "닫기",
|
|
@@ -1420,8 +1408,9 @@ const wa = {
|
|
|
1420
1408
|
leadFormName: "이름",
|
|
1421
1409
|
leadFormEmail: "이메일",
|
|
1422
1410
|
leadFormPhone: "전화번호",
|
|
1423
|
-
leadFormMessage: "메시지"
|
|
1424
|
-
|
|
1411
|
+
leadFormMessage: "메시지",
|
|
1412
|
+
poweredBy: "제공: {brand}"
|
|
1413
|
+
}, sn = {
|
|
1425
1414
|
sendMessage: "Sūtīt ziņojumu",
|
|
1426
1415
|
send: "Sūtīt",
|
|
1427
1416
|
close: "Aizvērt",
|
|
@@ -1463,8 +1452,9 @@ const wa = {
|
|
|
1463
1452
|
leadFormName: "Vārds",
|
|
1464
1453
|
leadFormEmail: "E-pasts",
|
|
1465
1454
|
leadFormPhone: "Tālrunis",
|
|
1466
|
-
leadFormMessage: "Jūsu ziņojums"
|
|
1467
|
-
|
|
1455
|
+
leadFormMessage: "Jūsu ziņojums",
|
|
1456
|
+
poweredBy: "Nodrošina {brand}"
|
|
1457
|
+
}, ln = {
|
|
1468
1458
|
sendMessage: "Siųsti žinutę",
|
|
1469
1459
|
send: "Siųsti",
|
|
1470
1460
|
close: "Uždaryti",
|
|
@@ -1506,8 +1496,9 @@ const wa = {
|
|
|
1506
1496
|
leadFormName: "Vardas",
|
|
1507
1497
|
leadFormEmail: "El. paštas",
|
|
1508
1498
|
leadFormPhone: "Telefonas",
|
|
1509
|
-
leadFormMessage: "Jūsų žinutė"
|
|
1510
|
-
|
|
1499
|
+
leadFormMessage: "Jūsų žinutė",
|
|
1500
|
+
poweredBy: "Palaiko {brand}"
|
|
1501
|
+
}, cn = {
|
|
1511
1502
|
sendMessage: "Испрати порака",
|
|
1512
1503
|
send: "Испрати",
|
|
1513
1504
|
close: "Затвори",
|
|
@@ -1549,8 +1540,9 @@ const wa = {
|
|
|
1549
1540
|
leadFormName: "Име",
|
|
1550
1541
|
leadFormEmail: "Е-пошта",
|
|
1551
1542
|
leadFormPhone: "Телефон",
|
|
1552
|
-
leadFormMessage: "Вашата порака"
|
|
1553
|
-
|
|
1543
|
+
leadFormMessage: "Вашата порака",
|
|
1544
|
+
poweredBy: "Овозможено од {brand}"
|
|
1545
|
+
}, dn = {
|
|
1554
1546
|
sendMessage: "Hantar mesej",
|
|
1555
1547
|
send: "Hantar",
|
|
1556
1548
|
close: "Tutup",
|
|
@@ -1592,8 +1584,9 @@ const wa = {
|
|
|
1592
1584
|
leadFormName: "Nama",
|
|
1593
1585
|
leadFormEmail: "E-mel",
|
|
1594
1586
|
leadFormPhone: "Telefon",
|
|
1595
|
-
leadFormMessage: "Mesej anda"
|
|
1596
|
-
|
|
1587
|
+
leadFormMessage: "Mesej anda",
|
|
1588
|
+
poweredBy: "Dikuasakan oleh {brand}"
|
|
1589
|
+
}, un = {
|
|
1597
1590
|
sendMessage: "ഒരു സന്ദേശം അയയ്ക്കുക",
|
|
1598
1591
|
send: "അയയ്ക്കുക",
|
|
1599
1592
|
close: "അടയ്ക്കുക",
|
|
@@ -1635,8 +1628,9 @@ const wa = {
|
|
|
1635
1628
|
leadFormName: "പേര്",
|
|
1636
1629
|
leadFormEmail: "ഇമെയിൽ",
|
|
1637
1630
|
leadFormPhone: "ഫോൺ",
|
|
1638
|
-
leadFormMessage: "നിങ്ങളുടെ സന്ദേശം"
|
|
1639
|
-
|
|
1631
|
+
leadFormMessage: "നിങ്ങളുടെ സന്ദേശം",
|
|
1632
|
+
poweredBy: "നൽകുന്നത് {brand}"
|
|
1633
|
+
}, mn = {
|
|
1640
1634
|
sendMessage: "संदेश पाठवा",
|
|
1641
1635
|
send: "पाठवा",
|
|
1642
1636
|
close: "बंद करा",
|
|
@@ -1678,8 +1672,9 @@ const wa = {
|
|
|
1678
1672
|
leadFormName: "नाव",
|
|
1679
1673
|
leadFormEmail: "ईमेल",
|
|
1680
1674
|
leadFormPhone: "फोन",
|
|
1681
|
-
leadFormMessage: "तुमचा संदेश"
|
|
1682
|
-
|
|
1675
|
+
leadFormMessage: "तुमचा संदेश",
|
|
1676
|
+
poweredBy: "समर्थित {brand}"
|
|
1677
|
+
}, hn = {
|
|
1683
1678
|
sendMessage: "Send en melding",
|
|
1684
1679
|
send: "Send",
|
|
1685
1680
|
close: "Lukk",
|
|
@@ -1721,8 +1716,9 @@ const wa = {
|
|
|
1721
1716
|
leadFormName: "Navn",
|
|
1722
1717
|
leadFormEmail: "E-post",
|
|
1723
1718
|
leadFormPhone: "Telefon",
|
|
1724
|
-
leadFormMessage: "Din melding"
|
|
1725
|
-
|
|
1719
|
+
leadFormMessage: "Din melding",
|
|
1720
|
+
poweredBy: "Drevet av {brand}"
|
|
1721
|
+
}, gn = {
|
|
1726
1722
|
sendMessage: "پیامی بنویسید",
|
|
1727
1723
|
send: "ارسال",
|
|
1728
1724
|
close: "بستن",
|
|
@@ -1764,8 +1760,9 @@ const wa = {
|
|
|
1764
1760
|
leadFormName: "نام",
|
|
1765
1761
|
leadFormEmail: "ایمیل",
|
|
1766
1762
|
leadFormPhone: "تلفن",
|
|
1767
|
-
leadFormMessage: "پیام شما"
|
|
1768
|
-
|
|
1763
|
+
leadFormMessage: "پیام شما",
|
|
1764
|
+
poweredBy: "با پشتیبانی {brand}"
|
|
1765
|
+
}, pn = {
|
|
1769
1766
|
sendMessage: "Wyślij wiadomość",
|
|
1770
1767
|
send: "Wyślij",
|
|
1771
1768
|
close: "Zamknij",
|
|
@@ -1807,8 +1804,9 @@ const wa = {
|
|
|
1807
1804
|
leadFormName: "Imię",
|
|
1808
1805
|
leadFormEmail: "E-mail",
|
|
1809
1806
|
leadFormPhone: "Telefon",
|
|
1810
|
-
leadFormMessage: "Twoja wiadomość"
|
|
1811
|
-
|
|
1807
|
+
leadFormMessage: "Twoja wiadomość",
|
|
1808
|
+
poweredBy: "Obsługiwane przez {brand}"
|
|
1809
|
+
}, bn = {
|
|
1812
1810
|
sendMessage: "Enviar mensagem",
|
|
1813
1811
|
send: "Enviar",
|
|
1814
1812
|
close: "Fechar",
|
|
@@ -1850,8 +1848,9 @@ const wa = {
|
|
|
1850
1848
|
leadFormName: "Nome",
|
|
1851
1849
|
leadFormEmail: "E-mail",
|
|
1852
1850
|
leadFormPhone: "Telefone",
|
|
1853
|
-
leadFormMessage: "Sua mensagem"
|
|
1854
|
-
|
|
1851
|
+
leadFormMessage: "Sua mensagem",
|
|
1852
|
+
poweredBy: "Desenvolvido por {brand}"
|
|
1853
|
+
}, fn = {
|
|
1855
1854
|
sendMessage: "ਇੱਕ ਸੁਨੇਹਾ ਭੇਜੋ",
|
|
1856
1855
|
send: "ਭੇਜੋ",
|
|
1857
1856
|
close: "ਬੰਦ ਕਰੋ",
|
|
@@ -1893,8 +1892,9 @@ const wa = {
|
|
|
1893
1892
|
leadFormName: "ਨਾਮ",
|
|
1894
1893
|
leadFormEmail: "ਈਮੇਲ",
|
|
1895
1894
|
leadFormPhone: "ਫ਼ੋਨ",
|
|
1896
|
-
leadFormMessage: "ਤੁਹਾਡਾ ਸੁਨੇਹਾ"
|
|
1897
|
-
|
|
1895
|
+
leadFormMessage: "ਤੁਹਾਡਾ ਸੁਨੇਹਾ",
|
|
1896
|
+
poweredBy: "ਦੁਆਰਾ ਸੰਚਾਲਿਤ {brand}"
|
|
1897
|
+
}, kn = {
|
|
1898
1898
|
sendMessage: "Trimite un mesaj",
|
|
1899
1899
|
send: "Trimite",
|
|
1900
1900
|
close: "Închide",
|
|
@@ -1936,8 +1936,9 @@ const wa = {
|
|
|
1936
1936
|
leadFormName: "Nume",
|
|
1937
1937
|
leadFormEmail: "E-mail",
|
|
1938
1938
|
leadFormPhone: "Telefon",
|
|
1939
|
-
leadFormMessage: "Mesajul dumneavoastră"
|
|
1940
|
-
|
|
1939
|
+
leadFormMessage: "Mesajul dumneavoastră",
|
|
1940
|
+
poweredBy: "Dezvoltat de {brand}"
|
|
1941
|
+
}, vn = {
|
|
1941
1942
|
sendMessage: "Отправить сообщение",
|
|
1942
1943
|
send: "Отправить",
|
|
1943
1944
|
close: "Закрыть",
|
|
@@ -1979,8 +1980,9 @@ const wa = {
|
|
|
1979
1980
|
leadFormName: "Имя",
|
|
1980
1981
|
leadFormEmail: "Электронная почта",
|
|
1981
1982
|
leadFormPhone: "Телефон",
|
|
1982
|
-
leadFormMessage: "Ваше сообщение"
|
|
1983
|
-
|
|
1983
|
+
leadFormMessage: "Ваше сообщение",
|
|
1984
|
+
poweredBy: "Работает на {brand}"
|
|
1985
|
+
}, yn = {
|
|
1984
1986
|
sendMessage: "Пошаљи поруку",
|
|
1985
1987
|
send: "Пошаљи",
|
|
1986
1988
|
close: "Затвори",
|
|
@@ -2022,8 +2024,9 @@ const wa = {
|
|
|
2022
2024
|
leadFormName: "Име",
|
|
2023
2025
|
leadFormEmail: "Имејл",
|
|
2024
2026
|
leadFormPhone: "Телефон",
|
|
2025
|
-
leadFormMessage: "Ваша порука"
|
|
2026
|
-
|
|
2027
|
+
leadFormMessage: "Ваша порука",
|
|
2028
|
+
poweredBy: "Омогућио {brand}"
|
|
2029
|
+
}, Fn = {
|
|
2027
2030
|
sendMessage: "Poslať správu",
|
|
2028
2031
|
send: "Odoslať",
|
|
2029
2032
|
close: "Zavrieť",
|
|
@@ -2065,8 +2068,9 @@ const wa = {
|
|
|
2065
2068
|
leadFormName: "Meno",
|
|
2066
2069
|
leadFormEmail: "E-mail",
|
|
2067
2070
|
leadFormPhone: "Telefón",
|
|
2068
|
-
leadFormMessage: "Vaša správa"
|
|
2069
|
-
|
|
2071
|
+
leadFormMessage: "Vaša správa",
|
|
2072
|
+
poweredBy: "Poháňané systémom {brand}"
|
|
2073
|
+
}, Tn = {
|
|
2070
2074
|
sendMessage: "Pošlji sporočilo",
|
|
2071
2075
|
send: "Pošlji",
|
|
2072
2076
|
close: "Zapri",
|
|
@@ -2108,8 +2112,9 @@ const wa = {
|
|
|
2108
2112
|
leadFormName: "Ime",
|
|
2109
2113
|
leadFormEmail: "E-pošta",
|
|
2110
2114
|
leadFormPhone: "Telefon",
|
|
2111
|
-
leadFormMessage: "Vaše sporočilo"
|
|
2112
|
-
|
|
2115
|
+
leadFormMessage: "Vaše sporočilo",
|
|
2116
|
+
poweredBy: "Poganja {brand}"
|
|
2117
|
+
}, En = {
|
|
2113
2118
|
sendMessage: "Enviar un mensaje",
|
|
2114
2119
|
send: "Enviar",
|
|
2115
2120
|
close: "Cerrar",
|
|
@@ -2151,8 +2156,9 @@ const wa = {
|
|
|
2151
2156
|
leadFormName: "Nombre",
|
|
2152
2157
|
leadFormEmail: "Correo electrónico",
|
|
2153
2158
|
leadFormPhone: "Teléfono",
|
|
2154
|
-
leadFormMessage: "Tu mensaje"
|
|
2155
|
-
|
|
2159
|
+
leadFormMessage: "Tu mensaje",
|
|
2160
|
+
poweredBy: "Desarrollado por {brand}"
|
|
2161
|
+
}, zn = {
|
|
2156
2162
|
sendMessage: "Tuma ujumbe",
|
|
2157
2163
|
send: "Tuma",
|
|
2158
2164
|
close: "Funga",
|
|
@@ -2194,8 +2200,9 @@ const wa = {
|
|
|
2194
2200
|
leadFormName: "Jina",
|
|
2195
2201
|
leadFormEmail: "Barua pepe",
|
|
2196
2202
|
leadFormPhone: "Simu",
|
|
2197
|
-
leadFormMessage: "Ujumbe wako"
|
|
2198
|
-
|
|
2203
|
+
leadFormMessage: "Ujumbe wako",
|
|
2204
|
+
poweredBy: "Inaendeshwa na {brand}"
|
|
2205
|
+
}, wn = {
|
|
2199
2206
|
sendMessage: "Skicka ett meddelande",
|
|
2200
2207
|
send: "Skicka",
|
|
2201
2208
|
close: "Stäng",
|
|
@@ -2237,8 +2244,9 @@ const wa = {
|
|
|
2237
2244
|
leadFormName: "Namn",
|
|
2238
2245
|
leadFormEmail: "E-post",
|
|
2239
2246
|
leadFormPhone: "Telefon",
|
|
2240
|
-
leadFormMessage: "Ditt meddelande"
|
|
2241
|
-
|
|
2247
|
+
leadFormMessage: "Ditt meddelande",
|
|
2248
|
+
poweredBy: "Drivs av {brand}"
|
|
2249
|
+
}, Sn = {
|
|
2242
2250
|
sendMessage: "Magpadala ng mensahe",
|
|
2243
2251
|
send: "Ipadala",
|
|
2244
2252
|
close: "Isara",
|
|
@@ -2280,8 +2288,9 @@ const wa = {
|
|
|
2280
2288
|
leadFormName: "Pangalan",
|
|
2281
2289
|
leadFormEmail: "Email",
|
|
2282
2290
|
leadFormPhone: "Telepono",
|
|
2283
|
-
leadFormMessage: "Ang iyong mensahe"
|
|
2284
|
-
|
|
2291
|
+
leadFormMessage: "Ang iyong mensahe",
|
|
2292
|
+
poweredBy: "Pinapagana ng {brand}"
|
|
2293
|
+
}, xn = {
|
|
2285
2294
|
sendMessage: "ஒரு செய்தி அனுப்பவும்",
|
|
2286
2295
|
send: "அனுப்பு",
|
|
2287
2296
|
close: "மூடு",
|
|
@@ -2323,8 +2332,9 @@ const wa = {
|
|
|
2323
2332
|
leadFormName: "பெயர்",
|
|
2324
2333
|
leadFormEmail: "மின்னஞ்சல்",
|
|
2325
2334
|
leadFormPhone: "தொலைபேசி",
|
|
2326
|
-
leadFormMessage: "உங்கள் செய்தி"
|
|
2327
|
-
|
|
2335
|
+
leadFormMessage: "உங்கள் செய்தி",
|
|
2336
|
+
poweredBy: "இயக்குபவர் {brand}"
|
|
2337
|
+
}, Mn = {
|
|
2328
2338
|
sendMessage: "సందేశం పంపండి",
|
|
2329
2339
|
send: "పంపు",
|
|
2330
2340
|
close: "మూసివేయండి",
|
|
@@ -2366,8 +2376,9 @@ const wa = {
|
|
|
2366
2376
|
leadFormName: "పేరు",
|
|
2367
2377
|
leadFormEmail: "ఇమెయిల్",
|
|
2368
2378
|
leadFormPhone: "ఫోన్",
|
|
2369
|
-
leadFormMessage: "మీ సందేశం"
|
|
2370
|
-
|
|
2379
|
+
leadFormMessage: "మీ సందేశం",
|
|
2380
|
+
poweredBy: "అందించేవారు {brand}"
|
|
2381
|
+
}, Pn = {
|
|
2371
2382
|
sendMessage: "ส่งข้อความ",
|
|
2372
2383
|
send: "ส่ง",
|
|
2373
2384
|
close: "ปิด",
|
|
@@ -2409,8 +2420,9 @@ const wa = {
|
|
|
2409
2420
|
leadFormName: "ชื่อ",
|
|
2410
2421
|
leadFormEmail: "อีเมล",
|
|
2411
2422
|
leadFormPhone: "โทรศัพท์",
|
|
2412
|
-
leadFormMessage: "ข้อความของคุณ"
|
|
2413
|
-
|
|
2423
|
+
leadFormMessage: "ข้อความของคุณ",
|
|
2424
|
+
poweredBy: "ขับเคลื่อนโดย {brand}"
|
|
2425
|
+
}, Cn = {
|
|
2414
2426
|
sendMessage: "Mesaj gönder",
|
|
2415
2427
|
send: "Gönder",
|
|
2416
2428
|
close: "Kapat",
|
|
@@ -2452,8 +2464,9 @@ const wa = {
|
|
|
2452
2464
|
leadFormName: "Ad",
|
|
2453
2465
|
leadFormEmail: "E-posta",
|
|
2454
2466
|
leadFormPhone: "Telefon",
|
|
2455
|
-
leadFormMessage: "Mesajınız"
|
|
2456
|
-
|
|
2467
|
+
leadFormMessage: "Mesajınız",
|
|
2468
|
+
poweredBy: "Destekleyen: {brand}"
|
|
2469
|
+
}, An = {
|
|
2457
2470
|
sendMessage: "Надіслати повідомлення",
|
|
2458
2471
|
send: "Надіслати",
|
|
2459
2472
|
close: "Закрити",
|
|
@@ -2495,8 +2508,9 @@ const wa = {
|
|
|
2495
2508
|
leadFormName: "Ім’я",
|
|
2496
2509
|
leadFormEmail: "Електронна пошта",
|
|
2497
2510
|
leadFormPhone: "Телефон",
|
|
2498
|
-
leadFormMessage: "Ваше повідомлення"
|
|
2499
|
-
|
|
2511
|
+
leadFormMessage: "Ваше повідомлення",
|
|
2512
|
+
poweredBy: "Працює на базі {brand}"
|
|
2513
|
+
}, Ln = {
|
|
2500
2514
|
sendMessage: "پیغام بھیجیں",
|
|
2501
2515
|
send: "بھیجیں",
|
|
2502
2516
|
close: "بند کریں",
|
|
@@ -2538,8 +2552,9 @@ const wa = {
|
|
|
2538
2552
|
leadFormName: "نام",
|
|
2539
2553
|
leadFormEmail: "ای میل",
|
|
2540
2554
|
leadFormPhone: "فون",
|
|
2541
|
-
leadFormMessage: "آپ کا پیغام"
|
|
2542
|
-
|
|
2555
|
+
leadFormMessage: "آپ کا پیغام",
|
|
2556
|
+
poweredBy: "بذریعہ {brand}"
|
|
2557
|
+
}, _n = {
|
|
2543
2558
|
sendMessage: "Gửi tin nhắn",
|
|
2544
2559
|
send: "Gửi",
|
|
2545
2560
|
close: "Đóng",
|
|
@@ -2581,8 +2596,9 @@ const wa = {
|
|
|
2581
2596
|
leadFormName: "Tên",
|
|
2582
2597
|
leadFormEmail: "Email",
|
|
2583
2598
|
leadFormPhone: "Điện thoại",
|
|
2584
|
-
leadFormMessage: "Tin nhắn của bạn"
|
|
2585
|
-
|
|
2599
|
+
leadFormMessage: "Tin nhắn của bạn",
|
|
2600
|
+
poweredBy: "Được cung cấp bởi {brand}"
|
|
2601
|
+
}, qn = {
|
|
2586
2602
|
sendMessage: "Anfon neges",
|
|
2587
2603
|
send: "Anfon",
|
|
2588
2604
|
close: "Cau",
|
|
@@ -2624,70 +2640,70 @@ const wa = {
|
|
|
2624
2640
|
leadFormName: "Enw",
|
|
2625
2641
|
leadFormEmail: "E-bost",
|
|
2626
2642
|
leadFormPhone: "Ffôn",
|
|
2627
|
-
leadFormMessage: "Eich neges"
|
|
2643
|
+
leadFormMessage: "Eich neges",
|
|
2644
|
+
poweredBy: "Wedi'i bweru gan {brand}"
|
|
2628
2645
|
}, $e = {
|
|
2629
|
-
af:
|
|
2646
|
+
af: Ma,
|
|
2630
2647
|
sq: Pa,
|
|
2631
|
-
ar: Ca,
|
|
2632
|
-
"ar-eg": La,
|
|
2648
|
+
"ar-eg": Ca,
|
|
2633
2649
|
"ar-sa": Aa,
|
|
2634
|
-
az:
|
|
2635
|
-
eu:
|
|
2636
|
-
be:
|
|
2637
|
-
bn:
|
|
2638
|
-
bs:
|
|
2639
|
-
bg:
|
|
2640
|
-
ca:
|
|
2641
|
-
zh:
|
|
2650
|
+
az: La,
|
|
2651
|
+
eu: _a,
|
|
2652
|
+
be: qa,
|
|
2653
|
+
bn: Ia,
|
|
2654
|
+
bs: Va,
|
|
2655
|
+
bg: Na,
|
|
2656
|
+
ca: ja,
|
|
2657
|
+
zh: Da,
|
|
2642
2658
|
hr: Ba,
|
|
2643
|
-
cs:
|
|
2644
|
-
da:
|
|
2645
|
-
nl:
|
|
2646
|
-
en:
|
|
2647
|
-
et:
|
|
2648
|
-
fi:
|
|
2649
|
-
fr:
|
|
2650
|
-
gl:
|
|
2651
|
-
de:
|
|
2652
|
-
el:
|
|
2653
|
-
gu:
|
|
2654
|
-
hi:
|
|
2655
|
-
hu:
|
|
2656
|
-
id:
|
|
2657
|
-
it:
|
|
2658
|
-
ja:
|
|
2659
|
-
kn:
|
|
2660
|
-
kk:
|
|
2661
|
-
ko:
|
|
2662
|
-
lv:
|
|
2663
|
-
lt,
|
|
2664
|
-
mk:
|
|
2665
|
-
ms:
|
|
2666
|
-
ml:
|
|
2667
|
-
mr:
|
|
2668
|
-
no:
|
|
2669
|
-
fa:
|
|
2670
|
-
pl:
|
|
2671
|
-
pt:
|
|
2672
|
-
pa:
|
|
2673
|
-
ro:
|
|
2674
|
-
ru:
|
|
2675
|
-
sr:
|
|
2676
|
-
sk:
|
|
2677
|
-
sl:
|
|
2678
|
-
es:
|
|
2679
|
-
sw:
|
|
2680
|
-
sv:
|
|
2681
|
-
tl:
|
|
2682
|
-
ta:
|
|
2683
|
-
te:
|
|
2684
|
-
th:
|
|
2685
|
-
tr:
|
|
2686
|
-
uk:
|
|
2687
|
-
ur:
|
|
2688
|
-
vi:
|
|
2689
|
-
cy:
|
|
2690
|
-
},
|
|
2659
|
+
cs: Ra,
|
|
2660
|
+
da: Ga,
|
|
2661
|
+
nl: Ua,
|
|
2662
|
+
en: Ka,
|
|
2663
|
+
et: Oa,
|
|
2664
|
+
fi: Ya,
|
|
2665
|
+
fr: Qa,
|
|
2666
|
+
gl: Ha,
|
|
2667
|
+
de: Wa,
|
|
2668
|
+
el: $a,
|
|
2669
|
+
gu: Za,
|
|
2670
|
+
hi: Ja,
|
|
2671
|
+
hu: Xa,
|
|
2672
|
+
id: en,
|
|
2673
|
+
it: an,
|
|
2674
|
+
ja: nn,
|
|
2675
|
+
kn: tn,
|
|
2676
|
+
kk: on,
|
|
2677
|
+
ko: rn,
|
|
2678
|
+
lv: sn,
|
|
2679
|
+
lt: ln,
|
|
2680
|
+
mk: cn,
|
|
2681
|
+
ms: dn,
|
|
2682
|
+
ml: un,
|
|
2683
|
+
mr: mn,
|
|
2684
|
+
no: hn,
|
|
2685
|
+
fa: gn,
|
|
2686
|
+
pl: pn,
|
|
2687
|
+
pt: bn,
|
|
2688
|
+
pa: fn,
|
|
2689
|
+
ro: kn,
|
|
2690
|
+
ru: vn,
|
|
2691
|
+
sr: yn,
|
|
2692
|
+
sk: Fn,
|
|
2693
|
+
sl: Tn,
|
|
2694
|
+
es: En,
|
|
2695
|
+
sw: zn,
|
|
2696
|
+
sv: wn,
|
|
2697
|
+
tl: Sn,
|
|
2698
|
+
ta: xn,
|
|
2699
|
+
te: Mn,
|
|
2700
|
+
th: Pn,
|
|
2701
|
+
tr: Cn,
|
|
2702
|
+
uk: An,
|
|
2703
|
+
ur: Ln,
|
|
2704
|
+
vi: _n,
|
|
2705
|
+
cy: qn
|
|
2706
|
+
}, Le = [
|
|
2691
2707
|
{ value: "af", label: "Afrikaans", dir: "ltr" },
|
|
2692
2708
|
{ value: "sq", label: "Shqip", dir: "ltr" },
|
|
2693
2709
|
{ value: "ar-eg", label: "العربية (مصر)", dir: "rtl" },
|
|
@@ -2748,18 +2764,18 @@ const wa = {
|
|
|
2748
2764
|
{ value: "ur", label: "اردو", dir: "rtl" },
|
|
2749
2765
|
{ value: "vi", label: "Tiếng Việt", dir: "ltr" },
|
|
2750
2766
|
{ value: "cy", label: "Cymraeg", dir: "ltr" }
|
|
2751
|
-
], Ze =
|
|
2767
|
+
], Ze = Le.map(
|
|
2752
2768
|
(a) => a.value
|
|
2753
2769
|
);
|
|
2754
2770
|
function Je(a) {
|
|
2755
|
-
return
|
|
2771
|
+
return Le.find((e) => e.value === a) || Le.find((e) => e.value === "en");
|
|
2756
2772
|
}
|
|
2757
|
-
function
|
|
2773
|
+
function E(a, e) {
|
|
2758
2774
|
return $e[a]?.[e] || $e.en[e] || e;
|
|
2759
2775
|
}
|
|
2760
2776
|
function ye(a, e = "en") {
|
|
2761
|
-
const
|
|
2762
|
-
return !
|
|
2777
|
+
const n = Array.isArray(a) ? a.filter((i) => Ze.includes(i)) : [];
|
|
2778
|
+
return !n.includes(e) && Ze.includes(e) && n.unshift(e), n.length ? [...new Set(n)] : ["ar-sa"];
|
|
2763
2779
|
}
|
|
2764
2780
|
const Xe = {
|
|
2765
2781
|
id: null,
|
|
@@ -2806,21 +2822,21 @@ const Xe = {
|
|
|
2806
2822
|
};
|
|
2807
2823
|
function ve(a) {
|
|
2808
2824
|
if (!a) return Xe;
|
|
2809
|
-
const e = a,
|
|
2825
|
+
const e = a, n = e.agent_type || e.agentType || de.TEXT, i = typeof e.use_text == "boolean" ? e.use_text : typeof e.useText == "boolean" ? e.useText : n !== de.VOICE, o = typeof e.use_voice == "boolean" ? e.use_voice : typeof e.useVoice == "boolean" ? e.useVoice : n === de.TEXT_AND_VOICE || n === de.CLOUD_AVATAR || n === de.DESKTOP_AVATAR, r = e.conversation || e.agent_customization?.conversation || {}, s = e.speech || e.agent_customization?.speech || {}, d = r.default_language || "ar-sa", l = ye(r.languages, d), c = e.widget || e.agent_customization?.widget || e.widget_customization || null, m = c?.appearance, u = c?.behavior, h = c, F = typeof m?.hide_branding == "boolean" ? !m.hide_branding : typeof m?.show_branding == "boolean" ? m.show_branding : !0, b = typeof m?.show_topbar_avatar_image == "boolean" ? m.show_topbar_avatar_image : typeof m?.showTopbarAvatarImage == "boolean" ? m.showTopbarAvatarImage : typeof c?.show_topbar_avatar_image == "boolean" ? c.show_topbar_avatar_image : typeof c?.showTopbarAvatarImage == "boolean" ? c.showTopbarAvatarImage : typeof e.show_topbar_avatar_image == "boolean" ? e.show_topbar_avatar_image : typeof e.showTopbarAvatarImage == "boolean" ? e.showTopbarAvatarImage : !0, x = u?.suggested_messages || c?.suggested_messages || r.suggested_messages || r.suggestedMessages || {}, w = typeof u?.default_open == "boolean" ? u.default_open : typeof u?.defaultOpen == "boolean" ? u.defaultOpen : typeof c?.default_open == "boolean" ? c.default_open : typeof c?.defaultOpen == "boolean" ? c.defaultOpen : typeof e.default_open == "boolean" ? e.default_open : typeof e.defaultOpen == "boolean" ? e.defaultOpen : !1, T = typeof m?.font == "string" ? m.font : typeof c?.font == "string" ? c.font : typeof e.font == "string" ? e.font : "Cairo", k = (() => {
|
|
2810
2826
|
const U = (T || "").trim().toLowerCase().replace(/[-_]/g, " ");
|
|
2811
2827
|
return U === "readex pro" || U === "readex" ? "Readex Pro" : U === "noto sans" || U === "noto" || U === "noto sans arabic" ? "Noto Sans" : "Cairo";
|
|
2812
|
-
})(), p =
|
|
2828
|
+
})(), p = c?.consent || e.consent || e.consent_config || null, g = typeof p?.enabled == "boolean" ? p.enabled : !1, M = typeof p?.one_time == "boolean" ? p.one_time : typeof p?.oneTime == "boolean" ? p.oneTime : !0, z = p?.content || p?.body || {}, f = u?.conversation_ended_screen, P = {
|
|
2813
2829
|
post_chat_rating_enabled: typeof f?.post_chat_rating_enabled == "boolean" ? f.post_chat_rating_enabled : typeof u?.post_chat_rating_enabled == "boolean" ? u.post_chat_rating_enabled : !1,
|
|
2814
2830
|
show_conversation_id: typeof f?.show_conversation_id == "boolean" ? f.show_conversation_id : typeof f?.showConversationId == "boolean" ? f.showConversationId : !0
|
|
2815
2831
|
}, C = u?.welcome_bubble, _ = {
|
|
2816
2832
|
enabled: typeof C?.enabled == "boolean" ? C.enabled : !1,
|
|
2817
2833
|
delay_seconds: typeof C?.delay_seconds == "number" ? C.delay_seconds : 3,
|
|
2818
2834
|
sound_enabled: typeof C?.sound_enabled == "boolean" ? C.sound_enabled : !1
|
|
2819
|
-
},
|
|
2820
|
-
mode:
|
|
2821
|
-
accent_color: typeof
|
|
2822
|
-
end_call_button_color: typeof
|
|
2823
|
-
},
|
|
2835
|
+
}, S = m?.theme, j = {
|
|
2836
|
+
mode: S?.mode === "light" ? "light" : "dark",
|
|
2837
|
+
accent_color: typeof S?.accent_color == "string" ? S.accent_color : null,
|
|
2838
|
+
end_call_button_color: typeof S?.end_call_button_color == "string" ? S.end_call_button_color : null
|
|
2839
|
+
}, B = h ? {
|
|
2824
2840
|
appearance: {
|
|
2825
2841
|
position: m?.position || "right",
|
|
2826
2842
|
show_branding: F,
|
|
@@ -2830,24 +2846,24 @@ function ve(a) {
|
|
|
2830
2846
|
theme: j
|
|
2831
2847
|
},
|
|
2832
2848
|
behavior: {
|
|
2833
|
-
default_open:
|
|
2849
|
+
default_open: w,
|
|
2834
2850
|
conversation_ended_screen: P,
|
|
2835
2851
|
welcome_bubble: _,
|
|
2836
2852
|
typing_indicator_enabled: typeof u?.typing_indicator_enabled == "boolean" ? u.typing_indicator_enabled : !0,
|
|
2837
|
-
suggested_messages:
|
|
2853
|
+
suggested_messages: x
|
|
2838
2854
|
},
|
|
2839
2855
|
consent: {
|
|
2840
2856
|
enabled: g,
|
|
2841
|
-
one_time:
|
|
2842
|
-
content:
|
|
2857
|
+
one_time: M,
|
|
2858
|
+
content: z
|
|
2843
2859
|
}
|
|
2844
|
-
} : void 0, D = e.consent || e.consent_config || null,
|
|
2845
|
-
Object.entries(
|
|
2846
|
-
), N = typeof e.allow_interrupt == "boolean" ? e.allow_interrupt : typeof
|
|
2860
|
+
} : void 0, D = e.consent || e.consent_config || null, A = r.welcome_message || r.welcomeMessage || e.welcome_message || e.welcomeMessage || {}, G = Object.fromEntries(
|
|
2861
|
+
Object.entries(A).filter(([, U]) => typeof U == "string").map(([U, J]) => [U, J.slice(0, 1e3)])
|
|
2862
|
+
), N = typeof e.allow_interrupt == "boolean" ? e.allow_interrupt : typeof s.allow_interrupt == "boolean" ? s.allow_interrupt : !0, Y = typeof e.allow_welcome_message_interrupt == "boolean" ? e.allow_welcome_message_interrupt : typeof s.allow_welcome_message_interrupt == "boolean" ? s.allow_welcome_message_interrupt : !1, O = (typeof e.face_image == "string" ? e.face_image : null) || (typeof e.faceImage == "string" ? e.faceImage : null) || null;
|
|
2847
2863
|
return {
|
|
2848
2864
|
id: e.id || null,
|
|
2849
2865
|
name: e.name || Xe.name,
|
|
2850
|
-
agentType:
|
|
2866
|
+
agentType: n,
|
|
2851
2867
|
useText: i,
|
|
2852
2868
|
useVoice: o,
|
|
2853
2869
|
faceImage: O,
|
|
@@ -2855,13 +2871,13 @@ function ve(a) {
|
|
|
2855
2871
|
allowWelcomeMessageInterrupt: Y,
|
|
2856
2872
|
welcomeMessages: G,
|
|
2857
2873
|
languages: l,
|
|
2858
|
-
defaultLanguage: l.includes(
|
|
2874
|
+
defaultLanguage: l.includes(d) ? d : l[0],
|
|
2859
2875
|
conversation: {
|
|
2860
|
-
default_language:
|
|
2876
|
+
default_language: d,
|
|
2861
2877
|
languages: l,
|
|
2862
|
-
suggested_messages:
|
|
2878
|
+
suggested_messages: x
|
|
2863
2879
|
},
|
|
2864
|
-
widget:
|
|
2880
|
+
widget: B || void 0,
|
|
2865
2881
|
consent: D ? {
|
|
2866
2882
|
enabled: D.enabled ?? !1,
|
|
2867
2883
|
title: D.title || void 0,
|
|
@@ -2873,10 +2889,10 @@ function ve(a) {
|
|
|
2873
2889
|
} : void 0
|
|
2874
2890
|
};
|
|
2875
2891
|
}
|
|
2876
|
-
async function
|
|
2892
|
+
async function In({
|
|
2877
2893
|
restUrl: a,
|
|
2878
2894
|
identifier: e,
|
|
2879
|
-
withCredentials:
|
|
2895
|
+
withCredentials: n = !1,
|
|
2880
2896
|
signal: i
|
|
2881
2897
|
}) {
|
|
2882
2898
|
if (!a) throw new Error("Missing restUrl");
|
|
@@ -2884,7 +2900,7 @@ async function It({
|
|
|
2884
2900
|
const o = await fetch(`${a}/agent/${e}/customization`, {
|
|
2885
2901
|
method: "GET",
|
|
2886
2902
|
mode: "cors",
|
|
2887
|
-
credentials:
|
|
2903
|
+
credentials: n ? "include" : "omit",
|
|
2888
2904
|
headers: {
|
|
2889
2905
|
Accept: "application/json"
|
|
2890
2906
|
},
|
|
@@ -2892,27 +2908,27 @@ async function It({
|
|
|
2892
2908
|
});
|
|
2893
2909
|
if (!o.ok)
|
|
2894
2910
|
throw new Error(`Failed to load agent customization: ${o.status}`);
|
|
2895
|
-
const
|
|
2911
|
+
const r = await o.json();
|
|
2896
2912
|
return ve({
|
|
2897
|
-
id:
|
|
2898
|
-
name:
|
|
2899
|
-
company_name:
|
|
2900
|
-
agent_type:
|
|
2901
|
-
use_voice:
|
|
2902
|
-
use_text:
|
|
2903
|
-
face_image:
|
|
2904
|
-
conversation:
|
|
2905
|
-
widget:
|
|
2906
|
-
allow_interrupt:
|
|
2907
|
-
allow_welcome_message_interrupt:
|
|
2908
|
-
welcome_message:
|
|
2913
|
+
id: r.id,
|
|
2914
|
+
name: r.name,
|
|
2915
|
+
company_name: r.company_name,
|
|
2916
|
+
agent_type: r.agent_type,
|
|
2917
|
+
use_voice: r.use_voice,
|
|
2918
|
+
use_text: r.use_text,
|
|
2919
|
+
face_image: r.face_image,
|
|
2920
|
+
conversation: r.conversation,
|
|
2921
|
+
widget: r.widget,
|
|
2922
|
+
allow_interrupt: r.allow_interrupt,
|
|
2923
|
+
allow_welcome_message_interrupt: r.allow_welcome_message_interrupt,
|
|
2924
|
+
welcome_message: r.welcome_message
|
|
2909
2925
|
});
|
|
2910
2926
|
}
|
|
2911
|
-
async function
|
|
2927
|
+
async function si({ restUrl: a, apiKey: e, agentId: n, signal: i }) {
|
|
2912
2928
|
if (!a) throw new Error("Missing restUrl");
|
|
2913
|
-
const o = e ||
|
|
2929
|
+
const o = e || n;
|
|
2914
2930
|
if (!o) throw new Error("Provide one of apiKey or agentId");
|
|
2915
|
-
const
|
|
2931
|
+
const r = await fetch(`${a}/agent/${o}`, {
|
|
2916
2932
|
method: "GET",
|
|
2917
2933
|
mode: "cors",
|
|
2918
2934
|
credentials: "omit",
|
|
@@ -2921,21 +2937,21 @@ async function li({ restUrl: a, apiKey: e, agentId: t, signal: i }) {
|
|
|
2921
2937
|
},
|
|
2922
2938
|
signal: i
|
|
2923
2939
|
});
|
|
2924
|
-
if (!
|
|
2925
|
-
let
|
|
2940
|
+
if (!r.ok) {
|
|
2941
|
+
let s = `HTTP ${r.status}`;
|
|
2926
2942
|
try {
|
|
2927
|
-
const l = await
|
|
2928
|
-
|
|
2943
|
+
const l = await r.json();
|
|
2944
|
+
s = l?.detail || l?.message || s;
|
|
2929
2945
|
} catch {
|
|
2930
2946
|
}
|
|
2931
|
-
throw new Error(
|
|
2947
|
+
throw new Error(s);
|
|
2932
2948
|
}
|
|
2933
|
-
return ve(await
|
|
2949
|
+
return ve(await r.json());
|
|
2934
2950
|
}
|
|
2935
|
-
function
|
|
2951
|
+
function Vn(a, e) {
|
|
2936
2952
|
if (!e) return a;
|
|
2937
|
-
let { useVoice:
|
|
2938
|
-
return typeof e.use_voice == "boolean" && (
|
|
2953
|
+
let { useVoice: n, useText: i } = a;
|
|
2954
|
+
return typeof e.use_voice == "boolean" && (n = e.use_voice), typeof e.use_text == "boolean" && (i = e.use_text), n === a.useVoice && i === a.useText ? a : { ...a, useVoice: n, useText: i };
|
|
2939
2955
|
}
|
|
2940
2956
|
function Ee(a) {
|
|
2941
2957
|
return a.agentType === de.CLOUD_AVATAR || a.agentType === de.DESKTOP_AVATAR ? "avatar" : a.useText && a.useVoice ? "text_and_voice" : a.useVoice ? "voice" : "text";
|
|
@@ -2946,23 +2962,23 @@ function Ee(a) {
|
|
|
2946
2962
|
* This source code is licensed under the ISC license.
|
|
2947
2963
|
* See the LICENSE file in the root directory of this source tree.
|
|
2948
2964
|
*/
|
|
2949
|
-
const ca = (...a) => a.filter((e,
|
|
2965
|
+
const ca = (...a) => a.filter((e, n, i) => !!e && e.trim() !== "" && i.indexOf(e) === n).join(" ").trim();
|
|
2950
2966
|
/**
|
|
2951
2967
|
* @license lucide-react v1.24.0 - ISC
|
|
2952
2968
|
*
|
|
2953
2969
|
* This source code is licensed under the ISC license.
|
|
2954
2970
|
* See the LICENSE file in the root directory of this source tree.
|
|
2955
2971
|
*/
|
|
2956
|
-
const
|
|
2972
|
+
const Nn = (a) => a.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2957
2973
|
/**
|
|
2958
2974
|
* @license lucide-react v1.24.0 - ISC
|
|
2959
2975
|
*
|
|
2960
2976
|
* This source code is licensed under the ISC license.
|
|
2961
2977
|
* See the LICENSE file in the root directory of this source tree.
|
|
2962
2978
|
*/
|
|
2963
|
-
const
|
|
2979
|
+
const jn = (a) => a.replace(
|
|
2964
2980
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2965
|
-
(e,
|
|
2981
|
+
(e, n, i) => i ? i.toUpperCase() : n.toLowerCase()
|
|
2966
2982
|
);
|
|
2967
2983
|
/**
|
|
2968
2984
|
* @license lucide-react v1.24.0 - ISC
|
|
@@ -2971,7 +2987,7 @@ const jt = (a) => a.replace(
|
|
|
2971
2987
|
* See the LICENSE file in the root directory of this source tree.
|
|
2972
2988
|
*/
|
|
2973
2989
|
const ea = (a) => {
|
|
2974
|
-
const e =
|
|
2990
|
+
const e = jn(a);
|
|
2975
2991
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2976
2992
|
};
|
|
2977
2993
|
/**
|
|
@@ -2997,36 +3013,36 @@ var Ce = {
|
|
|
2997
3013
|
* This source code is licensed under the ISC license.
|
|
2998
3014
|
* See the LICENSE file in the root directory of this source tree.
|
|
2999
3015
|
*/
|
|
3000
|
-
const
|
|
3016
|
+
const Dn = (a) => {
|
|
3001
3017
|
for (const e in a)
|
|
3002
3018
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
3003
3019
|
return !0;
|
|
3004
3020
|
return !1;
|
|
3005
|
-
},
|
|
3006
|
-
({ color: a, size: e, strokeWidth:
|
|
3021
|
+
}, Bn = xa({}), Rn = () => Sa(Bn), Gn = la(
|
|
3022
|
+
({ color: a, size: e, strokeWidth: n, absoluteStrokeWidth: i, className: o = "", children: r, iconNode: s, ...d }, l) => {
|
|
3007
3023
|
const {
|
|
3008
|
-
size:
|
|
3024
|
+
size: c = 24,
|
|
3009
3025
|
strokeWidth: m = 2,
|
|
3010
3026
|
absoluteStrokeWidth: u = !1,
|
|
3011
3027
|
color: h = "currentColor",
|
|
3012
3028
|
className: F = ""
|
|
3013
|
-
} =
|
|
3014
|
-
return
|
|
3029
|
+
} = Rn() ?? {}, b = i ?? u ? Number(n ?? m) * 24 / Number(e ?? c) : n ?? m;
|
|
3030
|
+
return Ae(
|
|
3015
3031
|
"svg",
|
|
3016
3032
|
{
|
|
3017
3033
|
ref: l,
|
|
3018
3034
|
...Ce,
|
|
3019
|
-
width: e ??
|
|
3020
|
-
height: e ??
|
|
3035
|
+
width: e ?? c ?? Ce.width,
|
|
3036
|
+
height: e ?? c ?? Ce.height,
|
|
3021
3037
|
stroke: a ?? h,
|
|
3022
3038
|
strokeWidth: b,
|
|
3023
3039
|
className: ca("lucide", F, o),
|
|
3024
|
-
...!
|
|
3025
|
-
...
|
|
3040
|
+
...!r && !Dn(d) && { "aria-hidden": "true" },
|
|
3041
|
+
...d
|
|
3026
3042
|
},
|
|
3027
3043
|
[
|
|
3028
|
-
...
|
|
3029
|
-
...Array.isArray(
|
|
3044
|
+
...s.map(([x, w]) => Ae(x, w)),
|
|
3045
|
+
...Array.isArray(r) ? r : [r]
|
|
3030
3046
|
]
|
|
3031
3047
|
);
|
|
3032
3048
|
}
|
|
@@ -3038,19 +3054,19 @@ const Dt = (a) => {
|
|
|
3038
3054
|
* See the LICENSE file in the root directory of this source tree.
|
|
3039
3055
|
*/
|
|
3040
3056
|
const H = (a, e) => {
|
|
3041
|
-
const
|
|
3042
|
-
({ className: i, ...o },
|
|
3043
|
-
ref:
|
|
3057
|
+
const n = la(
|
|
3058
|
+
({ className: i, ...o }, r) => Ae(Gn, {
|
|
3059
|
+
ref: r,
|
|
3044
3060
|
iconNode: e,
|
|
3045
3061
|
className: ca(
|
|
3046
|
-
`lucide-${
|
|
3062
|
+
`lucide-${Nn(ea(a))}`,
|
|
3047
3063
|
`lucide-${a}`,
|
|
3048
3064
|
i
|
|
3049
3065
|
),
|
|
3050
3066
|
...o
|
|
3051
3067
|
})
|
|
3052
3068
|
);
|
|
3053
|
-
return
|
|
3069
|
+
return n.displayName = ea(a), n;
|
|
3054
3070
|
};
|
|
3055
3071
|
/**
|
|
3056
3072
|
* @license lucide-react v1.24.0 - ISC
|
|
@@ -3058,94 +3074,94 @@ const H = (a, e) => {
|
|
|
3058
3074
|
* This source code is licensed under the ISC license.
|
|
3059
3075
|
* See the LICENSE file in the root directory of this source tree.
|
|
3060
3076
|
*/
|
|
3061
|
-
const
|
|
3077
|
+
const Un = [
|
|
3062
3078
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
3063
3079
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
3064
|
-
],
|
|
3080
|
+
], Kn = H("arrow-up", Un);
|
|
3065
3081
|
/**
|
|
3066
3082
|
* @license lucide-react v1.24.0 - ISC
|
|
3067
3083
|
*
|
|
3068
3084
|
* This source code is licensed under the ISC license.
|
|
3069
3085
|
* See the LICENSE file in the root directory of this source tree.
|
|
3070
3086
|
*/
|
|
3071
|
-
const
|
|
3087
|
+
const On = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Yn = H("chevron-left", On);
|
|
3072
3088
|
/**
|
|
3073
3089
|
* @license lucide-react v1.24.0 - ISC
|
|
3074
3090
|
*
|
|
3075
3091
|
* This source code is licensed under the ISC license.
|
|
3076
3092
|
* See the LICENSE file in the root directory of this source tree.
|
|
3077
3093
|
*/
|
|
3078
|
-
const
|
|
3094
|
+
const Qn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], da = H("chevron-down", Qn);
|
|
3079
3095
|
/**
|
|
3080
3096
|
* @license lucide-react v1.24.0 - ISC
|
|
3081
3097
|
*
|
|
3082
3098
|
* This source code is licensed under the ISC license.
|
|
3083
3099
|
* See the LICENSE file in the root directory of this source tree.
|
|
3084
3100
|
*/
|
|
3085
|
-
const
|
|
3101
|
+
const Hn = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Wn = H("chevron-up", Hn);
|
|
3086
3102
|
/**
|
|
3087
3103
|
* @license lucide-react v1.24.0 - ISC
|
|
3088
3104
|
*
|
|
3089
3105
|
* This source code is licensed under the ISC license.
|
|
3090
3106
|
* See the LICENSE file in the root directory of this source tree.
|
|
3091
3107
|
*/
|
|
3092
|
-
const $
|
|
3108
|
+
const $n = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ze = H("loader-circle", $n);
|
|
3093
3109
|
/**
|
|
3094
3110
|
* @license lucide-react v1.24.0 - ISC
|
|
3095
3111
|
*
|
|
3096
3112
|
* This source code is licensed under the ISC license.
|
|
3097
3113
|
* See the LICENSE file in the root directory of this source tree.
|
|
3098
3114
|
*/
|
|
3099
|
-
const
|
|
3115
|
+
const Zn = [
|
|
3100
3116
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
3101
3117
|
["path", { d: "m21 3-7 7", key: "1l2asr" }],
|
|
3102
3118
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
3103
3119
|
["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
|
|
3104
|
-
],
|
|
3120
|
+
], Jn = H("maximize-2", Zn);
|
|
3105
3121
|
/**
|
|
3106
3122
|
* @license lucide-react v1.24.0 - ISC
|
|
3107
3123
|
*
|
|
3108
3124
|
* This source code is licensed under the ISC license.
|
|
3109
3125
|
* See the LICENSE file in the root directory of this source tree.
|
|
3110
3126
|
*/
|
|
3111
|
-
const
|
|
3127
|
+
const Xn = [
|
|
3112
3128
|
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
3113
3129
|
["path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33", key: "1gzdoj" }],
|
|
3114
3130
|
["path", { d: "M16.95 16.95A7 7 0 0 1 5 12v-2", key: "cqa7eg" }],
|
|
3115
3131
|
["path", { d: "M18.89 13.23A7 7 0 0 0 19 12v-2", key: "16hl24" }],
|
|
3116
3132
|
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
3117
3133
|
["path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12", key: "r2i35w" }]
|
|
3118
|
-
], Ve = H("mic-off",
|
|
3134
|
+
], Ve = H("mic-off", Xn);
|
|
3119
3135
|
/**
|
|
3120
3136
|
* @license lucide-react v1.24.0 - ISC
|
|
3121
3137
|
*
|
|
3122
3138
|
* This source code is licensed under the ISC license.
|
|
3123
3139
|
* See the LICENSE file in the root directory of this source tree.
|
|
3124
3140
|
*/
|
|
3125
|
-
const
|
|
3141
|
+
const et = [
|
|
3126
3142
|
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
3127
3143
|
["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
|
|
3128
3144
|
["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
|
|
3129
|
-
],
|
|
3145
|
+
], we = H("mic", et);
|
|
3130
3146
|
/**
|
|
3131
3147
|
* @license lucide-react v1.24.0 - ISC
|
|
3132
3148
|
*
|
|
3133
3149
|
* This source code is licensed under the ISC license.
|
|
3134
3150
|
* See the LICENSE file in the root directory of this source tree.
|
|
3135
3151
|
*/
|
|
3136
|
-
const
|
|
3152
|
+
const at = [
|
|
3137
3153
|
["path", { d: "m14 10 7-7", key: "oa77jy" }],
|
|
3138
3154
|
["path", { d: "M20 10h-6V4", key: "mjg0md" }],
|
|
3139
3155
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
3140
3156
|
["path", { d: "M4 14h6v6", key: "rmj7iw" }]
|
|
3141
|
-
],
|
|
3157
|
+
], Se = H("minimize-2", at);
|
|
3142
3158
|
/**
|
|
3143
3159
|
* @license lucide-react v1.24.0 - ISC
|
|
3144
3160
|
*
|
|
3145
3161
|
* This source code is licensed under the ISC license.
|
|
3146
3162
|
* See the LICENSE file in the root directory of this source tree.
|
|
3147
3163
|
*/
|
|
3148
|
-
const
|
|
3164
|
+
const nt = [
|
|
3149
3165
|
[
|
|
3150
3166
|
"path",
|
|
3151
3167
|
{
|
|
@@ -3161,14 +3177,14 @@ const tn = [
|
|
|
3161
3177
|
key: "10hv5p"
|
|
3162
3178
|
}
|
|
3163
3179
|
]
|
|
3164
|
-
], Ne = H("phone-off",
|
|
3180
|
+
], Ne = H("phone-off", nt);
|
|
3165
3181
|
/**
|
|
3166
3182
|
* @license lucide-react v1.24.0 - ISC
|
|
3167
3183
|
*
|
|
3168
3184
|
* This source code is licensed under the ISC license.
|
|
3169
3185
|
* See the LICENSE file in the root directory of this source tree.
|
|
3170
3186
|
*/
|
|
3171
|
-
const
|
|
3187
|
+
const tt = [
|
|
3172
3188
|
[
|
|
3173
3189
|
"path",
|
|
3174
3190
|
{
|
|
@@ -3176,24 +3192,24 @@ const nn = [
|
|
|
3176
3192
|
key: "9njp5v"
|
|
3177
3193
|
}
|
|
3178
3194
|
]
|
|
3179
|
-
], je = H("phone",
|
|
3195
|
+
], je = H("phone", tt);
|
|
3180
3196
|
/**
|
|
3181
3197
|
* @license lucide-react v1.24.0 - ISC
|
|
3182
3198
|
*
|
|
3183
3199
|
* This source code is licensed under the ISC license.
|
|
3184
3200
|
* See the LICENSE file in the root directory of this source tree.
|
|
3185
3201
|
*/
|
|
3186
|
-
const
|
|
3202
|
+
const it = [
|
|
3187
3203
|
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
3188
3204
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
3189
|
-
],
|
|
3205
|
+
], ot = H("rotate-ccw", it);
|
|
3190
3206
|
/**
|
|
3191
3207
|
* @license lucide-react v1.24.0 - ISC
|
|
3192
3208
|
*
|
|
3193
3209
|
* This source code is licensed under the ISC license.
|
|
3194
3210
|
* See the LICENSE file in the root directory of this source tree.
|
|
3195
3211
|
*/
|
|
3196
|
-
const
|
|
3212
|
+
const rt = [
|
|
3197
3213
|
[
|
|
3198
3214
|
"path",
|
|
3199
3215
|
{
|
|
@@ -3201,43 +3217,43 @@ const rn = [
|
|
|
3201
3217
|
key: "r04s7s"
|
|
3202
3218
|
}
|
|
3203
3219
|
]
|
|
3204
|
-
],
|
|
3220
|
+
], st = H("star", rt);
|
|
3205
3221
|
/**
|
|
3206
3222
|
* @license lucide-react v1.24.0 - ISC
|
|
3207
3223
|
*
|
|
3208
3224
|
* This source code is licensed under the ISC license.
|
|
3209
3225
|
* See the LICENSE file in the root directory of this source tree.
|
|
3210
3226
|
*/
|
|
3211
|
-
const
|
|
3227
|
+
const lt = [
|
|
3212
3228
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
3213
3229
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
3214
|
-
], De = H("x",
|
|
3215
|
-
},
|
|
3230
|
+
], De = H("x", lt), re = () => {
|
|
3231
|
+
}, ct = 767;
|
|
3216
3232
|
function _e() {
|
|
3217
|
-
return typeof window < "u" && window.innerWidth <=
|
|
3233
|
+
return typeof window < "u" && window.innerWidth <= ct;
|
|
3218
3234
|
}
|
|
3219
3235
|
function V(...a) {
|
|
3220
3236
|
return a.filter(Boolean).join(" ");
|
|
3221
3237
|
}
|
|
3222
|
-
function
|
|
3238
|
+
function dt(a) {
|
|
3223
3239
|
const e = (a || "").trim().toLowerCase().replace(/[-_]/g, " ");
|
|
3224
3240
|
return e === "readex pro" || e === "readex" ? "'Readex Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" : e === "noto sans" || e === "noto" || e === "noto sans arabic" ? "'Noto Sans', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif" : "'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif";
|
|
3225
3241
|
}
|
|
3226
3242
|
function aa(a) {
|
|
3227
3243
|
if (!a) return "#ffffff";
|
|
3228
3244
|
const e = a.replace("#", "").trim();
|
|
3229
|
-
let
|
|
3230
|
-
if (e.length === 3 && (
|
|
3231
|
-
const i = parseInt(
|
|
3232
|
-
return Number.isNaN(i) || Number.isNaN(o) || Number.isNaN(
|
|
3245
|
+
let n = e;
|
|
3246
|
+
if (e.length === 3 && (n = e.split("").map((d) => d + d).join("")), n.length < 6) return "#ffffff";
|
|
3247
|
+
const i = parseInt(n.substring(0, 2), 16), o = parseInt(n.substring(2, 4), 16), r = parseInt(n.substring(4, 6), 16);
|
|
3248
|
+
return Number.isNaN(i) || Number.isNaN(o) || Number.isNaN(r) ? "#ffffff" : (i * 299 + o * 587 + r * 114) / 1e3 >= 128 ? "#000000" : "#ffffff";
|
|
3233
3249
|
}
|
|
3234
|
-
function
|
|
3250
|
+
function Be(a) {
|
|
3235
3251
|
const e = {
|
|
3236
|
-
"--rqmii-font-family":
|
|
3237
|
-
},
|
|
3238
|
-
if (
|
|
3239
|
-
const o = aa(
|
|
3240
|
-
e["--rqmii-accent"] =
|
|
3252
|
+
"--rqmii-font-family": dt(a?.font)
|
|
3253
|
+
}, n = a?.theme?.accent_color?.trim();
|
|
3254
|
+
if (n) {
|
|
3255
|
+
const o = aa(n);
|
|
3256
|
+
e["--rqmii-accent"] = n, e["--rqmii-accent-text"] = o, e["--rqmii-message-user"] = n, e["--rqmii-message-user-text"] = o;
|
|
3241
3257
|
}
|
|
3242
3258
|
const i = a?.theme?.end_call_button_color?.trim();
|
|
3243
3259
|
if (i) {
|
|
@@ -3246,13 +3262,13 @@ function Re(a) {
|
|
|
3246
3262
|
}
|
|
3247
3263
|
return e;
|
|
3248
3264
|
}
|
|
3249
|
-
function
|
|
3265
|
+
function ut(a) {
|
|
3250
3266
|
const e = (a || "").trim().toLowerCase().replace(/[-_]/g, " ");
|
|
3251
3267
|
return e === "readex pro" || e === "readex" ? "https://fonts.googleapis.com/css2?family=Readex+Pro:wght@400;500;600;700&display=swap" : e === "noto sans" || e === "noto" || e === "noto sans arabic" ? "https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@400;500;600;700&display=swap" : "https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap";
|
|
3252
3268
|
}
|
|
3253
3269
|
function ua(a) {
|
|
3254
3270
|
if (typeof document > "u") return;
|
|
3255
|
-
const e =
|
|
3271
|
+
const e = ut(a);
|
|
3256
3272
|
if (document.querySelector(`link[data-rqmii-font="${e}"]`)) return;
|
|
3257
3273
|
const i = document.createElement("link");
|
|
3258
3274
|
i.rel = "stylesheet", i.href = e, i.setAttribute("data-rqmii-font", e), document.head.appendChild(i);
|
|
@@ -3260,195 +3276,208 @@ function ua(a) {
|
|
|
3260
3276
|
function Z(a) {
|
|
3261
3277
|
return "";
|
|
3262
3278
|
}
|
|
3263
|
-
function
|
|
3279
|
+
function oe(a) {
|
|
3264
3280
|
return a.startsWith("ar") || ["fa", "ur", "he"].includes(a) ? "rtl" : "ltr";
|
|
3265
3281
|
}
|
|
3266
|
-
function
|
|
3267
|
-
const e = Math.floor(a / 60).toString().padStart(2, "0"),
|
|
3268
|
-
return `${e}:${
|
|
3282
|
+
function Re(a) {
|
|
3283
|
+
const e = Math.floor(a / 60).toString().padStart(2, "0"), n = (a % 60).toString().padStart(2, "0");
|
|
3284
|
+
return `${e}:${n}`;
|
|
3269
3285
|
}
|
|
3270
|
-
function
|
|
3271
|
-
const [e,
|
|
3286
|
+
function mt(a = !0) {
|
|
3287
|
+
const [e, n] = y(0);
|
|
3272
3288
|
return I(() => {
|
|
3273
3289
|
if (!a) return;
|
|
3274
|
-
const i = setInterval(() =>
|
|
3290
|
+
const i = setInterval(() => n((o) => o + 1), 1e3);
|
|
3275
3291
|
return () => clearInterval(i);
|
|
3276
3292
|
}, [a]), e;
|
|
3277
3293
|
}
|
|
3278
|
-
function
|
|
3294
|
+
function ht() {
|
|
3279
3295
|
const [a, e] = y(null);
|
|
3280
3296
|
return I(() => {
|
|
3281
|
-
const
|
|
3282
|
-
if (!
|
|
3283
|
-
const i = () => e(
|
|
3284
|
-
return i(),
|
|
3285
|
-
|
|
3297
|
+
const n = window.visualViewport;
|
|
3298
|
+
if (!n) return;
|
|
3299
|
+
const i = () => e(n.height);
|
|
3300
|
+
return i(), n.addEventListener("resize", i), n.addEventListener("scroll", i), () => {
|
|
3301
|
+
n.removeEventListener("resize", i), n.removeEventListener("scroll", i);
|
|
3286
3302
|
};
|
|
3287
3303
|
}, []), a;
|
|
3288
3304
|
}
|
|
3289
|
-
function
|
|
3290
|
-
const
|
|
3291
|
-
|
|
3305
|
+
function gt(a, e) {
|
|
3306
|
+
const n = R([]);
|
|
3307
|
+
n.current = a.match(/\S+\s*/g) || [a];
|
|
3292
3308
|
const [i, o] = y(
|
|
3293
|
-
() => e ? Math.min(1,
|
|
3309
|
+
() => e ? Math.min(1, n.current.length) : n.current.length
|
|
3294
3310
|
);
|
|
3295
3311
|
return I(() => {
|
|
3296
3312
|
if (!e || !a) {
|
|
3297
|
-
o(
|
|
3313
|
+
o(n.current.length);
|
|
3298
3314
|
return;
|
|
3299
3315
|
}
|
|
3300
|
-
if (o((
|
|
3301
|
-
const
|
|
3302
|
-
o((
|
|
3316
|
+
if (o((s) => Math.max(1, s)), n.current.length <= 1) return;
|
|
3317
|
+
const r = setInterval(() => {
|
|
3318
|
+
o((s) => s >= n.current.length ? (clearInterval(r), s) : s + 1);
|
|
3303
3319
|
}, 50);
|
|
3304
|
-
return () => clearInterval(
|
|
3305
|
-
}, [a, e]),
|
|
3320
|
+
return () => clearInterval(r);
|
|
3321
|
+
}, [a, e]), n.current.slice(0, i).join("");
|
|
3306
3322
|
}
|
|
3307
|
-
const
|
|
3308
|
-
const [o,
|
|
3323
|
+
const pt = L.lazy(() => import("./Orb-BLYExpBk.js").then((a) => ({ default: a.RqmiiOrb }))), Ge = L.memo(function({ language: e, languages: n, onChange: i }) {
|
|
3324
|
+
const [o, r] = y(!1), s = R(null), d = Je(e), l = ye(n, e).map((c) => Je(c)).filter(Boolean);
|
|
3309
3325
|
return I(() => {
|
|
3310
3326
|
if (!o) return;
|
|
3311
|
-
const
|
|
3312
|
-
|
|
3327
|
+
const c = (m) => {
|
|
3328
|
+
s.current?.contains(m.target) || r(!1);
|
|
3313
3329
|
};
|
|
3314
|
-
return document.addEventListener("mousedown",
|
|
3315
|
-
}, [o]), /* @__PURE__ */ v("div", { className: "rqmii-chat-language", ref:
|
|
3316
|
-
/* @__PURE__ */ v("button", { type: "button", className: "rqmii-chat-pill", onClick: () =>
|
|
3317
|
-
/* @__PURE__ */
|
|
3318
|
-
/* @__PURE__ */
|
|
3330
|
+
return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
|
|
3331
|
+
}, [o]), /* @__PURE__ */ v("div", { className: "rqmii-chat-language", ref: s, children: [
|
|
3332
|
+
/* @__PURE__ */ v("button", { type: "button", className: "rqmii-chat-pill", onClick: () => r((c) => !c), children: [
|
|
3333
|
+
/* @__PURE__ */ t("span", { children: d?.label || e }),
|
|
3334
|
+
/* @__PURE__ */ t(da, { size: 16 })
|
|
3319
3335
|
] }),
|
|
3320
|
-
o && l.length > 1 && /* @__PURE__ */
|
|
3336
|
+
o && l.length > 1 && /* @__PURE__ */ t("div", { className: "rqmii-chat-language-menu", children: l.map((c) => /* @__PURE__ */ t(
|
|
3321
3337
|
"button",
|
|
3322
3338
|
{
|
|
3323
3339
|
type: "button",
|
|
3324
|
-
className: V("rqmii-chat-language-item",
|
|
3340
|
+
className: V("rqmii-chat-language-item", c.value === e && "is-selected"),
|
|
3325
3341
|
onClick: () => {
|
|
3326
|
-
i(
|
|
3342
|
+
i(c.value), r(!1);
|
|
3327
3343
|
},
|
|
3328
|
-
children:
|
|
3344
|
+
children: c.label
|
|
3329
3345
|
},
|
|
3330
|
-
|
|
3346
|
+
c.value
|
|
3331
3347
|
)) })
|
|
3332
3348
|
] });
|
|
3333
|
-
}), ue =
|
|
3334
|
-
const o = i?.widget?.appearance,
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3349
|
+
}), ue = L.memo(function({ language: e = "en", brand: n = "rqmii", agent: i }) {
|
|
3350
|
+
const o = i?.widget?.appearance, r = o?.show_branding !== !1, s = o?.footer_content?.[e], d = !!s?.trim();
|
|
3351
|
+
if (!r && !d) return /* @__PURE__ */ t("div", { style: { padding: 11 } });
|
|
3352
|
+
const l = E(e, "poweredBy"), c = oe(e);
|
|
3353
|
+
return /* @__PURE__ */ v("div", { className: "rqmii-chat-footer", dir: c, children: [
|
|
3354
|
+
r && (() => {
|
|
3355
|
+
if (l.includes("{brand}")) {
|
|
3356
|
+
const u = l.split("{brand}");
|
|
3357
|
+
return /* @__PURE__ */ v("p", { dir: c, children: [
|
|
3358
|
+
u[0],
|
|
3359
|
+
/* @__PURE__ */ t("strong", { children: n }),
|
|
3360
|
+
u[1]
|
|
3361
|
+
] });
|
|
3362
|
+
}
|
|
3363
|
+
return /* @__PURE__ */ v("p", { dir: c, children: [
|
|
3364
|
+
l,
|
|
3365
|
+
" ",
|
|
3366
|
+
/* @__PURE__ */ t("strong", { children: n })
|
|
3367
|
+
] });
|
|
3368
|
+
})(),
|
|
3369
|
+
d && /* @__PURE__ */ t("p", { dir: c, children: s })
|
|
3341
3370
|
] });
|
|
3342
|
-
}),
|
|
3371
|
+
}), ne = L.memo(function({
|
|
3343
3372
|
agent: e,
|
|
3344
|
-
size:
|
|
3373
|
+
size: n = "large",
|
|
3345
3374
|
active: i = !1,
|
|
3346
3375
|
className: o = ""
|
|
3347
3376
|
}) {
|
|
3348
|
-
const
|
|
3349
|
-
return /* @__PURE__ */
|
|
3377
|
+
const r = e?.faceImage, s = !r || r === "orb";
|
|
3378
|
+
return /* @__PURE__ */ t(
|
|
3350
3379
|
"div",
|
|
3351
3380
|
{
|
|
3352
3381
|
className: V(
|
|
3353
3382
|
"rqmii-agent-avatar",
|
|
3354
|
-
`rqmii-agent-avatar--${
|
|
3383
|
+
`rqmii-agent-avatar--${n}`,
|
|
3355
3384
|
i && "is-active",
|
|
3356
|
-
|
|
3385
|
+
s && "is-orb",
|
|
3357
3386
|
o
|
|
3358
3387
|
),
|
|
3359
|
-
children:
|
|
3388
|
+
children: s ? /* @__PURE__ */ t(L.Suspense, { fallback: null, children: /* @__PURE__ */ t(pt, { className: "rqmii-agent-avatar-orb" }) }) : /* @__PURE__ */ t(
|
|
3360
3389
|
"img",
|
|
3361
3390
|
{
|
|
3362
|
-
src:
|
|
3391
|
+
src: r,
|
|
3363
3392
|
alt: e?.name || "Agent"
|
|
3364
3393
|
}
|
|
3365
3394
|
)
|
|
3366
3395
|
}
|
|
3367
3396
|
);
|
|
3368
|
-
}), ma =
|
|
3369
|
-
return /* @__PURE__ */
|
|
3397
|
+
}), ma = L.memo(function({ agent: e, onClick: n, className: i = "", position: o = "fixed", active: r = !1 }) {
|
|
3398
|
+
return /* @__PURE__ */ t("button", { type: "button", className: V("rqmii-chat-open-button", o === "fixed" && "is-fixed", i), onClick: n, "aria-label": "Open chat", children: /* @__PURE__ */ t(ne, { agent: e, size: "button", active: r }) });
|
|
3370
3399
|
});
|
|
3371
|
-
function
|
|
3400
|
+
function bt() {
|
|
3372
3401
|
try {
|
|
3373
3402
|
const a = window.AudioContext || window.webkitAudioContext;
|
|
3374
3403
|
if (!a) return;
|
|
3375
|
-
const e = new a(),
|
|
3376
|
-
i.type = "sine", i.frequency.setValueAtTime(880,
|
|
3404
|
+
const e = new a(), n = e.currentTime, i = e.createOscillator(), o = e.createGain();
|
|
3405
|
+
i.type = "sine", i.frequency.setValueAtTime(880, n), i.frequency.setValueAtTime(1180, n + 0.12), o.gain.setValueAtTime(1e-4, n), o.gain.exponentialRampToValueAtTime(0.18, n + 0.02), o.gain.exponentialRampToValueAtTime(1e-4, n + 0.32), i.connect(o), o.connect(e.destination), i.start(n), i.stop(n + 0.34), i.onended = () => {
|
|
3377
3406
|
e.close();
|
|
3378
3407
|
};
|
|
3379
3408
|
} catch {
|
|
3380
3409
|
}
|
|
3381
3410
|
}
|
|
3382
|
-
const
|
|
3383
|
-
const [
|
|
3411
|
+
const ft = L.memo(function({ message: e, delaySeconds: n, soundEnabled: i, language: o, buttonPosition: r = "right", onClick: s }) {
|
|
3412
|
+
const [d, l] = y(!1), c = e.trim();
|
|
3384
3413
|
return I(() => {
|
|
3385
|
-
if (!
|
|
3414
|
+
if (!c) return;
|
|
3386
3415
|
const u = setTimeout(() => {
|
|
3387
|
-
l(!0), i &&
|
|
3388
|
-
}, Math.max(0,
|
|
3416
|
+
l(!0), i && bt();
|
|
3417
|
+
}, Math.max(0, n) * 1e3);
|
|
3389
3418
|
return () => clearTimeout(u);
|
|
3390
|
-
}, [
|
|
3419
|
+
}, [c, n, i]), !d || !c ? null : /* @__PURE__ */ t(
|
|
3391
3420
|
"button",
|
|
3392
3421
|
{
|
|
3393
3422
|
type: "button",
|
|
3394
|
-
className: V("rqmii-chat-welcome-bubble",
|
|
3395
|
-
dir:
|
|
3396
|
-
onClick:
|
|
3397
|
-
"aria-label":
|
|
3398
|
-
children:
|
|
3423
|
+
className: V("rqmii-chat-welcome-bubble", r === "right" ? "is-right" : "is-left", Z()),
|
|
3424
|
+
dir: oe(o),
|
|
3425
|
+
onClick: s,
|
|
3426
|
+
"aria-label": c,
|
|
3427
|
+
children: c
|
|
3399
3428
|
}
|
|
3400
3429
|
);
|
|
3401
|
-
}),
|
|
3402
|
-
const [
|
|
3403
|
-
const u =
|
|
3404
|
-
!u || o || (i(u),
|
|
3430
|
+
}), xe = L.memo(function({ language: e, placeholder: n, onSend: i, disabled: o = !1, variant: r = "text" }) {
|
|
3431
|
+
const [s, d] = y(""), l = R(null), c = 168, m = () => {
|
|
3432
|
+
const u = s.trim();
|
|
3433
|
+
!u || o || (i(u), d(""), l.current && (l.current.style.height = "auto"));
|
|
3405
3434
|
};
|
|
3406
|
-
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-input", Z(),
|
|
3407
|
-
/* @__PURE__ */
|
|
3435
|
+
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-input", Z(), r === "voice" && "is-voice"), children: [
|
|
3436
|
+
/* @__PURE__ */ t(
|
|
3408
3437
|
"textarea",
|
|
3409
3438
|
{
|
|
3410
3439
|
ref: l,
|
|
3411
|
-
value:
|
|
3440
|
+
value: s,
|
|
3412
3441
|
disabled: o,
|
|
3413
|
-
rows:
|
|
3414
|
-
dir:
|
|
3415
|
-
placeholder:
|
|
3442
|
+
rows: r === "compact" ? 2 : 3,
|
|
3443
|
+
dir: oe(e),
|
|
3444
|
+
placeholder: n || E(e, "sendMessage"),
|
|
3416
3445
|
onChange: (u) => {
|
|
3417
|
-
|
|
3446
|
+
d(u.target.value);
|
|
3418
3447
|
const h = l.current;
|
|
3419
|
-
h && (h.style.height = "auto", h.style.height = `${Math.min(h.scrollHeight,
|
|
3448
|
+
h && (h.style.height = "auto", h.style.height = `${Math.min(h.scrollHeight, c)}px`);
|
|
3420
3449
|
},
|
|
3421
3450
|
onKeyDown: (u) => {
|
|
3422
3451
|
u.key === "Enter" && !u.shiftKey && (u.preventDefault(), m());
|
|
3423
3452
|
}
|
|
3424
3453
|
}
|
|
3425
3454
|
),
|
|
3426
|
-
/* @__PURE__ */
|
|
3455
|
+
/* @__PURE__ */ t("button", { type: "button", onClick: m, disabled: !s.trim() || o, "aria-label": E(e, "send"), children: /* @__PURE__ */ t(Kn, { size: 20 }) })
|
|
3427
3456
|
] });
|
|
3428
|
-
}),
|
|
3429
|
-
const i =
|
|
3430
|
-
return /* @__PURE__ */
|
|
3431
|
-
}), qe = 133,
|
|
3432
|
-
function
|
|
3433
|
-
return typeof window > "u" ? qe : window.innerWidth <=
|
|
3457
|
+
}), kt = L.memo(function({ text: e, streaming: n }) {
|
|
3458
|
+
const i = gt(e, n);
|
|
3459
|
+
return /* @__PURE__ */ t(Te, { children: i });
|
|
3460
|
+
}), qe = 133, vt = qe + 44, yt = 767, ke = 36, Ft = 8, na = ke + Ft;
|
|
3461
|
+
function Tt() {
|
|
3462
|
+
return typeof window > "u" ? qe : window.innerWidth <= yt ? vt : qe;
|
|
3434
3463
|
}
|
|
3435
|
-
function
|
|
3464
|
+
function Et(a) {
|
|
3436
3465
|
return a === "rtl" ? "right" : "left";
|
|
3437
3466
|
}
|
|
3438
|
-
function
|
|
3467
|
+
function zt(a, e, n, i) {
|
|
3439
3468
|
if (!a.length) return null;
|
|
3440
|
-
const o = Math.max(...a.map((
|
|
3441
|
-
return
|
|
3469
|
+
const o = Math.max(...a.map((s) => s.offsetTop)), r = a.filter((s) => s.offsetTop >= o - 0.5);
|
|
3470
|
+
return n === "right" ? r.find((s) => s.offsetLeft + s.offsetWidth > e - i) || null : r.find((s) => s.offsetLeft < i) || null;
|
|
3442
3471
|
}
|
|
3443
|
-
function
|
|
3472
|
+
function ta(a, e, n, i) {
|
|
3444
3473
|
for (let o = 0; o < 2; o++) {
|
|
3445
|
-
const
|
|
3446
|
-
if (!
|
|
3447
|
-
|
|
3474
|
+
const r = zt(a, e, n, i);
|
|
3475
|
+
if (!r) break;
|
|
3476
|
+
n === "right" ? r.style.marginRight = `${i}px` : r.style.marginLeft = `${i}px`, r.style.maxWidth = `calc(100% - ${i}px)`;
|
|
3448
3477
|
}
|
|
3449
3478
|
}
|
|
3450
|
-
const
|
|
3451
|
-
const [o,
|
|
3479
|
+
const wt = L.memo(function({ suggestions: e, language: n, onClick: i }) {
|
|
3480
|
+
const [o, r] = y(!1), [s, d] = y(!1), [l, c] = y(null), [m, u] = y(null), h = R(null), F = R([]), b = oe(n || "en"), x = Et(b), w = (T) => {
|
|
3452
3481
|
T.forEach((k) => {
|
|
3453
3482
|
k && (k.style.maxWidth = "", k.style.marginRight = "", k.style.marginLeft = "");
|
|
3454
3483
|
});
|
|
@@ -3458,11 +3487,11 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
|
|
|
3458
3487
|
if (!T || o) return;
|
|
3459
3488
|
const k = () => {
|
|
3460
3489
|
const g = F.current;
|
|
3461
|
-
|
|
3462
|
-
const
|
|
3490
|
+
w(g);
|
|
3491
|
+
const M = T.clientWidth, z = Tt(), f = () => {
|
|
3463
3492
|
for (let C = 0; C < g.length; C++) {
|
|
3464
3493
|
const _ = g[C];
|
|
3465
|
-
if (_ && _.offsetTop + _.offsetHeight >
|
|
3494
|
+
if (_ && _.offsetTop + _.offsetHeight > z + 0.5)
|
|
3466
3495
|
return C;
|
|
3467
3496
|
}
|
|
3468
3497
|
return null;
|
|
@@ -3470,15 +3499,15 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
|
|
|
3470
3499
|
let P = f();
|
|
3471
3500
|
if (P !== null)
|
|
3472
3501
|
for (let C = 0; C <= g.length; C++) {
|
|
3473
|
-
|
|
3502
|
+
w(g);
|
|
3474
3503
|
const _ = g.slice(0, P).filter((j) => !!j);
|
|
3475
|
-
|
|
3476
|
-
const
|
|
3477
|
-
if (
|
|
3478
|
-
P =
|
|
3504
|
+
ta(_, M, x, na);
|
|
3505
|
+
const S = f();
|
|
3506
|
+
if (S === null || S >= P) break;
|
|
3507
|
+
P = S;
|
|
3479
3508
|
}
|
|
3480
|
-
if (
|
|
3481
|
-
const C = g.slice(0, P).filter((
|
|
3509
|
+
if (c(P), d(P !== null), P !== null) {
|
|
3510
|
+
const C = g.slice(0, P).filter((S) => !!S), _ = C.length ? Math.max(...C.map((S) => S.offsetTop + S.offsetHeight)) : ke;
|
|
3482
3511
|
u(_ - ke);
|
|
3483
3512
|
} else
|
|
3484
3513
|
u(null);
|
|
@@ -3486,21 +3515,21 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
|
|
|
3486
3515
|
k();
|
|
3487
3516
|
const p = typeof ResizeObserver < "u" ? new ResizeObserver(k) : null;
|
|
3488
3517
|
return p?.observe(T), () => {
|
|
3489
|
-
p?.disconnect(),
|
|
3518
|
+
p?.disconnect(), w(F.current);
|
|
3490
3519
|
};
|
|
3491
|
-
}, [e, o,
|
|
3520
|
+
}, [e, o, x]), We(() => {
|
|
3492
3521
|
const T = h.current;
|
|
3493
3522
|
if (!T || !o) return;
|
|
3494
3523
|
const k = F.current.filter((g) => !!g);
|
|
3495
|
-
|
|
3524
|
+
w(F.current), ta(k, T.clientWidth, x, na);
|
|
3496
3525
|
const p = k.length ? Math.max(...k.map((g) => g.offsetTop + g.offsetHeight)) : ke;
|
|
3497
3526
|
return u(p - ke), () => {
|
|
3498
|
-
|
|
3527
|
+
w(F.current);
|
|
3499
3528
|
};
|
|
3500
|
-
}, [o, e,
|
|
3529
|
+
}, [o, e, x]), e.length ? /* @__PURE__ */ t("div", { className: V("rqmii-suggested-messages", o && "is-expanded", s && "has-overflow"), dir: b, children: /* @__PURE__ */ v("div", { ref: h, className: V("rqmii-suggested-messages-inner", o ? "is-expanded" : "is-collapsed"), children: [
|
|
3501
3530
|
e.map((T, k) => {
|
|
3502
3531
|
const p = !o && l !== null && k >= l;
|
|
3503
|
-
return /* @__PURE__ */
|
|
3532
|
+
return /* @__PURE__ */ t(
|
|
3504
3533
|
"button",
|
|
3505
3534
|
{
|
|
3506
3535
|
ref: (g) => {
|
|
@@ -3517,225 +3546,225 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
|
|
|
3517
3546
|
k
|
|
3518
3547
|
);
|
|
3519
3548
|
}),
|
|
3520
|
-
|
|
3549
|
+
s && /* @__PURE__ */ t(
|
|
3521
3550
|
"button",
|
|
3522
3551
|
{
|
|
3523
3552
|
type: "button",
|
|
3524
|
-
className: V("rqmii-suggested-messages-toggle",
|
|
3553
|
+
className: V("rqmii-suggested-messages-toggle", x === "left" && "is-start-left"),
|
|
3525
3554
|
style: m != null ? { top: m, bottom: "auto" } : void 0,
|
|
3526
|
-
onClick: () =>
|
|
3555
|
+
onClick: () => r((T) => (T && h.current && (h.current.scrollTop = 0), !T)),
|
|
3527
3556
|
"aria-label": o ? "Show less" : "Show more",
|
|
3528
3557
|
"aria-expanded": o,
|
|
3529
|
-
children: o ? /* @__PURE__ */
|
|
3558
|
+
children: o ? /* @__PURE__ */ t(Wn, { size: 14 }) : /* @__PURE__ */ t(da, { size: 14 })
|
|
3530
3559
|
}
|
|
3531
3560
|
)
|
|
3532
3561
|
] }) }) : null;
|
|
3533
|
-
}),
|
|
3534
|
-
const
|
|
3535
|
-
return /* @__PURE__ */
|
|
3536
|
-
/* @__PURE__ */
|
|
3537
|
-
/* @__PURE__ */
|
|
3538
|
-
/* @__PURE__ */
|
|
3562
|
+
}), St = L.memo(function({ language: e }) {
|
|
3563
|
+
const n = oe(e || "en");
|
|
3564
|
+
return /* @__PURE__ */ t("div", { className: "rqmii-chat-message-row", children: /* @__PURE__ */ v("div", { className: "rqmii-chat-message rqmii-chat-typing-indicator", dir: n, children: [
|
|
3565
|
+
/* @__PURE__ */ t("span", { className: "rqmii-chat-typing-dot" }),
|
|
3566
|
+
/* @__PURE__ */ t("span", { className: "rqmii-chat-typing-dot" }),
|
|
3567
|
+
/* @__PURE__ */ t("span", { className: "rqmii-chat-typing-dot" })
|
|
3539
3568
|
] }) });
|
|
3540
3569
|
});
|
|
3541
|
-
function
|
|
3570
|
+
function xt(a) {
|
|
3542
3571
|
return a === "message";
|
|
3543
3572
|
}
|
|
3544
|
-
const
|
|
3573
|
+
const Mt = {
|
|
3545
3574
|
name: "leadFormName",
|
|
3546
3575
|
email: "leadFormEmail",
|
|
3547
3576
|
phone: "leadFormPhone",
|
|
3548
3577
|
message: "leadFormMessage"
|
|
3549
|
-
},
|
|
3550
|
-
const
|
|
3551
|
-
const g =
|
|
3552
|
-
return `${g ?
|
|
3578
|
+
}, Pt = L.memo(function({ messageId: e, form: n, language: i, textDirection: o, formSubmitted: r }) {
|
|
3579
|
+
const s = Ea(), [d, l] = y({}), [c, m] = y(!1), [u, h] = y(!!r), [F, b] = y(null), x = n.title || E(i, "leadFormTitle"), w = (p) => {
|
|
3580
|
+
const g = Mt[p.key];
|
|
3581
|
+
return `${g ? E(i, g) : p.label}${p.required ? "*" : ""}`;
|
|
3553
3582
|
}, T = (p, g) => {
|
|
3554
|
-
l((
|
|
3583
|
+
l((M) => ({ ...M, [p]: g })), F && b(null);
|
|
3555
3584
|
}, k = async (p) => {
|
|
3556
|
-
if (p.preventDefault(),
|
|
3557
|
-
if (
|
|
3558
|
-
b(
|
|
3585
|
+
if (p.preventDefault(), c || u) return;
|
|
3586
|
+
if (n.fields.some((z) => z.required && !d[z.key]?.trim())) {
|
|
3587
|
+
b(E(i, "leadFormRequiredError"));
|
|
3559
3588
|
return;
|
|
3560
3589
|
}
|
|
3561
|
-
const
|
|
3562
|
-
for (const
|
|
3563
|
-
const f =
|
|
3564
|
-
f && (
|
|
3590
|
+
const M = {};
|
|
3591
|
+
for (const z of n.fields) {
|
|
3592
|
+
const f = d[z.key]?.trim();
|
|
3593
|
+
f && (M[z.key] = f);
|
|
3565
3594
|
}
|
|
3566
3595
|
m(!0), b(null);
|
|
3567
3596
|
try {
|
|
3568
|
-
await
|
|
3569
|
-
|
|
3570
|
-
(
|
|
3597
|
+
await s.submitLead({ agentId: n.agentId, collectedData: M }), h(!0), s.setMessages(
|
|
3598
|
+
s.messages.map(
|
|
3599
|
+
(z) => z.id === e ? { ...z, formSubmitted: !0 } : z
|
|
3571
3600
|
)
|
|
3572
3601
|
);
|
|
3573
|
-
} catch (
|
|
3574
|
-
b(
|
|
3602
|
+
} catch (z) {
|
|
3603
|
+
b(z?.message || E(i, "leadFormGenericError"));
|
|
3575
3604
|
} finally {
|
|
3576
3605
|
m(!1);
|
|
3577
3606
|
}
|
|
3578
3607
|
};
|
|
3579
|
-
return u ? /* @__PURE__ */
|
|
3580
|
-
/* @__PURE__ */
|
|
3581
|
-
|
|
3582
|
-
const g =
|
|
3583
|
-
return
|
|
3608
|
+
return u ? /* @__PURE__ */ t("div", { className: "rqmii-chat-message-row rqmii-chat-lead-form-row", children: /* @__PURE__ */ t("div", { className: "rqmii-chat-lead-form rqmii-chat-lead-form--done", dir: o, children: /* @__PURE__ */ t("div", { className: "rqmii-chat-lead-form-success", children: E(i, "leadFormSuccess") }) }) }) : /* @__PURE__ */ t("div", { className: "rqmii-chat-message-row rqmii-chat-lead-form-row", children: /* @__PURE__ */ v("form", { className: "rqmii-chat-lead-form", dir: o, onSubmit: k, children: [
|
|
3609
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-lead-form-title", children: x }),
|
|
3610
|
+
n.fields.map((p) => {
|
|
3611
|
+
const g = w(p), M = p.type === "email" ? "email" : p.type === "date" ? "date" : "text";
|
|
3612
|
+
return xt(p.key) ? /* @__PURE__ */ t(
|
|
3584
3613
|
"textarea",
|
|
3585
3614
|
{
|
|
3586
3615
|
className: "rqmii-chat-lead-form-input rqmii-chat-lead-form-textarea",
|
|
3587
3616
|
placeholder: g,
|
|
3588
|
-
value:
|
|
3589
|
-
onChange: (
|
|
3590
|
-
disabled:
|
|
3617
|
+
value: d[p.key] || "",
|
|
3618
|
+
onChange: (z) => T(p.key, z.target.value),
|
|
3619
|
+
disabled: c,
|
|
3591
3620
|
rows: 4
|
|
3592
3621
|
},
|
|
3593
3622
|
p.key
|
|
3594
|
-
) : /* @__PURE__ */
|
|
3623
|
+
) : /* @__PURE__ */ t(
|
|
3595
3624
|
"input",
|
|
3596
3625
|
{
|
|
3597
3626
|
className: "rqmii-chat-lead-form-input",
|
|
3598
|
-
type:
|
|
3627
|
+
type: M,
|
|
3599
3628
|
placeholder: g,
|
|
3600
|
-
value:
|
|
3601
|
-
onChange: (
|
|
3602
|
-
disabled:
|
|
3629
|
+
value: d[p.key] || "",
|
|
3630
|
+
onChange: (z) => T(p.key, z.target.value),
|
|
3631
|
+
disabled: c
|
|
3603
3632
|
},
|
|
3604
3633
|
p.key
|
|
3605
3634
|
);
|
|
3606
3635
|
}),
|
|
3607
|
-
F && /* @__PURE__ */
|
|
3608
|
-
/* @__PURE__ */
|
|
3636
|
+
F && /* @__PURE__ */ t("div", { className: "rqmii-chat-lead-form-error", children: F }),
|
|
3637
|
+
/* @__PURE__ */ t("button", { type: "submit", className: "rqmii-chat-lead-form-submit", disabled: c, children: c ? E(i, "loading") : E(i, "submit") })
|
|
3609
3638
|
] }) });
|
|
3610
|
-
}),
|
|
3639
|
+
}), Ct = L.memo(function({ message: e, textDirection: n, language: i }) {
|
|
3611
3640
|
if (e.role === "lead_form" && e.form)
|
|
3612
|
-
return /* @__PURE__ */
|
|
3641
|
+
return /* @__PURE__ */ t(Pt, { messageId: e.id, form: e.form, language: i, textDirection: n, formSubmitted: e.formSubmitted });
|
|
3613
3642
|
const o = e.role === "user" || e.sender === "user";
|
|
3614
|
-
return /* @__PURE__ */
|
|
3615
|
-
}), Ue =
|
|
3616
|
-
const
|
|
3643
|
+
return /* @__PURE__ */ t("div", { className: V("rqmii-chat-message-row", o && "is-user"), children: /* @__PURE__ */ t("div", { className: "rqmii-chat-message", dir: n, children: /* @__PURE__ */ t(kt, { text: e.text, streaming: e.streaming }) }) });
|
|
3644
|
+
}), Ue = L.memo(function({ messages: e, partialTranscript: n, language: i, showTypingIndicator: o }) {
|
|
3645
|
+
const r = R(null), s = oe(i || "en"), d = R(e.length);
|
|
3617
3646
|
return I(() => {
|
|
3618
|
-
if (!
|
|
3619
|
-
const l = e.length !==
|
|
3620
|
-
|
|
3621
|
-
}, [e,
|
|
3622
|
-
e.map((l) => /* @__PURE__ */
|
|
3623
|
-
o && /* @__PURE__ */
|
|
3624
|
-
|
|
3625
|
-
/* @__PURE__ */
|
|
3647
|
+
if (!r.current) return;
|
|
3648
|
+
const l = e.length !== d.current;
|
|
3649
|
+
d.current = e.length, r.current.scrollIntoView({ behavior: l ? "smooth" : "instant", block: "end" });
|
|
3650
|
+
}, [e, n]), /* @__PURE__ */ v("div", { className: "rqmii-chat-messages", children: [
|
|
3651
|
+
e.map((l) => /* @__PURE__ */ t(Ct, { message: l, textDirection: s, language: i || "en" }, l.id || `${l.role}-${l.text}`)),
|
|
3652
|
+
o && /* @__PURE__ */ t(St, { language: i }),
|
|
3653
|
+
n && /* @__PURE__ */ t("div", { className: "rqmii-chat-message-row is-user is-partial", children: /* @__PURE__ */ t("div", { className: "rqmii-chat-message", dir: s, children: n }) }),
|
|
3654
|
+
/* @__PURE__ */ t("div", { ref: r })
|
|
3626
3655
|
] });
|
|
3627
|
-
}), ha =
|
|
3656
|
+
}), ha = L.memo(function({ message: e, onRetry: n, onClose: i, language: o = "en" }) {
|
|
3628
3657
|
return /* @__PURE__ */ v("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: [
|
|
3629
|
-
i && /* @__PURE__ */
|
|
3630
|
-
/* @__PURE__ */
|
|
3631
|
-
|
|
3632
|
-
/* @__PURE__ */
|
|
3633
|
-
/* @__PURE__ */
|
|
3658
|
+
i && /* @__PURE__ */ t("button", { type: "button", className: "rqmii-error-close", onClick: i, children: "×" }),
|
|
3659
|
+
/* @__PURE__ */ t("p", { children: e || E(o, "connectionFailed") }),
|
|
3660
|
+
n && /* @__PURE__ */ v("button", { type: "button", className: "rqmii-chat-retry", onClick: n, children: [
|
|
3661
|
+
/* @__PURE__ */ t(ot, { size: 16 }),
|
|
3662
|
+
/* @__PURE__ */ t("span", { children: E(o, "retry") })
|
|
3634
3663
|
] })
|
|
3635
3664
|
] });
|
|
3636
|
-
}),
|
|
3637
|
-
function ga({ rating: a, onRate: e, readonly:
|
|
3638
|
-
const [o,
|
|
3639
|
-
return /* @__PURE__ */
|
|
3640
|
-
const
|
|
3641
|
-
return /* @__PURE__ */
|
|
3665
|
+
}), At = 5;
|
|
3666
|
+
function ga({ rating: a, onRate: e, readonly: n, size: i = 28 }) {
|
|
3667
|
+
const [o, r] = y(0), s = o || a;
|
|
3668
|
+
return /* @__PURE__ */ t("div", { className: "rqmii-chat-rating-stars", role: "radiogroup", children: Array.from({ length: At }, (d, l) => {
|
|
3669
|
+
const c = l + 1, m = c <= s;
|
|
3670
|
+
return /* @__PURE__ */ t(
|
|
3642
3671
|
"button",
|
|
3643
3672
|
{
|
|
3644
3673
|
type: "button",
|
|
3645
|
-
className: V("rqmii-chat-star", m && "is-filled",
|
|
3646
|
-
disabled:
|
|
3647
|
-
"aria-label": `${
|
|
3648
|
-
"aria-checked":
|
|
3674
|
+
className: V("rqmii-chat-star", m && "is-filled", n && "is-readonly"),
|
|
3675
|
+
disabled: n,
|
|
3676
|
+
"aria-label": `${c}`,
|
|
3677
|
+
"aria-checked": c === a,
|
|
3649
3678
|
role: "radio",
|
|
3650
|
-
onMouseEnter: () => !
|
|
3651
|
-
onMouseLeave: () => !
|
|
3652
|
-
onClick: () => !
|
|
3653
|
-
children: /* @__PURE__ */
|
|
3679
|
+
onMouseEnter: () => !n && r(c),
|
|
3680
|
+
onMouseLeave: () => !n && r(0),
|
|
3681
|
+
onClick: () => !n && e?.(c),
|
|
3682
|
+
children: /* @__PURE__ */ t(st, { size: i, fill: m ? "currentColor" : "none" })
|
|
3654
3683
|
},
|
|
3655
|
-
|
|
3684
|
+
c
|
|
3656
3685
|
);
|
|
3657
3686
|
}) });
|
|
3658
3687
|
}
|
|
3659
|
-
function
|
|
3688
|
+
function Lt({
|
|
3660
3689
|
language: a,
|
|
3661
3690
|
rating: e,
|
|
3662
|
-
endedBy:
|
|
3691
|
+
endedBy: n,
|
|
3663
3692
|
sessionId: i,
|
|
3664
3693
|
interactive: o,
|
|
3665
|
-
showTellUsMore:
|
|
3666
|
-
showRating:
|
|
3667
|
-
showConversationId:
|
|
3694
|
+
showTellUsMore: r,
|
|
3695
|
+
showRating: s = !0,
|
|
3696
|
+
showConversationId: d = !0,
|
|
3668
3697
|
onRate: l,
|
|
3669
|
-
onTellUsMore:
|
|
3698
|
+
onTellUsMore: c
|
|
3670
3699
|
}) {
|
|
3671
|
-
const m = e > 0 ?
|
|
3700
|
+
const m = e > 0 ? E(a, "ratingThankYou") : E(a, "ratingQuestion"), u = n === "user" ? E(a, "youEnded") : E(a, "agentEnded");
|
|
3672
3701
|
return /* @__PURE__ */ v(
|
|
3673
3702
|
"div",
|
|
3674
3703
|
{
|
|
3675
|
-
className: V("rqmii-chat-rating", !
|
|
3676
|
-
dir:
|
|
3704
|
+
className: V("rqmii-chat-rating", !s && "rqmii-chat-rating--unrated", Z()),
|
|
3705
|
+
dir: oe(a),
|
|
3677
3706
|
children: [
|
|
3678
|
-
|
|
3679
|
-
/* @__PURE__ */
|
|
3680
|
-
/* @__PURE__ */
|
|
3681
|
-
|
|
3707
|
+
s && /* @__PURE__ */ v(Te, { children: [
|
|
3708
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-rating-header", children: m }),
|
|
3709
|
+
/* @__PURE__ */ t(ga, { rating: e, onRate: l, readonly: !o }),
|
|
3710
|
+
r && /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-rating-more", onClick: c, children: E(a, "tellUsMore") })
|
|
3682
3711
|
] }),
|
|
3683
3712
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-rating-meta", children: [
|
|
3684
|
-
/* @__PURE__ */
|
|
3685
|
-
|
|
3686
|
-
|
|
3713
|
+
/* @__PURE__ */ t("div", { children: u }),
|
|
3714
|
+
d && i && /* @__PURE__ */ v("div", { children: [
|
|
3715
|
+
E(a, "sessionIdLabel"),
|
|
3687
3716
|
" ",
|
|
3688
|
-
/* @__PURE__ */
|
|
3717
|
+
/* @__PURE__ */ t("span", { children: i })
|
|
3689
3718
|
] })
|
|
3690
3719
|
] })
|
|
3691
3720
|
]
|
|
3692
3721
|
}
|
|
3693
3722
|
);
|
|
3694
3723
|
}
|
|
3695
|
-
function
|
|
3724
|
+
function _t({
|
|
3696
3725
|
agent: a,
|
|
3697
3726
|
language: e,
|
|
3698
|
-
rating:
|
|
3727
|
+
rating: n,
|
|
3699
3728
|
onBack: i,
|
|
3700
3729
|
onMinimize: o,
|
|
3701
|
-
onSubmit:
|
|
3730
|
+
onSubmit: r
|
|
3702
3731
|
}) {
|
|
3703
|
-
const [
|
|
3732
|
+
const [s, d] = y(""), [l, c] = y(!1), m = s.trim().length > 0 && !l, u = async () => {
|
|
3704
3733
|
if (m) {
|
|
3705
|
-
|
|
3734
|
+
c(!0);
|
|
3706
3735
|
try {
|
|
3707
|
-
await s
|
|
3736
|
+
await r(s.trim());
|
|
3708
3737
|
} finally {
|
|
3709
|
-
|
|
3738
|
+
c(!1);
|
|
3710
3739
|
}
|
|
3711
3740
|
}
|
|
3712
3741
|
};
|
|
3713
|
-
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--feedback", Z()), dir:
|
|
3742
|
+
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--feedback", Z()), dir: oe(e), children: [
|
|
3714
3743
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
|
|
3715
|
-
/* @__PURE__ */
|
|
3716
|
-
/* @__PURE__ */
|
|
3744
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": "Back", children: /* @__PURE__ */ t(Yn, { size: 20 }) }),
|
|
3745
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": E(e, "minimize"), children: /* @__PURE__ */ t(Se, { size: 20 }) })
|
|
3717
3746
|
] }),
|
|
3718
3747
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-feedback-body", children: [
|
|
3719
|
-
/* @__PURE__ */
|
|
3720
|
-
/* @__PURE__ */
|
|
3721
|
-
/* @__PURE__ */
|
|
3722
|
-
/* @__PURE__ */
|
|
3723
|
-
/* @__PURE__ */
|
|
3748
|
+
/* @__PURE__ */ t(ne, { agent: a, size: "hero" }),
|
|
3749
|
+
/* @__PURE__ */ t(ga, { rating: n, readonly: !0 }),
|
|
3750
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-feedback-title", children: E(e, "ratingThankYou") }),
|
|
3751
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-feedback-subtitle", children: E(e, "feedbackSubtitle") }),
|
|
3752
|
+
/* @__PURE__ */ t(
|
|
3724
3753
|
"textarea",
|
|
3725
3754
|
{
|
|
3726
3755
|
className: "rqmii-chat-feedback-input",
|
|
3727
|
-
value:
|
|
3728
|
-
dir:
|
|
3729
|
-
placeholder:
|
|
3730
|
-
onChange: (h) =>
|
|
3756
|
+
value: s,
|
|
3757
|
+
dir: oe(e),
|
|
3758
|
+
placeholder: E(e, "feedbackPlaceholder"),
|
|
3759
|
+
onChange: (h) => d(h.target.value)
|
|
3731
3760
|
}
|
|
3732
3761
|
),
|
|
3733
|
-
/* @__PURE__ */
|
|
3762
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-feedback-actions", children: /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-feedback-submit", onClick: u, disabled: !m, children: l ? /* @__PURE__ */ t(ze, { className: "rqmii-chat-spin", size: 18 }) : E(e, "submit") }) })
|
|
3734
3763
|
] }),
|
|
3735
|
-
/* @__PURE__ */
|
|
3764
|
+
/* @__PURE__ */ t(ue, { language: e, agent: a })
|
|
3736
3765
|
] });
|
|
3737
3766
|
}
|
|
3738
|
-
const
|
|
3767
|
+
const qt = L.lazy(() => import("./RqmiiCloudAvatarPlayer-Cit_rrpj.js").then((a) => a.e).then((a) => ({ default: a.RqmiiCloudAvatarPlayer })));
|
|
3739
3768
|
function Fe(a) {
|
|
3740
3769
|
if (!(a == null || typeof window > "u" || window.innerWidth >= 768))
|
|
3741
3770
|
return {
|
|
@@ -3743,334 +3772,334 @@ function Fe(a) {
|
|
|
3743
3772
|
bottom: 0
|
|
3744
3773
|
};
|
|
3745
3774
|
}
|
|
3746
|
-
const
|
|
3747
|
-
const T = Fe(u), [k, p] =
|
|
3748
|
-
|
|
3775
|
+
const It = L.memo(function({ agent: e, language: n, languages: i, onLanguageChange: o, onClose: r, onSend: s, isVoiceEnabled: d = !1, isAudioPlaying: l = !1, isVoiceSetupLoading: c = !1, onStartVoice: m, visualViewportHeight: u, disabled: h = !1, error: F, suggestions: b, onSuggestionClick: x, compact: w = !1 }) {
|
|
3776
|
+
const T = Fe(u), [k, p] = L.useState(_e);
|
|
3777
|
+
L.useEffect(() => {
|
|
3749
3778
|
const f = () => p(_e());
|
|
3750
3779
|
return window.addEventListener("resize", f), () => window.removeEventListener("resize", f);
|
|
3751
3780
|
}, []);
|
|
3752
|
-
const g =
|
|
3781
|
+
const g = w && !k, M = g ? "start" : "hero", z = b && b.length > 0;
|
|
3753
3782
|
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--start", g && "rqmii-chat-panel--start-compact", Z()), style: T, children: [
|
|
3754
3783
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
|
|
3755
|
-
/* @__PURE__ */
|
|
3784
|
+
/* @__PURE__ */ t("span", {}),
|
|
3756
3785
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar-actions", children: [
|
|
3757
|
-
/* @__PURE__ */
|
|
3758
|
-
/* @__PURE__ */
|
|
3786
|
+
/* @__PURE__ */ t(Ge, { language: n, languages: i, onChange: o }),
|
|
3787
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, children: /* @__PURE__ */ t(De, { size: 20 }) })
|
|
3759
3788
|
] })
|
|
3760
3789
|
] }),
|
|
3761
3790
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-start-body", children: [
|
|
3762
|
-
|
|
3763
|
-
/* @__PURE__ */
|
|
3764
|
-
/* @__PURE__ */
|
|
3765
|
-
] }) : /* @__PURE__ */
|
|
3766
|
-
/* @__PURE__ */
|
|
3767
|
-
F && /* @__PURE__ */
|
|
3791
|
+
d ? /* @__PURE__ */ v("div", { className: V("rqmii-chat-call-avatar-wrap", g && "is-compact"), children: [
|
|
3792
|
+
/* @__PURE__ */ t(ne, { agent: e, size: M, active: l }),
|
|
3793
|
+
/* @__PURE__ */ t("button", { type: "button", className: V("rqmii-chat-call-button", g && "is-compact"), onClick: m, disabled: c, "aria-label": E(n, "startVoice"), children: c ? /* @__PURE__ */ t(ze, { className: "rqmii-chat-spin", size: g ? 18 : 24 }) : /* @__PURE__ */ t(je, { size: g ? 18 : 24 }) })
|
|
3794
|
+
] }) : /* @__PURE__ */ t(ne, { agent: e, size: M }),
|
|
3795
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-agent-name", children: e.name }),
|
|
3796
|
+
F && /* @__PURE__ */ t("div", { className: "rqmii-chat-error-text", children: F })
|
|
3768
3797
|
] }),
|
|
3769
|
-
|
|
3770
|
-
/* @__PURE__ */
|
|
3771
|
-
/* @__PURE__ */
|
|
3798
|
+
z && /* @__PURE__ */ t("div", { className: "rqmii-chat-start-suggestions", children: /* @__PURE__ */ t(wt, { suggestions: b, language: n, onClick: (f) => x?.(f) }) }),
|
|
3799
|
+
/* @__PURE__ */ t(xe, { language: n, onSend: s, disabled: h }),
|
|
3800
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3772
3801
|
] });
|
|
3773
|
-
}),
|
|
3774
|
-
const m = Fe(
|
|
3802
|
+
}), Vt = L.memo(function({ agent: e, language: n, languages: i, onLanguageChange: o, onClose: r, onStartVoice: s, isVoiceSetupLoading: d = !1, isAudioPlaying: l, visualViewportHeight: c }) {
|
|
3803
|
+
const m = Fe(c);
|
|
3775
3804
|
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-start", Z()), style: m, children: [
|
|
3776
3805
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
|
|
3777
|
-
/* @__PURE__ */
|
|
3806
|
+
/* @__PURE__ */ t("span", {}),
|
|
3778
3807
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar-actions", children: [
|
|
3779
|
-
/* @__PURE__ */
|
|
3780
|
-
/* @__PURE__ */
|
|
3808
|
+
/* @__PURE__ */ t(Ge, { language: n, languages: i, onChange: o }),
|
|
3809
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, children: /* @__PURE__ */ t(De, { size: 20 }) })
|
|
3781
3810
|
] })
|
|
3782
3811
|
] }),
|
|
3783
3812
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-call-body", children: [
|
|
3784
3813
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-call-avatar-wrap", children: [
|
|
3785
|
-
/* @__PURE__ */
|
|
3786
|
-
/* @__PURE__ */
|
|
3814
|
+
/* @__PURE__ */ t(ne, { agent: e, size: "hero", active: l }),
|
|
3815
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-call-button", onClick: s, disabled: d, "aria-label": E(n, "startVoice"), children: d ? /* @__PURE__ */ t(ze, { className: "rqmii-chat-spin", size: 24 }) : /* @__PURE__ */ t(je, { size: 24 }) })
|
|
3787
3816
|
] }),
|
|
3788
3817
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-agent-name", children: [
|
|
3789
|
-
|
|
3818
|
+
E(n, "call"),
|
|
3790
3819
|
" ",
|
|
3791
3820
|
e.name
|
|
3792
3821
|
] })
|
|
3793
3822
|
] }),
|
|
3794
|
-
/* @__PURE__ */
|
|
3823
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3795
3824
|
] });
|
|
3796
|
-
}),
|
|
3797
|
-
const g = pa({ language:
|
|
3798
|
-
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", Z()), style:
|
|
3825
|
+
}), Nt = L.memo(function({ agent: e, language: n, onEndSession: i, onMinimize: o, messages: r, partialTranscript: s, onSend: d, isAudioPlaying: l, isVoiceEnabled: c, onToggleVoice: m, isListening: u, isSpeaking: h, isLoading: F, isAgentThinking: b, isAgentSpeaking: x, onStartVoice: w, elapsed: T, visualViewportHeight: k, waitingForResponse: p }) {
|
|
3826
|
+
const g = pa({ language: n, isListening: u, isLoading: F, isSpeaking: h, isAudioPlaying: l, isAgentThinking: b, isAgentSpeaking: x, persistentListening: !1 }), M = Fe(k), z = e.widget?.appearance?.show_topbar_avatar_image !== !1;
|
|
3827
|
+
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", Z()), style: M, children: [
|
|
3799
3828
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-header", children: [
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
/* @__PURE__ */
|
|
3829
|
+
z && /* @__PURE__ */ t(ne, { agent: e, size: "header", active: l }),
|
|
3830
|
+
c && g && /* @__PURE__ */ t("div", { className: V("rqmii-chat-header-status", !z && "is-expanded"), children: /* @__PURE__ */ t("span", { children: g }) }),
|
|
3831
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-header-spacer" }),
|
|
3803
3832
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-header-actions", children: [
|
|
3804
|
-
o && /* @__PURE__ */
|
|
3805
|
-
|
|
3806
|
-
/* @__PURE__ */
|
|
3833
|
+
o && /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": E(n, "minimize"), children: /* @__PURE__ */ t(Se, { size: 20 }) }),
|
|
3834
|
+
c && /* @__PURE__ */ t("button", { type: "button", className: V("rqmii-chat-circle-button", h && "is-active"), onClick: m, "aria-label": u ? E(n, "stopVoice") : E(n, "startVoice"), children: u ? /* @__PURE__ */ t(we, { size: 20 }) : /* @__PURE__ */ t(Ve, { size: 20 }) }),
|
|
3835
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, "aria-label": E(n, "endCall"), children: /* @__PURE__ */ t(Ne, { size: 20 }) })
|
|
3807
3836
|
] })
|
|
3808
3837
|
] }),
|
|
3809
|
-
/* @__PURE__ */
|
|
3810
|
-
|
|
3811
|
-
/* @__PURE__ */
|
|
3812
|
-
/* @__PURE__ */
|
|
3838
|
+
/* @__PURE__ */ t(Ue, { messages: r, partialTranscript: s, language: n, showTypingIndicator: p }),
|
|
3839
|
+
c && /* @__PURE__ */ t("div", { className: "rqmii-chat-session-counter", children: Re(T) }),
|
|
3840
|
+
/* @__PURE__ */ t(xe, { language: n, onSend: d }),
|
|
3841
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3813
3842
|
] });
|
|
3814
|
-
}),
|
|
3815
|
-
const b = pa({ language:
|
|
3816
|
-
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", Z()), style:
|
|
3843
|
+
}), jt = L.memo(function({ agent: e, language: n, onEndSession: i, onMinimize: o, isListening: r, isLoading: s, isSpeaking: d, isAudioPlaying: l, isAgentThinking: c, isAgentSpeaking: m, onToggleVoice: u, elapsed: h, visualViewportHeight: F }) {
|
|
3844
|
+
const b = pa({ language: n, isListening: r, isLoading: s, isSpeaking: d, isAudioPlaying: l, isAgentThinking: c, isAgentSpeaking: m, persistentListening: !0 }), x = Fe(F);
|
|
3845
|
+
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", Z()), style: x, children: [
|
|
3817
3846
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-call-status", children: [
|
|
3818
|
-
/* @__PURE__ */
|
|
3819
|
-
/* @__PURE__ */
|
|
3820
|
-
/* @__PURE__ */
|
|
3847
|
+
/* @__PURE__ */ t("span", { className: V("rqmii-chat-live-dot", r && "is-live") }),
|
|
3848
|
+
/* @__PURE__ */ t("span", { children: Re(h) }),
|
|
3849
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, children: /* @__PURE__ */ t(Se, { size: 20 }) })
|
|
3821
3850
|
] }),
|
|
3822
3851
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-voice-frame", children: [
|
|
3823
|
-
/* @__PURE__ */
|
|
3824
|
-
/* @__PURE__ */
|
|
3825
|
-
/* @__PURE__ */
|
|
3852
|
+
/* @__PURE__ */ t(ne, { agent: e, size: "hero", active: l }),
|
|
3853
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-agent-name", children: e.name }),
|
|
3854
|
+
/* @__PURE__ */ t("div", { className: V("rqmii-chat-status-pill", !b && "is-empty"), children: b || E(n, "listening") }),
|
|
3826
3855
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-voice-actions", children: [
|
|
3827
|
-
/* @__PURE__ */
|
|
3828
|
-
/* @__PURE__ */
|
|
3856
|
+
/* @__PURE__ */ t("button", { type: "button", className: V("rqmii-chat-circle-button", d && "is-active"), onClick: u, children: r ? /* @__PURE__ */ t(we, { size: 20 }) : /* @__PURE__ */ t(Ve, { size: 20 }) }),
|
|
3857
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, "aria-label": E(n, "endCall"), children: /* @__PURE__ */ t(Ne, { size: 20 }) })
|
|
3829
3858
|
] })
|
|
3830
3859
|
] }),
|
|
3831
|
-
/* @__PURE__ */
|
|
3860
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3832
3861
|
] });
|
|
3833
3862
|
});
|
|
3834
|
-
function pa({ language: a, isListening: e, isLoading:
|
|
3835
|
-
return
|
|
3863
|
+
function pa({ language: a, isListening: e, isLoading: n, isSpeaking: i, isAudioPlaying: o, isAgentThinking: r, isAgentSpeaking: s, persistentListening: d = !1 }) {
|
|
3864
|
+
return n ? E(a, "loading") : i ? E(a, "listening") : o || s ? E(a, "talkToInterrupt") : r ? E(a, "processing") : e && d ? E(a, "listening") : null;
|
|
3836
3865
|
}
|
|
3837
|
-
const
|
|
3866
|
+
const Dt = L.memo(function({ agent: e, language: n, onRestore: i, onClose: o, isListening: r, isAudioPlaying: s, isSpeaking: d, onToggleVoice: l, elapsed: c, variant: m = "voice" }) {
|
|
3838
3867
|
const u = m === "text";
|
|
3839
3868
|
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-minimized", Z()), children: [
|
|
3840
|
-
/* @__PURE__ */
|
|
3841
|
-
!u && /* @__PURE__ */
|
|
3869
|
+
/* @__PURE__ */ t(ne, { agent: e, size: "minimized", active: s }),
|
|
3870
|
+
!u && /* @__PURE__ */ t("span", { className: "rqmii-chat-minimized-time", children: Re(c) }),
|
|
3842
3871
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-minimized-actions", children: [
|
|
3843
|
-
/* @__PURE__ */
|
|
3844
|
-
!u && /* @__PURE__ */
|
|
3845
|
-
/* @__PURE__ */
|
|
3872
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": E(n, "maximize"), children: /* @__PURE__ */ t(Jn, { size: 20 }) }),
|
|
3873
|
+
!u && /* @__PURE__ */ t("button", { type: "button", className: V("rqmii-chat-circle-button", d && "is-active"), onClick: l, "aria-label": r ? E(n, "stopVoice") : E(n, "startVoice"), children: r ? /* @__PURE__ */ t(we, { size: 20 }) : /* @__PURE__ */ t(Ve, { size: 20 }) }),
|
|
3874
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: o, "aria-label": E(n, "endCall"), children: /* @__PURE__ */ t(Ne, { size: 20 }) })
|
|
3846
3875
|
] })
|
|
3847
3876
|
] });
|
|
3848
|
-
}),
|
|
3877
|
+
}), Bt = L.memo(function({
|
|
3849
3878
|
agent: e,
|
|
3850
|
-
language:
|
|
3879
|
+
language: n,
|
|
3851
3880
|
languages: i,
|
|
3852
3881
|
chatKind: o,
|
|
3853
|
-
messages:
|
|
3854
|
-
onLanguageChange:
|
|
3855
|
-
onMinimize:
|
|
3882
|
+
messages: r,
|
|
3883
|
+
onLanguageChange: s,
|
|
3884
|
+
onMinimize: d,
|
|
3856
3885
|
onStartNewVoice: l,
|
|
3857
|
-
onStartNewText:
|
|
3886
|
+
onStartNewText: c,
|
|
3858
3887
|
isVoiceSetupLoading: m = !1,
|
|
3859
3888
|
visualViewportHeight: u,
|
|
3860
3889
|
rating: h,
|
|
3861
3890
|
endedBy: F,
|
|
3862
3891
|
sessionId: b,
|
|
3863
|
-
ratingInteractive:
|
|
3864
|
-
showTellUsMore:
|
|
3892
|
+
ratingInteractive: x,
|
|
3893
|
+
showTellUsMore: w,
|
|
3865
3894
|
onRate: T,
|
|
3866
3895
|
onTellUsMore: k
|
|
3867
3896
|
}) {
|
|
3868
|
-
const p = Fe(u), g = e.widget?.behavior?.conversation_ended_screen,
|
|
3869
|
-
|
|
3897
|
+
const p = Fe(u), g = e.widget?.behavior?.conversation_ended_screen, M = !!g?.post_chat_rating_enabled, z = g?.show_conversation_id ?? !0, f = /* @__PURE__ */ t(
|
|
3898
|
+
Lt,
|
|
3870
3899
|
{
|
|
3871
|
-
language:
|
|
3900
|
+
language: n,
|
|
3872
3901
|
rating: h,
|
|
3873
3902
|
endedBy: F,
|
|
3874
3903
|
sessionId: b,
|
|
3875
|
-
interactive:
|
|
3876
|
-
showTellUsMore:
|
|
3877
|
-
showRating:
|
|
3878
|
-
showConversationId:
|
|
3904
|
+
interactive: x,
|
|
3905
|
+
showTellUsMore: w,
|
|
3906
|
+
showRating: M,
|
|
3907
|
+
showConversationId: z,
|
|
3879
3908
|
onRate: T,
|
|
3880
3909
|
onTellUsMore: k
|
|
3881
3910
|
}
|
|
3882
3911
|
), P = o === "voice" || o === "text_and_voice", C = o === "text" || o === "text_and_voice", _ = /* @__PURE__ */ v("div", { className: "rqmii-chat-topbar-actions rqmii-chat-topbar-actions--ended", children: [
|
|
3883
|
-
/* @__PURE__ */
|
|
3884
|
-
/* @__PURE__ */
|
|
3912
|
+
/* @__PURE__ */ t(Ge, { language: n, languages: i, onChange: s }),
|
|
3913
|
+
/* @__PURE__ */ t(
|
|
3885
3914
|
"button",
|
|
3886
3915
|
{
|
|
3887
3916
|
type: "button",
|
|
3888
3917
|
className: "rqmii-chat-circle-button",
|
|
3889
|
-
onClick:
|
|
3890
|
-
"aria-label":
|
|
3891
|
-
children: /* @__PURE__ */
|
|
3918
|
+
onClick: d,
|
|
3919
|
+
"aria-label": E(n, "minimize"),
|
|
3920
|
+
children: /* @__PURE__ */ t(Se, { size: 20 })
|
|
3892
3921
|
}
|
|
3893
3922
|
),
|
|
3894
|
-
P && /* @__PURE__ */
|
|
3923
|
+
P && /* @__PURE__ */ t(
|
|
3895
3924
|
"button",
|
|
3896
3925
|
{
|
|
3897
3926
|
type: "button",
|
|
3898
3927
|
className: "rqmii-chat-circle-button rqmii-chat-circle-button--call-start",
|
|
3899
3928
|
onClick: l,
|
|
3900
3929
|
disabled: m,
|
|
3901
|
-
"aria-label":
|
|
3902
|
-
children: m ? /* @__PURE__ */
|
|
3930
|
+
"aria-label": E(n, "startVoice"),
|
|
3931
|
+
children: m ? /* @__PURE__ */ t(ze, { className: "rqmii-chat-spin", size: 20 }) : /* @__PURE__ */ t(je, { size: 20 })
|
|
3903
3932
|
}
|
|
3904
3933
|
)
|
|
3905
3934
|
] });
|
|
3906
3935
|
if (o === "voice")
|
|
3907
3936
|
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", Z()), style: p, children: [
|
|
3908
3937
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
|
|
3909
|
-
/* @__PURE__ */
|
|
3938
|
+
/* @__PURE__ */ t("span", {}),
|
|
3910
3939
|
_
|
|
3911
3940
|
] }),
|
|
3912
3941
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-voice-frame", children: [
|
|
3913
|
-
/* @__PURE__ */
|
|
3914
|
-
/* @__PURE__ */
|
|
3942
|
+
/* @__PURE__ */ t(ne, { agent: e, size: "hero" }),
|
|
3943
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-agent-name", children: e.name }),
|
|
3915
3944
|
f
|
|
3916
3945
|
] }),
|
|
3917
|
-
/* @__PURE__ */
|
|
3946
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3918
3947
|
] });
|
|
3919
|
-
const
|
|
3948
|
+
const S = e.widget?.appearance?.show_topbar_avatar_image !== !1;
|
|
3920
3949
|
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", Z()), style: p, children: [
|
|
3921
3950
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
|
|
3922
|
-
|
|
3951
|
+
S ? /* @__PURE__ */ t(ne, { agent: e, size: "header" }) : /* @__PURE__ */ t("span", {}),
|
|
3923
3952
|
_
|
|
3924
3953
|
] }),
|
|
3925
|
-
/* @__PURE__ */
|
|
3954
|
+
/* @__PURE__ */ t(Ue, { messages: r, language: n }),
|
|
3926
3955
|
f,
|
|
3927
|
-
C && /* @__PURE__ */
|
|
3928
|
-
/* @__PURE__ */
|
|
3956
|
+
C && /* @__PURE__ */ t(xe, { language: n, onSend: c }),
|
|
3957
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3929
3958
|
] });
|
|
3930
|
-
}), ba =
|
|
3931
|
-
const { streamingUrl: o, isCloudStreamConnected:
|
|
3959
|
+
}), ba = L.memo(function({ agent: e, language: n, onClose: i }) {
|
|
3960
|
+
const { streamingUrl: o, isCloudStreamConnected: r, cloudStreamError: s } = He(), { isAvatarSpeaking: d } = He(), { messages: l, sendTextMessage: c } = ge();
|
|
3932
3961
|
return /* @__PURE__ */ v("div", { className: V("rqmii-avatar-panel", Z()), children: [
|
|
3933
3962
|
/* @__PURE__ */ v("div", { className: "rqmii-avatar-stream", children: [
|
|
3934
|
-
/* @__PURE__ */
|
|
3935
|
-
!o && /* @__PURE__ */
|
|
3936
|
-
|
|
3963
|
+
/* @__PURE__ */ t(L.Suspense, { fallback: /* @__PURE__ */ t("div", { className: "rqmii-avatar-overlay", children: E(n, "loading") }), children: /* @__PURE__ */ t(qt, { autoConnect: !0, muted: !1 }) }),
|
|
3964
|
+
!o && /* @__PURE__ */ t("div", { className: "rqmii-avatar-overlay", children: E(n, "loading") }),
|
|
3965
|
+
s && /* @__PURE__ */ t("div", { className: "rqmii-avatar-overlay", children: E(n, "connectionFailed") }),
|
|
3937
3966
|
/* @__PURE__ */ v("div", { className: "rqmii-avatar-controls", children: [
|
|
3938
|
-
/* @__PURE__ */
|
|
3939
|
-
/* @__PURE__ */
|
|
3940
|
-
/* @__PURE__ */
|
|
3941
|
-
/* @__PURE__ */
|
|
3967
|
+
/* @__PURE__ */ t(ne, { agent: e, size: "header", active: d }),
|
|
3968
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-header-spacer" }),
|
|
3969
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", disabled: !r, children: /* @__PURE__ */ t(we, { size: 20 }) }),
|
|
3970
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, children: /* @__PURE__ */ t(De, { size: 20 }) })
|
|
3942
3971
|
] })
|
|
3943
3972
|
] }),
|
|
3944
3973
|
e.useText && /* @__PURE__ */ v("div", { className: "rqmii-avatar-sidebar", children: [
|
|
3945
|
-
/* @__PURE__ */
|
|
3946
|
-
/* @__PURE__ */
|
|
3947
|
-
/* @__PURE__ */
|
|
3974
|
+
/* @__PURE__ */ t(Ue, { messages: l, language: n }),
|
|
3975
|
+
/* @__PURE__ */ t(xe, { language: n, onSend: c, variant: "compact" }),
|
|
3976
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3948
3977
|
] })
|
|
3949
3978
|
] });
|
|
3950
3979
|
});
|
|
3951
|
-
function
|
|
3952
|
-
const e = a.trim(),
|
|
3953
|
-
return
|
|
3980
|
+
function Rt(a) {
|
|
3981
|
+
const e = a.trim(), n = e.toLowerCase();
|
|
3982
|
+
return n.startsWith("javascript:") || n.startsWith("data:") || n.startsWith("vbscript:") ? "#" : e;
|
|
3954
3983
|
}
|
|
3955
3984
|
function se(a) {
|
|
3956
|
-
const e = [],
|
|
3985
|
+
const e = [], n = /(\[([^\]]+)\]\(([^)]+)\))|(\*\*([^*]+)\*\*|__([^_]+)__)|(\*([^*]+)\*|_([^_]+)_)|(~~([^~]+)~~)|(`([^`]+)`)/g;
|
|
3957
3986
|
let i = 0, o;
|
|
3958
|
-
for (; (o =
|
|
3987
|
+
for (; (o = n.exec(a)) !== null; ) {
|
|
3959
3988
|
o.index > i && e.push(a.slice(i, o.index));
|
|
3960
|
-
const
|
|
3989
|
+
const r = `inline-${o.index}-${o[0]}`;
|
|
3961
3990
|
if (o[1]) {
|
|
3962
|
-
const
|
|
3991
|
+
const s = o[2], d = o[3];
|
|
3963
3992
|
e.push(
|
|
3964
|
-
/* @__PURE__ */
|
|
3993
|
+
/* @__PURE__ */ t(
|
|
3965
3994
|
"a",
|
|
3966
3995
|
{
|
|
3967
|
-
href:
|
|
3996
|
+
href: Rt(d),
|
|
3968
3997
|
target: "_blank",
|
|
3969
3998
|
rel: "noopener noreferrer",
|
|
3970
3999
|
className: "rqmii-markdown-link",
|
|
3971
|
-
children: se(
|
|
4000
|
+
children: se(s)
|
|
3972
4001
|
},
|
|
3973
|
-
|
|
4002
|
+
r
|
|
3974
4003
|
)
|
|
3975
4004
|
);
|
|
3976
4005
|
} else if (o[4]) {
|
|
3977
|
-
const
|
|
4006
|
+
const s = o[5] || o[6];
|
|
3978
4007
|
e.push(
|
|
3979
|
-
/* @__PURE__ */
|
|
4008
|
+
/* @__PURE__ */ t("strong", { className: "rqmii-markdown-strong", children: se(s) }, r)
|
|
3980
4009
|
);
|
|
3981
4010
|
} else if (o[7]) {
|
|
3982
|
-
const
|
|
4011
|
+
const s = o[8] || o[9];
|
|
3983
4012
|
e.push(
|
|
3984
|
-
/* @__PURE__ */
|
|
4013
|
+
/* @__PURE__ */ t("em", { className: "rqmii-markdown-em", children: se(s) }, r)
|
|
3985
4014
|
);
|
|
3986
4015
|
} else if (o[10]) {
|
|
3987
|
-
const
|
|
4016
|
+
const s = o[11];
|
|
3988
4017
|
e.push(
|
|
3989
|
-
/* @__PURE__ */
|
|
4018
|
+
/* @__PURE__ */ t("del", { className: "rqmii-markdown-del", children: se(s) }, r)
|
|
3990
4019
|
);
|
|
3991
4020
|
} else if (o[12]) {
|
|
3992
|
-
const
|
|
4021
|
+
const s = o[13];
|
|
3993
4022
|
e.push(
|
|
3994
|
-
/* @__PURE__ */
|
|
4023
|
+
/* @__PURE__ */ t("code", { className: "rqmii-markdown-code", children: s }, r)
|
|
3995
4024
|
);
|
|
3996
4025
|
}
|
|
3997
|
-
i =
|
|
4026
|
+
i = n.lastIndex;
|
|
3998
4027
|
}
|
|
3999
4028
|
return i < a.length && e.push(a.slice(i)), e;
|
|
4000
4029
|
}
|
|
4001
4030
|
function ia(a, e) {
|
|
4002
|
-
const
|
|
4031
|
+
const n = a.split(`
|
|
4003
4032
|
`);
|
|
4004
|
-
return
|
|
4005
|
-
o > 0 && /* @__PURE__ */
|
|
4033
|
+
return n.length === 1 ? se(n[0]) : n.map((i, o) => /* @__PURE__ */ v(L.Fragment, { children: [
|
|
4034
|
+
o > 0 && /* @__PURE__ */ t("br", {}),
|
|
4006
4035
|
se(i)
|
|
4007
4036
|
] }, `${e}-ln-${o}`));
|
|
4008
4037
|
}
|
|
4009
|
-
function
|
|
4038
|
+
function Gt({
|
|
4010
4039
|
content: a,
|
|
4011
4040
|
className: e = ""
|
|
4012
4041
|
}) {
|
|
4013
4042
|
if (!a || !a.trim()) return null;
|
|
4014
|
-
const
|
|
4043
|
+
const n = a.replace(/\r\n/g, `
|
|
4015
4044
|
`).split(/\n{2,}/), i = [];
|
|
4016
|
-
return
|
|
4017
|
-
const
|
|
4018
|
-
if (!
|
|
4019
|
-
const
|
|
4020
|
-
if (
|
|
4021
|
-
const l =
|
|
4045
|
+
return n.forEach((o, r) => {
|
|
4046
|
+
const s = o.trim();
|
|
4047
|
+
if (!s) return;
|
|
4048
|
+
const d = `block-${r}`;
|
|
4049
|
+
if (s.startsWith("#")) {
|
|
4050
|
+
const l = s.match(/^(#{1,6})\s+(.+)$/s);
|
|
4022
4051
|
if (l) {
|
|
4023
|
-
const
|
|
4024
|
-
|
|
4052
|
+
const c = l[1].length, m = l[2].trim(), u = se(m);
|
|
4053
|
+
c === 1 ? i.push(/* @__PURE__ */ t("h3", { className: "rqmii-markdown-h1", children: u }, d)) : c === 2 ? i.push(/* @__PURE__ */ t("h4", { className: "rqmii-markdown-h2", children: u }, d)) : i.push(/* @__PURE__ */ t("h5", { className: "rqmii-markdown-h3", children: u }, d));
|
|
4025
4054
|
return;
|
|
4026
4055
|
}
|
|
4027
4056
|
}
|
|
4028
|
-
if (
|
|
4029
|
-
const l =
|
|
4030
|
-
`).map((
|
|
4057
|
+
if (s.startsWith(">")) {
|
|
4058
|
+
const l = s.split(`
|
|
4059
|
+
`).map((c) => c.replace(/^>\s?/, "")).join(`
|
|
4031
4060
|
`);
|
|
4032
4061
|
i.push(
|
|
4033
|
-
/* @__PURE__ */
|
|
4062
|
+
/* @__PURE__ */ t("blockquote", { className: "rqmii-markdown-blockquote", children: ia(l, d) }, d)
|
|
4034
4063
|
);
|
|
4035
4064
|
return;
|
|
4036
4065
|
}
|
|
4037
|
-
if (/^[-*]\s+/m.test(
|
|
4038
|
-
const l =
|
|
4066
|
+
if (/^[-*]\s+/m.test(s)) {
|
|
4067
|
+
const l = s.split(`
|
|
4039
4068
|
`);
|
|
4040
4069
|
if (l.every((m) => /^[-*]\s+/.test(m.trim()) || m.trim() === "")) {
|
|
4041
4070
|
const m = l.map((u) => u.trim().replace(/^[-*]\s+/, "")).filter(Boolean);
|
|
4042
4071
|
i.push(
|
|
4043
|
-
/* @__PURE__ */
|
|
4072
|
+
/* @__PURE__ */ t("ul", { className: "rqmii-markdown-ul", children: m.map((u, h) => /* @__PURE__ */ t("li", { children: se(u) }, `${d}-li-${h}`)) }, d)
|
|
4044
4073
|
);
|
|
4045
4074
|
return;
|
|
4046
4075
|
}
|
|
4047
4076
|
}
|
|
4048
|
-
if (/^\d+\.\s+/m.test(
|
|
4049
|
-
const l =
|
|
4077
|
+
if (/^\d+\.\s+/m.test(s)) {
|
|
4078
|
+
const l = s.split(`
|
|
4050
4079
|
`);
|
|
4051
4080
|
if (l.every((m) => /^\d+\.\s+/.test(m.trim()) || m.trim() === "")) {
|
|
4052
4081
|
const m = l.map((u) => u.trim().replace(/^\d+\.\s+/, "")).filter(Boolean);
|
|
4053
4082
|
i.push(
|
|
4054
|
-
/* @__PURE__ */
|
|
4083
|
+
/* @__PURE__ */ t("ol", { className: "rqmii-markdown-ol", children: m.map((u, h) => /* @__PURE__ */ t("li", { children: se(u) }, `${d}-li-${h}`)) }, d)
|
|
4055
4084
|
);
|
|
4056
4085
|
return;
|
|
4057
4086
|
}
|
|
4058
4087
|
}
|
|
4059
4088
|
i.push(
|
|
4060
|
-
/* @__PURE__ */
|
|
4089
|
+
/* @__PURE__ */ t("p", { className: "rqmii-markdown-p", children: ia(s, d) }, d)
|
|
4061
4090
|
);
|
|
4062
|
-
}), /* @__PURE__ */
|
|
4091
|
+
}), /* @__PURE__ */ t("div", { className: `rqmii-markdown ${e}`.trim(), children: i });
|
|
4063
4092
|
}
|
|
4064
|
-
const
|
|
4065
|
-
function
|
|
4093
|
+
const Ut = L.memo(Gt);
|
|
4094
|
+
function Kt({
|
|
4066
4095
|
language: a,
|
|
4067
4096
|
content: e,
|
|
4068
|
-
config:
|
|
4097
|
+
config: n,
|
|
4069
4098
|
agent: i,
|
|
4070
4099
|
onAccept: o,
|
|
4071
|
-
onDecline:
|
|
4100
|
+
onDecline: r
|
|
4072
4101
|
}) {
|
|
4073
|
-
const
|
|
4102
|
+
const s = e || n?.body?.[a] || E(a, "consentBody") || "", d = n?.acceptLabel?.[a] || E(a, "consentAccept"), l = n?.declineLabel?.[a] || E(a, "consentDecline");
|
|
4074
4103
|
return /* @__PURE__ */ v(
|
|
4075
4104
|
"div",
|
|
4076
4105
|
{
|
|
@@ -4078,26 +4107,26 @@ function On({
|
|
|
4078
4107
|
"rqmii-chat-panel rqmii-chat-panel--start rqmii-chat-panel--consent",
|
|
4079
4108
|
Z()
|
|
4080
4109
|
),
|
|
4081
|
-
dir:
|
|
4110
|
+
dir: oe(a),
|
|
4082
4111
|
children: [
|
|
4083
|
-
/* @__PURE__ */
|
|
4112
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-consent-body", children: /* @__PURE__ */ t(Ut, { content: s }) }),
|
|
4084
4113
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-consent-actions", children: [
|
|
4085
|
-
/* @__PURE__ */
|
|
4114
|
+
/* @__PURE__ */ t(
|
|
4086
4115
|
"button",
|
|
4087
4116
|
{
|
|
4088
4117
|
type: "button",
|
|
4089
4118
|
className: "rqmii-chat-consent-button rqmii-chat-consent-button--decline",
|
|
4090
|
-
onClick:
|
|
4119
|
+
onClick: r,
|
|
4091
4120
|
children: l
|
|
4092
4121
|
}
|
|
4093
4122
|
),
|
|
4094
|
-
/* @__PURE__ */
|
|
4123
|
+
/* @__PURE__ */ t(
|
|
4095
4124
|
"button",
|
|
4096
4125
|
{
|
|
4097
4126
|
type: "button",
|
|
4098
4127
|
className: "rqmii-chat-consent-button rqmii-chat-consent-button--accept",
|
|
4099
4128
|
onClick: o,
|
|
4100
|
-
children:
|
|
4129
|
+
children: d
|
|
4101
4130
|
}
|
|
4102
4131
|
)
|
|
4103
4132
|
] })
|
|
@@ -4105,30 +4134,30 @@ function On({
|
|
|
4105
4134
|
}
|
|
4106
4135
|
);
|
|
4107
4136
|
}
|
|
4108
|
-
function
|
|
4137
|
+
function Ot(a) {
|
|
4109
4138
|
return a ? typeof a == "string" ? a : typeof a == "object" && typeof a.text == "string" ? a.text : "" : "";
|
|
4110
4139
|
}
|
|
4111
|
-
function
|
|
4140
|
+
function Yt(a) {
|
|
4112
4141
|
return a === "text" || a === "voice" || a === "text_and_voice";
|
|
4113
4142
|
}
|
|
4114
|
-
const Ke =
|
|
4143
|
+
const Ke = L.memo(function({
|
|
4115
4144
|
agent: e,
|
|
4116
|
-
language:
|
|
4145
|
+
language: n,
|
|
4117
4146
|
languages: i,
|
|
4118
|
-
onLanguageChange: o =
|
|
4119
|
-
onEndSession:
|
|
4120
|
-
onMinimize:
|
|
4121
|
-
messages:
|
|
4147
|
+
onLanguageChange: o = re,
|
|
4148
|
+
onEndSession: r = re,
|
|
4149
|
+
onMinimize: s,
|
|
4150
|
+
messages: d,
|
|
4122
4151
|
onSendMessage: l,
|
|
4123
|
-
isPreview:
|
|
4152
|
+
isPreview: c = !1,
|
|
4124
4153
|
chatKind: m,
|
|
4125
4154
|
sdk: u,
|
|
4126
4155
|
renderPanel: h,
|
|
4127
4156
|
messagesRef: F,
|
|
4128
4157
|
initialText: b,
|
|
4129
|
-
autoStartVoice:
|
|
4158
|
+
autoStartVoice: x
|
|
4130
4159
|
}) {
|
|
4131
|
-
const
|
|
4160
|
+
const w = e.widget?.consent || e.consent, T = !!w?.enabled, k = w?.content?.[n] || w?.body?.[n] || "", p = w?.one_time !== !1, g = e.id ? `rqmii_consent_${e.id}` : null, [M, z] = y(() => {
|
|
4132
4161
|
if (!T || !k) return !0;
|
|
4133
4162
|
if (p && g && typeof window < "u")
|
|
4134
4163
|
try {
|
|
@@ -4137,13 +4166,13 @@ const Ke = A.memo(function({
|
|
|
4137
4166
|
return !1;
|
|
4138
4167
|
}
|
|
4139
4168
|
return !1;
|
|
4140
|
-
}), f = m || Ee(e), [P, C] = y(() => f === "voice" && u.isSessionReady || f === "voice" && !!
|
|
4169
|
+
}), f = m || Ee(e), [P, C] = y(() => f === "voice" && u.isSessionReady || f === "voice" && !!x), [_, S] = y(() => (f === "text" || f === "text_and_voice") && u.isSessionReady || !!b || f === "text_and_voice" && !!x), [j, B] = y(!1), [D, A] = y(!1), [G, N] = y(null), O = mt(f === "voice" && P || f === "text_and_voice" && _), U = ht(), J = T && !!k && !M && !c, X = Yt(f), { events: W } = pe();
|
|
4141
4170
|
I(() => {
|
|
4142
4171
|
if (!W) return;
|
|
4143
4172
|
const Q = () => {
|
|
4144
|
-
X && _e() &&
|
|
4173
|
+
X && _e() && B(!0);
|
|
4145
4174
|
}, be = () => {
|
|
4146
|
-
X &&
|
|
4175
|
+
X && B(!1);
|
|
4147
4176
|
};
|
|
4148
4177
|
return W.on("minimize_chat", Q), W.on("maximize_chat", be), () => {
|
|
4149
4178
|
W.off("minimize_chat", Q), W.off("maximize_chat", be);
|
|
@@ -4155,13 +4184,13 @@ const Ke = A.memo(function({
|
|
|
4155
4184
|
window.localStorage.setItem(g, "true");
|
|
4156
4185
|
} catch {
|
|
4157
4186
|
}
|
|
4158
|
-
|
|
4187
|
+
z(!0);
|
|
4159
4188
|
}, [p, g]), K = ie(() => {
|
|
4160
|
-
|
|
4161
|
-
}, [
|
|
4162
|
-
o(Q),
|
|
4189
|
+
s ? s() : r();
|
|
4190
|
+
}, [s, r]), me = (Q) => {
|
|
4191
|
+
o(Q), c || u.changeSessionLanguage(Q);
|
|
4163
4192
|
}, ae = ie((Q) => {
|
|
4164
|
-
if (N(null),
|
|
4193
|
+
if (N(null), A(!0), l) {
|
|
4165
4194
|
l(Q);
|
|
4166
4195
|
return;
|
|
4167
4196
|
}
|
|
@@ -4170,23 +4199,23 @@ const Ke = A.memo(function({
|
|
|
4170
4199
|
I(() => {
|
|
4171
4200
|
F && (F.current = u.messages);
|
|
4172
4201
|
});
|
|
4173
|
-
const le =
|
|
4202
|
+
const le = R(!1);
|
|
4174
4203
|
I(() => {
|
|
4175
|
-
le.current || (b ? (le.current = !0, ae(b)) :
|
|
4204
|
+
le.current || (b ? (le.current = !0, ae(b)) : x && (le.current = !0, N(null), A(!0), u.isVoiceActive || u.startVoice()));
|
|
4176
4205
|
}, []), I(() => {
|
|
4177
|
-
D && u.isSessionReady && (
|
|
4206
|
+
D && u.isSessionReady && (A(!1), f === "voice" ? C(!0) : S(!0));
|
|
4178
4207
|
}, [D, u.isSessionReady, f]), I(() => {
|
|
4179
|
-
D && u.error && (
|
|
4208
|
+
D && u.error && (A(!1), N(u.error));
|
|
4180
4209
|
}, [D, u.error]);
|
|
4181
4210
|
const ce = ie(() => {
|
|
4182
|
-
N(null),
|
|
4211
|
+
N(null), A(!0), u.isVoiceActive || u.startVoice();
|
|
4183
4212
|
}, [u]);
|
|
4184
|
-
if (u.error && !
|
|
4213
|
+
if (u.error && !c && (_ || P)) return /* @__PURE__ */ t(ha, { message: u.error, language: n, onClose: r });
|
|
4185
4214
|
if (J)
|
|
4186
|
-
return /* @__PURE__ */
|
|
4187
|
-
|
|
4215
|
+
return /* @__PURE__ */ t(
|
|
4216
|
+
Kt,
|
|
4188
4217
|
{
|
|
4189
|
-
language:
|
|
4218
|
+
language: n,
|
|
4190
4219
|
content: k,
|
|
4191
4220
|
config: e.consent,
|
|
4192
4221
|
agent: e,
|
|
@@ -4196,119 +4225,119 @@ const Ke = A.memo(function({
|
|
|
4196
4225
|
);
|
|
4197
4226
|
const he = {
|
|
4198
4227
|
agent: e,
|
|
4199
|
-
language:
|
|
4228
|
+
language: n,
|
|
4200
4229
|
languages: i,
|
|
4201
4230
|
chatKind: f,
|
|
4202
4231
|
sdk: u,
|
|
4203
|
-
isPreview:
|
|
4232
|
+
isPreview: c,
|
|
4204
4233
|
onLanguageChange: me,
|
|
4205
|
-
onClose:
|
|
4206
|
-
onMinimize: X ? () =>
|
|
4207
|
-
onRestore: X ? () =>
|
|
4234
|
+
onClose: r,
|
|
4235
|
+
onMinimize: X ? () => B(!0) : void 0,
|
|
4236
|
+
onRestore: X ? () => B(!1) : void 0,
|
|
4208
4237
|
onSend: ae,
|
|
4209
4238
|
voiceStarted: P,
|
|
4210
4239
|
conversationStarted: _,
|
|
4211
4240
|
isMinimized: j,
|
|
4212
4241
|
elapsed: O,
|
|
4213
4242
|
setVoiceStarted: C,
|
|
4214
|
-
setConversationStarted:
|
|
4243
|
+
setConversationStarted: S
|
|
4215
4244
|
};
|
|
4216
|
-
return h ? /* @__PURE__ */
|
|
4217
|
-
N(null),
|
|
4245
|
+
return h ? /* @__PURE__ */ t(Te, { children: h(he) }) : /* @__PURE__ */ t(Qt, { ...he, connecting: D, connectError: G, visualViewportHeight: U, onCloseWidget: s ?? r, initiateVoice: ce, onSendSuggestion: (Q) => {
|
|
4246
|
+
N(null), A(!0), u.sendSuggestion?.(Q);
|
|
4218
4247
|
} });
|
|
4219
|
-
}),
|
|
4220
|
-
const f = e.widget?.behavior?.typing_indicator_enabled ?? !0, P = o === "text" ?
|
|
4221
|
-
if (o === "avatar") return /* @__PURE__ */
|
|
4248
|
+
}), Qt = L.memo(function({ agent: e, language: n, languages: i, chatKind: o, sdk: r, onLanguageChange: s, onClose: d, onMinimize: l, onRestore: c, onSend: m, voiceStarted: u, conversationStarted: h, isMinimized: F, elapsed: b, setVoiceStarted: x, setConversationStarted: w, visualViewportHeight: T, connecting: k = !1, connectError: p = null, onCloseWidget: g, initiateVoice: M, onSendSuggestion: z }) {
|
|
4249
|
+
const f = e.widget?.behavior?.typing_indicator_enabled ?? !0, P = o === "text" ? r.waitingForResponse && f : !1, C = r.messages;
|
|
4250
|
+
if (o === "avatar") return /* @__PURE__ */ t(ba, { agent: e, language: n, onClose: d });
|
|
4222
4251
|
if (F)
|
|
4223
|
-
return /* @__PURE__ */
|
|
4252
|
+
return /* @__PURE__ */ t(Dt, { agent: e, language: n, onRestore: c, onClose: d, isListening: r.isVoiceActive, isAudioPlaying: r.isAudioPlaying, isSpeaking: r.vad.isSpeaking, onToggleVoice: r.toggleVoice, elapsed: b, variant: o === "text" ? "text" : "voice" });
|
|
4224
4253
|
if (o === "voice" && u)
|
|
4225
|
-
return /* @__PURE__ */
|
|
4254
|
+
return /* @__PURE__ */ t(jt, { agent: e, language: n, onEndSession: d, onMinimize: l, isListening: r.isVoiceActive, isLoading: r.vad.isLoading, isSpeaking: r.vad.isSpeaking, isAudioPlaying: r.isAudioPlaying, isAgentThinking: r.isAgentThinking, isAgentSpeaking: r.isAgentSpeaking, onToggleVoice: r.toggleVoice, elapsed: b, visualViewportHeight: T });
|
|
4226
4255
|
if (o === "voice")
|
|
4227
|
-
return /* @__PURE__ */
|
|
4228
|
-
if (!h && (
|
|
4229
|
-
const _ = (e.widget?.behavior?.suggested_messages?.[
|
|
4230
|
-
|
|
4256
|
+
return /* @__PURE__ */ t(Vt, { agent: e, language: n, languages: i, onLanguageChange: s, onClose: g, isAudioPlaying: r.isAudioPlaying, isVoiceSetupLoading: r.isVoiceSetupLoading || k, onStartVoice: M, visualViewportHeight: T });
|
|
4257
|
+
if (!h && (r.messages.length === 0 || k)) {
|
|
4258
|
+
const _ = (e.widget?.behavior?.suggested_messages?.[n] || e.conversation?.suggested_messages?.[n])?.filter((B) => B.trim()) || void 0, S = (B) => {
|
|
4259
|
+
r.sendSuggestion ? z(B) : m?.(B);
|
|
4231
4260
|
}, j = o === "text_and_voice" || Ee(e) === "text_and_voice";
|
|
4232
|
-
return /* @__PURE__ */
|
|
4261
|
+
return /* @__PURE__ */ t(It, { agent: e, language: n, languages: i, onLanguageChange: s, onClose: g, onSend: m, isVoiceEnabled: j, isAudioPlaying: r.isAudioPlaying, isVoiceSetupLoading: r.isVoiceSetupLoading || k, onStartVoice: M, visualViewportHeight: T, disabled: k, error: p || void 0, suggestions: _, onSuggestionClick: S, compact: !!_ });
|
|
4233
4262
|
}
|
|
4234
|
-
return /* @__PURE__ */
|
|
4235
|
-
}),
|
|
4236
|
-
function fa({ isSessionReady: a, sendTextMessage: e, messages:
|
|
4237
|
-
const [i, o] = y(null), [
|
|
4238
|
-
o((l) => (l && (a ? e(l) :
|
|
4263
|
+
return /* @__PURE__ */ t(Nt, { agent: e, language: n, onEndSession: d, messages: C, partialTranscript: Ot(r.partialTranscript), onSend: m, isAudioPlaying: r.isAudioPlaying, isVoiceEnabled: o === "text_and_voice", isListening: r.isVoiceActive, isSpeaking: r.vad.isSpeaking, isLoading: r.vad.isLoading, isAgentThinking: r.isAgentThinking, isAgentSpeaking: r.isAgentSpeaking, onToggleVoice: r.toggleVoice, onStartVoice: r.startVoice, onMinimize: l, elapsed: b, visualViewportHeight: T, waitingForResponse: P });
|
|
4264
|
+
}), Ht = { isListening: !1, isLoading: !1, isSpeaking: !1, toggle: async () => !1 };
|
|
4265
|
+
function fa({ isSessionReady: a, sendTextMessage: e, messages: n }) {
|
|
4266
|
+
const [i, o] = y(null), [r, s] = y(null), d = ie(() => {
|
|
4267
|
+
o((l) => (l && (a ? e(l) : s(l)), null));
|
|
4239
4268
|
}, [a, e]);
|
|
4240
4269
|
return I(() => {
|
|
4241
|
-
i &&
|
|
4242
|
-
}, [
|
|
4270
|
+
i && n.length !== 0 && d();
|
|
4271
|
+
}, [n, i, d]), I(() => {
|
|
4243
4272
|
if (!i) return;
|
|
4244
|
-
const l = setTimeout(
|
|
4273
|
+
const l = setTimeout(d, 5e3);
|
|
4245
4274
|
return () => clearTimeout(l);
|
|
4246
|
-
}, [i,
|
|
4247
|
-
!
|
|
4248
|
-
}, [a,
|
|
4275
|
+
}, [i, d]), I(() => {
|
|
4276
|
+
!r || !a || (e(r), s(null));
|
|
4277
|
+
}, [a, r, e]), { pendingWelcomeText: i, pendingMessage: r, setPendingWelcomeText: o, setPendingMessage: s, sendPendingWelcomeText: d };
|
|
4249
4278
|
}
|
|
4250
4279
|
function Oe({ isSessionReady: a, signalClientReady: e }) {
|
|
4251
|
-
const [
|
|
4280
|
+
const [n, i] = y(!1), [o, r] = y(void 0), s = R(!1);
|
|
4252
4281
|
return I(() => {
|
|
4253
|
-
!a ||
|
|
4254
|
-
}, [a,
|
|
4255
|
-
a ? (
|
|
4282
|
+
!a || s.current || !n || (s.current = !0, e(o), i(!1));
|
|
4283
|
+
}, [a, n, o, e]), { emitClientReady: ie((l) => {
|
|
4284
|
+
a ? (s.current = !0, e(l)) : (r(l), i(!0));
|
|
4256
4285
|
}, [a, e]) };
|
|
4257
4286
|
}
|
|
4258
|
-
const
|
|
4259
|
-
function
|
|
4260
|
-
const { isPreview: e = !1, ...
|
|
4287
|
+
const Wt = 300;
|
|
4288
|
+
function $t(a) {
|
|
4289
|
+
const { isPreview: e = !1, ...n } = a, { messages: i, sendTextMessage: o, emitUserMessage: r, addLocalMessage: s, clearMessages: d } = ge(), { changeSessionLanguage: l, clearSessionHistory: c, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: F, isAgentSpeaking: b } = pe(), x = R(!1), w = R(null), T = R(!1), [k, p] = y(!1), [g, M] = y(null), [z, f] = y(!1), P = R(i.length);
|
|
4261
4290
|
I(() => {
|
|
4262
4291
|
if (i.length > P.current) {
|
|
4263
|
-
const
|
|
4264
|
-
|
|
4292
|
+
const A = i[i.length - 1];
|
|
4293
|
+
A.role === "assistant" && A.streaming && f(!1);
|
|
4265
4294
|
}
|
|
4266
4295
|
P.current = i.length;
|
|
4267
4296
|
}, [i]), oa("message_rate_limited", ie(() => {
|
|
4268
4297
|
f(!1);
|
|
4269
4298
|
}, [])), I(() => {
|
|
4270
4299
|
if (!h || !k || T.current) return;
|
|
4271
|
-
const
|
|
4272
|
-
if (
|
|
4273
|
-
T.current = !0,
|
|
4300
|
+
const A = w.current;
|
|
4301
|
+
if (A === null) return;
|
|
4302
|
+
T.current = !0, w.current = null, s("user", A), M(null);
|
|
4274
4303
|
const G = a.agent.welcomeMessages?.[a.language];
|
|
4275
4304
|
m(G ? { welcomeMessage: G } : void 0);
|
|
4276
4305
|
const N = setTimeout(() => {
|
|
4277
|
-
|
|
4278
|
-
},
|
|
4306
|
+
r(A), f(!0);
|
|
4307
|
+
}, Wt);
|
|
4279
4308
|
return () => clearTimeout(N);
|
|
4280
|
-
}, [h, k, m,
|
|
4309
|
+
}, [h, k, m, r, s]);
|
|
4281
4310
|
const C = $(() => g ? [{ id: "first-user", role: "user", text: g }, ...i] : i, [g, i]), _ = ie(() => {
|
|
4282
|
-
|
|
4283
|
-
}, [
|
|
4311
|
+
M(null), d();
|
|
4312
|
+
}, [d]), S = {
|
|
4284
4313
|
emitClientReady: m,
|
|
4285
|
-
sendMessage: (
|
|
4286
|
-
o(
|
|
4314
|
+
sendMessage: (A) => {
|
|
4315
|
+
o(A);
|
|
4287
4316
|
},
|
|
4288
|
-
queueForWelcome:
|
|
4289
|
-
enableVoice:
|
|
4290
|
-
disableVoice:
|
|
4317
|
+
queueForWelcome: re,
|
|
4318
|
+
enableVoice: re,
|
|
4319
|
+
disableVoice: re,
|
|
4291
4320
|
language: a.language,
|
|
4292
4321
|
isSessionReady: h,
|
|
4293
4322
|
supportsVoice: !1,
|
|
4294
4323
|
isVoiceActive: !1,
|
|
4295
4324
|
chatKind: "text"
|
|
4296
|
-
}, j = (
|
|
4297
|
-
a.onSessionStart?.(),
|
|
4298
|
-
},
|
|
4299
|
-
a.onTextSend ? a.onTextSend(
|
|
4325
|
+
}, j = (A, G) => {
|
|
4326
|
+
a.onSessionStart?.(), x.current ? (f(!0), G.sendMessage(A)) : (x.current = !0, M(A), w.current = A, p(!0), f(!0));
|
|
4327
|
+
}, B = (A) => {
|
|
4328
|
+
a.onTextSend ? a.onTextSend(A, S) : j(A, S);
|
|
4300
4329
|
};
|
|
4301
|
-
return /* @__PURE__ */
|
|
4330
|
+
return /* @__PURE__ */ t(
|
|
4302
4331
|
Ke,
|
|
4303
4332
|
{
|
|
4304
|
-
...
|
|
4333
|
+
...n,
|
|
4305
4334
|
isPreview: e,
|
|
4306
4335
|
chatKind: "text",
|
|
4307
4336
|
sdk: {
|
|
4308
4337
|
messages: C,
|
|
4309
|
-
sendTextMessage:
|
|
4338
|
+
sendTextMessage: B,
|
|
4310
4339
|
clearMessages: _,
|
|
4311
|
-
clearSessionHistory:
|
|
4340
|
+
clearSessionHistory: c,
|
|
4312
4341
|
isAudioPlaying: !1,
|
|
4313
4342
|
partialTranscript: null,
|
|
4314
4343
|
changeSessionLanguage: l,
|
|
@@ -4318,36 +4347,36 @@ function Zn(a) {
|
|
|
4318
4347
|
isVoiceSetupLoading: !1,
|
|
4319
4348
|
isVoiceActive: !1,
|
|
4320
4349
|
isSessionReady: h,
|
|
4321
|
-
vad:
|
|
4322
|
-
startVoice:
|
|
4323
|
-
prepareVoice:
|
|
4324
|
-
toggleVoice:
|
|
4350
|
+
vad: Ht,
|
|
4351
|
+
startVoice: re,
|
|
4352
|
+
prepareVoice: re,
|
|
4353
|
+
toggleVoice: re,
|
|
4325
4354
|
signalClientReady: m,
|
|
4326
|
-
waitingForResponse:
|
|
4327
|
-
sendSuggestion:
|
|
4355
|
+
waitingForResponse: z,
|
|
4356
|
+
sendSuggestion: B
|
|
4328
4357
|
}
|
|
4329
4358
|
}
|
|
4330
4359
|
);
|
|
4331
4360
|
}
|
|
4332
|
-
function
|
|
4333
|
-
const { isPreview: e = !1, ...
|
|
4361
|
+
function Zt(a) {
|
|
4362
|
+
const { isPreview: e = !1, ...n } = a, { messages: i, sendTextMessage: o, clearMessages: r } = ge(), { isAudioPlaying: s, partialTranscript: d } = ra(), { changeSessionLanguage: l, clearSessionHistory: c, signalClientReady: m, error: u, isSessionReady: h, isAgentThinking: F, isAgentSpeaking: b } = pe(), { setPendingWelcomeText: x, setPendingMessage: w } = fa({ isSessionReady: h, sendTextMessage: o, messages: i }), { emitClientReady: T } = Oe({ isSessionReady: h, signalClientReady: m }), [k, p] = y(!1), g = sa({
|
|
4334
4363
|
enabled: !0,
|
|
4335
4364
|
preloadStream: !1
|
|
4336
|
-
}), { isLoading:
|
|
4365
|
+
}), { isLoading: M, isListening: z, toggle: f } = g, P = M, C = z || k;
|
|
4337
4366
|
I(() => {
|
|
4338
|
-
!k || !h ||
|
|
4339
|
-
}, [k, h,
|
|
4367
|
+
!k || !h || M || z || f();
|
|
4368
|
+
}, [k, h, M, z, f]);
|
|
4340
4369
|
const _ = () => {
|
|
4341
4370
|
a.onSessionStart?.();
|
|
4342
|
-
},
|
|
4371
|
+
}, S = {
|
|
4343
4372
|
emitClientReady: T,
|
|
4344
4373
|
sendMessage: (N) => {
|
|
4345
|
-
h ? o(N) :
|
|
4374
|
+
h ? o(N) : w(N);
|
|
4346
4375
|
},
|
|
4347
|
-
queueForWelcome: (N) =>
|
|
4376
|
+
queueForWelcome: (N) => x(N),
|
|
4348
4377
|
enableVoice: () => p(!0),
|
|
4349
4378
|
disableVoice: () => {
|
|
4350
|
-
p(!1),
|
|
4379
|
+
p(!1), z && f();
|
|
4351
4380
|
},
|
|
4352
4381
|
language: a.language,
|
|
4353
4382
|
isSessionReady: h,
|
|
@@ -4358,23 +4387,23 @@ function Jn(a) {
|
|
|
4358
4387
|
_(), N.enableVoice();
|
|
4359
4388
|
const Y = a.agent.welcomeMessages?.[a.language];
|
|
4360
4389
|
N.emitClientReady(Y ? { welcomeMessage: Y } : void 0);
|
|
4361
|
-
},
|
|
4390
|
+
}, B = (N) => {
|
|
4362
4391
|
N.isVoiceActive ? N.disableVoice() : N.enableVoice();
|
|
4363
4392
|
};
|
|
4364
|
-
return /* @__PURE__ */
|
|
4393
|
+
return /* @__PURE__ */ t(
|
|
4365
4394
|
Ke,
|
|
4366
4395
|
{
|
|
4367
|
-
...
|
|
4396
|
+
...n,
|
|
4368
4397
|
isPreview: e,
|
|
4369
4398
|
chatKind: "voice",
|
|
4370
4399
|
sdk: {
|
|
4371
4400
|
messages: i,
|
|
4372
4401
|
sendTextMessage: () => {
|
|
4373
4402
|
},
|
|
4374
|
-
clearMessages:
|
|
4375
|
-
clearSessionHistory:
|
|
4376
|
-
isAudioPlaying:
|
|
4377
|
-
partialTranscript:
|
|
4403
|
+
clearMessages: r,
|
|
4404
|
+
clearSessionHistory: c,
|
|
4405
|
+
isAudioPlaying: s,
|
|
4406
|
+
partialTranscript: d,
|
|
4378
4407
|
changeSessionLanguage: l,
|
|
4379
4408
|
error: u,
|
|
4380
4409
|
isAgentThinking: F,
|
|
@@ -4384,21 +4413,21 @@ function Jn(a) {
|
|
|
4384
4413
|
isSessionReady: h,
|
|
4385
4414
|
vad: g,
|
|
4386
4415
|
startVoice: () => {
|
|
4387
|
-
a.onVoiceStart ? a.onVoiceStart(
|
|
4416
|
+
a.onVoiceStart ? a.onVoiceStart(S) : j(S);
|
|
4388
4417
|
},
|
|
4389
4418
|
prepareVoice: () => {
|
|
4390
4419
|
},
|
|
4391
4420
|
toggleVoice: () => {
|
|
4392
|
-
a.onVoiceToggle ? a.onVoiceToggle(
|
|
4421
|
+
a.onVoiceToggle ? a.onVoiceToggle(S) : B(S);
|
|
4393
4422
|
},
|
|
4394
4423
|
signalClientReady: m
|
|
4395
4424
|
}
|
|
4396
4425
|
}
|
|
4397
4426
|
);
|
|
4398
4427
|
}
|
|
4399
|
-
const
|
|
4400
|
-
function
|
|
4401
|
-
const { isPreview: e = !1, ...
|
|
4428
|
+
const Jt = 300;
|
|
4429
|
+
function Xt(a) {
|
|
4430
|
+
const { isPreview: e = !1, ...n } = a, { messages: i, sendTextMessage: o, emitUserMessage: r, addLocalMessage: s, clearMessages: d } = ge(), { isAudioPlaying: l, partialTranscript: c } = ra(), { changeSessionLanguage: m, clearSessionHistory: u, signalClientReady: h, error: F, isSessionReady: b, isAgentThinking: x, isAgentSpeaking: w } = pe(), { emitClientReady: T } = Oe({ isSessionReady: b, signalClientReady: h }), [k, p] = y(!1), g = R(null), [M, z] = y(!1), f = R(null), [P, C] = y(!1), _ = R(!1), S = R(!1), j = R(!1), [B, D] = y(null), [A, G] = y(!1), N = R(i.length);
|
|
4402
4431
|
I(() => {
|
|
4403
4432
|
if (i.length > N.current) {
|
|
4404
4433
|
const q = i[i.length - 1];
|
|
@@ -4408,35 +4437,35 @@ function ei(a) {
|
|
|
4408
4437
|
}, [i]), oa("message_rate_limited", ie(() => {
|
|
4409
4438
|
G(!1);
|
|
4410
4439
|
}, []));
|
|
4411
|
-
const Y =
|
|
4440
|
+
const Y = sa({
|
|
4412
4441
|
enabled: !0,
|
|
4413
4442
|
preloadStream: !1
|
|
4414
4443
|
}), { isLoading: O, isListening: U, toggle: J } = Y, X = O, W = U || k;
|
|
4415
4444
|
I(() => {
|
|
4416
4445
|
!k || !b || O || U || J();
|
|
4417
4446
|
}, [k, b, O, U, J]), I(() => {
|
|
4418
|
-
if (!b || !
|
|
4447
|
+
if (!b || !M || j.current) return;
|
|
4419
4448
|
const q = g.current;
|
|
4420
4449
|
if (q === null) return;
|
|
4421
|
-
j.current = !0, g.current = null,
|
|
4422
|
-
const
|
|
4423
|
-
h(
|
|
4450
|
+
j.current = !0, g.current = null, s("user", q), D(null);
|
|
4451
|
+
const te = a.agent.welcomeMessages?.[a.language];
|
|
4452
|
+
h(te ? { welcomeMessage: te } : void 0);
|
|
4424
4453
|
const Pe = setTimeout(() => {
|
|
4425
|
-
|
|
4426
|
-
},
|
|
4454
|
+
r(q), G(!0);
|
|
4455
|
+
}, Jt);
|
|
4427
4456
|
return () => clearTimeout(Pe);
|
|
4428
|
-
}, [b,
|
|
4457
|
+
}, [b, M, h, r, s]), I(() => {
|
|
4429
4458
|
if (!b || !P || _.current) return;
|
|
4430
4459
|
const q = f.current;
|
|
4431
|
-
q !== null && (_.current = !0, f.current = null,
|
|
4432
|
-
}, [b, P,
|
|
4433
|
-
const ee = $(() =>
|
|
4434
|
-
D(null),
|
|
4435
|
-
}, [
|
|
4460
|
+
q !== null && (_.current = !0, f.current = null, s("user", q), r(q), G(!0), C(!1));
|
|
4461
|
+
}, [b, P, r, s]);
|
|
4462
|
+
const ee = $(() => B ? [{ id: "first-user", role: "user", text: B }, ...i] : i, [B, i]), K = ie(() => {
|
|
4463
|
+
D(null), S.current = !1, j.current = !1, d();
|
|
4464
|
+
}, [d]), me = () => {
|
|
4436
4465
|
a.onSessionStart?.();
|
|
4437
4466
|
}, ae = {
|
|
4438
4467
|
emitClientReady: (q) => {
|
|
4439
|
-
j.current = !0,
|
|
4468
|
+
j.current = !0, S.current = !0, T(q);
|
|
4440
4469
|
},
|
|
4441
4470
|
sendMessage: (q) => {
|
|
4442
4471
|
o(q);
|
|
@@ -4452,15 +4481,15 @@ function ei(a) {
|
|
|
4452
4481
|
supportsVoice: !0,
|
|
4453
4482
|
isVoiceActive: W,
|
|
4454
4483
|
chatKind: "text_and_voice"
|
|
4455
|
-
}, le = (q,
|
|
4456
|
-
me(), !
|
|
4484
|
+
}, le = (q, te) => {
|
|
4485
|
+
me(), !S.current && !j.current ? (S.current = !0, a.onStartText?.(), D(q), g.current = q, z(!0), G(!0)) : (S.current = !0, G(!0), te.sendMessage(q));
|
|
4457
4486
|
}, ce = (q) => {
|
|
4458
|
-
me(),
|
|
4459
|
-
const
|
|
4460
|
-
q.emitClientReady(
|
|
4487
|
+
me(), S.current = !0, j.current = !0, a.onStartVoice?.(), q.enableVoice();
|
|
4488
|
+
const te = a.agent.welcomeMessages?.[a.language];
|
|
4489
|
+
q.emitClientReady(te ? { welcomeMessage: te } : void 0);
|
|
4461
4490
|
}, he = (q) => {
|
|
4462
4491
|
q.isVoiceActive ? q.disableVoice() : q.enableVoice();
|
|
4463
|
-
},
|
|
4492
|
+
}, Me = {
|
|
4464
4493
|
messages: ee,
|
|
4465
4494
|
sendTextMessage: (q) => {
|
|
4466
4495
|
a.onTextSend ? a.onTextSend(q, ae) : le(q, ae);
|
|
@@ -4468,11 +4497,11 @@ function ei(a) {
|
|
|
4468
4497
|
clearMessages: K,
|
|
4469
4498
|
clearSessionHistory: u,
|
|
4470
4499
|
isAudioPlaying: l,
|
|
4471
|
-
partialTranscript:
|
|
4500
|
+
partialTranscript: c,
|
|
4472
4501
|
changeSessionLanguage: m,
|
|
4473
4502
|
error: F,
|
|
4474
|
-
isAgentThinking:
|
|
4475
|
-
isAgentSpeaking:
|
|
4503
|
+
isAgentThinking: x,
|
|
4504
|
+
isAgentSpeaking: w,
|
|
4476
4505
|
isVoiceSetupLoading: X,
|
|
4477
4506
|
isVoiceActive: W,
|
|
4478
4507
|
isSessionReady: b,
|
|
@@ -4486,122 +4515,122 @@ function ei(a) {
|
|
|
4486
4515
|
a.onVoiceToggle ? a.onVoiceToggle(ae) : he(ae);
|
|
4487
4516
|
},
|
|
4488
4517
|
signalClientReady: h,
|
|
4489
|
-
waitingForResponse:
|
|
4518
|
+
waitingForResponse: A,
|
|
4490
4519
|
sendSuggestion: (q) => {
|
|
4491
|
-
me(),
|
|
4520
|
+
me(), S.current = !0, j.current = !0, a.onStartVoice?.(), p(!0), f.current = q, C(!0);
|
|
4492
4521
|
}
|
|
4493
4522
|
};
|
|
4494
|
-
return /* @__PURE__ */
|
|
4523
|
+
return /* @__PURE__ */ t(
|
|
4495
4524
|
Ke,
|
|
4496
4525
|
{
|
|
4497
|
-
...
|
|
4526
|
+
...n,
|
|
4498
4527
|
isPreview: e,
|
|
4499
4528
|
chatKind: a.textOnly ? "text" : "text_and_voice",
|
|
4500
|
-
sdk:
|
|
4529
|
+
sdk: Me
|
|
4501
4530
|
}
|
|
4502
4531
|
);
|
|
4503
4532
|
}
|
|
4504
|
-
function
|
|
4505
|
-
const { isPreview: e = !1, agent:
|
|
4506
|
-
return fa({ isSessionReady: k, sendTextMessage: h, messages: u }), Oe({ isSessionReady: k, signalClientReady:
|
|
4533
|
+
function ei(a) {
|
|
4534
|
+
const { isPreview: e = !1, agent: n, language: i, languages: o, onLanguageChange: r, onEndSession: s, onMinimize: d, messages: l, onSendMessage: c } = a, m = s || d || re, { messages: u, sendTextMessage: h, clearMessages: F } = ge(), { changeSessionLanguage: b, clearSessionHistory: x, signalClientReady: w, error: T, isSessionReady: k, isAgentThinking: p, isAgentSpeaking: g } = pe();
|
|
4535
|
+
return fa({ isSessionReady: k, sendTextMessage: h, messages: u }), Oe({ isSessionReady: k, signalClientReady: w }), T && !e ? /* @__PURE__ */ t(ha, { message: T, language: i, onClose: m }) : /* @__PURE__ */ t(ba, { agent: n, language: i, onClose: m });
|
|
4507
4536
|
}
|
|
4508
|
-
function
|
|
4509
|
-
const
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
}, [a.defaultLanguage]),
|
|
4513
|
-
|
|
4514
|
-
}, [
|
|
4515
|
-
const u = a.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", h = $(() =>
|
|
4537
|
+
function li({ agent: a, defaultOpen: e, className: n = "", preview: i = !1, ChatBoxComponent: o }) {
|
|
4538
|
+
const r = e !== void 0 ? e : a.widget?.behavior?.default_open ?? !1, [s, d] = L.useState(r), [l, c] = L.useState(a.defaultLanguage), m = $(() => ye(a.languages, a.defaultLanguage), [a.defaultLanguage, a.languages]);
|
|
4539
|
+
L.useEffect(() => {
|
|
4540
|
+
c(a.defaultLanguage);
|
|
4541
|
+
}, [a.defaultLanguage]), L.useEffect(() => {
|
|
4542
|
+
d(r);
|
|
4543
|
+
}, [r]);
|
|
4544
|
+
const u = a.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", h = $(() => Be(a.widget?.appearance), [a.widget?.appearance]);
|
|
4516
4545
|
return /* @__PURE__ */ v(
|
|
4517
4546
|
"div",
|
|
4518
4547
|
{
|
|
4519
|
-
className: V("rqmii-chat-surface", `rqmii-theme-${u}`, i && "is-preview",
|
|
4548
|
+
className: V("rqmii-chat-surface", `rqmii-theme-${u}`, i && "is-preview", n),
|
|
4520
4549
|
"data-theme": u,
|
|
4521
4550
|
style: h,
|
|
4522
4551
|
children: [
|
|
4523
|
-
!
|
|
4524
|
-
|
|
4552
|
+
!s && /* @__PURE__ */ t(ma, { agent: a, onClick: () => d(!0), position: i ? "static" : "fixed" }),
|
|
4553
|
+
s && /* @__PURE__ */ t(o, { agent: a, language: l, languages: m, onLanguageChange: c, onClose: () => d(!1), isPreview: i })
|
|
4525
4554
|
]
|
|
4526
4555
|
}
|
|
4527
4556
|
);
|
|
4528
4557
|
}
|
|
4529
|
-
function
|
|
4530
|
-
const [
|
|
4558
|
+
function ai({ restUrl: a, identifier: e, fallbackAgent: n, withCredentials: i = !1, children: o, onError: r }) {
|
|
4559
|
+
const [s, d] = y(() => n ? ve(n) : null), [l, c] = y(null);
|
|
4531
4560
|
return I(() => {
|
|
4532
|
-
|
|
4533
|
-
}, [
|
|
4534
|
-
if (!e ||
|
|
4561
|
+
n && (d(ve(n)), c(null));
|
|
4562
|
+
}, [n]), I(() => {
|
|
4563
|
+
if (!e || n) return;
|
|
4535
4564
|
const m = new AbortController();
|
|
4536
|
-
return
|
|
4537
|
-
m.signal.aborted || (
|
|
4565
|
+
return c(null), In({ restUrl: a, identifier: e, withCredentials: i, signal: m.signal }).then(d).catch((u) => {
|
|
4566
|
+
m.signal.aborted || (n || c(u), r?.(u));
|
|
4538
4567
|
}), () => m.abort();
|
|
4539
|
-
}, [
|
|
4568
|
+
}, [n, e, r, a, i]), l ? /* @__PURE__ */ t("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: l.message || "Could not load agent" }) : s ? /* @__PURE__ */ t(Te, { children: o(s) }) : /* @__PURE__ */ t("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: "Loading" });
|
|
4540
4569
|
}
|
|
4541
|
-
function Ie({ agent: a, language: e, languages:
|
|
4542
|
-
const
|
|
4543
|
-
switch (
|
|
4570
|
+
function Ie({ agent: a, language: e, languages: n, onLanguageChange: i, onEndSession: o, onMinimize: r, onStartText: s, onStartVoice: d, textOnly: l, messages: c, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: F, autoStartVoice: b }) {
|
|
4571
|
+
const x = Ee(a), w = { agent: a, language: e, languages: n, onLanguageChange: i, onEndSession: o, onMinimize: r, messages: c, onSendMessage: m, isPreview: u, onSessionStart: h, initialText: F, autoStartVoice: b };
|
|
4572
|
+
switch (x) {
|
|
4544
4573
|
case "avatar":
|
|
4545
|
-
return /* @__PURE__ */
|
|
4574
|
+
return /* @__PURE__ */ t(ei, { ...w });
|
|
4546
4575
|
case "voice":
|
|
4547
|
-
return /* @__PURE__ */
|
|
4576
|
+
return /* @__PURE__ */ t(Zt, { ...w });
|
|
4548
4577
|
case "text_and_voice":
|
|
4549
|
-
return /* @__PURE__ */
|
|
4578
|
+
return /* @__PURE__ */ t(Xt, { ...w, onStartText: s, onStartVoice: d, textOnly: l });
|
|
4550
4579
|
case "text":
|
|
4551
4580
|
default:
|
|
4552
|
-
return /* @__PURE__ */
|
|
4581
|
+
return /* @__PURE__ */ t($t, { ...w });
|
|
4553
4582
|
}
|
|
4554
4583
|
}
|
|
4555
4584
|
function ni({
|
|
4556
4585
|
agent: a,
|
|
4557
4586
|
language: e,
|
|
4558
|
-
languages:
|
|
4587
|
+
languages: n,
|
|
4559
4588
|
startMode: i,
|
|
4560
4589
|
directive: o,
|
|
4561
|
-
open:
|
|
4562
|
-
onOpen:
|
|
4563
|
-
onLanguageChange:
|
|
4590
|
+
open: r,
|
|
4591
|
+
onOpen: s,
|
|
4592
|
+
onLanguageChange: d,
|
|
4564
4593
|
onMinimize: l,
|
|
4565
|
-
onStartNewSession:
|
|
4594
|
+
onStartNewSession: c,
|
|
4566
4595
|
onSessionStart: m,
|
|
4567
4596
|
onStartText: u,
|
|
4568
4597
|
onStartVoice: h
|
|
4569
4598
|
}) {
|
|
4570
|
-
const { connectionState: F, isConnected: b, isSessionTerminated:
|
|
4599
|
+
const { connectionState: F, isConnected: b, isSessionTerminated: x, creditExhausted: w, session: T, endSession: k, submitFeedback: p, interrupt: g } = pe(), { messages: M } = ge(), z = R(!1), f = R(null), [P, C] = y(null), [_, S] = y(0), [j, B] = y(!1), [D, A] = y(!1), [G, N] = y(!1);
|
|
4571
4600
|
I(() => {
|
|
4572
|
-
b && (
|
|
4601
|
+
b && (z.current = !0);
|
|
4573
4602
|
}, [b]), I(() => {
|
|
4574
4603
|
if (P) return;
|
|
4575
4604
|
let K = null;
|
|
4576
|
-
|
|
4605
|
+
x || F === "ended" ? K = f.current === "user" ? "user_ended" : "terminated" : F === "failed" ? w ? K = "credits_exhausted" : z.current ? K = "connection_lost" : K = "failed" : w && (K = "credits_exhausted"), K && C({
|
|
4577
4606
|
sessionId: T.sessionId,
|
|
4578
4607
|
endedBy: f.current ?? "agent",
|
|
4579
4608
|
reason: K
|
|
4580
4609
|
});
|
|
4581
|
-
}, [
|
|
4610
|
+
}, [x, F, w, T.sessionId, P]);
|
|
4582
4611
|
const Y = () => {
|
|
4583
4612
|
f.current = "user", g(), k();
|
|
4584
4613
|
}, O = P?.sessionId ?? null, U = (K) => {
|
|
4585
|
-
j || (
|
|
4586
|
-
}), G || (N(!0),
|
|
4614
|
+
j || (S(K), O && p({ sessionId: O, rating: K, endedBy: P?.endedBy }).catch(() => {
|
|
4615
|
+
}), G || (N(!0), A(!0)));
|
|
4587
4616
|
}, J = async (K) => {
|
|
4588
4617
|
if (O)
|
|
4589
4618
|
try {
|
|
4590
4619
|
await p({ sessionId: O, feedback: K, endedBy: P?.endedBy });
|
|
4591
4620
|
} catch {
|
|
4592
4621
|
}
|
|
4593
|
-
|
|
4622
|
+
B(!0), A(!1);
|
|
4594
4623
|
};
|
|
4595
|
-
if (!
|
|
4596
|
-
return /* @__PURE__ */
|
|
4624
|
+
if (!r)
|
|
4625
|
+
return /* @__PURE__ */ t(ma, { agent: a, onClick: s, active: F === "connected" });
|
|
4597
4626
|
const X = Ee(a), W = a.agentType === "cloud_avatar" || a.agentType === "desktop_avatar", ee = i === "text";
|
|
4598
|
-
return W ? /* @__PURE__ */
|
|
4627
|
+
return W ? /* @__PURE__ */ t(
|
|
4599
4628
|
Ie,
|
|
4600
4629
|
{
|
|
4601
4630
|
agent: a,
|
|
4602
4631
|
language: e,
|
|
4603
|
-
languages:
|
|
4604
|
-
onLanguageChange:
|
|
4632
|
+
languages: n,
|
|
4633
|
+
onLanguageChange: d,
|
|
4605
4634
|
onEndSession: Y,
|
|
4606
4635
|
onMinimize: l,
|
|
4607
4636
|
onSessionStart: m,
|
|
@@ -4609,43 +4638,43 @@ function ni({
|
|
|
4609
4638
|
onStartVoice: h,
|
|
4610
4639
|
textOnly: ee
|
|
4611
4640
|
}
|
|
4612
|
-
) : P ? D && O ? /* @__PURE__ */
|
|
4613
|
-
|
|
4641
|
+
) : P ? D && O ? /* @__PURE__ */ t(
|
|
4642
|
+
_t,
|
|
4614
4643
|
{
|
|
4615
4644
|
agent: a,
|
|
4616
4645
|
language: e,
|
|
4617
4646
|
rating: _,
|
|
4618
|
-
onBack: () =>
|
|
4647
|
+
onBack: () => A(!1),
|
|
4619
4648
|
onMinimize: l,
|
|
4620
4649
|
onSubmit: J
|
|
4621
4650
|
}
|
|
4622
|
-
) : /* @__PURE__ */
|
|
4623
|
-
|
|
4651
|
+
) : /* @__PURE__ */ t(
|
|
4652
|
+
Bt,
|
|
4624
4653
|
{
|
|
4625
4654
|
agent: a,
|
|
4626
4655
|
language: e,
|
|
4627
|
-
languages:
|
|
4656
|
+
languages: n,
|
|
4628
4657
|
chatKind: X === "avatar" ? "text" : X,
|
|
4629
|
-
messages:
|
|
4630
|
-
onLanguageChange:
|
|
4658
|
+
messages: M,
|
|
4659
|
+
onLanguageChange: d,
|
|
4631
4660
|
onMinimize: l,
|
|
4632
|
-
onStartNewVoice: () =>
|
|
4633
|
-
onStartNewText: (K) =>
|
|
4661
|
+
onStartNewVoice: () => c("voice"),
|
|
4662
|
+
onStartNewText: (K) => c("text", K),
|
|
4634
4663
|
rating: _,
|
|
4635
4664
|
endedBy: P.endedBy,
|
|
4636
4665
|
sessionId: O,
|
|
4637
4666
|
ratingInteractive: !j,
|
|
4638
4667
|
showTellUsMore: G && !j,
|
|
4639
4668
|
onRate: U,
|
|
4640
|
-
onTellUsMore: () =>
|
|
4669
|
+
onTellUsMore: () => A(!0)
|
|
4641
4670
|
}
|
|
4642
|
-
) : /* @__PURE__ */
|
|
4671
|
+
) : /* @__PURE__ */ t(
|
|
4643
4672
|
Ie,
|
|
4644
4673
|
{
|
|
4645
4674
|
agent: a,
|
|
4646
4675
|
language: e,
|
|
4647
|
-
languages:
|
|
4648
|
-
onLanguageChange:
|
|
4676
|
+
languages: n,
|
|
4677
|
+
onLanguageChange: d,
|
|
4649
4678
|
onEndSession: Y,
|
|
4650
4679
|
onMinimize: l,
|
|
4651
4680
|
onSessionStart: m,
|
|
@@ -4657,105 +4686,105 @@ function ni({
|
|
|
4657
4686
|
}
|
|
4658
4687
|
);
|
|
4659
4688
|
}
|
|
4660
|
-
function
|
|
4689
|
+
function ci(a) {
|
|
4661
4690
|
const {
|
|
4662
4691
|
wsUrl: e,
|
|
4663
|
-
restUrl:
|
|
4692
|
+
restUrl: n,
|
|
4664
4693
|
apiKey: i,
|
|
4665
4694
|
agentId: o,
|
|
4666
|
-
agent:
|
|
4667
|
-
language:
|
|
4668
|
-
defaultOpen:
|
|
4695
|
+
agent: r,
|
|
4696
|
+
language: s,
|
|
4697
|
+
defaultOpen: d,
|
|
4669
4698
|
open: l,
|
|
4670
|
-
className:
|
|
4699
|
+
className: c = "",
|
|
4671
4700
|
debug: m = !1,
|
|
4672
4701
|
withCredentials: u = !1,
|
|
4673
4702
|
onError: h,
|
|
4674
4703
|
onInitialized: F,
|
|
4675
4704
|
config: b,
|
|
4676
|
-
promptOverrides:
|
|
4677
|
-
clientTools:
|
|
4705
|
+
promptOverrides: x,
|
|
4706
|
+
clientTools: w,
|
|
4678
4707
|
onMinimize: T,
|
|
4679
4708
|
onOpen: k
|
|
4680
4709
|
} = a;
|
|
4681
4710
|
if ([!!i, !!o].filter(Boolean).length > 1)
|
|
4682
4711
|
throw new Error("RqmiiAgentChat: only one of apiKey, or agentId may be provided");
|
|
4683
|
-
return /* @__PURE__ */
|
|
4684
|
-
|
|
4712
|
+
return /* @__PURE__ */ t(ai, { restUrl: n, identifier: i || o, fallbackAgent: r, withCredentials: u, onError: h, children: (M) => /* @__PURE__ */ t(
|
|
4713
|
+
ti,
|
|
4685
4714
|
{
|
|
4686
4715
|
wsUrl: e,
|
|
4687
|
-
restUrl:
|
|
4716
|
+
restUrl: n,
|
|
4688
4717
|
apiKey: i,
|
|
4689
4718
|
agentId: o,
|
|
4690
|
-
agent:
|
|
4691
|
-
language:
|
|
4692
|
-
defaultOpen:
|
|
4719
|
+
agent: M,
|
|
4720
|
+
language: s,
|
|
4721
|
+
defaultOpen: d,
|
|
4693
4722
|
open: l,
|
|
4694
|
-
className:
|
|
4723
|
+
className: c,
|
|
4695
4724
|
debug: m,
|
|
4696
4725
|
withCredentials: u,
|
|
4697
4726
|
onError: h,
|
|
4698
4727
|
onInitialized: F,
|
|
4699
4728
|
config: b,
|
|
4700
|
-
promptOverrides:
|
|
4701
|
-
clientTools:
|
|
4729
|
+
promptOverrides: x,
|
|
4730
|
+
clientTools: w,
|
|
4702
4731
|
onMinimize: T,
|
|
4703
4732
|
onOpen: k
|
|
4704
4733
|
}
|
|
4705
4734
|
) });
|
|
4706
4735
|
}
|
|
4707
|
-
function
|
|
4708
|
-
const k =
|
|
4736
|
+
function ti({ wsUrl: a, restUrl: e, apiKey: n, agentId: i, agent: o, language: r, defaultOpen: s, open: d, className: l, debug: c, withCredentials: m, onError: u, onInitialized: h, config: F, promptOverrides: b, clientTools: x, onMinimize: w, onOpen: T }) {
|
|
4737
|
+
const k = s !== void 0 ? s : o.widget?.behavior?.default_open ?? !1, [p, g] = y(k), M = d !== void 0 ? d : p;
|
|
4709
4738
|
I(() => {
|
|
4710
|
-
|
|
4711
|
-
}, [k,
|
|
4712
|
-
const [
|
|
4739
|
+
d === void 0 && g(k);
|
|
4740
|
+
}, [k, d]);
|
|
4741
|
+
const [z, f] = y(!1), [P, C] = y(r || o.defaultLanguage), [_, S] = y("idle"), [j, B] = y(0), [D, A] = y(null), [G, N] = y(!1), Y = o.agentType === "cloud_avatar" || o.agentType === "desktop_avatar", O = Y, U = o.widget?.behavior?.welcome_bubble, J = o.welcomeMessages?.[P] || "", X = !M && !G && !O && !!U?.enabled && !!J.trim(), W = $(() => ye(o.languages, o.defaultLanguage), [o.defaultLanguage, o.languages]);
|
|
4713
4742
|
I(() => {
|
|
4714
4743
|
ua(o.widget?.appearance?.font);
|
|
4715
4744
|
}, [o.widget?.appearance?.font]);
|
|
4716
4745
|
const ee = $(() => _ === "text" ? { ...F ?? {}, use_voice: !1, use_text: !0 } : F, [F, _]), K = $(
|
|
4717
|
-
() =>
|
|
4746
|
+
() => Vn(o, ee),
|
|
4718
4747
|
[o, ee]
|
|
4719
|
-
), me = !O && K.useVoice, ae = Y ?
|
|
4720
|
-
...
|
|
4748
|
+
), me = !O && K.useVoice, ae = Y ? M : z, le = $(() => ({
|
|
4749
|
+
...n ? { apiKey: n } : {},
|
|
4721
4750
|
...i ? { agentId: i } : {},
|
|
4722
4751
|
language: P,
|
|
4723
4752
|
config: ee,
|
|
4724
4753
|
...b ? { promptOverrides: b } : {}
|
|
4725
|
-
}), [i,
|
|
4726
|
-
Q.current = j,
|
|
4727
|
-
const Ye =
|
|
4754
|
+
}), [i, n, P, ee, b]), ce = R(null), he = R(!1), Q = R(j), be = Q.current !== j;
|
|
4755
|
+
Q.current = j, z && (!he.current || be) && (ce.current = le), he.current = z, z || (ce.current = null);
|
|
4756
|
+
const Ye = z && ce.current ? ce.current : le;
|
|
4728
4757
|
I(() => {
|
|
4729
|
-
C(
|
|
4730
|
-
}, [o.defaultLanguage,
|
|
4731
|
-
const
|
|
4732
|
-
|
|
4758
|
+
C(r || o.defaultLanguage);
|
|
4759
|
+
}, [o.defaultLanguage, r]);
|
|
4760
|
+
const Me = $(() => u ? (fe) => {
|
|
4761
|
+
S("idle"), u(fe);
|
|
4733
4762
|
} : (fe) => {
|
|
4734
|
-
|
|
4763
|
+
S("idle");
|
|
4735
4764
|
}, [u]), q = () => {
|
|
4736
|
-
|
|
4737
|
-
},
|
|
4738
|
-
|
|
4765
|
+
S("text"), f(!0);
|
|
4766
|
+
}, te = () => {
|
|
4767
|
+
S("voice"), f(!0);
|
|
4739
4768
|
}, Pe = () => {
|
|
4740
|
-
|
|
4769
|
+
d === void 0 && g(!1), w?.();
|
|
4741
4770
|
}, ka = () => {
|
|
4742
|
-
|
|
4771
|
+
d === void 0 && g(!0), N(!0), T?.();
|
|
4743
4772
|
}, va = (fe, Fa) => {
|
|
4744
|
-
|
|
4745
|
-
}, Qe = o.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", ya = $(() =>
|
|
4746
|
-
return /* @__PURE__ */
|
|
4747
|
-
|
|
4773
|
+
A(fe === "text" ? { mode: "text", text: Fa ?? "" } : { mode: "voice" }), S(fe), f(!0), B((Ta) => Ta + 1);
|
|
4774
|
+
}, Qe = o.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", ya = $(() => Be(o.widget?.appearance), [o.widget?.appearance]);
|
|
4775
|
+
return /* @__PURE__ */ t(
|
|
4776
|
+
wa,
|
|
4748
4777
|
{
|
|
4749
4778
|
wsUrl: a,
|
|
4750
4779
|
restUrl: e,
|
|
4751
4780
|
session: Ye,
|
|
4752
4781
|
connect: ae,
|
|
4753
4782
|
enableAudio: me,
|
|
4754
|
-
debug:
|
|
4783
|
+
debug: c,
|
|
4755
4784
|
withCredentials: m,
|
|
4756
|
-
onError:
|
|
4785
|
+
onError: Me,
|
|
4757
4786
|
onInitialized: h,
|
|
4758
|
-
clientTools:
|
|
4787
|
+
clientTools: x,
|
|
4759
4788
|
children: /* @__PURE__ */ v(
|
|
4760
4789
|
"div",
|
|
4761
4790
|
{
|
|
@@ -4769,8 +4798,8 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
|
|
|
4769
4798
|
style: ya,
|
|
4770
4799
|
dir: "ltr",
|
|
4771
4800
|
children: [
|
|
4772
|
-
X && /* @__PURE__ */
|
|
4773
|
-
|
|
4801
|
+
X && /* @__PURE__ */ t(
|
|
4802
|
+
ft,
|
|
4774
4803
|
{
|
|
4775
4804
|
message: J,
|
|
4776
4805
|
delaySeconds: U?.delay_seconds ?? 3,
|
|
@@ -4780,7 +4809,7 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
|
|
|
4780
4809
|
onClick: () => N(!0)
|
|
4781
4810
|
}
|
|
4782
4811
|
),
|
|
4783
|
-
/* @__PURE__ */
|
|
4812
|
+
/* @__PURE__ */ t(
|
|
4784
4813
|
ni,
|
|
4785
4814
|
{
|
|
4786
4815
|
agent: o,
|
|
@@ -4788,14 +4817,14 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
|
|
|
4788
4817
|
languages: W,
|
|
4789
4818
|
startMode: _,
|
|
4790
4819
|
directive: D,
|
|
4791
|
-
open:
|
|
4820
|
+
open: M,
|
|
4792
4821
|
onOpen: ka,
|
|
4793
4822
|
onLanguageChange: C,
|
|
4794
4823
|
onMinimize: Pe,
|
|
4795
4824
|
onStartNewSession: va,
|
|
4796
4825
|
onSessionStart: () => f(!0),
|
|
4797
4826
|
onStartText: q,
|
|
4798
|
-
onStartVoice:
|
|
4827
|
+
onStartVoice: te
|
|
4799
4828
|
}
|
|
4800
4829
|
)
|
|
4801
4830
|
]
|
|
@@ -4805,22 +4834,22 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
|
|
|
4805
4834
|
j
|
|
4806
4835
|
);
|
|
4807
4836
|
}
|
|
4808
|
-
function
|
|
4809
|
-
const { agent: e, language:
|
|
4837
|
+
function di(a) {
|
|
4838
|
+
const { agent: e, language: n, open: i = !0, className: o = "", messages: r, onSendMessage: s, onClose: d } = a, l = $(() => ve(e), [e]), [c, m] = y(i), [u, h] = y(n || l.defaultLanguage), F = $(() => ye(l.languages, l.defaultLanguage), [l.defaultLanguage, l.languages]), b = l.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", x = $(() => Be(l.widget?.appearance), [l.widget?.appearance]);
|
|
4810
4839
|
return I(() => {
|
|
4811
|
-
|
|
4812
|
-
}, [
|
|
4840
|
+
n && h(n);
|
|
4841
|
+
}, [n]), I(() => {
|
|
4813
4842
|
m(i);
|
|
4814
4843
|
}, [i]), I(() => {
|
|
4815
4844
|
ua(l.widget?.appearance?.font);
|
|
4816
|
-
}, [l.widget?.appearance?.font]), /* @__PURE__ */
|
|
4845
|
+
}, [l.widget?.appearance?.font]), /* @__PURE__ */ t(za, { wsUrl: "", restUrl: "", enableAudio: !1, children: /* @__PURE__ */ t(
|
|
4817
4846
|
"div",
|
|
4818
4847
|
{
|
|
4819
4848
|
className: V("rqmii-chat-surface is-preview", `rqmii-theme-${b}`, o),
|
|
4820
4849
|
"data-theme": b,
|
|
4821
|
-
style:
|
|
4850
|
+
style: x,
|
|
4822
4851
|
dir: "ltr",
|
|
4823
|
-
children:
|
|
4852
|
+
children: c ? /* @__PURE__ */ t(
|
|
4824
4853
|
Ie,
|
|
4825
4854
|
{
|
|
4826
4855
|
agent: l,
|
|
@@ -4828,13 +4857,13 @@ function ui(a) {
|
|
|
4828
4857
|
languages: F,
|
|
4829
4858
|
onLanguageChange: h,
|
|
4830
4859
|
onEndSession: () => {
|
|
4831
|
-
m(!1),
|
|
4860
|
+
m(!1), d?.();
|
|
4832
4861
|
},
|
|
4833
4862
|
onMinimize: () => {
|
|
4834
|
-
m(!1),
|
|
4863
|
+
m(!1), d?.();
|
|
4835
4864
|
},
|
|
4836
|
-
messages:
|
|
4837
|
-
onSendMessage:
|
|
4865
|
+
messages: r,
|
|
4866
|
+
onSendMessage: s,
|
|
4838
4867
|
isPreview: !0
|
|
4839
4868
|
}
|
|
4840
4869
|
) : null
|
|
@@ -4842,29 +4871,29 @@ function ui(a) {
|
|
|
4842
4871
|
) });
|
|
4843
4872
|
}
|
|
4844
4873
|
export {
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4874
|
+
Kt as ConsentDialog,
|
|
4875
|
+
Bt as EndedChatPanel,
|
|
4876
|
+
hi as EpicPixelStreamingPlayer,
|
|
4877
|
+
_t as FeedbackPanel,
|
|
4878
|
+
Le as RQMII_CHAT_LANGUAGES,
|
|
4850
4879
|
Ze as RQMII_CHAT_LANGUAGE_VALUES,
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4880
|
+
Lt as RatingBar,
|
|
4881
|
+
ne as RqmiiAgentAvatar,
|
|
4882
|
+
ci as RqmiiAgentChat,
|
|
4883
|
+
di as RqmiiAgentChatPreview,
|
|
4884
|
+
wa as RqmiiAgentRoom,
|
|
4885
|
+
ei as RqmiiAvatarChatBox,
|
|
4857
4886
|
ue as RqmiiChatFooter,
|
|
4858
4887
|
ma as RqmiiChatOpenButton,
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4888
|
+
li as RqmiiChatSurface,
|
|
4889
|
+
gi as RqmiiCloudAvatarPlayer,
|
|
4890
|
+
Xt as RqmiiTextAndVoiceChatBox,
|
|
4891
|
+
$t as RqmiiTextChatBox,
|
|
4892
|
+
Zt as RqmiiVoiceChatBox,
|
|
4893
|
+
si as fetchAgentConfig,
|
|
4894
|
+
In as fetchAgentCustomization,
|
|
4866
4895
|
Je as getChatLanguage,
|
|
4867
|
-
|
|
4896
|
+
E as getChatText,
|
|
4868
4897
|
ye as normalizeChatLanguages,
|
|
4869
4898
|
ve as normalizePublicAgent,
|
|
4870
4899
|
Ee as resolveChatKind
|