@8wave/ai-elements 0.114.0-beta.28 → 0.114.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/dist/_chunks/Agent-DTLrWpzX.js +460 -0
  2. package/dist/_chunks/Agent-DTLrWpzX.js.map +1 -0
  3. package/dist/_chunks/Media-Cft7Pwrh.js +108 -0
  4. package/dist/_chunks/Media-Cft7Pwrh.js.map +1 -0
  5. package/dist/_chunks/{PkStreamingMarkdown-ZD0SROu1.js → PkStreamingMarkdown-C1sANAr5.js} +672 -688
  6. package/dist/_chunks/PkStreamingMarkdown-C1sANAr5.js.map +1 -0
  7. package/dist/_chunks/{PkToolRequestGeolocation-OF1PWhMw.js → PkToolRequestGeolocation-BbxYKt-9.js} +2 -2
  8. package/{dist-vue/_chunks/PkToolRequestGeolocation-BOVbaCzQ.js.map → dist/_chunks/PkToolRequestGeolocation-BbxYKt-9.js.map} +1 -1
  9. package/dist/_chunks/{PkToolRequestOAuthConnection-ChGMAKV7.js → PkToolRequestOAuthConnection-CTp2w60F.js} +2 -2
  10. package/dist/_chunks/{PkToolRequestOAuthConnection-ChGMAKV7.js.map → PkToolRequestOAuthConnection-CTp2w60F.js.map} +1 -1
  11. package/dist/_chunks/{PkToolShowArtifact-LEfO5zfg.js → PkToolShowArtifact-BfTjxGOT.js} +2 -2
  12. package/dist/_chunks/{PkToolShowArtifact-LEfO5zfg.js.map → PkToolShowArtifact-BfTjxGOT.js.map} +1 -1
  13. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js +60 -0
  14. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js.map +1 -0
  15. package/dist/_chunks/{PkToolShowContactForm-BO3JQfts.js → PkToolShowContactForm-PFpY9dIp.js} +2 -2
  16. package/dist/_chunks/{PkToolShowContactForm-BO3JQfts.js.map → PkToolShowContactForm-PFpY9dIp.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowForm-KW8MOL-j.js → PkToolShowForm-CMtSN0oX.js} +5 -5
  18. package/dist/_chunks/{PkToolShowForm-KW8MOL-j.js.map → PkToolShowForm-CMtSN0oX.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowSources-Sc1W6WHe.js → PkToolShowSources-C6cu66Ts.js} +3 -3
  20. package/dist/_chunks/{PkToolShowSources-Sc1W6WHe.js.map → PkToolShowSources-C6cu66Ts.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowSuggestedReply-Dl4x_nEJ.js → PkToolShowSuggestedReply-CFO8wV1b.js} +2 -2
  22. package/dist/_chunks/{PkToolShowSuggestedReply-Dl4x_nEJ.js.map → PkToolShowSuggestedReply-CFO8wV1b.js.map} +1 -1
  23. package/dist/_chunks/{markdown-BrvkrEUr.js → markdown-BRD-hDrH.js} +10 -10
  24. package/dist/_chunks/{markdown-BrvkrEUr.js.map → markdown-BRD-hDrH.js.map} +1 -1
  25. package/dist/ai-elements.es.js +2753 -3001
  26. package/dist/ai-elements.es.js.map +1 -1
  27. package/dist-vue/PkChatbot.js +1 -1
  28. package/dist-vue/PkChatbotAuth.js +1 -1
  29. package/dist-vue/PkChatbotEmptyState.js +1 -1
  30. package/dist-vue/PkChatbotInput.js +1 -1
  31. package/dist-vue/PkChatbotMessages.js +1 -1
  32. package/dist-vue/PkChatbotStepPayload.js +1 -1
  33. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  34. package/dist-vue/PkChatbotSteps.js +1 -1
  35. package/dist-vue/PkChatbotViewChat.js +1 -1
  36. package/dist-vue/PkChatbotViewConversations.js +1 -1
  37. package/dist-vue/PkChatbotViewFiles.js +1 -1
  38. package/dist-vue/PkChatbotViewProfile.js +1 -1
  39. package/dist-vue/_chunks/{Agent-tbKw8Mdt.js → Agent-BNlmK-uJ.js} +2 -2
  40. package/dist-vue/_chunks/{Agent-tbKw8Mdt.js.map → Agent-BNlmK-uJ.js.map} +1 -1
  41. package/dist-vue/_chunks/{Document-p2Y_4gk8.js → Document-2X01-F4Z.js} +9 -9
  42. package/dist-vue/_chunks/{Document-p2Y_4gk8.js.map → Document-2X01-F4Z.js.map} +1 -1
  43. package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
  44. package/dist-vue/_chunks/{PkChatbot-Dn_6yrFw.js → PkChatbot-HRayDr2d.js} +8 -8
  45. package/dist-vue/_chunks/{PkChatbot-Dn_6yrFw.js.map → PkChatbot-HRayDr2d.js.map} +1 -1
  46. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js +349 -0
  47. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js.map +1 -0
  48. package/dist-vue/_chunks/{PkChatbotEmptyState-9mWiPd4B.js → PkChatbotEmptyState-CPOcfoRC.js} +2 -2
  49. package/dist-vue/_chunks/{PkChatbotEmptyState-9mWiPd4B.js.map → PkChatbotEmptyState-CPOcfoRC.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkChatbotInput-BzaCyeFp.js → PkChatbotInput-pLJQIu7v.js} +2 -2
  51. package/dist-vue/_chunks/{PkChatbotInput-BzaCyeFp.js.map → PkChatbotInput-pLJQIu7v.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkChatbotMessages-Yaf_5xJV.js → PkChatbotMessages-GZStJbx_.js} +256 -258
  53. package/dist-vue/_chunks/PkChatbotMessages-GZStJbx_.js.map +1 -0
  54. package/dist-vue/_chunks/{PkChatbotStepPayload-C36nXLW7.js → PkChatbotStepPayload-DU0W-eUp.js} +2 -2
  55. package/dist-vue/_chunks/{PkChatbotStepPayload-C36nXLW7.js.map → PkChatbotStepPayload-DU0W-eUp.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkChatbotStepToolDetail-CBX-AQXv.js → PkChatbotStepToolDetail-etlBryOg.js} +3 -3
  57. package/dist-vue/_chunks/{PkChatbotStepToolDetail-CBX-AQXv.js.map → PkChatbotStepToolDetail-etlBryOg.js.map} +1 -1
  58. package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js +190 -0
  59. package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js.map +1 -0
  60. package/dist-vue/_chunks/{PkChatbotViewChat-DFYw4nzP.js → PkChatbotViewChat-DIfBWFoG.js} +7 -7
  61. package/dist-vue/_chunks/{PkChatbotViewChat-DFYw4nzP.js.map → PkChatbotViewChat-DIfBWFoG.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js → PkChatbotViewConversations-BCdolW0R.js} +2 -2
  63. package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js.map → PkChatbotViewConversations-BCdolW0R.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotViewFiles-BBBO5hyd.js → PkChatbotViewFiles-Cudao8ew.js} +3 -3
  65. package/dist-vue/_chunks/{PkChatbotViewFiles-BBBO5hyd.js.map → PkChatbotViewFiles-Cudao8ew.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js → PkChatbotViewProfile-DDsKOkcC.js} +2 -2
  67. package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js.map → PkChatbotViewProfile-DDsKOkcC.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkStreamingMarkdown-BN7waklD.js → PkStreamingMarkdown-BloMJaIW.js} +205 -214
  69. package/dist-vue/_chunks/{PkStreamingMarkdown-BN7waklD.js.map → PkStreamingMarkdown-BloMJaIW.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkToolRequestGeolocation-BOVbaCzQ.js → PkToolRequestGeolocation-9vfYNaQo.js} +2 -2
  71. package/{dist/_chunks/PkToolRequestGeolocation-OF1PWhMw.js.map → dist-vue/_chunks/PkToolRequestGeolocation-9vfYNaQo.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DMvCGPuX.js → PkToolRequestOAuthConnection-BorR5NmZ.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DMvCGPuX.js.map → PkToolRequestOAuthConnection-BorR5NmZ.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkToolShowArtifact-DrE_mK1z.js → PkToolShowArtifact-BuMY7GNj.js} +2 -2
  75. package/dist-vue/_chunks/{PkToolShowArtifact-DrE_mK1z.js.map → PkToolShowArtifact-BuMY7GNj.js.map} +1 -1
  76. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js +61 -0
  77. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js.map +1 -0
  78. package/dist-vue/_chunks/{PkToolShowContactForm-BBTbrgt4.js → PkToolShowContactForm-0OQRqT8m.js} +2 -2
  79. package/dist-vue/_chunks/{PkToolShowContactForm-BBTbrgt4.js.map → PkToolShowContactForm-0OQRqT8m.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowDiagram-WyUnnDUn.js → PkToolShowDiagram-BGL27iHG.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowDiagram-WyUnnDUn.js.map → PkToolShowDiagram-BGL27iHG.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowEmail-C30K5kJA.js → PkToolShowEmail-BJJpS69F.js} +2 -2
  83. package/dist-vue/_chunks/{PkToolShowEmail-C30K5kJA.js.map → PkToolShowEmail-BJJpS69F.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolShowForm-C9N_SSm8.js → PkToolShowForm-DDcPpOZ8.js} +4 -4
  85. package/dist-vue/_chunks/{PkToolShowForm-C9N_SSm8.js.map → PkToolShowForm-DDcPpOZ8.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolShowMessage-DvkCRERv.js → PkToolShowMessage-BFGynf3p.js} +2 -2
  87. package/dist-vue/_chunks/{PkToolShowMessage-DvkCRERv.js.map → PkToolShowMessage-BFGynf3p.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolShowProductList-cfjg3CmV.js → PkToolShowProductList-6t1Ir5CW.js} +2 -2
  89. package/dist-vue/_chunks/{PkToolShowProductList-cfjg3CmV.js.map → PkToolShowProductList-6t1Ir5CW.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowSources-BItTltB5.js → PkToolShowSources-cOF0ZxOj.js} +4 -4
  91. package/dist-vue/_chunks/{PkToolShowSources-BItTltB5.js.map → PkToolShowSources-cOF0ZxOj.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowSuggestedReply-qAWdCUhr.js → PkToolShowSuggestedReply-DA4NEjHB.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowSuggestedReply-qAWdCUhr.js.map → PkToolShowSuggestedReply-DA4NEjHB.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkToolShowWebPages-CkQ2NhRj.js → PkToolShowWebPages-OgaT1vYJ.js} +2 -2
  95. package/dist-vue/_chunks/{PkToolShowWebPages-CkQ2NhRj.js.map → PkToolShowWebPages-OgaT1vYJ.js.map} +1 -1
  96. package/dist-vue/_chunks/{PkUrl-BsD4Vby6.js → PkUrl-Cd69XP5z.js} +2 -2
  97. package/dist-vue/_chunks/{PkUrl-BsD4Vby6.js.map → PkUrl-Cd69XP5z.js.map} +1 -1
  98. package/dist-vue/_chunks/{createChatbotApiClient-BlWs282E.js → createChatbotApiClient-CaVLm5W9.js} +168 -137
  99. package/dist-vue/_chunks/createChatbotApiClient-CaVLm5W9.js.map +1 -0
  100. package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js → useChatbotStore-BwrBZJCq.js} +3 -3
  101. package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js.map → useChatbotStore-BwrBZJCq.js.map} +1 -1
  102. package/dist-vue/_chunks/utils-h4C7rRcu.js +177 -0
  103. package/dist-vue/_chunks/utils-h4C7rRcu.js.map +1 -0
  104. package/dist-vue/api.js +1 -1
  105. package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
  106. package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +8 -54
  107. package/dist-vue/apps/web-component/src/composables/useChatbotAuthForm.d.ts +0 -14
  108. package/dist-vue/composables.js +98 -402
  109. package/dist-vue/composables.js.map +1 -1
  110. package/dist-vue/index.js +3235 -3357
  111. package/dist-vue/index.js.map +1 -1
  112. package/dist-vue/locales.js +0 -42
  113. package/dist-vue/packages/ability/src/index.d.ts +14 -10
  114. package/dist-vue/packages/auth/src/social-redirect-plugin.d.ts +12 -18
  115. package/dist-vue/packages/components/src/chat/PkChatbotAuth.d.ts +0 -19
  116. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +4 -8
  117. package/dist-vue/packages/components/src/chat/PkChatbotSteps.d.ts +0 -1
  118. package/dist-vue/packages/components/src/chat/utils.d.ts +0 -9
  119. package/dist-vue/packages/components/src/index.d.ts +1 -2
  120. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +0 -60
  121. package/dist-vue/packages/models/src/schema/Chat.d.ts +0 -42
  122. package/dist-vue/packages/models/src/schema/Media.d.ts +1 -0
  123. package/dist-vue/packages/models/src/schema/Member.d.ts +0 -3
  124. package/dist-vue/packages/models/src/schema/Notification.d.ts +0 -2
  125. package/dist-vue/packages/models/src/schema/Organization.d.ts +0 -1
  126. package/dist-vue/packages/models/src/schema/User.d.ts +0 -1
  127. package/dist-vue/style.css +1 -1
  128. package/package.json +1 -1
  129. package/dist/_chunks/Agent-DK76k05_.js +0 -566
  130. package/dist/_chunks/Agent-DK76k05_.js.map +0 -1
  131. package/dist/_chunks/PkStreamingMarkdown-ZD0SROu1.js.map +0 -1
  132. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js +0 -72
  133. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js.map +0 -1
  134. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js +0 -421
  135. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js.map +0 -1
  136. package/dist-vue/_chunks/PkChatbotMessages-Yaf_5xJV.js.map +0 -1
  137. package/dist-vue/_chunks/PkChatbotSteps-356rnZG5.js +0 -191
  138. package/dist-vue/_chunks/PkChatbotSteps-356rnZG5.js.map +0 -1
  139. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js +0 -72
  140. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +0 -1
  141. package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +0 -1
  142. package/dist-vue/_chunks/utils--8iNpBr_.js +0 -184
  143. package/dist-vue/_chunks/utils--8iNpBr_.js.map +0 -1
  144. package/dist-vue/packages/auth/src/additional-fields.d.ts +0 -48
  145. package/dist-vue/packages/auth/src/passkey-policy-client-plugin.d.ts +0 -31
  146. package/dist-vue/packages/auth/src/passkey-policy-plugin.d.ts +0 -22
  147. package/dist-vue/packages/auth/src/two-factor-policy-client-plugin.d.ts +0 -60
  148. package/dist-vue/packages/auth/src/two-factor-policy-plugin.d.ts +0 -65
  149. package/dist-vue/packages/components/src/PkQrCode.d.ts +0 -14
  150. package/dist-vue/packages/components/src/chat/PkTurnEvaluation.d.ts +0 -8
@@ -1,72 +0,0 @@
1
- import { $ as e, C as t, L as n, O as r, St as i, Tt as a, _ as o, b as s, bt as c, d as l, h as u, it as d, m as f, v as p, x as m, xt as h, z as g } from "./vue.runtime.esm-bundler-CIT_Sbqw.js";
2
- import { i as _ } from "./dist-QdjZA6MJ.js";
3
- import { a as v, r as y, t as b } from "./index.es-C2U5wcOx.js";
4
- import { t as x } from "./_plugin-vue_export-helper-B3ysoDQm.js";
5
- r(), h(), d();
6
- var S = {
7
- key: 0,
8
- class: "pk-tool-comparison border border-surface-3 rounded-xl w-full overflow-hidden"
9
- }, C = { class: "px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8" }, w = { class: "font-bold" }, T = { class: "u-table-scroll" }, E = {
10
- class: "u-table u-table--stack",
11
- role: "table"
12
- }, D = { role: "rowgroup" }, O = { role: "row" }, k = {
13
- key: 0,
14
- class: "pk-tool-comparison__recommended"
15
- }, A = { role: "rowgroup" }, j = {
16
- role: "rowheader",
17
- scope: "row",
18
- class: "pk-tool-comparison__feature"
19
- }, M = ["data-label"], N = /*#__PURE__*/ x(/* @__PURE__ */ t({
20
- __name: "PkToolShowComparison",
21
- props: { part: { type: null } },
22
- setup(t) {
23
- let r = t, { copy: d, copied: h } = _(), x = f(() => r.part), N = f(() => {
24
- let e = x.value.input?.items;
25
- return !e || e.length === 0 ? [] : Object.keys(e[0].values);
26
- }), P = (e) => e === "✓" ? "text-success" : e === "✗" ? "text-danger" : "text-word-2", F = () => {
27
- let e = x.value.input?.items;
28
- if (!e) return;
29
- let t = ["", ...e.map((e) => e.name)].join(" "), n = N.value.map((t) => [t.replace(/_/g, " "), ...e.map((e) => e.values[t] ?? "")].join(" "));
30
- d([t, ...n].join("\n"));
31
- };
32
- return (t, r) => {
33
- let d = b, f = y, _ = v;
34
- return x.value?.input?.items?.length ? (n(), p("div", S, [u("div", C, [
35
- m(d, {
36
- name: "ri:scales-line",
37
- class: "text-16"
38
- }),
39
- u("strong", w, a(x.value.input.title ?? t.$t("label.comparison")), 1),
40
- m(_, {
41
- modifiers: "compact",
42
- class: "ml-auto shrink-0"
43
- }, {
44
- default: e(() => [m(f, {
45
- modifiers: "action-quiet-small",
46
- icon: c(h) ? "ri:check-line" : "ri:file-copy-line",
47
- label: c(h) ? t.$t("action.copied") : t.$t("action.copy"),
48
- onClick: F
49
- }, null, 8, ["icon", "label"])]),
50
- _: 1
51
- })
52
- ]), u("div", T, [u("table", E, [u("thead", D, [u("tr", O, [r[0] ||= u("td", null, null, -1), (n(!0), p(l, null, g(x.value.input.items, (e) => (n(), p("th", {
53
- key: e.name,
54
- role: "columnheader",
55
- scope: "col",
56
- class: i(["pk-tool-comparison__item", { "pk-tool-comparison__cell--highlighted": e.highlighted }])
57
- }, [s(a(e.name) + " ", 1), e.highlighted ? (n(), p("small", k, a(t.$t("label.recommended")), 1)) : o("", !0)], 2))), 128))])]), u("tbody", A, [(n(!0), p(l, null, g(N.value, (e) => (n(), p("tr", {
58
- key: e,
59
- role: "row"
60
- }, [u("th", j, a(e.replace(/_/g, " ")), 1), (n(!0), p(l, null, g(x.value.input.items, (t) => (n(), p("td", {
61
- key: t.name,
62
- role: "cell",
63
- "data-label": t.name,
64
- class: i([P(t.values[e]), { "pk-tool-comparison__cell--highlighted": t.highlighted }])
65
- }, a(t.values[e] ?? "-"), 11, M))), 128))]))), 128))])])])])) : o("", !0);
66
- };
67
- }
68
- }), [["styles", [".pk-tool-comparison{--u-table-label-width:8rem}.pk-tool-comparison .pk-tool-comparison__item{font-size:var(--text-14);color:var(--color-word-1)}.pk-tool-comparison .pk-tool-comparison__feature{font-weight:var(--font-medium);color:var(--color-word-3)}.pk-tool-comparison .pk-tool-comparison__cell--highlighted{background-color:var(--color-surface-1)}.pk-tool-comparison__recommended{font-size:var(--text-12);font-weight:var(--font-normal);color:var(--color-word-3);display:block}@container (width<30rem){.pk-tool-comparison .pk-tool-comparison__cell--highlighted{background-color:#0000}.pk-tool-comparison .pk-tool-comparison__cell--highlighted:before{font-weight:var(--font-semibold);color:var(--color-word-1)}}"]]]);
69
- //#endregion
70
- export { N as default };
71
-
72
- //# sourceMappingURL=PkToolShowComparison-8d6fAhRp.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PkToolShowComparison-8d6fAhRp.js","names":["$t"],"sources":["../../../../packages/components/src/chat/PkToolShowComparison.vue","../../../../packages/components/src/chat/PkToolShowComparison.vue","../../../../packages/components/src/chat/PkToolShowComparison.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n // The tool contract asks for \"✓\" and \"✗\" on boolean features: the pair is\n // a verdict, so it wears one and the table reads by eye (DESIGN.md).\n const valueColorClass = (value?: string) => {\n if (value === '✓') {\n return 'text-success'\n }\n if (value === '✗') {\n return 'text-danger'\n }\n return 'text-word-2'\n }\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"pk-tool-comparison border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\n }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <!-- One row per feature, one column per item. In a narrow message\n each feature becomes a block that lists every item beside its\n value (`u-table--stack`), so a comparison still reads across. -->\n <div class=\"u-table-scroll\">\n <table class=\"u-table u-table--stack\" role=\"table\">\n <thead role=\"rowgroup\">\n <tr role=\"row\">\n <td></td>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n role=\"columnheader\"\n scope=\"col\"\n class=\"pk-tool-comparison__item\"\n :class=\"{\n 'pk-tool-comparison__cell--highlighted':\n item.highlighted,\n }\">\n {{ item.name }}\n <small\n v-if=\"item.highlighted\"\n class=\"pk-tool-comparison__recommended\">\n {{ $t('label.recommended') }}\n </small>\n </th>\n </tr>\n </thead>\n <tbody role=\"rowgroup\">\n <tr v-for=\"feature in features\" :key=\"feature\" role=\"row\">\n <th\n role=\"rowheader\"\n scope=\"row\"\n class=\"pk-tool-comparison__feature\">\n {{ feature.replace(/_/g, ' ') }}\n </th>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n role=\"cell\"\n :data-label=\"item.name\"\n :class=\"[\n valueColorClass(item.values[feature]),\n {\n 'pk-tool-comparison__cell--highlighted':\n item.highlighted,\n },\n ]\">\n {{ item.values[feature] ?? '-' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n // Written under the block so it outweighs the `.u-table` rules.\n .pk-tool-comparison {\n // Stacked, the labels are the names of the items, longer than the\n // headings of a data table.\n --u-table-label-width: 8rem;\n\n // The items are what the table compares: their names are the titles\n // of the columns, not the small headings of a data table.\n & &__item {\n font-size: var(--text-14);\n color: var(--color-word-1);\n }\n\n & &__feature {\n font-weight: var(--font-medium);\n color: var(--color-word-3);\n }\n\n // The recommended item: a ground down its column and a word under its\n // name, no accent colour (DESIGN.md). Stacked, its name weighs more\n // than the others beside its value.\n & &__cell--highlighted {\n background-color: var(--color-surface-1);\n }\n\n &__recommended {\n display: block;\n font-size: var(--text-12);\n font-weight: var(--font-normal);\n color: var(--color-word-3);\n }\n\n @container (width < 30rem) {\n & &__cell--highlighted {\n background-color: transparent;\n\n &::before {\n font-weight: var(--font-semibold);\n color: var(--color-word-1);\n }\n }\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n // The tool contract asks for \"✓\" and \"✗\" on boolean features: the pair is\n // a verdict, so it wears one and the table reads by eye (DESIGN.md).\n const valueColorClass = (value?: string) => {\n if (value === '✓') {\n return 'text-success'\n }\n if (value === '✗') {\n return 'text-danger'\n }\n return 'text-word-2'\n }\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"pk-tool-comparison border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\n }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <!-- One row per feature, one column per item. In a narrow message\n each feature becomes a block that lists every item beside its\n value (`u-table--stack`), so a comparison still reads across. -->\n <div class=\"u-table-scroll\">\n <table class=\"u-table u-table--stack\" role=\"table\">\n <thead role=\"rowgroup\">\n <tr role=\"row\">\n <td></td>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n role=\"columnheader\"\n scope=\"col\"\n class=\"pk-tool-comparison__item\"\n :class=\"{\n 'pk-tool-comparison__cell--highlighted':\n item.highlighted,\n }\">\n {{ item.name }}\n <small\n v-if=\"item.highlighted\"\n class=\"pk-tool-comparison__recommended\">\n {{ $t('label.recommended') }}\n </small>\n </th>\n </tr>\n </thead>\n <tbody role=\"rowgroup\">\n <tr v-for=\"feature in features\" :key=\"feature\" role=\"row\">\n <th\n role=\"rowheader\"\n scope=\"row\"\n class=\"pk-tool-comparison__feature\">\n {{ feature.replace(/_/g, ' ') }}\n </th>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n role=\"cell\"\n :data-label=\"item.name\"\n :class=\"[\n valueColorClass(item.values[feature]),\n {\n 'pk-tool-comparison__cell--highlighted':\n item.highlighted,\n },\n ]\">\n {{ item.values[feature] ?? '-' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n // Written under the block so it outweighs the `.u-table` rules.\n .pk-tool-comparison {\n // Stacked, the labels are the names of the items, longer than the\n // headings of a data table.\n --u-table-label-width: 8rem;\n\n // The items are what the table compares: their names are the titles\n // of the columns, not the small headings of a data table.\n & &__item {\n font-size: var(--text-14);\n color: var(--color-word-1);\n }\n\n & &__feature {\n font-weight: var(--font-medium);\n color: var(--color-word-3);\n }\n\n // The recommended item: a ground down its column and a word under its\n // name, no accent colour (DESIGN.md). Stacked, its name weighs more\n // than the others beside its value.\n & &__cell--highlighted {\n background-color: var(--color-surface-1);\n }\n\n &__recommended {\n display: block;\n font-size: var(--text-12);\n font-weight: var(--font-normal);\n color: var(--color-word-3);\n }\n\n @container (width < 30rem) {\n & &__cell--highlighted {\n background-color: transparent;\n\n &::before {\n font-weight: var(--font-semibold);\n color: var(--color-word-1);\n }\n }\n }\n }\n</style>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { useClipboard } from '@vueuse/core'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n const { copy, copied } = useClipboard()\n\n const toolPart = computed(() => {\n const part = props.part as {\n input?: {\n title?: string\n items: Array<{\n name: string\n values: Record<string, string>\n highlighted?: boolean\n }>\n }\n }\n return part\n })\n\n const features = computed(() => {\n const items = toolPart.value.input?.items\n if (!items || items.length === 0) {\n return []\n }\n return Object.keys(items[0].values)\n })\n\n // The tool contract asks for \"✓\" and \"✗\" on boolean features: the pair is\n // a verdict, so it wears one and the table reads by eye (DESIGN.md).\n const valueColorClass = (value?: string) => {\n if (value === '✓') {\n return 'text-success'\n }\n if (value === '✗') {\n return 'text-danger'\n }\n return 'text-word-2'\n }\n\n const copyTable = () => {\n const items = toolPart.value.input?.items\n if (!items) {\n return\n }\n const header = ['', ...items.map((i) => i.name)].join('\\t')\n const rows = features.value.map((f) =>\n [f.replace(/_/g, ' '), ...items.map((i) => i.values[f] ?? '')].join(\n '\\t',\n ),\n )\n copy([header, ...rows].join('\\n'))\n }\n</script>\n\n<template>\n <div\n v-if=\"toolPart?.input?.items?.length\"\n class=\"pk-tool-comparison border border-surface-3 rounded-xl w-full overflow-hidden\">\n <div\n class=\"px-sm py-6 bg-surface-1 min-h-40 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8\">\n <VvIcon name=\"ri:scales-line\" class=\"text-16\" />\n <strong class=\"font-bold\">{{\n toolPart.input.title ?? $t('label.comparison')\n }}</strong>\n <VvButtonGroup modifiers=\"compact\" class=\"ml-auto shrink-0\">\n <VvButton\n modifiers=\"action-quiet-small\"\n :icon=\"copied ? 'ri:check-line' : 'ri:file-copy-line'\"\n :label=\"copied ? $t('action.copied') : $t('action.copy')\"\n @click=\"copyTable\" />\n </VvButtonGroup>\n </div>\n <!-- One row per feature, one column per item. In a narrow message\n each feature becomes a block that lists every item beside its\n value (`u-table--stack`), so a comparison still reads across. -->\n <div class=\"u-table-scroll\">\n <table class=\"u-table u-table--stack\" role=\"table\">\n <thead role=\"rowgroup\">\n <tr role=\"row\">\n <td></td>\n <th\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n role=\"columnheader\"\n scope=\"col\"\n class=\"pk-tool-comparison__item\"\n :class=\"{\n 'pk-tool-comparison__cell--highlighted':\n item.highlighted,\n }\">\n {{ item.name }}\n <small\n v-if=\"item.highlighted\"\n class=\"pk-tool-comparison__recommended\">\n {{ $t('label.recommended') }}\n </small>\n </th>\n </tr>\n </thead>\n <tbody role=\"rowgroup\">\n <tr v-for=\"feature in features\" :key=\"feature\" role=\"row\">\n <th\n role=\"rowheader\"\n scope=\"row\"\n class=\"pk-tool-comparison__feature\">\n {{ feature.replace(/_/g, ' ') }}\n </th>\n <td\n v-for=\"item in toolPart.input.items\"\n :key=\"item.name\"\n role=\"cell\"\n :data-label=\"item.name\"\n :class=\"[\n valueColorClass(item.values[feature]),\n {\n 'pk-tool-comparison__cell--highlighted':\n item.highlighted,\n },\n ]\">\n {{ item.values[feature] ?? '-' }}\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</template>\n\n<style lang=\"scss\">\n // Written under the block so it outweighs the `.u-table` rules.\n .pk-tool-comparison {\n // Stacked, the labels are the names of the items, longer than the\n // headings of a data table.\n --u-table-label-width: 8rem;\n\n // The items are what the table compares: their names are the titles\n // of the columns, not the small headings of a data table.\n & &__item {\n font-size: var(--text-14);\n color: var(--color-word-1);\n }\n\n & &__feature {\n font-weight: var(--font-medium);\n color: var(--color-word-3);\n }\n\n // The recommended item: a ground down its column and a word under its\n // name, no accent colour (DESIGN.md). Stacked, its name weighs more\n // than the others beside its value.\n & &__cell--highlighted {\n background-color: var(--color-surface-1);\n }\n\n &__recommended {\n display: block;\n font-size: var(--text-12);\n font-weight: var(--font-normal);\n color: var(--color-word-3);\n }\n\n @container (width < 30rem) {\n & &__cell--highlighted {\n background-color: transparent;\n\n &::before {\n font-weight: var(--font-semibold);\n color: var(--color-word-1);\n }\n }\n }\n }\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;EAII,IAAM,IAAQ,GAIR,EAAE,SAAM,cAAW,EAAa,GAEhC,IAAW,QACA,EAAM,IAWtB,GAEK,IAAW,QAAe;GAC5B,IAAM,IAAQ,EAAS,MAAM,OAAO;GAIpC,OAHI,CAAC,KAAS,EAAM,WAAW,IACpB,CAAC,IAEL,OAAO,KAAK,EAAM,EAAE,CAAC,MAAM;EACtC,CAAC,GAIK,KAAmB,MACjB,MAAU,MACH,iBAEP,MAAU,MACH,gBAEJ,eAGL,UAAkB;GACpB,IAAM,IAAQ,EAAS,MAAM,OAAO;GACpC,IAAI,CAAC,GACD;GAEJ,IAAM,IAAS,CAAC,IAAI,GAAG,EAAM,KAAK,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,GAAI,GACpD,IAAO,EAAS,MAAM,KAAK,MAC7B,CAAC,EAAE,QAAQ,MAAM,GAAG,GAAG,GAAG,EAAM,KAAK,MAAM,EAAE,OAAO,MAAM,EAAE,CAAC,CAAC,CAAC,KAC3D,GACJ,CACJ;GACA,EAAK,CAAC,GAAQ,GAAG,CAAI,CAAC,CAAC,KAAK,IAAI,CAAC;EACrC;;;GAKU,OAAA,EAAA,OAAU,OAAO,OAAO,UADlC,EAAA,GAAA,EAsEM,OAtEN,GAsEM,CAnEF,EAaM,OAbN,GAaM;IAXF,EAAgD,GAAA;KAAxC,MAAK;KAAiB,OAAM;;IACpC,EAEW,UAFX,GAEW,EADP,EAAA,MAAS,MAAM,SAASA,EAAAA,GAAE,kBAAA,CAAA,GAAA,CAAA;IAE9B,EAMgB,GAAA;KAND,WAAU;KAAU,OAAM;;KACrC,SAAA,QAIyB,CAJzB,EAIyB,GAAA;MAHrB,WAAU;MACT,MAAM,EAAA,CAAA,IAAM,kBAAA;MACZ,OAAO,EAAA,CAAA,IAASA,EAAAA,GAAE,eAAA,IAAoBA,EAAAA,GAAE,aAAA;MACxC,SAAO;;;;GAMpB,CAAA,GAAA,EAiDM,OAjDN,GAiDM,CAhDF,EA+CQ,SA/CR,GA+CQ,CA9CJ,EAqBQ,SArBR,GAqBQ,CApBJ,EAmBK,MAnBL,GAmBK,CAlBD,AAAA,EAAA,OAAA,EAAS,MAAA,MAAA,MAAA,EAAA,IACT,EAAA,EAAA,GAAA,EAgBK,GAAA,MAAA,EAfc,EAAA,MAAS,MAAM,QAAvB,OADX,EAAA,GAAA,EAgBK,MAAA;IAdA,KAAK,EAAK;IACX,MAAK;IACL,OAAM;IACN,OAAK,EAAA,CAAC,4BAA0B,EAAA,yCACuF,EAAK,YAAA,CAAA,CAAA;GAIzH,GAAA,CAAA,EAAA,EAAA,EAAK,IAAI,IAAG,KACf,CAAA,GACU,EAAK,eADf,EAAA,GAAA,EAIQ,SAJR,GAIQ,EADDA,EAAAA,GAAE,mBAAA,CAAA,GAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,GAAA,CAAA,EAKrB,GAAA,GAAA,EAAA,CAAA,CAAA,CAAA,GAAA,EAuBQ,SAvBR,GAuBQ,EAtBJ,EAAA,EAAA,GAAA,EAqBK,GAAA,MAAA,EArBiB,EAAA,QAAX,OAAX,EAAA,GAAA,EAqBK,MAAA;IArB4B,KAAK;IAAS,MAAK;GAChD,GAAA,CAAA,EAKK,MALL,GAKK,EADE,EAAQ,QAAO,MAAA,GAAA,CAAA,GAAA,CAAA,IAEtB,EAAA,EAAA,GAAA,EAaK,GAAA,MAAA,EAZc,EAAA,MAAS,MAAM,QAAvB,OADX,EAAA,GAAA,EAaK,MAAA;IAXA,KAAK,EAAK;IACX,MAAK;IACJ,cAAY,EAAK;IACjB,OAAK,EAAA,CAAoC,EAAgB,EAAK,OAAO,EAAO,GAAA,EAAA,yCAA2J,EAAK,YAAA,CAAA,CAAA;GAO1O,GAAA,EAAA,EAAK,OAAO,MAAO,GAAA,GAAA,IAAA,CAAA"}
@@ -1,421 +0,0 @@
1
- import { _ as e, b as t, n, o as r, u as i } from "./schemas-DxbHVg3r.js";
2
- import { i as a, n as o } from "./Media-_HfFLHGD.js";
3
- import { t as s } from "./useImageFallback-5vQIO0pC.js";
4
- import { t as c } from "./index.es-D0EI_F6p.js";
5
- import { VvAlert as ee, VvButton as te, VvButtonGroup as ne, VvIcon as re } from "@volverjs/ui-vue/components";
6
- import { Fragment as l, Transition as ie, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, mergeModels as v, openBlock as y, ref as b, resolveDynamicComponent as ae, toDisplayString as x, unref as S, useModel as C, watch as w, withCtx as T } from "vue";
7
- import { useI18n as oe } from "vue-i18n";
8
- //#region ../../packages/models/src/schema/User.ts
9
- var E = n(["user", "admin"]), D = t().min(8).max(64);
10
- e({
11
- id: t(),
12
- name: t(),
13
- email: t(),
14
- emailVerified: r(),
15
- image: t().nullable(),
16
- media: o.optional().nullable(),
17
- createdAt: a(),
18
- updatedAt: a(),
19
- banned: r().nullable(),
20
- banReason: t().nullable(),
21
- banExpires: a().nullable(),
22
- isAnonymous: r().nullable(),
23
- role: E,
24
- twoFactorEnabled: r().optional()
25
- }), e({
26
- id: t(),
27
- name: t(),
28
- email: t().nullable(),
29
- image: t().nullable(),
30
- isAnonymous: r().nullable(),
31
- banned: r().nullable()
32
- });
33
- var O = e({
34
- password: D,
35
- passwordConfirmation: D
36
- }).refine((e) => e.password === e.passwordConfirmation, {
37
- params: { i18n: "errors.passwordsDoNotMatch" },
38
- path: ["passwordConfirmation"]
39
- });
40
- O.extend({ currentPassword: D }), O.extend({
41
- name: t().min(1),
42
- email: i(),
43
- media: o.optional(),
44
- role: E.optional().default("user")
45
- }), e({
46
- id: t(),
47
- name: t(),
48
- email: t(),
49
- emailVerified: r().optional(),
50
- image: t().nullish(),
51
- role: E,
52
- media: o.optional().nullable(),
53
- banned: r().nullish(),
54
- banReason: t().nullish(),
55
- banExpires: t().nullish(),
56
- isAnonymous: r().nullish()
57
- });
58
- var se = O.extend({
59
- name: t().min(1),
60
- email: i(),
61
- rememberMe: r().optional()
62
- }), ce = { class: "pk-chatbot-auth flex flex-col items-center justify-center w-full min-h-full p-lg overflow-y-auto" }, le = { class: "pk-chatbot-auth__flip w-full max-w-384 mx-auto my-auto" }, ue = { class: "pk-chatbot-auth__success-icon w-64 h-64 border border-surface-3 rounded-full bg-surface-0 flex items-center justify-center overflow-hidden bg-surface mx-auto mb-md" }, de = { class: "font-bold text-18 mb-xs" }, fe = { class: "mb-lg text-16 text-word-3" }, k = {
63
- key: "form",
64
- class: "pk-chatbot-auth__flip-card flex flex-col"
65
- }, A = { class: "flex flex-col" }, j = {
66
- key: 0,
67
- class: "flex justify-center mb-md"
68
- }, M = ["src", "alt"], N = { class: "text-center leading-normal mb-lg" }, P = {
69
- key: 0,
70
- class: "font-bold text-20 m-0"
71
- }, F = { class: "text-14 text-word-3 text-center leading-normal mb-md" }, I = { class: "flex justify-center mt-md" }, L = { class: "mb-md" }, R = { class: "mb-md" }, z = { class: "mb-md" }, B = { class: "hr mt-xs" }, V = { class: "pt-lg text-center text-word-3" }, H = /* @__PURE__ */ _({
72
- __name: "PkChatbotAuth",
73
- props: /*@__PURE__*/ v({
74
- branding: { default: void 0 },
75
- authMethods: { default: void 0 },
76
- loading: {
77
- type: Boolean,
78
- default: !1
79
- },
80
- twoFactorMethods: { default: void 0 }
81
- }, {
82
- errorMessage: { default: void 0 },
83
- errorMessageModifiers: {},
84
- success: { default: void 0 },
85
- successModifiers: {}
86
- }),
87
- emits: /*@__PURE__*/ v([
88
- "sign-in",
89
- "sign-up",
90
- "request-reset",
91
- "social",
92
- "verify-two-factor",
93
- "send-two-factor-code",
94
- "cancel-two-factor",
95
- "update:errorMessage",
96
- "update:success"
97
- ], ["update:errorMessage", "update:success"]),
98
- setup(n, { emit: a }) {
99
- let { t: o } = oe({ useScope: "global" }), _ = n, { canShowImage: v, onImageError: E } = s(), O = C(n, "errorMessage"), H = C(n, "success"), U = a, W = b("sign-in");
100
- w(W, () => {
101
- O.value = void 0, H.value = void 0;
102
- });
103
- function pe() {
104
- H.value = void 0, W.value = "sign-in";
105
- }
106
- let me = u(() => _.authMethods?.google || _.authMethods?.microsoft), G = e({
107
- email: i(),
108
- password: D,
109
- rememberMe: r().default(!1)
110
- }), he = e({ email: i() }), { VvForm: ge, VvFormField: K } = c(G, { lazyLoad: !0 }), { VvForm: _e, VvFormField: q, clear: ve } = c(se, { lazyLoad: !0 }), { VvForm: ye, VvFormField: be, clear: xe } = c(he, { lazyLoad: !0 });
111
- w(H, (e) => {
112
- e && (ve(), xe());
113
- });
114
- let J = b();
115
- function Se() {
116
- H.value && J.value?.focus();
117
- }
118
- function Ce(e) {
119
- U("sign-in", {
120
- email: e.email,
121
- password: e.password,
122
- rememberMe: e.rememberMe ?? !1
123
- });
124
- }
125
- function we(e) {
126
- U("sign-up", {
127
- name: e.name.trim(),
128
- email: e.email,
129
- password: e.password
130
- });
131
- }
132
- function Te(e) {
133
- U("request-reset", { email: e.email });
134
- }
135
- function Y(e) {
136
- U("social", e);
137
- }
138
- let X = u(() => !!_.twoFactorMethods?.length), Z = b("totp"), { VvForm: Ee, VvFormField: De, clear: Q } = c(e({ code: t().trim().min(6).max(32) }), { lazyLoad: !0 });
139
- w(() => _.twoFactorMethods, (e) => {
140
- e?.length && (Z.value = e.includes("totp") ? "totp" : "otp", Q(), Z.value === "otp" && U("send-two-factor-code"));
141
- }, { immediate: !0 });
142
- function $(e) {
143
- Z.value = e, O.value = void 0, Q();
144
- }
145
- let Oe = u(() => Z.value === "backup" ? o("twoFactor.challengeBackup") : Z.value === "otp" ? o("twoFactor.challengeEmailSent") : o("twoFactor.challengeApp"));
146
- function ke(e) {
147
- U("verify-two-factor", {
148
- kind: Z.value,
149
- code: e.code.trim()
150
- });
151
- }
152
- return (e, t) => {
153
- let r = re, i = te, a = ee, s = ne;
154
- return y(), p("div", ce, [m("div", le, [g(ie, {
155
- name: "pk-flip",
156
- mode: "out-in",
157
- onAfterEnter: Se
158
- }, {
159
- default: T(() => [H.value ? (y(), p("div", {
160
- ref_key: "successCard",
161
- ref: J,
162
- key: "success",
163
- tabindex: "-1",
164
- class: "pk-chatbot-auth__flip-card outline-none flex flex-col text-center leading-normal"
165
- }, [
166
- m("div", ue, [g(r, {
167
- name: "ri:mail-check-line",
168
- "aria-hidden": "true",
169
- class: "text-success w-32 h-32"
170
- })]),
171
- m("h1", de, x(H.value.title), 1),
172
- m("p", fe, x(H.value.message), 1),
173
- g(i, {
174
- type: "button",
175
- modifiers: "link",
176
- icon: "chevron-left",
177
- label: S(o)("action.backToSignIn"),
178
- onClick: pe
179
- }, null, 8, ["label"])
180
- ], 512)) : (y(), p("div", k, [m("div", A, [
181
- S(v)(n.branding?.interface.logo) ? (y(), p("div", j, [m("img", {
182
- src: n.branding?.interface.logo,
183
- alt: n.branding?.name,
184
- class: "w-64 h-64 border border-surface-3 rounded-full bg-surface-0 overflow-hidden bg-surface object-contain",
185
- onError: t[0] ||= (e) => S(E)(n.branding?.interface.logo)
186
- }, null, 40, M)])) : f("", !0),
187
- m("div", N, [n.branding?.name ? (y(), p("h1", P, x(n.branding.name), 1)) : f("", !0), (y(), d(ae(n.branding?.name ? "h2" : "h1"), { class: "text-word-3 mb-0" }, {
188
- default: T(() => [X.value ? (y(), p(l, { key: 0 }, [h(x(S(o)("twoFactor.challengeTitle")), 1)], 64)) : W.value === "sign-in" ? (y(), p(l, { key: 1 }, [h(x(S(o)("auth.signInTitle")), 1)], 64)) : W.value === "sign-up" ? (y(), p(l, { key: 2 }, [h(x(S(o)("auth.signUpTitle")), 1)], 64)) : W.value === "reset" ? (y(), p(l, { key: 3 }, [h(x(S(o)("auth.resetTitle")), 1)], 64)) : f("", !0)]),
189
- _: 1
190
- }))]),
191
- O.value ? (y(), d(a, {
192
- key: 1,
193
- modifiers: "danger",
194
- class: "mb-md",
195
- content: O.value
196
- }, null, 8, ["content"])) : f("", !0),
197
- X.value ? (y(), p(l, { key: 2 }, [
198
- m("p", F, x(Oe.value), 1),
199
- g(S(Ee), {
200
- class: "flex flex-col",
201
- readonly: n.loading,
202
- onSubmit: ke
203
- }, {
204
- default: T(() => [g(S(De), {
205
- name: "code",
206
- type: "text",
207
- autocomplete: Z.value === "backup" ? "off" : "one-time-code",
208
- label: Z.value === "backup" ? S(o)("twoFactor.backupCode") : S(o)("twoFactor.code"),
209
- floating: ""
210
- }, null, 8, ["autocomplete", "label"]), g(i, {
211
- type: "submit",
212
- modifiers: "primary",
213
- loading: n.loading,
214
- disabled: n.loading,
215
- label: S(o)("twoFactor.verify")
216
- }, null, 8, [
217
- "loading",
218
- "disabled",
219
- "label"
220
- ])]),
221
- _: 1
222
- }, 8, ["readonly"]),
223
- m("div", I, [Z.value === "totp" ? (y(), d(i, {
224
- key: 0,
225
- type: "button",
226
- modifiers: "link",
227
- label: S(o)("twoFactor.useBackupCode"),
228
- onClick: t[1] ||= (e) => $("backup")
229
- }, null, 8, ["label"])) : Z.value === "backup" ? (y(), d(i, {
230
- key: 1,
231
- type: "button",
232
- modifiers: "link",
233
- label: S(o)("twoFactor.useApp"),
234
- onClick: t[2] ||= (e) => $("totp")
235
- }, null, 8, ["label"])) : (y(), d(i, {
236
- key: 2,
237
- type: "button",
238
- modifiers: "link",
239
- disabled: n.loading,
240
- label: S(o)("twoFactor.sendAgain"),
241
- onClick: t[3] ||= (e) => U("send-two-factor-code")
242
- }, null, 8, ["disabled", "label"]))])
243
- ], 64)) : W.value === "sign-in" ? (y(), d(S(ge), {
244
- key: 3,
245
- class: "flex flex-col",
246
- readonly: n.loading,
247
- onSubmit: Ce
248
- }, {
249
- default: T(() => [m("div", L, [
250
- g(S(K), {
251
- name: "email",
252
- type: "email",
253
- autocomplete: "username",
254
- label: S(o)("label.email"),
255
- floating: ""
256
- }, null, 8, ["label"]),
257
- g(S(K), {
258
- name: "password",
259
- type: "password",
260
- autocomplete: "current-password",
261
- label: S(o)("label.password"),
262
- floating: ""
263
- }, null, 8, ["label"]),
264
- m("div", R, [g(i, {
265
- type: "button",
266
- modifiers: "link",
267
- label: S(o)("action.forgetPassword"),
268
- onClick: t[4] ||= (e) => W.value = "reset"
269
- }, null, 8, ["label"])]),
270
- g(S(K), {
271
- name: "rememberMe",
272
- type: "checkbox",
273
- label: S(o)("label.rememberMe"),
274
- switch: ""
275
- }, null, 8, ["label"])
276
- ]), g(i, {
277
- type: "submit",
278
- modifiers: "primary",
279
- loading: n.loading,
280
- disabled: n.loading,
281
- label: S(o)("action.signIn")
282
- }, null, 8, [
283
- "loading",
284
- "disabled",
285
- "label"
286
- ])]),
287
- _: 1
288
- }, 8, ["readonly"])) : W.value === "sign-up" ? (y(), d(S(_e), {
289
- key: 4,
290
- class: "flex flex-col",
291
- readonly: n.loading,
292
- onSubmit: we
293
- }, {
294
- default: T(() => [m("div", z, [
295
- g(S(q), {
296
- name: "name",
297
- type: "text",
298
- autocomplete: "name",
299
- label: S(o)("label.name"),
300
- floating: ""
301
- }, null, 8, ["label"]),
302
- g(S(q), {
303
- name: "email",
304
- type: "email",
305
- autocomplete: "username",
306
- label: S(o)("label.email"),
307
- floating: ""
308
- }, null, 8, ["label"]),
309
- g(S(q), {
310
- name: "password",
311
- type: "password",
312
- autocomplete: "new-password",
313
- label: S(o)("label.password"),
314
- floating: ""
315
- }, null, 8, ["label"]),
316
- g(S(q), {
317
- name: "passwordConfirmation",
318
- type: "password",
319
- autocomplete: "new-password",
320
- label: S(o)("label.confirmPassword"),
321
- floating: ""
322
- }, null, 8, ["label"])
323
- ]), g(i, {
324
- type: "submit",
325
- modifiers: "primary",
326
- loading: n.loading,
327
- disabled: n.loading,
328
- label: S(o)("action.continue")
329
- }, null, 8, [
330
- "loading",
331
- "disabled",
332
- "label"
333
- ])]),
334
- _: 1
335
- }, 8, ["readonly"])) : W.value === "reset" ? (y(), d(S(ye), {
336
- key: 5,
337
- class: "flex flex-col",
338
- readonly: n.loading,
339
- onSubmit: Te
340
- }, {
341
- default: T(() => [g(S(be), {
342
- name: "email",
343
- type: "email",
344
- autocomplete: "username",
345
- label: S(o)("label.email"),
346
- floating: ""
347
- }, null, 8, ["label"]), g(s, { modifiers: "vertical" }, {
348
- default: T(() => [g(i, {
349
- type: "submit",
350
- modifiers: "primary",
351
- loading: n.loading,
352
- disabled: n.loading,
353
- label: S(o)("action.submit")
354
- }, null, 8, [
355
- "loading",
356
- "disabled",
357
- "label"
358
- ])]),
359
- _: 1
360
- })]),
361
- _: 1
362
- }, 8, ["readonly"])) : f("", !0),
363
- !X.value && (W.value === "sign-in" || W.value === "sign-up") && me.value ? (y(), p(l, { key: 6 }, [m("div", B, [m("span", null, x(S(o)("label.or")), 1)]), g(s, {
364
- modifiers: "vertical",
365
- class: "gap-xs mt-xs"
366
- }, {
367
- default: T(() => [n.authMethods?.google ? (y(), d(i, {
368
- key: 0,
369
- type: "button",
370
- modifiers: "secondary",
371
- icon: "logos:google-icon",
372
- disabled: n.loading,
373
- label: S(o)("action.signInWithSocialProvider", { provider: "Google" }),
374
- onClick: t[5] ||= (e) => Y("google")
375
- }, null, 8, ["disabled", "label"])) : f("", !0), n.authMethods?.microsoft ? (y(), d(i, {
376
- key: 1,
377
- type: "button",
378
- modifiers: "secondary",
379
- icon: "logos:microsoft-icon",
380
- disabled: n.loading,
381
- label: S(o)("action.signInWithSocialProvider", { provider: "Microsoft" }),
382
- onClick: t[6] ||= (e) => Y("microsoft")
383
- }, null, 8, ["disabled", "label"])) : f("", !0)]),
384
- _: 1
385
- })], 64)) : f("", !0)
386
- ]), m("div", V, [X.value ? (y(), d(i, {
387
- key: 0,
388
- type: "button",
389
- modifiers: "link",
390
- icon: "chevron-left",
391
- label: S(o)("action.backToSignIn"),
392
- onClick: t[7] ||= (e) => U("cancel-two-factor")
393
- }, null, 8, ["label"])) : W.value === "sign-in" ? (y(), p(l, { key: 1 }, [h(x(S(o)("auth.noAccount")) + " ", 1), g(i, {
394
- type: "button",
395
- modifiers: "link",
396
- class: "font-semibold",
397
- label: S(o)("action.signUp"),
398
- onClick: t[8] ||= (e) => W.value = "sign-up"
399
- }, null, 8, ["label"])], 64)) : W.value === "sign-up" ? (y(), p(l, { key: 2 }, [h(x(S(o)("auth.haveAccount")) + " ", 1), g(i, {
400
- type: "button",
401
- modifiers: "link",
402
- class: "font-semibold",
403
- label: S(o)("action.signIn"),
404
- onClick: t[9] ||= (e) => W.value = "sign-in"
405
- }, null, 8, ["label"])], 64)) : (y(), d(i, {
406
- key: 3,
407
- type: "button",
408
- modifiers: "link",
409
- icon: "chevron-left",
410
- label: S(o)("action.backToSignIn"),
411
- onClick: t[10] ||= (e) => W.value = "sign-in"
412
- }, null, 8, ["label"]))])]))]),
413
- _: 1
414
- })])]);
415
- };
416
- }
417
- });
418
- //#endregion
419
- export { H as t };
420
-
421
- //# sourceMappingURL=PkChatbotAuth-jzoNJkmH.js.map