@burdenoff/website-sdk 2026.829.5 → 2026.829.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.
package/dist/index.js CHANGED
@@ -4798,6 +4798,12 @@ var EN = {
4798
4798
  disclaimerShort: "Grounded in our docs \u2014 check anything important.",
4799
4799
  dictate: "Dictate your question",
4800
4800
  stopDictating: "Stop dictating",
4801
+ attach: "Attach files",
4802
+ attachHint: "Up to {{max}} files, {{size}} MB each",
4803
+ removeAttachment: "Remove {{name}}",
4804
+ attachmentNameOnly: "name and type only",
4805
+ attachmentTooLarge: "{{name}} is larger than {{size}} MB and was not attached.",
4806
+ attachmentTooMany: "Only {{max}} files can be attached, so {{name}} was skipped.",
4801
4807
  noAnswer: "I couldn't find this in our documentation, so the answer below is not grounded in a source. Try rephrasing, or",
4802
4808
  askHuman: "ask a human",
4803
4809
  prevSuggestion: "Previous suggestion",
@@ -4840,6 +4846,12 @@ var ZH = {
4840
4846
  disclaimerShort: "\u5185\u5BB9\u57FA\u4E8E\u6211\u4EEC\u7684\u6587\u6863\uFF0C\u91CD\u8981\u4FE1\u606F\u8BF7\u81EA\u884C\u6838\u5BF9\u3002",
4841
4847
  dictate: "\u8BED\u97F3\u8F93\u5165",
4842
4848
  stopDictating: "\u505C\u6B62\u8BED\u97F3\u8F93\u5165",
4849
+ attach: "\u6DFB\u52A0\u6587\u4EF6",
4850
+ attachHint: "\u6700\u591A {{max}} \u4E2A\u6587\u4EF6\uFF0C\u6BCF\u4E2A\u4E0D\u8D85\u8FC7 {{size}} MB",
4851
+ removeAttachment: "\u79FB\u9664 {{name}}",
4852
+ attachmentNameOnly: "\u4EC5\u6587\u4EF6\u540D\u548C\u7C7B\u578B",
4853
+ attachmentTooLarge: "{{name}} \u8D85\u8FC7 {{size}} MB\uFF0C\u672A\u80FD\u6DFB\u52A0\u3002",
4854
+ attachmentTooMany: "\u6700\u591A\u53EA\u80FD\u6DFB\u52A0 {{max}} \u4E2A\u6587\u4EF6\uFF0C\u5DF2\u8DF3\u8FC7 {{name}}\u3002",
4843
4855
  noAnswer: "\u6211\u5728\u6587\u6863\u4E2D\u6CA1\u6709\u627E\u5230\u76F8\u5173\u5185\u5BB9\uFF0C\u4E0B\u9762\u7684\u56DE\u7B54\u6CA1\u6709\u6765\u6E90\u652F\u6301\u3002\u8BF7\u6362\u4E2A\u8BF4\u6CD5\uFF0C\u6216",
4844
4856
  askHuman: "\u8054\u7CFB\u6211\u4EEC",
4845
4857
  prevSuggestion: "\u4E0A\u4E00\u4E2A\u5EFA\u8BAE",
@@ -4878,6 +4890,12 @@ var HI = {
4878
4890
  disclaimerShort: "\u092F\u0939 \u0939\u092E\u093E\u0930\u0947 \u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C\u094B\u0902 \u092A\u0930 \u0906\u0927\u093E\u0930\u093F\u0924 \u0939\u0948 \u2014 \u092E\u0939\u0924\u094D\u0935\u092A\u0942\u0930\u094D\u0923 \u092C\u093E\u0924\u0947\u0902 \u091C\u093C\u0930\u0942\u0930 \u091C\u093E\u0901\u091A \u0932\u0947\u0902\u0964",
4879
4891
  dictate: "\u092C\u094B\u0932\u0915\u0930 \u092A\u0942\u091B\u0947\u0902",
4880
4892
  stopDictating: "\u092C\u094B\u0932\u0928\u093E \u092C\u0902\u0926 \u0915\u0930\u0947\u0902",
4893
+ attach: "\u092B\u093C\u093E\u0907\u0932\u0947\u0902 \u091C\u094B\u0921\u093C\u0947\u0902",
4894
+ attachHint: "\u0905\u0927\u093F\u0915\u0924\u092E {{max}} \u092B\u093C\u093E\u0907\u0932\u0947\u0902, \u092A\u094D\u0930\u0924\u094D\u092F\u0947\u0915 {{size}} MB \u0924\u0915",
4895
+ removeAttachment: "{{name}} \u0939\u091F\u093E\u090F\u0901",
4896
+ attachmentNameOnly: "\u0915\u0947\u0935\u0932 \u0928\u093E\u092E \u0914\u0930 \u092A\u094D\u0930\u0915\u093E\u0930",
4897
+ attachmentTooLarge: "{{name}} {{size}} MB \u0938\u0947 \u092C\u0921\u093C\u0940 \u0939\u0948, \u0907\u0938\u0932\u093F\u090F \u091C\u094B\u0921\u093C\u0940 \u0928\u0939\u0940\u0902 \u0917\u0908\u0964",
4898
+ attachmentTooMany: "\u0915\u0947\u0935\u0932 {{max}} \u092B\u093C\u093E\u0907\u0932\u0947\u0902 \u091C\u094B\u0921\u093C\u0940 \u091C\u093E \u0938\u0915\u0924\u0940 \u0939\u0948\u0902, \u0907\u0938\u0932\u093F\u090F {{name}} \u091B\u094B\u0921\u093C \u0926\u0940 \u0917\u0908\u0964",
4881
4899
  noAnswer: "\u092F\u0939 \u092E\u0941\u091D\u0947 \u0939\u092E\u093E\u0930\u0947 \u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C\u094B\u0902 \u092E\u0947\u0902 \u0928\u0939\u0940\u0902 \u092E\u093F\u0932\u093E, \u0907\u0938\u0932\u093F\u090F \u0928\u0940\u091A\u0947 \u0926\u093F\u092F\u093E \u0909\u0924\u094D\u0924\u0930 \u0915\u093F\u0938\u0940 \u0938\u094D\u0930\u094B\u0924 \u092A\u0930 \u0906\u0927\u093E\u0930\u093F\u0924 \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0926\u0942\u0938\u0930\u0947 \u0936\u092C\u094D\u0926\u094B\u0902 \u092E\u0947\u0902 \u092A\u0942\u091B\u0947\u0902, \u092F\u093E",
4882
4900
  askHuman: "\u0939\u092E\u0938\u0947 \u0938\u0902\u092A\u0930\u094D\u0915 \u0915\u0930\u0947\u0902",
4883
4901
  prevSuggestion: "\u092A\u093F\u091B\u0932\u093E \u0938\u0941\u091D\u093E\u0935",
@@ -4920,6 +4938,12 @@ var ES = {
4920
4938
  disclaimerShort: "Basado en nuestra documentaci\xF3n: comprueba cualquier dato importante.",
4921
4939
  dictate: "Dictar tu pregunta",
4922
4940
  stopDictating: "Dejar de dictar",
4941
+ attach: "Adjuntar archivos",
4942
+ attachHint: "Hasta {{max}} archivos, {{size}} MB cada uno",
4943
+ removeAttachment: "Quitar {{name}}",
4944
+ attachmentNameOnly: "solo nombre y tipo",
4945
+ attachmentTooLarge: "{{name}} supera los {{size}} MB y no se adjunt\xF3.",
4946
+ attachmentTooMany: "Solo se pueden adjuntar {{max}} archivos, as\xED que se omiti\xF3 {{name}}.",
4923
4947
  noAnswer: "No he encontrado esto en nuestra documentaci\xF3n, as\xED que la respuesta de abajo no se apoya en ninguna fuente. Prueba a reformularla, o",
4924
4948
  askHuman: "habla con una persona",
4925
4949
  prevSuggestion: "Sugerencia anterior",
@@ -4962,6 +4986,12 @@ var AR = {
4962
4986
  disclaimerShort: "\u0645\u0628\u0646\u064A \u0639\u0644\u0649 \u0648\u062B\u0627\u0626\u0642\u0646\u0627 \u2014 \u062A\u062D\u0642\u0651\u0642 \u0645\u0646 \u0623\u064A \u0645\u0639\u0644\u0648\u0645\u0629 \u0645\u0647\u0645\u0629.",
4963
4987
  dictate: "\u0623\u0645\u0644\u0650 \u0633\u0624\u0627\u0644\u0643",
4964
4988
  stopDictating: "\u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0625\u0645\u0644\u0627\u0621",
4989
+ attach: "\u0625\u0631\u0641\u0627\u0642 \u0645\u0644\u0641\u0627\u062A",
4990
+ attachHint: "\u062D\u062A\u0649 {{max}} \u0645\u0644\u0641\u0627\u062A\u060C \u0628\u062D\u062F \u0623\u0642\u0635\u0649 {{size}} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A \u0644\u0643\u0644 \u0645\u0644\u0641",
4991
+ removeAttachment: "\u0625\u0632\u0627\u0644\u0629 {{name}}",
4992
+ attachmentNameOnly: "\u0627\u0644\u0627\u0633\u0645 \u0648\u0627\u0644\u0646\u0648\u0639 \u0641\u0642\u0637",
4993
+ attachmentTooLarge: "{{name}} \u0623\u0643\u0628\u0631 \u0645\u0646 {{size}} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A \u0648\u0644\u0645 \u064A\u062A\u0645 \u0625\u0631\u0641\u0627\u0642\u0647.",
4994
+ attachmentTooMany: "\u064A\u0645\u0643\u0646 \u0625\u0631\u0641\u0627\u0642 {{max}} \u0645\u0644\u0641\u0627\u062A \u0641\u0642\u0637\u060C \u0644\u0630\u0627 \u062A\u0645 \u062A\u062E\u0637\u064A {{name}}.",
4965
4995
  noAnswer: "\u0644\u0645 \u0623\u062C\u062F \u0647\u0630\u0627 \u0641\u064A \u0648\u062B\u0627\u0626\u0642\u0646\u0627\u060C \u0644\u0630\u0627 \u0641\u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0623\u062F\u0646\u0627\u0647 \u063A\u064A\u0631 \u0645\u0633\u062A\u0646\u062F\u0629 \u0625\u0644\u0649 \u0645\u0635\u062F\u0631. \u062D\u0627\u0648\u0644 \u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0635\u064A\u0627\u063A\u0629\u060C \u0623\u0648",
4966
4996
  askHuman: "\u062A\u062D\u062F\u0651\u062B \u0625\u0644\u0649 \u0634\u062E\u0635",
4967
4997
  prevSuggestion: "\u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u0633\u0627\u0628\u0642",
@@ -5004,6 +5034,12 @@ var TA = {
5004
5034
  disclaimerShort: "\u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B86\u0BB5\u0BA3\u0B99\u0BCD\u0B95\u0BB3\u0BC8 \u0B85\u0B9F\u0BBF\u0BAA\u0BCD\u0BAA\u0B9F\u0BC8\u0BAF\u0BBE\u0B95\u0B95\u0BCD \u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BA4\u0BC1 \u2014 \u0BAE\u0BC1\u0B95\u0BCD\u0B95\u0BBF\u0BAF\u0BAE\u0BBE\u0BA9\u0BA4\u0BC8\u0B9A\u0BCD \u0B9A\u0BB0\u0BBF\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BB5\u0BC1\u0BAE\u0BCD.",
5005
5035
  dictate: "\u0B89\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B95\u0BC7\u0BB3\u0BCD\u0BB5\u0BBF\u0BAF\u0BC8\u0BAA\u0BCD \u0BAA\u0BC7\u0B9A\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
5006
5036
  stopDictating: "\u0BAA\u0BC7\u0B9A\u0BC1\u0BB5\u0BA4\u0BC8 \u0BA8\u0BBF\u0BB1\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1",
5037
+ attach: "\u0B95\u0BCB\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC8 \u0B87\u0BA3\u0BC8\u0B95\u0BCD\u0B95",
5038
+ attachHint: "\u0B85\u0BA4\u0BBF\u0B95\u0BAA\u0B9F\u0BCD\u0B9A\u0BAE\u0BCD {{max}} \u0B95\u0BCB\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD, \u0B92\u0BB5\u0BCD\u0BB5\u0BCA\u0BA9\u0BCD\u0BB1\u0BC1\u0BAE\u0BCD {{size}} MB \u0BB5\u0BB0\u0BC8",
5039
+ removeAttachment: "{{name}} \u0B85\u0B95\u0BB1\u0BCD\u0BB1\u0BC1",
5040
+ attachmentNameOnly: "\u0BAA\u0BC6\u0BAF\u0BB0\u0BC1\u0BAE\u0BCD \u0BB5\u0B95\u0BC8\u0BAF\u0BC1\u0BAE\u0BCD \u0BAE\u0B9F\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD",
5041
+ attachmentTooLarge: "{{name}} {{size}} MB-\u0B90 \u0BB5\u0BBF\u0B9F \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1, \u0B8E\u0BA9\u0BB5\u0BC7 \u0B87\u0BA3\u0BC8\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8.",
5042
+ attachmentTooMany: "{{max}} \u0B95\u0BCB\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD \u0BAE\u0B9F\u0BCD\u0B9F\u0BC1\u0BAE\u0BC7 \u0B87\u0BA3\u0BC8\u0B95\u0BCD\u0B95 \u0BAE\u0BC1\u0B9F\u0BBF\u0BAF\u0BC1\u0BAE\u0BCD, \u0B8E\u0BA9\u0BB5\u0BC7 {{name}} \u0BA4\u0BB5\u0BBF\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1.",
5007
5043
  noAnswer: "\u0B87\u0BA4\u0BC1 \u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B86\u0BB5\u0BA3\u0B99\u0BCD\u0B95\u0BB3\u0BBF\u0BB2\u0BCD \u0B95\u0BBF\u0B9F\u0BC8\u0B95\u0BCD\u0B95\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8, \u0B8E\u0BA9\u0BB5\u0BC7 \u0B95\u0BC0\u0BB4\u0BC7 \u0B89\u0BB3\u0BCD\u0BB3 \u0BAA\u0BA4\u0BBF\u0BB2\u0BC1\u0B95\u0BCD\u0B95\u0BC1 \u0BAE\u0BC2\u0BB2\u0BAE\u0BCD \u0B87\u0BB2\u0BCD\u0BB2\u0BC8. \u0BB5\u0BC7\u0BB1\u0BC1 \u0BB5\u0B95\u0BC8\u0BAF\u0BBF\u0BB2\u0BCD \u0B95\u0BC7\u0BB3\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD, \u0B85\u0BB2\u0BCD\u0BB2\u0BA4\u0BC1",
5008
5044
  askHuman: "\u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BC8\u0BA4\u0BCD \u0BA4\u0BCA\u0B9F\u0BB0\u0BCD\u0BAA\u0BC1 \u0B95\u0BCA\u0BB3\u0BCD\u0BB3\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
5009
5045
  prevSuggestion: "\u0BAE\u0BC1\u0BA8\u0BCD\u0BA4\u0BC8\u0BAF \u0BAA\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0BB0\u0BC8",
@@ -5252,6 +5288,12 @@ var EXPLORE_MESSAGE_FIELDS = (
5252
5288
  }
5253
5289
  followUps
5254
5290
  answered
5291
+ attachments {
5292
+ name
5293
+ mimeType
5294
+ size
5295
+ textExtracted
5296
+ }
5255
5297
  errorCode
5256
5298
  createdAt
5257
5299
  completedAt
@@ -5337,6 +5379,16 @@ var CREATE_EXPLORE_SHARE_LINK_MUTATION = (
5337
5379
  }
5338
5380
  `
5339
5381
  );
5382
+ var EXPLORE_SHARED_CONVERSATION_QUERY = (
5383
+ /* GraphQL */
5384
+ `
5385
+ query ExploreSharedConversation($shareToken: String!) {
5386
+ exploreSharedConversation(shareToken: $shareToken) {
5387
+ ${EXPLORE_MESSAGE_FIELDS}
5388
+ }
5389
+ }
5390
+ `
5391
+ );
5340
5392
 
5341
5393
  // src/data/products.ts
5342
5394
  var ECOSYSTEM_PRODUCTS = [
@@ -5787,6 +5839,14 @@ function readPersisted(key) {
5787
5839
  return null;
5788
5840
  }
5789
5841
  }
5842
+ function readShareToken() {
5843
+ if (typeof window === "undefined") return null;
5844
+ try {
5845
+ return new URL(window.location.href).searchParams.get("c");
5846
+ } catch {
5847
+ return null;
5848
+ }
5849
+ }
5790
5850
  function visibleText(message) {
5791
5851
  return message.content || message.partialContent || "";
5792
5852
  }
@@ -5825,10 +5885,18 @@ function useExploreChat(options = {}) {
5825
5885
  const pollGenerationRef = React.useRef(0);
5826
5886
  const pollTimerRef = React.useRef(null);
5827
5887
  const conversationTokenRef = React.useRef(null);
5888
+ const shareTokenRef = React.useRef(void 0);
5889
+ if (shareTokenRef.current === void 0) {
5890
+ shareTokenRef.current = readShareToken();
5891
+ }
5892
+ const isSharedView = shareTokenRef.current !== null;
5828
5893
  const catalogRef = React.useRef(fallbackCatalog);
5829
5894
  const turnCountRef = React.useRef(0);
5830
5895
  const focusProductRef = React.useRef(null);
5831
5896
  const lastSentTextRef = React.useRef(null);
5897
+ const lastSentAttachmentsRef = React.useRef(
5898
+ []
5899
+ );
5832
5900
  const inFlightRef = React.useRef(false);
5833
5901
  catalogRef.current = catalog;
5834
5902
  const clearPollTimer = React.useCallback(() => {
@@ -5853,6 +5921,43 @@ function useExploreChat(options = {}) {
5853
5921
  };
5854
5922
  }, []);
5855
5923
  React.useEffect(() => {
5924
+ const shareToken = shareTokenRef.current;
5925
+ if (!shareToken) return;
5926
+ let cancelled = false;
5927
+ setHydrated(true);
5928
+ void client.query(
5929
+ EXPLORE_SHARED_CONVERSATION_QUERY,
5930
+ { shareToken },
5931
+ { cache: false }
5932
+ ).then((res) => {
5933
+ if (cancelled || !mountedRef.current) return;
5934
+ const shared = res?.data?.exploreSharedConversation;
5935
+ if (shared && shared.length > 0) {
5936
+ setMessages(shared);
5937
+ return;
5938
+ }
5939
+ setError({
5940
+ kind: "unknown",
5941
+ code: "SHARE_NOT_FOUND",
5942
+ message: "That shared conversation could not be found. The link may have expired.",
5943
+ // Nothing to retry: a bad token will stay bad.
5944
+ retryable: false
5945
+ });
5946
+ }).catch(() => {
5947
+ if (cancelled || !mountedRef.current) return;
5948
+ setError({
5949
+ kind: "unknown",
5950
+ code: "SHARE_NOT_FOUND",
5951
+ message: "That shared conversation could not be loaded.",
5952
+ retryable: true
5953
+ });
5954
+ });
5955
+ return () => {
5956
+ cancelled = true;
5957
+ };
5958
+ }, [client]);
5959
+ React.useEffect(() => {
5960
+ if (shareTokenRef.current !== null) return;
5856
5961
  if (!persist) {
5857
5962
  setHydrated(true);
5858
5963
  return;
@@ -6020,7 +6125,7 @@ function useExploreChat(options = {}) {
6020
6125
  [client, pollIntervalMs, pollTimeoutMs]
6021
6126
  );
6022
6127
  const submit = React.useCallback(
6023
- async (text, optimisticId, captchaAttempt) => {
6128
+ async (text, optimisticId, captchaAttempt, attachments) => {
6024
6129
  const activeCatalog = catalogRef.current;
6025
6130
  let recaptchaToken;
6026
6131
  if (activeCatalog.captchaRequired && activeCatalog.recaptchaSiteKey) {
@@ -6038,7 +6143,8 @@ function useExploreChat(options = {}) {
6038
6143
  ...focusProductRef.current || productSlug ? { productSlug: focusProductRef.current ?? productSlug } : {},
6039
6144
  ...recaptchaToken ? { recaptchaToken } : {},
6040
6145
  ...locale ? { locale } : {},
6041
- ...pageUrl ? { pageUrl } : {}
6146
+ ...pageUrl ? { pageUrl } : {},
6147
+ ...attachments.length > 0 ? { attachments: [...attachments] } : {}
6042
6148
  };
6043
6149
  const res = await client.mutate(
6044
6150
  SEND_EXPLORE_MESSAGE_MUTATION,
@@ -6052,7 +6158,7 @@ function useExploreChat(options = {}) {
6052
6158
  const code = typeof first?.extensions?.code === "string" ? first.extensions.code : void 0;
6053
6159
  const classified = classifyExploreError(code, first?.message);
6054
6160
  if (classified.kind === "captcha" && captchaAttempt === 0) {
6055
- await submit(text, optimisticId, 1);
6161
+ await submit(text, optimisticId, 1, attachments);
6056
6162
  return;
6057
6163
  }
6058
6164
  inFlightRef.current = false;
@@ -6089,7 +6195,7 @@ function useExploreChat(options = {}) {
6089
6195
  [client, locale, pageUrl, productSlug, startPolling]
6090
6196
  );
6091
6197
  const send = React.useCallback(
6092
- async (message) => {
6198
+ async (message, attachments = []) => {
6093
6199
  const text = message.trim();
6094
6200
  if (!text) return;
6095
6201
  if (inFlightRef.current) return;
@@ -6119,6 +6225,7 @@ function useExploreChat(options = {}) {
6119
6225
  }
6120
6226
  inFlightRef.current = true;
6121
6227
  lastSentTextRef.current = text;
6228
+ lastSentAttachmentsRef.current = attachments;
6122
6229
  setError(null);
6123
6230
  setPhase("sending");
6124
6231
  cancelPolling();
@@ -6141,7 +6248,7 @@ function useExploreChat(options = {}) {
6141
6248
  setTurnCount(turnCountRef.current);
6142
6249
  onSend?.(text);
6143
6250
  try {
6144
- await submit(text, optimistic.id, 0);
6251
+ await submit(text, optimistic.id, 0, attachments);
6145
6252
  } catch (err) {
6146
6253
  if (!mountedRef.current) return;
6147
6254
  console.error("[WebSDK] Explore send failed", err);
@@ -6190,7 +6297,7 @@ function useExploreChat(options = {}) {
6190
6297
  });
6191
6298
  turnCountRef.current = Math.max(0, turnCountRef.current - 1);
6192
6299
  setTurnCount(turnCountRef.current);
6193
- void send(text);
6300
+ void send(text, lastSentAttachmentsRef.current);
6194
6301
  }, [cancelPolling, send]);
6195
6302
  const reset = React.useCallback(() => {
6196
6303
  setArchive(
@@ -6204,6 +6311,7 @@ function useExploreChat(options = {}) {
6204
6311
  inFlightRef.current = false;
6205
6312
  conversationTokenRef.current = null;
6206
6313
  lastSentTextRef.current = null;
6314
+ lastSentAttachmentsRef.current = [];
6207
6315
  turnCountRef.current = 0;
6208
6316
  setTurnCount(0);
6209
6317
  setMessages([]);
@@ -6312,7 +6420,8 @@ function useExploreChat(options = {}) {
6312
6420
  deleteConversation,
6313
6421
  clearHistory,
6314
6422
  recordClick,
6315
- createShareLink
6423
+ createShareLink,
6424
+ isSharedView
6316
6425
  };
6317
6426
  }
6318
6427
  var optimisticCounter = 0;
@@ -6571,6 +6680,145 @@ function useSwipe({
6571
6680
  }, []);
6572
6681
  return { onPointerDown, onPointerUp, onPointerCancel };
6573
6682
  }
6683
+
6684
+ // src/utils/explore-attachments.ts
6685
+ var MAX_ATTACHMENTS = 5;
6686
+ var MAX_ATTACHMENT_BYTES = 10 * 1024 * 1024;
6687
+ var MAX_TEXT_PER_ATTACHMENT = 2e4;
6688
+ var TEXT_EXTENSIONS = /* @__PURE__ */ new Set([
6689
+ "txt",
6690
+ "md",
6691
+ "markdown",
6692
+ "csv",
6693
+ "tsv",
6694
+ "json",
6695
+ "jsonl",
6696
+ "yaml",
6697
+ "yml",
6698
+ "toml",
6699
+ "ini",
6700
+ "cfg",
6701
+ "conf",
6702
+ "env",
6703
+ "log",
6704
+ "sql",
6705
+ "graphql",
6706
+ "gql",
6707
+ "html",
6708
+ "htm",
6709
+ "xml",
6710
+ "svg",
6711
+ "css",
6712
+ "scss",
6713
+ "js",
6714
+ "jsx",
6715
+ "mjs",
6716
+ "cjs",
6717
+ "ts",
6718
+ "tsx",
6719
+ "py",
6720
+ "rb",
6721
+ "go",
6722
+ "rs",
6723
+ "java",
6724
+ "kt",
6725
+ "c",
6726
+ "h",
6727
+ "cpp",
6728
+ "cs",
6729
+ "php",
6730
+ "sh",
6731
+ "bash",
6732
+ "zsh",
6733
+ "ps1",
6734
+ "dockerfile",
6735
+ "tf",
6736
+ "tfvars"
6737
+ ]);
6738
+ function isTextualMimeType(mimeType) {
6739
+ if (mimeType.startsWith("text/")) return true;
6740
+ return mimeType === "application/json" || mimeType === "application/xml" || mimeType === "application/yaml" || mimeType === "application/x-yaml" || mimeType === "application/javascript" || mimeType === "application/graphql" || mimeType.endsWith("+json") || mimeType.endsWith("+xml");
6741
+ }
6742
+ function extensionOf(name) {
6743
+ const dot = name.lastIndexOf(".");
6744
+ if (dot <= 0 || dot === name.length - 1) return "";
6745
+ return name.slice(dot + 1).toLowerCase();
6746
+ }
6747
+ function looksTextual(name, mimeType) {
6748
+ if (isTextualMimeType(mimeType)) return true;
6749
+ return TEXT_EXTENSIONS.has(extensionOf(name));
6750
+ }
6751
+ function isDecodedTextUsable(decoded) {
6752
+ if (decoded.length === 0) return false;
6753
+ if (decoded.includes("\0")) return false;
6754
+ let replacements = 0;
6755
+ for (const char of decoded) if (char === "\uFFFD") replacements += 1;
6756
+ return replacements / decoded.length < 0.1;
6757
+ }
6758
+ function formatBytes(bytes) {
6759
+ if (bytes < 1024) return `${bytes} B`;
6760
+ if (bytes < 1024 * 1024) return `${Math.round(bytes / 1024)} KB`;
6761
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
6762
+ }
6763
+ var counter = 0;
6764
+ function nextId() {
6765
+ counter += 1;
6766
+ return `att-${counter}`;
6767
+ }
6768
+ async function readArrayBuffer(blob) {
6769
+ if (typeof blob.arrayBuffer === "function") return blob.arrayBuffer();
6770
+ return new Promise((resolve, reject) => {
6771
+ const reader = new FileReader();
6772
+ reader.onload = () => resolve(reader.result);
6773
+ reader.onerror = () => reject(reader.error ?? new Error("file read failed"));
6774
+ reader.readAsArrayBuffer(blob);
6775
+ });
6776
+ }
6777
+ async function readTextPrefix(file) {
6778
+ try {
6779
+ const slice = file.slice(0, MAX_TEXT_PER_ATTACHMENT);
6780
+ const buffer = await readArrayBuffer(slice);
6781
+ const decoded = new TextDecoder("utf-8").decode(buffer);
6782
+ return isDecodedTextUsable(decoded) ? decoded : null;
6783
+ } catch {
6784
+ return null;
6785
+ }
6786
+ }
6787
+ async function stageFiles(files, alreadyStaged) {
6788
+ const accepted = [];
6789
+ const rejected = [];
6790
+ let slots = MAX_ATTACHMENTS - alreadyStaged.length;
6791
+ for (const file of files) {
6792
+ if (slots <= 0) {
6793
+ rejected.push({ name: file.name, reason: "too-many" });
6794
+ continue;
6795
+ }
6796
+ if (file.size > MAX_ATTACHMENT_BYTES) {
6797
+ rejected.push({ name: file.name, reason: "too-large" });
6798
+ continue;
6799
+ }
6800
+ const mimeType = file.type || "application/octet-stream";
6801
+ const textContent = looksTextual(file.name, mimeType) ? await readTextPrefix(file) : null;
6802
+ accepted.push({
6803
+ id: nextId(),
6804
+ name: file.name,
6805
+ mimeType,
6806
+ size: file.size,
6807
+ textContent,
6808
+ textExtracted: textContent !== null
6809
+ });
6810
+ slots -= 1;
6811
+ }
6812
+ return { accepted, rejected };
6813
+ }
6814
+ function toPayload(staged) {
6815
+ return staged.map(({ name, mimeType, size, textContent }) => ({
6816
+ name,
6817
+ mimeType,
6818
+ size,
6819
+ textContent
6820
+ }));
6821
+ }
6574
6822
  var EXPLORE_CSS = `
6575
6823
  @keyframes boff-explore-pulse {
6576
6824
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
@@ -6919,15 +7167,45 @@ function ThinkingIndicator({ activity }) {
6919
7167
  }
6920
7168
  );
6921
7169
  }
6922
- function UserBubble({ message }) {
6923
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
6924
- "div",
6925
- {
6926
- "data-boff-explore": "user",
6927
- className: "max-w-[85%] whitespace-pre-wrap break-words rounded-2xl rounded-br-md bg-primary px-4 py-2.5 text-sm leading-relaxed text-primary-foreground shadow-sm",
6928
- children: message.content
6929
- }
6930
- ) });
7170
+ function UserBubble({
7171
+ strings: T,
7172
+ message
7173
+ }) {
7174
+ const attachments = message.attachments ?? [];
7175
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end gap-1.5", children: [
7176
+ /* @__PURE__ */ jsxRuntime.jsx(
7177
+ "div",
7178
+ {
7179
+ "data-boff-explore": "user",
7180
+ className: "max-w-[85%] whitespace-pre-wrap break-words rounded-2xl rounded-br-md bg-primary px-4 py-2.5 text-sm leading-relaxed text-primary-foreground shadow-sm",
7181
+ children: message.content
7182
+ }
7183
+ ),
7184
+ attachments.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
7185
+ "ul",
7186
+ {
7187
+ "data-boff-explore": "user-attachments",
7188
+ className: "flex max-w-[85%] flex-wrap justify-end gap-1.5",
7189
+ children: attachments.map((attachment) => /* @__PURE__ */ jsxRuntime.jsxs(
7190
+ "li",
7191
+ {
7192
+ "data-boff-explore": "user-attachment",
7193
+ "data-text-extracted": attachment.textExtracted ? "true" : "false",
7194
+ className: "flex max-w-full items-center gap-1.5 rounded-full border border-border bg-muted/60 px-2.5 py-1 text-xs text-muted-foreground",
7195
+ children: [
7196
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Paperclip, { className: "h-3 w-3 shrink-0" }),
7197
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", title: attachment.name, children: attachment.name }),
7198
+ attachment.textExtracted ? null : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "shrink-0", children: [
7199
+ "\xB7 ",
7200
+ T.attachmentNameOnly
7201
+ ] })
7202
+ ]
7203
+ },
7204
+ `${attachment.name}-${attachment.size}`
7205
+ ))
7206
+ }
7207
+ ) : null
7208
+ ] });
6931
7209
  }
6932
7210
  function AssistantBubble({
6933
7211
  strings: T,
@@ -7426,7 +7704,8 @@ function ExplorePage({
7426
7704
  deleteConversation,
7427
7705
  clearHistory,
7428
7706
  recordClick,
7429
- createShareLink
7707
+ createShareLink,
7708
+ isSharedView
7430
7709
  } = useExploreChat({ productSlug, pageUrl, onSend, examplePrompts });
7431
7710
  const [draft, setDraft] = React.useState("");
7432
7711
  const textareaRef = React.useRef(null);
@@ -7452,6 +7731,12 @@ function ExplorePage({
7452
7731
  const T = React.useMemo(() => exploreStrings(activeLocale), [activeLocale]);
7453
7732
  const rtl = isRtlLocale(activeLocale);
7454
7733
  const [disclaimerOpen, setDisclaimerOpen] = React.useState(false);
7734
+ const [staged, setStaged] = React.useState([]);
7735
+ const [attachmentNotice, setAttachmentNotice] = React.useState(null);
7736
+ const fileInputRef = React.useRef(null);
7737
+ const stagedRef = React.useRef([]);
7738
+ stagedRef.current = staged;
7739
+ const pickQueueRef = React.useRef(Promise.resolve());
7455
7740
  const [shareLabel, setShareLabel] = React.useState("Share");
7456
7741
  const [shareUrl, setShareUrl] = React.useState(null);
7457
7742
  const scrollRef = React.useRef(null);
@@ -7528,13 +7813,44 @@ function ExplorePage({
7528
7813
  setShareLabel("Share");
7529
7814
  }
7530
7815
  }, [createShareLink, pageUrl]);
7816
+ const handleFilesPicked = React.useCallback(
7817
+ (picked) => {
7818
+ if (!picked || picked.length === 0) return pickQueueRef.current;
7819
+ const files = Array.from(picked);
7820
+ pickQueueRef.current = pickQueueRef.current.then(async () => {
7821
+ const { accepted, rejected } = await stageFiles(
7822
+ files,
7823
+ stagedRef.current
7824
+ );
7825
+ setStaged((prev) => [...prev, ...accepted]);
7826
+ const first = rejected[0];
7827
+ setAttachmentNotice(
7828
+ first ? first.reason === "too-large" ? fill(T.attachmentTooLarge, {
7829
+ name: first.name,
7830
+ size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
7831
+ }) : fill(T.attachmentTooMany, {
7832
+ name: first.name,
7833
+ max: String(MAX_ATTACHMENTS)
7834
+ }) : null
7835
+ );
7836
+ });
7837
+ return pickQueueRef.current;
7838
+ },
7839
+ [T]
7840
+ );
7841
+ const removeAttachment = React.useCallback((id) => {
7842
+ setStaged((prev) => prev.filter((entry) => entry.id !== id));
7843
+ setAttachmentNotice(null);
7844
+ }, []);
7531
7845
  const submitDraft = React.useCallback(() => {
7532
7846
  const text = draft.trim();
7533
7847
  if (!text || overLimit || busy || !canSend) return;
7534
7848
  stopDictation();
7535
7849
  setDraft("");
7536
7850
  stickToBottomRef.current = true;
7537
- void send(text);
7851
+ void send(text, toPayload(stagedRef.current));
7852
+ setStaged([]);
7853
+ setAttachmentNotice(null);
7538
7854
  textareaRef.current?.focus();
7539
7855
  }, [busy, canSend, draft, overLimit, send, stopDictation]);
7540
7856
  const sendPrompt = React.useCallback(
@@ -7542,7 +7858,9 @@ function ExplorePage({
7542
7858
  if (!canSend || busy) return;
7543
7859
  setDraft("");
7544
7860
  stickToBottomRef.current = true;
7545
- void send(prompt);
7861
+ void send(prompt, toPayload(stagedRef.current));
7862
+ setStaged([]);
7863
+ setAttachmentNotice(null);
7546
7864
  },
7547
7865
  [busy, canSend, send]
7548
7866
  );
@@ -7555,7 +7873,9 @@ function ExplorePage({
7555
7873
  },
7556
7874
  [submitDraft]
7557
7875
  );
7558
- const composerDisabled = phase === "limited" || phase === "disabled" || !catalog.enabled;
7876
+ const composerDisabled = phase === "limited" || phase === "disabled" || !catalog.enabled || // A share token grants read access only — the server would reject a send anyway, so
7877
+ // disable it here rather than letting the visitor type into a dead composer.
7878
+ isSharedView;
7559
7879
  const captchaOn = Boolean(
7560
7880
  catalog.captchaRequired && catalog.recaptchaSiteKey
7561
7881
  );
@@ -7749,7 +8069,7 @@ function ExplorePage({
7749
8069
  disabled: !canSend || busy
7750
8070
  }
7751
8071
  ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-full min-w-0 max-w-3xl space-y-6 px-4 py-6", children: messages.map(
7752
- (message) => message.role === "USER" ? /* @__PURE__ */ jsxRuntime.jsx(UserBubble, { message }, message.id) : /* @__PURE__ */ jsxRuntime.jsx(
8072
+ (message) => message.role === "USER" ? /* @__PURE__ */ jsxRuntime.jsx(UserBubble, { strings: T, message }, message.id) : /* @__PURE__ */ jsxRuntime.jsx(
7753
8073
  AssistantBubble,
7754
8074
  {
7755
8075
  strings: T,
@@ -7773,6 +8093,33 @@ function ExplorePage({
7773
8093
  captchaOn
7774
8094
  }
7775
8095
  ),
8096
+ isSharedView ? /* @__PURE__ */ jsxRuntime.jsxs(
8097
+ "div",
8098
+ {
8099
+ "data-boff-explore": "shared-banner",
8100
+ className: "mx-auto flex w-full max-w-3xl items-center gap-2 px-4 pb-2 text-xs text-muted-foreground",
8101
+ children: [
8102
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Link2, { className: "h-3.5 w-3.5 shrink-0" }),
8103
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1", children: "You are viewing a shared conversation. Start your own to ask a question." }),
8104
+ /* @__PURE__ */ jsxRuntime.jsx(
8105
+ "button",
8106
+ {
8107
+ type: "button",
8108
+ "data-boff-explore": "shared-start-own",
8109
+ onClick: () => {
8110
+ if (typeof window !== "undefined") {
8111
+ const url = new URL(window.location.href);
8112
+ url.searchParams.delete("c");
8113
+ window.location.href = url.toString();
8114
+ }
8115
+ },
8116
+ className: "shrink-0 underline underline-offset-2 hover:text-foreground",
8117
+ children: "New chat"
8118
+ }
8119
+ )
8120
+ ]
8121
+ }
8122
+ ) : null,
7776
8123
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border bg-background/85 px-4 pb-[max(1rem,env(safe-area-inset-bottom))] pt-3 backdrop-blur-md", children: /* @__PURE__ */ jsxRuntime.jsxs(
7777
8124
  "form",
7778
8125
  {
@@ -7784,6 +8131,51 @@ function ExplorePage({
7784
8131
  },
7785
8132
  children: [
7786
8133
  error ? /* @__PURE__ */ jsxRuntime.jsx(ErrorBanner, { error, onRetry: retry, onReset: reset }) : null,
8134
+ staged.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
8135
+ "ul",
8136
+ {
8137
+ "data-boff-explore": "attachments",
8138
+ className: "mb-2 flex flex-wrap gap-1.5",
8139
+ "aria-label": T.attach,
8140
+ children: staged.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs(
8141
+ "li",
8142
+ {
8143
+ "data-boff-explore": "attachment",
8144
+ "data-text-extracted": entry.textExtracted ? "true" : "false",
8145
+ className: "flex max-w-full items-center gap-1.5 rounded-full border border-border bg-muted/60 py-1 pl-2.5 pr-1 text-xs",
8146
+ children: [
8147
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Paperclip, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
8148
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium", title: entry.name, children: entry.name }),
8149
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "shrink-0 text-muted-foreground", children: [
8150
+ formatBytes(entry.size),
8151
+ entry.textExtracted ? "" : ` \xB7 ${T.attachmentNameOnly}`
8152
+ ] }),
8153
+ /* @__PURE__ */ jsxRuntime.jsx(
8154
+ "button",
8155
+ {
8156
+ type: "button",
8157
+ "data-boff-explore": "attachment-remove",
8158
+ onClick: () => removeAttachment(entry.id),
8159
+ "aria-label": fill(T.removeAttachment, { name: entry.name }),
8160
+ className: "ml-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-background hover:text-foreground",
8161
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3 w-3" })
8162
+ }
8163
+ )
8164
+ ]
8165
+ },
8166
+ entry.id
8167
+ ))
8168
+ }
8169
+ ) : null,
8170
+ attachmentNotice !== null ? /* @__PURE__ */ jsxRuntime.jsx(
8171
+ "p",
8172
+ {
8173
+ "data-boff-explore": "attachment-notice",
8174
+ role: "status",
8175
+ className: "mb-2 text-xs text-destructive",
8176
+ children: attachmentNotice
8177
+ }
8178
+ ) : null,
7787
8179
  /* @__PURE__ */ jsxRuntime.jsxs(
7788
8180
  "div",
7789
8181
  {
@@ -7812,7 +8204,37 @@ function ExplorePage({
7812
8204
  placeholder: composerDisabled ? phase === "limited" ? "Message limit reached \u2014 please try again later" : "Explore is unavailable right now" : focusedProductName ? fill(T.placeholderProduct, {
7813
8205
  product: focusedProductName
7814
8206
  }) : T.placeholder,
7815
- className: "max-h-[200px] min-h-[44px] w-full min-w-0 flex-1 resize-none border-0 bg-transparent px-2 py-2.5 text-sm shadow-none focus-visible:ring-0 md:text-sm"
8207
+ className: "max-h-[200px] min-h-[44px] w-full min-w-0 flex-1 resize-none border-0 bg-transparent px-2 py-2.5 text-base shadow-none focus-visible:ring-0 sm:text-sm"
8208
+ }
8209
+ ),
8210
+ /* @__PURE__ */ jsxRuntime.jsx(
8211
+ "input",
8212
+ {
8213
+ ref: fileInputRef,
8214
+ type: "file",
8215
+ multiple: true,
8216
+ className: "hidden",
8217
+ onChange: (event) => {
8218
+ void handleFilesPicked(event.target.files);
8219
+ event.target.value = "";
8220
+ }
8221
+ }
8222
+ ),
8223
+ /* @__PURE__ */ jsxRuntime.jsx(
8224
+ Button,
8225
+ {
8226
+ "data-boff-explore": "attach",
8227
+ type: "button",
8228
+ size: "icon",
8229
+ variant: "ghost",
8230
+ disabled: composerDisabled || staged.length >= MAX_ATTACHMENTS,
8231
+ "aria-label": T.attach,
8232
+ title: `${T.attach} \u2014 ${fill(T.attachHint, {
8233
+ max: String(MAX_ATTACHMENTS),
8234
+ size: String(MAX_ATTACHMENT_BYTES / (1024 * 1024))
8235
+ })}`,
8236
+ onClick: () => fileInputRef.current?.click(),
8237
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Paperclip, { className: "h-4 w-4" })
7816
8238
  }
7817
8239
  ),
7818
8240
  speech.supported ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -9797,7 +10219,7 @@ function ChangelogPage(props) {
9797
10219
  }
9798
10220
 
9799
10221
  // src/content/utils.ts
9800
- function formatBytes(bytes) {
10222
+ function formatBytes2(bytes) {
9801
10223
  if (bytes == null) return "";
9802
10224
  if (bytes < 1024) return `${bytes} B`;
9803
10225
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;
@@ -9918,7 +10340,7 @@ function PressKitLightbox({
9918
10340
  }, [asset, onClose]);
9919
10341
  if (!asset) return null;
9920
10342
  const ext = (asset.mimeType || "file").split("/").pop()?.toUpperCase() || "FILE";
9921
- const size = formatBytes(asset.fileSize);
10343
+ const size = formatBytes2(asset.fileSize);
9922
10344
  return /* @__PURE__ */ jsxRuntime.jsx(
9923
10345
  "div",
9924
10346
  {
@@ -10027,7 +10449,7 @@ function AssetCard({
10027
10449
  day: "numeric"
10028
10450
  }) : "";
10029
10451
  const ext = (asset.mimeType || "file").split("/").pop()?.toUpperCase() || "FILE";
10030
- const size = formatBytes(asset.fileSize);
10452
+ const size = formatBytes2(asset.fileSize);
10031
10453
  const [imgError, setImgError] = React.useState(false);
10032
10454
  const thumb = asset.thumbnailUrl && !imgError ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/9] overflow-hidden bg-muted/30", children: /* @__PURE__ */ jsxRuntime.jsx(
10033
10455
  "img",
@@ -10531,7 +10953,7 @@ function ContractsPage(props) {
10531
10953
  ] }) }),
10532
10954
  /* @__PURE__ */ jsxRuntime.jsx("section", { className: "max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 py-12", children: loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center py-20", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" }) }) : error ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-16", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: error }) }) : contracts.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center py-16", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-muted-foreground", children: "No contracts are available yet." }) }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "divide-y divide-border rounded-xl border border-border overflow-hidden bg-card", children: contracts.map((c) => {
10533
10955
  const ext = fileExt(c);
10534
- const size = formatBytes(c.fileSize);
10956
+ const size = formatBytes2(c.fileSize);
10535
10957
  return /* @__PURE__ */ jsxRuntime.jsxs(
10536
10958
  "li",
10537
10959
  {