@pagelines/sdk 1.0.914 → 1.0.916

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.
@@ -2,8 +2,7 @@ import "./rolldown-runtime.js";
2
2
  import { t as e } from "./BotProvider.js";
3
3
  import { t } from "./useWidgetState.js";
4
4
  import { createBlock as n, defineComponent as r, openBlock as i, unref as a } from "vue";
5
- //#endregion
6
- //#region widget/ui/BotWidgetInline.vue
5
+ // widget/ui/BotWidgetInline.vue
7
6
  var o = /* @__PURE__ */ r({
8
7
  __name: "BotWidgetInline",
9
8
  props: {
@@ -39,7 +38,6 @@ var o = /* @__PURE__ */ r({
39
38
  ]));
40
39
  }
41
40
  });
42
- //#endregion
43
41
  export { o as default };
44
42
 
45
43
  //# sourceMappingURL=BotWidgetInline.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BotWidgetInline.js","names":["props","_openBlock","_createBlock","BotProvider","_unref","_sfc_main","BotProvider_default","BotWidgetInline_default","defineComponent","__expose","useWidgetState","__props","openBlock","createBlock","unref","currentBot","currentContext","currentFirstMessage","currentButtonText","currentButtonIcon"],"sources":["../widget/ui/BotWidgetInline.vue","../widget/ui/BotWidgetInline.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { PageLinesSDK } from '../../sdkClient'\nimport type { Bot } from '../../bot/schema'\nimport type { ButtonIconPreset } from '../PLWidget'\nimport BotProvider from '../../bot/ui/BotProvider.vue'\nimport { useWidgetState } from '../composables/useWidgetState'\n\nconst props = defineProps<{\n sdk?: PageLinesSDK\n handle?: string\n bot?: Bot\n context?: string\n firstMessage?: string\n buttonText?: string\n buttonIcon?: ButtonIconPreset\n chatOnly?: boolean\n}>()\n\nconst { currentBot, currentContext, currentFirstMessage, currentButtonText, currentButtonIcon, update } = useWidgetState(props)\n\ndefineExpose({ update })\n</script>\n\n<template>\n <BotProvider\n :sdk=\"sdk\"\n :handle=\"handle\"\n :bot=\"currentBot\"\n :context=\"currentContext\"\n :first-message=\"currentFirstMessage\"\n :button-text=\"currentButtonText\"\n :button-icon=\"currentButtonIcon\"\n :chat-only=\"chatOnly\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport type { PageLinesSDK } from '../../sdkClient'\nimport type { Bot } from '../../bot/schema'\nimport type { ButtonIconPreset } from '../PLWidget'\nimport BotProvider from '../../bot/ui/BotProvider.vue'\nimport { useWidgetState } from '../composables/useWidgetState'\n\nconst props = defineProps<{\n sdk?: PageLinesSDK\n handle?: string\n bot?: Bot\n context?: string\n firstMessage?: string\n buttonText?: string\n buttonIcon?: ButtonIconPreset\n chatOnly?: boolean\n}>()\n\nconst { currentBot, currentContext, currentFirstMessage, currentButtonText, currentButtonIcon, update } = useWidgetState(props)\n\ndefineExpose({ update })\n</script>\n\n<template>\n <BotProvider\n :sdk=\"sdk\"\n :handle=\"handle\"\n :bot=\"currentBot\"\n :context=\"currentContext\"\n :first-message=\"currentFirstMessage\"\n :button-text=\"currentButtonText\"\n :button-icon=\"currentButtonIcon\"\n :chat-only=\"chatOnly\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAkBA,IAAM,EAAE,eAAY,mBAAgB,wBAAqB,sBAAmB,sBAAmB,cAAWU,EAAeV,CAAK;SAE9HS,EAAa,EAAE,UAAO,CAAC,cAIrBR,EAAA,GAAAC,EASEC,GAAA;GARC,KAAKQ,EAAA;GACL,QAAQA,EAAA;GACR,KAAKP,EAAAW,CAAA;GACL,SAASX,EAAAY,CAAA;GACT,iBAAeZ,EAAAa,CAAA;GACf,eAAab,EAAAc,CAAA;GACb,eAAad,EAAAe,CAAA;GACb,aAAWR,EAAA"}
1
+ {"version":3,"file":"BotWidgetInline.js","names":["props","_openBlock","_createBlock","BotProvider","_unref","_sfc_main","BotProvider_default","BotWidgetInline_default","defineComponent","__expose","useWidgetState","__props","openBlock","createBlock","unref","currentBot","currentContext","currentFirstMessage","currentButtonText","currentButtonIcon"],"sources":["../widget/ui/BotWidgetInline.vue","../widget/ui/BotWidgetInline.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { PageLinesSDK } from '../../sdkClient'\nimport type { Bot } from '../../bot/schema'\nimport type { ButtonIconPreset } from '../PLWidget'\nimport BotProvider from '../../bot/ui/BotProvider.vue'\nimport { useWidgetState } from '../composables/useWidgetState'\n\nconst props = defineProps<{\n sdk?: PageLinesSDK\n handle?: string\n bot?: Bot\n context?: string\n firstMessage?: string\n buttonText?: string\n buttonIcon?: ButtonIconPreset\n chatOnly?: boolean\n}>()\n\nconst { currentBot, currentContext, currentFirstMessage, currentButtonText, currentButtonIcon, update } = useWidgetState(props)\n\ndefineExpose({ update })\n</script>\n\n<template>\n <BotProvider\n :sdk=\"sdk\"\n :handle=\"handle\"\n :bot=\"currentBot\"\n :context=\"currentContext\"\n :first-message=\"currentFirstMessage\"\n :button-text=\"currentButtonText\"\n :button-icon=\"currentButtonIcon\"\n :chat-only=\"chatOnly\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport type { PageLinesSDK } from '../../sdkClient'\nimport type { Bot } from '../../bot/schema'\nimport type { ButtonIconPreset } from '../PLWidget'\nimport BotProvider from '../../bot/ui/BotProvider.vue'\nimport { useWidgetState } from '../composables/useWidgetState'\n\nconst props = defineProps<{\n sdk?: PageLinesSDK\n handle?: string\n bot?: Bot\n context?: string\n firstMessage?: string\n buttonText?: string\n buttonIcon?: ButtonIconPreset\n chatOnly?: boolean\n}>()\n\nconst { currentBot, currentContext, currentFirstMessage, currentButtonText, currentButtonIcon, update } = useWidgetState(props)\n\ndefineExpose({ update })\n</script>\n\n<template>\n <BotProvider\n :sdk=\"sdk\"\n :handle=\"handle\"\n :bot=\"currentBot\"\n :context=\"currentContext\"\n :first-message=\"currentFirstMessage\"\n :button-text=\"currentButtonText\"\n :button-icon=\"currentButtonIcon\"\n :chat-only=\"chatOnly\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAkBA,IAAM,EAAE,eAAY,mBAAgB,wBAAqB,sBAAmB,sBAAmB,cAAWU,EAAeV,CAAK;E,OAE9HS,EAAa,EAAE,UAAO,CAAC,I,UAIrBR,EAAA,GAAAC,EASEC,GAAA;GARC,KAAKQ,EAAA;GACL,QAAQA,EAAA;GACR,KAAKP,EAAAW,CAAA;GACL,SAASX,EAAAY,CAAA;GACT,iBAAeZ,EAAAa,CAAA;GACf,eAAab,EAAAc,CAAA;GACb,eAAad,EAAAe,CAAA;GACb,aAAWR,EAAA"}
@@ -1,166 +1,10 @@
1
1
  import "./rolldown-runtime.js";
2
- import { t as e } from "./BotProvider.js";
3
- import { t } from "./useWidgetState.js";
4
- import { Teleport as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, guardReactiveProps as d, nextTick as f, normalizeClass as p, normalizeProps as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, renderSlot as y, toDisplayString as b, unref as x, watch as S, withCtx as C, withModifiers as w } from "vue";
5
- //#region ui/FClose.vue?vue&type=script&setup=true&lang.ts
6
- var T = ["aria-label"], E = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden" }, D = /* @__PURE__ */ u({
7
- name: "FClose",
8
- __name: "FClose",
9
- props: { ariaLabel: {} },
10
- emits: ["click"],
11
- setup(e) {
12
- let t = v(!1);
13
- return h(() => {
14
- setTimeout(() => {
15
- t.value = !0;
16
- }, 100);
17
- }), (n, r) => (_(), s("button", {
18
- type: "button",
19
- "aria-label": e.ariaLabel || "Close",
20
- class: "close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90",
21
- onClick: r[0] || (r[0] = (e) => n.$emit("click", e))
22
- }, [r[1] || (r[1] = c("span", { class: "absolute inset-0 rounded-full transition-all" }, null, -1)), c("span", E, [c("span", {
23
- class: p(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", t.value ? "translate-y-0 translate-x-0 rotate-45" : "translate-y-[30px] -translate-x-[30px] rotate-0"]),
24
- style: {
25
- "background-color": "currentColor",
26
- "transition-delay": "0.15s"
27
- }
28
- }, null, 2), c("span", {
29
- class: p(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]", t.value ? "translate-y-0 translate-x-0 -rotate-45" : "-translate-y-[30px] -translate-x-[30px] rotate-0"]),
30
- style: {
31
- "background-color": "currentColor",
32
- "transition-delay": "0.45s"
33
- }
34
- }, null, 2)])], 8, T));
35
- }
36
- }), O = { class: "flex min-h-full items-center justify-center text-center p-4" }, k = {
37
- key: 0,
38
- class: "text-base p-4 font-semibold"
39
- }, A = {
40
- key: 1,
41
- class: "flex items-center gap-2 px-2"
42
- }, j = /* @__PURE__ */ u({
43
- inheritAttrs: !1,
44
- name: "FModal",
45
- __name: "FModal",
46
- props: {
47
- vis: {
48
- type: Boolean,
49
- default: !1
50
- },
51
- modalClass: {},
52
- styleClass: {},
53
- fullScreen: {
54
- type: Boolean,
55
- default: !1
56
- },
57
- hasClose: {
58
- type: Boolean,
59
- default: !1
60
- },
61
- title: { default: "" },
62
- transitionMode: { default: "modal" },
63
- teleportTo: { default: "body" },
64
- disableTeleport: {
65
- type: Boolean,
66
- default: !1
67
- }
68
- },
69
- emits: [
70
- "update:vis",
71
- "close",
72
- "escape"
73
- ],
74
- setup(e, { emit: t }) {
75
- let u = t, f = v(!1);
76
- function close(e) {
77
- let { reason: t } = e;
78
- u("update:vis", !1), u("close", !0), t === "escape" && u("escape", !0);
79
- }
80
- let x = i(() => {
81
- let t = e.modalClass ? [e.modalClass] : ["max-w-screen-md p-24"], n = e.styleClass ? [e.styleClass] : ["bg-theme-0", "shadow-xl"];
82
- return e.fullScreen ? t.push("fixed inset-0") : t.push("rounded-2xl"), [
83
- "relative",
84
- "text-left",
85
- "transform",
86
- "transition-all",
87
- "w-full",
88
- "overflow-hidden",
89
- ...t,
90
- ...n
91
- ];
92
- }), T = v(!1), E = [];
93
- function onKeydown(t) {
94
- t.key === "Escape" && e.vis && close({ reason: "escape" });
95
- }
96
- h(async () => {
97
- f.value = !0;
98
- let t = S(() => e.vis, (e) => {
99
- e ? setTimeout(() => T.value = !0, 300) : T.value = !1;
100
- }, { immediate: !0 });
101
- E.push(t), typeof document < "u" && (document.addEventListener("keydown", onKeydown), E.push(() => document.removeEventListener("keydown", onKeydown)));
102
- }), g(() => {
103
- E.forEach((e) => e());
104
- });
105
- let j = i(() => e.transitionMode === "slideUp" ? {
106
- enterActiveClass: "ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",
107
- enterFromClass: "opacity-0 translate-y-full scale-95",
108
- enterToClass: "opacity-100 translate-y-0 scale-100",
109
- leaveActiveClass: "ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",
110
- leaveFromClass: "opacity-100 translate-y-0 scale-100",
111
- leaveToClass: "opacity-0 translate-y-full scale-95"
112
- } : {
113
- enterActiveClass: "ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",
114
- enterFromClass: "opacity-0 scale-75",
115
- enterToClass: "opacity-100 translate-y-0 scale-100",
116
- leaveActiveClass: "ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",
117
- leaveFromClass: "opacity-100 translate-y-0 scale-100",
118
- leaveToClass: "opacity-0 scale-75"
119
- });
120
- return (t, i) => f.value ? (_(), a(n, {
121
- key: 0,
122
- to: e.teleportTo,
123
- disabled: e.disableTeleport
124
- }, [c("div", {
125
- class: p(["fixed inset-0 z-50", e.vis ? "" : "pointer-events-none"]),
126
- "aria-labelledby": "modal-title",
127
- role: "dialog",
128
- "aria-modal": "true"
129
- }, [l(r, {
130
- "enter-active-class": "ease-out duration-300",
131
- "enter-from-class": "opacity-0",
132
- "enter-to-class": "opacity-100",
133
- "leave-active-class": "ease-in duration-200",
134
- "leave-from-class": "opacity-100",
135
- "leave-to-class": "opacity-0"
136
- }, {
137
- default: C(() => [e.vis ? (_(), s("div", {
138
- key: 0,
139
- class: "fixed inset-0 bg-theme-800/60 active:bg-theme-800/80 cursor-pointer dark:bg-theme-600/90 backdrop-blur-sm transition-opacity",
140
- onClick: i[0] || (i[0] = (e) => close({ reason: "escape" }))
141
- })) : o("", !0)]),
142
- _: 1
143
- }), c("div", {
144
- class: "fixed inset-0 z-40 overflow-y-auto overscroll-contain no-scrollbar",
145
- onClick: i[3] || (i[3] = (e) => close({ reason: "escape" }))
146
- }, [c("div", O, [l(r, m(d(j.value)), {
147
- default: C(() => [e.vis ? (_(), s("div", {
148
- key: 0,
149
- class: p([x.value, "w-full"]),
150
- onClick: i[2] || (i[2] = w(() => {}, ["stop"]))
151
- }, [e.hasClose || e.title || t.$slots.actions ? (_(), s("div", {
152
- key: 0,
153
- class: p(!e.title && (e.hasClose || t.$slots.actions) ? "absolute top-0 right-0 z-10" : "flex justify-between items-center")
154
- }, [e.title ? (_(), s("h2", k, b(e.title), 1)) : o("", !0), e.hasClose || t.$slots.actions ? (_(), s("div", A, [y(t.$slots, "actions"), e.hasClose ? (_(), a(D, {
155
- key: 0,
156
- class: "relative",
157
- "data-test-id": "close-modal",
158
- onClick: i[1] || (i[1] = w((e) => close({ reason: "escape" }), ["stop"]))
159
- })) : o("", !0)])) : o("", !0)], 2)) : o("", !0), y(t.$slots, "default")], 2)) : o("", !0)]),
160
- _: 3
161
- }, 16)])])], 2)], 8, ["to", "disabled"])) : o("", !0);
162
- }
163
- }), M = /* @__PURE__ */ u({
2
+ import { i as e } from "./BotWrap.js";
3
+ import { t } from "./BotProvider.js";
4
+ import { t as n } from "./useWidgetState.js";
5
+ import { createBlock as r, createVNode as i, defineComponent as a, nextTick as o, onMounted as s, openBlock as c, ref as l, unref as u, withCtx as d } from "vue";
6
+ // widget/ui/BotWidgetModal.vue
7
+ var f = /* @__PURE__ */ a({
164
8
  __name: "BotWidgetModal",
165
9
  props: {
166
10
  sdk: {},
@@ -173,42 +17,42 @@ var T = ["aria-label"], E = { class: "absolute top-1/2 left-1/2 -translate-x-1/2
173
17
  chatOnly: { type: Boolean },
174
18
  onClose: { type: Function }
175
19
  },
176
- setup(n, { expose: r }) {
177
- let i = n, { currentBot: o, currentContext: s, currentFirstMessage: c, currentButtonText: u, currentButtonIcon: d, update: p } = t(i), m = v(!1);
178
- h(async () => {
179
- await f(), setTimeout(() => {
180
- m.value = !0;
20
+ setup(a, { expose: f }) {
21
+ let p = a, { currentBot: m, currentContext: h, currentFirstMessage: g, currentButtonText: _, currentButtonIcon: v, update: y } = n(p), b = l(!1);
22
+ s(async () => {
23
+ await o(), setTimeout(() => {
24
+ b.value = !0;
181
25
  }, 10);
182
26
  });
183
27
  function close() {
184
- m.value = !1, setTimeout(() => {
185
- i.onClose && i.onClose();
28
+ b.value = !1, setTimeout(() => {
29
+ p.onClose && p.onClose();
186
30
  }, 300);
187
31
  }
188
32
  function open() {
189
- m.value = !0;
33
+ b.value = !0;
190
34
  }
191
- return r({
192
- update: p,
35
+ return f({
36
+ update: y,
193
37
  close,
194
38
  open
195
- }), (t, r) => (_(), a(j, {
196
- vis: m.value,
39
+ }), (n, o) => (c(), r(e, {
40
+ vis: b.value,
197
41
  "disable-teleport": !0,
198
42
  "modal-class": "max-w-4xl h-[80vh] md:h-[600px]",
199
43
  "has-close": !1,
200
- "onUpdate:vis": r[0] || (r[0] = (e) => m.value = e),
44
+ "onUpdate:vis": o[0] || (o[0] = (e) => b.value = e),
201
45
  onClose: close
202
46
  }, {
203
- default: C(() => [l(e, {
204
- sdk: n.sdk,
205
- handle: n.handle,
206
- bot: x(o),
207
- context: x(s),
208
- "first-message": x(c),
209
- "button-text": x(u),
210
- "button-icon": x(d),
211
- "chat-only": n.chatOnly,
47
+ default: d(() => [i(t, {
48
+ sdk: a.sdk,
49
+ handle: a.handle,
50
+ bot: u(m),
51
+ context: u(h),
52
+ "first-message": u(g),
53
+ "button-text": u(_),
54
+ "button-icon": u(v),
55
+ "chat-only": a.chatOnly,
212
56
  "has-close": !0,
213
57
  onClose: close
214
58
  }, null, 8, [
@@ -225,7 +69,6 @@ var T = ["aria-label"], E = { class: "absolute top-1/2 left-1/2 -translate-x-1/2
225
69
  }, 8, ["vis"]));
226
70
  }
227
71
  });
228
- //#endregion
229
- export { M as default };
72
+ export { f as default };
230
73
 
231
74
  //# sourceMappingURL=BotWidgetModal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BotWidgetModal.js","names":["$emit","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_createElementVNode","_normalizeClass","_sfc_main","$slots","_openBlock","_createBlock","_Teleport","_createElementVNode","_normalizeClass","_createVNode","_Transition","_withCtx","_createElementBlock","_createCommentVNode","_normalizeProps","_guardReactiveProps","_withModifiers","_toDisplayString","_renderSlot","FClose","_sfc_main","_openBlock","_createBlock","FModal","_withCtx","_createVNode","BotProvider","_unref","_sfc_main","BotProvider_default","_hoisted_1$1","_hoisted_2$1","FClose_default","defineComponent","inView","ref","onMounted","openBlock","createElementBlock","__props","_cache","_ctx","$event","createElementVNode","normalizeClass","_hoisted_1","_hoisted_2","_hoisted_3","FModal_default","__emit","emit","isMounted","args","reason","classes","computed","cls","style","afterVisible","cleanups","event","unwatch","watch","vis","onUnmounted","c","modalTransition","createBlock","Teleport","createVNode","Transition","withCtx","createCommentVNode","normalizeProps","guardReactiveProps","withModifiers","toDisplayString","renderSlot","BotWidgetModal_default","__expose","props","useWidgetState","isVisible","nextTick","unref","currentBot","currentContext","currentFirstMessage","currentButtonText","currentButtonIcon"],"sources":["../ui/FClose.vue","../ui/FClose.vue","../ui/FModal.vue","../ui/FModal.vue","../widget/ui/BotWidgetModal.vue","../widget/ui/BotWidgetModal.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n// SDK-local copy of src/ui/common/FClose.vue — the SDK package must not\n// import app source, so the primitives it needs live here.\nimport { onMounted, ref } from 'vue'\n\ndefineOptions({ name: 'FClose' })\n\ndefineProps<{\n ariaLabel?: string\n}>()\n\ndefineEmits<{\n click: [event: MouseEvent]\n}>()\n\nconst inView = ref(false)\n\nonMounted(() => {\n setTimeout(() => {\n inView.value = true\n }, 100)\n})\n</script>\n\n<template>\n <button\n type=\"button\"\n :aria-label=\"ariaLabel || 'Close'\"\n class=\"close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90\"\n @click=\"$emit('click', $event)\"\n >\n <!-- Background circle (invisible, for hover area) -->\n <span class=\"absolute inset-0 rounded-full transition-all\" />\n\n <!-- Close lines container -->\n <span class=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden\">\n <!-- Line 1 - animates from bottom-left to center, rotates 45deg -->\n <span\n class=\"absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]\"\n :class=\"inView ? 'translate-y-0 translate-x-0 rotate-45' : 'translate-y-[30px] -translate-x-[30px] rotate-0'\"\n style=\"background-color: currentColor; transition-delay: 0.15s\"\n />\n\n <!-- Line 2 - animates from top-left to center, rotates -45deg -->\n <span\n class=\"absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]\"\n :class=\"inView ? 'translate-y-0 translate-x-0 -rotate-45' : '-translate-y-[30px] -translate-x-[30px] rotate-0'\"\n style=\"background-color: currentColor; transition-delay: 0.45s\"\n />\n </span>\n </button>\n</template>\n","<script lang=\"ts\" setup>\n// SDK-local copy of src/ui/common/FClose.vue — the SDK package must not\n// import app source, so the primitives it needs live here.\nimport { onMounted, ref } from 'vue'\n\ndefineOptions({ name: 'FClose' })\n\ndefineProps<{\n ariaLabel?: string\n}>()\n\ndefineEmits<{\n click: [event: MouseEvent]\n}>()\n\nconst inView = ref(false)\n\nonMounted(() => {\n setTimeout(() => {\n inView.value = true\n }, 100)\n})\n</script>\n\n<template>\n <button\n type=\"button\"\n :aria-label=\"ariaLabel || 'Close'\"\n class=\"close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90\"\n @click=\"$emit('click', $event)\"\n >\n <!-- Background circle (invisible, for hover area) -->\n <span class=\"absolute inset-0 rounded-full transition-all\" />\n\n <!-- Close lines container -->\n <span class=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden\">\n <!-- Line 1 - animates from bottom-left to center, rotates 45deg -->\n <span\n class=\"absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]\"\n :class=\"inView ? 'translate-y-0 translate-x-0 rotate-45' : 'translate-y-[30px] -translate-x-[30px] rotate-0'\"\n style=\"background-color: currentColor; transition-delay: 0.15s\"\n />\n\n <!-- Line 2 - animates from top-left to center, rotates -45deg -->\n <span\n class=\"absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]\"\n :class=\"inView ? 'translate-y-0 translate-x-0 -rotate-45' : '-translate-y-[30px] -translate-x-[30px] rotate-0'\"\n style=\"background-color: currentColor; transition-delay: 0.45s\"\n />\n </span>\n </button>\n</template>\n","<script lang=\"ts\" setup>\n// SDK-local copy of src/ui/common/FModal.vue — the SDK package must not\n// import app source, so the primitives it needs live here.\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport FClose from './FClose.vue'\n\ndefineOptions({ name: 'FModal' })\n\nconst {\n vis = false,\n modalClass,\n styleClass,\n fullScreen = false,\n hasClose = false,\n title = '',\n transitionMode = 'modal',\n teleportTo = 'body',\n disableTeleport = false,\n} = defineProps<{\n vis?: boolean\n modalClass?: string\n styleClass?: string\n fullScreen?: boolean\n hasClose?: boolean\n title?: string\n transitionMode?: 'modal' | 'slideUp'\n teleportTo?: string | Element\n disableTeleport?: boolean\n}>()\n\nconst emit = defineEmits<{\n 'update:vis': [value: boolean]\n 'close': [value: boolean]\n 'escape': [value: boolean]\n}>()\n\nconst isMounted = ref(false)\n\nfunction close(args: { reason: 'escape' | 'reset' }): void {\n const { reason } = args\n emit('update:vis', false)\n emit('close', true)\n if (reason === 'escape')\n emit('escape', true)\n}\n\nconst classes = computed(() => {\n const cls = modalClass ? [modalClass] : ['max-w-screen-md p-24']\n const style = styleClass ? [styleClass] : ['bg-theme-0', 'shadow-xl']\n\n if (fullScreen)\n cls.push('fixed inset-0')\n else\n cls.push('rounded-2xl')\n\n return [\n 'relative',\n 'text-left',\n 'transform',\n 'transition-all',\n 'w-full',\n 'overflow-hidden',\n ...cls,\n ...style,\n ]\n})\n\nconst afterVisible = ref(false)\nconst cleanups: (() => void)[] = []\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && vis)\n close({ reason: 'escape' })\n}\n\nonMounted(async () => {\n isMounted.value = true\n\n const unwatch = watch(\n () => vis,\n (vis) => {\n if (vis) {\n setTimeout(() => (afterVisible.value = true), 300)\n } else {\n afterVisible.value = false\n }\n },\n { immediate: true },\n )\n\n cleanups.push(unwatch)\n\n if (typeof document !== 'undefined') {\n document.addEventListener('keydown', onKeydown)\n cleanups.push(() => document.removeEventListener('keydown', onKeydown))\n }\n})\n\nonUnmounted(() => {\n cleanups.forEach((c) => c())\n})\n\nconst modalTransition = computed(() => {\n if (transitionMode === 'slideUp') {\n return {\n enterActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n enterFromClass: 'opacity-0 translate-y-full scale-95',\n enterToClass: 'opacity-100 translate-y-0 scale-100',\n leaveActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n leaveFromClass: 'opacity-100 translate-y-0 scale-100',\n leaveToClass: 'opacity-0 translate-y-full scale-95',\n }\n }\n return {\n enterActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n enterFromClass: 'opacity-0 scale-75',\n enterToClass: 'opacity-100 translate-y-0 scale-100',\n leaveActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n leaveFromClass: 'opacity-100 translate-y-0 scale-100',\n leaveToClass: 'opacity-0 scale-75',\n }\n})\n</script>\n\n<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n}\n</script>\n\n<template>\n <Teleport v-if=\"isMounted\" :to=\"teleportTo\" :disabled=\"disableTeleport\">\n <div\n class=\"fixed inset-0 z-50\"\n aria-labelledby=\"modal-title\"\n role=\"dialog\"\n aria-modal=\"true\"\n :class=\"!vis ? 'pointer-events-none' : ''\"\n >\n <Transition\n enter-active-class=\"ease-out duration-300\"\n enter-from-class=\"opacity-0\"\n enter-to-class=\"opacity-100\"\n leave-active-class=\"ease-in duration-200\"\n leave-from-class=\"opacity-100\"\n leave-to-class=\"opacity-0\"\n >\n <div\n v-if=\"vis\"\n class=\"fixed inset-0 bg-theme-800/60 active:bg-theme-800/80 cursor-pointer dark:bg-theme-600/90 backdrop-blur-sm transition-opacity\"\n @click=\"close({ reason: 'escape' })\"\n />\n </Transition>\n <div\n class=\"fixed inset-0 z-40 overflow-y-auto overscroll-contain no-scrollbar\"\n @click=\"close({ reason: 'escape' })\"\n >\n <!-- min-h-full, never h-full: a taller-than-viewport panel must grow this\n row so the outer layer scrolls; h-full + items-center centers the\n overflow and clips the modal top unreachably. p-4 = the 1em minimum\n viewport gap for tall modals. -->\n <div class=\"flex min-h-full items-center justify-center text-center p-4\">\n <Transition v-bind=\"modalTransition\">\n <div\n v-if=\"vis\"\n :class=\"classes\"\n class=\"w-full\"\n @click.stop\n >\n <div\n v-if=\"hasClose || title || $slots.actions\"\n :class=\"!title && (hasClose || $slots.actions) ? 'absolute top-0 right-0 z-10' : 'flex justify-between items-center'\"\n >\n <h2 v-if=\"title\" class=\"text-base p-4 font-semibold\">\n {{ title }}\n </h2>\n <div v-if=\"hasClose || $slots.actions\" class=\"flex items-center gap-2 px-2\">\n <slot name=\"actions\" />\n <FClose\n v-if=\"hasClose\"\n class=\"relative\"\n data-test-id=\"close-modal\"\n @click.stop=\"close({ reason: 'escape' })\"\n />\n </div>\n </div>\n <slot />\n </div>\n </Transition>\n </div>\n </div>\n </div>\n </Teleport>\n</template>\n","<script lang=\"ts\" setup>\n// SDK-local copy of src/ui/common/FModal.vue — the SDK package must not\n// import app source, so the primitives it needs live here.\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport FClose from './FClose.vue'\n\ndefineOptions({ name: 'FModal' })\n\nconst {\n vis = false,\n modalClass,\n styleClass,\n fullScreen = false,\n hasClose = false,\n title = '',\n transitionMode = 'modal',\n teleportTo = 'body',\n disableTeleport = false,\n} = defineProps<{\n vis?: boolean\n modalClass?: string\n styleClass?: string\n fullScreen?: boolean\n hasClose?: boolean\n title?: string\n transitionMode?: 'modal' | 'slideUp'\n teleportTo?: string | Element\n disableTeleport?: boolean\n}>()\n\nconst emit = defineEmits<{\n 'update:vis': [value: boolean]\n 'close': [value: boolean]\n 'escape': [value: boolean]\n}>()\n\nconst isMounted = ref(false)\n\nfunction close(args: { reason: 'escape' | 'reset' }): void {\n const { reason } = args\n emit('update:vis', false)\n emit('close', true)\n if (reason === 'escape')\n emit('escape', true)\n}\n\nconst classes = computed(() => {\n const cls = modalClass ? [modalClass] : ['max-w-screen-md p-24']\n const style = styleClass ? [styleClass] : ['bg-theme-0', 'shadow-xl']\n\n if (fullScreen)\n cls.push('fixed inset-0')\n else\n cls.push('rounded-2xl')\n\n return [\n 'relative',\n 'text-left',\n 'transform',\n 'transition-all',\n 'w-full',\n 'overflow-hidden',\n ...cls,\n ...style,\n ]\n})\n\nconst afterVisible = ref(false)\nconst cleanups: (() => void)[] = []\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && vis)\n close({ reason: 'escape' })\n}\n\nonMounted(async () => {\n isMounted.value = true\n\n const unwatch = watch(\n () => vis,\n (vis) => {\n if (vis) {\n setTimeout(() => (afterVisible.value = true), 300)\n } else {\n afterVisible.value = false\n }\n },\n { immediate: true },\n )\n\n cleanups.push(unwatch)\n\n if (typeof document !== 'undefined') {\n document.addEventListener('keydown', onKeydown)\n cleanups.push(() => document.removeEventListener('keydown', onKeydown))\n }\n})\n\nonUnmounted(() => {\n cleanups.forEach((c) => c())\n})\n\nconst modalTransition = computed(() => {\n if (transitionMode === 'slideUp') {\n return {\n enterActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n enterFromClass: 'opacity-0 translate-y-full scale-95',\n enterToClass: 'opacity-100 translate-y-0 scale-100',\n leaveActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n leaveFromClass: 'opacity-100 translate-y-0 scale-100',\n leaveToClass: 'opacity-0 translate-y-full scale-95',\n }\n }\n return {\n enterActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n enterFromClass: 'opacity-0 scale-75',\n enterToClass: 'opacity-100 translate-y-0 scale-100',\n leaveActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n leaveFromClass: 'opacity-100 translate-y-0 scale-100',\n leaveToClass: 'opacity-0 scale-75',\n }\n})\n</script>\n\n<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n}\n</script>\n\n<template>\n <Teleport v-if=\"isMounted\" :to=\"teleportTo\" :disabled=\"disableTeleport\">\n <div\n class=\"fixed inset-0 z-50\"\n aria-labelledby=\"modal-title\"\n role=\"dialog\"\n aria-modal=\"true\"\n :class=\"!vis ? 'pointer-events-none' : ''\"\n >\n <Transition\n enter-active-class=\"ease-out duration-300\"\n enter-from-class=\"opacity-0\"\n enter-to-class=\"opacity-100\"\n leave-active-class=\"ease-in duration-200\"\n leave-from-class=\"opacity-100\"\n leave-to-class=\"opacity-0\"\n >\n <div\n v-if=\"vis\"\n class=\"fixed inset-0 bg-theme-800/60 active:bg-theme-800/80 cursor-pointer dark:bg-theme-600/90 backdrop-blur-sm transition-opacity\"\n @click=\"close({ reason: 'escape' })\"\n />\n </Transition>\n <div\n class=\"fixed inset-0 z-40 overflow-y-auto overscroll-contain no-scrollbar\"\n @click=\"close({ reason: 'escape' })\"\n >\n <!-- min-h-full, never h-full: a taller-than-viewport panel must grow this\n row so the outer layer scrolls; h-full + items-center centers the\n overflow and clips the modal top unreachably. p-4 = the 1em minimum\n viewport gap for tall modals. -->\n <div class=\"flex min-h-full items-center justify-center text-center p-4\">\n <Transition v-bind=\"modalTransition\">\n <div\n v-if=\"vis\"\n :class=\"classes\"\n class=\"w-full\"\n @click.stop\n >\n <div\n v-if=\"hasClose || title || $slots.actions\"\n :class=\"!title && (hasClose || $slots.actions) ? 'absolute top-0 right-0 z-10' : 'flex justify-between items-center'\"\n >\n <h2 v-if=\"title\" class=\"text-base p-4 font-semibold\">\n {{ title }}\n </h2>\n <div v-if=\"hasClose || $slots.actions\" class=\"flex items-center gap-2 px-2\">\n <slot name=\"actions\" />\n <FClose\n v-if=\"hasClose\"\n class=\"relative\"\n data-test-id=\"close-modal\"\n @click.stop=\"close({ reason: 'escape' })\"\n />\n </div>\n </div>\n <slot />\n </div>\n </Transition>\n </div>\n </div>\n </div>\n </Teleport>\n</template>\n","<script setup lang=\"ts\">\nimport type { PageLinesSDK } from '../../sdkClient'\nimport type { Bot } from '../../bot/schema'\nimport type { ButtonIconPreset } from '../PLWidget'\nimport { nextTick, onMounted, ref } from 'vue'\nimport FModal from '../../ui/FModal.vue'\nimport BotProvider from '../../bot/ui/BotProvider.vue'\nimport { useWidgetState } from '../composables/useWidgetState'\n\nconst props = defineProps<{\n sdk?: PageLinesSDK\n handle?: string\n bot?: Bot\n context?: string\n firstMessage?: string\n buttonText?: string\n buttonIcon?: ButtonIconPreset\n chatOnly?: boolean\n onClose?: () => void\n}>()\n\nconst { currentBot, currentContext, currentFirstMessage, currentButtonText, currentButtonIcon, update } = useWidgetState(props)\nconst isVisible = ref(false)\n\n// Trigger transition after mount\nonMounted(async () => {\n await nextTick()\n // Small delay to ensure DOM is ready and transition fires\n setTimeout(() => {\n isVisible.value = true\n }, 10)\n})\n\nfunction close() {\n isVisible.value = false\n // Wait for transition to complete before calling onClose\n setTimeout(() => {\n if (props.onClose) {\n props.onClose()\n }\n }, 300) // Match FModal transition duration\n}\n\nfunction open() {\n isVisible.value = true\n}\n\ndefineExpose({ update, close, open })\n</script>\n\n<template>\n <FModal\n :vis=\"isVisible\"\n :disable-teleport=\"true\"\n modal-class=\"max-w-4xl h-[80vh] md:h-[600px]\"\n :has-close=\"false\"\n @update:vis=\"isVisible = $event\"\n @close=\"close\"\n >\n <BotProvider\n :sdk=\"sdk\"\n :handle=\"handle\"\n :bot=\"currentBot\"\n :context=\"currentContext\"\n :first-message=\"currentFirstMessage\"\n :button-text=\"currentButtonText\"\n :button-icon=\"currentButtonIcon\"\n :chat-only=\"chatOnly\"\n :has-close=\"true\"\n @close=\"close\"\n />\n </FModal>\n</template>\n","<script setup lang=\"ts\">\nimport type { PageLinesSDK } from '../../sdkClient'\nimport type { Bot } from '../../bot/schema'\nimport type { ButtonIconPreset } from '../PLWidget'\nimport { nextTick, onMounted, ref } from 'vue'\nimport FModal from '../../ui/FModal.vue'\nimport BotProvider from '../../bot/ui/BotProvider.vue'\nimport { useWidgetState } from '../composables/useWidgetState'\n\nconst props = defineProps<{\n sdk?: PageLinesSDK\n handle?: string\n bot?: Bot\n context?: string\n firstMessage?: string\n buttonText?: string\n buttonIcon?: ButtonIconPreset\n chatOnly?: boolean\n onClose?: () => void\n}>()\n\nconst { currentBot, currentContext, currentFirstMessage, currentButtonText, currentButtonIcon, update } = useWidgetState(props)\nconst isVisible = ref(false)\n\n// Trigger transition after mount\nonMounted(async () => {\n await nextTick()\n // Small delay to ensure DOM is ready and transition fires\n setTimeout(() => {\n isVisible.value = true\n }, 10)\n})\n\nfunction close() {\n isVisible.value = false\n // Wait for transition to complete before calling onClose\n setTimeout(() => {\n if (props.onClose) {\n props.onClose()\n }\n }, 300) // Match FModal transition duration\n}\n\nfunction open() {\n isVisible.value = true\n}\n\ndefineExpose({ update, close, open })\n</script>\n\n<template>\n <FModal\n :vis=\"isVisible\"\n :disable-teleport=\"true\"\n modal-class=\"max-w-4xl h-[80vh] md:h-[600px]\"\n :has-close=\"false\"\n @update:vis=\"isVisible = $event\"\n @close=\"close\"\n >\n <BotProvider\n :sdk=\"sdk\"\n :handle=\"handle\"\n :bot=\"currentBot\"\n :context=\"currentContext\"\n :first-message=\"currentFirstMessage\"\n :button-text=\"currentButtonText\"\n :button-icon=\"currentButtonIcon\"\n :chat-only=\"chatOnly\"\n :has-close=\"true\"\n @close=\"close\"\n />\n </FModal>\n</template>\n"],"mappings":";;;;;;;;;;;EAeA,IAAMuC,IAASC,EAAI,EAAK;SAExBC,QAAgB;GACd,iBAAiB;IACf,EAAO,QAAQ;GACjB,GAAG,GAAG;EACR,CAAC,cAICtC,EAAA,GAAAC,EAyBS,UAAA;GAxBP,MAAK;GACJ,cAAYwC,EAAA,aAAS;GACtB,OAAM;GACL,SAAKC,EAAA,OAAA,EAAA,MAAA,MAAE7C,EAAAA,MAAK,SAAU+C,CAAM;EAG7B,GAAA,CAAAF,EAAA,OAAA,EAAA,KAAAxC,EAA6D,QAAA,EAAvD,OAAM,+CAA8C,GAAA,MAAA,EAAA,IAG1DA,EAcO,QAdPH,GAcO,CAZLG,EAIE,QAAA;GAHA,OAAKC,EAAA,CAAC,2HACEiC,EAAA,QAAM,0CAAA,iDAAA,CAAA;GACd,OAAA;IAAA,oBAAA;IAAA,oBAAA;GAAA;EAIFlC,GAAAA,MAAAA,CAAAA,GAAAA,EAIE,QAAA;GAHA,OAAKC,EAAA,CAAC,2HACEiC,EAAA,QAAM,2CAAA,kDAAA,CAAA;GACd,OAAA;IAAA,oBAAA;IAAA,oBAAA;GAAA;;;;;;;;;;CE+EN,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAhGhB,IAAMgB,IAAOD,GAMPE,IAAYhB,EAAI,EAAK;E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;;GAER,SAAAlB,QAWE,CAXFC,EAWEC,GAAA;IAVC,KAAKa,EAAA;IACL,QAAQA,EAAA;IACR,KAAKZ,EAAA0D,CAAA;IACL,SAAS1D,EAAA2D,CAAA;IACT,iBAAe3D,EAAA4D,CAAA;IACf,eAAa5D,EAAA6D,CAAA;IACb,eAAa7D,EAAA8D,CAAA;IACb,aAAWlD,EAAA;IACX,aAAW;IACX,SAAO"}
1
+ {"version":3,"file":"BotWidgetModal.js","names":["_openBlock","_createBlock","FModal","_withCtx","_createVNode","BotProvider","_unref","_sfc_main","FModal_default","useWidgetState","BotWidgetModal_default","defineComponent","__expose","props","__props","isVisible","ref","nextTick","openBlock","createBlock","_cache","$event","withCtx","createVNode","BotProvider_default","unref","currentBot","currentContext","currentFirstMessage","currentButtonText","currentButtonIcon"],"sources":["../widget/ui/BotWidgetModal.vue","../widget/ui/BotWidgetModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { PageLinesSDK } from '../../sdkClient'\nimport type { Bot } from '../../bot/schema'\nimport type { ButtonIconPreset } from '../PLWidget'\nimport { nextTick, onMounted, ref } from 'vue'\nimport FModal from '../../ui/FModal.vue'\nimport BotProvider from '../../bot/ui/BotProvider.vue'\nimport { useWidgetState } from '../composables/useWidgetState'\n\nconst props = defineProps<{\n sdk?: PageLinesSDK\n handle?: string\n bot?: Bot\n context?: string\n firstMessage?: string\n buttonText?: string\n buttonIcon?: ButtonIconPreset\n chatOnly?: boolean\n onClose?: () => void\n}>()\n\nconst { currentBot, currentContext, currentFirstMessage, currentButtonText, currentButtonIcon, update } = useWidgetState(props)\nconst isVisible = ref(false)\n\n// Trigger transition after mount\nonMounted(async () => {\n await nextTick()\n // Small delay to ensure DOM is ready and transition fires\n setTimeout(() => {\n isVisible.value = true\n }, 10)\n})\n\nfunction close() {\n isVisible.value = false\n // Wait for transition to complete before calling onClose\n setTimeout(() => {\n if (props.onClose) {\n props.onClose()\n }\n }, 300) // Match FModal transition duration\n}\n\nfunction open() {\n isVisible.value = true\n}\n\ndefineExpose({ update, close, open })\n</script>\n\n<template>\n <FModal\n :vis=\"isVisible\"\n :disable-teleport=\"true\"\n modal-class=\"max-w-4xl h-[80vh] md:h-[600px]\"\n :has-close=\"false\"\n @update:vis=\"isVisible = $event\"\n @close=\"close\"\n >\n <BotProvider\n :sdk=\"sdk\"\n :handle=\"handle\"\n :bot=\"currentBot\"\n :context=\"currentContext\"\n :first-message=\"currentFirstMessage\"\n :button-text=\"currentButtonText\"\n :button-icon=\"currentButtonIcon\"\n :chat-only=\"chatOnly\"\n :has-close=\"true\"\n @close=\"close\"\n />\n </FModal>\n</template>\n","<script setup lang=\"ts\">\nimport type { PageLinesSDK } from '../../sdkClient'\nimport type { Bot } from '../../bot/schema'\nimport type { ButtonIconPreset } from '../PLWidget'\nimport { nextTick, onMounted, ref } from 'vue'\nimport FModal from '../../ui/FModal.vue'\nimport BotProvider from '../../bot/ui/BotProvider.vue'\nimport { useWidgetState } from '../composables/useWidgetState'\n\nconst props = defineProps<{\n sdk?: PageLinesSDK\n handle?: string\n bot?: Bot\n context?: string\n firstMessage?: string\n buttonText?: string\n buttonIcon?: ButtonIconPreset\n chatOnly?: boolean\n onClose?: () => void\n}>()\n\nconst { currentBot, currentContext, currentFirstMessage, currentButtonText, currentButtonIcon, update } = useWidgetState(props)\nconst isVisible = ref(false)\n\n// Trigger transition after mount\nonMounted(async () => {\n await nextTick()\n // Small delay to ensure DOM is ready and transition fires\n setTimeout(() => {\n isVisible.value = true\n }, 10)\n})\n\nfunction close() {\n isVisible.value = false\n // Wait for transition to complete before calling onClose\n setTimeout(() => {\n if (props.onClose) {\n props.onClose()\n }\n }, 300) // Match FModal transition duration\n}\n\nfunction open() {\n isVisible.value = true\n}\n\ndefineExpose({ update, close, open })\n</script>\n\n<template>\n <FModal\n :vis=\"isVisible\"\n :disable-teleport=\"true\"\n modal-class=\"max-w-4xl h-[80vh] md:h-[600px]\"\n :has-close=\"false\"\n @update:vis=\"isVisible = $event\"\n @close=\"close\"\n >\n <BotProvider\n :sdk=\"sdk\"\n :handle=\"handle\"\n :bot=\"currentBot\"\n :context=\"currentContext\"\n :first-message=\"currentFirstMessage\"\n :button-text=\"currentButtonText\"\n :button-icon=\"currentButtonIcon\"\n :chat-only=\"chatOnly\"\n :has-close=\"true\"\n @close=\"close\"\n />\n </FModal>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EASA,IAAMa,IAAQC,GAYR,EAAE,eAAY,mBAAgB,wBAAqB,sBAAmB,sBAAmB,cAAWL,EAAeI,CAAK,GACxHE,IAAYC,EAAI,EAAK;EAG3B,EAAU,YAAY;GAGpB,AAFA,MAAMC,EAAS,GAEf,iBAAiB;IACf,EAAU,QAAQ;GACpB,GAAG,EAAE;EACP,CAAC;EAED,SAAS,QAAQ;GAGf,AAFA,EAAU,QAAQ,IAElB,iBAAiB;IACf,AAAIJ,EAAM,WACRA,EAAM,QAAQ;GAElB,GAAG,GAAG;EACR;EAEA,SAAS,OAAO;GACd,EAAU,QAAQ;EACpB;E,OAEAD,EAAa;GAAE;GAAQ;GAAO;EAAK,CAAC,I,UAIlCZ,EAAA,GAAAC,EAoBSC,GAAA;GAnBN,KAAKa,EAAA;GACL,oBAAkB;GACnB,eAAY;GACX,aAAW;GACX,gBAAUK,EAAA,OAAA,EAAA,MAAA,MAAE,EAAA,QAAYC;GACxB,SAAO;;GAER,SAAAlB,QAWE,CAXFC,EAWEC,GAAA;IAVC,KAAKS,EAAA;IACL,QAAQA,EAAA;IACR,KAAKR,EAAAoB,CAAA;IACL,SAASpB,EAAAqB,CAAA;IACT,iBAAerB,EAAAsB,CAAA;IACf,eAAatB,EAAAuB,CAAA;IACb,eAAavB,EAAAwB,CAAA;IACb,aAAWhB,EAAA;IACX,aAAW;IACX,SAAO"}