randmarcomps 1.640.0 → 1.642.0

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.
@@ -1,8 +1,8 @@
1
1
  import { jsx as e, jsxs as a, Fragment as U } from "react/jsx-runtime";
2
- import * as A from "react";
2
+ import * as P from "react";
3
3
  import Ba, { useState as T, useEffect as K, useRef as ce, createContext as ls, useContext as Yr, useMemo as ye, useCallback as ae, memo as Xa, forwardRef as er, useImperativeHandle as os } from "react";
4
4
  import { OTPInput as Wi, OTPInputContext as Gi } from "input-otp";
5
- import { MinusIcon as Ki, Circle as cs, X as gt, ChevronRight as tr, Check as ct, Warehouse as Yi, Truck as wa, Handshake as Ji, PanelLeft as Zi, Bot as zt, MessageSquareLock as Xi, Loader2 as he, RefreshCw as Jr, CheckCheck as el, Search as Zr, Copy as ar, Pencil as ds, RotateCcw as us, Send as Xt, HandshakeIcon as tl, ThumbsDownIcon as al, MousePointerClick as rl, ExternalLink as rr, Trash2 as Xr, Plus as nl, AlertCircle as Nt, FileText as sl, BarChart as Tr, ShoppingCart as Sa, ClipboardList as $n, Package as ra, Download as Ca, RefreshCcw as en, TrendingUp as il, Calendar as wt, CalendarDays as ms, DollarSign as ka, CreditCard as Wa, ShieldCheck as ll, Star as Ga, RefreshCwOff as ol, ChevronDown as tn, ChevronUp as cl, AlertCircleIcon as dl, LucideBot as ul, CalendarRange as ml, EditIcon as hl, Printer as fl, Mail as nr, CheckCircle2 as pl, Package2 as gl, ScrollText as bl, Banknote as yl, BadgeCheck as xl, HardHat as Nl, Phone as hs, Globe as fs, BookOpen as vl, LucideWarehouse as Zt, Filter as wl, ArrowUp as Fn, ArrowDown as Bn, ArrowUpDown as Sl, ChevronsLeft as Cl, ChevronLeft as ps, ChevronsRight as kl, Menu as Rl, LogOut as Al, MessageSquareShareIcon as zn, MessageCircleXIcon as Pl, Square as Il, Paperclip as Vn, SettingsIcon as Dl, File as za, Code2Icon as Ml, AppWindow as Tl, MessageSquare as Ol, ChevronsUpDown as El, ImageOff as gs, CheckIcon as Ll, QrCodeIcon as $l, CircleDashedIcon as Fl, ShieldCheckIcon as Un, RefreshCwIcon as Bl, StoreIcon as zl, ShoppingCartIcon as _n, LineChart as Vl, LucideEye as bs, Play as Ul, Bold as _l, Italic as jl, UnderlineIcon as ql, Strikethrough as Ql, List as Hl, ListOrdered as Wl, Code as Gl, Info as ys, SearchX as Kl, ChevronLeftIcon as Yl, ChevronRightIcon as Jl, ChevronDownIcon as Zl, CalendarIcon as Xl, LucideTelescope as jn } from "lucide-react";
5
+ import { MinusIcon as Ki, Circle as cs, X as gt, ChevronRight as tr, Check as ct, Warehouse as Yi, Truck as wa, Handshake as Ji, PanelLeft as Zi, Bot as zt, MessageSquareLock as Xi, Loader2 as he, RefreshCw as Jr, CheckCheck as el, Search as Zr, Copy as ar, Pencil as ds, RotateCcw as us, Send as Xt, HandshakeIcon as tl, ThumbsDownIcon as al, MousePointerClick as rl, ExternalLink as rr, Trash2 as Xr, Plus as nl, AlertCircle as Nt, FileText as sl, BarChart as Tr, ShoppingCart as Sa, ClipboardList as Fn, Package as ra, Download as Ca, RefreshCcw as en, TrendingUp as il, Calendar as wt, CalendarDays as ms, DollarSign as ka, CreditCard as Wa, ShieldCheck as ll, Star as Ga, RefreshCwOff as ol, ChevronDown as tn, ChevronUp as cl, AlertCircleIcon as dl, LucideBot as ul, CalendarRange as ml, EditIcon as hl, Printer as fl, Mail as nr, CheckCircle2 as pl, Package2 as gl, ScrollText as bl, Banknote as yl, BadgeCheck as xl, HardHat as Nl, Phone as hs, Globe as fs, BookOpen as vl, LucideWarehouse as Zt, Filter as wl, ArrowUp as $n, ArrowDown as Bn, ArrowUpDown as Sl, ChevronsLeft as Cl, ChevronLeft as ps, ChevronsRight as kl, Menu as Rl, LogOut as Pl, MessageSquareShareIcon as zn, MessageCircleXIcon as Al, Square as Il, Paperclip as Vn, SettingsIcon as Dl, File as za, Code2Icon as Ml, AppWindow as Tl, MessageSquare as Ol, ChevronsUpDown as El, ImageOff as gs, CheckIcon as Ll, QrCodeIcon as Fl, CircleDashedIcon as $l, ShieldCheckIcon as Un, RefreshCwIcon as Bl, StoreIcon as zl, ShoppingCartIcon as _n, LineChart as Vl, LucideEye as bs, Play as Ul, Bold as _l, Italic as jl, UnderlineIcon as ql, Strikethrough as Ql, List as Hl, ListOrdered as Wl, Code as Gl, Info as ys, SearchX as Kl, ChevronLeftIcon as Yl, ChevronRightIcon as Jl, ChevronDownIcon as Zl, CalendarIcon as Xl, LucideTelescope as jn } from "lucide-react";
6
6
  import { clsx as eo } from "clsx";
7
7
  import { twMerge as to } from "tailwind-merge";
8
8
  import * as ba from "@radix-ui/react-radio-group";
@@ -11,10 +11,10 @@ import { DialogClose as an, DialogTrigger as ao, DialogTitle as ro, DialogDescri
11
11
  import * as Le from "@radix-ui/react-dropdown-menu";
12
12
  import { Slot as na } from "@radix-ui/react-slot";
13
13
  import { cva as sa } from "class-variance-authority";
14
- import { useGetV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQuery as xs, usePostV4ManufacturerByRouteManufacturerIdReportSalesAndResellerIdEmailMutation as so, usePutV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualificationMutation as io, useDeleteV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualificationMutation as lo, useGetV4ManufacturerByRouteManufacturerIdOpportunitiesQuery as oo, usePutV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberResellerResellerIdMutation as co, useGetV4PartnerByApplicationIdAccountLogoExistsQuery as uo, useGetV4PartnerByApplicationIdAccountLogoQuery as mo, useGetV4PartnerByRouteApplicationIdManufacturersQuery as Or, usePostV4PartnerByApplicationIdGenerationRandmarAssistantMutation as Ns, useGetV4UserQuery as rn, usePostV4UserByFieldNameMutation as vs, usePutV4PartnerByRouteApplicationIdUserAndEmailAddressNotificationNotificationTypeMutation as ho, useDeleteV4PartnerByRouteApplicationIdUserAndEmailAddressNotificationNotificationTypeMutation as fo, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdPeopleQuery as po, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdLinksQuery as go, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdLinkMutation as bo, useDeleteV4PartnerByRouteApplicationIdBusinessDevelopmentConversationLinkAndLinkIdMutation as yo, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation as Ka, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsQuery as xo, useLazyGetV4PartnerByApplicationIdAccountQuery as ws, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdReadMutation as No, useLazyGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery as vo, useLazyGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery as wo, usePostV4PartnerByApplicationIdAccountManufacturerAndFieldNameMutation as sr, usePostV4ManufacturerByRouteManufacturerIdReportOpenOrdersEmailMutation as So, usePostV4ManufacturerByRouteManufacturerIdReportSalesEmailMutation as Co, usePostV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersEmailMutation as ko, usePostV4ManufacturerByRouteManufacturerIdReportReorderEmailMutation as Ro, usePostV4ManufacturerByRouteManufacturerIdReportInventoryEmailMutation as Ao, usePostV4ManufacturerByRouteManufacturerIdReportProductsEmailMutation as Po, useGetV4ManufacturerByRouteManufacturerIdDocumentsActiveOrderDetailsQuery as Io, useGetV4ManufacturerByRouteManufacturerIdInventoryValueQuery as Do, useGetV4PartnerByApplicationIdAccountManufacturerQuery as Mo, useGetV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeQuery as Ss, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeShopifyMutation as To, useGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery as Oo, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopifyMutation as Eo, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation as Cs, usePostV4PartnerByApplicationIdAccountResellerCreditLimitMutation as Lo, useLazyGetV4ResellerByRouteResellerIdDocumentAndDocumentNumberPdfQuery as $o, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation as ks, usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation as Fo, usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation as Bo, usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation as zo, usePostV4ResellerByRouteResellerIdReportProductsEmailMutation as Rs, usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation as Vo, useGetV4PartnerByApplicationIdAccountQuery as ir, useGetV4PartnerByRouteApplicationIdProductAndRandmarSkuQuery as Er, usePutV4ResellerByRouteResellerIdProductAndRandmarSkuRequisitionMutation as Uo, useGetV4PartnerByApplicationIdAccountResellerQuery as _o, usePostV4PartnerByApplicationIdGenerationUploadMutation as jo, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation as qo, useLazyGetV4PartnerByRouteApplicationIdUtilitiesStandardOperatingProcedureAndIdQuery as Qo, useGetV4PartnerByRouteApplicationIdUtilitiesStandardOperatingProceduresQuery as Ho, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsHasUnreadsQuery as Wo, useGetProductByRandmarSkuImagesQuery as Go, usePostV4ResellerByRouteResellerIdProductAndRandmarSkuShopifyMutation as Ko, useLazyGetV4PartnerByRouteApplicationIdProductAndRandmarSkuQuery as Yo, useGetProductByProductNumberImageExistsQuery as Jo, useGetProductByRandmarSkuImageQuery as Zo, useGetProductByProductNumberVideoExistsQuery as Xo, useGetProductByProductNumberVideoQuery as ec, usePostV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumberEditItemRandmarSkuMutation as tc, useDeleteV4ManufacturerByRouteManufacturerIdRequisitionAndRequisitionNumberMutation as ac, usePutV4ResellerByRouteResellerIdOpportunityAndManufacturerIdDefaultMutation as rc, usePostV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmailMutation as nc } from "randmar-api-client";
14
+ import { useGetV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQuery as xs, usePostV4ManufacturerByRouteManufacturerIdReportSalesAndResellerIdEmailMutation as so, usePutV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualificationMutation as io, useDeleteV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualificationMutation as lo, useGetV4ManufacturerByRouteManufacturerIdOpportunitiesQuery as oo, usePutV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberResellerResellerIdMutation as co, useGetV4PartnerByApplicationIdAccountLogoExistsQuery as uo, useGetV4PartnerByApplicationIdAccountLogoQuery as mo, useGetV4PartnerByRouteApplicationIdManufacturersQuery as Or, usePostV4PartnerByApplicationIdGenerationRandmarAssistantMutation as Ns, useGetV4UserQuery as rn, usePostV4UserByFieldNameMutation as vs, usePutV4PartnerByRouteApplicationIdUserAndEmailAddressNotificationNotificationTypeMutation as ho, useDeleteV4PartnerByRouteApplicationIdUserAndEmailAddressNotificationNotificationTypeMutation as fo, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdPeopleQuery as po, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdLinksQuery as go, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdLinkMutation as bo, useDeleteV4PartnerByRouteApplicationIdBusinessDevelopmentConversationLinkAndLinkIdMutation as yo, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation as Ka, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsQuery as xo, useLazyGetV4PartnerByApplicationIdAccountQuery as ws, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdReadMutation as No, useLazyGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery as vo, useLazyGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery as wo, usePostV4PartnerByApplicationIdAccountManufacturerAndFieldNameMutation as sr, usePostV4ManufacturerByRouteManufacturerIdReportOpenOrdersEmailMutation as So, usePostV4ManufacturerByRouteManufacturerIdReportSalesEmailMutation as Co, usePostV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersEmailMutation as ko, usePostV4ManufacturerByRouteManufacturerIdReportReorderEmailMutation as Ro, usePostV4ManufacturerByRouteManufacturerIdReportInventoryEmailMutation as Po, usePostV4ManufacturerByRouteManufacturerIdReportProductsEmailMutation as Ao, useGetV4ManufacturerByRouteManufacturerIdDocumentsActiveOrderDetailsQuery as Io, useGetV4ManufacturerByRouteManufacturerIdInventoryValueQuery as Do, useGetV4PartnerByApplicationIdAccountManufacturerQuery as Mo, useGetV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeQuery as Ss, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeShopifyMutation as To, useGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery as Oo, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopifyMutation as Eo, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation as Cs, usePostV4PartnerByApplicationIdAccountResellerCreditLimitMutation as Lo, useLazyGetV4ResellerByRouteResellerIdDocumentAndDocumentNumberPdfQuery as Fo, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation as ks, usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation as $o, usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation as Bo, usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation as zo, usePostV4ResellerByRouteResellerIdReportProductsEmailMutation as Rs, usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation as Vo, useGetV4PartnerByApplicationIdAccountQuery as ir, useGetV4PartnerByRouteApplicationIdProductAndRandmarSkuQuery as Er, usePutV4ResellerByRouteResellerIdProductAndRandmarSkuRequisitionMutation as Uo, useGetV4PartnerByApplicationIdAccountResellerQuery as _o, usePostV4PartnerByApplicationIdGenerationUploadMutation as jo, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation as qo, useLazyGetV4PartnerByRouteApplicationIdUtilitiesStandardOperatingProcedureAndIdQuery as Qo, useGetV4PartnerByRouteApplicationIdUtilitiesStandardOperatingProceduresQuery as Ho, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsHasUnreadsQuery as Wo, useGetProductByRandmarSkuImagesQuery as Go, usePostV4ResellerByRouteResellerIdProductAndRandmarSkuShopifyMutation as Ko, useLazyGetV4PartnerByRouteApplicationIdProductAndRandmarSkuQuery as Yo, useGetProductByProductNumberImageExistsQuery as Jo, useGetProductByRandmarSkuImageQuery as Zo, useGetProductByProductNumberVideoExistsQuery as Xo, useGetProductByProductNumberVideoQuery as ec, usePostV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumberEditItemRandmarSkuMutation as tc, useDeleteV4ManufacturerByRouteManufacturerIdRequisitionAndRequisitionNumberMutation as ac, usePutV4ResellerByRouteResellerIdOpportunityAndManufacturerIdDefaultMutation as rc, usePostV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmailMutation as nc } from "randmar-api-client";
15
15
  import * as sc from "@radix-ui/react-label";
16
16
  import * as ea from "@radix-ui/react-tooltip";
17
- import * as As from "@radix-ui/react-separator";
17
+ import * as Ps from "@radix-ui/react-separator";
18
18
  import * as dt from "@radix-ui/react-toast";
19
19
  import { ResponsiveContainer as ic, AreaChart as lc, CartesianGrid as oc, XAxis as cc, YAxis as qn, Tooltip as dc, Area as uc } from "recharts";
20
20
  import { Player as mc } from "@lottiefiles/react-lottie-player";
@@ -25,19 +25,19 @@ import * as Lr from "@radix-ui/react-switch";
25
25
  import { isToday as gc, isYesterday as bc } from "date-fns";
26
26
  import { marked as yc } from "marked";
27
27
  import xc from "dompurify";
28
- import { Link as Te, useBlocker as Nc, useLocation as Ps, useNavigate as vc } from "react-router-dom";
28
+ import { Link as Te, useBlocker as Nc, useLocation as As, useNavigate as vc } from "react-router-dom";
29
29
  import * as qt from "@radix-ui/react-tabs";
30
30
  import { useForm as Ra } from "react-hook-form";
31
31
  import { FormattedNumber as pt } from "react-intl";
32
- import * as $r from "@radix-ui/react-progress";
32
+ import * as Fr from "@radix-ui/react-progress";
33
33
  import * as je from "@radix-ui/react-select";
34
34
  import { useReactTable as wc, getPaginationRowModel as Sc, getFilteredRowModel as Cc, getSortedRowModel as kc, getCoreRowModel as Rc, flexRender as yr } from "@tanstack/react-table";
35
- import * as Fr from "@radix-ui/react-checkbox";
35
+ import * as $r from "@radix-ui/react-checkbox";
36
36
  import { Command as it } from "cmdk";
37
- import { md5 as Ac } from "js-md5";
37
+ import { md5 as Pc } from "js-md5";
38
38
  import * as ta from "@radix-ui/react-popover";
39
39
  import * as tt from "@radix-ui/react-alert-dialog";
40
- import { useEditor as Pc, EditorContent as Ic } from "@tiptap/react";
40
+ import { useEditor as Ac, EditorContent as Ic } from "@tiptap/react";
41
41
  import Dc from "@tiptap/starter-kit";
42
42
  import Mc from "@tiptap/extension-underline";
43
43
  import * as Vt from "@radix-ui/react-accordion";
@@ -99,7 +99,7 @@ function bf({
99
99
  className: r,
100
100
  ...n
101
101
  }) {
102
- const s = A.useContext(Gi), { char: i, hasFakeCaret: l, isActive: o } = s?.slots[t] ?? {};
102
+ const s = P.useContext(Gi), { char: i, hasFakeCaret: l, isActive: o } = s?.slots[t] ?? {};
103
103
  return /* @__PURE__ */ a(
104
104
  "div",
105
105
  {
@@ -120,7 +120,7 @@ function bf({
120
120
  function yf({ ...t }) {
121
121
  return /* @__PURE__ */ e("div", { "data-slot": "input-otp-separator", role: "separator", ...t, children: /* @__PURE__ */ e(Ki, {}) });
122
122
  }
123
- const pa = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
123
+ const pa = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
124
124
  ba.Root,
125
125
  {
126
126
  className: v("grid gap-2", t),
@@ -129,7 +129,7 @@ const pa = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
129
129
  }
130
130
  ));
131
131
  pa.displayName = ba.Root.displayName;
132
- const Rt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
132
+ const Rt = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
133
133
  ba.Item,
134
134
  {
135
135
  ref: n,
@@ -142,9 +142,9 @@ const Rt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
142
142
  }
143
143
  ));
144
144
  Rt.displayName = ba.Item.displayName;
145
- const Fe = ({ modal: t = !1, ...r }) => /* @__PURE__ */ e(De.Root, { modal: t, ...r });
146
- Fe.displayName = De.Root.displayName;
147
- const xa = De.Trigger, Ec = De.Portal, Qn = De.Close, Ds = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
145
+ const $e = ({ modal: t = !1, ...r }) => /* @__PURE__ */ e(De.Root, { modal: t, ...r });
146
+ $e.displayName = De.Root.displayName;
147
+ const xa = De.Trigger, Ec = De.Portal, Qn = De.Close, Ds = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
148
148
  De.Overlay,
149
149
  {
150
150
  ref: n,
@@ -156,7 +156,7 @@ const xa = De.Trigger, Ec = De.Portal, Qn = De.Close, Ds = A.forwardRef(({ class
156
156
  }
157
157
  ));
158
158
  Ds.displayName = De.Overlay.displayName;
159
- const Be = A.forwardRef(({ className: t, children: r, animateExit: n = !0, overlayClassName: s, showOverlay: i, onPointerDownOutside: l, onInteractOutside: o, ...u }, h) => {
159
+ const Be = P.forwardRef(({ className: t, children: r, animateExit: n = !0, overlayClassName: s, showOverlay: i, onPointerDownOutside: l, onInteractOutside: o, ...u }, h) => {
160
160
  const d = !!(s && i);
161
161
  return /* @__PURE__ */ a(Ec, { forceMount: u.forceMount, children: [
162
162
  d ? /* @__PURE__ */ e(De.Close, { asChild: !0, children: /* @__PURE__ */ e(
@@ -223,7 +223,7 @@ const Ke = ({
223
223
  }
224
224
  );
225
225
  Ke.displayName = "DialogFooter";
226
- const He = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
226
+ const He = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
227
227
  De.Title,
228
228
  {
229
229
  ref: n,
@@ -235,7 +235,7 @@ const He = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
235
235
  }
236
236
  ));
237
237
  He.displayName = De.Title.displayName;
238
- const Ge = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
238
+ const Ge = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
239
239
  De.Description,
240
240
  {
241
241
  ref: n,
@@ -244,7 +244,7 @@ const Ge = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
244
244
  }
245
245
  ));
246
246
  Ge.displayName = De.Description.displayName;
247
- const Lc = Le.Root, $c = Le.Trigger, xf = Le.Group, Nf = Le.Portal, vf = Le.Sub, wf = Le.RadioGroup, Fc = A.forwardRef(({ className: t, inset: r, children: n, ...s }, i) => /* @__PURE__ */ a(
247
+ const Lc = Le.Root, Fc = Le.Trigger, xf = Le.Group, Nf = Le.Portal, vf = Le.Sub, wf = Le.RadioGroup, $c = P.forwardRef(({ className: t, inset: r, children: n, ...s }, i) => /* @__PURE__ */ a(
248
248
  Le.SubTrigger,
249
249
  {
250
250
  ref: i,
@@ -260,8 +260,8 @@ const Lc = Le.Root, $c = Le.Trigger, xf = Le.Group, Nf = Le.Portal, vf = Le.Sub,
260
260
  ]
261
261
  }
262
262
  ));
263
- Fc.displayName = Le.SubTrigger.displayName;
264
- const Bc = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
263
+ $c.displayName = Le.SubTrigger.displayName;
264
+ const Bc = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
265
265
  Le.SubContent,
266
266
  {
267
267
  ref: n,
@@ -273,7 +273,7 @@ const Bc = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
273
273
  }
274
274
  ));
275
275
  Bc.displayName = Le.SubContent.displayName;
276
- const Ms = A.forwardRef(({ className: t, sideOffset: r = 4, ...n }, s) => /* @__PURE__ */ e(Le.Portal, { children: /* @__PURE__ */ e(
276
+ const Ms = P.forwardRef(({ className: t, sideOffset: r = 4, ...n }, s) => /* @__PURE__ */ e(Le.Portal, { children: /* @__PURE__ */ e(
277
277
  Le.Content,
278
278
  {
279
279
  ref: s,
@@ -287,7 +287,7 @@ const Ms = A.forwardRef(({ className: t, sideOffset: r = 4, ...n }, s) => /* @__
287
287
  }
288
288
  ) }));
289
289
  Ms.displayName = Le.Content.displayName;
290
- const ja = A.forwardRef(({ className: t, inset: r, ...n }, s) => /* @__PURE__ */ e(
290
+ const ja = P.forwardRef(({ className: t, inset: r, ...n }, s) => /* @__PURE__ */ e(
291
291
  Le.Item,
292
292
  {
293
293
  ref: s,
@@ -300,7 +300,7 @@ const ja = A.forwardRef(({ className: t, inset: r, ...n }, s) => /* @__PURE__ */
300
300
  }
301
301
  ));
302
302
  ja.displayName = Le.Item.displayName;
303
- const zc = A.forwardRef(({ className: t, children: r, checked: n, ...s }, i) => /* @__PURE__ */ a(
303
+ const zc = P.forwardRef(({ className: t, children: r, checked: n, ...s }, i) => /* @__PURE__ */ a(
304
304
  Le.CheckboxItem,
305
305
  {
306
306
  ref: i,
@@ -317,7 +317,7 @@ const zc = A.forwardRef(({ className: t, children: r, checked: n, ...s }, i) =>
317
317
  }
318
318
  ));
319
319
  zc.displayName = Le.CheckboxItem.displayName;
320
- const Vc = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ a(
320
+ const Vc = P.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ a(
321
321
  Le.RadioItem,
322
322
  {
323
323
  ref: s,
@@ -333,7 +333,7 @@ const Vc = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__
333
333
  }
334
334
  ));
335
335
  Vc.displayName = Le.RadioItem.displayName;
336
- const Uc = A.forwardRef(({ className: t, inset: r, ...n }, s) => /* @__PURE__ */ e(
336
+ const Uc = P.forwardRef(({ className: t, inset: r, ...n }, s) => /* @__PURE__ */ e(
337
337
  Le.Label,
338
338
  {
339
339
  ref: s,
@@ -346,7 +346,7 @@ const Uc = A.forwardRef(({ className: t, inset: r, ...n }, s) => /* @__PURE__ */
346
346
  }
347
347
  ));
348
348
  Uc.displayName = Le.Label.displayName;
349
- const _c = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
349
+ const _c = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
350
350
  Le.Separator,
351
351
  {
352
352
  ref: n,
@@ -395,7 +395,7 @@ const aa = sa(
395
395
  size: "default"
396
396
  }
397
397
  }
398
- ), E = A.forwardRef(
398
+ ), E = P.forwardRef(
399
399
  ({ className: t, variant: r, size: n, asChild: s = !1, confirmationDialog: i, onClick: l, ...o }, u) => {
400
400
  const h = s ? na : "button";
401
401
  if (!i)
@@ -414,7 +414,7 @@ const aa = sa(
414
414
  const { title: d, content: c, onConfirm: m, confirmText: p = "Confirm", cancelText: g = "Cancel" } = i, N = () => {
415
415
  m();
416
416
  };
417
- return /* @__PURE__ */ a(Fe, { children: [
417
+ return /* @__PURE__ */ a($e, { children: [
418
418
  /* @__PURE__ */ e(xa, { asChild: !0, children: /* @__PURE__ */ e(
419
419
  h,
420
420
  {
@@ -453,7 +453,7 @@ function X({
453
453
  }
454
454
  );
455
455
  }
456
- const ke = ea.Provider, we = ea.Root, Se = ea.Trigger, ve = A.forwardRef(({ className: t, sideOffset: r = 4, ...n }, s) => /* @__PURE__ */ e(ea.Portal, { children: /* @__PURE__ */ e(
456
+ const ke = ea.Provider, we = ea.Root, Se = ea.Trigger, ve = P.forwardRef(({ className: t, sideOffset: r = 4, ...n }, s) => /* @__PURE__ */ e(ea.Portal, { children: /* @__PURE__ */ e(
457
457
  ea.Content,
458
458
  {
459
459
  ref: s,
@@ -466,14 +466,14 @@ const ke = ea.Provider, we = ea.Root, Se = ea.Trigger, ve = A.forwardRef(({ clas
466
466
  }
467
467
  ) }));
468
468
  ve.displayName = ea.Content.displayName;
469
- const le = A.forwardRef(
469
+ const le = P.forwardRef(
470
470
  ({ className: t, type: r, mask: n, onChange: s, placeholder: i, ...l }, o) => {
471
- const [u, h] = A.useState(!1), d = A.useRef(null), m = i || (n === "phone" ? "(999) 999-9999" : n === "postal-code-ca" ? "A9A 9A9" : n === "zip-code-us" ? "99999" : ""), p = () => n === "phone" ? "Only enter numbers. Formatting will be added automatically." : n === "postal-code-ca" ? "Enter letters and numbers only. Spacing will be applied automatically." : n === "zip-code-us" ? "Only enter numbers. Formatting will be added automatically." : "", g = () => {
471
+ const [u, h] = P.useState(!1), d = P.useRef(null), m = i || (n === "phone" ? "(999) 999-9999" : n === "postal-code-ca" ? "A9A 9A9" : n === "zip-code-us" ? "99999" : ""), p = () => n === "phone" ? "Only enter numbers. Formatting will be added automatically." : n === "postal-code-ca" ? "Enter letters and numbers only. Spacing will be applied automatically." : n === "zip-code-us" ? "Only enter numbers. Formatting will be added automatically." : "", g = () => {
472
472
  h(!0), d.current && clearTimeout(d.current), d.current = setTimeout(() => {
473
473
  h(!1);
474
474
  }, 3e3);
475
475
  };
476
- A.useEffect(() => () => {
476
+ P.useEffect(() => () => {
477
477
  d.current && clearTimeout(d.current);
478
478
  }, []);
479
479
  const N = (w) => {
@@ -491,8 +491,8 @@ const le = A.forwardRef(
491
491
  const y = x.replace(/[^a-zA-Z0-9]/g, "").toUpperCase();
492
492
  let C = "";
493
493
  for (let S = 0; S < Math.min(y.length, 6); S++) {
494
- const P = y[S];
495
- S === 0 || S === 2 || S === 4 ? /[A-Z]/.test(P) && (C += P) : (S === 1 || S === 3 || S === 5) && /[0-9]/.test(P) && (C += P);
494
+ const A = y[S];
495
+ S === 0 || S === 2 || S === 4 ? /[A-Z]/.test(A) && (C += A) : (S === 1 || S === 3 || S === 5) && /[0-9]/.test(A) && (C += A);
496
496
  }
497
497
  C.length <= 3 ? b = C : b = `${C.slice(0, 3)} ${C.slice(3, 6)}`;
498
498
  } else if (n === "zip-code-us") {
@@ -537,7 +537,7 @@ function qc(t) {
537
537
  m && (n(), p(!1));
538
538
  }, [u, n, m]), /* @__PURE__ */ a(U, { children: [
539
539
  /* @__PURE__ */ a(Lc, { modal: !1, children: [
540
- /* @__PURE__ */ e($c, { asChild: !0, children: /* @__PURE__ */ e(E, { disabled: g, children: "Actions" }) }),
540
+ /* @__PURE__ */ e(Fc, { asChild: !0, children: /* @__PURE__ */ e(E, { disabled: g, children: "Actions" }) }),
541
541
  /* @__PURE__ */ a(Ms, { className: v("", t.className), children: [
542
542
  /* @__PURE__ */ e(ja, { onClick: () => setTimeout(() => o(!0), 200), children: "Sales Report" }),
543
543
  /* @__PURE__ */ e(ja, { onClick: () => setTimeout(() => h(!0), 200), children: "Qualification Status" }),
@@ -572,7 +572,7 @@ function Qc(t) {
572
572
  });
573
573
  }
574
574
  };
575
- return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(Fe, { open: t.open, onOpenChange: t.onOpenChange, children: /* @__PURE__ */ a(Be, { children: [
575
+ return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e($e, { open: t.open, onOpenChange: t.onOpenChange, children: /* @__PURE__ */ a(Be, { children: [
576
576
  /* @__PURE__ */ a(qe, { children: [
577
577
  /* @__PURE__ */ e(He, { children: "Generate Sales Report" }),
578
578
  /* @__PURE__ */ e(Ge, { children: "The report will be sent via email within the next five minutes." })
@@ -693,7 +693,7 @@ function Hc(t) {
693
693
  });
694
694
  }
695
695
  };
696
- return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(Fe, { open: t.open, onOpenChange: t.onOpenChange, children: /* @__PURE__ */ a(Be, { children: [
696
+ return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e($e, { open: t.open, onOpenChange: t.onOpenChange, children: /* @__PURE__ */ a(Be, { children: [
697
697
  /* @__PURE__ */ a(qe, { children: [
698
698
  /* @__PURE__ */ e(He, { children: "Change qualification status" }),
699
699
  /* @__PURE__ */ e(Ge, { children: "Allow or restrict the sale of your products to this partner." })
@@ -747,7 +747,7 @@ function Wc(t) {
747
747
  });
748
748
  }
749
749
  };
750
- return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(Fe, { open: t.open, onOpenChange: t.onOpenChange, children: /* @__PURE__ */ a(Be, { children: [
750
+ return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e($e, { open: t.open, onOpenChange: t.onOpenChange, children: /* @__PURE__ */ a(Be, { children: [
751
751
  /* @__PURE__ */ a(qe, { children: [
752
752
  /* @__PURE__ */ e(He, { children: "Add to Opportunity" }),
753
753
  /* @__PURE__ */ e(Ge, { children: "Let a reseller benefit from an opportunity." })
@@ -774,15 +774,18 @@ function Wc(t) {
774
774
  ] }) }) });
775
775
  }
776
776
  function Ts({ inventory: t, showBinLocation: r, className: n }) {
777
- const s = (y, C, S = !1, P = !0) => {
778
- const k = y.WarehouseType === "Fulfillment Center", D = k ? "bg-background" : "bg-background/70 text-muted-foreground", L = P && C > 0 ? "border-t" : "", M = S ? "border-r" : "", I = y.Status ?? "Unknown", F = I === "Active";
777
+ const s = (y, C, S = !1, A = !0) => {
778
+ const k = y.WarehouseType === "Fulfillment Center", D = k ? "bg-background" : "bg-background/70 text-muted-foreground", L = A && C > 0 ? "border-t" : "", M = S ? "border-r" : "", I = y.Status ?? "Unknown", $ = I === "Active";
779
779
  let Q = "bg-secondary text-secondary-foreground ring-1 ring-border";
780
780
  switch (y.WarehouseType) {
781
+ case "Fulfillment Center":
782
+ Q = "bg-randmar-black text-primary-foreground ring-1 ring-randmar-black/40";
783
+ break;
781
784
  case "Last Mile":
782
- Q = "bg-info text-info-foreground ring-1 ring-info/40";
785
+ Q = "bg-randmar-blue text-primary-foreground ring-1 ring-randmar-blue/40";
783
786
  break;
784
787
  case "First Mile":
785
- Q = "bg-accent text-accent-foreground ring-1 ring-border";
788
+ Q = "bg-randmar-purple text-primary-foreground ring-1 ring-randmar-purple/40";
786
789
  break;
787
790
  }
788
791
  switch (I) {
@@ -807,11 +810,11 @@ function Ts({ inventory: t, showBinLocation: r, className: n }) {
807
810
  {
808
811
  className: `inline-flex items-center gap-2 rounded-full px-2 py-0.5 text-xs font-semibold ${Q}`,
809
812
  "aria-hidden": "false",
810
- title: F ? k ? "Fulfillment Center" : "Satellite Warehouse" : `Status: ${I}`,
813
+ title: $ ? k ? "Fulfillment Center" : "Satellite Warehouse" : `Status: ${I}`,
811
814
  children: [
812
- k ? /* @__PURE__ */ e(Yi, { className: "h-3 w-3", "aria-hidden": "true" }) : /* @__PURE__ */ e(wa, { className: `h-3 w-3 ${F ? "opacity-80" : "opacity-95"}`, "aria-hidden": "true" }),
813
- /* @__PURE__ */ e("span", { className: "sr-only", children: F ? y.WarehouseType ? `${y.WarehouseType} warehouse` : "Warehouse" : `Status: ${I}` }),
814
- /* @__PURE__ */ e("span", { "aria-hidden": "true", children: F ? y.WarehouseType || (k ? "Fulfillment Center" : "Satellite") : I })
815
+ k ? /* @__PURE__ */ e(Yi, { className: "h-3 w-3", "aria-hidden": "true" }) : /* @__PURE__ */ e(wa, { className: `h-3 w-3 ${$ ? "opacity-80" : "opacity-95"}`, "aria-hidden": "true" }),
816
+ /* @__PURE__ */ e("span", { className: "sr-only", children: $ ? y.WarehouseType ? `${y.WarehouseType} warehouse` : "Warehouse" : `Status: ${I}` }),
817
+ /* @__PURE__ */ e("span", { "aria-hidden": "true", children: $ ? y.WarehouseType || (k ? "Fulfillment Center" : "Satellite") : I })
815
818
  ]
816
819
  }
817
820
  )
@@ -830,7 +833,7 @@ function Ts({ inventory: t, showBinLocation: r, className: n }) {
830
833
  },
831
834
  `warehouse-${y.WarehouseId}`
832
835
  );
833
- }, i = ["MTL", "TOR"], l = ["VAN", "EDM"], o = [...t].sort((y, C) => (y.Name || "").localeCompare(C.Name || "")), u = o.filter((y) => y.Country === "US"), h = o.filter((y) => y.Country === "CA"), d = o.filter((y) => l.includes(y.WarehouseId || "")), c = o.filter((y) => i.includes(y.WarehouseId || "")), m = h.filter(
836
+ }, i = ["Z0FP4Z", "TOR", "MTL"], l = ["VAN", "EDM"], o = [...t].sort((y, C) => (y.Name || "").localeCompare(C.Name || "")), u = o.filter((y) => y.Country === "US"), h = o.filter((y) => y.Country === "CA"), d = o.filter((y) => l.includes(y.WarehouseId || "")), c = o.filter((y) => i.includes(y.WarehouseId || "")), m = h.filter(
834
837
  (y) => !i.includes(y.WarehouseId || "") && !l.includes(y.WarehouseId || "")
835
838
  ), p = (y) => y.reduce((C, S) => C + (S.AvailableQuantity || 0), 0), g = p(h), N = p(c), w = p(d), x = p(u), b = g + x;
836
839
  return /* @__PURE__ */ a("div", { className: `border rounded-md overflow-hidden ${n ?? ""}`, children: [
@@ -887,9 +890,9 @@ function Ts({ inventory: t, showBinLocation: r, className: n }) {
887
890
  t.length === 0 && /* @__PURE__ */ e("div", { className: "p-6 text-center text-muted-foreground", children: "No inventory information available" })
888
891
  ] });
889
892
  }
890
- const lr = A.forwardRef(
893
+ const lr = P.forwardRef(
891
894
  ({ className: t, orientation: r = "horizontal", decorative: n = !0, ...s }, i) => /* @__PURE__ */ e(
892
- As.Root,
895
+ Ps.Root,
893
896
  {
894
897
  ref: i,
895
898
  decorative: n,
@@ -903,8 +906,8 @@ const lr = A.forwardRef(
903
906
  }
904
907
  )
905
908
  );
906
- lr.displayName = As.Root.displayName;
907
- const Gc = De.Root, Sf = De.Trigger, Cf = De.Close, Kc = De.Portal, Os = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
909
+ lr.displayName = Ps.Root.displayName;
910
+ const Gc = De.Root, Sf = De.Trigger, Cf = De.Close, Kc = De.Portal, Os = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
908
911
  De.Overlay,
909
912
  {
910
913
  className: v(
@@ -931,7 +934,7 @@ const Yc = sa(
931
934
  side: "right"
932
935
  }
933
936
  }
934
- ), Es = A.forwardRef(({ side: t = "right", className: r, children: n, ...s }, i) => /* @__PURE__ */ a(Kc, { children: [
937
+ ), Es = P.forwardRef(({ side: t = "right", className: r, children: n, ...s }, i) => /* @__PURE__ */ a(Kc, { children: [
935
938
  /* @__PURE__ */ e(Os, {}),
936
939
  /* @__PURE__ */ a(
937
940
  De.Content,
@@ -978,7 +981,7 @@ const Zc = ({
978
981
  }
979
982
  );
980
983
  Zc.displayName = "SheetFooter";
981
- const Xc = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
984
+ const Xc = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
982
985
  De.Title,
983
986
  {
984
987
  ref: n,
@@ -987,7 +990,7 @@ const Xc = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
987
990
  }
988
991
  ));
989
992
  Xc.displayName = De.Title.displayName;
990
- const ed = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
993
+ const ed = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
991
994
  De.Description,
992
995
  {
993
996
  ref: n,
@@ -1072,17 +1075,17 @@ function kf({ onClick: t, publicName: r, applicationName: n, partnerId: s }) {
1072
1075
  }
1073
1076
  const xr = 1024;
1074
1077
  function td() {
1075
- const [t, r] = A.useState(void 0);
1076
- return A.useEffect(() => {
1078
+ const [t, r] = P.useState(void 0);
1079
+ return P.useEffect(() => {
1077
1080
  const n = window.matchMedia(`(max-width: ${xr - 1}px)`), s = () => {
1078
1081
  r(window.innerWidth < xr);
1079
1082
  };
1080
1083
  return n.addEventListener("change", s), r(window.innerWidth < xr), () => n.removeEventListener("change", s);
1081
1084
  }, []), !!t;
1082
1085
  }
1083
- const Ls = A.createContext(null);
1084
- function Aa() {
1085
- const t = A.useContext(Ls);
1086
+ const Ls = P.createContext(null);
1087
+ function Pa() {
1088
+ const t = P.useContext(Ls);
1086
1089
  if (!t)
1087
1090
  throw new Error("useSidebar must be used within a SidebarProvider.");
1088
1091
  return t;
@@ -1099,7 +1102,7 @@ function f({
1099
1102
  }
1100
1103
  );
1101
1104
  }
1102
- const ad = "sidebar:state", rd = 3600 * 24 * 7, nd = "16rem", sd = "3rem", id = "b", $s = A.forwardRef(
1105
+ const ad = "sidebar:state", rd = 3600 * 24 * 7, nd = "16rem", sd = "3rem", id = "b", Fs = P.forwardRef(
1103
1106
  ({
1104
1107
  defaultOpen: t = !0,
1105
1108
  defaultOpenMobile: r = !1,
@@ -1111,20 +1114,20 @@ const ad = "sidebar:state", rd = 3600 * 24 * 7, nd = "16rem", sd = "3rem", id =
1111
1114
  children: u,
1112
1115
  ...h
1113
1116
  }, d) => {
1114
- const c = td(), m = n ?? c, [p, g] = A.useState(r), [N, w] = A.useState(t), x = s ?? N, b = A.useCallback(
1115
- (P) => {
1116
- const k = typeof P == "function" ? P(x) : P;
1117
+ const c = td(), m = n ?? c, [p, g] = P.useState(r), [N, w] = P.useState(t), x = s ?? N, b = P.useCallback(
1118
+ (A) => {
1119
+ const k = typeof A == "function" ? A(x) : A;
1117
1120
  i ? i(k) : w(k), document.cookie = `${ad}=${k}; path=/; max-age=${rd}`;
1118
1121
  },
1119
1122
  [i, x]
1120
- ), y = A.useCallback(() => m ? g((P) => !P) : b((P) => !P), [m, b, g]);
1121
- A.useEffect(() => {
1122
- const P = (k) => {
1123
+ ), y = P.useCallback(() => m ? g((A) => !A) : b((A) => !A), [m, b, g]);
1124
+ P.useEffect(() => {
1125
+ const A = (k) => {
1123
1126
  k.key === id && (k.metaKey || k.ctrlKey) && (k.preventDefault(), y());
1124
1127
  };
1125
- return window.addEventListener("keydown", P), () => window.removeEventListener("keydown", P);
1128
+ return window.addEventListener("keydown", A), () => window.removeEventListener("keydown", A);
1126
1129
  }, [y]);
1127
- const C = x ? "expanded" : "collapsed", S = A.useMemo(
1130
+ const C = x ? "expanded" : "collapsed", S = P.useMemo(
1128
1131
  () => ({
1129
1132
  state: C,
1130
1133
  open: x,
@@ -1155,8 +1158,8 @@ const ad = "sidebar:state", rd = 3600 * 24 * 7, nd = "16rem", sd = "3rem", id =
1155
1158
  ) }) });
1156
1159
  }
1157
1160
  );
1158
- $s.displayName = "SidebarProvider";
1159
- const Fs = A.forwardRef(
1161
+ Fs.displayName = "SidebarProvider";
1162
+ const $s = P.forwardRef(
1160
1163
  ({
1161
1164
  side: t = "left",
1162
1165
  variant: r = "sidebar",
@@ -1165,7 +1168,7 @@ const Fs = A.forwardRef(
1165
1168
  children: i,
1166
1169
  ...l
1167
1170
  }, o) => {
1168
- const { isMobile: u, state: h, openMobile: d, setOpenMobile: c } = Aa();
1171
+ const { isMobile: u, state: h, openMobile: d, setOpenMobile: c } = Pa();
1169
1172
  return n === "none" ? /* @__PURE__ */ e(
1170
1173
  "div",
1171
1174
  {
@@ -1238,9 +1241,9 @@ const Fs = A.forwardRef(
1238
1241
  );
1239
1242
  }
1240
1243
  );
1241
- Fs.displayName = "Sidebar";
1242
- const Bs = A.forwardRef(({ className: t, onClick: r, ...n }, s) => {
1243
- const { toggleSidebar: i } = Aa();
1244
+ $s.displayName = "Sidebar";
1245
+ const Bs = P.forwardRef(({ className: t, onClick: r, ...n }, s) => {
1246
+ const { toggleSidebar: i } = Pa();
1244
1247
  return /* @__PURE__ */ a(
1245
1248
  E,
1246
1249
  {
@@ -1261,8 +1264,8 @@ const Bs = A.forwardRef(({ className: t, onClick: r, ...n }, s) => {
1261
1264
  );
1262
1265
  });
1263
1266
  Bs.displayName = "SidebarTrigger";
1264
- const ld = A.forwardRef(({ className: t, ...r }, n) => {
1265
- const { toggleSidebar: s } = Aa();
1267
+ const ld = P.forwardRef(({ className: t, ...r }, n) => {
1268
+ const { toggleSidebar: s } = Pa();
1266
1269
  return /* @__PURE__ */ e(
1267
1270
  "button",
1268
1271
  {
@@ -1286,7 +1289,7 @@ const ld = A.forwardRef(({ className: t, ...r }, n) => {
1286
1289
  );
1287
1290
  });
1288
1291
  ld.displayName = "SidebarRail";
1289
- const od = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1292
+ const od = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1290
1293
  "main",
1291
1294
  {
1292
1295
  ref: n,
@@ -1299,7 +1302,7 @@ const od = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1299
1302
  }
1300
1303
  ));
1301
1304
  od.displayName = "SidebarInset";
1302
- const cd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1305
+ const cd = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1303
1306
  le,
1304
1307
  {
1305
1308
  ref: n,
@@ -1312,7 +1315,7 @@ const cd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1312
1315
  }
1313
1316
  ));
1314
1317
  cd.displayName = "SidebarInput";
1315
- const zs = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1318
+ const zs = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1316
1319
  "div",
1317
1320
  {
1318
1321
  ref: n,
@@ -1322,7 +1325,7 @@ const zs = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1322
1325
  }
1323
1326
  ));
1324
1327
  zs.displayName = "SidebarHeader";
1325
- const Vs = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1328
+ const Vs = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1326
1329
  "div",
1327
1330
  {
1328
1331
  ref: n,
@@ -1332,7 +1335,7 @@ const Vs = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1332
1335
  }
1333
1336
  ));
1334
1337
  Vs.displayName = "SidebarFooter";
1335
- const dd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1338
+ const dd = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1336
1339
  lr,
1337
1340
  {
1338
1341
  ref: n,
@@ -1342,7 +1345,7 @@ const dd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1342
1345
  }
1343
1346
  ));
1344
1347
  dd.displayName = "SidebarSeparator";
1345
- const Us = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1348
+ const Us = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1346
1349
  "div",
1347
1350
  {
1348
1351
  ref: n,
@@ -1355,7 +1358,7 @@ const Us = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1355
1358
  }
1356
1359
  ));
1357
1360
  Us.displayName = "SidebarContent";
1358
- const ud = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1361
+ const ud = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1359
1362
  "div",
1360
1363
  {
1361
1364
  ref: n,
@@ -1365,7 +1368,7 @@ const ud = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1365
1368
  }
1366
1369
  ));
1367
1370
  ud.displayName = "SidebarGroup";
1368
- const md = A.forwardRef(({ className: t, asChild: r = !1, ...n }, s) => /* @__PURE__ */ e(
1371
+ const md = P.forwardRef(({ className: t, asChild: r = !1, ...n }, s) => /* @__PURE__ */ e(
1369
1372
  r ? na : "div",
1370
1373
  {
1371
1374
  ref: s,
@@ -1379,7 +1382,7 @@ const md = A.forwardRef(({ className: t, asChild: r = !1, ...n }, s) => /* @__PU
1379
1382
  }
1380
1383
  ));
1381
1384
  md.displayName = "SidebarGroupLabel";
1382
- const hd = A.forwardRef(({ className: t, asChild: r = !1, ...n }, s) => /* @__PURE__ */ e(
1385
+ const hd = P.forwardRef(({ className: t, asChild: r = !1, ...n }, s) => /* @__PURE__ */ e(
1383
1386
  r ? na : "button",
1384
1387
  {
1385
1388
  ref: s,
@@ -1395,7 +1398,7 @@ const hd = A.forwardRef(({ className: t, asChild: r = !1, ...n }, s) => /* @__PU
1395
1398
  }
1396
1399
  ));
1397
1400
  hd.displayName = "SidebarGroupAction";
1398
- const fd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1401
+ const fd = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1399
1402
  "div",
1400
1403
  {
1401
1404
  ref: n,
@@ -1405,7 +1408,7 @@ const fd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1405
1408
  }
1406
1409
  ));
1407
1410
  fd.displayName = "SidebarGroupContent";
1408
- const _s = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1411
+ const _s = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1409
1412
  "ul",
1410
1413
  {
1411
1414
  ref: n,
@@ -1415,7 +1418,7 @@ const _s = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1415
1418
  }
1416
1419
  ));
1417
1420
  _s.displayName = "SidebarMenu";
1418
- const js = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1421
+ const js = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1419
1422
  "li",
1420
1423
  {
1421
1424
  ref: n,
@@ -1444,7 +1447,7 @@ const pd = sa(
1444
1447
  size: "default"
1445
1448
  }
1446
1449
  }
1447
- ), qs = A.forwardRef(
1450
+ ), qs = P.forwardRef(
1448
1451
  ({
1449
1452
  asChild: t = !1,
1450
1453
  isActive: r = !1,
@@ -1454,7 +1457,7 @@ const pd = sa(
1454
1457
  className: l,
1455
1458
  ...o
1456
1459
  }, u) => {
1457
- const h = t ? na : "button", { isMobile: d, state: c } = Aa(), m = /* @__PURE__ */ e(
1460
+ const h = t ? na : "button", { isMobile: d, state: c } = Pa(), m = /* @__PURE__ */ e(
1458
1461
  h,
1459
1462
  {
1460
1463
  ref: u,
@@ -1482,7 +1485,7 @@ const pd = sa(
1482
1485
  }
1483
1486
  );
1484
1487
  qs.displayName = "SidebarMenuButton";
1485
- const gd = A.forwardRef(({ className: t, asChild: r = !1, showOnHover: n = !1, ...s }, i) => /* @__PURE__ */ e(
1488
+ const gd = P.forwardRef(({ className: t, asChild: r = !1, showOnHover: n = !1, ...s }, i) => /* @__PURE__ */ e(
1486
1489
  r ? na : "button",
1487
1490
  {
1488
1491
  ref: i,
@@ -1502,7 +1505,7 @@ const gd = A.forwardRef(({ className: t, asChild: r = !1, showOnHover: n = !1, .
1502
1505
  }
1503
1506
  ));
1504
1507
  gd.displayName = "SidebarMenuAction";
1505
- const bd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1508
+ const bd = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1506
1509
  "div",
1507
1510
  {
1508
1511
  ref: n,
@@ -1520,8 +1523,8 @@ const bd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1520
1523
  }
1521
1524
  ));
1522
1525
  bd.displayName = "SidebarMenuBadge";
1523
- const yd = A.forwardRef(({ className: t, showIcon: r = !1, ...n }, s) => {
1524
- const i = A.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
1526
+ const yd = P.forwardRef(({ className: t, showIcon: r = !1, ...n }, s) => {
1527
+ const i = P.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
1525
1528
  return /* @__PURE__ */ a(
1526
1529
  "div",
1527
1530
  {
@@ -1552,7 +1555,7 @@ const yd = A.forwardRef(({ className: t, showIcon: r = !1, ...n }, s) => {
1552
1555
  );
1553
1556
  });
1554
1557
  yd.displayName = "SidebarMenuSkeleton";
1555
- const xd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1558
+ const xd = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1556
1559
  "ul",
1557
1560
  {
1558
1561
  ref: n,
@@ -1566,9 +1569,9 @@ const xd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1566
1569
  }
1567
1570
  ));
1568
1571
  xd.displayName = "SidebarMenuSub";
1569
- const Nd = A.forwardRef(({ ...t }, r) => /* @__PURE__ */ e("li", { ref: r, ...t }));
1572
+ const Nd = P.forwardRef(({ ...t }, r) => /* @__PURE__ */ e("li", { ref: r, ...t }));
1570
1573
  Nd.displayName = "SidebarMenuSubItem";
1571
- const vd = A.forwardRef(({ asChild: t = !1, size: r = "md", isActive: n, className: s, ...i }, l) => /* @__PURE__ */ e(
1574
+ const vd = P.forwardRef(({ asChild: t = !1, size: r = "md", isActive: n, className: s, ...i }, l) => /* @__PURE__ */ e(
1572
1575
  t ? na : "a",
1573
1576
  {
1574
1577
  ref: l,
@@ -1587,7 +1590,7 @@ const vd = A.forwardRef(({ asChild: t = !1, size: r = "md", isActive: n, classNa
1587
1590
  }
1588
1591
  ));
1589
1592
  vd.displayName = "SidebarMenuSubButton";
1590
- const wd = dt.Provider, Qs = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1593
+ const wd = dt.Provider, Qs = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1591
1594
  dt.Viewport,
1592
1595
  {
1593
1596
  ref: n,
@@ -1617,9 +1620,9 @@ const Sd = sa(
1617
1620
  variant: "default"
1618
1621
  }
1619
1622
  }
1620
- ), Hs = A.forwardRef(({ className: t, variant: r, ...n }, s) => /* @__PURE__ */ e(dt.Root, { ref: s, className: v(Sd({ variant: r }), t), ...n }));
1623
+ ), Hs = P.forwardRef(({ className: t, variant: r, ...n }, s) => /* @__PURE__ */ e(dt.Root, { ref: s, className: v(Sd({ variant: r }), t), ...n }));
1621
1624
  Hs.displayName = dt.Root.displayName;
1622
- const Ws = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1625
+ const Ws = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1623
1626
  dt.Action,
1624
1627
  {
1625
1628
  ref: n,
@@ -1631,7 +1634,7 @@ const Ws = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1631
1634
  }
1632
1635
  ));
1633
1636
  Ws.displayName = dt.Action.displayName;
1634
- const Gs = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1637
+ const Gs = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1635
1638
  dt.Close,
1636
1639
  {
1637
1640
  ref: n,
@@ -1645,9 +1648,9 @@ const Gs = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
1645
1648
  }
1646
1649
  ));
1647
1650
  Gs.displayName = dt.Close.displayName;
1648
- const Ks = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(dt.Title, { ref: n, className: v("text-sm font-semibold [&+div]:text-xs", t), ...r }));
1651
+ const Ks = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(dt.Title, { ref: n, className: v("text-sm font-semibold [&+div]:text-xs", t), ...r }));
1649
1652
  Ks.displayName = dt.Title.displayName;
1650
- const Ys = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(dt.Description, { ref: n, className: v("text-sm opacity-90", t), ...r }));
1653
+ const Ys = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(dt.Description, { ref: n, className: v("text-sm opacity-90", t), ...r }));
1651
1654
  Ys.displayName = dt.Description.displayName;
1652
1655
  const Cd = 1, kd = 1e6;
1653
1656
  let Nr = 0;
@@ -1660,7 +1663,7 @@ const vr = /* @__PURE__ */ new Map(), Hn = (t) => {
1660
1663
  vr.delete(t), ga({ type: "REMOVE_TOAST", toastId: t });
1661
1664
  }, kd);
1662
1665
  vr.set(t, r);
1663
- }, Ad = (t, r) => {
1666
+ }, Pd = (t, r) => {
1664
1667
  switch (r.type) {
1665
1668
  case "ADD_TOAST":
1666
1669
  return {
@@ -1692,9 +1695,9 @@ const vr = /* @__PURE__ */ new Map(), Hn = (t) => {
1692
1695
  }, qa = [];
1693
1696
  let Qa = { toasts: [] };
1694
1697
  function ga(t) {
1695
- Qa = Ad(Qa, t), qa.forEach((r) => r(Qa));
1698
+ Qa = Pd(Qa, t), qa.forEach((r) => r(Qa));
1696
1699
  }
1697
- function Pd({ ...t }) {
1700
+ function Ad({ ...t }) {
1698
1701
  const r = Rd(), n = (i) => ga({
1699
1702
  type: "UPDATE_TOAST",
1700
1703
  toast: { ...i, id: r }
@@ -1712,13 +1715,13 @@ function Pd({ ...t }) {
1712
1715
  }), { id: r, dismiss: s, update: n };
1713
1716
  }
1714
1717
  function Ee() {
1715
- const [t, r] = A.useState(Qa);
1716
- return A.useEffect(() => (qa.push(r), () => {
1718
+ const [t, r] = P.useState(Qa);
1719
+ return P.useEffect(() => (qa.push(r), () => {
1717
1720
  const n = qa.indexOf(r);
1718
1721
  n > -1 && qa.splice(n, 1);
1719
1722
  }), []), {
1720
1723
  ...t,
1721
- toast: Pd,
1724
+ toast: Ad,
1722
1725
  dismiss: (n) => ga({ type: "DISMISS_TOAST", toastId: n })
1723
1726
  };
1724
1727
  }
@@ -1792,7 +1795,7 @@ function Od(t) {
1792
1795
  }
1793
1796
  return (t.NumberOfOpportunities ?? 0) > 0;
1794
1797
  }
1795
- function Af({ appID: t, manufPath: r, withBot: n }) {
1798
+ function Pf({ appID: t, manufPath: r, withBot: n }) {
1796
1799
  const [s, i] = T(!1), { data: l, isLoading: o } = Or({
1797
1800
  routeApplicationId: t ?? "",
1798
1801
  withSpecification: !1
@@ -1811,12 +1814,12 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
1811
1814
  ), h = ye(() => (u ?? l)?.slice() ?? [], [l, u]), [d, c] = T(""), [m, p] = T([]), [g, N] = T("az"), [w, x] = T(!1), [b, y] = T(!1), C = ye(() => {
1812
1815
  const M = /* @__PURE__ */ new Map();
1813
1816
  for (const I of h)
1814
- for (const F of Br(I.Tags)) {
1815
- const Q = Js(F);
1816
- M.has(Q) || M.set(Q, F);
1817
+ for (const $ of Br(I.Tags)) {
1818
+ const Q = Js($);
1819
+ M.has(Q) || M.set(Q, $);
1817
1820
  }
1818
- return Array.from(M.entries()).map(([I, F]) => ({ key: I, label: F })).sort((I, F) => I.label.localeCompare(F.label, void 0, { sensitivity: "base" }));
1819
- }, [h]), S = d.trim().length > 0 || m.length > 0 || g !== "az" || w || b, P = ae(() => {
1821
+ return Array.from(M.entries()).map(([I, $]) => ({ key: I, label: $ })).sort((I, $) => I.label.localeCompare($.label, void 0, { sensitivity: "base" }));
1822
+ }, [h]), S = d.trim().length > 0 || m.length > 0 || g !== "az" || w || b, A = ae(() => {
1820
1823
  c(""), p([]), N("az"), x(!1), y(!1);
1821
1824
  }, []), { sendMessage: k } = Na(), D = ae(
1822
1825
  (M) => {
@@ -1855,7 +1858,7 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
1855
1858
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
1856
1859
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3", children: [
1857
1860
  /* @__PURE__ */ e("p", { id: "manufacturer-categories-label", className: "text-sm font-medium leading-none", children: "Categories" }),
1858
- S && /* @__PURE__ */ e(E, { type: "button", variant: "ghost", size: "sm", className: "h-8 px-2", onClick: P, children: "Clear filters" })
1861
+ S && /* @__PURE__ */ e(E, { type: "button", variant: "ghost", size: "sm", className: "h-8 px-2", onClick: A, children: "Clear filters" })
1859
1862
  ] }),
1860
1863
  /* @__PURE__ */ e(
1861
1864
  "div",
@@ -1865,14 +1868,14 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
1865
1868
  "aria-describedby": "manufacturer-categories-help",
1866
1869
  className: "flex flex-wrap gap-2",
1867
1870
  children: C.length === 0 ? /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "No categories available." }) : C.map(({ key: M, label: I }) => {
1868
- const F = m.includes(M);
1871
+ const $ = m.includes(M);
1869
1872
  return /* @__PURE__ */ e(
1870
1873
  E,
1871
1874
  {
1872
1875
  type: "button",
1873
- variant: F ? "secondary" : "outline",
1876
+ variant: $ ? "secondary" : "outline",
1874
1877
  className: "rounded-full",
1875
- "aria-pressed": F,
1878
+ "aria-pressed": $,
1876
1879
  onClick: () => {
1877
1880
  p(
1878
1881
  (Q) => Q.includes(M) ? Q.filter((z) => z !== M) : [...Q, M]
@@ -1943,7 +1946,7 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
1943
1946
  " manufacturers"
1944
1947
  ] }),
1945
1948
  o && h.length === 0 ? /* @__PURE__ */ e("div", { className: "grid grid-cols-1 @md:grid-cols-1 @lg:grid-cols-2 @xl:grid-cols-3 gap-4", children: Array.from({ length: 9 }).map((M, I) => /* @__PURE__ */ e(va, { loading: !0 }, I)) }) : L.length > 0 ? /* @__PURE__ */ e("div", { className: "grid grid-cols-1 @md:grid-cols-1 @lg:grid-cols-2 @xl:grid-cols-3 gap-4", children: L.map((M, I) => {
1946
- const F = Va(M);
1949
+ const $ = Va(M);
1947
1950
  return /* @__PURE__ */ e(
1948
1951
  va,
1949
1952
  {
@@ -1957,18 +1960,18 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
1957
1960
  type: "button",
1958
1961
  variant: "outline",
1959
1962
  size: "icon",
1960
- "aria-label": `Assistant: ${F || "manufacturer"}`,
1961
- onClick: () => D(F),
1963
+ "aria-label": `Assistant: ${$ || "manufacturer"}`,
1964
+ onClick: () => D($),
1962
1965
  children: /* @__PURE__ */ e(zt, {})
1963
1966
  }
1964
1967
  ) : void 0,
1965
1968
  mainAction: /* @__PURE__ */ e(yi, { applicationId: t, manufacturer: M })
1966
1969
  },
1967
- M.ManufacturerId ?? `${F}-${I}`
1970
+ M.ManufacturerId ?? `${$}-${I}`
1968
1971
  );
1969
1972
  }) }) : /* @__PURE__ */ e(q, { children: /* @__PURE__ */ a(G, { className: "p-8 text-center space-y-3", children: [
1970
1973
  /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "No manufacturers match your current filters." }),
1971
- /* @__PURE__ */ e(E, { type: "button", variant: "outline", onClick: P, disabled: !S, children: "Reset filters" })
1974
+ /* @__PURE__ */ e(E, { type: "button", variant: "outline", onClick: A, disabled: !S, children: "Reset filters" })
1972
1975
  ] }) })
1973
1976
  ] })
1974
1977
  ] });
@@ -1976,7 +1979,7 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
1976
1979
  const Zs = "https://api.randmar.io", Ed = "/swagger/V4/swagger.json", Ya = `${Zs}${Ed}`, Xs = ls({
1977
1980
  swaggerJsonUrl: Ya
1978
1981
  });
1979
- function Pf({
1982
+ function Af({
1980
1983
  swaggerJsonUrl: t,
1981
1984
  children: r
1982
1985
  }) {
@@ -2016,7 +2019,7 @@ function Ld({ active: t, payload: r, label: n, series: s }) {
2016
2019
  }
2017
2020
  return null;
2018
2021
  }
2019
- function $d({
2022
+ function Fd({
2020
2023
  data: t,
2021
2024
  series: r,
2022
2025
  height: n,
@@ -2096,8 +2099,8 @@ function $d({
2096
2099
  }
2097
2100
  );
2098
2101
  }
2099
- const Fd = "5.12.1", Bd = 59.9400024414062, zd = 0, Vd = 660.000026882351, Ud = 1080, _d = 1080, jd = "Comp 1", qd = 0, Qd = [{ id: "comp_0", nm: "randmar pulse", fr: 59.9400024414062, layers: [{ ddd: 0, ind: 1, ty: 4, nm: "Shape Layer 3", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 21, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 42, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 52, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 107, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 134, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 163, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 223, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 250, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 279, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 339, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 366, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 395, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 455, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 482, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 511, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 571, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 598, s: [105, 105, 100] }, { t: 627.000025538234, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 0, k: { i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], v: [[149.125, -150.875], [-152.875, -150.875], [-152.875, 151.125], [-92, 151.125], [-92, -90], [149.125, -90]], c: !0 }, ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Shape 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 21.0000008553475, op: 660.000026882351, st: 21.0000008553475, ct: 1, bm: 0 }, { ddd: 0, ind: 2, ty: 4, nm: "Shape Layer 2", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 10, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 31, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 41, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 96, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 123, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 152, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 212, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 239, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 268, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 328, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 355, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 384, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 444, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 471, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 500, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 560, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 587, s: [105, 105, 100] }, { t: 616.000025090194, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 0, k: { i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], v: [[148, -29.5], [-32, -29.5], [-31.75, 150.5], [27.5, 150.5], [28, 30.5], [148.5, 30.5]], c: !0 }, ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Shape 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 10.0000004073083, op: 660.000026882351, st: 10.0000004073083, ct: 1, bm: 0 }, { ddd: 0, ind: 3, ty: 4, nm: "Shape Layer 1", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 4, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 25, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 35, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 90, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 117, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 146, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 206, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 233, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 262, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 322, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 349, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 378, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 438, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 465, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 494, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 554, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 581, s: [105, 105, 100] }, { t: 610.000024845809, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ty: "rc", d: 1, s: { a: 0, k: [60, 60], ix: 2 }, p: { a: 0, k: [0, 0], ix: 3 }, r: { a: 0, k: 0, ix: 4 }, nm: "Rectangle Path 1", mn: "ADBE Vector Shape - Rect", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [117.75, 119.75], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Rectangle 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 0, op: 660.000026882351, st: 0, ct: 1, bm: 0 }] }], Hd = [{ ddd: 0, ind: 1, ty: 0, nm: "randmar pulse", refId: "comp_0", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [540, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [960, 540, 0], ix: 1, l: 2 }, s: { a: 0, k: [308, 308, 100], ix: 6, l: 2 } }, ao: 0, ef: [{ ty: 5, nm: "Hue/Saturation", np: 11, mn: "ADBE HUE SATURATION", ix: 1, en: 1, ef: [{ ty: 7, nm: "Channel Control", mn: "ADBE HUE SATURATION-0002", ix: 1, v: { a: 0, k: 1, ix: 1 } }, {}, { ty: 0, nm: "Master Hue", mn: "ADBE HUE SATURATION-0004", ix: 3, v: { a: 0, k: 0, ix: 3 } }, { ty: 0, nm: "Master Saturation", mn: "ADBE HUE SATURATION-0005", ix: 4, v: { a: 0, k: 0, ix: 4 } }, { ty: 0, nm: "Master Lightness", mn: "ADBE HUE SATURATION-0006", ix: 5, v: { a: 0, k: 0, ix: 5 } }, { ty: 7, nm: "Colorize", mn: "ADBE HUE SATURATION-0007", ix: 6, v: { a: 0, k: 0, ix: 6 } }, { ty: 0, nm: "Colorize Hue", mn: "ADBE HUE SATURATION-0008", ix: 7, v: { a: 0, k: 0, ix: 7 } }, { ty: 0, nm: "Colorize Saturation", mn: "ADBE HUE SATURATION-0009", ix: 8, v: { a: 0, k: 25, ix: 8 } }, { ty: 0, nm: "Colorize Lightness", mn: "ADBE HUE SATURATION-0010", ix: 9, v: { a: 0, k: 0, ix: 9 } }] }], w: 1920, h: 1080, ip: 0, op: 660.000026882351, st: 0, bm: 0 }], Wd = [], Gd = {}, Wn = {
2100
- v: Fd,
2102
+ const $d = "5.12.1", Bd = 59.9400024414062, zd = 0, Vd = 660.000026882351, Ud = 1080, _d = 1080, jd = "Comp 1", qd = 0, Qd = [{ id: "comp_0", nm: "randmar pulse", fr: 59.9400024414062, layers: [{ ddd: 0, ind: 1, ty: 4, nm: "Shape Layer 3", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 21, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 42, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 52, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 107, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 134, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 163, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 223, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 250, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 279, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 339, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 366, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 395, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 455, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 482, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 511, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 571, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 598, s: [105, 105, 100] }, { t: 627.000025538234, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 0, k: { i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], v: [[149.125, -150.875], [-152.875, -150.875], [-152.875, 151.125], [-92, 151.125], [-92, -90], [149.125, -90]], c: !0 }, ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Shape 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 21.0000008553475, op: 660.000026882351, st: 21.0000008553475, ct: 1, bm: 0 }, { ddd: 0, ind: 2, ty: 4, nm: "Shape Layer 2", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 10, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 31, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 41, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 96, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 123, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 152, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 212, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 239, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 268, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 328, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 355, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 384, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 444, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 471, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 500, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 560, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 587, s: [105, 105, 100] }, { t: 616.000025090194, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 0, k: { i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], v: [[148, -29.5], [-32, -29.5], [-31.75, 150.5], [27.5, 150.5], [28, 30.5], [148.5, 30.5]], c: !0 }, ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Shape 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 10.0000004073083, op: 660.000026882351, st: 10.0000004073083, ct: 1, bm: 0 }, { ddd: 0, ind: 3, ty: 4, nm: "Shape Layer 1", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 4, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 25, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 35, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 90, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 117, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 146, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 206, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 233, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 262, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 322, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 349, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 378, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 438, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 465, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 494, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 554, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 581, s: [105, 105, 100] }, { t: 610.000024845809, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ty: "rc", d: 1, s: { a: 0, k: [60, 60], ix: 2 }, p: { a: 0, k: [0, 0], ix: 3 }, r: { a: 0, k: 0, ix: 4 }, nm: "Rectangle Path 1", mn: "ADBE Vector Shape - Rect", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [117.75, 119.75], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Rectangle 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 0, op: 660.000026882351, st: 0, ct: 1, bm: 0 }] }], Hd = [{ ddd: 0, ind: 1, ty: 0, nm: "randmar pulse", refId: "comp_0", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [540, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [960, 540, 0], ix: 1, l: 2 }, s: { a: 0, k: [308, 308, 100], ix: 6, l: 2 } }, ao: 0, ef: [{ ty: 5, nm: "Hue/Saturation", np: 11, mn: "ADBE HUE SATURATION", ix: 1, en: 1, ef: [{ ty: 7, nm: "Channel Control", mn: "ADBE HUE SATURATION-0002", ix: 1, v: { a: 0, k: 1, ix: 1 } }, {}, { ty: 0, nm: "Master Hue", mn: "ADBE HUE SATURATION-0004", ix: 3, v: { a: 0, k: 0, ix: 3 } }, { ty: 0, nm: "Master Saturation", mn: "ADBE HUE SATURATION-0005", ix: 4, v: { a: 0, k: 0, ix: 4 } }, { ty: 0, nm: "Master Lightness", mn: "ADBE HUE SATURATION-0006", ix: 5, v: { a: 0, k: 0, ix: 5 } }, { ty: 7, nm: "Colorize", mn: "ADBE HUE SATURATION-0007", ix: 6, v: { a: 0, k: 0, ix: 6 } }, { ty: 0, nm: "Colorize Hue", mn: "ADBE HUE SATURATION-0008", ix: 7, v: { a: 0, k: 0, ix: 7 } }, { ty: 0, nm: "Colorize Saturation", mn: "ADBE HUE SATURATION-0009", ix: 8, v: { a: 0, k: 25, ix: 8 } }, { ty: 0, nm: "Colorize Lightness", mn: "ADBE HUE SATURATION-0010", ix: 9, v: { a: 0, k: 0, ix: 9 } }] }], w: 1920, h: 1080, ip: 0, op: 660.000026882351, st: 0, bm: 0 }], Wd = [], Gd = {}, Wn = {
2103
+ v: $d,
2101
2104
  fr: Bd,
2102
2105
  ip: zd,
2103
2106
  op: Vd,
@@ -2147,7 +2150,7 @@ function If({ text: t, color: r = "white", className: n }) {
2147
2150
  ), children: t })
2148
2151
  ] });
2149
2152
  }
2150
- const cr = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2153
+ const cr = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2151
2154
  ia.Root,
2152
2155
  {
2153
2156
  ref: n,
@@ -2159,7 +2162,7 @@ const cr = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2159
2162
  }
2160
2163
  ));
2161
2164
  cr.displayName = ia.Root.displayName;
2162
- const cu = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2165
+ const cu = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2163
2166
  ia.Image,
2164
2167
  {
2165
2168
  ref: n,
@@ -2168,7 +2171,7 @@ const cu = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2168
2171
  }
2169
2172
  ));
2170
2173
  cu.displayName = ia.Image.displayName;
2171
- const du = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2174
+ const du = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2172
2175
  ia.Fallback,
2173
2176
  {
2174
2177
  ref: n,
@@ -2298,7 +2301,7 @@ function dr() {
2298
2301
  const t = ei();
2299
2302
  return ye(() => Ja(t.swaggerJsonUrl) ?? Zs, [t.swaggerJsonUrl]);
2300
2303
  }
2301
- function Pt(t, r) {
2304
+ function At(t, r) {
2302
2305
  const n = (t ?? "").trim();
2303
2306
  if (!n) return "";
2304
2307
  if (n.startsWith("http://") || n.startsWith("https://") || n.startsWith("data:") || n.startsWith("blob:"))
@@ -2311,7 +2314,7 @@ function Pt(t, r) {
2311
2314
  return i;
2312
2315
  }
2313
2316
  }
2314
- const At = A.forwardRef(({ className: t, children: r, orientation: n, ...s }, i) => /* @__PURE__ */ a(
2317
+ const Pt = P.forwardRef(({ className: t, children: r, orientation: n, ...s }, i) => /* @__PURE__ */ a(
2315
2318
  Bt.Root,
2316
2319
  {
2317
2320
  ref: i,
@@ -2327,8 +2330,8 @@ const At = A.forwardRef(({ className: t, children: r, orientation: n, ...s }, i)
2327
2330
  ]
2328
2331
  }
2329
2332
  ));
2330
- At.displayName = Bt.Root.displayName;
2331
- const sn = A.forwardRef(({ className: t, orientation: r = "vertical", ...n }, s) => /* @__PURE__ */ e(
2333
+ Pt.displayName = Bt.Root.displayName;
2334
+ const sn = P.forwardRef(({ className: t, orientation: r = "vertical", ...n }, s) => /* @__PURE__ */ e(
2332
2335
  Bt.ScrollAreaScrollbar,
2333
2336
  {
2334
2337
  ref: s,
@@ -2391,7 +2394,7 @@ function bu(t, r, n, s) {
2391
2394
  t.partner1 + " and " + t.partner2
2392
2395
  );
2393
2396
  }
2394
- const Pa = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2397
+ const Aa = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2395
2398
  Lr.Root,
2396
2399
  {
2397
2400
  className: v(
@@ -2410,7 +2413,7 @@ const Pa = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2410
2413
  )
2411
2414
  }
2412
2415
  ));
2413
- Pa.displayName = Lr.Root.displayName;
2416
+ Aa.displayName = Lr.Root.displayName;
2414
2417
  function yu({
2415
2418
  appID: t,
2416
2419
  chats: r,
@@ -2427,7 +2430,7 @@ function yu({
2427
2430
  const [m, p] = T(""), [g, N] = T(null), [w, x] = T(null), b = ye(() => r.filter((z) => {
2428
2431
  const _ = t === z.partner1 ? z.partner2 : z.partner1;
2429
2432
  return z.name.toLowerCase().includes(m.toLowerCase()) || _.toLocaleLowerCase().includes(m.toLowerCase());
2430
- }), [t, r, m]), { toast: y } = Ee(), { data: C, isLoading: S } = rn(), P = C?.Name || C?.EmailAddress || "User", k = C?.Role || "Partner", [D] = vs(), [L] = ho(), [M] = fo(), I = (z) => {
2433
+ }), [t, r, m]), { toast: y } = Ee(), { data: C, isLoading: S } = rn(), A = C?.Name || C?.EmailAddress || "User", k = C?.Role || "Partner", [D] = vs(), [L] = ho(), [M] = fo(), I = (z) => {
2431
2434
  if (!C?.ApplicationId || !C.EmailAddress) {
2432
2435
  y({
2433
2436
  title: "Not ready",
@@ -2439,12 +2442,12 @@ function yu({
2439
2442
  z ? L({ routeApplicationId: C.ApplicationId, emailAddress: C.EmailAddress, notificationType: "PartnerChatNotifications" }) : M({ routeApplicationId: C.ApplicationId, emailAddress: C.EmailAddress, notificationType: "PartnerChatNotifications" });
2440
2443
  };
2441
2444
  K(() => {
2442
- g === null && P && N(P);
2443
- }, [g, P]), K(() => {
2445
+ g === null && A && N(A);
2446
+ }, [g, A]), K(() => {
2444
2447
  w === null && k && x(k);
2445
2448
  }, [w, k]);
2446
- const F = () => {
2447
- g && g !== P && g.trim() !== "" && D({ fieldName: "Name", newValue: g }).unwrap().then(() => {
2449
+ const $ = () => {
2450
+ g && g !== A && g.trim() !== "" && D({ fieldName: "Name", newValue: g }).unwrap().then(() => {
2448
2451
  y({ title: "Success", description: "Name updated successfully" });
2449
2452
  });
2450
2453
  }, Q = () => {
@@ -2514,7 +2517,7 @@ function yu({
2514
2517
  },
2515
2518
  "b1"
2516
2519
  ) : null }),
2517
- /* @__PURE__ */ e(At, { className: "flex-1", children: r.length > 0 && /* @__PURE__ */ e(fu, { appID: t, chats: b, activeChat: c, onSelectChat: d }) }),
2520
+ /* @__PURE__ */ e(Pt, { className: "flex-1", children: r.length > 0 && /* @__PURE__ */ e(fu, { appID: t, chats: b, activeChat: c, onSelectChat: d }) }),
2518
2521
  /* @__PURE__ */ e(lr, { className: "mt-4" }),
2519
2522
  /* @__PURE__ */ a("div", { className: "mt-3 space-y-3", children: [
2520
2523
  /* @__PURE__ */ a("div", { children: [
@@ -2524,7 +2527,7 @@ function yu({
2524
2527
  {
2525
2528
  value: g ?? "",
2526
2529
  onChange: (z) => N(z.target.value),
2527
- onBlur: F,
2530
+ onBlur: $,
2528
2531
  className: "mt-1 h-8 border-0 bg-transparent px-0 text-sm font-medium shadow-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
2529
2532
  }
2530
2533
  )
@@ -2547,7 +2550,7 @@ function yu({
2547
2550
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Conversation updates" })
2548
2551
  ] }),
2549
2552
  /* @__PURE__ */ e(
2550
- Pa,
2553
+ Aa,
2551
2554
  {
2552
2555
  disabled: S || !C,
2553
2556
  onCheckedChange: I,
@@ -2558,7 +2561,7 @@ function yu({
2558
2561
  ] })
2559
2562
  ] });
2560
2563
  }
2561
- const It = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2564
+ const It = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
2562
2565
  "textarea",
2563
2566
  {
2564
2567
  className: v(
@@ -2705,8 +2708,8 @@ const wu = Xa(function({
2705
2708
  onCopy: w
2706
2709
  }) {
2707
2710
  const x = ye(() => ai(r.content), [r.content]), b = x.trim().length > 0, y = ye(() => (r.images ?? []).map((S) => {
2708
- const P = typeof S?.mimeType == "string" ? S.mimeType.trim() : "", k = typeof S?.base64Data == "string" ? S.base64Data.replace(/\s+/g, "") : "";
2709
- return !P.startsWith("image/") || k.length === 0 ? null : `data:${P};base64,${k}`;
2711
+ const A = typeof S?.mimeType == "string" ? S.mimeType.trim() : "", k = typeof S?.base64Data == "string" ? S.base64Data.replace(/\s+/g, "") : "";
2712
+ return !A.startsWith("image/") || k.length === 0 ? null : `data:${A};base64,${k}`;
2710
2713
  }).filter((S) => !!S), [r.images]);
2711
2714
  return /* @__PURE__ */ e(
2712
2715
  "div",
@@ -2836,8 +2839,8 @@ const wu = Xa(function({
2836
2839
  onCopy: w
2837
2840
  }) {
2838
2841
  const x = ye(() => ai(r.content), [r.content]), b = x.trim().length > 0, y = ye(() => (r.images ?? []).map((S) => {
2839
- const P = typeof S?.mimeType == "string" ? S.mimeType.trim() : "", k = typeof S?.base64Data == "string" ? S.base64Data.replace(/\s+/g, "") : "";
2840
- return !P.startsWith("image/") || k.length === 0 ? null : `data:${P};base64,${k}`;
2842
+ const A = typeof S?.mimeType == "string" ? S.mimeType.trim() : "", k = typeof S?.base64Data == "string" ? S.base64Data.replace(/\s+/g, "") : "";
2843
+ return !A.startsWith("image/") || k.length === 0 ? null : `data:${A};base64,${k}`;
2841
2844
  }).filter((S) => !!S), [r.images]);
2842
2845
  return /* @__PURE__ */ e("div", { className: v("flex items-start gap-2 mt-2 mb-2", n && "flex-row-reverse"), children: /* @__PURE__ */ a("div", { className: v("flex flex-col", h ? "w-full max-w-none" : "max-w-[70%]"), children: [
2843
2846
  !s && !!r.senderName?.trim() && /* @__PURE__ */ e("p", { className: v("mb-1 flex", n && "flex-row-reverse"), children: r.senderName }),
@@ -2956,19 +2959,19 @@ const wu = Xa(function({
2956
2959
  I && (L === I ? D.add(M.id) : L = I);
2957
2960
  }
2958
2961
  return D;
2959
- }, [r]), S = l ?? (i ? "assistant" : "dashboard"), P = S === "assistant" ? Su : wu, k = S === "assistant" ? vu : Nu;
2962
+ }, [r]), S = l ?? (i ? "assistant" : "dashboard"), A = S === "assistant" ? Su : wu, k = S === "assistant" ? vu : Nu;
2960
2963
  return /* @__PURE__ */ a("div", { className: S === "dashboard" ? "py-3" : "", children: [
2961
2964
  r.map((D) => {
2962
- const L = D.fromPartnerID === n, M = !!(u && i && L && m && g && p), I = !!(u && i && L && N), F = !!(i && !L && (D.content ?? "").trim().length > 0), Q = h === D.id;
2965
+ const L = D.fromPartnerID === n, M = !!(u && i && L && m && g && p), I = !!(u && i && L && N), $ = !!(i && !L && (D.content ?? "").trim().length > 0), Q = h === D.id;
2963
2966
  return /* @__PURE__ */ e(
2964
- P,
2967
+ A,
2965
2968
  {
2966
2969
  message: D,
2967
2970
  isCurrentUser: L,
2968
2971
  hideSenderName: o || C.has(D.id),
2969
2972
  canEdit: M,
2970
2973
  canRetry: I,
2971
- canCopy: F,
2974
+ canCopy: $,
2972
2975
  isCopied: w === D.id,
2973
2976
  isEditing: Q,
2974
2977
  editValue: Q ? d : "",
@@ -3009,7 +3012,7 @@ function Cu({
3009
3012
  /* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e("div", { className: "truncate text-sm font-semibold", children: r?.name }) })
3010
3013
  ] }),
3011
3014
  r?.pending && r.partner1 == n ? /* @__PURE__ */ e("p", { className: "mx-auto mt-12 max-w-md px-6 text-center text-sm text-muted-foreground", children: "This conversation is awaiting approval by the other party — please check back later." }) : /* @__PURE__ */ a(U, { children: [
3012
- /* @__PURE__ */ a(At, { className: "flex-1 bg-background", children: [
3015
+ /* @__PURE__ */ a(Pt, { className: "flex-1 bg-background", children: [
3013
3016
  /* @__PURE__ */ e("div", { className: r?.messages === null ? "opacity-0" : "", children: /* @__PURE__ */ e(
3014
3017
  ni,
3015
3018
  {
@@ -3107,7 +3110,7 @@ function ku({
3107
3110
  ] }),
3108
3111
  /* @__PURE__ */ e(qc, { userId: r, partnerId: l?.[0] === r ? l[1] : l?.[0] || "", isAdmin: !1 }),
3109
3112
  /* @__PURE__ */ e(Ru, { appID: r, activeChatObj: t }),
3110
- /* @__PURE__ */ e(Au, { appID: r, activeChatObj: t })
3113
+ /* @__PURE__ */ e(Pu, { appID: r, activeChatObj: t })
3111
3114
  ] }) });
3112
3115
  }
3113
3116
  const Ru = ({ appID: t, activeChatObj: r }) => {
@@ -3132,7 +3135,7 @@ const Ru = ({ appID: t, activeChatObj: r }) => {
3132
3135
  ] }, p);
3133
3136
  }) })
3134
3137
  ] });
3135
- }, Au = ({ appID: t, activeChatObj: r }) => {
3138
+ }, Pu = ({ appID: t, activeChatObj: r }) => {
3136
3139
  const [n, s] = T(!1), i = r?.conversationID, l = i === void 0 || i === -1, { data: o, isLoading: u } = go({
3137
3140
  routeApplicationId: t,
3138
3141
  conversationId: i ?? -1
@@ -3156,7 +3159,7 @@ const Ru = ({ appID: t, activeChatObj: r }) => {
3156
3159
  )
3157
3160
  ] }, c.LinkId))
3158
3161
  ] }),
3159
- /* @__PURE__ */ a(Fe, { open: n, onOpenChange: s, children: [
3162
+ /* @__PURE__ */ a($e, { open: n, onOpenChange: s, children: [
3160
3163
  /* @__PURE__ */ e(ao, { asChild: !0, children: /* @__PURE__ */ a(E, { variant: "link", className: "h-auto p-0 justify-start", disabled: l, children: [
3161
3164
  /* @__PURE__ */ e(nl, { className: "h-4 w-4" }),
3162
3165
  "Add link"
@@ -3184,7 +3187,7 @@ const Ru = ({ appID: t, activeChatObj: r }) => {
3184
3187
  ] })
3185
3188
  ] })
3186
3189
  ] });
3187
- }, Pu = (t) => {
3190
+ }, Au = (t) => {
3188
3191
  const [r] = vs(), [n, s] = T(""), [i, l] = T(""), [o, u] = T(!1), [h] = Ka();
3189
3192
  return /* @__PURE__ */ a("div", { className: "mx-auto mt-2", children: [
3190
3193
  /* @__PURE__ */ e("p", { className: "mb-4", children: "Before you can start chatting, please set up your profile." }),
@@ -3202,11 +3205,11 @@ const Ru = ({ appID: t, activeChatObj: r }) => {
3202
3205
  ] });
3203
3206
  }, ha = (t, r) => t.unread > 0 && r.unread === 0 ? -1 : r.unread > 0 && t.unread === 0 ? 1 : t.name.localeCompare(r.name);
3204
3207
  function Df({ appID: t, inputRef: r, className: n }) {
3205
- const { setHasUnreads: s } = Na(), i = dr(), { data: l, refetch: o } = xo({ routeApplicationId: t }), [u, h] = T(!1), [d, c] = T(!1), [m, p] = T(!1), [g, { isLoading: N }] = Ka(), w = ce(null), [x] = ws(), { sendPrompt: b } = mu({ applicationId: t, outputFormat: "text", useProModel: !0 }), [y, C] = T(!1), [S] = Ka(), [P] = No(), [k] = vo(), [D] = wo(), [L, M] = T(!1);
3208
+ const { setHasUnreads: s } = Na(), i = dr(), { data: l, refetch: o } = xo({ routeApplicationId: t }), [u, h] = T(!1), [d, c] = T(!1), [m, p] = T(!1), [g, { isLoading: N }] = Ka(), w = ce(null), [x] = ws(), { sendPrompt: b } = mu({ applicationId: t, outputFormat: "text", useProModel: !0 }), [y, C] = T(!1), [S] = Ka(), [A] = No(), [k] = vo(), [D] = wo(), [L, M] = T(!1);
3206
3209
  K(() => {
3207
3210
  l && (se((W) => {
3208
3211
  const oe = l.map((ee) => {
3209
- const be = W.find(($e) => $e.conversationID === ee.ConversationId);
3212
+ const be = W.find((Fe) => Fe.conversationID === ee.ConversationId);
3210
3213
  return {
3211
3214
  partner1: ee.Participant1,
3212
3215
  partner2: ee.Participant2,
@@ -3221,7 +3224,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
3221
3224
  return oe.sort(ha), oe;
3222
3225
  }), h(!0), setTimeout(() => Xe.current?.focus(), 50));
3223
3226
  }, [l, t]);
3224
- const [I, F] = T(void 0), [Q, z] = T(""), [_, O] = T(null), [V, se] = T([]), [me, Ve] = T(null), Re = ce(null), Qe = ce(null), [Ue, We] = T([]), Xe = r || Qe, ie = ce(null), { toast: pe } = Ee(), H = () => V.find((W) => W.partner1 === I?.[0] && W.partner2 === I?.[1]), Y = ae(async () => {
3227
+ const [I, $] = T(void 0), [Q, z] = T(""), [_, O] = T(null), [V, se] = T([]), [me, Ve] = T(null), Re = ce(null), Qe = ce(null), [Ue, We] = T([]), Xe = r || Qe, ie = ce(null), { toast: pe } = Ee(), H = () => V.find((W) => W.partner1 === I?.[0] && W.partner2 === I?.[1]), Y = ae(async () => {
3225
3228
  if (d) return;
3226
3229
  c(!0);
3227
3230
  const W = I;
@@ -3236,7 +3239,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
3236
3239
  messages: null,
3237
3240
  conversationID: Oe.ConversationId,
3238
3241
  lastMessageTime: Oe.LastMessageTime ?? null
3239
- })), $e = /* @__PURE__ */ new Map();
3242
+ })), Fe = /* @__PURE__ */ new Map();
3240
3243
  await Promise.allSettled(
3241
3244
  be.map(async (Oe) => {
3242
3245
  if (Oe.conversationID <= 0) return;
@@ -3244,18 +3247,18 @@ function Df({ appID: t, inputRef: r, className: n }) {
3244
3247
  routeApplicationId: t,
3245
3248
  conversationId: Oe.conversationID
3246
3249
  })).data ?? []).reduce((Lt, Wt) => Wt.Read || !Wt.SenderId || Wt.SenderId === t ? Lt : Lt + 1, 0);
3247
- $e.set(Oe.conversationID, nt);
3250
+ Fe.set(Oe.conversationID, nt);
3248
3251
  })
3249
3252
  );
3250
3253
  const rt = be.map((Oe) => ({
3251
3254
  ...Oe,
3252
- unread: $e.get(Oe.conversationID) ?? 0
3255
+ unread: Fe.get(Oe.conversationID) ?? 0
3253
3256
  })).sort(ha);
3254
3257
  if (se(rt), W) {
3255
3258
  const Oe = rt.find(
3256
3259
  (Ye) => Ye.partner1 === W[0] && Ye.partner2 === W[1] || Ye.partner1 === W[1] && Ye.partner2 === W[0]
3257
3260
  );
3258
- F(Oe ? [Oe.partner1, Oe.partner2] : void 0);
3261
+ $(Oe ? [Oe.partner1, Oe.partner2] : void 0);
3259
3262
  }
3260
3263
  pe({ title: "Refreshed", description: "Chat state reinitialized." });
3261
3264
  } catch (oe) {
@@ -3274,7 +3277,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
3274
3277
  const W = V.map((oe) => oe.conversationID).filter((oe) => oe > 0);
3275
3278
  await Promise.allSettled(
3276
3279
  W.map(async (oe) => {
3277
- await P({ routeApplicationId: t, conversationId: oe }).unwrap();
3280
+ await A({ routeApplicationId: t, conversationId: oe }).unwrap();
3278
3281
  })
3279
3282
  ), se((oe) => oe.map((ee) => ({ ...ee, unread: 0 })).sort(ha)), pe({ title: "All read", description: "All conversations marked as read." });
3280
3283
  } catch (W) {
@@ -3287,10 +3290,10 @@ function Df({ appID: t, inputRef: r, className: n }) {
3287
3290
  p(!1);
3288
3291
  }
3289
3292
  }
3290
- }, [t, V, m, P, pe]);
3293
+ }, [t, V, m, A, pe]);
3291
3294
  function te() {
3292
3295
  const W = H();
3293
- W && P({ routeApplicationId: t, conversationId: W.conversationID });
3296
+ W && A({ routeApplicationId: t, conversationId: W.conversationID });
3294
3297
  }
3295
3298
  const Ne = (W) => We((oe) => [...oe, W]);
3296
3299
  K(() => {
@@ -3303,17 +3306,17 @@ function Df({ appID: t, inputRef: r, className: n }) {
3303
3306
  console.log("message received for unknown convo ID - need to refetch!"), oe = !0;
3304
3307
  return;
3305
3308
  }
3306
- se((be) => be.map(($e) => {
3307
- if (!W(ee, $e)) return $e;
3308
- const rt = $e.messages ?? [];
3309
- if (rt.some((nt) => nt.id === ee.id)) return $e;
3309
+ se((be) => be.map((Fe) => {
3310
+ if (!W(ee, Fe)) return Fe;
3311
+ const rt = Fe.messages ?? [];
3312
+ if (rt.some((nt) => nt.id === ee.id)) return Fe;
3310
3313
  let Oe = 1;
3311
3314
  const Ye = document.activeElement && document.activeElement === Xe.current;
3312
- return I?.[0] == $e.partner1 && I[1] == $e.partner2 && Ye && (Ye && (Oe = 0, te()), setTimeout(() => Re.current?.scrollIntoView({ behavior: "smooth" }), 50)), { ...$e, pending: !1, unread: $e.unread + Oe, messages: [...rt, ee] };
3315
+ return I?.[0] == Fe.partner1 && I[1] == Fe.partner2 && Ye && (Ye && (Oe = 0, te()), setTimeout(() => Re.current?.scrollIntoView({ behavior: "smooth" }), 50)), { ...Fe, pending: !1, unread: Fe.unread + Oe, messages: [...rt, ee] };
3313
3316
  }).sort(ha));
3314
3317
  }), console.log("need refetch:", oe), oe && o(), We([]);
3315
- }, [Ue, We, se, F, I]), K(() => {
3316
- const W = new hc().withUrl(Pt("/hub", i), {
3318
+ }, [Ue, We, se, $, I]), K(() => {
3319
+ const W = new hc().withUrl(At("/hub", i), {
3317
3320
  accessTokenFactory: () => localStorage.getItem("access_token"),
3318
3321
  headers: { "X-Impersonated-Id": t }
3319
3322
  }).configureLogging(fc.Information).withAutomaticReconnect().withHubProtocol(new pc()).build();
@@ -3340,7 +3343,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
3340
3343
  })) ?? [];
3341
3344
  se(
3342
3345
  (be) => be.map(
3343
- ($e) => $e.conversationID === W.conversationID ? { ...$e, messages: ee } : $e
3346
+ (Fe) => Fe.conversationID === W.conversationID ? { ...Fe, messages: ee } : Fe
3344
3347
  ).sort(ha)
3345
3348
  );
3346
3349
  } catch (oe) {
@@ -3354,7 +3357,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
3354
3357
  const oe = document.activeElement && document.activeElement === Xe.current;
3355
3358
  W.unread > 0 && oe && (te(), se((ee) => ee.map((be) => be.partner1 === I[0] && be.partner2 === I[1] ? { ...be, unread: 0 } : be)));
3356
3359
  }, [I, V]);
3357
- const { sendMessage: Me } = Na(), Ae = ae((W) => {
3360
+ const { sendMessage: Me } = Na(), Pe = ae((W) => {
3358
3361
  Me(`We have been talking with another Randmar partner and would like you to have the conversation as context for follow-up questions. Please acknowledge your reception of this chat history (one line summary of recent messages will do) and let me know that you're ready to answer questions: ${JSON.stringify(W, null, 2)}`);
3359
3362
  }, [Me]), ze = ae(async () => {
3360
3363
  if (I)
@@ -3394,25 +3397,25 @@ function Df({ appID: t, inputRef: r, className: n }) {
3394
3397
  }, ge = () => {
3395
3398
  const W = Q.trim();
3396
3399
  !ht || !W || !I || !me || (ht.unread > 0 && (te(), se((oe) => oe.map((ee) => ee.partner1 === I[0] && ee.partner2 === I[1] ? { ...ee, unread: 0 } : ee))), j(ht, W));
3397
- }, Pe = (W, oe) => O([W, oe]);
3400
+ }, Ae = (W, oe) => O([W, oe]);
3398
3401
  K(() => {
3399
3402
  if (_ === null) return;
3400
3403
  const W = V.find((ee) => ee.conversationID === _[0]);
3401
- if (!W || (F([W.partner1, W.partner2]), !me)) return;
3404
+ if (!W || ($([W.partner1, W.partner2]), !me)) return;
3402
3405
  const oe = _[1];
3403
3406
  O(null), oe && j(W, oe);
3404
- }, [_, V, F, me]);
3407
+ }, [_, V, $, me]);
3405
3408
  const { data: Ie, isLoading: _e } = rn();
3406
3409
  if (!u || _e)
3407
3410
  return /* @__PURE__ */ e(he, { className: "h-12 w-12 animate-spin mx-auto mb-4" });
3408
3411
  if (!Ie?.Name)
3409
- return /* @__PURE__ */ e(Pu, { appID: Ie?.ApplicationId ?? "" });
3412
+ return /* @__PURE__ */ e(Au, { appID: Ie?.ApplicationId ?? "" });
3410
3413
  const at = async () => {
3411
3414
  w.current && (w.current.disabled = !0), C(!0);
3412
3415
  try {
3413
3416
  const W = await x({ applicationId: t }), oe = W.data?.About ?? "a new business venture", ee = [];
3414
3417
  W.data?.IsManufacturer && ee.push("Manufacturer"), W.data?.IsReseller && ee.push("Reseller"), W.data?.IsSalesAgency && ee.push("Sales Agency");
3415
- const $e = `
3418
+ const Fe = `
3416
3419
  Your task is to draft a ready-to-send opening message from a user to the Randmar team.
3417
3420
 
3418
3421
  **Your Persona:** You are an entrepreneur and a ${ee.length > 0 ? ee.join("/") : "Entrepreneur"}.
@@ -3428,11 +3431,11 @@ function Df({ appID: t, inputRef: r, className: n }) {
3428
3431
  - **Crucially, do not use any placeholders, brackets, or instructions for the user to fill in.** Use the context provided to craft the final text.
3429
3432
  - Keep it to 1-2 concise, engaging sentences.
3430
3433
  - Output only the plain text of the message itself.
3431
- `, rt = await b($e);
3434
+ `, rt = await b(Fe);
3432
3435
  if (rt) {
3433
3436
  const Ye = (await S({ routeApplicationId: t, partnerId: "2" })).data?.ConversationId;
3434
3437
  if (Ye)
3435
- await o(), Pe(Ye, rt);
3438
+ await o(), Ae(Ye, rt);
3436
3439
  else
3437
3440
  throw new Error("Failed to retrieve conversation ID after creation.");
3438
3441
  }
@@ -3462,7 +3465,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
3462
3465
  handleChatWithRandmar: at,
3463
3466
  onFullRefreshChats: Y,
3464
3467
  onMarkAllRead: J,
3465
- setActiveChat: F
3468
+ setActiveChat: $
3466
3469
  }
3467
3470
  ),
3468
3471
  /* @__PURE__ */ e(
@@ -3485,14 +3488,14 @@ function Df({ appID: t, inputRef: r, className: n }) {
3485
3488
  {
3486
3489
  activeChatObj: ht,
3487
3490
  appID: t,
3488
- sendChatToAssistant: Ae,
3491
+ sendChatToAssistant: Pe,
3489
3492
  isAnalyzingPartnership: L,
3490
3493
  analyzePartnership: ze
3491
3494
  }
3492
3495
  )
3493
3496
  ] });
3494
3497
  }
3495
- const si = qt.Root, ln = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
3498
+ const si = qt.Root, ln = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
3496
3499
  qt.List,
3497
3500
  {
3498
3501
  ref: n,
@@ -3504,7 +3507,7 @@ const si = qt.Root, ln = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE_
3504
3507
  }
3505
3508
  ));
3506
3509
  ln.displayName = qt.List.displayName;
3507
- const st = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
3510
+ const st = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
3508
3511
  qt.Trigger,
3509
3512
  {
3510
3513
  ref: n,
@@ -3516,7 +3519,7 @@ const st = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
3516
3519
  }
3517
3520
  ));
3518
3521
  st.displayName = qt.Trigger.displayName;
3519
- const lt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
3522
+ const lt = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
3520
3523
  qt.Content,
3521
3524
  {
3522
3525
  ref: n,
@@ -3537,7 +3540,7 @@ function Iu({
3537
3540
  confirmText: l = "Confirm",
3538
3541
  cancelText: o = "Cancel"
3539
3542
  }) {
3540
- return /* @__PURE__ */ e(Fe, { open: t, onOpenChange: r, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
3543
+ return /* @__PURE__ */ e($e, { open: t, onOpenChange: r, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
3541
3544
  /* @__PURE__ */ a(qe, { children: [
3542
3545
  /* @__PURE__ */ e(He, { children: s }),
3543
3546
  /* @__PURE__ */ e(Ge, { children: i })
@@ -3646,13 +3649,13 @@ function Du({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
3646
3649
  ) : /* @__PURE__ */ a("form", { onSubmit: c(async (y) => {
3647
3650
  if (r) return;
3648
3651
  let C = !0, S = !1;
3649
- const P = [
3652
+ const A = [
3650
3653
  { key: "accountsPayableRep", apiKey: "ContactName", value: y.accountsPayableRep },
3651
3654
  { key: "representativeEmail", apiKey: "RepresentativeEmail", value: y.representativeEmail },
3652
3655
  { key: "phone", apiKey: "Phone", value: y.phone },
3653
3656
  { key: "terms", apiKey: "Terms", value: y.terms }
3654
3657
  ];
3655
- for (const k of P) {
3658
+ for (const k of A) {
3656
3659
  const D = k.value, L = t?.[k.apiKey];
3657
3660
  if (D !== L && D !== void 0) {
3658
3661
  S = !0;
@@ -3773,7 +3776,7 @@ function Mu({ manufacturer: t, readonly: r = !1, isLoading: n }) {
3773
3776
  /* @__PURE__ */ e("br", {}),
3774
3777
  /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
3775
3778
  /* @__PURE__ */ e(
3776
- Pa,
3779
+ Aa,
3777
3780
  {
3778
3781
  id: "openToWork",
3779
3782
  checked: u("openToWork"),
@@ -3832,14 +3835,14 @@ function Ou({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
3832
3835
  { key: "publicResources", apiKey: "PublicResourcesLink", value: k.publicResources }
3833
3836
  ];
3834
3837
  for (const I of M) {
3835
- const F = I.value, Q = t?.[I.apiKey], z = typeof Q == "boolean" ? String(Q) : Q;
3836
- if (F !== z && F !== void 0) {
3838
+ const $ = I.value, Q = t?.[I.apiKey], z = typeof Q == "boolean" ? String(Q) : Q;
3839
+ if ($ !== z && $ !== void 0) {
3837
3840
  L = !0;
3838
3841
  try {
3839
3842
  await l({
3840
3843
  applicationId: t?.ManufacturerId ?? "",
3841
3844
  fieldName: I.apiKey,
3842
- newValue: String(F)
3845
+ newValue: String($)
3843
3846
  }).unwrap() || (D = !1);
3844
3847
  } catch (_) {
3845
3848
  console.error(`Error updating ${I.apiKey}:`, _), D = !1;
@@ -3855,7 +3858,7 @@ function Ou({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
3855
3858
  description: "Failed to update",
3856
3859
  variant: "destructive"
3857
3860
  });
3858
- }, S = (k) => !k || k.trim() === "", P = (k) => {
3861
+ }, S = (k) => !k || k.trim() === "", A = (k) => {
3859
3862
  u(k);
3860
3863
  };
3861
3864
  return /* @__PURE__ */ a(q, { children: [
@@ -3935,11 +3938,11 @@ function Ou({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
3935
3938
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
3936
3939
  /* @__PURE__ */ e(X, { className: "text-sm font-medium leading-none", htmlFor: "manufacturerCategories", children: "Manufacturer Categories" }),
3937
3940
  /* @__PURE__ */ e(
3938
- $m,
3941
+ Fm,
3939
3942
  {
3940
3943
  options: Tu,
3941
3944
  selected: o,
3942
- onChange: P,
3945
+ onChange: A,
3943
3946
  placeholder: "Select or type categories...",
3944
3947
  disabled: r
3945
3948
  }
@@ -4005,7 +4008,7 @@ function Eu({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
4005
4008
  }, [t, m, h]);
4006
4009
  const b = async (C) => {
4007
4010
  if (r) return !1;
4008
- let S = !0, P = !1;
4011
+ let S = !0, A = !1;
4009
4012
  const k = [
4010
4013
  { key: "partnerPortal", apiKey: "PartnerPortal", value: C.partnerPortal },
4011
4014
  { key: "partnerRegistrationLink", apiKey: "PartnerRegistrationLink", value: C.partnerRegistrationLink }
@@ -4013,7 +4016,7 @@ function Eu({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
4013
4016
  for (const D of k) {
4014
4017
  const L = D.value, M = t?.[D.apiKey];
4015
4018
  if (L !== M && L !== void 0) {
4016
- P = !0;
4019
+ A = !0;
4017
4020
  try {
4018
4021
  await l({
4019
4022
  applicationId: t?.ManufacturerId ?? "",
@@ -4025,11 +4028,11 @@ function Eu({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
4025
4028
  }
4026
4029
  }
4027
4030
  }
4028
- S && P ? (i({
4031
+ S && A ? (i({
4029
4032
  title: "Qualifications info",
4030
4033
  description: "Information updated successfully",
4031
4034
  variant: "success"
4032
- }), u({ ...C }), s && s(!1)) : S ? P || i({
4035
+ }), u({ ...C }), s && s(!1)) : S ? A || i({
4033
4036
  title: "No changes",
4034
4037
  description: "No changes were made to the information.",
4035
4038
  variant: "info"
@@ -4130,7 +4133,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
4130
4133
  id: "Reorder",
4131
4134
  title: "Reordering Report",
4132
4135
  description: "The Reordering Report provides a snapshot of all part numbers auto-reordering statuses. Aiding your understanding of what will be automatically reordered by our system or not once the inventory reaches low numbers.",
4133
- icon: $n
4136
+ icon: Fn
4134
4137
  }
4135
4138
  ]
4136
4139
  },
@@ -4147,11 +4150,11 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
4147
4150
  id: "Products",
4148
4151
  title: "Products Report",
4149
4152
  description: "Detailed document outlining all your products properties. It provides a comprehensive overview of essential information and insights that help you make informed decisions.",
4150
- icon: $n
4153
+ icon: Fn
4151
4154
  }
4152
4155
  ]
4153
4156
  }
4154
- ], [w, { isLoading: x }] = So(), [b, { isLoading: y }] = Co(), [C, { isLoading: S }] = ko(), [P, { isLoading: k }] = Ro(), [D, { isLoading: L }] = Ao(), [M, { isLoading: I }] = Po(), F = x || y || S || k || L || I, Q = (V) => {
4157
+ ], [w, { isLoading: x }] = So(), [b, { isLoading: y }] = Co(), [C, { isLoading: S }] = ko(), [A, { isLoading: k }] = Ro(), [D, { isLoading: L }] = Po(), [M, { isLoading: I }] = Ao(), $ = x || y || S || k || L || I, Q = (V) => {
4155
4158
  l(V), d(!0);
4156
4159
  }, z = (V) => {
4157
4160
  d(V), V || (m(void 0), g(void 0));
@@ -4180,7 +4183,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
4180
4183
  }).unwrap();
4181
4184
  break;
4182
4185
  case "Reorder":
4183
- await P({
4186
+ await A({
4184
4187
  routeManufacturerId: t,
4185
4188
  emailAddress: o
4186
4189
  }).unwrap();
@@ -4268,7 +4271,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
4268
4271
  se.id
4269
4272
  ))
4270
4273
  ] }, V.name)) }),
4271
- /* @__PURE__ */ e(Fe, { open: h, onOpenChange: z, children: /* @__PURE__ */ a(Be, { children: [
4274
+ /* @__PURE__ */ e($e, { open: h, onOpenChange: z, children: /* @__PURE__ */ a(Be, { children: [
4272
4275
  /* @__PURE__ */ a(qe, { children: [
4273
4276
  /* @__PURE__ */ a(He, { children: [
4274
4277
  "Request ",
@@ -4292,7 +4295,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
4292
4295
  ] }),
4293
4296
  i?.id === "Sales" && /* @__PURE__ */ a("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
4294
4297
  /* @__PURE__ */ e(
4295
- Ar,
4298
+ Pr,
4296
4299
  {
4297
4300
  label: "Start Date",
4298
4301
  id: "start-date",
@@ -4301,7 +4304,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
4301
4304
  }
4302
4305
  ),
4303
4306
  /* @__PURE__ */ e(
4304
- Ar,
4307
+ Pr,
4305
4308
  {
4306
4309
  label: "End Date",
4307
4310
  id: "end-date",
@@ -4311,7 +4314,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
4311
4314
  )
4312
4315
  ] }),
4313
4316
  i?.id === "Inventory" && /* @__PURE__ */ e(
4314
- Ar,
4317
+ Pr,
4315
4318
  {
4316
4319
  label: "Inventory Date",
4317
4320
  id: "inventory-date",
@@ -4326,8 +4329,8 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
4326
4329
  E,
4327
4330
  {
4328
4331
  onClick: _,
4329
- disabled: !o || F || i?.id === "Sales" && (!c || !p) || i?.id === "Inventory" && !c,
4330
- children: F ? /* @__PURE__ */ a(U, { children: [
4332
+ disabled: !o || $ || i?.id === "Sales" && (!c || !p) || i?.id === "Inventory" && !c,
4333
+ children: $ ? /* @__PURE__ */ a(U, { children: [
4331
4334
  /* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }),
4332
4335
  "Sending..."
4333
4336
  ] }) : "Send Report"
@@ -4337,7 +4340,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
4337
4340
  ] }) })
4338
4341
  ] });
4339
4342
  }
4340
- function $u(t) {
4343
+ function Fu(t) {
4341
4344
  const {
4342
4345
  data: r,
4343
4346
  isLoading: n,
@@ -4352,7 +4355,7 @@ function $u(t) {
4352
4355
  shipped: { orders: 0, amount: 0 },
4353
4356
  delayed: { orders: 0, amount: 0 }
4354
4357
  };
4355
- const h = i.filter((S) => S.DocumentType === "Order"), d = i.filter((S) => S.DocumentType === "Shipment"), c = h.filter((S) => S.WarehouseCode !== "3PLE"), m = c.reduce((S, P) => S + (P.Quantity || 0), 0), p = c.reduce((S, P) => S + (P.ExtendedPrice || 0), 0), g = h.filter((S) => S.WarehouseCode === "3PLE"), N = g.reduce((S, P) => S + (P.Quantity || 0), 0), w = g.reduce((S, P) => S + (P.ExtendedPrice || 0), 0), x = d.length, b = d.reduce((S, P) => S + (P.ExtendedPrice || 0), 0), y = m + N + x, C = p + w + b;
4358
+ const h = i.filter((S) => S.DocumentType === "Order"), d = i.filter((S) => S.DocumentType === "Shipment"), c = h.filter((S) => S.WarehouseCode !== "3PLE"), m = c.reduce((S, A) => S + (A.Quantity || 0), 0), p = c.reduce((S, A) => S + (A.ExtendedPrice || 0), 0), g = h.filter((S) => S.WarehouseCode === "3PLE"), N = g.reduce((S, A) => S + (A.Quantity || 0), 0), w = g.reduce((S, A) => S + (A.ExtendedPrice || 0), 0), x = d.length, b = d.reduce((S, A) => S + (A.ExtendedPrice || 0), 0), y = m + N + x, C = p + w + b;
4356
4359
  return {
4357
4360
  all: { orders: y, amount: C },
4358
4361
  processing: { orders: m, amount: p },
@@ -4447,7 +4450,7 @@ function $u(t) {
4447
4450
  ] })
4448
4451
  ] });
4449
4452
  }
4450
- function Fu(t) {
4453
+ function $u(t) {
4451
4454
  if (!t) return;
4452
4455
  const r = [
4453
4456
  "",
@@ -4468,7 +4471,7 @@ function Fu(t) {
4468
4471
  return t === void 0 && (t = (/* @__PURE__ */ new Date()).getMonth() + 1), t < 1 && (t = 12 + t), r[t];
4469
4472
  }
4470
4473
  function li({ fiscalYearMonthStart: t, salesData: r, isLoading: n }) {
4471
- const s = r?.SalesLast30Days ?? 0, i = r?.SalesLast3Months ?? 0, l = r?.SalesYearToDay ?? 0, o = Fu(t);
4474
+ const s = r?.SalesLast30Days ?? 0, i = r?.SalesLast3Months ?? 0, l = r?.SalesYearToDay ?? 0, o = $u(t);
4472
4475
  return n ? /* @__PURE__ */ a("div", { className: "grid gap-4 @xl:grid-cols-2 @2xl:grid-cols-3 mb-4", children: [
4473
4476
  /* @__PURE__ */ a(q, { children: [
4474
4477
  /* @__PURE__ */ a(Z, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
@@ -4537,7 +4540,7 @@ function li({ fiscalYearMonthStart: t, salesData: r, isLoading: n }) {
4537
4540
  ] })
4538
4541
  ] });
4539
4542
  }
4540
- const q = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4543
+ const q = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4541
4544
  "div",
4542
4545
  {
4543
4546
  ref: n,
@@ -4549,7 +4552,7 @@ const q = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4549
4552
  }
4550
4553
  ));
4551
4554
  q.displayName = "Card";
4552
- const Z = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4555
+ const Z = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4553
4556
  "div",
4554
4557
  {
4555
4558
  ref: n,
@@ -4558,7 +4561,7 @@ const Z = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4558
4561
  }
4559
4562
  ));
4560
4563
  Z.displayName = "CardHeader";
4561
- const fe = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4564
+ const fe = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4562
4565
  "div",
4563
4566
  {
4564
4567
  ref: n,
@@ -4567,7 +4570,7 @@ const fe = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4567
4570
  }
4568
4571
  ));
4569
4572
  fe.displayName = "CardTitle";
4570
- const Ia = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4573
+ const Ia = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4571
4574
  "div",
4572
4575
  {
4573
4576
  ref: n,
@@ -4576,9 +4579,9 @@ const Ia = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4576
4579
  }
4577
4580
  ));
4578
4581
  Ia.displayName = "CardDescription";
4579
- const G = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e("div", { ref: n, className: v("p-6 pt-0", t), ...r }));
4582
+ const G = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e("div", { ref: n, className: v("p-6 pt-0", t), ...r }));
4580
4583
  G.displayName = "CardContent";
4581
- const St = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4584
+ const St = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4582
4585
  "div",
4583
4586
  {
4584
4587
  ref: n,
@@ -4587,8 +4590,8 @@ const St = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
4587
4590
  }
4588
4591
  ));
4589
4592
  St.displayName = "CardFooter";
4590
- const Da = A.forwardRef(({ className: t, value: r, ...n }, s) => /* @__PURE__ */ e(
4591
- $r.Root,
4593
+ const Da = P.forwardRef(({ className: t, value: r, ...n }, s) => /* @__PURE__ */ e(
4594
+ Fr.Root,
4592
4595
  {
4593
4596
  ref: s,
4594
4597
  className: v(
@@ -4597,7 +4600,7 @@ const Da = A.forwardRef(({ className: t, value: r, ...n }, s) => /* @__PURE__ */
4597
4600
  ),
4598
4601
  ...n,
4599
4602
  children: /* @__PURE__ */ e(
4600
- $r.Indicator,
4603
+ Fr.Indicator,
4601
4604
  {
4602
4605
  className: "h-full w-full flex-1 bg-primary transition-all",
4603
4606
  style: { transform: `translateX(-${100 - (r || 0)}%)` }
@@ -4605,7 +4608,7 @@ const Da = A.forwardRef(({ className: t, value: r, ...n }, s) => /* @__PURE__ */
4605
4608
  )
4606
4609
  }
4607
4610
  ));
4608
- Da.displayName = $r.Root.displayName;
4611
+ Da.displayName = Fr.Root.displayName;
4609
4612
  function Bu({
4610
4613
  manufacturer: t,
4611
4614
  isLoading: r
@@ -4868,7 +4871,7 @@ function Vu({
4868
4871
  }
4869
4872
  ),
4870
4873
  /* @__PURE__ */ e(
4871
- $u,
4874
+ Fu,
4872
4875
  {
4873
4876
  manufacturerId: g?.ManufacturerId ?? "",
4874
4877
  activeOrders: g?.ActiveOrderDetails ?? void 0,
@@ -5026,7 +5029,7 @@ const ju = sa(
5026
5029
  size: "default"
5027
5030
  }
5028
5031
  }
5029
- ), xe = A.forwardRef(
5032
+ ), xe = P.forwardRef(
5030
5033
  ({ className: t, variant: r, size: n, icon: s, children: i, ...l }, o) => /* @__PURE__ */ a("div", { ref: o, className: v(ju({ variant: r, size: n }), t), ...l, children: [
5031
5034
  s && /* @__PURE__ */ e("span", { className: "mr-1", children: s }),
5032
5035
  i
@@ -5116,7 +5119,7 @@ function qu({
5116
5119
  ] })
5117
5120
  ] }) });
5118
5121
  }
5119
- const Ut = je.Root, Mf = je.Group, _t = je.Value, Dt = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ a(
5122
+ const Ut = je.Root, Mf = je.Group, _t = je.Value, Dt = P.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ a(
5120
5123
  je.Trigger,
5121
5124
  {
5122
5125
  ref: s,
@@ -5132,7 +5135,7 @@ const Ut = je.Root, Mf = je.Group, _t = je.Value, Dt = A.forwardRef(({ className
5132
5135
  }
5133
5136
  ));
5134
5137
  Dt.displayName = je.Trigger.displayName;
5135
- const oi = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
5138
+ const oi = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
5136
5139
  je.ScrollUpButton,
5137
5140
  {
5138
5141
  ref: n,
@@ -5145,7 +5148,7 @@ const oi = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
5145
5148
  }
5146
5149
  ));
5147
5150
  oi.displayName = je.ScrollUpButton.displayName;
5148
- const ci = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
5151
+ const ci = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
5149
5152
  je.ScrollDownButton,
5150
5153
  {
5151
5154
  ref: n,
@@ -5158,7 +5161,7 @@ const ci = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
5158
5161
  }
5159
5162
  ));
5160
5163
  ci.displayName = je.ScrollDownButton.displayName;
5161
- const Mt = A.forwardRef(({ className: t, children: r, position: n = "popper", ...s }, i) => /* @__PURE__ */ e(je.Portal, { children: /* @__PURE__ */ a(
5164
+ const Mt = P.forwardRef(({ className: t, children: r, position: n = "popper", ...s }, i) => /* @__PURE__ */ e(je.Portal, { children: /* @__PURE__ */ a(
5162
5165
  je.Content,
5163
5166
  {
5164
5167
  ref: i,
@@ -5186,7 +5189,7 @@ const Mt = A.forwardRef(({ className: t, children: r, position: n = "popper", ..
5186
5189
  }
5187
5190
  ) }));
5188
5191
  Mt.displayName = je.Content.displayName;
5189
- const Qu = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
5192
+ const Qu = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
5190
5193
  je.Label,
5191
5194
  {
5192
5195
  ref: n,
@@ -5195,7 +5198,7 @@ const Qu = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
5195
5198
  }
5196
5199
  ));
5197
5200
  Qu.displayName = je.Label.displayName;
5198
- const ot = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ a(
5201
+ const ot = P.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ a(
5199
5202
  je.Item,
5200
5203
  {
5201
5204
  ref: s,
@@ -5211,7 +5214,7 @@ const ot = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__
5211
5214
  }
5212
5215
  ));
5213
5216
  ot.displayName = je.Item.displayName;
5214
- const Hu = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
5217
+ const Hu = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
5215
5218
  je.Separator,
5216
5219
  {
5217
5220
  ref: n,
@@ -5266,7 +5269,7 @@ function Wu({
5266
5269
  } finally {
5267
5270
  u(!1);
5268
5271
  }
5269
- }, C = () => r.Categories?.find((k) => k.CategoryCode === i)?.CategoryName || i, S = ye(() => w?.Products ? [...w.Products].sort((k, D) => c === "price-asc" ? (k.MAP ?? 0) - (D.MAP ?? 0) : c === "price-desc" ? (D.MAP ?? 0) - (k.MAP ?? 0) : c === "name" ? (k.Title ?? "").localeCompare(D.Title ?? "") : c === "percentile" ? (D.OverallPercentileRank ?? 0) - (k.OverallPercentileRank ?? 0) : 0) : [], [w?.Products, c]), P = ye(() => p ? S.filter((k) => {
5272
+ }, C = () => r.Categories?.find((k) => k.CategoryCode === i)?.CategoryName || i, S = ye(() => w?.Products ? [...w.Products].sort((k, D) => c === "price-asc" ? (k.MAP ?? 0) - (D.MAP ?? 0) : c === "price-desc" ? (D.MAP ?? 0) - (k.MAP ?? 0) : c === "name" ? (k.Title ?? "").localeCompare(D.Title ?? "") : c === "percentile" ? (D.OverallPercentileRank ?? 0) - (k.OverallPercentileRank ?? 0) : 0) : [], [w?.Products, c]), A = ye(() => p ? S.filter((k) => {
5270
5273
  const D = k.Distribution?.Inventory;
5271
5274
  return !Array.isArray(D) || D.length === 0 ? !1 : D.reduce((M, I) => M + (I?.AvailableQuantity ?? 0), 0) > 0;
5272
5275
  }) : S, [p, S]);
@@ -5358,7 +5361,7 @@ function Wu({
5358
5361
  ] })
5359
5362
  ] })
5360
5363
  ] }),
5361
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 @md:grid-cols-2 gap-4 mb-4", children: x || b ? Array.from({ length: 4 }).map((k, D) => /* @__PURE__ */ e(Wr, {}, D)) : P.length > 0 ? P.map((k) => /* @__PURE__ */ e(
5364
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 @md:grid-cols-2 gap-4 mb-4", children: x || b ? Array.from({ length: 4 }).map((k, D) => /* @__PURE__ */ e(Wr, {}, D)) : A.length > 0 ? A.map((k) => /* @__PURE__ */ e(
5362
5365
  Wr,
5363
5366
  {
5364
5367
  applicationId: t,
@@ -5372,7 +5375,7 @@ function Wu({
5372
5375
  /* @__PURE__ */ e(Ot, { children: "Warning" }),
5373
5376
  /* @__PURE__ */ e(Et, { children: p && S.length > 0 ? "No in-stock products found in this category. Try turning off the In Stock filter." : "No products found for this manufacturer category." })
5374
5377
  ] }) }),
5375
- /* @__PURE__ */ e(Fe, { open: h, onOpenChange: d, children: /* @__PURE__ */ a(Be, { children: [
5378
+ /* @__PURE__ */ e($e, { open: h, onOpenChange: d, children: /* @__PURE__ */ a(Be, { children: [
5376
5379
  /* @__PURE__ */ a(qe, { children: [
5377
5380
  /* @__PURE__ */ e(He, { children: "Confirm Sync to Shopify" }),
5378
5381
  /* @__PURE__ */ a(Ge, { children: [
@@ -5459,7 +5462,7 @@ function Tf({
5459
5462
  manufacturer: l?.Manufacturer
5460
5463
  }
5461
5464
  ),
5462
- s && l?.Manufacturer?.Categories?.findIndex((y) => y.AvailableToBuy) !== -1 && /* @__PURE__ */ a(Fe, { open: p, onOpenChange: g, children: [
5465
+ s && l?.Manufacturer?.Categories?.findIndex((y) => y.AvailableToBuy) !== -1 && /* @__PURE__ */ a($e, { open: p, onOpenChange: g, children: [
5463
5466
  /* @__PURE__ */ e(xa, { asChild: !0, children: /* @__PURE__ */ e(E, { className: "ml-2 bg-success text-success-foreground hover:bg-success/90", disabled: c, children: c ? /* @__PURE__ */ a(U, { children: [
5464
5467
  /* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }),
5465
5468
  "Syncing..."
@@ -5590,7 +5593,7 @@ const Gu = ({ reseller: t, appID: r, isLoading: n, readonly: s, onUnsavedChanges
5590
5593
  t && Object.keys(t).length > 0 && (p(d), h(d));
5591
5594
  }, [t, p, d]);
5592
5595
  const y = async (S) => {
5593
- let P = !0, k = !1;
5596
+ let A = !0, k = !1;
5594
5597
  const D = Object.keys(S).map((L) => ({
5595
5598
  key: L,
5596
5599
  keyApi: L.charAt(0).toUpperCase() + L.slice(1)
@@ -5604,17 +5607,17 @@ const Gu = ({ reseller: t, appID: r, isLoading: n, readonly: s, onUnsavedChanges
5604
5607
  applicationId: r,
5605
5608
  fieldName: L.keyApi,
5606
5609
  newValue: String(M)
5607
- }).unwrap() || (P = !1);
5608
- } catch (F) {
5609
- console.error(`Error updating ${L.keyApi}:`, F), P = !1;
5610
+ }).unwrap() || (A = !1);
5611
+ } catch ($) {
5612
+ console.error(`Error updating ${L.keyApi}:`, $), A = !1;
5610
5613
  }
5611
5614
  }
5612
5615
  }
5613
- P && k ? (l({
5616
+ A && k ? (l({
5614
5617
  title: "Public info",
5615
5618
  description: "Information updated successfully",
5616
5619
  variant: "success"
5617
- }), h({ ...S }), i && i(!1)) : P || l({
5620
+ }), h({ ...S }), i && i(!1)) : A || l({
5618
5621
  title: "Updation error",
5619
5622
  description: "Failed to update",
5620
5623
  variant: "destructive"
@@ -5739,7 +5742,7 @@ const Gu = ({ reseller: t, appID: r, isLoading: n, readonly: s, onUnsavedChanges
5739
5742
  ] });
5740
5743
  };
5741
5744
  function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail: i, isSuperAdmin: l }) {
5742
- const { toast: o } = Ee(), { Statement: u, CreditLimit: h } = r, [d, c] = T(!1), [m, p] = T(!1), [g, N] = T(!1), [w, x] = T(!1), [b, y] = T(i || ""), [C, S] = T(!1), [P, k] = T(h?.toString() || ""), [D, { isLoading: L }] = Lo(), M = [
5745
+ const { toast: o } = Ee(), { Statement: u, CreditLimit: h } = r, [d, c] = T(!1), [m, p] = T(!1), [g, N] = T(!1), [w, x] = T(!1), [b, y] = T(i || ""), [C, S] = T(!1), [A, k] = T(h?.toString() || ""), [D, { isLoading: L }] = Lo(), M = [
5743
5746
  {
5744
5747
  label: "0 - 30 Days",
5745
5748
  value: /* @__PURE__ */ e(pt, { value: u?.Over0 || 0, style: "currency", currency: "CAD", currencyDisplay: "symbol" }),
@@ -5770,7 +5773,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
5770
5773
  ] }),
5771
5774
  icon: Wa
5772
5775
  }
5773
- ], [I] = $o(), F = async (O) => {
5776
+ ], [I] = Fo(), $ = async (O) => {
5774
5777
  O ? c(!0) : p(!0);
5775
5778
  try {
5776
5779
  const se = (await I({
@@ -5870,7 +5873,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
5870
5873
  {
5871
5874
  variant: "outline",
5872
5875
  size: "icon",
5873
- onClick: () => F(!0),
5876
+ onClick: () => $(!0),
5874
5877
  disabled: d,
5875
5878
  children: d ? /* @__PURE__ */ e(he, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(fl, { className: "h-4 w-4" })
5876
5879
  }
@@ -5883,7 +5886,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
5883
5886
  {
5884
5887
  variant: "outline",
5885
5888
  size: "icon",
5886
- onClick: () => F(!1),
5889
+ onClick: () => $(!1),
5887
5890
  disabled: m,
5888
5891
  children: m ? /* @__PURE__ */ e(he, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Ca, { className: "h-4 w-4" })
5889
5892
  }
@@ -5917,7 +5920,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
5917
5920
  ] })
5918
5921
  ] })
5919
5922
  ] }),
5920
- /* @__PURE__ */ e(Fe, { open: w, onOpenChange: x, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
5923
+ /* @__PURE__ */ e($e, { open: w, onOpenChange: x, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
5921
5924
  /* @__PURE__ */ a(qe, { children: [
5922
5925
  /* @__PURE__ */ e(He, { children: "Send Statement by Email" }),
5923
5926
  /* @__PURE__ */ e(Ge, { children: "Enter the recipient's email address below. The statement will be sent as a PDF attachment." })
@@ -5952,7 +5955,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
5952
5955
  }
5953
5956
  ) })
5954
5957
  ] }) }),
5955
- /* @__PURE__ */ e(Fe, { open: C, onOpenChange: S, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
5958
+ /* @__PURE__ */ e($e, { open: C, onOpenChange: S, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
5956
5959
  /* @__PURE__ */ a(qe, { children: [
5957
5960
  /* @__PURE__ */ e(He, { children: "Edit Credit Limit" }),
5958
5961
  /* @__PURE__ */ e(Ge, { children: "Enter the new credit limit for this reseller." })
@@ -5964,7 +5967,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
5964
5967
  {
5965
5968
  id: "creditLimit",
5966
5969
  type: "number",
5967
- value: P,
5970
+ value: A,
5968
5971
  onChange: (O) => k(O.target.value),
5969
5972
  className: "col-span-3",
5970
5973
  placeholder: "0.00"
@@ -5976,7 +5979,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
5976
5979
  {
5977
5980
  type: "submit",
5978
5981
  onClick: async () => {
5979
- const O = Number(P);
5982
+ const O = Number(A);
5980
5983
  if (isNaN(O)) {
5981
5984
  o({
5982
5985
  title: "Invalid Amount",
@@ -6022,7 +6025,7 @@ function Kn({ icon: t, label: r, value: n }) {
6022
6025
  ] });
6023
6026
  }
6024
6027
  function Yu({ open: t, setOpen: r, tier: n, onTierChange: s, isLoading: i }) {
6025
- return /* @__PURE__ */ e(Fe, { open: t, onOpenChange: r, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
6028
+ return /* @__PURE__ */ e($e, { open: t, onOpenChange: r, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
6026
6029
  /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ e(He, { children: "Change Pricing Tier" }) }),
6027
6030
  /* @__PURE__ */ a("div", { className: "grid gap-1.5 py-2", children: [
6028
6031
  /* @__PURE__ */ a("p", { className: "text-lg text-muted-foreground", children: [
@@ -6052,7 +6055,7 @@ $10 with opportunities under $1,000` : t === "D" ? "$15 under $1,500" : t === "E
6052
6055
  COOPSCO: "coopsco",
6053
6056
  "Jean Coutu": "jeancoutu",
6054
6057
  Exclusive: "exclusive"
6055
- }[O] || "", g = (O) => O && { A: "free", B: "fixed", C: "dropshipped", D: "under1500", E: "fullcharges" }[O] || "", N = (O) => O && { 1: "exclusive", 2: "ecommerce", 3: "commercial", 4: "buyinggroup", 5: "cost" }[O] || "", [w, x] = T(p(n?.Priority ?? "")), [b, y] = T(g(n?.ShippingProfile ?? "")), [C, S] = T(N(n?.PriceProfile)), P = (O) => ({ starter: "Starter", ecommerce: "E-Commerce", commercial: "Commercial", cws: "Basics", novexco: "Novexco", coopsco: "COOPSCO", jeancoutu: "Jean Coutu", exclusive: "Exclusive" })[O] || O, k = (O) => ({ free: "A", fixed: "B", dropshipped: "C", under1500: "D", fullcharges: "E" })[O] || O, D = (O) => ({ exclusive: "1", ecommerce: "2", commercial: "3", buyinggroup: "4", cost: "5" })[O] || O;
6058
+ }[O] || "", g = (O) => O && { A: "free", B: "fixed", C: "dropshipped", D: "under1500", E: "fullcharges" }[O] || "", N = (O) => O && { 1: "exclusive", 2: "ecommerce", 3: "commercial", 4: "buyinggroup", 5: "cost" }[O] || "", [w, x] = T(p(n?.Priority ?? "")), [b, y] = T(g(n?.ShippingProfile ?? "")), [C, S] = T(N(n?.PriceProfile)), A = (O) => ({ starter: "Starter", ecommerce: "E-Commerce", commercial: "Commercial", cws: "Basics", novexco: "Novexco", coopsco: "COOPSCO", jeancoutu: "Jean Coutu", exclusive: "Exclusive" })[O] || O, k = (O) => ({ free: "A", fixed: "B", dropshipped: "C", under1500: "D", fullcharges: "E" })[O] || O, D = (O) => ({ exclusive: "1", ecommerce: "2", commercial: "3", buyinggroup: "4", cost: "5" })[O] || O;
6056
6059
  K(() => {
6057
6060
  x(p(n?.Priority ?? "")), y(g(n?.ShippingProfile ?? "")), S(N(n?.PriceProfile));
6058
6061
  }, [n]);
@@ -6064,13 +6067,13 @@ $10 with opportunities under $1,000` : t === "D" ? "$15 under $1,500" : t === "E
6064
6067
  }
6065
6068
  }, M = async (O) => {
6066
6069
  x(O);
6067
- const V = P(O);
6070
+ const V = A(O);
6068
6071
  L("Priority", V, `Priority updated to ${V}`, "Failed to update priority");
6069
6072
  }, I = async (O) => {
6070
6073
  y(O);
6071
6074
  const V = k(O);
6072
6075
  L("ShippingProfile", V, `Shipping profile updated to ${V}`, "Failed to update shipping profile");
6073
- }, F = async (O) => {
6076
+ }, $ = async (O) => {
6074
6077
  S(O);
6075
6078
  const V = D(O);
6076
6079
  L("PriceProfile", V, `Pricing profile updated to ${V}`, "Failed to update pricing profile");
@@ -6202,7 +6205,7 @@ $10 with opportunities under $1,000` : t === "D" ? "$15 under $1,500" : t === "E
6202
6205
  ] }),
6203
6206
  /* @__PURE__ */ a("div", { className: "bg-muted/30 p-2 rounded-lg", children: [
6204
6207
  /* @__PURE__ */ e(X, { className: "block mb-1 text-xs font-medium", children: "Pricing Profile" }),
6205
- /* @__PURE__ */ e(pa, { value: C, onValueChange: F, className: "grid grid-cols-2 @sm:grid-cols-3 gap-1", children: [{ value: "exclusive", label: "Exclusive (1)" }, { value: "ecommerce", label: "E-Commerce (2)" }, { value: "commercial", label: "Commercial (3)" }, { value: "buyinggroup", label: "Buying Group (4)" }, { value: "cost", label: "Cost (5)" }].map((O) => /* @__PURE__ */ a("div", { className: "flex items-center space-x-1", children: [
6208
+ /* @__PURE__ */ e(pa, { value: C, onValueChange: $, className: "grid grid-cols-2 @sm:grid-cols-3 gap-1", children: [{ value: "exclusive", label: "Exclusive (1)" }, { value: "ecommerce", label: "E-Commerce (2)" }, { value: "commercial", label: "Commercial (3)" }, { value: "buyinggroup", label: "Buying Group (4)" }, { value: "cost", label: "Cost (5)" }].map((O) => /* @__PURE__ */ a("div", { className: "flex items-center space-x-1", children: [
6206
6209
  /* @__PURE__ */ e(Rt, { value: O.value, id: `pricing-${O.value}`, className: "h-6 w-6 scale-50 antialiased" }),
6207
6210
  /* @__PURE__ */ e(X, { htmlFor: `pricing-${O.value}`, className: "cursor-pointer text-xs", children: O.label })
6208
6211
  ] }, O.value)) })
@@ -6303,7 +6306,7 @@ function tm({ openOrders: t = [], isLoading: r = !1 }) {
6303
6306
  ] });
6304
6307
  }
6305
6308
  function am({ isLoading: t, userEmail: r, appID: n }) {
6306
- const { toast: s } = Ee(), [i, { isLoading: l }] = Fo(), [o, { isLoading: u }] = Bo(), [h, { isLoading: d }] = zo(), [c, { isLoading: m }] = Rs(), [p, { isLoading: g }] = Vo(), [N, { isLoading: w }] = ks(), [x, b] = T(null), [y, C] = T(r), [S, P] = T(!1), [k, D] = T("all"), { data: L, isLoading: M } = Or(
6309
+ const { toast: s } = Ee(), [i, { isLoading: l }] = $o(), [o, { isLoading: u }] = Bo(), [h, { isLoading: d }] = zo(), [c, { isLoading: m }] = Rs(), [p, { isLoading: g }] = Vo(), [N, { isLoading: w }] = ks(), [x, b] = T(null), [y, C] = T(r), [S, A] = T(!1), [k, D] = T("all"), { data: L, isLoading: M } = Or(
6307
6310
  {
6308
6311
  routeApplicationId: n,
6309
6312
  withSpecification: !1
@@ -6360,8 +6363,8 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
6360
6363
  }
6361
6364
  ]
6362
6365
  }
6363
- ], F = async (_) => {
6364
- b(_), _.id === "Products" && D("all"), P(!0);
6366
+ ], $ = async (_) => {
6367
+ b(_), _.id === "Products" && D("all"), A(!0);
6365
6368
  }, Q = async () => {
6366
6369
  if (!(!x || !n))
6367
6370
  try {
@@ -6411,7 +6414,7 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
6411
6414
  title: "Report requested",
6412
6415
  description: `The ${x.title} will be sent to ${y} shortly.`,
6413
6416
  variant: "success"
6414
- }), P(!1);
6417
+ }), A(!1);
6415
6418
  } catch (_) {
6416
6419
  console.error("Error requesting report:", _), s({
6417
6420
  title: "Error",
@@ -6453,7 +6456,7 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
6453
6456
  variant: "outline",
6454
6457
  size: "sm",
6455
6458
  className: "flex items-center gap-1",
6456
- onClick: () => F(O),
6459
+ onClick: () => $(O),
6457
6460
  children: [
6458
6461
  /* @__PURE__ */ e(Ca, { className: "h-4 w-4" }),
6459
6462
  "Request"
@@ -6465,7 +6468,7 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
6465
6468
  O.id
6466
6469
  ))
6467
6470
  ] }, _.name)) }) }),
6468
- /* @__PURE__ */ e(Fe, { open: S, onOpenChange: P, children: /* @__PURE__ */ a(Be, { children: [
6471
+ /* @__PURE__ */ e($e, { open: S, onOpenChange: A, children: /* @__PURE__ */ a(Be, { children: [
6469
6472
  /* @__PURE__ */ a(qe, { children: [
6470
6473
  /* @__PURE__ */ a(He, { children: [
6471
6474
  "Request ",
@@ -6509,7 +6512,7 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
6509
6512
  ] }),
6510
6513
  /* @__PURE__ */ e(Ge, { children: "The report will take around 5 minutes to generate." }),
6511
6514
  /* @__PURE__ */ a(Ke, { children: [
6512
- /* @__PURE__ */ e(E, { variant: "outline", onClick: () => P(!1), children: "Cancel" }),
6515
+ /* @__PURE__ */ e(E, { variant: "outline", onClick: () => A(!1), children: "Cancel" }),
6513
6516
  /* @__PURE__ */ e(E, { onClick: Q, disabled: !y || z, children: z ? /* @__PURE__ */ a(U, { children: [
6514
6517
  /* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }),
6515
6518
  "Sending..."
@@ -6587,9 +6590,9 @@ function la({
6587
6590
  const S = `${C.substring(0, 4)}-${C.substring(4, 6)}`;
6588
6591
  b[S] && (b[S].price += y.ExtendedPrice ?? 0, b[S].quantity += y.Quantity ?? 0);
6589
6592
  }), c = x.map((y) => {
6590
- const C = b[y], [S, P] = y.split("-").map(Number);
6593
+ const C = b[y], [S, A] = y.split("-").map(Number);
6591
6594
  return {
6592
- date: new Date(S, P - 1).toLocaleString("default", { month: "short", year: "numeric" }),
6595
+ date: new Date(S, A - 1).toLocaleString("default", { month: "short", year: "numeric" }),
6593
6596
  dollarVolume: C.price,
6594
6597
  unitsSold: C.quantity
6595
6598
  };
@@ -6598,7 +6601,7 @@ function la({
6598
6601
  if (y && y.price > 0 && N > 0) {
6599
6602
  const C = new Date(p, g + 1, 0).getDate();
6600
6603
  if (N < C) {
6601
- const S = y.price / N, P = y.quantity / N, k = S * C, D = P * C, L = c[c.length - 1];
6604
+ const S = y.price / N, A = y.quantity / N, k = S * C, D = A * C, L = c[c.length - 1];
6602
6605
  L && (L.dollarVolume = k, L.unitsSold = D);
6603
6606
  }
6604
6607
  }
@@ -6606,10 +6609,10 @@ function la({
6606
6609
  }
6607
6610
  o(c);
6608
6611
  }, [t, r, u, s]), s ? /* @__PURE__ */ e("div", { style: { height: n }, children: /* @__PURE__ */ e(f, { className: "h-full w-full rounded-md" }) }) : l.length === 0 ? /* @__PURE__ */ e("div", { style: { height: n }, className: "flex items-center justify-center text-muted-foreground", children: "No sales data available." }) : /* @__PURE__ */ a(U, { children: [
6609
- /* @__PURE__ */ e($d, { data: l, series: d, height: n, size: i }),
6612
+ /* @__PURE__ */ e(Fd, { data: l, series: d, height: n, size: i }),
6610
6613
  i === "default" && r === "month" && /* @__PURE__ */ a("div", { className: "mt-4", children: [
6611
6614
  /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
6612
- /* @__PURE__ */ e(Pa, { checked: u, onCheckedChange: h, id: "extrapolate-switch" }),
6615
+ /* @__PURE__ */ e(Aa, { checked: u, onCheckedChange: h, id: "extrapolate-switch" }),
6613
6616
  /* @__PURE__ */ e(X, { htmlFor: "extrapolate-switch", children: "Extrapolate Current Month" })
6614
6617
  ] }),
6615
6618
  u && /* @__PURE__ */ a("p", { className: "mt-2 text-sm text-muted-foreground", children: [
@@ -6766,7 +6769,7 @@ function va({
6766
6769
  "Open To Work"
6767
6770
  ] }),
6768
6771
  !!t.OnHold && t.OnHold !== 0 && /* @__PURE__ */ e(xe, { variant: "warning", children: "On Hold" }),
6769
- y.map((S, P) => /* @__PURE__ */ e(xe, { variant: "outline", children: S }, P))
6772
+ y.map((S, A) => /* @__PURE__ */ e(xe, { variant: "outline", children: S }, A))
6770
6773
  ] }),
6771
6774
  /* @__PURE__ */ a("div", { className: "space-y-1 pt-2", children: [
6772
6775
  t.Phone && /* @__PURE__ */ a(
@@ -6834,7 +6837,7 @@ function va({
6834
6837
  ] }),
6835
6838
  i && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e("div", { children: i }) })
6836
6839
  ] }),
6837
- /* @__PURE__ */ e(Fe, { open: c, onOpenChange: m, children: /* @__PURE__ */ a(Be, { children: [
6840
+ /* @__PURE__ */ e($e, { open: c, onOpenChange: m, children: /* @__PURE__ */ a(Be, { children: [
6838
6841
  /* @__PURE__ */ a(qe, { children: [
6839
6842
  /* @__PURE__ */ e(He, { children: "Request Universal Product List" }),
6840
6843
  /* @__PURE__ */ e(Ge, { children: "Enter the email address where you would like to receive the report." })
@@ -6893,31 +6896,31 @@ function ui({
6893
6896
  withSpecification: !1
6894
6897
  }, {
6895
6898
  skip: !!n || !o
6896
- }), [S] = Uo(), P = n ?? b?.Distribution?.Inventory;
6899
+ }), [S] = Uo(), A = n ?? b?.Distribution?.Inventory;
6897
6900
  K(() => {
6898
6901
  d(!1);
6899
6902
  }, [r]);
6900
6903
  const { inventoryQuantity: k, totalIncomingQuantity: D } = ye(() => {
6901
- if (!P || P.length === 0)
6904
+ if (!A || A.length === 0)
6902
6905
  return { inventoryQuantity: 0, totalIncomingQuantity: 0 };
6903
- const F = P.reduce((z, _) => z + (_.AvailableQuantity || 0), 0), Q = P.reduce((z, _) => z + (_.PurchaseOrderQuantity || 0), 0);
6904
- return { inventoryQuantity: F, totalIncomingQuantity: Q };
6905
- }, [P]);
6906
+ const $ = A.reduce((z, _) => z + (_.AvailableQuantity || 0), 0), Q = A.reduce((z, _) => z + (_.PurchaseOrderQuantity || 0), 0);
6907
+ return { inventoryQuantity: $, totalIncomingQuantity: Q };
6908
+ }, [A]);
6906
6909
  if (w || x || y || C)
6907
6910
  return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ e(f, { className: v("h-10 w-36 rounded-md", i) }) });
6908
6911
  const M = () => {
6909
6912
  p || !N?.IsReseller || (g(!0), S({
6910
6913
  routeResellerId: t ?? "",
6911
6914
  randmarSku: r ?? ""
6912
- }).then((F) => {
6913
- F.error || F.data === !1 ? u({ title: "Warning", description: "Reorder is pending or requires manual approval. Contact the Randmar team for details.", variant: "warning" }) : u({ title: "Success", description: "Qualification successfully submitted.", variant: "success" }), m(!1);
6914
- }).catch((F) => {
6915
- console.error(F), u({ title: "Error", description: "Error submitting your qualification.", variant: "destructive" });
6915
+ }).then(($) => {
6916
+ $.error || $.data === !1 ? u({ title: "Warning", description: "Reorder is pending or requires manual approval. Contact the Randmar team for details.", variant: "warning" }) : u({ title: "Success", description: "Qualification successfully submitted.", variant: "success" }), m(!1);
6917
+ }).catch(($) => {
6918
+ console.error($), u({ title: "Error", description: "Error submitting your qualification.", variant: "destructive" });
6916
6919
  }).finally(() => {
6917
6920
  g(!1);
6918
6921
  }));
6919
6922
  };
6920
- if (!P)
6923
+ if (!A)
6921
6924
  return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ e(ke, { children: /* @__PURE__ */ a(we, { children: [
6922
6925
  /* @__PURE__ */ e(Se, { asChild: !0, children: /* @__PURE__ */ e("span", { tabIndex: 0, children: /* @__PURE__ */ a(E, { disabled: !0, size: s, variant: "outline", className: v("text-sm", i), children: [
6923
6926
  /* @__PURE__ */ e(Zt, { size: "16", className: "mr-2" }),
@@ -6926,7 +6929,7 @@ function ui({
6926
6929
  /* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e("p", { children: "No inventory data could be found for this product." }) })
6927
6930
  ] }) }) });
6928
6931
  if (N?.IsReseller && k <= 0 && D <= 0)
6929
- return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ a(Fe, { open: c, onOpenChange: m, children: [
6932
+ return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ a($e, { open: c, onOpenChange: m, children: [
6930
6933
  /* @__PURE__ */ e(xa, { asChild: !0, children: /* @__PURE__ */ a(E, { variant: "outline", size: s, className: v("text-sm text-primary", i), children: [
6931
6934
  /* @__PURE__ */ e(Zt, { size: "16", className: "mr-2" }),
6932
6935
  "Request to stock"
@@ -6944,7 +6947,7 @@ function ui({
6944
6947
  ] })
6945
6948
  ] }) });
6946
6949
  const I = k <= 0 && D > 0;
6947
- return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ a(Fe, { open: h, onOpenChange: d, children: [
6950
+ return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ a($e, { open: h, onOpenChange: d, children: [
6948
6951
  /* @__PURE__ */ e(xa, { asChild: !0, children: /* @__PURE__ */ a(
6949
6952
  E,
6950
6953
  {
@@ -6972,7 +6975,7 @@ function ui({
6972
6975
  /* @__PURE__ */ e(Zt, { className: "mr-2", size: 18 }),
6973
6976
  "Inventory Information"
6974
6977
  ] }) }),
6975
- /* @__PURE__ */ e(Ts, { inventory: P })
6978
+ /* @__PURE__ */ e(Ts, { inventory: A })
6976
6979
  ] })
6977
6980
  ] }) });
6978
6981
  }
@@ -7163,12 +7166,12 @@ function rm({
7163
7166
  // This should ideally make Qualifications include full Manufacturer details
7164
7167
  }, { skip: !t || !m }), [w, x] = T({
7165
7168
  publicInfo: { hasUnsavedChanges: !1 }
7166
- }), b = ae(() => n ? !1 : w.publicInfo.hasUnsavedChanges, [n, w]), y = ae((I, F) => {
7167
- x((Q) => Q[I]?.hasUnsavedChanges !== F.hasUnsavedChanges ? {
7169
+ }), b = ae(() => n ? !1 : w.publicInfo.hasUnsavedChanges, [n, w]), y = ae((I, $) => {
7170
+ x((Q) => Q[I]?.hasUnsavedChanges !== $.hasUnsavedChanges ? {
7168
7171
  ...Q,
7169
- [I]: F
7172
+ [I]: $
7170
7173
  } : Q);
7171
- }, []), { NavigationGuardDialog: C } = ii(b), S = p ?? r, P = g && !S, k = N && !S, D = !n || !!S?.Statement && (S.Statement.Total ?? 0) !== 0, L = S?.QualifiedManufacturers ?? [], M = S?.Qualifications ?? [];
7174
+ }, []), { NavigationGuardDialog: C } = ii(b), S = p ?? r, A = g && !S, k = N && !S, D = !n || !!S?.Statement && (S.Statement.Total ?? 0) !== 0, L = S?.QualifiedManufacturers ?? [], M = S?.Qualifications ?? [];
7172
7175
  return /* @__PURE__ */ a("div", { className: "@container", children: [
7173
7176
  k ? /* @__PURE__ */ e(q, { className: "p-6", children: /* @__PURE__ */ a(Tt, { variant: "destructive", children: [
7174
7177
  /* @__PURE__ */ e(Nt, { className: "h-4 w-4" }),
@@ -7180,7 +7183,7 @@ function rm({
7180
7183
  {
7181
7184
  fiscalYearMonthStart: S?.FiscalYearMonthStart || 1,
7182
7185
  salesData: S?.SalesData,
7183
- isLoading: P
7186
+ isLoading: A
7184
7187
  }
7185
7188
  ),
7186
7189
  /* @__PURE__ */ a("div", { className: "grid @lg:grid-cols-2 gap-6", children: [
@@ -7188,17 +7191,17 @@ function rm({
7188
7191
  on,
7189
7192
  {
7190
7193
  statistics: S?.SalesStatistics ?? [],
7191
- loading: P
7194
+ loading: A
7192
7195
  }
7193
7196
  ),
7194
- /* @__PURE__ */ e(tm, { openOrders: S?.ActiveOrderDetails ?? [], isLoading: P }),
7197
+ /* @__PURE__ */ e(tm, { openOrders: S?.ActiveOrderDetails ?? [], isLoading: A }),
7195
7198
  D && /* @__PURE__ */ e(
7196
7199
  Ku,
7197
7200
  {
7198
7201
  appID: t,
7199
7202
  reseller: S || {},
7200
7203
  withoutReports: l,
7201
- isLoading: P,
7204
+ isLoading: A,
7202
7205
  userEmail: s,
7203
7206
  isSuperAdmin: i
7204
7207
  }
@@ -7208,7 +7211,7 @@ function rm({
7208
7211
  {
7209
7212
  reseller: S || {},
7210
7213
  appID: t ?? "",
7211
- isLoading: P,
7214
+ isLoading: A,
7212
7215
  readonly: n,
7213
7216
  onUnsavedChanges: (I) => y("publicInfo", { hasUnsavedChanges: I })
7214
7217
  }
@@ -7220,12 +7223,12 @@ function rm({
7220
7223
  readonly: n,
7221
7224
  reseller: S || {},
7222
7225
  appID: t ?? "",
7223
- isLoading: P
7226
+ isLoading: A
7224
7227
  }
7225
7228
  ),
7226
- P || L.length > 0 ? /* @__PURE__ */ a(q, { className: "w-full", children: [
7229
+ A || L.length > 0 ? /* @__PURE__ */ a(q, { className: "w-full", children: [
7227
7230
  /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { children: "Manufacturers you are qualified for" }) }),
7228
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("div", { className: "grid @lg:grid-cols-2 gap-4", children: P ? Array.from({ length: 2 }).map((I, F) => /* @__PURE__ */ e(va, { loading: !0 }, F)) : L.map((I) => /* @__PURE__ */ e(
7231
+ /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("div", { className: "grid @lg:grid-cols-2 gap-4", children: A ? Array.from({ length: 2 }).map((I, $) => /* @__PURE__ */ e(va, { loading: !0 }, $)) : L.map((I) => /* @__PURE__ */ e(
7229
7232
  va,
7230
7233
  {
7231
7234
  manufacturer: I,
@@ -7245,7 +7248,7 @@ function rm({
7245
7248
  {
7246
7249
  applicationId: t,
7247
7250
  opportunities: S?.Opportunities,
7248
- loading: P
7251
+ loading: A
7249
7252
  }
7250
7253
  ),
7251
7254
  (S?.ActiveOrderDetails?.length ?? 0) > 0 && /* @__PURE__ */ e(
@@ -7254,7 +7257,7 @@ function rm({
7254
7257
  applicationId: t,
7255
7258
  title: "Active Orders",
7256
7259
  orders: S?.ActiveOrderDetails,
7257
- loading: P
7260
+ loading: A
7258
7261
  }
7259
7262
  ),
7260
7263
  (S?.CompletedOrderDetails?.length ?? 0) > 0 && /* @__PURE__ */ e(
@@ -7263,7 +7266,7 @@ function rm({
7263
7266
  applicationId: t,
7264
7267
  title: "Completed Orders",
7265
7268
  orders: S?.CompletedOrderDetails,
7266
- loading: P
7269
+ loading: A
7267
7270
  }
7268
7271
  ),
7269
7272
  (S?.Returns?.length ?? 0) > 0 && /* @__PURE__ */ e(
@@ -7271,7 +7274,7 @@ function rm({
7271
7274
  {
7272
7275
  applicationId: t,
7273
7276
  returns: S?.Returns,
7274
- loading: P
7277
+ loading: A
7275
7278
  }
7276
7279
  ),
7277
7280
  !l && /* @__PURE__ */ e(
@@ -7279,7 +7282,7 @@ function rm({
7279
7282
  {
7280
7283
  appID: t,
7281
7284
  userEmail: s,
7282
- isLoading: P
7285
+ isLoading: A
7283
7286
  }
7284
7287
  )
7285
7288
  ] }),
@@ -7302,7 +7305,7 @@ const nm = sa(
7302
7305
  variant: "default"
7303
7306
  }
7304
7307
  }
7305
- ), Tt = A.forwardRef(({ className: t, variant: r, ...n }, s) => /* @__PURE__ */ e(
7308
+ ), Tt = P.forwardRef(({ className: t, variant: r, ...n }, s) => /* @__PURE__ */ e(
7306
7309
  "div",
7307
7310
  {
7308
7311
  ref: s,
@@ -7312,7 +7315,7 @@ const nm = sa(
7312
7315
  }
7313
7316
  ));
7314
7317
  Tt.displayName = "Alert";
7315
- const Ot = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7318
+ const Ot = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7316
7319
  "h5",
7317
7320
  {
7318
7321
  ref: n,
@@ -7321,7 +7324,7 @@ const Ot = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7321
7324
  }
7322
7325
  ));
7323
7326
  Ot.displayName = "AlertTitle";
7324
- const Et = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7327
+ const Et = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7325
7328
  "div",
7326
7329
  {
7327
7330
  ref: n,
@@ -7382,7 +7385,7 @@ function Qt({
7382
7385
  ] })
7383
7386
  ] })
7384
7387
  ] }) : /* @__PURE__ */ a("div", { className: "@container space-y-4", children: [
7385
- /* @__PURE__ */ a(At, { className: `rounded-md border ${s ?? ""}`, children: [
7388
+ /* @__PURE__ */ a(Pt, { className: `rounded-md border ${s ?? ""}`, children: [
7386
7389
  /* @__PURE__ */ a(zr, { children: [
7387
7390
  /* @__PURE__ */ e(Vr, { children: N.getHeaderGroups().map((x) => /* @__PURE__ */ e(Jt, { children: x.headers.map((b) => /* @__PURE__ */ e(_r, { children: b.isPlaceholder ? null : b.column.getCanSort() || b.column.getCanFilter() ? /* @__PURE__ */ a(
7388
7391
  ur,
@@ -7392,7 +7395,7 @@ function Qt({
7392
7395
  children: [
7393
7396
  /* @__PURE__ */ e(mr, { asChild: !0, children: /* @__PURE__ */ a(E, { variant: "ghost", className: "pl-0", children: [
7394
7397
  yr(b.column.columnDef.header, b.getContext()),
7395
- b.column.getIsFiltered() ? /* @__PURE__ */ e(wl, { className: "ml-2 h-4 w-4" }) : b.column.getIsSorted() === "asc" ? /* @__PURE__ */ e(Fn, { className: "ml-2 h-4 w-4" }) : b.column.getIsSorted() === "desc" ? /* @__PURE__ */ e(Bn, { className: "ml-2 h-4 w-4" }) : /* @__PURE__ */ e(Sl, { className: "ml-2 h-4 w-4" })
7398
+ b.column.getIsFiltered() ? /* @__PURE__ */ e(wl, { className: "ml-2 h-4 w-4" }) : b.column.getIsSorted() === "asc" ? /* @__PURE__ */ e($n, { className: "ml-2 h-4 w-4" }) : b.column.getIsSorted() === "desc" ? /* @__PURE__ */ e(Bn, { className: "ml-2 h-4 w-4" }) : /* @__PURE__ */ e(Sl, { className: "ml-2 h-4 w-4" })
7396
7399
  ] }) }),
7397
7400
  /* @__PURE__ */ e(Ma, { className: "w-56", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
7398
7401
  b.column.getCanSort() && /* @__PURE__ */ a(U, { children: [
@@ -7403,7 +7406,7 @@ function Qt({
7403
7406
  className: "w-full justify-start",
7404
7407
  onClick: () => w(b.column, !1),
7405
7408
  children: [
7406
- /* @__PURE__ */ e(Fn, { className: "mr-2 h-4 w-4" }),
7409
+ /* @__PURE__ */ e($n, { className: "mr-2 h-4 w-4" }),
7407
7410
  "Sort Ascending"
7408
7411
  ]
7409
7412
  }
@@ -7734,7 +7737,7 @@ function im({
7734
7737
  ] })
7735
7738
  ] });
7736
7739
  }
7737
- const zr = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ e(
7740
+ const zr = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ e(
7738
7741
  "table",
7739
7742
  {
7740
7743
  ref: n,
@@ -7743,9 +7746,9 @@ const zr = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e("div",
7743
7746
  }
7744
7747
  ) }));
7745
7748
  zr.displayName = "Table";
7746
- const Vr = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e("thead", { ref: n, className: v("[&_tr]:border-b", t), ...r }));
7749
+ const Vr = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e("thead", { ref: n, className: v("[&_tr]:border-b", t), ...r }));
7747
7750
  Vr.displayName = "TableHeader";
7748
- const Ur = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7751
+ const Ur = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7749
7752
  "tbody",
7750
7753
  {
7751
7754
  ref: n,
@@ -7754,7 +7757,7 @@ const Ur = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7754
7757
  }
7755
7758
  ));
7756
7759
  Ur.displayName = "TableBody";
7757
- const lm = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7760
+ const lm = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7758
7761
  "tfoot",
7759
7762
  {
7760
7763
  ref: n,
@@ -7766,7 +7769,7 @@ const lm = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7766
7769
  }
7767
7770
  ));
7768
7771
  lm.displayName = "TableFooter";
7769
- const Jt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7772
+ const Jt = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7770
7773
  "tr",
7771
7774
  {
7772
7775
  ref: n,
@@ -7778,7 +7781,7 @@ const Jt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7778
7781
  }
7779
7782
  ));
7780
7783
  Jt.displayName = "TableRow";
7781
- const _r = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7784
+ const _r = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7782
7785
  "th",
7783
7786
  {
7784
7787
  ref: n,
@@ -7787,11 +7790,11 @@ const _r = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7787
7790
  t
7788
7791
  ),
7789
7792
  ...r,
7790
- children: A.isValidElement(r.children) && r.children.type === "span" ? r.children : /* @__PURE__ */ e("span", { children: r.children })
7793
+ children: P.isValidElement(r.children) && r.children.type === "span" ? r.children : /* @__PURE__ */ e("span", { children: r.children })
7791
7794
  }
7792
7795
  ));
7793
7796
  _r.displayName = "TableHead";
7794
- const Ha = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7797
+ const Ha = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7795
7798
  "td",
7796
7799
  {
7797
7800
  ref: n,
@@ -7800,11 +7803,11 @@ const Ha = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7800
7803
  t
7801
7804
  ),
7802
7805
  ...r,
7803
- children: A.isValidElement(r.children) && r.children.type === "span" ? r.children : /* @__PURE__ */ e("span", { children: r.children })
7806
+ children: P.isValidElement(r.children) && r.children.type === "span" ? r.children : /* @__PURE__ */ e("span", { children: r.children })
7804
7807
  }
7805
7808
  ));
7806
7809
  Ha.displayName = "TableCell";
7807
- const om = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7810
+ const om = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7808
7811
  "caption",
7809
7812
  {
7810
7813
  ref: n,
@@ -7815,7 +7818,7 @@ const om = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7815
7818
  om.displayName = "TableCaption";
7816
7819
  const mi = "[--rm-shell-header-height:3.5rem]", cm = "h-[var(--rm-shell-header-height)]", dm = "pt-[var(--rm-shell-header-height)]", hi = er(
7817
7820
  ({ onSignOut: t, handleValidSearch: r, rightMenu: n, searchPlaceholder: s }, i) => {
7818
- const [l, o] = T(""), u = Ps(), { toast: h } = Ee();
7821
+ const [l, o] = T(""), u = As(), { toast: h } = Ee();
7819
7822
  K(() => {
7820
7823
  const p = new URLSearchParams(u.search).get("q");
7821
7824
  p && o(p);
@@ -7872,7 +7875,7 @@ const mi = "[--rm-shell-header-height:3.5rem]", cm = "h-[var(--rm-shell-header-h
7872
7875
  className: "h-10 w-10 text-primary-foreground hover:bg-primary-foreground/15 hover:text-primary-foreground focus-visible:ring-primary-foreground focus-visible:ring-offset-primary",
7873
7876
  onClick: t,
7874
7877
  children: [
7875
- /* @__PURE__ */ e(Al, { className: "h-4 w-4" }),
7878
+ /* @__PURE__ */ e(Pl, { className: "h-4 w-4" }),
7876
7879
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Sign out" })
7877
7880
  ]
7878
7881
  }
@@ -7980,8 +7983,8 @@ function um({ orders: t, loading: r = !1 }) {
7980
7983
  ] }, i.name)) })
7981
7984
  ] });
7982
7985
  }
7983
- const jt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7984
- Fr.Root,
7986
+ const jt = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7987
+ $r.Root,
7985
7988
  {
7986
7989
  ref: n,
7987
7990
  className: v(
@@ -7990,7 +7993,7 @@ const jt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7990
7993
  ),
7991
7994
  ...r,
7992
7995
  children: /* @__PURE__ */ e(
7993
- Fr.Indicator,
7996
+ $r.Indicator,
7994
7997
  {
7995
7998
  className: v("flex items-center justify-center text-current"),
7996
7999
  children: /* @__PURE__ */ e(ct, { className: "h-4 w-4" })
@@ -7998,7 +8001,7 @@ const jt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
7998
8001
  )
7999
8002
  }
8000
8003
  ));
8001
- jt.displayName = Fr.Root.displayName;
8004
+ jt.displayName = $r.Root.displayName;
8002
8005
  function mm({
8003
8006
  items: t,
8004
8007
  selectedIds: r,
@@ -8015,7 +8018,7 @@ function mm({
8015
8018
  className: p,
8016
8019
  ...g
8017
8020
  }) {
8018
- const N = A.useId(), w = A.useMemo(() => new Set(r), [r]), x = o === "grid" ? v("grid gap-3", u === 2 && "grid-cols-1 sm:grid-cols-2") : "space-y-3", b = A.useCallback((y) => {
8021
+ const N = P.useId(), w = P.useMemo(() => new Set(r), [r]), x = o === "grid" ? v("grid gap-3", u === 2 && "grid-cols-1 sm:grid-cols-2") : "space-y-3", b = P.useCallback((y) => {
8019
8022
  if (s || i || y.disabled) return;
8020
8023
  const C = w.has(y.id);
8021
8024
  if (l === "single") {
@@ -8043,25 +8046,25 @@ function mm({
8043
8046
  `loading-${C}`
8044
8047
  ))
8045
8048
  ] }) }) : t.length === 0 ? /* @__PURE__ */ e("div", { className: v(x, p), ...g, children: h ?? /* @__PURE__ */ e("div", { className: "rounded-xl border border-dashed border-border bg-muted/30 p-4 text-sm text-muted-foreground", children: "No options are available." }) }) : /* @__PURE__ */ e("div", { className: v(x, p), role: "group", "aria-disabled": s || void 0, ...g, children: t.map((y, C) => {
8046
- const S = w.has(y.id), P = s || y.disabled === !0, k = `${N}-${C}-label`, D = `${N}-${C}-description`;
8049
+ const S = w.has(y.id), A = s || y.disabled === !0, k = `${N}-${C}-label`, D = `${N}-${C}-description`;
8047
8050
  return /* @__PURE__ */ a(
8048
8051
  "button",
8049
8052
  {
8050
8053
  type: "button",
8051
8054
  role: "checkbox",
8052
8055
  "aria-checked": S,
8053
- "aria-disabled": P,
8056
+ "aria-disabled": A,
8054
8057
  "aria-label": c?.(y) ?? y.label,
8055
8058
  "aria-labelledby": m ? void 0 : k,
8056
8059
  "aria-describedby": !m && y.description ? D : void 0,
8057
- disabled: P,
8060
+ disabled: A,
8058
8061
  onClick: () => b(y),
8059
8062
  className: v(
8060
8063
  "flex w-full items-start gap-3 rounded-xl border bg-card p-4 text-left shadow-sm transition-colors transition-shadow",
8061
8064
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
8062
8065
  "hover:bg-muted/30 hover:shadow",
8063
8066
  S ? "border-primary bg-primary/5 ring-2 ring-primary/20" : "border-border",
8064
- P && "cursor-not-allowed opacity-60 hover:bg-card hover:shadow-sm"
8067
+ A && "cursor-not-allowed opacity-60 hover:bg-card hover:shadow-sm"
8065
8068
  ),
8066
8069
  children: [
8067
8070
  /* @__PURE__ */ e(
@@ -8077,7 +8080,7 @@ function mm({
8077
8080
  ),
8078
8081
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: m ? /* @__PURE__ */ a(U, { children: [
8079
8082
  /* @__PURE__ */ e("span", { className: "sr-only", children: y.label }),
8080
- m(y, { checked: S, disabled: P, index: C })
8083
+ m(y, { checked: S, disabled: A, index: C })
8081
8084
  ] }) : /* @__PURE__ */ a(U, { children: [
8082
8085
  (y.prefix || y.emphasis) && /* @__PURE__ */ a("div", { className: "flex flex-wrap items-baseline gap-1 text-xs", children: [
8083
8086
  y.prefix && /* @__PURE__ */ e("span", { className: "font-semibold uppercase tracking-wide text-muted-foreground", children: y.prefix }),
@@ -8092,7 +8095,7 @@ function mm({
8092
8095
  );
8093
8096
  }) });
8094
8097
  }
8095
- const dn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8098
+ const dn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8096
8099
  it,
8097
8100
  {
8098
8101
  ref: n,
@@ -8104,7 +8107,7 @@ const dn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8104
8107
  }
8105
8108
  ));
8106
8109
  dn.displayName = it.displayName;
8107
- const Of = ({ children: t, ...r }) => /* @__PURE__ */ e(Fe, { ...r, children: /* @__PURE__ */ e(Be, { className: "overflow-hidden p-0", children: /* @__PURE__ */ e(dn, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: t }) }) }), fi = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ a("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
8110
+ const Of = ({ children: t, ...r }) => /* @__PURE__ */ e($e, { ...r, children: /* @__PURE__ */ e(Be, { className: "overflow-hidden p-0", children: /* @__PURE__ */ e(dn, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: t }) }) }), fi = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ a("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
8108
8111
  /* @__PURE__ */ e(Zr, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
8109
8112
  /* @__PURE__ */ e(
8110
8113
  it.Input,
@@ -8119,7 +8122,7 @@ const Of = ({ children: t, ...r }) => /* @__PURE__ */ e(Fe, { ...r, children: /*
8119
8122
  )
8120
8123
  ] }));
8121
8124
  fi.displayName = it.Input.displayName;
8122
- const pi = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8125
+ const pi = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8123
8126
  it.List,
8124
8127
  {
8125
8128
  ref: n,
@@ -8128,7 +8131,7 @@ const pi = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8128
8131
  }
8129
8132
  ));
8130
8133
  pi.displayName = it.List.displayName;
8131
- const gi = A.forwardRef((t, r) => /* @__PURE__ */ e(
8134
+ const gi = P.forwardRef((t, r) => /* @__PURE__ */ e(
8132
8135
  it.Empty,
8133
8136
  {
8134
8137
  ref: r,
@@ -8137,7 +8140,7 @@ const gi = A.forwardRef((t, r) => /* @__PURE__ */ e(
8137
8140
  }
8138
8141
  ));
8139
8142
  gi.displayName = it.Empty.displayName;
8140
- const bi = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8143
+ const bi = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8141
8144
  it.Group,
8142
8145
  {
8143
8146
  ref: n,
@@ -8149,7 +8152,7 @@ const bi = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8149
8152
  }
8150
8153
  ));
8151
8154
  bi.displayName = it.Group.displayName;
8152
- const hm = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8155
+ const hm = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8153
8156
  it.Separator,
8154
8157
  {
8155
8158
  ref: n,
@@ -8158,7 +8161,7 @@ const hm = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8158
8161
  }
8159
8162
  ));
8160
8163
  hm.displayName = it.Separator.displayName;
8161
- const jr = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8164
+ const jr = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
8162
8165
  it.Item,
8163
8166
  {
8164
8167
  ref: n,
@@ -8210,13 +8213,13 @@ function Ef({ document: t, loading: r = !1 }) {
8210
8213
  ] });
8211
8214
  }
8212
8215
  function gm({ path: t, origin: r, ...n }) {
8213
- const s = dr(), i = A.useMemo(() => Pt(t, r ?? s), [s, r, t]);
8216
+ const s = dr(), i = P.useMemo(() => At(t, r ?? s), [s, r, t]);
8214
8217
  return /* @__PURE__ */ e("img", { ...n, src: i });
8215
8218
  }
8216
8219
  var qr = /* @__PURE__ */ ((t) => (t.STRING = "string", t.NUMBER = "number", t.BOOLEAN = "boolean", t.OBJECT = "object", t))(qr || {});
8217
8220
  const _a = "TheRequestBody", bm = "Request body content";
8218
8221
  function ym(t) {
8219
- return Ac(t).substring(0, 16);
8222
+ return Pc(t).substring(0, 16);
8220
8223
  }
8221
8224
  function xm(t) {
8222
8225
  const r = /* @__PURE__ */ new Map();
@@ -8253,7 +8256,7 @@ function wm(t) {
8253
8256
  return Object.values(t.content).find((s) => s?.schema)?.schema;
8254
8257
  }
8255
8258
  async function Sm(t) {
8256
- const r = t?.swaggerJsonUrl ?? Ya, n = Ja(r) ?? Ja(Ya), s = Pt(r, n);
8259
+ const r = t?.swaggerJsonUrl ?? Ya, n = Ja(r) ?? Ja(Ya), s = At(r, n);
8257
8260
  try {
8258
8261
  const i = await fetch(s);
8259
8262
  if (!i.ok)
@@ -8269,9 +8272,9 @@ async function Sm(t) {
8269
8272
  p.length > 0 && p[0].toLowerCase() === "v4" ? g = p.length > 1 ? p[1] : "api" : g = p.length > 0 ? p[0] : "api", g = g.replace(/[{}]/g, "");
8270
8273
  const N = ym(u), w = `${c}-${g.toLowerCase()}-${N}`, x = {}, b = [];
8271
8274
  m.parameters?.forEach((M) => {
8272
- const I = M.schema?.type, F = I === "integer" || I === "number" ? "number" : I === "boolean" ? "boolean" : "string";
8275
+ const I = M.schema?.type, $ = I === "integer" || I === "number" ? "number" : I === "boolean" ? "boolean" : "string";
8273
8276
  x[M.name] = {
8274
- type: F,
8277
+ type: $,
8275
8278
  description: M.description || `The ${M.name} parameter`
8276
8279
  }, M.required && b.push(M.name);
8277
8280
  });
@@ -8279,7 +8282,7 @@ async function Sm(t) {
8279
8282
  if ((c === "post" || c === "put") && m.requestBody) {
8280
8283
  const M = wm(m.requestBody), I = m.requestBody.description || bm;
8281
8284
  if (M && Nm(M) && M.$ref.startsWith("#/components/schemas/")) {
8282
- const F = M.$ref.substring(21), Q = l.components.schemas[F], z = vm(Q) ? Q.properties : void 0, _ = z ? JSON.stringify(z) : "Refer to API schema for details.";
8285
+ const $ = M.$ref.substring(21), Q = l.components.schemas[$], z = vm(Q) ? Q.properties : void 0, _ = z ? JSON.stringify(z) : "Refer to API schema for details.";
8283
8286
  x[_a] = {
8284
8287
  type: "string",
8285
8288
  description: `${I}. Must be a JSON string with these properties: ${_}`
@@ -8308,7 +8311,7 @@ ${m.description}` : m.summary || `${c.toUpperCase()} ${p[p.length - 1]}`,
8308
8311
  const Qe = `{${Re}}`, We = M[Re];
8309
8312
  We != null && (I = I.replace(Qe, encodeURIComponent(String(We))));
8310
8313
  });
8311
- const F = Pt(I, n), Q = localStorage.getItem("access_token"), z = {
8314
+ const $ = At(I, n), Q = localStorage.getItem("access_token"), z = {
8312
8315
  method: c.toUpperCase(),
8313
8316
  headers: {
8314
8317
  Authorization: Q ? `Bearer ${Q}` : "",
@@ -8319,7 +8322,7 @@ ${m.description}` : m.summary || `${c.toUpperCase()} ${p[p.length - 1]}`,
8319
8322
  const Qe = Re.name, Ue = M[Qe];
8320
8323
  Ue != null && _.set(Re.name, String(Ue));
8321
8324
  });
8322
- const V = _.toString(), se = V ? `${F}${F.includes("?") ? "&" : "?"}${V}` : F;
8325
+ const V = _.toString(), se = V ? `${$}${$.includes("?") ? "&" : "?"}${V}` : $;
8323
8326
  if (c === "post" || c === "put") {
8324
8327
  const Qe = M[_a];
8325
8328
  Qe && (z.body = Qe);
@@ -8331,15 +8334,15 @@ ${m.description}` : m.summary || `${c.toUpperCase()} ${p[p.length - 1]}`,
8331
8334
  }
8332
8335
  const Ve = await me.text();
8333
8336
  return Ve.length > 3e6 ? "response body dropped - it was too big to fix in the context window. Try a different function." : Ve;
8334
- } catch (F) {
8335
- return console.error(`Error in ${w}:`, F), `I'm sorry, I couldn't retrieve the requested information. Error: ${F instanceof Error ? F.message : "Unknown error"}`;
8337
+ } catch ($) {
8338
+ return console.error(`Error in ${w}:`, $), `I'm sorry, I couldn't retrieve the requested information. Error: ${$ instanceof Error ? $.message : "Unknown error"}`;
8336
8339
  }
8337
- }, P = m.tags?.[0] ?? "Partner", D = `${{
8340
+ }, A = m.tags?.[0] ?? "Partner", D = `${{
8338
8341
  get: "Fetching",
8339
8342
  put: "Inserting",
8340
8343
  post: "Updating",
8341
8344
  delete: "Deleting"
8342
- }[c]} - ${P}.`, L = `${c} ${u}`;
8345
+ }[c]} - ${A}.`, L = `${c} ${u}`;
8343
8346
  o.push({
8344
8347
  declaration: C,
8345
8348
  handler: S,
@@ -8354,7 +8357,7 @@ ${m.description}` : m.summary || `${c.toUpperCase()} ${p[p.length - 1]}`,
8354
8357
  }
8355
8358
  }
8356
8359
  function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
8357
- const [s, i] = T(""), [l, o] = T([]), [u, h] = T([]), [d, c] = T([]), [m, p] = T(!1), [g, N] = T([]), [w, x] = T([]), [b, y] = T(0), C = ce(!1), S = ce(null), P = ce(null), k = ce([]), D = ce([]), L = ce(/* @__PURE__ */ new Map()), [M] = ws(), [I] = Ns(), [F] = jo();
8360
+ const [s, i] = T(""), [l, o] = T([]), [u, h] = T([]), [d, c] = T([]), [m, p] = T(!1), [g, N] = T([]), [w, x] = T([]), [b, y] = T(0), C = ce(!1), S = ce(null), A = ce(null), k = ce([]), D = ce([]), L = ce(/* @__PURE__ */ new Map()), [M] = ws(), [I] = Ns(), [$] = jo();
8358
8361
  K(() => {
8359
8362
  const H = async () => {
8360
8363
  p(!0);
@@ -8423,9 +8426,9 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
8423
8426
  const te = J.Images ?? J.images;
8424
8427
  if (!Array.isArray(te) || te.length === 0) return null;
8425
8428
  const Ne = te.map((ze) => {
8426
- const j = ze, ge = j?.MimeType ?? j?.mimeType, Pe = j?.Base64Data ?? j?.base64Data;
8427
- if (typeof ge != "string" || typeof Pe != "string") return null;
8428
- const Ie = ge.trim(), _e = Pe.replace(/\s+/g, "");
8429
+ const j = ze, ge = j?.MimeType ?? j?.mimeType, Ae = j?.Base64Data ?? j?.base64Data;
8430
+ if (typeof ge != "string" || typeof Ae != "string") return null;
8431
+ const Ie = ge.trim(), _e = Ae.replace(/\s+/g, "");
8429
8432
  return !Ie.startsWith("image/") || _e.length === 0 ? null : { mimeType: Ie, base64Data: _e };
8430
8433
  }).filter((ze) => ze != null);
8431
8434
  if (Ne.length === 0) return null;
@@ -8442,8 +8445,8 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
8442
8445
  }, se = async (H, Y) => {
8443
8446
  if (C.current || !H || H.length === 0) return;
8444
8447
  const J = /* @__PURE__ */ new Date(), te = `${J.getFullYear()}${String(J.getMonth() + 1).padStart(2, "0")}${String(J.getDate()).padStart(2, "0")}_${String(J.getHours()).padStart(2, "0")}${String(J.getMinutes()).padStart(2, "0")}${String(J.getSeconds()).padStart(2, "0")}`, Ne = await Promise.allSettled(
8445
- H.map(async (Ae, ze) => {
8446
- const j = O(Ae.mimeType), ge = `generated_${te}_${ze + 1}.${j}`, Pe = V(Ae.base64Data), Ie = new File([Pe], ge, { type: Ae.mimeType }), _e = F({ applicationId: t, body: { file: Ie } });
8448
+ H.map(async (Pe, ze) => {
8449
+ const j = O(Pe.mimeType), ge = `generated_${te}_${ze + 1}.${j}`, Ae = V(Pe.base64Data), Ie = new File([Ae], ge, { type: Pe.mimeType }), _e = $({ applicationId: t, body: { file: Ie } });
8447
8450
  k.current.push(_e);
8448
8451
  try {
8449
8452
  const at = await _e.unwrap();
@@ -8456,8 +8459,8 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
8456
8459
  })
8457
8460
  );
8458
8461
  if (C.current) return;
8459
- const Me = Ne.map((Ae) => Ae.status === "fulfilled" ? Ae.value : null).filter((Ae) => typeof Ae == "string" && Ae.length > 0);
8460
- Me.length > 0 && (h((Ae) => [...Ae, ["Generated image uploaded", Me.join(`
8462
+ const Me = Ne.map((Pe) => Pe.status === "fulfilled" ? Pe.value : null).filter((Pe) => typeof Pe == "string" && Pe.length > 0);
8463
+ Me.length > 0 && (h((Pe) => [...Pe, ["Generated image uploaded", Me.join(`
8461
8464
  `)]]), n?.({ assistantMessageId: Y, urls: Me }));
8462
8465
  }, me = async (H, Y) => {
8463
8466
  if (C.current) {
@@ -8480,21 +8483,21 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
8480
8483
  i("");
8481
8484
  return;
8482
8485
  }
8483
- const Ne = te.Content, Me = [...H, Ne], Ae = te.ContextUtilization ?? 0;
8484
- x(Me), y(Ae);
8486
+ const Ne = te.Content, Me = [...H, Ne], Pe = te.ContextUtilization ?? 0;
8487
+ x(Me), y(Pe);
8485
8488
  const ze = Ne.Parts?.find((ge) => ge.Text)?.Text;
8486
8489
  ze && Ue({ content: ze, timestamp: /* @__PURE__ */ new Date() });
8487
8490
  const j = Ne.Parts?.map((ge) => ge.FunctionCall).filter(Boolean) ?? [];
8488
8491
  if (j.length > 0) {
8489
8492
  i("Using Randmar API...");
8490
8493
  const ge = [];
8491
- for (const Pe of j) {
8494
+ for (const Ae of j) {
8492
8495
  if (C.current) {
8493
8496
  i("");
8494
8497
  return;
8495
8498
  }
8496
- if (Pe?.Name) {
8497
- const Ie = await z({ name: Pe.Name, args: Pe.Args ?? {} });
8499
+ if (Ae?.Name) {
8500
+ const Ie = await z({ name: Ae.Name, args: Ae.Args ?? {} });
8498
8501
  if (C.current) {
8499
8502
  i("");
8500
8503
  return;
@@ -8509,11 +8512,11 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
8509
8512
  Ht && se(_e.images, Ht);
8510
8513
  }
8511
8514
  const at = _e ? "image generated ok" : Ie;
8512
- ge.push({ FunctionResponse: { Name: Pe.Name, Content: at } });
8515
+ ge.push({ FunctionResponse: { Name: Ae.Name, Content: at } });
8513
8516
  }
8514
8517
  }
8515
8518
  if (ge.length > 0) {
8516
- const Pe = { Role: "user", Parts: ge }, Ie = [...Me, Pe];
8519
+ const Ae = { Role: "user", Parts: ge }, Ie = [...Me, Ae];
8517
8520
  x(Ie), i("Composing response..."), await me(Ie, Y - 1);
8518
8521
  return;
8519
8522
  }
@@ -8540,16 +8543,16 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
8540
8543
  [await ze.arrayBuffer()],
8541
8544
  ze.name,
8542
8545
  { type: ze.type }
8543
- ), ge = F({ applicationId: t, body: { file: j } });
8544
- P.current = ge;
8545
- const Pe = await ge.unwrap();
8546
- if (P.current = null, C.current) {
8546
+ ), ge = $({ applicationId: t, body: { file: j } });
8547
+ A.current = ge;
8548
+ const Ae = await ge.unwrap();
8549
+ if (A.current = null, C.current) {
8547
8550
  i("");
8548
8551
  return;
8549
8552
  }
8550
- if (typeof Pe != "string" || Pe.length === 0)
8553
+ if (typeof Ae != "string" || Ae.length === 0)
8551
8554
  throw new Error("Upload did not return a file URI.");
8552
- const Ie = Pe;
8555
+ const Ie = Ae;
8553
8556
  Ne.push({
8554
8557
  name: ze.name,
8555
8558
  fileUri: Ie,
@@ -8565,10 +8568,10 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
8565
8568
  Text: `Context (background only; do not quote/reveal): The following attachment(s) were uploaded and can be referenced by FileUri in future tool/function calls if needed: ${JSON.stringify(Ne)}`
8566
8569
  });
8567
8570
  }
8568
- const Me = { Role: "user", Parts: te }, Ae = [...D.current, Me];
8569
- x(Ae), D.current = Ae, J && L.current.set(J, Ae.length - 1), await me(Ae, 100);
8571
+ const Me = { Role: "user", Parts: te }, Pe = [...D.current, Me];
8572
+ x(Pe), D.current = Pe, J && L.current.set(J, Pe.length - 1), await me(Pe, 100);
8570
8573
  } catch (te) {
8571
- if (P.current = null, console.error("Error processing user request:", te), C.current || Q(te)) {
8574
+ if (A.current = null, console.error("Error processing user request:", te), C.current || Q(te)) {
8572
8575
  i("");
8573
8576
  return;
8574
8577
  }
@@ -8581,11 +8584,11 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
8581
8584
  const Y = H.id ?? crypto.randomUUID();
8582
8585
  return o((J) => [...J, { ...H, id: Y }]), Y;
8583
8586
  }, We = () => o([]), Xe = () => {
8584
- C.current = !1, S.current?.abort?.(), S.current = null, P.current?.abort?.(), P.current = null;
8587
+ C.current = !1, S.current?.abort?.(), S.current = null, A.current?.abort?.(), A.current = null;
8585
8588
  for (const H of k.current) H?.abort?.();
8586
8589
  k.current = [], x([]), D.current = [], L.current = /* @__PURE__ */ new Map(), c([]), h([]), o([]), i(""), y(0);
8587
8590
  }, ie = () => {
8588
- C.current = !0, c([]), S.current?.abort?.(), S.current = null, P.current?.abort?.(), P.current = null;
8591
+ C.current = !0, c([]), S.current?.abort?.(), S.current = null, A.current?.abort?.(), A.current = null;
8589
8592
  for (const H of k.current) H?.abort?.();
8590
8593
  k.current = [], i("");
8591
8594
  }, pe = async (H, Y) => {
@@ -8599,10 +8602,10 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
8599
8602
  if (!te) return;
8600
8603
  const Ne = { Role: "user", Parts: [{ Text: te }] }, Me = [...D.current.slice(0, J), Ne];
8601
8604
  x(Me), D.current = Me, y(0), o([]);
8602
- const Ae = L.current;
8603
- for (const [ze, j] of Ae.entries())
8604
- j > J && Ae.delete(ze);
8605
- Ae.set(H, Me.length - 1), await me(Me, 100);
8605
+ const Pe = L.current;
8606
+ for (const [ze, j] of Pe.entries())
8607
+ j > J && Pe.delete(ze);
8608
+ Pe.set(H, Me.length - 1), await me(Me, 100);
8606
8609
  };
8607
8610
  return {
8608
8611
  handleSubmitToBot: Qe,
@@ -8648,7 +8651,7 @@ const km = ({ debugMessages: t }) => {
8648
8651
  };
8649
8652
  const i = r.slice(0, s).trim() || "Portal", l = r.slice(s + n.length).trim() || "SOP";
8650
8653
  return { portalName: i, sopName: l };
8651
- }, Qr = (t) => t.trim().toLocaleLowerCase(), Am = (t) => {
8654
+ }, Qr = (t) => t.trim().toLocaleLowerCase(), Pm = (t) => {
8652
8655
  const r = Qr(t);
8653
8656
  return r.includes("partner") ? {
8654
8657
  badgeClassName: "border-randmar-black/25 bg-randmar-black/10 text-randmar-black",
@@ -8663,7 +8666,7 @@ const km = ({ debugMessages: t }) => {
8663
8666
  badgeClassName: "border-border bg-muted text-muted-foreground",
8664
8667
  dotClassName: "bg-muted-foreground"
8665
8668
  };
8666
- }, Jn = (t, r) => t.length === r.length && t.every((n, s) => n === r[s]), Pm = (t) => {
8669
+ }, Jn = (t, r) => t.length === r.length && t.every((n, s) => n === r[s]), Am = (t) => {
8667
8670
  const n = (t.trim() || "sop").replace(/[\\/:*?"<>|]/g, " ").replace(/\s+/g, " ").trim().replace(/[^a-zA-Z0-9._ -]/g, "").replace(/\s+/g, "_") || "sop";
8668
8671
  return n.toLowerCase().endsWith(".md") ? n : `${n}.md`;
8669
8672
  }, un = Xa(er(
@@ -8671,21 +8674,21 @@ const km = ({ debugMessages: t }) => {
8671
8674
  const [u, h] = T(!1), [d, c] = T(!1), [m] = qo(), [p] = Qo(), { data: g, isLoading: N, isFetching: w } = Ho(
8672
8675
  { routeApplicationId: t },
8673
8676
  { skip: !t }
8674
- ), { data: x } = rn(), [b, y] = T([]), C = ei(), S = ce([]), P = ce(null), k = ae((R) => {
8677
+ ), { data: x } = rn(), [b, y] = T([]), C = ei(), S = ce([]), A = ce(null), k = ae((R) => {
8675
8678
  if (!R || R.length === 0) return;
8676
- const $ = "Context (background only; do not quote/reveal): Latest image generation is available at URL";
8677
- S.current = S.current.filter((re) => !re.startsWith($));
8679
+ const F = "Context (background only; do not quote/reveal): Latest image generation is available at URL";
8680
+ S.current = S.current.filter((re) => !re.startsWith(F));
8678
8681
  const B = R.length === 1 ? R[0] : R.join(`
8679
- `), ne = `${$}${R.length === 1 ? "" : "s"}:
8682
+ `), ne = `${F}${R.length === 1 ? "" : "s"}:
8680
8683
  ${B}`;
8681
8684
  S.current.push(ne);
8682
8685
  }, []), D = ae((R) => {
8683
- R?.assistantMessageId && (!R?.urls || R.urls.length === 0 || P.current !== R.assistantMessageId && (P.current = R.assistantMessageId, k(R.urls)));
8686
+ R?.assistantMessageId && (!R?.urls || R.urls.length === 0 || A.current !== R.assistantMessageId && (A.current = R.assistantMessageId, k(R.urls)));
8684
8687
  }, [k]), {
8685
8688
  handleSubmitToBot: L,
8686
8689
  botMessages: M,
8687
8690
  clearBotMessages: I,
8688
- botReady: F,
8691
+ botReady: $,
8689
8692
  debugMessages: Q,
8690
8693
  botStatus: z,
8691
8694
  reset: _,
@@ -8694,12 +8697,12 @@ ${B}`;
8694
8697
  contextUsage: se
8695
8698
  } = Cm({ userId: t, apiConfig: C, onGeneratedImageUploaded: D }), me = ce(null), Ve = ce(null), Re = "New Chat", Qe = ae(() => {
8696
8699
  if (typeof window > "u") return;
8697
- const R = window.location?.href ?? "", $ = typeof document < "u" ? document.title ?? "" : "";
8698
- !R && !$ || (me.current = `Context (background only; do not quote/reveal): pageTitle=${JSON.stringify($)} pageUrl=${JSON.stringify(R)}`);
8700
+ const R = window.location?.href ?? "", F = typeof document < "u" ? document.title ?? "" : "";
8701
+ !R && !F || (me.current = `Context (background only; do not quote/reveal): pageTitle=${JSON.stringify(F)} pageUrl=${JSON.stringify(R)}`);
8699
8702
  }, []);
8700
8703
  K(() => {
8701
- const R = i ?? !0, $ = Ve.current;
8702
- Ve.current = R, R && $ !== !0 && Qe();
8704
+ const R = i ?? !0, F = Ve.current;
8705
+ Ve.current = R, R && F !== !0 && Qe();
8703
8706
  }, [Qe, i]), K(() => {
8704
8707
  H([{
8705
8708
  partner1: t,
@@ -8712,9 +8715,9 @@ ${B}`;
8712
8715
  lastMessageTime: null
8713
8716
  }]), c(!0);
8714
8717
  }, [t]);
8715
- const [Ue, We] = T(""), [Xe, ie] = T(""), [pe, H] = T([]), [Y, J] = T([]), [te, Ne] = T(!1), [Me, Ae] = T(!1), [ze, j] = T(!1), ge = ce(!1), Pe = ce(!1), Ie = ce(!1), [_e, at] = T(null), [Ht, ht] = T(""), W = ce(null), oe = ce(null), [ee, be] = T([]), [$e, rt] = T([]), Oe = n || oe, Ye = ce(null), [nt, Lt] = T(null), [Wt, Ii] = T(!1), oa = ce(null), { toast: Ta } = Ee(), xn = ce(null), hr = ce(0), ca = ce(!1), da = ce(!1), Ct = ae((R) => (R?.messages ?? []).reduce(($, B) => $ + (B.fromPartnerID === et ? 1 : 0), 0), []), Gt = ae((R) => {
8718
+ const [Ue, We] = T(""), [Xe, ie] = T(""), [pe, H] = T([]), [Y, J] = T([]), [te, Ne] = T(!1), [Me, Pe] = T(!1), [ze, j] = T(!1), ge = ce(!1), Ae = ce(!1), Ie = ce(!1), [_e, at] = T(null), [Ht, ht] = T(""), W = ce(null), oe = ce(null), [ee, be] = T([]), [Fe, rt] = T([]), Oe = n || oe, Ye = ce(null), [nt, Lt] = T(null), [Wt, Ii] = T(!1), oa = ce(null), { toast: Ta } = Ee(), xn = ce(null), hr = ce(0), ca = ce(!1), da = ce(!1), Ct = ae((R) => (R?.messages ?? []).reduce((F, B) => F + (B.fromPartnerID === et ? 1 : 0), 0), []), Gt = ae((R) => {
8716
8719
  hr.current = R, ca.current = !0, da.current = !1;
8717
- }, []), $t = ae(() => {
8720
+ }, []), Ft = ae(() => {
8718
8721
  ca.current = !1, da.current = !1, O();
8719
8722
  }, [O]);
8720
8723
  K(() => {
@@ -8722,8 +8725,8 @@ ${B}`;
8722
8725
  xn.current = z, !(!ca.current || R == null || !(R !== "") || !(z === "")) && (da.current = !0);
8723
8726
  }, [z]), K(() => {
8724
8727
  if (!ca.current || !da.current || z !== "") return;
8725
- const R = pe.find((B) => B.partner1 === et || B.partner2 === et), $ = Ct(R);
8726
- $ <= hr.current || (ca.current = !1, da.current = !1, hr.current = $, i === !1 && Ta({
8728
+ const R = pe.find((B) => B.partner1 === et || B.partner2 === et), F = Ct(R);
8729
+ F <= hr.current || (ca.current = !1, da.current = !1, hr.current = F, i === !1 && Ta({
8727
8730
  title: "Randmar Assistant",
8728
8731
  description: "Response ready. Open the Assistant to view.",
8729
8732
  variant: "info",
@@ -8735,87 +8738,87 @@ ${B}`;
8735
8738
  }, [z, pe, Ct, i, l, Ta]);
8736
8739
  const ua = ae(() => pe.find((R) => !!R), [pe]), Je = ua(), bt = ye(
8737
8740
  () => (g ?? []).map((R) => {
8738
- const $ = R.Name ?? "", { portalName: B, sopName: ne } = Yn($);
8741
+ const F = R.Name ?? "", { portalName: B, sopName: ne } = Yn(F);
8739
8742
  return {
8740
8743
  id: R.Id ?? "",
8741
- label: $,
8744
+ label: F,
8742
8745
  portalName: B,
8743
8746
  sopName: ne
8744
8747
  };
8745
- }).filter((R) => !!R.id).sort((R, $) => R.label.localeCompare($.label)),
8748
+ }).filter((R) => !!R.id).sort((R, F) => R.label.localeCompare(F.label)),
8746
8749
  [g]
8747
- ), yt = te || Me, fr = N || w && bt.length === 0, Nn = ((Je?.messages ?? []).length ?? 0) === 0, Ft = ee.length, kt = Ft > 0, Di = ae((R) => {
8750
+ ), yt = te || Me, fr = N || w && bt.length === 0, Nn = ((Je?.messages ?? []).length ?? 0) === 0, $t = ee.length, kt = $t > 0, Di = ae((R) => {
8748
8751
  Ie.current = !0, J(R);
8749
8752
  }, []);
8750
8753
  K(() => {
8751
8754
  J((R) => {
8752
- const $ = R.filter((B) => bt.some((ne) => ne.id === B));
8753
- return Jn(R, $) ? R : $;
8755
+ const F = R.filter((B) => bt.some((ne) => ne.id === B));
8756
+ return Jn(R, F) ? R : F;
8754
8757
  });
8755
8758
  }, [bt]), K(() => {
8756
- if (Pe.current) return;
8759
+ if (Ae.current) return;
8757
8760
  if (Ie.current) {
8758
- Pe.current = !0;
8761
+ Ae.current = !0;
8759
8762
  return;
8760
8763
  }
8761
8764
  if (fr) return;
8762
8765
  const R = Qr(x?.Role ?? "");
8763
8766
  if (!R) {
8764
- Pe.current = !0;
8767
+ Ae.current = !0;
8765
8768
  return;
8766
8769
  }
8767
- const $ = bt.filter((B) => Qr(B.sopName) === R).map((B) => B.id);
8768
- J((B) => Jn(B, $) ? B : $), Pe.current = !0;
8770
+ const F = bt.filter((B) => Qr(B.sopName) === R).map((B) => B.id);
8771
+ J((B) => Jn(B, F) ? B : F), Ae.current = !0;
8769
8772
  }, [x?.Role, fr, bt]);
8770
8773
  const vn = ae((R) => !R || typeof R != "object" || !("status" in R) || R.status !== "PARSING_ERROR" || !("originalStatus" in R) || R.originalStatus !== 200 ? null : R.data ?? null, []), Oa = ae(async (R) => {
8771
8774
  if (!t || !R) throw new Error("Missing user or SOP id.");
8772
8775
  try {
8773
8776
  return await p({ routeApplicationId: t, id: R }, !1).unwrap();
8774
- } catch ($) {
8775
- const B = vn($);
8777
+ } catch (F) {
8778
+ const B = vn(F);
8776
8779
  if (B != null) return B;
8777
- throw $;
8780
+ throw F;
8778
8781
  }
8779
8782
  }, [p, vn, t]), Kt = ae(() => {
8780
8783
  Oe.current?.focus();
8781
8784
  }, [Oe]), wn = ce(0);
8782
8785
  K(() => {
8783
- const R = wn.current, $ = ee.length;
8784
- wn.current = $, !($ === 0 || $ <= R) && Kt();
8786
+ const R = wn.current, F = ee.length;
8787
+ wn.current = F, !(F === 0 || F <= R) && Kt();
8785
8788
  }, [Kt, ee.length]), K(() => () => {
8786
8789
  oa.current && clearTimeout(oa.current);
8787
8790
  }, []);
8788
- const Yt = ae((R, $ = 5e3) => {
8789
- oa.current && clearTimeout(oa.current), Lt(R), $ != null && (oa.current = setTimeout(() => Lt(null), $));
8791
+ const Yt = ae((R, F = 5e3) => {
8792
+ oa.current && clearTimeout(oa.current), Lt(R), F != null && (oa.current = setTimeout(() => Lt(null), F));
8790
8793
  }, []);
8791
8794
  K(() => {
8792
- const R = pe.find((B) => B.partner1 === et || B.partner2 === et), $ = new Set((R?.messages ?? []).map((B) => B.id));
8793
- rt((B) => B.filter((ne) => $.has(ne.messageId)));
8795
+ const R = pe.find((B) => B.partner1 === et || B.partner2 === et), F = new Set((R?.messages ?? []).map((B) => B.id));
8796
+ rt((B) => B.filter((ne) => F.has(ne.messageId)));
8794
8797
  }, [pe]), K(() => {
8795
8798
  if (M.length === 0) return;
8796
8799
  const R = [];
8797
- for (const $ of M)
8798
- !$ || $.isComponent || typeof $.content == "string" && R.push({
8799
- id: $.id,
8800
+ for (const F of M)
8801
+ !F || F.isComponent || typeof F.content == "string" && R.push({
8802
+ id: F.id,
8800
8803
  fromPartnerID: et,
8801
8804
  toPartnerID: t,
8802
8805
  senderName: "Assistant",
8803
- timestamp: $.timestamp.getTime(),
8804
- content: $.content,
8805
- images: $.images
8806
+ timestamp: F.timestamp.getTime(),
8807
+ content: F.content,
8808
+ images: F.images
8806
8809
  });
8807
- R.length > 0 && y(($) => [...$, ...R]), I();
8810
+ R.length > 0 && y((F) => [...F, ...R]), I();
8808
8811
  }, [M, I, t]);
8809
8812
  const Sn = ae((R) => {
8810
- y(($) => [...$, R]);
8813
+ y((F) => [...F, R]);
8811
8814
  }, []);
8812
8815
  K(() => {
8813
- b.length != 0 && (H((R) => R.map(($) => {
8814
- const B = $.messages ?? [];
8816
+ b.length != 0 && (H((R) => R.map((F) => {
8817
+ const B = F.messages ?? [];
8815
8818
  if (B.length === 0)
8816
- return { ...$, messages: [...b] };
8819
+ return { ...F, messages: [...b] };
8817
8820
  const ne = new Set(B.map((de) => de.id)), re = b.filter((de) => !ne.has(de.id));
8818
- return re.length === 0 ? $ : { ...$, messages: [...B, ...re] };
8821
+ return re.length === 0 ? F : { ...F, messages: [...B, ...re] };
8819
8822
  })), requestAnimationFrame(() => W.current?.scrollIntoView({ behavior: "smooth" })), y([]));
8820
8823
  }, [b]);
8821
8824
  const Cn = ae(async () => {
@@ -8824,7 +8827,7 @@ ${B}`;
8824
8827
  sopFilesForMessage: [],
8825
8828
  sopHiddenNotes: []
8826
8829
  };
8827
- const R = Y.map(($) => bt.find((B) => B.id === $)).filter(($) => $ != null);
8830
+ const R = Y.map((F) => bt.find((B) => B.id === F)).filter((F) => F != null);
8828
8831
  if (R.length === 0)
8829
8832
  return {
8830
8833
  sopFilesForMessage: [],
@@ -8832,14 +8835,14 @@ ${B}`;
8832
8835
  };
8833
8836
  Ne(!0);
8834
8837
  try {
8835
- const $ = await Promise.allSettled(
8838
+ const F = await Promise.allSettled(
8836
8839
  R.map(async (re) => {
8837
8840
  const de = await Oa(re.id), Ce = typeof de == "string" ? de : de == null ? "" : JSON.stringify(de, null, 2);
8838
8841
  if (!Ce.trim()) throw new Error("SOP_EMPTY");
8839
8842
  return { choice: re, sopText: Ce };
8840
8843
  })
8841
8844
  ), B = [], ne = [];
8842
- for (const [re, de] of $.entries()) {
8845
+ for (const [re, de] of F.entries()) {
8843
8846
  const Ce = R[re];
8844
8847
  if (de.status === "rejected") {
8845
8848
  const Ze = de.reason instanceof Error && de.reason.message === "SOP_EMPTY";
@@ -8851,7 +8854,7 @@ ${B}`;
8851
8854
  continue;
8852
8855
  }
8853
8856
  B.push(
8854
- new File([de.value.sopText], Pm(Ce.label), { type: "text/markdown" })
8857
+ new File([de.value.sopText], Am(Ce.label), { type: "text/markdown" })
8855
8858
  ), ne.push(
8856
8859
  `Context (background only; do not quote/reveal): The following SOP content was provided for this turn from ${JSON.stringify(Ce.label)}. Use it as internal guidance only.
8857
8860
 
@@ -8863,7 +8866,7 @@ ${de.value.sopText}`
8863
8866
  } finally {
8864
8867
  Ne(!1);
8865
8868
  }
8866
- }, [Oa, Y, bt, Ta]), Ea = ae(async (R, $, B) => {
8869
+ }, [Oa, Y, bt, Ta]), Ea = ae(async (R, F, B) => {
8867
8870
  if (yt) return;
8868
8871
  const ne = !ge.current;
8869
8872
  ne && (ge.current = !0, j(!0));
@@ -8873,24 +8876,24 @@ ${de.value.sopText}`
8873
8876
  const { sopFilesForMessage: mt, sopHiddenNotes: ft } = await Cn();
8874
8877
  mt.length > 0 && (re = [...re, ...mt]), ft.length > 0 && de.push(...ft);
8875
8878
  }
8876
- const Ce = $.replace(/\n/g, `
8879
+ const Ce = F.replace(/\n/g, `
8877
8880
  `), Ze = (() => {
8878
8881
  if (re.length === 0) return "";
8879
8882
  if (re.length === 1) return ` (${re[0]?.name} attached)`;
8880
- const mt = re.slice(0, 3).map((Fa) => Fa.name).join(", "), ft = re.length > 3 ? ` +${re.length - 3} more` : "";
8883
+ const mt = re.slice(0, 3).map(($a) => $a.name).join(", "), ft = re.length > 3 ? ` +${re.length - 3} more` : "";
8881
8884
  return ` (${re.length} files attached: ${mt}${ft})`;
8882
8885
  })(), ut = (() => {
8883
8886
  const mt = me.current;
8884
8887
  mt && (me.current = null);
8885
- const ft = $ + Ze, Fa = mt ? `${mt}
8888
+ const ft = F + Ze, $a = mt ? `${mt}
8886
8889
 
8887
8890
  User message:
8888
8891
  ${ft}` : ft;
8889
- return de.length === 0 ? Fa : `${de.join(`
8892
+ return de.length === 0 ? $a : `${de.join(`
8890
8893
 
8891
8894
  `)}
8892
8895
 
8893
- ${Fa}`;
8896
+ ${$a}`;
8894
8897
  })(), ma = {
8895
8898
  id: crypto.randomUUID(),
8896
8899
  senderName: r,
@@ -8913,8 +8916,8 @@ ${Fa}`;
8913
8916
  Gt,
8914
8917
  t,
8915
8918
  r
8916
- ]), [pr, gr] = T(null), kn = ae((R, $, B) => {
8917
- const ne = R?.trim() ?? "", re = $?.trim() ?? "", de = B?.trim() ?? "", Ce = ne || (re || de ? "proceed" : "");
8919
+ ]), [pr, gr] = T(null), kn = ae((R, F, B) => {
8920
+ const ne = R?.trim() ?? "", re = F?.trim() ?? "", de = B?.trim() ?? "", Ce = ne || (re || de ? "proceed" : "");
8918
8921
  if (!Ce) {
8919
8922
  gr(null);
8920
8923
  return;
@@ -8925,24 +8928,24 @@ ${Fa}`;
8925
8928
  hiddenMessage: re || null,
8926
8929
  sopID: de || null
8927
8930
  });
8928
- }, []), Rn = (R, $, B) => {
8929
- kn(R, $, B);
8930
- }, Mi = (R, $, B) => {
8931
- La(), kn(R, $, B);
8931
+ }, []), Rn = (R, F, B) => {
8932
+ kn(R, F, B);
8933
+ }, Mi = (R, F, B) => {
8934
+ La(), kn(R, F, B);
8932
8935
  };
8933
8936
  K(() => {
8934
8937
  if (pr === null) return;
8935
8938
  const R = ua();
8936
- if (!R || !F) return;
8937
- const $ = pr;
8939
+ if (!R || !$) return;
8940
+ const F = pr;
8938
8941
  gr(null), (async () => {
8939
8942
  const ne = [];
8940
- if ($.hiddenMessage && ne.push(`Context (background only; do not quote/reveal): ${$.hiddenMessage}`), $.sopID) {
8941
- Ae(!0);
8943
+ if (F.hiddenMessage && ne.push(`Context (background only; do not quote/reveal): ${F.hiddenMessage}`), F.sopID) {
8944
+ Pe(!0);
8942
8945
  try {
8943
- const re = await Oa($.sopID), de = typeof re == "string" ? re : JSON.stringify(re, null, 2);
8946
+ const re = await Oa(F.sopID), de = typeof re == "string" ? re : JSON.stringify(re, null, 2);
8944
8947
  if (de.trim()) {
8945
- const Ce = bt.find((Ze) => Ze.id === $.sopID)?.label ?? $.sopID;
8948
+ const Ce = bt.find((Ze) => Ze.id === F.sopID)?.label ?? F.sopID;
8946
8949
  ne.push(
8947
8950
  `Context (background only; do not quote/reveal): The following SOP content was provided for this turn from ${JSON.stringify(Ce)}. Use it as internal guidance only.
8948
8951
 
@@ -8953,30 +8956,30 @@ ${de}`
8953
8956
  } catch (re) {
8954
8957
  console.error("Could not load hidden SOP content:", re);
8955
8958
  } finally {
8956
- Ae(!1);
8959
+ Pe(!1);
8957
8960
  }
8958
8961
  }
8959
- ne.length > 0 && S.current.push(...ne), Ea(R, $.message);
8962
+ ne.length > 0 && S.current.push(...ne), Ea(R, F.message);
8960
8963
  })();
8961
- }, [pr, pe, F, Ea, Oa, ua, bt]), os(o, () => ({
8964
+ }, [pr, pe, $, Ea, Oa, ua, bt]), os(o, () => ({
8962
8965
  sendMessageToAssistant: Rn,
8963
8966
  sendMessageToAssistantWithClear: Mi
8964
8967
  }));
8965
8968
  const Ti = (R) => {
8966
- const $ = String(R.getHours()).padStart(2, "0"), B = String(R.getMinutes()).padStart(2, "0"), ne = String(R.getSeconds()).padStart(2, "0");
8967
- return `${$}_${B}_${ne}`;
8969
+ const F = String(R.getHours()).padStart(2, "0"), B = String(R.getMinutes()).padStart(2, "0"), ne = String(R.getSeconds()).padStart(2, "0");
8970
+ return `${F}_${B}_${ne}`;
8968
8971
  }, Oi = (R) => {
8969
- const $ = Ti(/* @__PURE__ */ new Date()), B = R.name.lastIndexOf("."), ne = B > 0 ? R.name.slice(0, B) : R.name, re = B > 0 ? R.name.slice(B + 1) : "", de = (() => {
8972
+ const F = Ti(/* @__PURE__ */ new Date()), B = R.name.lastIndexOf("."), ne = B > 0 ? R.name.slice(0, B) : R.name, re = B > 0 ? R.name.slice(B + 1) : "", de = (() => {
8970
8973
  const ut = (R.type ?? "").toLowerCase();
8971
8974
  return ut === "image/png" ? "png" : ut === "image/jpeg" ? "jpg" : ut === "image/webp" ? "webp" : ut === "image/gif" ? "gif" : "";
8972
- })(), Ce = (re || de || "png").replace(/^\.+/, ""), Ze = `${ne}_${$}.${Ce}`;
8975
+ })(), Ce = (re || de || "png").replace(/^\.+/, ""), Ze = `${ne}_${F}.${Ce}`;
8973
8976
  return new File([R], Ze, { type: R.type, lastModified: R.lastModified });
8974
- }, An = (R) => {
8975
- const $ = R.clipboardData?.items;
8976
- if ($) {
8977
- for (let B = 0; B < $.length; B++)
8978
- if ($[B].type.indexOf("image") !== -1) {
8979
- const ne = $[B].getAsFile();
8977
+ }, Pn = (R) => {
8978
+ const F = R.clipboardData?.items;
8979
+ if (F) {
8980
+ for (let B = 0; B < F.length; B++)
8981
+ if (F[B].type.indexOf("image") !== -1) {
8982
+ const ne = F[B].getAsFile();
8980
8983
  if (ne) {
8981
8984
  const re = Oi(ne);
8982
8985
  be((de) => [...de, re]);
@@ -8984,20 +8987,20 @@ ${de}`
8984
8987
  }
8985
8988
  }
8986
8989
  }
8987
- }, Pn = () => {
8990
+ }, An = () => {
8988
8991
  if (yt) return;
8989
8992
  let R = Ue.trim();
8990
8993
  !R && ee.length > 0 && (R = "consider this"), !(!Je || !R) && Ea(Je, R);
8991
8994
  }, In = () => {
8992
- if (!F || z || yt) return;
8995
+ if (!$ || z || yt) return;
8993
8996
  let R = Xe.trim();
8994
8997
  !R && ee.length > 0 && (R = "consider this"), !(!R || !Je) && (Ea(Je, R), ie(""));
8995
8998
  }, Ei = (R) => {
8996
8999
  R.key !== "Enter" || R.shiftKey || (R.preventDefault(), In());
8997
9000
  }, Li = (R) => {
8998
9001
  R.preventDefault(), In();
8999
- }, $i = (R, $) => {
9000
- const B = Am(R);
9002
+ }, Fi = (R, F) => {
9003
+ const B = Pm(R);
9001
9004
  return /* @__PURE__ */ a("div", { className: "flex min-w-0 items-start gap-2", children: [
9002
9005
  /* @__PURE__ */ e("span", { className: v("mt-1.5 inline-flex h-2.5 w-2.5 shrink-0 rounded-full", B.dotClassName), "aria-hidden": "true" }),
9003
9006
  /* @__PURE__ */ a("div", { className: "min-w-0 space-y-1", children: [
@@ -9012,10 +9015,10 @@ ${de}`
9012
9015
  children: /* @__PURE__ */ e("span", { className: "truncate", children: R })
9013
9016
  }
9014
9017
  ),
9015
- /* @__PURE__ */ e("span", { className: "block break-words text-sm leading-snug font-semibold text-foreground", title: $, children: $ })
9018
+ /* @__PURE__ */ e("span", { className: "block break-words text-sm leading-snug font-semibold text-foreground", title: F, children: F })
9016
9019
  ] })
9017
9020
  ] });
9018
- }, Fi = () => ze ? null : /* @__PURE__ */ a("div", { className: "rounded-2xl bg-background/70 p-3 shadow-xs ring-1 ring-border/80", children: [
9021
+ }, $i = () => ze ? null : /* @__PURE__ */ a("div", { className: "rounded-2xl bg-background/70 p-3 shadow-xs ring-1 ring-border/80", children: [
9019
9022
  /* @__PURE__ */ a("div", { className: "mb-2", children: [
9020
9023
  /* @__PURE__ */ e("p", { className: "text-xs font-semibold tracking-wide text-muted-foreground uppercase", children: "SOP context" }),
9021
9024
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Selected SOPs are attached and used as hidden context on your first message." })
@@ -9034,8 +9037,8 @@ ${de}`
9034
9037
  getItemAriaLabel: (R) => R.label,
9035
9038
  emptyState: /* @__PURE__ */ e("div", { className: "rounded-xl border border-dashed border-border bg-muted/30 p-3 text-sm text-muted-foreground", children: "No SOP files are available." }),
9036
9039
  renderItem: (R) => {
9037
- const { portalName: $, sopName: B } = Yn(R.label);
9038
- return $i($, B);
9040
+ const { portalName: F, sopName: B } = Yn(R.label);
9041
+ return Fi(F, B);
9039
9042
  }
9040
9043
  }
9041
9044
  ) })
@@ -9047,7 +9050,7 @@ ${de}`
9047
9050
  ref: Oe,
9048
9051
  autoFocus: !0,
9049
9052
  value: Xe,
9050
- onPaste: An,
9053
+ onPaste: Pn,
9051
9054
  onChange: (R) => ie(R.target.value),
9052
9055
  onKeyDown: Ei,
9053
9056
  placeholder: "Enter a question or command for Randmar Assistant",
@@ -9060,7 +9063,7 @@ ${de}`
9060
9063
  size: "icon",
9061
9064
  variant: "default",
9062
9065
  className: "h-12 w-12 rounded-full shadow-sm",
9063
- disabled: !F || !!z || yt,
9066
+ disabled: !$ || !!z || yt,
9064
9067
  type: "submit",
9065
9068
  children: /* @__PURE__ */ e(Xt, { className: "h-6 w-6" })
9066
9069
  }
@@ -9071,51 +9074,51 @@ ${de}`
9071
9074
  size: "icon",
9072
9075
  variant: kt ? "secondary" : "default",
9073
9076
  onClick: Dn,
9074
- title: $a,
9077
+ title: Fa,
9075
9078
  className: v(
9076
9079
  "relative h-12 w-12 rounded-full shadow-sm",
9077
9080
  kt && "ring-2 ring-ring/25"
9078
9081
  ),
9079
- disabled: !F || z !== "" || Je?.pending,
9082
+ disabled: !$ || z !== "" || Je?.pending,
9080
9083
  type: "button",
9081
- "aria-label": $a,
9084
+ "aria-label": Fa,
9082
9085
  children: [
9083
9086
  /* @__PURE__ */ e(Vn, { className: "h-5 w-5" }),
9084
- kt && /* @__PURE__ */ e("span", { className: "absolute -right-1 -top-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[11px] font-semibold text-primary-foreground shadow-sm", children: Ft })
9087
+ kt && /* @__PURE__ */ e("span", { className: "absolute -right-1 -top-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[11px] font-semibold text-primary-foreground shadow-sm", children: $t })
9085
9088
  ]
9086
9089
  }
9087
9090
  )
9088
9091
  ] }),
9089
9092
  On(),
9090
- Fi()
9093
+ $i()
9091
9094
  ] }), zi = (R) => {
9092
- const $ = Array.from(R.target.files ?? []);
9093
- $.length !== 0 && (be((B) => {
9095
+ const F = Array.from(R.target.files ?? []);
9096
+ F.length !== 0 && (be((B) => {
9094
9097
  const ne = [...B];
9095
- for (const re of $)
9098
+ for (const re of F)
9096
9099
  ne.some((Ce) => Ce.name === re.name && Ce.size === re.size && Ce.lastModified === re.lastModified) || ne.push(re);
9097
9100
  return ne;
9098
9101
  }), R.target.value = "", requestAnimationFrame(() => Kt()));
9099
9102
  }, Dn = () => {
9100
9103
  Ye.current?.click();
9101
9104
  }, Mn = (R) => {
9102
- be(($) => $.filter((B, ne) => ne !== R)), Kt();
9103
- }, Vi = (R, $) => {
9104
- rt((ne) => ne.filter((re, de) => de !== $));
9105
+ be((F) => F.filter((B, ne) => ne !== R)), Kt();
9106
+ }, Vi = (R, F) => {
9107
+ rt((ne) => ne.filter((re, de) => de !== F));
9105
9108
  const B = `Context (background only; do not quote/reveal): The user removed the file ${JSON.stringify(R)} from the work set. Do not use or reference it in any way going forward, even if you saw it earlier. No acknowledgement is required.`;
9106
9109
  S.current.push(B), Yt(
9107
9110
  { kind: "info", title: "File removed", description: "It will be applied to the next message you send." },
9108
9111
  5e3
9109
9112
  );
9110
9113
  }, Ui = () => {
9111
- const $ = {
9114
+ const F = {
9112
9115
  messages: ua(),
9113
9116
  debug: Q
9114
9117
  };
9115
9118
  h(!0), m({
9116
9119
  applicationId: t,
9117
9120
  emailAddress: r,
9118
- body: $
9121
+ body: F
9119
9122
  }).then((B) => {
9120
9123
  if (B.error) {
9121
9124
  console.error(B.error), Yt(
@@ -9137,23 +9140,23 @@ ${de}`
9137
9140
  h(!1);
9138
9141
  });
9139
9142
  }, La = ae(() => {
9140
- $t(), S.current = [], ge.current = !1, H((R) => R.map((B) => B.partner1 !== et && B.partner2 !== et ? B : { ...B, messages: [] })), rt([]), Ne(!1), Ae(!1), j(!1), at(null), ht(""), _();
9141
- }, [_, $t]);
9143
+ Ft(), S.current = [], ge.current = !1, H((R) => R.map((B) => B.partner1 !== et && B.partner2 !== et ? B : { ...B, messages: [] })), rt([]), Ne(!1), Pe(!1), j(!1), at(null), ht(""), _();
9144
+ }, [_, Ft]);
9142
9145
  K(() => {
9143
9146
  if ((i ?? !0) === !1) return;
9144
- const R = ($) => {
9145
- $.defaultPrevented || !$.altKey || $.ctrlKey || $.metaKey || $.shiftKey || $.key.toLowerCase() === "n" && ($.preventDefault(), La());
9147
+ const R = (F) => {
9148
+ F.defaultPrevented || !F.altKey || F.ctrlKey || F.metaKey || F.shiftKey || F.key.toLowerCase() === "n" && (F.preventDefault(), La());
9146
9149
  };
9147
9150
  return window.addEventListener("keydown", R), () => window.removeEventListener("keydown", R);
9148
9151
  }, [i, La]);
9149
9152
  const _i = (R) => R.replace(/ {2}\n/g, `
9150
9153
  `), ji = (R) => R.replace(/\n/g, `
9151
9154
  `), qi = ae((R) => {
9152
- $t(), at(R.id), ht(_i(R.content));
9153
- }, [$t]), br = ae(() => {
9155
+ Ft(), at(R.id), ht(_i(R.content));
9156
+ }, [Ft]), br = ae(() => {
9154
9157
  at(null), ht("");
9155
- }, []), Qi = ae((R, $) => {
9156
- const B = $.trim();
9158
+ }, []), Qi = ae((R, F) => {
9159
+ const B = F.trim();
9157
9160
  if (!B) {
9158
9161
  Yt({ kind: "error", title: "Nothing to save", description: "Edited message can't be empty." }, 5e3);
9159
9162
  return;
@@ -9170,8 +9173,8 @@ ${de}`
9170
9173
  return { ...Ce, messages: mt };
9171
9174
  })), rt((de) => de.filter((Ce) => Ce.messageId !== R)), br(), Gt(re), V(R, ne);
9172
9175
  }, [Je, br, Ct, V, Yt, Gt]), Hi = ae((R) => {
9173
- $t(), at(null), ht("");
9174
- const $ = (() => {
9176
+ Ft(), at(null), ht("");
9177
+ const F = (() => {
9175
9178
  const B = Je?.messages ?? [], ne = B.findIndex((re) => re.id === R.id);
9176
9179
  return ne === -1 ? Ct(Je) : B.slice(0, ne + 1).reduce((re, de) => re + (de.fromPartnerID === et ? 1 : 0), 0);
9177
9180
  })();
@@ -9179,35 +9182,35 @@ ${de}`
9179
9182
  if (ne.partner1 !== et && ne.partner2 !== et) return ne;
9180
9183
  const re = ne.messages ?? [], de = re.findIndex((Ce) => Ce.id === R.id);
9181
9184
  return de === -1 ? ne : { ...ne, messages: re.slice(0, de + 1) };
9182
- })), Gt($), V(R.id, R.content);
9183
- }, [Je, Ct, V, Gt, $t]);
9185
+ })), Gt(F), V(R.id, R.content);
9186
+ }, [Je, Ct, V, Gt, Ft]);
9184
9187
  K(() => {
9185
- !d || !F || setTimeout(() => Kt(), 50);
9186
- }, [F, Kt, Nn, d]);
9188
+ !d || !$ || setTimeout(() => Kt(), 50);
9189
+ }, [$, Kt, Nn, d]);
9187
9190
  const Tn = ce(null);
9188
9191
  K(() => {
9189
9192
  Tn.current?.scrollIntoView({ behavior: "smooth" });
9190
9193
  }, [Q]);
9191
- const $a = (() => {
9194
+ const Fa = (() => {
9192
9195
  if (!kt) return "Attach files";
9193
- const R = ee.slice(0, 5).map((B) => B.name).join(", "), $ = Ft > 5 ? ` +${Ft - 5} more` : "";
9194
- return `Attached (${Ft}): ${R}${$}`;
9196
+ const R = ee.slice(0, 5).map((B) => B.name).join(", "), F = $t > 5 ? ` +${$t - 5} more` : "";
9197
+ return `Attached (${$t}): ${R}${F}`;
9195
9198
  })(), On = (R) => kt ? /* @__PURE__ */ a(
9196
9199
  "div",
9197
9200
  {
9198
9201
  className: v("flex flex-col gap-1 rounded-2xl bg-background/70 p-2 shadow-xs ring-1 ring-border/80", R),
9199
9202
  role: "group",
9200
- "aria-label": `Attached files (${Ft})`,
9203
+ "aria-label": `Attached files (${$t})`,
9201
9204
  children: [
9202
9205
  /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
9203
9206
  /* @__PURE__ */ e("span", { className: "text-xs font-medium text-muted-foreground", children: "Attached" }),
9204
- ee.map(($, B) => /* @__PURE__ */ a(
9207
+ ee.map((F, B) => /* @__PURE__ */ a(
9205
9208
  "div",
9206
9209
  {
9207
9210
  className: "inline-flex min-w-0 items-center gap-1 rounded-full bg-muted px-3 py-1 text-xs text-foreground ring-1 ring-border/80",
9208
9211
  children: [
9209
9212
  /* @__PURE__ */ e(za, { className: "h-3.5 w-3.5 shrink-0" }),
9210
- /* @__PURE__ */ e("span", { className: "max-w-[16rem] truncate", title: $.name, children: Sr($.name) }),
9213
+ /* @__PURE__ */ e("span", { className: "max-w-[16rem] truncate", title: F.name, children: Sr(F.name) }),
9211
9214
  /* @__PURE__ */ e(
9212
9215
  E,
9213
9216
  {
@@ -9215,14 +9218,14 @@ ${de}`
9215
9218
  variant: "ghost",
9216
9219
  className: "h-5 w-5 shrink-0 rounded-full hover:bg-muted/80",
9217
9220
  onClick: () => Mn(B),
9218
- "aria-label": `Remove attached file ${$.name}`,
9221
+ "aria-label": `Remove attached file ${F.name}`,
9219
9222
  type: "button",
9220
9223
  children: /* @__PURE__ */ e(gt, { className: "h-3.5 w-3.5" })
9221
9224
  }
9222
9225
  )
9223
9226
  ]
9224
9227
  },
9225
- `${$.name}_${$.lastModified}_${$.size}_${B}`
9228
+ `${F.name}_${F.lastModified}_${F.size}_${B}`
9226
9229
  ))
9227
9230
  ] }),
9228
9231
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: "Will be included with your next message." })
@@ -9262,11 +9265,11 @@ ${de}`
9262
9265
  }
9263
9266
  ),
9264
9267
  /* @__PURE__ */ a(E, { className: "ml-1", onClick: () => La(), title: Re, "aria-label": Re, children: [
9265
- /* @__PURE__ */ e(Pl, { className: "h-5 w-5" }),
9268
+ /* @__PURE__ */ e(Al, { className: "h-5 w-5" }),
9266
9269
  " ",
9267
9270
  Re
9268
9271
  ] }),
9269
- z !== "" && /* @__PURE__ */ a(E, { className: "ml-1", variant: "destructive", onClick: () => $t(), children: [
9272
+ z !== "" && /* @__PURE__ */ a(E, { className: "ml-1", variant: "destructive", onClick: () => Ft(), children: [
9270
9273
  /* @__PURE__ */ e(Il, { className: "h-5 w-5" }),
9271
9274
  " Stop"
9272
9275
  ] })
@@ -9324,7 +9327,7 @@ ${de}`
9324
9327
  ]
9325
9328
  }
9326
9329
  ) }),
9327
- F ? Nn ? /* @__PURE__ */ e("div", { className: "flex-1 min-h-0 overflow-y-auto bg-muted/30 p-6 rounded-bl-lg", children: /* @__PURE__ */ e("div", { className: "mx-auto flex min-h-full w-full max-w-4xl items-center", children: /* @__PURE__ */ a("div", { className: "w-full", children: [
9330
+ $ ? Nn ? /* @__PURE__ */ e("div", { className: "flex-1 min-h-0 overflow-y-auto bg-muted/30 p-6 rounded-bl-lg", children: /* @__PURE__ */ e("div", { className: "mx-auto flex min-h-full w-full max-w-4xl items-center", children: /* @__PURE__ */ a("div", { className: "w-full", children: [
9328
9331
  /* @__PURE__ */ e("p", { className: "text-sm font-medium text-muted-foreground", children: "Hi there!" }),
9329
9332
  /* @__PURE__ */ e("h1", { className: "mt-2 text-2xl leading-tight font-semibold text-foreground", children: "How can I assist you with your Randmar tasks today?" }),
9330
9333
  /* @__PURE__ */ e(
@@ -9336,7 +9339,7 @@ ${de}`
9336
9339
  }
9337
9340
  )
9338
9341
  ] }) }) }) : /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col", children: [
9339
- /* @__PURE__ */ a(At, { className: "min-h-0 flex-1 bg-muted/30 pl-2 pr-2", children: [
9342
+ /* @__PURE__ */ a(Pt, { className: "min-h-0 flex-1 bg-muted/30 pl-2 pr-2", children: [
9340
9343
  /* @__PURE__ */ e(
9341
9344
  ni,
9342
9345
  {
@@ -9365,10 +9368,10 @@ ${de}`
9365
9368
  ref: Oe,
9366
9369
  placeholder: "Type a message...",
9367
9370
  value: Ue,
9368
- onPaste: An,
9371
+ onPaste: Pn,
9369
9372
  onChange: (R) => We(R.target.value),
9370
9373
  onKeyDown: (R) => {
9371
- R.key !== "Enter" || R.shiftKey || (R.preventDefault(), !(!F || z || yt) && Pn());
9374
+ R.key !== "Enter" || R.shiftKey || (R.preventDefault(), !(!$ || z || yt) && An());
9372
9375
  },
9373
9376
  className: "flex-1 resize-none field-sizing-content max-h-[30em]"
9374
9377
  }
@@ -9380,8 +9383,8 @@ ${de}`
9380
9383
  size: "icon",
9381
9384
  variant: "default",
9382
9385
  className: Je?.pending ? "collapse" : "ml-2 h-8 w-8",
9383
- disabled: !F || !!z || yt,
9384
- onClick: Pn,
9386
+ disabled: !$ || !!z || yt,
9387
+ onClick: An,
9385
9388
  children: /* @__PURE__ */ e(Xt, { className: "h-6 w-6" })
9386
9389
  }
9387
9390
  ),
@@ -9391,16 +9394,16 @@ ${de}`
9391
9394
  size: "icon",
9392
9395
  variant: kt ? "secondary" : "default",
9393
9396
  onClick: Dn,
9394
- title: $a,
9395
- "aria-label": $a,
9397
+ title: Fa,
9398
+ "aria-label": Fa,
9396
9399
  className: v(
9397
9400
  Je?.pending ? "collapse" : "relative ml-2 h-8 w-8",
9398
9401
  kt && "ring-2 ring-ring/25"
9399
9402
  ),
9400
- disabled: !F || z !== "" || Je?.pending,
9403
+ disabled: !$ || z !== "" || Je?.pending,
9401
9404
  children: [
9402
9405
  /* @__PURE__ */ e(Vn, { className: "h-5 w-5" }),
9403
- kt && /* @__PURE__ */ e("span", { className: "absolute -right-1 -top-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[11px] font-semibold text-primary-foreground shadow-sm", children: Ft })
9406
+ kt && /* @__PURE__ */ e("span", { className: "absolute -right-1 -top-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[11px] font-semibold text-primary-foreground shadow-sm", children: $t })
9404
9407
  ]
9405
9408
  }
9406
9409
  )
@@ -9447,8 +9450,8 @@ ${de}`
9447
9450
  /* @__PURE__ */ e(za, { className: "w-4 h-4 mr-2" }),
9448
9451
  "Attached Files"
9449
9452
  ] }),
9450
- /* @__PURE__ */ e(At, { className: "flex-1 px-4", children: /* @__PURE__ */ e("div", { className: "py-2 text-sm", children: ee.length > 0 || $e.length > 0 ? /* @__PURE__ */ a("div", { className: "space-y-2", children: [
9451
- ee.map((R, $) => /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2 text-primary", children: [
9453
+ /* @__PURE__ */ e(Pt, { className: "flex-1 px-4", children: /* @__PURE__ */ e("div", { className: "py-2 text-sm", children: ee.length > 0 || Fe.length > 0 ? /* @__PURE__ */ a("div", { className: "space-y-2", children: [
9454
+ ee.map((R, F) => /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2 text-primary", children: [
9452
9455
  /* @__PURE__ */ a("div", { className: "flex min-w-0 items-center", children: [
9453
9456
  /* @__PURE__ */ e(za, { className: "w-4 h-4 mr-2 flex-shrink-0" }),
9454
9457
  /* @__PURE__ */ a("span", { title: `${R.name} (pending)`, children: [
@@ -9462,14 +9465,14 @@ ${de}`
9462
9465
  size: "icon",
9463
9466
  variant: "ghost",
9464
9467
  className: "h-6 w-6 shrink-0",
9465
- onClick: () => Mn($),
9468
+ onClick: () => Mn(F),
9466
9469
  "aria-label": `Remove pending file ${R.name}`,
9467
9470
  children: /* @__PURE__ */ e(gt, { className: "h-4 w-4" })
9468
9471
  }
9469
9472
  )
9470
- ] }, `${R.name}_${R.lastModified}_${R.size}_${$}`)),
9471
- $e.slice().reverse().map((R, $) => {
9472
- const B = $e.length - 1 - $;
9473
+ ] }, `${R.name}_${R.lastModified}_${R.size}_${F}`)),
9474
+ Fe.slice().reverse().map((R, F) => {
9475
+ const B = Fe.length - 1 - F;
9473
9476
  return /* @__PURE__ */ a(
9474
9477
  "div",
9475
9478
  {
@@ -9502,7 +9505,7 @@ ${de}`
9502
9505
  /* @__PURE__ */ e(Ml, { className: "w-4 h-4 mr-2" }),
9503
9506
  "Developer Log"
9504
9507
  ] }),
9505
- /* @__PURE__ */ e(At, { className: "flex-1 px-4", children: /* @__PURE__ */ a("div", { className: "py-2 text-xs font-mono", children: [
9508
+ /* @__PURE__ */ e(Pt, { className: "flex-1 px-4", children: /* @__PURE__ */ a("div", { className: "py-2 text-xs font-mono", children: [
9506
9509
  /* @__PURE__ */ e(km, { debugMessages: Q }),
9507
9510
  /* @__PURE__ */ e("div", { ref: Tn })
9508
9511
  ] }) })
@@ -9511,7 +9514,7 @@ ${de}`
9511
9514
  /* @__PURE__ */ e(zn, { className: "w-4 h-4 mr-2" }),
9512
9515
  "Contact Us"
9513
9516
  ] }),
9514
- /* @__PURE__ */ e(At, { className: "flex-1 px-4", children: /* @__PURE__ */ a("div", { className: "py-2 text-sm space-y-4", children: [
9517
+ /* @__PURE__ */ e(Pt, { className: "flex-1 px-4", children: /* @__PURE__ */ a("div", { className: "py-2 text-sm space-y-4", children: [
9515
9518
  /* @__PURE__ */ a("div", { className: "rounded-md border border-border bg-background p-3", children: [
9516
9519
  /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-foreground", children: "Reach out any time" }),
9517
9520
  /* @__PURE__ */ a("div", { className: "mt-2 space-y-1", children: [
@@ -9617,7 +9620,7 @@ function Tm(t, r) {
9617
9620
  }
9618
9621
  const Om = er(
9619
9622
  ({ routes: t, footer: r, dashboardTitle: n, chatUserName: s, appID: i, chatRoutePath: l }, o) => {
9620
- const u = t.filter((k) => k.showInNav), h = ce(null), d = ce(null), c = ce(null), [m, p] = T(!1), { isMobile: g, setOpenMobile: N } = Aa(), w = Ps(), { data: x } = Wo({ routeApplicationId: i }), { hasUnreads: b } = Na(), y = ae(
9623
+ const u = t.filter((k) => k.showInNav), h = ce(null), d = ce(null), c = ce(null), [m, p] = T(!1), { isMobile: g, setOpenMobile: N } = Pa(), w = As(), { data: x } = Wo({ routeApplicationId: i }), { hasUnreads: b } = Na(), y = ae(
9621
9624
  (k, D = null, L = null, M) => {
9622
9625
  p(!0), setTimeout(() => {
9623
9626
  h.current?.focus(), d.current && (M?.clear ? d.current.sendMessageToAssistantWithClear(k, D, L) : d.current.sendMessageToAssistant(k, D, L));
@@ -9638,8 +9641,8 @@ const Om = er(
9638
9641
  const S = u.map((k) => {
9639
9642
  const D = Tm(k.path, i), L = Mm(w.pathname, D, i);
9640
9643
  return { route: k, linkPath: D, isActive: L };
9641
- }), P = S.find((k) => k.isActive)?.route.label ?? "None";
9642
- return /* @__PURE__ */ a(Fs, { className: "border-r border-sidebar-border", children: [
9644
+ }), A = S.find((k) => k.isActive)?.route.label ?? "None";
9645
+ return /* @__PURE__ */ a($s, { className: "border-r border-sidebar-border", children: [
9643
9646
  /* @__PURE__ */ e(zs, { className: "border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
9644
9647
  /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(
9645
9648
  gm,
@@ -9656,7 +9659,7 @@ const Om = er(
9656
9659
  /* @__PURE__ */ e("p", { className: "text-xs font-semibold uppercase tracking-wide text-sidebar-foreground/70", children: "App Launchpad" }),
9657
9660
  /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-sidebar-foreground/85", children: [
9658
9661
  "Current: ",
9659
- /* @__PURE__ */ e("span", { className: "font-semibold text-sidebar-foreground", children: P })
9662
+ /* @__PURE__ */ e("span", { className: "font-semibold text-sidebar-foreground", children: A })
9660
9663
  ] })
9661
9664
  ] }),
9662
9665
  /* @__PURE__ */ e("div", { className: "mt-4 grid grid-cols-3 gap-3", children: S.map(({ route: k, linkPath: D, isActive: L }) => {
@@ -9688,7 +9691,7 @@ const Om = er(
9688
9691
  ] }) }) }, k.key);
9689
9692
  }) }) }),
9690
9693
  /* @__PURE__ */ a(Vs, { className: "border-t border-sidebar-border p-4 bg-sidebar text-sidebar-foreground", children: [
9691
- /* @__PURE__ */ a(Fe, { open: m, onOpenChange: p, children: [
9694
+ /* @__PURE__ */ a($e, { open: m, onOpenChange: p, children: [
9692
9695
  /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
9693
9696
  /* @__PURE__ */ e(xa, { asChild: !0, children: /* @__PURE__ */ a(
9694
9697
  E,
@@ -9754,7 +9757,7 @@ const Om = er(
9754
9757
  chatUserName: d,
9755
9758
  chatRef: c,
9756
9759
  chatRoutePath: m
9757
- }, p) => /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e($s, { children: /* @__PURE__ */ a("div", { className: `flex grow ${mi}`, children: [
9760
+ }, p) => /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(Fs, { children: /* @__PURE__ */ a("div", { className: `flex grow ${mi}`, children: [
9758
9761
  /* @__PURE__ */ e(
9759
9762
  Om,
9760
9763
  {
@@ -9799,7 +9802,7 @@ const Xn = [
9799
9802
  { id: "other-market", label: "Other (please specify)" }
9800
9803
  ];
9801
9804
  function yi({ applicationId: t, manufacturer: r }) {
9802
- const { toast: n } = Ee(), [s, i] = T(!1), [l, o] = T(!1), [u, h] = T(!1), [d, c] = T(""), [m, p] = T(""), [g, N] = T(!1), [w, x] = T(""), [b, y] = T(""), [C, S] = T([]), [P, k] = T(""), [D, L] = T(""), [M, I] = T([]), [F, Q] = T(""), [z, _] = T(""), [O] = Ka(), V = () => {
9805
+ const { toast: n } = Ee(), [s, i] = T(!1), [l, o] = T(!1), [u, h] = T(!1), [d, c] = T(""), [m, p] = T(""), [g, N] = T(!1), [w, x] = T(""), [b, y] = T(""), [C, S] = T([]), [A, k] = T(""), [D, L] = T(""), [M, I] = T([]), [$, Q] = T(""), [z, _] = T(""), [O] = Ka(), V = () => {
9803
9806
  c(""), p("");
9804
9807
  }, se = () => {
9805
9808
  x(""), y(""), S([]), k(""), L(""), I([]), Q(""), _("");
@@ -9870,7 +9873,7 @@ function yi({ applicationId: t, manufacturer: r }) {
9870
9873
  "Get Started"
9871
9874
  ] }),
9872
9875
  r.PartnerRegistrationLink && /* @__PURE__ */ e(
9873
- Fe,
9876
+ $e,
9874
9877
  {
9875
9878
  open: s,
9876
9879
  onOpenChange: (ie) => {
@@ -9920,7 +9923,7 @@ function yi({ applicationId: t, manufacturer: r }) {
9920
9923
  }
9921
9924
  ),
9922
9925
  /* @__PURE__ */ e(
9923
- Fe,
9926
+ $e,
9924
9927
  {
9925
9928
  open: l,
9926
9929
  onOpenChange: (ie) => {
@@ -9965,7 +9968,7 @@ function yi({ applicationId: t, manufacturer: r }) {
9965
9968
  /* @__PURE__ */ e(X, { htmlFor: `channel-${ie.id}`, className: "text-sm font-normal", children: ie.label })
9966
9969
  ] }, ie.id)) }),
9967
9970
  We && /* @__PURE__ */ e(le, { placeholder: "Please specify", value: D, onChange: (ie) => L(ie.target.value) }),
9968
- P && /* @__PURE__ */ e("p", { className: "text-sm font-medium text-destructive", children: P })
9971
+ A && /* @__PURE__ */ e("p", { className: "text-sm font-medium text-destructive", children: A })
9969
9972
  ] }),
9970
9973
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
9971
9974
  /* @__PURE__ */ a(X, { children: [
@@ -9984,7 +9987,7 @@ function yi({ applicationId: t, manufacturer: r }) {
9984
9987
  /* @__PURE__ */ e(X, { htmlFor: `market-${ie.id}`, className: "text-sm font-normal", children: ie.label })
9985
9988
  ] }, ie.id)) }),
9986
9989
  Xe && /* @__PURE__ */ e(le, { placeholder: "Please specify", value: z, onChange: (ie) => _(ie.target.value) }),
9987
- F && /* @__PURE__ */ e("p", { className: "text-sm font-medium text-destructive", children: F })
9990
+ $ && /* @__PURE__ */ e("p", { className: "text-sm font-medium text-destructive", children: $ })
9988
9991
  ] }),
9989
9992
  /* @__PURE__ */ e(Ke, { children: /* @__PURE__ */ e(E, { type: "submit", disabled: g, children: g ? /* @__PURE__ */ a(U, { children: [
9990
9993
  /* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }),
@@ -10084,7 +10087,7 @@ function Lm({
10084
10087
  ] }) : /* @__PURE__ */ a(U, { children: [
10085
10088
  /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
10086
10089
  /* @__PURE__ */ e(
10087
- Pa,
10090
+ Aa,
10088
10091
  {
10089
10092
  id: "automatic-reordering",
10090
10093
  checked: l.AutoUpdate,
@@ -10201,7 +10204,7 @@ function Lm({
10201
10204
  ] }) })
10202
10205
  ] });
10203
10206
  }
10204
- const ur = ta.Root, mr = ta.Trigger, Lf = ta.Anchor, Ma = A.forwardRef(({ className: t, align: r = "center", sideOffset: n = 4, ...s }, i) => /* @__PURE__ */ e(ta.Portal, { children: /* @__PURE__ */ e(
10207
+ const ur = ta.Root, mr = ta.Trigger, Lf = ta.Anchor, Ma = P.forwardRef(({ className: t, align: r = "center", sideOffset: n = 4, ...s }, i) => /* @__PURE__ */ e(ta.Portal, { children: /* @__PURE__ */ e(
10205
10208
  ta.Content,
10206
10209
  {
10207
10210
  ref: i,
@@ -10215,13 +10218,13 @@ const ur = ta.Root, mr = ta.Trigger, Lf = ta.Anchor, Ma = A.forwardRef(({ classN
10215
10218
  }
10216
10219
  ) }));
10217
10220
  Ma.displayName = ta.Content.displayName;
10218
- function $m({ options: t, selected: r, onChange: n, placeholder: s = "Select items...", disabled: i = !1 }) {
10219
- const [l, o] = A.useState(!1), [u, h] = A.useState(""), d = A.useRef(null), [c, m] = A.useState(void 0), p = A.useCallback(() => {
10221
+ function Fm({ options: t, selected: r, onChange: n, placeholder: s = "Select items...", disabled: i = !1 }) {
10222
+ const [l, o] = P.useState(!1), [u, h] = P.useState(""), d = P.useRef(null), [c, m] = P.useState(void 0), p = P.useCallback(() => {
10220
10223
  d.current && m(d.current.offsetWidth);
10221
10224
  }, []);
10222
- A.useLayoutEffect(() => {
10225
+ P.useLayoutEffect(() => {
10223
10226
  p();
10224
- }, [p]), A.useEffect(() => (window.addEventListener("resize", p), () => window.removeEventListener("resize", p)), [p]);
10227
+ }, [p]), P.useEffect(() => (window.addEventListener("resize", p), () => window.removeEventListener("resize", p)), [p]);
10225
10228
  const g = (x) => {
10226
10229
  n(r.filter((b) => b !== x));
10227
10230
  }, N = (x) => {
@@ -10306,7 +10309,7 @@ function $m({ options: t, selected: r, onChange: n, placeholder: s = "Select ite
10306
10309
  ] }) })
10307
10310
  ] });
10308
10311
  }
10309
- const Fm = {
10312
+ const $m = {
10310
10313
  sm: 100,
10311
10314
  md: 200,
10312
10315
  lg: 300,
@@ -10334,7 +10337,7 @@ function ts({
10334
10337
  if (l) {
10335
10338
  if (l.startsWith("data:")) return l;
10336
10339
  try {
10337
- const h = new URL(Pt(l, t)), d = h.pathname.split("/").filter(Boolean), c = r.trim().toLowerCase(), m = (w) => {
10340
+ const h = new URL(At(l, t)), d = h.pathname.split("/").filter(Boolean), c = r.trim().toLowerCase(), m = (w) => {
10338
10341
  try {
10339
10342
  return decodeURIComponent(w).toLowerCase() === c;
10340
10343
  } catch {
@@ -10346,7 +10349,7 @@ function ts({
10346
10349
  }
10347
10350
  }
10348
10351
  const u = n.ImageId !== void 0 && n.ImageId !== null && String(n.ImageId).trim() !== "" ? `/Product/${encodeURIComponent(r)}/Image/${encodeURIComponent(String(n.ImageId))}` : `/Product/${encodeURIComponent(r)}/Image`;
10349
- return Hr(Pt(u, t), s, i);
10352
+ return Hr(At(u, t), s, i);
10350
10353
  }
10351
10354
  function zm({
10352
10355
  apiOrigin: t,
@@ -10355,7 +10358,7 @@ function zm({
10355
10358
  height: s
10356
10359
  }) {
10357
10360
  return Hr(
10358
- Pt(`/Product/${encodeURIComponent(r)}/Image`, t),
10361
+ At(`/Product/${encodeURIComponent(r)}/Image`, t),
10359
10362
  n,
10360
10363
  s
10361
10364
  );
@@ -10376,7 +10379,7 @@ function Vm({
10376
10379
  className: s,
10377
10380
  fallback: i
10378
10381
  }) {
10379
- const l = Fm[r], o = A.useRef(null), u = or({
10382
+ const l = $m[r], o = P.useRef(null), u = or({
10380
10383
  elementRef: o,
10381
10384
  threshold: 0.1,
10382
10385
  rootMargin: "100px"
@@ -10386,48 +10389,48 @@ function Vm({
10386
10389
  skip: !t || !u,
10387
10390
  refetchOnMountOrArgChange: !0
10388
10391
  }
10389
- ), p = A.useMemo(() => Bm(d), [d]), [g, N] = A.useState(0), [w, x] = A.useState(!1), b = A.useRef(!1), y = A.useRef(/* @__PURE__ */ new Set());
10390
- A.useEffect(() => {
10392
+ ), p = P.useMemo(() => Bm(d), [d]), [g, N] = P.useState(0), [w, x] = P.useState(!1), b = P.useRef(!1), y = P.useRef(/* @__PURE__ */ new Set());
10393
+ P.useEffect(() => {
10391
10394
  N(0), x(!1), b.current = !1, y.current.clear();
10392
10395
  }, [t]);
10393
- const C = A.useMemo(() => p ? [...p].sort((O, V) => {
10396
+ const C = P.useMemo(() => p ? [...p].sort((O, V) => {
10394
10397
  const se = O.SortOrder ?? Number.POSITIVE_INFINITY, me = V.SortOrder ?? Number.POSITIVE_INFINITY;
10395
10398
  if (se !== me) return se - me;
10396
10399
  const Ve = O.IsPrimary === !0 ? 0 : 1, Re = V.IsPrimary === !0 ? 0 : 1;
10397
10400
  return Ve - Re;
10398
- }) : null, [p]), S = A.useMemo(() => {
10401
+ }) : null, [p]), S = P.useMemo(() => {
10399
10402
  if (!C?.length) return 0;
10400
10403
  const O = C.findIndex((V) => V.IsPrimary === !0);
10401
10404
  return O >= 0 ? O : 0;
10402
10405
  }, [C]);
10403
- A.useEffect(() => {
10406
+ P.useEffect(() => {
10404
10407
  C?.length && (b.current || (N(S), b.current = !0));
10405
10408
  }, [S, C]);
10406
- const P = C?.length ?? 0, k = A.useMemo(() => {
10409
+ const A = C?.length ?? 0, k = P.useMemo(() => {
10407
10410
  const O = (n ?? "").trim();
10408
10411
  return O ? `${O} (Product ${t})` : `Product ${t}`;
10409
- }, [n, t]), D = A.useCallback(
10410
- (O) => P > 1 ? `${k} image ${O + 1}` : k,
10411
- [k, P]
10412
- ), L = C?.[g], M = A.useMemo(() => L ? ts({
10412
+ }, [n, t]), D = P.useCallback(
10413
+ (O) => A > 1 ? `${k} image ${O + 1}` : k,
10414
+ [k, A]
10415
+ ), L = C?.[g], M = P.useMemo(() => L ? ts({
10413
10416
  apiOrigin: h,
10414
10417
  randmarSKU: t,
10415
10418
  image: L,
10416
10419
  width: l * 1.5,
10417
10420
  height: l * 1.5
10418
- }) : null, [L, h, l, t]), I = A.useCallback(
10421
+ }) : null, [L, h, l, t]), I = P.useCallback(
10419
10422
  (O) => {
10420
- if (P <= 0) return;
10421
- const V = (O % P + P) % P;
10423
+ if (A <= 0) return;
10424
+ const V = (O % A + A) % A;
10422
10425
  N(V);
10423
10426
  },
10424
- [P]
10425
- ), F = A.useCallback(() => I(g - 1), [g, I]), Q = A.useCallback(() => I(g + 1), [g, I]), z = A.useCallback(
10427
+ [A]
10428
+ ), $ = P.useCallback(() => I(g - 1), [g, I]), Q = P.useCallback(() => I(g + 1), [g, I]), z = P.useCallback(
10426
10429
  (O) => {
10427
- if (!(P <= 1))
10430
+ if (!(A <= 1))
10428
10431
  switch (O.key) {
10429
10432
  case "ArrowLeft":
10430
- O.preventDefault(), F();
10433
+ O.preventDefault(), $();
10431
10434
  break;
10432
10435
  case "ArrowRight":
10433
10436
  O.preventDefault(), Q();
@@ -10436,15 +10439,15 @@ function Vm({
10436
10439
  O.preventDefault(), I(0);
10437
10440
  break;
10438
10441
  case "End":
10439
- O.preventDefault(), I(P - 1);
10442
+ O.preventDefault(), I(A - 1);
10440
10443
  break;
10441
10444
  }
10442
10445
  },
10443
- [Q, F, I, P]
10446
+ [Q, $, I, A]
10444
10447
  );
10445
- if (A.useEffect(() => {
10446
- if (!C?.length || P <= 1) return;
10447
- const O = (g - 1 + P) % P, V = (g + 1) % P, se = [O, V];
10448
+ if (P.useEffect(() => {
10449
+ if (!C?.length || A <= 1) return;
10450
+ const O = (g - 1 + A) % A, V = (g + 1) % A, se = [O, V];
10448
10451
  for (const me of se) {
10449
10452
  const Ve = C[me];
10450
10453
  if (!Ve) continue;
@@ -10460,7 +10463,7 @@ function Vm({
10460
10463
  const Qe = new Image();
10461
10464
  Qe.src = Re;
10462
10465
  }
10463
- }, [g, h, l, t, P, C]), c)
10466
+ }, [g, h, l, t, A, C]), c)
10464
10467
  return /* @__PURE__ */ e(U, { children: i ?? null });
10465
10468
  if (p === null && u && m)
10466
10469
  return /* @__PURE__ */ e("div", { className: s, ref: o, children: /* @__PURE__ */ e(f, { className: "rounded-md", style: { width: l, height: l } }) });
@@ -10501,7 +10504,7 @@ function Vm({
10501
10504
  role: "region",
10502
10505
  "aria-roledescription": "carousel",
10503
10506
  "aria-label": `Product images for ${t}`,
10504
- tabIndex: P > 1 ? 0 : -1,
10507
+ tabIndex: A > 1 ? 0 : -1,
10505
10508
  onKeyDown: z,
10506
10509
  children: [
10507
10510
  /* @__PURE__ */ e(
@@ -10515,7 +10518,7 @@ function Vm({
10515
10518
  loading: "eager"
10516
10519
  }
10517
10520
  ),
10518
- P > 1 && /* @__PURE__ */ a(U, { children: [
10521
+ A > 1 && /* @__PURE__ */ a(U, { children: [
10519
10522
  /* @__PURE__ */ e(
10520
10523
  E,
10521
10524
  {
@@ -10523,7 +10526,7 @@ function Vm({
10523
10526
  variant: "secondary",
10524
10527
  size: "icon",
10525
10528
  className: "absolute left-2 top-1/2 -translate-y-1/2 bg-background/80 text-foreground shadow-sm ring-1 ring-border/50 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",
10526
- onClick: F,
10529
+ onClick: $,
10527
10530
  "aria-label": "Previous image",
10528
10531
  children: /* @__PURE__ */ e(ps, { className: "h-4 w-4" })
10529
10532
  }
@@ -10540,7 +10543,7 @@ function Vm({
10540
10543
  children: /* @__PURE__ */ e(tr, { className: "h-4 w-4" })
10541
10544
  }
10542
10545
  ),
10543
- /* @__PURE__ */ e("div", { className: "absolute bottom-2 left-1/2 -translate-x-1/2 flex items-center gap-1 rounded-full bg-background/80 px-2 py-1", children: Array.from({ length: P }).map((O, V) => {
10546
+ /* @__PURE__ */ e("div", { className: "absolute bottom-2 left-1/2 -translate-x-1/2 flex items-center gap-1 rounded-full bg-background/80 px-2 py-1", children: Array.from({ length: A }).map((O, V) => {
10544
10547
  const se = V === g;
10545
10548
  return /* @__PURE__ */ e(
10546
10549
  "button",
@@ -10551,7 +10554,7 @@ function Vm({
10551
10554
  se ? "bg-foreground" : "bg-muted-foreground/40 hover:bg-muted-foreground/60"
10552
10555
  ].join(" "),
10553
10556
  onClick: () => I(V),
10554
- "aria-label": `Go to image ${V + 1} of ${P}`,
10557
+ "aria-label": `Go to image ${V + 1} of ${A}`,
10555
10558
  "aria-current": se ? "true" : void 0
10556
10559
  },
10557
10560
  V
@@ -10578,7 +10581,7 @@ function Wr({
10578
10581
  customAction: u = /* @__PURE__ */ e(U, {}),
10579
10582
  showUsdLabelOnCost: h = !1
10580
10583
  }) {
10581
- const d = vc(), { toast: c } = Ee(), [m, p] = T(1), [g, N] = T(null), [w, x] = T(0), [b, y] = T(!1), [C] = Ko(), [S, P] = T(!1), [k, D] = T(null), [L, M] = T("idle"), [I, F] = T(null), [Q] = Yo(), z = r?.Distribution?.Cost || 0, _ = r?.Distribution?.RegularPrice || 0, O = r?.Distribution?.Price || 0, V = !!(t && r?.RandmarSKU);
10584
+ const d = vc(), { toast: c } = Ee(), [m, p] = T(1), [g, N] = T(null), [w, x] = T(0), [b, y] = T(!1), [C] = Ko(), [S, A] = T(!1), [k, D] = T(null), [L, M] = T("idle"), [I, $] = T(null), [Q] = Yo(), z = r?.Distribution?.Cost || 0, _ = r?.Distribution?.RegularPrice || 0, O = r?.Distribution?.Price || 0, V = !!(t && r?.RandmarSKU);
10582
10585
  K(() => {
10583
10586
  p(1), N(null), x(0);
10584
10587
  }, [r?.RandmarSKU]), K(() => {
@@ -10594,17 +10597,17 @@ function Wr({
10594
10597
  l || p(1);
10595
10598
  }, [l]), K(() => {
10596
10599
  if (!S) {
10597
- D(null), M("idle"), F(null);
10600
+ D(null), M("idle"), $(null);
10598
10601
  return;
10599
10602
  }
10600
10603
  if (!t || !r?.RandmarSKU) {
10601
- M("error"), F("Missing identifiers to load performance data.");
10604
+ M("error"), $("Missing identifiers to load performance data.");
10602
10605
  return;
10603
10606
  }
10604
10607
  let j = !1;
10605
10608
  const ge = r.RandmarSKU;
10606
10609
  return (async () => {
10607
- M("summary"), F(null);
10610
+ M("summary"), $(null);
10608
10611
  try {
10609
10612
  const Ie = await Q({
10610
10613
  routeApplicationId: t,
@@ -10626,7 +10629,7 @@ function Wr({
10626
10629
  D(_e.data ?? Ie.data ?? null), M("complete");
10627
10630
  } catch (Ie) {
10628
10631
  if (j) return;
10629
- console.error("Failed to load performance data for product modal", Ie), M("error"), F("We couldn't load the performance details. Please try again.");
10632
+ console.error("Failed to load performance data for product modal", Ie), M("error"), $("We couldn't load the performance details. Please try again.");
10630
10633
  }
10631
10634
  })(), () => {
10632
10635
  j = !0;
@@ -10716,11 +10719,11 @@ function Wr({
10716
10719
  }, Me = (j) => {
10717
10720
  const ge = typeof r?.MSRP == "number" && r.MSRP > 0 ? r.MSRP : typeof r?.MAP == "number" && r.MAP > 0 ? r.MAP : null;
10718
10721
  if (ge === null) return null;
10719
- const Pe = j.Price ?? r?.Distribution?.Price;
10720
- if (typeof Pe != "number") return null;
10721
- const Ie = j.Rebate ?? 0, _e = Math.max(Pe - Ie, 0);
10722
+ const Ae = j.Price ?? r?.Distribution?.Price;
10723
+ if (typeof Ae != "number") return null;
10724
+ const Ie = j.Rebate ?? 0, _e = Math.max(Ae - Ie, 0);
10722
10725
  return ge - _e;
10723
- }, Ae = () => {
10726
+ }, Pe = () => {
10724
10727
  typeof i < "u" && i({ quantity: m ?? 1, bidNumber: g?.BidNumber ?? null });
10725
10728
  }, ze = () => {
10726
10729
  b || !o || (y(!0), C({
@@ -10806,14 +10809,14 @@ function Wr({
10806
10809
  variant: r.SerialNumber ? "success" : "warning",
10807
10810
  className: "rounded-full px-3",
10808
10811
  children: [
10809
- /* @__PURE__ */ e($l, { size: "12", className: "mr-1.5" }),
10812
+ /* @__PURE__ */ e(Fl, { size: "12", className: "mr-1.5" }),
10810
10813
  " ",
10811
10814
  r.SerialNumber ? "Serialized" : "Unserialized"
10812
10815
  ]
10813
10816
  }
10814
10817
  ),
10815
10818
  r.TransparencyCode && /* @__PURE__ */ a(xe, { variant: "info", className: "rounded-full px-3", children: [
10816
- /* @__PURE__ */ e(Fl, { size: "12", className: "mr-1.5" }),
10819
+ /* @__PURE__ */ e($l, { size: "12", className: "mr-1.5" }),
10817
10820
  " Transparency Code"
10818
10821
  ] }),
10819
10822
  r.AvailableToBuy !== void 0 && /* @__PURE__ */ a(
@@ -10974,7 +10977,7 @@ function Wr({
10974
10977
  /* @__PURE__ */ e("div", { className: "flex flex-col @[36rem]:flex-row gap-6 mt-4", children: /* @__PURE__ */ e("div", { className: "flex flex-1 @[36rem]:order-1 order-2", children: pe && r.Distribution && /* @__PURE__ */ a("div", { className: "w-full", children: [
10975
10978
  /* @__PURE__ */ e("div", { className: "flex items-center", children: "You have " + ie.length + (ie.length > 1 ? " opportunities" : " opportunity") + " for this product:" }),
10976
10979
  /* @__PURE__ */ e(ke, { children: /* @__PURE__ */ e("div", { className: "space-y-2 max-h-[200px] overflow-y-auto p-2 mt-1", children: ie.map((j, ge) => {
10977
- const Pe = Me(j);
10980
+ const Ae = Me(j);
10978
10981
  return rs(j) ? /* @__PURE__ */ a(
10979
10982
  "div",
10980
10983
  {
@@ -10993,9 +10996,9 @@ function Wr({
10993
10996
  "Rebate: ",
10994
10997
  ue(j.Rebate)
10995
10998
  ] }),
10996
- Pe !== null && /* @__PURE__ */ a("span", { className: "text-xs text-info", children: [
10999
+ Ae !== null && /* @__PURE__ */ a("span", { className: "text-xs text-info", children: [
10997
11000
  "Potential Revenue: ",
10998
- ue(Pe)
11001
+ ue(Ae)
10999
11002
  ] }),
11000
11003
  j.EndDate && /* @__PURE__ */ a("span", { className: "text-xs text-muted-foreground", children: [
11001
11004
  "Ends: ",
@@ -11028,9 +11031,9 @@ function Wr({
11028
11031
  "Rebate: ",
11029
11032
  ue(j.Rebate)
11030
11033
  ] }),
11031
- Pe !== null && /* @__PURE__ */ a("span", { className: "text-xs text-info", children: [
11034
+ Ae !== null && /* @__PURE__ */ a("span", { className: "text-xs text-info", children: [
11032
11035
  "Potential Revenue: ",
11033
- ue(Pe)
11036
+ ue(Ae)
11034
11037
  ] }),
11035
11038
  j.EndDate && /* @__PURE__ */ a("span", { className: "text-xs text-muted-foreground", children: [
11036
11039
  "Ends: ",
@@ -11130,7 +11133,7 @@ function Wr({
11130
11133
  E,
11131
11134
  {
11132
11135
  className: "gap-2 whitespace-nowrap",
11133
- onClick: Ae,
11136
+ onClick: Pe,
11134
11137
  disabled: !r.AvailableToBuy || l,
11135
11138
  children: l ? /* @__PURE__ */ a(U, { children: [
11136
11139
  /* @__PURE__ */ e(he, { className: "h-4 w-4 animate-spin" }),
@@ -11151,7 +11154,7 @@ function Wr({
11151
11154
  variant: "outline",
11152
11155
  type: "button",
11153
11156
  className: "h-11 px-4 text-sm font-medium justify-start w-full",
11154
- onClick: () => P(!0),
11157
+ onClick: () => A(!0),
11155
11158
  disabled: !V,
11156
11159
  children: [
11157
11160
  /* @__PURE__ */ e(Vl, { className: "mr-2" }),
@@ -11176,7 +11179,7 @@ function Wr({
11176
11179
  ] })
11177
11180
  ] })
11178
11181
  ] }) }),
11179
- /* @__PURE__ */ e(Fe, { open: S, onOpenChange: P, children: /* @__PURE__ */ a(Be, { className: "w-[min(95vw,1100px)] max-w-5xl space-y-6", children: [
11182
+ /* @__PURE__ */ e($e, { open: S, onOpenChange: A, children: /* @__PURE__ */ a(Be, { className: "w-[min(95vw,1100px)] max-w-5xl space-y-6", children: [
11180
11183
  /* @__PURE__ */ a(qe, { children: [
11181
11184
  /* @__PURE__ */ e(He, { children: "Monthly Sales Performance" }),
11182
11185
  /* @__PURE__ */ a(Ge, { children: [
@@ -11228,7 +11231,7 @@ const _m = {
11228
11231
  }
11229
11232
  ), qm = () => /* @__PURE__ */ e(f, { className: "w-full", style: { aspectRatio: "16/9" } });
11230
11233
  function Ni({ randmarSKU: t, sceneName: r, size: n = "md", alt: s, secondaryContent: i }) {
11231
- const [l, o] = A.useState(!1), [u, h] = A.useState(!1), { sendMessageWithClear: d } = Na(), c = dr(), m = _m[n], p = ce(null), g = or({
11234
+ const [l, o] = P.useState(!1), [u, h] = P.useState(!1), { sendMessageWithClear: d } = Na(), c = dr(), m = _m[n], p = ce(null), g = or({
11232
11235
  elementRef: p,
11233
11236
  threshold: 0.1,
11234
11237
  rootMargin: "100px"
@@ -11248,7 +11251,7 @@ function Ni({ randmarSKU: t, sceneName: r, size: n = "md", alt: s, secondaryCont
11248
11251
  ), { data: C, isFetching: S } = ec(
11249
11252
  { productNumber: t },
11250
11253
  { skip: !y || !l }
11251
- ), P = w || b;
11254
+ ), A = w || b;
11252
11255
  function k() {
11253
11256
  if (C)
11254
11257
  try {
@@ -11260,24 +11263,24 @@ function Ni({ randmarSKU: t, sceneName: r, size: n = "md", alt: s, secondaryCont
11260
11263
  }
11261
11264
  function D() {
11262
11265
  const I = `/Product/${encodeURIComponent(t)}/Video`;
11263
- navigator.clipboard.writeText(Pt(I, c)), h(!0), setTimeout(() => h(!1), 2e3);
11266
+ navigator.clipboard.writeText(At(I, c)), h(!0), setTimeout(() => h(!1), 2e3);
11264
11267
  }
11265
11268
  function L() {
11266
11269
  y && o(!0);
11267
11270
  }
11268
- const M = A.useCallback(() => {
11271
+ const M = P.useCallback(() => {
11269
11272
  if (!x) return;
11270
- const I = (r ?? "").trim(), F = I ? `Use this concept as a background/stage scene: "${I}".` : "Use a modern and clean office as the background/stage, with no people present.";
11273
+ const I = (r ?? "").trim(), $ = I ? `Use this concept as a background/stage scene: "${I}".` : "Use a modern and clean office as the background/stage, with no people present.";
11271
11274
  d(
11272
11275
  `Help me generate product images for (Randmar SKU: ${t}).
11273
11276
 
11274
- ${F}
11277
+ ${$}
11275
11278
 
11276
11279
  Repeat and ask me what to change or improve until we are done creating pictures.`
11277
11280
  );
11278
11281
  }, [x, t, r, d]);
11279
11282
  return /* @__PURE__ */ a(U, { children: [
11280
- /* @__PURE__ */ e(Fe, { open: l, onOpenChange: o, children: /* @__PURE__ */ e(Be, { className: "max-w-4xl p-0 overflow-hidden", children: S || !C ? (
11283
+ /* @__PURE__ */ e($e, { open: l, onOpenChange: o, children: /* @__PURE__ */ e(Be, { className: "max-w-4xl p-0 overflow-hidden", children: S || !C ? (
11281
11284
  // Display a skeleton inside the dialog while the video URL is loading.
11282
11285
  /* @__PURE__ */ e(qm, {})
11283
11286
  ) : (
@@ -11306,7 +11309,7 @@ Repeat and ask me what to change or improve until we are done creating pictures.
11306
11309
  ] }) })
11307
11310
  ) }) }),
11308
11311
  /* @__PURE__ */ a("div", { className: "relative w-max h-max", ref: p, children: [
11309
- P ? (
11312
+ A ? (
11310
11313
  // Use the Skeleton component while checking for the image or fetching its URL.
11311
11314
  /* @__PURE__ */ e(f, { className: "rounded-md", style: { width: m, height: m } })
11312
11315
  ) : x ? (
@@ -11348,7 +11351,7 @@ Repeat and ask me what to change or improve until we are done creating pictures.
11348
11351
  ] })
11349
11352
  ] });
11350
11353
  }
11351
- function $f({ reseller: t, actions: r, loading: n = !1 }) {
11354
+ function Ff({ reseller: t, actions: r, loading: n = !1 }) {
11352
11355
  return n || !t ? /* @__PURE__ */ e(Qm, {}) : /* @__PURE__ */ e(Hm, { reseller: t, actions: r });
11353
11356
  }
11354
11357
  function Qm() {
@@ -11463,7 +11466,7 @@ function Gm({ manufacturerId: t, opportunityNumber: r }) {
11463
11466
  r && /* @__PURE__ */ e(xe, { variant: "outline", className: "text-xs", children: r })
11464
11467
  ] });
11465
11468
  }
11466
- function Ff({ salesData: t, salesStatistics: r = [], loading: n = !1 }) {
11469
+ function $f({ salesData: t, salesStatistics: r = [], loading: n = !1 }) {
11467
11470
  return n || !t ? /* @__PURE__ */ e(Km, {}) : /* @__PURE__ */ e(Ym, { salesData: t, salesStatistics: r });
11468
11471
  }
11469
11472
  function Km() {
@@ -11549,7 +11552,7 @@ function Bf({
11549
11552
  className: u,
11550
11553
  ...h
11551
11554
  }) {
11552
- const d = A.Children.toArray(l).filter(Boolean);
11555
+ const d = P.Children.toArray(l).filter(Boolean);
11553
11556
  return /* @__PURE__ */ a(q, { className: v("flex flex-col h-full overflow-hidden", u), ...h, children: [
11554
11557
  /* @__PURE__ */ e(
11555
11558
  "header",
@@ -11620,7 +11623,7 @@ function Bf({
11620
11623
  )) }) })
11621
11624
  ] });
11622
11625
  }
11623
- const vi = tt.Root, wi = tt.Trigger, Jm = tt.Portal, Si = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11626
+ const vi = tt.Root, wi = tt.Trigger, Jm = tt.Portal, Si = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11624
11627
  tt.Overlay,
11625
11628
  {
11626
11629
  className: v(
@@ -11632,7 +11635,7 @@ const vi = tt.Root, wi = tt.Trigger, Jm = tt.Portal, Si = A.forwardRef(({ classN
11632
11635
  }
11633
11636
  ));
11634
11637
  Si.displayName = tt.Overlay.displayName;
11635
- const mn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ a(Jm, { children: [
11638
+ const mn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ a(Jm, { children: [
11636
11639
  /* @__PURE__ */ e(Si, {}),
11637
11640
  /* @__PURE__ */ e(
11638
11641
  tt.Content,
@@ -11675,7 +11678,7 @@ const fn = ({
11675
11678
  }
11676
11679
  );
11677
11680
  fn.displayName = "AlertDialogFooter";
11678
- const pn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11681
+ const pn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11679
11682
  tt.Title,
11680
11683
  {
11681
11684
  ref: n,
@@ -11684,7 +11687,7 @@ const pn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11684
11687
  }
11685
11688
  ));
11686
11689
  pn.displayName = tt.Title.displayName;
11687
- const gn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11690
+ const gn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11688
11691
  tt.Description,
11689
11692
  {
11690
11693
  ref: n,
@@ -11693,7 +11696,7 @@ const gn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11693
11696
  }
11694
11697
  ));
11695
11698
  gn.displayName = tt.Description.displayName;
11696
- const bn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11699
+ const bn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11697
11700
  tt.Action,
11698
11701
  {
11699
11702
  ref: n,
@@ -11702,7 +11705,7 @@ const bn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11702
11705
  }
11703
11706
  ));
11704
11707
  bn.displayName = tt.Action.displayName;
11705
- const yn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11708
+ const yn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
11706
11709
  tt.Cancel,
11707
11710
  {
11708
11711
  ref: n,
@@ -11749,11 +11752,11 @@ function th({
11749
11752
  className: u,
11750
11753
  disabled: h = !1
11751
11754
  }) {
11752
- const [d, c] = A.useState(!1), [m, p] = A.useState(t);
11753
- A.useEffect(() => {
11755
+ const [d, c] = P.useState(!1), [m, p] = P.useState(t);
11756
+ P.useEffect(() => {
11754
11757
  p(t);
11755
11758
  }, [t]);
11756
- const g = !!(r || n), N = i || d, w = t ?? m, x = A.useCallback(async () => {
11759
+ const g = !!(r || n), N = i || d, w = t ?? m, x = P.useCallback(async () => {
11757
11760
  if (!(!g || h || N)) {
11758
11761
  c(!0);
11759
11762
  try {
@@ -11827,7 +11830,7 @@ function zf({
11827
11830
  onAssistantUnavailable: n,
11828
11831
  ...s
11829
11832
  }) {
11830
- const i = Dd(), l = A.useCallback(() => {
11833
+ const i = Dd(), l = P.useCallback(() => {
11831
11834
  if (t) {
11832
11835
  t();
11833
11836
  return;
@@ -12009,7 +12012,7 @@ const ch = [
12009
12012
  }
12010
12013
  `;
12011
12014
  function jf({ id: t, name: r, value: n, onChange: s, placeholder: i, className: l, ...o }) {
12012
- const [u, h] = T(!1), d = ce(null), c = ce(null), m = Pc({
12015
+ const [u, h] = T(!1), d = ce(null), c = ce(null), m = Ac({
12013
12016
  extensions: [Dc, Mc],
12014
12017
  content: n,
12015
12018
  editorProps: {
@@ -12755,8 +12758,8 @@ function Gr(t) {
12755
12758
  if (l) {
12756
12759
  const b = l.trim(), [y, C, S] = b.split(":");
12757
12760
  if (p = Number.parseInt(y ?? "0", 10), g = Number.parseInt(C ?? "0", 10), S) {
12758
- const [P, k] = S.split(".");
12759
- N = Number.parseInt(P ?? "0", 10), k && (w = Number.parseInt(k.slice(0, 3).padEnd(3, "0"), 10));
12761
+ const [A, k] = S.split(".");
12762
+ N = Number.parseInt(A ?? "0", 10), k && (w = Number.parseInt(k.slice(0, 3).padEnd(3, "0"), 10));
12760
12763
  }
12761
12764
  }
12762
12765
  if (!Number.isFinite(p) || !Number.isFinite(g) || !Number.isFinite(N) || !Number.isFinite(w))
@@ -12871,13 +12874,13 @@ function qf({
12871
12874
  O && x(O);
12872
12875
  }
12873
12876
  }, [m, p, n, w, g?.IsManufacturer]);
12874
- const C = !n && (d || m), S = p?.Title || p?.RandmarTitle || p?.RandmarSKU || "Product", P = p?.VoiceoverCaption || "", k = typeof p?.MAP == "number" && p.MAP > 0 ? p.MAP : typeof p?.Distribution?.MAP == "number" && p.Distribution.MAP > 0 ? p.Distribution.MAP : null, D = typeof p?.MSRP == "number" && p.MSRP > 0 ? p.MSRP : typeof p?.Distribution?.MSRP == "number" && p.Distribution.MSRP > 0 ? p.Distribution.MSRP : null, L = s ? p?.Opportunities?.find((z) => z.BidNumber === s)?.Price : null, M = typeof L == "number" && L > 0 ? L : typeof p?.Distribution?.Price == "number" && p.Distribution.Price > 0 ? p.Distribution.Price : null, I = C || typeof M == "number", F = typeof k == "number" && typeof M == "number" ? k - M : null, Q = typeof F == "number" && typeof k == "number" && k > 0 ? Math.round(F / k * 100) : null;
12877
+ const C = !n && (d || m), S = p?.Title || p?.RandmarTitle || p?.RandmarSKU || "Product", A = p?.VoiceoverCaption || "", k = typeof p?.MAP == "number" && p.MAP > 0 ? p.MAP : typeof p?.Distribution?.MAP == "number" && p.Distribution.MAP > 0 ? p.Distribution.MAP : null, D = typeof p?.MSRP == "number" && p.MSRP > 0 ? p.MSRP : typeof p?.Distribution?.MSRP == "number" && p.Distribution.MSRP > 0 ? p.Distribution.MSRP : null, L = s ? p?.Opportunities?.find((z) => z.BidNumber === s)?.Price : null, M = typeof L == "number" && L > 0 ? L : typeof p?.Distribution?.Price == "number" && p.Distribution.Price > 0 ? p.Distribution.Price : null, I = C || typeof M == "number", $ = typeof k == "number" && typeof M == "number" ? k - M : null, Q = typeof $ == "number" && typeof k == "number" && k > 0 ? Math.round($ / k * 100) : null;
12875
12878
  return /* @__PURE__ */ a("div", { className: "@container", children: [
12876
12879
  /* @__PURE__ */ a("div", { className: "grid gap-4 grid-cols-1 @md:grid-cols-3", children: [
12877
12880
  /* @__PURE__ */ a(q, { className: "@md:col-span-2", children: [
12878
12881
  /* @__PURE__ */ a(Z, { className: "space-y-2", children: [
12879
12882
  /* @__PURE__ */ e(fe, { className: "text-2xl font-semibold leading-tight", children: C && !p ? /* @__PURE__ */ e(f, { className: "h-7 w-2/3" }) : S }),
12880
- P ? /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: P }) : C && !p ? /* @__PURE__ */ e(f, { className: "h-4 w-4/5" }) : null
12883
+ A ? /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: A }) : C && !p ? /* @__PURE__ */ e(f, { className: "h-4 w-4/5" }) : null
12881
12884
  ] }),
12882
12885
  /* @__PURE__ */ a(G, { className: "space-y-6", children: [
12883
12886
  /* @__PURE__ */ a("div", { className: "rounded-lg border bg-card p-4", children: [
@@ -12886,20 +12889,20 @@ function qf({
12886
12889
  /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: "Your Price" }),
12887
12890
  /* @__PURE__ */ e("div", { className: "mt-1 text-3xl font-semibold tracking-tight", children: typeof M == "number" ? ue(M) : C ? /* @__PURE__ */ e(f, { className: "h-9 w-40" }) : null })
12888
12891
  ] }),
12889
- typeof F == "number" && typeof Q == "number" ? /* @__PURE__ */ a("div", { className: "flex flex-col items-start @sm:items-end", children: [
12892
+ typeof $ == "number" && typeof Q == "number" ? /* @__PURE__ */ a("div", { className: "flex flex-col items-start @sm:items-end", children: [
12890
12893
  /* @__PURE__ */ a(
12891
12894
  xe,
12892
12895
  {
12893
- variant: F >= 0 ? "success" : "destructive",
12896
+ variant: $ >= 0 ? "success" : "destructive",
12894
12897
  className: "rounded-full px-3 py-1.5 text-sm font-semibold",
12895
12898
  children: [
12896
- F >= 0 ? "Potential Profit" : "Below MAP",
12899
+ $ >= 0 ? "Potential Profit" : "Below MAP",
12897
12900
  ": ",
12898
- ue(Math.abs(F))
12901
+ ue(Math.abs($))
12899
12902
  ]
12900
12903
  }
12901
12904
  ),
12902
- /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-muted-foreground", children: F >= 0 ? `${Q}% margin vs MAP` : `${Math.abs(Q)}% under MAP` })
12905
+ /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-muted-foreground", children: $ >= 0 ? `${Q}% margin vs MAP` : `${Math.abs(Q)}% under MAP` })
12903
12906
  ] }) : null
12904
12907
  ] }) : null,
12905
12908
  /* @__PURE__ */ e(ke, { children: /* @__PURE__ */ a("div", { className: `${I ? "mt-5" : "mt-0"} grid grid-cols-1 gap-4 @sm:grid-cols-2`, children: [
@@ -12918,14 +12921,14 @@ function qf({
12918
12921
  ] }) }),
12919
12922
  /* @__PURE__ */ e("div", { className: "font-medium", children: typeof k == "number" ? ue(k) : "—" })
12920
12923
  ] }),
12921
- typeof F == "number" && typeof M == "number" && typeof k == "number" ? /* @__PURE__ */ a("div", { className: "text-right", children: [
12924
+ typeof $ == "number" && typeof M == "number" && typeof k == "number" ? /* @__PURE__ */ a("div", { className: "text-right", children: [
12922
12925
  /* @__PURE__ */ e("div", { className: "text-[11px] text-muted-foreground", children: "Profit vs MAP" }),
12923
12926
  /* @__PURE__ */ a("div", { className: "text-sm font-semibold", children: [
12924
12927
  ue(k),
12925
12928
  " - ",
12926
12929
  ue(M),
12927
12930
  " = ",
12928
- ue(F)
12931
+ ue($)
12929
12932
  ] })
12930
12933
  ] }) : null
12931
12934
  ] }),
@@ -13320,7 +13323,7 @@ const Wf = ({
13320
13323
  s,
13321
13324
  g
13322
13325
  ] });
13323
- }, Gf = Vt.Root, Ch = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
13326
+ }, Gf = Vt.Root, Ch = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
13324
13327
  Vt.Item,
13325
13328
  {
13326
13329
  ref: n,
@@ -13329,7 +13332,7 @@ const Wf = ({
13329
13332
  }
13330
13333
  ));
13331
13334
  Ch.displayName = "AccordionItem";
13332
- const kh = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ e(Vt.Header, { className: "flex", children: /* @__PURE__ */ a(
13335
+ const kh = P.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ e(Vt.Header, { className: "flex", children: /* @__PURE__ */ a(
13333
13336
  Vt.Trigger,
13334
13337
  {
13335
13338
  ref: s,
@@ -13345,7 +13348,7 @@ const kh = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__
13345
13348
  }
13346
13349
  ) }));
13347
13350
  kh.displayName = Vt.Trigger.displayName;
13348
- const Rh = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ e(
13351
+ const Rh = P.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ e(
13349
13352
  Vt.Content,
13350
13353
  {
13351
13354
  ref: s,
@@ -13355,7 +13358,7 @@ const Rh = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__
13355
13358
  }
13356
13359
  ));
13357
13360
  Rh.displayName = Vt.Content.displayName;
13358
- function Ah({
13361
+ function Ph({
13359
13362
  className: t,
13360
13363
  classNames: r,
13361
13364
  showOutsideDays: n = !0,
@@ -13480,7 +13483,7 @@ function Ah({
13480
13483
  ...m
13481
13484
  }
13482
13485
  ) : /* @__PURE__ */ e(Zl, { className: v("size-4", d), ...m }),
13483
- DayButton: Ph,
13486
+ DayButton: Ah,
13484
13487
  WeekNumber: ({ children: d, ...c }) => /* @__PURE__ */ e("td", { ...c, children: /* @__PURE__ */ e("div", { className: "flex size-[--cell-size] items-center justify-center text-center", children: d }) }),
13485
13488
  ...o
13486
13489
  },
@@ -13488,14 +13491,14 @@ function Ah({
13488
13491
  }
13489
13492
  );
13490
13493
  }
13491
- function Ph({
13494
+ function Ah({
13492
13495
  className: t,
13493
13496
  day: r,
13494
13497
  modifiers: n,
13495
13498
  ...s
13496
13499
  }) {
13497
- const i = Is(), l = A.useRef(null);
13498
- return A.useEffect(() => {
13500
+ const i = Is(), l = P.useRef(null);
13501
+ return P.useEffect(() => {
13499
13502
  n.focused && l.current?.focus();
13500
13503
  }, [n.focused]), /* @__PURE__ */ e(
13501
13504
  E,
@@ -13529,15 +13532,15 @@ function Rr(t) {
13529
13532
  function Kr(t) {
13530
13533
  return t instanceof Date && !Number.isNaN(t.getTime());
13531
13534
  }
13532
- function Ar({
13535
+ function Pr({
13533
13536
  date: t,
13534
13537
  onDateChange: r,
13535
13538
  label: n,
13536
13539
  id: s,
13537
13540
  className: i
13538
13541
  }) {
13539
- const [l, o] = A.useState(!1), [u, h] = A.useState(t), [d, c] = A.useState(Rr(t));
13540
- A.useEffect(() => {
13542
+ const [l, o] = P.useState(!1), [u, h] = P.useState(t), [d, c] = P.useState(Rr(t));
13543
+ P.useEffect(() => {
13541
13544
  c(Rr(t)), Kr(t) && h(t);
13542
13545
  }, [t]);
13543
13546
  const m = (g) => {
@@ -13585,7 +13588,7 @@ function Ar({
13585
13588
  align: "end",
13586
13589
  sideOffset: 8,
13587
13590
  children: /* @__PURE__ */ e(
13588
- Ah,
13591
+ Ph,
13589
13592
  {
13590
13593
  mode: "single",
13591
13594
  selected: t,
@@ -13716,7 +13719,7 @@ function Ih(t) {
13716
13719
  const n = /* @__PURE__ */ new Date(), s = new Date(r.getFullYear(), r.getMonth(), r.getDate()), i = new Date(n.getFullYear(), n.getMonth(), n.getDate()), l = s.getTime() - i.getTime(), o = Math.ceil(l / (1e3 * 60 * 60 * 24));
13717
13720
  return o < 0 ? { text: `Ended ${Math.abs(o)}d ago`, variant: "destructive", daysRemaining: o } : o === 0 ? { text: "Ends today", variant: "destructive", daysRemaining: o } : o <= 7 ? { text: `Ends in ${o}d`, variant: "destructive", daysRemaining: o } : o <= 30 ? { text: `Ends in ${o}d`, variant: "warning", daysRemaining: o } : { text: `Ends in ${o}d`, variant: "neutral", daysRemaining: o };
13718
13721
  }
13719
- const Pr = (t) => {
13722
+ const Ar = (t) => {
13720
13723
  if (!t) return "N/A";
13721
13724
  try {
13722
13725
  const r = new Date(t);
@@ -13844,9 +13847,9 @@ function Ri({
13844
13847
  id: "statusInfo",
13845
13848
  header: "Status",
13846
13849
  cell: ({ row: D }) => {
13847
- const L = D.original, M = L.Active === !0, I = Ih(L.EndDate), F = M ? "success" : "secondary", Q = I.variant === "destructive" ? "destructive" : I.variant === "warning" ? "warning" : "secondary";
13850
+ const L = D.original, M = L.Active === !0, I = Ih(L.EndDate), $ = M ? "success" : "secondary", Q = I.variant === "destructive" ? "destructive" : I.variant === "warning" ? "warning" : "secondary";
13848
13851
  return /* @__PURE__ */ a("div", { className: "flex items-center space-x-2 min-w-[200px]", children: [
13849
- /* @__PURE__ */ e(xe, { variant: F, className: "font-medium", children: M ? "Active" : "Inactive" }),
13852
+ /* @__PURE__ */ e(xe, { variant: $, className: "font-medium", children: M ? "Active" : "Inactive" }),
13850
13853
  L.EndDate && /* @__PURE__ */ e(xe, { variant: Q, className: "font-medium", children: I.text }),
13851
13854
  /* @__PURE__ */ e(ke, { delayDuration: 100, children: /* @__PURE__ */ a(we, { children: [
13852
13855
  /* @__PURE__ */ e(Se, { asChild: !0, children: /* @__PURE__ */ e(E, { variant: "ghost", size: "icon", className: "h-6 w-6 p-0 data-[state=delayed-open]:bg-accent data-[state=instant-open]:bg-accent", children: /* @__PURE__ */ e(ys, { className: "h-4 w-4 text-muted-foreground" }) }) }),
@@ -13854,17 +13857,17 @@ function Ri({
13854
13857
  /* @__PURE__ */ a("p", { children: [
13855
13858
  /* @__PURE__ */ e("strong", { children: "Start:" }),
13856
13859
  " ",
13857
- Pr(L.StartDate)
13860
+ Ar(L.StartDate)
13858
13861
  ] }),
13859
13862
  /* @__PURE__ */ a("p", { children: [
13860
13863
  /* @__PURE__ */ e("strong", { children: "End:" }),
13861
13864
  " ",
13862
- Pr(L.EndDate)
13865
+ Ar(L.EndDate)
13863
13866
  ] }),
13864
13867
  /* @__PURE__ */ a("p", { children: [
13865
13868
  /* @__PURE__ */ e("strong", { children: "Updated:" }),
13866
13869
  " ",
13867
- Pr(L.LastUpdate)
13870
+ Ar(L.LastUpdate)
13868
13871
  ] })
13869
13872
  ] }) })
13870
13873
  ] }) })
@@ -13879,7 +13882,7 @@ function Ri({
13879
13882
  const L = D.original;
13880
13883
  if (!L.BidNumber)
13881
13884
  return /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "Actions unavailable" });
13882
- const M = L.BidNumber, I = i[M]?.isSettingDefault, F = c?.BidNumber === M && i[M]?.isSendingReport, Q = I || F, z = L.CanBeSetAsDefault === !0, _ = p?.IsManufacturer ? `/${t}/Opportunity/${L.BidNumber}` : `/${t}/Opportunity/${L.ManufacturerId}/${L.BidNumber}`;
13885
+ const M = L.BidNumber, I = i[M]?.isSettingDefault, $ = c?.BidNumber === M && i[M]?.isSendingReport, Q = I || $, z = L.CanBeSetAsDefault === !0, _ = p?.IsManufacturer ? `/${t}/Opportunity/${L.BidNumber}` : `/${t}/Opportunity/${L.ManufacturerId}/${L.BidNumber}`;
13883
13886
  return /* @__PURE__ */ a("div", { className: "flex space-x-2", children: [
13884
13887
  /* @__PURE__ */ e(Te, { to: _, children: /* @__PURE__ */ a(E, { variant: "outline", size: "sm", className: "flex items-center", children: [
13885
13888
  /* @__PURE__ */ e(Ga, { className: "mr-2 h-4 w-4" }),
@@ -13891,7 +13894,7 @@ function Ri({
13891
13894
  " Set Default"
13892
13895
  ] }),
13893
13896
  /* @__PURE__ */ a(E, { variant: "outline", size: "sm", onClick: () => b(L), disabled: Q, title: "Send report by email", className: "flex items-center", children: [
13894
- F ? /* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Xt, { className: "mr-2 h-4 w-4" }),
13897
+ $ ? /* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Xt, { className: "mr-2 h-4 w-4" }),
13895
13898
  " Send Report"
13896
13899
  ] })
13897
13900
  ] })
@@ -13920,7 +13923,7 @@ function Ri({
13920
13923
  D.opportunityDisplay = M;
13921
13924
  }
13922
13925
  return D;
13923
- }, [r]), P = r || [], k = c?.BidNumber ? i[c.BidNumber]?.isSendingReport : !1;
13926
+ }, [r]), A = r || [], k = c?.BidNumber ? i[c.BidNumber]?.isSendingReport : !1;
13924
13927
  return n ? /* @__PURE__ */ a(q, { className: "w-full", children: [
13925
13928
  /* @__PURE__ */ a(Z, { children: [
13926
13929
  " ",
@@ -13950,9 +13953,9 @@ function Ri({
13950
13953
  /* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Opportunities" }),
13951
13954
  " "
13952
13955
  ] }),
13953
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(Qt, { columns: C, data: P, uniqueValues: S }) })
13956
+ /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(Qt, { columns: C, data: A, uniqueValues: S }) })
13954
13957
  ] }),
13955
- /* @__PURE__ */ e(Fe, { open: o, onOpenChange: (D) => {
13958
+ /* @__PURE__ */ e($e, { open: o, onOpenChange: (D) => {
13956
13959
  u(D), D || (m(null), d(""));
13957
13960
  }, children: /* @__PURE__ */ a(Be, { className: "@sm:max-w-[425px]", children: [
13958
13961
  /* @__PURE__ */ a(qe, { children: [
@@ -14027,7 +14030,7 @@ function Jf({
14027
14030
  formatDayLabel: s = (l) => Oh.format(l),
14028
14031
  formatTimeLabel: i = (l) => Eh.format(l)
14029
14032
  }) {
14030
- const l = A.useMemo(() => Th(t), [t]);
14033
+ const l = P.useMemo(() => Th(t), [t]);
14031
14034
  return l.length === 0 ? /* @__PURE__ */ e("p", { className: v("text-sm text-muted-foreground", n), children: r }) : /* @__PURE__ */ e("div", { className: v("space-y-6", n), children: l.map((o) => /* @__PURE__ */ a("section", { className: "space-y-2", children: [
14032
14035
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-foreground", children: s(o.day) }),
14033
14036
  /* @__PURE__ */ e("div", { className: "space-y-2", children: o.entries.map((u, h) => {
@@ -14055,21 +14058,21 @@ function Ir(t, r, n) {
14055
14058
  };
14056
14059
  return `#${i(0)}${i(8)}${i(4)}`;
14057
14060
  }
14058
- const Ai = A.forwardRef(
14061
+ const Pi = P.forwardRef(
14059
14062
  ({ data: t, options: r, height: n = "500px", className: s, loading: i, disableClick: l = !0, ...o }, u) => {
14060
- const h = A.useRef(null), [d, c] = A.useState(null);
14061
- A.useEffect(() => {
14063
+ const h = P.useRef(null), [d, c] = P.useState(null);
14064
+ P.useEffect(() => {
14062
14065
  if (!h.current) return;
14063
14066
  const g = h.current, N = () => {
14064
14067
  const y = getComputedStyle(g).getPropertyValue("--primary").trim();
14065
14068
  if (y) {
14066
14069
  const C = Lh(y);
14067
14070
  if (C) {
14068
- const { h: S, s: P, l: k } = C;
14071
+ const { h: S, s: A, l: k } = C;
14069
14072
  c({
14070
- minColor: Ir(S, P, Math.min(100, k + 50)),
14071
- midColor: Ir(S, P, Math.min(100, k + 35)),
14072
- maxColor: Ir(S, P, Math.min(100, k + 20))
14073
+ minColor: Ir(S, A, Math.min(100, k + 50)),
14074
+ midColor: Ir(S, A, Math.min(100, k + 35)),
14075
+ maxColor: Ir(S, A, Math.min(100, k + 20))
14073
14076
  });
14074
14077
  }
14075
14078
  return !0;
@@ -14086,7 +14089,7 @@ const Ai = A.forwardRef(
14086
14089
  b && clearInterval(b);
14087
14090
  };
14088
14091
  }, []);
14089
- const m = A.useMemo(() => {
14092
+ const m = P.useMemo(() => {
14090
14093
  const g = {
14091
14094
  headerHeight: 0,
14092
14095
  fontSize: 14,
@@ -14103,7 +14106,7 @@ const Ai = A.forwardRef(
14103
14106
  }
14104
14107
  };
14105
14108
  return d && (!r || !r.colorAxis) && (g.minColor = d.minColor, g.midColor = d.midColor, g.maxColor = d.maxColor), { ...g, ...r };
14106
- }, [t, r, d]), p = A.useMemo(() => l ? [{
14109
+ }, [t, r, d]), p = P.useMemo(() => l ? [{
14107
14110
  eventName: "select",
14108
14111
  // react-google-charts is not officially maintained by Google and not up
14109
14112
  // to date with the GoogleChartWrapper type, setSelection is missing
@@ -14112,7 +14115,7 @@ const Ai = A.forwardRef(
14112
14115
  N.getChart().setSelection(null);
14113
14116
  }
14114
14117
  }] : void 0, [l]);
14115
- return A.useImperativeHandle(u, () => h.current, []), i ? /* @__PURE__ */ e("div", { ref: h, className: v("w-full", s), style: { height: n }, ...o, children: /* @__PURE__ */ e(f, { className: "h-full w-full" }) }) : !t || t.length <= 2 ? /* @__PURE__ */ e("div", { ref: h, className: v("w-full flex items-center justify-center text-muted-foreground", s), style: { height: n }, ...o, children: "No data available" }) : /* @__PURE__ */ e("div", { ref: h, className: v("w-full", s), style: { height: n }, ...o, children: /* @__PURE__ */ e(
14118
+ return P.useImperativeHandle(u, () => h.current, []), i ? /* @__PURE__ */ e("div", { ref: h, className: v("w-full", s), style: { height: n }, ...o, children: /* @__PURE__ */ e(f, { className: "h-full w-full" }) }) : !t || t.length <= 2 ? /* @__PURE__ */ e("div", { ref: h, className: v("w-full flex items-center justify-center text-muted-foreground", s), style: { height: n }, ...o, children: "No data available" }) : /* @__PURE__ */ e("div", { ref: h, className: v("w-full", s), style: { height: n }, ...o, children: /* @__PURE__ */ e(
14116
14119
  Oc,
14117
14120
  {
14118
14121
  chartType: "TreeMap",
@@ -14126,7 +14129,7 @@ const Ai = A.forwardRef(
14126
14129
  ) });
14127
14130
  }
14128
14131
  );
14129
- Ai.displayName = "Treemap";
14132
+ Pi.displayName = "Treemap";
14130
14133
  const Zf = ({
14131
14134
  data: t,
14132
14135
  topPercent: r = 80,
@@ -14134,7 +14137,7 @@ const Zf = ({
14134
14137
  loading: s,
14135
14138
  ...i
14136
14139
  }) => {
14137
- const l = A.useMemo(() => {
14140
+ const l = P.useMemo(() => {
14138
14141
  if (!t || t.length === 0)
14139
14142
  return [["ID", "Parent", "Value"], ["Root", null, 0]];
14140
14143
  const u = [...t].sort((N, w) => w.value - N.value), d = u.reduce((N, w) => N + w.value, 0) * (r / 100), c = [
@@ -14153,13 +14156,13 @@ const Zf = ({
14153
14156
  });
14154
14157
  }
14155
14158
  return c;
14156
- }, [t, r]), o = A.useMemo(() => ({
14159
+ }, [t, r]), o = P.useMemo(() => ({
14157
14160
  title: n,
14158
14161
  maxDepth: 1,
14159
14162
  backgroundColor: "transparent"
14160
14163
  }), [n]);
14161
14164
  return /* @__PURE__ */ e(
14162
- Ai,
14165
+ Pi,
14163
14166
  {
14164
14167
  data: l,
14165
14168
  options: o,
@@ -14175,18 +14178,18 @@ const Zf = ({
14175
14178
  "reseller-theme",
14176
14179
  "manufacturer-theme",
14177
14180
  "shopify-theme"
14178
- ], $h = {
14181
+ ], Fh = {
14179
14182
  central: "central-theme",
14180
14183
  partner: "partner-theme",
14181
14184
  reseller: "reseller-theme",
14182
14185
  manufacturer: "manufacturer-theme",
14183
14186
  shopify: "shopify-theme"
14184
- }, Fh = 10;
14185
- function Pi(t, r, n = 0) {
14187
+ }, $h = 10;
14188
+ function Ai(t, r, n = 0) {
14186
14189
  const s = t.trim();
14187
- return !s || n > Fh || !s.includes("var(") ? s : s.replace(/var\(\s*(--[\w-]+)\s*(?:,\s*([^)]+))?\)/g, (i, l, o) => {
14190
+ return !s || n > $h || !s.includes("var(") ? s : s.replace(/var\(\s*(--[\w-]+)\s*(?:,\s*([^)]+))?\)/g, (i, l, o) => {
14188
14191
  const h = r.getPropertyValue(l).trim() || o?.trim() || "";
14189
- return h ? Pi(h, r, n + 1) : "";
14192
+ return h ? Ai(h, r, n + 1) : "";
14190
14193
  }).trim();
14191
14194
  }
14192
14195
  function Bh(t) {
@@ -14202,7 +14205,7 @@ function Bh(t) {
14202
14205
  function Mr(t) {
14203
14206
  const r = getComputedStyle(t), n = r.getPropertyValue("--primary").trim();
14204
14207
  if (!n) return null;
14205
- const s = Pi(n, r) || n;
14208
+ const s = Ai(n, r) || n;
14206
14209
  return Bh(s);
14207
14210
  }
14208
14211
  function zh() {
@@ -14245,7 +14248,7 @@ function Xf({
14245
14248
  (c) => d.classList.contains(c)
14246
14249
  ));
14247
14250
  for (const c of Dr) d.classList.remove(c);
14248
- return s !== "default" && d.classList.add($h[s]), () => {
14251
+ return s !== "default" && d.classList.add(Fh[s]), () => {
14249
14252
  for (const c of Dr) d.classList.remove(c);
14250
14253
  for (const c of i.current ?? []) d.classList.add(c);
14251
14254
  };
@@ -14292,7 +14295,7 @@ export {
14292
14295
  wi as AlertDialogTrigger,
14293
14296
  Ot as AlertTitle,
14294
14297
  gm as ApiImage,
14295
- $d as AreaChart,
14298
+ Fd as AreaChart,
14296
14299
  Kf as AssistantChat,
14297
14300
  cr as Avatar,
14298
14301
  du as AvatarFallback,
@@ -14300,7 +14303,7 @@ export {
14300
14303
  cu as AvatarImage,
14301
14304
  xe as Badge,
14302
14305
  E as Button,
14303
- Ah as Calendar,
14306
+ Ph as Calendar,
14304
14307
  q as Card,
14305
14308
  G as CardContent,
14306
14309
  Ia as CardDescription,
@@ -14323,8 +14326,8 @@ export {
14323
14326
  pm as CountryFlag,
14324
14327
  zf as DataRefreshAssistantCluster,
14325
14328
  Qt as DataTable,
14326
- Ar as DatePicker,
14327
- Fe as Dialog,
14329
+ Pr as DatePicker,
14330
+ $e as Dialog,
14328
14331
  Qn as DialogClose,
14329
14332
  Be as DialogContent,
14330
14333
  Ge as DialogDescription,
@@ -14347,9 +14350,9 @@ export {
14347
14350
  jc as DropdownMenuShortcut,
14348
14351
  vf as DropdownMenuSub,
14349
14352
  Bc as DropdownMenuSubContent,
14350
- Fc as DropdownMenuSubTrigger,
14351
- $c as DropdownMenuTrigger,
14352
- Af as ExploreManufacturers,
14353
+ $c as DropdownMenuSubTrigger,
14354
+ Fc as DropdownMenuTrigger,
14355
+ Pf as ExploreManufacturers,
14353
14356
  Yf as ExternalProductCard,
14354
14357
  Ef as GeneralDocumentCard,
14355
14358
  le as Input,
@@ -14363,7 +14366,7 @@ export {
14363
14366
  yi as ManufacturerGetStartedButton,
14364
14367
  Vu as ManufacturerOverviewPage,
14365
14368
  Lm as ManufacturerReorderingCard,
14366
- $m as MultiSelect,
14369
+ Fm as MultiSelect,
14367
14370
  Om as Navbar,
14368
14371
  Ri as OpportunitiesTable,
14369
14372
  Za as OrdersCard,
@@ -14387,9 +14390,9 @@ export {
14387
14390
  Da as Progress,
14388
14391
  pa as RadioGroup,
14389
14392
  Rt as RadioGroupItem,
14390
- Pf as RandmarApiConfigProvider,
14393
+ Af as RandmarApiConfigProvider,
14391
14394
  th as RefreshCluster,
14392
- $f as ResellerBillingOverviewCard,
14395
+ Ff as ResellerBillingOverviewCard,
14393
14396
  im as ResellerCard,
14394
14397
  rm as ResellerOverview,
14395
14398
  Wm as ResellerQualificationsCard,
@@ -14398,8 +14401,8 @@ export {
14398
14401
  _f as RmBodyZone,
14399
14402
  ih as RmPageHeader,
14400
14403
  la as SalesChart,
14401
- Ff as SalesOverviewCard,
14402
- At as ScrollArea,
14404
+ $f as SalesOverviewCard,
14405
+ Pt as ScrollArea,
14403
14406
  sn as ScrollBar,
14404
14407
  Nh as SearchNoResultsCard,
14405
14408
  Wf as SearchPage,
@@ -14426,7 +14429,7 @@ export {
14426
14429
  Kc as SheetPortal,
14427
14430
  Xc as SheetTitle,
14428
14431
  Sf as SheetTrigger,
14429
- Fs as Sidebar,
14432
+ $s as Sidebar,
14430
14433
  Us as SidebarContent,
14431
14434
  Vs as SidebarFooter,
14432
14435
  ud as SidebarGroup,
@@ -14445,13 +14448,13 @@ export {
14445
14448
  xd as SidebarMenuSub,
14446
14449
  vd as SidebarMenuSubButton,
14447
14450
  Nd as SidebarMenuSubItem,
14448
- $s as SidebarProvider,
14451
+ Fs as SidebarProvider,
14449
14452
  ld as SidebarRail,
14450
14453
  dd as SidebarSeparator,
14451
14454
  Bs as SidebarTrigger,
14452
14455
  f as Skeleton,
14453
14456
  Bf as SummaryOverviewCard,
14454
- Pa as Switch,
14457
+ Aa as Switch,
14455
14458
  Jf as SystemLogFeed,
14456
14459
  zr as Table,
14457
14460
  Ur as TableBody,
@@ -14480,20 +14483,20 @@ export {
14480
14483
  Se as TooltipTrigger,
14481
14484
  Zf as TopPercentTreemap,
14482
14485
  hi as Topbar,
14483
- Ai as Treemap,
14486
+ Pi as Treemap,
14484
14487
  ju as badgeVariants,
14485
- Pt as buildApiUrl,
14488
+ At as buildApiUrl,
14486
14489
  aa as buttonVariants,
14487
14490
  ue as formatMoney,
14488
14491
  xt as formatNumber,
14489
14492
  ya as formatYYYYMMDDIntToDateString,
14490
14493
  Th as groupSystemLogEntries,
14491
- Pd as toast,
14494
+ Ad as toast,
14492
14495
  dr as useApiOrigin,
14493
14496
  Na as useChat,
14494
14497
  td as useIsMobile,
14495
14498
  Dd as useOptionalChat,
14496
14499
  ei as useRandmarApiConfig,
14497
- Aa as useSidebar,
14500
+ Pa as useSidebar,
14498
14501
  Ee as useToast
14499
14502
  };