@sylphx/sdk 0.5.0 → 0.8.0-rc.1

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.
@@ -7374,22 +7374,22 @@ import { jsx, jsxs } from "react/jsx-runtime";
7374
7374
  var Accordion = forwardRef8(
7375
7375
  ({
7376
7376
  className,
7377
- type = "single",
7377
+ type: _type = "single",
7378
7378
  value,
7379
7379
  defaultValue,
7380
7380
  onValueChange,
7381
7381
  disabled: disabled2,
7382
- orientation = "vertical",
7382
+ orientation: _orientation = "vertical",
7383
7383
  children
7384
7384
  }, ref) => /* @__PURE__ */ jsx(
7385
7385
  index_parts_exports.Root,
7386
7386
  {
7387
7387
  ref,
7388
- value,
7389
- defaultValue,
7390
- onValueChange,
7391
- disabled: disabled2,
7392
- className,
7388
+ ...value !== void 0 && { value },
7389
+ ...defaultValue !== void 0 && { defaultValue },
7390
+ ...onValueChange !== void 0 && { onValueChange },
7391
+ ...disabled2 !== void 0 && { disabled: disabled2 },
7392
+ ...className !== void 0 && { className },
7393
7393
  children
7394
7394
  }
7395
7395
  )
@@ -7401,7 +7401,7 @@ var AccordionItem3 = forwardRef8(
7401
7401
  {
7402
7402
  ref,
7403
7403
  value,
7404
- disabled: disabled2,
7404
+ ...disabled2 !== void 0 && { disabled: disabled2 },
7405
7405
  className: cn("border-b", className),
7406
7406
  children
7407
7407
  }
@@ -14947,7 +14947,14 @@ function buttonVariants({
14947
14947
  var Button = forwardRef21(
14948
14948
  ({ className, variant = "default", size: size4 = "default", asChild = false, ...props }, ref) => {
14949
14949
  const Comp = asChild ? Slot : "button";
14950
- return /* @__PURE__ */ jsx2(Comp, { ref, className: buttonVariants({ variant, size: size4, className }), ...props });
14950
+ return /* @__PURE__ */ jsx2(
14951
+ Comp,
14952
+ {
14953
+ ref,
14954
+ className: buttonVariants({ variant, size: size4, ...className !== void 0 && { className } }),
14955
+ ...props
14956
+ }
14957
+ );
14951
14958
  }
14952
14959
  );
14953
14960
  Button.displayName = "Button";
@@ -14959,8 +14966,8 @@ var AlertDialogTrigger = forwardRef22(
14959
14966
  index_parts_exports2.Trigger,
14960
14967
  {
14961
14968
  ref,
14962
- className,
14963
- render: asChild ? children : void 0,
14969
+ ...className !== void 0 && { className },
14970
+ ...asChild ? { render: children } : {},
14964
14971
  children: asChild ? void 0 : children
14965
14972
  }
14966
14973
  )
@@ -15111,6 +15118,7 @@ var AvatarFallback = forwardRef23(
15111
15118
  const timer = setTimeout(() => setCanRender(true), delayMs);
15112
15119
  return () => clearTimeout(timer);
15113
15120
  }
15121
+ return void 0;
15114
15122
  }, [delayMs]);
15115
15123
  if (status === "loaded" || !canRender) {
15116
15124
  return null;
@@ -15174,8 +15182,6 @@ var BreadcrumbPage = forwardRef24(
15174
15182
  "span",
15175
15183
  {
15176
15184
  ref,
15177
- role: "link",
15178
- "aria-disabled": "true",
15179
15185
  "aria-current": "page",
15180
15186
  className: cn("font-medium text-foreground", className),
15181
15187
  ...props
@@ -25501,6 +25507,7 @@ var ChallengeModal = forwardRef35(
25501
25507
  const timer = setTimeout(reset, 200);
25502
25508
  return () => clearTimeout(timer);
25503
25509
  }
25510
+ return void 0;
25504
25511
  }, [open, reset]);
25505
25512
  useEffect24(() => {
25506
25513
  if (requirement) {
@@ -25521,6 +25528,7 @@ var ChallengeModal = forwardRef35(
25521
25528
  const timer = setTimeout(() => setCountdown(countdown - 1), 1e3);
25522
25529
  return () => clearTimeout(timer);
25523
25530
  }
25531
+ return void 0;
25524
25532
  }, [countdown]);
25525
25533
  const handleSendCode = async () => {
25526
25534
  setLoading(true);
@@ -25606,7 +25614,7 @@ var ChallengeModal = forwardRef35(
25606
25614
  }
25607
25615
  )
25608
25616
  ] }),
25609
- step === "identity" ? /* @__PURE__ */ jsx17(Fragment7, { children: hasMultipleIdentityMethods ? /* @__PURE__ */ jsxs7(
25617
+ step === "identity" ? hasMultipleIdentityMethods ? /* @__PURE__ */ jsxs7(
25610
25618
  Tabs,
25611
25619
  {
25612
25620
  value: identityMethod,
@@ -25677,7 +25685,7 @@ var ChallengeModal = forwardRef35(
25677
25685
  error: error2 ?? void 0,
25678
25686
  autoFocus: true
25679
25687
  }
25680
- ) }) : /* @__PURE__ */ jsx17(Fragment7, { children: hasMultipleMfaMethods ? /* @__PURE__ */ jsxs7(
25688
+ ) : hasMultipleMfaMethods ? /* @__PURE__ */ jsxs7(
25681
25689
  Tabs,
25682
25690
  {
25683
25691
  value: mfaMethod,
@@ -25740,7 +25748,7 @@ var ChallengeModal = forwardRef35(
25740
25748
  error: error2 ?? void 0,
25741
25749
  autoFocus: true
25742
25750
  }
25743
- ) })
25751
+ )
25744
25752
  ] }),
25745
25753
  /* @__PURE__ */ jsxs7(DialogFooter, { children: [
25746
25754
  step === "mfa" && /* @__PURE__ */ jsxs7(Button, { variant: "outline", onClick: () => setStep("identity"), disabled: loading, children: [
@@ -33642,7 +33650,7 @@ var SelectScrollDownButton = forwardRef78(
33642
33650
  );
33643
33651
  SelectScrollDownButton.displayName = "SelectScrollDownButton";
33644
33652
  var SelectContent = forwardRef78(
33645
- ({ className, children, position = "popper", side = "bottom", sideOffset = 4 }, ref) => /* @__PURE__ */ jsx23(index_parts_exports8.Portal, { children: /* @__PURE__ */ jsx23(index_parts_exports8.Positioner, { side, sideOffset, children: /* @__PURE__ */ jsx23(
33653
+ ({ className, children, position: _position = "popper", side = "bottom", sideOffset = 4 }, ref) => /* @__PURE__ */ jsx23(index_parts_exports8.Portal, { children: /* @__PURE__ */ jsx23(index_parts_exports8.Positioner, { side, sideOffset, children: /* @__PURE__ */ jsx23(
33646
33654
  index_parts_exports8.Popup,
33647
33655
  {
33648
33656
  ref,
@@ -34046,6 +34054,7 @@ function TextEditor({
34046
34054
  }, successDuration);
34047
34055
  return () => clearTimeout(timer);
34048
34056
  }
34057
+ return void 0;
34049
34058
  }, [state]);
34050
34059
  const startEditing = useCallback29(() => {
34051
34060
  if (disabled2 || state !== "idle") return;
@@ -34161,11 +34170,12 @@ function TextEditor({
34161
34170
  )
34162
34171
  ] });
34163
34172
  return /* @__PURE__ */ jsxs12(
34164
- "div",
34173
+ "fieldset",
34165
34174
  {
34166
34175
  ref: containerRef,
34176
+ "aria-label": label,
34167
34177
  className: cn(
34168
- "group relative inline-flex items-center gap-1.5",
34178
+ "group relative inline-flex items-center gap-1.5 border-0 p-0 m-0 min-w-0",
34169
34179
  disabled2 && "opacity-60 cursor-not-allowed",
34170
34180
  className
34171
34181
  ),
@@ -34329,6 +34339,7 @@ function SwitchEditor({ value, onSave, validate, disabled: disabled2, className,
34329
34339
  }, successDuration);
34330
34340
  return () => clearTimeout(timer);
34331
34341
  }
34342
+ return void 0;
34332
34343
  }, [state]);
34333
34344
  const handleSwitchChange = useCallback29(
34334
34345
  async (checked) => {
@@ -34395,11 +34406,12 @@ function SwitchEditor({ value, onSave, validate, disabled: disabled2, className,
34395
34406
  )
34396
34407
  ] });
34397
34408
  return /* @__PURE__ */ jsxs12(
34398
- "div",
34409
+ "fieldset",
34399
34410
  {
34400
34411
  ref: containerRef,
34412
+ "aria-label": label,
34401
34413
  className: cn(
34402
- "inline-flex items-center gap-2",
34414
+ "inline-flex items-center gap-2 border-0 p-0 m-0 min-w-0",
34403
34415
  disabled2 && "opacity-60 cursor-not-allowed",
34404
34416
  className
34405
34417
  ),
@@ -34449,6 +34461,7 @@ function SelectEditor({
34449
34461
  }, successDuration);
34450
34462
  return () => clearTimeout(timer);
34451
34463
  }
34464
+ return void 0;
34452
34465
  }, [state]);
34453
34466
  const handleSelectChange = useCallback29(
34454
34467
  async (newValue) => {
@@ -34518,11 +34531,12 @@ function SelectEditor({
34518
34531
  )
34519
34532
  ] });
34520
34533
  return /* @__PURE__ */ jsxs12(
34521
- "div",
34534
+ "fieldset",
34522
34535
  {
34523
34536
  ref: containerRef,
34537
+ "aria-label": label,
34524
34538
  className: cn(
34525
- "inline-flex items-center gap-2",
34539
+ "inline-flex items-center gap-2 border-0 p-0 m-0 min-w-0",
34526
34540
  disabled2 && "opacity-60 cursor-not-allowed",
34527
34541
  className
34528
34542
  ),
@@ -41467,8 +41481,8 @@ var TooltipTrigger3 = forwardRef134(
41467
41481
  index_parts_exports16.Trigger,
41468
41482
  {
41469
41483
  ref,
41470
- className,
41471
- render: asChild ? children : void 0,
41484
+ ...className !== void 0 ? { className } : {},
41485
+ ...asChild ? { render: children } : {},
41472
41486
  children: asChild ? void 0 : children
41473
41487
  }
41474
41488
  )
@@ -42807,7 +42821,7 @@ function createConfigFromComponents(input) {
42807
42821
  const credentialType = match[1];
42808
42822
  const env = match[2];
42809
42823
  const slug = resolvedSlug.trim().toLowerCase();
42810
- const domain = input.domain?.trim() || "sylphx.com";
42824
+ const domain = input.domain?.trim() || "api.sylphx.com";
42811
42825
  const baseUrl = `https://${slug}.${domain}/v1`;
42812
42826
  return freezeConfig({
42813
42827
  credential: trimmedCred,
@@ -43518,6 +43532,11 @@ function injectGlobalStyles() {
43518
43532
  outline: 2px solid var(--sylphx-ring);
43519
43533
  outline-offset: 2px;
43520
43534
  }
43535
+
43536
+ .sylphx-upload-hover:hover .sylphx-upload-hover__overlay,
43537
+ .sylphx-upload-hover:focus-within .sylphx-upload-hover__overlay {
43538
+ opacity: 1 !important;
43539
+ }
43521
43540
  `;
43522
43541
  document.head.appendChild(style);
43523
43542
  stylesInjected = true;
@@ -43738,6 +43757,8 @@ function ToolIcon() {
43738
43757
  fill: "none",
43739
43758
  stroke: "currentColor",
43740
43759
  strokeWidth: "2",
43760
+ "aria-hidden": "true",
43761
+ focusable: "false",
43741
43762
  children: /* @__PURE__ */ jsx42("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" })
43742
43763
  }
43743
43764
  );
@@ -43752,6 +43773,8 @@ function CopyIcon() {
43752
43773
  fill: "none",
43753
43774
  stroke: "currentColor",
43754
43775
  strokeWidth: "2",
43776
+ "aria-hidden": "true",
43777
+ focusable: "false",
43755
43778
  children: [
43756
43779
  /* @__PURE__ */ jsx42("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
43757
43780
  /* @__PURE__ */ jsx42("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
@@ -43760,7 +43783,20 @@ function CopyIcon() {
43760
43783
  );
43761
43784
  }
43762
43785
  function CheckIcon() {
43763
- return /* @__PURE__ */ jsx42("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "#22c55e", strokeWidth: "2", children: /* @__PURE__ */ jsx42("polyline", { points: "20 6 9 17 4 12" }) });
43786
+ return /* @__PURE__ */ jsx42(
43787
+ "svg",
43788
+ {
43789
+ width: "16",
43790
+ height: "16",
43791
+ viewBox: "0 0 24 24",
43792
+ fill: "none",
43793
+ stroke: "#22c55e",
43794
+ strokeWidth: "2",
43795
+ "aria-hidden": "true",
43796
+ focusable: "false",
43797
+ children: /* @__PURE__ */ jsx42("polyline", { points: "20 6 9 17 4 12" })
43798
+ }
43799
+ );
43764
43800
  }
43765
43801
  function BookIcon() {
43766
43802
  return /* @__PURE__ */ jsxs24(
@@ -43772,6 +43808,8 @@ function BookIcon() {
43772
43808
  fill: "none",
43773
43809
  stroke: "currentColor",
43774
43810
  strokeWidth: "2",
43811
+ "aria-hidden": "true",
43812
+ focusable: "false",
43775
43813
  children: [
43776
43814
  /* @__PURE__ */ jsx42("path", { d: "M4 19.5A2.5 2.5 0 0 1 6.5 17H20" }),
43777
43815
  /* @__PURE__ */ jsx42("path", { d: "M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z" })
@@ -43780,11 +43818,24 @@ function BookIcon() {
43780
43818
  );
43781
43819
  }
43782
43820
  function AlertIcon({ color: color2 }) {
43783
- return /* @__PURE__ */ jsxs24("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "2", children: [
43784
- /* @__PURE__ */ jsx42("circle", { cx: "12", cy: "12", r: "10" }),
43785
- /* @__PURE__ */ jsx42("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
43786
- /* @__PURE__ */ jsx42("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
43787
- ] });
43821
+ return /* @__PURE__ */ jsxs24(
43822
+ "svg",
43823
+ {
43824
+ width: "24",
43825
+ height: "24",
43826
+ viewBox: "0 0 24 24",
43827
+ fill: "none",
43828
+ stroke: color2,
43829
+ strokeWidth: "2",
43830
+ "aria-hidden": "true",
43831
+ focusable: "false",
43832
+ children: [
43833
+ /* @__PURE__ */ jsx42("circle", { cx: "12", cy: "12", r: "10" }),
43834
+ /* @__PURE__ */ jsx42("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
43835
+ /* @__PURE__ */ jsx42("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
43836
+ ]
43837
+ }
43838
+ );
43788
43839
  }
43789
43840
  var styles = {
43790
43841
  // Development card styles
@@ -44303,9 +44354,9 @@ function useOrganization() {
44303
44354
  const [isLoading, setIsLoading] = useState50(true);
44304
44355
  const [error2, setError] = useState50(null);
44305
44356
  const channelRef = useRef79(null);
44306
- const config2 = platform3?.ref ? createConfig({
44357
+ const config2 = platform3?.slug ? createConfig({
44307
44358
  secretKey: platform3.appId,
44308
- ref: platform3.ref
44359
+ slug: platform3.slug
44309
44360
  }) : null;
44310
44361
  const getStoredOrgSlug = useCallback41(() => {
44311
44362
  if (typeof window === "undefined") return null;
@@ -45424,6 +45475,8 @@ function CheckIcon3({ size: size4 = 24 }) {
45424
45475
  strokeLinecap: "round",
45425
45476
  strokeLinejoin: "round",
45426
45477
  style: { flexShrink: 0 },
45478
+ "aria-hidden": "true",
45479
+ focusable: "false",
45427
45480
  children: /* @__PURE__ */ jsx45("path", { d: "M20 6 9 17l-5-5" })
45428
45481
  }
45429
45482
  );
@@ -45431,7 +45484,7 @@ function CheckIcon3({ size: size4 = 24 }) {
45431
45484
 
45432
45485
  // src/react/components/forgot-password.tsx
45433
45486
  init_constants();
45434
- import { useCallback as useCallback46, useEffect as useEffect47, useState as useState54 } from "react";
45487
+ import { useCallback as useCallback46, useEffect as useEffect47, useId as useId8, useState as useState54 } from "react";
45435
45488
 
45436
45489
  // src/react/security-utils.ts
45437
45490
  var DANGEROUS_PROTOCOLS = ["javascript:", "data:", "vbscript:", "file:"];
@@ -45630,14 +45683,17 @@ function Modal({
45630
45683
  cursor: "pointer",
45631
45684
  transition: "color 0.15s ease-in-out, background-color 0.15s ease-in-out"
45632
45685
  };
45633
- const modal = /* @__PURE__ */ jsx46("div", { style: backdropStyle, onClick: handleBackdropClick, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ jsxs27(
45686
+ const modal = /* @__PURE__ */ jsx46(
45634
45687
  "div",
45635
45688
  {
45636
- ref: modalRef,
45637
- style: mergeStyles(contentStyle),
45638
- className,
45639
- onClick: (e2) => e2.stopPropagation(),
45640
- children: [
45689
+ style: backdropStyle,
45690
+ onClick: handleBackdropClick,
45691
+ onKeyDown: (e2) => {
45692
+ if (closeOnEscape && e2.key === "Escape") onClose();
45693
+ },
45694
+ role: "dialog",
45695
+ "aria-modal": "true",
45696
+ children: /* @__PURE__ */ jsxs27("div", { ref: modalRef, style: mergeStyles(contentStyle), className, children: [
45641
45697
  /* @__PURE__ */ jsx46(
45642
45698
  "button",
45643
45699
  {
@@ -45657,9 +45713,9 @@ function Modal({
45657
45713
  }
45658
45714
  ),
45659
45715
  children
45660
- ]
45716
+ ] })
45661
45717
  }
45662
- ) });
45718
+ );
45663
45719
  return createPortal3(modal, document.body);
45664
45720
  }
45665
45721
  function CloseIcon() {
@@ -45673,6 +45729,8 @@ function CloseIcon() {
45673
45729
  stroke: "currentColor",
45674
45730
  strokeWidth: "2",
45675
45731
  strokeLinecap: "round",
45732
+ "aria-hidden": "true",
45733
+ focusable: "false",
45676
45734
  children: /* @__PURE__ */ jsx46("path", { d: "M4 4L12 12M12 4L4 12" })
45677
45735
  }
45678
45736
  );
@@ -45713,6 +45771,7 @@ function ForgotPassword({
45713
45771
  const { forgotPassword } = useSafeAuth();
45714
45772
  const { isSignedIn, isLoaded } = useSafeUser();
45715
45773
  const styles2 = baseStyles(theme);
45774
+ const emailId = useId8();
45716
45775
  const [modalOpen, setModalOpen] = useState54(false);
45717
45776
  const [email, setEmail] = useState54("");
45718
45777
  const [error2, setError] = useState54(null);
@@ -45722,12 +45781,6 @@ function ForgotPassword({
45722
45781
  useEffect47(() => {
45723
45782
  injectGlobalStyles();
45724
45783
  }, []);
45725
- if (!isReady) {
45726
- return renderError();
45727
- }
45728
- if (isLoaded && isSignedIn) {
45729
- return null;
45730
- }
45731
45784
  const handleSubmit = useCallback46(
45732
45785
  async (e2) => {
45733
45786
  e2.preventDefault();
@@ -45755,6 +45808,12 @@ function ForgotPassword({
45755
45808
  },
45756
45809
  [email, forgotPassword, afterSubmitUrl, onSuccess, onError]
45757
45810
  );
45811
+ if (!isReady) {
45812
+ return renderError();
45813
+ }
45814
+ if (isLoaded && isSignedIn) {
45815
+ return null;
45816
+ }
45758
45817
  const renderForm = () => {
45759
45818
  if (isSubmitted) {
45760
45819
  return /* @__PURE__ */ jsxs28("div", { style: styles2.textCenter, children: [
@@ -45785,10 +45844,11 @@ function ForgotPassword({
45785
45844
  }
45786
45845
  return /* @__PURE__ */ jsxs28("form", { onSubmit: handleSubmit, children: [
45787
45846
  /* @__PURE__ */ jsxs28("div", { style: styles2.formGroup, children: [
45788
- /* @__PURE__ */ jsx47("label", { style: styles2.label, children: "Email address" }),
45847
+ /* @__PURE__ */ jsx47("label", { htmlFor: emailId, style: styles2.label, children: "Email address" }),
45789
45848
  /* @__PURE__ */ jsx47(
45790
45849
  "input",
45791
45850
  {
45851
+ id: emailId,
45792
45852
  type: "email",
45793
45853
  value: email,
45794
45854
  onChange: (e2) => {
@@ -45885,6 +45945,8 @@ function MailIcon({ color: color2 }) {
45885
45945
  strokeWidth: "2",
45886
45946
  strokeLinecap: "round",
45887
45947
  strokeLinejoin: "round",
45948
+ "aria-hidden": "true",
45949
+ focusable: "false",
45888
45950
  children: [
45889
45951
  /* @__PURE__ */ jsx47("rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }),
45890
45952
  /* @__PURE__ */ jsx47("path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" })
@@ -45895,7 +45957,7 @@ function MailIcon({ color: color2 }) {
45895
45957
 
45896
45958
  // src/react/components/invite-member.tsx
45897
45959
  init_constants();
45898
- import { useCallback as useCallback47, useEffect as useEffect48, useState as useState55 } from "react";
45960
+ import { useCallback as useCallback47, useEffect as useEffect48, useId as useId9, useState as useState55 } from "react";
45899
45961
  import { Fragment as Fragment22, jsx as jsx48, jsxs as jsxs29 } from "react/jsx-runtime";
45900
45962
  var ROLE_OPTIONS = [
45901
45963
  {
@@ -45944,6 +46006,8 @@ function InviteMemberInner({
45944
46006
  }) {
45945
46007
  const { organization, inviteMember, hasPermission: hasPermission2 } = useOrganization();
45946
46008
  const styles2 = baseStyles(theme);
46009
+ const emailId = useId9();
46010
+ const roleGroupId = useId9();
45947
46011
  const [email, setEmail] = useState55("");
45948
46012
  const [role, setRole] = useState55(defaultRole);
45949
46013
  const [isLoading, setIsLoading] = useState55(false);
@@ -46008,10 +46072,11 @@ function InviteMemberInner({
46008
46072
  }
46009
46073
  const formContent = /* @__PURE__ */ jsxs29("form", { onSubmit: handleSubmit, children: [
46010
46074
  /* @__PURE__ */ jsxs29("div", { style: styles2.formGroup, children: [
46011
- /* @__PURE__ */ jsx48("label", { style: styles2.label, children: "Email address" }),
46075
+ /* @__PURE__ */ jsx48("label", { htmlFor: emailId, style: styles2.label, children: "Email address" }),
46012
46076
  /* @__PURE__ */ jsx48(
46013
46077
  "input",
46014
46078
  {
46079
+ id: emailId,
46015
46080
  type: "email",
46016
46081
  value: email,
46017
46082
  onChange: (e2) => {
@@ -46033,10 +46098,12 @@ function InviteMemberInner({
46033
46098
  )
46034
46099
  ] }),
46035
46100
  /* @__PURE__ */ jsxs29("div", { style: styles2.formGroup, children: [
46036
- /* @__PURE__ */ jsx48("label", { style: styles2.label, children: "Role" }),
46101
+ /* @__PURE__ */ jsx48("div", { id: roleGroupId, style: styles2.label, children: "Role" }),
46037
46102
  /* @__PURE__ */ jsx48(
46038
46103
  "div",
46039
46104
  {
46105
+ role: "radiogroup",
46106
+ "aria-labelledby": roleGroupId,
46040
46107
  style: {
46041
46108
  display: "flex",
46042
46109
  flexDirection: "column",
@@ -46157,14 +46224,19 @@ function InviteMemberInner({
46157
46224
  if (asModal) {
46158
46225
  return /* @__PURE__ */ jsxs29(Fragment22, { children: [
46159
46226
  /* @__PURE__ */ jsx48(
46160
- "div",
46227
+ "button",
46161
46228
  {
46229
+ type: "button",
46230
+ "aria-label": "Close dialog",
46162
46231
  style: {
46163
46232
  position: "fixed",
46164
46233
  inset: 0,
46165
46234
  backgroundColor: "rgba(0, 0, 0, 0.5)",
46166
46235
  zIndex: 99,
46167
- animation: "sylphx-fade-in 0.15s ease-out"
46236
+ animation: "sylphx-fade-in 0.15s ease-out",
46237
+ border: "none",
46238
+ padding: 0,
46239
+ cursor: "pointer"
46168
46240
  },
46169
46241
  onClick: onClose
46170
46242
  }
@@ -46240,6 +46312,8 @@ function CheckIcon4({ color: color2, size: size4 = 24 }) {
46240
46312
  strokeLinecap: "round",
46241
46313
  strokeLinejoin: "round",
46242
46314
  style: { flexShrink: 0 },
46315
+ "aria-hidden": "true",
46316
+ focusable: "false",
46243
46317
  children: /* @__PURE__ */ jsx48("path", { d: "M20 6 9 17l-5-5" })
46244
46318
  }
46245
46319
  );
@@ -46257,6 +46331,8 @@ function SendIcon({ size: size4 = 24 }) {
46257
46331
  strokeLinecap: "round",
46258
46332
  strokeLinejoin: "round",
46259
46333
  style: { flexShrink: 0 },
46334
+ "aria-hidden": "true",
46335
+ focusable: "false",
46260
46336
  children: [
46261
46337
  /* @__PURE__ */ jsx48("path", { d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z" }),
46262
46338
  /* @__PURE__ */ jsx48("path", { d: "m21.854 2.147-10.94 10.939" })
@@ -46277,6 +46353,8 @@ function XIcon({ size: size4 = 24 }) {
46277
46353
  strokeLinecap: "round",
46278
46354
  strokeLinejoin: "round",
46279
46355
  style: { flexShrink: 0 },
46356
+ "aria-hidden": "true",
46357
+ focusable: "false",
46280
46358
  children: [
46281
46359
  /* @__PURE__ */ jsx48("path", { d: "M18 6 6 18" }),
46282
46360
  /* @__PURE__ */ jsx48("path", { d: "m6 6 12 12" })
@@ -46515,16 +46593,13 @@ function MembersListInner({
46515
46593
  },
46516
46594
  children: [
46517
46595
  visibleMembers.map((member) => /* @__PURE__ */ jsxs30("div", { style: memberItemStyles, children: [
46518
- member.image ? (
46519
- // biome-ignore lint/performance/noImgElement: SDK package — Next.js Image not available
46520
- /* @__PURE__ */ jsx49(
46521
- "img",
46522
- {
46523
- src: member.image,
46524
- alt: member.name || member.email,
46525
- style: { ...avatarStyles, objectFit: "cover" }
46526
- }
46527
- )
46596
+ member.image ? /* @__PURE__ */ jsx49(
46597
+ "img",
46598
+ {
46599
+ src: member.image,
46600
+ alt: member.name || member.email,
46601
+ style: { ...avatarStyles, objectFit: "cover" }
46602
+ }
46528
46603
  ) : /* @__PURE__ */ jsx49("div", { style: avatarStyles, children: (member.name || member.email).charAt(0).toUpperCase() }),
46529
46604
  /* @__PURE__ */ jsxs30("div", { style: { flex: 1, minWidth: 0 }, children: [
46530
46605
  /* @__PURE__ */ jsxs30(
@@ -47359,12 +47434,27 @@ function ChevronIcon() {
47359
47434
  fill: "none",
47360
47435
  stroke: "currentColor",
47361
47436
  strokeWidth: "2",
47437
+ "aria-hidden": "true",
47438
+ focusable: "false",
47362
47439
  children: /* @__PURE__ */ jsx50("path", { d: "m6 9 6 6 6-6" })
47363
47440
  }
47364
47441
  );
47365
47442
  }
47366
47443
  function CheckIcon5({ color: color2, size: size4 = 24 }) {
47367
- return /* @__PURE__ */ jsx50("svg", { width: size4, height: size4, viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "2", children: /* @__PURE__ */ jsx50("path", { d: "M20 6 9 17l-5-5" }) });
47444
+ return /* @__PURE__ */ jsx50(
47445
+ "svg",
47446
+ {
47447
+ width: size4,
47448
+ height: size4,
47449
+ viewBox: "0 0 24 24",
47450
+ fill: "none",
47451
+ stroke: color2,
47452
+ strokeWidth: "2",
47453
+ "aria-hidden": "true",
47454
+ focusable: "false",
47455
+ children: /* @__PURE__ */ jsx50("path", { d: "M20 6 9 17l-5-5" })
47456
+ }
47457
+ );
47368
47458
  }
47369
47459
  function PlusIcon2() {
47370
47460
  return /* @__PURE__ */ jsx50(
@@ -47376,15 +47466,30 @@ function PlusIcon2() {
47376
47466
  fill: "none",
47377
47467
  stroke: "currentColor",
47378
47468
  strokeWidth: "2",
47469
+ "aria-hidden": "true",
47470
+ focusable: "false",
47379
47471
  children: /* @__PURE__ */ jsx50("path", { d: "M12 5v14M5 12h14" })
47380
47472
  }
47381
47473
  );
47382
47474
  }
47383
47475
  function SettingsIcon2({ color: color2 }) {
47384
- return /* @__PURE__ */ jsxs31("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "2", children: [
47385
- /* @__PURE__ */ jsx50("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }),
47386
- /* @__PURE__ */ jsx50("circle", { cx: "12", cy: "12", r: "3" })
47387
- ] });
47476
+ return /* @__PURE__ */ jsxs31(
47477
+ "svg",
47478
+ {
47479
+ width: "18",
47480
+ height: "18",
47481
+ viewBox: "0 0 24 24",
47482
+ fill: "none",
47483
+ stroke: color2,
47484
+ strokeWidth: "2",
47485
+ "aria-hidden": "true",
47486
+ focusable: "false",
47487
+ children: [
47488
+ /* @__PURE__ */ jsx50("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }),
47489
+ /* @__PURE__ */ jsx50("circle", { cx: "12", cy: "12", r: "3" })
47490
+ ]
47491
+ }
47492
+ );
47388
47493
  }
47389
47494
 
47390
47495
  // src/react/components/pricing-table.tsx
@@ -47406,7 +47511,9 @@ function PricingTableInner({
47406
47511
  }) {
47407
47512
  const { plans, plansLoading, plansError, subscription, isPremium, createCheckout, refresh } = useBilling();
47408
47513
  const styles2 = baseStyles(theme);
47409
- const [interval, setInterval2] = useState58(defaultInterval);
47514
+ const [interval, setSelectedInterval] = useState58(
47515
+ defaultInterval
47516
+ );
47410
47517
  const [loadingPlan, setLoadingPlan] = useState58(null);
47411
47518
  useEffect51(() => {
47412
47519
  injectGlobalStyles();
@@ -47555,7 +47662,7 @@ function PricingTableInner({
47555
47662
  "button",
47556
47663
  {
47557
47664
  type: "button",
47558
- onClick: () => setInterval2("monthly"),
47665
+ onClick: () => setSelectedInterval("monthly"),
47559
47666
  style: mergeStyles(styles2.tab, interval === "monthly" ? styles2.tabActive : {}),
47560
47667
  children: "Monthly"
47561
47668
  }
@@ -47564,7 +47671,7 @@ function PricingTableInner({
47564
47671
  "button",
47565
47672
  {
47566
47673
  type: "button",
47567
- onClick: () => setInterval2("annual"),
47674
+ onClick: () => setSelectedInterval("annual"),
47568
47675
  style: mergeStyles(styles2.tab, interval === "annual" ? styles2.tabActive : {}),
47569
47676
  children: [
47570
47677
  "Annual",
@@ -47804,7 +47911,7 @@ function RefreshIcon({ color: color2, size: size4 = 24 }) {
47804
47911
 
47805
47912
  // src/react/components/reset-password.tsx
47806
47913
  init_constants();
47807
- import { useCallback as useCallback51, useEffect as useEffect52, useState as useState59 } from "react";
47914
+ import { useCallback as useCallback51, useEffect as useEffect52, useId as useId10, useState as useState59 } from "react";
47808
47915
  import { Fragment as Fragment26, jsx as jsx52, jsxs as jsxs33 } from "react/jsx-runtime";
47809
47916
  function ResetPassword({
47810
47917
  token,
@@ -47824,6 +47931,8 @@ function ResetPassword({
47824
47931
  const { resetPassword } = useSafeAuth();
47825
47932
  const { isSignedIn, isLoaded } = useSafeUser();
47826
47933
  const styles2 = baseStyles(theme);
47934
+ const passwordId = useId10();
47935
+ const confirmPasswordId = useId10();
47827
47936
  const [password, setPassword] = useState59("");
47828
47937
  const [confirmPassword, setConfirmPassword] = useState59("");
47829
47938
  const [error2, setError] = useState59(null);
@@ -47833,31 +47942,6 @@ function ResetPassword({
47833
47942
  useEffect52(() => {
47834
47943
  injectGlobalStyles();
47835
47944
  }, []);
47836
- if (!isReady) {
47837
- return renderError();
47838
- }
47839
- if (isLoaded && isSignedIn) {
47840
- if (typeof window !== "undefined") {
47841
- safeRedirect(afterResetUrl, { fallback: "/sign-in" });
47842
- }
47843
- return null;
47844
- }
47845
- if (!token) {
47846
- return /* @__PURE__ */ jsx52("div", { style: showCard ? styles2.card : {}, children: /* @__PURE__ */ jsxs33("div", { style: styles2.container, children: [
47847
- /* @__PURE__ */ jsxs33("div", { style: mergeStyles(styles2.cardHeader, styles2.textCenter), children: [
47848
- /* @__PURE__ */ jsx52("h2", { style: styles2.cardTitle, children: "Invalid reset link" }),
47849
- /* @__PURE__ */ jsx52("p", { style: styles2.cardDescription, children: "This password reset link is invalid or has expired." })
47850
- ] }),
47851
- /* @__PURE__ */ jsx52("div", { style: styles2.cardContent, children: /* @__PURE__ */ jsx52(
47852
- "a",
47853
- {
47854
- href: signInUrl,
47855
- style: mergeStyles(styles2.button, styles2.buttonPrimary, styles2.buttonFullWidth),
47856
- children: "Back to sign in"
47857
- }
47858
- ) })
47859
- ] }) });
47860
- }
47861
47945
  const handleSubmit = useCallback51(
47862
47946
  async (e2) => {
47863
47947
  e2.preventDefault();
@@ -47870,6 +47954,10 @@ function ResetPassword({
47870
47954
  setError("Password must be at least 12 characters");
47871
47955
  return;
47872
47956
  }
47957
+ if (!token) {
47958
+ setError("Missing reset token");
47959
+ return;
47960
+ }
47873
47961
  setIsLoading(true);
47874
47962
  try {
47875
47963
  if (!resetPassword) {
@@ -47893,6 +47981,31 @@ function ResetPassword({
47893
47981
  },
47894
47982
  [token, password, confirmPassword, resetPassword, afterResetUrl, onSuccess, onError]
47895
47983
  );
47984
+ if (!isReady) {
47985
+ return renderError();
47986
+ }
47987
+ if (isLoaded && isSignedIn) {
47988
+ if (typeof window !== "undefined") {
47989
+ safeRedirect(afterResetUrl, { fallback: "/sign-in" });
47990
+ }
47991
+ return null;
47992
+ }
47993
+ if (!token) {
47994
+ return /* @__PURE__ */ jsx52("div", { style: showCard ? styles2.card : {}, children: /* @__PURE__ */ jsxs33("div", { style: styles2.container, children: [
47995
+ /* @__PURE__ */ jsxs33("div", { style: mergeStyles(styles2.cardHeader, styles2.textCenter), children: [
47996
+ /* @__PURE__ */ jsx52("h2", { style: styles2.cardTitle, children: "Invalid reset link" }),
47997
+ /* @__PURE__ */ jsx52("p", { style: styles2.cardDescription, children: "This password reset link is invalid or has expired." })
47998
+ ] }),
47999
+ /* @__PURE__ */ jsx52("div", { style: styles2.cardContent, children: /* @__PURE__ */ jsx52(
48000
+ "a",
48001
+ {
48002
+ href: signInUrl,
48003
+ style: mergeStyles(styles2.button, styles2.buttonPrimary, styles2.buttonFullWidth),
48004
+ children: "Back to sign in"
48005
+ }
48006
+ ) })
48007
+ ] }) });
48008
+ }
47896
48009
  const renderForm = () => {
47897
48010
  if (isSuccess) {
47898
48011
  return /* @__PURE__ */ jsxs33("div", { style: styles2.textCenter, children: [
@@ -47915,10 +48028,11 @@ function ResetPassword({
47915
48028
  }
47916
48029
  return /* @__PURE__ */ jsxs33("form", { onSubmit: handleSubmit, children: [
47917
48030
  /* @__PURE__ */ jsxs33("div", { style: styles2.formGroup, children: [
47918
- /* @__PURE__ */ jsx52("label", { style: styles2.label, children: "New password" }),
48031
+ /* @__PURE__ */ jsx52("label", { htmlFor: passwordId, style: styles2.label, children: "New password" }),
47919
48032
  /* @__PURE__ */ jsx52(
47920
48033
  "input",
47921
48034
  {
48035
+ id: passwordId,
47922
48036
  type: "password",
47923
48037
  value: password,
47924
48038
  onChange: (e2) => {
@@ -47942,10 +48056,11 @@ function ResetPassword({
47942
48056
  /* @__PURE__ */ jsx52("p", { style: mergeStyles(styles2.textXs, styles2.textMuted, styles2.mt1), children: "Must be at least 12 characters" })
47943
48057
  ] }),
47944
48058
  /* @__PURE__ */ jsxs33("div", { style: styles2.formGroup, children: [
47945
- /* @__PURE__ */ jsx52("label", { style: styles2.label, children: "Confirm password" }),
48059
+ /* @__PURE__ */ jsx52("label", { htmlFor: confirmPasswordId, style: styles2.label, children: "Confirm password" }),
47946
48060
  /* @__PURE__ */ jsx52(
47947
48061
  "input",
47948
48062
  {
48063
+ id: confirmPasswordId,
47949
48064
  type: "password",
47950
48065
  value: confirmPassword,
47951
48066
  onChange: (e2) => {
@@ -48011,6 +48126,8 @@ function CheckIcon7({ color: color2 }) {
48011
48126
  strokeWidth: "2",
48012
48127
  strokeLinecap: "round",
48013
48128
  strokeLinejoin: "round",
48129
+ "aria-hidden": "true",
48130
+ focusable: "false",
48014
48131
  children: /* @__PURE__ */ jsx52("path", { d: "M20 6 9 17l-5-5" })
48015
48132
  }
48016
48133
  );
@@ -48458,13 +48575,11 @@ function SignInFormInner({
48458
48575
  isLoading,
48459
48576
  loadingProvider,
48460
48577
  error: error2,
48461
- pendingTwoFactor,
48462
48578
  handlePasswordSubmit,
48463
48579
  handleOAuthSignIn,
48464
48580
  handleMagicLinkRequest,
48465
48581
  handleOtpRequest,
48466
- handleOtpVerify,
48467
- handleTwoFactorVerify
48582
+ handleOtpVerify
48468
48583
  } = useSignInForm({
48469
48584
  methods,
48470
48585
  providers,
@@ -50698,47 +50813,59 @@ function useConsentCheck(options) {
50698
50813
  }
50699
50814
  var noopAsync2 = async () => {
50700
50815
  };
50816
+ var NOOP_CONSENT_CTX = {
50817
+ anonymousId: null,
50818
+ userId: null,
50819
+ getConsentTypes: async () => [],
50820
+ getUserConsents: async () => [],
50821
+ setConsents: async () => ({ success: true, consents: [] }),
50822
+ acceptAll: async () => ({ success: true, consents: [] }),
50823
+ declineOptional: async () => ({ success: true, consents: [] }),
50824
+ checkConsent: async () => false,
50825
+ getHistory: async () => ({ entries: [], nextCursor: null, hasMore: false }),
50826
+ initialConsentTypes: []
50827
+ };
50828
+ var SAFE_CONSENT_DEFAULTS = {
50829
+ types: [],
50830
+ consents: {},
50831
+ isLoading: false,
50832
+ error: null,
50833
+ showBanner: false,
50834
+ hasConsented: false,
50835
+ hasConsent: () => false,
50836
+ setConsent: () => {
50837
+ },
50838
+ setConsents: () => {
50839
+ },
50840
+ acceptAll: noopAsync2,
50841
+ declineOptional: noopAsync2,
50842
+ saveConsents: noopAsync2,
50843
+ openPreferences: () => {
50844
+ },
50845
+ closeBanner: () => {
50846
+ },
50847
+ grantConsent: noopAsync2,
50848
+ revokeConsent: noopAsync2,
50849
+ isConfigured: false
50850
+ };
50701
50851
  function useSafeConsent() {
50702
50852
  const ctx = useContext71(ConsentContext);
50703
- if (!ctx) {
50704
- return {
50705
- types: [],
50706
- consents: {},
50707
- isLoading: false,
50708
- error: null,
50709
- showBanner: false,
50710
- hasConsented: false,
50711
- hasConsent: () => false,
50712
- setConsent: () => {
50713
- },
50714
- setConsents: () => {
50715
- },
50716
- acceptAll: noopAsync2,
50717
- declineOptional: noopAsync2,
50718
- saveConsents: noopAsync2,
50719
- openPreferences: () => {
50720
- },
50721
- closeBanner: () => {
50722
- },
50723
- grantConsent: noopAsync2,
50724
- revokeConsent: noopAsync2,
50725
- isConfigured: false
50726
- };
50727
- }
50853
+ const effectiveCtx = ctx ?? NOOP_CONSENT_CTX;
50728
50854
  const queryClient = useQueryClient3();
50729
50855
  const [localConsents, setLocalConsentsState] = useState67({});
50730
50856
  const [showBanner, setShowBanner] = useState67(false);
50731
50857
  const [initialized2, setInitialized] = useState67(false);
50732
50858
  const typesQuery = useQuery2({
50733
- queryKey: ["sylphx", "consent", "types"],
50734
- queryFn: () => ctx.getConsentTypes(),
50859
+ queryKey: ["sylphx", "consent", "types", ctx ? "live" : "noop"],
50860
+ queryFn: () => effectiveCtx.getConsentTypes(),
50735
50861
  staleTime: STALE_TIME_STABLE_MS,
50736
- initialData: ctx.initialConsentTypes
50862
+ initialData: effectiveCtx.initialConsentTypes,
50863
+ enabled: !!ctx
50737
50864
  });
50738
50865
  const userConsentsQuery = useQuery2({
50739
- queryKey: ["sylphx", "consent", "user"],
50866
+ queryKey: ["sylphx", "consent", "user", ctx ? "live" : "noop"],
50740
50867
  queryFn: async () => {
50741
- const consentsResponse = await ctx.getUserConsents();
50868
+ const consentsResponse = await effectiveCtx.getUserConsents();
50742
50869
  const consentsMap = {};
50743
50870
  let hasExplicitChoice = false;
50744
50871
  for (const consent of consentsResponse) {
@@ -50751,9 +50878,11 @@ function useSafeConsent() {
50751
50878
  },
50752
50879
  staleTime: STALE_TIME_STABLE_MS,
50753
50880
  // Return empty object for unauthenticated users (explicit retry: false)
50754
- retry: false
50881
+ retry: false,
50882
+ enabled: !!ctx
50755
50883
  });
50756
50884
  useEffect58(() => {
50885
+ if (!ctx) return;
50757
50886
  if (!typesQuery.isLoading && !userConsentsQuery.isLoading && !initialized2) {
50758
50887
  const data = userConsentsQuery.data;
50759
50888
  const serverConsents = data?.consents ?? {};
@@ -50762,10 +50891,10 @@ function useSafeConsent() {
50762
50891
  setShowBanner(!hasExplicitChoice);
50763
50892
  setInitialized(true);
50764
50893
  }
50765
- }, [typesQuery.isLoading, userConsentsQuery.isLoading, userConsentsQuery.data, initialized2]);
50894
+ }, [ctx, typesQuery.isLoading, userConsentsQuery.isLoading, userConsentsQuery.data, initialized2]);
50766
50895
  const saveConsentsMutation = useMutation({
50767
50896
  mutationFn: async (consentList) => {
50768
- await ctx.setConsents(consentList);
50897
+ await effectiveCtx.setConsents(consentList);
50769
50898
  return consentList;
50770
50899
  },
50771
50900
  onSuccess: (consentList) => {
@@ -50773,7 +50902,7 @@ function useSafeConsent() {
50773
50902
  for (const consent of consentList) {
50774
50903
  consentsMap[consent.slug] = consent.granted;
50775
50904
  }
50776
- queryClient.setQueryData(["sylphx", "consent", "user"], {
50905
+ queryClient.setQueryData(["sylphx", "consent", "user", "live"], {
50777
50906
  consents: consentsMap,
50778
50907
  hasExplicitChoice: true
50779
50908
  });
@@ -50783,7 +50912,7 @@ function useSafeConsent() {
50783
50912
  });
50784
50913
  const acceptAllMutation = useMutation({
50785
50914
  mutationFn: async () => {
50786
- await ctx.acceptAll();
50915
+ await effectiveCtx.acceptAll();
50787
50916
  },
50788
50917
  onSuccess: () => {
50789
50918
  const types2 = typesQuery.data ?? [];
@@ -50791,7 +50920,7 @@ function useSafeConsent() {
50791
50920
  for (const type of types2) {
50792
50921
  allConsents[type.slug] = true;
50793
50922
  }
50794
- queryClient.setQueryData(["sylphx", "consent", "user"], {
50923
+ queryClient.setQueryData(["sylphx", "consent", "user", "live"], {
50795
50924
  consents: allConsents,
50796
50925
  hasExplicitChoice: true
50797
50926
  });
@@ -50801,7 +50930,7 @@ function useSafeConsent() {
50801
50930
  });
50802
50931
  const declineOptionalMutation = useMutation({
50803
50932
  mutationFn: async () => {
50804
- await ctx.declineOptional();
50933
+ await effectiveCtx.declineOptional();
50805
50934
  },
50806
50935
  onSuccess: () => {
50807
50936
  const types2 = typesQuery.data ?? [];
@@ -50809,7 +50938,7 @@ function useSafeConsent() {
50809
50938
  for (const type of types2) {
50810
50939
  requiredConsents[type.slug] = type.required;
50811
50940
  }
50812
- queryClient.setQueryData(["sylphx", "consent", "user"], {
50941
+ queryClient.setQueryData(["sylphx", "consent", "user", "live"], {
50813
50942
  consents: requiredConsents,
50814
50943
  hasExplicitChoice: true
50815
50944
  });
@@ -50891,6 +51020,7 @@ function useSafeConsent() {
50891
51020
  },
50892
51021
  [types, consents, saveConsentsMutation]
50893
51022
  );
51023
+ if (!ctx) return SAFE_CONSENT_DEFAULTS;
50894
51024
  return {
50895
51025
  types,
50896
51026
  consents,
@@ -50919,6 +51049,7 @@ import {
50919
51049
  useCallback as useCallback56,
50920
51050
  useContext as useContext72,
50921
51051
  useEffect as useEffect59,
51052
+ useMemo as useMemo123,
50922
51053
  useRef as useRef84,
50923
51054
  useState as useState68
50924
51055
  } from "react";
@@ -51083,12 +51214,15 @@ function ConsentScript({
51083
51214
  });
51084
51215
  const scriptIdRef = useRef84(providedId ?? generateScriptId(src));
51085
51216
  const loadedRef = useRef84(false);
51086
- const attributes = {
51087
- async: asyncAttr,
51088
- defer,
51089
- nonce,
51090
- ...dataAttributes
51091
- };
51217
+ const attributes = useMemo123(
51218
+ () => ({
51219
+ async: asyncAttr,
51220
+ defer,
51221
+ nonce,
51222
+ ...dataAttributes
51223
+ }),
51224
+ [asyncAttr, defer, nonce, dataAttributes]
51225
+ );
51092
51226
  useEffect59(() => {
51093
51227
  if (loadedRef.current) return;
51094
51228
  if (isLoading) return;
@@ -51201,13 +51335,14 @@ function FacebookPixel({ pixelId, onLoad, autoPageView = true }) {
51201
51335
  const loadedRef = useRef84(false);
51202
51336
  useEffect59(() => {
51203
51337
  if (loadedRef.current || isLoading || !hasConsent) return;
51204
- const n2 = window.fbq = ((...args) => {
51338
+ const n2 = ((...args) => {
51205
51339
  if (n2.callMethod) {
51206
51340
  n2.callMethod.apply(n2, args);
51207
51341
  } else {
51208
51342
  n2.queue.push(args);
51209
51343
  }
51210
51344
  });
51345
+ window.fbq = n2;
51211
51346
  if (!window._fbq) window._fbq = n2;
51212
51347
  n2.push = n2;
51213
51348
  n2.loaded = true;
@@ -51234,8 +51369,8 @@ function Hotjar({ siteId, version: version2 = 6, onLoad }) {
51234
51369
  useEffect59(() => {
51235
51370
  if (loadedRef.current || isLoading || !hasConsent) return;
51236
51371
  window.hj = window.hj || ((...args) => {
51237
- ;
51238
- (window.hj.q = window.hj.q || []).push(args);
51372
+ window.hj.q = window.hj.q || [];
51373
+ window.hj.q.push(args);
51239
51374
  });
51240
51375
  window._hjSettings = { hjid: siteId, hjsv: version2 };
51241
51376
  const script3 = document.createElement("script");
@@ -51484,7 +51619,7 @@ function useEmail() {
51484
51619
  // src/react/engagement-hooks.ts
51485
51620
  init_constants();
51486
51621
  import { useQuery as useQuery3 } from "@tanstack/react-query";
51487
- import { useCallback as useCallback58, useContext as useContext73, useMemo as useMemo123, useState as useState70 } from "react";
51622
+ import { useCallback as useCallback58, useContext as useContext73, useMemo as useMemo124, useState as useState70 } from "react";
51488
51623
  function useEngagementContext() {
51489
51624
  const context = useContext73(PlatformContext);
51490
51625
  if (!context) {
@@ -51593,8 +51728,8 @@ function useAchievements() {
51593
51728
  // 5 min - achievements don't change often
51594
51729
  });
51595
51730
  const achievements = achievementsQuery.data ?? [];
51596
- const unlocked = useMemo123(() => achievements.filter((a2) => a2.unlocked), [achievements]);
51597
- const locked = useMemo123(() => achievements.filter((a2) => !a2.unlocked), [achievements]);
51731
+ const unlocked = useMemo124(() => achievements.filter((a2) => a2.unlocked), [achievements]);
51732
+ const locked = useMemo124(() => achievements.filter((a2) => !a2.unlocked), [achievements]);
51598
51733
  const getAchievement = useCallback58(
51599
51734
  (id3) => {
51600
51735
  return achievements.find((a2) => a2.achievementId === id3) ?? null;
@@ -51700,32 +51835,19 @@ var stubUnlockAchievement = async () => ({
51700
51835
  var stubIncrementProgress = async () => defaultUserAchievement;
51701
51836
  function useSafeStreak(streakId, options) {
51702
51837
  const ctx = useEngagementContextSafe();
51703
- if (!ctx) {
51704
- return {
51705
- state: null,
51706
- isLoading: false,
51707
- error: null,
51708
- current: 0,
51709
- longest: 0,
51710
- canRecover: false,
51711
- timeRemainingMs: null,
51712
- userTimezone: null,
51713
- recordActivity: stubRecordActivity,
51714
- recover: stubRecover,
51715
- refresh: noopAsyncVoid,
51716
- isConfigured: false
51717
- };
51718
- }
51719
51838
  const { defaults, userTimezone } = options ?? {};
51720
51839
  const streakQuery = useQuery3({
51721
- queryKey: ["sylphx", ctx.appId, "streak", streakId, userTimezone],
51722
- queryFn: () => ctx.getStreak(streakId, defaults, userTimezone),
51723
- enabled: !!ctx.user,
51840
+ queryKey: ["sylphx", ctx?.appId ?? "__noop__", "streak", streakId, userTimezone],
51841
+ queryFn: () => {
51842
+ if (!ctx) throw new Error("useSafeStreak called without provider");
51843
+ return ctx.getStreak(streakId, defaults, userTimezone);
51844
+ },
51845
+ enabled: !!ctx && !!ctx.user,
51724
51846
  staleTime: STALE_TIME_FREQUENT_MS
51725
51847
  });
51726
- const state = streakQuery.data ?? null;
51727
51848
  const recordActivity = useCallback58(
51728
51849
  async (metadata) => {
51850
+ if (!ctx) return stubRecordActivity();
51729
51851
  const result = await ctx.recordStreakActivity(streakId, metadata, defaults, userTimezone);
51730
51852
  ctx.queryClient.setQueryData(
51731
51853
  ["sylphx", ctx.appId, "streak", streakId, userTimezone],
@@ -51736,6 +51858,7 @@ function useSafeStreak(streakId, options) {
51736
51858
  [ctx, streakId, defaults, userTimezone]
51737
51859
  );
51738
51860
  const recover = useCallback58(async () => {
51861
+ if (!ctx) return stubRecover();
51739
51862
  const result = await ctx.recoverStreak(streakId, userTimezone);
51740
51863
  if (result.success) {
51741
51864
  ctx.queryClient.setQueryData(
@@ -51746,10 +51869,28 @@ function useSafeStreak(streakId, options) {
51746
51869
  return result;
51747
51870
  }, [ctx, streakId, userTimezone]);
51748
51871
  const refresh = useCallback58(async () => {
51872
+ if (!ctx) return;
51749
51873
  await ctx.queryClient.invalidateQueries({
51750
51874
  queryKey: ["sylphx", ctx.appId, "streak", streakId]
51751
51875
  });
51752
51876
  }, [ctx, streakId]);
51877
+ if (!ctx) {
51878
+ return {
51879
+ state: null,
51880
+ isLoading: false,
51881
+ error: null,
51882
+ current: 0,
51883
+ longest: 0,
51884
+ canRecover: false,
51885
+ timeRemainingMs: null,
51886
+ userTimezone: null,
51887
+ recordActivity: stubRecordActivity,
51888
+ recover: stubRecover,
51889
+ refresh: noopAsyncVoid,
51890
+ isConfigured: false
51891
+ };
51892
+ }
51893
+ const state = streakQuery.data ?? null;
51753
51894
  return {
51754
51895
  state,
51755
51896
  isLoading: streakQuery.isLoading,
@@ -51767,28 +51908,19 @@ function useSafeStreak(streakId, options) {
51767
51908
  }
51768
51909
  function useSafeLeaderboard(leaderboardId, options, defaults) {
51769
51910
  const ctx = useEngagementContextSafe();
51770
- if (!ctx) {
51771
- return {
51772
- data: null,
51773
- isLoading: false,
51774
- error: null,
51775
- entries: [],
51776
- currentUserEntry: null,
51777
- totalParticipants: 0,
51778
- submitScore: stubSubmitScore,
51779
- refresh: noopAsyncVoid,
51780
- isConfigured: false
51781
- };
51782
- }
51783
51911
  const optionsKey = JSON.stringify(options ?? {});
51784
51912
  const leaderboardQuery = useQuery3({
51785
- queryKey: ["sylphx", ctx.appId, "leaderboard", leaderboardId, optionsKey],
51786
- queryFn: () => ctx.getLeaderboard(leaderboardId, options),
51913
+ queryKey: ["sylphx", ctx?.appId ?? "__noop__", "leaderboard", leaderboardId, optionsKey],
51914
+ queryFn: () => {
51915
+ if (!ctx) throw new Error("useSafeLeaderboard called without provider");
51916
+ return ctx.getLeaderboard(leaderboardId, options);
51917
+ },
51918
+ enabled: !!ctx,
51787
51919
  staleTime: STALE_TIME_MODERATE_MS
51788
51920
  });
51789
- const data = leaderboardQuery.data ?? null;
51790
51921
  const submitScore = useCallback58(
51791
51922
  async (value, metadata) => {
51923
+ if (!ctx) return stubSubmitScore();
51792
51924
  const result = await ctx.submitScore(leaderboardId, value, metadata, defaults);
51793
51925
  void ctx.queryClient.invalidateQueries({
51794
51926
  queryKey: ["sylphx", ctx.appId, "leaderboard", leaderboardId]
@@ -51798,10 +51930,25 @@ function useSafeLeaderboard(leaderboardId, options, defaults) {
51798
51930
  [ctx, leaderboardId, defaults]
51799
51931
  );
51800
51932
  const refresh = useCallback58(async () => {
51933
+ if (!ctx) return;
51801
51934
  await ctx.queryClient.invalidateQueries({
51802
51935
  queryKey: ["sylphx", ctx.appId, "leaderboard", leaderboardId]
51803
51936
  });
51804
51937
  }, [ctx, leaderboardId]);
51938
+ if (!ctx) {
51939
+ return {
51940
+ data: null,
51941
+ isLoading: false,
51942
+ error: null,
51943
+ entries: [],
51944
+ currentUserEntry: null,
51945
+ totalParticipants: 0,
51946
+ submitScore: stubSubmitScore,
51947
+ refresh: noopAsyncVoid,
51948
+ isConfigured: false
51949
+ };
51950
+ }
51951
+ const data = leaderboardQuery.data ?? null;
51805
51952
  return {
51806
51953
  data,
51807
51954
  isLoading: leaderboardQuery.isLoading,
@@ -51817,32 +51964,18 @@ function useSafeLeaderboard(leaderboardId, options, defaults) {
51817
51964
  function useSafeAchievements() {
51818
51965
  const ctx = useEngagementContextSafe();
51819
51966
  const [recentUnlock, setRecentUnlock] = useState70(null);
51820
- if (!ctx) {
51821
- return {
51822
- achievements: [],
51823
- isLoading: false,
51824
- error: null,
51825
- unlocked: [],
51826
- locked: [],
51827
- getAchievement: () => null,
51828
- unlock: stubUnlockAchievement,
51829
- incrementProgress: stubIncrementProgress,
51830
- refresh: noopAsyncVoid,
51831
- recentUnlock: null,
51832
- dismissRecentUnlock: () => {
51833
- },
51834
- isConfigured: false
51835
- };
51836
- }
51837
51967
  const achievementsQuery = useQuery3({
51838
- queryKey: ["sylphx", ctx.appId, "achievements"],
51839
- queryFn: () => ctx.getAchievements(),
51840
- enabled: !!ctx.user,
51968
+ queryKey: ["sylphx", ctx?.appId ?? "__noop__", "achievements"],
51969
+ queryFn: () => {
51970
+ if (!ctx) throw new Error("useSafeAchievements called without provider");
51971
+ return ctx.getAchievements();
51972
+ },
51973
+ enabled: !!ctx && !!ctx.user,
51841
51974
  staleTime: STALE_TIME_STABLE_MS
51842
51975
  });
51843
51976
  const achievements = achievementsQuery.data ?? [];
51844
- const unlocked = useMemo123(() => achievements.filter((a2) => a2.unlocked), [achievements]);
51845
- const locked = useMemo123(() => achievements.filter((a2) => !a2.unlocked), [achievements]);
51977
+ const unlocked = useMemo124(() => achievements.filter((a2) => a2.unlocked), [achievements]);
51978
+ const locked = useMemo124(() => achievements.filter((a2) => !a2.unlocked), [achievements]);
51846
51979
  const getAchievement = useCallback58(
51847
51980
  (id3) => {
51848
51981
  return achievements.find((a2) => a2.achievementId === id3) ?? null;
@@ -51851,6 +51984,7 @@ function useSafeAchievements() {
51851
51984
  );
51852
51985
  const unlock = useCallback58(
51853
51986
  async (achievementId, defaults) => {
51987
+ if (!ctx) return stubUnlockAchievement();
51854
51988
  const result = await ctx.unlockAchievement(achievementId, defaults);
51855
51989
  if (result.isNew) {
51856
51990
  setRecentUnlock(result);
@@ -51864,6 +51998,7 @@ function useSafeAchievements() {
51864
51998
  );
51865
51999
  const incrementProgress = useCallback58(
51866
52000
  async (achievementId, amount, defaults) => {
52001
+ if (!ctx) return stubIncrementProgress();
51867
52002
  const result = await ctx.incrementAchievementProgress(achievementId, amount, defaults);
51868
52003
  void ctx.queryClient.invalidateQueries({
51869
52004
  queryKey: ["sylphx", ctx.appId, "achievements"]
@@ -51873,6 +52008,7 @@ function useSafeAchievements() {
51873
52008
  [ctx]
51874
52009
  );
51875
52010
  const refresh = useCallback58(async () => {
52011
+ if (!ctx) return;
51876
52012
  await ctx.queryClient.invalidateQueries({
51877
52013
  queryKey: ["sylphx", ctx.appId, "achievements"]
51878
52014
  });
@@ -51880,6 +52016,23 @@ function useSafeAchievements() {
51880
52016
  const dismissRecentUnlock = useCallback58(() => {
51881
52017
  setRecentUnlock(null);
51882
52018
  }, []);
52019
+ if (!ctx) {
52020
+ return {
52021
+ achievements: [],
52022
+ isLoading: false,
52023
+ error: null,
52024
+ unlocked: [],
52025
+ locked: [],
52026
+ getAchievement: () => null,
52027
+ unlock: stubUnlockAchievement,
52028
+ incrementProgress: stubIncrementProgress,
52029
+ refresh: noopAsyncVoid,
52030
+ recentUnlock: null,
52031
+ dismissRecentUnlock: () => {
52032
+ },
52033
+ isConfigured: false
52034
+ };
52035
+ }
51883
52036
  return {
51884
52037
  achievements,
51885
52038
  isLoading: achievementsQuery.isLoading,
@@ -51904,7 +52057,7 @@ import {
51904
52057
  useCallback as useCallback59,
51905
52058
  useContext as useContext74,
51906
52059
  useEffect as useEffect60,
51907
- useMemo as useMemo124,
52060
+ useMemo as useMemo125,
51908
52061
  useState as useState71
51909
52062
  } from "react";
51910
52063
  import { jsx as jsx62 } from "react/jsx-runtime";
@@ -51972,10 +52125,12 @@ function FeatureFlagProvider({
51972
52125
  refetchInterval: refreshInterval > 0 ? refreshInterval : void 0,
51973
52126
  enabled: cachedInitialFlags.length === 0 || refreshInterval > 0
51974
52127
  });
51975
- const flags = useMemo124(() => {
52128
+ const flags = useMemo125(() => {
51976
52129
  const map = /* @__PURE__ */ new Map();
51977
52130
  const flagList = flagsQuery.data ?? cachedInitialFlags;
51978
- flagList.forEach((flag) => map.set(flag.key, flag));
52131
+ flagList.forEach((flag) => {
52132
+ map.set(flag.key, flag);
52133
+ });
51979
52134
  return map;
51980
52135
  }, [flagsQuery.data, cachedInitialFlags]);
51981
52136
  const getFlag = useCallback59(
@@ -52167,7 +52322,7 @@ function useForgotPasswordForm(options = {}) {
52167
52322
 
52168
52323
  // src/react/hooks/use-reset-password-form.ts
52169
52324
  init_constants();
52170
- import { useCallback as useCallback61, useContext as useContext76, useMemo as useMemo125, useState as useState73 } from "react";
52325
+ import { useCallback as useCallback61, useContext as useContext76, useMemo as useMemo126, useState as useState73 } from "react";
52171
52326
  function useResetPasswordForm(options) {
52172
52327
  const {
52173
52328
  token,
@@ -52187,15 +52342,15 @@ function useResetPasswordForm(options) {
52187
52342
  const [isLoading, setIsLoading] = useState73(false);
52188
52343
  const [error2, setError] = useState73(null);
52189
52344
  const [success, setSuccess] = useState73(false);
52190
- const passwordValid = useMemo125(
52345
+ const passwordValid = useMemo126(
52191
52346
  () => form.password.length >= minPasswordLength,
52192
52347
  [form.password, minPasswordLength]
52193
52348
  );
52194
- const passwordsMatch = useMemo125(
52349
+ const passwordsMatch = useMemo126(
52195
52350
  () => form.password === form.confirmPassword && form.confirmPassword.length > 0,
52196
52351
  [form.password, form.confirmPassword]
52197
52352
  );
52198
- const isValid = useMemo125(() => passwordValid && passwordsMatch, [passwordValid, passwordsMatch]);
52353
+ const isValid = useMemo126(() => passwordValid && passwordsMatch, [passwordValid, passwordsMatch]);
52199
52354
  const setPassword = useCallback61((password) => {
52200
52355
  setForm((prev) => ({ ...prev, password }));
52201
52356
  setError(null);
@@ -52295,7 +52450,7 @@ function useResetPasswordForm(options) {
52295
52450
 
52296
52451
  // src/react/hooks/use-task-run.ts
52297
52452
  init_constants();
52298
- import { useCallback as useCallback62, useContext as useContext77, useEffect as useEffect61, useMemo as useMemo126, useRef as useRef85, useState as useState74 } from "react";
52453
+ import { useCallback as useCallback62, useContext as useContext77, useEffect as useEffect61, useMemo as useMemo127, useRef as useRef85, useState as useState74 } from "react";
52299
52454
  var TERMINAL_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
52300
52455
  var ACTIVE_STATUSES = /* @__PURE__ */ new Set(["pending", "running", "waiting"]);
52301
52456
  var HTTP_CODE_MAP = {
@@ -52326,7 +52481,7 @@ function useTaskRun(runId, options) {
52326
52481
  const mountedRef = useRef85(true);
52327
52482
  const callbacksFiredRef = useRef85({ complete: false, failed: false });
52328
52483
  const pollingRef = useRef85(true);
52329
- const headers = useMemo126(
52484
+ const headers = useMemo127(
52330
52485
  () => ({
52331
52486
  "Content-Type": "application/json",
52332
52487
  "x-app-secret": appId,
@@ -52899,7 +53054,7 @@ function AuthLoading({ children, loading = null }) {
52899
53054
 
52900
53055
  // src/react/provider.tsx
52901
53056
  import { QueryClient, QueryClientProvider, useQuery as useQuery5 } from "@tanstack/react-query";
52902
- import { useCallback as useCallback66, useEffect as useEffect63, useMemo as useMemo127, useRef as useRef88, useState as useState77 } from "react";
53057
+ import { useCallback as useCallback66, useEffect as useEffect63, useMemo as useMemo128, useRef as useRef88, useState as useState77 } from "react";
52903
53058
 
52904
53059
  // src/consent.ts
52905
53060
  async function linkAnonymousConsents(config2, input) {
@@ -53780,7 +53935,11 @@ function createRestApi(config2) {
53780
53935
  }
53781
53936
  async function get(path, query) {
53782
53937
  const url = new URL(`${baseUrl}${path}`);
53783
- if (query) Object.entries(query).forEach(([k2, v2]) => v2 && url.searchParams.set(k2, v2));
53938
+ if (query) {
53939
+ Object.entries(query).forEach(([k2, v2]) => {
53940
+ if (v2) url.searchParams.set(k2, v2);
53941
+ });
53942
+ }
53784
53943
  const res = await fetchWithAuth(url.toString(), "GET");
53785
53944
  return handleResponse(res);
53786
53945
  }
@@ -54172,7 +54331,7 @@ function SylphxProviderInner({
54172
54331
  return parts.length === 4 && /^[a-z0-9]{12}$/.test(parts[2] ?? "") ? parts[2] : void 0;
54173
54332
  })();
54174
54333
  const platformUrl = resolvedRef ? `https://${resolvedRef}.${DEFAULT_SDK_API_HOST}` : providedPlatformUrl?.trim() || `https://${DEFAULT_SDK_API_HOST}`;
54175
- const storage2 = useMemo127(() => new SylphxStorage(appId), [appId]);
54334
+ const storage2 = useMemo128(() => new SylphxStorage(appId), [appId]);
54176
54335
  const [anonymousId, setAnonymousId] = useState77("");
54177
54336
  useEffect63(() => {
54178
54337
  setAnonymousId(getOrCreateAnonymousId(storage2));
@@ -54216,7 +54375,7 @@ function SylphxProviderInner({
54216
54375
  useEffect63(() => {
54217
54376
  authStateRef.current = authState;
54218
54377
  }, [authState]);
54219
- const tokenManager = useMemo127(
54378
+ const tokenManager = useMemo128(
54220
54379
  () => new TokenManager({
54221
54380
  isSignedIn: () => authStateRef.current.isSignedIn,
54222
54381
  onSessionExpired: () => {
@@ -54249,7 +54408,7 @@ function SylphxProviderInner({
54249
54408
  if (wasAnonymous && isNowAuthenticated && authState.user && anonymousId && resolvedRef) {
54250
54409
  const config3 = createConfig({
54251
54410
  secretKey: appId,
54252
- ref: resolvedRef
54411
+ slug: resolvedRef
54253
54412
  });
54254
54413
  linkAnonymousConsents(config3, {
54255
54414
  userId: authState.user.id,
@@ -54266,9 +54425,9 @@ function SylphxProviderInner({
54266
54425
  anonymousId,
54267
54426
  appId,
54268
54427
  authState.user,
54269
- providedRef
54428
+ resolvedRef
54270
54429
  ]);
54271
- const api = useMemo127(
54430
+ const api = useMemo128(
54272
54431
  () => createRestApi({
54273
54432
  appId,
54274
54433
  platformUrl,
@@ -54400,7 +54559,7 @@ function SylphxProviderInner({
54400
54559
  document.removeEventListener("visibilitychange", handleVisibilityChange);
54401
54560
  };
54402
54561
  }, [appId, platformUrl]);
54403
- const autoTrackConfig = useMemo127(() => {
54562
+ const autoTrackConfig = useMemo128(() => {
54404
54563
  if (autoTracking === false) {
54405
54564
  return {
54406
54565
  pageview: false,
@@ -54629,7 +54788,7 @@ function SylphxProviderInner({
54629
54788
  }, [authState.isSignedIn, authPrefix]);
54630
54789
  const resetPassword = useCallback66(
54631
54790
  async (options) => {
54632
- const response = await fetch(`${platformUrl}/api/auth/reset-password`, {
54791
+ const response = await fetch(`${platformUrl}/v1/auth/reset-password`, {
54633
54792
  method: "POST",
54634
54793
  headers: { "Content-Type": "application/json" },
54635
54794
  body: JSON.stringify({
@@ -54647,7 +54806,7 @@ function SylphxProviderInner({
54647
54806
  );
54648
54807
  const verifyEmail = useCallback66(
54649
54808
  async (options) => {
54650
- const response = await fetch(`${platformUrl}/api/auth/verify-email`, {
54809
+ const response = await fetch(`${platformUrl}/v1/auth/verify-email`, {
54651
54810
  method: "POST",
54652
54811
  headers: { "Content-Type": "application/json" },
54653
54812
  body: JSON.stringify({
@@ -54664,7 +54823,7 @@ function SylphxProviderInner({
54664
54823
  );
54665
54824
  const resendVerificationEmail = useCallback66(
54666
54825
  async (options) => {
54667
- const response = await fetch(`${platformUrl}/api/auth/resend-verification`, {
54826
+ const response = await fetch(`${platformUrl}/v1/auth/resend-verification`, {
54668
54827
  method: "POST",
54669
54828
  headers: { "Content-Type": "application/json" },
54670
54829
  body: JSON.stringify({
@@ -54681,7 +54840,7 @@ function SylphxProviderInner({
54681
54840
  );
54682
54841
  const forgotPassword = useCallback66(
54683
54842
  async (options) => {
54684
- const response = await fetch(`${platformUrl}/api/auth/forgot-password`, {
54843
+ const response = await fetch(`${platformUrl}/v1/auth/forgot-password`, {
54685
54844
  method: "POST",
54686
54845
  headers: { "Content-Type": "application/json" },
54687
54846
  body: JSON.stringify({
@@ -55468,16 +55627,16 @@ function SylphxProviderInner({
55468
55627
  // biome-ignore lint/correctness/useExhaustiveDependencies: query key is stable
55469
55628
  [api, queryClient, inboxQueryKey]
55470
55629
  );
55471
- const aiValue = useMemo127(
55630
+ const aiValue = useMemo128(
55472
55631
  () => createAIValue({ api, platformUrl, appId }),
55473
55632
  [api, platformUrl, appId]
55474
55633
  );
55475
- const tasksValue = useMemo127(() => createTasksValue({ api }), [api]);
55476
- const monitoringValue = useMemo127(
55634
+ const tasksValue = useMemo128(() => createTasksValue({ api }), [api]);
55635
+ const monitoringValue = useMemo128(
55477
55636
  () => createMonitoringValue({ api }),
55478
55637
  [api]
55479
55638
  );
55480
- const consentValue = useMemo127(
55639
+ const consentValue = useMemo128(
55481
55640
  () => createConsentValue({
55482
55641
  api,
55483
55642
  anonymousId,
@@ -55486,7 +55645,7 @@ function SylphxProviderInner({
55486
55645
  }),
55487
55646
  [api, anonymousId, authState.user?.id, config2]
55488
55647
  );
55489
- const storageValue = useMemo127(
55648
+ const storageValue = useMemo128(
55490
55649
  () => createStorageValue({
55491
55650
  api,
55492
55651
  platformUrl,
@@ -55495,14 +55654,14 @@ function SylphxProviderInner({
55495
55654
  }),
55496
55655
  [api, platformUrl, appId, authState.user?.id]
55497
55656
  );
55498
- const newsletterValue = useMemo127(
55657
+ const newsletterValue = useMemo128(
55499
55658
  () => createNewsletterValue({ api }),
55500
55659
  [api]
55501
55660
  );
55502
- const databaseValue = useMemo127(() => createDatabaseValue(), []);
55503
- const emailValue = useMemo127(() => createEmailValue({ api }), [api]);
55504
- const webhooksValue = useMemo127(() => createWebhooksValue({ api }), [api]);
55505
- const sdkAuthValue = useMemo127(
55661
+ const databaseValue = useMemo128(() => createDatabaseValue(), []);
55662
+ const emailValue = useMemo128(() => createEmailValue({ api }), [api]);
55663
+ const webhooksValue = useMemo128(() => createWebhooksValue({ api }), [api]);
55664
+ const sdkAuthValue = useMemo128(
55506
55665
  () => ({
55507
55666
  login: async (email, password) => {
55508
55667
  const result = await api.post("/auth/login", { email, password });
@@ -55569,7 +55728,7 @@ function SylphxProviderInner({
55569
55728
  });
55570
55729
  },
55571
55730
  verifyEmail: async (token) => {
55572
- const response = await fetch(`${platformUrl}/api/auth/verify-email`, {
55731
+ const response = await fetch(`${platformUrl}/v1/auth/verify-email`, {
55573
55732
  method: "POST",
55574
55733
  headers: { "Content-Type": "application/json" },
55575
55734
  body: JSON.stringify({ token, client_id: appId || "" })
@@ -55599,8 +55758,8 @@ function SylphxProviderInner({
55599
55758
  },
55600
55759
  getOAuthProviders: async () => {
55601
55760
  if (!appId) return { providers: [] };
55602
- const response = await fetch(`${platformUrl}/api/auth/providers`, {
55603
- headers: { "X-App-Id": appId }
55761
+ const response = await fetch(`${platformUrl}/v1/auth/oauth-providers`, {
55762
+ headers: { "x-app-secret": appId }
55604
55763
  });
55605
55764
  if (!response.ok) {
55606
55765
  return { providers: [] };
@@ -55611,7 +55770,7 @@ function SylphxProviderInner({
55611
55770
  }),
55612
55771
  [api, platformUrl, appId, saveTokens, clearTokens]
55613
55772
  );
55614
- const userValue = useMemo127(
55773
+ const userValue = useMemo128(
55615
55774
  () => ({
55616
55775
  getProfile: async () => {
55617
55776
  const profile = await api.get("/user/profile");
@@ -55734,7 +55893,7 @@ function SylphxProviderInner({
55734
55893
  }),
55735
55894
  [api, authState]
55736
55895
  );
55737
- const securityValue = useMemo127(
55896
+ const securityValue = useMemo128(
55738
55897
  () => ({
55739
55898
  getTwoFactorStatus: async () => {
55740
55899
  const settings = await api.get("/user/security");
@@ -55839,7 +55998,7 @@ function SylphxProviderInner({
55839
55998
  }),
55840
55999
  [api, platformUrl, appId]
55841
56000
  );
55842
- const authValue = useMemo127(
56001
+ const authValue = useMemo128(
55843
56002
  () => ({
55844
56003
  ...authState,
55845
56004
  signIn,
@@ -55884,10 +56043,11 @@ function SylphxProviderInner({
55884
56043
  signInWithMagicLink
55885
56044
  ]
55886
56045
  );
55887
- const platformValue = useMemo127(
56046
+ const platformValue = useMemo128(
55888
56047
  () => ({
55889
56048
  appId,
55890
56049
  platformUrl,
56050
+ slug: resolvedRef,
55891
56051
  ref: resolvedRef,
55892
56052
  anonymousId,
55893
56053
  queryClient,
@@ -56021,7 +56181,7 @@ function SylphxProviderInner({
56021
56181
  getAchievements,
56022
56182
  unlockAchievement,
56023
56183
  incrementAchievementProgress,
56024
- providedRef
56184
+ resolvedRef
56025
56185
  ]
56026
56186
  );
56027
56187
  return /* @__PURE__ */ jsx64(AuthContext.Provider, { value: authValue, children: /* @__PURE__ */ jsx64(SdkAuthContext.Provider, { value: sdkAuthValue, children: /* @__PURE__ */ jsx64(UserContext.Provider, { value: userValue, children: /* @__PURE__ */ jsx64(SecurityContext.Provider, { value: securityValue, children: /* @__PURE__ */ jsx64(PlatformContext.Provider, { value: platformValue, children: /* @__PURE__ */ jsx64(StorageContext.Provider, { value: storageValue, children: /* @__PURE__ */ jsx64(AIContext.Provider, { value: aiValue, children: /* @__PURE__ */ jsx64(TasksContext.Provider, { value: tasksValue, children: /* @__PURE__ */ jsx64(MonitoringContext.Provider, { value: monitoringValue, children: /* @__PURE__ */ jsx64(ConsentContext.Provider, { value: consentValue, children: /* @__PURE__ */ jsx64(DatabaseContext.Provider, { value: databaseValue, children: /* @__PURE__ */ jsx64(EmailContext.Provider, { value: emailValue, children: /* @__PURE__ */ jsx64(NewsletterContext.Provider, { value: newsletterValue, children: /* @__PURE__ */ jsx64(WebhooksContext.Provider, { value: webhooksValue, children }) }) }) }) }) }) }) }) }) }) }) }) }) });
@@ -56029,7 +56189,7 @@ function SylphxProviderInner({
56029
56189
 
56030
56190
  // src/react/rbac-hooks.ts
56031
56191
  import { useQuery as useQuery6, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
56032
- import { useCallback as useCallback67, useContext as useContext78, useMemo as useMemo128 } from "react";
56192
+ import { useCallback as useCallback67, useContext as useContext78, useMemo as useMemo129 } from "react";
56033
56193
 
56034
56194
  // src/permissions.ts
56035
56195
  async function listPermissions(config2) {
@@ -56060,17 +56220,17 @@ async function listRoles(config2) {
56060
56220
  function useSdkConfig() {
56061
56221
  const platform3 = useContext78(PlatformContext);
56062
56222
  const auth = useContext78(AuthContext);
56063
- return useMemo128(() => {
56064
- if (!platform3?.ref) return null;
56223
+ return useMemo129(() => {
56224
+ if (!platform3?.slug) return null;
56065
56225
  let config2 = createConfig({
56066
56226
  secretKey: platform3.appId,
56067
- ref: platform3.ref
56227
+ slug: platform3.slug
56068
56228
  });
56069
56229
  if (auth?.accessToken) {
56070
56230
  config2 = withToken(config2, auth.accessToken);
56071
56231
  }
56072
56232
  return config2;
56073
- }, [platform3?.ref, platform3?.appId, auth?.accessToken]);
56233
+ }, [platform3?.slug, platform3?.appId, auth?.accessToken]);
56074
56234
  }
56075
56235
  var rbacKeys = {
56076
56236
  all: ["rbac"],
@@ -56157,7 +56317,7 @@ function useMemberPermissions(orgIdOrSlug, memberId) {
56157
56317
  };
56158
56318
  }
56159
56319
  function useHasPermission(permissions, required) {
56160
- return useMemo128(() => {
56320
+ return useMemo129(() => {
56161
56321
  const requiredArray = Array.isArray(required) ? required : [required];
56162
56322
  return {
56163
56323
  allowed: Array.isArray(required) ? hasAllPermissions(permissions, requiredArray) : hasPermission(permissions, required),
@@ -56659,7 +56819,7 @@ function useWebhookStats(period = "week") {
56659
56819
 
56660
56820
  // src/react/ui/account-section.tsx
56661
56821
  init_constants();
56662
- import { useCallback as useCallback71, useEffect as useEffect65, useState as useState80 } from "react";
56822
+ import { useCallback as useCallback71, useEffect as useEffect65, useId as useId11, useState as useState80 } from "react";
56663
56823
  import { Fragment as Fragment35, jsx as jsx65, jsxs as jsxs42 } from "react/jsx-runtime";
56664
56824
  function AccountSection(props) {
56665
56825
  return /* @__PURE__ */ jsx65(RequireSdk, { services: ["auth"], componentType: "account", theme: props.theme, children: /* @__PURE__ */ jsx65(AccountSectionInner, { ...props }) });
@@ -56679,6 +56839,8 @@ function AccountSectionInner({
56679
56839
  const userContext = useUserContext();
56680
56840
  const securityContext = useSecurityContext();
56681
56841
  const styles2 = baseStyles(theme);
56842
+ const newEmailId = useId11();
56843
+ const emailPasswordId = useId11();
56682
56844
  const [error2, setError] = useState80(null);
56683
56845
  const [success, setSuccess] = useState80(null);
56684
56846
  const [showEmailChangeForm, setShowEmailChangeForm] = useState80(false);
@@ -56855,10 +57017,11 @@ function AccountSectionInner({
56855
57017
  },
56856
57018
  children: [
56857
57019
  /* @__PURE__ */ jsxs42("div", { style: styles2.formGroup, children: [
56858
- /* @__PURE__ */ jsx65("label", { style: styles2.label, children: "New Email Address" }),
57020
+ /* @__PURE__ */ jsx65("label", { htmlFor: newEmailId, style: styles2.label, children: "New Email Address" }),
56859
57021
  /* @__PURE__ */ jsx65(
56860
57022
  "input",
56861
57023
  {
57024
+ id: newEmailId,
56862
57025
  type: "email",
56863
57026
  value: newEmail,
56864
57027
  onChange: (e2) => setNewEmail(e2.target.value),
@@ -56869,10 +57032,11 @@ function AccountSectionInner({
56869
57032
  )
56870
57033
  ] }),
56871
57034
  /* @__PURE__ */ jsxs42("div", { style: styles2.formGroup, children: [
56872
- /* @__PURE__ */ jsx65("label", { style: styles2.label, children: "Current Password" }),
57035
+ /* @__PURE__ */ jsx65("label", { htmlFor: emailPasswordId, style: styles2.label, children: "Current Password" }),
56873
57036
  /* @__PURE__ */ jsx65(
56874
57037
  "input",
56875
57038
  {
57039
+ id: emailPasswordId,
56876
57040
  type: "password",
56877
57041
  value: emailPassword,
56878
57042
  onChange: (e2) => setEmailPassword(e2.target.value),
@@ -57231,6 +57395,8 @@ function DownloadIcon({ size: size4 = 24 }) {
57231
57395
  strokeWidth: "2",
57232
57396
  strokeLinecap: "round",
57233
57397
  strokeLinejoin: "round",
57398
+ "aria-hidden": "true",
57399
+ focusable: "false",
57234
57400
  children: [
57235
57401
  /* @__PURE__ */ jsx65("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
57236
57402
  /* @__PURE__ */ jsx65("polyline", { points: "7 10 12 15 17 10" }),
@@ -57251,6 +57417,8 @@ function TrashIcon2({ size: size4 = 24 }) {
57251
57417
  strokeWidth: "2",
57252
57418
  strokeLinecap: "round",
57253
57419
  strokeLinejoin: "round",
57420
+ "aria-hidden": "true",
57421
+ focusable: "false",
57254
57422
  children: [
57255
57423
  /* @__PURE__ */ jsx65("polyline", { points: "3 6 5 6 21 6" }),
57256
57424
  /* @__PURE__ */ jsx65("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
@@ -57270,6 +57438,8 @@ function ShieldIcon({ size: size4 = 24, color: color2 = "currentColor" }) {
57270
57438
  strokeWidth: "2",
57271
57439
  strokeLinecap: "round",
57272
57440
  strokeLinejoin: "round",
57441
+ "aria-hidden": "true",
57442
+ focusable: "false",
57273
57443
  children: /* @__PURE__ */ jsx65("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" })
57274
57444
  }
57275
57445
  );
@@ -57369,15 +57539,22 @@ function EventViewer({
57369
57539
  ]
57370
57540
  }
57371
57541
  ) : filteredEvents.map((event2, i2) => /* @__PURE__ */ jsxs43(
57372
- "div",
57542
+ "button",
57373
57543
  {
57544
+ type: "button",
57374
57545
  onClick: () => {
57375
57546
  setExpandedId(expandedId === event2.id ? null : event2.id);
57376
57547
  onEventClick?.(event2);
57377
57548
  },
57549
+ "aria-expanded": expandedId === event2.id,
57378
57550
  style: {
57379
57551
  ...eventItemStyle,
57380
- borderBottom: i2 === filteredEvents.length - 1 ? "none" : eventItemStyle.borderBottom
57552
+ borderBottom: i2 === filteredEvents.length - 1 ? "none" : eventItemStyle.borderBottom,
57553
+ textAlign: "left",
57554
+ font: "inherit",
57555
+ color: "inherit",
57556
+ width: "100%",
57557
+ cursor: "pointer"
57381
57558
  },
57382
57559
  children: [
57383
57560
  /* @__PURE__ */ jsxs43(
@@ -57802,6 +57979,8 @@ function EventIcon({ color: color2, size: size4 = 20 }) {
57802
57979
  strokeWidth: "2",
57803
57980
  strokeLinecap: "round",
57804
57981
  strokeLinejoin: "round",
57982
+ "aria-hidden": "true",
57983
+ focusable: "false",
57805
57984
  children: [
57806
57985
  /* @__PURE__ */ jsx66("circle", { cx: "12", cy: "12", r: "10" }),
57807
57986
  /* @__PURE__ */ jsx66("polyline", { points: "12 6 12 12 16 14" })
@@ -57821,6 +58000,8 @@ function UsersIcon({ color: color2 }) {
57821
58000
  strokeWidth: "2",
57822
58001
  strokeLinecap: "round",
57823
58002
  strokeLinejoin: "round",
58003
+ "aria-hidden": "true",
58004
+ focusable: "false",
57824
58005
  children: [
57825
58006
  /* @__PURE__ */ jsx66("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
57826
58007
  /* @__PURE__ */ jsx66("circle", { cx: "9", cy: "7", r: "4" }),
@@ -57842,6 +58023,8 @@ function PageviewsIcon({ color: color2 }) {
57842
58023
  strokeWidth: "2",
57843
58024
  strokeLinecap: "round",
57844
58025
  strokeLinejoin: "round",
58026
+ "aria-hidden": "true",
58027
+ focusable: "false",
57845
58028
  children: [
57846
58029
  /* @__PURE__ */ jsx66("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
57847
58030
  /* @__PURE__ */ jsx66("circle", { cx: "12", cy: "12", r: "3" })
@@ -57861,6 +58044,8 @@ function SessionsIcon({ color: color2 }) {
57861
58044
  strokeWidth: "2",
57862
58045
  strokeLinecap: "round",
57863
58046
  strokeLinejoin: "round",
58047
+ "aria-hidden": "true",
58048
+ focusable: "false",
57864
58049
  children: [
57865
58050
  /* @__PURE__ */ jsx66("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
57866
58051
  /* @__PURE__ */ jsx66("line", { x1: "9", y1: "3", x2: "9", y2: "21" })
@@ -57880,6 +58065,8 @@ function RevenueIcon({ color: color2 }) {
57880
58065
  strokeWidth: "2",
57881
58066
  strokeLinecap: "round",
57882
58067
  strokeLinejoin: "round",
58068
+ "aria-hidden": "true",
58069
+ focusable: "false",
57883
58070
  children: [
57884
58071
  /* @__PURE__ */ jsx66("line", { x1: "12", y1: "1", x2: "12", y2: "23" }),
57885
58072
  /* @__PURE__ */ jsx66("path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" })
@@ -57899,6 +58086,8 @@ function ChartIcon({ color: color2 }) {
57899
58086
  strokeWidth: "2",
57900
58087
  strokeLinecap: "round",
57901
58088
  strokeLinejoin: "round",
58089
+ "aria-hidden": "true",
58090
+ focusable: "false",
57902
58091
  children: [
57903
58092
  /* @__PURE__ */ jsx66("line", { x1: "18", y1: "20", x2: "18", y2: "10" }),
57904
58093
  /* @__PURE__ */ jsx66("line", { x1: "12", y1: "20", x2: "12", y2: "4" }),
@@ -57910,7 +58099,7 @@ function ChartIcon({ color: color2 }) {
57910
58099
 
57911
58100
  // src/react/ui/api-key-manager.tsx
57912
58101
  init_constants();
57913
- import { useEffect as useEffect67, useState as useState82 } from "react";
58102
+ import { useEffect as useEffect67, useId as useId12, useState as useState82 } from "react";
57914
58103
  import { jsx as jsx67, jsxs as jsxs44 } from "react/jsx-runtime";
57915
58104
  var DEFAULT_SCOPES = [
57916
58105
  "read:users",
@@ -57932,6 +58121,8 @@ function APIKeyManager({
57932
58121
  emptyMessage = "No API keys created",
57933
58122
  showEnvironment = true
57934
58123
  }) {
58124
+ const keyNameId = useId12();
58125
+ const expirationId = useId12();
57935
58126
  const [showCreate, setShowCreate] = useState82(false);
57936
58127
  const [name, setName] = useState82("");
57937
58128
  const [selectedScopes, setSelectedScopes] = useState82([]);
@@ -58181,6 +58372,7 @@ function APIKeyManager({
58181
58372
  /* @__PURE__ */ jsx67(
58182
58373
  "label",
58183
58374
  {
58375
+ htmlFor: keyNameId,
58184
58376
  style: {
58185
58377
  display: "block",
58186
58378
  marginBottom: "0.5rem",
@@ -58193,6 +58385,7 @@ function APIKeyManager({
58193
58385
  /* @__PURE__ */ jsx67(
58194
58386
  "input",
58195
58387
  {
58388
+ id: keyNameId,
58196
58389
  type: "text",
58197
58390
  value: name,
58198
58391
  onChange: (e2) => setName(e2.target.value),
@@ -58213,15 +58406,16 @@ function APIKeyManager({
58213
58406
  }
58214
58407
  )
58215
58408
  ] }),
58216
- /* @__PURE__ */ jsxs44("div", { style: { marginBottom: "1rem" }, children: [
58409
+ /* @__PURE__ */ jsxs44("fieldset", { style: { marginBottom: "1rem", border: "none", padding: 0, margin: 0 }, children: [
58217
58410
  /* @__PURE__ */ jsx67(
58218
- "label",
58411
+ "legend",
58219
58412
  {
58220
58413
  style: {
58221
58414
  display: "block",
58222
58415
  marginBottom: "0.5rem",
58223
58416
  fontWeight: 500,
58224
- fontSize: theme.fontSizeSm
58417
+ fontSize: theme.fontSizeSm,
58418
+ padding: 0
58225
58419
  },
58226
58420
  children: "Scopes"
58227
58421
  }
@@ -58260,6 +58454,7 @@ function APIKeyManager({
58260
58454
  /* @__PURE__ */ jsx67(
58261
58455
  "label",
58262
58456
  {
58457
+ htmlFor: expirationId,
58263
58458
  style: {
58264
58459
  display: "block",
58265
58460
  marginBottom: "0.5rem",
@@ -58272,6 +58467,7 @@ function APIKeyManager({
58272
58467
  /* @__PURE__ */ jsxs44(
58273
58468
  "select",
58274
58469
  {
58470
+ id: expirationId,
58275
58471
  value: expiresIn ?? "",
58276
58472
  onChange: (e2) => setExpiresIn(e2.target.value ? Number.parseInt(e2.target.value, 10) : void 0),
58277
58473
  style: inputStyle,
@@ -58474,6 +58670,8 @@ function KeyIcon({ color: color2, size: size4 = 24 }) {
58474
58670
  strokeWidth: "2",
58475
58671
  strokeLinecap: "round",
58476
58672
  strokeLinejoin: "round",
58673
+ "aria-hidden": "true",
58674
+ focusable: "false",
58477
58675
  children: /* @__PURE__ */ jsx67("path", { d: "M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4" })
58478
58676
  }
58479
58677
  );
@@ -58491,6 +58689,8 @@ function PlusIcon3({ color: color2 }) {
58491
58689
  strokeLinecap: "round",
58492
58690
  strokeLinejoin: "round",
58493
58691
  style: { marginRight: "0.25rem" },
58692
+ "aria-hidden": "true",
58693
+ focusable: "false",
58494
58694
  children: [
58495
58695
  /* @__PURE__ */ jsx67("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
58496
58696
  /* @__PURE__ */ jsx67("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
@@ -58510,6 +58710,8 @@ function CheckIcon10({ color: color2 }) {
58510
58710
  strokeWidth: "2",
58511
58711
  strokeLinecap: "round",
58512
58712
  strokeLinejoin: "round",
58713
+ "aria-hidden": "true",
58714
+ focusable: "false",
58513
58715
  children: /* @__PURE__ */ jsx67("polyline", { points: "20 6 9 17 4 12" })
58514
58716
  }
58515
58717
  );
@@ -59073,6 +59275,8 @@ function InvoiceIcon({ color: color2, size: size4 = 24 }) {
59073
59275
  strokeWidth: "2",
59074
59276
  strokeLinecap: "round",
59075
59277
  strokeLinejoin: "round",
59278
+ "aria-hidden": "true",
59279
+ focusable: "false",
59076
59280
  children: [
59077
59281
  /* @__PURE__ */ jsx68("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
59078
59282
  /* @__PURE__ */ jsx68("polyline", { points: "14 2 14 8 20 8" }),
@@ -59095,6 +59299,8 @@ function DownloadIcon2({ color: color2 }) {
59095
59299
  strokeWidth: "2",
59096
59300
  strokeLinecap: "round",
59097
59301
  strokeLinejoin: "round",
59302
+ "aria-hidden": "true",
59303
+ focusable: "false",
59098
59304
  children: [
59099
59305
  /* @__PURE__ */ jsx68("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
59100
59306
  /* @__PURE__ */ jsx68("polyline", { points: "7 10 12 15 17 10" }),
@@ -59115,6 +59321,8 @@ function CreditCardIcon({ color: color2, size: size4 = 24 }) {
59115
59321
  strokeWidth: "2",
59116
59322
  strokeLinecap: "round",
59117
59323
  strokeLinejoin: "round",
59324
+ "aria-hidden": "true",
59325
+ focusable: "false",
59118
59326
  children: [
59119
59327
  /* @__PURE__ */ jsx68("rect", { x: "1", y: "4", width: "22", height: "16", rx: "2", ry: "2" }),
59120
59328
  /* @__PURE__ */ jsx68("line", { x1: "1", y1: "10", x2: "23", y2: "10" })
@@ -59135,6 +59343,8 @@ function PlusIcon4({ color: color2 }) {
59135
59343
  strokeLinecap: "round",
59136
59344
  strokeLinejoin: "round",
59137
59345
  style: { marginRight: "0.25rem" },
59346
+ "aria-hidden": "true",
59347
+ focusable: "false",
59138
59348
  children: [
59139
59349
  /* @__PURE__ */ jsx68("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
59140
59350
  /* @__PURE__ */ jsx68("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
@@ -60039,6 +60249,8 @@ function ChatIcon({ color: color2, size: size4 = 20 }) {
60039
60249
  strokeWidth: "2",
60040
60250
  strokeLinecap: "round",
60041
60251
  strokeLinejoin: "round",
60252
+ "aria-hidden": "true",
60253
+ focusable: "false",
60042
60254
  children: /* @__PURE__ */ jsx70("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
60043
60255
  }
60044
60256
  );
@@ -60055,6 +60267,8 @@ function SendIcon2({ color: color2 }) {
60055
60267
  strokeWidth: "2",
60056
60268
  strokeLinecap: "round",
60057
60269
  strokeLinejoin: "round",
60270
+ "aria-hidden": "true",
60271
+ focusable: "false",
60058
60272
  children: [
60059
60273
  /* @__PURE__ */ jsx70("line", { x1: "22", y1: "2", x2: "11", y2: "13" }),
60060
60274
  /* @__PURE__ */ jsx70("polygon", { points: "22 2 15 22 11 13 2 9 22 2" })
@@ -60115,7 +60329,6 @@ function ConsentPreferences({
60115
60329
  acceptAll,
60116
60330
  declineOptional,
60117
60331
  saveConsents,
60118
- isLoading,
60119
60332
  hasConsented
60120
60333
  } = useConsent();
60121
60334
  const [isSaving, setIsSaving] = useState86(false);
@@ -60540,6 +60753,8 @@ function CheckIcon12({ color: color2 }) {
60540
60753
  strokeLinecap: "round",
60541
60754
  strokeLinejoin: "round",
60542
60755
  style: { marginRight: "0.5rem" },
60756
+ "aria-hidden": "true",
60757
+ focusable: "false",
60543
60758
  children: /* @__PURE__ */ jsx71("polyline", { points: "20 6 9 17 4 12" })
60544
60759
  }
60545
60760
  );
@@ -60572,7 +60787,6 @@ function CookieBanner({
60572
60787
  declineOptional,
60573
60788
  setConsent,
60574
60789
  saveConsents,
60575
- closeBanner,
60576
60790
  isLoading
60577
60791
  } = useConsent();
60578
60792
  const [showCustomize, setShowCustomize] = useState87(false);
@@ -60934,6 +61148,8 @@ function CloseIcon2() {
60934
61148
  fill: "none",
60935
61149
  stroke: "currentColor",
60936
61150
  strokeWidth: "2",
61151
+ "aria-hidden": "true",
61152
+ focusable: "false",
60937
61153
  children: [
60938
61154
  /* @__PURE__ */ jsx72("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
60939
61155
  /* @__PURE__ */ jsx72("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
@@ -61349,11 +61565,24 @@ function FeedbackWidget({
61349
61565
  ] }) });
61350
61566
  }
61351
61567
  function ErrorIcon({ color: color2 }) {
61352
- return /* @__PURE__ */ jsxs50("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "2", children: [
61353
- /* @__PURE__ */ jsx73("circle", { cx: "12", cy: "12", r: "10" }),
61354
- /* @__PURE__ */ jsx73("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
61355
- /* @__PURE__ */ jsx73("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
61356
- ] });
61568
+ return /* @__PURE__ */ jsxs50(
61569
+ "svg",
61570
+ {
61571
+ width: "32",
61572
+ height: "32",
61573
+ viewBox: "0 0 24 24",
61574
+ fill: "none",
61575
+ stroke: color2,
61576
+ strokeWidth: "2",
61577
+ "aria-hidden": "true",
61578
+ focusable: "false",
61579
+ children: [
61580
+ /* @__PURE__ */ jsx73("circle", { cx: "12", cy: "12", r: "10" }),
61581
+ /* @__PURE__ */ jsx73("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
61582
+ /* @__PURE__ */ jsx73("line", { x1: "12", y1: "16", x2: "12.01", y2: "16" })
61583
+ ]
61584
+ }
61585
+ );
61357
61586
  }
61358
61587
  function FeedbackIcon() {
61359
61588
  return /* @__PURE__ */ jsx73(
@@ -61366,6 +61595,8 @@ function FeedbackIcon() {
61366
61595
  stroke: "currentColor",
61367
61596
  strokeWidth: "2",
61368
61597
  style: { marginRight: "0.5rem" },
61598
+ "aria-hidden": "true",
61599
+ focusable: "false",
61369
61600
  children: /* @__PURE__ */ jsx73("path", { d: "M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z" })
61370
61601
  }
61371
61602
  );
@@ -61380,6 +61611,8 @@ function CloseIcon3() {
61380
61611
  fill: "none",
61381
61612
  stroke: "currentColor",
61382
61613
  strokeWidth: "2",
61614
+ "aria-hidden": "true",
61615
+ focusable: "false",
61383
61616
  children: [
61384
61617
  /* @__PURE__ */ jsx73("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
61385
61618
  /* @__PURE__ */ jsx73("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
@@ -61388,10 +61621,23 @@ function CloseIcon3() {
61388
61621
  );
61389
61622
  }
61390
61623
  function CheckCircleIcon({ color: color2 }) {
61391
- return /* @__PURE__ */ jsxs50("svg", { width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "2", children: [
61392
- /* @__PURE__ */ jsx73("path", { d: "M22 11.08V12a10 10 0 11-5.93-9.14" }),
61393
- /* @__PURE__ */ jsx73("polyline", { points: "22 4 12 14.01 9 11.01" })
61394
- ] });
61624
+ return /* @__PURE__ */ jsxs50(
61625
+ "svg",
61626
+ {
61627
+ width: "48",
61628
+ height: "48",
61629
+ viewBox: "0 0 24 24",
61630
+ fill: "none",
61631
+ stroke: color2,
61632
+ strokeWidth: "2",
61633
+ "aria-hidden": "true",
61634
+ focusable: "false",
61635
+ children: [
61636
+ /* @__PURE__ */ jsx73("path", { d: "M22 11.08V12a10 10 0 11-5.93-9.14" }),
61637
+ /* @__PURE__ */ jsx73("polyline", { points: "22 4 12 14.01 9 11.01" })
61638
+ ]
61639
+ }
61640
+ );
61395
61641
  }
61396
61642
 
61397
61643
  // src/react/ui/feature-gate.tsx
@@ -61668,6 +61914,8 @@ function FlagIcon() {
61668
61914
  fill: "none",
61669
61915
  stroke: "currentColor",
61670
61916
  strokeWidth: "2",
61917
+ "aria-hidden": "true",
61918
+ focusable: "false",
61671
61919
  children: [
61672
61920
  /* @__PURE__ */ jsx74("path", { d: "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" }),
61673
61921
  /* @__PURE__ */ jsx74("line", { x1: "4", y1: "22", x2: "4", y2: "15" })
@@ -61685,6 +61933,8 @@ function CloseIcon4() {
61685
61933
  fill: "none",
61686
61934
  stroke: "currentColor",
61687
61935
  strokeWidth: "2",
61936
+ "aria-hidden": "true",
61937
+ focusable: "false",
61688
61938
  children: [
61689
61939
  /* @__PURE__ */ jsx74("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
61690
61940
  /* @__PURE__ */ jsx74("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
@@ -61796,13 +62046,22 @@ function FileUploadInner({
61796
62046
  const acceptString = accept?.join(",");
61797
62047
  return /* @__PURE__ */ jsxs52("div", { className, style: { fontFamily: theme.fontFamily }, children: [
61798
62048
  /* @__PURE__ */ jsxs52(
61799
- "div",
62049
+ "button",
61800
62050
  {
62051
+ type: "button",
61801
62052
  onDrop: handleDrop,
61802
62053
  onDragOver: handleDragOver,
61803
62054
  onDragLeave: handleDragLeave,
61804
62055
  onClick: handleClick,
61805
- style: dropZoneStyle,
62056
+ disabled: disabled2 || isUploading,
62057
+ "aria-label": "Upload files",
62058
+ style: {
62059
+ ...dropZoneStyle,
62060
+ textAlign: "center",
62061
+ font: "inherit",
62062
+ color: "inherit",
62063
+ width: "100%"
62064
+ },
61806
62065
  children: [
61807
62066
  /* @__PURE__ */ jsx75(
61808
62067
  "input",
@@ -61979,7 +62238,7 @@ function ImageUploaderInner({
61979
62238
  transition: "all 0.2s ease"
61980
62239
  };
61981
62240
  return /* @__PURE__ */ jsxs52("div", { className, style: { fontFamily: theme.fontFamily }, children: [
61982
- /* @__PURE__ */ jsxs52("div", { style: containerStyle, onClick: handleClick, children: [
62241
+ /* @__PURE__ */ jsxs52("div", { style: containerStyle, children: [
61983
62242
  /* @__PURE__ */ jsx75(
61984
62243
  "input",
61985
62244
  {
@@ -61991,21 +62250,7 @@ function ImageUploaderInner({
61991
62250
  disabled: disabled2
61992
62251
  }
61993
62252
  ),
61994
- /* @__PURE__ */ jsx75("div", { style: innerStyle, children: isUploading ? /* @__PURE__ */ jsxs52("div", { style: { textAlign: "center" }, children: [
61995
- /* @__PURE__ */ jsx75("span", { style: styles2.spinner }),
61996
- /* @__PURE__ */ jsxs52(
61997
- "p",
61998
- {
61999
- style: mergeStyles(styles2.textSm, styles2.textMuted, {
62000
- marginTop: "0.5rem"
62001
- }),
62002
- children: [
62003
- progress2,
62004
- "%"
62005
- ]
62006
- }
62007
- )
62008
- ] }) : previewUrl ? /* @__PURE__ */ jsxs52(Fragment43, { children: [
62253
+ previewUrl && !isUploading ? /* @__PURE__ */ jsxs52("div", { style: innerStyle, className: "sylphx-upload-hover", children: [
62009
62254
  /* @__PURE__ */ jsx75(
62010
62255
  "img",
62011
62256
  {
@@ -62023,6 +62268,7 @@ function ImageUploaderInner({
62023
62268
  /* @__PURE__ */ jsxs52(
62024
62269
  "div",
62025
62270
  {
62271
+ className: "sylphx-upload-hover__overlay",
62026
62272
  style: {
62027
62273
  position: "absolute",
62028
62274
  inset: 0,
@@ -62033,8 +62279,6 @@ function ImageUploaderInner({
62033
62279
  opacity: 0,
62034
62280
  transition: "opacity 0.2s ease"
62035
62281
  },
62036
- onMouseEnter: (e2) => e2.currentTarget.style.opacity = "1",
62037
- onMouseLeave: (e2) => e2.currentTarget.style.opacity = "0",
62038
62282
  children: [
62039
62283
  /* @__PURE__ */ jsx75(
62040
62284
  "button",
@@ -62047,22 +62291,59 @@ function ImageUploaderInner({
62047
62291
  children: "Remove"
62048
62292
  }
62049
62293
  ),
62050
- /* @__PURE__ */ jsx75("button", { type: "button", style: mergeStyles(styles2.button, styles2.buttonPrimary), children: "Replace" })
62294
+ /* @__PURE__ */ jsx75(
62295
+ "button",
62296
+ {
62297
+ type: "button",
62298
+ onClick: handleClick,
62299
+ style: mergeStyles(styles2.button, styles2.buttonPrimary),
62300
+ children: "Replace"
62301
+ }
62302
+ )
62051
62303
  ]
62052
62304
  }
62053
62305
  )
62054
- ] }) : /* @__PURE__ */ jsxs52("div", { style: { textAlign: "center" }, children: [
62055
- /* @__PURE__ */ jsx75(ImageIcon, { color: theme.colorMutedForeground }),
62056
- /* @__PURE__ */ jsx75(
62057
- "p",
62058
- {
62059
- style: mergeStyles(styles2.textSm, styles2.textMuted, {
62060
- marginTop: "0.5rem"
62061
- }),
62062
- children: placeholder
62063
- }
62064
- )
62065
- ] }) })
62306
+ ] }) : /* @__PURE__ */ jsx75(
62307
+ "button",
62308
+ {
62309
+ type: "button",
62310
+ onClick: handleClick,
62311
+ disabled: disabled2 || isUploading,
62312
+ "aria-label": "Upload image",
62313
+ style: {
62314
+ ...innerStyle,
62315
+ font: "inherit",
62316
+ color: "inherit",
62317
+ cursor: disabled2 || isUploading ? "not-allowed" : "pointer"
62318
+ },
62319
+ children: isUploading ? /* @__PURE__ */ jsxs52("div", { style: { textAlign: "center" }, children: [
62320
+ /* @__PURE__ */ jsx75("span", { style: styles2.spinner }),
62321
+ /* @__PURE__ */ jsxs52(
62322
+ "p",
62323
+ {
62324
+ style: mergeStyles(styles2.textSm, styles2.textMuted, {
62325
+ marginTop: "0.5rem"
62326
+ }),
62327
+ children: [
62328
+ progress2,
62329
+ "%"
62330
+ ]
62331
+ }
62332
+ )
62333
+ ] }) : /* @__PURE__ */ jsxs52("div", { style: { textAlign: "center" }, children: [
62334
+ /* @__PURE__ */ jsx75(ImageIcon, { color: theme.colorMutedForeground }),
62335
+ /* @__PURE__ */ jsx75(
62336
+ "p",
62337
+ {
62338
+ style: mergeStyles(styles2.textSm, styles2.textMuted, {
62339
+ marginTop: "0.5rem"
62340
+ }),
62341
+ children: placeholder
62342
+ }
62343
+ )
62344
+ ] })
62345
+ }
62346
+ )
62066
62347
  ] }),
62067
62348
  error2 && /* @__PURE__ */ jsx75(
62068
62349
  "div",
@@ -62153,50 +62434,66 @@ function AvatarUploadInner({
62153
62434
  fontWeight: 600
62154
62435
  };
62155
62436
  return /* @__PURE__ */ jsxs52("div", { className, style: { fontFamily: theme.fontFamily }, children: [
62156
- /* @__PURE__ */ jsxs52("div", { style: containerStyle, onClick: handleClick, children: [
62157
- /* @__PURE__ */ jsx75(
62158
- "input",
62159
- {
62160
- ref: inputRef,
62161
- type: "file",
62162
- accept: "image/*",
62163
- onChange: handleInputChange,
62164
- style: { display: "none" },
62165
- disabled: disabled2
62166
- }
62167
- ),
62168
- /* @__PURE__ */ jsx75("div", { style: innerStyle, children: isUploading ? /* @__PURE__ */ jsx75("span", { style: styles2.spinner }) : previewUrl ? /* @__PURE__ */ jsx75(
62169
- "img",
62170
- {
62171
- src: previewUrl,
62172
- alt: "Avatar",
62173
- style: {
62174
- width: "100%",
62175
- height: "100%",
62176
- objectFit: "cover"
62177
- }
62178
- }
62179
- ) : initials ? initials : /* @__PURE__ */ jsx75(UserIcon, { color: theme.colorMutedForeground, size: size4 * 0.4 }) }),
62180
- /* @__PURE__ */ jsx75(
62181
- "div",
62182
- {
62183
- style: {
62184
- position: "absolute",
62185
- inset: 0,
62186
- backgroundColor: "rgba(0, 0, 0, 0.5)",
62187
- display: "flex",
62188
- alignItems: "center",
62189
- justifyContent: "center",
62190
- opacity: 0,
62191
- transition: "opacity 0.2s ease",
62192
- borderRadius: "50%"
62193
- },
62194
- onMouseEnter: (e2) => e2.currentTarget.style.opacity = "1",
62195
- onMouseLeave: (e2) => e2.currentTarget.style.opacity = "0",
62196
- children: /* @__PURE__ */ jsx75(CameraIcon, { color: "#fff" })
62197
- }
62198
- )
62199
- ] }),
62437
+ /* @__PURE__ */ jsxs52(
62438
+ "button",
62439
+ {
62440
+ type: "button",
62441
+ onClick: handleClick,
62442
+ disabled: disabled2 || isUploading,
62443
+ "aria-label": "Upload avatar",
62444
+ className: "sylphx-upload-hover",
62445
+ style: {
62446
+ ...containerStyle,
62447
+ border: "none",
62448
+ padding: 0,
62449
+ background: "transparent",
62450
+ cursor: disabled2 || isUploading ? "not-allowed" : "pointer"
62451
+ },
62452
+ children: [
62453
+ /* @__PURE__ */ jsx75(
62454
+ "input",
62455
+ {
62456
+ ref: inputRef,
62457
+ type: "file",
62458
+ accept: "image/*",
62459
+ onChange: handleInputChange,
62460
+ style: { display: "none" },
62461
+ disabled: disabled2
62462
+ }
62463
+ ),
62464
+ /* @__PURE__ */ jsx75("div", { style: innerStyle, children: isUploading ? /* @__PURE__ */ jsx75("span", { style: styles2.spinner }) : previewUrl ? /* @__PURE__ */ jsx75(
62465
+ "img",
62466
+ {
62467
+ src: previewUrl,
62468
+ alt: "Avatar",
62469
+ style: {
62470
+ width: "100%",
62471
+ height: "100%",
62472
+ objectFit: "cover"
62473
+ }
62474
+ }
62475
+ ) : initials ? initials : /* @__PURE__ */ jsx75(UserIcon, { color: theme.colorMutedForeground, size: size4 * 0.4 }) }),
62476
+ /* @__PURE__ */ jsx75(
62477
+ "div",
62478
+ {
62479
+ className: "sylphx-upload-hover__overlay",
62480
+ style: {
62481
+ position: "absolute",
62482
+ inset: 0,
62483
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
62484
+ display: "flex",
62485
+ alignItems: "center",
62486
+ justifyContent: "center",
62487
+ opacity: 0,
62488
+ transition: "opacity 0.2s ease",
62489
+ borderRadius: "50%"
62490
+ },
62491
+ children: /* @__PURE__ */ jsx75(CameraIcon, { color: "#fff" })
62492
+ }
62493
+ )
62494
+ ]
62495
+ }
62496
+ ),
62200
62497
  uploadError && /* @__PURE__ */ jsx75(
62201
62498
  "p",
62202
62499
  {
@@ -62241,18 +62538,44 @@ function formatFileSize(bytes) {
62241
62538
  return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
62242
62539
  }
62243
62540
  function UploadIcon({ color: color2 }) {
62244
- return /* @__PURE__ */ jsxs52("svg", { width: "40", height: "40", viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "1.5", children: [
62245
- /* @__PURE__ */ jsx75("path", { d: "M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4" }),
62246
- /* @__PURE__ */ jsx75("polyline", { points: "17 8 12 3 7 8" }),
62247
- /* @__PURE__ */ jsx75("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
62248
- ] });
62541
+ return /* @__PURE__ */ jsxs52(
62542
+ "svg",
62543
+ {
62544
+ width: "40",
62545
+ height: "40",
62546
+ viewBox: "0 0 24 24",
62547
+ fill: "none",
62548
+ stroke: color2,
62549
+ strokeWidth: "1.5",
62550
+ "aria-hidden": "true",
62551
+ focusable: "false",
62552
+ children: [
62553
+ /* @__PURE__ */ jsx75("path", { d: "M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4" }),
62554
+ /* @__PURE__ */ jsx75("polyline", { points: "17 8 12 3 7 8" }),
62555
+ /* @__PURE__ */ jsx75("line", { x1: "12", y1: "3", x2: "12", y2: "15" })
62556
+ ]
62557
+ }
62558
+ );
62249
62559
  }
62250
62560
  function ImageIcon({ color: color2 }) {
62251
- return /* @__PURE__ */ jsxs52("svg", { width: "40", height: "40", viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "1.5", children: [
62252
- /* @__PURE__ */ jsx75("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
62253
- /* @__PURE__ */ jsx75("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
62254
- /* @__PURE__ */ jsx75("polyline", { points: "21 15 16 10 5 21" })
62255
- ] });
62561
+ return /* @__PURE__ */ jsxs52(
62562
+ "svg",
62563
+ {
62564
+ width: "40",
62565
+ height: "40",
62566
+ viewBox: "0 0 24 24",
62567
+ fill: "none",
62568
+ stroke: color2,
62569
+ strokeWidth: "1.5",
62570
+ "aria-hidden": "true",
62571
+ focusable: "false",
62572
+ children: [
62573
+ /* @__PURE__ */ jsx75("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
62574
+ /* @__PURE__ */ jsx75("circle", { cx: "8.5", cy: "8.5", r: "1.5" }),
62575
+ /* @__PURE__ */ jsx75("polyline", { points: "21 15 16 10 5 21" })
62576
+ ]
62577
+ }
62578
+ );
62256
62579
  }
62257
62580
  function UserIcon({ color: color2, size: size4 = 24 }) {
62258
62581
  return /* @__PURE__ */ jsxs52(
@@ -62264,6 +62587,8 @@ function UserIcon({ color: color2, size: size4 = 24 }) {
62264
62587
  fill: "none",
62265
62588
  stroke: color2,
62266
62589
  strokeWidth: "1.5",
62590
+ "aria-hidden": "true",
62591
+ focusable: "false",
62267
62592
  children: [
62268
62593
  /* @__PURE__ */ jsx75("path", { d: "M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2" }),
62269
62594
  /* @__PURE__ */ jsx75("circle", { cx: "12", cy: "7", r: "4" })
@@ -62272,10 +62597,23 @@ function UserIcon({ color: color2, size: size4 = 24 }) {
62272
62597
  );
62273
62598
  }
62274
62599
  function CameraIcon({ color: color2 }) {
62275
- return /* @__PURE__ */ jsxs52("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "2", children: [
62276
- /* @__PURE__ */ jsx75("path", { d: "M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z" }),
62277
- /* @__PURE__ */ jsx75("circle", { cx: "12", cy: "13", r: "4" })
62278
- ] });
62600
+ return /* @__PURE__ */ jsxs52(
62601
+ "svg",
62602
+ {
62603
+ width: "24",
62604
+ height: "24",
62605
+ viewBox: "0 0 24 24",
62606
+ fill: "none",
62607
+ stroke: color2,
62608
+ strokeWidth: "2",
62609
+ "aria-hidden": "true",
62610
+ focusable: "false",
62611
+ children: [
62612
+ /* @__PURE__ */ jsx75("path", { d: "M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z" }),
62613
+ /* @__PURE__ */ jsx75("circle", { cx: "12", cy: "13", r: "4" })
62614
+ ]
62615
+ }
62616
+ );
62279
62617
  }
62280
62618
  function CloseIcon5() {
62281
62619
  return /* @__PURE__ */ jsxs52(
@@ -62287,6 +62625,8 @@ function CloseIcon5() {
62287
62625
  fill: "none",
62288
62626
  stroke: "currentColor",
62289
62627
  strokeWidth: "2",
62628
+ "aria-hidden": "true",
62629
+ focusable: "false",
62290
62630
  children: [
62291
62631
  /* @__PURE__ */ jsx75("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
62292
62632
  /* @__PURE__ */ jsx75("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
@@ -63368,7 +63708,10 @@ function ModelSelector({
63368
63708
  justifyContent: "space-between",
63369
63709
  cursor: disabled2 ? "not-allowed" : "pointer",
63370
63710
  opacity: disabled2 ? 0.5 : 1,
63371
- padding: compact ? "0.5rem 0.75rem" : "0.75rem 1rem"
63711
+ padding: compact ? "0.5rem 0.75rem" : "0.75rem 1rem",
63712
+ textAlign: "left",
63713
+ font: "inherit",
63714
+ color: "inherit"
63372
63715
  });
63373
63716
  const dropdownStyles = {
63374
63717
  position: "absolute",
@@ -63421,18 +63764,14 @@ function ModelSelector({
63421
63764
  });
63422
63765
  return /* @__PURE__ */ jsxs54("div", { ref: containerRef, style: containerStyles, className, children: [
63423
63766
  /* @__PURE__ */ jsxs54(
63424
- "div",
63767
+ "button",
63425
63768
  {
63769
+ type: "button",
63426
63770
  style: triggerStyles,
63427
63771
  onClick: () => !disabled2 && setIsOpen(!isOpen),
63428
- role: "button",
63429
- tabIndex: disabled2 ? -1 : 0,
63430
- onKeyDown: (e2) => {
63431
- if (e2.key === "Enter" || e2.key === " ") {
63432
- e2.preventDefault();
63433
- if (!disabled2) setIsOpen(!isOpen);
63434
- }
63435
- },
63772
+ disabled: disabled2,
63773
+ "aria-haspopup": "listbox",
63774
+ "aria-expanded": isOpen,
63436
63775
  children: [
63437
63776
  /* @__PURE__ */ jsx77(
63438
63777
  "div",
@@ -63480,7 +63819,7 @@ function ModelSelector({
63480
63819
  style: searchInputStyles
63481
63820
  }
63482
63821
  ),
63483
- /* @__PURE__ */ jsxs54("div", { style: listStyles, onScroll: handleScroll, children: [
63822
+ /* @__PURE__ */ jsxs54("div", { role: "listbox", style: listStyles, onScroll: handleScroll, children: [
63484
63823
  error2 && /* @__PURE__ */ jsx77(
63485
63824
  "div",
63486
63825
  {
@@ -63500,9 +63839,19 @@ function ModelSelector({
63500
63839
  }
63501
63840
  ),
63502
63841
  models.map((model) => /* @__PURE__ */ jsxs54(
63503
- "div",
63842
+ "button",
63504
63843
  {
63505
- style: itemStyles(model.id === value),
63844
+ type: "button",
63845
+ role: "option",
63846
+ "aria-selected": model.id === value,
63847
+ style: {
63848
+ ...itemStyles(model.id === value),
63849
+ textAlign: "left",
63850
+ font: "inherit",
63851
+ color: "inherit",
63852
+ width: "100%",
63853
+ cursor: "pointer"
63854
+ },
63506
63855
  onClick: () => handleSelect(model),
63507
63856
  onMouseEnter: (e2) => {
63508
63857
  if (model.id !== value) {
@@ -63609,6 +63958,8 @@ function ChevronIcon2({ direction }) {
63609
63958
  strokeLinecap: "round",
63610
63959
  strokeLinejoin: "round",
63611
63960
  style: { transform: direction === "up" ? "rotate(180deg)" : void 0 },
63961
+ "aria-hidden": "true",
63962
+ focusable: "false",
63612
63963
  children: /* @__PURE__ */ jsx77("polyline", { points: "6 9 12 15 18 9" })
63613
63964
  }
63614
63965
  );
@@ -63665,12 +64016,26 @@ function ModelCard({
63665
64016
  textTransform: "uppercase",
63666
64017
  letterSpacing: "0.05em"
63667
64018
  });
64019
+ const CardTag = onSelect ? "button" : "div";
64020
+ const cardInteractiveProps = onSelect ? {
64021
+ type: "button",
64022
+ onClick: onSelect,
64023
+ "aria-pressed": selected
64024
+ } : {};
63668
64025
  return /* @__PURE__ */ jsxs54(
63669
- "div",
64026
+ CardTag,
63670
64027
  {
63671
- style: cardStyles,
64028
+ ...cardInteractiveProps,
64029
+ style: {
64030
+ ...cardStyles,
64031
+ ...onSelect ? {
64032
+ textAlign: "left",
64033
+ font: "inherit",
64034
+ color: "inherit",
64035
+ width: "100%"
64036
+ } : {}
64037
+ },
63672
64038
  className,
63673
- onClick: onSelect,
63674
64039
  onMouseEnter: (e2) => {
63675
64040
  if (onSelect && !selected) {
63676
64041
  e2.currentTarget.style.borderColor = theme.colorPrimary;
@@ -63897,6 +64262,7 @@ function ModelGrid({
63897
64262
  }
63898
64263
 
63899
64264
  // src/react/ui/newsletter-form.tsx
64265
+ import { EMAIL_REGEX } from "@sylphx/contract";
63900
64266
  import { useEffect as useEffect78, useState as useState94 } from "react";
63901
64267
  import { jsx as jsx78, jsxs as jsxs55 } from "react/jsx-runtime";
63902
64268
  function NewsletterForm({
@@ -63945,7 +64311,7 @@ function NewsletterForm({
63945
64311
  const handleSubmit = async (e2) => {
63946
64312
  e2.preventDefault();
63947
64313
  setLocalError(null);
63948
- if (!email || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
64314
+ if (!email || !EMAIL_REGEX.test(email)) {
63949
64315
  setLocalError("Please enter a valid email address");
63950
64316
  return;
63951
64317
  }
@@ -63975,6 +64341,8 @@ function NewsletterForm({
63975
64341
  fill: "none",
63976
64342
  stroke: "currentColor",
63977
64343
  strokeWidth: "2",
64344
+ "aria-hidden": "true",
64345
+ focusable: "false",
63978
64346
  children: [
63979
64347
  /* @__PURE__ */ jsx78("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
63980
64348
  /* @__PURE__ */ jsx78("polyline", { points: "22 4 12 14.01 9 11.01" })
@@ -64364,6 +64732,8 @@ function BellOffIcon({ size: size4 = 24 }) {
64364
64732
  strokeLinecap: "round",
64365
64733
  strokeLinejoin: "round",
64366
64734
  style: { flexShrink: 0 },
64735
+ "aria-hidden": "true",
64736
+ focusable: "false",
64367
64737
  children: [
64368
64738
  /* @__PURE__ */ jsx79("path", { d: "M13.73 21a2 2 0 0 1-3.46 0" }),
64369
64739
  /* @__PURE__ */ jsx79("path", { d: "M18.63 13A17.89 17.89 0 0 1 18 8" }),
@@ -64377,7 +64747,7 @@ function BellOffIcon({ size: size4 = 24 }) {
64377
64747
 
64378
64748
  // src/react/ui/organization-management.tsx
64379
64749
  init_constants();
64380
- import { useEffect as useEffect80, useState as useState96 } from "react";
64750
+ import { useEffect as useEffect80, useId as useId13, useState as useState96 } from "react";
64381
64751
  import { Fragment as Fragment45, jsx as jsx80, jsxs as jsxs57 } from "react/jsx-runtime";
64382
64752
  function OrganizationProfile(props) {
64383
64753
  return /* @__PURE__ */ jsx80(RequireSdk, { services: ["organization"], componentType: "organization", theme: props.theme, children: /* @__PURE__ */ jsx80(OrganizationProfileInner, { ...props }) });
@@ -64395,6 +64765,9 @@ function OrganizationProfileInner({
64395
64765
  const hookResult = useOrganization();
64396
64766
  const org = propOrg ?? hookResult.organization;
64397
64767
  const members = hookResult.members;
64768
+ const nameId = useId13();
64769
+ const slugId = useId13();
64770
+ const deleteConfirmId = useId13();
64398
64771
  const [name, setName] = useState96(org?.name ?? "");
64399
64772
  const [slug, setSlug] = useState96(org?.slug ?? "");
64400
64773
  const [isSaving, setIsSaving] = useState96(false);
@@ -64496,6 +64869,7 @@ function OrganizationProfileInner({
64496
64869
  /* @__PURE__ */ jsx80(
64497
64870
  "label",
64498
64871
  {
64872
+ htmlFor: nameId,
64499
64873
  style: {
64500
64874
  display: "block",
64501
64875
  marginBottom: "0.5rem",
@@ -64508,6 +64882,7 @@ function OrganizationProfileInner({
64508
64882
  /* @__PURE__ */ jsx80(
64509
64883
  "input",
64510
64884
  {
64885
+ id: nameId,
64511
64886
  type: "text",
64512
64887
  value: name,
64513
64888
  onChange: (e2) => setName(e2.target.value),
@@ -64521,6 +64896,7 @@ function OrganizationProfileInner({
64521
64896
  /* @__PURE__ */ jsx80(
64522
64897
  "label",
64523
64898
  {
64899
+ htmlFor: slugId,
64524
64900
  style: {
64525
64901
  display: "block",
64526
64902
  marginBottom: "0.5rem",
@@ -64533,6 +64909,7 @@ function OrganizationProfileInner({
64533
64909
  /* @__PURE__ */ jsx80(
64534
64910
  "input",
64535
64911
  {
64912
+ id: slugId,
64536
64913
  type: "text",
64537
64914
  value: slug,
64538
64915
  onChange: (e2) => setSlug(e2.target.value.toLowerCase().replace(/[^a-z0-9-]/g, "")),
@@ -64711,6 +65088,7 @@ function OrganizationProfileInner({
64711
65088
  /* @__PURE__ */ jsxs57(
64712
65089
  "label",
64713
65090
  {
65091
+ htmlFor: deleteConfirmId,
64714
65092
  style: {
64715
65093
  display: "block",
64716
65094
  marginBottom: "0.5rem",
@@ -64726,6 +65104,7 @@ function OrganizationProfileInner({
64726
65104
  /* @__PURE__ */ jsx80(
64727
65105
  "input",
64728
65106
  {
65107
+ id: deleteConfirmId,
64729
65108
  type: "text",
64730
65109
  value: deleteConfirm,
64731
65110
  onChange: (e2) => setDeleteConfirm(e2.target.value),
@@ -64760,6 +65139,8 @@ function CreateOrganization({
64760
65139
  onCancel,
64761
65140
  showCancel = true
64762
65141
  }) {
65142
+ const createNameId = useId13();
65143
+ const createSlugId = useId13();
64763
65144
  const [name, setName] = useState96("");
64764
65145
  const [slug, setSlug] = useState96("");
64765
65146
  const [isCreating, setIsCreating] = useState96(false);
@@ -64842,6 +65223,7 @@ function CreateOrganization({
64842
65223
  /* @__PURE__ */ jsx80(
64843
65224
  "label",
64844
65225
  {
65226
+ htmlFor: createNameId,
64845
65227
  style: {
64846
65228
  display: "block",
64847
65229
  marginBottom: "0.5rem",
@@ -64854,6 +65236,7 @@ function CreateOrganization({
64854
65236
  /* @__PURE__ */ jsx80(
64855
65237
  "input",
64856
65238
  {
65239
+ id: createNameId,
64857
65240
  type: "text",
64858
65241
  value: name,
64859
65242
  onChange: (e2) => setName(e2.target.value),
@@ -64867,6 +65250,7 @@ function CreateOrganization({
64867
65250
  /* @__PURE__ */ jsx80(
64868
65251
  "label",
64869
65252
  {
65253
+ htmlFor: createSlugId,
64870
65254
  style: {
64871
65255
  display: "block",
64872
65256
  marginBottom: "0.5rem",
@@ -64879,6 +65263,7 @@ function CreateOrganization({
64879
65263
  /* @__PURE__ */ jsx80(
64880
65264
  "input",
64881
65265
  {
65266
+ id: createSlugId,
64882
65267
  type: "text",
64883
65268
  value: slug,
64884
65269
  onChange: (e2) => setSlug(e2.target.value.toLowerCase().replace(/[^a-z0-9-]/g, "")),
@@ -64979,16 +65364,15 @@ function OrganizationList({
64979
65364
  }
64980
65365
  ) : /* @__PURE__ */ jsxs57(Fragment45, { children: [
64981
65366
  /* @__PURE__ */ jsx80("div", { style: { display: "flex", flexDirection: "column", gap: "0.5rem" }, children: organizations.map((org) => /* @__PURE__ */ jsxs57(
64982
- "div",
65367
+ "button",
64983
65368
  {
65369
+ type: "button",
64984
65370
  onClick: () => onSelect?.(org),
64985
- style: itemStyle(org.id === selectedId),
64986
- role: "button",
64987
- tabIndex: 0,
64988
- onKeyDown: (e2) => {
64989
- if (e2.key === "Enter" || e2.key === " ") {
64990
- onSelect?.(org);
64991
- }
65371
+ style: {
65372
+ ...itemStyle(org.id === selectedId),
65373
+ textAlign: "left",
65374
+ font: "inherit",
65375
+ color: "inherit"
64992
65376
  },
64993
65377
  children: [
64994
65378
  /* @__PURE__ */ jsx80(
@@ -65059,6 +65443,8 @@ function OrgIcon({ color: color2, size: size4 = 24 }) {
65059
65443
  strokeWidth: "2",
65060
65444
  strokeLinecap: "round",
65061
65445
  strokeLinejoin: "round",
65446
+ "aria-hidden": "true",
65447
+ focusable: "false",
65062
65448
  children: [
65063
65449
  /* @__PURE__ */ jsx80("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
65064
65450
  /* @__PURE__ */ jsx80("circle", { cx: "9", cy: "7", r: "4" }),
@@ -65080,6 +65466,8 @@ function CheckIcon13({ color: color2 }) {
65080
65466
  strokeWidth: "2",
65081
65467
  strokeLinecap: "round",
65082
65468
  strokeLinejoin: "round",
65469
+ "aria-hidden": "true",
65470
+ focusable: "false",
65083
65471
  children: /* @__PURE__ */ jsx80("polyline", { points: "20 6 9 17 4 12" })
65084
65472
  }
65085
65473
  );
@@ -65097,6 +65485,8 @@ function PlusIcon5({ color: color2 }) {
65097
65485
  strokeLinecap: "round",
65098
65486
  strokeLinejoin: "round",
65099
65487
  style: { marginRight: "0.25rem" },
65488
+ "aria-hidden": "true",
65489
+ focusable: "false",
65100
65490
  children: [
65101
65491
  /* @__PURE__ */ jsx80("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
65102
65492
  /* @__PURE__ */ jsx80("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
@@ -65345,8 +65735,12 @@ function NotificationBell({
65345
65735
  onClick,
65346
65736
  style: buttonStyle,
65347
65737
  className,
65348
- onMouseEnter: (e2) => e2.currentTarget.style.backgroundColor = theme.colorMuted,
65349
- onMouseLeave: (e2) => e2.currentTarget.style.backgroundColor = "transparent",
65738
+ onMouseEnter: (e2) => {
65739
+ e2.currentTarget.style.backgroundColor = theme.colorMuted;
65740
+ },
65741
+ onMouseLeave: (e2) => {
65742
+ e2.currentTarget.style.backgroundColor = "transparent";
65743
+ },
65350
65744
  children: [
65351
65745
  /* @__PURE__ */ jsx81(BellIcon, { color: color2 || theme.colorForeground, size: s2.icon }),
65352
65746
  count > 0 && /* @__PURE__ */ jsx81("span", { style: badgeStyle, children: showDot ? null : displayCount })
@@ -65464,12 +65858,12 @@ function NotificationItem({
65464
65858
  const styles2 = baseStyles(theme);
65465
65859
  const [showActions, setShowActions] = useState97(false);
65466
65860
  const itemStyle = {
65861
+ position: "relative",
65467
65862
  display: "flex",
65468
65863
  alignItems: "flex-start",
65469
65864
  gap: "0.75rem",
65470
65865
  padding: "0.75rem 1rem",
65471
65866
  borderBottom: `1px solid ${theme.colorBorder}`,
65472
- cursor: "pointer",
65473
65867
  transition: "background-color 0.15s ease",
65474
65868
  backgroundColor: notification.read ? "transparent" : `${theme.colorPrimary}08`
65475
65869
  };
@@ -65486,141 +65880,167 @@ function NotificationItem({
65486
65880
  if (days < 7) return `${days}d ago`;
65487
65881
  return d2.toLocaleDateString();
65488
65882
  };
65489
- return /* @__PURE__ */ jsxs58(
65490
- "div",
65491
- {
65492
- style: itemStyle,
65493
- onClick,
65494
- onMouseEnter: (e2) => {
65495
- e2.currentTarget.style.backgroundColor = theme.colorMuted;
65496
- setShowActions(true);
65497
- },
65498
- onMouseLeave: (e2) => {
65499
- e2.currentTarget.style.backgroundColor = notification.read ? "transparent" : `${theme.colorPrimary}08`;
65500
- setShowActions(false);
65501
- },
65502
- children: [
65883
+ return /* @__PURE__ */ jsxs58("div", { className: "sylphx-notification-item", style: itemStyle, children: [
65884
+ onClick && /* @__PURE__ */ jsx81(
65885
+ "button",
65886
+ {
65887
+ type: "button",
65888
+ onClick,
65889
+ "aria-label": notification.title,
65890
+ onMouseEnter: () => setShowActions(true),
65891
+ onMouseLeave: () => setShowActions(false),
65892
+ onFocus: () => setShowActions(true),
65893
+ onBlur: () => setShowActions(false),
65894
+ style: {
65895
+ position: "absolute",
65896
+ inset: 0,
65897
+ background: "transparent",
65898
+ border: "none",
65899
+ padding: 0,
65900
+ cursor: "pointer",
65901
+ zIndex: 1
65902
+ }
65903
+ }
65904
+ ),
65905
+ /* @__PURE__ */ jsx81(
65906
+ "div",
65907
+ {
65908
+ style: {
65909
+ width: "40px",
65910
+ height: "40px",
65911
+ borderRadius: "50%",
65912
+ backgroundColor: theme.colorMuted,
65913
+ display: "flex",
65914
+ alignItems: "center",
65915
+ justifyContent: "center",
65916
+ flexShrink: 0,
65917
+ overflow: "hidden"
65918
+ },
65919
+ children: notification.icon ? /* @__PURE__ */ jsx81(
65920
+ "img",
65921
+ {
65922
+ src: notification.icon,
65923
+ alt: "",
65924
+ style: { width: "100%", height: "100%", objectFit: "cover" }
65925
+ }
65926
+ ) : /* @__PURE__ */ jsx81(BellIcon, { color: theme.colorMutedForeground, size: 20 })
65927
+ }
65928
+ ),
65929
+ /* @__PURE__ */ jsxs58("div", { style: { flex: 1, minWidth: 0 }, children: [
65930
+ /* @__PURE__ */ jsxs58("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
65503
65931
  /* @__PURE__ */ jsx81(
65504
- "div",
65932
+ "span",
65505
65933
  {
65506
65934
  style: {
65507
- width: "40px",
65508
- height: "40px",
65509
- borderRadius: "50%",
65510
- backgroundColor: theme.colorMuted,
65511
- display: "flex",
65512
- alignItems: "center",
65513
- justifyContent: "center",
65514
- flexShrink: 0,
65515
- overflow: "hidden"
65935
+ fontWeight: notification.read ? 400 : 600,
65936
+ fontSize: theme.fontSizeSm,
65937
+ overflow: "hidden",
65938
+ textOverflow: "ellipsis",
65939
+ whiteSpace: "nowrap"
65516
65940
  },
65517
- children: notification.icon ? /* @__PURE__ */ jsx81(
65518
- "img",
65519
- {
65520
- src: notification.icon,
65521
- alt: "",
65522
- style: { width: "100%", height: "100%", objectFit: "cover" }
65523
- }
65524
- ) : /* @__PURE__ */ jsx81(BellIcon, { color: theme.colorMutedForeground, size: 20 })
65941
+ children: notification.title
65525
65942
  }
65526
65943
  ),
65527
- /* @__PURE__ */ jsxs58("div", { style: { flex: 1, minWidth: 0 }, children: [
65528
- /* @__PURE__ */ jsxs58("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
65529
- /* @__PURE__ */ jsx81(
65530
- "span",
65531
- {
65532
- style: {
65533
- fontWeight: notification.read ? 400 : 600,
65534
- fontSize: theme.fontSizeSm,
65535
- overflow: "hidden",
65536
- textOverflow: "ellipsis",
65537
- whiteSpace: "nowrap"
65538
- },
65539
- children: notification.title
65540
- }
65541
- ),
65542
- !notification.read && /* @__PURE__ */ jsx81(
65543
- "span",
65544
- {
65545
- style: {
65546
- width: "8px",
65547
- height: "8px",
65548
- borderRadius: "50%",
65549
- backgroundColor: theme.colorPrimary,
65550
- flexShrink: 0
65551
- }
65552
- }
65553
- )
65554
- ] }),
65555
- notification.body && /* @__PURE__ */ jsx81(
65556
- "p",
65944
+ !notification.read && /* @__PURE__ */ jsx81(
65945
+ "span",
65946
+ {
65947
+ style: {
65948
+ width: "8px",
65949
+ height: "8px",
65950
+ borderRadius: "50%",
65951
+ backgroundColor: theme.colorPrimary,
65952
+ flexShrink: 0
65953
+ }
65954
+ }
65955
+ )
65956
+ ] }),
65957
+ notification.body && /* @__PURE__ */ jsx81(
65958
+ "p",
65959
+ {
65960
+ style: {
65961
+ margin: "0.25rem 0 0",
65962
+ fontSize: theme.fontSizeXs,
65963
+ color: theme.colorMutedForeground,
65964
+ overflow: "hidden",
65965
+ textOverflow: "ellipsis",
65966
+ whiteSpace: "nowrap"
65967
+ },
65968
+ children: notification.body
65969
+ }
65970
+ ),
65971
+ /* @__PURE__ */ jsx81(
65972
+ "p",
65973
+ {
65974
+ style: {
65975
+ margin: "0.25rem 0 0",
65976
+ fontSize: theme.fontSizeXs,
65977
+ color: theme.colorMutedForeground
65978
+ },
65979
+ children: formatTime(notification.createdAt)
65980
+ }
65981
+ )
65982
+ ] }),
65983
+ showActions && /* @__PURE__ */ jsxs58(
65984
+ "div",
65985
+ {
65986
+ style: {
65987
+ display: "flex",
65988
+ gap: "0.25rem",
65989
+ flexShrink: 0,
65990
+ position: "relative",
65991
+ zIndex: 2
65992
+ },
65993
+ role: "toolbar",
65994
+ "aria-label": "Notification actions",
65995
+ children: [
65996
+ !notification.read && onMarkAsRead && /* @__PURE__ */ jsx81(
65997
+ "button",
65557
65998
  {
65558
- style: {
65559
- margin: "0.25rem 0 0",
65560
- fontSize: theme.fontSizeXs,
65561
- color: theme.colorMutedForeground,
65562
- overflow: "hidden",
65563
- textOverflow: "ellipsis",
65564
- whiteSpace: "nowrap"
65565
- },
65566
- children: notification.body
65999
+ type: "button",
66000
+ onClick: onMarkAsRead,
66001
+ style: mergeStyles(styles2.button, styles2.buttonGhost, {
66002
+ padding: "0.25rem"
66003
+ }),
66004
+ title: "Mark as read",
66005
+ children: /* @__PURE__ */ jsx81(CheckIcon14, { color: theme.colorMutedForeground })
65567
66006
  }
65568
66007
  ),
65569
- /* @__PURE__ */ jsx81(
65570
- "p",
66008
+ onDelete && /* @__PURE__ */ jsx81(
66009
+ "button",
65571
66010
  {
65572
- style: {
65573
- margin: "0.25rem 0 0",
65574
- fontSize: theme.fontSizeXs,
65575
- color: theme.colorMutedForeground
65576
- },
65577
- children: formatTime(notification.createdAt)
66011
+ type: "button",
66012
+ onClick: onDelete,
66013
+ style: mergeStyles(styles2.button, styles2.buttonGhost, {
66014
+ padding: "0.25rem"
66015
+ }),
66016
+ title: "Delete",
66017
+ children: /* @__PURE__ */ jsx81(TrashIcon3, { color: theme.colorMutedForeground })
65578
66018
  }
65579
66019
  )
65580
- ] }),
65581
- showActions && /* @__PURE__ */ jsxs58(
65582
- "div",
65583
- {
65584
- style: { display: "flex", gap: "0.25rem", flexShrink: 0 },
65585
- onClick: (e2) => e2.stopPropagation(),
65586
- children: [
65587
- !notification.read && onMarkAsRead && /* @__PURE__ */ jsx81(
65588
- "button",
65589
- {
65590
- type: "button",
65591
- onClick: onMarkAsRead,
65592
- style: mergeStyles(styles2.button, styles2.buttonGhost, {
65593
- padding: "0.25rem"
65594
- }),
65595
- title: "Mark as read",
65596
- children: /* @__PURE__ */ jsx81(CheckIcon14, { color: theme.colorMutedForeground })
65597
- }
65598
- ),
65599
- onDelete && /* @__PURE__ */ jsx81(
65600
- "button",
65601
- {
65602
- type: "button",
65603
- onClick: onDelete,
65604
- style: mergeStyles(styles2.button, styles2.buttonGhost, {
65605
- padding: "0.25rem"
65606
- }),
65607
- title: "Delete",
65608
- children: /* @__PURE__ */ jsx81(TrashIcon3, { color: theme.colorMutedForeground })
65609
- }
65610
- )
65611
- ]
65612
- }
65613
- )
66020
+ ]
66021
+ }
66022
+ )
66023
+ ] });
66024
+ }
66025
+ function BellIcon({ color: color2, size: size4 = 24 }) {
66026
+ return /* @__PURE__ */ jsxs58(
66027
+ "svg",
66028
+ {
66029
+ width: size4,
66030
+ height: size4,
66031
+ viewBox: "0 0 24 24",
66032
+ fill: "none",
66033
+ stroke: color2,
66034
+ strokeWidth: "2",
66035
+ "aria-hidden": "true",
66036
+ focusable: "false",
66037
+ children: [
66038
+ /* @__PURE__ */ jsx81("path", { d: "M18 8A6 6 0 006 8c0 7-3 9-3 9h18s-3-2-3-9" }),
66039
+ /* @__PURE__ */ jsx81("path", { d: "M13.73 21a2 2 0 01-3.46 0" })
65614
66040
  ]
65615
66041
  }
65616
66042
  );
65617
66043
  }
65618
- function BellIcon({ color: color2, size: size4 = 24 }) {
65619
- return /* @__PURE__ */ jsxs58("svg", { width: size4, height: size4, viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "2", children: [
65620
- /* @__PURE__ */ jsx81("path", { d: "M18 8A6 6 0 006 8c0 7-3 9-3 9h18s-3-2-3-9" }),
65621
- /* @__PURE__ */ jsx81("path", { d: "M13.73 21a2 2 0 01-3.46 0" })
65622
- ] });
65623
- }
65624
66044
  function BellOffIcon2({ color: color2, size: size4 = 40 }) {
65625
66045
  return /* @__PURE__ */ jsxs58(
65626
66046
  "svg",
@@ -65631,6 +66051,8 @@ function BellOffIcon2({ color: color2, size: size4 = 40 }) {
65631
66051
  fill: "none",
65632
66052
  stroke: color2,
65633
66053
  strokeWidth: "1.5",
66054
+ "aria-hidden": "true",
66055
+ focusable: "false",
65634
66056
  children: [
65635
66057
  /* @__PURE__ */ jsx81("path", { d: "M8.56 2.9A7 7 0 0119 9v4m-2 4H2s3-2 3-9a4.67 4.67 0 01.3-1.7" }),
65636
66058
  /* @__PURE__ */ jsx81("path", { d: "M13.73 21a2 2 0 01-3.46 0" }),
@@ -65640,18 +66062,44 @@ function BellOffIcon2({ color: color2, size: size4 = 40 }) {
65640
66062
  );
65641
66063
  }
65642
66064
  function CheckIcon14({ color: color2 }) {
65643
- return /* @__PURE__ */ jsx81("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "2", children: /* @__PURE__ */ jsx81("polyline", { points: "20 6 9 17 4 12" }) });
66065
+ return /* @__PURE__ */ jsx81(
66066
+ "svg",
66067
+ {
66068
+ width: "16",
66069
+ height: "16",
66070
+ viewBox: "0 0 24 24",
66071
+ fill: "none",
66072
+ stroke: color2,
66073
+ strokeWidth: "2",
66074
+ "aria-hidden": "true",
66075
+ focusable: "false",
66076
+ children: /* @__PURE__ */ jsx81("polyline", { points: "20 6 9 17 4 12" })
66077
+ }
66078
+ );
65644
66079
  }
65645
66080
  function TrashIcon3({ color: color2 }) {
65646
- return /* @__PURE__ */ jsxs58("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: color2, strokeWidth: "2", children: [
65647
- /* @__PURE__ */ jsx81("polyline", { points: "3 6 5 6 21 6" }),
65648
- /* @__PURE__ */ jsx81("path", { d: "M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2" })
65649
- ] });
66081
+ return /* @__PURE__ */ jsxs58(
66082
+ "svg",
66083
+ {
66084
+ width: "16",
66085
+ height: "16",
66086
+ viewBox: "0 0 24 24",
66087
+ fill: "none",
66088
+ stroke: color2,
66089
+ strokeWidth: "2",
66090
+ "aria-hidden": "true",
66091
+ focusable: "false",
66092
+ children: [
66093
+ /* @__PURE__ */ jsx81("polyline", { points: "3 6 5 6 21 6" }),
66094
+ /* @__PURE__ */ jsx81("path", { d: "M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2" })
66095
+ ]
66096
+ }
66097
+ );
65650
66098
  }
65651
66099
 
65652
66100
  // src/react/ui/referral-card.tsx
65653
66101
  init_constants();
65654
- import { useEffect as useEffect82, useState as useState98 } from "react";
66102
+ import { useEffect as useEffect82, useId as useId14, useState as useState98 } from "react";
65655
66103
  import { Fragment as Fragment46, jsx as jsx82, jsxs as jsxs59 } from "react/jsx-runtime";
65656
66104
  function ReferralCard(props) {
65657
66105
  return /* @__PURE__ */ jsx82(RequireSdk, { services: ["analytics"], componentType: "referral", theme: props.theme, children: /* @__PURE__ */ jsx82(ReferralCardInner, { ...props }) });
@@ -65678,6 +66126,7 @@ function ReferralCardInner({
65678
66126
  regenerateCode
65679
66127
  } = useReferral();
65680
66128
  const styles2 = baseStyles(theme);
66129
+ const linkId = useId14();
65681
66130
  const [copied, setCopied] = useState98(null);
65682
66131
  const [isRegenerating, setIsRegenerating] = useState98(false);
65683
66132
  const [error2, setError] = useState98(null);
@@ -65772,11 +66221,12 @@ function ReferralCardInner({
65772
66221
  ] }),
65773
66222
  (error2 || referralError) && /* @__PURE__ */ jsx82("div", { style: mergeStyles(styles2.alert, styles2.alertError, styles2.mb4), children: error2 || referralError?.message }),
65774
66223
  link && /* @__PURE__ */ jsxs59("div", { style: { marginBottom: "1.5rem" }, children: [
65775
- /* @__PURE__ */ jsx82("label", { style: styles2.label, children: "Your Referral Link" }),
66224
+ /* @__PURE__ */ jsx82("label", { htmlFor: linkId, style: styles2.label, children: "Your Referral Link" }),
65776
66225
  /* @__PURE__ */ jsxs59("div", { style: mergeStyles(styles2.flexRow, { gap: "0.5rem" }), children: [
65777
66226
  /* @__PURE__ */ jsx82(
65778
66227
  "input",
65779
66228
  {
66229
+ id: linkId,
65780
66230
  type: "text",
65781
66231
  value: link,
65782
66232
  readOnly: true,
@@ -65807,8 +66257,8 @@ function ReferralCardInner({
65807
66257
  )
65808
66258
  ] })
65809
66259
  ] }),
65810
- code && /* @__PURE__ */ jsxs59("div", { style: { marginBottom: "1.5rem" }, children: [
65811
- /* @__PURE__ */ jsx82("label", { style: styles2.label, children: "Your Referral Code" }),
66260
+ code && /* @__PURE__ */ jsxs59("fieldset", { style: { marginBottom: "1.5rem", border: "none", padding: 0, margin: 0 }, children: [
66261
+ /* @__PURE__ */ jsx82("legend", { style: mergeStyles(styles2.label, { padding: 0 }), children: "Your Referral Code" }),
65812
66262
  /* @__PURE__ */ jsxs59("div", { style: mergeStyles(styles2.flexRow, { gap: "0.5rem" }), children: [
65813
66263
  /* @__PURE__ */ jsx82(
65814
66264
  "div",
@@ -65921,8 +66371,8 @@ function ReferralCardInner({
65921
66371
  ]
65922
66372
  }
65923
66373
  ) }),
65924
- showShare && link && /* @__PURE__ */ jsxs59("div", { children: [
65925
- /* @__PURE__ */ jsx82("label", { style: styles2.label, children: "Share via" }),
66374
+ showShare && link && /* @__PURE__ */ jsxs59("fieldset", { style: { border: "none", padding: 0, margin: 0 }, children: [
66375
+ /* @__PURE__ */ jsx82("legend", { style: mergeStyles(styles2.label, { padding: 0 }), children: "Share via" }),
65926
66376
  /* @__PURE__ */ jsxs59(
65927
66377
  "div",
65928
66378
  {
@@ -65991,6 +66441,8 @@ function CopyIcon2({ size: size4 = 24 }) {
65991
66441
  strokeWidth: "2",
65992
66442
  strokeLinecap: "round",
65993
66443
  strokeLinejoin: "round",
66444
+ "aria-hidden": "true",
66445
+ focusable: "false",
65994
66446
  children: [
65995
66447
  /* @__PURE__ */ jsx82("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
65996
66448
  /* @__PURE__ */ jsx82("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
@@ -66010,6 +66462,8 @@ function CheckIcon15({ size: size4 = 24 }) {
66010
66462
  strokeWidth: "2",
66011
66463
  strokeLinecap: "round",
66012
66464
  strokeLinejoin: "round",
66465
+ "aria-hidden": "true",
66466
+ focusable: "false",
66013
66467
  children: /* @__PURE__ */ jsx82("polyline", { points: "20 6 9 17 4 12" })
66014
66468
  }
66015
66469
  );
@@ -66026,6 +66480,8 @@ function RefreshIcon2({ size: size4 = 24 }) {
66026
66480
  strokeWidth: "2",
66027
66481
  strokeLinecap: "round",
66028
66482
  strokeLinejoin: "round",
66483
+ "aria-hidden": "true",
66484
+ focusable: "false",
66029
66485
  children: [
66030
66486
  /* @__PURE__ */ jsx82("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
66031
66487
  /* @__PURE__ */ jsx82("path", { d: "M21 3v5h-5" }),
@@ -66047,6 +66503,8 @@ function GiftIcon({ color: color2 }) {
66047
66503
  strokeWidth: "2",
66048
66504
  strokeLinecap: "round",
66049
66505
  strokeLinejoin: "round",
66506
+ "aria-hidden": "true",
66507
+ focusable: "false",
66050
66508
  children: [
66051
66509
  /* @__PURE__ */ jsx82("polyline", { points: "20 12 20 22 4 22 4 12" }),
66052
66510
  /* @__PURE__ */ jsx82("rect", { x: "2", y: "7", width: "20", height: "5" }),
@@ -66058,10 +66516,32 @@ function GiftIcon({ color: color2 }) {
66058
66516
  );
66059
66517
  }
66060
66518
  function TwitterIcon2({ size: size4 = 24 }) {
66061
- return /* @__PURE__ */ jsx82("svg", { width: size4, height: size4, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx82("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) });
66519
+ return /* @__PURE__ */ jsx82(
66520
+ "svg",
66521
+ {
66522
+ width: size4,
66523
+ height: size4,
66524
+ viewBox: "0 0 24 24",
66525
+ fill: "currentColor",
66526
+ "aria-hidden": "true",
66527
+ focusable: "false",
66528
+ children: /* @__PURE__ */ jsx82("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" })
66529
+ }
66530
+ );
66062
66531
  }
66063
66532
  function LinkedInIcon2({ size: size4 = 24 }) {
66064
- return /* @__PURE__ */ jsx82("svg", { width: size4, height: size4, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx82("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) });
66533
+ return /* @__PURE__ */ jsx82(
66534
+ "svg",
66535
+ {
66536
+ width: size4,
66537
+ height: size4,
66538
+ viewBox: "0 0 24 24",
66539
+ fill: "currentColor",
66540
+ "aria-hidden": "true",
66541
+ focusable: "false",
66542
+ children: /* @__PURE__ */ jsx82("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" })
66543
+ }
66544
+ );
66065
66545
  }
66066
66546
  function EmailIcon({ size: size4 = 24 }) {
66067
66547
  return /* @__PURE__ */ jsxs59(
@@ -66075,6 +66555,8 @@ function EmailIcon({ size: size4 = 24 }) {
66075
66555
  strokeWidth: "2",
66076
66556
  strokeLinecap: "round",
66077
66557
  strokeLinejoin: "round",
66558
+ "aria-hidden": "true",
66559
+ focusable: "false",
66078
66560
  children: [
66079
66561
  /* @__PURE__ */ jsx82("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
66080
66562
  /* @__PURE__ */ jsx82("polyline", { points: "22,6 12,13 2,6" })
@@ -66086,7 +66568,7 @@ function EmailIcon({ size: size4 = 24 }) {
66086
66568
  // src/react/ui/security-settings.tsx
66087
66569
  init_constants();
66088
66570
  import { useMutation as useMutation3, useQuery as useQuery11, useQueryClient as useQueryClient10 } from "@tanstack/react-query";
66089
- import { useCallback as useCallback75, useEffect as useEffect83, useState as useState99 } from "react";
66571
+ import { useCallback as useCallback75, useEffect as useEffect83, useId as useId15, useState as useState99 } from "react";
66090
66572
  import { Fragment as Fragment47, jsx as jsx83, jsxs as jsxs60 } from "react/jsx-runtime";
66091
66573
  function SecuritySettings({
66092
66574
  theme = defaultTheme,
@@ -66102,6 +66584,10 @@ function SecuritySettings({
66102
66584
  const securityContext = useSecurityContext();
66103
66585
  const queryClient = useQueryClient10();
66104
66586
  const styles2 = baseStyles(theme);
66587
+ const verifyCodeId = useId15();
66588
+ const currentPasswordId = useId15();
66589
+ const newPasswordId = useId15();
66590
+ const confirmPasswordId = useId15();
66105
66591
  const [error2, setError] = useState99(null);
66106
66592
  const [success, setSuccess] = useState99(null);
66107
66593
  const [showSetup2FA, setShowSetup2FA] = useState99(false);
@@ -66457,10 +66943,11 @@ function SecuritySettings({
66457
66943
  ] }),
66458
66944
  /* @__PURE__ */ jsxs60("form", { onSubmit: handleEnable2FA, children: [
66459
66945
  /* @__PURE__ */ jsxs60("div", { style: styles2.formGroup, children: [
66460
- /* @__PURE__ */ jsx83("label", { style: styles2.label, children: "Verification Code" }),
66946
+ /* @__PURE__ */ jsx83("label", { htmlFor: verifyCodeId, style: styles2.label, children: "Verification Code" }),
66461
66947
  /* @__PURE__ */ jsx83(
66462
66948
  "input",
66463
66949
  {
66950
+ id: verifyCodeId,
66464
66951
  type: "text",
66465
66952
  value: verifyCode,
66466
66953
  onChange: (e2) => setVerifyCode(e2.target.value.replace(/\D/g, "").slice(0, 6)),
@@ -66544,10 +67031,11 @@ function SecuritySettings({
66544
67031
  },
66545
67032
  children: [
66546
67033
  /* @__PURE__ */ jsxs60("div", { style: styles2.formGroup, children: [
66547
- /* @__PURE__ */ jsx83("label", { style: styles2.label, children: "Current Password" }),
67034
+ /* @__PURE__ */ jsx83("label", { htmlFor: currentPasswordId, style: styles2.label, children: "Current Password" }),
66548
67035
  /* @__PURE__ */ jsx83(
66549
67036
  "input",
66550
67037
  {
67038
+ id: currentPasswordId,
66551
67039
  type: "password",
66552
67040
  value: currentPassword,
66553
67041
  onChange: (e2) => setCurrentPassword(e2.target.value),
@@ -66557,10 +67045,11 @@ function SecuritySettings({
66557
67045
  )
66558
67046
  ] }),
66559
67047
  /* @__PURE__ */ jsxs60("div", { style: styles2.formGroup, children: [
66560
- /* @__PURE__ */ jsx83("label", { style: styles2.label, children: "New Password" }),
67048
+ /* @__PURE__ */ jsx83("label", { htmlFor: newPasswordId, style: styles2.label, children: "New Password" }),
66561
67049
  /* @__PURE__ */ jsx83(
66562
67050
  "input",
66563
67051
  {
67052
+ id: newPasswordId,
66564
67053
  type: "password",
66565
67054
  value: newPassword,
66566
67055
  onChange: (e2) => setNewPassword(e2.target.value),
@@ -66571,10 +67060,11 @@ function SecuritySettings({
66571
67060
  )
66572
67061
  ] }),
66573
67062
  /* @__PURE__ */ jsxs60("div", { style: styles2.formGroup, children: [
66574
- /* @__PURE__ */ jsx83("label", { style: styles2.label, children: "Confirm New Password" }),
67063
+ /* @__PURE__ */ jsx83("label", { htmlFor: confirmPasswordId, style: styles2.label, children: "Confirm New Password" }),
66575
67064
  /* @__PURE__ */ jsx83(
66576
67065
  "input",
66577
67066
  {
67067
+ id: confirmPasswordId,
66578
67068
  type: "password",
66579
67069
  value: confirmPassword,
66580
67070
  onChange: (e2) => setConfirmPassword(e2.target.value),
@@ -66809,6 +67299,8 @@ function ShieldIcon2({ size: size4 = 24 }) {
66809
67299
  strokeWidth: "2",
66810
67300
  strokeLinecap: "round",
66811
67301
  strokeLinejoin: "round",
67302
+ "aria-hidden": "true",
67303
+ focusable: "false",
66812
67304
  children: /* @__PURE__ */ jsx83("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" })
66813
67305
  }
66814
67306
  );
@@ -66827,6 +67319,8 @@ function DeviceIcon({ device, theme }) {
66827
67319
  strokeWidth: "2",
66828
67320
  strokeLinecap: "round",
66829
67321
  strokeLinejoin: "round",
67322
+ "aria-hidden": "true",
67323
+ focusable: "false",
66830
67324
  children: [
66831
67325
  /* @__PURE__ */ jsx83("rect", { x: "5", y: "2", width: "14", height: "20", rx: "2", ry: "2" }),
66832
67326
  /* @__PURE__ */ jsx83("line", { x1: "12", y1: "18", x2: "12.01", y2: "18" })
@@ -66845,6 +67339,8 @@ function DeviceIcon({ device, theme }) {
66845
67339
  strokeWidth: "2",
66846
67340
  strokeLinecap: "round",
66847
67341
  strokeLinejoin: "round",
67342
+ "aria-hidden": "true",
67343
+ focusable: "false",
66848
67344
  children: [
66849
67345
  /* @__PURE__ */ jsx83("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2", ry: "2" }),
66850
67346
  /* @__PURE__ */ jsx83("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
@@ -67095,7 +67591,7 @@ function SubscriberPreferences({
67095
67591
 
67096
67592
  // src/react/ui/unsubscribe-confirm.tsx
67097
67593
  init_constants();
67098
- import { useEffect as useEffect85, useState as useState101 } from "react";
67594
+ import { useEffect as useEffect85, useId as useId16, useState as useState101 } from "react";
67099
67595
  import { Fragment as Fragment49, jsx as jsx85, jsxs as jsxs62 } from "react/jsx-runtime";
67100
67596
  var DEFAULT_REASONS = [
67101
67597
  { id: "too_many", label: "Too many emails" },
@@ -67121,6 +67617,7 @@ function UnsubscribeConfirm({
67121
67617
  }) {
67122
67618
  const { unsubscribe, subscribe } = useNewsletter();
67123
67619
  const styles2 = baseStyles(theme);
67620
+ const reasonId = useId16();
67124
67621
  const [status, setStatus] = useState101(() => token ? "pending" : "missing_token");
67125
67622
  const [selectedReason, setSelectedReason] = useState101("");
67126
67623
  const [error2, setError] = useState101(null);
@@ -67179,6 +67676,8 @@ function UnsubscribeConfirm({
67179
67676
  fill: "none",
67180
67677
  stroke: "currentColor",
67181
67678
  strokeWidth: "2",
67679
+ "aria-hidden": "true",
67680
+ focusable: "false",
67182
67681
  children: [
67183
67682
  /* @__PURE__ */ jsx85("circle", { cx: "12", cy: "12", r: "10" }),
67184
67683
  /* @__PURE__ */ jsx85("line", { x1: "12", y1: "8", x2: "12", y2: "12" }),
@@ -67213,6 +67712,7 @@ function UnsubscribeConfirm({
67213
67712
  /* @__PURE__ */ jsx85(
67214
67713
  "label",
67215
67714
  {
67715
+ htmlFor: reasonId,
67216
67716
  style: mergeStyles(styles2.label, {
67217
67717
  marginBottom: "0.5rem",
67218
67718
  display: "block"
@@ -67223,6 +67723,7 @@ function UnsubscribeConfirm({
67223
67723
  /* @__PURE__ */ jsxs62(
67224
67724
  "select",
67225
67725
  {
67726
+ id: reasonId,
67226
67727
  value: selectedReason,
67227
67728
  onChange: (e2) => setSelectedReason(e2.target.value),
67228
67729
  style: styles2.input,
@@ -67271,6 +67772,8 @@ function UnsubscribeConfirm({
67271
67772
  fill: "none",
67272
67773
  stroke: "currentColor",
67273
67774
  strokeWidth: "2",
67775
+ "aria-hidden": "true",
67776
+ focusable: "false",
67274
67777
  children: [
67275
67778
  /* @__PURE__ */ jsx85("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
67276
67779
  /* @__PURE__ */ jsx85("polyline", { points: "22 4 12 14.01 9 11.01" })
@@ -67327,6 +67830,8 @@ function UnsubscribeConfirm({
67327
67830
  fill: "none",
67328
67831
  stroke: "currentColor",
67329
67832
  strokeWidth: "2",
67833
+ "aria-hidden": "true",
67834
+ focusable: "false",
67330
67835
  children: [
67331
67836
  /* @__PURE__ */ jsx85("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
67332
67837
  /* @__PURE__ */ jsx85("polyline", { points: "22 4 12 14.01 9 11.01" })
@@ -67368,6 +67873,8 @@ function UnsubscribeConfirm({
67368
67873
  fill: "none",
67369
67874
  stroke: "currentColor",
67370
67875
  strokeWidth: "2",
67876
+ "aria-hidden": "true",
67877
+ focusable: "false",
67371
67878
  children: [
67372
67879
  /* @__PURE__ */ jsx85("circle", { cx: "12", cy: "12", r: "10" }),
67373
67880
  /* @__PURE__ */ jsx85("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
@@ -67409,6 +67916,8 @@ function UnsubscribeConfirm({
67409
67916
  fill: "none",
67410
67917
  stroke: "currentColor",
67411
67918
  strokeWidth: "2",
67919
+ "aria-hidden": "true",
67920
+ focusable: "false",
67412
67921
  children: [
67413
67922
  /* @__PURE__ */ jsx85("circle", { cx: "12", cy: "12", r: "10" }),
67414
67923
  /* @__PURE__ */ jsx85("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
@@ -67471,7 +67980,7 @@ function UnsubscribeConfirm({
67471
67980
 
67472
67981
  // src/react/ui/user-profile.tsx
67473
67982
  init_constants();
67474
- import { useCallback as useCallback76, useEffect as useEffect86, useRef as useRef95, useState as useState102 } from "react";
67983
+ import { useCallback as useCallback76, useEffect as useEffect86, useId as useId17, useRef as useRef95, useState as useState102 } from "react";
67475
67984
  import { Fragment as Fragment50, jsx as jsx86, jsxs as jsxs63 } from "react/jsx-runtime";
67476
67985
  function UserProfile(props) {
67477
67986
  return /* @__PURE__ */ jsx86(RequireSdk, { services: ["auth", "storage"], componentType: "user", theme: props.theme, children: /* @__PURE__ */ jsx86(UserProfileInner, { ...props }) });
@@ -67489,8 +67998,10 @@ function UserProfileInner({
67489
67998
  }) {
67490
67999
  const { user, isLoading: isUserLoading, refresh: refreshUser } = useUser();
67491
68000
  const userContext = useUserContext();
67492
- const { uploadAvatar, isUploading: isUploadingAvatar, uploadError } = useStorage();
68001
+ const { uploadAvatar, isUploading: isUploadingAvatar } = useStorage();
67493
68002
  const styles2 = baseStyles(theme);
68003
+ const nameId = useId17();
68004
+ const emailId = useId17();
67494
68005
  const [activeSection, setActiveSection] = useState102(sections[0]);
67495
68006
  const [form, setForm] = useState102({ name: "", image: "" });
67496
68007
  const [error2, setError] = useState102(null);
@@ -67595,17 +68106,19 @@ function UserProfileInner({
67595
68106
  transition: "opacity 0.15s ease-in-out"
67596
68107
  };
67597
68108
  return /* @__PURE__ */ jsxs63(
67598
- "div",
68109
+ "button",
67599
68110
  {
67600
- style: avatarStyle,
68111
+ type: "button",
67601
68112
  onClick: () => fileInputRef.current?.click(),
67602
- onMouseEnter: (e2) => {
67603
- const overlay = e2.currentTarget.querySelector(".avatar-overlay");
67604
- if (overlay) overlay.style.opacity = "1";
67605
- },
67606
- onMouseLeave: (e2) => {
67607
- const overlay = e2.currentTarget.querySelector(".avatar-overlay");
67608
- if (overlay) overlay.style.opacity = "0";
68113
+ "aria-label": "Upload avatar",
68114
+ className: "sylphx-upload-hover",
68115
+ style: {
68116
+ ...avatarStyle,
68117
+ border: "none",
68118
+ padding: 0,
68119
+ cursor: "pointer",
68120
+ font: "inherit",
68121
+ color: "inherit"
67609
68122
  },
67610
68123
  children: [
67611
68124
  form.image ? /* @__PURE__ */ jsx86(
@@ -67616,7 +68129,7 @@ function UserProfileInner({
67616
68129
  style: { width: "100%", height: "100%", objectFit: "cover" }
67617
68130
  }
67618
68131
  ) : /* @__PURE__ */ jsx86("span", { style: { fontSize: "2rem", color: theme.colorMutedForeground }, children: form.name?.charAt(0)?.toUpperCase() || "?" }),
67619
- /* @__PURE__ */ jsx86("div", { className: "avatar-overlay", style: overlayStyle, children: isUploadingAvatar ? /* @__PURE__ */ jsx86("span", { style: mergeStyles(styles2.spinner, { color: "#fff" }) }) : /* @__PURE__ */ jsx86(CameraIcon2, { color: "#fff" }) }),
68132
+ /* @__PURE__ */ jsx86("div", { className: "sylphx-upload-hover__overlay", style: overlayStyle, children: isUploadingAvatar ? /* @__PURE__ */ jsx86("span", { style: mergeStyles(styles2.spinner, { color: "#fff" }) }) : /* @__PURE__ */ jsx86(CameraIcon2, { color: "#fff" }) }),
67620
68133
  /* @__PURE__ */ jsx86(
67621
68134
  "input",
67622
68135
  {
@@ -67656,10 +68169,11 @@ function UserProfileInner({
67656
68169
  const renderProfileSection = () => /* @__PURE__ */ jsxs63("form", { onSubmit: handleProfileUpdate, children: [
67657
68170
  /* @__PURE__ */ jsx86("div", { style: mergeStyles(styles2.flexCenter, styles2.mb6), children: renderAvatar() }),
67658
68171
  /* @__PURE__ */ jsxs63("div", { style: styles2.formGroup, children: [
67659
- /* @__PURE__ */ jsx86("label", { style: styles2.label, children: "Name" }),
68172
+ /* @__PURE__ */ jsx86("label", { htmlFor: nameId, style: styles2.label, children: "Name" }),
67660
68173
  /* @__PURE__ */ jsx86(
67661
68174
  "input",
67662
68175
  {
68176
+ id: nameId,
67663
68177
  type: "text",
67664
68178
  value: form.name,
67665
68179
  onChange: (e2) => setForm((prev) => ({ ...prev, name: e2.target.value })),
@@ -67670,10 +68184,11 @@ function UserProfileInner({
67670
68184
  )
67671
68185
  ] }),
67672
68186
  /* @__PURE__ */ jsxs63("div", { style: styles2.formGroup, children: [
67673
- /* @__PURE__ */ jsx86("label", { style: styles2.label, children: "Email" }),
68187
+ /* @__PURE__ */ jsx86("label", { htmlFor: emailId, style: styles2.label, children: "Email" }),
67674
68188
  /* @__PURE__ */ jsx86(
67675
68189
  "input",
67676
68190
  {
68191
+ id: emailId,
67677
68192
  type: "email",
67678
68193
  value: user?.email || "",
67679
68194
  disabled: true,
@@ -67812,6 +68327,8 @@ function CameraIcon2({ color: color2 }) {
67812
68327
  strokeWidth: "2",
67813
68328
  strokeLinecap: "round",
67814
68329
  strokeLinejoin: "round",
68330
+ "aria-hidden": "true",
68331
+ focusable: "false",
67815
68332
  children: [
67816
68333
  /* @__PURE__ */ jsx86("path", { d: "M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z" }),
67817
68334
  /* @__PURE__ */ jsx86("circle", { cx: "12", cy: "13", r: "3" })
@@ -67830,13 +68347,15 @@ function CloseIcon6({ color: color2 }) {
67830
68347
  stroke: color2,
67831
68348
  strokeWidth: "2",
67832
68349
  strokeLinecap: "round",
68350
+ "aria-hidden": "true",
68351
+ focusable: "false",
67833
68352
  children: /* @__PURE__ */ jsx86("path", { d: "M4 4L12 12M12 4L4 12" })
67834
68353
  }
67835
68354
  );
67836
68355
  }
67837
68356
 
67838
68357
  // src/react/ui/webhook-manager.tsx
67839
- import { useEffect as useEffect87, useState as useState103 } from "react";
68358
+ import { useEffect as useEffect87, useId as useId18, useState as useState103 } from "react";
67840
68359
  import { jsx as jsx87, jsxs as jsxs64 } from "react/jsx-runtime";
67841
68360
  var DEFAULT_EVENTS = [
67842
68361
  "user.created",
@@ -67862,6 +68381,7 @@ function WebhookManager({
67862
68381
  isLoading = false,
67863
68382
  emptyMessage = "No webhooks configured"
67864
68383
  }) {
68384
+ const urlId = useId18();
67865
68385
  const [showCreate, setShowCreate] = useState103(false);
67866
68386
  const [url, setUrl] = useState103("");
67867
68387
  const [selectedEvents, setSelectedEvents] = useState103([]);
@@ -68005,6 +68525,7 @@ function WebhookManager({
68005
68525
  /* @__PURE__ */ jsx87(
68006
68526
  "label",
68007
68527
  {
68528
+ htmlFor: urlId,
68008
68529
  style: {
68009
68530
  display: "block",
68010
68531
  marginBottom: "0.5rem",
@@ -68017,6 +68538,7 @@ function WebhookManager({
68017
68538
  /* @__PURE__ */ jsx87(
68018
68539
  "input",
68019
68540
  {
68541
+ id: urlId,
68020
68542
  type: "url",
68021
68543
  value: url,
68022
68544
  onChange: (e2) => setUrl(e2.target.value),
@@ -68026,15 +68548,16 @@ function WebhookManager({
68026
68548
  }
68027
68549
  )
68028
68550
  ] }),
68029
- /* @__PURE__ */ jsxs64("div", { style: { marginBottom: "1.5rem" }, children: [
68551
+ /* @__PURE__ */ jsxs64("fieldset", { style: { marginBottom: "1.5rem", border: "none", padding: 0, margin: 0 }, children: [
68030
68552
  /* @__PURE__ */ jsx87(
68031
- "label",
68553
+ "legend",
68032
68554
  {
68033
68555
  style: {
68034
68556
  display: "block",
68035
68557
  marginBottom: "0.5rem",
68036
68558
  fontWeight: 500,
68037
- fontSize: theme.fontSizeSm
68559
+ fontSize: theme.fontSizeSm,
68560
+ padding: 0
68038
68561
  },
68039
68562
  children: "Events to listen for *"
68040
68563
  }
@@ -68295,12 +68818,24 @@ function WebhookDeliveryLog({
68295
68818
  children: emptyMessage
68296
68819
  }
68297
68820
  ) : displayedDeliveries.map((delivery, i2) => /* @__PURE__ */ jsxs64(
68298
- "div",
68821
+ "button",
68299
68822
  {
68823
+ type: "button",
68824
+ "aria-expanded": expandedId === delivery.id,
68300
68825
  style: {
68301
68826
  padding: "0.75rem 1rem",
68302
68827
  borderBottom: i2 === displayedDeliveries.length - 1 ? "none" : `1px solid ${theme.colorBorder}`,
68303
- cursor: "pointer"
68828
+ cursor: "pointer",
68829
+ textAlign: "left",
68830
+ font: "inherit",
68831
+ color: "inherit",
68832
+ width: "100%",
68833
+ background: "transparent",
68834
+ border: "none",
68835
+ borderBottomStyle: "solid",
68836
+ borderBottomWidth: i2 === displayedDeliveries.length - 1 ? 0 : 1,
68837
+ borderBottomColor: theme.colorBorder,
68838
+ display: "block"
68304
68839
  },
68305
68840
  onClick: () => setExpandedId(expandedId === delivery.id ? null : delivery.id),
68306
68841
  children: [
@@ -68450,6 +68985,8 @@ function WebhookIcon({ color: color2, size: size4 = 24 }) {
68450
68985
  strokeWidth: "2",
68451
68986
  strokeLinecap: "round",
68452
68987
  strokeLinejoin: "round",
68988
+ "aria-hidden": "true",
68989
+ focusable: "false",
68453
68990
  children: [
68454
68991
  /* @__PURE__ */ jsx87("path", { d: "M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2" }),
68455
68992
  /* @__PURE__ */ jsx87("path", { d: "m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06" }),
@@ -68471,6 +69008,8 @@ function PlusIcon6({ color: color2 }) {
68471
69008
  strokeLinecap: "round",
68472
69009
  strokeLinejoin: "round",
68473
69010
  style: { marginRight: "0.25rem" },
69011
+ "aria-hidden": "true",
69012
+ focusable: "false",
68474
69013
  children: [
68475
69014
  /* @__PURE__ */ jsx87("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
68476
69015
  /* @__PURE__ */ jsx87("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
@@ -69562,7 +70101,7 @@ var ErrorTracker = class {
69562
70101
  const isInApp = !filename?.includes("node_modules") && !filename?.includes("vendor");
69563
70102
  let absPath = filename;
69564
70103
  if (urlPrefix && filename && !filename.startsWith("http")) {
69565
- absPath = urlPrefix.replace(/\/$/, "") + "/" + filename.replace(/^\.?\//, "");
70104
+ absPath = `${urlPrefix.replace(/\/$/, "")}/${filename.replace(/^\.?\//, "")}`;
69566
70105
  }
69567
70106
  const debugId = debugIds?.[filename ?? ""];
69568
70107
  frames.push({
@@ -74015,7 +74554,6 @@ function toWebVitalMetric(metric) {
74015
74554
  async function reportMetric(metric) {
74016
74555
  metrics2[metric.name] = metric;
74017
74556
  if (config.debug) {
74018
- console.log(`[Web Vitals] ${metric.name}: ${metric.value.toFixed(2)} (${metric.rating})`);
74019
74557
  }
74020
74558
  config.onReport(metric);
74021
74559
  if (config.reportUrl && config.reportingMode === "immediate") {
@@ -74075,7 +74613,6 @@ function initWebVitals(userConfig = {}) {
74075
74613
  const samplingRate = userConfig.samplingRate ?? DEFAULT_WEB_VITALS_CONFIG.samplingRate;
74076
74614
  if (Math.random() > samplingRate) {
74077
74615
  if (userConfig.debug) {
74078
- console.log("[Web Vitals] Sampling skipped this page view");
74079
74616
  }
74080
74617
  return;
74081
74618
  }
@@ -74098,7 +74635,6 @@ function initWebVitals(userConfig = {}) {
74098
74635
  });
74099
74636
  }
74100
74637
  if (config.debug) {
74101
- console.log("[Web Vitals] Initialized");
74102
74638
  }
74103
74639
  }
74104
74640
  function getWebVitalsReport() {
@@ -74615,9 +75151,10 @@ function murmurHash3(key, seed = 0) {
74615
75151
  }
74616
75152
  k1 = 0;
74617
75153
  switch (remainder) {
75154
+ // biome-ignore lint/suspicious/noFallthroughSwitchClause: MurmurHash3 tail mixing requires intentional fallthrough
74618
75155
  case 3:
74619
75156
  k1 ^= (key.charCodeAt(i2 + 2) & 255) << 16;
74620
- // fallthrough
75157
+ // biome-ignore lint/suspicious/noFallthroughSwitchClause: MurmurHash3 tail mixing requires intentional fallthrough
74621
75158
  case 2:
74622
75159
  k1 ^= (key.charCodeAt(i2 + 1) & 255) << 8;
74623
75160
  // fallthrough
@@ -75180,7 +75717,6 @@ var LocalEvaluator = class {
75180
75717
  }
75181
75718
  debug(message, data) {
75182
75719
  if (this.config.debug) {
75183
- console.log(`[FeatureFlags] ${message}`, data ?? "");
75184
75720
  }
75185
75721
  }
75186
75722
  /**
@@ -75395,7 +75931,6 @@ var ExperimentManager = class {
75395
75931
  }
75396
75932
  debug(message, data) {
75397
75933
  if (this.config.debug) {
75398
- console.log(`[Experiments] ${message}`, data ?? "");
75399
75934
  }
75400
75935
  }
75401
75936
  };
@@ -75689,7 +76224,6 @@ var FlagStream = class {
75689
76224
  // ==========================================
75690
76225
  debug(message, data) {
75691
76226
  if (this.options.debug) {
75692
- console.log(`[FlagStream] ${message}`, data ?? "");
75693
76227
  }
75694
76228
  }
75695
76229
  };
@@ -75737,10 +76271,10 @@ var DEFAULT_FLAGS_CONFIG = {
75737
76271
  };
75738
76272
 
75739
76273
  // src/react/hooks/use-flag.ts
75740
- import { useCallback as useCallback81, useContext as useContext81, useEffect as useEffect92, useMemo as useMemo130, useRef as useRef100, useState as useState107 } from "react";
76274
+ import { useCallback as useCallback81, useContext as useContext81, useEffect as useEffect92, useMemo as useMemo131, useRef as useRef100, useState as useState107 } from "react";
75741
76275
 
75742
76276
  // src/react/hooks/use-flags.tsx
75743
- import { createContext as createContext67, useCallback as useCallback80, useContext as useContext80, useEffect as useEffect91, useMemo as useMemo129, useRef as useRef99, useState as useState106 } from "react";
76277
+ import { createContext as createContext67, useCallback as useCallback80, useContext as useContext80, useEffect as useEffect91, useMemo as useMemo130, useRef as useRef99, useState as useState106 } from "react";
75744
76278
  import { jsx as jsx89 } from "react/jsx-runtime";
75745
76279
  var FeatureFlagsContext = createContext67(null);
75746
76280
  function FeatureFlagsProvider({
@@ -75831,7 +76365,7 @@ function FeatureFlagsProvider({
75831
76365
  evaluatorRef.current.setContext(context);
75832
76366
  }
75833
76367
  }, [context]);
75834
- const value = useMemo129(
76368
+ const value = useMemo130(
75835
76369
  () => ({
75836
76370
  evaluator: evaluatorRef.current,
75837
76371
  stream: streamRef.current,
@@ -75918,7 +76452,7 @@ function useFeatureFlags2() {
75918
76452
  }
75919
76453
  function useFlag(flagKey, defaultValue = false) {
75920
76454
  const { isEnabled, updateVersion } = useFeatureFlagsContext();
75921
- return useMemo129(
76455
+ return useMemo130(
75922
76456
  () => isEnabled(flagKey, defaultValue),
75923
76457
  // eslint-disable-next-line react-hooks/exhaustive-deps
75924
76458
  [flagKey, defaultValue, isEnabled]
@@ -75926,7 +76460,7 @@ function useFlag(flagKey, defaultValue = false) {
75926
76460
  }
75927
76461
  function useFlagString(flagKey, defaultValue = "") {
75928
76462
  const { getString, updateVersion } = useFeatureFlagsContext();
75929
- return useMemo129(
76463
+ return useMemo130(
75930
76464
  () => getString(flagKey, defaultValue),
75931
76465
  // eslint-disable-next-line react-hooks/exhaustive-deps
75932
76466
  [flagKey, defaultValue, getString]
@@ -75934,7 +76468,7 @@ function useFlagString(flagKey, defaultValue = "") {
75934
76468
  }
75935
76469
  function useFlagNumber(flagKey, defaultValue = 0) {
75936
76470
  const { getNumber, updateVersion } = useFeatureFlagsContext();
75937
- return useMemo129(
76471
+ return useMemo130(
75938
76472
  () => getNumber(flagKey, defaultValue),
75939
76473
  // eslint-disable-next-line react-hooks/exhaustive-deps
75940
76474
  [flagKey, defaultValue, getNumber]
@@ -75942,7 +76476,7 @@ function useFlagNumber(flagKey, defaultValue = 0) {
75942
76476
  }
75943
76477
  function useFlagJSON(flagKey, defaultValue) {
75944
76478
  const { getJSON, updateVersion } = useFeatureFlagsContext();
75945
- return useMemo129(
76479
+ return useMemo130(
75946
76480
  () => getJSON(flagKey, defaultValue),
75947
76481
  // eslint-disable-next-line react-hooks/exhaustive-deps
75948
76482
  [flagKey, defaultValue, getJSON]
@@ -75950,7 +76484,7 @@ function useFlagJSON(flagKey, defaultValue) {
75950
76484
  }
75951
76485
  function useFlagEvaluation(flagKey, defaultValue, contextOverride) {
75952
76486
  const { evaluate: evaluate2, updateVersion } = useFeatureFlagsContext();
75953
- return useMemo129(
76487
+ return useMemo130(
75954
76488
  () => evaluate2(flagKey, defaultValue, contextOverride),
75955
76489
  // eslint-disable-next-line react-hooks/exhaustive-deps
75956
76490
  [flagKey, defaultValue, contextOverride, evaluate2]
@@ -75962,7 +76496,7 @@ function useExperiment(experimentKey) {
75962
76496
  throw new Error("useExperiment must be used within a FeatureFlagsProvider");
75963
76497
  }
75964
76498
  const { experiments, updateVersion } = ctx;
75965
- return useMemo129(() => {
76499
+ return useMemo130(() => {
75966
76500
  const result = experiments.getVariant(experimentKey);
75967
76501
  return {
75968
76502
  variant: result.variant,
@@ -76020,7 +76554,7 @@ function useFlagStatus(key, options) {
76020
76554
  const [loading, setLoading] = useState107(!ctx?.isReady);
76021
76555
  const [error2, setError] = useState107(null);
76022
76556
  const mountedRef = useRef100(true);
76023
- const evalContext = useMemo130(() => {
76557
+ const evalContext = useMemo131(() => {
76024
76558
  if (contextOverride) return contextOverride;
76025
76559
  if (userId || attributes) return { userId, ...attributes };
76026
76560
  return void 0;
@@ -76829,9 +77363,6 @@ var mixpanelHandler = {
76829
77363
  const { token, debug } = config2;
76830
77364
  ((f2, b2) => {
76831
77365
  if (!b2) return;
76832
- let _e;
76833
- let g2;
76834
- let a2;
76835
77366
  const c2 = {};
76836
77367
  c2._i = [];
76837
77368
  c2.init = (e2, f3) => {
@@ -76844,15 +77375,16 @@ var mixpanelHandler = {
76844
77375
  c2._i[0]?.[2]?.identify?.(...args);
76845
77376
  };
76846
77377
  c2.people = {
77378
+ // biome-ignore lint/suspicious/noExplicitAny: Mixpanel SDK vendor snippet — matches Mixpanel's own typings
76847
77379
  set: (...args) => {
76848
77380
  c2._i[0]?.[2]?.people?.set?.(...args);
76849
77381
  }
76850
77382
  };
76851
- a2 = b2.createElement("script");
77383
+ const a2 = b2.createElement("script");
76852
77384
  a2.type = "text/javascript";
76853
77385
  a2.async = true;
76854
77386
  a2.src = "https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";
76855
- g2 = b2.getElementsByTagName("script")[0];
77387
+ const g2 = b2.getElementsByTagName("script")[0];
76856
77388
  g2.parentNode?.insertBefore(a2, g2);
76857
77389
  f2.mixpanel = c2;
76858
77390
  })(window, document);
@@ -76907,7 +77439,8 @@ var segmentHandler = {
76907
77439
  "setAnonymousId",
76908
77440
  "addDestinationMiddleware"
76909
77441
  ];
76910
- analytics.factory = (e2) => (...args) => {
77442
+ analytics.factory = // biome-ignore lint/suspicious/noExplicitAny: Segment SDK vendor snippet — returns a stub function that matches any Segment analytics method signature
77443
+ (e2) => (...args) => {
76911
77444
  args.unshift(e2);
76912
77445
  analytics.push(args);
76913
77446
  return analytics;
@@ -76977,6 +77510,7 @@ var posthogHandler = {
76977
77510
  })(n2);
76978
77511
  }
76979
77512
  o2.people = {
77513
+ // biome-ignore lint/suspicious/noExplicitAny: PostHog SDK vendor snippet — matches PostHog's own typings
76980
77514
  set: (...args) => {
76981
77515
  o2.__load_queue.push(["people.set", args]);
76982
77516
  }
@@ -77174,7 +77708,7 @@ function createDestinationRouter(config2) {
77174
77708
  } else {
77175
77709
  handlers[dest.type].page(name || document.title, properties, dest.config);
77176
77710
  }
77177
- if (debug) console.log(`[Router] Page view to ${dest.type}`);
77711
+ if (debug) console.log(`[Router] Paged to ${dest.type}`);
77178
77712
  } catch (error2) {
77179
77713
  console.error(`[Router] Failed to page to ${dest.type}:`, error2);
77180
77714
  }
@@ -78184,7 +78718,6 @@ var AnalyticsTracker = class {
78184
78718
  }
78185
78719
  debug(message, data) {
78186
78720
  if (this.config.debug) {
78187
- console.log(`[Analytics] ${message}`, data ?? "");
78188
78721
  }
78189
78722
  }
78190
78723
  };
@@ -78207,7 +78740,7 @@ function resetAnalyticsTracker() {
78207
78740
 
78208
78741
  // src/react/hooks/use-analytics.tsx
78209
78742
  init_constants();
78210
- import React227, { createContext as createContext68, useCallback as useCallback82, useContext as useContext82, useEffect as useEffect93, useMemo as useMemo131, useRef as useRef101 } from "react";
78743
+ import React227, { createContext as createContext68, useCallback as useCallback82, useContext as useContext82, useEffect as useEffect93, useMemo as useMemo132, useRef as useRef101 } from "react";
78211
78744
  import { Fragment as Fragment51, jsx as jsx90 } from "react/jsx-runtime";
78212
78745
  var AnalyticsContext = createContext68(null);
78213
78746
  function AnalyticsProvider({
@@ -78232,7 +78765,7 @@ function AnalyticsProvider({
78232
78765
  trackerRef.current.identify(user.id, user.properties);
78233
78766
  }
78234
78767
  }, [user]);
78235
- const value = useMemo131(() => {
78768
+ const value = useMemo132(() => {
78236
78769
  if (!trackerRef.current || disabled2) return null;
78237
78770
  return {
78238
78771
  tracker: trackerRef.current,
@@ -78246,94 +78779,71 @@ function AnalyticsProvider({
78246
78779
  }
78247
78780
  function useAnalyticsHook() {
78248
78781
  const ctx = useContext82(AnalyticsContext);
78249
- const noopTrack = useCallback82(() => {
78250
- }, []);
78251
- const noopIdentify = useCallback82(() => {
78252
- }, []);
78253
- const noopReset = useCallback82(() => {
78254
- }, []);
78255
- const noopSetUserProperties = useCallback82(() => {
78256
- }, []);
78257
- const noopSetUserPropertiesOnce = useCallback82(() => {
78258
- }, []);
78259
- const noopIncrementUserProperty = useCallback82(() => {
78260
- }, []);
78261
- const noopGroup = useCallback82(() => {
78262
- }, []);
78263
- const noopRegister = useCallback82(() => {
78264
- }, []);
78265
- const noopGetDistinctId = useCallback82(() => null, []);
78266
- const noopFlush = useCallback82(async () => {
78267
- }, []);
78268
- if (!ctx) {
78269
- return {
78270
- track: noopTrack,
78271
- identify: noopIdentify,
78272
- reset: noopReset,
78273
- setUserProperties: noopSetUserProperties,
78274
- setUserPropertiesOnce: noopSetUserPropertiesOnce,
78275
- incrementUserProperty: noopIncrementUserProperty,
78276
- group: noopGroup,
78277
- register: noopRegister,
78278
- getDistinctId: noopGetDistinctId,
78279
- isReady: false,
78280
- flush: noopFlush
78281
- };
78282
- }
78283
- const { tracker, isReady } = ctx;
78782
+ const tracker = ctx?.tracker ?? null;
78783
+ const isReady = ctx?.isReady ?? false;
78784
+ const track = useCallback82(
78785
+ (eventName, properties) => {
78786
+ tracker?.track(eventName, properties);
78787
+ },
78788
+ [tracker]
78789
+ );
78790
+ const identify = useCallback82(
78791
+ (userId, properties) => {
78792
+ tracker?.identify(userId, properties);
78793
+ },
78794
+ [tracker]
78795
+ );
78796
+ const reset = useCallback82(() => {
78797
+ tracker?.reset();
78798
+ }, [tracker]);
78799
+ const setUserProperties = useCallback82(
78800
+ (properties) => {
78801
+ tracker?.setUserProperties(properties);
78802
+ },
78803
+ [tracker]
78804
+ );
78805
+ const setUserPropertiesOnce = useCallback82(
78806
+ (properties) => {
78807
+ tracker?.setUserPropertiesOnce(properties);
78808
+ },
78809
+ [tracker]
78810
+ );
78811
+ const incrementUserProperty = useCallback82(
78812
+ (property, value) => {
78813
+ tracker?.incrementUserProperty(property, value);
78814
+ },
78815
+ [tracker]
78816
+ );
78817
+ const group = useCallback82(
78818
+ (groupType, groupKey, properties) => {
78819
+ tracker?.group(groupType, groupKey, properties);
78820
+ },
78821
+ [tracker]
78822
+ );
78823
+ const register = useCallback82(
78824
+ (properties) => {
78825
+ tracker?.register(properties);
78826
+ },
78827
+ [tracker]
78828
+ );
78829
+ const getDistinctId = useCallback82(() => {
78830
+ return tracker?.getDistinctId() ?? null;
78831
+ }, [tracker]);
78832
+ const flush = useCallback82(async () => {
78833
+ await tracker?.flush();
78834
+ }, [tracker]);
78284
78835
  return {
78285
- track: useCallback82(
78286
- (eventName, properties) => {
78287
- tracker.track(eventName, properties);
78288
- },
78289
- [tracker]
78290
- ),
78291
- identify: useCallback82(
78292
- (userId, properties) => {
78293
- tracker.identify(userId, properties);
78294
- },
78295
- [tracker]
78296
- ),
78297
- reset: useCallback82(() => {
78298
- tracker.reset();
78299
- }, [tracker]),
78300
- setUserProperties: useCallback82(
78301
- (properties) => {
78302
- tracker.setUserProperties(properties);
78303
- },
78304
- [tracker]
78305
- ),
78306
- setUserPropertiesOnce: useCallback82(
78307
- (properties) => {
78308
- tracker.setUserPropertiesOnce(properties);
78309
- },
78310
- [tracker]
78311
- ),
78312
- incrementUserProperty: useCallback82(
78313
- (property, value) => {
78314
- tracker.incrementUserProperty(property, value);
78315
- },
78316
- [tracker]
78317
- ),
78318
- group: useCallback82(
78319
- (groupType, groupKey, properties) => {
78320
- tracker.group(groupType, groupKey, properties);
78321
- },
78322
- [tracker]
78323
- ),
78324
- register: useCallback82(
78325
- (properties) => {
78326
- tracker.register(properties);
78327
- },
78328
- [tracker]
78329
- ),
78330
- getDistinctId: useCallback82(() => {
78331
- return tracker.getDistinctId();
78332
- }, [tracker]),
78836
+ track,
78837
+ identify,
78838
+ reset,
78839
+ setUserProperties,
78840
+ setUserPropertiesOnce,
78841
+ incrementUserProperty,
78842
+ group,
78843
+ register,
78844
+ getDistinctId,
78333
78845
  isReady,
78334
- flush: useCallback82(async () => {
78335
- await tracker.flush();
78336
- }, [tracker])
78846
+ flush
78337
78847
  };
78338
78848
  }
78339
78849
  function usePageView(pageName, properties) {
@@ -78494,7 +79004,7 @@ function useTimeTracking(name, options) {
78494
79004
  }
78495
79005
 
78496
79006
  // src/react/hooks/use-destination-router.tsx
78497
- import { useCallback as useCallback83, useEffect as useEffect94, useMemo as useMemo132, useRef as useRef102 } from "react";
79007
+ import { useCallback as useCallback83, useEffect as useEffect94, useMemo as useMemo133, useRef as useRef102 } from "react";
78498
79008
  import { createContext as createContext69, useContext as useContext83 } from "react";
78499
79009
  import { jsx as jsx91 } from "react/jsx-runtime";
78500
79010
  function useDestinationRouter(options) {
@@ -78509,7 +79019,7 @@ function useDestinationRouter(options) {
78509
79019
  const initializedRef = useRef102(false);
78510
79020
  const { hasConsent: checkConsent } = useConsent();
78511
79021
  const { user } = useUser();
78512
- const router = useMemo132(() => {
79022
+ const router = useMemo133(() => {
78513
79023
  if (!autoInit || typeof window === "undefined") return null;
78514
79024
  const newRouter = createDestinationRouter({
78515
79025
  destinations,
@@ -79431,7 +79941,7 @@ var job = task;
79431
79941
 
79432
79942
  // src/react/hooks/use-realtime.ts
79433
79943
  init_constants();
79434
- import { useCallback as useCallback84, useContext as useContext84, useEffect as useEffect95, useMemo as useMemo133, useRef as useRef103, useState as useState108 } from "react";
79944
+ import { useCallback as useCallback84, useContext as useContext84, useEffect as useEffect95, useMemo as useMemo134, useRef as useRef103, useState as useState108 } from "react";
79435
79945
  function useRealtime(channel, options = {}) {
79436
79946
  const {
79437
79947
  events,
@@ -79461,7 +79971,7 @@ function useRealtime(channel, options = {}) {
79461
79971
  }
79462
79972
  return url.toString();
79463
79973
  }, [platformUrl, channel]);
79464
- const sdkHeaders = useMemo133(
79974
+ const sdkHeaders = useMemo134(
79465
79975
  () => ({
79466
79976
  "Content-Type": "application/json",
79467
79977
  "x-app-secret": appId,
@@ -79634,7 +80144,6 @@ function useRealtime(channel, options = {}) {
79634
80144
  function useRealtimeChannels(channels, options = {}) {
79635
80145
  const {
79636
80146
  events,
79637
- history: history2,
79638
80147
  onConnect,
79639
80148
  onMessage,
79640
80149
  onReconnect,
@@ -79712,11 +80221,13 @@ function useRealtimeChannels(channels, options = {}) {
79712
80221
  channels.forEach(connectChannel);
79713
80222
  }, [channels, connectChannel]);
79714
80223
  const disconnect = useCallback84(() => {
79715
- Object.values(eventSourcesRef.current).forEach((es) => es.close());
80224
+ Object.values(eventSourcesRef.current).forEach((es) => {
80225
+ es.close();
80226
+ });
79716
80227
  eventSourcesRef.current = {};
79717
80228
  setStatuses({});
79718
80229
  }, []);
79719
- const sdkHeaders = useMemo133(
80230
+ const sdkHeaders = useMemo134(
79720
80231
  () => ({
79721
80232
  "Content-Type": "application/json",
79722
80233
  "x-app-secret": appId,
@@ -79778,13 +80289,13 @@ function useRealtimeChannels(channels, options = {}) {
79778
80289
 
79779
80290
  // src/react/hooks/use-kv.ts
79780
80291
  init_constants();
79781
- import { useCallback as useCallback85, useContext as useContext85, useMemo as useMemo134 } from "react";
80292
+ import { useCallback as useCallback85, useContext as useContext85, useMemo as useMemo135 } from "react";
79782
80293
  function useKv(options = {}) {
79783
80294
  const { platformUrl: customPlatformUrl } = options;
79784
80295
  const platformContext = useContext85(PlatformContext);
79785
80296
  const appId = platformContext?.appId || "";
79786
80297
  const platformUrl = customPlatformUrl || platformContext?.platformUrl || `https://${DEFAULT_SDK_API_HOST}`;
79787
- const headers = useMemo134(
80298
+ const headers = useMemo135(
79788
80299
  () => ({
79789
80300
  "Content-Type": "application/json",
79790
80301
  "x-app-secret": appId,
@@ -79998,7 +80509,7 @@ function useKv(options = {}) {
79998
80509
  },
79999
80510
  [request]
80000
80511
  );
80001
- return useMemo134(
80512
+ return useMemo135(
80002
80513
  () => ({
80003
80514
  get,
80004
80515
  set: set3,
@@ -80241,7 +80752,6 @@ var WebAnalyticsTracker = class {
80241
80752
  this._hookHistoryApi();
80242
80753
  }
80243
80754
  if (this.options.debug) {
80244
- console.log("[WebAnalytics] Initialized", this.options);
80245
80755
  }
80246
80756
  }
80247
80757
  /**
@@ -80263,7 +80773,6 @@ var WebAnalyticsTracker = class {
80263
80773
  timestamp: Date.now()
80264
80774
  };
80265
80775
  if (this.options.debug) {
80266
- console.log("[WebAnalytics] Page view:", payload);
80267
80776
  }
80268
80777
  this._send(`${SDK_API_PATH}/analytics/pageview`, payload);
80269
80778
  }
@@ -80279,7 +80788,6 @@ var WebAnalyticsTracker = class {
80279
80788
  sessionId: getOrCreateSessionId()
80280
80789
  };
80281
80790
  if (this.options.debug) {
80282
- console.log("[WebAnalytics] Identify:", payload);
80283
80791
  }
80284
80792
  this._send(`${SDK_API_PATH}/analytics/identify`, payload);
80285
80793
  }
@@ -80422,9 +80930,15 @@ function sendVital(url, appKey, payload) {
80422
80930
  headers,
80423
80931
  body: data,
80424
80932
  keepalive: true
80425
- }).catch(() => {
80933
+ }).catch((err) => {
80934
+ if (typeof console !== "undefined" && console.debug) {
80935
+ console.debug("[sylphx:speed-insights] vitals beacon failed", err);
80936
+ }
80426
80937
  });
80427
- } catch {
80938
+ } catch (err) {
80939
+ if (typeof console !== "undefined" && console.debug) {
80940
+ console.debug("[sylphx:speed-insights] beacon setup failed", err);
80941
+ }
80428
80942
  }
80429
80943
  }
80430
80944
  function SpeedInsights({