@rqmii_immersive/agent-react-sdk 5.4.1 → 5.4.3
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/hooks/use-rqmii-connection.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/ui/agent-data.d.ts.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 +1036 -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 || e.welcomeMessages || {}, 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,14 @@ 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,
|
|
2879
|
+
welcome_message: G
|
|
2863
2880
|
},
|
|
2864
|
-
widget:
|
|
2881
|
+
widget: B || void 0,
|
|
2865
2882
|
consent: D ? {
|
|
2866
2883
|
enabled: D.enabled ?? !1,
|
|
2867
2884
|
title: D.title || void 0,
|
|
@@ -2873,10 +2890,10 @@ function ve(a) {
|
|
|
2873
2890
|
} : void 0
|
|
2874
2891
|
};
|
|
2875
2892
|
}
|
|
2876
|
-
async function
|
|
2893
|
+
async function In({
|
|
2877
2894
|
restUrl: a,
|
|
2878
2895
|
identifier: e,
|
|
2879
|
-
withCredentials:
|
|
2896
|
+
withCredentials: n = !1,
|
|
2880
2897
|
signal: i
|
|
2881
2898
|
}) {
|
|
2882
2899
|
if (!a) throw new Error("Missing restUrl");
|
|
@@ -2884,7 +2901,7 @@ async function It({
|
|
|
2884
2901
|
const o = await fetch(`${a}/agent/${e}/customization`, {
|
|
2885
2902
|
method: "GET",
|
|
2886
2903
|
mode: "cors",
|
|
2887
|
-
credentials:
|
|
2904
|
+
credentials: n ? "include" : "omit",
|
|
2888
2905
|
headers: {
|
|
2889
2906
|
Accept: "application/json"
|
|
2890
2907
|
},
|
|
@@ -2892,27 +2909,27 @@ async function It({
|
|
|
2892
2909
|
});
|
|
2893
2910
|
if (!o.ok)
|
|
2894
2911
|
throw new Error(`Failed to load agent customization: ${o.status}`);
|
|
2895
|
-
const
|
|
2912
|
+
const r = await o.json();
|
|
2896
2913
|
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:
|
|
2914
|
+
id: r.id,
|
|
2915
|
+
name: r.name,
|
|
2916
|
+
company_name: r.company_name,
|
|
2917
|
+
agent_type: r.agent_type,
|
|
2918
|
+
use_voice: r.use_voice,
|
|
2919
|
+
use_text: r.use_text,
|
|
2920
|
+
face_image: r.face_image,
|
|
2921
|
+
conversation: r.conversation,
|
|
2922
|
+
widget: r.widget,
|
|
2923
|
+
allow_interrupt: r.allow_interrupt,
|
|
2924
|
+
allow_welcome_message_interrupt: r.allow_welcome_message_interrupt,
|
|
2925
|
+
welcome_message: r.welcome_message
|
|
2909
2926
|
});
|
|
2910
2927
|
}
|
|
2911
|
-
async function
|
|
2928
|
+
async function si({ restUrl: a, apiKey: e, agentId: n, signal: i }) {
|
|
2912
2929
|
if (!a) throw new Error("Missing restUrl");
|
|
2913
|
-
const o = e ||
|
|
2930
|
+
const o = e || n;
|
|
2914
2931
|
if (!o) throw new Error("Provide one of apiKey or agentId");
|
|
2915
|
-
const
|
|
2932
|
+
const r = await fetch(`${a}/agent/${o}`, {
|
|
2916
2933
|
method: "GET",
|
|
2917
2934
|
mode: "cors",
|
|
2918
2935
|
credentials: "omit",
|
|
@@ -2921,21 +2938,21 @@ async function li({ restUrl: a, apiKey: e, agentId: t, signal: i }) {
|
|
|
2921
2938
|
},
|
|
2922
2939
|
signal: i
|
|
2923
2940
|
});
|
|
2924
|
-
if (!
|
|
2925
|
-
let
|
|
2941
|
+
if (!r.ok) {
|
|
2942
|
+
let s = `HTTP ${r.status}`;
|
|
2926
2943
|
try {
|
|
2927
|
-
const l = await
|
|
2928
|
-
|
|
2944
|
+
const l = await r.json();
|
|
2945
|
+
s = l?.detail || l?.message || s;
|
|
2929
2946
|
} catch {
|
|
2930
2947
|
}
|
|
2931
|
-
throw new Error(
|
|
2948
|
+
throw new Error(s);
|
|
2932
2949
|
}
|
|
2933
|
-
return ve(await
|
|
2950
|
+
return ve(await r.json());
|
|
2934
2951
|
}
|
|
2935
|
-
function
|
|
2952
|
+
function Vn(a, e) {
|
|
2936
2953
|
if (!e) return a;
|
|
2937
|
-
let { useVoice:
|
|
2938
|
-
return typeof e.use_voice == "boolean" && (
|
|
2954
|
+
let { useVoice: n, useText: i } = a;
|
|
2955
|
+
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
2956
|
}
|
|
2940
2957
|
function Ee(a) {
|
|
2941
2958
|
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 +2963,23 @@ function Ee(a) {
|
|
|
2946
2963
|
* This source code is licensed under the ISC license.
|
|
2947
2964
|
* See the LICENSE file in the root directory of this source tree.
|
|
2948
2965
|
*/
|
|
2949
|
-
const ca = (...a) => a.filter((e,
|
|
2966
|
+
const ca = (...a) => a.filter((e, n, i) => !!e && e.trim() !== "" && i.indexOf(e) === n).join(" ").trim();
|
|
2950
2967
|
/**
|
|
2951
2968
|
* @license lucide-react v1.24.0 - ISC
|
|
2952
2969
|
*
|
|
2953
2970
|
* This source code is licensed under the ISC license.
|
|
2954
2971
|
* See the LICENSE file in the root directory of this source tree.
|
|
2955
2972
|
*/
|
|
2956
|
-
const
|
|
2973
|
+
const Nn = (a) => a.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
2957
2974
|
/**
|
|
2958
2975
|
* @license lucide-react v1.24.0 - ISC
|
|
2959
2976
|
*
|
|
2960
2977
|
* This source code is licensed under the ISC license.
|
|
2961
2978
|
* See the LICENSE file in the root directory of this source tree.
|
|
2962
2979
|
*/
|
|
2963
|
-
const
|
|
2980
|
+
const jn = (a) => a.replace(
|
|
2964
2981
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
2965
|
-
(e,
|
|
2982
|
+
(e, n, i) => i ? i.toUpperCase() : n.toLowerCase()
|
|
2966
2983
|
);
|
|
2967
2984
|
/**
|
|
2968
2985
|
* @license lucide-react v1.24.0 - ISC
|
|
@@ -2971,7 +2988,7 @@ const jt = (a) => a.replace(
|
|
|
2971
2988
|
* See the LICENSE file in the root directory of this source tree.
|
|
2972
2989
|
*/
|
|
2973
2990
|
const ea = (a) => {
|
|
2974
|
-
const e =
|
|
2991
|
+
const e = jn(a);
|
|
2975
2992
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2976
2993
|
};
|
|
2977
2994
|
/**
|
|
@@ -2997,36 +3014,36 @@ var Ce = {
|
|
|
2997
3014
|
* This source code is licensed under the ISC license.
|
|
2998
3015
|
* See the LICENSE file in the root directory of this source tree.
|
|
2999
3016
|
*/
|
|
3000
|
-
const
|
|
3017
|
+
const Dn = (a) => {
|
|
3001
3018
|
for (const e in a)
|
|
3002
3019
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
3003
3020
|
return !0;
|
|
3004
3021
|
return !1;
|
|
3005
|
-
},
|
|
3006
|
-
({ color: a, size: e, strokeWidth:
|
|
3022
|
+
}, Bn = xa({}), Rn = () => Sa(Bn), Gn = la(
|
|
3023
|
+
({ color: a, size: e, strokeWidth: n, absoluteStrokeWidth: i, className: o = "", children: r, iconNode: s, ...d }, l) => {
|
|
3007
3024
|
const {
|
|
3008
|
-
size:
|
|
3025
|
+
size: c = 24,
|
|
3009
3026
|
strokeWidth: m = 2,
|
|
3010
3027
|
absoluteStrokeWidth: u = !1,
|
|
3011
3028
|
color: h = "currentColor",
|
|
3012
3029
|
className: F = ""
|
|
3013
|
-
} =
|
|
3014
|
-
return
|
|
3030
|
+
} = Rn() ?? {}, b = i ?? u ? Number(n ?? m) * 24 / Number(e ?? c) : n ?? m;
|
|
3031
|
+
return Ae(
|
|
3015
3032
|
"svg",
|
|
3016
3033
|
{
|
|
3017
3034
|
ref: l,
|
|
3018
3035
|
...Ce,
|
|
3019
|
-
width: e ??
|
|
3020
|
-
height: e ??
|
|
3036
|
+
width: e ?? c ?? Ce.width,
|
|
3037
|
+
height: e ?? c ?? Ce.height,
|
|
3021
3038
|
stroke: a ?? h,
|
|
3022
3039
|
strokeWidth: b,
|
|
3023
3040
|
className: ca("lucide", F, o),
|
|
3024
|
-
...!
|
|
3025
|
-
...
|
|
3041
|
+
...!r && !Dn(d) && { "aria-hidden": "true" },
|
|
3042
|
+
...d
|
|
3026
3043
|
},
|
|
3027
3044
|
[
|
|
3028
|
-
...
|
|
3029
|
-
...Array.isArray(
|
|
3045
|
+
...s.map(([x, w]) => Ae(x, w)),
|
|
3046
|
+
...Array.isArray(r) ? r : [r]
|
|
3030
3047
|
]
|
|
3031
3048
|
);
|
|
3032
3049
|
}
|
|
@@ -3038,19 +3055,19 @@ const Dt = (a) => {
|
|
|
3038
3055
|
* See the LICENSE file in the root directory of this source tree.
|
|
3039
3056
|
*/
|
|
3040
3057
|
const H = (a, e) => {
|
|
3041
|
-
const
|
|
3042
|
-
({ className: i, ...o },
|
|
3043
|
-
ref:
|
|
3058
|
+
const n = la(
|
|
3059
|
+
({ className: i, ...o }, r) => Ae(Gn, {
|
|
3060
|
+
ref: r,
|
|
3044
3061
|
iconNode: e,
|
|
3045
3062
|
className: ca(
|
|
3046
|
-
`lucide-${
|
|
3063
|
+
`lucide-${Nn(ea(a))}`,
|
|
3047
3064
|
`lucide-${a}`,
|
|
3048
3065
|
i
|
|
3049
3066
|
),
|
|
3050
3067
|
...o
|
|
3051
3068
|
})
|
|
3052
3069
|
);
|
|
3053
|
-
return
|
|
3070
|
+
return n.displayName = ea(a), n;
|
|
3054
3071
|
};
|
|
3055
3072
|
/**
|
|
3056
3073
|
* @license lucide-react v1.24.0 - ISC
|
|
@@ -3058,94 +3075,94 @@ const H = (a, e) => {
|
|
|
3058
3075
|
* This source code is licensed under the ISC license.
|
|
3059
3076
|
* See the LICENSE file in the root directory of this source tree.
|
|
3060
3077
|
*/
|
|
3061
|
-
const
|
|
3078
|
+
const Un = [
|
|
3062
3079
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
3063
3080
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
3064
|
-
],
|
|
3081
|
+
], Kn = H("arrow-up", Un);
|
|
3065
3082
|
/**
|
|
3066
3083
|
* @license lucide-react v1.24.0 - ISC
|
|
3067
3084
|
*
|
|
3068
3085
|
* This source code is licensed under the ISC license.
|
|
3069
3086
|
* See the LICENSE file in the root directory of this source tree.
|
|
3070
3087
|
*/
|
|
3071
|
-
const
|
|
3088
|
+
const On = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Yn = H("chevron-left", On);
|
|
3072
3089
|
/**
|
|
3073
3090
|
* @license lucide-react v1.24.0 - ISC
|
|
3074
3091
|
*
|
|
3075
3092
|
* This source code is licensed under the ISC license.
|
|
3076
3093
|
* See the LICENSE file in the root directory of this source tree.
|
|
3077
3094
|
*/
|
|
3078
|
-
const
|
|
3095
|
+
const Qn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], da = H("chevron-down", Qn);
|
|
3079
3096
|
/**
|
|
3080
3097
|
* @license lucide-react v1.24.0 - ISC
|
|
3081
3098
|
*
|
|
3082
3099
|
* This source code is licensed under the ISC license.
|
|
3083
3100
|
* See the LICENSE file in the root directory of this source tree.
|
|
3084
3101
|
*/
|
|
3085
|
-
const
|
|
3102
|
+
const Hn = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], Wn = H("chevron-up", Hn);
|
|
3086
3103
|
/**
|
|
3087
3104
|
* @license lucide-react v1.24.0 - ISC
|
|
3088
3105
|
*
|
|
3089
3106
|
* This source code is licensed under the ISC license.
|
|
3090
3107
|
* See the LICENSE file in the root directory of this source tree.
|
|
3091
3108
|
*/
|
|
3092
|
-
const $
|
|
3109
|
+
const $n = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], ze = H("loader-circle", $n);
|
|
3093
3110
|
/**
|
|
3094
3111
|
* @license lucide-react v1.24.0 - ISC
|
|
3095
3112
|
*
|
|
3096
3113
|
* This source code is licensed under the ISC license.
|
|
3097
3114
|
* See the LICENSE file in the root directory of this source tree.
|
|
3098
3115
|
*/
|
|
3099
|
-
const
|
|
3116
|
+
const Zn = [
|
|
3100
3117
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
3101
3118
|
["path", { d: "m21 3-7 7", key: "1l2asr" }],
|
|
3102
3119
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
3103
3120
|
["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
|
|
3104
|
-
],
|
|
3121
|
+
], Jn = H("maximize-2", Zn);
|
|
3105
3122
|
/**
|
|
3106
3123
|
* @license lucide-react v1.24.0 - ISC
|
|
3107
3124
|
*
|
|
3108
3125
|
* This source code is licensed under the ISC license.
|
|
3109
3126
|
* See the LICENSE file in the root directory of this source tree.
|
|
3110
3127
|
*/
|
|
3111
|
-
const
|
|
3128
|
+
const Xn = [
|
|
3112
3129
|
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
3113
3130
|
["path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33", key: "1gzdoj" }],
|
|
3114
3131
|
["path", { d: "M16.95 16.95A7 7 0 0 1 5 12v-2", key: "cqa7eg" }],
|
|
3115
3132
|
["path", { d: "M18.89 13.23A7 7 0 0 0 19 12v-2", key: "16hl24" }],
|
|
3116
3133
|
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
3117
3134
|
["path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12", key: "r2i35w" }]
|
|
3118
|
-
], Ve = H("mic-off",
|
|
3135
|
+
], Ve = H("mic-off", Xn);
|
|
3119
3136
|
/**
|
|
3120
3137
|
* @license lucide-react v1.24.0 - ISC
|
|
3121
3138
|
*
|
|
3122
3139
|
* This source code is licensed under the ISC license.
|
|
3123
3140
|
* See the LICENSE file in the root directory of this source tree.
|
|
3124
3141
|
*/
|
|
3125
|
-
const
|
|
3142
|
+
const et = [
|
|
3126
3143
|
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
3127
3144
|
["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
|
|
3128
3145
|
["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
|
|
3129
|
-
],
|
|
3146
|
+
], we = H("mic", et);
|
|
3130
3147
|
/**
|
|
3131
3148
|
* @license lucide-react v1.24.0 - ISC
|
|
3132
3149
|
*
|
|
3133
3150
|
* This source code is licensed under the ISC license.
|
|
3134
3151
|
* See the LICENSE file in the root directory of this source tree.
|
|
3135
3152
|
*/
|
|
3136
|
-
const
|
|
3153
|
+
const at = [
|
|
3137
3154
|
["path", { d: "m14 10 7-7", key: "oa77jy" }],
|
|
3138
3155
|
["path", { d: "M20 10h-6V4", key: "mjg0md" }],
|
|
3139
3156
|
["path", { d: "m3 21 7-7", key: "tjx5ai" }],
|
|
3140
3157
|
["path", { d: "M4 14h6v6", key: "rmj7iw" }]
|
|
3141
|
-
],
|
|
3158
|
+
], Se = H("minimize-2", at);
|
|
3142
3159
|
/**
|
|
3143
3160
|
* @license lucide-react v1.24.0 - ISC
|
|
3144
3161
|
*
|
|
3145
3162
|
* This source code is licensed under the ISC license.
|
|
3146
3163
|
* See the LICENSE file in the root directory of this source tree.
|
|
3147
3164
|
*/
|
|
3148
|
-
const
|
|
3165
|
+
const nt = [
|
|
3149
3166
|
[
|
|
3150
3167
|
"path",
|
|
3151
3168
|
{
|
|
@@ -3161,14 +3178,14 @@ const tn = [
|
|
|
3161
3178
|
key: "10hv5p"
|
|
3162
3179
|
}
|
|
3163
3180
|
]
|
|
3164
|
-
], Ne = H("phone-off",
|
|
3181
|
+
], Ne = H("phone-off", nt);
|
|
3165
3182
|
/**
|
|
3166
3183
|
* @license lucide-react v1.24.0 - ISC
|
|
3167
3184
|
*
|
|
3168
3185
|
* This source code is licensed under the ISC license.
|
|
3169
3186
|
* See the LICENSE file in the root directory of this source tree.
|
|
3170
3187
|
*/
|
|
3171
|
-
const
|
|
3188
|
+
const tt = [
|
|
3172
3189
|
[
|
|
3173
3190
|
"path",
|
|
3174
3191
|
{
|
|
@@ -3176,24 +3193,24 @@ const nn = [
|
|
|
3176
3193
|
key: "9njp5v"
|
|
3177
3194
|
}
|
|
3178
3195
|
]
|
|
3179
|
-
], je = H("phone",
|
|
3196
|
+
], je = H("phone", tt);
|
|
3180
3197
|
/**
|
|
3181
3198
|
* @license lucide-react v1.24.0 - ISC
|
|
3182
3199
|
*
|
|
3183
3200
|
* This source code is licensed under the ISC license.
|
|
3184
3201
|
* See the LICENSE file in the root directory of this source tree.
|
|
3185
3202
|
*/
|
|
3186
|
-
const
|
|
3203
|
+
const it = [
|
|
3187
3204
|
["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
3205
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
3189
|
-
],
|
|
3206
|
+
], ot = H("rotate-ccw", it);
|
|
3190
3207
|
/**
|
|
3191
3208
|
* @license lucide-react v1.24.0 - ISC
|
|
3192
3209
|
*
|
|
3193
3210
|
* This source code is licensed under the ISC license.
|
|
3194
3211
|
* See the LICENSE file in the root directory of this source tree.
|
|
3195
3212
|
*/
|
|
3196
|
-
const
|
|
3213
|
+
const rt = [
|
|
3197
3214
|
[
|
|
3198
3215
|
"path",
|
|
3199
3216
|
{
|
|
@@ -3201,43 +3218,43 @@ const rn = [
|
|
|
3201
3218
|
key: "r04s7s"
|
|
3202
3219
|
}
|
|
3203
3220
|
]
|
|
3204
|
-
],
|
|
3221
|
+
], st = H("star", rt);
|
|
3205
3222
|
/**
|
|
3206
3223
|
* @license lucide-react v1.24.0 - ISC
|
|
3207
3224
|
*
|
|
3208
3225
|
* This source code is licensed under the ISC license.
|
|
3209
3226
|
* See the LICENSE file in the root directory of this source tree.
|
|
3210
3227
|
*/
|
|
3211
|
-
const
|
|
3228
|
+
const lt = [
|
|
3212
3229
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
3213
3230
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
3214
|
-
], De = H("x",
|
|
3215
|
-
},
|
|
3231
|
+
], De = H("x", lt), re = () => {
|
|
3232
|
+
}, ct = 767;
|
|
3216
3233
|
function _e() {
|
|
3217
|
-
return typeof window < "u" && window.innerWidth <=
|
|
3234
|
+
return typeof window < "u" && window.innerWidth <= ct;
|
|
3218
3235
|
}
|
|
3219
3236
|
function V(...a) {
|
|
3220
3237
|
return a.filter(Boolean).join(" ");
|
|
3221
3238
|
}
|
|
3222
|
-
function
|
|
3239
|
+
function dt(a) {
|
|
3223
3240
|
const e = (a || "").trim().toLowerCase().replace(/[-_]/g, " ");
|
|
3224
3241
|
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
3242
|
}
|
|
3226
3243
|
function aa(a) {
|
|
3227
3244
|
if (!a) return "#ffffff";
|
|
3228
3245
|
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(
|
|
3246
|
+
let n = e;
|
|
3247
|
+
if (e.length === 3 && (n = e.split("").map((d) => d + d).join("")), n.length < 6) return "#ffffff";
|
|
3248
|
+
const i = parseInt(n.substring(0, 2), 16), o = parseInt(n.substring(2, 4), 16), r = parseInt(n.substring(4, 6), 16);
|
|
3249
|
+
return Number.isNaN(i) || Number.isNaN(o) || Number.isNaN(r) ? "#ffffff" : (i * 299 + o * 587 + r * 114) / 1e3 >= 128 ? "#000000" : "#ffffff";
|
|
3233
3250
|
}
|
|
3234
|
-
function
|
|
3251
|
+
function Be(a) {
|
|
3235
3252
|
const e = {
|
|
3236
|
-
"--rqmii-font-family":
|
|
3237
|
-
},
|
|
3238
|
-
if (
|
|
3239
|
-
const o = aa(
|
|
3240
|
-
e["--rqmii-accent"] =
|
|
3253
|
+
"--rqmii-font-family": dt(a?.font)
|
|
3254
|
+
}, n = a?.theme?.accent_color?.trim();
|
|
3255
|
+
if (n) {
|
|
3256
|
+
const o = aa(n);
|
|
3257
|
+
e["--rqmii-accent"] = n, e["--rqmii-accent-text"] = o, e["--rqmii-message-user"] = n, e["--rqmii-message-user-text"] = o;
|
|
3241
3258
|
}
|
|
3242
3259
|
const i = a?.theme?.end_call_button_color?.trim();
|
|
3243
3260
|
if (i) {
|
|
@@ -3246,13 +3263,13 @@ function Re(a) {
|
|
|
3246
3263
|
}
|
|
3247
3264
|
return e;
|
|
3248
3265
|
}
|
|
3249
|
-
function
|
|
3266
|
+
function ut(a) {
|
|
3250
3267
|
const e = (a || "").trim().toLowerCase().replace(/[-_]/g, " ");
|
|
3251
3268
|
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
3269
|
}
|
|
3253
3270
|
function ua(a) {
|
|
3254
3271
|
if (typeof document > "u") return;
|
|
3255
|
-
const e =
|
|
3272
|
+
const e = ut(a);
|
|
3256
3273
|
if (document.querySelector(`link[data-rqmii-font="${e}"]`)) return;
|
|
3257
3274
|
const i = document.createElement("link");
|
|
3258
3275
|
i.rel = "stylesheet", i.href = e, i.setAttribute("data-rqmii-font", e), document.head.appendChild(i);
|
|
@@ -3260,195 +3277,208 @@ function ua(a) {
|
|
|
3260
3277
|
function Z(a) {
|
|
3261
3278
|
return "";
|
|
3262
3279
|
}
|
|
3263
|
-
function
|
|
3280
|
+
function oe(a) {
|
|
3264
3281
|
return a.startsWith("ar") || ["fa", "ur", "he"].includes(a) ? "rtl" : "ltr";
|
|
3265
3282
|
}
|
|
3266
|
-
function
|
|
3267
|
-
const e = Math.floor(a / 60).toString().padStart(2, "0"),
|
|
3268
|
-
return `${e}:${
|
|
3283
|
+
function Re(a) {
|
|
3284
|
+
const e = Math.floor(a / 60).toString().padStart(2, "0"), n = (a % 60).toString().padStart(2, "0");
|
|
3285
|
+
return `${e}:${n}`;
|
|
3269
3286
|
}
|
|
3270
|
-
function
|
|
3271
|
-
const [e,
|
|
3287
|
+
function mt(a = !0) {
|
|
3288
|
+
const [e, n] = y(0);
|
|
3272
3289
|
return I(() => {
|
|
3273
3290
|
if (!a) return;
|
|
3274
|
-
const i = setInterval(() =>
|
|
3291
|
+
const i = setInterval(() => n((o) => o + 1), 1e3);
|
|
3275
3292
|
return () => clearInterval(i);
|
|
3276
3293
|
}, [a]), e;
|
|
3277
3294
|
}
|
|
3278
|
-
function
|
|
3295
|
+
function ht() {
|
|
3279
3296
|
const [a, e] = y(null);
|
|
3280
3297
|
return I(() => {
|
|
3281
|
-
const
|
|
3282
|
-
if (!
|
|
3283
|
-
const i = () => e(
|
|
3284
|
-
return i(),
|
|
3285
|
-
|
|
3298
|
+
const n = window.visualViewport;
|
|
3299
|
+
if (!n) return;
|
|
3300
|
+
const i = () => e(n.height);
|
|
3301
|
+
return i(), n.addEventListener("resize", i), n.addEventListener("scroll", i), () => {
|
|
3302
|
+
n.removeEventListener("resize", i), n.removeEventListener("scroll", i);
|
|
3286
3303
|
};
|
|
3287
3304
|
}, []), a;
|
|
3288
3305
|
}
|
|
3289
|
-
function
|
|
3290
|
-
const
|
|
3291
|
-
|
|
3306
|
+
function gt(a, e) {
|
|
3307
|
+
const n = R([]);
|
|
3308
|
+
n.current = a.match(/\S+\s*/g) || [a];
|
|
3292
3309
|
const [i, o] = y(
|
|
3293
|
-
() => e ? Math.min(1,
|
|
3310
|
+
() => e ? Math.min(1, n.current.length) : n.current.length
|
|
3294
3311
|
);
|
|
3295
3312
|
return I(() => {
|
|
3296
3313
|
if (!e || !a) {
|
|
3297
|
-
o(
|
|
3314
|
+
o(n.current.length);
|
|
3298
3315
|
return;
|
|
3299
3316
|
}
|
|
3300
|
-
if (o((
|
|
3301
|
-
const
|
|
3302
|
-
o((
|
|
3317
|
+
if (o((s) => Math.max(1, s)), n.current.length <= 1) return;
|
|
3318
|
+
const r = setInterval(() => {
|
|
3319
|
+
o((s) => s >= n.current.length ? (clearInterval(r), s) : s + 1);
|
|
3303
3320
|
}, 50);
|
|
3304
|
-
return () => clearInterval(
|
|
3305
|
-
}, [a, e]),
|
|
3321
|
+
return () => clearInterval(r);
|
|
3322
|
+
}, [a, e]), n.current.slice(0, i).join("");
|
|
3306
3323
|
}
|
|
3307
|
-
const
|
|
3308
|
-
const [o,
|
|
3324
|
+
const pt = L.lazy(() => import("./Orb-BLYExpBk.js").then((a) => ({ default: a.RqmiiOrb }))), Ge = L.memo(function({ language: e, languages: n, onChange: i }) {
|
|
3325
|
+
const [o, r] = y(!1), s = R(null), d = Je(e), l = ye(n, e).map((c) => Je(c)).filter(Boolean);
|
|
3309
3326
|
return I(() => {
|
|
3310
3327
|
if (!o) return;
|
|
3311
|
-
const
|
|
3312
|
-
|
|
3328
|
+
const c = (m) => {
|
|
3329
|
+
s.current?.contains(m.target) || r(!1);
|
|
3313
3330
|
};
|
|
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__ */
|
|
3331
|
+
return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
|
|
3332
|
+
}, [o]), /* @__PURE__ */ v("div", { className: "rqmii-chat-language", ref: s, children: [
|
|
3333
|
+
/* @__PURE__ */ v("button", { type: "button", className: "rqmii-chat-pill", onClick: () => r((c) => !c), children: [
|
|
3334
|
+
/* @__PURE__ */ t("span", { children: d?.label || e }),
|
|
3335
|
+
/* @__PURE__ */ t(da, { size: 16 })
|
|
3319
3336
|
] }),
|
|
3320
|
-
o && l.length > 1 && /* @__PURE__ */
|
|
3337
|
+
o && l.length > 1 && /* @__PURE__ */ t("div", { className: "rqmii-chat-language-menu", children: l.map((c) => /* @__PURE__ */ t(
|
|
3321
3338
|
"button",
|
|
3322
3339
|
{
|
|
3323
3340
|
type: "button",
|
|
3324
|
-
className: V("rqmii-chat-language-item",
|
|
3341
|
+
className: V("rqmii-chat-language-item", c.value === e && "is-selected"),
|
|
3325
3342
|
onClick: () => {
|
|
3326
|
-
i(
|
|
3343
|
+
i(c.value), r(!1);
|
|
3327
3344
|
},
|
|
3328
|
-
children:
|
|
3345
|
+
children: c.label
|
|
3329
3346
|
},
|
|
3330
|
-
|
|
3347
|
+
c.value
|
|
3331
3348
|
)) })
|
|
3332
3349
|
] });
|
|
3333
|
-
}), ue =
|
|
3334
|
-
const o = i?.widget?.appearance,
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3350
|
+
}), ue = L.memo(function({ language: e = "en", brand: n = "rqmii", agent: i }) {
|
|
3351
|
+
const o = i?.widget?.appearance, r = o?.show_branding !== !1, s = o?.footer_content?.[e], d = !!s?.trim();
|
|
3352
|
+
if (!r && !d) return /* @__PURE__ */ t("div", { style: { padding: 11 } });
|
|
3353
|
+
const l = E(e, "poweredBy"), c = oe(e);
|
|
3354
|
+
return /* @__PURE__ */ v("div", { className: "rqmii-chat-footer", dir: c, children: [
|
|
3355
|
+
r && (() => {
|
|
3356
|
+
if (l.includes("{brand}")) {
|
|
3357
|
+
const u = l.split("{brand}");
|
|
3358
|
+
return /* @__PURE__ */ v("p", { dir: c, children: [
|
|
3359
|
+
u[0],
|
|
3360
|
+
/* @__PURE__ */ t("strong", { children: n }),
|
|
3361
|
+
u[1]
|
|
3362
|
+
] });
|
|
3363
|
+
}
|
|
3364
|
+
return /* @__PURE__ */ v("p", { dir: c, children: [
|
|
3365
|
+
l,
|
|
3366
|
+
" ",
|
|
3367
|
+
/* @__PURE__ */ t("strong", { children: n })
|
|
3368
|
+
] });
|
|
3369
|
+
})(),
|
|
3370
|
+
d && /* @__PURE__ */ t("p", { dir: c, children: s })
|
|
3341
3371
|
] });
|
|
3342
|
-
}),
|
|
3372
|
+
}), ne = L.memo(function({
|
|
3343
3373
|
agent: e,
|
|
3344
|
-
size:
|
|
3374
|
+
size: n = "large",
|
|
3345
3375
|
active: i = !1,
|
|
3346
3376
|
className: o = ""
|
|
3347
3377
|
}) {
|
|
3348
|
-
const
|
|
3349
|
-
return /* @__PURE__ */
|
|
3378
|
+
const r = e?.faceImage, s = !r || r === "orb";
|
|
3379
|
+
return /* @__PURE__ */ t(
|
|
3350
3380
|
"div",
|
|
3351
3381
|
{
|
|
3352
3382
|
className: V(
|
|
3353
3383
|
"rqmii-agent-avatar",
|
|
3354
|
-
`rqmii-agent-avatar--${
|
|
3384
|
+
`rqmii-agent-avatar--${n}`,
|
|
3355
3385
|
i && "is-active",
|
|
3356
|
-
|
|
3386
|
+
s && "is-orb",
|
|
3357
3387
|
o
|
|
3358
3388
|
),
|
|
3359
|
-
children:
|
|
3389
|
+
children: s ? /* @__PURE__ */ t(L.Suspense, { fallback: null, children: /* @__PURE__ */ t(pt, { className: "rqmii-agent-avatar-orb" }) }) : /* @__PURE__ */ t(
|
|
3360
3390
|
"img",
|
|
3361
3391
|
{
|
|
3362
|
-
src:
|
|
3392
|
+
src: r,
|
|
3363
3393
|
alt: e?.name || "Agent"
|
|
3364
3394
|
}
|
|
3365
3395
|
)
|
|
3366
3396
|
}
|
|
3367
3397
|
);
|
|
3368
|
-
}), ma =
|
|
3369
|
-
return /* @__PURE__ */
|
|
3398
|
+
}), ma = L.memo(function({ agent: e, onClick: n, className: i = "", position: o = "fixed", active: r = !1 }) {
|
|
3399
|
+
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
3400
|
});
|
|
3371
|
-
function
|
|
3401
|
+
function bt() {
|
|
3372
3402
|
try {
|
|
3373
3403
|
const a = window.AudioContext || window.webkitAudioContext;
|
|
3374
3404
|
if (!a) return;
|
|
3375
|
-
const e = new a(),
|
|
3376
|
-
i.type = "sine", i.frequency.setValueAtTime(880,
|
|
3405
|
+
const e = new a(), n = e.currentTime, i = e.createOscillator(), o = e.createGain();
|
|
3406
|
+
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
3407
|
e.close();
|
|
3378
3408
|
};
|
|
3379
3409
|
} catch {
|
|
3380
3410
|
}
|
|
3381
3411
|
}
|
|
3382
|
-
const
|
|
3383
|
-
const [
|
|
3412
|
+
const ft = L.memo(function({ message: e, delaySeconds: n, soundEnabled: i, language: o, buttonPosition: r = "right", onClick: s }) {
|
|
3413
|
+
const [d, l] = y(!1), c = e.trim();
|
|
3384
3414
|
return I(() => {
|
|
3385
|
-
if (!
|
|
3415
|
+
if (!c) return;
|
|
3386
3416
|
const u = setTimeout(() => {
|
|
3387
|
-
l(!0), i &&
|
|
3388
|
-
}, Math.max(0,
|
|
3417
|
+
l(!0), i && bt();
|
|
3418
|
+
}, Math.max(0, n) * 1e3);
|
|
3389
3419
|
return () => clearTimeout(u);
|
|
3390
|
-
}, [
|
|
3420
|
+
}, [c, n, i]), !d || !c ? null : /* @__PURE__ */ t(
|
|
3391
3421
|
"button",
|
|
3392
3422
|
{
|
|
3393
3423
|
type: "button",
|
|
3394
|
-
className: V("rqmii-chat-welcome-bubble",
|
|
3395
|
-
dir:
|
|
3396
|
-
onClick:
|
|
3397
|
-
"aria-label":
|
|
3398
|
-
children:
|
|
3424
|
+
className: V("rqmii-chat-welcome-bubble", r === "right" ? "is-right" : "is-left", Z()),
|
|
3425
|
+
dir: oe(o),
|
|
3426
|
+
onClick: s,
|
|
3427
|
+
"aria-label": c,
|
|
3428
|
+
children: c
|
|
3399
3429
|
}
|
|
3400
3430
|
);
|
|
3401
|
-
}),
|
|
3402
|
-
const [
|
|
3403
|
-
const u =
|
|
3404
|
-
!u || o || (i(u),
|
|
3431
|
+
}), xe = L.memo(function({ language: e, placeholder: n, onSend: i, disabled: o = !1, variant: r = "text" }) {
|
|
3432
|
+
const [s, d] = y(""), l = R(null), c = 168, m = () => {
|
|
3433
|
+
const u = s.trim();
|
|
3434
|
+
!u || o || (i(u), d(""), l.current && (l.current.style.height = "auto"));
|
|
3405
3435
|
};
|
|
3406
|
-
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-input", Z(),
|
|
3407
|
-
/* @__PURE__ */
|
|
3436
|
+
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-input", Z(), r === "voice" && "is-voice"), children: [
|
|
3437
|
+
/* @__PURE__ */ t(
|
|
3408
3438
|
"textarea",
|
|
3409
3439
|
{
|
|
3410
3440
|
ref: l,
|
|
3411
|
-
value:
|
|
3441
|
+
value: s,
|
|
3412
3442
|
disabled: o,
|
|
3413
|
-
rows:
|
|
3414
|
-
dir:
|
|
3415
|
-
placeholder:
|
|
3443
|
+
rows: r === "compact" ? 2 : 3,
|
|
3444
|
+
dir: oe(e),
|
|
3445
|
+
placeholder: n || E(e, "sendMessage"),
|
|
3416
3446
|
onChange: (u) => {
|
|
3417
|
-
|
|
3447
|
+
d(u.target.value);
|
|
3418
3448
|
const h = l.current;
|
|
3419
|
-
h && (h.style.height = "auto", h.style.height = `${Math.min(h.scrollHeight,
|
|
3449
|
+
h && (h.style.height = "auto", h.style.height = `${Math.min(h.scrollHeight, c)}px`);
|
|
3420
3450
|
},
|
|
3421
3451
|
onKeyDown: (u) => {
|
|
3422
3452
|
u.key === "Enter" && !u.shiftKey && (u.preventDefault(), m());
|
|
3423
3453
|
}
|
|
3424
3454
|
}
|
|
3425
3455
|
),
|
|
3426
|
-
/* @__PURE__ */
|
|
3456
|
+
/* @__PURE__ */ t("button", { type: "button", onClick: m, disabled: !s.trim() || o, "aria-label": E(e, "send"), children: /* @__PURE__ */ t(Kn, { size: 20 }) })
|
|
3427
3457
|
] });
|
|
3428
|
-
}),
|
|
3429
|
-
const i =
|
|
3430
|
-
return /* @__PURE__ */
|
|
3431
|
-
}), qe = 133,
|
|
3432
|
-
function
|
|
3433
|
-
return typeof window > "u" ? qe : window.innerWidth <=
|
|
3458
|
+
}), kt = L.memo(function({ text: e, streaming: n }) {
|
|
3459
|
+
const i = gt(e, n);
|
|
3460
|
+
return /* @__PURE__ */ t(Te, { children: i });
|
|
3461
|
+
}), qe = 133, vt = qe + 44, yt = 767, ke = 36, Ft = 8, na = ke + Ft;
|
|
3462
|
+
function Tt() {
|
|
3463
|
+
return typeof window > "u" ? qe : window.innerWidth <= yt ? vt : qe;
|
|
3434
3464
|
}
|
|
3435
|
-
function
|
|
3465
|
+
function Et(a) {
|
|
3436
3466
|
return a === "rtl" ? "right" : "left";
|
|
3437
3467
|
}
|
|
3438
|
-
function
|
|
3468
|
+
function zt(a, e, n, i) {
|
|
3439
3469
|
if (!a.length) return null;
|
|
3440
|
-
const o = Math.max(...a.map((
|
|
3441
|
-
return
|
|
3470
|
+
const o = Math.max(...a.map((s) => s.offsetTop)), r = a.filter((s) => s.offsetTop >= o - 0.5);
|
|
3471
|
+
return n === "right" ? r.find((s) => s.offsetLeft + s.offsetWidth > e - i) || null : r.find((s) => s.offsetLeft < i) || null;
|
|
3442
3472
|
}
|
|
3443
|
-
function
|
|
3473
|
+
function ta(a, e, n, i) {
|
|
3444
3474
|
for (let o = 0; o < 2; o++) {
|
|
3445
|
-
const
|
|
3446
|
-
if (!
|
|
3447
|
-
|
|
3475
|
+
const r = zt(a, e, n, i);
|
|
3476
|
+
if (!r) break;
|
|
3477
|
+
n === "right" ? r.style.marginRight = `${i}px` : r.style.marginLeft = `${i}px`, r.style.maxWidth = `calc(100% - ${i}px)`;
|
|
3448
3478
|
}
|
|
3449
3479
|
}
|
|
3450
|
-
const
|
|
3451
|
-
const [o,
|
|
3480
|
+
const wt = L.memo(function({ suggestions: e, language: n, onClick: i }) {
|
|
3481
|
+
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
3482
|
T.forEach((k) => {
|
|
3453
3483
|
k && (k.style.maxWidth = "", k.style.marginRight = "", k.style.marginLeft = "");
|
|
3454
3484
|
});
|
|
@@ -3458,11 +3488,11 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
|
|
|
3458
3488
|
if (!T || o) return;
|
|
3459
3489
|
const k = () => {
|
|
3460
3490
|
const g = F.current;
|
|
3461
|
-
|
|
3462
|
-
const
|
|
3491
|
+
w(g);
|
|
3492
|
+
const M = T.clientWidth, z = Tt(), f = () => {
|
|
3463
3493
|
for (let C = 0; C < g.length; C++) {
|
|
3464
3494
|
const _ = g[C];
|
|
3465
|
-
if (_ && _.offsetTop + _.offsetHeight >
|
|
3495
|
+
if (_ && _.offsetTop + _.offsetHeight > z + 0.5)
|
|
3466
3496
|
return C;
|
|
3467
3497
|
}
|
|
3468
3498
|
return null;
|
|
@@ -3470,15 +3500,15 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
|
|
|
3470
3500
|
let P = f();
|
|
3471
3501
|
if (P !== null)
|
|
3472
3502
|
for (let C = 0; C <= g.length; C++) {
|
|
3473
|
-
|
|
3503
|
+
w(g);
|
|
3474
3504
|
const _ = g.slice(0, P).filter((j) => !!j);
|
|
3475
|
-
|
|
3476
|
-
const
|
|
3477
|
-
if (
|
|
3478
|
-
P =
|
|
3505
|
+
ta(_, M, x, na);
|
|
3506
|
+
const S = f();
|
|
3507
|
+
if (S === null || S >= P) break;
|
|
3508
|
+
P = S;
|
|
3479
3509
|
}
|
|
3480
|
-
if (
|
|
3481
|
-
const C = g.slice(0, P).filter((
|
|
3510
|
+
if (c(P), d(P !== null), P !== null) {
|
|
3511
|
+
const C = g.slice(0, P).filter((S) => !!S), _ = C.length ? Math.max(...C.map((S) => S.offsetTop + S.offsetHeight)) : ke;
|
|
3482
3512
|
u(_ - ke);
|
|
3483
3513
|
} else
|
|
3484
3514
|
u(null);
|
|
@@ -3486,21 +3516,21 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
|
|
|
3486
3516
|
k();
|
|
3487
3517
|
const p = typeof ResizeObserver < "u" ? new ResizeObserver(k) : null;
|
|
3488
3518
|
return p?.observe(T), () => {
|
|
3489
|
-
p?.disconnect(),
|
|
3519
|
+
p?.disconnect(), w(F.current);
|
|
3490
3520
|
};
|
|
3491
|
-
}, [e, o,
|
|
3521
|
+
}, [e, o, x]), We(() => {
|
|
3492
3522
|
const T = h.current;
|
|
3493
3523
|
if (!T || !o) return;
|
|
3494
3524
|
const k = F.current.filter((g) => !!g);
|
|
3495
|
-
|
|
3525
|
+
w(F.current), ta(k, T.clientWidth, x, na);
|
|
3496
3526
|
const p = k.length ? Math.max(...k.map((g) => g.offsetTop + g.offsetHeight)) : ke;
|
|
3497
3527
|
return u(p - ke), () => {
|
|
3498
|
-
|
|
3528
|
+
w(F.current);
|
|
3499
3529
|
};
|
|
3500
|
-
}, [o, e,
|
|
3530
|
+
}, [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
3531
|
e.map((T, k) => {
|
|
3502
3532
|
const p = !o && l !== null && k >= l;
|
|
3503
|
-
return /* @__PURE__ */
|
|
3533
|
+
return /* @__PURE__ */ t(
|
|
3504
3534
|
"button",
|
|
3505
3535
|
{
|
|
3506
3536
|
ref: (g) => {
|
|
@@ -3517,225 +3547,225 @@ const xn = A.memo(function({ suggestions: e, language: t, onClick: i }) {
|
|
|
3517
3547
|
k
|
|
3518
3548
|
);
|
|
3519
3549
|
}),
|
|
3520
|
-
|
|
3550
|
+
s && /* @__PURE__ */ t(
|
|
3521
3551
|
"button",
|
|
3522
3552
|
{
|
|
3523
3553
|
type: "button",
|
|
3524
|
-
className: V("rqmii-suggested-messages-toggle",
|
|
3554
|
+
className: V("rqmii-suggested-messages-toggle", x === "left" && "is-start-left"),
|
|
3525
3555
|
style: m != null ? { top: m, bottom: "auto" } : void 0,
|
|
3526
|
-
onClick: () =>
|
|
3556
|
+
onClick: () => r((T) => (T && h.current && (h.current.scrollTop = 0), !T)),
|
|
3527
3557
|
"aria-label": o ? "Show less" : "Show more",
|
|
3528
3558
|
"aria-expanded": o,
|
|
3529
|
-
children: o ? /* @__PURE__ */
|
|
3559
|
+
children: o ? /* @__PURE__ */ t(Wn, { size: 14 }) : /* @__PURE__ */ t(da, { size: 14 })
|
|
3530
3560
|
}
|
|
3531
3561
|
)
|
|
3532
3562
|
] }) }) : null;
|
|
3533
|
-
}),
|
|
3534
|
-
const
|
|
3535
|
-
return /* @__PURE__ */
|
|
3536
|
-
/* @__PURE__ */
|
|
3537
|
-
/* @__PURE__ */
|
|
3538
|
-
/* @__PURE__ */
|
|
3563
|
+
}), St = L.memo(function({ language: e }) {
|
|
3564
|
+
const n = oe(e || "en");
|
|
3565
|
+
return /* @__PURE__ */ t("div", { className: "rqmii-chat-message-row", children: /* @__PURE__ */ v("div", { className: "rqmii-chat-message rqmii-chat-typing-indicator", dir: n, children: [
|
|
3566
|
+
/* @__PURE__ */ t("span", { className: "rqmii-chat-typing-dot" }),
|
|
3567
|
+
/* @__PURE__ */ t("span", { className: "rqmii-chat-typing-dot" }),
|
|
3568
|
+
/* @__PURE__ */ t("span", { className: "rqmii-chat-typing-dot" })
|
|
3539
3569
|
] }) });
|
|
3540
3570
|
});
|
|
3541
|
-
function
|
|
3571
|
+
function xt(a) {
|
|
3542
3572
|
return a === "message";
|
|
3543
3573
|
}
|
|
3544
|
-
const
|
|
3574
|
+
const Mt = {
|
|
3545
3575
|
name: "leadFormName",
|
|
3546
3576
|
email: "leadFormEmail",
|
|
3547
3577
|
phone: "leadFormPhone",
|
|
3548
3578
|
message: "leadFormMessage"
|
|
3549
|
-
},
|
|
3550
|
-
const
|
|
3551
|
-
const g =
|
|
3552
|
-
return `${g ?
|
|
3579
|
+
}, Pt = L.memo(function({ messageId: e, form: n, language: i, textDirection: o, formSubmitted: r }) {
|
|
3580
|
+
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) => {
|
|
3581
|
+
const g = Mt[p.key];
|
|
3582
|
+
return `${g ? E(i, g) : p.label}${p.required ? "*" : ""}`;
|
|
3553
3583
|
}, T = (p, g) => {
|
|
3554
|
-
l((
|
|
3584
|
+
l((M) => ({ ...M, [p]: g })), F && b(null);
|
|
3555
3585
|
}, k = async (p) => {
|
|
3556
|
-
if (p.preventDefault(),
|
|
3557
|
-
if (
|
|
3558
|
-
b(
|
|
3586
|
+
if (p.preventDefault(), c || u) return;
|
|
3587
|
+
if (n.fields.some((z) => z.required && !d[z.key]?.trim())) {
|
|
3588
|
+
b(E(i, "leadFormRequiredError"));
|
|
3559
3589
|
return;
|
|
3560
3590
|
}
|
|
3561
|
-
const
|
|
3562
|
-
for (const
|
|
3563
|
-
const f =
|
|
3564
|
-
f && (
|
|
3591
|
+
const M = {};
|
|
3592
|
+
for (const z of n.fields) {
|
|
3593
|
+
const f = d[z.key]?.trim();
|
|
3594
|
+
f && (M[z.key] = f);
|
|
3565
3595
|
}
|
|
3566
3596
|
m(!0), b(null);
|
|
3567
3597
|
try {
|
|
3568
|
-
await
|
|
3569
|
-
|
|
3570
|
-
(
|
|
3598
|
+
await s.submitLead({ agentId: n.agentId, collectedData: M }), h(!0), s.setMessages(
|
|
3599
|
+
s.messages.map(
|
|
3600
|
+
(z) => z.id === e ? { ...z, formSubmitted: !0 } : z
|
|
3571
3601
|
)
|
|
3572
3602
|
);
|
|
3573
|
-
} catch (
|
|
3574
|
-
b(
|
|
3603
|
+
} catch (z) {
|
|
3604
|
+
b(z?.message || E(i, "leadFormGenericError"));
|
|
3575
3605
|
} finally {
|
|
3576
3606
|
m(!1);
|
|
3577
3607
|
}
|
|
3578
3608
|
};
|
|
3579
|
-
return u ? /* @__PURE__ */
|
|
3580
|
-
/* @__PURE__ */
|
|
3581
|
-
|
|
3582
|
-
const g =
|
|
3583
|
-
return
|
|
3609
|
+
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: [
|
|
3610
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-lead-form-title", children: x }),
|
|
3611
|
+
n.fields.map((p) => {
|
|
3612
|
+
const g = w(p), M = p.type === "email" ? "email" : p.type === "date" ? "date" : "text";
|
|
3613
|
+
return xt(p.key) ? /* @__PURE__ */ t(
|
|
3584
3614
|
"textarea",
|
|
3585
3615
|
{
|
|
3586
3616
|
className: "rqmii-chat-lead-form-input rqmii-chat-lead-form-textarea",
|
|
3587
3617
|
placeholder: g,
|
|
3588
|
-
value:
|
|
3589
|
-
onChange: (
|
|
3590
|
-
disabled:
|
|
3618
|
+
value: d[p.key] || "",
|
|
3619
|
+
onChange: (z) => T(p.key, z.target.value),
|
|
3620
|
+
disabled: c,
|
|
3591
3621
|
rows: 4
|
|
3592
3622
|
},
|
|
3593
3623
|
p.key
|
|
3594
|
-
) : /* @__PURE__ */
|
|
3624
|
+
) : /* @__PURE__ */ t(
|
|
3595
3625
|
"input",
|
|
3596
3626
|
{
|
|
3597
3627
|
className: "rqmii-chat-lead-form-input",
|
|
3598
|
-
type:
|
|
3628
|
+
type: M,
|
|
3599
3629
|
placeholder: g,
|
|
3600
|
-
value:
|
|
3601
|
-
onChange: (
|
|
3602
|
-
disabled:
|
|
3630
|
+
value: d[p.key] || "",
|
|
3631
|
+
onChange: (z) => T(p.key, z.target.value),
|
|
3632
|
+
disabled: c
|
|
3603
3633
|
},
|
|
3604
3634
|
p.key
|
|
3605
3635
|
);
|
|
3606
3636
|
}),
|
|
3607
|
-
F && /* @__PURE__ */
|
|
3608
|
-
/* @__PURE__ */
|
|
3637
|
+
F && /* @__PURE__ */ t("div", { className: "rqmii-chat-lead-form-error", children: F }),
|
|
3638
|
+
/* @__PURE__ */ t("button", { type: "submit", className: "rqmii-chat-lead-form-submit", disabled: c, children: c ? E(i, "loading") : E(i, "submit") })
|
|
3609
3639
|
] }) });
|
|
3610
|
-
}),
|
|
3640
|
+
}), Ct = L.memo(function({ message: e, textDirection: n, language: i }) {
|
|
3611
3641
|
if (e.role === "lead_form" && e.form)
|
|
3612
|
-
return /* @__PURE__ */
|
|
3642
|
+
return /* @__PURE__ */ t(Pt, { messageId: e.id, form: e.form, language: i, textDirection: n, formSubmitted: e.formSubmitted });
|
|
3613
3643
|
const o = e.role === "user" || e.sender === "user";
|
|
3614
|
-
return /* @__PURE__ */
|
|
3615
|
-
}), Ue =
|
|
3616
|
-
const
|
|
3644
|
+
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 }) }) });
|
|
3645
|
+
}), Ue = L.memo(function({ messages: e, partialTranscript: n, language: i, showTypingIndicator: o }) {
|
|
3646
|
+
const r = R(null), s = oe(i || "en"), d = R(e.length);
|
|
3617
3647
|
return I(() => {
|
|
3618
|
-
if (!
|
|
3619
|
-
const l = e.length !==
|
|
3620
|
-
|
|
3621
|
-
}, [e,
|
|
3622
|
-
e.map((l) => /* @__PURE__ */
|
|
3623
|
-
o && /* @__PURE__ */
|
|
3624
|
-
|
|
3625
|
-
/* @__PURE__ */
|
|
3648
|
+
if (!r.current) return;
|
|
3649
|
+
const l = e.length !== d.current;
|
|
3650
|
+
d.current = e.length, r.current.scrollIntoView({ behavior: l ? "smooth" : "instant", block: "end" });
|
|
3651
|
+
}, [e, n]), /* @__PURE__ */ v("div", { className: "rqmii-chat-messages", children: [
|
|
3652
|
+
e.map((l) => /* @__PURE__ */ t(Ct, { message: l, textDirection: s, language: i || "en" }, l.id || `${l.role}-${l.text}`)),
|
|
3653
|
+
o && /* @__PURE__ */ t(St, { language: i }),
|
|
3654
|
+
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 }) }),
|
|
3655
|
+
/* @__PURE__ */ t("div", { ref: r })
|
|
3626
3656
|
] });
|
|
3627
|
-
}), ha =
|
|
3657
|
+
}), ha = L.memo(function({ message: e, onRetry: n, onClose: i, language: o = "en" }) {
|
|
3628
3658
|
return /* @__PURE__ */ v("div", { className: "rqmii-chat-panel rqmii-chat-panel--error", children: [
|
|
3629
|
-
i && /* @__PURE__ */
|
|
3630
|
-
/* @__PURE__ */
|
|
3631
|
-
|
|
3632
|
-
/* @__PURE__ */
|
|
3633
|
-
/* @__PURE__ */
|
|
3659
|
+
i && /* @__PURE__ */ t("button", { type: "button", className: "rqmii-error-close", onClick: i, children: "×" }),
|
|
3660
|
+
/* @__PURE__ */ t("p", { children: e || E(o, "connectionFailed") }),
|
|
3661
|
+
n && /* @__PURE__ */ v("button", { type: "button", className: "rqmii-chat-retry", onClick: n, children: [
|
|
3662
|
+
/* @__PURE__ */ t(ot, { size: 16 }),
|
|
3663
|
+
/* @__PURE__ */ t("span", { children: E(o, "retry") })
|
|
3634
3664
|
] })
|
|
3635
3665
|
] });
|
|
3636
|
-
}),
|
|
3637
|
-
function ga({ rating: a, onRate: e, readonly:
|
|
3638
|
-
const [o,
|
|
3639
|
-
return /* @__PURE__ */
|
|
3640
|
-
const
|
|
3641
|
-
return /* @__PURE__ */
|
|
3666
|
+
}), At = 5;
|
|
3667
|
+
function ga({ rating: a, onRate: e, readonly: n, size: i = 28 }) {
|
|
3668
|
+
const [o, r] = y(0), s = o || a;
|
|
3669
|
+
return /* @__PURE__ */ t("div", { className: "rqmii-chat-rating-stars", role: "radiogroup", children: Array.from({ length: At }, (d, l) => {
|
|
3670
|
+
const c = l + 1, m = c <= s;
|
|
3671
|
+
return /* @__PURE__ */ t(
|
|
3642
3672
|
"button",
|
|
3643
3673
|
{
|
|
3644
3674
|
type: "button",
|
|
3645
|
-
className: V("rqmii-chat-star", m && "is-filled",
|
|
3646
|
-
disabled:
|
|
3647
|
-
"aria-label": `${
|
|
3648
|
-
"aria-checked":
|
|
3675
|
+
className: V("rqmii-chat-star", m && "is-filled", n && "is-readonly"),
|
|
3676
|
+
disabled: n,
|
|
3677
|
+
"aria-label": `${c}`,
|
|
3678
|
+
"aria-checked": c === a,
|
|
3649
3679
|
role: "radio",
|
|
3650
|
-
onMouseEnter: () => !
|
|
3651
|
-
onMouseLeave: () => !
|
|
3652
|
-
onClick: () => !
|
|
3653
|
-
children: /* @__PURE__ */
|
|
3680
|
+
onMouseEnter: () => !n && r(c),
|
|
3681
|
+
onMouseLeave: () => !n && r(0),
|
|
3682
|
+
onClick: () => !n && e?.(c),
|
|
3683
|
+
children: /* @__PURE__ */ t(st, { size: i, fill: m ? "currentColor" : "none" })
|
|
3654
3684
|
},
|
|
3655
|
-
|
|
3685
|
+
c
|
|
3656
3686
|
);
|
|
3657
3687
|
}) });
|
|
3658
3688
|
}
|
|
3659
|
-
function
|
|
3689
|
+
function Lt({
|
|
3660
3690
|
language: a,
|
|
3661
3691
|
rating: e,
|
|
3662
|
-
endedBy:
|
|
3692
|
+
endedBy: n,
|
|
3663
3693
|
sessionId: i,
|
|
3664
3694
|
interactive: o,
|
|
3665
|
-
showTellUsMore:
|
|
3666
|
-
showRating:
|
|
3667
|
-
showConversationId:
|
|
3695
|
+
showTellUsMore: r,
|
|
3696
|
+
showRating: s = !0,
|
|
3697
|
+
showConversationId: d = !0,
|
|
3668
3698
|
onRate: l,
|
|
3669
|
-
onTellUsMore:
|
|
3699
|
+
onTellUsMore: c
|
|
3670
3700
|
}) {
|
|
3671
|
-
const m = e > 0 ?
|
|
3701
|
+
const m = e > 0 ? E(a, "ratingThankYou") : E(a, "ratingQuestion"), u = n === "user" ? E(a, "youEnded") : E(a, "agentEnded");
|
|
3672
3702
|
return /* @__PURE__ */ v(
|
|
3673
3703
|
"div",
|
|
3674
3704
|
{
|
|
3675
|
-
className: V("rqmii-chat-rating", !
|
|
3676
|
-
dir:
|
|
3705
|
+
className: V("rqmii-chat-rating", !s && "rqmii-chat-rating--unrated", Z()),
|
|
3706
|
+
dir: oe(a),
|
|
3677
3707
|
children: [
|
|
3678
|
-
|
|
3679
|
-
/* @__PURE__ */
|
|
3680
|
-
/* @__PURE__ */
|
|
3681
|
-
|
|
3708
|
+
s && /* @__PURE__ */ v(Te, { children: [
|
|
3709
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-rating-header", children: m }),
|
|
3710
|
+
/* @__PURE__ */ t(ga, { rating: e, onRate: l, readonly: !o }),
|
|
3711
|
+
r && /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-rating-more", onClick: c, children: E(a, "tellUsMore") })
|
|
3682
3712
|
] }),
|
|
3683
3713
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-rating-meta", children: [
|
|
3684
|
-
/* @__PURE__ */
|
|
3685
|
-
|
|
3686
|
-
|
|
3714
|
+
/* @__PURE__ */ t("div", { children: u }),
|
|
3715
|
+
d && i && /* @__PURE__ */ v("div", { children: [
|
|
3716
|
+
E(a, "sessionIdLabel"),
|
|
3687
3717
|
" ",
|
|
3688
|
-
/* @__PURE__ */
|
|
3718
|
+
/* @__PURE__ */ t("span", { children: i })
|
|
3689
3719
|
] })
|
|
3690
3720
|
] })
|
|
3691
3721
|
]
|
|
3692
3722
|
}
|
|
3693
3723
|
);
|
|
3694
3724
|
}
|
|
3695
|
-
function
|
|
3725
|
+
function _t({
|
|
3696
3726
|
agent: a,
|
|
3697
3727
|
language: e,
|
|
3698
|
-
rating:
|
|
3728
|
+
rating: n,
|
|
3699
3729
|
onBack: i,
|
|
3700
3730
|
onMinimize: o,
|
|
3701
|
-
onSubmit:
|
|
3731
|
+
onSubmit: r
|
|
3702
3732
|
}) {
|
|
3703
|
-
const [
|
|
3733
|
+
const [s, d] = y(""), [l, c] = y(!1), m = s.trim().length > 0 && !l, u = async () => {
|
|
3704
3734
|
if (m) {
|
|
3705
|
-
|
|
3735
|
+
c(!0);
|
|
3706
3736
|
try {
|
|
3707
|
-
await s
|
|
3737
|
+
await r(s.trim());
|
|
3708
3738
|
} finally {
|
|
3709
|
-
|
|
3739
|
+
c(!1);
|
|
3710
3740
|
}
|
|
3711
3741
|
}
|
|
3712
3742
|
};
|
|
3713
|
-
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--feedback", Z()), dir:
|
|
3743
|
+
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--feedback", Z()), dir: oe(e), children: [
|
|
3714
3744
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
|
|
3715
|
-
/* @__PURE__ */
|
|
3716
|
-
/* @__PURE__ */
|
|
3745
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": "Back", children: /* @__PURE__ */ t(Yn, { size: 20 }) }),
|
|
3746
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": E(e, "minimize"), children: /* @__PURE__ */ t(Se, { size: 20 }) })
|
|
3717
3747
|
] }),
|
|
3718
3748
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-feedback-body", children: [
|
|
3719
|
-
/* @__PURE__ */
|
|
3720
|
-
/* @__PURE__ */
|
|
3721
|
-
/* @__PURE__ */
|
|
3722
|
-
/* @__PURE__ */
|
|
3723
|
-
/* @__PURE__ */
|
|
3749
|
+
/* @__PURE__ */ t(ne, { agent: a, size: "hero" }),
|
|
3750
|
+
/* @__PURE__ */ t(ga, { rating: n, readonly: !0 }),
|
|
3751
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-feedback-title", children: E(e, "ratingThankYou") }),
|
|
3752
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-feedback-subtitle", children: E(e, "feedbackSubtitle") }),
|
|
3753
|
+
/* @__PURE__ */ t(
|
|
3724
3754
|
"textarea",
|
|
3725
3755
|
{
|
|
3726
3756
|
className: "rqmii-chat-feedback-input",
|
|
3727
|
-
value:
|
|
3728
|
-
dir:
|
|
3729
|
-
placeholder:
|
|
3730
|
-
onChange: (h) =>
|
|
3757
|
+
value: s,
|
|
3758
|
+
dir: oe(e),
|
|
3759
|
+
placeholder: E(e, "feedbackPlaceholder"),
|
|
3760
|
+
onChange: (h) => d(h.target.value)
|
|
3731
3761
|
}
|
|
3732
3762
|
),
|
|
3733
|
-
/* @__PURE__ */
|
|
3763
|
+
/* @__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
3764
|
] }),
|
|
3735
|
-
/* @__PURE__ */
|
|
3765
|
+
/* @__PURE__ */ t(ue, { language: e, agent: a })
|
|
3736
3766
|
] });
|
|
3737
3767
|
}
|
|
3738
|
-
const
|
|
3768
|
+
const qt = L.lazy(() => import("./RqmiiCloudAvatarPlayer-Cit_rrpj.js").then((a) => a.e).then((a) => ({ default: a.RqmiiCloudAvatarPlayer })));
|
|
3739
3769
|
function Fe(a) {
|
|
3740
3770
|
if (!(a == null || typeof window > "u" || window.innerWidth >= 768))
|
|
3741
3771
|
return {
|
|
@@ -3743,334 +3773,334 @@ function Fe(a) {
|
|
|
3743
3773
|
bottom: 0
|
|
3744
3774
|
};
|
|
3745
3775
|
}
|
|
3746
|
-
const
|
|
3747
|
-
const T = Fe(u), [k, p] =
|
|
3748
|
-
|
|
3776
|
+
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 }) {
|
|
3777
|
+
const T = Fe(u), [k, p] = L.useState(_e);
|
|
3778
|
+
L.useEffect(() => {
|
|
3749
3779
|
const f = () => p(_e());
|
|
3750
3780
|
return window.addEventListener("resize", f), () => window.removeEventListener("resize", f);
|
|
3751
3781
|
}, []);
|
|
3752
|
-
const g =
|
|
3782
|
+
const g = w && !k, M = g ? "start" : "hero", z = b && b.length > 0;
|
|
3753
3783
|
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--start", g && "rqmii-chat-panel--start-compact", Z()), style: T, children: [
|
|
3754
3784
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
|
|
3755
|
-
/* @__PURE__ */
|
|
3785
|
+
/* @__PURE__ */ t("span", {}),
|
|
3756
3786
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar-actions", children: [
|
|
3757
|
-
/* @__PURE__ */
|
|
3758
|
-
/* @__PURE__ */
|
|
3787
|
+
/* @__PURE__ */ t(Ge, { language: n, languages: i, onChange: o }),
|
|
3788
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, children: /* @__PURE__ */ t(De, { size: 20 }) })
|
|
3759
3789
|
] })
|
|
3760
3790
|
] }),
|
|
3761
3791
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-start-body", children: [
|
|
3762
|
-
|
|
3763
|
-
/* @__PURE__ */
|
|
3764
|
-
/* @__PURE__ */
|
|
3765
|
-
] }) : /* @__PURE__ */
|
|
3766
|
-
/* @__PURE__ */
|
|
3767
|
-
F && /* @__PURE__ */
|
|
3792
|
+
d ? /* @__PURE__ */ v("div", { className: V("rqmii-chat-call-avatar-wrap", g && "is-compact"), children: [
|
|
3793
|
+
/* @__PURE__ */ t(ne, { agent: e, size: M, active: l }),
|
|
3794
|
+
/* @__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 }) })
|
|
3795
|
+
] }) : /* @__PURE__ */ t(ne, { agent: e, size: M }),
|
|
3796
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-agent-name", children: e.name }),
|
|
3797
|
+
F && /* @__PURE__ */ t("div", { className: "rqmii-chat-error-text", children: F })
|
|
3768
3798
|
] }),
|
|
3769
|
-
|
|
3770
|
-
/* @__PURE__ */
|
|
3771
|
-
/* @__PURE__ */
|
|
3799
|
+
z && /* @__PURE__ */ t("div", { className: "rqmii-chat-start-suggestions", children: /* @__PURE__ */ t(wt, { suggestions: b, language: n, onClick: (f) => x?.(f) }) }),
|
|
3800
|
+
/* @__PURE__ */ t(xe, { language: n, onSend: s, disabled: h }),
|
|
3801
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3772
3802
|
] });
|
|
3773
|
-
}),
|
|
3774
|
-
const m = Fe(
|
|
3803
|
+
}), Vt = L.memo(function({ agent: e, language: n, languages: i, onLanguageChange: o, onClose: r, onStartVoice: s, isVoiceSetupLoading: d = !1, isAudioPlaying: l, visualViewportHeight: c }) {
|
|
3804
|
+
const m = Fe(c);
|
|
3775
3805
|
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-start", Z()), style: m, children: [
|
|
3776
3806
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
|
|
3777
|
-
/* @__PURE__ */
|
|
3807
|
+
/* @__PURE__ */ t("span", {}),
|
|
3778
3808
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar-actions", children: [
|
|
3779
|
-
/* @__PURE__ */
|
|
3780
|
-
/* @__PURE__ */
|
|
3809
|
+
/* @__PURE__ */ t(Ge, { language: n, languages: i, onChange: o }),
|
|
3810
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: r, children: /* @__PURE__ */ t(De, { size: 20 }) })
|
|
3781
3811
|
] })
|
|
3782
3812
|
] }),
|
|
3783
3813
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-call-body", children: [
|
|
3784
3814
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-call-avatar-wrap", children: [
|
|
3785
|
-
/* @__PURE__ */
|
|
3786
|
-
/* @__PURE__ */
|
|
3815
|
+
/* @__PURE__ */ t(ne, { agent: e, size: "hero", active: l }),
|
|
3816
|
+
/* @__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
3817
|
] }),
|
|
3788
3818
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-agent-name", children: [
|
|
3789
|
-
|
|
3819
|
+
E(n, "call"),
|
|
3790
3820
|
" ",
|
|
3791
3821
|
e.name
|
|
3792
3822
|
] })
|
|
3793
3823
|
] }),
|
|
3794
|
-
/* @__PURE__ */
|
|
3824
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3795
3825
|
] });
|
|
3796
|
-
}),
|
|
3797
|
-
const g = pa({ language:
|
|
3798
|
-
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", Z()), style:
|
|
3826
|
+
}), 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 }) {
|
|
3827
|
+
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;
|
|
3828
|
+
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", Z()), style: M, children: [
|
|
3799
3829
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-header", children: [
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
/* @__PURE__ */
|
|
3830
|
+
z && /* @__PURE__ */ t(ne, { agent: e, size: "header", active: l }),
|
|
3831
|
+
c && g && /* @__PURE__ */ t("div", { className: V("rqmii-chat-header-status", !z && "is-expanded"), children: /* @__PURE__ */ t("span", { children: g }) }),
|
|
3832
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-header-spacer" }),
|
|
3803
3833
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-header-actions", children: [
|
|
3804
|
-
o && /* @__PURE__ */
|
|
3805
|
-
|
|
3806
|
-
/* @__PURE__ */
|
|
3834
|
+
o && /* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, "aria-label": E(n, "minimize"), children: /* @__PURE__ */ t(Se, { size: 20 }) }),
|
|
3835
|
+
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 }) }),
|
|
3836
|
+
/* @__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
3837
|
] })
|
|
3808
3838
|
] }),
|
|
3809
|
-
/* @__PURE__ */
|
|
3810
|
-
|
|
3811
|
-
/* @__PURE__ */
|
|
3812
|
-
/* @__PURE__ */
|
|
3839
|
+
/* @__PURE__ */ t(Ue, { messages: r, partialTranscript: s, language: n, showTypingIndicator: p }),
|
|
3840
|
+
c && /* @__PURE__ */ t("div", { className: "rqmii-chat-session-counter", children: Re(T) }),
|
|
3841
|
+
/* @__PURE__ */ t(xe, { language: n, onSend: d }),
|
|
3842
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3813
3843
|
] });
|
|
3814
|
-
}),
|
|
3815
|
-
const b = pa({ language:
|
|
3816
|
-
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", Z()), style:
|
|
3844
|
+
}), 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 }) {
|
|
3845
|
+
const b = pa({ language: n, isListening: r, isLoading: s, isSpeaking: d, isAudioPlaying: l, isAgentThinking: c, isAgentSpeaking: m, persistentListening: !0 }), x = Fe(F);
|
|
3846
|
+
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", Z()), style: x, children: [
|
|
3817
3847
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-call-status", children: [
|
|
3818
|
-
/* @__PURE__ */
|
|
3819
|
-
/* @__PURE__ */
|
|
3820
|
-
/* @__PURE__ */
|
|
3848
|
+
/* @__PURE__ */ t("span", { className: V("rqmii-chat-live-dot", r && "is-live") }),
|
|
3849
|
+
/* @__PURE__ */ t("span", { children: Re(h) }),
|
|
3850
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: o, children: /* @__PURE__ */ t(Se, { size: 20 }) })
|
|
3821
3851
|
] }),
|
|
3822
3852
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-voice-frame", children: [
|
|
3823
|
-
/* @__PURE__ */
|
|
3824
|
-
/* @__PURE__ */
|
|
3825
|
-
/* @__PURE__ */
|
|
3853
|
+
/* @__PURE__ */ t(ne, { agent: e, size: "hero", active: l }),
|
|
3854
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-agent-name", children: e.name }),
|
|
3855
|
+
/* @__PURE__ */ t("div", { className: V("rqmii-chat-status-pill", !b && "is-empty"), children: b || E(n, "listening") }),
|
|
3826
3856
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-voice-actions", children: [
|
|
3827
|
-
/* @__PURE__ */
|
|
3828
|
-
/* @__PURE__ */
|
|
3857
|
+
/* @__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 }) }),
|
|
3858
|
+
/* @__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
3859
|
] })
|
|
3830
3860
|
] }),
|
|
3831
|
-
/* @__PURE__ */
|
|
3861
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3832
3862
|
] });
|
|
3833
3863
|
});
|
|
3834
|
-
function pa({ language: a, isListening: e, isLoading:
|
|
3835
|
-
return
|
|
3864
|
+
function pa({ language: a, isListening: e, isLoading: n, isSpeaking: i, isAudioPlaying: o, isAgentThinking: r, isAgentSpeaking: s, persistentListening: d = !1 }) {
|
|
3865
|
+
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
3866
|
}
|
|
3837
|
-
const
|
|
3867
|
+
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
3868
|
const u = m === "text";
|
|
3839
3869
|
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-minimized", Z()), children: [
|
|
3840
|
-
/* @__PURE__ */
|
|
3841
|
-
!u && /* @__PURE__ */
|
|
3870
|
+
/* @__PURE__ */ t(ne, { agent: e, size: "minimized", active: s }),
|
|
3871
|
+
!u && /* @__PURE__ */ t("span", { className: "rqmii-chat-minimized-time", children: Re(c) }),
|
|
3842
3872
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-minimized-actions", children: [
|
|
3843
|
-
/* @__PURE__ */
|
|
3844
|
-
!u && /* @__PURE__ */
|
|
3845
|
-
/* @__PURE__ */
|
|
3873
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", onClick: i, "aria-label": E(n, "maximize"), children: /* @__PURE__ */ t(Jn, { size: 20 }) }),
|
|
3874
|
+
!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 }) }),
|
|
3875
|
+
/* @__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
3876
|
] })
|
|
3847
3877
|
] });
|
|
3848
|
-
}),
|
|
3878
|
+
}), Bt = L.memo(function({
|
|
3849
3879
|
agent: e,
|
|
3850
|
-
language:
|
|
3880
|
+
language: n,
|
|
3851
3881
|
languages: i,
|
|
3852
3882
|
chatKind: o,
|
|
3853
|
-
messages:
|
|
3854
|
-
onLanguageChange:
|
|
3855
|
-
onMinimize:
|
|
3883
|
+
messages: r,
|
|
3884
|
+
onLanguageChange: s,
|
|
3885
|
+
onMinimize: d,
|
|
3856
3886
|
onStartNewVoice: l,
|
|
3857
|
-
onStartNewText:
|
|
3887
|
+
onStartNewText: c,
|
|
3858
3888
|
isVoiceSetupLoading: m = !1,
|
|
3859
3889
|
visualViewportHeight: u,
|
|
3860
3890
|
rating: h,
|
|
3861
3891
|
endedBy: F,
|
|
3862
3892
|
sessionId: b,
|
|
3863
|
-
ratingInteractive:
|
|
3864
|
-
showTellUsMore:
|
|
3893
|
+
ratingInteractive: x,
|
|
3894
|
+
showTellUsMore: w,
|
|
3865
3895
|
onRate: T,
|
|
3866
3896
|
onTellUsMore: k
|
|
3867
3897
|
}) {
|
|
3868
|
-
const p = Fe(u), g = e.widget?.behavior?.conversation_ended_screen,
|
|
3869
|
-
|
|
3898
|
+
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(
|
|
3899
|
+
Lt,
|
|
3870
3900
|
{
|
|
3871
|
-
language:
|
|
3901
|
+
language: n,
|
|
3872
3902
|
rating: h,
|
|
3873
3903
|
endedBy: F,
|
|
3874
3904
|
sessionId: b,
|
|
3875
|
-
interactive:
|
|
3876
|
-
showTellUsMore:
|
|
3877
|
-
showRating:
|
|
3878
|
-
showConversationId:
|
|
3905
|
+
interactive: x,
|
|
3906
|
+
showTellUsMore: w,
|
|
3907
|
+
showRating: M,
|
|
3908
|
+
showConversationId: z,
|
|
3879
3909
|
onRate: T,
|
|
3880
3910
|
onTellUsMore: k
|
|
3881
3911
|
}
|
|
3882
3912
|
), 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__ */
|
|
3913
|
+
/* @__PURE__ */ t(Ge, { language: n, languages: i, onChange: s }),
|
|
3914
|
+
/* @__PURE__ */ t(
|
|
3885
3915
|
"button",
|
|
3886
3916
|
{
|
|
3887
3917
|
type: "button",
|
|
3888
3918
|
className: "rqmii-chat-circle-button",
|
|
3889
|
-
onClick:
|
|
3890
|
-
"aria-label":
|
|
3891
|
-
children: /* @__PURE__ */
|
|
3919
|
+
onClick: d,
|
|
3920
|
+
"aria-label": E(n, "minimize"),
|
|
3921
|
+
children: /* @__PURE__ */ t(Se, { size: 20 })
|
|
3892
3922
|
}
|
|
3893
3923
|
),
|
|
3894
|
-
P && /* @__PURE__ */
|
|
3924
|
+
P && /* @__PURE__ */ t(
|
|
3895
3925
|
"button",
|
|
3896
3926
|
{
|
|
3897
3927
|
type: "button",
|
|
3898
3928
|
className: "rqmii-chat-circle-button rqmii-chat-circle-button--call-start",
|
|
3899
3929
|
onClick: l,
|
|
3900
3930
|
disabled: m,
|
|
3901
|
-
"aria-label":
|
|
3902
|
-
children: m ? /* @__PURE__ */
|
|
3931
|
+
"aria-label": E(n, "startVoice"),
|
|
3932
|
+
children: m ? /* @__PURE__ */ t(ze, { className: "rqmii-chat-spin", size: 20 }) : /* @__PURE__ */ t(je, { size: 20 })
|
|
3903
3933
|
}
|
|
3904
3934
|
)
|
|
3905
3935
|
] });
|
|
3906
3936
|
if (o === "voice")
|
|
3907
3937
|
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--voice-call", Z()), style: p, children: [
|
|
3908
3938
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
|
|
3909
|
-
/* @__PURE__ */
|
|
3939
|
+
/* @__PURE__ */ t("span", {}),
|
|
3910
3940
|
_
|
|
3911
3941
|
] }),
|
|
3912
3942
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-voice-frame", children: [
|
|
3913
|
-
/* @__PURE__ */
|
|
3914
|
-
/* @__PURE__ */
|
|
3943
|
+
/* @__PURE__ */ t(ne, { agent: e, size: "hero" }),
|
|
3944
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-agent-name", children: e.name }),
|
|
3915
3945
|
f
|
|
3916
3946
|
] }),
|
|
3917
|
-
/* @__PURE__ */
|
|
3947
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3918
3948
|
] });
|
|
3919
|
-
const
|
|
3949
|
+
const S = e.widget?.appearance?.show_topbar_avatar_image !== !1;
|
|
3920
3950
|
return /* @__PURE__ */ v("div", { className: V("rqmii-chat-panel rqmii-chat-panel--conversation", Z()), style: p, children: [
|
|
3921
3951
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-topbar", children: [
|
|
3922
|
-
|
|
3952
|
+
S ? /* @__PURE__ */ t(ne, { agent: e, size: "header" }) : /* @__PURE__ */ t("span", {}),
|
|
3923
3953
|
_
|
|
3924
3954
|
] }),
|
|
3925
|
-
/* @__PURE__ */
|
|
3955
|
+
/* @__PURE__ */ t(Ue, { messages: r, language: n }),
|
|
3926
3956
|
f,
|
|
3927
|
-
C && /* @__PURE__ */
|
|
3928
|
-
/* @__PURE__ */
|
|
3957
|
+
C && /* @__PURE__ */ t(xe, { language: n, onSend: c }),
|
|
3958
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3929
3959
|
] });
|
|
3930
|
-
}), ba =
|
|
3931
|
-
const { streamingUrl: o, isCloudStreamConnected:
|
|
3960
|
+
}), ba = L.memo(function({ agent: e, language: n, onClose: i }) {
|
|
3961
|
+
const { streamingUrl: o, isCloudStreamConnected: r, cloudStreamError: s } = He(), { isAvatarSpeaking: d } = He(), { messages: l, sendTextMessage: c } = ge();
|
|
3932
3962
|
return /* @__PURE__ */ v("div", { className: V("rqmii-avatar-panel", Z()), children: [
|
|
3933
3963
|
/* @__PURE__ */ v("div", { className: "rqmii-avatar-stream", children: [
|
|
3934
|
-
/* @__PURE__ */
|
|
3935
|
-
!o && /* @__PURE__ */
|
|
3936
|
-
|
|
3964
|
+
/* @__PURE__ */ t(L.Suspense, { fallback: /* @__PURE__ */ t("div", { className: "rqmii-avatar-overlay", children: E(n, "loading") }), children: /* @__PURE__ */ t(qt, { autoConnect: !0, muted: !1 }) }),
|
|
3965
|
+
!o && /* @__PURE__ */ t("div", { className: "rqmii-avatar-overlay", children: E(n, "loading") }),
|
|
3966
|
+
s && /* @__PURE__ */ t("div", { className: "rqmii-avatar-overlay", children: E(n, "connectionFailed") }),
|
|
3937
3967
|
/* @__PURE__ */ v("div", { className: "rqmii-avatar-controls", children: [
|
|
3938
|
-
/* @__PURE__ */
|
|
3939
|
-
/* @__PURE__ */
|
|
3940
|
-
/* @__PURE__ */
|
|
3941
|
-
/* @__PURE__ */
|
|
3968
|
+
/* @__PURE__ */ t(ne, { agent: e, size: "header", active: d }),
|
|
3969
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-header-spacer" }),
|
|
3970
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button", disabled: !r, children: /* @__PURE__ */ t(we, { size: 20 }) }),
|
|
3971
|
+
/* @__PURE__ */ t("button", { type: "button", className: "rqmii-chat-circle-button is-danger", onClick: i, children: /* @__PURE__ */ t(De, { size: 20 }) })
|
|
3942
3972
|
] })
|
|
3943
3973
|
] }),
|
|
3944
3974
|
e.useText && /* @__PURE__ */ v("div", { className: "rqmii-avatar-sidebar", children: [
|
|
3945
|
-
/* @__PURE__ */
|
|
3946
|
-
/* @__PURE__ */
|
|
3947
|
-
/* @__PURE__ */
|
|
3975
|
+
/* @__PURE__ */ t(Ue, { messages: l, language: n }),
|
|
3976
|
+
/* @__PURE__ */ t(xe, { language: n, onSend: c, variant: "compact" }),
|
|
3977
|
+
/* @__PURE__ */ t(ue, { language: n, agent: e })
|
|
3948
3978
|
] })
|
|
3949
3979
|
] });
|
|
3950
3980
|
});
|
|
3951
|
-
function
|
|
3952
|
-
const e = a.trim(),
|
|
3953
|
-
return
|
|
3981
|
+
function Rt(a) {
|
|
3982
|
+
const e = a.trim(), n = e.toLowerCase();
|
|
3983
|
+
return n.startsWith("javascript:") || n.startsWith("data:") || n.startsWith("vbscript:") ? "#" : e;
|
|
3954
3984
|
}
|
|
3955
3985
|
function se(a) {
|
|
3956
|
-
const e = [],
|
|
3986
|
+
const e = [], n = /(\[([^\]]+)\]\(([^)]+)\))|(\*\*([^*]+)\*\*|__([^_]+)__)|(\*([^*]+)\*|_([^_]+)_)|(~~([^~]+)~~)|(`([^`]+)`)/g;
|
|
3957
3987
|
let i = 0, o;
|
|
3958
|
-
for (; (o =
|
|
3988
|
+
for (; (o = n.exec(a)) !== null; ) {
|
|
3959
3989
|
o.index > i && e.push(a.slice(i, o.index));
|
|
3960
|
-
const
|
|
3990
|
+
const r = `inline-${o.index}-${o[0]}`;
|
|
3961
3991
|
if (o[1]) {
|
|
3962
|
-
const
|
|
3992
|
+
const s = o[2], d = o[3];
|
|
3963
3993
|
e.push(
|
|
3964
|
-
/* @__PURE__ */
|
|
3994
|
+
/* @__PURE__ */ t(
|
|
3965
3995
|
"a",
|
|
3966
3996
|
{
|
|
3967
|
-
href:
|
|
3997
|
+
href: Rt(d),
|
|
3968
3998
|
target: "_blank",
|
|
3969
3999
|
rel: "noopener noreferrer",
|
|
3970
4000
|
className: "rqmii-markdown-link",
|
|
3971
|
-
children: se(
|
|
4001
|
+
children: se(s)
|
|
3972
4002
|
},
|
|
3973
|
-
|
|
4003
|
+
r
|
|
3974
4004
|
)
|
|
3975
4005
|
);
|
|
3976
4006
|
} else if (o[4]) {
|
|
3977
|
-
const
|
|
4007
|
+
const s = o[5] || o[6];
|
|
3978
4008
|
e.push(
|
|
3979
|
-
/* @__PURE__ */
|
|
4009
|
+
/* @__PURE__ */ t("strong", { className: "rqmii-markdown-strong", children: se(s) }, r)
|
|
3980
4010
|
);
|
|
3981
4011
|
} else if (o[7]) {
|
|
3982
|
-
const
|
|
4012
|
+
const s = o[8] || o[9];
|
|
3983
4013
|
e.push(
|
|
3984
|
-
/* @__PURE__ */
|
|
4014
|
+
/* @__PURE__ */ t("em", { className: "rqmii-markdown-em", children: se(s) }, r)
|
|
3985
4015
|
);
|
|
3986
4016
|
} else if (o[10]) {
|
|
3987
|
-
const
|
|
4017
|
+
const s = o[11];
|
|
3988
4018
|
e.push(
|
|
3989
|
-
/* @__PURE__ */
|
|
4019
|
+
/* @__PURE__ */ t("del", { className: "rqmii-markdown-del", children: se(s) }, r)
|
|
3990
4020
|
);
|
|
3991
4021
|
} else if (o[12]) {
|
|
3992
|
-
const
|
|
4022
|
+
const s = o[13];
|
|
3993
4023
|
e.push(
|
|
3994
|
-
/* @__PURE__ */
|
|
4024
|
+
/* @__PURE__ */ t("code", { className: "rqmii-markdown-code", children: s }, r)
|
|
3995
4025
|
);
|
|
3996
4026
|
}
|
|
3997
|
-
i =
|
|
4027
|
+
i = n.lastIndex;
|
|
3998
4028
|
}
|
|
3999
4029
|
return i < a.length && e.push(a.slice(i)), e;
|
|
4000
4030
|
}
|
|
4001
4031
|
function ia(a, e) {
|
|
4002
|
-
const
|
|
4032
|
+
const n = a.split(`
|
|
4003
4033
|
`);
|
|
4004
|
-
return
|
|
4005
|
-
o > 0 && /* @__PURE__ */
|
|
4034
|
+
return n.length === 1 ? se(n[0]) : n.map((i, o) => /* @__PURE__ */ v(L.Fragment, { children: [
|
|
4035
|
+
o > 0 && /* @__PURE__ */ t("br", {}),
|
|
4006
4036
|
se(i)
|
|
4007
4037
|
] }, `${e}-ln-${o}`));
|
|
4008
4038
|
}
|
|
4009
|
-
function
|
|
4039
|
+
function Gt({
|
|
4010
4040
|
content: a,
|
|
4011
4041
|
className: e = ""
|
|
4012
4042
|
}) {
|
|
4013
4043
|
if (!a || !a.trim()) return null;
|
|
4014
|
-
const
|
|
4044
|
+
const n = a.replace(/\r\n/g, `
|
|
4015
4045
|
`).split(/\n{2,}/), i = [];
|
|
4016
|
-
return
|
|
4017
|
-
const
|
|
4018
|
-
if (!
|
|
4019
|
-
const
|
|
4020
|
-
if (
|
|
4021
|
-
const l =
|
|
4046
|
+
return n.forEach((o, r) => {
|
|
4047
|
+
const s = o.trim();
|
|
4048
|
+
if (!s) return;
|
|
4049
|
+
const d = `block-${r}`;
|
|
4050
|
+
if (s.startsWith("#")) {
|
|
4051
|
+
const l = s.match(/^(#{1,6})\s+(.+)$/s);
|
|
4022
4052
|
if (l) {
|
|
4023
|
-
const
|
|
4024
|
-
|
|
4053
|
+
const c = l[1].length, m = l[2].trim(), u = se(m);
|
|
4054
|
+
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
4055
|
return;
|
|
4026
4056
|
}
|
|
4027
4057
|
}
|
|
4028
|
-
if (
|
|
4029
|
-
const l =
|
|
4030
|
-
`).map((
|
|
4058
|
+
if (s.startsWith(">")) {
|
|
4059
|
+
const l = s.split(`
|
|
4060
|
+
`).map((c) => c.replace(/^>\s?/, "")).join(`
|
|
4031
4061
|
`);
|
|
4032
4062
|
i.push(
|
|
4033
|
-
/* @__PURE__ */
|
|
4063
|
+
/* @__PURE__ */ t("blockquote", { className: "rqmii-markdown-blockquote", children: ia(l, d) }, d)
|
|
4034
4064
|
);
|
|
4035
4065
|
return;
|
|
4036
4066
|
}
|
|
4037
|
-
if (/^[-*]\s+/m.test(
|
|
4038
|
-
const l =
|
|
4067
|
+
if (/^[-*]\s+/m.test(s)) {
|
|
4068
|
+
const l = s.split(`
|
|
4039
4069
|
`);
|
|
4040
4070
|
if (l.every((m) => /^[-*]\s+/.test(m.trim()) || m.trim() === "")) {
|
|
4041
4071
|
const m = l.map((u) => u.trim().replace(/^[-*]\s+/, "")).filter(Boolean);
|
|
4042
4072
|
i.push(
|
|
4043
|
-
/* @__PURE__ */
|
|
4073
|
+
/* @__PURE__ */ t("ul", { className: "rqmii-markdown-ul", children: m.map((u, h) => /* @__PURE__ */ t("li", { children: se(u) }, `${d}-li-${h}`)) }, d)
|
|
4044
4074
|
);
|
|
4045
4075
|
return;
|
|
4046
4076
|
}
|
|
4047
4077
|
}
|
|
4048
|
-
if (/^\d+\.\s+/m.test(
|
|
4049
|
-
const l =
|
|
4078
|
+
if (/^\d+\.\s+/m.test(s)) {
|
|
4079
|
+
const l = s.split(`
|
|
4050
4080
|
`);
|
|
4051
4081
|
if (l.every((m) => /^\d+\.\s+/.test(m.trim()) || m.trim() === "")) {
|
|
4052
4082
|
const m = l.map((u) => u.trim().replace(/^\d+\.\s+/, "")).filter(Boolean);
|
|
4053
4083
|
i.push(
|
|
4054
|
-
/* @__PURE__ */
|
|
4084
|
+
/* @__PURE__ */ t("ol", { className: "rqmii-markdown-ol", children: m.map((u, h) => /* @__PURE__ */ t("li", { children: se(u) }, `${d}-li-${h}`)) }, d)
|
|
4055
4085
|
);
|
|
4056
4086
|
return;
|
|
4057
4087
|
}
|
|
4058
4088
|
}
|
|
4059
4089
|
i.push(
|
|
4060
|
-
/* @__PURE__ */
|
|
4090
|
+
/* @__PURE__ */ t("p", { className: "rqmii-markdown-p", children: ia(s, d) }, d)
|
|
4061
4091
|
);
|
|
4062
|
-
}), /* @__PURE__ */
|
|
4092
|
+
}), /* @__PURE__ */ t("div", { className: `rqmii-markdown ${e}`.trim(), children: i });
|
|
4063
4093
|
}
|
|
4064
|
-
const
|
|
4065
|
-
function
|
|
4094
|
+
const Ut = L.memo(Gt);
|
|
4095
|
+
function Kt({
|
|
4066
4096
|
language: a,
|
|
4067
4097
|
content: e,
|
|
4068
|
-
config:
|
|
4098
|
+
config: n,
|
|
4069
4099
|
agent: i,
|
|
4070
4100
|
onAccept: o,
|
|
4071
|
-
onDecline:
|
|
4101
|
+
onDecline: r
|
|
4072
4102
|
}) {
|
|
4073
|
-
const
|
|
4103
|
+
const s = e || n?.body?.[a] || E(a, "consentBody") || "", d = n?.acceptLabel?.[a] || E(a, "consentAccept"), l = n?.declineLabel?.[a] || E(a, "consentDecline");
|
|
4074
4104
|
return /* @__PURE__ */ v(
|
|
4075
4105
|
"div",
|
|
4076
4106
|
{
|
|
@@ -4078,26 +4108,26 @@ function On({
|
|
|
4078
4108
|
"rqmii-chat-panel rqmii-chat-panel--start rqmii-chat-panel--consent",
|
|
4079
4109
|
Z()
|
|
4080
4110
|
),
|
|
4081
|
-
dir:
|
|
4111
|
+
dir: oe(a),
|
|
4082
4112
|
children: [
|
|
4083
|
-
/* @__PURE__ */
|
|
4113
|
+
/* @__PURE__ */ t("div", { className: "rqmii-chat-consent-body", children: /* @__PURE__ */ t(Ut, { content: s }) }),
|
|
4084
4114
|
/* @__PURE__ */ v("div", { className: "rqmii-chat-consent-actions", children: [
|
|
4085
|
-
/* @__PURE__ */
|
|
4115
|
+
/* @__PURE__ */ t(
|
|
4086
4116
|
"button",
|
|
4087
4117
|
{
|
|
4088
4118
|
type: "button",
|
|
4089
4119
|
className: "rqmii-chat-consent-button rqmii-chat-consent-button--decline",
|
|
4090
|
-
onClick:
|
|
4120
|
+
onClick: r,
|
|
4091
4121
|
children: l
|
|
4092
4122
|
}
|
|
4093
4123
|
),
|
|
4094
|
-
/* @__PURE__ */
|
|
4124
|
+
/* @__PURE__ */ t(
|
|
4095
4125
|
"button",
|
|
4096
4126
|
{
|
|
4097
4127
|
type: "button",
|
|
4098
4128
|
className: "rqmii-chat-consent-button rqmii-chat-consent-button--accept",
|
|
4099
4129
|
onClick: o,
|
|
4100
|
-
children:
|
|
4130
|
+
children: d
|
|
4101
4131
|
}
|
|
4102
4132
|
)
|
|
4103
4133
|
] })
|
|
@@ -4105,30 +4135,30 @@ function On({
|
|
|
4105
4135
|
}
|
|
4106
4136
|
);
|
|
4107
4137
|
}
|
|
4108
|
-
function
|
|
4138
|
+
function Ot(a) {
|
|
4109
4139
|
return a ? typeof a == "string" ? a : typeof a == "object" && typeof a.text == "string" ? a.text : "" : "";
|
|
4110
4140
|
}
|
|
4111
|
-
function
|
|
4141
|
+
function Yt(a) {
|
|
4112
4142
|
return a === "text" || a === "voice" || a === "text_and_voice";
|
|
4113
4143
|
}
|
|
4114
|
-
const Ke =
|
|
4144
|
+
const Ke = L.memo(function({
|
|
4115
4145
|
agent: e,
|
|
4116
|
-
language:
|
|
4146
|
+
language: n,
|
|
4117
4147
|
languages: i,
|
|
4118
|
-
onLanguageChange: o =
|
|
4119
|
-
onEndSession:
|
|
4120
|
-
onMinimize:
|
|
4121
|
-
messages:
|
|
4148
|
+
onLanguageChange: o = re,
|
|
4149
|
+
onEndSession: r = re,
|
|
4150
|
+
onMinimize: s,
|
|
4151
|
+
messages: d,
|
|
4122
4152
|
onSendMessage: l,
|
|
4123
|
-
isPreview:
|
|
4153
|
+
isPreview: c = !1,
|
|
4124
4154
|
chatKind: m,
|
|
4125
4155
|
sdk: u,
|
|
4126
4156
|
renderPanel: h,
|
|
4127
4157
|
messagesRef: F,
|
|
4128
4158
|
initialText: b,
|
|
4129
|
-
autoStartVoice:
|
|
4159
|
+
autoStartVoice: x
|
|
4130
4160
|
}) {
|
|
4131
|
-
const
|
|
4161
|
+
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
4162
|
if (!T || !k) return !0;
|
|
4133
4163
|
if (p && g && typeof window < "u")
|
|
4134
4164
|
try {
|
|
@@ -4137,13 +4167,13 @@ const Ke = A.memo(function({
|
|
|
4137
4167
|
return !1;
|
|
4138
4168
|
}
|
|
4139
4169
|
return !1;
|
|
4140
|
-
}), f = m || Ee(e), [P, C] = y(() => f === "voice" && u.isSessionReady || f === "voice" && !!
|
|
4170
|
+
}), 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
4171
|
I(() => {
|
|
4142
4172
|
if (!W) return;
|
|
4143
4173
|
const Q = () => {
|
|
4144
|
-
X && _e() &&
|
|
4174
|
+
X && _e() && B(!0);
|
|
4145
4175
|
}, be = () => {
|
|
4146
|
-
X &&
|
|
4176
|
+
X && B(!1);
|
|
4147
4177
|
};
|
|
4148
4178
|
return W.on("minimize_chat", Q), W.on("maximize_chat", be), () => {
|
|
4149
4179
|
W.off("minimize_chat", Q), W.off("maximize_chat", be);
|
|
@@ -4155,13 +4185,13 @@ const Ke = A.memo(function({
|
|
|
4155
4185
|
window.localStorage.setItem(g, "true");
|
|
4156
4186
|
} catch {
|
|
4157
4187
|
}
|
|
4158
|
-
|
|
4188
|
+
z(!0);
|
|
4159
4189
|
}, [p, g]), K = ie(() => {
|
|
4160
|
-
|
|
4161
|
-
}, [
|
|
4162
|
-
o(Q),
|
|
4190
|
+
s ? s() : r();
|
|
4191
|
+
}, [s, r]), me = (Q) => {
|
|
4192
|
+
o(Q), c || u.changeSessionLanguage(Q);
|
|
4163
4193
|
}, ae = ie((Q) => {
|
|
4164
|
-
if (N(null),
|
|
4194
|
+
if (N(null), A(!0), l) {
|
|
4165
4195
|
l(Q);
|
|
4166
4196
|
return;
|
|
4167
4197
|
}
|
|
@@ -4170,23 +4200,23 @@ const Ke = A.memo(function({
|
|
|
4170
4200
|
I(() => {
|
|
4171
4201
|
F && (F.current = u.messages);
|
|
4172
4202
|
});
|
|
4173
|
-
const le =
|
|
4203
|
+
const le = R(!1);
|
|
4174
4204
|
I(() => {
|
|
4175
|
-
le.current || (b ? (le.current = !0, ae(b)) :
|
|
4205
|
+
le.current || (b ? (le.current = !0, ae(b)) : x && (le.current = !0, N(null), A(!0), u.isVoiceActive || u.startVoice()));
|
|
4176
4206
|
}, []), I(() => {
|
|
4177
|
-
D && u.isSessionReady && (
|
|
4207
|
+
D && u.isSessionReady && (A(!1), f === "voice" ? C(!0) : S(!0));
|
|
4178
4208
|
}, [D, u.isSessionReady, f]), I(() => {
|
|
4179
|
-
D && u.error && (
|
|
4209
|
+
D && u.error && (A(!1), N(u.error));
|
|
4180
4210
|
}, [D, u.error]);
|
|
4181
4211
|
const ce = ie(() => {
|
|
4182
|
-
N(null),
|
|
4212
|
+
N(null), A(!0), u.isVoiceActive || u.startVoice();
|
|
4183
4213
|
}, [u]);
|
|
4184
|
-
if (u.error && !
|
|
4214
|
+
if (u.error && !c && (_ || P)) return /* @__PURE__ */ t(ha, { message: u.error, language: n, onClose: r });
|
|
4185
4215
|
if (J)
|
|
4186
|
-
return /* @__PURE__ */
|
|
4187
|
-
|
|
4216
|
+
return /* @__PURE__ */ t(
|
|
4217
|
+
Kt,
|
|
4188
4218
|
{
|
|
4189
|
-
language:
|
|
4219
|
+
language: n,
|
|
4190
4220
|
content: k,
|
|
4191
4221
|
config: e.consent,
|
|
4192
4222
|
agent: e,
|
|
@@ -4196,119 +4226,119 @@ const Ke = A.memo(function({
|
|
|
4196
4226
|
);
|
|
4197
4227
|
const he = {
|
|
4198
4228
|
agent: e,
|
|
4199
|
-
language:
|
|
4229
|
+
language: n,
|
|
4200
4230
|
languages: i,
|
|
4201
4231
|
chatKind: f,
|
|
4202
4232
|
sdk: u,
|
|
4203
|
-
isPreview:
|
|
4233
|
+
isPreview: c,
|
|
4204
4234
|
onLanguageChange: me,
|
|
4205
|
-
onClose:
|
|
4206
|
-
onMinimize: X ? () =>
|
|
4207
|
-
onRestore: X ? () =>
|
|
4235
|
+
onClose: r,
|
|
4236
|
+
onMinimize: X ? () => B(!0) : void 0,
|
|
4237
|
+
onRestore: X ? () => B(!1) : void 0,
|
|
4208
4238
|
onSend: ae,
|
|
4209
4239
|
voiceStarted: P,
|
|
4210
4240
|
conversationStarted: _,
|
|
4211
4241
|
isMinimized: j,
|
|
4212
4242
|
elapsed: O,
|
|
4213
4243
|
setVoiceStarted: C,
|
|
4214
|
-
setConversationStarted:
|
|
4244
|
+
setConversationStarted: S
|
|
4215
4245
|
};
|
|
4216
|
-
return h ? /* @__PURE__ */
|
|
4217
|
-
N(null),
|
|
4246
|
+
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) => {
|
|
4247
|
+
N(null), A(!0), u.sendSuggestion?.(Q);
|
|
4218
4248
|
} });
|
|
4219
|
-
}),
|
|
4220
|
-
const f = e.widget?.behavior?.typing_indicator_enabled ?? !0, P = o === "text" ?
|
|
4221
|
-
if (o === "avatar") return /* @__PURE__ */
|
|
4249
|
+
}), 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 }) {
|
|
4250
|
+
const f = e.widget?.behavior?.typing_indicator_enabled ?? !0, P = o === "text" ? r.waitingForResponse && f : !1, C = r.messages;
|
|
4251
|
+
if (o === "avatar") return /* @__PURE__ */ t(ba, { agent: e, language: n, onClose: d });
|
|
4222
4252
|
if (F)
|
|
4223
|
-
return /* @__PURE__ */
|
|
4253
|
+
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
4254
|
if (o === "voice" && u)
|
|
4225
|
-
return /* @__PURE__ */
|
|
4255
|
+
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
4256
|
if (o === "voice")
|
|
4227
|
-
return /* @__PURE__ */
|
|
4228
|
-
if (!h && (
|
|
4229
|
-
const _ = (e.widget?.behavior?.suggested_messages?.[
|
|
4230
|
-
|
|
4257
|
+
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 });
|
|
4258
|
+
if (!h && (r.messages.length === 0 || k)) {
|
|
4259
|
+
const _ = (e.widget?.behavior?.suggested_messages?.[n] || e.conversation?.suggested_messages?.[n])?.filter((B) => B.trim()) || void 0, S = (B) => {
|
|
4260
|
+
r.sendSuggestion ? z(B) : m?.(B);
|
|
4231
4261
|
}, j = o === "text_and_voice" || Ee(e) === "text_and_voice";
|
|
4232
|
-
return /* @__PURE__ */
|
|
4262
|
+
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
4263
|
}
|
|
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) :
|
|
4264
|
+
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 });
|
|
4265
|
+
}), Ht = { isListening: !1, isLoading: !1, isSpeaking: !1, toggle: async () => !1 };
|
|
4266
|
+
function fa({ isSessionReady: a, sendTextMessage: e, messages: n }) {
|
|
4267
|
+
const [i, o] = y(null), [r, s] = y(null), d = ie(() => {
|
|
4268
|
+
o((l) => (l && (a ? e(l) : s(l)), null));
|
|
4239
4269
|
}, [a, e]);
|
|
4240
4270
|
return I(() => {
|
|
4241
|
-
i &&
|
|
4242
|
-
}, [
|
|
4271
|
+
i && n.length !== 0 && d();
|
|
4272
|
+
}, [n, i, d]), I(() => {
|
|
4243
4273
|
if (!i) return;
|
|
4244
|
-
const l = setTimeout(
|
|
4274
|
+
const l = setTimeout(d, 5e3);
|
|
4245
4275
|
return () => clearTimeout(l);
|
|
4246
|
-
}, [i,
|
|
4247
|
-
!
|
|
4248
|
-
}, [a,
|
|
4276
|
+
}, [i, d]), I(() => {
|
|
4277
|
+
!r || !a || (e(r), s(null));
|
|
4278
|
+
}, [a, r, e]), { pendingWelcomeText: i, pendingMessage: r, setPendingWelcomeText: o, setPendingMessage: s, sendPendingWelcomeText: d };
|
|
4249
4279
|
}
|
|
4250
4280
|
function Oe({ isSessionReady: a, signalClientReady: e }) {
|
|
4251
|
-
const [
|
|
4281
|
+
const [n, i] = y(!1), [o, r] = y(void 0), s = R(!1);
|
|
4252
4282
|
return I(() => {
|
|
4253
|
-
!a ||
|
|
4254
|
-
}, [a,
|
|
4255
|
-
a ? (
|
|
4283
|
+
!a || s.current || !n || (s.current = !0, e(o), i(!1));
|
|
4284
|
+
}, [a, n, o, e]), { emitClientReady: ie((l) => {
|
|
4285
|
+
a ? (s.current = !0, e(l)) : (r(l), i(!0));
|
|
4256
4286
|
}, [a, e]) };
|
|
4257
4287
|
}
|
|
4258
|
-
const
|
|
4259
|
-
function
|
|
4260
|
-
const { isPreview: e = !1, ...
|
|
4288
|
+
const Wt = 300;
|
|
4289
|
+
function $t(a) {
|
|
4290
|
+
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
4291
|
I(() => {
|
|
4262
4292
|
if (i.length > P.current) {
|
|
4263
|
-
const
|
|
4264
|
-
|
|
4293
|
+
const A = i[i.length - 1];
|
|
4294
|
+
A.role === "assistant" && A.streaming && f(!1);
|
|
4265
4295
|
}
|
|
4266
4296
|
P.current = i.length;
|
|
4267
4297
|
}, [i]), oa("message_rate_limited", ie(() => {
|
|
4268
4298
|
f(!1);
|
|
4269
4299
|
}, [])), I(() => {
|
|
4270
4300
|
if (!h || !k || T.current) return;
|
|
4271
|
-
const
|
|
4272
|
-
if (
|
|
4273
|
-
T.current = !0,
|
|
4301
|
+
const A = w.current;
|
|
4302
|
+
if (A === null) return;
|
|
4303
|
+
T.current = !0, w.current = null, s("user", A), M(null);
|
|
4274
4304
|
const G = a.agent.welcomeMessages?.[a.language];
|
|
4275
4305
|
m(G ? { welcomeMessage: G } : void 0);
|
|
4276
4306
|
const N = setTimeout(() => {
|
|
4277
|
-
|
|
4278
|
-
},
|
|
4307
|
+
r(A), f(!0);
|
|
4308
|
+
}, Wt);
|
|
4279
4309
|
return () => clearTimeout(N);
|
|
4280
|
-
}, [h, k, m,
|
|
4310
|
+
}, [h, k, m, r, s]);
|
|
4281
4311
|
const C = $(() => g ? [{ id: "first-user", role: "user", text: g }, ...i] : i, [g, i]), _ = ie(() => {
|
|
4282
|
-
|
|
4283
|
-
}, [
|
|
4312
|
+
M(null), d();
|
|
4313
|
+
}, [d]), S = {
|
|
4284
4314
|
emitClientReady: m,
|
|
4285
|
-
sendMessage: (
|
|
4286
|
-
o(
|
|
4315
|
+
sendMessage: (A) => {
|
|
4316
|
+
o(A);
|
|
4287
4317
|
},
|
|
4288
|
-
queueForWelcome:
|
|
4289
|
-
enableVoice:
|
|
4290
|
-
disableVoice:
|
|
4318
|
+
queueForWelcome: re,
|
|
4319
|
+
enableVoice: re,
|
|
4320
|
+
disableVoice: re,
|
|
4291
4321
|
language: a.language,
|
|
4292
4322
|
isSessionReady: h,
|
|
4293
4323
|
supportsVoice: !1,
|
|
4294
4324
|
isVoiceActive: !1,
|
|
4295
4325
|
chatKind: "text"
|
|
4296
|
-
}, j = (
|
|
4297
|
-
a.onSessionStart?.(),
|
|
4298
|
-
},
|
|
4299
|
-
a.onTextSend ? a.onTextSend(
|
|
4326
|
+
}, j = (A, G) => {
|
|
4327
|
+
a.onSessionStart?.(), x.current ? (f(!0), G.sendMessage(A)) : (x.current = !0, M(A), w.current = A, p(!0), f(!0));
|
|
4328
|
+
}, B = (A) => {
|
|
4329
|
+
a.onTextSend ? a.onTextSend(A, S) : j(A, S);
|
|
4300
4330
|
};
|
|
4301
|
-
return /* @__PURE__ */
|
|
4331
|
+
return /* @__PURE__ */ t(
|
|
4302
4332
|
Ke,
|
|
4303
4333
|
{
|
|
4304
|
-
...
|
|
4334
|
+
...n,
|
|
4305
4335
|
isPreview: e,
|
|
4306
4336
|
chatKind: "text",
|
|
4307
4337
|
sdk: {
|
|
4308
4338
|
messages: C,
|
|
4309
|
-
sendTextMessage:
|
|
4339
|
+
sendTextMessage: B,
|
|
4310
4340
|
clearMessages: _,
|
|
4311
|
-
clearSessionHistory:
|
|
4341
|
+
clearSessionHistory: c,
|
|
4312
4342
|
isAudioPlaying: !1,
|
|
4313
4343
|
partialTranscript: null,
|
|
4314
4344
|
changeSessionLanguage: l,
|
|
@@ -4318,36 +4348,36 @@ function Zn(a) {
|
|
|
4318
4348
|
isVoiceSetupLoading: !1,
|
|
4319
4349
|
isVoiceActive: !1,
|
|
4320
4350
|
isSessionReady: h,
|
|
4321
|
-
vad:
|
|
4322
|
-
startVoice:
|
|
4323
|
-
prepareVoice:
|
|
4324
|
-
toggleVoice:
|
|
4351
|
+
vad: Ht,
|
|
4352
|
+
startVoice: re,
|
|
4353
|
+
prepareVoice: re,
|
|
4354
|
+
toggleVoice: re,
|
|
4325
4355
|
signalClientReady: m,
|
|
4326
|
-
waitingForResponse:
|
|
4327
|
-
sendSuggestion:
|
|
4356
|
+
waitingForResponse: z,
|
|
4357
|
+
sendSuggestion: B
|
|
4328
4358
|
}
|
|
4329
4359
|
}
|
|
4330
4360
|
);
|
|
4331
4361
|
}
|
|
4332
|
-
function
|
|
4333
|
-
const { isPreview: e = !1, ...
|
|
4362
|
+
function Zt(a) {
|
|
4363
|
+
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
4364
|
enabled: !0,
|
|
4335
4365
|
preloadStream: !1
|
|
4336
|
-
}), { isLoading:
|
|
4366
|
+
}), { isLoading: M, isListening: z, toggle: f } = g, P = M, C = z || k;
|
|
4337
4367
|
I(() => {
|
|
4338
|
-
!k || !h ||
|
|
4339
|
-
}, [k, h,
|
|
4368
|
+
!k || !h || M || z || f();
|
|
4369
|
+
}, [k, h, M, z, f]);
|
|
4340
4370
|
const _ = () => {
|
|
4341
4371
|
a.onSessionStart?.();
|
|
4342
|
-
},
|
|
4372
|
+
}, S = {
|
|
4343
4373
|
emitClientReady: T,
|
|
4344
4374
|
sendMessage: (N) => {
|
|
4345
|
-
h ? o(N) :
|
|
4375
|
+
h ? o(N) : w(N);
|
|
4346
4376
|
},
|
|
4347
|
-
queueForWelcome: (N) =>
|
|
4377
|
+
queueForWelcome: (N) => x(N),
|
|
4348
4378
|
enableVoice: () => p(!0),
|
|
4349
4379
|
disableVoice: () => {
|
|
4350
|
-
p(!1),
|
|
4380
|
+
p(!1), z && f();
|
|
4351
4381
|
},
|
|
4352
4382
|
language: a.language,
|
|
4353
4383
|
isSessionReady: h,
|
|
@@ -4358,23 +4388,23 @@ function Jn(a) {
|
|
|
4358
4388
|
_(), N.enableVoice();
|
|
4359
4389
|
const Y = a.agent.welcomeMessages?.[a.language];
|
|
4360
4390
|
N.emitClientReady(Y ? { welcomeMessage: Y } : void 0);
|
|
4361
|
-
},
|
|
4391
|
+
}, B = (N) => {
|
|
4362
4392
|
N.isVoiceActive ? N.disableVoice() : N.enableVoice();
|
|
4363
4393
|
};
|
|
4364
|
-
return /* @__PURE__ */
|
|
4394
|
+
return /* @__PURE__ */ t(
|
|
4365
4395
|
Ke,
|
|
4366
4396
|
{
|
|
4367
|
-
...
|
|
4397
|
+
...n,
|
|
4368
4398
|
isPreview: e,
|
|
4369
4399
|
chatKind: "voice",
|
|
4370
4400
|
sdk: {
|
|
4371
4401
|
messages: i,
|
|
4372
4402
|
sendTextMessage: () => {
|
|
4373
4403
|
},
|
|
4374
|
-
clearMessages:
|
|
4375
|
-
clearSessionHistory:
|
|
4376
|
-
isAudioPlaying:
|
|
4377
|
-
partialTranscript:
|
|
4404
|
+
clearMessages: r,
|
|
4405
|
+
clearSessionHistory: c,
|
|
4406
|
+
isAudioPlaying: s,
|
|
4407
|
+
partialTranscript: d,
|
|
4378
4408
|
changeSessionLanguage: l,
|
|
4379
4409
|
error: u,
|
|
4380
4410
|
isAgentThinking: F,
|
|
@@ -4384,21 +4414,21 @@ function Jn(a) {
|
|
|
4384
4414
|
isSessionReady: h,
|
|
4385
4415
|
vad: g,
|
|
4386
4416
|
startVoice: () => {
|
|
4387
|
-
a.onVoiceStart ? a.onVoiceStart(
|
|
4417
|
+
a.onVoiceStart ? a.onVoiceStart(S) : j(S);
|
|
4388
4418
|
},
|
|
4389
4419
|
prepareVoice: () => {
|
|
4390
4420
|
},
|
|
4391
4421
|
toggleVoice: () => {
|
|
4392
|
-
a.onVoiceToggle ? a.onVoiceToggle(
|
|
4422
|
+
a.onVoiceToggle ? a.onVoiceToggle(S) : B(S);
|
|
4393
4423
|
},
|
|
4394
4424
|
signalClientReady: m
|
|
4395
4425
|
}
|
|
4396
4426
|
}
|
|
4397
4427
|
);
|
|
4398
4428
|
}
|
|
4399
|
-
const
|
|
4400
|
-
function
|
|
4401
|
-
const { isPreview: e = !1, ...
|
|
4429
|
+
const Jt = 300;
|
|
4430
|
+
function Xt(a) {
|
|
4431
|
+
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
4432
|
I(() => {
|
|
4403
4433
|
if (i.length > N.current) {
|
|
4404
4434
|
const q = i[i.length - 1];
|
|
@@ -4408,35 +4438,35 @@ function ei(a) {
|
|
|
4408
4438
|
}, [i]), oa("message_rate_limited", ie(() => {
|
|
4409
4439
|
G(!1);
|
|
4410
4440
|
}, []));
|
|
4411
|
-
const Y =
|
|
4441
|
+
const Y = sa({
|
|
4412
4442
|
enabled: !0,
|
|
4413
4443
|
preloadStream: !1
|
|
4414
4444
|
}), { isLoading: O, isListening: U, toggle: J } = Y, X = O, W = U || k;
|
|
4415
4445
|
I(() => {
|
|
4416
4446
|
!k || !b || O || U || J();
|
|
4417
4447
|
}, [k, b, O, U, J]), I(() => {
|
|
4418
|
-
if (!b || !
|
|
4448
|
+
if (!b || !M || j.current) return;
|
|
4419
4449
|
const q = g.current;
|
|
4420
4450
|
if (q === null) return;
|
|
4421
|
-
j.current = !0, g.current = null,
|
|
4422
|
-
const
|
|
4423
|
-
h(
|
|
4451
|
+
j.current = !0, g.current = null, s("user", q), D(null);
|
|
4452
|
+
const te = a.agent.welcomeMessages?.[a.language];
|
|
4453
|
+
h(te ? { welcomeMessage: te } : void 0);
|
|
4424
4454
|
const Pe = setTimeout(() => {
|
|
4425
|
-
|
|
4426
|
-
},
|
|
4455
|
+
r(q), G(!0);
|
|
4456
|
+
}, Jt);
|
|
4427
4457
|
return () => clearTimeout(Pe);
|
|
4428
|
-
}, [b,
|
|
4458
|
+
}, [b, M, h, r, s]), I(() => {
|
|
4429
4459
|
if (!b || !P || _.current) return;
|
|
4430
4460
|
const q = f.current;
|
|
4431
|
-
q !== null && (_.current = !0, f.current = null,
|
|
4432
|
-
}, [b, P,
|
|
4433
|
-
const ee = $(() =>
|
|
4434
|
-
D(null),
|
|
4435
|
-
}, [
|
|
4461
|
+
q !== null && (_.current = !0, f.current = null, s("user", q), r(q), G(!0), C(!1));
|
|
4462
|
+
}, [b, P, r, s]);
|
|
4463
|
+
const ee = $(() => B ? [{ id: "first-user", role: "user", text: B }, ...i] : i, [B, i]), K = ie(() => {
|
|
4464
|
+
D(null), S.current = !1, j.current = !1, d();
|
|
4465
|
+
}, [d]), me = () => {
|
|
4436
4466
|
a.onSessionStart?.();
|
|
4437
4467
|
}, ae = {
|
|
4438
4468
|
emitClientReady: (q) => {
|
|
4439
|
-
j.current = !0,
|
|
4469
|
+
j.current = !0, S.current = !0, T(q);
|
|
4440
4470
|
},
|
|
4441
4471
|
sendMessage: (q) => {
|
|
4442
4472
|
o(q);
|
|
@@ -4452,15 +4482,15 @@ function ei(a) {
|
|
|
4452
4482
|
supportsVoice: !0,
|
|
4453
4483
|
isVoiceActive: W,
|
|
4454
4484
|
chatKind: "text_and_voice"
|
|
4455
|
-
}, le = (q,
|
|
4456
|
-
me(), !
|
|
4485
|
+
}, le = (q, te) => {
|
|
4486
|
+
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
4487
|
}, ce = (q) => {
|
|
4458
|
-
me(),
|
|
4459
|
-
const
|
|
4460
|
-
q.emitClientReady(
|
|
4488
|
+
me(), S.current = !0, j.current = !0, a.onStartVoice?.(), q.enableVoice();
|
|
4489
|
+
const te = a.agent.welcomeMessages?.[a.language];
|
|
4490
|
+
q.emitClientReady(te ? { welcomeMessage: te } : void 0);
|
|
4461
4491
|
}, he = (q) => {
|
|
4462
4492
|
q.isVoiceActive ? q.disableVoice() : q.enableVoice();
|
|
4463
|
-
},
|
|
4493
|
+
}, Me = {
|
|
4464
4494
|
messages: ee,
|
|
4465
4495
|
sendTextMessage: (q) => {
|
|
4466
4496
|
a.onTextSend ? a.onTextSend(q, ae) : le(q, ae);
|
|
@@ -4468,11 +4498,11 @@ function ei(a) {
|
|
|
4468
4498
|
clearMessages: K,
|
|
4469
4499
|
clearSessionHistory: u,
|
|
4470
4500
|
isAudioPlaying: l,
|
|
4471
|
-
partialTranscript:
|
|
4501
|
+
partialTranscript: c,
|
|
4472
4502
|
changeSessionLanguage: m,
|
|
4473
4503
|
error: F,
|
|
4474
|
-
isAgentThinking:
|
|
4475
|
-
isAgentSpeaking:
|
|
4504
|
+
isAgentThinking: x,
|
|
4505
|
+
isAgentSpeaking: w,
|
|
4476
4506
|
isVoiceSetupLoading: X,
|
|
4477
4507
|
isVoiceActive: W,
|
|
4478
4508
|
isSessionReady: b,
|
|
@@ -4486,122 +4516,122 @@ function ei(a) {
|
|
|
4486
4516
|
a.onVoiceToggle ? a.onVoiceToggle(ae) : he(ae);
|
|
4487
4517
|
},
|
|
4488
4518
|
signalClientReady: h,
|
|
4489
|
-
waitingForResponse:
|
|
4519
|
+
waitingForResponse: A,
|
|
4490
4520
|
sendSuggestion: (q) => {
|
|
4491
|
-
me(),
|
|
4521
|
+
me(), S.current = !0, j.current = !0, a.onStartVoice?.(), p(!0), f.current = q, C(!0);
|
|
4492
4522
|
}
|
|
4493
4523
|
};
|
|
4494
|
-
return /* @__PURE__ */
|
|
4524
|
+
return /* @__PURE__ */ t(
|
|
4495
4525
|
Ke,
|
|
4496
4526
|
{
|
|
4497
|
-
...
|
|
4527
|
+
...n,
|
|
4498
4528
|
isPreview: e,
|
|
4499
4529
|
chatKind: a.textOnly ? "text" : "text_and_voice",
|
|
4500
|
-
sdk:
|
|
4530
|
+
sdk: Me
|
|
4501
4531
|
}
|
|
4502
4532
|
);
|
|
4503
4533
|
}
|
|
4504
|
-
function
|
|
4505
|
-
const { isPreview: e = !1, agent:
|
|
4506
|
-
return fa({ isSessionReady: k, sendTextMessage: h, messages: u }), Oe({ isSessionReady: k, signalClientReady:
|
|
4534
|
+
function ei(a) {
|
|
4535
|
+
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();
|
|
4536
|
+
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
4537
|
}
|
|
4508
|
-
function
|
|
4509
|
-
const
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
}, [a.defaultLanguage]),
|
|
4513
|
-
|
|
4514
|
-
}, [
|
|
4515
|
-
const u = a.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", h = $(() =>
|
|
4538
|
+
function li({ agent: a, defaultOpen: e, className: n = "", preview: i = !1, ChatBoxComponent: o }) {
|
|
4539
|
+
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]);
|
|
4540
|
+
L.useEffect(() => {
|
|
4541
|
+
c(a.defaultLanguage);
|
|
4542
|
+
}, [a.defaultLanguage]), L.useEffect(() => {
|
|
4543
|
+
d(r);
|
|
4544
|
+
}, [r]);
|
|
4545
|
+
const u = a.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", h = $(() => Be(a.widget?.appearance), [a.widget?.appearance]);
|
|
4516
4546
|
return /* @__PURE__ */ v(
|
|
4517
4547
|
"div",
|
|
4518
4548
|
{
|
|
4519
|
-
className: V("rqmii-chat-surface", `rqmii-theme-${u}`, i && "is-preview",
|
|
4549
|
+
className: V("rqmii-chat-surface", `rqmii-theme-${u}`, i && "is-preview", n),
|
|
4520
4550
|
"data-theme": u,
|
|
4521
4551
|
style: h,
|
|
4522
4552
|
children: [
|
|
4523
|
-
!
|
|
4524
|
-
|
|
4553
|
+
!s && /* @__PURE__ */ t(ma, { agent: a, onClick: () => d(!0), position: i ? "static" : "fixed" }),
|
|
4554
|
+
s && /* @__PURE__ */ t(o, { agent: a, language: l, languages: m, onLanguageChange: c, onClose: () => d(!1), isPreview: i })
|
|
4525
4555
|
]
|
|
4526
4556
|
}
|
|
4527
4557
|
);
|
|
4528
4558
|
}
|
|
4529
|
-
function
|
|
4530
|
-
const [
|
|
4559
|
+
function ai({ restUrl: a, identifier: e, fallbackAgent: n, withCredentials: i = !1, children: o, onError: r }) {
|
|
4560
|
+
const [s, d] = y(() => n ? ve(n) : null), [l, c] = y(null);
|
|
4531
4561
|
return I(() => {
|
|
4532
|
-
|
|
4533
|
-
}, [
|
|
4534
|
-
if (!e ||
|
|
4562
|
+
n && (d(ve(n)), c(null));
|
|
4563
|
+
}, [n]), I(() => {
|
|
4564
|
+
if (!e || n) return;
|
|
4535
4565
|
const m = new AbortController();
|
|
4536
|
-
return
|
|
4537
|
-
m.signal.aborted || (
|
|
4566
|
+
return c(null), In({ restUrl: a, identifier: e, withCredentials: i, signal: m.signal }).then(d).catch((u) => {
|
|
4567
|
+
m.signal.aborted || (n || c(u), r?.(u));
|
|
4538
4568
|
}), () => m.abort();
|
|
4539
|
-
}, [
|
|
4569
|
+
}, [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
4570
|
}
|
|
4541
|
-
function Ie({ agent: a, language: e, languages:
|
|
4542
|
-
const
|
|
4543
|
-
switch (
|
|
4571
|
+
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 }) {
|
|
4572
|
+
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 };
|
|
4573
|
+
switch (x) {
|
|
4544
4574
|
case "avatar":
|
|
4545
|
-
return /* @__PURE__ */
|
|
4575
|
+
return /* @__PURE__ */ t(ei, { ...w });
|
|
4546
4576
|
case "voice":
|
|
4547
|
-
return /* @__PURE__ */
|
|
4577
|
+
return /* @__PURE__ */ t(Zt, { ...w });
|
|
4548
4578
|
case "text_and_voice":
|
|
4549
|
-
return /* @__PURE__ */
|
|
4579
|
+
return /* @__PURE__ */ t(Xt, { ...w, onStartText: s, onStartVoice: d, textOnly: l });
|
|
4550
4580
|
case "text":
|
|
4551
4581
|
default:
|
|
4552
|
-
return /* @__PURE__ */
|
|
4582
|
+
return /* @__PURE__ */ t($t, { ...w });
|
|
4553
4583
|
}
|
|
4554
4584
|
}
|
|
4555
4585
|
function ni({
|
|
4556
4586
|
agent: a,
|
|
4557
4587
|
language: e,
|
|
4558
|
-
languages:
|
|
4588
|
+
languages: n,
|
|
4559
4589
|
startMode: i,
|
|
4560
4590
|
directive: o,
|
|
4561
|
-
open:
|
|
4562
|
-
onOpen:
|
|
4563
|
-
onLanguageChange:
|
|
4591
|
+
open: r,
|
|
4592
|
+
onOpen: s,
|
|
4593
|
+
onLanguageChange: d,
|
|
4564
4594
|
onMinimize: l,
|
|
4565
|
-
onStartNewSession:
|
|
4595
|
+
onStartNewSession: c,
|
|
4566
4596
|
onSessionStart: m,
|
|
4567
4597
|
onStartText: u,
|
|
4568
4598
|
onStartVoice: h
|
|
4569
4599
|
}) {
|
|
4570
|
-
const { connectionState: F, isConnected: b, isSessionTerminated:
|
|
4600
|
+
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
4601
|
I(() => {
|
|
4572
|
-
b && (
|
|
4602
|
+
b && (z.current = !0);
|
|
4573
4603
|
}, [b]), I(() => {
|
|
4574
4604
|
if (P) return;
|
|
4575
4605
|
let K = null;
|
|
4576
|
-
|
|
4606
|
+
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
4607
|
sessionId: T.sessionId,
|
|
4578
4608
|
endedBy: f.current ?? "agent",
|
|
4579
4609
|
reason: K
|
|
4580
4610
|
});
|
|
4581
|
-
}, [
|
|
4611
|
+
}, [x, F, w, T.sessionId, P]);
|
|
4582
4612
|
const Y = () => {
|
|
4583
4613
|
f.current = "user", g(), k();
|
|
4584
4614
|
}, O = P?.sessionId ?? null, U = (K) => {
|
|
4585
|
-
j || (
|
|
4586
|
-
}), G || (N(!0),
|
|
4615
|
+
j || (S(K), O && p({ sessionId: O, rating: K, endedBy: P?.endedBy }).catch(() => {
|
|
4616
|
+
}), G || (N(!0), A(!0)));
|
|
4587
4617
|
}, J = async (K) => {
|
|
4588
4618
|
if (O)
|
|
4589
4619
|
try {
|
|
4590
4620
|
await p({ sessionId: O, feedback: K, endedBy: P?.endedBy });
|
|
4591
4621
|
} catch {
|
|
4592
4622
|
}
|
|
4593
|
-
|
|
4623
|
+
B(!0), A(!1);
|
|
4594
4624
|
};
|
|
4595
|
-
if (!
|
|
4596
|
-
return /* @__PURE__ */
|
|
4625
|
+
if (!r)
|
|
4626
|
+
return /* @__PURE__ */ t(ma, { agent: a, onClick: s, active: F === "connected" });
|
|
4597
4627
|
const X = Ee(a), W = a.agentType === "cloud_avatar" || a.agentType === "desktop_avatar", ee = i === "text";
|
|
4598
|
-
return W ? /* @__PURE__ */
|
|
4628
|
+
return W ? /* @__PURE__ */ t(
|
|
4599
4629
|
Ie,
|
|
4600
4630
|
{
|
|
4601
4631
|
agent: a,
|
|
4602
4632
|
language: e,
|
|
4603
|
-
languages:
|
|
4604
|
-
onLanguageChange:
|
|
4633
|
+
languages: n,
|
|
4634
|
+
onLanguageChange: d,
|
|
4605
4635
|
onEndSession: Y,
|
|
4606
4636
|
onMinimize: l,
|
|
4607
4637
|
onSessionStart: m,
|
|
@@ -4609,43 +4639,43 @@ function ni({
|
|
|
4609
4639
|
onStartVoice: h,
|
|
4610
4640
|
textOnly: ee
|
|
4611
4641
|
}
|
|
4612
|
-
) : P ? D && O ? /* @__PURE__ */
|
|
4613
|
-
|
|
4642
|
+
) : P ? D && O ? /* @__PURE__ */ t(
|
|
4643
|
+
_t,
|
|
4614
4644
|
{
|
|
4615
4645
|
agent: a,
|
|
4616
4646
|
language: e,
|
|
4617
4647
|
rating: _,
|
|
4618
|
-
onBack: () =>
|
|
4648
|
+
onBack: () => A(!1),
|
|
4619
4649
|
onMinimize: l,
|
|
4620
4650
|
onSubmit: J
|
|
4621
4651
|
}
|
|
4622
|
-
) : /* @__PURE__ */
|
|
4623
|
-
|
|
4652
|
+
) : /* @__PURE__ */ t(
|
|
4653
|
+
Bt,
|
|
4624
4654
|
{
|
|
4625
4655
|
agent: a,
|
|
4626
4656
|
language: e,
|
|
4627
|
-
languages:
|
|
4657
|
+
languages: n,
|
|
4628
4658
|
chatKind: X === "avatar" ? "text" : X,
|
|
4629
|
-
messages:
|
|
4630
|
-
onLanguageChange:
|
|
4659
|
+
messages: M,
|
|
4660
|
+
onLanguageChange: d,
|
|
4631
4661
|
onMinimize: l,
|
|
4632
|
-
onStartNewVoice: () =>
|
|
4633
|
-
onStartNewText: (K) =>
|
|
4662
|
+
onStartNewVoice: () => c("voice"),
|
|
4663
|
+
onStartNewText: (K) => c("text", K),
|
|
4634
4664
|
rating: _,
|
|
4635
4665
|
endedBy: P.endedBy,
|
|
4636
4666
|
sessionId: O,
|
|
4637
4667
|
ratingInteractive: !j,
|
|
4638
4668
|
showTellUsMore: G && !j,
|
|
4639
4669
|
onRate: U,
|
|
4640
|
-
onTellUsMore: () =>
|
|
4670
|
+
onTellUsMore: () => A(!0)
|
|
4641
4671
|
}
|
|
4642
|
-
) : /* @__PURE__ */
|
|
4672
|
+
) : /* @__PURE__ */ t(
|
|
4643
4673
|
Ie,
|
|
4644
4674
|
{
|
|
4645
4675
|
agent: a,
|
|
4646
4676
|
language: e,
|
|
4647
|
-
languages:
|
|
4648
|
-
onLanguageChange:
|
|
4677
|
+
languages: n,
|
|
4678
|
+
onLanguageChange: d,
|
|
4649
4679
|
onEndSession: Y,
|
|
4650
4680
|
onMinimize: l,
|
|
4651
4681
|
onSessionStart: m,
|
|
@@ -4657,105 +4687,105 @@ function ni({
|
|
|
4657
4687
|
}
|
|
4658
4688
|
);
|
|
4659
4689
|
}
|
|
4660
|
-
function
|
|
4690
|
+
function ci(a) {
|
|
4661
4691
|
const {
|
|
4662
4692
|
wsUrl: e,
|
|
4663
|
-
restUrl:
|
|
4693
|
+
restUrl: n,
|
|
4664
4694
|
apiKey: i,
|
|
4665
4695
|
agentId: o,
|
|
4666
|
-
agent:
|
|
4667
|
-
language:
|
|
4668
|
-
defaultOpen:
|
|
4696
|
+
agent: r,
|
|
4697
|
+
language: s,
|
|
4698
|
+
defaultOpen: d,
|
|
4669
4699
|
open: l,
|
|
4670
|
-
className:
|
|
4700
|
+
className: c = "",
|
|
4671
4701
|
debug: m = !1,
|
|
4672
4702
|
withCredentials: u = !1,
|
|
4673
4703
|
onError: h,
|
|
4674
4704
|
onInitialized: F,
|
|
4675
4705
|
config: b,
|
|
4676
|
-
promptOverrides:
|
|
4677
|
-
clientTools:
|
|
4706
|
+
promptOverrides: x,
|
|
4707
|
+
clientTools: w,
|
|
4678
4708
|
onMinimize: T,
|
|
4679
4709
|
onOpen: k
|
|
4680
4710
|
} = a;
|
|
4681
4711
|
if ([!!i, !!o].filter(Boolean).length > 1)
|
|
4682
4712
|
throw new Error("RqmiiAgentChat: only one of apiKey, or agentId may be provided");
|
|
4683
|
-
return /* @__PURE__ */
|
|
4684
|
-
|
|
4713
|
+
return /* @__PURE__ */ t(ai, { restUrl: n, identifier: i || o, fallbackAgent: r, withCredentials: u, onError: h, children: (M) => /* @__PURE__ */ t(
|
|
4714
|
+
ti,
|
|
4685
4715
|
{
|
|
4686
4716
|
wsUrl: e,
|
|
4687
|
-
restUrl:
|
|
4717
|
+
restUrl: n,
|
|
4688
4718
|
apiKey: i,
|
|
4689
4719
|
agentId: o,
|
|
4690
|
-
agent:
|
|
4691
|
-
language:
|
|
4692
|
-
defaultOpen:
|
|
4720
|
+
agent: M,
|
|
4721
|
+
language: s,
|
|
4722
|
+
defaultOpen: d,
|
|
4693
4723
|
open: l,
|
|
4694
|
-
className:
|
|
4724
|
+
className: c,
|
|
4695
4725
|
debug: m,
|
|
4696
4726
|
withCredentials: u,
|
|
4697
4727
|
onError: h,
|
|
4698
4728
|
onInitialized: F,
|
|
4699
4729
|
config: b,
|
|
4700
|
-
promptOverrides:
|
|
4701
|
-
clientTools:
|
|
4730
|
+
promptOverrides: x,
|
|
4731
|
+
clientTools: w,
|
|
4702
4732
|
onMinimize: T,
|
|
4703
4733
|
onOpen: k
|
|
4704
4734
|
}
|
|
4705
4735
|
) });
|
|
4706
4736
|
}
|
|
4707
|
-
function
|
|
4708
|
-
const k =
|
|
4737
|
+
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 }) {
|
|
4738
|
+
const k = s !== void 0 ? s : o.widget?.behavior?.default_open ?? !1, [p, g] = y(k), M = d !== void 0 ? d : p;
|
|
4709
4739
|
I(() => {
|
|
4710
|
-
|
|
4711
|
-
}, [k,
|
|
4712
|
-
const [
|
|
4740
|
+
d === void 0 && g(k);
|
|
4741
|
+
}, [k, d]);
|
|
4742
|
+
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
4743
|
I(() => {
|
|
4714
4744
|
ua(o.widget?.appearance?.font);
|
|
4715
4745
|
}, [o.widget?.appearance?.font]);
|
|
4716
4746
|
const ee = $(() => _ === "text" ? { ...F ?? {}, use_voice: !1, use_text: !0 } : F, [F, _]), K = $(
|
|
4717
|
-
() =>
|
|
4747
|
+
() => Vn(o, ee),
|
|
4718
4748
|
[o, ee]
|
|
4719
|
-
), me = !O && K.useVoice, ae = Y ?
|
|
4720
|
-
...
|
|
4749
|
+
), me = !O && K.useVoice, ae = Y ? M : z, le = $(() => ({
|
|
4750
|
+
...n ? { apiKey: n } : {},
|
|
4721
4751
|
...i ? { agentId: i } : {},
|
|
4722
4752
|
language: P,
|
|
4723
4753
|
config: ee,
|
|
4724
4754
|
...b ? { promptOverrides: b } : {}
|
|
4725
|
-
}), [i,
|
|
4726
|
-
Q.current = j,
|
|
4727
|
-
const Ye =
|
|
4755
|
+
}), [i, n, P, ee, b]), ce = R(null), he = R(!1), Q = R(j), be = Q.current !== j;
|
|
4756
|
+
Q.current = j, z && (!he.current || be) && (ce.current = le), he.current = z, z || (ce.current = null);
|
|
4757
|
+
const Ye = z && ce.current ? ce.current : le;
|
|
4728
4758
|
I(() => {
|
|
4729
|
-
C(
|
|
4730
|
-
}, [o.defaultLanguage,
|
|
4731
|
-
const
|
|
4732
|
-
|
|
4759
|
+
C(r || o.defaultLanguage);
|
|
4760
|
+
}, [o.defaultLanguage, r]);
|
|
4761
|
+
const Me = $(() => u ? (fe) => {
|
|
4762
|
+
S("idle"), u(fe);
|
|
4733
4763
|
} : (fe) => {
|
|
4734
|
-
|
|
4764
|
+
S("idle");
|
|
4735
4765
|
}, [u]), q = () => {
|
|
4736
|
-
|
|
4737
|
-
},
|
|
4738
|
-
|
|
4766
|
+
S("text"), f(!0);
|
|
4767
|
+
}, te = () => {
|
|
4768
|
+
S("voice"), f(!0);
|
|
4739
4769
|
}, Pe = () => {
|
|
4740
|
-
|
|
4770
|
+
d === void 0 && g(!1), w?.();
|
|
4741
4771
|
}, ka = () => {
|
|
4742
|
-
|
|
4772
|
+
d === void 0 && g(!0), N(!0), T?.();
|
|
4743
4773
|
}, va = (fe, Fa) => {
|
|
4744
|
-
|
|
4745
|
-
}, Qe = o.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", ya = $(() =>
|
|
4746
|
-
return /* @__PURE__ */
|
|
4747
|
-
|
|
4774
|
+
A(fe === "text" ? { mode: "text", text: Fa ?? "" } : { mode: "voice" }), S(fe), f(!0), B((Ta) => Ta + 1);
|
|
4775
|
+
}, Qe = o.widget?.appearance?.theme?.mode === "light" ? "light" : "dark", ya = $(() => Be(o.widget?.appearance), [o.widget?.appearance]);
|
|
4776
|
+
return /* @__PURE__ */ t(
|
|
4777
|
+
wa,
|
|
4748
4778
|
{
|
|
4749
4779
|
wsUrl: a,
|
|
4750
4780
|
restUrl: e,
|
|
4751
4781
|
session: Ye,
|
|
4752
4782
|
connect: ae,
|
|
4753
4783
|
enableAudio: me,
|
|
4754
|
-
debug:
|
|
4784
|
+
debug: c,
|
|
4755
4785
|
withCredentials: m,
|
|
4756
|
-
onError:
|
|
4786
|
+
onError: Me,
|
|
4757
4787
|
onInitialized: h,
|
|
4758
|
-
clientTools:
|
|
4788
|
+
clientTools: x,
|
|
4759
4789
|
children: /* @__PURE__ */ v(
|
|
4760
4790
|
"div",
|
|
4761
4791
|
{
|
|
@@ -4769,8 +4799,8 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
|
|
|
4769
4799
|
style: ya,
|
|
4770
4800
|
dir: "ltr",
|
|
4771
4801
|
children: [
|
|
4772
|
-
X && /* @__PURE__ */
|
|
4773
|
-
|
|
4802
|
+
X && /* @__PURE__ */ t(
|
|
4803
|
+
ft,
|
|
4774
4804
|
{
|
|
4775
4805
|
message: J,
|
|
4776
4806
|
delaySeconds: U?.delay_seconds ?? 3,
|
|
@@ -4780,7 +4810,7 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
|
|
|
4780
4810
|
onClick: () => N(!0)
|
|
4781
4811
|
}
|
|
4782
4812
|
),
|
|
4783
|
-
/* @__PURE__ */
|
|
4813
|
+
/* @__PURE__ */ t(
|
|
4784
4814
|
ni,
|
|
4785
4815
|
{
|
|
4786
4816
|
agent: o,
|
|
@@ -4788,14 +4818,14 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
|
|
|
4788
4818
|
languages: W,
|
|
4789
4819
|
startMode: _,
|
|
4790
4820
|
directive: D,
|
|
4791
|
-
open:
|
|
4821
|
+
open: M,
|
|
4792
4822
|
onOpen: ka,
|
|
4793
4823
|
onLanguageChange: C,
|
|
4794
4824
|
onMinimize: Pe,
|
|
4795
4825
|
onStartNewSession: va,
|
|
4796
4826
|
onSessionStart: () => f(!0),
|
|
4797
4827
|
onStartText: q,
|
|
4798
|
-
onStartVoice:
|
|
4828
|
+
onStartVoice: te
|
|
4799
4829
|
}
|
|
4800
4830
|
)
|
|
4801
4831
|
]
|
|
@@ -4805,22 +4835,22 @@ function ii({ wsUrl: a, restUrl: e, apiKey: t, agentId: i, agent: o, language: s
|
|
|
4805
4835
|
j
|
|
4806
4836
|
);
|
|
4807
4837
|
}
|
|
4808
|
-
function
|
|
4809
|
-
const { agent: e, language:
|
|
4838
|
+
function di(a) {
|
|
4839
|
+
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
4840
|
return I(() => {
|
|
4811
|
-
|
|
4812
|
-
}, [
|
|
4841
|
+
n && h(n);
|
|
4842
|
+
}, [n]), I(() => {
|
|
4813
4843
|
m(i);
|
|
4814
4844
|
}, [i]), I(() => {
|
|
4815
4845
|
ua(l.widget?.appearance?.font);
|
|
4816
|
-
}, [l.widget?.appearance?.font]), /* @__PURE__ */
|
|
4846
|
+
}, [l.widget?.appearance?.font]), /* @__PURE__ */ t(za, { wsUrl: "", restUrl: "", enableAudio: !1, children: /* @__PURE__ */ t(
|
|
4817
4847
|
"div",
|
|
4818
4848
|
{
|
|
4819
4849
|
className: V("rqmii-chat-surface is-preview", `rqmii-theme-${b}`, o),
|
|
4820
4850
|
"data-theme": b,
|
|
4821
|
-
style:
|
|
4851
|
+
style: x,
|
|
4822
4852
|
dir: "ltr",
|
|
4823
|
-
children:
|
|
4853
|
+
children: c ? /* @__PURE__ */ t(
|
|
4824
4854
|
Ie,
|
|
4825
4855
|
{
|
|
4826
4856
|
agent: l,
|
|
@@ -4828,13 +4858,13 @@ function ui(a) {
|
|
|
4828
4858
|
languages: F,
|
|
4829
4859
|
onLanguageChange: h,
|
|
4830
4860
|
onEndSession: () => {
|
|
4831
|
-
m(!1),
|
|
4861
|
+
m(!1), d?.();
|
|
4832
4862
|
},
|
|
4833
4863
|
onMinimize: () => {
|
|
4834
|
-
m(!1),
|
|
4864
|
+
m(!1), d?.();
|
|
4835
4865
|
},
|
|
4836
|
-
messages:
|
|
4837
|
-
onSendMessage:
|
|
4866
|
+
messages: r,
|
|
4867
|
+
onSendMessage: s,
|
|
4838
4868
|
isPreview: !0
|
|
4839
4869
|
}
|
|
4840
4870
|
) : null
|
|
@@ -4842,29 +4872,29 @@ function ui(a) {
|
|
|
4842
4872
|
) });
|
|
4843
4873
|
}
|
|
4844
4874
|
export {
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4875
|
+
Kt as ConsentDialog,
|
|
4876
|
+
Bt as EndedChatPanel,
|
|
4877
|
+
hi as EpicPixelStreamingPlayer,
|
|
4878
|
+
_t as FeedbackPanel,
|
|
4879
|
+
Le as RQMII_CHAT_LANGUAGES,
|
|
4850
4880
|
Ze as RQMII_CHAT_LANGUAGE_VALUES,
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4881
|
+
Lt as RatingBar,
|
|
4882
|
+
ne as RqmiiAgentAvatar,
|
|
4883
|
+
ci as RqmiiAgentChat,
|
|
4884
|
+
di as RqmiiAgentChatPreview,
|
|
4885
|
+
wa as RqmiiAgentRoom,
|
|
4886
|
+
ei as RqmiiAvatarChatBox,
|
|
4857
4887
|
ue as RqmiiChatFooter,
|
|
4858
4888
|
ma as RqmiiChatOpenButton,
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4889
|
+
li as RqmiiChatSurface,
|
|
4890
|
+
gi as RqmiiCloudAvatarPlayer,
|
|
4891
|
+
Xt as RqmiiTextAndVoiceChatBox,
|
|
4892
|
+
$t as RqmiiTextChatBox,
|
|
4893
|
+
Zt as RqmiiVoiceChatBox,
|
|
4894
|
+
si as fetchAgentConfig,
|
|
4895
|
+
In as fetchAgentCustomization,
|
|
4866
4896
|
Je as getChatLanguage,
|
|
4867
|
-
|
|
4897
|
+
E as getChatText,
|
|
4868
4898
|
ye as normalizeChatLanguages,
|
|
4869
4899
|
ve as normalizePublicAgent,
|
|
4870
4900
|
Ee as resolveChatKind
|