@ksremp/ngx-ksremp-app-lib 2.0.1 → 2.0.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/esm2022/lib/components/chatbot-lex/chatbot-lex.component.mjs +160 -83
- package/esm2022/lib/services/lex-chat/lex-chat.service.mjs +5 -1
- package/fesm2022/ksremp-ngx-ksremp-app-lib.mjs +163 -82
- package/fesm2022/ksremp-ngx-ksremp-app-lib.mjs.map +1 -1
- package/lib/components/chatbot-lex/chatbot-lex.component.d.ts +3 -1
- package/lib/components/chatbot-lex/chatbot-lex.component.d.ts.map +1 -1
- package/lib/services/lex-chat/lex-chat.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -36492,7 +36492,11 @@ class LexChatService {
|
|
|
36492
36492
|
this.chatOpen$.next(true);
|
|
36493
36493
|
}
|
|
36494
36494
|
closeChat() {
|
|
36495
|
+
this.resetSession({
|
|
36496
|
+
regenerateSessionId: true
|
|
36497
|
+
});
|
|
36495
36498
|
this.chatOpen$.next(false);
|
|
36499
|
+
this.chatIDtheft = false;
|
|
36496
36500
|
}
|
|
36497
36501
|
giveSessionId() {
|
|
36498
36502
|
return this.sessionId;
|
|
@@ -36522,31 +36526,31 @@ function ChatbotLexComponent_div_1_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
36522
36526
|
i0.ɵɵelementEnd();
|
|
36523
36527
|
} }
|
|
36524
36528
|
function ChatbotLexComponent_div_1_div_26_img_2_Template(rf, ctx) { if (rf & 1) {
|
|
36525
|
-
i0.ɵɵelement(0, "img",
|
|
36529
|
+
i0.ɵɵelement(0, "img", 37);
|
|
36526
36530
|
} }
|
|
36527
36531
|
function ChatbotLexComponent_div_1_div_26_ng_container_3_button_4_Template(rf, ctx) { if (rf & 1) {
|
|
36528
|
-
const
|
|
36529
|
-
i0.ɵɵelementStart(0, "button",
|
|
36530
|
-
i0.ɵɵlistener("mouseenter", function ChatbotLexComponent_div_1_div_26_ng_container_3_button_4_Template_button_mouseenter_0_listener() { const restoredCtx = i0.ɵɵrestoreView(
|
|
36532
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
36533
|
+
i0.ɵɵelementStart(0, "button", 40);
|
|
36534
|
+
i0.ɵɵlistener("mouseenter", function ChatbotLexComponent_div_1_div_26_ng_container_3_button_4_Template_button_mouseenter_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r20); const s_r17 = restoredCtx.$implicit; const i_r9 = i0.ɵɵnextContext(2).index; const ctx_r18 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r18.onStarEnter(i_r9, s_r17)); })("click", function ChatbotLexComponent_div_1_div_26_ng_container_3_button_4_Template_button_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r20); const s_r17 = restoredCtx.$implicit; const i_r9 = i0.ɵɵnextContext(2).index; const ctx_r21 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r21.onStarClick(s_r17, i_r9)); });
|
|
36531
36535
|
i0.ɵɵtext(1, " \u2605 ");
|
|
36532
36536
|
i0.ɵɵelementEnd();
|
|
36533
36537
|
} if (rf & 2) {
|
|
36534
|
-
const
|
|
36538
|
+
const s_r17 = ctx.$implicit;
|
|
36535
36539
|
const i_r9 = i0.ɵɵnextContext(2).index;
|
|
36536
|
-
const
|
|
36537
|
-
i0.ɵɵclassProp("filled",
|
|
36538
|
-
i0.ɵɵpropertyInterpolate1("title", "Rate ",
|
|
36539
|
-
i0.ɵɵattribute("aria-label", "Rate " +
|
|
36540
|
+
const ctx_r16 = i0.ɵɵnextContext(2);
|
|
36541
|
+
i0.ɵɵclassProp("filled", ctx_r16.isStarFilled(i_r9, s_r17));
|
|
36542
|
+
i0.ɵɵpropertyInterpolate1("title", "Rate ", s_r17, " star(s)");
|
|
36543
|
+
i0.ɵɵattribute("aria-label", "Rate " + s_r17 + " star(s)");
|
|
36540
36544
|
} }
|
|
36541
36545
|
function ChatbotLexComponent_div_1_div_26_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
36542
|
-
const
|
|
36546
|
+
const _r26 = i0.ɵɵgetCurrentView();
|
|
36543
36547
|
i0.ɵɵelementContainerStart(0);
|
|
36544
36548
|
i0.ɵɵelementStart(1, "div");
|
|
36545
36549
|
i0.ɵɵtext(2, "Your feedback matters to us");
|
|
36546
36550
|
i0.ɵɵelementEnd();
|
|
36547
|
-
i0.ɵɵelementStart(3, "div",
|
|
36548
|
-
i0.ɵɵlistener("mouseleave", function ChatbotLexComponent_div_1_div_26_ng_container_3_Template_div_mouseleave_3_listener() { i0.ɵɵrestoreView(
|
|
36549
|
-
i0.ɵɵtemplate(4, ChatbotLexComponent_div_1_div_26_ng_container_3_button_4_Template, 2, 4, "button",
|
|
36551
|
+
i0.ɵɵelementStart(3, "div", 38);
|
|
36552
|
+
i0.ɵɵlistener("mouseleave", function ChatbotLexComponent_div_1_div_26_ng_container_3_Template_div_mouseleave_3_listener() { i0.ɵɵrestoreView(_r26); const i_r9 = i0.ɵɵnextContext().index; const ctx_r24 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r24.onStarLeave(i_r9)); });
|
|
36553
|
+
i0.ɵɵtemplate(4, ChatbotLexComponent_div_1_div_26_ng_container_3_button_4_Template, 2, 4, "button", 39);
|
|
36550
36554
|
i0.ɵɵelementEnd();
|
|
36551
36555
|
i0.ɵɵelementContainerEnd();
|
|
36552
36556
|
} if (rf & 2) {
|
|
@@ -36554,51 +36558,56 @@ function ChatbotLexComponent_div_1_div_26_ng_container_3_Template(rf, ctx) { if
|
|
|
36554
36558
|
i0.ɵɵadvance(4);
|
|
36555
36559
|
i0.ɵɵproperty("ngForOf", ctx_r11.getStars());
|
|
36556
36560
|
} }
|
|
36561
|
+
function ChatbotLexComponent_div_1_div_26_ng_template_4_ng_container_3_br_2_Template(rf, ctx) { if (rf & 1) {
|
|
36562
|
+
i0.ɵɵelement(0, "br");
|
|
36563
|
+
} }
|
|
36564
|
+
function ChatbotLexComponent_div_1_div_26_ng_template_4_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
36565
|
+
i0.ɵɵelementContainerStart(0);
|
|
36566
|
+
i0.ɵɵtext(1);
|
|
36567
|
+
i0.ɵɵtemplate(2, ChatbotLexComponent_div_1_div_26_ng_template_4_ng_container_3_br_2_Template, 1, 0, "br", 7);
|
|
36568
|
+
i0.ɵɵelementContainerEnd();
|
|
36569
|
+
} if (rf & 2) {
|
|
36570
|
+
const line_r30 = ctx.$implicit;
|
|
36571
|
+
const last_r31 = ctx.last;
|
|
36572
|
+
i0.ɵɵadvance(1);
|
|
36573
|
+
i0.ɵɵtextInterpolate1(" ", line_r30, " ");
|
|
36574
|
+
i0.ɵɵadvance(1);
|
|
36575
|
+
i0.ɵɵproperty("ngIf", !last_r31);
|
|
36576
|
+
} }
|
|
36557
36577
|
function ChatbotLexComponent_div_1_div_26_ng_template_4_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
36558
|
-
const
|
|
36559
|
-
i0.ɵɵelementStart(0, "div",
|
|
36560
|
-
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_div_26_ng_template_4_div_4_Template_button_click_1_listener() { i0.ɵɵrestoreView(
|
|
36578
|
+
const _r35 = i0.ɵɵgetCurrentView();
|
|
36579
|
+
i0.ɵɵelementStart(0, "div", 46)(1, "button", 47);
|
|
36580
|
+
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_div_26_ng_template_4_div_4_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r35); const i_r9 = i0.ɵɵnextContext(2).index; const ctx_r33 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r33.onYesNoClick("Yes", i_r9)); });
|
|
36561
36581
|
i0.ɵɵtext(2, "Yes");
|
|
36562
36582
|
i0.ɵɵelementEnd();
|
|
36563
|
-
i0.ɵɵelementStart(3, "button",
|
|
36564
|
-
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_div_26_ng_template_4_div_4_Template_button_click_3_listener() { i0.ɵɵrestoreView(
|
|
36583
|
+
i0.ɵɵelementStart(3, "button", 48);
|
|
36584
|
+
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_div_26_ng_template_4_div_4_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r35); const i_r9 = i0.ɵɵnextContext(2).index; const ctx_r36 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r36.onYesNoClick("No", i_r9)); });
|
|
36565
36585
|
i0.ɵɵtext(4, "No");
|
|
36566
36586
|
i0.ɵɵelementEnd()();
|
|
36567
36587
|
} }
|
|
36568
|
-
function
|
|
36569
|
-
const
|
|
36570
|
-
i0.ɵɵelementStart(0, "
|
|
36571
|
-
i0.ɵɵlistener("click", function
|
|
36572
|
-
i0.ɵɵtext(2, "\uD83D\uDC4D");
|
|
36573
|
-
i0.ɵɵelementEnd();
|
|
36574
|
-
i0.ɵɵelementStart(3, "button", 50);
|
|
36575
|
-
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_div_26_ng_template_4_div_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r36); const i_r9 = i0.ɵɵnextContext(2).index; const ctx_r37 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r37.sendFeedback("Thumbs down", i_r9)); });
|
|
36576
|
-
i0.ɵɵtext(4, "\uD83D\uDC4E");
|
|
36577
|
-
i0.ɵɵelementEnd()();
|
|
36578
|
-
} }
|
|
36579
|
-
function ChatbotLexComponent_div_1_div_26_ng_template_4_div_6_div_1_button_1_Template(rf, ctx) { if (rf & 1) {
|
|
36580
|
-
const _r44 = i0.ɵɵgetCurrentView();
|
|
36581
|
-
i0.ɵɵelementStart(0, "button", 46);
|
|
36582
|
-
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_div_26_ng_template_4_div_6_div_1_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r44); const url_r40 = i0.ɵɵnextContext().$implicit; const ctx_r42 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r42.openLink(url_r40)); });
|
|
36588
|
+
function ChatbotLexComponent_div_1_div_26_ng_template_4_div_5_div_1_button_1_Template(rf, ctx) { if (rf & 1) {
|
|
36589
|
+
const _r43 = i0.ɵɵgetCurrentView();
|
|
36590
|
+
i0.ɵɵelementStart(0, "button", 47);
|
|
36591
|
+
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_div_26_ng_template_4_div_5_div_1_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r43); const url_r39 = i0.ɵɵnextContext().$implicit; const ctx_r41 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r41.openLink(url_r39)); });
|
|
36583
36592
|
i0.ɵɵtext(1);
|
|
36584
36593
|
i0.ɵɵelementEnd();
|
|
36585
36594
|
} if (rf & 2) {
|
|
36586
|
-
const
|
|
36595
|
+
const url_r39 = i0.ɵɵnextContext().$implicit;
|
|
36587
36596
|
i0.ɵɵadvance(1);
|
|
36588
|
-
i0.ɵɵtextInterpolate(
|
|
36597
|
+
i0.ɵɵtextInterpolate(url_r39);
|
|
36589
36598
|
} }
|
|
36590
|
-
function
|
|
36599
|
+
function ChatbotLexComponent_div_1_div_26_ng_template_4_div_5_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
36591
36600
|
i0.ɵɵelementStart(0, "div");
|
|
36592
|
-
i0.ɵɵtemplate(1,
|
|
36601
|
+
i0.ɵɵtemplate(1, ChatbotLexComponent_div_1_div_26_ng_template_4_div_5_div_1_button_1_Template, 2, 1, "button", 49);
|
|
36593
36602
|
i0.ɵɵelementEnd();
|
|
36594
36603
|
} if (rf & 2) {
|
|
36595
36604
|
const msg_r8 = i0.ɵɵnextContext(3).$implicit;
|
|
36596
36605
|
i0.ɵɵadvance(1);
|
|
36597
36606
|
i0.ɵɵproperty("ngIf", msg_r8.from === "bot");
|
|
36598
36607
|
} }
|
|
36599
|
-
function
|
|
36608
|
+
function ChatbotLexComponent_div_1_div_26_ng_template_4_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
36600
36609
|
i0.ɵɵelementStart(0, "div");
|
|
36601
|
-
i0.ɵɵtemplate(1,
|
|
36610
|
+
i0.ɵɵtemplate(1, ChatbotLexComponent_div_1_div_26_ng_template_4_div_5_div_1_Template, 2, 1, "div", 44);
|
|
36602
36611
|
i0.ɵɵelementEnd();
|
|
36603
36612
|
} if (rf & 2) {
|
|
36604
36613
|
const msg_r8 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -36606,26 +36615,36 @@ function ChatbotLexComponent_div_1_div_26_ng_template_4_div_6_Template(rf, ctx)
|
|
|
36606
36615
|
i0.ɵɵproperty("ngForOf", msg_r8.url);
|
|
36607
36616
|
} }
|
|
36608
36617
|
function ChatbotLexComponent_div_1_div_26_ng_template_4_Template(rf, ctx) { if (rf & 1) {
|
|
36609
|
-
i0.ɵɵelementStart(0, "div",
|
|
36610
|
-
i0.ɵɵ
|
|
36618
|
+
i0.ɵɵelementStart(0, "div", 41)(1, "div", 42)(2, "span", 43);
|
|
36619
|
+
i0.ɵɵtemplate(3, ChatbotLexComponent_div_1_div_26_ng_template_4_ng_container_3_Template, 3, 2, "ng-container", 44);
|
|
36611
36620
|
i0.ɵɵelementEnd();
|
|
36612
|
-
i0.ɵɵtemplate(4, ChatbotLexComponent_div_1_div_26_ng_template_4_div_4_Template, 5, 0, "div",
|
|
36621
|
+
i0.ɵɵtemplate(4, ChatbotLexComponent_div_1_div_26_ng_template_4_div_4_Template, 5, 0, "div", 45)(5, ChatbotLexComponent_div_1_div_26_ng_template_4_div_5_Template, 2, 1, "div", 7);
|
|
36613
36622
|
i0.ɵɵelementEnd()();
|
|
36614
36623
|
} if (rf & 2) {
|
|
36615
|
-
const
|
|
36616
|
-
const msg_r8 =
|
|
36617
|
-
const i_r9 =
|
|
36624
|
+
const ctx_r47 = i0.ɵɵnextContext();
|
|
36625
|
+
const msg_r8 = ctx_r47.$implicit;
|
|
36626
|
+
const i_r9 = ctx_r47.index;
|
|
36618
36627
|
const ctx_r12 = i0.ɵɵnextContext(2);
|
|
36628
|
+
i0.ɵɵclassProp("short-welcome", msg_r8.from === "bot" && msg_r8.text === "Hi! How may I help you?");
|
|
36619
36629
|
i0.ɵɵadvance(3);
|
|
36620
|
-
i0.ɵɵ
|
|
36630
|
+
i0.ɵɵproperty("ngForOf", ctx_r12.displayLines(msg_r8.text));
|
|
36621
36631
|
i0.ɵɵadvance(1);
|
|
36622
36632
|
i0.ɵɵproperty("ngIf", msg_r8.from === "bot" && ctx_r12.isYesNoPrompt(msg_r8.text, i_r9));
|
|
36623
36633
|
i0.ɵɵadvance(1);
|
|
36624
|
-
i0.ɵɵproperty("ngIf", msg_r8.from === "bot" && !ctx_r12.isMessageRated(i_r9) && i_r9 === ctx_r12.messages.length - 1 && !ctx_r12.isAck);
|
|
36625
|
-
i0.ɵɵadvance(1);
|
|
36626
36634
|
i0.ɵɵproperty("ngIf", msg_r8.url && msg_r8.url.length);
|
|
36627
36635
|
} }
|
|
36628
36636
|
function ChatbotLexComponent_div_1_div_26_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
36637
|
+
const _r50 = i0.ɵɵgetCurrentView();
|
|
36638
|
+
i0.ɵɵelementStart(0, "div", 50)(1, "button", 51);
|
|
36639
|
+
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_div_26_div_6_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r50); const i_r9 = i0.ɵɵnextContext().index; const ctx_r48 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r48.sendFeedback("Thumbs up", i_r9)); });
|
|
36640
|
+
i0.ɵɵtext(2, "\uD83D\uDC4D");
|
|
36641
|
+
i0.ɵɵelementEnd();
|
|
36642
|
+
i0.ɵɵelementStart(3, "button", 52);
|
|
36643
|
+
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_div_26_div_6_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r50); const i_r9 = i0.ɵɵnextContext().index; const ctx_r51 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r51.sendFeedback("Thumbs down", i_r9)); });
|
|
36644
|
+
i0.ɵɵtext(4, "\uD83D\uDC4E");
|
|
36645
|
+
i0.ɵɵelementEnd()();
|
|
36646
|
+
} }
|
|
36647
|
+
function ChatbotLexComponent_div_1_div_26_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
36629
36648
|
i0.ɵɵelementStart(0, "div", 30);
|
|
36630
36649
|
i0.ɵɵtext(1);
|
|
36631
36650
|
i0.ɵɵpipe(2, "date");
|
|
@@ -36638,9 +36657,9 @@ function ChatbotLexComponent_div_1_div_26_div_6_Template(rf, ctx) { if (rf & 1)
|
|
|
36638
36657
|
} }
|
|
36639
36658
|
function ChatbotLexComponent_div_1_div_26_Template(rf, ctx) { if (rf & 1) {
|
|
36640
36659
|
i0.ɵɵelementStart(0, "div", 30)(1, "div", 31);
|
|
36641
|
-
i0.ɵɵtemplate(2, ChatbotLexComponent_div_1_div_26_img_2_Template, 1, 0, "img", 32)(3, ChatbotLexComponent_div_1_div_26_ng_container_3_Template, 5, 1, "ng-container", 33)(4, ChatbotLexComponent_div_1_div_26_ng_template_4_Template,
|
|
36660
|
+
i0.ɵɵtemplate(2, ChatbotLexComponent_div_1_div_26_img_2_Template, 1, 0, "img", 32)(3, ChatbotLexComponent_div_1_div_26_ng_container_3_Template, 5, 1, "ng-container", 33)(4, ChatbotLexComponent_div_1_div_26_ng_template_4_Template, 6, 5, "ng-template", null, 34, i0.ɵɵtemplateRefExtractor)(6, ChatbotLexComponent_div_1_div_26_div_6_Template, 5, 0, "div", 35);
|
|
36642
36661
|
i0.ɵɵelementEnd();
|
|
36643
|
-
i0.ɵɵtemplate(
|
|
36662
|
+
i0.ɵɵtemplate(7, ChatbotLexComponent_div_1_div_26_div_7_Template, 3, 5, "div", 36);
|
|
36644
36663
|
i0.ɵɵelementEnd();
|
|
36645
36664
|
} if (rf & 2) {
|
|
36646
36665
|
const msg_r8 = ctx.$implicit;
|
|
@@ -36653,20 +36672,22 @@ function ChatbotLexComponent_div_1_div_26_Template(rf, ctx) { if (rf & 1) {
|
|
|
36653
36672
|
i0.ɵɵadvance(1);
|
|
36654
36673
|
i0.ɵɵproperty("ngIf", msg_r8.from === "bot" && ctx_r6.isStarRatingPrompt(msg_r8.text, i_r9))("ngIfElse", _r13);
|
|
36655
36674
|
i0.ɵɵadvance(3);
|
|
36675
|
+
i0.ɵɵproperty("ngIf", msg_r8.from === "bot" && (msg_r8.text == null ? null : msg_r8.text.trim()) != "Hi! How may I help you?" && !ctx_r6.isMessageRated(i_r9) && i_r9 === ctx_r6.messages.length - 1 && !ctx_r6.isAck);
|
|
36676
|
+
i0.ɵɵadvance(1);
|
|
36656
36677
|
i0.ɵɵproperty("ngIf", msg_r8.timestamp);
|
|
36657
36678
|
} }
|
|
36658
36679
|
function ChatbotLexComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
36659
|
-
const
|
|
36680
|
+
const _r55 = i0.ɵɵgetCurrentView();
|
|
36660
36681
|
i0.ɵɵelementStart(0, "div", 4)(1, "div", 5)(2, "button", 6);
|
|
36661
|
-
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_Template_button_click_2_listener() { i0.ɵɵrestoreView(
|
|
36682
|
+
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r55); const ctx_r54 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r54.toggleExpand()); });
|
|
36662
36683
|
i0.ɵɵtemplate(3, ChatbotLexComponent_div_1_span_3_Template, 2, 0, "span", 7);
|
|
36663
36684
|
i0.ɵɵelementEnd();
|
|
36664
36685
|
i0.ɵɵelementStart(4, "button", 8);
|
|
36665
|
-
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_Template_button_click_4_listener() { i0.ɵɵrestoreView(
|
|
36686
|
+
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r55); const ctx_r56 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r56.minimizeChat()); });
|
|
36666
36687
|
i0.ɵɵtext(5, " _ ");
|
|
36667
36688
|
i0.ɵɵelementEnd();
|
|
36668
36689
|
i0.ɵɵelementStart(6, "button", 9);
|
|
36669
|
-
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_Template_button_click_6_listener() { i0.ɵɵrestoreView(
|
|
36690
|
+
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r55); const ctx_r57 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r57.closeChat()); });
|
|
36670
36691
|
i0.ɵɵtext(7, " \u2715 ");
|
|
36671
36692
|
i0.ɵɵelementEnd()();
|
|
36672
36693
|
i0.ɵɵelementStart(8, "div", 10)(9, "span", 11);
|
|
@@ -36680,22 +36701,22 @@ function ChatbotLexComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
36680
36701
|
i0.ɵɵtext(17);
|
|
36681
36702
|
i0.ɵɵelementEnd()()()();
|
|
36682
36703
|
i0.ɵɵelementStart(18, "div", 18)(19, "button", 19);
|
|
36683
|
-
i0.ɵɵlistener("mouseenter", function ChatbotLexComponent_div_1_Template_button_mouseenter_19_listener() { i0.ɵɵrestoreView(
|
|
36704
|
+
i0.ɵɵlistener("mouseenter", function ChatbotLexComponent_div_1_Template_button_mouseenter_19_listener() { i0.ɵɵrestoreView(_r55); const ctx_r58 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r58.getSessionID()); })("click", function ChatbotLexComponent_div_1_Template_button_click_19_listener() { i0.ɵɵrestoreView(_r55); const ctx_r59 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r59.copySessionId()); });
|
|
36684
36705
|
i0.ɵɵtext(20, " \uD83D\uDEC8 ");
|
|
36685
36706
|
i0.ɵɵelementEnd();
|
|
36686
36707
|
i0.ɵɵelementStart(21, "button", 20);
|
|
36687
|
-
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_Template_button_click_21_listener() { i0.ɵɵrestoreView(
|
|
36708
|
+
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_Template_button_click_21_listener() { i0.ɵɵrestoreView(_r55); const ctx_r60 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r60.refreshChat()); });
|
|
36688
36709
|
i0.ɵɵtext(22, " \u27F3 ");
|
|
36689
36710
|
i0.ɵɵelementEnd()()();
|
|
36690
36711
|
i0.ɵɵelementStart(23, "div", 21)(24, "div", 22, 23);
|
|
36691
|
-
i0.ɵɵtemplate(26, ChatbotLexComponent_div_1_div_26_Template,
|
|
36712
|
+
i0.ɵɵtemplate(26, ChatbotLexComponent_div_1_div_26_Template, 8, 6, "div", 24);
|
|
36692
36713
|
i0.ɵɵelementEnd()();
|
|
36693
36714
|
i0.ɵɵelementStart(27, "div", 25)(28, "div", 26)(29, "textarea", 27, 28);
|
|
36694
|
-
i0.ɵɵlistener("ngModelChange", function ChatbotLexComponent_div_1_Template_textarea_ngModelChange_29_listener($event) { i0.ɵɵrestoreView(
|
|
36715
|
+
i0.ɵɵlistener("ngModelChange", function ChatbotLexComponent_div_1_Template_textarea_ngModelChange_29_listener($event) { i0.ɵɵrestoreView(_r55); const ctx_r61 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r61.userInput = $event); })("input", function ChatbotLexComponent_div_1_Template_textarea_input_29_listener() { i0.ɵɵrestoreView(_r55); const ctx_r62 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r62.autoGrow()); })("keydown.enter", function ChatbotLexComponent_div_1_Template_textarea_keydown_enter_29_listener($event) { i0.ɵɵrestoreView(_r55); const ctx_r63 = i0.ɵɵnextContext(); $event.preventDefault(); return i0.ɵɵresetView(ctx_r63.handleEnter()); });
|
|
36695
36716
|
i0.ɵɵtext(31, " ");
|
|
36696
36717
|
i0.ɵɵelementEnd()();
|
|
36697
36718
|
i0.ɵɵelementStart(32, "button", 29);
|
|
36698
|
-
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_Template_button_click_32_listener() { i0.ɵɵrestoreView(
|
|
36719
|
+
i0.ɵɵlistener("click", function ChatbotLexComponent_div_1_Template_button_click_32_listener() { i0.ɵɵrestoreView(_r55); const ctx_r64 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r64.sendMessage()); });
|
|
36699
36720
|
i0.ɵɵtext(33, " Send ");
|
|
36700
36721
|
i0.ɵɵelementEnd()()();
|
|
36701
36722
|
} if (rf & 2) {
|
|
@@ -36704,7 +36725,7 @@ function ChatbotLexComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
36704
36725
|
i0.ɵɵadvance(3);
|
|
36705
36726
|
i0.ɵɵproperty("ngIf", !ctx_r1.isExpanded);
|
|
36706
36727
|
i0.ɵɵadvance(12);
|
|
36707
|
-
i0.ɵɵclassProp("offline",
|
|
36728
|
+
i0.ɵɵclassProp("offline", ctx_r1.botOffline);
|
|
36708
36729
|
i0.ɵɵadvance(1);
|
|
36709
36730
|
i0.ɵɵclassProp("online-text", !ctx_r1.botOffline)("offline-text", ctx_r1.botOffline);
|
|
36710
36731
|
i0.ɵɵadvance(1);
|
|
@@ -36797,6 +36818,7 @@ class ChatbotLexComponent {
|
|
|
36797
36818
|
url: reply?.url ?? [],
|
|
36798
36819
|
timestamp: new Date()
|
|
36799
36820
|
});
|
|
36821
|
+
console.log("ReportId Theft Response Received");
|
|
36800
36822
|
this.scrollToBottom();
|
|
36801
36823
|
this.cdr.detectChanges();
|
|
36802
36824
|
}
|
|
@@ -36807,10 +36829,32 @@ class ChatbotLexComponent {
|
|
|
36807
36829
|
ngOnInit() {
|
|
36808
36830
|
console.log("CHATBOT ngOnItit clientFilter:", this.clientFilter);
|
|
36809
36831
|
this.lexChat.chatOpen$.subscribe(open => {
|
|
36810
|
-
if (open
|
|
36832
|
+
if (!open) {
|
|
36833
|
+
this.chatOpen = false;
|
|
36834
|
+
this.clearIdleTimer();
|
|
36835
|
+
this.isIdle = false;
|
|
36836
|
+
this.idleRequestInFlight = false;
|
|
36837
|
+
this.idleDetectCount = 0;
|
|
36838
|
+
return;
|
|
36839
|
+
}
|
|
36840
|
+
if (!this.chatOpen) {
|
|
36841
|
+
// console.log("open event",open);
|
|
36842
|
+
// console.log("service chatID theft:", this.lexChat.chatIDtheft);
|
|
36843
|
+
// console.log("component chatID theft before", this.chatIDtheft);
|
|
36811
36844
|
this.chatIDtheft = this.lexChat.chatIDtheft;
|
|
36845
|
+
//console.log("component chatID theft after:", this.chatIDtheft);
|
|
36846
|
+
this.isDisabled = false;
|
|
36847
|
+
this.botOffline = false;
|
|
36848
|
+
this.is_end_session = false;
|
|
36849
|
+
this.endedByIdleCounter = false;
|
|
36850
|
+
this.isAck = false;
|
|
36851
|
+
this.isIdle = false;
|
|
36852
|
+
this.idleRequestInFlight = false;
|
|
36853
|
+
this.idleDetectCount = 0;
|
|
36854
|
+
this.messages = [];
|
|
36812
36855
|
this.toggleChat();
|
|
36813
36856
|
if (this.chatIDtheft) {
|
|
36857
|
+
this.messages = [];
|
|
36814
36858
|
this.sendReportIdTheftMessage();
|
|
36815
36859
|
}
|
|
36816
36860
|
else {
|
|
@@ -36834,6 +36878,18 @@ class ChatbotLexComponent {
|
|
|
36834
36878
|
setTimeout(() => this.focusInput(), 100);
|
|
36835
36879
|
}
|
|
36836
36880
|
}
|
|
36881
|
+
closeChat() {
|
|
36882
|
+
this.clearIdleTimer();
|
|
36883
|
+
this.isExpanded = false;
|
|
36884
|
+
this.isSessionActive = false;
|
|
36885
|
+
this.isAck = false;
|
|
36886
|
+
this.endedByIdleCounter = false;
|
|
36887
|
+
this.is_end_session = false;
|
|
36888
|
+
this.isIdle = false;
|
|
36889
|
+
this.idleRequestInFlight = false;
|
|
36890
|
+
this.idleDetectCount = 0;
|
|
36891
|
+
this.lexChat.closeChat();
|
|
36892
|
+
}
|
|
36837
36893
|
async sendMessage(hideUserMessage = false) {
|
|
36838
36894
|
const trimmed = this.userInput.trim();
|
|
36839
36895
|
if (!trimmed || this.sending) {
|
|
@@ -36861,17 +36917,34 @@ class ChatbotLexComponent {
|
|
|
36861
36917
|
try {
|
|
36862
36918
|
console.log("CHATBOT clientfilter:", this.clientFilter);
|
|
36863
36919
|
const reply = await this.lexChat.sendMessage(trimmed, this.clientFilter);
|
|
36864
|
-
this.isAck =
|
|
36865
|
-
|
|
36866
|
-
|
|
36920
|
+
this.isAck =
|
|
36921
|
+
reply['isAck'] === true ||
|
|
36922
|
+
String(reply['isAck']).toLowerCase() === 'true';
|
|
36923
|
+
this.is_end_session =
|
|
36924
|
+
reply['is_end_session'] === true ||
|
|
36925
|
+
String(reply['is_end_session']).toLowerCase() === 'true';
|
|
36926
|
+
const botReplyText = String(reply['content'] ?? '').trim().toLowerCase();
|
|
36927
|
+
const botEndedConversation = this.is_end_session ||
|
|
36928
|
+
botReplyText === 'bye' ||
|
|
36929
|
+
botReplyText === 'Bye' ||
|
|
36930
|
+
botReplyText.startsWith('bye') ||
|
|
36931
|
+
botReplyText.includes('goodbye') ||
|
|
36932
|
+
botReplyText.includes('have a great day');
|
|
36933
|
+
if (botEndedConversation) {
|
|
36934
|
+
this.is_end_session = true;
|
|
36867
36935
|
this.endedByIdleCounter = true;
|
|
36868
36936
|
this.isDisabled = true;
|
|
36869
36937
|
this.botOffline = true;
|
|
36938
|
+
this.clearIdleTimer();
|
|
36870
36939
|
}
|
|
36940
|
+
const botResponse = String(reply['content'] ?? '');
|
|
36941
|
+
console.log('Raw bot response:', JSON.stringify(botResponse));
|
|
36871
36942
|
this.messages.push({ from: 'bot', text: reply['content'], url: reply['url'], timestamp: new Date() });
|
|
36872
36943
|
this.scrollToBottom();
|
|
36873
36944
|
this.expectingPassword = reply['isPwd'] === 'True';
|
|
36874
|
-
|
|
36945
|
+
if (!botEndedConversation) {
|
|
36946
|
+
this.armIdleTimerAfterBotReply();
|
|
36947
|
+
}
|
|
36875
36948
|
this.cdr.detectChanges();
|
|
36876
36949
|
}
|
|
36877
36950
|
catch (err) {
|
|
@@ -36884,11 +36957,6 @@ class ChatbotLexComponent {
|
|
|
36884
36957
|
this.focusInput();
|
|
36885
36958
|
this.idleDetectCount = 0;
|
|
36886
36959
|
this.endedByIdleCounter = false;
|
|
36887
|
-
if (this.is_end_session) {
|
|
36888
|
-
this.endedByIdleCounter = true;
|
|
36889
|
-
this.isDisabled = true;
|
|
36890
|
-
this.botOffline = true;
|
|
36891
|
-
}
|
|
36892
36960
|
this.cdr.detectChanges();
|
|
36893
36961
|
}
|
|
36894
36962
|
}
|
|
@@ -36921,18 +36989,14 @@ class ChatbotLexComponent {
|
|
|
36921
36989
|
isStarLocked(index) {
|
|
36922
36990
|
return this.starLocked.has(index);
|
|
36923
36991
|
}
|
|
36924
|
-
isStarRatingPrompt(text,
|
|
36992
|
+
isStarRatingPrompt(text, index) {
|
|
36925
36993
|
if (!text)
|
|
36926
36994
|
return false;
|
|
36927
36995
|
const marker = /\[rate\]|\[stars\]/i.test(text);
|
|
36928
36996
|
const t = text.toLowerCase();
|
|
36929
36997
|
const phrase = (t.includes('please rate') || t.includes('rate this') || t.includes('csat')) &&
|
|
36930
36998
|
(t.includes('1-5') || t.includes('1 to 5') || t.includes('one to five'));
|
|
36931
|
-
|
|
36932
|
-
if (shouldShow) {
|
|
36933
|
-
sessionStorage.setItem('botFeedbackShown', 'true');
|
|
36934
|
-
}
|
|
36935
|
-
return shouldShow;
|
|
36999
|
+
return marker || phrase;
|
|
36936
37000
|
}
|
|
36937
37001
|
getStars() {
|
|
36938
37002
|
return [1, 2, 3, 4, 5];
|
|
@@ -36949,12 +37013,14 @@ class ChatbotLexComponent {
|
|
|
36949
37013
|
}
|
|
36950
37014
|
isStarFilled(index, star) {
|
|
36951
37015
|
if (this.isStarLocked(index)) {
|
|
36952
|
-
|
|
37016
|
+
const selected = this.starSelected[index] ?? 0;
|
|
37017
|
+
return star <= selected;
|
|
36953
37018
|
}
|
|
36954
37019
|
const hover = this.starHover[index] ?? 0;
|
|
36955
37020
|
if (hover)
|
|
36956
37021
|
return star <= hover;
|
|
36957
|
-
|
|
37022
|
+
const selected = this.starSelected[index] ?? 0;
|
|
37023
|
+
return star <= selected;
|
|
36958
37024
|
}
|
|
36959
37025
|
async onStarClick(star, index) {
|
|
36960
37026
|
if (this.isDisabled || this.isStarLocked(index))
|
|
@@ -36998,6 +37064,15 @@ class ChatbotLexComponent {
|
|
|
36998
37064
|
.replace(/\s*\[rate\]\s*|\s*\[stars\]\s*/ig, '')
|
|
36999
37065
|
.trim();
|
|
37000
37066
|
}
|
|
37067
|
+
displayLines(text) {
|
|
37068
|
+
if (!text)
|
|
37069
|
+
return [];
|
|
37070
|
+
const cleanedText = text
|
|
37071
|
+
.replace(/\s*\[yes\/no\]\s*/i, '')
|
|
37072
|
+
.replace(/\s*\[rate\]\s*|\s*\[stars\]\s*/ig, '')
|
|
37073
|
+
.trim();
|
|
37074
|
+
return cleanedText.split(/\r?\n|\\n/);
|
|
37075
|
+
}
|
|
37001
37076
|
async onYesNoClick(choice, index) {
|
|
37002
37077
|
if (this.isDisabled)
|
|
37003
37078
|
return;
|
|
@@ -37092,12 +37167,18 @@ class ChatbotLexComponent {
|
|
|
37092
37167
|
}
|
|
37093
37168
|
armIdleTimerAfterBotReply() {
|
|
37094
37169
|
this.clearIdleTimer();
|
|
37170
|
+
if (!this.chatOpen || this.isDisabled) {
|
|
37171
|
+
return;
|
|
37172
|
+
}
|
|
37095
37173
|
this.idleTimerId = window.setTimeout(() => {
|
|
37174
|
+
if (!this.chatOpen || this.isDisabled) {
|
|
37175
|
+
return;
|
|
37176
|
+
}
|
|
37096
37177
|
this.ngZone.run(() => this.onIdleAfterBotReply());
|
|
37097
37178
|
}, this.idleTimeoutMs);
|
|
37098
37179
|
}
|
|
37099
37180
|
async onIdleAfterBotReply() {
|
|
37100
|
-
if (this.isDisabled || this.isIdle)
|
|
37181
|
+
if (!this.chatOpen || this.isDisabled || this.isIdle)
|
|
37101
37182
|
return;
|
|
37102
37183
|
this.isIdle = true;
|
|
37103
37184
|
if (this.idleRequestInFlight)
|
|
@@ -37158,17 +37239,17 @@ class ChatbotLexComponent {
|
|
|
37158
37239
|
let _t;
|
|
37159
37240
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.messageInput = _t.first);
|
|
37160
37241
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.chatWindow = _t.first);
|
|
37161
|
-
} }, inputs: { clientFilter: "clientFilter" }, decls: 2, vars: 2, consts: [["class", "chatbot-fab", "aria-label", "Open chat", "title", "Chat with us", 3, "click", 4, "ngIf"], ["class", "chat-popup", 3, "expanded", 4, "ngIf"], ["aria-label", "Open chat", "title", "Chat with us", 1, "chatbot-fab", 3, "click"], ["src", "assets/icon/amelia-new-icon.png", "alt", "Amelia", 1, "chatbot-fab-icon"], [1, "chat-popup"], [1, "chat-top-actions"], ["type", "button", "title", "Expand", 1, "top-action-btn", 3, "click"], [4, "ngIf"], ["type", "button", "title", "Minimize", "aria-label", "Minimize", 1, "top-action-btn", 3, "click"], ["type", "button", "title", "Close", "aria-label", "Close", 1, "top-action-btn", 3, "click"], [1, "chat-popup-header"], [1, "icon-label"], ["src", "assets/icon/amelia-new-icon.png", "alt", "Amelia", 1, "amelia-header-icon"], [1, "text-block"], [1, "label-text"], [1, "status-wrapper"], [1, "status-dot"], [1, "status"], [1, "chat-popup-actions"], ["type", "button", "aria-label", "Info", 1, "action-btn", "info-btn", 3, "title", "mouseenter", "click"], ["type", "button", "title", "Refresh", "aria-label", "Refresh", 1, "action-btn", 3, "click"], [1, "chat-body"], ["role", "log", "aria-live", "polite", 1, "chat-window"], ["chatWindow", ""], [3, "ngClass", 4, "ngFor", "ngForOf"], [1, "input-row"], [1, "chat-input-wrapper"], ["placeholder", "Type your message...", "rows", "1", 1, "chat-input", 3, "ngModel", "disabled", "ngModelChange", "input", "keydown.enter"], ["messageInput", ""], [1, "send-btn", 3, "disabled", "click"], [3, "ngClass"], [1, "bubble"], ["class", "amelia-message-icon", "src", "assets/icon/amelia-new-icon.png", "alt", "Amelia", 4, "ngIf"], [4, "ngIf", "ngIfElse"], ["normalBubble", ""], [3, "ngClass", 4, "ngIf"], ["src", "assets/icon/amelia-new-icon.png", "alt", "Amelia", 1, "amelia-message-icon"], [1, "star-group", 3, "mouseleave"], ["type", "button", "class", "star", 3, "filled", "title", "mouseenter", "click", 4, "ngFor", "ngForOf"], ["type", "button", 1, "star", 3, "title", "mouseenter", "click"], [1, "message-wrapper"], [1, "bubble-content"], [1, "formatted-text"], [
|
|
37242
|
+
} }, inputs: { clientFilter: "clientFilter" }, decls: 2, vars: 2, consts: [["class", "chatbot-fab", "aria-label", "Open chat", "title", "Chat with us", 3, "click", 4, "ngIf"], ["class", "chat-popup", 3, "expanded", 4, "ngIf"], ["aria-label", "Open chat", "title", "Chat with us", 1, "chatbot-fab", 3, "click"], ["src", "assets/icon/amelia-new-icon.png", "alt", "Amelia", 1, "chatbot-fab-icon"], [1, "chat-popup"], [1, "chat-top-actions"], ["type", "button", "title", "Expand", 1, "top-action-btn", 3, "click"], [4, "ngIf"], ["type", "button", "title", "Minimize", "aria-label", "Minimize", 1, "top-action-btn", 3, "click"], ["type", "button", "title", "Close", "aria-label", "Close", 1, "top-action-btn", 3, "click"], [1, "chat-popup-header"], [1, "icon-label"], ["src", "assets/icon/amelia-new-icon.png", "alt", "Amelia", 1, "amelia-header-icon"], [1, "text-block"], [1, "label-text"], [1, "status-wrapper"], [1, "status-dot"], [1, "status"], [1, "chat-popup-actions"], ["type", "button", "aria-label", "Info", 1, "action-btn", "info-btn", 3, "title", "mouseenter", "click"], ["type", "button", "title", "Refresh", "aria-label", "Refresh", 1, "action-btn", 3, "click"], [1, "chat-body"], ["role", "log", "aria-live", "polite", 1, "chat-window"], ["chatWindow", ""], [3, "ngClass", 4, "ngFor", "ngForOf"], [1, "input-row"], [1, "chat-input-wrapper"], ["placeholder", "Type your message...", "rows", "1", 1, "chat-input", 3, "ngModel", "disabled", "ngModelChange", "input", "keydown.enter"], ["messageInput", ""], [1, "send-btn", 3, "disabled", "click"], [3, "ngClass"], [1, "bubble"], ["class", "amelia-message-icon", "src", "assets/icon/amelia-new-icon.png", "alt", "Amelia", 4, "ngIf"], [4, "ngIf", "ngIfElse"], ["normalBubble", ""], ["class", "feedback", 4, "ngIf"], [3, "ngClass", 4, "ngIf"], ["src", "assets/icon/amelia-new-icon.png", "alt", "Amelia", 1, "amelia-message-icon"], [1, "star-group", 3, "mouseleave"], ["type", "button", "class", "star", 3, "filled", "title", "mouseenter", "click", 4, "ngFor", "ngForOf"], ["type", "button", 1, "star", 3, "title", "mouseenter", "click"], [1, "message-wrapper"], [1, "bubble-content"], [1, "formatted-text"], [4, "ngFor", "ngForOf"], ["class", "yn-group", 4, "ngIf"], [1, "yn-group"], [1, "yn-btn", "yes", 3, "click"], [1, "yn-btn", "no", 3, "click"], ["class", "yn-btn yes", 3, "click", 4, "ngIf"], [1, "feedback"], ["aria-label", "Thumbs up", "title", "Thumbs up", 1, "fb-btn", "up", 3, "click"], ["aria-label", "Thumbs down", "title", "Thumbs down", 1, "fb-btn", "down", 3, "click"]], template: function ChatbotLexComponent_Template(rf, ctx) { if (rf & 1) {
|
|
37162
37243
|
i0.ɵɵtemplate(0, ChatbotLexComponent_button_0_Template, 2, 0, "button", 0)(1, ChatbotLexComponent_div_1_Template, 34, 17, "div", 1);
|
|
37163
37244
|
} if (rf & 2) {
|
|
37164
37245
|
i0.ɵɵproperty("ngIf", !ctx.chatOpen);
|
|
37165
37246
|
i0.ɵɵadvance(1);
|
|
37166
37247
|
i0.ɵɵproperty("ngIf", ctx.chatOpen);
|
|
37167
|
-
} }, dependencies: [i1$4.NgClass, i1$4.NgForOf, i1$4.NgIf, i1$6.DefaultValueAccessor, i1$6.NgControlStatus, i1$6.NgModel, i1$4.DatePipe], styles: [".chatbot-fab[_ngcontent-%COMP%]{position:fixed;bottom:20px;right:20px;width:56px;height:56px;border-radius:50%;background:transparent;color:#fff;border:none;font-size:24px;cursor:pointer;box-shadow:none;z-index:9998;display:flex;align-items:center;justify-content:center;overflow:visible}.chatbot-fab[_ngcontent-%COMP%]:hover{background:#00a5bb}.chatbot-fab-icon[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:contain;border-radius:0;background:transparent;display:block}.chat-popup[_ngcontent-%COMP%]{position:fixed;bottom:20px;right:20px;width:380px;height:520px;max-height:80vh;display:flex;flex-direction:column;background:#fff;border:1px solid #e6e9ee;border-radius:12px;box-shadow:0 12px 24px #0000001f;overflow:visible!important;z-index:9999;padding-top:30px;overflow:visible}.chat-popup-header[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:36px;height:36px;min-width:36px;max-width:36px;border-radius:50%;object-fit:cover}.chat-popup-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;background:var(--ion-color-primary)!important;color:#fff;padding:4px 12px;font-weight:600;flex-shrink:0}.icon-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px}.text-block[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;line-height:1.1}.label-text[_ngcontent-%COMP%]{font-size:15px;font-weight:600}.status[_ngcontent-%COMP%]{font-size:11px;margin-top:2px;text-transform:lowercase;opacity:.95}.status.online-text[_ngcontent-%COMP%]{color:#b9f6ca}.status.offline-text[_ngcontent-%COMP%]{color:#ffcdd2}.chat-popup-actions[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}.info-btn[_ngcontent-%COMP%], .info-btn[_ngcontent-%COMP%]:hover, .info-btn[_ngcontent-%COMP%]:focus, .info-btn[_ngcontent-%COMP%]:active{background:transparent;border:none;box-shadow:none;outline:none}.action-btn[_ngcontent-%COMP%]{background:transparent;color:#fff;border:none;font-size:16px;cursor:pointer;width:28px;height:28px;line-height:1;padding:0;border-radius:4px}.action-btn[_ngcontent-%COMP%]:hover{background:#ffffff26}.chat-body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0}.chat-window[_ngcontent-%COMP%]{padding:12px;flex:1;overflow-y:auto;background:#f6f8fb;min-height:0;width:100%;box-sizing:border-box}.user[_ngcontent-%COMP%], .bot[_ngcontent-%COMP%]{margin:8px 0;display:flex}.user[_ngcontent-%COMP%]{justify-content:flex-end}.bot[_ngcontent-%COMP%]{justify-content:flex-start}.bot[_ngcontent-%COMP%], .user[_ngcontent-%COMP%]{width:100%;min-width:0;box-sizing:border-box;display:flex}.bubble[_ngcontent-%COMP%]{display:inline-block;padding:8px 12px;border-radius:14px;font-size:14px;line-height:1.3;word-wrap:break-word;position:relative}.user[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]{background:#e8eaf6;color:#000;border-bottom-right-radius:4px;margin-left:auto;display:flex;justify-content:flex-end;align-self:flex-end}.chat-window[_ngcontent-%COMP%] .bot[_ngcontent-%COMP%]:first-of-type .bubble[_ngcontent-%COMP%] .feedback[_ngcontent-%COMP%]{display:none!important}.fb-btn[_ngcontent-%COMP%]{appearance:none;border:none;background:transparent;cursor:pointer;font-size:13px;line-height:1;padding:2px 4px;border-radius:4px;opacity:.9}.fb-btn[_ngcontent-%COMP%]:hover{background:#00bcd414}.fb-btn.up[_ngcontent-%COMP%]{color:#16a34a}.fb-btn.down[_ngcontent-%COMP%]{color:#dc2626}.yn-group[_ngcontent-%COMP%]{margin-top:8px}.yn-btn[_ngcontent-%COMP%]{appearance:none;border:1px solid #cfd8e3;background:#fff;color:#111827;font-size:12px;padding:4px 8px;border-radius:999px;cursor:pointer;margin-right:6px}.yn-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6}.yn-btn.yes[_ngcontent-%COMP%]{border-color:#16a34a33}.yn-btn.no[_ngcontent-%COMP%]{border-color:#dc262633}.star-group[_ngcontent-%COMP%]{display:inline-flex;gap:6px;align-items:center;margin-top:7px;position:relative!important;top:12px!important}.star-group[_ngcontent-%COMP%] .star[_ngcontent-%COMP%]{appearance:none;border:none;background:transparent;cursor:pointer;font-size:18px;line-height:1;color:#444547;padding:0 1px;transition:transform .08s ease,color .08s ease}.star-group[_ngcontent-%COMP%] .star.filled[_ngcontent-%COMP%]{color:#f59e0b}.star-group[_ngcontent-%COMP%] .star[_ngcontent-%COMP%]:hover{transform:scale(1.08)}.input-row[_ngcontent-%COMP%]{display:flex;gap:8px;padding:10px;background:#fff;border-top:1px solid #e6e9ee;align-items:flex-end;flex-shrink:0}.chat-input-wrapper[_ngcontent-%COMP%]{flex:1;border-radius:8px;border:1px solid #d1d5db;overflow:hidden;background:#fff;display:flex}.chat-input[_ngcontent-%COMP%]{width:100%;resize:none;border:none;outline:none;padding:8px 10px;font-size:14px;line-height:1.2;min-height:20px;max-height:100px;overflow-y:auto;box-sizing:border-box;background:transparent}.chat-input[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.send-btn[_ngcontent-%COMP%]{height:36px;align-self:flex-end;padding:0 14px;background:var(--ion-color-primary)!important;color:#fff!important;border:none;border-radius:8px;cursor:pointer;white-space:nowrap;font-size:14px}.send-btn[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.icon-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.amelia-header-icon[_ngcontent-%COMP%]{width:56px;height:56px;border-radius:0;object-fit:contain;background:transparent;flex-shrink:0}.text-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;line-height:1.1}.bubble.bot[_ngcontent-%COMP%], .bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%] .feedback-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;flex:1;min-width:0}.feedback-message[_ngcontent-%COMP%]{width:100%;display:block;white-space:normal;overflow-wrap:anywhere}.feedback-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;justify-content:flex-start}.feedback-actions[_ngcontent-%COMP%] .yn-btn[_ngcontent-%COMP%]{flex:0 0 auto}.bubble-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;flex:0 1 auto;width:auto;max-width:100%;min-width:0;overflow:hidden;box-sizing:border-box}.formatted-text[_ngcontent-%COMP%]{display:block;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.feedback[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:8px;width:100%}.yn-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:8px}.amelia-message-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;object-fit:cover;background:#fff;flex-shrink:0;flex:0 0 auto}.chat-popup.expanded[_ngcontent-%COMP%]{width:40vw!important;height:86vh!important;position:fixed!important;bottom:16px!important;right:40px!important;left:auto!important;max-width:650px!important;max-height:calc(100vh - 80px)!important;border-radius:8px!important;display:flex!important;flex-direction:column!important;visibility:visible!important;opacity:1!important;z-index:9999!important}.chat-top-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex=end;align-items:center;gap:6px;padding:4px 8px;background:transparent;flex-shrink:0;position:absolute;top:-1px;right:0!important;width:auto!important;z-index:10000;position:absolute!important}.top-action-btn[_ngcontent-%COMP%]{border:none;background:transparent!important;color:#000!important;font-size:16px;font-weight:700;line-height:22px;cursor:pointer;padding:0;border-radius:none!important;width:24px;height:24px;text-align:center}.top-action-btn[_ngcontent-%COMP%]:hover{background:#eee;border-radius:4px}.top-action-btn[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:16px}.chat-top-actions.top-action-btn[_ngcontent-%COMP%]{color:#000!important;background:transparent!important;border:none!important;font-size:16px;font-weight:700;cursor:pointer;width:24px;height:24px;line-height:24px;padding:0;border-radius:5px 0 0}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.star-group){display:grid!important;grid-template-columns:24px 1fr!important;grid-template-rows:auto auto!important;column-gap:8px!important;row-gap:6px!important;align-items:start!important;min-width:270px!important;padding:12px!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.star-group) .amelia-message-icon[_ngcontent-%COMP%]{grid-column:1!important;grid-row:1 / span 2!important;margin-top:0!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.star-group) > div[_ngcontent-%COMP%]:first-of-type{grid-column:2!important;grid-row:1!important;white-space:no wrap!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.star-group) .star-group[_ngcontent-%COMP%]{grid-column:2!important;grid-row:2!important;display:flex!important;flex-direction:row!important;gap:8px!important;margin:0!important;padding:0!important;position:static!important;inset:auto!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.yn-group){display:grid!important;grid-template-columns:24px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:8px!important;row-gap:8px!important;align-items:start!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:10px!important;box-sizing:border-box!important;overflow:hidden!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.yn-group) .amelia-message-icon[_ngcontent-%COMP%]{grid-column:1!important;grid-row:1 / span 2!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.yn-group) .formatted-text[_ngcontent-%COMP%]{display:block!important;width:auto!important;max-width:100%!important;min-width:0!important;grid-template-columns:24px minmax(0,1fr)!important;grid-template-rows:auto auto!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.yn-group) .yn-group[_ngcontent-%COMP%]{grid-column:2!important;grid-row:2!important;display:flex!important;flex-direction:row!important;gap:8px!important;margin:0!important;padding:0!important;position:static!important}.message-time[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;margin-top:3px;padding:0 6px;text-align:right;white-space:nowrap}.message-time-bot[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;margin-top:2px;margin-left:10px;padding:0 6px;margin-right:auto;white-space:nowrap}.message-wrapper[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;width:max-content;max-width:78%}.bot[_ngcontent-%COMP%] .message-wrapper[_ngcontent-%COMP%]{align-items:flex-start}.user[_ngcontent-%COMP%] .message-wrapper[_ngcontent-%COMP%]{align-items:flex-end;margin-left:auto}.bot[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;width:100%;min-width:0}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]{background:#fff;color:#111827;border:1px solid #e6e9ee;border-bottom-left-radius:4px;margin-bottom:4px;margin-right:auto;display:inline-flex;align-items:flex-start;width:auto;max-width:80%;min-width:0;box-sizing:border-box}.bot[_ngcontent-%COMP%] .bubble-content[_ngcontent-%COMP%]{white-space:normal;overflow-wrap:anywhere;word-break:break-word;min-width:0;width:auto;min-width:220px;max-width:280px;box-sizing:border-box;display:inline-block}.bot[_ngcontent-%COMP%] .formatted-text[_ngcontent-%COMP%]{display:inline;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.user[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.user[_ngcontent-%COMP%] .bubble-content[_ngcontent-%COMP%]{min-width:unset;max-width:280px;width:max-content;text-align:right;white-space:normal;display:inline-block}.user[_ngcontent-%COMP%] .formatted-text[_ngcontent-%COMP%]{white-space:nowrap;word-break:normal;overflow-wrap:normal}.status-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.status-dot[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;background-color:#2ecc71!important;flex-shrink:0}.status-dot.offline[_ngcontent-%COMP%]{background:#9e9e9e!important}.online-text[_ngcontent-%COMP%], .offline-text[_ngcontent-%COMP%]{text-transform:none!important}@media (max-width: 480px){.chat-popup[_ngcontent-%COMP%]{width:calc(100vw - 16px);right:8px;bottom:8px;height:70vh}.bubble[_ngcontent-%COMP%]{max-width:90%;font-size:13px}}"] }); }
|
|
37248
|
+
} }, dependencies: [i1$4.NgClass, i1$4.NgForOf, i1$4.NgIf, i1$6.DefaultValueAccessor, i1$6.NgControlStatus, i1$6.NgModel, i1$4.DatePipe], styles: [".chatbot-fab[_ngcontent-%COMP%]{position:fixed;bottom:20px;right:20px;width:56px;height:56px;border-radius:50%;background:transparent;color:#fff;border:none;font-size:24px;cursor:pointer;box-shadow:none;z-index:9998;display:flex;align-items:center;justify-content:center;overflow:visible}.chatbot-fab[_ngcontent-%COMP%]:hover{background:#00a5bb}.chatbot-fab-icon[_ngcontent-%COMP%]{width:70px;height:70px;object-fit:contain;border-radius:0;background:transparent;display:block}.chat-popup[_ngcontent-%COMP%]{position:fixed;bottom:20px;right:20px;width:380px;height:520px;max-height:80vh;display:flex;flex-direction:column;background:#fff;border:1px solid #e6e9ee;border-radius:12px;box-shadow:0 12px 24px #0000001f;overflow:visible!important;z-index:9999;padding-top:30px;overflow:visible}.chat-popup-header[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:36px;height:36px;min-width:36px;max-width:36px;border-radius:50%;object-fit:cover}.chat-popup[_ngcontent-%COMP%]:not(.expanded) .message-wrapper[_ngcontent-%COMP%]{max-width:85%!important}.chat-popup.expanded[_ngcontent-%COMP%] .bot[_ngcontent-%COMP%] .message-wrapper[_ngcontent-%COMP%]{width:max-content!important;max-width:85%!important;min-width:0!important;align-items:flex-start!important}.chat-popup.expanded[_ngcontent-%COMP%] .user[_ngcontent-%COMP%] .message-wrapper[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important;max-width:70%!important;min-width:0!important}.chat-popup.expanded[_ngcontent-%COMP%] .bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important;max-width:85%!important;min-width:0!important;align-self:flex-start!important;box-sizing:border-box!important}.chat-popup.expanded[_ngcontent-%COMP%] .bot[_ngcontent-%COMP%] .bubble.bubble[_ngcontent-%COMP%]:has(.star-group){width:300px!important;max-width:85%!important;min-width:0!important;align-self:flex-start!important;box-sizing:border-box!important}.chat-popup-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;background:var(--ion-color-primary)!important;color:#fff;padding:4px 12px;font-weight:600;flex-shrink:0}.icon-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px}.text-block[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;line-height:1.1}.label-text[_ngcontent-%COMP%]{font-size:15px;font-weight:600}.status[_ngcontent-%COMP%]{font-size:11px;margin-top:2px;text-transform:lowercase;opacity:.95}.status.online-text[_ngcontent-%COMP%]{color:#b9f6ca}.status.offline-text[_ngcontent-%COMP%]{color:#ffcdd2}.chat-popup-actions[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}.info-btn[_ngcontent-%COMP%], .info-btn[_ngcontent-%COMP%]:hover, .info-btn[_ngcontent-%COMP%]:focus, .info-btn[_ngcontent-%COMP%]:active{background:transparent;border:none;box-shadow:none;outline:none}.action-btn[_ngcontent-%COMP%]{background:transparent;color:#fff;border:none;font-size:16px;cursor:pointer;width:28px;height:28px;line-height:1;padding:0;border-radius:4px}.action-btn[_ngcontent-%COMP%]:hover{background:#ffffff26}.chat-body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0}.chat-window[_ngcontent-%COMP%]{padding:12px;flex:1;overflow-y:auto;background:#f6f8fb;min-height:0;width:100%;box-sizing:border-box}.user[_ngcontent-%COMP%], .bot[_ngcontent-%COMP%]{margin:8px 0;display:flex;width:100%;min-width:0;box-sizing:border-box}.user[_ngcontent-%COMP%]{justify-content:flex-end}.bot[_ngcontent-%COMP%]{justify-content:flex-start}.bot[_ngcontent-%COMP%], .user[_ngcontent-%COMP%]{width:100%;min-width:0;box-sizing:border-box;display:flex}.bubble[_ngcontent-%COMP%]{display:inline-block;padding:8px 12px;border-radius:14px;font-size:14px;line-height:1.3;word-wrap:break-word;position:relative}.user[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]{background:#e8eaf6;color:#000;border-bottom-right-radius:4px;margin-left:auto;display:flex;justify-content:flex-end;align-self:flex-end}.chat-window[_ngcontent-%COMP%] .bot[_ngcontent-%COMP%]:first-of-type .bubble[_ngcontent-%COMP%] .feedback[_ngcontent-%COMP%]{display:none!important}.fb-btn[_ngcontent-%COMP%]{appearance:none;border:none;background:transparent;cursor:pointer;font-size:13px;line-height:1;padding:2px 4px;border-radius:4px;opacity:.9}.fb-btn[_ngcontent-%COMP%]:hover{background:#00bcd414}.fb-btn.up[_ngcontent-%COMP%]{color:#16a34a}.fb-btn.down[_ngcontent-%COMP%]{color:#dc2626}.yn-group[_ngcontent-%COMP%]{margin-top:8px}.yn-btn[_ngcontent-%COMP%]{appearance:none;border:1px solid #cfd8e3;background:#fff;color:#111827;font-size:12px;padding:4px 8px;border-radius:999px;cursor:pointer;margin-right:6px}.yn-btn[_ngcontent-%COMP%]:hover{background:#f3f4f6}.yn-btn.yes[_ngcontent-%COMP%]{border-color:#16a34a33}.yn-btn.no[_ngcontent-%COMP%]{border-color:#dc262633}.star-group[_ngcontent-%COMP%]{display:inline-flex;gap:6px;align-items:center;vertical-align:middle;margin-left:2px;margin-top:2px}.star-group[_ngcontent-%COMP%] .star[_ngcontent-%COMP%]{appearance:none;border:none;background:transparent;cursor:pointer;font-size:18px;line-height:1;color:#444547;padding:0 1px;transition:transform .08s ease,color .08s ease}.star-group[_ngcontent-%COMP%] .star.filled[_ngcontent-%COMP%]{color:#f59e0b}.star-group[_ngcontent-%COMP%] .star[_ngcontent-%COMP%]:hover{transform:scale(1.08)}.input-row[_ngcontent-%COMP%]{display:flex;gap:8px;padding:10px;background:#fff;border-top:1px solid #e6e9ee;align-items:flex-end;flex-shrink:0}.chat-input-wrapper[_ngcontent-%COMP%]{flex:1;border-radius:8px;border:1px solid #d1d5db;overflow:hidden;background:#fff;display:flex}.chat-input[_ngcontent-%COMP%]{width:100%;resize:none;border:none;outline:none;padding:8px 10px;font-size:14px;line-height:1.2;min-height:20px;max-height:100px;overflow-y:auto;box-sizing:border-box;background:transparent}.chat-input[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.send-btn[_ngcontent-%COMP%]{height:36px;align-self:flex-end;padding:0 14px;background:var(--ion-color-primary)!important;color:#fff!important;border:none;border-radius:8px;cursor:pointer;white-space:nowrap;font-size:14px}.send-btn[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.icon-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.amelia-header-icon[_ngcontent-%COMP%]{width:56px;height:56px;border-radius:0;object-fit:contain;background:transparent;flex-shrink:0}.text-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;line-height:1.1}.bubble.bot[_ngcontent-%COMP%], .bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%] .feedback-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;flex:1;min-width:0}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%] .feedback[_ngcontent-%COMP%]{position:absolute;right:0;bottom:-24px;display:inline-flex;gap:6px;align-items:center;width:auto;margin:0}.feedback-message[_ngcontent-%COMP%]{width:100%;display:block;white-space:normal;overflow-wrap:anywhere}.feedback-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;justify-content:flex-start}.feedback-actions[_ngcontent-%COMP%] .yn-btn[_ngcontent-%COMP%]{flex:0 0 auto}.bot[_ngcontent-%COMP%] .feedback[_ngcontent-%COMP%] .fb-btn[_ngcontent-%COMP%]{border:none;background:transparent;padding:2px;margin:0;cursor:pointer;flex:0 0 auto}.bubble-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;flex:0 1 auto;width:auto;max-width:100%;min-width:0;overflow:hidden;box-sizing:border-box}.formatted-text[_ngcontent-%COMP%]{display:block;white-space:normal;overflow-wrap:anywhere;word-break:break-word;box-sizing:border-box}.feedback[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:8px;width:100%}.yn-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:8px}.amelia-message-icon[_ngcontent-%COMP%]{width:28px;height:28px;border-radius:50%;object-fit:cover;background:#fff;flex-shrink:0;flex:0 0 auto}.chat-popup.expanded[_ngcontent-%COMP%]{width:650px!important;height:86vh!important;position:fixed!important;bottom:16px!important;right:40px!important;left:auto!important;max-width:650px!important;max-height:calc(100vh - 80px)!important;border-radius:8px!important;display:flex!important;flex-direction:column!important;visibility:visible!important;opacity:1!important;z-index:9999!important}.chat-popup.expanded[_ngcontent-%COMP%] .chat-body[_ngcontent-%COMP%]{width:100%!important;align-self:stretch!important}.chat-popup.expanded[_ngcontent-%COMP%] .short-welcome[_ngcontent-%COMP%]{width:auto!important;max-width:100%!important;min-width:0!important;flex:0 1 auto!important}.chat-popup.expanded[_ngcontent-%COMP%] .bot[_ngcontent-%COMP%]:has(.short-welcome) .bubble[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important;max-width:calc(100% - 32px)!important;box-sizing:border-box!important}.chat-popup.expanded[_ngcontent-%COMP%] .short-welcome[_ngcontent-%COMP%] .bubble-content[_ngcontent-%COMP%]{width:auto!important;max-width:100%!important;min-width:0!important;flex:0 1 auto!important}.bot[_ngcontent-%COMP%] .formatted-text[_ngcontent-%COMP%]{white-space:normal;overflow-wrap:break-word;word-break:normal}.chat-popup.expanded[_ngcontent-%COMP%] .short-welcome[_ngcontent-%COMP%] .formatted-text[_ngcontent-%COMP%]{display:inline-block!important;width:auto!important;max-width:100%!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}.chat-top-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex=end;align-items:center;gap:6px;padding:4px 8px;background:transparent;flex-shrink:0;position:absolute;top:-1px;right:0!important;width:auto!important;z-index:10000;position:absolute!important}.top-action-btn[_ngcontent-%COMP%]{border:none;background:transparent!important;color:#000!important;font-size:16px;font-weight:700;line-height:22px;cursor:pointer;padding:0;border-radius:none!important;width:24px;height:24px;text-align:center}.top-action-btn[_ngcontent-%COMP%]:hover{background:#eee;border-radius:4px}.top-action-btn[_ngcontent-%COMP%] .pi[_ngcontent-%COMP%]{font-size:16px}.chat-top-actions.top-action-btn[_ngcontent-%COMP%]{color:#000!important;background:transparent!important;border:none!important;font-size:16px;font-weight:700;cursor:pointer;width:24px;height:24px;line-height:24px;padding:0;border-radius:5px 0 0}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.star-group){display:grid!important;grid-template-columns:32px max-content!important;grid-template-rows:auto auto!important;column-gap:8px!important;row-gap:6px!important;align-items:start!important;padding:12px!important;box-sizing:border-box!important;overflow:visible!important;width:300px!important;min-width:0!important;max-width:calc(100% - 24px)!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.star-group) .amelia-message-icon[_ngcontent-%COMP%]{grid-column:1!important;grid-row:1 / span 2!important;margin-top:0!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.star-group) > div[_ngcontent-%COMP%]:first-of-type{grid-column:2!important;grid-row:1!important;white-space:nowrap!important;min-width:0}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.star-group) .star-group[_ngcontent-%COMP%]{grid-column:2!important;grid-row:2!important;display:flex!important;flex-direction:row!important;gap:8px!important;margin:0!important;padding:0!important;position:static!important;inset:auto!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.yn-group){display:grid!important;grid-template-columns:24px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:8px!important;row-gap:8px!important;align-items:start!important;width:-moz-fit-content!important;width:fit-content!important;max-width:100%!important;min-width:0!important;padding:10px!important;box-sizing:border-box!important;overflow:hidden!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.yn-group) .amelia-message-icon[_ngcontent-%COMP%]{grid-column:1!important;grid-row:1 / span 2!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.yn-group) .formatted-text[_ngcontent-%COMP%]{display:block!important;width:auto!important;max-width:100%!important;min-width:0!important;grid-column:2!important;grid-row:1!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]:has(.yn-group) .yn-group[_ngcontent-%COMP%]{grid-column:2!important;grid-row:2!important;display:flex!important;flex-direction:row!important;gap:8px!important;margin:0!important;padding:0!important;position:static!important}.message-time[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;margin-top:3px;padding:0 6px;text-align:right;white-space:nowrap}.message-time-bot[_ngcontent-%COMP%]{font-size:11px;color:#6b7280;margin-left:10px;padding:0 6px;margin-right:auto;white-space:nowrap}.message-wrapper[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;width:max-content;max-width:78%}.bot[_ngcontent-%COMP%] .message-wrapper[_ngcontent-%COMP%]{align-items:flex-start}.user[_ngcontent-%COMP%] .message-wrapper[_ngcontent-%COMP%]{align-items:flex-end;margin-left:auto}.bot[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;width:-moz-fit-content;width:fit-content;max-width:85%;min-width:0}.bot[_ngcontent-%COMP%] .bubble[_ngcontent-%COMP%]{background:#fff;color:#111827;border:1px solid #e6e9ee;border-bottom-left-radius:4px;margin-bottom:30px;margin-right:auto;display:inline-flex;align-items:flex-start;width:-moz-fit-content!important;width:fit-content!important;max-width:100%!important;min-width:0;box-sizing:border-box;overflow:visible!important;position:relative}.bot[_ngcontent-%COMP%] .bubble-content[_ngcontent-%COMP%]{min-width:0;width:auto;max-width:none;box-sizing:border-box;display:inline}.bot[_ngcontent-%COMP%] .message-time-bot[_ngcontent-%COMP%]{width:0;min-width:0;white-space:nowrap;overflow:visible;align-self:flex-start;text-align:left;margin-top:-26px;margin-left:0}.user[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;width:100%;min-width:0}.user[_ngcontent-%COMP%] .bubble-content[_ngcontent-%COMP%]{width:auto;min-width:0;max-width:280px;width:max-content;text-align:left;white-space:normal;display:inline-block;overflow-wrap:break-word;box-sizing:border-box;word-break:normal}.user[_ngcontent-%COMP%] .formatted-text[_ngcontent-%COMP%]{white-space:normal;word-break:normal;overflow-wrap:break-word;max-width:100%}.status-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.status-dot[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;background-color:#2ecc71!important;flex-shrink:0}.status-dot.offline[_ngcontent-%COMP%]{background:#9e9e9e!important}.online-text[_ngcontent-%COMP%], .offline-text[_ngcontent-%COMP%]{text-transform:none!important}@media (max-width: 480px){.chat-popup[_ngcontent-%COMP%]{width:calc(100vw - 16px);right:8px;bottom:8px;height:70vh}.bubble[_ngcontent-%COMP%]{max-width:90%;font-size:13px}}"] }); }
|
|
37168
37249
|
}
|
|
37169
37250
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ChatbotLexComponent, [{
|
|
37170
37251
|
type: Component,
|
|
37171
|
-
args: [{ selector: 'app-chatbot-lex', template: "\r\n\r\n\r\n<!-- Floating chat toggle button -->\r\n<button\r\n class=\"chatbot-fab\"\r\n (click)=\"toggleChat()\"\r\n *ngIf=\"!chatOpen\"\r\n aria-label=\"Open chat\"\r\n title=\"Chat with us\">\r\n <img\r\n class=\"chatbot-fab-icon\"\r\n src=\"assets/icon/amelia-new-icon.png\"\r\n alt=\"Amelia\"\r\n />\r\n</button>\r\n\r\n<!-- Chat popup -->\r\n<div class=\"chat-popup\" *ngIf=\"chatOpen\" [class.expanded]=\"isExpanded\">\r\n <div class=\"chat-top-actions\">\r\n <button\r\n class=\"top-action-btn\"\r\n type=\"button\"\r\n (click)=\"toggleExpand()\"\r\n title=\"Expand\">\r\n <span *ngIf=\"!isExpanded\">\u26F6</span>\r\n </button>\r\n <button \r\n class=\"top-action-btn\" \r\n type=\"button\" \r\n (click)=\"minimizeChat()\" \r\n title=\"Minimize\" \r\n aria-label=\"Minimize\">\r\n _\r\n </button> \r\n <button \r\n class=\"top-action-btn\" \r\n type=\"button\" \r\n (click)=\"toggleChat()\" \r\n title=\"Close\" \r\n aria-label=\"Close\">\r\n \u2715\r\n </button>\r\n \r\n </div>\r\n <div class=\"chat-popup-header\">\r\n <span class=\"icon-label\">\r\n <img\r\n class=\"amelia-header-icon\"\r\n src=\"assets/icon/amelia-new-icon.png\"\r\n alt=\"Amelia\"/>\r\n <span class=\"text-block\">\r\n <span class=\"label-text\">Amelia</span>\r\n <span class=\"status-wrapper\">\r\n\r\n <span\r\n class=\"status-dot\"\r\n [class.offline]=\"!isSessionActive\">\r\n </span>\r\n \r\n <span\r\n class=\"status\"\r\n [class.online-text]=\"!botOffline\"\r\n [class.offline-text]=\"botOffline\">\r\n {{ botOffline ? 'Offline' : 'Online' }}\r\n </span>\r\n </span>\r\n </span>\r\n </span>\r\n\r\n <div class=\"chat-popup-actions\">\r\n\r\n <button class=\"action-btn info-btn\"\r\n type=\"button\"\r\n (mouseenter)=\"getSessionID()\"\r\n title={{sessionId}}\r\n aria-label=\"Info\"\r\n (click)=\"copySessionId()\"\r\n [style.visibility]=\"infoVisible ? 'visible' : 'hidden'\">\r\n \uD83D\uDEC8\r\n </button>\r\n \r\n <button \r\n class=\"action-btn\" \r\n type=\"button\" \r\n (click)=\"refreshChat()\" \r\n title=\"Refresh\" \r\n aria-label=\"Refresh\">\r\n \u27F3\r\n </button>\r\n \r\n </div>\r\n </div>\r\n\r\n <div class=\"chat-body\">\r\n <div class=\"chat-window\" #chatWindow role=\"log\" aria-live=\"polite\">\r\n <div *ngFor=\"let msg of messages; let i = index\" [ngClass]=\"msg.from\">\r\n <div class=\"bubble\">\r\n <img\r\n *ngIf=\"msg.from === 'bot'\"\r\n class=\"amelia-message-icon\"\r\n src=\"assets/icon/amelia-new-icon.png\"\r\n alt=\"Amelia\"\r\n />\r\n <!-- Star rating prompt -->\r\n <ng-container *ngIf=\"msg.from === 'bot' && isStarRatingPrompt(msg.text, i); else normalBubble\">\r\n <div>Your feedback matters to us</div>\r\n <div class=\"star-group\" (mouseleave)=\"onStarLeave(i)\">\r\n <button\r\n *ngFor=\"let s of getStars()\"\r\n type=\"button\"\r\n class=\"star\"\r\n [class.filled]=\"isStarFilled(i, s)\"\r\n (mouseenter)=\"onStarEnter(i, s)\"\r\n (click)=\"onStarClick(s, i)\"\r\n [attr.aria-label]=\"'Rate ' + s + ' star(s)'\"\r\n title=\"Rate {{s}} star(s)\">\r\n \u2605\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Normal bubble -->\r\n <ng-template #normalBubble>\r\n <div class=\"message-wrapper\">\r\n <div class=\"bubble-content\">\r\n <span class=\"formatted-text\">{{ displayText(msg.text) }}</span>\r\n \r\n \r\n\r\n <!-- Yes/No buttons -->\r\n <div class=\"yn-group\" *ngIf=\"msg.from === 'bot' && isYesNoPrompt(msg.text, i)\">\r\n <button class=\"yn-btn yes\" (click)=\"onYesNoClick('Yes', i)\">Yes</button>\r\n <button class=\"yn-btn no\" (click)=\"onYesNoClick('No', i)\">No</button>\r\n </div>\r\n\r\n <!-- Feedback thumbs -->\r\n <div\r\n class=\"feedback\"\r\n *ngIf=\"msg.from === 'bot'\r\n && !isMessageRated(i)\r\n && i === messages.length - 1\r\n && !isAck\">\r\n <button class=\"fb-btn up\" (click)=\"sendFeedback('Thumbs up', i)\" aria-label=\"Thumbs up\" title=\"Thumbs up\">\uD83D\uDC4D</button>\r\n <button class=\"fb-btn down\" (click)=\"sendFeedback('Thumbs down', i)\" aria-label=\"Thumbs down\" title=\"Thumbs down\">\uD83D\uDC4E</button>\r\n </div>\r\n\r\n <!-- Links -->\r\n <div *ngIf=\"msg.url && msg.url.length\">\r\n <div *ngFor=\"let url of msg.url\">\r\n <button *ngIf=\"msg.from === 'bot'\" class=\"yn-btn yes\" (click)=\"openLink(url)\">{{url}}</button>\r\n </div>\r\n </div>\r\n </div> <!--closes bubble content -->\r\n \r\n </div>\r\n </ng-template>\r\n </div> <!--closes bubble --> \r\n <div\r\n *ngIf=\"msg.timestamp\"\r\n [ngClass]=\"msg.from === 'bot' ? 'message-time-bot' : 'message-time'\">\r\n {{msg.timestamp | date:\"EEE MMM dd yyyy 'at' hh:mm:ss a\"}}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-row\">\r\n <div class=\"chat-input-wrapper\">\r\n <textarea\r\n #messageInput\r\n class=\"chat-input\"\r\n [(ngModel)]=\"userInput\"\r\n (input)=\"autoGrow()\"\r\n (keydown.enter)=\"$event.preventDefault(); handleEnter()\"\r\n [disabled]=\"sending || isDisabled\"\r\n placeholder=\"Type your message...\"\r\n rows=\"1\">\r\n </textarea>\r\n </div>\r\n <button\r\n class=\"send-btn\"\r\n (click)=\"sendMessage()\"\r\n [disabled]=\"sending || isDisabled\">\r\n Send\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".chatbot-fab{position:fixed;bottom:20px;right:20px;width:56px;height:56px;border-radius:50%;background:transparent;color:#fff;border:none;font-size:24px;cursor:pointer;box-shadow:none;z-index:9998;display:flex;align-items:center;justify-content:center;overflow:visible}.chatbot-fab:hover{background:#00a5bb}.chatbot-fab-icon{width:70px;height:70px;object-fit:contain;border-radius:0;background:transparent;display:block}.chat-popup{position:fixed;bottom:20px;right:20px;width:380px;height:520px;max-height:80vh;display:flex;flex-direction:column;background:#fff;border:1px solid #e6e9ee;border-radius:12px;box-shadow:0 12px 24px #0000001f;overflow:visible!important;z-index:9999;padding-top:30px;overflow:visible}.chat-popup-header img{width:36px;height:36px;min-width:36px;max-width:36px;border-radius:50%;object-fit:cover}.chat-popup-header{display:flex;align-items:center;justify-content:space-between;background:var(--ion-color-primary)!important;color:#fff;padding:4px 12px;font-weight:600;flex-shrink:0}.icon-label{display:inline-flex;align-items:center;gap:8px}.text-block{display:inline-flex;flex-direction:column;line-height:1.1}.label-text{font-size:15px;font-weight:600}.status{font-size:11px;margin-top:2px;text-transform:lowercase;opacity:.95}.status.online-text{color:#b9f6ca}.status.offline-text{color:#ffcdd2}.chat-popup-actions{display:inline-flex;align-items:center;gap:6px}.info-btn,.info-btn:hover,.info-btn:focus,.info-btn:active{background:transparent;border:none;box-shadow:none;outline:none}.action-btn{background:transparent;color:#fff;border:none;font-size:16px;cursor:pointer;width:28px;height:28px;line-height:1;padding:0;border-radius:4px}.action-btn:hover{background:#ffffff26}.chat-body{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0}.chat-window{padding:12px;flex:1;overflow-y:auto;background:#f6f8fb;min-height:0;width:100%;box-sizing:border-box}.user,.bot{margin:8px 0;display:flex}.user{justify-content:flex-end}.bot{justify-content:flex-start}.bot,.user{width:100%;min-width:0;box-sizing:border-box;display:flex}.bubble{display:inline-block;padding:8px 12px;border-radius:14px;font-size:14px;line-height:1.3;word-wrap:break-word;position:relative}.user .bubble{background:#e8eaf6;color:#000;border-bottom-right-radius:4px;margin-left:auto;display:flex;justify-content:flex-end;align-self:flex-end}.chat-window .bot:first-of-type .bubble .feedback{display:none!important}.fb-btn{appearance:none;border:none;background:transparent;cursor:pointer;font-size:13px;line-height:1;padding:2px 4px;border-radius:4px;opacity:.9}.fb-btn:hover{background:#00bcd414}.fb-btn.up{color:#16a34a}.fb-btn.down{color:#dc2626}.yn-group{margin-top:8px}.yn-btn{appearance:none;border:1px solid #cfd8e3;background:#fff;color:#111827;font-size:12px;padding:4px 8px;border-radius:999px;cursor:pointer;margin-right:6px}.yn-btn:hover{background:#f3f4f6}.yn-btn.yes{border-color:#16a34a33}.yn-btn.no{border-color:#dc262633}.star-group{display:inline-flex;gap:6px;align-items:center;margin-top:7px;position:relative!important;top:12px!important}.star-group .star{appearance:none;border:none;background:transparent;cursor:pointer;font-size:18px;line-height:1;color:#444547;padding:0 1px;transition:transform .08s ease,color .08s ease}.star-group .star.filled{color:#f59e0b}.star-group .star:hover{transform:scale(1.08)}.input-row{display:flex;gap:8px;padding:10px;background:#fff;border-top:1px solid #e6e9ee;align-items:flex-end;flex-shrink:0}.chat-input-wrapper{flex:1;border-radius:8px;border:1px solid #d1d5db;overflow:hidden;background:#fff;display:flex}.chat-input{width:100%;resize:none;border:none;outline:none;padding:8px 10px;font-size:14px;line-height:1.2;min-height:20px;max-height:100px;overflow-y:auto;box-sizing:border-box;background:transparent}.chat-input:focus{outline:none;box-shadow:none}.send-btn{height:36px;align-self:flex-end;padding:0 14px;background:var(--ion-color-primary)!important;color:#fff!important;border:none;border-radius:8px;cursor:pointer;white-space:nowrap;font-size:14px}.send-btn:disabled{opacity:.6;cursor:not-allowed}.icon-label{display:flex;align-items:center;gap:8px}.amelia-header-icon{width:56px;height:56px;border-radius:0;object-fit:contain;background:transparent;flex-shrink:0}.text-block{display:flex;flex-direction:column;line-height:1.1}.bubble.bot,.bot .bubble{display:flex;align-items:flex-start;gap:8px}.bot .bubble .feedback-block{display:flex;flex-direction:column;align-items:flex-start;flex:1;min-width:0}.feedback-message{width:100%;display:block;white-space:normal;overflow-wrap:anywhere}.feedback-actions{display:flex;align-items:center;gap:8px;width:100%;justify-content:flex-start}.feedback-actions .yn-btn{flex:0 0 auto}.bubble-content{display:flex;flex-direction:column;align-items:flex-start;flex:0 1 auto;width:auto;max-width:100%;min-width:0;overflow:hidden;box-sizing:border-box}.formatted-text{display:block;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.feedback{display:flex;align-items:center;gap:8px;margin-top:8px;width:100%}.yn-group{display:flex;align-items:center;gap:8px;margin-top:8px}.amelia-message-icon{width:28px;height:28px;border-radius:50%;object-fit:cover;background:#fff;flex-shrink:0;flex:0 0 auto}.chat-popup.expanded{width:40vw!important;height:86vh!important;position:fixed!important;bottom:16px!important;right:40px!important;left:auto!important;max-width:650px!important;max-height:calc(100vh - 80px)!important;border-radius:8px!important;display:flex!important;flex-direction:column!important;visibility:visible!important;opacity:1!important;z-index:9999!important}.chat-top-actions{display:flex;justify-content:flex=end;align-items:center;gap:6px;padding:4px 8px;background:transparent;flex-shrink:0;position:absolute;top:-1px;right:0!important;width:auto!important;z-index:10000;position:absolute!important}.top-action-btn{border:none;background:transparent!important;color:#000!important;font-size:16px;font-weight:700;line-height:22px;cursor:pointer;padding:0;border-radius:none!important;width:24px;height:24px;text-align:center}.top-action-btn:hover{background:#eee;border-radius:4px}.top-action-btn .pi{font-size:16px}.chat-top-actions.top-action-btn{color:#000!important;background:transparent!important;border:none!important;font-size:16px;font-weight:700;cursor:pointer;width:24px;height:24px;line-height:24px;padding:0;border-radius:5px 0 0}.bot .bubble:has(.star-group){display:grid!important;grid-template-columns:24px 1fr!important;grid-template-rows:auto auto!important;column-gap:8px!important;row-gap:6px!important;align-items:start!important;min-width:270px!important;padding:12px!important}.bot .bubble:has(.star-group) .amelia-message-icon{grid-column:1!important;grid-row:1 / span 2!important;margin-top:0!important}.bot .bubble:has(.star-group)>div:first-of-type{grid-column:2!important;grid-row:1!important;white-space:no wrap!important}.bot .bubble:has(.star-group) .star-group{grid-column:2!important;grid-row:2!important;display:flex!important;flex-direction:row!important;gap:8px!important;margin:0!important;padding:0!important;position:static!important;inset:auto!important}.bot .bubble:has(.yn-group){display:grid!important;grid-template-columns:24px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:8px!important;row-gap:8px!important;align-items:start!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:10px!important;box-sizing:border-box!important;overflow:hidden!important}.bot .bubble:has(.yn-group) .amelia-message-icon{grid-column:1!important;grid-row:1 / span 2!important}.bot .bubble:has(.yn-group) .formatted-text{display:block!important;width:auto!important;max-width:100%!important;min-width:0!important;grid-template-columns:24px minmax(0,1fr)!important;grid-template-rows:auto auto!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important}.bot .bubble:has(.yn-group) .yn-group{grid-column:2!important;grid-row:2!important;display:flex!important;flex-direction:row!important;gap:8px!important;margin:0!important;padding:0!important;position:static!important}.message-time{font-size:11px;color:#6b7280;margin-top:3px;padding:0 6px;text-align:right;white-space:nowrap}.message-time-bot{font-size:11px;color:#6b7280;margin-top:2px;margin-left:10px;padding:0 6px;margin-right:auto;white-space:nowrap}.message-wrapper{display:inline-flex;flex-direction:column;width:max-content;max-width:78%}.bot .message-wrapper{align-items:flex-start}.user .message-wrapper{align-items:flex-end;margin-left:auto}.bot{display:flex;flex-direction:column;align-items:flex-start;width:100%;min-width:0}.bot .bubble{background:#fff;color:#111827;border:1px solid #e6e9ee;border-bottom-left-radius:4px;margin-bottom:4px;margin-right:auto;display:inline-flex;align-items:flex-start;width:auto;max-width:80%;min-width:0;box-sizing:border-box}.bot .bubble-content{white-space:normal;overflow-wrap:anywhere;word-break:break-word;min-width:0;width:auto;min-width:220px;max-width:280px;box-sizing:border-box;display:inline-block}.bot .formatted-text{display:inline;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.user{display:flex;flex-direction:column;align-items:flex-end}.user .bubble-content{min-width:unset;max-width:280px;width:max-content;text-align:right;white-space:normal;display:inline-block}.user .formatted-text{white-space:nowrap;word-break:normal;overflow-wrap:normal}.status-wrapper{display:flex;align-items:center;gap:6px}.status-dot{width:7px;height:7px;border-radius:50%;background-color:#2ecc71!important;flex-shrink:0}.status-dot.offline{background:#9e9e9e!important}.online-text,.offline-text{text-transform:none!important}@media (max-width: 480px){.chat-popup{width:calc(100vw - 16px);right:8px;bottom:8px;height:70vh}.bubble{max-width:90%;font-size:13px}}\n"] }]
|
|
37252
|
+
args: [{ selector: 'app-chatbot-lex', template: "\r\n\r\n\r\n<!-- Floating chat toggle button -->\r\n<button\r\n class=\"chatbot-fab\"\r\n (click)=\"toggleChat()\"\r\n *ngIf=\"!chatOpen\"\r\n aria-label=\"Open chat\"\r\n title=\"Chat with us\">\r\n <img\r\n class=\"chatbot-fab-icon\"\r\n src=\"assets/icon/amelia-new-icon.png\"\r\n alt=\"Amelia\"\r\n />\r\n</button>\r\n\r\n<!-- Chat popup -->\r\n<div class=\"chat-popup\" *ngIf=\"chatOpen\" [class.expanded]=\"isExpanded\">\r\n <div class=\"chat-top-actions\">\r\n <button\r\n class=\"top-action-btn\"\r\n type=\"button\"\r\n (click)=\"toggleExpand()\"\r\n title=\"Expand\">\r\n <span *ngIf=\"!isExpanded\">\u26F6</span>\r\n </button>\r\n <button \r\n class=\"top-action-btn\" \r\n type=\"button\" \r\n (click)=\"minimizeChat()\" \r\n title=\"Minimize\" \r\n aria-label=\"Minimize\">\r\n _\r\n </button> \r\n <button \r\n class=\"top-action-btn\" \r\n type=\"button\" \r\n (click)=\"closeChat()\" \r\n title=\"Close\" \r\n aria-label=\"Close\">\r\n \u2715\r\n </button>\r\n \r\n </div>\r\n <div class=\"chat-popup-header\">\r\n <span class=\"icon-label\">\r\n <img\r\n class=\"amelia-header-icon\"\r\n src=\"assets/icon/amelia-new-icon.png\"\r\n alt=\"Amelia\"/>\r\n <span class=\"text-block\">\r\n <span class=\"label-text\">Amelia</span>\r\n <span class=\"status-wrapper\">\r\n\r\n <span\r\n class=\"status-dot\"\r\n [class.offline]=\"botOffline\">\r\n </span>\r\n \r\n <span\r\n class=\"status\"\r\n [class.online-text]=\"!botOffline\"\r\n [class.offline-text]=\"botOffline\">\r\n {{ botOffline ? 'Offline' : 'Online' }}\r\n </span>\r\n </span>\r\n </span>\r\n </span>\r\n\r\n <div class=\"chat-popup-actions\">\r\n\r\n <button class=\"action-btn info-btn\"\r\n type=\"button\"\r\n (mouseenter)=\"getSessionID()\"\r\n title={{sessionId}}\r\n aria-label=\"Info\"\r\n (click)=\"copySessionId()\"\r\n [style.visibility]=\"infoVisible ? 'visible' : 'hidden'\">\r\n \uD83D\uDEC8\r\n </button>\r\n \r\n <button \r\n class=\"action-btn\" \r\n type=\"button\" \r\n (click)=\"refreshChat()\" \r\n title=\"Refresh\" \r\n aria-label=\"Refresh\">\r\n \u27F3\r\n </button>\r\n \r\n </div>\r\n </div>\r\n\r\n <div class=\"chat-body\">\r\n <div class=\"chat-window\" #chatWindow role=\"log\" aria-live=\"polite\">\r\n <div *ngFor=\"let msg of messages; let i = index\" [ngClass]=\"msg.from\">\r\n <div class=\"bubble\">\r\n <img\r\n *ngIf=\"msg.from === 'bot'\"\r\n class=\"amelia-message-icon\"\r\n src=\"assets/icon/amelia-new-icon.png\"\r\n alt=\"Amelia\"/>\r\n <!-- Star rating prompt -->\r\n <ng-container *ngIf=\"msg.from === 'bot' && isStarRatingPrompt(msg.text, i); else normalBubble\">\r\n <div>Your feedback matters to us</div>\r\n <div class=\"star-group\" (mouseleave)=\"onStarLeave(i)\">\r\n <button\r\n *ngFor=\"let s of getStars()\"\r\n type=\"button\"\r\n class=\"star\"\r\n [class.filled]=\"isStarFilled(i, s)\"\r\n (mouseenter)=\"onStarEnter(i, s)\"\r\n (click)=\"onStarClick(s, i)\"\r\n [attr.aria-label]=\"'Rate ' + s + ' star(s)'\"\r\n title=\"Rate {{s}} star(s)\">\r\n \u2605\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Normal bubble -->\r\n <ng-template #normalBubble>\r\n <div class=\"message-wrapper\"\r\n [class.short-welcome]=\"\r\n msg.from === 'bot' &&\r\n msg.text === 'Hi! How may I help you?'\r\n \"\r\n >\r\n <div class=\"bubble-content\">\r\n <span class=\"formatted-text\">\r\n <ng-container *ngFor=\"let line of displayLines(msg.text); let last = last\">\r\n {{ line }}\r\n <br *ngIf=\"!last\" >\r\n </ng-container>\r\n </span>\r\n \r\n \r\n\r\n <!-- Yes/No buttons -->\r\n <div class=\"yn-group\" *ngIf=\"msg.from === 'bot' && isYesNoPrompt(msg.text, i)\">\r\n <button class=\"yn-btn yes\" (click)=\"onYesNoClick('Yes', i)\">Yes</button>\r\n <button class=\"yn-btn no\" (click)=\"onYesNoClick('No', i)\">No</button>\r\n </div>\r\n\r\n \r\n \r\n\r\n <!-- Links -->\r\n <div *ngIf=\"msg.url && msg.url.length\">\r\n <div *ngFor=\"let url of msg.url\">\r\n <button *ngIf=\"msg.from === 'bot'\" class=\"yn-btn yes\" (click)=\"openLink(url)\">{{url}}</button>\r\n </div>\r\n </div>\r\n </div> <!--closes bubble content -->\r\n \r\n </div>\r\n </ng-template>\r\n \r\n <!-- Feedback thumbs -->\r\n <div\r\n class=\"feedback\"\r\n *ngIf=\"msg.from === 'bot'\r\n && msg.text?.trim() !='Hi! How may I help you?'\r\n && !isMessageRated(i)\r\n && i === messages.length - 1\r\n && !isAck\">\r\n \r\n <button class=\"fb-btn up\" (click)=\"sendFeedback('Thumbs up', i)\" aria-label=\"Thumbs up\" title=\"Thumbs up\">\uD83D\uDC4D</button>\r\n <button class=\"fb-btn down\" (click)=\"sendFeedback('Thumbs down', i)\" aria-label=\"Thumbs down\" title=\"Thumbs down\">\uD83D\uDC4E</button>\r\n </div>\r\n </div> <!--closes bubble --> \r\n <div\r\n *ngIf=\"msg.timestamp\"\r\n [ngClass]=\"msg.from === 'bot' ? 'message-time-bot' : 'message-time'\">\r\n {{msg.timestamp | date:\"EEE MMM dd yyyy 'at' hh:mm:ss a\"}}\r\n </div>\r\n \r\n \r\n \r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"input-row\">\r\n <div class=\"chat-input-wrapper\">\r\n <textarea\r\n #messageInput\r\n class=\"chat-input\"\r\n [(ngModel)]=\"userInput\"\r\n (input)=\"autoGrow()\"\r\n (keydown.enter)=\"$event.preventDefault(); handleEnter()\"\r\n [disabled]=\"sending || isDisabled\"\r\n placeholder=\"Type your message...\"\r\n rows=\"1\">\r\n </textarea>\r\n </div>\r\n <button\r\n class=\"send-btn\"\r\n (click)=\"sendMessage()\"\r\n [disabled]=\"sending || isDisabled\">\r\n Send\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".chatbot-fab{position:fixed;bottom:20px;right:20px;width:56px;height:56px;border-radius:50%;background:transparent;color:#fff;border:none;font-size:24px;cursor:pointer;box-shadow:none;z-index:9998;display:flex;align-items:center;justify-content:center;overflow:visible}.chatbot-fab:hover{background:#00a5bb}.chatbot-fab-icon{width:70px;height:70px;object-fit:contain;border-radius:0;background:transparent;display:block}.chat-popup{position:fixed;bottom:20px;right:20px;width:380px;height:520px;max-height:80vh;display:flex;flex-direction:column;background:#fff;border:1px solid #e6e9ee;border-radius:12px;box-shadow:0 12px 24px #0000001f;overflow:visible!important;z-index:9999;padding-top:30px;overflow:visible}.chat-popup-header img{width:36px;height:36px;min-width:36px;max-width:36px;border-radius:50%;object-fit:cover}.chat-popup:not(.expanded) .message-wrapper{max-width:85%!important}.chat-popup.expanded .bot .message-wrapper{width:max-content!important;max-width:85%!important;min-width:0!important;align-items:flex-start!important}.chat-popup.expanded .user .message-wrapper{width:-moz-fit-content!important;width:fit-content!important;max-width:70%!important;min-width:0!important}.chat-popup.expanded .bot .bubble{width:-moz-fit-content!important;width:fit-content!important;max-width:85%!important;min-width:0!important;align-self:flex-start!important;box-sizing:border-box!important}.chat-popup.expanded .bot .bubble.bubble:has(.star-group){width:300px!important;max-width:85%!important;min-width:0!important;align-self:flex-start!important;box-sizing:border-box!important}.chat-popup-header{display:flex;align-items:center;justify-content:space-between;background:var(--ion-color-primary)!important;color:#fff;padding:4px 12px;font-weight:600;flex-shrink:0}.icon-label{display:inline-flex;align-items:center;gap:8px}.text-block{display:inline-flex;flex-direction:column;line-height:1.1}.label-text{font-size:15px;font-weight:600}.status{font-size:11px;margin-top:2px;text-transform:lowercase;opacity:.95}.status.online-text{color:#b9f6ca}.status.offline-text{color:#ffcdd2}.chat-popup-actions{display:inline-flex;align-items:center;gap:6px}.info-btn,.info-btn:hover,.info-btn:focus,.info-btn:active{background:transparent;border:none;box-shadow:none;outline:none}.action-btn{background:transparent;color:#fff;border:none;font-size:16px;cursor:pointer;width:28px;height:28px;line-height:1;padding:0;border-radius:4px}.action-btn:hover{background:#ffffff26}.chat-body{flex:1;display:flex;flex-direction:column;overflow:hidden;min-height:0}.chat-window{padding:12px;flex:1;overflow-y:auto;background:#f6f8fb;min-height:0;width:100%;box-sizing:border-box}.user,.bot{margin:8px 0;display:flex;width:100%;min-width:0;box-sizing:border-box}.user{justify-content:flex-end}.bot{justify-content:flex-start}.bot,.user{width:100%;min-width:0;box-sizing:border-box;display:flex}.bubble{display:inline-block;padding:8px 12px;border-radius:14px;font-size:14px;line-height:1.3;word-wrap:break-word;position:relative}.user .bubble{background:#e8eaf6;color:#000;border-bottom-right-radius:4px;margin-left:auto;display:flex;justify-content:flex-end;align-self:flex-end}.chat-window .bot:first-of-type .bubble .feedback{display:none!important}.fb-btn{appearance:none;border:none;background:transparent;cursor:pointer;font-size:13px;line-height:1;padding:2px 4px;border-radius:4px;opacity:.9}.fb-btn:hover{background:#00bcd414}.fb-btn.up{color:#16a34a}.fb-btn.down{color:#dc2626}.yn-group{margin-top:8px}.yn-btn{appearance:none;border:1px solid #cfd8e3;background:#fff;color:#111827;font-size:12px;padding:4px 8px;border-radius:999px;cursor:pointer;margin-right:6px}.yn-btn:hover{background:#f3f4f6}.yn-btn.yes{border-color:#16a34a33}.yn-btn.no{border-color:#dc262633}.star-group{display:inline-flex;gap:6px;align-items:center;vertical-align:middle;margin-left:2px;margin-top:2px}.star-group .star{appearance:none;border:none;background:transparent;cursor:pointer;font-size:18px;line-height:1;color:#444547;padding:0 1px;transition:transform .08s ease,color .08s ease}.star-group .star.filled{color:#f59e0b}.star-group .star:hover{transform:scale(1.08)}.input-row{display:flex;gap:8px;padding:10px;background:#fff;border-top:1px solid #e6e9ee;align-items:flex-end;flex-shrink:0}.chat-input-wrapper{flex:1;border-radius:8px;border:1px solid #d1d5db;overflow:hidden;background:#fff;display:flex}.chat-input{width:100%;resize:none;border:none;outline:none;padding:8px 10px;font-size:14px;line-height:1.2;min-height:20px;max-height:100px;overflow-y:auto;box-sizing:border-box;background:transparent}.chat-input:focus{outline:none;box-shadow:none}.send-btn{height:36px;align-self:flex-end;padding:0 14px;background:var(--ion-color-primary)!important;color:#fff!important;border:none;border-radius:8px;cursor:pointer;white-space:nowrap;font-size:14px}.send-btn:disabled{opacity:.6;cursor:not-allowed}.icon-label{display:flex;align-items:center;gap:8px}.amelia-header-icon{width:56px;height:56px;border-radius:0;object-fit:contain;background:transparent;flex-shrink:0}.text-block{display:flex;flex-direction:column;line-height:1.1}.bubble.bot,.bot .bubble{display:flex;align-items:flex-start;gap:8px}.bot .bubble .feedback-block{display:flex;flex-direction:column;align-items:flex-start;flex:1;min-width:0}.bot .bubble .feedback{position:absolute;right:0;bottom:-24px;display:inline-flex;gap:6px;align-items:center;width:auto;margin:0}.feedback-message{width:100%;display:block;white-space:normal;overflow-wrap:anywhere}.feedback-actions{display:flex;align-items:center;gap:8px;width:100%;justify-content:flex-start}.feedback-actions .yn-btn{flex:0 0 auto}.bot .feedback .fb-btn{border:none;background:transparent;padding:2px;margin:0;cursor:pointer;flex:0 0 auto}.bubble-content{display:flex;flex-direction:column;align-items:flex-start;flex:0 1 auto;width:auto;max-width:100%;min-width:0;overflow:hidden;box-sizing:border-box}.formatted-text{display:block;white-space:normal;overflow-wrap:anywhere;word-break:break-word;box-sizing:border-box}.feedback{display:flex;align-items:center;gap:8px;margin-top:8px;width:100%}.yn-group{display:flex;align-items:center;gap:8px;margin-top:8px}.amelia-message-icon{width:28px;height:28px;border-radius:50%;object-fit:cover;background:#fff;flex-shrink:0;flex:0 0 auto}.chat-popup.expanded{width:650px!important;height:86vh!important;position:fixed!important;bottom:16px!important;right:40px!important;left:auto!important;max-width:650px!important;max-height:calc(100vh - 80px)!important;border-radius:8px!important;display:flex!important;flex-direction:column!important;visibility:visible!important;opacity:1!important;z-index:9999!important}.chat-popup.expanded .chat-body{width:100%!important;align-self:stretch!important}.chat-popup.expanded .short-welcome{width:auto!important;max-width:100%!important;min-width:0!important;flex:0 1 auto!important}.chat-popup.expanded .bot:has(.short-welcome) .bubble{width:-moz-fit-content!important;width:fit-content!important;max-width:calc(100% - 32px)!important;box-sizing:border-box!important}.chat-popup.expanded .short-welcome .bubble-content{width:auto!important;max-width:100%!important;min-width:0!important;flex:0 1 auto!important}.bot .formatted-text{white-space:normal;overflow-wrap:break-word;word-break:normal}.chat-popup.expanded .short-welcome .formatted-text{display:inline-block!important;width:auto!important;max-width:100%!important;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}.chat-top-actions{display:flex;justify-content:flex=end;align-items:center;gap:6px;padding:4px 8px;background:transparent;flex-shrink:0;position:absolute;top:-1px;right:0!important;width:auto!important;z-index:10000;position:absolute!important}.top-action-btn{border:none;background:transparent!important;color:#000!important;font-size:16px;font-weight:700;line-height:22px;cursor:pointer;padding:0;border-radius:none!important;width:24px;height:24px;text-align:center}.top-action-btn:hover{background:#eee;border-radius:4px}.top-action-btn .pi{font-size:16px}.chat-top-actions.top-action-btn{color:#000!important;background:transparent!important;border:none!important;font-size:16px;font-weight:700;cursor:pointer;width:24px;height:24px;line-height:24px;padding:0;border-radius:5px 0 0}.bot .bubble:has(.star-group){display:grid!important;grid-template-columns:32px max-content!important;grid-template-rows:auto auto!important;column-gap:8px!important;row-gap:6px!important;align-items:start!important;padding:12px!important;box-sizing:border-box!important;overflow:visible!important;width:300px!important;min-width:0!important;max-width:calc(100% - 24px)!important}.bot .bubble:has(.star-group) .amelia-message-icon{grid-column:1!important;grid-row:1 / span 2!important;margin-top:0!important}.bot .bubble:has(.star-group)>div:first-of-type{grid-column:2!important;grid-row:1!important;white-space:nowrap!important;min-width:0}.bot .bubble:has(.star-group) .star-group{grid-column:2!important;grid-row:2!important;display:flex!important;flex-direction:row!important;gap:8px!important;margin:0!important;padding:0!important;position:static!important;inset:auto!important}.bot .bubble:has(.yn-group){display:grid!important;grid-template-columns:24px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:8px!important;row-gap:8px!important;align-items:start!important;width:-moz-fit-content!important;width:fit-content!important;max-width:100%!important;min-width:0!important;padding:10px!important;box-sizing:border-box!important;overflow:hidden!important}.bot .bubble:has(.yn-group) .amelia-message-icon{grid-column:1!important;grid-row:1 / span 2!important}.bot .bubble:has(.yn-group) .formatted-text{display:block!important;width:auto!important;max-width:100%!important;min-width:0!important;grid-column:2!important;grid-row:1!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important}.bot .bubble:has(.yn-group) .yn-group{grid-column:2!important;grid-row:2!important;display:flex!important;flex-direction:row!important;gap:8px!important;margin:0!important;padding:0!important;position:static!important}.message-time{font-size:11px;color:#6b7280;margin-top:3px;padding:0 6px;text-align:right;white-space:nowrap}.message-time-bot{font-size:11px;color:#6b7280;margin-left:10px;padding:0 6px;margin-right:auto;white-space:nowrap}.message-wrapper{display:inline-flex;flex-direction:column;width:max-content;max-width:78%}.bot .message-wrapper{align-items:flex-start}.user .message-wrapper{align-items:flex-end;margin-left:auto}.bot{display:flex;flex-direction:column;align-items:flex-start;width:-moz-fit-content;width:fit-content;max-width:85%;min-width:0}.bot .bubble{background:#fff;color:#111827;border:1px solid #e6e9ee;border-bottom-left-radius:4px;margin-bottom:30px;margin-right:auto;display:inline-flex;align-items:flex-start;width:-moz-fit-content!important;width:fit-content!important;max-width:100%!important;min-width:0;box-sizing:border-box;overflow:visible!important;position:relative}.bot .bubble-content{min-width:0;width:auto;max-width:none;box-sizing:border-box;display:inline}.bot .message-time-bot{width:0;min-width:0;white-space:nowrap;overflow:visible;align-self:flex-start;text-align:left;margin-top:-26px;margin-left:0}.user{display:flex;flex-direction:column;align-items:flex-end;width:100%;min-width:0}.user .bubble-content{width:auto;min-width:0;max-width:280px;width:max-content;text-align:left;white-space:normal;display:inline-block;overflow-wrap:break-word;box-sizing:border-box;word-break:normal}.user .formatted-text{white-space:normal;word-break:normal;overflow-wrap:break-word;max-width:100%}.status-wrapper{display:flex;align-items:center;gap:6px}.status-dot{width:7px;height:7px;border-radius:50%;background-color:#2ecc71!important;flex-shrink:0}.status-dot.offline{background:#9e9e9e!important}.online-text,.offline-text{text-transform:none!important}@media (max-width: 480px){.chat-popup{width:calc(100vw - 16px);right:8px;bottom:8px;height:70vh}.bubble{max-width:90%;font-size:13px}}\n"] }]
|
|
37172
37253
|
}], () => [{ type: LexChatService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], { clientFilter: [{
|
|
37173
37254
|
type: Input
|
|
37174
37255
|
}], messageInput: [{
|