hanc-webrtc-widgets 2.8.6 → 2.8.7
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.
|
@@ -46210,6 +46210,7 @@ const xk = {
|
|
|
46210
46210
|
close_btn: "Close",
|
|
46211
46211
|
failed_title: "We couldn't reach you",
|
|
46212
46212
|
retry_btn: "Try again",
|
|
46213
|
+
reload_to_retry: "Reload the page to make another callback.",
|
|
46213
46214
|
rate_limited_title: "Too many requests",
|
|
46214
46215
|
rate_limited_body: "You've already submitted a few callbacks recently. Try again in {n} {unit}.",
|
|
46215
46216
|
error_rate_limit_phone: "Too many callback requests for this number. Try again later.",
|
|
@@ -46253,6 +46254,7 @@ const xk = {
|
|
|
46253
46254
|
close_btn: "Schließen",
|
|
46254
46255
|
failed_title: "Wir konnten Sie nicht erreichen",
|
|
46255
46256
|
retry_btn: "Erneut versuchen",
|
|
46257
|
+
reload_to_retry: "Laden Sie die Seite neu, um einen weiteren Rückruf anzufordern.",
|
|
46256
46258
|
rate_limited_title: "Zu viele Anfragen",
|
|
46257
46259
|
rate_limited_body: "Sie haben kürzlich bereits mehrere Rückrufe angefordert. Versuchen Sie es in {n} {unit} erneut.",
|
|
46258
46260
|
error_rate_limit_phone: "Zu viele Rückrufanfragen für diese Nummer. Versuchen Sie es später erneut.",
|
|
@@ -46296,6 +46298,7 @@ const xk = {
|
|
|
46296
46298
|
close_btn: "Fermer",
|
|
46297
46299
|
failed_title: "Nous n'avons pas pu vous joindre",
|
|
46298
46300
|
retry_btn: "Réessayer",
|
|
46301
|
+
reload_to_retry: "Rechargez la page pour demander un nouveau rappel.",
|
|
46299
46302
|
rate_limited_title: "Trop de demandes",
|
|
46300
46303
|
rate_limited_body: "Vous avez déjà soumis plusieurs rappels récemment. Réessayez dans {n} {unit}.",
|
|
46301
46304
|
error_rate_limit_phone: "Trop de demandes de rappel pour ce numéro. Réessayez plus tard.",
|
|
@@ -46339,6 +46342,7 @@ const xk = {
|
|
|
46339
46342
|
close_btn: "Cerrar",
|
|
46340
46343
|
failed_title: "No pudimos contactarte",
|
|
46341
46344
|
retry_btn: "Reintentar",
|
|
46345
|
+
reload_to_retry: "Recarga la página para solicitar otra llamada.",
|
|
46342
46346
|
rate_limited_title: "Demasiadas solicitudes",
|
|
46343
46347
|
rate_limited_body: "Has enviado varias solicitudes recientemente. Inténtalo de nuevo en {n} {unit}.",
|
|
46344
46348
|
error_rate_limit_phone: "Demasiadas solicitudes para este número. Inténtalo más tarde.",
|
|
@@ -46382,6 +46386,7 @@ const xk = {
|
|
|
46382
46386
|
close_btn: "Chiudi",
|
|
46383
46387
|
failed_title: "Non siamo riusciti a raggiungerti",
|
|
46384
46388
|
retry_btn: "Riprova",
|
|
46389
|
+
reload_to_retry: "Ricarica la pagina per richiedere un'altra chiamata.",
|
|
46385
46390
|
rate_limited_title: "Troppe richieste",
|
|
46386
46391
|
rate_limited_body: "Hai già inviato diverse richieste di recente. Riprova fra {n} {unit}.",
|
|
46387
46392
|
error_rate_limit_phone: "Troppe richieste per questo numero. Riprova più tardi.",
|
|
@@ -46425,6 +46430,7 @@ const xk = {
|
|
|
46425
46430
|
close_btn: "Fechar",
|
|
46426
46431
|
failed_title: "Não conseguimos contactá-lo",
|
|
46427
46432
|
retry_btn: "Tentar de novo",
|
|
46433
|
+
reload_to_retry: "Recarregue a página para pedir outra chamada.",
|
|
46428
46434
|
rate_limited_title: "Demasiados pedidos",
|
|
46429
46435
|
rate_limited_body: "Já submeteu vários pedidos recentemente. Tente novamente em {n} {unit}.",
|
|
46430
46436
|
error_rate_limit_phone: "Demasiados pedidos para este número. Tente mais tarde.",
|
|
@@ -46468,6 +46474,7 @@ const xk = {
|
|
|
46468
46474
|
close_btn: "Zamknij",
|
|
46469
46475
|
failed_title: "Nie udało nam się do Ciebie dodzwonić",
|
|
46470
46476
|
retry_btn: "Spróbuj ponownie",
|
|
46477
|
+
reload_to_retry: "Odśwież stronę, aby zamówić kolejne oddzwonienie.",
|
|
46471
46478
|
rate_limited_title: "Zbyt wiele żądań",
|
|
46472
46479
|
rate_limited_body: "Wysłałeś już ostatnio kilka próśb. Spróbuj ponownie za {n} {unit}.",
|
|
46473
46480
|
error_rate_limit_phone: "Zbyt wiele próśb dla tego numeru. Spróbuj później.",
|
|
@@ -46511,6 +46518,7 @@ const xk = {
|
|
|
46511
46518
|
close_btn: "Zavřít",
|
|
46512
46519
|
failed_title: "Nepodařilo se nám se s vámi spojit",
|
|
46513
46520
|
retry_btn: "Zkusit znovu",
|
|
46521
|
+
reload_to_retry: "Obnovte stránku, abyste si vyžádali další zavolání.",
|
|
46514
46522
|
rate_limited_title: "Příliš mnoho požadavků",
|
|
46515
46523
|
rate_limited_body: "Nedávno jste již odeslal několik požadavků. Zkuste to za {n} {unit}.",
|
|
46516
46524
|
error_rate_limit_phone: "Příliš mnoho požadavků pro toto číslo. Zkuste to později.",
|
|
@@ -46554,6 +46562,7 @@ const xk = {
|
|
|
46554
46562
|
close_btn: "Bezárás",
|
|
46555
46563
|
failed_title: "Nem tudtuk elérni Önt",
|
|
46556
46564
|
retry_btn: "Újra",
|
|
46565
|
+
reload_to_retry: "Frissítse az oldalt egy újabb visszahívás kéréséhez.",
|
|
46557
46566
|
rate_limited_title: "Túl sok kérés",
|
|
46558
46567
|
rate_limited_body: "Nemrég már több visszahívást küldött. Próbálja újra {n} {unit} múlva.",
|
|
46559
46568
|
error_rate_limit_phone: "Túl sok kérés erre a számra. Próbálja később.",
|
|
@@ -46597,6 +46606,7 @@ const xk = {
|
|
|
46597
46606
|
close_btn: "Kapat",
|
|
46598
46607
|
failed_title: "Size ulaşamadık",
|
|
46599
46608
|
retry_btn: "Tekrar dene",
|
|
46609
|
+
reload_to_retry: "Yeni bir geri arama talep etmek için sayfayı yenileyin.",
|
|
46600
46610
|
rate_limited_title: "Çok fazla istek",
|
|
46601
46611
|
rate_limited_body: "Yakın zamanda birkaç istek gönderdiniz. {n} {unit} sonra tekrar deneyin.",
|
|
46602
46612
|
error_rate_limit_phone: "Bu numara için çok fazla istek. Daha sonra deneyin.",
|
|
@@ -46640,6 +46650,7 @@ const xk = {
|
|
|
46640
46650
|
close_btn: "Жабу",
|
|
46641
46651
|
failed_title: "Сізге қол жеткізе алмадық",
|
|
46642
46652
|
retry_btn: "Қайталау",
|
|
46653
|
+
reload_to_retry: "Жаңа кері қоңырау сұрату үшін бетті қайта жүктеңіз.",
|
|
46643
46654
|
rate_limited_title: "Тым көп сұраныс",
|
|
46644
46655
|
rate_limited_body: "Сіз жуырда бірнеше сұраныс жібердіңіз. {n} {unit} кейін қайталаңыз.",
|
|
46645
46656
|
error_rate_limit_phone: "Бұл нөмірге сұраныс тым көп. Кейін қайталаңыз.",
|
|
@@ -46683,6 +46694,7 @@ const xk = {
|
|
|
46683
46694
|
close_btn: "关闭",
|
|
46684
46695
|
failed_title: "我们无法联系到您",
|
|
46685
46696
|
retry_btn: "重试",
|
|
46697
|
+
reload_to_retry: "刷新页面以再次申请回拨。",
|
|
46686
46698
|
rate_limited_title: "请求过多",
|
|
46687
46699
|
rate_limited_body: "您最近已经提交了几次回电请求。请在 {n} {unit} 后重试。",
|
|
46688
46700
|
error_rate_limit_phone: "此号码请求过多。请稍后再试。",
|
|
@@ -46726,6 +46738,7 @@ const xk = {
|
|
|
46726
46738
|
close_btn: "Закрыть",
|
|
46727
46739
|
failed_title: "Не удалось до вас дозвониться",
|
|
46728
46740
|
retry_btn: "Повторить",
|
|
46741
|
+
reload_to_retry: "Перезагрузите страницу, чтобы запросить ещё один звонок.",
|
|
46729
46742
|
rate_limited_title: "Слишком много запросов",
|
|
46730
46743
|
rate_limited_body: "Вы недавно уже отправляли несколько запросов. Повторите через {n} {unit}.",
|
|
46731
46744
|
error_rate_limit_phone: "Слишком много запросов для этого номера. Попробуйте позже.",
|
|
@@ -46769,6 +46782,7 @@ const xk = {
|
|
|
46769
46782
|
close_btn: "Закрити",
|
|
46770
46783
|
failed_title: "Не вдалося до вас додзвонитися",
|
|
46771
46784
|
retry_btn: "Повторити",
|
|
46785
|
+
reload_to_retry: "Перезавантажте сторінку, щоб замовити ще один дзвінок.",
|
|
46772
46786
|
rate_limited_title: "Забагато запитів",
|
|
46773
46787
|
rate_limited_body: "Ви нещодавно вже надіслали кілька запитів. Спробуйте за {n} {unit}.",
|
|
46774
46788
|
error_rate_limit_phone: "Забагато запитів для цього номера. Спробуйте пізніше.",
|
|
@@ -46902,13 +46916,19 @@ const NE = 5e3, Tk = {
|
|
|
46902
46916
|
};
|
|
46903
46917
|
let gt = class extends ti {
|
|
46904
46918
|
constructor() {
|
|
46905
|
-
super(...arguments), this.agentId = "", this.apiBaseUrl = mi, this.skipFetch = !1, this.manifestOverride = null, this.theme = "", this.locale = "", this.view = { kind: "loading" }, this.manifest = null, this.selectedCountry = null, this.phoneRaw = "", this.phoneError = "", this.apiError = null, this.pickerOpen = !1, this.pickerSearch = "", this.pollAbort = null, this.pollTimer = null, this.lastFocusedBeforeOpen = null, this.onDocumentKey = (t) => {
|
|
46919
|
+
super(...arguments), this.agentId = "", this.apiBaseUrl = mi, this.skipFetch = !1, this.manifestOverride = null, this.theme = "", this.locale = "", this.view = { kind: "loading" }, this.manifest = null, this.selectedCountry = null, this.phoneRaw = "", this.phoneError = "", this.apiError = null, this.pickerOpen = !1, this.pickerSearch = "", this.postSubmitView = null, this.pollAbort = null, this.pollTimer = null, this.lastFocusedBeforeOpen = null, this.onDocumentKey = (t) => {
|
|
46906
46920
|
t.key === "Escape" && this.view.kind !== "closed" && this.view.kind !== "loading" && this.close();
|
|
46907
46921
|
}, this.open = () => {
|
|
46908
|
-
|
|
46909
|
-
|
|
46910
|
-
|
|
46911
|
-
|
|
46922
|
+
if (this.manifest) {
|
|
46923
|
+
if (this.lastFocusedBeforeOpen = document.activeElement, this.postSubmitView) {
|
|
46924
|
+
this.view = this.postSubmitView, (this.postSubmitView.kind === "queued" || this.postSubmitView.kind === "dialing") && this.startPolling(this.postSubmitView.request_id);
|
|
46925
|
+
return;
|
|
46926
|
+
}
|
|
46927
|
+
this.view = { kind: "form" }, setTimeout(() => {
|
|
46928
|
+
const t = this.renderRoot.querySelector(".phone-input");
|
|
46929
|
+
t == null || t.focus();
|
|
46930
|
+
}, 50);
|
|
46931
|
+
}
|
|
46912
46932
|
}, this.close = () => {
|
|
46913
46933
|
var t, A;
|
|
46914
46934
|
this.stopPolling(), this.view = { kind: "closed" }, this.apiError = null, (A = (t = this.lastFocusedBeforeOpen) == null ? void 0 : t.focus) == null || A.call(t), this.lastFocusedBeforeOpen = null;
|
|
@@ -47021,7 +47041,7 @@ let gt = class extends ti {
|
|
|
47021
47041
|
request_id: i.request_id,
|
|
47022
47042
|
position: i.position,
|
|
47023
47043
|
eta_seconds: i.estimated_wait_seconds
|
|
47024
|
-
}, this.startPolling(i.request_id);
|
|
47044
|
+
}, this.postSubmitView = this.view, this.startPolling(i.request_id);
|
|
47025
47045
|
} catch (i) {
|
|
47026
47046
|
this.handleSubmitError(i);
|
|
47027
47047
|
}
|
|
@@ -47034,11 +47054,11 @@ let gt = class extends ti {
|
|
|
47034
47054
|
"plan_required",
|
|
47035
47055
|
"domain_not_allowed",
|
|
47036
47056
|
"agent_not_found"
|
|
47037
|
-
].includes(t.body.error_code) ? this.
|
|
47057
|
+
].includes(t.body.error_code) ? this.setPostSubmitView({
|
|
47038
47058
|
kind: "failed",
|
|
47039
47059
|
reason: t.body.message ?? "Something went wrong.",
|
|
47040
47060
|
can_retry: !1
|
|
47041
|
-
} : this.view = { kind: "form" }) : (console.error("[hanc-callback] submit error:", t), this.apiError = {
|
|
47061
|
+
}) : this.view = { kind: "form" }) : (console.error("[hanc-callback] submit error:", t), this.apiError = {
|
|
47042
47062
|
error_code: "unknown",
|
|
47043
47063
|
message: "Network error. Please try again."
|
|
47044
47064
|
}, this.view = { kind: "form" });
|
|
@@ -47051,7 +47071,7 @@ let gt = class extends ti {
|
|
|
47051
47071
|
await lk(t, this.apiBaseUrl);
|
|
47052
47072
|
} catch {
|
|
47053
47073
|
}
|
|
47054
|
-
this.close();
|
|
47074
|
+
this.postSubmitView = null, this.close();
|
|
47055
47075
|
}
|
|
47056
47076
|
// ---------------------------------------------------------------------------
|
|
47057
47077
|
// polling
|
|
@@ -47085,32 +47105,35 @@ let gt = class extends ti {
|
|
|
47085
47105
|
onPollUpdate(t, A) {
|
|
47086
47106
|
switch (A.status) {
|
|
47087
47107
|
case "queued":
|
|
47088
|
-
this.
|
|
47108
|
+
this.setPostSubmitView({
|
|
47089
47109
|
kind: "queued",
|
|
47090
47110
|
request_id: t,
|
|
47091
47111
|
position: A.position ?? 0,
|
|
47092
47112
|
eta_seconds: A.estimated_wait_seconds ?? 0
|
|
47093
|
-
};
|
|
47113
|
+
});
|
|
47094
47114
|
return;
|
|
47095
47115
|
case "dialing":
|
|
47096
|
-
this.
|
|
47116
|
+
this.setPostSubmitView({ kind: "dialing", request_id: t });
|
|
47097
47117
|
return;
|
|
47098
47118
|
case "completed":
|
|
47099
|
-
this.stopPolling(), this.
|
|
47119
|
+
this.stopPolling(), this.setPostSubmitView({ kind: "completed" });
|
|
47100
47120
|
return;
|
|
47101
47121
|
case "failed":
|
|
47102
47122
|
case "expired":
|
|
47103
|
-
this.stopPolling(), this.
|
|
47123
|
+
this.stopPolling(), this.setPostSubmitView({
|
|
47104
47124
|
kind: "failed",
|
|
47105
47125
|
reason: A.failure_reason ?? "unknown",
|
|
47106
|
-
can_retry: !
|
|
47107
|
-
};
|
|
47126
|
+
can_retry: !1
|
|
47127
|
+
});
|
|
47108
47128
|
return;
|
|
47109
47129
|
case "cancelled":
|
|
47110
47130
|
this.stopPolling(), this.view = { kind: "closed" };
|
|
47111
47131
|
return;
|
|
47112
47132
|
}
|
|
47113
47133
|
}
|
|
47134
|
+
setPostSubmitView(t) {
|
|
47135
|
+
this.view = t, this.postSubmitView = t;
|
|
47136
|
+
}
|
|
47114
47137
|
// ---------------------------------------------------------------------------
|
|
47115
47138
|
// render
|
|
47116
47139
|
// ---------------------------------------------------------------------------
|
|
@@ -47328,6 +47351,7 @@ let gt = class extends ti {
|
|
|
47328
47351
|
${this.checkIcon()}
|
|
47329
47352
|
<h3>${t.completed_title}</h3>
|
|
47330
47353
|
<p>${t.completed_body}</p>
|
|
47354
|
+
<p class="status-hint">${t.reload_to_retry}</p>
|
|
47331
47355
|
<button class="submit-btn" type="button" @click=${this.close}>
|
|
47332
47356
|
${t.close_btn}
|
|
47333
47357
|
</button>
|
|
@@ -47345,15 +47369,10 @@ let gt = class extends ti {
|
|
|
47345
47369
|
${this.alertIcon()}
|
|
47346
47370
|
<h3>${t.failed_title}</h3>
|
|
47347
47371
|
<p>${A}</p>
|
|
47348
|
-
|
|
47349
|
-
|
|
47350
|
-
|
|
47351
|
-
|
|
47352
|
-
>
|
|
47353
|
-
${t.retry_btn}
|
|
47354
|
-
</button>` : _A`<button class="ghost-btn" type="button" @click=${this.close}>
|
|
47355
|
-
${t.close_btn}
|
|
47356
|
-
</button>`}
|
|
47372
|
+
<p class="status-hint">${t.reload_to_retry}</p>
|
|
47373
|
+
<button class="ghost-btn" type="button" @click=${this.close}>
|
|
47374
|
+
${t.close_btn}
|
|
47375
|
+
</button>
|
|
47357
47376
|
</div>
|
|
47358
47377
|
`;
|
|
47359
47378
|
}
|
|
@@ -47785,6 +47804,12 @@ gt.styles = $g`
|
|
|
47785
47804
|
font-weight: 500;
|
|
47786
47805
|
color: var(--cb-fg);
|
|
47787
47806
|
}
|
|
47807
|
+
.status .status-hint {
|
|
47808
|
+
font-size: 12px;
|
|
47809
|
+
color: var(--cb-muted);
|
|
47810
|
+
opacity: 0.75;
|
|
47811
|
+
margin-top: 8px;
|
|
47812
|
+
}
|
|
47788
47813
|
.ringing {
|
|
47789
47814
|
animation: shake 1s infinite cubic-bezier(0.36, 0, 0.66, -0.56);
|
|
47790
47815
|
transform-origin: center;
|