@inkeep/agents-ui 0.15.27 → 0.15.29

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 (33) hide show
  1. package/dist/primitives/components/embedded-chat/use-inkeep-chat.cjs +3 -3
  2. package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +1 -1
  3. package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +185 -175
  4. package/dist/primitives/components/embedded-chat.cjs +3 -3
  5. package/dist/primitives/components/embedded-chat.d.ts +2 -3
  6. package/dist/primitives/components/embedded-chat.js +667 -672
  7. package/dist/primitives/components/embedded-search.cjs +1 -1
  8. package/dist/primitives/components/embedded-search.d.ts +3 -4
  9. package/dist/primitives/components/embedded-search.js +290 -294
  10. package/dist/primitives/components/tagline-logo-icon.cjs +1 -1
  11. package/dist/primitives/components/tagline-logo-icon.js +11 -21
  12. package/dist/primitives/hooks/use-initial-conversation.cjs +1 -0
  13. package/dist/primitives/hooks/use-initial-conversation.d.ts +16 -0
  14. package/dist/primitives/hooks/use-initial-conversation.js +31 -0
  15. package/dist/primitives/providers/base-events-provider.cjs +1 -1
  16. package/dist/primitives/providers/base-events-provider.js +1 -1
  17. package/dist/primitives/utils/component-ids.cjs +1 -1
  18. package/dist/primitives/utils/component-ids.d.ts +0 -4
  19. package/dist/primitives/utils/component-ids.js +1 -3
  20. package/dist/react/embedded-chat.cjs +1 -1
  21. package/dist/react/embedded-chat.js +133 -134
  22. package/dist/react/embedded-search.cjs +1 -1
  23. package/dist/react/embedded-search.js +63 -64
  24. package/dist/styled/components/embedded-chat.cjs +1 -1
  25. package/dist/styled/components/embedded-chat.d.ts +1 -2
  26. package/dist/styled/components/embedded-chat.js +372 -386
  27. package/dist/styled/components/embedded-search.cjs +1 -1
  28. package/dist/styled/components/embedded-search.d.ts +1 -2
  29. package/dist/styled/components/embedded-search.js +119 -133
  30. package/dist/styled/inkeep.css.cjs +3 -3
  31. package/dist/styled/inkeep.css.js +3 -3
  32. package/dist/types/config/ai.d.ts +7 -0
  33. package/package.json +1 -1
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime");function o(t){return e.jsxs("svg",{viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[e.jsx("title",{children:"Tag Line Logo Icon"}),e.jsx("path",{d:"M7.2413 7.9244C6.85545 7.9244 6.49892 8.13025 6.30599 8.4644L1.99827 15.9256C1.80535 16.2597 1.80535 16.6714 1.99827 17.0056L6.30599 24.4668C6.49892 24.8009 6.85545 25.0068 7.2413 25.0068L15.8567 25.0068C16.2426 25.0068 16.5991 24.8009 16.792 24.4668L21.0998 17.0056C21.2927 16.6714 21.2927 16.2597 21.0998 15.9256L16.792 8.4644C16.5991 8.13025 16.2426 7.9244 15.8567 7.9244L7.2413 7.9244Z",stroke:"currentColor",strokeWidth:"1.75"}),e.jsx("path",{d:"M24.8143 7.76209C27.3966 8.42659 27.1023 9.89204 28.1732 12.8728C28.8603 14.7852 32.182 17.1565 29.1465 21.766C28.2406 23.1417 25.3276 24.7738 23.2199 25.2265C18.5764 26.2085 15.8404 23.98 13.4131 20.3057C11.592 17.5265 12.2355 13.5253 14.9976 11.5606C17.6151 9.70372 21.4197 6.82238 24.8143 7.76209Z",stroke:"currentColor",strokeWidth:"1.75"})]})}exports.default=o;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const C=require("react/jsx-runtime");function l(e){return C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"96",height:"24",viewBox:"0 0 96 24",fill:"none",...e,children:[C.jsx("title",{children:"Inkeep Logo"}),C.jsx("path",{d:"M0 0.367584H2.11421V17.5449H0V0.367584Z",fill:"currentColor"}),C.jsx("path",{d:"M5.10376 0.367608H7.21797V3.50535C8.1366 1.85621 10.9948 0.017334 14.1154 0.017334C15.2529 0.017334 16.3755 0.177881 17.2506 0.513534C18.1108 0.849218 18.8545 1.34542 19.4526 2.00213C20.0504 2.65888 20.5023 3.49077 20.8231 4.49776C21.1294 5.49016 21.2899 6.6431 21.2899 7.94198V17.5449H19.1753V8.17547C19.1753 7.12471 19.0588 6.21985 18.8254 5.44635C18.5921 4.67289 18.2422 4.03073 17.79 3.50535C17.3381 2.97994 16.7693 2.60052 16.0841 2.35241C15.4133 2.10432 14.6403 1.98754 13.7655 1.98754C12.7591 1.98754 11.855 2.1335 11.0532 2.43998C10.2511 2.74645 9.56586 3.16967 8.99713 3.72426C8.42839 4.27885 7.99102 4.93557 7.69923 5.67988C7.39292 6.42417 7.24734 7.27064 7.24734 8.19006V17.5595H5.13281V0.367608H5.10376Z",fill:"currentColor"}),C.jsx("path",{d:"M39.7064 5.32961C40.1441 4.23505 40.7419 3.28645 41.5146 2.48374C42.2876 1.69566 43.2063 1.08271 44.2708 0.659492C45.3353 0.236239 46.5164 0.017334 47.7994 0.017334C49.0828 0.017334 50.2493 0.236239 51.3138 0.674081C52.3784 1.11189 53.297 1.72487 54.0697 2.49837C54.8573 3.28645 55.4551 4.22046 55.878 5.32961C56.3011 6.43879 56.5196 7.66468 56.5196 9.00736V9.67869H40.8584V7.81064H54.8718L54.42 8.99277C54.42 7.94198 54.2595 6.97876 53.9242 6.11769C53.5888 5.25666 53.1366 4.51234 52.5679 3.88481C51.9846 3.25724 51.2993 2.79022 50.4827 2.45457C49.6661 2.11891 48.7765 1.95837 47.8143 1.95837C46.8517 1.95837 45.9331 2.1335 45.1165 2.46916C44.2998 2.80484 43.6001 3.28645 43.0165 3.8994C42.4332 4.51234 41.9668 5.24204 41.6314 6.1031C41.2961 6.96417 41.1356 7.89818 41.1356 8.93438C41.1356 9.97058 41.3106 10.9338 41.646 11.7948C41.9813 12.6559 42.4626 13.3856 43.0604 13.9986C43.6582 14.6115 44.3728 15.0785 45.1894 15.4288C46.0061 15.7644 46.9102 15.9396 47.9017 15.9396C49.4472 15.9396 50.7596 15.5455 51.8535 14.772C52.9471 13.9986 53.7199 12.904 54.2011 11.5175L56.2572 12.218C55.6594 13.9694 54.624 15.3558 53.1805 16.3774C51.7222 17.399 49.9869 17.9098 47.9453 17.9098C46.6474 17.9098 45.4373 17.6909 44.3583 17.2677C43.2644 16.8444 42.3312 16.2315 41.544 15.4434C40.7564 14.6553 40.1441 13.7067 39.7064 12.6121C39.269 11.5175 39.0356 10.3062 39.0356 8.94897C39.0356 7.5917 39.2545 6.43879 39.6919 5.32961H39.7064Z",fill:"currentColor"}),C.jsx("path",{d:"M58.9549 5.32961C59.3926 4.23505 59.9904 3.28645 60.7631 2.48374C61.5362 1.68107 62.4548 1.08271 63.5193 0.659492C64.5839 0.236239 65.7649 0.017334 67.048 0.017334C68.3313 0.017334 69.4979 0.236239 70.5624 0.674081C71.6269 1.11189 72.5456 1.72487 73.3186 2.49837C74.1059 3.28645 74.7037 4.22046 75.1265 5.32961C75.5497 6.43879 75.7682 7.66468 75.7682 9.00736V9.67869H60.1069V7.81064H74.1204L73.6685 8.99277C73.6685 7.94198 73.5081 6.97876 73.1727 6.11769C72.8373 5.25666 72.3851 4.51234 71.8019 3.88481C71.2186 3.25724 70.5333 2.79022 69.7167 2.45457C68.9001 2.11891 68.0105 1.95837 67.048 1.95837C66.0858 1.95837 65.1671 2.1335 64.3505 2.46916C63.5339 2.80484 62.8338 3.28645 62.2505 3.8994C61.6672 4.51234 61.2008 5.24204 60.8654 6.1031C60.5298 6.96417 60.3697 7.89818 60.3697 8.93438C60.3697 9.97058 60.5446 10.9338 60.88 11.7948C61.2153 12.6559 61.6966 13.3856 62.2944 13.9986C62.8922 14.6115 63.6068 15.0785 64.4234 15.4288C65.2401 15.7644 66.1442 15.9396 67.1358 15.9396C68.6812 15.9396 69.9937 15.5455 71.0872 14.772C72.1811 13.9986 72.9539 12.904 73.4351 11.5175L75.4912 12.218C74.8934 13.9694 73.8725 15.3558 72.4145 16.3774C70.9562 17.399 69.2209 17.9098 67.1793 17.9098C65.8814 17.9098 64.6713 17.6909 63.5923 17.2677C62.4984 16.8444 61.5652 16.2315 60.7925 15.4434C60.0049 14.6553 59.3926 13.7067 58.9549 12.6121C58.503 11.5175 58.2842 10.3062 58.2842 8.94897C58.2842 7.5917 58.503 6.43879 58.9404 5.32961H58.9549Z",fill:"currentColor"}),C.jsx("path",{d:"M78.0583 0.367608H80.1729V4.24964C80.8875 2.97994 81.7622 2.0897 83.0311 1.25785C84.2851 0.440587 85.7725 0.017334 87.4932 0.017334C88.7181 0.017334 89.8117 0.22165 90.8178 0.644902C91.8094 1.06812 92.6551 1.65189 93.3552 2.4108C94.055 3.16967 94.5801 4.10371 94.9591 5.21286C95.3384 6.32201 95.5278 7.57711 95.5278 8.96356C95.5278 10.35 95.3384 11.6051 94.9591 12.6997C94.5801 13.8088 94.055 14.7429 93.3552 15.5018C92.6551 16.2753 91.8239 16.859 90.8323 17.2677C89.8553 17.6763 88.7472 17.8806 87.5222 17.8806C85.816 17.8806 84.3141 17.4574 83.0456 16.6255C81.7771 15.7936 80.8875 14.7429 80.1729 13.6483V23.9372H78.0583V0.367608ZM80.6832 11.824C81.0186 12.6851 81.4998 13.4294 82.1125 14.0423C82.7248 14.6553 83.4539 15.1223 84.3141 15.458C85.1747 15.7936 86.0933 15.9542 87.0703 15.9542C88.0474 15.9542 88.9076 15.7936 89.6952 15.4872C90.4825 15.1807 91.1532 14.7283 91.7074 14.1153C92.2616 13.5023 92.6699 12.7872 92.9759 11.9262C93.2822 11.0651 93.4281 10.1019 93.4281 9.00736C93.4281 7.9128 93.2677 6.90578 92.9614 6.03012C92.6551 5.16909 92.2177 4.42478 91.6784 3.81183C91.1387 3.19888 90.4679 2.74645 89.6658 2.42539C88.8786 2.11891 88.0035 1.95837 87.041 1.95837C86.0788 1.95837 85.1163 2.11891 84.2851 2.45457C83.4539 2.79022 82.7248 3.25724 82.1125 3.87019C81.4998 4.48317 81.0334 5.21286 80.6832 6.07392C80.3333 6.93499 80.1729 7.89818 80.1729 8.96356C80.1729 10.0289 80.3478 10.9338 80.6832 11.8094V11.824Z",fill:"currentColor"}),C.jsx("path",{d:"M39.8383 0.017334H36.7467L25.9268 9.60571V0.017334H23.8853V17.5449H25.9268V12.291L25.9559 12.3202L29.6453 9.05112L37.7677 17.5449H40.684L31.1765 7.69386L39.8383 0.017334Z",fill:"currentColor"})]})}exports.default=l;
@@ -1,26 +1,16 @@
1
1
  "use client";
2
- import { jsxs as e, jsx as o } from "react/jsx-runtime";
3
- function n(t) {
4
- return /* @__PURE__ */ e("svg", { viewBox: "0 0 32 33", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t, children: [
5
- /* @__PURE__ */ o("title", { children: "Tag Line Logo Icon" }),
6
- /* @__PURE__ */ o(
7
- "path",
8
- {
9
- d: "M7.2413 7.9244C6.85545 7.9244 6.49892 8.13025 6.30599 8.4644L1.99827 15.9256C1.80535 16.2597 1.80535 16.6714 1.99827 17.0056L6.30599 24.4668C6.49892 24.8009 6.85545 25.0068 7.2413 25.0068L15.8567 25.0068C16.2426 25.0068 16.5991 24.8009 16.792 24.4668L21.0998 17.0056C21.2927 16.6714 21.2927 16.2597 21.0998 15.9256L16.792 8.4644C16.5991 8.13025 16.2426 7.9244 15.8567 7.9244L7.2413 7.9244Z",
10
- stroke: "currentColor",
11
- strokeWidth: "1.75"
12
- }
13
- ),
14
- /* @__PURE__ */ o(
15
- "path",
16
- {
17
- d: "M24.8143 7.76209C27.3966 8.42659 27.1023 9.89204 28.1732 12.8728C28.8603 14.7852 32.182 17.1565 29.1465 21.766C28.2406 23.1417 25.3276 24.7738 23.2199 25.2265C18.5764 26.2085 15.8404 23.98 13.4131 20.3057C11.592 17.5265 12.2355 13.5253 14.9976 11.5606C17.6151 9.70372 21.4197 6.82238 24.8143 7.76209Z",
18
- stroke: "currentColor",
19
- strokeWidth: "1.75"
20
- }
21
- )
2
+ import { jsxs as r, jsx as C } from "react/jsx-runtime";
3
+ function t(l) {
4
+ return /* @__PURE__ */ r("svg", { xmlns: "http://www.w3.org/2000/svg", width: "96", height: "24", viewBox: "0 0 96 24", fill: "none", ...l, children: [
5
+ /* @__PURE__ */ C("title", { children: "Inkeep Logo" }),
6
+ /* @__PURE__ */ C("path", { d: "M0 0.367584H2.11421V17.5449H0V0.367584Z", fill: "currentColor" }),
7
+ /* @__PURE__ */ C("path", { d: "M5.10376 0.367608H7.21797V3.50535C8.1366 1.85621 10.9948 0.017334 14.1154 0.017334C15.2529 0.017334 16.3755 0.177881 17.2506 0.513534C18.1108 0.849218 18.8545 1.34542 19.4526 2.00213C20.0504 2.65888 20.5023 3.49077 20.8231 4.49776C21.1294 5.49016 21.2899 6.6431 21.2899 7.94198V17.5449H19.1753V8.17547C19.1753 7.12471 19.0588 6.21985 18.8254 5.44635C18.5921 4.67289 18.2422 4.03073 17.79 3.50535C17.3381 2.97994 16.7693 2.60052 16.0841 2.35241C15.4133 2.10432 14.6403 1.98754 13.7655 1.98754C12.7591 1.98754 11.855 2.1335 11.0532 2.43998C10.2511 2.74645 9.56586 3.16967 8.99713 3.72426C8.42839 4.27885 7.99102 4.93557 7.69923 5.67988C7.39292 6.42417 7.24734 7.27064 7.24734 8.19006V17.5595H5.13281V0.367608H5.10376Z", fill: "currentColor" }),
8
+ /* @__PURE__ */ C("path", { d: "M39.7064 5.32961C40.1441 4.23505 40.7419 3.28645 41.5146 2.48374C42.2876 1.69566 43.2063 1.08271 44.2708 0.659492C45.3353 0.236239 46.5164 0.017334 47.7994 0.017334C49.0828 0.017334 50.2493 0.236239 51.3138 0.674081C52.3784 1.11189 53.297 1.72487 54.0697 2.49837C54.8573 3.28645 55.4551 4.22046 55.878 5.32961C56.3011 6.43879 56.5196 7.66468 56.5196 9.00736V9.67869H40.8584V7.81064H54.8718L54.42 8.99277C54.42 7.94198 54.2595 6.97876 53.9242 6.11769C53.5888 5.25666 53.1366 4.51234 52.5679 3.88481C51.9846 3.25724 51.2993 2.79022 50.4827 2.45457C49.6661 2.11891 48.7765 1.95837 47.8143 1.95837C46.8517 1.95837 45.9331 2.1335 45.1165 2.46916C44.2998 2.80484 43.6001 3.28645 43.0165 3.8994C42.4332 4.51234 41.9668 5.24204 41.6314 6.1031C41.2961 6.96417 41.1356 7.89818 41.1356 8.93438C41.1356 9.97058 41.3106 10.9338 41.646 11.7948C41.9813 12.6559 42.4626 13.3856 43.0604 13.9986C43.6582 14.6115 44.3728 15.0785 45.1894 15.4288C46.0061 15.7644 46.9102 15.9396 47.9017 15.9396C49.4472 15.9396 50.7596 15.5455 51.8535 14.772C52.9471 13.9986 53.7199 12.904 54.2011 11.5175L56.2572 12.218C55.6594 13.9694 54.624 15.3558 53.1805 16.3774C51.7222 17.399 49.9869 17.9098 47.9453 17.9098C46.6474 17.9098 45.4373 17.6909 44.3583 17.2677C43.2644 16.8444 42.3312 16.2315 41.544 15.4434C40.7564 14.6553 40.1441 13.7067 39.7064 12.6121C39.269 11.5175 39.0356 10.3062 39.0356 8.94897C39.0356 7.5917 39.2545 6.43879 39.6919 5.32961H39.7064Z", fill: "currentColor" }),
9
+ /* @__PURE__ */ C("path", { d: "M58.9549 5.32961C59.3926 4.23505 59.9904 3.28645 60.7631 2.48374C61.5362 1.68107 62.4548 1.08271 63.5193 0.659492C64.5839 0.236239 65.7649 0.017334 67.048 0.017334C68.3313 0.017334 69.4979 0.236239 70.5624 0.674081C71.6269 1.11189 72.5456 1.72487 73.3186 2.49837C74.1059 3.28645 74.7037 4.22046 75.1265 5.32961C75.5497 6.43879 75.7682 7.66468 75.7682 9.00736V9.67869H60.1069V7.81064H74.1204L73.6685 8.99277C73.6685 7.94198 73.5081 6.97876 73.1727 6.11769C72.8373 5.25666 72.3851 4.51234 71.8019 3.88481C71.2186 3.25724 70.5333 2.79022 69.7167 2.45457C68.9001 2.11891 68.0105 1.95837 67.048 1.95837C66.0858 1.95837 65.1671 2.1335 64.3505 2.46916C63.5339 2.80484 62.8338 3.28645 62.2505 3.8994C61.6672 4.51234 61.2008 5.24204 60.8654 6.1031C60.5298 6.96417 60.3697 7.89818 60.3697 8.93438C60.3697 9.97058 60.5446 10.9338 60.88 11.7948C61.2153 12.6559 61.6966 13.3856 62.2944 13.9986C62.8922 14.6115 63.6068 15.0785 64.4234 15.4288C65.2401 15.7644 66.1442 15.9396 67.1358 15.9396C68.6812 15.9396 69.9937 15.5455 71.0872 14.772C72.1811 13.9986 72.9539 12.904 73.4351 11.5175L75.4912 12.218C74.8934 13.9694 73.8725 15.3558 72.4145 16.3774C70.9562 17.399 69.2209 17.9098 67.1793 17.9098C65.8814 17.9098 64.6713 17.6909 63.5923 17.2677C62.4984 16.8444 61.5652 16.2315 60.7925 15.4434C60.0049 14.6553 59.3926 13.7067 58.9549 12.6121C58.503 11.5175 58.2842 10.3062 58.2842 8.94897C58.2842 7.5917 58.503 6.43879 58.9404 5.32961H58.9549Z", fill: "currentColor" }),
10
+ /* @__PURE__ */ C("path", { d: "M78.0583 0.367608H80.1729V4.24964C80.8875 2.97994 81.7622 2.0897 83.0311 1.25785C84.2851 0.440587 85.7725 0.017334 87.4932 0.017334C88.7181 0.017334 89.8117 0.22165 90.8178 0.644902C91.8094 1.06812 92.6551 1.65189 93.3552 2.4108C94.055 3.16967 94.5801 4.10371 94.9591 5.21286C95.3384 6.32201 95.5278 7.57711 95.5278 8.96356C95.5278 10.35 95.3384 11.6051 94.9591 12.6997C94.5801 13.8088 94.055 14.7429 93.3552 15.5018C92.6551 16.2753 91.8239 16.859 90.8323 17.2677C89.8553 17.6763 88.7472 17.8806 87.5222 17.8806C85.816 17.8806 84.3141 17.4574 83.0456 16.6255C81.7771 15.7936 80.8875 14.7429 80.1729 13.6483V23.9372H78.0583V0.367608ZM80.6832 11.824C81.0186 12.6851 81.4998 13.4294 82.1125 14.0423C82.7248 14.6553 83.4539 15.1223 84.3141 15.458C85.1747 15.7936 86.0933 15.9542 87.0703 15.9542C88.0474 15.9542 88.9076 15.7936 89.6952 15.4872C90.4825 15.1807 91.1532 14.7283 91.7074 14.1153C92.2616 13.5023 92.6699 12.7872 92.9759 11.9262C93.2822 11.0651 93.4281 10.1019 93.4281 9.00736C93.4281 7.9128 93.2677 6.90578 92.9614 6.03012C92.6551 5.16909 92.2177 4.42478 91.6784 3.81183C91.1387 3.19888 90.4679 2.74645 89.6658 2.42539C88.8786 2.11891 88.0035 1.95837 87.041 1.95837C86.0788 1.95837 85.1163 2.11891 84.2851 2.45457C83.4539 2.79022 82.7248 3.25724 82.1125 3.87019C81.4998 4.48317 81.0334 5.21286 80.6832 6.07392C80.3333 6.93499 80.1729 7.89818 80.1729 8.96356C80.1729 10.0289 80.3478 10.9338 80.6832 11.8094V11.824Z", fill: "currentColor" }),
11
+ /* @__PURE__ */ C("path", { d: "M39.8383 0.017334H36.7467L25.9268 9.60571V0.017334H23.8853V17.5449H25.9268V12.291L25.9559 12.3202L29.6453 9.05112L37.7677 17.5449H40.684L31.1765 7.69386L39.8383 0.017334Z", fill: "currentColor" })
22
12
  ] });
23
13
  }
24
14
  export {
25
- n as default
15
+ t as default
26
16
  };
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),f=({conversationId:e,effectiveAuthToken:s,loadAndRestoreSession:u,onLoadFailed:l})=>{const r=o.useRef(null),c=o.useRef(u);c.current=u;const a=o.useRef(l);a.current=l,o.useEffect(()=>{if(!e||!s||r.current===e)return;r.current=e;const t=new AbortController,i=n=>{r.current=null,console.error("[useInitialConversation] failed to load conversation:",e,n),a.current?.()};return(async()=>{try{!await c.current(e,t.signal)&&!t.signal.aborted&&i()}catch(n){t.signal.aborted||i(n)}})(),()=>{r.current=null,t.abort()}},[e,s])};exports.useInitialConversation=f;
@@ -0,0 +1,16 @@
1
+ interface UseInitialConversationOptions {
2
+ /** The conversationId provided via props to load and restore. */
3
+ conversationId: string | undefined;
4
+ /** Resolved auth token — fetch is skipped until one is available. */
5
+ effectiveAuthToken: string | null;
6
+ /** Returns true if the conversation was loaded successfully, false otherwise. */
7
+ loadAndRestoreSession: (sessionId: string, signal?: AbortSignal) => Promise<boolean>;
8
+ /** Called when the load fails (404 or other error) — use to reset conversation state. */
9
+ onLoadFailed?: () => void;
10
+ }
11
+ /**
12
+ * Loads and restores a conversation by ID once an auth token is available.
13
+ * Calls `onLoadFailed` if the conversation is not found or the fetch fails.
14
+ */
15
+ export declare const useInitialConversation: ({ conversationId, effectiveAuthToken, loadAndRestoreSession, onLoadFailed, }: UseInitialConversationOptions) => void;
16
+ export {};
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { useRef as o, useEffect as f } from "react";
3
+ const C = ({
4
+ conversationId: r,
5
+ effectiveAuthToken: l,
6
+ loadAndRestoreSession: s,
7
+ onLoadFailed: c
8
+ }) => {
9
+ const t = o(null), u = o(s);
10
+ u.current = s;
11
+ const a = o(c);
12
+ a.current = c, f(() => {
13
+ if (!r || !l || t.current === r) return;
14
+ t.current = r;
15
+ const e = new AbortController(), i = (n) => {
16
+ t.current = null, console.error("[useInitialConversation] failed to load conversation:", r, n), a.current?.();
17
+ };
18
+ return (async () => {
19
+ try {
20
+ !await u.current(r, e.signal) && !e.signal.aborted && i();
21
+ } catch (n) {
22
+ e.signal.aborted || i(n);
23
+ }
24
+ })(), () => {
25
+ t.current = null, e.abort();
26
+ };
27
+ }, [r, l]);
28
+ };
29
+ export {
30
+ C as useInitialConversation
31
+ };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),t=require("react"),l=require("./config-provider.cjs"),a=t.createContext(void 0),p=({children:e})=>{const{baseSettings:s,componentType:n}=l.useInkeepConfig(),{tags:o,analyticsProperties:r}=s,i=t.useMemo(()=>({widgetLibraryVersion:"0.15.27",componentType:n,tags:o}),[n,o]),u={logEvent:t.useCallback(async c=>{const v={...i,...c.properties,...r},d={eventName:c.eventName,properties:v};return s.onEvent?.(d)},[s,i,r])};return E.jsx(a.Provider,{value:u,children:e})},g=()=>{const e=t.useContext(a);if(!e)throw new Error("useBaseEvents must be used within a BaseEventsProvider");return e};exports.BaseEventsProvider=p;exports.useBaseEvents=g;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),t=require("react"),l=require("./config-provider.cjs"),a=t.createContext(void 0),p=({children:e})=>{const{baseSettings:s,componentType:n}=l.useInkeepConfig(),{tags:o,analyticsProperties:r}=s,i=t.useMemo(()=>({widgetLibraryVersion:"0.15.29",componentType:n,tags:o}),[n,o]),u={logEvent:t.useCallback(async c=>{const v={...i,...c.properties,...r},d={eventName:c.eventName,properties:v};return s.onEvent?.(d)},[s,i,r])};return E.jsx(a.Provider,{value:u,children:e})},g=()=>{const e=t.useContext(a);if(!e)throw new Error("useBaseEvents must be used within a BaseEventsProvider");return e};exports.BaseEventsProvider=p;exports.useBaseEvents=g;
@@ -5,7 +5,7 @@ import { useInkeepConfig as g } from "./config-provider.js";
5
5
  const a = d(void 0), P = ({ children: e }) => {
6
6
  const { baseSettings: t, componentType: o } = g(), { tags: s, analyticsProperties: n } = t, r = u(
7
7
  () => ({
8
- widgetLibraryVersion: "0.15.27",
8
+ widgetLibraryVersion: "0.15.29",
9
9
  componentType: o,
10
10
  tags: s
11
11
  }),
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a={icon:"icon",loadingIndicator__Text:"loadingIndicator__Text",loadingIndicator__Dots:"loadingIndicator__Dots",loadingIndicator__Dot:"loadingIndicator__Dot",view_toggle:"view_toggle",view_toggle_button:"view_toggle_button",view_toggle_icon:"view_toggle_icon"},e={codeblockContainer:"codeblockContainer",codeblockHeader:"codeblockHeader",codeblockHeaderLanguage:"codeblockHeaderLanguage",codeblockCopyButton:"codeblockCopyButton",codeblockHighlighterWrapper:"codeblockHighlighterWrapper",codeblockHighlighter:"codeblockHighlighter",codeblockCode:"codeblockCode",markdownH1:"markdownH1",markdownH2:"markdownH2",markdownP:"markdownP",markdownLi:"markdownLi",markdownUl:"markdownUl",markdownOl:"markdownOl",markdownLink:"markdownLink",markdownSourceLink:"markdownSourceLink",markdownTable:"markdownTable",markdownTh:"markdownTh",markdownTd:"markdownTd",markdownCode:"markdownCode",markdownInput:"markdownInput",markdownSup:"markdownSup",markdownImg:"markdownImg",markdownHr:"markdownHr"},t={aiChatWrapper:"aiChatWrapper",aiChatRoot:"aiChatRoot",aiChatHeader:"aiChatHeader",aiChatHeader__Toolbar:"aiChatHeader__Toolbar",aiChatHeader__ToolbarHeader:"aiChatHeader__ToolbarHeader",aiChatHeader__ToolbarHeaderWrapper:"aiChatHeader__ToolbarHeaderWrapper",aiChatHeader__ChatHistoryButtonIcon:"aiChatHeader__ChatHistoryButtonIcon",aiChatHeader__ChatHistoryButton:"aiChatHeader__ChatHistoryButton",aiChatContent:"aiChatContent",aiChatContentScrollArea:"aiChatContentScrollArea",aiChatContentScrollArea__Viewport:"aiChatContentScrollArea__Viewport",aiChatContentScrollArea__Scrollbar:"aiChatContentScrollArea__Scrollbar",aiChatContentScrollArea__Thumb:"aiChatContentScrollArea__Thumb",aiChatContentScrollArea__Corner:"aiChatContentScrollArea__Corner",aiChatDisclaimer:"aiChatDisclaimer",aiChatDisclaimerLabel:"aiChatDisclaimerLabel",aiChatDisclaimerTrigger:"aiChatDisclaimerTrigger",aiChatDisclaimerContent:"aiChatDisclaimerContent",aiChatDisclaimerText:"aiChatDisclaimerText",aiChatDisclaimerArrow:"aiChatDisclaimerArrow",aiChatExampleQuestions:"aiChatExampleQuestions",aiChatExampleQuestionsLabel:"aiChatExampleQuestionsLabel",aiChatExampleQuestionsList:"aiChatExampleQuestionsList",aiChatExampleQuestion:"aiChatExampleQuestion",aiChatExampleQuestionButton:"aiChatExampleQuestionButton",aiChatMessages:"aiChatMessages",aiChatMessageWrapper:"aiChatMessageWrapper",aiChatMessageHeader:"aiChatMessageHeader",aiChatMessageLoading:"aiChatMessageLoading",aiChatMessageAvatar:"aiChatMessageAvatar",aiChatMessageAvatarFallback:"aiChatMessageAvatarFallback",aiChatMessageAvatarImage:"aiChatMessageAvatarImage",aiChatMessageAvatarContent:"aiChatMessageAvatarContent",aiChatMessageName:"aiChatMessageName",aiChatMessageContentWrapper:"aiChatMessageContentWrapper",aiChatMessageContent:"aiChatMessageContent",aiChatMessage__Files:"aiChatMessage__Files",aiChatMessage__File:"aiChatMessage__File",aiChatMessagePart:"aiChatMessagePart",aiChatMessageToolbar:"aiChatMessageToolbar",aiChatMessageCustomActions:"aiChatMessageCustomActions",aiChatMessageCustomAction:"aiChatMessageCustomAction",aiChatMessageAction:"aiChatMessageAction",aiChatMessageSources:"aiChatMessageSources",aiChatMessageSources__Header:"aiChatMessageSources__Header",aiChatMessageSources__List:"aiChatMessageSources__List",aiChatMessageSourceItem:"aiChatMessageSourceItem",aiChatMessageSourceItem__Icon:"aiChatMessageSourceItem__Icon",aiChatMessageSourceItem__Breadcrumbs:"aiChatMessageSourceItem__Breadcrumbs",aiChatMessageSourceItem__Breadcrumb:"aiChatMessageSourceItem__Breadcrumb",aiChatMessageSourceItem__BreadcrumbIcon:"aiChatMessageSourceItem__BreadcrumbIcon",aiChatMessageSourceItem__Title:"aiChatMessageSourceItem__Title",aiChatMessageSourceItem__Tag:"aiChatMessageSourceItem__Tag",aiChatMessageSourceItem__Description:"aiChatMessageSourceItem__Description",aiChatMessageSourceItem__DescriptionPart:"aiChatMessageSourceItem__DescriptionPart",aiChatMessageSourceItem__Indicator:"aiChatMessageSourceItem__Indicator",aiChatFooter:"aiChatFooter",aiChatInput__Fieldset:"aiChatInput__Fieldset",aiChatInput__Group:"aiChatInput__Group",aiChatInput:"aiChatInput",aiChatInput__SendButton:"aiChatInput__SendButton",aiChatInput__SendButtonIcon:"aiChatInput__SendButtonIcon",aiChatInput__FileUploadButton:"aiChatInput__FileUploadButton",aiChatInput__FileUploadButtonIcon:"aiChatInput__FileUploadButtonIcon",aiChatInput__FileInput:"aiChatInput__FileInput",aiChatInput__FileList:"aiChatInput__FileList",aiChatInput__FileItem:"aiChatInput__FileItem",aiChatInput__FilePreviewTrigger:"aiChatInput__FilePreviewTrigger",aiChatInput__FileContent:"aiChatInput__FileContent",aiChatInput__FileThumbnail:"aiChatInput__FileThumbnail",aiChatInput__FileName:"aiChatInput__FileName",aiChatInput__FileRemove:"aiChatInput__FileRemove",aiChatInput__FileRemoveIcon:"aiChatInput__FileRemoveIcon",aiChatInput__DropZone:"aiChatInput__DropZone",aiChatInput__Notification:"aiChatInput__Notification",aiChatInput__NotificationContent:"aiChatInput__NotificationContent",aiChatInput__NotificationHeader:"aiChatInput__NotificationHeader",aiChatInput__NotificationTitle:"aiChatInput__NotificationTitle",aiChatInput__NotificationMessage:"aiChatInput__NotificationMessage",aiChatInput__NotificationClose:"aiChatInput__NotificationClose",aiChatActionBar:"aiChatActionBar",aiChat__ChatActions:"aiChat__ChatActions",aiChat__ChatAction:"aiChat__ChatAction",aiChat__ChatActionLabel:"aiChat__ChatActionLabel",aiChat__ChatActionFeeback:"aiChat__ChatActionFeeback",aiChatHelpActions:"aiChatHelpActions",aiChatHelpAction:"aiChatHelpAction",aiChatHelpActions__Trigger:"aiChatHelpActions__Trigger",aiChatHelpActions__Menu:"aiChatHelpActions__Menu",aiChatHelpActions__MenuArrow:"aiChatHelpActions__MenuArrow",aiChatHelpActions__MenuItem:"aiChatHelpActions__MenuItem",aiChatHelpActions_MenuItemIcon:"aiChatHelpActions_MenuItemIcon",aiChatTagline__Container:"aiChatTagline__Container",aiChatTagline__Text:"aiChatTagline__Text",aiChatTagline__Logo:"aiChatTagline__Logo",aiChatTagline__BrandName:"aiChatTagline__BrandName",aiChatFeedbackModal:"aiChatFeedbackModal",aiChatFeedbackModal__Overlay:"aiChatFeedbackModal__Overlay",aiChatFeedbackModal__Content:"aiChatFeedbackModal__Content",aiChatFeedbackModal__Header:"aiChatFeedbackModal__Header",aiChatFeedbackModal__Close:"aiChatFeedbackModal__Close",aiChatFeedbackModal__Body:"aiChatFeedbackModal__Body",aiChatImagePreviewModal:"aiChatImagePreviewModal",aiChatImagePreviewModal__Overlay:"aiChatImagePreviewModal__Overlay",aiChatImagePreviewModal__Content:"aiChatImagePreviewModal__Content",aiChatImagePreviewModal__Image:"aiChatImagePreviewModal__Image",aiChatImagePreviewModal__Footer:"aiChatImagePreviewModal__Footer",aiChatImagePreviewModal__FileName:"aiChatImagePreviewModal__FileName",aiChatImagePreviewModal__Close:"aiChatImagePreviewModal__Close",aiChatFeedbackForm:"aiChatFeedbackForm",aiChatFeedbackItem:"aiChatFeedbackItem",aiChatFeedbackItem__Checkbox:"aiChatFeedbackItem__Checkbox",aiChatFeedbackItem__CheckboxIndicator:"aiChatFeedbackItem__CheckboxIndicator",aiChatFeedbackItem__Label:"aiChatFeedbackItem__Label",aiChatFeedbackItem__Description:"aiChatFeedbackItem__Description",aiChatFeedbackForm__SubmitButton:"aiChatFeedbackForm__SubmitButton",aiChatForm__Wrapper:"aiChatForm__Wrapper",aiChatForm:"aiChatForm",aiChatForm__Close:"aiChatForm__Close",aiChatForm__Header:"aiChatForm__Header",aiChatForm__Heading:"aiChatForm__Heading",aiChatForm__Description:"aiChatForm__Description",aiChatForm__Content:"aiChatForm__Content",aiChatForm__Field:"aiChatForm__Field",aiChatForm__FieldLabel:"aiChatForm__FieldLabel",aiChatForm__FieldText:"aiChatForm__FieldText",aiChatForm__FieldEmail:"aiChatForm__FieldEmail",aiChatForm__FieldFile:"aiChatForm__FieldFile",aiChatForm__FieldTextArea:"aiChatForm__FieldTextArea",aiChatForm__FieldCheckbox:"aiChatForm__FieldCheckbox",aiChatForm__FieldCheckboxIndicator:"aiChatForm__FieldCheckboxIndicator",aiChatForm__FieldSelect:"aiChatForm__FieldSelect",aiChatForm__FieldSelect__Trigger:"aiChatForm__FieldSelect__Trigger",aiChatForm__FieldSelect__Value:"aiChatForm__FieldSelect__Value",aiChatForm__FieldSelect__Icon:"aiChatForm__FieldSelect__Icon",aiChatForm__FieldSelect__Content:"aiChatForm__FieldSelect__Content",aiChatForm__FieldSelect__Viewport:"aiChatForm__FieldSelect__Viewport",aiChatForm__FieldSelect__Item:"aiChatForm__FieldSelect__Item",aiChatForm__FieldSelect__ItemIndicator:"aiChatForm__FieldSelect__ItemIndicator",aiChatForm__FieldSelect__ItemText:"aiChatForm__FieldSelect__ItemText",aiChatForm__FieldCombobox__Control:"aiChatForm__FieldCombobox__Control",aiChatForm__FieldCombobox__Positioner:"aiChatForm__FieldCombobox__Positioner",aiChatForm__FieldCombobox__Input:"aiChatForm__FieldCombobox__Input",aiChatForm__FieldCombobox__Trigger:"aiChatForm__FieldCombobox__Trigger",aiChatForm__FieldCombobox__SelectedTags:"aiChatForm__FieldCombobox__SelectedTags",aiChatForm__FieldCombobox__Content:"aiChatForm__FieldCombobox__Content",aiChatForm__FieldCombobox__List:"aiChatForm__FieldCombobox__List",aiChatForm__FieldCombobox__ListEmpty:"aiChatForm__FieldCombobox__ListEmpty",aiChatForm__FieldCombobox__Item:"aiChatForm__FieldCombobox__Item",aiChatForm__FieldCombobox__ItemText:"aiChatForm__FieldCombobox__ItemText",aiChatForm__FieldCombobox__ItemIndicator:"aiChatForm__FieldCombobox__ItemIndicator",aiChatForm__FieldDescription:"aiChatForm__FieldDescription",aiChatForm__FieldError:"aiChatForm__FieldError",aiChatForm__Error:"aiChatForm__Error",aiChatForm__Footer:"aiChatForm__Footer",aiChatForm__Cancel:"aiChatForm__Cancel",aiChatForm__Submit:"aiChatForm__Submit",aiChatForm__Success:"aiChatForm__Success",aiChatForm__SuccessHeading:"aiChatForm__SuccessHeading",aiChatForm__SuccessMessage:"aiChatForm__SuccessMessage",aiChatForm__SuccessButton:"aiChatForm__SuccessButton",aiChatLink:"aiChatLink"},_={aiSearchWrapper:"aiSearchWrapper",aiSearchRoot:"aiSearchRoot",aiSearchContent:"aiSearchContent",aiSearchInputGroup:"aiSearchInputGroup",aiSearchInputIcon:"aiSearchInputIcon",aiSearchInput:"aiSearchInput",aiSearchLoading:"aiSearchLoading",aiAskAITrigger:"aiAskAITrigger",aiAskAITrigger__Icon:"aiAskAITrigger__Icon",aiAskAITrigger__Label:"aiAskAITrigger__Label",aiAskAITrigger__Query:"aiAskAITrigger__Query",aiAskAITrigger__Indicator:"aiAskAITrigger__Indicator",aiAskAITrigger__IndicatorText:"aiAskAITrigger__IndicatorText",aiSearchResults:"aiSearchResults",aiSearchResults__Loading:"aiSearchResults__Loading",aiSearchResults__Empty:"aiSearchResults__Empty",aiSearchResults__TabList:"aiSearchResults__TabList",aiSearchResults__Tab:"aiSearchResults__Tab",aiSearchResults__Content:"aiSearchResults__Content",aiSearchResults__ScrollArea:"aiSearchResults__ScrollArea",aiSearchResults__ScrollAreaViewport:"aiSearchResults__ScrollAreaViewport",aiSearchResults__List:"aiSearchResults__List",aiSearchResults__Item:"aiSearchResults__Item",aiSearchResults__ItemIcon:"aiSearchResults__ItemIcon",aiSearchResults__ItemBreadcrumbs:"aiSearchResults__ItemBreadcrumbs",aiSearchResults__ItemBreadcrumbIcon:"aiSearchResults__ItemBreadcrumbIcon",aiSearchResults__ItemTitle:"aiSearchResults__ItemTitle",aiSearchResults__ItemTag:"aiSearchResults__ItemTag",aiSearchResults__ItemDescription:"aiSearchResults__ItemDescription",aiSearchResults__ItemDescriptionPart:"aiSearchResults__ItemDescriptionPart",aiSearchResults__ItemIndicator:"aiSearchResults__ItemIndicator",aiSearchResults__ItemPreview:"aiSearchResults__ItemPreview",aiSearchResults__ItemPreview__Header:"aiSearchResults__ItemPreview__Header",aiSearchResults__ItemPreview__Heading:"aiSearchResults__ItemPreview__Heading",aiSearchResults__ItemPreview__Title:"aiSearchResults__ItemPreview__Title",aiSearchResults__ItemPreview__Title__LinkIcon:"aiSearchResults__ItemPreview__Title__LinkIcon",aiSearchResults__ItemPreview__Breadcrumbs:"aiSearchResults__ItemPreview__Breadcrumbs",aiSearchResults__ItemPreview__BreadcrumbIcon:"aiSearchResults__ItemPreview__BreadcrumbIcon",aiSearchResults__ItemPreview__Body:"aiSearchResults__ItemPreview__Body",aiSearchResults__ItemPreview__Outline:"aiSearchResults__ItemPreview__Outline",aiSearchResults__ItemPreview__Outline__Title:"aiSearchResults__ItemPreview__Outline__Title",aiSearchResults__ItemPreview__Outline__List:"aiSearchResults__ItemPreview__Outline__List",aiSearchResults__ItemPreview__Outline__Item:"aiSearchResults__ItemPreview__Outline__Item",aiSearchResults__ItemPreview__Outline__ItemIcon:"aiSearchResults__ItemPreview__Outline__ItemIcon",aiSearchResults__ItemPreview__Outline__ItemText:"aiSearchResults__ItemPreview__Outline__ItemText",aiSearchResults__ItemPreview__Outline__ItemLinkIcon:"aiSearchResults__ItemPreview__Outline__ItemLinkIcon",aiSearchResults__ScrollAreaScrollbar:"aiSearchResults__ScrollAreaScrollbar",aiSearchResults__ScrollAreaThumb:"aiSearchResults__ScrollAreaThumb",aiSearchResults__ScrollAreaCorner:"aiSearchResults__ScrollAreaCorner",aiSearchFooter:"aiSearchFooter",aiSearchTagline__Container:"aiSearchTagline__Container",aiSearchTagline__Text:"aiSearchTagline__Text",aiSearchTagline__Logo:"aiSearchTagline__Logo",aiSearchTagline__BrandName:"aiSearchTagline__BrandName"},i={modal:"modal",modal__Overlay:"modal__Overlay",modal__Content:"modal__Content",modal__Close:"modal__Close"},o={chatButton__Text:"chatButton__Text",chatButton__Button:"chatButton__Button",chatButton__Container:"chatButton__Container",chatButton__AvatarImage:"chatButton__AvatarImage",chatButton__AvatarContent:"chatButton__AvatarContent",chatButton__CloseIcon:"chatButton__CloseIcon"},r={searchBar__Container:"searchBar__Container",searchBar__Button:"searchBar__Button",searchBar__ContentWrapper:"searchBar__ContentWrapper",searchBar__Text:"searchBar__Text",searchBar__Icon:"searchBar__Icon",searchBar__KbdWrapper:"searchBar__KbdWrapper",searchBar__CmdIcon:"searchBar__CmdIcon",searchBar__Ctrl:"searchBar__Ctrl",searchBar__KbdShortcutKey:"searchBar__KbdShortcutKey"},n={sidebarChat__Root:"sidebarChat__Root",sidebarChat__Resizer:"sidebarChat__Resizer",sidebarChat__CloseButton:"sidebarChat__CloseButton",sidebarChat__Header:"sidebarChat__Header"},h={chatBubble__Root:"chatBubble__Root",chatBubble__CloseButton:"chatBubble__CloseButton",chatBubble__Header:"chatBubble__Header"},s={dataSummary__Group:"dataSummary__Group",dataSummary__Toggle:"dataSummary__Toggle",dataSummary__ToggleText:"dataSummary__ToggleText",dataSummary__Collapsible:"dataSummary__Collapsible",dataSummary__List:"dataSummary__List",dataSummary__Item:"dataSummary__Item",dataSummary__Connector:"dataSummary__Connector",dataSummary__IconContainer:"dataSummary__IconContainer",dataSummary__Content:"dataSummary__Content",dataSummary__Details:"dataSummary__Details",dataSummary__Label:"dataSummary__Label"},C={aiChatHistory:"aiChatHistory",aiChatHistory__Header:"aiChatHistory__Header",aiChatHistory__BackButton:"aiChatHistory__BackButton",aiChatHistory__BackButtonIcon:"aiChatHistory__BackButtonIcon",aiChatHistory__Title:"aiChatHistory__Title",aiChatHistory__List:"aiChatHistory__List",aiChatHistory__Item:"aiChatHistory__Item",aiChatHistory__ItemTitle:"aiChatHistory__ItemTitle",aiChatHistory__ItemDate:"aiChatHistory__ItemDate",aiChatHistory__EmptyState:"aiChatHistory__EmptyState",aiChatHistory__LoadingState:"aiChatHistory__LoadingState",aiChatHistory__Footer:"aiChatHistory__Footer",aiChatHistory__NewConversationButton:"aiChatHistory__NewConversationButton"},l={...e,...t,..._,...i,...o,...r,...a,...n,...h,...s,...C};exports.ChatBubbleComponentIds=h;exports.DataSummaryComponentIds=s;exports.SearchBarComponentIds=r;exports.SidebarChatComponentIds=n;exports.aiChatComponentIds=t;exports.aiChatHistoryComponentIds=C;exports.aiSearchComponentIds=_;exports.chatButtonComponentIds=o;exports.componentIDs=l;exports.markDownComponentIds=e;exports.miscellanousComponentIds=a;exports.modalComponentIds=i;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a={icon:"icon",loadingIndicator__Text:"loadingIndicator__Text",loadingIndicator__Dots:"loadingIndicator__Dots",loadingIndicator__Dot:"loadingIndicator__Dot",view_toggle:"view_toggle",view_toggle_button:"view_toggle_button",view_toggle_icon:"view_toggle_icon"},e={codeblockContainer:"codeblockContainer",codeblockHeader:"codeblockHeader",codeblockHeaderLanguage:"codeblockHeaderLanguage",codeblockCopyButton:"codeblockCopyButton",codeblockHighlighterWrapper:"codeblockHighlighterWrapper",codeblockHighlighter:"codeblockHighlighter",codeblockCode:"codeblockCode",markdownH1:"markdownH1",markdownH2:"markdownH2",markdownP:"markdownP",markdownLi:"markdownLi",markdownUl:"markdownUl",markdownOl:"markdownOl",markdownLink:"markdownLink",markdownSourceLink:"markdownSourceLink",markdownTable:"markdownTable",markdownTh:"markdownTh",markdownTd:"markdownTd",markdownCode:"markdownCode",markdownInput:"markdownInput",markdownSup:"markdownSup",markdownImg:"markdownImg",markdownHr:"markdownHr"},t={aiChatWrapper:"aiChatWrapper",aiChatRoot:"aiChatRoot",aiChatHeader:"aiChatHeader",aiChatHeader__Toolbar:"aiChatHeader__Toolbar",aiChatHeader__ToolbarHeader:"aiChatHeader__ToolbarHeader",aiChatHeader__ToolbarHeaderWrapper:"aiChatHeader__ToolbarHeaderWrapper",aiChatHeader__ChatHistoryButtonIcon:"aiChatHeader__ChatHistoryButtonIcon",aiChatHeader__ChatHistoryButton:"aiChatHeader__ChatHistoryButton",aiChatContent:"aiChatContent",aiChatContentScrollArea:"aiChatContentScrollArea",aiChatContentScrollArea__Viewport:"aiChatContentScrollArea__Viewport",aiChatContentScrollArea__Scrollbar:"aiChatContentScrollArea__Scrollbar",aiChatContentScrollArea__Thumb:"aiChatContentScrollArea__Thumb",aiChatContentScrollArea__Corner:"aiChatContentScrollArea__Corner",aiChatDisclaimer:"aiChatDisclaimer",aiChatDisclaimerLabel:"aiChatDisclaimerLabel",aiChatDisclaimerTrigger:"aiChatDisclaimerTrigger",aiChatDisclaimerContent:"aiChatDisclaimerContent",aiChatDisclaimerText:"aiChatDisclaimerText",aiChatDisclaimerArrow:"aiChatDisclaimerArrow",aiChatExampleQuestions:"aiChatExampleQuestions",aiChatExampleQuestionsLabel:"aiChatExampleQuestionsLabel",aiChatExampleQuestionsList:"aiChatExampleQuestionsList",aiChatExampleQuestion:"aiChatExampleQuestion",aiChatExampleQuestionButton:"aiChatExampleQuestionButton",aiChatMessages:"aiChatMessages",aiChatMessageWrapper:"aiChatMessageWrapper",aiChatMessageHeader:"aiChatMessageHeader",aiChatMessageLoading:"aiChatMessageLoading",aiChatMessageAvatar:"aiChatMessageAvatar",aiChatMessageAvatarFallback:"aiChatMessageAvatarFallback",aiChatMessageAvatarImage:"aiChatMessageAvatarImage",aiChatMessageAvatarContent:"aiChatMessageAvatarContent",aiChatMessageName:"aiChatMessageName",aiChatMessageContentWrapper:"aiChatMessageContentWrapper",aiChatMessageContent:"aiChatMessageContent",aiChatMessage__Files:"aiChatMessage__Files",aiChatMessage__File:"aiChatMessage__File",aiChatMessagePart:"aiChatMessagePart",aiChatMessageToolbar:"aiChatMessageToolbar",aiChatMessageCustomActions:"aiChatMessageCustomActions",aiChatMessageCustomAction:"aiChatMessageCustomAction",aiChatMessageAction:"aiChatMessageAction",aiChatMessageSources:"aiChatMessageSources",aiChatMessageSources__Header:"aiChatMessageSources__Header",aiChatMessageSources__List:"aiChatMessageSources__List",aiChatMessageSourceItem:"aiChatMessageSourceItem",aiChatMessageSourceItem__Icon:"aiChatMessageSourceItem__Icon",aiChatMessageSourceItem__Breadcrumbs:"aiChatMessageSourceItem__Breadcrumbs",aiChatMessageSourceItem__Breadcrumb:"aiChatMessageSourceItem__Breadcrumb",aiChatMessageSourceItem__BreadcrumbIcon:"aiChatMessageSourceItem__BreadcrumbIcon",aiChatMessageSourceItem__Title:"aiChatMessageSourceItem__Title",aiChatMessageSourceItem__Tag:"aiChatMessageSourceItem__Tag",aiChatMessageSourceItem__Description:"aiChatMessageSourceItem__Description",aiChatMessageSourceItem__DescriptionPart:"aiChatMessageSourceItem__DescriptionPart",aiChatMessageSourceItem__Indicator:"aiChatMessageSourceItem__Indicator",aiChatFooter:"aiChatFooter",aiChatInput__Fieldset:"aiChatInput__Fieldset",aiChatInput__Group:"aiChatInput__Group",aiChatInput:"aiChatInput",aiChatInput__SendButton:"aiChatInput__SendButton",aiChatInput__SendButtonIcon:"aiChatInput__SendButtonIcon",aiChatInput__FileUploadButton:"aiChatInput__FileUploadButton",aiChatInput__FileUploadButtonIcon:"aiChatInput__FileUploadButtonIcon",aiChatInput__FileInput:"aiChatInput__FileInput",aiChatInput__FileList:"aiChatInput__FileList",aiChatInput__FileItem:"aiChatInput__FileItem",aiChatInput__FilePreviewTrigger:"aiChatInput__FilePreviewTrigger",aiChatInput__FileContent:"aiChatInput__FileContent",aiChatInput__FileThumbnail:"aiChatInput__FileThumbnail",aiChatInput__FileName:"aiChatInput__FileName",aiChatInput__FileRemove:"aiChatInput__FileRemove",aiChatInput__FileRemoveIcon:"aiChatInput__FileRemoveIcon",aiChatInput__DropZone:"aiChatInput__DropZone",aiChatInput__Notification:"aiChatInput__Notification",aiChatInput__NotificationContent:"aiChatInput__NotificationContent",aiChatInput__NotificationHeader:"aiChatInput__NotificationHeader",aiChatInput__NotificationTitle:"aiChatInput__NotificationTitle",aiChatInput__NotificationMessage:"aiChatInput__NotificationMessage",aiChatInput__NotificationClose:"aiChatInput__NotificationClose",aiChatActionBar:"aiChatActionBar",aiChat__ChatActions:"aiChat__ChatActions",aiChat__ChatAction:"aiChat__ChatAction",aiChat__ChatActionLabel:"aiChat__ChatActionLabel",aiChat__ChatActionFeeback:"aiChat__ChatActionFeeback",aiChatHelpActions:"aiChatHelpActions",aiChatHelpAction:"aiChatHelpAction",aiChatHelpActions__Trigger:"aiChatHelpActions__Trigger",aiChatHelpActions__Menu:"aiChatHelpActions__Menu",aiChatHelpActions__MenuArrow:"aiChatHelpActions__MenuArrow",aiChatHelpActions__MenuItem:"aiChatHelpActions__MenuItem",aiChatHelpActions_MenuItemIcon:"aiChatHelpActions_MenuItemIcon",aiChatTagline__Container:"aiChatTagline__Container",aiChatTagline__Text:"aiChatTagline__Text",aiChatTagline__Logo:"aiChatTagline__Logo",aiChatFeedbackModal:"aiChatFeedbackModal",aiChatFeedbackModal__Overlay:"aiChatFeedbackModal__Overlay",aiChatFeedbackModal__Content:"aiChatFeedbackModal__Content",aiChatFeedbackModal__Header:"aiChatFeedbackModal__Header",aiChatFeedbackModal__Close:"aiChatFeedbackModal__Close",aiChatFeedbackModal__Body:"aiChatFeedbackModal__Body",aiChatImagePreviewModal:"aiChatImagePreviewModal",aiChatImagePreviewModal__Overlay:"aiChatImagePreviewModal__Overlay",aiChatImagePreviewModal__Content:"aiChatImagePreviewModal__Content",aiChatImagePreviewModal__Image:"aiChatImagePreviewModal__Image",aiChatImagePreviewModal__Footer:"aiChatImagePreviewModal__Footer",aiChatImagePreviewModal__FileName:"aiChatImagePreviewModal__FileName",aiChatImagePreviewModal__Close:"aiChatImagePreviewModal__Close",aiChatFeedbackForm:"aiChatFeedbackForm",aiChatFeedbackItem:"aiChatFeedbackItem",aiChatFeedbackItem__Checkbox:"aiChatFeedbackItem__Checkbox",aiChatFeedbackItem__CheckboxIndicator:"aiChatFeedbackItem__CheckboxIndicator",aiChatFeedbackItem__Label:"aiChatFeedbackItem__Label",aiChatFeedbackItem__Description:"aiChatFeedbackItem__Description",aiChatFeedbackForm__SubmitButton:"aiChatFeedbackForm__SubmitButton",aiChatForm__Wrapper:"aiChatForm__Wrapper",aiChatForm:"aiChatForm",aiChatForm__Close:"aiChatForm__Close",aiChatForm__Header:"aiChatForm__Header",aiChatForm__Heading:"aiChatForm__Heading",aiChatForm__Description:"aiChatForm__Description",aiChatForm__Content:"aiChatForm__Content",aiChatForm__Field:"aiChatForm__Field",aiChatForm__FieldLabel:"aiChatForm__FieldLabel",aiChatForm__FieldText:"aiChatForm__FieldText",aiChatForm__FieldEmail:"aiChatForm__FieldEmail",aiChatForm__FieldFile:"aiChatForm__FieldFile",aiChatForm__FieldTextArea:"aiChatForm__FieldTextArea",aiChatForm__FieldCheckbox:"aiChatForm__FieldCheckbox",aiChatForm__FieldCheckboxIndicator:"aiChatForm__FieldCheckboxIndicator",aiChatForm__FieldSelect:"aiChatForm__FieldSelect",aiChatForm__FieldSelect__Trigger:"aiChatForm__FieldSelect__Trigger",aiChatForm__FieldSelect__Value:"aiChatForm__FieldSelect__Value",aiChatForm__FieldSelect__Icon:"aiChatForm__FieldSelect__Icon",aiChatForm__FieldSelect__Content:"aiChatForm__FieldSelect__Content",aiChatForm__FieldSelect__Viewport:"aiChatForm__FieldSelect__Viewport",aiChatForm__FieldSelect__Item:"aiChatForm__FieldSelect__Item",aiChatForm__FieldSelect__ItemIndicator:"aiChatForm__FieldSelect__ItemIndicator",aiChatForm__FieldSelect__ItemText:"aiChatForm__FieldSelect__ItemText",aiChatForm__FieldCombobox__Control:"aiChatForm__FieldCombobox__Control",aiChatForm__FieldCombobox__Positioner:"aiChatForm__FieldCombobox__Positioner",aiChatForm__FieldCombobox__Input:"aiChatForm__FieldCombobox__Input",aiChatForm__FieldCombobox__Trigger:"aiChatForm__FieldCombobox__Trigger",aiChatForm__FieldCombobox__SelectedTags:"aiChatForm__FieldCombobox__SelectedTags",aiChatForm__FieldCombobox__Content:"aiChatForm__FieldCombobox__Content",aiChatForm__FieldCombobox__List:"aiChatForm__FieldCombobox__List",aiChatForm__FieldCombobox__ListEmpty:"aiChatForm__FieldCombobox__ListEmpty",aiChatForm__FieldCombobox__Item:"aiChatForm__FieldCombobox__Item",aiChatForm__FieldCombobox__ItemText:"aiChatForm__FieldCombobox__ItemText",aiChatForm__FieldCombobox__ItemIndicator:"aiChatForm__FieldCombobox__ItemIndicator",aiChatForm__FieldDescription:"aiChatForm__FieldDescription",aiChatForm__FieldError:"aiChatForm__FieldError",aiChatForm__Error:"aiChatForm__Error",aiChatForm__Footer:"aiChatForm__Footer",aiChatForm__Cancel:"aiChatForm__Cancel",aiChatForm__Submit:"aiChatForm__Submit",aiChatForm__Success:"aiChatForm__Success",aiChatForm__SuccessHeading:"aiChatForm__SuccessHeading",aiChatForm__SuccessMessage:"aiChatForm__SuccessMessage",aiChatForm__SuccessButton:"aiChatForm__SuccessButton",aiChatLink:"aiChatLink"},_={aiSearchWrapper:"aiSearchWrapper",aiSearchRoot:"aiSearchRoot",aiSearchContent:"aiSearchContent",aiSearchInputGroup:"aiSearchInputGroup",aiSearchInputIcon:"aiSearchInputIcon",aiSearchInput:"aiSearchInput",aiSearchLoading:"aiSearchLoading",aiAskAITrigger:"aiAskAITrigger",aiAskAITrigger__Icon:"aiAskAITrigger__Icon",aiAskAITrigger__Label:"aiAskAITrigger__Label",aiAskAITrigger__Query:"aiAskAITrigger__Query",aiAskAITrigger__Indicator:"aiAskAITrigger__Indicator",aiAskAITrigger__IndicatorText:"aiAskAITrigger__IndicatorText",aiSearchResults:"aiSearchResults",aiSearchResults__Loading:"aiSearchResults__Loading",aiSearchResults__Empty:"aiSearchResults__Empty",aiSearchResults__TabList:"aiSearchResults__TabList",aiSearchResults__Tab:"aiSearchResults__Tab",aiSearchResults__Content:"aiSearchResults__Content",aiSearchResults__ScrollArea:"aiSearchResults__ScrollArea",aiSearchResults__ScrollAreaViewport:"aiSearchResults__ScrollAreaViewport",aiSearchResults__List:"aiSearchResults__List",aiSearchResults__Item:"aiSearchResults__Item",aiSearchResults__ItemIcon:"aiSearchResults__ItemIcon",aiSearchResults__ItemBreadcrumbs:"aiSearchResults__ItemBreadcrumbs",aiSearchResults__ItemBreadcrumbIcon:"aiSearchResults__ItemBreadcrumbIcon",aiSearchResults__ItemTitle:"aiSearchResults__ItemTitle",aiSearchResults__ItemTag:"aiSearchResults__ItemTag",aiSearchResults__ItemDescription:"aiSearchResults__ItemDescription",aiSearchResults__ItemDescriptionPart:"aiSearchResults__ItemDescriptionPart",aiSearchResults__ItemIndicator:"aiSearchResults__ItemIndicator",aiSearchResults__ItemPreview:"aiSearchResults__ItemPreview",aiSearchResults__ItemPreview__Header:"aiSearchResults__ItemPreview__Header",aiSearchResults__ItemPreview__Heading:"aiSearchResults__ItemPreview__Heading",aiSearchResults__ItemPreview__Title:"aiSearchResults__ItemPreview__Title",aiSearchResults__ItemPreview__Title__LinkIcon:"aiSearchResults__ItemPreview__Title__LinkIcon",aiSearchResults__ItemPreview__Breadcrumbs:"aiSearchResults__ItemPreview__Breadcrumbs",aiSearchResults__ItemPreview__BreadcrumbIcon:"aiSearchResults__ItemPreview__BreadcrumbIcon",aiSearchResults__ItemPreview__Body:"aiSearchResults__ItemPreview__Body",aiSearchResults__ItemPreview__Outline:"aiSearchResults__ItemPreview__Outline",aiSearchResults__ItemPreview__Outline__Title:"aiSearchResults__ItemPreview__Outline__Title",aiSearchResults__ItemPreview__Outline__List:"aiSearchResults__ItemPreview__Outline__List",aiSearchResults__ItemPreview__Outline__Item:"aiSearchResults__ItemPreview__Outline__Item",aiSearchResults__ItemPreview__Outline__ItemIcon:"aiSearchResults__ItemPreview__Outline__ItemIcon",aiSearchResults__ItemPreview__Outline__ItemText:"aiSearchResults__ItemPreview__Outline__ItemText",aiSearchResults__ItemPreview__Outline__ItemLinkIcon:"aiSearchResults__ItemPreview__Outline__ItemLinkIcon",aiSearchResults__ScrollAreaScrollbar:"aiSearchResults__ScrollAreaScrollbar",aiSearchResults__ScrollAreaThumb:"aiSearchResults__ScrollAreaThumb",aiSearchResults__ScrollAreaCorner:"aiSearchResults__ScrollAreaCorner",aiSearchFooter:"aiSearchFooter",aiSearchTagline__Container:"aiSearchTagline__Container",aiSearchTagline__Text:"aiSearchTagline__Text",aiSearchTagline__Logo:"aiSearchTagline__Logo"},i={modal:"modal",modal__Overlay:"modal__Overlay",modal__Content:"modal__Content",modal__Close:"modal__Close"},o={chatButton__Text:"chatButton__Text",chatButton__Button:"chatButton__Button",chatButton__Container:"chatButton__Container",chatButton__AvatarImage:"chatButton__AvatarImage",chatButton__AvatarContent:"chatButton__AvatarContent",chatButton__CloseIcon:"chatButton__CloseIcon"},r={searchBar__Container:"searchBar__Container",searchBar__Button:"searchBar__Button",searchBar__ContentWrapper:"searchBar__ContentWrapper",searchBar__Text:"searchBar__Text",searchBar__Icon:"searchBar__Icon",searchBar__KbdWrapper:"searchBar__KbdWrapper",searchBar__CmdIcon:"searchBar__CmdIcon",searchBar__Ctrl:"searchBar__Ctrl",searchBar__KbdShortcutKey:"searchBar__KbdShortcutKey"},n={sidebarChat__Root:"sidebarChat__Root",sidebarChat__Resizer:"sidebarChat__Resizer",sidebarChat__CloseButton:"sidebarChat__CloseButton",sidebarChat__Header:"sidebarChat__Header"},h={chatBubble__Root:"chatBubble__Root",chatBubble__CloseButton:"chatBubble__CloseButton",chatBubble__Header:"chatBubble__Header"},s={dataSummary__Group:"dataSummary__Group",dataSummary__Toggle:"dataSummary__Toggle",dataSummary__ToggleText:"dataSummary__ToggleText",dataSummary__Collapsible:"dataSummary__Collapsible",dataSummary__List:"dataSummary__List",dataSummary__Item:"dataSummary__Item",dataSummary__Connector:"dataSummary__Connector",dataSummary__IconContainer:"dataSummary__IconContainer",dataSummary__Content:"dataSummary__Content",dataSummary__Details:"dataSummary__Details",dataSummary__Label:"dataSummary__Label"},C={aiChatHistory:"aiChatHistory",aiChatHistory__Header:"aiChatHistory__Header",aiChatHistory__BackButton:"aiChatHistory__BackButton",aiChatHistory__BackButtonIcon:"aiChatHistory__BackButtonIcon",aiChatHistory__Title:"aiChatHistory__Title",aiChatHistory__List:"aiChatHistory__List",aiChatHistory__Item:"aiChatHistory__Item",aiChatHistory__ItemTitle:"aiChatHistory__ItemTitle",aiChatHistory__ItemDate:"aiChatHistory__ItemDate",aiChatHistory__EmptyState:"aiChatHistory__EmptyState",aiChatHistory__LoadingState:"aiChatHistory__LoadingState",aiChatHistory__Footer:"aiChatHistory__Footer",aiChatHistory__NewConversationButton:"aiChatHistory__NewConversationButton"},l={...e,...t,..._,...i,...o,...r,...a,...n,...h,...s,...C};exports.ChatBubbleComponentIds=h;exports.DataSummaryComponentIds=s;exports.SearchBarComponentIds=r;exports.SidebarChatComponentIds=n;exports.aiChatComponentIds=t;exports.aiChatHistoryComponentIds=C;exports.aiSearchComponentIds=_;exports.chatButtonComponentIds=o;exports.componentIDs=l;exports.markDownComponentIds=e;exports.miscellanousComponentIds=a;exports.modalComponentIds=i;
@@ -128,7 +128,6 @@ export declare const aiChatComponentIds: {
128
128
  aiChatTagline__Container: "aiChatTagline__Container";
129
129
  aiChatTagline__Text: "aiChatTagline__Text";
130
130
  aiChatTagline__Logo: "aiChatTagline__Logo";
131
- aiChatTagline__BrandName: "aiChatTagline__BrandName";
132
131
  aiChatFeedbackModal: "aiChatFeedbackModal";
133
132
  aiChatFeedbackModal__Overlay: "aiChatFeedbackModal__Overlay";
134
133
  aiChatFeedbackModal__Content: "aiChatFeedbackModal__Content";
@@ -250,7 +249,6 @@ export declare const aiSearchComponentIds: {
250
249
  aiSearchTagline__Container: "aiSearchTagline__Container";
251
250
  aiSearchTagline__Text: "aiSearchTagline__Text";
252
251
  aiSearchTagline__Logo: "aiSearchTagline__Logo";
253
- aiSearchTagline__BrandName: "aiSearchTagline__BrandName";
254
252
  };
255
253
  export declare const modalComponentIds: {
256
254
  modal: "modal";
@@ -427,7 +425,6 @@ export declare const componentIDs: {
427
425
  aiSearchTagline__Container: "aiSearchTagline__Container";
428
426
  aiSearchTagline__Text: "aiSearchTagline__Text";
429
427
  aiSearchTagline__Logo: "aiSearchTagline__Logo";
430
- aiSearchTagline__BrandName: "aiSearchTagline__BrandName";
431
428
  aiChatWrapper: "aiChatWrapper";
432
429
  aiChatRoot: "aiChatRoot";
433
430
  aiChatHeader: "aiChatHeader";
@@ -523,7 +520,6 @@ export declare const componentIDs: {
523
520
  aiChatTagline__Container: "aiChatTagline__Container";
524
521
  aiChatTagline__Text: "aiChatTagline__Text";
525
522
  aiChatTagline__Logo: "aiChatTagline__Logo";
526
- aiChatTagline__BrandName: "aiChatTagline__BrandName";
527
523
  aiChatFeedbackModal: "aiChatFeedbackModal";
528
524
  aiChatFeedbackModal__Overlay: "aiChatFeedbackModal__Overlay";
529
525
  aiChatFeedbackModal__Content: "aiChatFeedbackModal__Content";
@@ -128,7 +128,6 @@ const a = {
128
128
  aiChatTagline__Container: "aiChatTagline__Container",
129
129
  aiChatTagline__Text: "aiChatTagline__Text",
130
130
  aiChatTagline__Logo: "aiChatTagline__Logo",
131
- aiChatTagline__BrandName: "aiChatTagline__BrandName",
132
131
  aiChatFeedbackModal: "aiChatFeedbackModal",
133
132
  aiChatFeedbackModal__Overlay: "aiChatFeedbackModal__Overlay",
134
133
  aiChatFeedbackModal__Content: "aiChatFeedbackModal__Content",
@@ -249,8 +248,7 @@ const a = {
249
248
  aiSearchFooter: "aiSearchFooter",
250
249
  aiSearchTagline__Container: "aiSearchTagline__Container",
251
250
  aiSearchTagline__Text: "aiSearchTagline__Text",
252
- aiSearchTagline__Logo: "aiSearchTagline__Logo",
253
- aiSearchTagline__BrandName: "aiSearchTagline__BrandName"
251
+ aiSearchTagline__Logo: "aiSearchTagline__Logo"
254
252
  }, i = {
255
253
  modal: "modal",
256
254
  modal__Overlay: "modal__Overlay",
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),s=require("../styled/components/embedded-chat.cjs"),a=require("../styled/components/chat-history.cjs"),p=require("../styled/components/modal.cjs"),v=require("../styled/components/shadow.cjs"),I=require("../styled/components/message.cjs"),H=require("../primitives/providers/chat-history-provider.cjs"),g=require("../primitives/providers/config-provider.cjs"),A=require("../primitives/providers/root-provider.cjs"),w=require("../primitives/providers/widget-provider.cjs"),M=require("../primitives/components/embedded-chat/chat-provider.cjs"),f=require("../primitives/components/modal/modal-provider.cjs"),F=require("../primitives/utils/misc.cjs"),E=require("../primitives/atoms/portal-with-theme.cjs"),P=require("../primitives/atoms/error-boundary.cjs"),L=require("./modal.cjs"),B=require("../primitives/providers/image-preview-provider.cjs"),D=require("./widget-toggle.cjs"),k=require("../primitives/components/embedded-chat/file-upload-input.cjs"),i=require("../styled/components/embedded-chat/file-upload-input.cjs"),m=require("../styled/components/embedded-chat/image-preview-modal.cjs");function q(r){const{baseSettings:t,aiChatSettings:n}=r;return e.jsx(P.ErrorBoundary,{children:e.jsx(v.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(A.RootProvider,{config:{baseSettings:t,aiChatSettings:n},componentType:g.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(T,{...r})})})})}function y(r){const{children:t,onToggleView:n,isHidden:o,shouldAutoFocusInput:d=!n}=r;return e.jsx(s.Provider,{isHidden:o,shouldAutoFocusInput:d,children:t})}function T(r){return e.jsx(y,{...r,children:e.jsx(S,{...r})})}function S(r){const{onToggleView:t,variant:n,header:o=W}=r,d=f.useModal(),l=w.useWidget(),x=d&&!l?L.ModalContent:b.Fragment;return e.jsx(B.ImagePreviewProvider,{children:e.jsx(x,{children:e.jsxs(s.Wrapper,{variant:n??(t?"no-shadow":"container-with-shadow"),"data-composite":F.dataAttr(!!r.onToggleView||d?.isOpen),children:[e.jsx(Z,{}),e.jsxs(s.Root,{children:[o&&e.jsx(o,{...r}),e.jsx(N,{}),e.jsx(U,{})]}),e.jsx(z,{}),e.jsx($,{}),e.jsx(J,{})]})})})}const W=r=>{const{onToggleView:t,askAILabel:n,searchLabel:o}=r,{aiChatSettings:d}=g.useInkeepConfig(),l=d.isChatHistoryButtonVisible,x=!!t||l;return e.jsx(s.Header,{"data-show-toolbar":F.dataAttr(x),children:x?e.jsxs(s.HeaderToolbar,{"data-show-widget-toggle":F.dataAttr(!!t),children:[e.jsx(s.HeaderToolbarWrapper,{children:l&&e.jsx(s.ChatHistoryTrigger,{})}),t&&e.jsx(D.WidgetToggle,{onToggleView:t,askAILabel:n,searchLabel:o,view:"chat"}),e.jsx(p.Close,{})]}):e.jsx(p.Close,{})})};function N(){const{isSessionLoading:r}=M.useChat();return e.jsx(s.Content,{children:e.jsxs(s.ContentScrollArea,{children:[e.jsx(s.ContentScrollAreaViewport,{children:r?e.jsx(s.MessagesSessionLoading,{}):e.jsx(_,{})}),e.jsx(s.ContentScrollAreaScrollbar,{children:e.jsx(s.ContentScrollAreaThumb,{})}),e.jsx(s.ContentScrollAreaCorner,{})]})})}function _(){const{aiChatSettings:{components:r}}=g.useInkeepConfig();return e.jsx(s.Messages,{children:({messages:t,isLoading:n,isStreaming:o})=>{const d=t.at(-1),l=(c,j)=>{const h=r?.[c];if(!h)return console.warn(`Component "${c}" not found in components config`),null;try{if(typeof h=="function"&&h.length<=1)return b.createElement(h,j);const u=h(j,document.createElement("div"),null);return b.isValidElement(u)||typeof u=="string"?u:null}catch(u){return console.error(`🔍 [renderComponent] Error rendering component "${c}":`,u),null}},x=c=>e.jsx(s.Markdown,{text:c});return e.jsxs(e.Fragment,{children:[e.jsx(V,{}),t.map(c=>{const j=d?.id===c.id;return e.jsxs(s.MessageWrapper,{message:c,children:[e.jsx(C,{}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:r?.IkpMessage?e.jsx(s.DynamicComponent,{name:"IkpMessage",props:{message:c,renderComponent:l,renderMarkdown:x},componentDef:r.IkpMessage}):e.jsxs(e.Fragment,{children:[e.jsx(I.EmbeddedChatMessagePart,{isLast:j}),(!o||!j)&&e.jsx(O,{})]})}),e.jsx(R,{}),e.jsx(Q,{})]})]},c.id)}),n&&d?.parts.length&&e.jsxs(s.MessageWrapper,{message:{id:"___loader___",role:"assistant",parts:[{type:"text",text:"Thinking..."}]},children:[e.jsx(C,{}),e.jsx(s.MessageLoading,{})]})]})}})}function V(){return e.jsxs(s.IntroMessageWrapper,{children:[e.jsxs(s.MessageHeader,{children:[e.jsx(s.MessageAvatar,{children:e.jsx(s.MessageAvatarContent,{children:e.jsx(s.MessageAvatarImage,{})})}),e.jsx(s.MessageName,{})]}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:e.jsx(I.EmbeddedChatMessagePart,{isLast:!1})}),e.jsxs(s.Disclaimer,{children:[e.jsx(s.DisclaimerLabel,{}),e.jsx(s.DisclaimerTrigger,{}),e.jsxs(s.DisclaimerContent,{children:[e.jsx(s.DisclaimerText,{}),e.jsx(s.DisclaimerArrow,{})]})]}),e.jsxs(s.ExampleQuestions,{children:[e.jsx(s.ExampleQuestionsLabel,{}),e.jsx(s.ExampleQuestionsList,{children:r=>r.map(t=>e.jsx(s.ExampleQuestion,{children:e.jsx(s.ExampleQuestionButton,{question:t})},typeof t=="object"?t.label:t))})]})]})]})}function C(){return e.jsxs(s.MessageHeader,{children:[e.jsx(s.MessageAvatar,{children:e.jsx(s.MessageAvatarContent,{children:e.jsx(s.MessageAvatarImage,{})})}),e.jsx(s.MessageName,{})]})}function $(){return e.jsx(E.PortalWithTheme,{children:e.jsx(m.EmbeddedChatImagePreviewModal,{children:e.jsx(m.EmbeddedChatImagePreviewModalOverlay,{children:e.jsxs(m.EmbeddedChatImagePreviewModalContent,{children:[e.jsx(m.EmbeddedChatImagePreviewModalClose,{}),e.jsx(m.EmbeddedChatImagePreviewModalImage,{}),e.jsx(m.EmbeddedChatImagePreviewModalFooter,{children:e.jsx(m.EmbeddedChatImagePreviewModalFileName,{})})]})})})})}function R(){return e.jsx(i.EmbeddedChatMessageFiles,{children:r=>r.map((t,n)=>{const o=t.url,d=t.mediaType??"",l=d.split("/").pop(),x=t.filename??(l?`untitled.${l}`:"untitled"),c=k.isImageMimeType(d);return e.jsxs(i.EmbeddedChatMessageFile,{url:o,name:x,mediaType:d,children:[c?e.jsx(i.EmbeddedChatFileThumbnail,{}):e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]},o||n)})})}function Q(){return e.jsxs(s.MessageToolbar,{children:[e.jsx(s.MessageCustomActions,{children:r=>r.map((t,n)=>e.jsx(s.MessageCustomAction,{action:t},`action-${n}`))}),e.jsx(s.MessageAction,{action:"copy"}),e.jsx(s.MessageAction,{action:"upvote"}),e.jsx(s.MessageAction,{action:"downvote"})]})}function O(){return e.jsxs(s.MessageSources,{children:[e.jsx(s.MessageSourcesHeader,{}),e.jsx(s.MessageSourcesList,{children:r=>r.map((t,n)=>e.jsxs(s.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(s.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(o=>e.jsxs(b.Fragment,{children:[o,e.jsx(s.MessageSourceItemBreadcrumbIcon,{})]},o))}),e.jsx(s.MessageSourceItemIcon,{}),e.jsx(s.MessageSourceItemTitle,{}),e.jsx(s.MessageSourceItemTag,{}),e.jsx(s.MessageSourceItemDescription,{children:o=>o.map((d,l)=>e.jsx(s.MessageSourceItemDescriptionPart,{part:d},`part-${l}`))}),e.jsx(s.MessageSourceItemIndicator,{})]},n))})]})}function U(){return e.jsxs(s.Footer,{children:[e.jsx(i.EmbeddedChatInputNotification,{children:e.jsxs(i.EmbeddedChatInputNotificationContent,{children:[e.jsxs(i.EmbeddedChatInputNotificationHeader,{children:[e.jsx(i.EmbeddedChatInputNotificationTitle,{}),e.jsx(i.EmbeddedChatInputNotificationClose,{})]}),e.jsx(i.EmbeddedChatInputNotificationMessage,{})]})}),e.jsx(G,{}),e.jsx(K,{})]})}function G(){return e.jsxs(s.InputFieldset,{children:[e.jsx(i.EmbeddedChatFileInput,{}),e.jsx(i.EmbeddedChatDropZone,{children:"Drop files here to add to chat"}),e.jsx(i.EmbeddedChatFileList,{children:r=>r.map((t,n)=>{const o=k.isImageMimeType(t.type);return e.jsxs(i.EmbeddedChatFileItem,{file:t,children:[o?e.jsxs(i.EmbeddedChatFilePreviewTrigger,{children:[e.jsx(i.EmbeddedChatFileThumbnail,{}),e.jsx(i.EmbeddedChatFileName,{})]}):e.jsxs(i.EmbeddedChatFileContent,{children:[e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]}),e.jsx(i.EmbeddedChatFileRemove,{})]},`${t.name}-${t.lastModified}-${n}`)})}),e.jsxs(s.InputGroup,{children:[e.jsx(i.EmbeddedChatFileUploadButton,{}),e.jsx(s.Input,{}),e.jsx(s.SendButton,{children:e.jsx(s.SendButtonIcon,{})})]})]})}function K(){return e.jsxs(s.ActionBar,{children:[e.jsxs(s.TaglineContainer,{children:[e.jsx(s.TaglineText,{}),e.jsx(s.TaglineLogo,{}),e.jsx(s.TaglineBrandName,{})]}),e.jsxs(s.Actions,{children:[e.jsx(s.HelpActions,{children:({pinned:r,unpinned:t})=>e.jsxs(e.Fragment,{children:[r.map(n=>e.jsx(s.HelpAction,{action:n},n.name)),t.length>0&&e.jsx(s.HelpActionsTrigger,{}),e.jsxs(s.HelpActionsMenu,{children:[e.jsx(s.HelpActionsMenuArrow,{}),t.map(n=>e.jsxs(s.HelpActionsMenuItem,{action:n,children:[e.jsx(s.HelpActionsMenuItemIcon,{action:n}),n.name]},n.name))]})]})}),e.jsxs(s.ChatAction,{action:"copy",children:[e.jsx(s.ChatActionLabel,{action:"copy"}),e.jsx(s.ChatActionFeedback,{action:"copy"})]}),e.jsx(s.ChatAction,{action:"clear"}),e.jsx(s.ChatAction,{action:"stop"})]})]})}function Z(){const{sessions:r}=H.useChatHistory(),{conversationId:t}=M.useChat();return e.jsxs(a.EmbeddedChatHistoryRoot,{children:[e.jsxs(a.EmbeddedChatHistoryHeader,{children:[e.jsxs(a.EmbeddedChatHistoryBackButton,{children:[e.jsx(a.EmbeddedChatHistoryBackButtonIcon,{iconKey:"backToChat"}),"Back to chat"]}),e.jsx(a.EmbeddedChatHistoryTitle,{}),e.jsx(p.Close,{})]}),e.jsxs(a.EmbeddedChatHistoryList,{children:[r.map(n=>e.jsxs(a.EmbeddedChatHistoryItem,{sessionId:n.id,"data-active":F.dataAttr(n.id===t),children:[e.jsx(a.EmbeddedChatHistoryItemTitle,{children:n.title}),e.jsx(a.EmbeddedChatHistoryItemDate,{children:a.formatSessionDate(n.updatedAt)})]},n.id)),e.jsx(a.EmbeddedChatHistoryEmptyState,{}),e.jsx(a.EmbeddedChatHistoryLoadingState,{})]}),e.jsx(a.EmbeddedChatHistoryFooter,{children:e.jsx(a.EmbeddedChatHistoryNewConversationButton,{})})]})}function z(){return e.jsx(E.PortalWithTheme,{children:e.jsx(s.FeedbackModal,{children:e.jsx(s.FeedbackModalOverlay,{children:e.jsxs(s.FeedbackModalContent,{children:[e.jsx(s.FeedbackModalHeader,{}),e.jsx(s.FeedbackModalClose,{}),e.jsx(s.FeedbackModalBody,{children:e.jsxs(s.FeedbackForm,{children:[e.jsxs(s.FeedbackItem,{name:"unrelated_response",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{})]}),e.jsx(s.FeedbackSubmitButton,{})]})})]})})})})}function J(){return e.jsxs(s.FormWrapper,{children:[e.jsx(s.FormClose,{}),e.jsxs(s.Form,{children:[e.jsxs(s.FormHeader,{children:[e.jsx(s.FormHeading,{}),e.jsx(s.FormDescription,{})]}),e.jsx(s.FormContent,{children:r=>e.jsxs(e.Fragment,{children:[r.map((t,n)=>e.jsxs(s.FormField,{field:t,autoFocus:n===0,children:[e.jsx(s.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(s.FormFieldText,{}),t.inputType==="email"&&e.jsx(s.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(s.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(s.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(s.FormFieldCheckbox,{children:e.jsx(s.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(s.FormFieldSelect,{children:[e.jsxs(s.FormFieldSelectTrigger,{children:[e.jsx(s.FormFieldSelectValue,{}),e.jsx(s.FormFieldSelectIcon,{})]}),e.jsx(s.FormFieldSelectContent,{children:e.jsx(s.FormFieldSelectViewport,{children:t.items.map(o=>e.jsxs(s.FormFieldSelectItem,{value:o.value,children:[e.jsx(s.FormFieldSelectItemText,{children:o.label}),e.jsx(s.FormFieldSelectItemIndicator,{})]},o.value))})})]}),t.inputType==="combobox"&&e.jsxs(s.FormFieldCombobox,{children:[e.jsxs(s.FormFieldComboboxControl,{children:["multiple"in t&&t.multiple&&e.jsx(s.FormFieldComboboxSelectedTags,{}),e.jsx(s.FormFieldComboboxInput,{}),e.jsx(s.FormFieldComboboxTrigger,{})]}),e.jsx(s.FormFieldComboboxPositioner,{children:e.jsx(s.FormFieldComboboxContent,{children:e.jsx(s.FormFieldComboboxList,{children:e.jsx(s.FormFieldComboboxListItems,{children:o=>o.length===0?e.jsx(s.FormFieldComboboxListEmpty,{}):o.map(d=>e.jsxs(s.FormFieldComboboxItem,{item:d,children:[e.jsx(s.FormFieldComboboxItemText,{children:d.label}),e.jsx(s.FormFieldComboboxItemIndicator,{})]},d.value))})})})})]}),e.jsx(s.FormFieldDescription,{}),e.jsx(s.FormFieldError,{})]},t.name)),e.jsx(s.FormError,{})]})}),e.jsxs(s.FormFooter,{children:[e.jsx(s.FormCancel,{}),e.jsx(s.FormSubmit,{})]})]}),e.jsxs(s.FormSuccess,{children:[e.jsx(s.FormSuccessHeading,{}),e.jsx(s.FormSuccessMessage,{}),e.jsx(s.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=q;exports.InkeepEmbeddedChatImpl=T;exports.InkeepEmbeddedChatImplContent=S;exports.InkeepEmbeddedChatProvider=y;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("react"),s=require("../styled/components/embedded-chat.cjs"),a=require("../styled/components/chat-history.cjs"),p=require("../styled/components/modal.cjs"),v=require("../styled/components/shadow.cjs"),I=require("../styled/components/message.cjs"),H=require("../primitives/providers/chat-history-provider.cjs"),g=require("../primitives/providers/config-provider.cjs"),A=require("../primitives/providers/root-provider.cjs"),w=require("../primitives/providers/widget-provider.cjs"),M=require("../primitives/components/embedded-chat/chat-provider.cjs"),f=require("../primitives/components/modal/modal-provider.cjs"),F=require("../primitives/utils/misc.cjs"),E=require("../primitives/atoms/portal-with-theme.cjs"),P=require("../primitives/atoms/error-boundary.cjs"),L=require("./modal.cjs"),B=require("../primitives/providers/image-preview-provider.cjs"),D=require("./widget-toggle.cjs"),k=require("../primitives/components/embedded-chat/file-upload-input.cjs"),i=require("../styled/components/embedded-chat/file-upload-input.cjs"),m=require("../styled/components/embedded-chat/image-preview-modal.cjs");function q(r){const{baseSettings:t,aiChatSettings:n}=r;return e.jsx(P.ErrorBoundary,{children:e.jsx(v.Shadow,{wrapperStyles:{height:"inherit",width:"inherit"},children:e.jsx(A.RootProvider,{config:{baseSettings:t,aiChatSettings:n},componentType:g.WebWidgetInteractionType.EmbeddedChat,children:e.jsx(T,{...r})})})})}function y(r){const{children:t,onToggleView:n,isHidden:o,shouldAutoFocusInput:d=!n}=r;return e.jsx(s.Provider,{isHidden:o,shouldAutoFocusInput:d,children:t})}function T(r){return e.jsx(y,{...r,children:e.jsx(S,{...r})})}function S(r){const{onToggleView:t,variant:n,header:o=W}=r,d=f.useModal(),l=w.useWidget(),x=d&&!l?L.ModalContent:b.Fragment;return e.jsx(B.ImagePreviewProvider,{children:e.jsx(x,{children:e.jsxs(s.Wrapper,{variant:n??(t?"no-shadow":"container-with-shadow"),"data-composite":F.dataAttr(!!r.onToggleView||d?.isOpen),children:[e.jsx(Z,{}),e.jsxs(s.Root,{children:[o&&e.jsx(o,{...r}),e.jsx(N,{}),e.jsx(U,{})]}),e.jsx(z,{}),e.jsx($,{}),e.jsx(J,{})]})})})}const W=r=>{const{onToggleView:t,askAILabel:n,searchLabel:o}=r,{aiChatSettings:d}=g.useInkeepConfig(),l=d.isChatHistoryButtonVisible,x=!!t||l;return e.jsx(s.Header,{"data-show-toolbar":F.dataAttr(x),children:x?e.jsxs(s.HeaderToolbar,{"data-show-widget-toggle":F.dataAttr(!!t),children:[e.jsx(s.HeaderToolbarWrapper,{children:l&&e.jsx(s.ChatHistoryTrigger,{})}),t&&e.jsx(D.WidgetToggle,{onToggleView:t,askAILabel:n,searchLabel:o,view:"chat"}),e.jsx(p.Close,{})]}):e.jsx(p.Close,{})})};function N(){const{isSessionLoading:r}=M.useChat();return e.jsx(s.Content,{children:e.jsxs(s.ContentScrollArea,{children:[e.jsx(s.ContentScrollAreaViewport,{children:r?e.jsx(s.MessagesSessionLoading,{}):e.jsx(_,{})}),e.jsx(s.ContentScrollAreaScrollbar,{children:e.jsx(s.ContentScrollAreaThumb,{})}),e.jsx(s.ContentScrollAreaCorner,{})]})})}function _(){const{aiChatSettings:{components:r}}=g.useInkeepConfig();return e.jsx(s.Messages,{children:({messages:t,isLoading:n,isStreaming:o})=>{const d=t.at(-1),l=(c,j)=>{const h=r?.[c];if(!h)return console.warn(`Component "${c}" not found in components config`),null;try{if(typeof h=="function"&&h.length<=1)return b.createElement(h,j);const u=h(j,document.createElement("div"),null);return b.isValidElement(u)||typeof u=="string"?u:null}catch(u){return console.error(`🔍 [renderComponent] Error rendering component "${c}":`,u),null}},x=c=>e.jsx(s.Markdown,{text:c});return e.jsxs(e.Fragment,{children:[e.jsx(V,{}),t.map(c=>{const j=d?.id===c.id;return e.jsxs(s.MessageWrapper,{message:c,children:[e.jsx(C,{}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:r?.IkpMessage?e.jsx(s.DynamicComponent,{name:"IkpMessage",props:{message:c,renderComponent:l,renderMarkdown:x},componentDef:r.IkpMessage}):e.jsxs(e.Fragment,{children:[e.jsx(I.EmbeddedChatMessagePart,{isLast:j}),(!o||!j)&&e.jsx(O,{})]})}),e.jsx(R,{}),e.jsx(Q,{})]})]},c.id)}),n&&d?.parts.length&&e.jsxs(s.MessageWrapper,{message:{id:"___loader___",role:"assistant",parts:[{type:"text",text:"Thinking..."}]},children:[e.jsx(C,{}),e.jsx(s.MessageLoading,{})]})]})}})}function V(){return e.jsxs(s.IntroMessageWrapper,{children:[e.jsxs(s.MessageHeader,{children:[e.jsx(s.MessageAvatar,{children:e.jsx(s.MessageAvatarContent,{children:e.jsx(s.MessageAvatarImage,{})})}),e.jsx(s.MessageName,{})]}),e.jsxs(s.MessageContentWrapper,{children:[e.jsx(s.MessageContent,{children:e.jsx(I.EmbeddedChatMessagePart,{isLast:!1})}),e.jsxs(s.Disclaimer,{children:[e.jsx(s.DisclaimerLabel,{}),e.jsx(s.DisclaimerTrigger,{}),e.jsxs(s.DisclaimerContent,{children:[e.jsx(s.DisclaimerText,{}),e.jsx(s.DisclaimerArrow,{})]})]}),e.jsxs(s.ExampleQuestions,{children:[e.jsx(s.ExampleQuestionsLabel,{}),e.jsx(s.ExampleQuestionsList,{children:r=>r.map(t=>e.jsx(s.ExampleQuestion,{children:e.jsx(s.ExampleQuestionButton,{question:t})},typeof t=="object"?t.label:t))})]})]})]})}function C(){return e.jsxs(s.MessageHeader,{children:[e.jsx(s.MessageAvatar,{children:e.jsx(s.MessageAvatarContent,{children:e.jsx(s.MessageAvatarImage,{})})}),e.jsx(s.MessageName,{})]})}function $(){return e.jsx(E.PortalWithTheme,{children:e.jsx(m.EmbeddedChatImagePreviewModal,{children:e.jsx(m.EmbeddedChatImagePreviewModalOverlay,{children:e.jsxs(m.EmbeddedChatImagePreviewModalContent,{children:[e.jsx(m.EmbeddedChatImagePreviewModalClose,{}),e.jsx(m.EmbeddedChatImagePreviewModalImage,{}),e.jsx(m.EmbeddedChatImagePreviewModalFooter,{children:e.jsx(m.EmbeddedChatImagePreviewModalFileName,{})})]})})})})}function R(){return e.jsx(i.EmbeddedChatMessageFiles,{children:r=>r.map((t,n)=>{const o=t.url,d=t.mediaType??"",l=d.split("/").pop(),x=t.filename??(l?`untitled.${l}`:"untitled"),c=k.isImageMimeType(d);return e.jsxs(i.EmbeddedChatMessageFile,{url:o,name:x,mediaType:d,children:[c?e.jsx(i.EmbeddedChatFileThumbnail,{}):e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]},o||n)})})}function Q(){return e.jsxs(s.MessageToolbar,{children:[e.jsx(s.MessageCustomActions,{children:r=>r.map((t,n)=>e.jsx(s.MessageCustomAction,{action:t},`action-${n}`))}),e.jsx(s.MessageAction,{action:"copy"}),e.jsx(s.MessageAction,{action:"upvote"}),e.jsx(s.MessageAction,{action:"downvote"})]})}function O(){return e.jsxs(s.MessageSources,{children:[e.jsx(s.MessageSourcesHeader,{}),e.jsx(s.MessageSourcesList,{children:r=>r.map((t,n)=>e.jsxs(s.MessageSourceItem,{href:t.url,source:t,children:[e.jsx(s.MessageSourceItemBreadcrumbs,{children:t.breadcrumbs?.map(o=>e.jsxs(b.Fragment,{children:[o,e.jsx(s.MessageSourceItemBreadcrumbIcon,{})]},o))}),e.jsx(s.MessageSourceItemIcon,{}),e.jsx(s.MessageSourceItemTitle,{}),e.jsx(s.MessageSourceItemTag,{}),e.jsx(s.MessageSourceItemDescription,{children:o=>o.map((d,l)=>e.jsx(s.MessageSourceItemDescriptionPart,{part:d},`part-${l}`))}),e.jsx(s.MessageSourceItemIndicator,{})]},n))})]})}function U(){return e.jsxs(s.Footer,{children:[e.jsx(i.EmbeddedChatInputNotification,{children:e.jsxs(i.EmbeddedChatInputNotificationContent,{children:[e.jsxs(i.EmbeddedChatInputNotificationHeader,{children:[e.jsx(i.EmbeddedChatInputNotificationTitle,{}),e.jsx(i.EmbeddedChatInputNotificationClose,{})]}),e.jsx(i.EmbeddedChatInputNotificationMessage,{})]})}),e.jsx(G,{}),e.jsx(K,{})]})}function G(){return e.jsxs(s.InputFieldset,{children:[e.jsx(i.EmbeddedChatFileInput,{}),e.jsx(i.EmbeddedChatDropZone,{children:"Drop files here to add to chat"}),e.jsx(i.EmbeddedChatFileList,{children:r=>r.map((t,n)=>{const o=k.isImageMimeType(t.type);return e.jsxs(i.EmbeddedChatFileItem,{file:t,children:[o?e.jsxs(i.EmbeddedChatFilePreviewTrigger,{children:[e.jsx(i.EmbeddedChatFileThumbnail,{}),e.jsx(i.EmbeddedChatFileName,{})]}):e.jsxs(i.EmbeddedChatFileContent,{children:[e.jsx(i.EmbeddedChatFileTypeIcon,{}),e.jsx(i.EmbeddedChatFileName,{})]}),e.jsx(i.EmbeddedChatFileRemove,{})]},`${t.name}-${t.lastModified}-${n}`)})}),e.jsxs(s.InputGroup,{children:[e.jsx(i.EmbeddedChatFileUploadButton,{}),e.jsx(s.Input,{}),e.jsx(s.SendButton,{children:e.jsx(s.SendButtonIcon,{})})]})]})}function K(){return e.jsxs(s.ActionBar,{children:[e.jsxs(s.TaglineContainer,{children:[e.jsx(s.TaglineText,{}),e.jsx(s.TaglineLogo,{})]}),e.jsxs(s.Actions,{children:[e.jsx(s.HelpActions,{children:({pinned:r,unpinned:t})=>e.jsxs(e.Fragment,{children:[r.map(n=>e.jsx(s.HelpAction,{action:n},n.name)),t.length>0&&e.jsx(s.HelpActionsTrigger,{}),e.jsxs(s.HelpActionsMenu,{children:[e.jsx(s.HelpActionsMenuArrow,{}),t.map(n=>e.jsxs(s.HelpActionsMenuItem,{action:n,children:[e.jsx(s.HelpActionsMenuItemIcon,{action:n}),n.name]},n.name))]})]})}),e.jsxs(s.ChatAction,{action:"copy",children:[e.jsx(s.ChatActionLabel,{action:"copy"}),e.jsx(s.ChatActionFeedback,{action:"copy"})]}),e.jsx(s.ChatAction,{action:"clear"}),e.jsx(s.ChatAction,{action:"stop"})]})]})}function Z(){const{sessions:r}=H.useChatHistory(),{conversationId:t}=M.useChat();return e.jsxs(a.EmbeddedChatHistoryRoot,{children:[e.jsxs(a.EmbeddedChatHistoryHeader,{children:[e.jsxs(a.EmbeddedChatHistoryBackButton,{children:[e.jsx(a.EmbeddedChatHistoryBackButtonIcon,{iconKey:"backToChat"}),"Back to chat"]}),e.jsx(a.EmbeddedChatHistoryTitle,{}),e.jsx(p.Close,{})]}),e.jsxs(a.EmbeddedChatHistoryList,{children:[r.map(n=>e.jsxs(a.EmbeddedChatHistoryItem,{sessionId:n.id,"data-active":F.dataAttr(n.id===t),children:[e.jsx(a.EmbeddedChatHistoryItemTitle,{children:n.title}),e.jsx(a.EmbeddedChatHistoryItemDate,{children:a.formatSessionDate(n.updatedAt)})]},n.id)),e.jsx(a.EmbeddedChatHistoryEmptyState,{}),e.jsx(a.EmbeddedChatHistoryLoadingState,{})]}),e.jsx(a.EmbeddedChatHistoryFooter,{children:e.jsx(a.EmbeddedChatHistoryNewConversationButton,{})})]})}function z(){return e.jsx(E.PortalWithTheme,{children:e.jsx(s.FeedbackModal,{children:e.jsx(s.FeedbackModalOverlay,{children:e.jsxs(s.FeedbackModalContent,{children:[e.jsx(s.FeedbackModalHeader,{}),e.jsx(s.FeedbackModalClose,{}),e.jsx(s.FeedbackModalBody,{children:e.jsxs(s.FeedbackForm,{children:[e.jsxs(s.FeedbackItem,{name:"unrelated_response",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"inaccurate_statement",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"inaccurate_code_snippet",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{}),e.jsx(s.FeedbackItemDescription,{})]}),e.jsxs(s.FeedbackItem,{name:"irrelevant_citations",children:[e.jsx(s.FeedbackItemCheckbox,{children:e.jsx(s.FeedbackItemCheckboxIndicator,{})}),e.jsx(s.FeedbackItemLabel,{})]}),e.jsx(s.FeedbackSubmitButton,{})]})})]})})})})}function J(){return e.jsxs(s.FormWrapper,{children:[e.jsx(s.FormClose,{}),e.jsxs(s.Form,{children:[e.jsxs(s.FormHeader,{children:[e.jsx(s.FormHeading,{}),e.jsx(s.FormDescription,{})]}),e.jsx(s.FormContent,{children:r=>e.jsxs(e.Fragment,{children:[r.map((t,n)=>e.jsxs(s.FormField,{field:t,autoFocus:n===0,children:[e.jsx(s.FormFieldLabel,{}),t.inputType==="text"&&e.jsx(s.FormFieldText,{}),t.inputType==="email"&&e.jsx(s.FormFieldEmail,{}),t.inputType==="file"&&e.jsx(s.FormFieldFile,{}),t.inputType==="textarea"&&e.jsx(s.FormFieldTextArea,{}),t.inputType==="checkbox"&&e.jsx(s.FormFieldCheckbox,{children:e.jsx(s.FormFieldCheckboxIndicator,{})}),t.inputType==="select"&&e.jsxs(s.FormFieldSelect,{children:[e.jsxs(s.FormFieldSelectTrigger,{children:[e.jsx(s.FormFieldSelectValue,{}),e.jsx(s.FormFieldSelectIcon,{})]}),e.jsx(s.FormFieldSelectContent,{children:e.jsx(s.FormFieldSelectViewport,{children:t.items.map(o=>e.jsxs(s.FormFieldSelectItem,{value:o.value,children:[e.jsx(s.FormFieldSelectItemText,{children:o.label}),e.jsx(s.FormFieldSelectItemIndicator,{})]},o.value))})})]}),t.inputType==="combobox"&&e.jsxs(s.FormFieldCombobox,{children:[e.jsxs(s.FormFieldComboboxControl,{children:["multiple"in t&&t.multiple&&e.jsx(s.FormFieldComboboxSelectedTags,{}),e.jsx(s.FormFieldComboboxInput,{}),e.jsx(s.FormFieldComboboxTrigger,{})]}),e.jsx(s.FormFieldComboboxPositioner,{children:e.jsx(s.FormFieldComboboxContent,{children:e.jsx(s.FormFieldComboboxList,{children:e.jsx(s.FormFieldComboboxListItems,{children:o=>o.length===0?e.jsx(s.FormFieldComboboxListEmpty,{}):o.map(d=>e.jsxs(s.FormFieldComboboxItem,{item:d,children:[e.jsx(s.FormFieldComboboxItemText,{children:d.label}),e.jsx(s.FormFieldComboboxItemIndicator,{})]},d.value))})})})})]}),e.jsx(s.FormFieldDescription,{}),e.jsx(s.FormFieldError,{})]},t.name)),e.jsx(s.FormError,{})]})}),e.jsxs(s.FormFooter,{children:[e.jsx(s.FormCancel,{}),e.jsx(s.FormSubmit,{})]})]}),e.jsxs(s.FormSuccess,{children:[e.jsx(s.FormSuccessHeading,{}),e.jsx(s.FormSuccessMessage,{}),e.jsx(s.FormSuccessButton,{})]})]})}exports.InkeepEmbeddedChat=q;exports.InkeepEmbeddedChatImpl=T;exports.InkeepEmbeddedChatImplContent=S;exports.InkeepEmbeddedChatProvider=y;