@pebble-software/bonsai 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.d.ts +26 -3
  2. package/dist/index.js +1176 -1657
  3. package/package.json +1 -4
package/dist/index.js CHANGED
@@ -1,38 +1,37 @@
1
- import { jsx as d, jsxs as C, Fragment as F } from "react/jsx-runtime";
2
- import * as L from "react";
3
- import { useState as De, useRef as q, useCallback as we, useEffect as le, createContext as Zt, memo as Ae, useContext as me, createElement as M, useMemo as Qt, Fragment as ea } from "react";
4
- import { useSnapshot as za, proxy as Ia } from "valtio";
1
+ import { jsx as d, jsxs as k, Fragment as M } from "react/jsx-runtime";
2
+ import * as ee from "react";
3
+ import { useState as De, useRef as W, useCallback as ye, useEffect as ce, useContext as oe, createContext as we, memo as Ae, createElement as F, useMemo as Zt, Fragment as Qt } from "react";
4
+ import { useSnapshot as Aa, proxy as za } from "valtio";
5
5
  import Ta, { z as t } from "zod";
6
- import { createErrorMap as Ca } from "zod-validation-error";
7
- import { cva as R } from "class-variance-authority";
8
- import { clsx as ka } from "clsx";
9
- import { twMerge as Sa } from "tailwind-merge";
10
- import { Accordion as ae } from "@base-ui/react/accordion";
11
- import { IconChevronDown as ze, IconCircleFilled as Ra, IconLoader as _a, IconSelector as Na, IconCheck as ta, IconChevronUp as Pa, IconChevronLeft as Ea, IconChevronRight as Da, IconMapPinFilled as Oa, IconX as La, IconWriting as Ua, IconTextSize as Ba, IconEraser as ja } from "@tabler/icons-react";
12
- import { useWebHaptics as oe } from "web-haptics/react";
13
- import { Avatar as be } from "@base-ui/react/avatar";
14
- import { mergeProps as Fa } from "@base-ui/react/merge-props";
15
- import { useRender as $a } from "@base-ui/react/use-render";
16
- import { Button as Ha } from "@base-ui/react/button";
17
- import { getDefaultClassNames as Ga, DayPicker as Wa } from "react-day-picker";
18
- import { Select as U } from "@base-ui/react/select";
19
- import { Checkbox as Oe } from "@base-ui/react/checkbox";
20
- import { Collapsible as Ie } from "@base-ui/react/collapsible";
21
- import { Input as Ma } from "@base-ui/react/input";
22
- import { OTPInput as qa } from "input-otp";
23
- import { Map as Va, Marker as Xa, NavigationControl as Ja, GeolocateControl as Ya, FullscreenControl as Ka, Layer as Za } from "react-map-gl/maplibre";
24
- import { Progress as J } from "@base-ui/react/progress";
25
- import { Tabs as Te } from "@base-ui/react/tabs";
26
- import Qa from "react-signature-canvas";
27
- import { Separator as er } from "@base-ui/react/separator";
28
- import { Switch as Le } from "@base-ui/react/switch";
29
- import aa from "jsep";
30
- import tr from "@jsep-plugin/arrow";
31
- var ra = /* @__PURE__ */ ((e) => (e.FORM_CAPTURED = "FORM_CAPTURED", e.FILE_GENERATED = "FILE_GENERATED", e.FILE_UPLOADED = "FILE_UPLOADED", e))(ra || {});
32
- new Set(Object.values(ra));
33
- var i = /* @__PURE__ */ ((e) => (e.A = "a", e.P = "p", e.H = "h", e.OL = "ol", e.UL = "ul", e.LI = "li", e.MAP = "map", e.DIV = "div", e.SPAN = "span", e.ACCORDION = "accordion", e.ACCORDION_ITEM = "accordion-item", e.ACCORDION_TRIGGER = "accordion-trigger", e.ACCORDION_CONTENT = "accordion-content", e.ALERT = "alert", e.AVATAR = "avatar", e.BADGE = "badge", e.BUTTON = "button", e.CARD = "card", e.CARD_HEADER = "card-header", e.CARD_TITLE = "card-title", e.CARD_DESCRIPTION = "card-description", e.CARD_CONTENT = "card-content", e.CARD_FOOTER = "card-footer", e.CARD_ACTION = "card-action", e.CARD_ICON = "card-icon", e.CALENDAR = "calendar", e.CHECKBOX = "checkbox", e.COLLAPSIBLE = "collapsible", e.COLLAPSIBLE_TRIGGER = "collapsible-trigger", e.COLLAPSIBLE_CONTENT = "collapsible-content", e.IMAGE = "image", e.OTP = "otp", e.INPUT = "input", e.INPUT_GROUP = "input-group", e.INPUT_GROUP_TEXT = "input-group-text", e.INPUT_GROUP_ADDON = "input-group-addon", e.INPUT_GROUP_BUTTON = "input-group-button", e.INPUT_GROUP_INPUT = "input-group-input", e.INPUT_GROUP_TEXTAREA = "input-group-textarea", e.LABEL = "label", e.LOADER = "loader", e.PROGRESS = "progress", e.SEPARATOR = "separator", e.SKELETON = "skeleton", e.SWITCH = "switch", e.TABLE = "table", e.TABLE_HEADER = "table-header", e.TABLE_BODY = "table-body", e.TABLE_FOOTER = "table-footer", e.TABLE_HEAD = "table-head", e.TABLE_ROW = "table-row", e.TABLE_CELL = "table-cell", e.TABLE_CAPTION = "table-caption", e.TEXTAREA = "textarea", e.SIGNATURE = "signature", e.EACH = "each", e.IF = "if", e))(i || {});
34
- new Set(Object.values(i));
35
- const T = t.string().length(24).meta({
6
+ import { createErrorMap as Ia } from "zod-validation-error";
7
+ import { cva as S } from "class-variance-authority";
8
+ import { clsx as Ca } from "clsx";
9
+ import { twMerge as ka } from "tailwind-merge";
10
+ import { Accordion as te } from "@base-ui/react/accordion";
11
+ import { IconChevronDown as ze, IconCircleFilled as Sa, IconLoader as Ra, IconSelector as _a, IconCheck as ea, IconChevronUp as Na, IconChevronLeft as Ea, IconChevronRight as Pa, IconWriting as Oa, IconTextSize as Da, IconEraser as La } from "@tabler/icons-react";
12
+ import { useWebHaptics as se } from "web-haptics/react";
13
+ import { Avatar as fe } from "@base-ui/react/avatar";
14
+ import { mergeProps as Ua } from "@base-ui/react/merge-props";
15
+ import { useRender as Ba } from "@base-ui/react/use-render";
16
+ import { Button as ja } from "@base-ui/react/button";
17
+ import { getDefaultClassNames as $a, DayPicker as Ha } from "react-day-picker";
18
+ import { Select as P } from "@base-ui/react/select";
19
+ import { Checkbox as Le } from "@base-ui/react/checkbox";
20
+ import { Collapsible as Te } from "@base-ui/react/collapsible";
21
+ import { Input as Fa } from "@base-ui/react/input";
22
+ import { OTPInput as Ga } from "input-otp";
23
+ import { Progress as q } from "@base-ui/react/progress";
24
+ import { Tabs as Ie } from "@base-ui/react/tabs";
25
+ import Wa from "react-signature-canvas";
26
+ import { Separator as Va } from "@base-ui/react/separator";
27
+ import { Switch as Ue } from "@base-ui/react/switch";
28
+ import ta from "jsep";
29
+ import qa from "@jsep-plugin/arrow";
30
+ var aa = /* @__PURE__ */ ((e) => (e.FORM_CAPTURED = "FORM_CAPTURED", e.FILE_GENERATED = "FILE_GENERATED", e.FILE_UPLOADED = "FILE_UPLOADED", e))(aa || {});
31
+ new Set(Object.values(aa));
32
+ var s = /* @__PURE__ */ ((e) => (e.A = "a", e.P = "p", e.H = "h", e.OL = "ol", e.UL = "ul", e.LI = "li", e.DIV = "div", e.SPAN = "span", e.ACCORDION = "accordion", e.ACCORDION_ITEM = "accordion-item", e.ACCORDION_TRIGGER = "accordion-trigger", e.ACCORDION_CONTENT = "accordion-content", e.ALERT = "alert", e.AVATAR = "avatar", e.BADGE = "badge", e.BUTTON = "button", e.CARD = "card", e.CARD_HEADER = "card-header", e.CARD_TITLE = "card-title", e.CARD_DESCRIPTION = "card-description", e.CARD_CONTENT = "card-content", e.CARD_FOOTER = "card-footer", e.CARD_ACTION = "card-action", e.CARD_ICON = "card-icon", e.CALENDAR = "calendar", e.CHECKBOX = "checkbox", e.COLLAPSIBLE = "collapsible", e.COLLAPSIBLE_TRIGGER = "collapsible-trigger", e.COLLAPSIBLE_CONTENT = "collapsible-content", e.IMAGE = "image", e.OTP = "otp", e.INPUT = "input", e.INPUT_GROUP = "input-group", e.INPUT_GROUP_TEXT = "input-group-text", e.INPUT_GROUP_ADDON = "input-group-addon", e.INPUT_GROUP_BUTTON = "input-group-button", e.INPUT_GROUP_INPUT = "input-group-input", e.INPUT_GROUP_TEXTAREA = "input-group-textarea", e.LABEL = "label", e.LOADER = "loader", e.PROGRESS = "progress", e.SEPARATOR = "separator", e.SKELETON = "skeleton", e.SWITCH = "switch", e.TABLE = "table", e.TABLE_HEADER = "table-header", e.TABLE_BODY = "table-body", e.TABLE_FOOTER = "table-footer", e.TABLE_HEAD = "table-head", e.TABLE_ROW = "table-row", e.TABLE_CELL = "table-cell", e.TABLE_CAPTION = "table-caption", e.TEXTAREA = "textarea", e.SIGNATURE = "signature", e.EACH = "each", e.IF = "if", e))(s || {});
33
+ new Set(Object.values(s));
34
+ const A = t.string().length(24).meta({
36
35
  description: "MongoDB ObjectId (24-character hex string)",
37
36
  example: "67e091ab2c4d3f22001a2b3c"
38
37
  });
@@ -40,7 +39,7 @@ t.string().email().meta({
40
39
  description: "Valid email address",
41
40
  example: "jack@datahaven.net"
42
41
  });
43
- const k = t.string().datetime({ offset: !0 }).meta({
42
+ const I = t.string().datetime({ offset: !0 }).meta({
44
43
  description: "ISO 8601 datetime with optional timezone offset",
45
44
  example: "2077-12-25T23:59:59Z"
46
45
  });
@@ -55,35 +54,35 @@ t.object({
55
54
  const b = t.object({
56
55
  id: t.string().optional().meta({ description: "Unique identifier for the element" }),
57
56
  className: t.string().optional().meta({ description: "CSS classes to apply to the element" })
58
- }), ar = b.extend({
57
+ }), Ma = b.extend({
59
58
  href: t.string({ error: "Link destination (href) is required" }).min(1, { message: "Link destination (href) cannot be empty" })
60
- }), rr = b.extend({
59
+ }), Ja = b.extend({
61
60
  variant: t.enum(["h1", "h2", "h3", "h4", "h5", "h6"], {
62
61
  error: "Invalid heading variant. Must be one of: h1, h2, h3, h4, h5, or h6"
63
62
  }).optional().meta({ description: "Heading level variant (h1-h6)" }),
64
63
  as: t.enum(["h1", "h2", "h3", "h4", "h5", "h6"], {
65
64
  error: "Invalid heading element type. Must be one of: h1, h2, h3, h4, h5, or h6"
66
65
  }).optional().meta({ description: "Render as a different heading element" })
67
- }).optional(), nr = b.extend({
66
+ }).optional(), Xa = b.extend({
68
67
  size: t.enum(["xs", "sm", "md", "lg", "xl"], {
69
68
  error: "Invalid paragraph size. Must be one of: xs, sm, md, lg, or xl"
70
69
  }).optional().meta({ description: "Paragraph text size" }),
71
70
  variant: t.enum(["default", "muted"]).optional().meta({ description: "Paragraph style variant" }),
72
71
  as: t.enum(["p", "div", "span"]).optional().meta({ description: "Render as a different element" })
73
- }).optional(), or = b.optional(), ir = b.optional(), sr = b.optional(), dr = b.optional(), lr = b.optional(), cr = b.optional(), ur = b.extend({
72
+ }).optional(), Ka = b.optional(), Ya = b.optional(), Za = b.optional(), Qa = b.optional(), er = b.optional(), tr = b.optional(), ar = b.extend({
74
73
  variant: t.enum(["default", "success", "warning", "destructive"], {
75
74
  error: "Invalid alert variant. Must be one of: default, success, warning, or destructive"
76
75
  }).optional().meta({ description: "Alert style variant" }),
77
76
  size: t.enum(["default", "sm", "lg"]).optional().meta({ description: "Alert size" }),
78
77
  raised: t.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Alert shadow elevation" })
79
- }).optional(), pr = b.extend({
78
+ }).optional(), rr = b.extend({
80
79
  variant: t.enum(["default", "secondary", "destructive", "outline", "ghost"], {
81
80
  error: "Invalid badge variant. Must be one of: default, secondary, destructive, outline, or ghost"
82
81
  }).optional().meta({ description: "Badge style variant" }),
83
82
  size: t.enum(["sm", "md", "lg"]).optional().meta({ description: "Badge size" }),
84
83
  raised: t.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Badge shadow elevation" }),
85
84
  extrude: t.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Badge extrude elevation" })
86
- }).optional(), mr = b.extend({
85
+ }).optional(), nr = b.extend({
87
86
  variant: t.enum(["default", "secondary", "outline", "destructive", "warning", "ghost"], {
88
87
  error: "Invalid button variant. Must be one of: default, secondary, outline, destructive, warning, or ghost"
89
88
  }).optional().meta({ description: "Button style variant" }),
@@ -98,15 +97,15 @@ const b = t.object({
98
97
  type: t.enum(["button", "submit"], {
99
98
  error: "Invalid button type. Must be either 'button' or 'submit'"
100
99
  }).optional().meta({ description: "Button type attribute" })
101
- }).optional(), gr = b.extend({
100
+ }).optional(), or = b.extend({
102
101
  size: t.enum(["sm", "md"]).optional().meta({ description: "Card size" }),
103
102
  raised: t.enum(["none", "xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Card shadow elevation" })
104
- }).optional(), hr = b.optional(), fr = b.optional(), br = b.optional(), xr = b.optional(), vr = b.optional(), yr = b.optional(), wr = b.optional(), Ar = b.extend({
103
+ }).optional(), sr = b.optional(), ir = b.optional(), dr = b.optional(), lr = b.optional(), cr = b.optional(), ur = b.optional(), pr = b.optional(), gr = b.extend({
105
104
  checked: t.union([t.string(), t.boolean()]).optional().meta({ description: "Checkbox checked state" }),
106
105
  disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the checkbox is disabled" }),
107
106
  required: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the checkbox must be checked" }),
108
107
  size: t.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Checkbox size" })
109
- }).strict(), zr = b.extend({
108
+ }).strict(), mr = b.extend({
110
109
  src: t.union(
111
110
  [
112
111
  t.url({ error: "Image source (src) must be a valid URL" }),
@@ -117,26 +116,26 @@ const b = t.object({
117
116
  }
118
117
  ),
119
118
  alt: t.string().optional().default("unknown image url").meta({ description: "Alternative text for the image" })
120
- }).strict(), Ir = b.extend({
119
+ }).strict(), hr = b.extend({
121
120
  value: t.union([t.string(), t.number()], {
122
121
  error: "OTP value is required"
123
122
  }).meta({ description: "Current OTP value" }),
124
123
  placeholder: t.string().optional().meta({ description: "Placeholder text for the OTP input" }),
125
124
  disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the OTP input is disabled" }),
126
125
  containerClassName: t.string().optional().meta({ description: "Custom CSS class for the OTP input container" })
127
- }).strict(), Tr = b.extend({
126
+ }).strict(), fr = b.extend({
128
127
  value: t.union([t.string(), t.number()], {
129
128
  error: "Input value is required"
130
129
  }).meta({ description: "Current input value" }),
131
130
  placeholder: t.string().optional().meta({ description: "Placeholder text shown when empty" }),
132
131
  disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the input is disabled" })
133
- }).strict(), Cr = b.extend({
132
+ }).strict(), br = b.extend({
134
133
  htmlFor: t.string().min(1, {
135
134
  message: "Label 'for' attribute is required and must reference an input ID"
136
135
  }).meta({ description: "ID of the associated input element" }),
137
136
  size: t.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Label text size" }),
138
137
  variant: t.enum(["default", "underline", "destructive"]).optional().meta({ description: "Label style variant" })
139
- }).strict(), kr = b.extend({
138
+ }).strict(), xr = b.extend({
140
139
  checked: t.union([t.string(), t.boolean()], {
141
140
  error: "Switch checked state is required"
142
141
  }).meta({ description: "Current switch state" }),
@@ -144,7 +143,7 @@ const b = t.object({
144
143
  required: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the switch must be turned on" }),
145
144
  size: t.enum(["sm", "md", "lg"]).optional().meta({ description: "Switch size" }),
146
145
  rounded: t.enum(["none", "sm", "md", "lg", "full"]).optional().meta({ description: "Switch border radius" })
147
- }).strict(), Sr = b.extend({
146
+ }).strict(), vr = b.extend({
148
147
  value: t.string({ error: "Textarea value is required" }).meta({ description: "Current textarea content" }),
149
148
  placeholder: t.string().optional().meta({ description: "Placeholder text shown when empty" }),
150
149
  disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the textarea is disabled" }),
@@ -152,57 +151,39 @@ const b = t.object({
152
151
  rows: t.number().min(1, { message: "Minimum number of rows is 1" }).max(100, { message: "Maximum number of rows is 100" }).optional().meta({ description: "Number of visible text lines" }),
153
152
  minLength: t.number().min(0, { message: "Minimum character length cannot be negative" }).optional().meta({ description: "Minimum number of characters allowed" }),
154
153
  maxLength: t.number().max(1e4, { message: "Maximum character length cannot exceed 10,000" }).optional().meta({ description: "Maximum number of characters allowed" })
155
- }).strict(), Rr = b.optional(), _r = b.optional(), Nr = b.extend({
154
+ }).strict(), yr = b.optional(), wr = b.optional(), Ar = b.extend({
156
155
  align: t.enum(["inline-start", "inline-end", "block-start", "block-end"]).optional().meta({ description: "Alignment of the addon within the input group" })
157
- }).optional(), Pr = b.extend({
156
+ }).optional(), zr = b.extend({
158
157
  value: t.union([t.string(), t.number()], {
159
158
  error: "Input value is required"
160
159
  }).meta({ description: "Current input value" }),
161
160
  placeholder: t.string().optional().meta({ description: "Placeholder text shown when empty" }),
162
161
  disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the input is disabled" })
163
- }).strict(), Er = b.extend({
162
+ }).strict(), Tr = b.extend({
164
163
  variant: t.enum(["default", "secondary", "outline", "destructive", "warning", "ghost"]).optional(),
165
164
  size: t.enum(["xs", "sm", "md", "lg"]).optional()
166
- }).optional(), Dr = b.extend({
165
+ }).optional(), Ir = b.extend({
167
166
  value: t.string({ error: "Textarea value is required" }).meta({ description: "Current textarea content" }),
168
167
  placeholder: t.string().optional(),
169
168
  disabled: t.union([t.string(), t.boolean()]).optional()
170
- }).strict(), Or = b.extend({
169
+ }).strict(), Cr = b.extend({
171
170
  value: t.string().nullable().meta({ description: "Current signature value (base64 or null if empty)" }),
172
171
  canvasClassname: t.string().optional().meta({ description: "Custom CSS class for the signature canvas" }),
173
172
  imageType: t.enum(["image/png", "image/jpeg", "image/webp"]).optional().meta({ description: "Image format for the exported signature" })
174
- }).strict(), Lr = b.extend({
173
+ }).strict(), kr = b.extend({
175
174
  selected: t.union([t.string(), t.date(), t.array(t.date())], {
176
175
  error: "Invalid calendar selection. Must be a date string, Date object, or array of dates"
177
176
  }).optional().meta({ description: "Currently selected date(s)" }),
178
177
  buttonVariant: t.enum(["default", "secondary", "outline", "destructive", "warning", "ghost"]).optional().meta({ description: "Variant for calendar navigation buttons" }),
179
178
  hideWeekends: t.boolean().optional().meta({ description: "Whether to hide Saturday and Sunday columns" })
180
- }).optional(), Ur = b.extend({
181
- pins: t.array(
182
- t.object({
183
- id: t.union([t.string(), t.number()]).meta({ description: "Unique pin identifier" }),
184
- latitude: t.number({ error: "Pin latitude is required and must be a number" }).min(-90, { message: "Latitude must be between -90 and 90 degrees" }).max(90, { message: "Latitude must be between -90 and 90 degrees" }),
185
- longitude: t.number({ error: "Pin longitude is required and must be a number" }).min(-180, {
186
- message: "Longitude must be between -180 and 180 degrees"
187
- }).max(180, {
188
- message: "Longitude must be between -180 and 180 degrees"
189
- }),
190
- label: t.string().optional().meta({ description: "Optional pin label" })
191
- })
192
- ).optional().meta({ description: "Array of map pins to display" }),
193
- readonly: t.boolean().optional().meta({ description: "Whether the map is read-only" }),
194
- fixed: t.boolean().optional().meta({ description: "Whether the map viewport is fixed (no pan/zoom)" }),
195
- allowMultiple: t.boolean().optional().meta({ description: "Whether to allow multiple pins" }),
196
- zoom: t.number().min(0).max(18).optional().meta({ description: "Initial zoom level" }),
197
- pitch: t.number().optional().meta({ description: "Map pitch angle" })
198
- }).optional(), Br = b.optional(), jr = b.optional(), Fr = b.optional(), $r = b.optional(), Hr = b.optional(), Gr = b.optional(), Wr = b.optional(), Mr = b.optional(), qr = b.extend({
179
+ }).optional(), Sr = b.optional(), Rr = b.optional(), _r = b.optional(), Nr = b.optional(), Er = b.optional(), Pr = b.optional(), Or = b.optional(), Dr = b.optional(), Lr = b.extend({
199
180
  variant: t.enum(["default", "contained", "separated"]).optional().meta({ description: "Accordion style variant" }),
200
181
  raised: t.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Accordion shadow elevation" }),
201
182
  extrude: t.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Accordion extrude elevation" })
202
- }).optional(), Vr = b.optional(), Xr = b.extend({
183
+ }).optional(), Ur = b.optional(), Br = b.extend({
203
184
  disabled: t.union([t.string(), t.boolean()]).optional().meta({ description: "Whether the accordion trigger is disabled" }),
204
185
  icon: t.any().optional().meta({ description: "Custom icon component for the trigger" })
205
- }).optional(), Jr = b.optional(), Yr = b.extend({
186
+ }).optional(), jr = b.optional(), $r = b.extend({
206
187
  src: t.string().optional().meta({ description: "Image source URL" }),
207
188
  alt: t.string().optional().meta({ description: "Alternative text for the avatar image" }),
208
189
  size: t.enum(["full", "sm", "md", "lg", "xl"]).optional().meta({ description: "Avatar size" }),
@@ -210,14 +191,14 @@ const b = t.object({
210
191
  raised: t.enum(["xs", "sm", "md", "lg"]).optional().meta({ description: "Avatar shadow elevation" }),
211
192
  fallback: t.string().optional().meta({ description: "Fallback text or element when image fails to load" }),
212
193
  badge: t.any().optional().meta({ description: "Badge element to overlay on the avatar" })
213
- }).optional(), Kr = b.optional(), Zr = b.optional(), Qr = b.optional(), en = b.extend({
194
+ }).optional(), Hr = b.optional(), Fr = b.optional(), Gr = b.optional(), Wr = b.extend({
214
195
  variant: t.enum(["spinner", "ping"]).optional().meta({ description: "Loader animation variant" }),
215
196
  fill: t.enum(["default", "destructive", "warning", "pending"]).optional().meta({ description: "Loader fill color" }),
216
197
  size: t.enum(["sm", "md", "lg"]).optional().meta({ description: "Loader size" }),
217
198
  icon: t.any().optional().meta({ description: "Custom spinner icon component" }),
218
199
  pingIcon: t.any().optional().meta({ description: "Custom ping icon component" }),
219
200
  iconProps: t.any().optional().meta({ description: "Props to pass to the icon components" })
220
- }).optional(), tn = b.extend({
201
+ }).optional(), Vr = b.extend({
221
202
  mode: t.enum(["single", "multiple"]).optional().meta({ description: "Progress display mode" }),
222
203
  value: t.union([
223
204
  t.number().nullable(),
@@ -231,177 +212,174 @@ const b = t.object({
231
212
  size: t.enum(["xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Progress size" }),
232
213
  raised: t.enum(["default", "xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Progress shadow elevation" }),
233
214
  stacked: t.enum(["default", "xs", "sm", "md", "lg", "xl"]).optional().meta({ description: "Progress stacked spacing" })
234
- }).optional(), an = b.extend({
215
+ }).optional(), qr = b.extend({
235
216
  variant: t.enum(["circle", "square", "default", "text"]).optional().meta({ description: "Skeleton shape variant" }),
236
217
  animate: t.boolean().optional().meta({ description: "Whether to animate the skeleton" })
237
- }).optional(), rn = t.lazy(() => t.union([t.string(), dn])), f = t.object({
238
- children: t.array(rn).optional().meta({ description: "Child nodes to render inside this element" })
239
- }), Ue = f.extend({
240
- type: t.literal(i.DIV),
241
- args: dr
242
- }).meta({ description: "Container div element for grouping content" }), Be = f.extend({
243
- type: t.literal(i.A),
218
+ }).optional(), Mr = t.lazy(() => t.union([t.string(), Yr])), f = t.object({
219
+ children: t.array(Mr).optional().meta({ description: "Child nodes to render inside this element" })
220
+ }), Be = f.extend({
221
+ type: t.literal(s.DIV),
222
+ args: Qa
223
+ }).meta({ description: "Container div element for grouping content" }), je = f.extend({
224
+ type: t.literal(s.A),
225
+ args: Ma
226
+ }).meta({ description: "Anchor/link element" }), $e = f.extend({
227
+ type: t.literal(s.H),
228
+ args: Ja
229
+ }).meta({ description: "Heading element (h1-h6)" }), He = f.extend({
230
+ type: t.literal(s.P),
231
+ args: Xa
232
+ }).meta({ description: "Paragraph text element" }), Fe = f.extend({
233
+ type: t.literal(s.OL),
234
+ args: Ka
235
+ }).meta({ description: "Ordered list element" }), Ge = f.extend({
236
+ type: t.literal(s.UL),
237
+ args: Ya
238
+ }).meta({ description: "Unordered list element" }), We = f.extend({
239
+ type: t.literal(s.LI),
240
+ args: Za
241
+ }).meta({ description: "List item element" }), Ve = f.extend({
242
+ type: t.literal(s.SPAN),
243
+ args: er
244
+ }).meta({ description: "Inline span element" }), qe = f.extend({
245
+ type: t.literal(s.SEPARATOR),
246
+ args: tr
247
+ }).meta({ description: "Horizontal separator / divider element" }), Me = f.extend({
248
+ type: t.literal(s.ALERT),
244
249
  args: ar
245
- }).meta({ description: "Anchor/link element" }), je = f.extend({
246
- type: t.literal(i.H),
250
+ }).meta({ description: "Alert message box" }), Je = f.extend({
251
+ type: t.literal(s.BADGE),
247
252
  args: rr
248
- }).meta({ description: "Heading element (h1-h6)" }), Fe = f.extend({
249
- type: t.literal(i.P),
253
+ }).meta({ description: "Badge/status indicator" }), Xe = f.extend({
254
+ type: t.literal(s.BUTTON),
250
255
  args: nr
251
- }).meta({ description: "Paragraph text element" }), $e = f.extend({
252
- type: t.literal(i.OL),
256
+ }).meta({ description: "Clickable button element" }), Ke = f.extend({
257
+ type: t.literal(s.CARD),
253
258
  args: or
254
- }).meta({ description: "Ordered list element" }), He = f.extend({
255
- type: t.literal(i.UL),
256
- args: ir
257
- }).meta({ description: "Unordered list element" }), Ge = f.extend({
258
- type: t.literal(i.LI),
259
- args: sr
260
- }).meta({ description: "List item element" }), We = f.extend({
261
- type: t.literal(i.SPAN),
262
- args: lr
263
- }).meta({ description: "Inline span element" }), Me = f.extend({
264
- type: t.literal(i.SEPARATOR),
265
- args: cr
266
- }).meta({ description: "Horizontal separator / divider element" }), qe = f.extend({
267
- type: t.literal(i.ALERT),
268
- args: ur
269
- }).meta({ description: "Alert message box" }), Ve = f.extend({
270
- type: t.literal(i.BADGE),
271
- args: pr
272
- }).meta({ description: "Badge/status indicator" }), Xe = f.extend({
273
- type: t.literal(i.BUTTON),
274
- args: mr
275
- }).meta({ description: "Clickable button element" }), Je = f.extend({
276
- type: t.literal(i.CARD),
277
- args: gr
278
259
  }).meta({ description: "Card container element" }), Ye = f.extend({
279
- type: t.literal(i.CHECKBOX),
280
- args: Ar
281
- }).meta({ description: "Checkbox input element" }), Ke = f.extend({
282
- type: t.literal(i.IMAGE),
283
- args: zr
284
- }).meta({ description: "Image element" }), Ze = f.extend({
285
- type: t.literal(i.OTP),
286
- args: Ir
287
- }).meta({ description: "One-time password (OTP) input" }), Qe = f.extend({
288
- type: t.literal(i.INPUT),
289
- args: Tr
290
- }).meta({ description: "Text input element" }), et = f.extend({
291
- type: t.literal(i.LABEL),
292
- args: Cr
293
- }).meta({ description: "Form label element" }), tt = f.extend({
294
- type: t.literal(i.SWITCH),
295
- args: kr
296
- }).meta({ description: "Toggle switch element" }), at = f.extend({
297
- type: t.literal(i.TEXTAREA),
298
- args: Sr
299
- }).meta({ description: "Multi-line text input" }), rt = f.extend({
300
- type: t.literal(i.SIGNATURE),
301
- args: Or
302
- }).meta({ description: "Signature pad input" }), nt = f.extend({
303
- type: t.literal(i.CALENDAR),
304
- args: Lr
305
- }).meta({ description: "Date picker calendar" }), ot = f.extend({
306
- type: t.literal(i.MAP),
307
- args: Ur
308
- }).meta({ description: "Interactive map element" }), it = f.extend({
309
- type: t.literal(i.CARD_HEADER),
260
+ type: t.literal(s.CHECKBOX),
261
+ args: gr
262
+ }).meta({ description: "Checkbox input element" }), Ze = f.extend({
263
+ type: t.literal(s.IMAGE),
264
+ args: mr
265
+ }).meta({ description: "Image element" }), Qe = f.extend({
266
+ type: t.literal(s.OTP),
310
267
  args: hr
311
- }).meta({ description: "Card header container" }), st = f.extend({
312
- type: t.literal(i.CARD_TITLE),
268
+ }).meta({ description: "One-time password (OTP) input" }), et = f.extend({
269
+ type: t.literal(s.INPUT),
313
270
  args: fr
314
- }).meta({ description: "Card title element" }), dt = f.extend({
315
- type: t.literal(i.CARD_DESCRIPTION),
271
+ }).meta({ description: "Text input element" }), tt = f.extend({
272
+ type: t.literal(s.LABEL),
316
273
  args: br
317
- }).meta({ description: "Card description element" }), lt = f.extend({
318
- type: t.literal(i.CARD_CONTENT),
274
+ }).meta({ description: "Form label element" }), at = f.extend({
275
+ type: t.literal(s.SWITCH),
319
276
  args: xr
320
- }).meta({ description: "Card content body" }), ct = f.extend({
321
- type: t.literal(i.CARD_FOOTER),
277
+ }).meta({ description: "Toggle switch element" }), rt = f.extend({
278
+ type: t.literal(s.TEXTAREA),
322
279
  args: vr
280
+ }).meta({ description: "Multi-line text input" }), nt = f.extend({
281
+ type: t.literal(s.SIGNATURE),
282
+ args: Cr
283
+ }).meta({ description: "Signature pad input" }), ot = f.extend({
284
+ type: t.literal(s.CALENDAR),
285
+ args: kr
286
+ }).meta({ description: "Date picker calendar" }), st = f.extend({
287
+ type: t.literal(s.CARD_HEADER),
288
+ args: sr
289
+ }).meta({ description: "Card header container" }), it = f.extend({
290
+ type: t.literal(s.CARD_TITLE),
291
+ args: ir
292
+ }).meta({ description: "Card title element" }), dt = f.extend({
293
+ type: t.literal(s.CARD_DESCRIPTION),
294
+ args: dr
295
+ }).meta({ description: "Card description element" }), lt = f.extend({
296
+ type: t.literal(s.CARD_CONTENT),
297
+ args: lr
298
+ }).meta({ description: "Card content body" }), ct = f.extend({
299
+ type: t.literal(s.CARD_FOOTER),
300
+ args: cr
323
301
  }).meta({ description: "Card footer container" }), ut = f.extend({
324
- type: t.literal(i.CARD_ACTION),
325
- args: yr
302
+ type: t.literal(s.CARD_ACTION),
303
+ args: ur
326
304
  }).meta({ description: "Card action slot" }), pt = f.extend({
327
- type: t.literal(i.CARD_ICON),
328
- args: wr
329
- }).meta({ description: "Card icon slot" }), mt = f.extend({
330
- type: t.literal(i.TABLE),
331
- args: Br
332
- }).meta({ description: "Table container" }), gt = f.extend({
333
- type: t.literal(i.TABLE_HEADER),
334
- args: jr
305
+ type: t.literal(s.CARD_ICON),
306
+ args: pr
307
+ }).meta({ description: "Card icon slot" }), gt = f.extend({
308
+ type: t.literal(s.TABLE),
309
+ args: Sr
310
+ }).meta({ description: "Table container" }), mt = f.extend({
311
+ type: t.literal(s.TABLE_HEADER),
312
+ args: Rr
335
313
  }).meta({ description: "Table header section" }), ht = f.extend({
336
- type: t.literal(i.TABLE_BODY),
337
- args: Fr
314
+ type: t.literal(s.TABLE_BODY),
315
+ args: _r
338
316
  }).meta({ description: "Table body section" }), ft = f.extend({
339
- type: t.literal(i.TABLE_FOOTER),
340
- args: $r
317
+ type: t.literal(s.TABLE_FOOTER),
318
+ args: Nr
341
319
  }).meta({ description: "Table footer section" }), bt = f.extend({
342
- type: t.literal(i.TABLE_HEAD),
343
- args: Hr
320
+ type: t.literal(s.TABLE_HEAD),
321
+ args: Er
344
322
  }).meta({ description: "Table header cell" }), xt = f.extend({
345
- type: t.literal(i.TABLE_ROW),
346
- args: Gr
323
+ type: t.literal(s.TABLE_ROW),
324
+ args: Pr
347
325
  }).meta({ description: "Table row" }), vt = f.extend({
348
- type: t.literal(i.TABLE_CELL),
349
- args: Wr
326
+ type: t.literal(s.TABLE_CELL),
327
+ args: Or
350
328
  }).meta({ description: "Table data cell" }), yt = f.extend({
351
- type: t.literal(i.TABLE_CAPTION),
352
- args: Mr
329
+ type: t.literal(s.TABLE_CAPTION),
330
+ args: Dr
353
331
  }).meta({ description: "Table caption" }), wt = f.extend({
354
- type: t.literal(i.ACCORDION),
355
- args: qr
332
+ type: t.literal(s.ACCORDION),
333
+ args: Lr
356
334
  }).meta({ description: "Accordion container" }), At = f.extend({
357
- type: t.literal(i.ACCORDION_ITEM),
358
- args: Vr
335
+ type: t.literal(s.ACCORDION_ITEM),
336
+ args: Ur
359
337
  }).meta({ description: "Accordion item" }), zt = f.extend({
360
- type: t.literal(i.ACCORDION_TRIGGER),
361
- args: Xr
362
- }).meta({ description: "Accordion trigger" }), It = f.extend({
363
- type: t.literal(i.ACCORDION_CONTENT),
364
- args: Jr
365
- }).meta({ description: "Accordion content panel" }), Tt = f.extend({
366
- type: t.literal(i.AVATAR),
367
- args: Yr
338
+ type: t.literal(s.ACCORDION_TRIGGER),
339
+ args: Br
340
+ }).meta({ description: "Accordion trigger" }), Tt = f.extend({
341
+ type: t.literal(s.ACCORDION_CONTENT),
342
+ args: jr
343
+ }).meta({ description: "Accordion content panel" }), It = f.extend({
344
+ type: t.literal(s.AVATAR),
345
+ args: $r
368
346
  }).meta({ description: "Avatar image or fallback" }), Ct = f.extend({
369
- type: t.literal(i.COLLAPSIBLE),
370
- args: Kr
347
+ type: t.literal(s.COLLAPSIBLE),
348
+ args: Hr
371
349
  }).meta({ description: "Collapsible container" }), kt = f.extend({
372
- type: t.literal(i.COLLAPSIBLE_TRIGGER),
373
- args: Zr
350
+ type: t.literal(s.COLLAPSIBLE_TRIGGER),
351
+ args: Fr
374
352
  }).meta({ description: "Collapsible trigger" }), St = f.extend({
375
- type: t.literal(i.COLLAPSIBLE_CONTENT),
376
- args: Qr
353
+ type: t.literal(s.COLLAPSIBLE_CONTENT),
354
+ args: Gr
377
355
  }).meta({ description: "Collapsible content panel" }), Rt = f.extend({
378
- type: t.literal(i.LOADER),
379
- args: en
356
+ type: t.literal(s.LOADER),
357
+ args: Wr
380
358
  }).meta({ description: "Loading spinner indicator" }), _t = f.extend({
381
- type: t.literal(i.PROGRESS),
382
- args: tn
359
+ type: t.literal(s.PROGRESS),
360
+ args: Vr
383
361
  }).meta({ description: "Progress bar indicator" }), Nt = f.extend({
384
- type: t.literal(i.SKELETON),
385
- args: an
386
- }).meta({ description: "Skeleton loading placeholder" }), Pt = f.extend({
387
- type: t.literal(i.INPUT_GROUP),
388
- args: Rr
389
- }).meta({ description: "Input group container" }), Et = f.extend({
390
- type: t.literal(i.INPUT_GROUP_TEXT),
391
- args: _r
392
- }).meta({ description: "Text element within input group" }), Dt = f.extend({
393
- type: t.literal(i.INPUT_GROUP_ADDON),
394
- args: Nr
395
- }).meta({ description: "Addon container within input group" }), Ot = f.extend({
396
- type: t.literal(i.INPUT_GROUP_INPUT),
397
- args: Pr
362
+ type: t.literal(s.SKELETON),
363
+ args: qr
364
+ }).meta({ description: "Skeleton loading placeholder" }), Et = f.extend({
365
+ type: t.literal(s.INPUT_GROUP),
366
+ args: yr
367
+ }).meta({ description: "Input group container" }), Pt = f.extend({
368
+ type: t.literal(s.INPUT_GROUP_TEXT),
369
+ args: wr
370
+ }).meta({ description: "Text element within input group" }), Ot = f.extend({
371
+ type: t.literal(s.INPUT_GROUP_ADDON),
372
+ args: Ar
373
+ }).meta({ description: "Addon container within input group" }), Dt = f.extend({
374
+ type: t.literal(s.INPUT_GROUP_INPUT),
375
+ args: zr
398
376
  }).meta({ description: "Input element within input group" }), Lt = f.extend({
399
- type: t.literal(i.INPUT_GROUP_BUTTON),
400
- args: Er
377
+ type: t.literal(s.INPUT_GROUP_BUTTON),
378
+ args: Tr
401
379
  }).meta({ description: "Button element within input group" }), Ut = f.extend({
402
- type: t.literal(i.INPUT_GROUP_TEXTAREA),
403
- args: Dr
404
- }).meta({ description: "Textarea element within input group" }), nn = t.object({
380
+ type: t.literal(s.INPUT_GROUP_TEXTAREA),
381
+ args: Ir
382
+ }).meta({ description: "Textarea element within input group" }), Jr = t.object({
405
383
  items: t.string({ error: "each.items is required" }).min(1, { message: "each.items cannot be empty" }).meta({
406
384
  description: 'Binding path to the array to iterate, e.g. "{{applicants}}". Must be a plain path (not a computed/filtered expression) so each row maps back to a real store index for two-way binding.'
407
385
  }),
@@ -411,29 +389,29 @@ const b = t.object({
411
389
  description: 'Binding expression used as the React key per row, e.g. "{{applicant.id}}". Falls back to the row index when omitted.'
412
390
  })
413
391
  }).strict(), Bt = f.extend({
414
- type: t.literal(i.EACH),
415
- args: nn
416
- }).meta({ description: "Repeats its children once per item in a bound array" }), on = t.object({
392
+ type: t.literal(s.EACH),
393
+ args: Jr
394
+ }).meta({ description: "Repeats its children once per item in a bound array" }), Xr = t.object({
417
395
  condition: t.string({ error: "if.condition is required" }).min(1, { message: "if.condition cannot be empty" }).meta({ description: "Binding expression; children render only when it evaluates truthy" })
418
396
  }).strict(), jt = f.extend({
419
- type: t.literal(i.IF),
420
- args: on
397
+ type: t.literal(s.IF),
398
+ args: Xr
421
399
  }).meta({ description: "Conditionally renders its children based on a bound expression" });
422
- function g(e) {
400
+ function m(e) {
423
401
  return e.shape.args;
424
402
  }
425
403
  function h(e) {
426
404
  return e.meta()?.description;
427
405
  }
428
- function sn(e) {
406
+ function Kr(e) {
429
407
  if (Object.keys(e).length === 0)
430
408
  throw new Error("createTemplateSchema: registry must declare at least one component");
431
409
  let a;
432
410
  const r = t.lazy(() => t.union([t.string(), a])), n = t.object({
433
411
  children: t.array(r).optional().meta({ description: "Child nodes to render inside this element" })
434
- }), o = Object.entries(e).map(([s, { argsSchema: l, description: u }]) => {
412
+ }), o = Object.entries(e).map(([i, { argsSchema: l, description: u }]) => {
435
413
  const p = n.extend({
436
- type: t.literal(s),
414
+ type: t.literal(i),
437
415
  args: l
438
416
  });
439
417
  return u ? p.meta({ description: u }) : p;
@@ -443,169 +421,168 @@ function sn(e) {
443
421
  o
444
422
  ), { Node: r, ComponentNode: a };
445
423
  }
446
- const na = {
447
- [i.DIV]: { argsSchema: g(Ue), description: h(Ue) },
448
- [i.A]: { argsSchema: g(Be), description: h(Be) },
449
- [i.H]: { argsSchema: g(je), description: h(je) },
450
- [i.P]: { argsSchema: g(Fe), description: h(Fe) },
451
- [i.OL]: { argsSchema: g($e), description: h($e) },
452
- [i.UL]: { argsSchema: g(He), description: h(He) },
453
- [i.LI]: { argsSchema: g(Ge), description: h(Ge) },
454
- [i.SPAN]: { argsSchema: g(We), description: h(We) },
455
- [i.SEPARATOR]: {
456
- argsSchema: g(Me),
457
- description: h(Me)
424
+ const ra = {
425
+ [s.DIV]: { argsSchema: m(Be), description: h(Be) },
426
+ [s.A]: { argsSchema: m(je), description: h(je) },
427
+ [s.H]: { argsSchema: m($e), description: h($e) },
428
+ [s.P]: { argsSchema: m(He), description: h(He) },
429
+ [s.OL]: { argsSchema: m(Fe), description: h(Fe) },
430
+ [s.UL]: { argsSchema: m(Ge), description: h(Ge) },
431
+ [s.LI]: { argsSchema: m(We), description: h(We) },
432
+ [s.SPAN]: { argsSchema: m(Ve), description: h(Ve) },
433
+ [s.SEPARATOR]: {
434
+ argsSchema: m(qe),
435
+ description: h(qe)
458
436
  },
459
- [i.ALERT]: { argsSchema: g(qe), description: h(qe) },
460
- [i.BADGE]: { argsSchema: g(Ve), description: h(Ve) },
461
- [i.BUTTON]: { argsSchema: g(Xe), description: h(Xe) },
462
- [i.CARD]: { argsSchema: g(Je), description: h(Je) },
463
- [i.CARD_HEADER]: {
464
- argsSchema: g(it),
465
- description: h(it)
466
- },
467
- [i.CARD_TITLE]: {
468
- argsSchema: g(st),
437
+ [s.ALERT]: { argsSchema: m(Me), description: h(Me) },
438
+ [s.BADGE]: { argsSchema: m(Je), description: h(Je) },
439
+ [s.BUTTON]: { argsSchema: m(Xe), description: h(Xe) },
440
+ [s.CARD]: { argsSchema: m(Ke), description: h(Ke) },
441
+ [s.CARD_HEADER]: {
442
+ argsSchema: m(st),
469
443
  description: h(st)
470
444
  },
471
- [i.CARD_DESCRIPTION]: {
472
- argsSchema: g(dt),
445
+ [s.CARD_TITLE]: {
446
+ argsSchema: m(it),
447
+ description: h(it)
448
+ },
449
+ [s.CARD_DESCRIPTION]: {
450
+ argsSchema: m(dt),
473
451
  description: h(dt)
474
452
  },
475
- [i.CARD_CONTENT]: {
476
- argsSchema: g(lt),
453
+ [s.CARD_CONTENT]: {
454
+ argsSchema: m(lt),
477
455
  description: h(lt)
478
456
  },
479
- [i.CARD_FOOTER]: {
480
- argsSchema: g(ct),
457
+ [s.CARD_FOOTER]: {
458
+ argsSchema: m(ct),
481
459
  description: h(ct)
482
460
  },
483
- [i.CARD_ACTION]: {
484
- argsSchema: g(ut),
461
+ [s.CARD_ACTION]: {
462
+ argsSchema: m(ut),
485
463
  description: h(ut)
486
464
  },
487
- [i.CARD_ICON]: {
488
- argsSchema: g(pt),
465
+ [s.CARD_ICON]: {
466
+ argsSchema: m(pt),
489
467
  description: h(pt)
490
468
  },
491
- [i.CHECKBOX]: {
492
- argsSchema: g(Ye),
469
+ [s.CHECKBOX]: {
470
+ argsSchema: m(Ye),
493
471
  description: h(Ye)
494
472
  },
495
- [i.IMAGE]: { argsSchema: g(Ke), description: h(Ke) },
496
- [i.OTP]: { argsSchema: g(Ze), description: h(Ze) },
497
- [i.INPUT]: { argsSchema: g(Qe), description: h(Qe) },
498
- [i.LABEL]: { argsSchema: g(et), description: h(et) },
499
- [i.SWITCH]: { argsSchema: g(tt), description: h(tt) },
500
- [i.TEXTAREA]: {
501
- argsSchema: g(at),
502
- description: h(at)
503
- },
504
- [i.SIGNATURE]: {
505
- argsSchema: g(rt),
473
+ [s.IMAGE]: { argsSchema: m(Ze), description: h(Ze) },
474
+ [s.OTP]: { argsSchema: m(Qe), description: h(Qe) },
475
+ [s.INPUT]: { argsSchema: m(et), description: h(et) },
476
+ [s.LABEL]: { argsSchema: m(tt), description: h(tt) },
477
+ [s.SWITCH]: { argsSchema: m(at), description: h(at) },
478
+ [s.TEXTAREA]: {
479
+ argsSchema: m(rt),
506
480
  description: h(rt)
507
481
  },
508
- [i.CALENDAR]: {
509
- argsSchema: g(nt),
482
+ [s.SIGNATURE]: {
483
+ argsSchema: m(nt),
510
484
  description: h(nt)
511
485
  },
512
- [i.MAP]: { argsSchema: g(ot), description: h(ot) },
513
- [i.TABLE]: { argsSchema: g(mt), description: h(mt) },
514
- [i.TABLE_HEADER]: {
515
- argsSchema: g(gt),
516
- description: h(gt)
486
+ [s.CALENDAR]: {
487
+ argsSchema: m(ot),
488
+ description: h(ot)
517
489
  },
518
- [i.TABLE_BODY]: {
519
- argsSchema: g(ht),
490
+ [s.TABLE]: { argsSchema: m(gt), description: h(gt) },
491
+ [s.TABLE_HEADER]: {
492
+ argsSchema: m(mt),
493
+ description: h(mt)
494
+ },
495
+ [s.TABLE_BODY]: {
496
+ argsSchema: m(ht),
520
497
  description: h(ht)
521
498
  },
522
- [i.TABLE_FOOTER]: {
523
- argsSchema: g(ft),
499
+ [s.TABLE_FOOTER]: {
500
+ argsSchema: m(ft),
524
501
  description: h(ft)
525
502
  },
526
- [i.TABLE_HEAD]: {
527
- argsSchema: g(bt),
503
+ [s.TABLE_HEAD]: {
504
+ argsSchema: m(bt),
528
505
  description: h(bt)
529
506
  },
530
- [i.TABLE_ROW]: {
531
- argsSchema: g(xt),
507
+ [s.TABLE_ROW]: {
508
+ argsSchema: m(xt),
532
509
  description: h(xt)
533
510
  },
534
- [i.TABLE_CELL]: {
535
- argsSchema: g(vt),
511
+ [s.TABLE_CELL]: {
512
+ argsSchema: m(vt),
536
513
  description: h(vt)
537
514
  },
538
- [i.TABLE_CAPTION]: {
539
- argsSchema: g(yt),
515
+ [s.TABLE_CAPTION]: {
516
+ argsSchema: m(yt),
540
517
  description: h(yt)
541
518
  },
542
- [i.ACCORDION]: {
543
- argsSchema: g(wt),
519
+ [s.ACCORDION]: {
520
+ argsSchema: m(wt),
544
521
  description: h(wt)
545
522
  },
546
- [i.ACCORDION_ITEM]: {
547
- argsSchema: g(At),
523
+ [s.ACCORDION_ITEM]: {
524
+ argsSchema: m(At),
548
525
  description: h(At)
549
526
  },
550
- [i.ACCORDION_TRIGGER]: {
551
- argsSchema: g(zt),
527
+ [s.ACCORDION_TRIGGER]: {
528
+ argsSchema: m(zt),
552
529
  description: h(zt)
553
530
  },
554
- [i.ACCORDION_CONTENT]: {
555
- argsSchema: g(It),
556
- description: h(It)
531
+ [s.ACCORDION_CONTENT]: {
532
+ argsSchema: m(Tt),
533
+ description: h(Tt)
557
534
  },
558
- [i.AVATAR]: { argsSchema: g(Tt), description: h(Tt) },
559
- [i.COLLAPSIBLE]: {
560
- argsSchema: g(Ct),
535
+ [s.AVATAR]: { argsSchema: m(It), description: h(It) },
536
+ [s.COLLAPSIBLE]: {
537
+ argsSchema: m(Ct),
561
538
  description: h(Ct)
562
539
  },
563
- [i.COLLAPSIBLE_TRIGGER]: {
564
- argsSchema: g(kt),
540
+ [s.COLLAPSIBLE_TRIGGER]: {
541
+ argsSchema: m(kt),
565
542
  description: h(kt)
566
543
  },
567
- [i.COLLAPSIBLE_CONTENT]: {
568
- argsSchema: g(St),
544
+ [s.COLLAPSIBLE_CONTENT]: {
545
+ argsSchema: m(St),
569
546
  description: h(St)
570
547
  },
571
- [i.LOADER]: { argsSchema: g(Rt), description: h(Rt) },
572
- [i.PROGRESS]: {
573
- argsSchema: g(_t),
548
+ [s.LOADER]: { argsSchema: m(Rt), description: h(Rt) },
549
+ [s.PROGRESS]: {
550
+ argsSchema: m(_t),
574
551
  description: h(_t)
575
552
  },
576
- [i.SKELETON]: {
577
- argsSchema: g(Nt),
553
+ [s.SKELETON]: {
554
+ argsSchema: m(Nt),
578
555
  description: h(Nt)
579
556
  },
580
- [i.INPUT_GROUP]: {
581
- argsSchema: g(Pt),
582
- description: h(Pt)
583
- },
584
- [i.INPUT_GROUP_TEXT]: {
585
- argsSchema: g(Et),
557
+ [s.INPUT_GROUP]: {
558
+ argsSchema: m(Et),
586
559
  description: h(Et)
587
560
  },
588
- [i.INPUT_GROUP_ADDON]: {
589
- argsSchema: g(Dt),
590
- description: h(Dt)
561
+ [s.INPUT_GROUP_TEXT]: {
562
+ argsSchema: m(Pt),
563
+ description: h(Pt)
591
564
  },
592
- [i.INPUT_GROUP_INPUT]: {
593
- argsSchema: g(Ot),
565
+ [s.INPUT_GROUP_ADDON]: {
566
+ argsSchema: m(Ot),
594
567
  description: h(Ot)
595
568
  },
596
- [i.INPUT_GROUP_BUTTON]: {
597
- argsSchema: g(Lt),
569
+ [s.INPUT_GROUP_INPUT]: {
570
+ argsSchema: m(Dt),
571
+ description: h(Dt)
572
+ },
573
+ [s.INPUT_GROUP_BUTTON]: {
574
+ argsSchema: m(Lt),
598
575
  description: h(Lt)
599
576
  },
600
- [i.INPUT_GROUP_TEXTAREA]: {
601
- argsSchema: g(Ut),
577
+ [s.INPUT_GROUP_TEXTAREA]: {
578
+ argsSchema: m(Ut),
602
579
  description: h(Ut)
603
580
  },
604
- [i.EACH]: { argsSchema: g(Bt), description: h(Bt) },
605
- [i.IF]: { argsSchema: g(jt), description: h(jt) }
606
- }, oa = sn(na), dn = oa.ComponentNode, $ = oa.Node;
581
+ [s.EACH]: { argsSchema: m(Bt), description: h(Bt) },
582
+ [s.IF]: { argsSchema: m(jt), description: h(jt) }
583
+ }, na = Kr(ra), Yr = na.ComponentNode, B = na.Node;
607
584
  t.object({
608
- _id: T.meta({ readOnly: !0 }),
585
+ _id: A.meta({ readOnly: !0 }),
609
586
  email: t.string().email().meta({
610
587
  description: "User's email address (used as the primary identifier)",
611
588
  example: "jack@datahaven.net",
@@ -614,8 +591,8 @@ t.object({
614
591
  name: t.string().min(1).max(100).meta({ description: "Full display name", example: "Razor Jack" }),
615
592
  emailVerified: t.boolean().nullable().optional().meta({ description: "Whether the user's email has been verified" }),
616
593
  image: t.string().optional().meta({ description: "Avatar image URL", example: "https://cdn.datahaven.net/avatars/rj7741.png" }),
617
- createdAt: k.optional().meta({ description: "When the user account was created", readOnly: !0 }),
618
- updatedAt: k.optional().meta({ description: "When the user account was last updated", readOnly: !0 })
594
+ createdAt: I.optional().meta({ description: "When the user account was created", readOnly: !0 }),
595
+ updatedAt: I.optional().meta({ description: "When the user account was last updated", readOnly: !0 })
619
596
  }).strict().meta({
620
597
  description: "An authenticated user account. Users are distinct from organization memberships — a user may belong to multiple organizations."
621
598
  });
@@ -624,7 +601,7 @@ t.object({
624
601
  image: t.string().optional().meta({ description: "Updated avatar URL", example: "https://cdn.datahaven.net/avatars/cj7741.png" })
625
602
  }).strict().meta({ description: "Update the authenticated user's profile" });
626
603
  t.object({
627
- _id: T.meta({ readOnly: !0 }),
604
+ _id: A.meta({ readOnly: !0 }),
628
605
  clientId: t.string().min(1).meta({ description: "Unique client identifier for the organization", example: "pb-org-7f3a2b9c", readOnly: !0 }),
629
606
  name: t.string().min(3).max(50).meta({ description: "Unique organization slug/identifier", example: "neon-shadow" }),
630
607
  displayName: t.string().min(3).max(50).meta({ description: "Human-readable organization name shown in UI and emails", example: "Neon Shadow Corp" }),
@@ -633,11 +610,11 @@ t.object({
633
610
  contactEmail: t.string().email().meta({ description: "Primary contact email for the organization", example: "legal@neon-shadow.io" }),
634
611
  icon: t.string().meta({ description: "Organization icon/logo URL", example: "https://cdn.neon-shadow.io/icon.png" }),
635
612
  banner: t.string().nullable().optional().meta({ description: "Organization banner image URL", example: "https://cdn.neon-shadow.io/banner.png" }),
636
- createdBy: T.meta({ description: "User ObjectId who created the organization", readOnly: !0 }),
613
+ createdBy: A.meta({ description: "User ObjectId who created the organization", readOnly: !0 }),
637
614
  customerId: t.string().optional().nullable().meta({ description: "Stripe customer ID for billing", example: "cus_9x8y7z6w5v4u3t2s", readOnly: !0 }),
638
615
  subscriptionId: t.string().optional().nullable().meta({ description: "Stripe subscription ID", example: "sub_1A2B3C4D5E6F7G8H", readOnly: !0 }),
639
- createdAt: k.meta({ description: "When the organization was created", readOnly: !0 }),
640
- updatedAt: k.meta({ description: "When the organization was last updated", readOnly: !0 })
616
+ createdAt: I.meta({ description: "When the organization was created", readOnly: !0 }),
617
+ updatedAt: I.meta({ description: "When the organization was last updated", readOnly: !0 })
641
618
  }).strict().meta({
642
619
  description: "A tenant organization. Each organization has its own isolated workspace, templates, signature requests, and API keys."
643
620
  });
@@ -650,15 +627,15 @@ t.object({
650
627
  icon: t.string().meta({ description: "Organization icon/logo URL", example: "https://cdn.neon-shadow.io/icon.png" })
651
628
  }).strict().meta({ description: "Create a new organization" });
652
629
  t.object({
653
- _id: T.meta({ readOnly: !0 }),
654
- organization: T.meta({ description: "The organization this membership belongs to", readOnly: !0 }),
655
- user: T.meta({ description: "The user who is a member of the organization", readOnly: !0 }),
630
+ _id: A.meta({ readOnly: !0 }),
631
+ organization: A.meta({ description: "The organization this membership belongs to", readOnly: !0 }),
632
+ user: A.meta({ description: "The user who is a member of the organization", readOnly: !0 }),
656
633
  role: t.string().min(1).meta({ description: "Role identifier (e.g. 'admin', 'member', 'viewer')", example: "admin" }),
657
634
  permissions: t.string().min(1).meta({ description: "Permission set identifier or JSON string", example: '{"templates":"rw","forms":"r"}' }),
658
635
  status: t.enum(["active", "inactive", "blocked"]).meta({ description: "Membership status", example: "active" }),
659
- lastLogin: k.nullable().meta({ description: "When the user last logged into this organization", readOnly: !0 }),
660
- createdAt: k.meta({ description: "When the membership was created", readOnly: !0 }),
661
- updatedAt: k.optional().meta({ description: "When the membership was last updated", readOnly: !0 })
636
+ lastLogin: I.nullable().meta({ description: "When the user last logged into this organization", readOnly: !0 }),
637
+ createdAt: I.meta({ description: "When the membership was created", readOnly: !0 }),
638
+ updatedAt: I.optional().meta({ description: "When the membership was last updated", readOnly: !0 })
662
639
  }).strict().meta({
663
640
  description: "A user's membership within an organization. This links a User to an Organization and defines their role and permissions."
664
641
  });
@@ -670,14 +647,14 @@ t.object({
670
647
  permissions: t.string().min(1).meta({ description: "Permission set to assign", example: '{"templates":"r","forms":"rw"}' })
671
648
  }).strict().meta({ description: "Invite a user to join an organization" });
672
649
  t.object({
673
- _id: T.meta({ description: "OrganizationUser membership MongoDB ObjectId", readOnly: !0 }),
650
+ _id: A.meta({ description: "OrganizationUser membership MongoDB ObjectId", readOnly: !0 }),
674
651
  role: t.string().min(2).meta({ description: "Updated role", example: "viewer" }),
675
652
  permissions: t.string().min(1).meta({ description: "Updated permission set", example: '{"templates":"r"}' })
676
653
  }).strict().meta({ description: "Update an organization user's role or permissions" });
677
654
  t.object({
678
- _id: T.meta({ readOnly: !0 }),
679
- organization: T.meta({ description: "Organization that owns this template", readOnly: !0 }),
680
- createdBy: T.meta({ description: "OrganizationUser ID who created this template", readOnly: !0 }),
655
+ _id: A.meta({ readOnly: !0 }),
656
+ organization: A.meta({ description: "Organization that owns this template", readOnly: !0 }),
657
+ createdBy: A.meta({ description: "OrganizationUser ID who created this template", readOnly: !0 }),
681
658
  name: t.string().min(1).meta({ description: "Template name (unique within the organization)", example: "Neural_NDA_v3" }),
682
659
  description: t.string().default("").meta({ description: "Human-readable description of the template's purpose", example: "Standard non-disclosure agreement with neural implant data clause" }),
683
660
  config: t.any().meta({ description: "The Bonsai component tree defining the template layout and fields" }),
@@ -687,22 +664,22 @@ t.object({
687
664
  css: t.string().optional().meta({ description: "Generated Tailwind CSS for the template layout" }),
688
665
  tags: t.array(t.string()).default([]).meta({ description: "Tags for organizing and discovering templates", example: ["nda", "legal", "neural-interface"] }),
689
666
  active: t.boolean().default(!0).meta({ description: "Whether the template is active and available for use" }),
690
- lastUsed: k.nullable().optional().meta({ description: "When the template was last referenced in a signature request", readOnly: !0 }),
667
+ lastUsed: I.nullable().optional().meta({ description: "When the template was last referenced in a signature request", readOnly: !0 }),
691
668
  usageCount: t.number().default(0).meta({ description: "Total number of signature requests created from this template" }),
692
669
  version: t.number().default(1).meta({ description: "Template schema version (increments on significant config changes)" }),
693
- createdAt: k.meta({ description: "When the template was created", readOnly: !0 }),
694
- updatedAt: k.meta({ description: "When the template was last updated", readOnly: !0 })
670
+ createdAt: I.meta({ description: "When the template was created", readOnly: !0 }),
671
+ updatedAt: I.meta({ description: "When the template was last updated", readOnly: !0 })
695
672
  }).strict().meta({
696
673
  description: "A reusable Bonsai signature template. Templates define the form layout via a component tree and can be referenced by ID when creating signature requests."
697
674
  });
698
675
  t.object({
699
- ou: T.meta({ description: "OrganizationUser ID of the user creating the template" }),
676
+ ou: A.meta({ description: "OrganizationUser ID of the user creating the template" }),
700
677
  name: t.string().min(1).meta({ description: "Template name (must be unique within the organization)", example: "Neural_NDA_v3" }),
701
678
  description: t.string().optional().meta({ description: "Optional description of the template's purpose", example: "Standard NDA with neural implant clause" }),
702
- config: $.meta({ description: "The Bonsai component tree that defines the template layout" }),
679
+ config: B.meta({ description: "The Bonsai component tree that defines the template layout" }),
703
680
  pdf: t.object({
704
- header: $.optional().meta({ description: "PDF header Bonsai component tree" }),
705
- footer: $.optional().meta({ description: "PDF footer Bonsai component tree" })
681
+ header: B.optional().meta({ description: "PDF header Bonsai component tree" }),
682
+ footer: B.optional().meta({ description: "PDF footer Bonsai component tree" })
706
683
  }).optional(),
707
684
  tags: t.array(t.string()).optional().meta({ description: "Tags for organizing and filtering templates", example: ["nda", "legal"] })
708
685
  }).strict().meta({ description: "Create a new reusable signature template" });
@@ -711,7 +688,7 @@ t.object({
711
688
  name: t.string().meta({ description: "Template name", example: "Neural_NDA_v3" }),
712
689
  contentHash: t.string().optional().meta({ description: "SHA-256 hash of the config, useful for deduplication" })
713
690
  }).strict().meta({ description: "Created template summary" });
714
- const ln = t.enum([
691
+ const Zr = t.enum([
715
692
  "pending",
716
693
  "captured",
717
694
  "completed",
@@ -719,33 +696,33 @@ const ln = t.enum([
719
696
  "revoked"
720
697
  ]);
721
698
  t.object({
722
- _id: T.meta({ readOnly: !0 }),
699
+ _id: A.meta({ readOnly: !0 }),
723
700
  id: t.string().meta({ description: "Public-facing unique request ID (random hex string)", example: "fr_a7b8c9d0e1f2", readOnly: !0 }),
724
701
  token: t.string().meta({ description: "Verification token used for cookie-based auth in the signer's browser", readOnly: !0 }),
725
702
  email: t.string().email().meta({ description: "Recipient email address where the signature link was sent", example: "jack@datahaven.net" }),
726
703
  name: t.string().min(1).meta({ description: "Recipient's display name", example: "Razor Jack" }),
727
704
  attachments: t.array(t.string()).optional().meta({ description: "Array of attachment URLs included with the form", example: ["https://files.datahaven.net/nda_v3.pdf"] }),
728
705
  data: t.any().optional().meta({ description: "Form field data submitted by the signer" }),
729
- webhooks: t.array(T).optional().meta({ description: "Webhook ObjectIds notified on lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
706
+ webhooks: t.array(A).optional().meta({ description: "Webhook ObjectIds notified on lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
730
707
  metadata: t.any().optional().meta({ description: "Capture-time metadata such as IP address, user agent, and timestamps" }),
731
- expiry: k.meta({ description: "When the signature request link expires" }),
732
- due: k.optional().nullable().meta({ description: "Soft deadline for completing the signature" }),
708
+ expiry: I.meta({ description: "When the signature request link expires" }),
709
+ due: I.optional().nullable().meta({ description: "Soft deadline for completing the signature" }),
733
710
  digest: t.string().meta({ description: "SHA-256 hash of the serialized payload, used for deduplication", readOnly: !0 }),
734
711
  template: t.any().meta({ description: "Snapshot of the Bonsai component tree config at the time of form creation", readOnly: !0 }),
735
712
  header: t.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page header rendering", readOnly: !0 }),
736
713
  footer: t.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page footer rendering", readOnly: !0 }),
737
714
  css: t.string().meta({ description: "Tailwind CSS generated from the template at the time of form creation", readOnly: !0 }),
738
- status: ln.meta({ description: "Current lifecycle status of the form request", example: "pending" }),
739
- organization: T.meta({ description: "Organization that owns this form request", readOnly: !0 }),
740
- createdAt: k.meta({ description: "When the form request was created", readOnly: !0 }),
741
- updatedAt: k.meta({ description: "When the form request was last updated", readOnly: !0 })
715
+ status: Zr.meta({ description: "Current lifecycle status of the form request", example: "pending" }),
716
+ organization: A.meta({ description: "Organization that owns this form request", readOnly: !0 }),
717
+ createdAt: I.meta({ description: "When the form request was created", readOnly: !0 }),
718
+ updatedAt: I.meta({ description: "When the form request was last updated", readOnly: !0 })
742
719
  }).strict().meta({
743
720
  description: "A signature request sent to a recipient. Tracks the full lifecycle from creation through signing, completion, or revocation."
744
721
  });
745
722
  t.object({
746
723
  name: t.string().min(1).meta({ description: "Recipient's display name (used in the email greeting and form header)", example: "Razor Jack" }),
747
724
  email: t.string().email().meta({ description: "Recipient email address where the signature link will be sent", example: "jack@datahaven.net" }),
748
- template: t.union([$, t.string()]).meta({
725
+ template: t.union([B, t.string()]).meta({
749
726
  description: "Either an inline Bonsai component tree config, or a saved template MongoDB ObjectId to use as the form layout"
750
727
  }),
751
728
  expiry: t.coerce.date().optional().meta({ description: "When the signature request link expires (ISO 8601 date)", example: "2077-12-25T23:59:59Z" }),
@@ -755,8 +732,8 @@ t.object({
755
732
  metadata: t.any().optional().meta({ description: "Arbitrary metadata to associate with the form request", example: { department: "Legal", priority: "high" } }),
756
733
  data: t.any().optional().meta({ description: "Pre-filled form field data to populate the form on load", example: { full_name: "Razor Jack", badge_id: "RJ-7741" } }),
757
734
  pdf: t.union([t.boolean(), t.object({
758
- header: t.union([$, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page header rendering" }),
759
- footer: t.union([$, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page footer rendering" })
735
+ header: t.union([B, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page header rendering" }),
736
+ footer: t.union([B, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page footer rendering" })
760
737
  })]).optional().meta({ description: "PDF file config object (header||footer) or `true/false` boolean to trigger PDF file generation after form capture" })
761
738
  }).strict().meta({ description: "Create a new signature request targeting a recipient" });
762
739
  t.object({
@@ -775,24 +752,24 @@ t.object({
775
752
  })
776
753
  }).strict().meta({ description: "Submit captured form data from the signer's browser session" });
777
754
  t.object({
778
- _id: T.meta({ readOnly: !0 }),
755
+ _id: A.meta({ readOnly: !0 }),
779
756
  id: t.string().meta({ description: "Public key identifier (e.g. pb-xxxx). Used as the 'client' field when authenticating.", example: "pb-a7f3b2c9d1e8f4a5b6c7d8e9", readOnly: !0 }),
780
757
  secret: t.string().meta({ description: "Encrypted API key secret — only viewable at creation time", readOnly: !0 }),
781
758
  allowedOrigins: t.array(t.string()).default([]).meta({ description: "CORS origin allowlist. Requests from origins not in this list are rejected.", example: ["https://console.neon-shadow.io"] }),
782
759
  allowedIps: t.array(t.string()).default([]).meta({ description: "IP CIDR allowlist. Requests from IPs not in this list are rejected.", example: ["203.0.113.0/24"] }),
783
760
  active: t.boolean().default(!0).meta({ description: "Whether the key is active and can be used for authentication" }),
784
- expiry: k.meta({ description: "When the API key expires and can no longer be used" }),
785
- lastUsed: k.meta({ description: "Timestamp of the most recent request using this key", readOnly: !0 }),
761
+ expiry: I.meta({ description: "When the API key expires and can no longer be used" }),
762
+ lastUsed: I.meta({ description: "Timestamp of the most recent request using this key", readOnly: !0 }),
786
763
  audience: t.enum(["internal", "external"]).meta({ description: "Key audience — 'internal' for server-to-server, 'external' for client-side", example: "internal" }),
787
- organization: T.meta({ description: "Organization this key belongs to", readOnly: !0 }),
788
- generatedBy: T.meta({ description: "OrganizationUser ID who created this key", readOnly: !0 }),
789
- createdAt: k.meta({ description: "When the API key was created", readOnly: !0 }),
790
- updatedAt: k.meta({ description: "When the API key was last updated", readOnly: !0 })
764
+ organization: A.meta({ description: "Organization this key belongs to", readOnly: !0 }),
765
+ generatedBy: A.meta({ description: "OrganizationUser ID who created this key", readOnly: !0 }),
766
+ createdAt: I.meta({ description: "When the API key was created", readOnly: !0 }),
767
+ updatedAt: I.meta({ description: "When the API key was last updated", readOnly: !0 })
791
768
  }).strict().meta({
792
769
  description: "An API key scoped to an organization. Each key has configurable IP and origin restrictions for fine-grained access control."
793
770
  });
794
771
  t.object({
795
- ou: T.meta({ description: "OrganizationUser ID of the user creating the API key" }),
772
+ ou: A.meta({ description: "OrganizationUser ID of the user creating the API key" }),
796
773
  expiry: t.coerce.date().optional().meta({ description: "Key expiration date (defaults to +1 year from creation)", example: "2078-12-19T00:00:00Z" }),
797
774
  audience: t.enum(["internal", "external"]).meta({ description: "Key audience — 'internal' for server-to-server, 'external' for client-side usage", example: "internal" }),
798
775
  allowedOrigins: t.array(t.string()).optional().meta({ description: "CORS origin allowlist (e.g. ['https://app.example.com']). Empty array disables origin restriction.", example: ["https://console.neon-shadow.io", "https://api.datahaven.net"] }),
@@ -803,21 +780,21 @@ t.object({
803
780
  secret: t.string().meta({ description: "API key secret — **this is the only time the secret is returned**. Store it securely.", readOnly: !0 })
804
781
  }).strict().meta({ description: "API key credentials — the secret is only shown once" });
805
782
  t.object({
806
- _id: T.meta({ readOnly: !0 }),
783
+ _id: A.meta({ readOnly: !0 }),
807
784
  id: t.string().meta({ description: "Public webhook identifier (e.g. pb-wbhk-xxxx)", example: "pb-wbhk-a7b8c9d0", readOnly: !0 }),
808
785
  url: t.string().url().meta({ description: "HTTPS endpoint receiving POST event notifications", example: "https://hooks.datahaven.net/events" }),
809
786
  secret: t.string().meta({ description: "HMAC-SHA256 signing secret — used to verify that webhook payloads genuinely came from Bonsai", readOnly: !0 }),
810
787
  active: t.boolean().default(!0).meta({ description: "Whether the webhook is active and receiving events" }),
811
- lastUsed: k.meta({ description: "When the webhook last received an event", readOnly: !0 }),
812
- organization: T.meta({ description: "Organization that owns this webhook", readOnly: !0 }),
813
- generatedBy: T.meta({ description: "OrganizationUser ID who created this webhook", readOnly: !0 }),
814
- createdAt: k.meta({ description: "When the webhook was created", readOnly: !0 }),
815
- updatedAt: k.meta({ description: "When the webhook was last updated", readOnly: !0 })
788
+ lastUsed: I.meta({ description: "When the webhook last received an event", readOnly: !0 }),
789
+ organization: A.meta({ description: "Organization that owns this webhook", readOnly: !0 }),
790
+ generatedBy: A.meta({ description: "OrganizationUser ID who created this webhook", readOnly: !0 }),
791
+ createdAt: I.meta({ description: "When the webhook was created", readOnly: !0 }),
792
+ updatedAt: I.meta({ description: "When the webhook was last updated", readOnly: !0 })
816
793
  }).strict().meta({
817
794
  description: "A webhook destination for form request lifecycle events. When a form is created, signed, or revoked, Bonsai sends a POST request to this URL with a JSON payload signed via HMAC-SHA256."
818
795
  });
819
796
  t.object({
820
- ou: T.meta({ description: "OrganizationUser ID of the user creating the webhook" }),
797
+ ou: A.meta({ description: "OrganizationUser ID of the user creating the webhook" }),
821
798
  url: t.string().url().meta({ description: "HTTPS endpoint that will receive POST event notifications", example: "https://hooks.datahaven.net/events" })
822
799
  }).strict().meta({ description: "Payload for creating a new webhook destination" });
823
800
  t.object({
@@ -839,7 +816,7 @@ t.object({
839
816
  t.object({
840
817
  token: t.string().meta({ description: "New JWT access token (1 hour expiry)", example: "eyJhbGciOiJIUzI1NiIs...c012" })
841
818
  }).strict().meta({ description: "New JWT access token" });
842
- const cn = t.enum([
819
+ const Qr = t.enum([
843
820
  "application/pdf",
844
821
  "image/png",
845
822
  "image/jpeg",
@@ -853,10 +830,10 @@ t.object({
853
830
  t.object({
854
831
  downloadUrl: t.string().url().meta({ description: "Pre-signed GCS download URL", example: "https://storage.googleapis.com/bonsai-secure/f1e2d3...X-Goog-Signature=def456" }),
855
832
  filename: t.string().meta({ description: "Original filename (for Content-Disposition)", example: "signed_nda_razorjack.pdf" }),
856
- mimeType: cn.meta({ description: "MIME type (for Content-Type)", example: "application/pdf" }),
833
+ mimeType: Qr.meta({ description: "MIME type (for Content-Type)", example: "application/pdf" }),
857
834
  size: t.number().int().meta({ description: "File size in bytes", example: 245760 })
858
835
  }).strict().meta({ description: "Signed download URL for secure file access" });
859
- const un = t.enum([
836
+ const en = t.enum([
860
837
  "pending",
861
838
  "generating",
862
839
  "completed",
@@ -864,46 +841,46 @@ const un = t.enum([
864
841
  "revoked"
865
842
  ]);
866
843
  t.object({
867
- _id: T.meta({ readOnly: !0 }),
844
+ _id: A.meta({ readOnly: !0 }),
868
845
  id: t.string().meta({ description: "Public-facing unique request ID (random hex string)", example: "fr_a7b8c9d0e1f2", readOnly: !0 }),
869
846
  token: t.string().meta({ description: "Verification token used for cookie-based auth in the signer's browser", readOnly: !0 }),
870
847
  data: t.any().optional().meta({ description: "Form field data submitted by the signer/requester" }),
871
- webhooks: t.array(T).optional().meta({ description: "Webhook ObjectIds notified on lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
848
+ webhooks: t.array(A).optional().meta({ description: "Webhook ObjectIds notified on lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
872
849
  metadata: t.any().optional().meta({ description: "File metadata such as size, contentType, etc." }),
873
850
  digest: t.string().meta({ description: "SHA-256 hash of the serialized payload, used for deduplication", readOnly: !0 }),
874
851
  template: t.any().meta({ description: "Snapshot of the Bonsai component tree config at the time of PDF creation" }),
875
852
  header: t.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page header rendering" }),
876
853
  footer: t.any().meta({ description: "Snapshot of the (small) Bonsai component tree config used for the output PDF page footer rendering" }),
877
854
  css: t.string().meta({ description: "Tailwind CSS generated from the template at the time of PDF generation request", readOnly: !0 }),
878
- status: un.meta({ description: "Current lifecycle status of the PDF request", example: "pending" }),
879
- organization: T.meta({ description: "Organization that owns this PDF request", readOnly: !0 }),
880
- createdAt: k.meta({ description: "When the PDF request was created", readOnly: !0 }),
881
- updatedAt: k.meta({ description: "When the PDF request was last updated", readOnly: !0 })
855
+ status: en.meta({ description: "Current lifecycle status of the PDF request", example: "pending" }),
856
+ organization: A.meta({ description: "Organization that owns this PDF request", readOnly: !0 }),
857
+ createdAt: I.meta({ description: "When the PDF request was created", readOnly: !0 }),
858
+ updatedAt: I.meta({ description: "When the PDF request was last updated", readOnly: !0 })
882
859
  }).strict().meta({
883
860
  description: "A PDF request used to trigger the generation of a custom PDF file. Tracks the full lifecycle and alerts sends results via webhook."
884
861
  });
885
862
  t.object({
886
- template: t.union([$, t.string()]).meta({
863
+ template: t.union([B, t.string()]).meta({
887
864
  description: "Either an inline Bonsai component tree config, or a saved template MongoDB ObjectId to use as the PDF content layout"
888
865
  }),
889
866
  webhooks: t.array(t.string()).min(1).meta({ description: "Array of webhook ObjectIds to notify on form lifecycle events", example: ["67e091ab2c4d3f22001a2b3c"] }),
890
867
  metadata: t.any().optional().meta({ description: "Arbitrary metadata to associate with the PDF request", example: { department: "Legal", priority: "high" } }),
891
868
  data: t.any().optional().meta({ description: "Pre-filled template field data to populate the PDF with", example: { full_name: "Razor Jack", badge_id: "RJ-7741" } }),
892
- header: t.union([$, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page header rendering" }),
893
- footer: t.union([$, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page footer rendering" })
869
+ header: t.union([B, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page header rendering" }),
870
+ footer: t.union([B, t.string()]).optional().meta({ description: "A (small) Bonsai component tree config used for the output PDF page footer rendering" })
894
871
  }).strict().meta({ description: "Create a new PDF request to generate a PDF file from a Bonsai template" });
895
872
  t.object({
896
873
  pdfId: t.string().meta({ description: "MongoDB ObjectId of the newly created PDF request (this is NOT the rendered pdf file - a file ID is returned after async pdf generation via webhook)", example: "67e091ab2c4d3f22001a2b3c", readOnly: !0 })
897
874
  }).strict().meta({ description: "Created form request identifier" });
898
875
  Ta.config({
899
- customError: Ca()
876
+ customError: Ia()
900
877
  });
901
- const ia = L.forwardRef(({ ...e }, a) => /* @__PURE__ */ d("a", { ref: a, ...e }));
902
- ia.displayName = "A";
878
+ const oa = ee.forwardRef(({ ...e }, a) => /* @__PURE__ */ d("a", { ref: a, ...e }));
879
+ oa.displayName = "A";
903
880
  function c(...e) {
904
- return Sa(ka(e));
881
+ return ka(Ca(e));
905
882
  }
906
- const pn = R("font-heading font-semibold scroll-m-20", {
883
+ const tn = S("font-heading font-semibold scroll-m-20", {
907
884
  variants: {
908
885
  variant: {
909
886
  h1: "text-6xl font-semibold tracking-tight",
@@ -917,18 +894,18 @@ const pn = R("font-heading font-semibold scroll-m-20", {
917
894
  defaultVariants: {
918
895
  variant: "h3"
919
896
  }
920
- }), sa = L.forwardRef(
897
+ }), sa = ee.forwardRef(
921
898
  ({ className: e, variant: a, as: r, ...n }, o) => /* @__PURE__ */ d(
922
899
  r || a || "h3",
923
900
  {
924
901
  ref: o,
925
- className: c(pn({ variant: a }), e),
902
+ className: c(tn({ variant: a }), e),
926
903
  ...n
927
904
  }
928
905
  )
929
906
  );
930
907
  sa.displayName = "H";
931
- const mn = R("text-base", {
908
+ const an = S("text-base", {
932
909
  variants: {
933
910
  variant: {
934
911
  default: "",
@@ -946,24 +923,24 @@ const mn = R("text-base", {
946
923
  variant: "default",
947
924
  size: "md"
948
925
  }
949
- }), da = L.forwardRef(
950
- ({ className: e, variant: a, size: r, as: n = "p", ...o }, s) => /* @__PURE__ */ d(
926
+ }), ia = ee.forwardRef(
927
+ ({ className: e, variant: a, size: r, as: n = "p", ...o }, i) => /* @__PURE__ */ d(
951
928
  n,
952
929
  {
953
- ref: s,
954
- className: c(mn({ variant: a, size: r }), e),
930
+ ref: i,
931
+ className: c(an({ variant: a, size: r }), e),
955
932
  ...o
956
933
  }
957
934
  )
958
935
  );
959
- da.displayName = "P";
960
- const gn = [
936
+ ia.displayName = "P";
937
+ const rn = [
961
938
  { duration: 10, intensity: 0.2 },
962
939
  { duration: 5, delay: 120, intensity: 0.4 }
963
- ], hn = [{ duration: 10, intensity: 0.2 }], fn = [
940
+ ], nn = [{ duration: 10, intensity: 0.2 }], on = [
964
941
  { duration: 10, intensity: 0.2 },
965
942
  { duration: 5, delay: 190, intensity: 0.4 }
966
- ], bn = [{ duration: 20, intensity: 0.2 }], xn = [{ duration: 10, intensity: 0.2 }], vn = R("flex w-full flex-col", {
943
+ ], sn = [{ duration: 20, intensity: 0.2 }], dn = [{ duration: 10, intensity: 0.2 }], ln = S("flex w-full flex-col", {
967
944
  variants: {
968
945
  variant: {
969
946
  default: "",
@@ -987,7 +964,7 @@ const gn = [
987
964
  variant: "default"
988
965
  }
989
966
  });
990
- function yn({
967
+ function cn({
991
968
  className: e,
992
969
  variant: a = "default",
993
970
  raised: r,
@@ -995,14 +972,14 @@ function yn({
995
972
  ...o
996
973
  }) {
997
974
  return /* @__PURE__ */ d(
998
- ae.Root,
975
+ te.Root,
999
976
  {
1000
977
  "data-slot": "accordion",
1001
978
  "data-variant": a,
1002
979
  "data-raised": r ?? void 0,
1003
980
  "data-extrude": n ?? void 0,
1004
981
  className: c(
1005
- vn({ variant: a, raised: r, extrude: n }),
982
+ ln({ variant: a, raised: r, extrude: n }),
1006
983
  "group/accordion",
1007
984
  e
1008
985
  ),
@@ -1010,9 +987,9 @@ function yn({
1010
987
  }
1011
988
  );
1012
989
  }
1013
- function wn({ className: e, ...a }) {
990
+ function un({ className: e, ...a }) {
1014
991
  return /* @__PURE__ */ d(
1015
- ae.Item,
992
+ te.Item,
1016
993
  {
1017
994
  "data-slot": "accordion-item",
1018
995
  className: c(
@@ -1059,17 +1036,17 @@ function wn({ className: e, ...a }) {
1059
1036
  }
1060
1037
  );
1061
1038
  }
1062
- function An({
1039
+ function pn({
1063
1040
  className: e,
1064
1041
  children: a,
1065
1042
  disabled: r,
1066
1043
  icon: n = ze,
1067
1044
  onClick: o,
1068
- ...s
1045
+ ...i
1069
1046
  }) {
1070
- const { trigger: l } = oe();
1071
- return /* @__PURE__ */ d(ae.Header, { className: "flex", children: /* @__PURE__ */ C(
1072
- ae.Trigger,
1047
+ const { trigger: l } = se();
1048
+ return /* @__PURE__ */ d(te.Header, { className: "flex", children: /* @__PURE__ */ k(
1049
+ te.Trigger,
1073
1050
  {
1074
1051
  "data-slot": "accordion-trigger",
1075
1052
  className: c(
@@ -1084,9 +1061,9 @@ function An({
1084
1061
  e
1085
1062
  ),
1086
1063
  onClick: (u) => {
1087
- l(xn), o?.(u);
1064
+ l(dn), o?.(u);
1088
1065
  },
1089
- ...s,
1066
+ ...i,
1090
1067
  children: [
1091
1068
  a,
1092
1069
  /* @__PURE__ */ d(
@@ -1103,13 +1080,13 @@ function An({
1103
1080
  }
1104
1081
  ) });
1105
1082
  }
1106
- function zn({
1083
+ function gn({
1107
1084
  className: e,
1108
1085
  children: a,
1109
1086
  ...r
1110
1087
  }) {
1111
1088
  return /* @__PURE__ */ d(
1112
- ae.Panel,
1089
+ te.Panel,
1113
1090
  {
1114
1091
  "data-slot": "accordion-content",
1115
1092
  keepMounted: !0,
@@ -1128,7 +1105,7 @@ function zn({
1128
1105
  }
1129
1106
  );
1130
1107
  }
1131
- const In = R(
1108
+ const mn = S(
1132
1109
  "relative grid px-4 py-3 gap-0.5 rounded-base border text-left text-sm *:[svg]:row-span-2 *:[svg]:translate-y-1 *:[svg]:text-current has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-24 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5",
1133
1110
  {
1134
1111
  variants: {
@@ -1156,7 +1133,7 @@ const In = R(
1156
1133
  }
1157
1134
  }
1158
1135
  );
1159
- function Tn({
1136
+ function hn({
1160
1137
  className: e,
1161
1138
  variant: a = "default",
1162
1139
  size: r = "default",
@@ -1169,7 +1146,7 @@ function Tn({
1169
1146
  "data-slot": "alert",
1170
1147
  role: "alert",
1171
1148
  className: c(
1172
- In({ variant: a, raised: n, size: r }),
1149
+ mn({ variant: a, raised: n, size: r }),
1173
1150
  "group/alert",
1174
1151
  e
1175
1152
  ),
@@ -1177,7 +1154,7 @@ function Tn({
1177
1154
  }
1178
1155
  );
1179
1156
  }
1180
- const Cn = R("relative flex shrink-0 select-none", {
1157
+ const fn = S("relative flex shrink-0 select-none", {
1181
1158
  variants: {
1182
1159
  size: {
1183
1160
  full: "size-full",
@@ -1205,34 +1182,34 @@ const Cn = R("relative flex shrink-0 select-none", {
1205
1182
  rounded: "full"
1206
1183
  }
1207
1184
  });
1208
- function kn({
1185
+ function bn({
1209
1186
  className: e,
1210
1187
  size: a = "md",
1211
1188
  rounded: r = "full",
1212
1189
  raised: n,
1213
1190
  src: o,
1214
- alt: s,
1191
+ alt: i,
1215
1192
  fallback: l,
1216
1193
  badge: u,
1217
1194
  children: p,
1218
- ...m
1195
+ ...g
1219
1196
  }) {
1220
1197
  return /* @__PURE__ */ d(
1221
- be.Root,
1198
+ fe.Root,
1222
1199
  {
1223
1200
  "data-slot": "avatar",
1224
1201
  "data-size": a,
1225
1202
  "data-raised": n,
1226
1203
  "data-rounded": r,
1227
1204
  className: c(
1228
- Cn({ size: a, rounded: r, raised: n }),
1205
+ fn({ size: a, rounded: r, raised: n }),
1229
1206
  "group/avatar",
1230
1207
  e
1231
1208
  ),
1232
- ...m,
1233
- children: p ?? /* @__PURE__ */ C(F, { children: [
1209
+ ...g,
1210
+ children: p ?? /* @__PURE__ */ k(M, { children: [
1234
1211
  o && /* @__PURE__ */ d(
1235
- be.Image,
1212
+ fe.Image,
1236
1213
  {
1237
1214
  "data-slot": "avatar-image",
1238
1215
  className: c(
@@ -1243,11 +1220,11 @@ function kn({
1243
1220
  "group-data-[rounded=full]/avatar:rounded-full"
1244
1221
  ),
1245
1222
  src: o,
1246
- alt: s
1223
+ alt: i
1247
1224
  }
1248
1225
  ),
1249
1226
  l != null && /* @__PURE__ */ d(
1250
- be.Fallback,
1227
+ fe.Fallback,
1251
1228
  {
1252
1229
  "data-slot": "avatar-fallback",
1253
1230
  className: c(
@@ -1300,7 +1277,7 @@ function kn({
1300
1277
  }
1301
1278
  );
1302
1279
  }
1303
- const Sn = R(
1280
+ const xn = S(
1304
1281
  "gap-1 px-2 py-0.5 [button]:cursor-pointer rounded-full border text-xs font-medium transition-[color,box-shadow,translate] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 [&>svg]:pointer-events-none aria-invalid:border-accent-red duration-200 overflow-hidden",
1305
1282
  {
1306
1283
  variants: {
@@ -1335,21 +1312,21 @@ const Sn = R(
1335
1312
  }
1336
1313
  }
1337
1314
  );
1338
- function Rn({
1315
+ function vn({
1339
1316
  className: e,
1340
1317
  variant: a = "default",
1341
1318
  size: r = "md",
1342
1319
  raised: n,
1343
1320
  extrude: o,
1344
- render: s,
1321
+ render: i,
1345
1322
  ...l
1346
1323
  }) {
1347
- return $a({
1324
+ return Ba({
1348
1325
  defaultTagName: "span",
1349
- props: Fa(
1326
+ props: Ua(
1350
1327
  {
1351
1328
  className: c(
1352
- Sn({ size: r, variant: a, raised: n, extrude: o }),
1329
+ xn({ size: r, variant: a, raised: n, extrude: o }),
1353
1330
  "group/badge",
1354
1331
  e
1355
1332
  ),
@@ -1357,14 +1334,14 @@ function Rn({
1357
1334
  },
1358
1335
  l
1359
1336
  ),
1360
- render: s,
1337
+ render: i,
1361
1338
  state: {
1362
1339
  slot: "badge",
1363
1340
  variant: a
1364
1341
  }
1365
1342
  });
1366
1343
  }
1367
- const _n = R(
1344
+ const yn = S(
1368
1345
  "h-fit inline-grid [&_svg]:col-start-1 [&_svg]:col-end-1 [&_svg]:row-start-1 [&_svg]:row-end-1 duration-1000",
1369
1346
  {
1370
1347
  variants: {
@@ -1391,34 +1368,34 @@ const _n = R(
1391
1368
  }
1392
1369
  }
1393
1370
  );
1394
- function la({
1371
+ function da({
1395
1372
  icon: e,
1396
1373
  pingIcon: a,
1397
1374
  variant: r = "spinner",
1398
1375
  fill: n = "default",
1399
1376
  size: o = "md",
1400
- iconProps: s,
1377
+ iconProps: i,
1401
1378
  className: l,
1402
1379
  ...u
1403
1380
  }) {
1404
- const p = e || Ra, m = a || p;
1405
- return /* @__PURE__ */ C(
1381
+ const p = e || Sa, g = a || p;
1382
+ return /* @__PURE__ */ k(
1406
1383
  "span",
1407
1384
  {
1408
1385
  role: "status",
1409
1386
  "data-slot": "loader-container",
1410
- className: c(_n({ variant: r, fill: n, size: o }), l),
1387
+ className: c(yn({ variant: r, fill: n, size: o }), l),
1411
1388
  "aria-label": r ?? "loading",
1412
1389
  ...u,
1413
1390
  children: [
1414
- /* @__PURE__ */ d(p, { "data-slot": "loader-icon", ...s }),
1415
- /* @__PURE__ */ d(m, { "data-slot": "loader-ping", ...s }),
1416
- /* @__PURE__ */ d(_a, { "data-slot": "loader-spinner", ...s })
1391
+ /* @__PURE__ */ d(p, { "data-slot": "loader-icon", ...i }),
1392
+ /* @__PURE__ */ d(g, { "data-slot": "loader-ping", ...i }),
1393
+ /* @__PURE__ */ d(Ra, { "data-slot": "loader-spinner", ...i })
1417
1394
  ]
1418
1395
  }
1419
1396
  );
1420
1397
  }
1421
- const Y = R(
1398
+ const ae = S(
1422
1399
  "neo-base neo-button-focus relative group cursor-pointer rounded-base border-2 border-border text-sm font-medium [&_svg:not([class*='size-'])]:size-4.5 inline-flex items-center justify-center whitespace-nowrap transition-[translate,box-shadow,border,color] duration-200 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 select-none",
1423
1400
  {
1424
1401
  variants: {
@@ -1469,40 +1446,40 @@ function ge({
1469
1446
  size: r,
1470
1447
  icon: n,
1471
1448
  raised: o,
1472
- extrude: s,
1449
+ extrude: i,
1473
1450
  loading: l,
1474
1451
  onClick: u,
1475
1452
  children: p,
1476
- ...m
1453
+ ...g
1477
1454
  }) {
1478
- const { trigger: x } = oe();
1479
- return /* @__PURE__ */ C(
1480
- Ha,
1455
+ const { trigger: x } = se();
1456
+ return /* @__PURE__ */ k(
1457
+ ja,
1481
1458
  {
1482
1459
  "data-slot": "button",
1483
1460
  "data-loading": l,
1484
- "aria-label": m["aria-label"] ?? "button",
1461
+ "aria-label": g["aria-label"] ?? "button",
1485
1462
  className: c(
1486
- Y({ variant: a, size: r, raised: o, extrude: s, icon: n }),
1463
+ ae({ variant: a, size: r, raised: o, extrude: i, icon: n }),
1487
1464
  "group/button",
1488
1465
  e
1489
1466
  ),
1490
1467
  onClick: (v) => {
1491
- x(gn), u?.(v);
1468
+ x(rn), u?.(v);
1492
1469
  },
1493
- ...m,
1470
+ ...g,
1494
1471
  children: [
1495
- /* @__PURE__ */ d("div", { className: "hidden group-data-[loading=true]:flex w-full absolute inset-0 items-center justify-center", children: /* @__PURE__ */ d(la, {}) }),
1472
+ /* @__PURE__ */ d("div", { className: "hidden group-data-[loading=true]:flex w-full absolute inset-0 items-center justify-center", children: /* @__PURE__ */ d(da, {}) }),
1496
1473
  /* @__PURE__ */ d("div", { className: "visible group-data-[loading=true]:invisible w-full flex gap-1.5 justify-center items-center", children: p })
1497
1474
  ]
1498
1475
  }
1499
1476
  );
1500
1477
  }
1501
- const ca = U.Root;
1502
- ca.displayName = "Select";
1503
- function Nn({ className: e, ...a }) {
1478
+ const la = P.Root;
1479
+ la.displayName = "Select";
1480
+ function wn({ className: e, ...a }) {
1504
1481
  return /* @__PURE__ */ d(
1505
- U.Value,
1482
+ P.Value,
1506
1483
  {
1507
1484
  "data-slot": "select-value",
1508
1485
  className: c(
@@ -1514,35 +1491,35 @@ function Nn({ className: e, ...a }) {
1514
1491
  }
1515
1492
  );
1516
1493
  }
1517
- function Pn({
1494
+ function An({
1518
1495
  className: e,
1519
1496
  size: a = "lg",
1520
1497
  variant: r = "outline",
1521
1498
  raised: n,
1522
1499
  extrude: o,
1523
- children: s,
1500
+ children: i,
1524
1501
  ...l
1525
1502
  }) {
1526
- return /* @__PURE__ */ C(
1527
- U.Trigger,
1503
+ return /* @__PURE__ */ k(
1504
+ P.Trigger,
1528
1505
  {
1529
1506
  "data-slot": "select-trigger",
1530
1507
  "data-size": a,
1531
1508
  "aria-label": l["aria-label"] ?? "select-trigger",
1532
1509
  className: c(
1533
- Y({ size: a, variant: r, raised: n, extrude: o }),
1510
+ ae({ size: a, variant: r, raised: n, extrude: o }),
1534
1511
  "group/select-trigger neo-base neo-input-focus disabled:opacity-50 [&_svg]:shrink-0 w-full",
1535
1512
  e
1536
1513
  ),
1537
1514
  ...l,
1538
1515
  children: [
1539
- s,
1516
+ i,
1540
1517
  /* @__PURE__ */ d(
1541
- U.Icon,
1518
+ P.Icon,
1542
1519
  {
1543
1520
  className: "flex items-center justify-center",
1544
1521
  render: /* @__PURE__ */ d(
1545
- Na,
1522
+ _a,
1546
1523
  {
1547
1524
  "data-slot": "select-selector",
1548
1525
  className: "text-muted size-4 pointer-events-none"
@@ -1554,27 +1531,27 @@ function Pn({
1554
1531
  }
1555
1532
  );
1556
1533
  }
1557
- function En({
1534
+ function zn({
1558
1535
  className: e,
1559
1536
  children: a,
1560
1537
  side: r = "bottom",
1561
1538
  sideOffset: n = 4,
1562
1539
  align: o = "center",
1563
- alignOffset: s = 0,
1540
+ alignOffset: i = 0,
1564
1541
  alignItemWithTrigger: l = !0,
1565
1542
  ...u
1566
1543
  }) {
1567
- return /* @__PURE__ */ d(U.Portal, { children: /* @__PURE__ */ d(
1568
- U.Positioner,
1544
+ return /* @__PURE__ */ d(P.Portal, { children: /* @__PURE__ */ d(
1545
+ P.Positioner,
1569
1546
  {
1570
1547
  side: r,
1571
1548
  sideOffset: n,
1572
1549
  align: o,
1573
- alignOffset: s,
1550
+ alignOffset: i,
1574
1551
  alignItemWithTrigger: l,
1575
1552
  className: "isolate z-50",
1576
- children: /* @__PURE__ */ C(
1577
- U.Popup,
1553
+ children: /* @__PURE__ */ k(
1554
+ P.Popup,
1578
1555
  {
1579
1556
  "data-slot": "select-content",
1580
1557
  className: c(
@@ -1591,22 +1568,22 @@ function En({
1591
1568
  ),
1592
1569
  ...u,
1593
1570
  children: [
1594
- /* @__PURE__ */ d(On, {}),
1595
- /* @__PURE__ */ d(U.List, { className: "flex flex-col gap-0.5 p-0.5", children: a }),
1596
- /* @__PURE__ */ d(Ln, {})
1571
+ /* @__PURE__ */ d(In, {}),
1572
+ /* @__PURE__ */ d(P.List, { className: "flex flex-col gap-0.5 p-0.5", children: a }),
1573
+ /* @__PURE__ */ d(Cn, {})
1597
1574
  ]
1598
1575
  }
1599
1576
  )
1600
1577
  }
1601
1578
  ) });
1602
1579
  }
1603
- function Dn({
1580
+ function Tn({
1604
1581
  className: e,
1605
1582
  children: a,
1606
1583
  ...r
1607
1584
  }) {
1608
- return /* @__PURE__ */ C(
1609
- U.Item,
1585
+ return /* @__PURE__ */ k(
1586
+ P.Item,
1610
1587
  {
1611
1588
  "data-slot": "select-item",
1612
1589
  className: c(
@@ -1619,24 +1596,24 @@ function Dn({
1619
1596
  ),
1620
1597
  ...r,
1621
1598
  children: [
1622
- /* @__PURE__ */ d(U.ItemText, { className: "flex flex-1 gap-2 shrink-0 whitespace-nowrap", children: a }),
1599
+ /* @__PURE__ */ d(P.ItemText, { className: "flex flex-1 gap-2 shrink-0 whitespace-nowrap", children: a }),
1623
1600
  /* @__PURE__ */ d(
1624
- U.ItemIndicator,
1601
+ P.ItemIndicator,
1625
1602
  {
1626
1603
  render: /* @__PURE__ */ d("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
1627
- children: /* @__PURE__ */ d(ta, { className: "pointer-events-none" })
1604
+ children: /* @__PURE__ */ d(ea, { className: "pointer-events-none" })
1628
1605
  }
1629
1606
  )
1630
1607
  ]
1631
1608
  }
1632
1609
  );
1633
1610
  }
1634
- function On({
1611
+ function In({
1635
1612
  className: e,
1636
1613
  ...a
1637
1614
  }) {
1638
1615
  return /* @__PURE__ */ d(
1639
- U.ScrollUpArrow,
1616
+ P.ScrollUpArrow,
1640
1617
  {
1641
1618
  "data-slot": "select-scroll-up-button",
1642
1619
  className: c(
@@ -1644,16 +1621,16 @@ function On({
1644
1621
  e
1645
1622
  ),
1646
1623
  ...a,
1647
- children: /* @__PURE__ */ d(Pa, {})
1624
+ children: /* @__PURE__ */ d(Na, {})
1648
1625
  }
1649
1626
  );
1650
1627
  }
1651
- function Ln({
1628
+ function Cn({
1652
1629
  className: e,
1653
1630
  ...a
1654
1631
  }) {
1655
1632
  return /* @__PURE__ */ d(
1656
- U.ScrollDownArrow,
1633
+ P.ScrollDownArrow,
1657
1634
  {
1658
1635
  "data-slot": "select-scroll-down-button",
1659
1636
  className: c(
@@ -1665,21 +1642,21 @@ function Ln({
1665
1642
  }
1666
1643
  );
1667
1644
  }
1668
- function Un({
1645
+ function kn({
1669
1646
  className: e,
1670
1647
  classNames: a,
1671
1648
  showOutsideDays: r = !0,
1672
1649
  captionLayout: n = "label",
1673
1650
  hideWeekdays: o = !1,
1674
- buttonVariant: s = "outline",
1651
+ buttonVariant: i = "outline",
1675
1652
  hideWeekends: l,
1676
1653
  formatters: u,
1677
1654
  components: p,
1678
- ...m
1655
+ ...g
1679
1656
  }) {
1680
- const x = Ga();
1657
+ const x = $a();
1681
1658
  return /* @__PURE__ */ d(
1682
- Wa,
1659
+ Ha,
1683
1660
  {
1684
1661
  showOutsideDays: r,
1685
1662
  className: c(
@@ -1701,12 +1678,12 @@ function Un({
1701
1678
  x.nav
1702
1679
  ),
1703
1680
  button_previous: c(
1704
- Y({ variant: s, icon: "sm" }),
1681
+ ae({ variant: i, icon: "sm" }),
1705
1682
  "aria-disabled:opacity-50 aria-disabled:translate-[0px] aria-disabled:shadow-none aria-disabled:pointer-events-none",
1706
1683
  x.button_previous
1707
1684
  ),
1708
1685
  button_next: c(
1709
- Y({ variant: s, icon: "sm" }),
1686
+ ae({ variant: i, icon: "sm" }),
1710
1687
  "aria-disabled:opacity-50 aria-disabled:translate-[0px] aria-disabled:shadow-none aria-disabled:pointer-events-none",
1711
1688
  x.button_next
1712
1689
  ),
@@ -1750,45 +1727,45 @@ function Un({
1750
1727
  ...a
1751
1728
  },
1752
1729
  components: {
1753
- Root: ({ className: v, rootRef: A, ...I }) => /* @__PURE__ */ d(
1730
+ Root: ({ className: v, rootRef: w, ...z }) => /* @__PURE__ */ d(
1754
1731
  "div",
1755
1732
  {
1756
1733
  "data-slot": "calendar",
1757
- ref: A,
1734
+ ref: w,
1758
1735
  className: c(v),
1759
- ...I
1736
+ ...z
1760
1737
  }
1761
1738
  ),
1762
- Chevron: ({ className: v, orientation: A, ...I }) => A === "left" ? /* @__PURE__ */ d(Ea, { className: c("size-4", v), ...I }) : A === "right" ? /* @__PURE__ */ d(
1763
- Da,
1739
+ Chevron: ({ className: v, orientation: w, ...z }) => w === "left" ? /* @__PURE__ */ d(Ea, { className: c("size-4", v), ...z }) : w === "right" ? /* @__PURE__ */ d(
1740
+ Pa,
1764
1741
  {
1765
1742
  className: c("size-4", v),
1766
- ...I
1743
+ ...z
1767
1744
  }
1768
- ) : /* @__PURE__ */ d(ze, { className: c("size-4", v), ...I }),
1769
- Weekday: ({ children: v, ...A }) => {
1770
- const I = A["aria-label"] === "Saturday" || A["aria-label"] === "Sunday";
1771
- return l && I ? /* @__PURE__ */ d("td", { hidden: !0 }) : /* @__PURE__ */ d("td", { ...A, children: v });
1745
+ ) : /* @__PURE__ */ d(ze, { className: c("size-4", v), ...z }),
1746
+ Weekday: ({ children: v, ...w }) => {
1747
+ const z = w["aria-label"] === "Saturday" || w["aria-label"] === "Sunday";
1748
+ return l && z ? /* @__PURE__ */ d("td", { hidden: !0 }) : /* @__PURE__ */ d("td", { ...w, children: v });
1772
1749
  },
1773
- Day: ({ children: v, ...A }) => {
1774
- const I = new Date(A.day.date).getDay();
1775
- return l && (I === 0 || I === 6) ? /* @__PURE__ */ d("td", { hidden: !0 }) : A.modifiers.hidden ? /* @__PURE__ */ d("td", { className: "all-unset size-(--cell-size) m-1 bg-foreground opacity-20 rounded-base" }) : /* @__PURE__ */ d("td", { ...A, children: v });
1750
+ Day: ({ children: v, ...w }) => {
1751
+ const z = new Date(w.day.date).getDay();
1752
+ return l && (z === 0 || z === 6) ? /* @__PURE__ */ d("td", { hidden: !0 }) : w.modifiers.hidden ? /* @__PURE__ */ d("td", { className: "all-unset size-(--cell-size) m-1 bg-foreground opacity-20 rounded-base" }) : /* @__PURE__ */ d("td", { ...w, children: v });
1776
1753
  },
1777
- Dropdown: jn,
1778
- DayButton: Bn,
1754
+ Dropdown: Rn,
1755
+ DayButton: Sn,
1779
1756
  ...p
1780
1757
  },
1781
- ...m
1758
+ ...g
1782
1759
  }
1783
1760
  );
1784
1761
  }
1785
- function Bn({
1762
+ function Sn({
1786
1763
  day: e,
1787
1764
  modifiers: a,
1788
1765
  ...r
1789
1766
  }) {
1790
- const n = L.useRef(null);
1791
- return L.useEffect(() => {
1767
+ const n = ee.useRef(null);
1768
+ return ee.useEffect(() => {
1792
1769
  a.focused && n.current?.focus();
1793
1770
  }, [a.focused]), /* @__PURE__ */ d(
1794
1771
  ge,
@@ -1809,34 +1786,34 @@ function Bn({
1809
1786
  }
1810
1787
  );
1811
1788
  }
1812
- function jn(e) {
1813
- const { options: a, onChange: r, value: n } = e, o = a?.find((l) => l.value === n), s = (l) => {
1789
+ function Rn(e) {
1790
+ const { options: a, onChange: r, value: n } = e, o = a?.find((l) => l.value === n), i = (l) => {
1814
1791
  r?.({
1815
1792
  target: { value: l }
1816
1793
  });
1817
1794
  };
1818
- return /* @__PURE__ */ C(
1819
- ca,
1795
+ return /* @__PURE__ */ k(
1796
+ la,
1820
1797
  {
1821
1798
  value: n?.toString(),
1822
- onValueChange: (l) => s(l),
1799
+ onValueChange: (l) => i(l),
1823
1800
  children: [
1824
1801
  /* @__PURE__ */ d(
1825
- Pn,
1802
+ An,
1826
1803
  {
1827
1804
  variant: "ghost",
1828
1805
  raised: null,
1829
1806
  extrude: null,
1830
1807
  className: "w-fit mx-1",
1831
1808
  size: "sm",
1832
- children: /* @__PURE__ */ d(Nn, { children: o?.label })
1809
+ children: /* @__PURE__ */ d(wn, { children: o?.label })
1833
1810
  }
1834
1811
  ),
1835
- /* @__PURE__ */ d(En, { className: "bg-transparent border-0 w-30 shadow-none", children: /* @__PURE__ */ d("div", { className: "p-2", children: /* @__PURE__ */ d("div", { className: "flex flex-col items-center bg-foreground shadow-xs rounded-base", children: a?.map((l) => /* @__PURE__ */ d(
1836
- Dn,
1812
+ /* @__PURE__ */ d(zn, { className: "bg-transparent border-0 w-30 shadow-none", children: /* @__PURE__ */ d("div", { className: "p-2", children: /* @__PURE__ */ d("div", { className: "flex flex-col items-center bg-foreground shadow-xs rounded-base", children: a?.map((l) => /* @__PURE__ */ d(
1813
+ Tn,
1837
1814
  {
1838
1815
  className: c(
1839
- Y({ extrude: "md" }),
1816
+ ae({ extrude: "md" }),
1840
1817
  "not-last:rounded-b-none not-first:rounded-t-none border-2 not-last:border-b-0 hover:border-2 hover:z-2 z-1 duration-200"
1841
1818
  ),
1842
1819
  value: l.value.toString(),
@@ -1848,7 +1825,7 @@ function jn(e) {
1848
1825
  }
1849
1826
  );
1850
1827
  }
1851
- const Fn = R(
1828
+ const _n = S(
1852
1829
  "bg-surface border text-foreground overflow-hidden rounded-base text-sm flex flex-col",
1853
1830
  {
1854
1831
  variants: {
@@ -1871,7 +1848,7 @@ const Fn = R(
1871
1848
  }
1872
1849
  }
1873
1850
  );
1874
- function $n({
1851
+ function Nn({
1875
1852
  className: e,
1876
1853
  size: a = "md",
1877
1854
  raised: r = "md",
@@ -1882,12 +1859,12 @@ function $n({
1882
1859
  {
1883
1860
  "data-slot": "card",
1884
1861
  "data-size": a,
1885
- className: c(Fn({ raised: r, size: a }), "group/card", e),
1862
+ className: c(_n({ raised: r, size: a }), "group/card", e),
1886
1863
  ...n
1887
1864
  }
1888
1865
  );
1889
1866
  }
1890
- function Hn({ className: e, ...a }) {
1867
+ function En({ className: e, ...a }) {
1891
1868
  return /* @__PURE__ */ d(
1892
1869
  "div",
1893
1870
  {
@@ -1905,7 +1882,7 @@ function Hn({ className: e, ...a }) {
1905
1882
  }
1906
1883
  );
1907
1884
  }
1908
- function Gn({ className: e, ...a }) {
1885
+ function Pn({ className: e, ...a }) {
1909
1886
  return /* @__PURE__ */ d(
1910
1887
  "div",
1911
1888
  {
@@ -1926,7 +1903,7 @@ function Gn({ className: e, ...a }) {
1926
1903
  }
1927
1904
  );
1928
1905
  }
1929
- function Wn({ className: e, ...a }) {
1906
+ function On({ className: e, ...a }) {
1930
1907
  return /* @__PURE__ */ d(
1931
1908
  "div",
1932
1909
  {
@@ -1943,7 +1920,7 @@ function Wn({ className: e, ...a }) {
1943
1920
  }
1944
1921
  );
1945
1922
  }
1946
- function Mn({ className: e, ...a }) {
1923
+ function Dn({ className: e, ...a }) {
1947
1924
  return /* @__PURE__ */ d(
1948
1925
  "div",
1949
1926
  {
@@ -1956,7 +1933,7 @@ function Mn({ className: e, ...a }) {
1956
1933
  }
1957
1934
  );
1958
1935
  }
1959
- function qn({ className: e, ...a }) {
1936
+ function Ln({ className: e, ...a }) {
1960
1937
  return /* @__PURE__ */ d(
1961
1938
  "div",
1962
1939
  {
@@ -1975,7 +1952,7 @@ function qn({ className: e, ...a }) {
1975
1952
  }
1976
1953
  );
1977
1954
  }
1978
- function Vn({ className: e, ...a }) {
1955
+ function Un({ className: e, ...a }) {
1979
1956
  return /* @__PURE__ */ d(
1980
1957
  "div",
1981
1958
  {
@@ -1991,7 +1968,7 @@ function Vn({ className: e, ...a }) {
1991
1968
  }
1992
1969
  );
1993
1970
  }
1994
- function Xn({ className: e, ...a }) {
1971
+ function Bn({ className: e, ...a }) {
1995
1972
  return /* @__PURE__ */ d(
1996
1973
  "div",
1997
1974
  {
@@ -2008,7 +1985,7 @@ function Xn({ className: e, ...a }) {
2008
1985
  }
2009
1986
  );
2010
1987
  }
2011
- const Jn = R(
1988
+ const jn = S(
2012
1989
  "neo-base neo-checkbox-focus flex size-5 cursor-pointer items-center justify-center rounded-md border relative shrink-0 transition-[color,opacity,box-shadow,translate] data-checked:bg-main aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50 aria-invalid:bg-accent-red-secondary",
2013
1990
  {
2014
1991
  variants: {
@@ -2025,35 +2002,35 @@ const Jn = R(
2025
2002
  }
2026
2003
  }
2027
2004
  );
2028
- function Yn({
2005
+ function $n({
2029
2006
  className: e,
2030
2007
  size: a,
2031
2008
  onCheckedChange: r,
2032
2009
  ...n
2033
2010
  }) {
2034
- const { trigger: o } = oe();
2011
+ const { trigger: o } = se();
2035
2012
  return /* @__PURE__ */ d(
2036
- Oe.Root,
2013
+ Le.Root,
2037
2014
  {
2038
2015
  "data-slot": "checkbox",
2039
2016
  "data-size": a,
2040
2017
  className: c(
2041
- Jn({ size: a }),
2018
+ jn({ size: a }),
2042
2019
  "peer group/checkbox",
2043
2020
  e
2044
2021
  ),
2045
2022
  "aria-label": n["aria-label"] ?? "checkbox",
2046
- onCheckedChange: (s, l) => {
2047
- o(bn), r?.(s, l);
2023
+ onCheckedChange: (i, l) => {
2024
+ o(sn), r?.(i, l);
2048
2025
  },
2049
2026
  ...n,
2050
2027
  children: /* @__PURE__ */ d(
2051
- Oe.Indicator,
2028
+ Le.Indicator,
2052
2029
  {
2053
2030
  "data-slot": "checkbox-indicator",
2054
2031
  className: "grid place-content-center text-current",
2055
2032
  children: /* @__PURE__ */ d(
2056
- ta,
2033
+ ea,
2057
2034
  {
2058
2035
  stroke: 3.5,
2059
2036
  className: c(
@@ -2071,9 +2048,9 @@ function Yn({
2071
2048
  }
2072
2049
  );
2073
2050
  }
2074
- function Kn({ className: e, ...a }) {
2051
+ function Hn({ className: e, ...a }) {
2075
2052
  return /* @__PURE__ */ d(
2076
- Ie.Root,
2053
+ Te.Root,
2077
2054
  {
2078
2055
  className: c("group/collapsible", e),
2079
2056
  "data-slot": "collapsible",
@@ -2081,12 +2058,12 @@ function Kn({ className: e, ...a }) {
2081
2058
  }
2082
2059
  );
2083
2060
  }
2084
- function Zn({
2061
+ function Fn({
2085
2062
  className: e,
2086
2063
  ...a
2087
2064
  }) {
2088
2065
  return /* @__PURE__ */ d(
2089
- Ie.Trigger,
2066
+ Te.Trigger,
2090
2067
  {
2091
2068
  className: c(
2092
2069
  "group-data-open/collapsible:[&_svg]:-scale-y-100",
@@ -2097,13 +2074,13 @@ function Zn({
2097
2074
  }
2098
2075
  );
2099
2076
  }
2100
- function Qn({
2077
+ function Gn({
2101
2078
  className: e,
2102
2079
  children: a,
2103
2080
  ...r
2104
2081
  }) {
2105
2082
  return /* @__PURE__ */ d(
2106
- Ie.Panel,
2083
+ Te.Panel,
2107
2084
  {
2108
2085
  className: c("group overflow-hidden", e),
2109
2086
  "data-slot": "collapsible-content",
@@ -2124,9 +2101,9 @@ function Qn({
2124
2101
  }
2125
2102
  );
2126
2103
  }
2127
- function ua({ className: e, type: a, ...r }) {
2104
+ function ca({ className: e, type: a, ...r }) {
2128
2105
  return /* @__PURE__ */ d(
2129
- Ma,
2106
+ Fa,
2130
2107
  {
2131
2108
  type: a,
2132
2109
  "data-slot": "input",
@@ -2138,13 +2115,13 @@ function ua({ className: e, type: a, ...r }) {
2138
2115
  }
2139
2116
  );
2140
2117
  }
2141
- function eo({
2118
+ function Wn({
2142
2119
  className: e,
2143
2120
  containerClassName: a,
2144
2121
  ...r
2145
2122
  }) {
2146
2123
  return /* @__PURE__ */ d(
2147
- qa,
2124
+ Ga,
2148
2125
  {
2149
2126
  "data-slot": "input-otp",
2150
2127
  containerClassName: c(
@@ -2157,7 +2134,7 @@ function eo({
2157
2134
  }
2158
2135
  );
2159
2136
  }
2160
- function pa({
2137
+ function ua({
2161
2138
  className: e,
2162
2139
  onInput: a,
2163
2140
  autosize: r = !1,
@@ -2167,9 +2144,9 @@ function pa({
2167
2144
  "textarea",
2168
2145
  {
2169
2146
  "data-slot": "textarea",
2170
- onInput: a || ((s) => {
2147
+ onInput: a || ((i) => {
2171
2148
  if (r) {
2172
- const l = s.currentTarget;
2149
+ const l = i.currentTarget;
2173
2150
  l.style.height = "auto", l.style.height = l.scrollHeight + "px";
2174
2151
  }
2175
2152
  }),
@@ -2186,7 +2163,7 @@ function pa({
2186
2163
  }
2187
2164
  );
2188
2165
  }
2189
- function ma({ className: e, ...a }) {
2166
+ function pa({ className: e, ...a }) {
2190
2167
  return /* @__PURE__ */ d(
2191
2168
  "div",
2192
2169
  {
@@ -2203,7 +2180,7 @@ function ma({ className: e, ...a }) {
2203
2180
  }
2204
2181
  );
2205
2182
  }
2206
- const to = R(
2183
+ const Vn = S(
2207
2184
  "text-muted h-full gap-2 p-2 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 flex cursor-text items-center justify-center select-none",
2208
2185
  {
2209
2186
  variants: {
@@ -2230,7 +2207,7 @@ function ga({
2230
2207
  role: "group",
2231
2208
  "data-slot": "input-group-addon",
2232
2209
  "data-align": a,
2233
- className: c(to({ align: a }), e),
2210
+ className: c(Vn({ align: a }), e),
2234
2211
  onClick: (n) => {
2235
2212
  n.target.closest("button") || n.currentTarget.parentElement?.querySelector("input")?.focus();
2236
2213
  },
@@ -2238,7 +2215,7 @@ function ga({
2238
2215
  }
2239
2216
  );
2240
2217
  }
2241
- const ao = R("gap-2 text-sm flex items-center", {
2218
+ const qn = S("gap-2 text-sm flex items-center", {
2242
2219
  variants: {
2243
2220
  size: {
2244
2221
  xs: "h-7 gap-1 rounded-sm px-1.5 py-0.5",
@@ -2251,13 +2228,13 @@ const ao = R("gap-2 text-sm flex items-center", {
2251
2228
  size: "xs"
2252
2229
  }
2253
2230
  });
2254
- function ro({
2231
+ function Mn({
2255
2232
  className: e,
2256
2233
  type: a = "button",
2257
2234
  variant: r = "outline",
2258
2235
  extrude: n = "xs",
2259
2236
  size: o,
2260
- ...s
2237
+ ...i
2261
2238
  }) {
2262
2239
  return /* @__PURE__ */ d(
2263
2240
  ge,
@@ -2266,13 +2243,13 @@ function ro({
2266
2243
  "data-size": o,
2267
2244
  variant: r,
2268
2245
  extrude: n ?? null,
2269
- "aria-label": s["aria-label"] ?? "input-button",
2270
- className: c(ao({ size: o }), e),
2271
- ...s
2246
+ "aria-label": i["aria-label"] ?? "input-button",
2247
+ className: c(qn({ size: o }), e),
2248
+ ...i
2272
2249
  }
2273
2250
  );
2274
2251
  }
2275
- function no({ className: e, ...a }) {
2252
+ function Jn({ className: e, ...a }) {
2276
2253
  return /* @__PURE__ */ d(
2277
2254
  "span",
2278
2255
  {
@@ -2284,12 +2261,12 @@ function no({ className: e, ...a }) {
2284
2261
  }
2285
2262
  );
2286
2263
  }
2287
- function ha({
2264
+ function ma({
2288
2265
  className: e,
2289
2266
  ...a
2290
2267
  }) {
2291
2268
  return /* @__PURE__ */ d(
2292
- ua,
2269
+ ca,
2293
2270
  {
2294
2271
  "data-slot": "input-group-control",
2295
2272
  className: c(
@@ -2312,12 +2289,12 @@ function ha({
2312
2289
  }
2313
2290
  );
2314
2291
  }
2315
- function oo({
2292
+ function Xn({
2316
2293
  className: e,
2317
2294
  ...a
2318
2295
  }) {
2319
2296
  return /* @__PURE__ */ d(
2320
- pa,
2297
+ ua,
2321
2298
  {
2322
2299
  "data-slot": "input-group-control",
2323
2300
  className: c(
@@ -2338,7 +2315,7 @@ function oo({
2338
2315
  }
2339
2316
  );
2340
2317
  }
2341
- const io = R(
2318
+ const Kn = S(
2342
2319
  "gap-2 leading-none group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",
2343
2320
  {
2344
2321
  variants: {
@@ -2357,7 +2334,7 @@ const io = R(
2357
2334
  }
2358
2335
  }
2359
2336
  );
2360
- function so({
2337
+ function Yn({
2361
2338
  size: e = "sm",
2362
2339
  variant: a,
2363
2340
  className: r,
@@ -2369,497 +2346,12 @@ function so({
2369
2346
  {
2370
2347
  "data-slot": "label",
2371
2348
  htmlFor: n,
2372
- className: c(io({ size: e, variant: a }), r),
2349
+ className: c(Kn({ size: e, variant: a }), r),
2373
2350
  ...o
2374
2351
  }
2375
2352
  );
2376
2353
  }
2377
- const lo = {
2378
- id: "default_center",
2379
- latitude: 51.049999,
2380
- longitude: -114.066666
2381
- };
2382
- function co({
2383
- pins: e,
2384
- onChange: a,
2385
- allowMultiple: r = !0,
2386
- readonly: n = !1,
2387
- fixed: o = !1,
2388
- zoom: s = 12,
2389
- pitch: l,
2390
- className: u,
2391
- children: p,
2392
- ...m
2393
- }) {
2394
- const x = L.useRef(null), [v, A] = L.useState(null), I = r ? v : e ? e[0]?.id : null, E = L.useMemo(() => ({ ...!e || e.length === 0 ? lo : e[0], zoom: s, pitch: l }), [e, s, l]), O = L.useCallback(
2395
- (w) => {
2396
- if (n || o) return;
2397
- const z = e ? e.filter((N) => N.id !== w) : [];
2398
- a?.(z), I === w && A(null);
2399
- },
2400
- [e, a, I]
2401
- ), G = (w, z) => {
2402
- w.stopPropagation(), A((N) => N && N === z ? null : z);
2403
- }, S = L.useCallback(
2404
- (w, z) => {
2405
- if (!a || !e || o || n) return;
2406
- const N = e.map(
2407
- (P) => P.id === z ? { ...P, longitude: w.lngLat.lng, latitude: w.lngLat.lat } : P
2408
- );
2409
- a(N);
2410
- },
2411
- [e, a]
2412
- ), _ = L.useCallback(
2413
- (w) => {
2414
- if (I && r)
2415
- return A(null);
2416
- if (n || !a || o) return;
2417
- if (!r && e) {
2418
- const N = e[0];
2419
- return a([
2420
- {
2421
- ...N,
2422
- longitude: w.lngLat.lng,
2423
- latitude: w.lngLat.lat
2424
- }
2425
- ]);
2426
- }
2427
- const z = {
2428
- id: crypto.randomUUID(),
2429
- longitude: w.lngLat.lng,
2430
- latitude: w.lngLat.lat
2431
- };
2432
- a(e ? [...e, z] : [z]), A(z.id);
2433
- },
2434
- [e, a, n, I]
2435
- );
2436
- L.useEffect(() => () => {
2437
- x.current?.getMap()?.remove();
2438
- }, []);
2439
- const y = L.useMemo(() => o ? {
2440
- dragPan: !1,
2441
- scrollZoom: !1,
2442
- doubleClickZoom: !1,
2443
- touchZoom: !1,
2444
- keyboard: !1,
2445
- dragRotate: !1,
2446
- ...m
2447
- } : m, [n, o, e]);
2448
- return /* @__PURE__ */ d(
2449
- "div",
2450
- {
2451
- "data-slot": "map-container",
2452
- className: c(
2453
- "h-96 w-96 bg-foreground rounded-base overflow-hidden relative",
2454
- u
2455
- ),
2456
- children: /* @__PURE__ */ C(
2457
- Va,
2458
- {
2459
- "data-slot": "map",
2460
- ref: x,
2461
- initialViewState: E,
2462
- mapStyle: "https://tiles.openfreemap.org/styles/liberty",
2463
- style: {
2464
- width: "100%",
2465
- height: "100%"
2466
- },
2467
- onClick: _,
2468
- minZoom: 0,
2469
- maxZoom: 18,
2470
- maxPitch: 80,
2471
- reuseMaps: !0,
2472
- doubleClickZoom: !1,
2473
- sky: {
2474
- "sky-color": "#5294FFFF",
2475
- "horizon-color": "#DDEFFDFF"
2476
- },
2477
- attributionControl: !1,
2478
- "aria-readonly": n,
2479
- ...y,
2480
- children: [
2481
- (e ?? []).map(({ children: w, id: z, ...N }) => /* @__PURE__ */ d(
2482
- Xa,
2483
- {
2484
- "data-slot": "map-marker",
2485
- anchor: "bottom",
2486
- draggable: !o && !n,
2487
- onDragEnd: (P) => S(P, z),
2488
- className: c(
2489
- "animate-in",
2490
- I === z ? "z-2" : "z-1 hover:z-10 hover:*:opacity-90"
2491
- ),
2492
- ...N,
2493
- children: /* @__PURE__ */ d(
2494
- "div",
2495
- {
2496
- "data-slot": "map-marker-inner",
2497
- "data-selected": I === z,
2498
- onClick: (P) => G(P, z),
2499
- className: "data-[selected=true]:cursor-grab cursor-pointer group *:[svg]:drop-shadow-[1px_1px_0_rgba(0,0,0,1)]",
2500
- children: w ? w(() => O(z)) : /* @__PURE__ */ C(F, { children: [
2501
- /* @__PURE__ */ d(
2502
- Oa,
2503
- {
2504
- "data-slot": "map-marker-svg",
2505
- className: "fill-main-secondary hover:scale-110 group-data-[selected=true]:hover:scale-145 group-data-[selected=true]:scale-140 group-data-[selected=true]:fill-main size-10 stroke-foreground transition-all duration-300 ease origin-bottom"
2506
- }
2507
- ),
2508
- !n && !o && r && /* @__PURE__ */ d(
2509
- "div",
2510
- {
2511
- "data-slot": "map-marker-popup",
2512
- className: "absolute -right-2 -top-6 duration-300 ease origin-bottom-left scale-0 opacity-0 pointer-events-none group-data-[selected=true]:pointer-events-auto group-data-[selected=true]:scale-100 group-data-[selected=true]:opacity-100",
2513
- children: /* @__PURE__ */ d(
2514
- "a",
2515
- {
2516
- type: "button",
2517
- "data-slot": "map-marker-delete",
2518
- onClick: (P) => {
2519
- P.stopPropagation(), O(z);
2520
- },
2521
- className: c(
2522
- Y({
2523
- icon: "xs",
2524
- raised: null,
2525
- variant: "destructive",
2526
- extrude: "xs"
2527
- }),
2528
- "rounded-full"
2529
- ),
2530
- "aria-label": "Delete Pin",
2531
- children: /* @__PURE__ */ d(La, {})
2532
- }
2533
- )
2534
- }
2535
- )
2536
- ] })
2537
- }
2538
- )
2539
- },
2540
- z
2541
- )),
2542
- p || /* @__PURE__ */ C(F, { children: [
2543
- /* @__PURE__ */ d(uo, {}),
2544
- !o && /* @__PURE__ */ C(F, { children: [
2545
- /* @__PURE__ */ d(
2546
- Ja,
2547
- {
2548
- "data-slot": "map-nav-control",
2549
- position: "bottom-right",
2550
- showCompass: !1
2551
- }
2552
- ),
2553
- /* @__PURE__ */ d(
2554
- Ya,
2555
- {
2556
- "data-slot": "map-geolocate-control",
2557
- position: "top-left"
2558
- }
2559
- ),
2560
- /* @__PURE__ */ d(
2561
- Ka,
2562
- {
2563
- "data-slot": "map-fullscreen-control",
2564
- position: "top-right"
2565
- }
2566
- )
2567
- ] })
2568
- ] })
2569
- ]
2570
- }
2571
- )
2572
- }
2573
- );
2574
- }
2575
- const ce = {
2576
- "water-fill": {
2577
- type: "fill",
2578
- source: "openmaptiles",
2579
- "source-layer": "water",
2580
- paint: { "fill-color": "#00C8F0FF" },
2581
- beforeId: "landcover_sand"
2582
- },
2583
- "park-fill": {
2584
- type: "fill",
2585
- source: "openmaptiles",
2586
- "source-layer": "park",
2587
- paint: { "fill-color": "#05E17AFF", "fill-opacity": 0.3 },
2588
- beforeId: "park_outline"
2589
- },
2590
- "landcover-grass-fill": {
2591
- type: "fill",
2592
- source: "openmaptiles",
2593
- "source-layer": "landcover",
2594
- filter: ["==", ["get", "class"], "grass"],
2595
- paint: { "fill-color": "#00D696FF", "fill-opacity": 0.3 },
2596
- beforeId: "landcover_ice"
2597
- },
2598
- "landcover-sand-fill": {
2599
- type: "fill",
2600
- source: "openmaptiles",
2601
- "source-layer": "landcover",
2602
- filter: ["==", ["get", "class"], "sand"],
2603
- paint: {
2604
- "fill-color": "#FACC00FF"
2605
- },
2606
- beforeId: "aeroway_fill"
2607
- },
2608
- "landuse-other-fill": {
2609
- type: "fill",
2610
- source: "openmaptiles",
2611
- "source-layer": "landuse",
2612
- paint: {
2613
- "fill-color": "#FDF7C4FF",
2614
- "fill-opacity": 0.4
2615
- },
2616
- beforeId: "landcover_wood"
2617
- },
2618
- "landuse-residential-fill": {
2619
- type: "fill",
2620
- source: "openmaptiles",
2621
- "source-layer": "landuse",
2622
- filter: ["==", ["get", "class"], "residential"],
2623
- paint: {
2624
- "fill-color": "#FFEDD6FF",
2625
- "fill-opacity": 1
2626
- },
2627
- beforeId: "landcover_wood"
2628
- },
2629
- "road-ramp-casing": {
2630
- type: "line",
2631
- source: "openmaptiles",
2632
- "source-layer": "transportation",
2633
- filter: ["all", ["==", ["get", "ramp"], 1]],
2634
- layout: { "line-cap": "butt", "line-join": "round" },
2635
- paint: {
2636
- "line-color": "#FFEDD6FF",
2637
- "line-width": [
2638
- "interpolate",
2639
- ["exponential", 1.2],
2640
- ["zoom"],
2641
- 8,
2642
- 1.5,
2643
- 20,
2644
- 17
2645
- ]
2646
- },
2647
- beforeId: "road-highlight-casing"
2648
- },
2649
- "road-highlight-casing": {
2650
- type: "line",
2651
- source: "openmaptiles",
2652
- "source-layer": "transportation",
2653
- filter: [
2654
- "all",
2655
- ["match", ["get", "brunnel"], ["bridge", "tunnel", "ramp"], !1, !0],
2656
- ["match", ["get", "class"], ["secondary", "tertiary"], !0, !1],
2657
- ["match", ["get", "class"], ["primary", "trunk"], !0, !1],
2658
- ["match", ["get", "class"], ["motorway"], !0, !1],
2659
- ["!=", ["get", "ramp"], 1]
2660
- ],
2661
- layout: { "line-cap": "butt", "line-join": "round" },
2662
- paint: {
2663
- "line-color": "#FFEDD6FF",
2664
- "line-width": [
2665
- "interpolate",
2666
- ["exponential", 1.2],
2667
- ["zoom"],
2668
- 8,
2669
- 1.5,
2670
- 20,
2671
- 17
2672
- ]
2673
- },
2674
- beforeId: "road-ramp-line"
2675
- },
2676
- "road-ramp-line": {
2677
- type: "line",
2678
- source: "openmaptiles",
2679
- "source-layer": "transportation",
2680
- filter: ["all", ["==", ["get", "ramp"], 1]],
2681
- layout: { "line-cap": "round", "line-join": "round" },
2682
- paint: {
2683
- "line-color": "#FFEDD6FF",
2684
- "line-width": [
2685
- "interpolate",
2686
- ["exponential", 1.3],
2687
- ["zoom"],
2688
- 5,
2689
- 0,
2690
- 7,
2691
- 1,
2692
- 20,
2693
- 18
2694
- ]
2695
- },
2696
- beforeId: "road-motorway-line"
2697
- },
2698
- "road-motorway-line": {
2699
- type: "line",
2700
- source: "openmaptiles",
2701
- "source-layer": "transportation",
2702
- filter: [
2703
- "all",
2704
- ["match", ["get", "brunnel"], ["bridge", "tunnel"], !1, !0],
2705
- ["match", ["get", "class"], ["motorway"], !0, !1]
2706
- ],
2707
- layout: { "line-cap": "round", "line-join": "round" },
2708
- paint: {
2709
- "line-color": "#FF7A05FF",
2710
- "line-width": [
2711
- "interpolate",
2712
- ["exponential", 1.3],
2713
- ["zoom"],
2714
- 5,
2715
- 0,
2716
- 7,
2717
- 1,
2718
- 20,
2719
- 18
2720
- ]
2721
- },
2722
- beforeId: "road-secondary-tertiary-line"
2723
- },
2724
- "road-secondary-tertiary-line": {
2725
- type: "line",
2726
- source: "openmaptiles",
2727
- "source-layer": "transportation",
2728
- filter: [
2729
- "all",
2730
- ["match", ["get", "brunnel"], ["bridge", "tunnel"], !1, !0],
2731
- ["match", ["get", "class"], ["secondary", "tertiary"], !0, !1],
2732
- ["!=", ["get", "ramp"], 1]
2733
- ],
2734
- layout: { "line-cap": "butt", "line-join": "round" },
2735
- paint: {
2736
- "line-color": "#FACC00FF",
2737
- "line-width": [
2738
- "interpolate",
2739
- ["exponential", 1.2],
2740
- ["zoom"],
2741
- 6.5,
2742
- 0,
2743
- 8,
2744
- 0.5,
2745
- 20,
2746
- 13
2747
- ]
2748
- },
2749
- beforeId: "road-trunk-primary-line"
2750
- },
2751
- "road-trunk-primary-line": {
2752
- type: "line",
2753
- source: "openmaptiles",
2754
- "source-layer": "transportation",
2755
- filter: [
2756
- "all",
2757
- ["match", ["get", "brunnel"], ["bridge", "tunnel"], !1, !0],
2758
- ["match", ["get", "class"], ["primary", "trunk"], !0, !1],
2759
- ["!=", ["get", "ramp"], 1]
2760
- ],
2761
- layout: { "line-cap": "round", "line-join": "round" },
2762
- paint: {
2763
- "line-color": "#FDF7C4FF",
2764
- "line-width": [
2765
- "interpolate",
2766
- ["exponential", 1.2],
2767
- ["zoom"],
2768
- 6.5,
2769
- 0,
2770
- 8,
2771
- 0.5,
2772
- 20,
2773
- 13
2774
- ]
2775
- },
2776
- beforeId: "road-transit-rail-line-casing"
2777
- },
2778
- "road-transit-rail-line-casing": {
2779
- type: "line",
2780
- source: "openmaptiles",
2781
- "source-layer": "transportation",
2782
- filter: [
2783
- "all",
2784
- ["match", ["get", "brunnel"], ["bridge", "tunnel"], !0, !0],
2785
- ["==", ["get", "class"], "transit"]
2786
- ],
2787
- paint: {
2788
- "line-color": "#FF4D4F",
2789
- "line-dasharray": [0.2, 8],
2790
- "line-width": [
2791
- "interpolate",
2792
- ["exponential", 1.4],
2793
- ["zoom"],
2794
- 14.5,
2795
- 0,
2796
- 15,
2797
- 3,
2798
- 20,
2799
- 8
2800
- ]
2801
- },
2802
- beforeId: "road-transit-rail-line"
2803
- },
2804
- "road-transit-rail-line": {
2805
- type: "line",
2806
- source: "openmaptiles",
2807
- "source-layer": "transportation",
2808
- filter: [
2809
- "all",
2810
- ["match", ["get", "brunnel"], ["bridge", "tunnel"], !0, !0],
2811
- ["==", ["get", "class"], "transit"]
2812
- ],
2813
- layout: { "line-cap": "round", "line-join": "round" },
2814
- paint: {
2815
- "line-color": "#FF4D4F",
2816
- "line-width": [
2817
- "interpolate",
2818
- ["exponential", 1.4],
2819
- ["zoom"],
2820
- 14,
2821
- 0.4,
2822
- 15,
2823
- 0.75,
2824
- 20,
2825
- 2
2826
- ]
2827
- },
2828
- beforeId: "building-extrusion"
2829
- },
2830
- "building-extrusion": {
2831
- type: "fill-extrusion",
2832
- source: "openmaptiles",
2833
- "source-layer": "building",
2834
- paint: {
2835
- "fill-extrusion-color": "#B3B3B3FF",
2836
- "fill-extrusion-height": ["get", "render_height"]
2837
- },
2838
- beforeId: "water_name_line_label"
2839
- }
2840
- };
2841
- function uo({ omit: e = [] }) {
2842
- const a = L.useMemo(() => {
2843
- const r = new Set(e), n = [], o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), l = (u) => {
2844
- if (r.has(u) || o.has(u)) return;
2845
- if (s.has(u)) {
2846
- console.warn(
2847
- `Circular dependency detected involving map layer: ${u}`
2848
- );
2849
- return;
2850
- }
2851
- s.add(u);
2852
- const p = ce[u];
2853
- let m = p.beforeId;
2854
- for (; m && r.has(m); )
2855
- m = ce[m]?.beforeId;
2856
- m && ce[m] && l(m), s.delete(u), o.add(u), n.push({ key: u, layer: { ...p, beforeId: m } });
2857
- };
2858
- return Object.keys(ce).forEach(l), n;
2859
- }, [e]);
2860
- return /* @__PURE__ */ d(F, { children: a.map(({ key: r, layer: n }) => /* @__PURE__ */ d(Za, { id: r, "data-slot": `map-layer-${r}`, ...n }, r)) });
2861
- }
2862
- const Ft = R("group/progress flex flex-wrap", {
2354
+ const $t = S("group/progress flex flex-wrap", {
2863
2355
  variants: {
2864
2356
  size: {
2865
2357
  xs: "gap-1",
@@ -2886,44 +2378,44 @@ const Ft = R("group/progress flex flex-wrap", {
2886
2378
  }
2887
2379
  }
2888
2380
  });
2889
- function po(e) {
2381
+ function Zn(e) {
2890
2382
  const {
2891
2383
  size: a = "md",
2892
2384
  raised: r = "default",
2893
2385
  stacked: n = "default",
2894
2386
  className: o,
2895
- children: s,
2387
+ children: i,
2896
2388
  ...l
2897
2389
  } = e;
2898
2390
  if (e.mode === "multiple") {
2899
- const u = [...e.value].sort((p, m) => m.value - p.value);
2900
- return /* @__PURE__ */ C(
2901
- J.Root,
2391
+ const u = [...e.value].sort((p, g) => g.value - p.value);
2392
+ return /* @__PURE__ */ k(
2393
+ q.Root,
2902
2394
  {
2903
2395
  "data-slot": "progress",
2904
2396
  "data-size": a,
2905
2397
  "data-raised": r,
2906
2398
  "data-stacked": n,
2907
- className: c(Ft({ size: a, raised: r, stacked: n }), o),
2399
+ className: c($t({ size: a, raised: r, stacked: n }), o),
2908
2400
  ...l,
2909
2401
  children: [
2910
- s,
2402
+ i,
2911
2403
  /* @__PURE__ */ d(
2912
- $t,
2404
+ Ht,
2913
2405
  {
2914
2406
  style: {
2915
2407
  marginTop: `calc(var(--stack-translate, 0px) * ${u.length - 1})`,
2916
2408
  transform: `translateX(calc(var(--stack-translate, 0px) * ${u.length - 1}))`
2917
2409
  },
2918
2410
  className: "grid grid-cols-1 *:row-start-1 *:col-start-1 *:row-end-1 *:col-end-1 items-end *:self-start",
2919
- children: u.map((p, m) => /* @__PURE__ */ d(
2920
- go,
2411
+ children: u.map((p, g) => /* @__PURE__ */ d(
2412
+ eo,
2921
2413
  {
2922
- index: m,
2414
+ index: g,
2923
2415
  "data-value": p.value,
2924
2416
  ...p,
2925
2417
  children: /* @__PURE__ */ d(
2926
- J.Value,
2418
+ q.Value,
2927
2419
  {
2928
2420
  className: c(
2929
2421
  p.value < 5 ? "pr-0.5" : "",
@@ -2939,7 +2431,7 @@ function po(e) {
2939
2431
  "group-data-[stacked=default]/progress:translate-y-0 group-data-[stacked=default]/progress:items-center"
2940
2432
  ),
2941
2433
  "data-slot": "progress-indicator-group-value",
2942
- children: () => /* @__PURE__ */ C(F, { children: [
2434
+ children: () => /* @__PURE__ */ k(M, { children: [
2943
2435
  p.name && /* @__PURE__ */ d(
2944
2436
  "span",
2945
2437
  {
@@ -2957,7 +2449,7 @@ function po(e) {
2957
2449
  }
2958
2450
  )
2959
2451
  },
2960
- m
2452
+ g
2961
2453
  ))
2962
2454
  }
2963
2455
  )
@@ -2965,8 +2457,8 @@ function po(e) {
2965
2457
  }
2966
2458
  );
2967
2459
  }
2968
- return /* @__PURE__ */ C(
2969
- J.Root,
2460
+ return /* @__PURE__ */ k(
2461
+ q.Root,
2970
2462
  {
2971
2463
  ...l,
2972
2464
  value: e.value,
@@ -2974,17 +2466,17 @@ function po(e) {
2974
2466
  "data-size": a,
2975
2467
  "data-raised": r,
2976
2468
  "data-stacked": n,
2977
- className: c(Ft({ size: a, raised: r, stacked: n }), o),
2469
+ className: c($t({ size: a, raised: r, stacked: n }), o),
2978
2470
  children: [
2979
- s,
2980
- /* @__PURE__ */ d($t, { children: /* @__PURE__ */ d(mo, { "data-value": e.value }) })
2471
+ i,
2472
+ /* @__PURE__ */ d(Ht, { children: /* @__PURE__ */ d(Qn, { "data-value": e.value }) })
2981
2473
  ]
2982
2474
  }
2983
2475
  );
2984
2476
  }
2985
- function $t({ className: e, ...a }) {
2477
+ function Ht({ className: e, ...a }) {
2986
2478
  return /* @__PURE__ */ d(
2987
- J.Track,
2479
+ q.Track,
2988
2480
  {
2989
2481
  className: c(
2990
2482
  "bg-surface border-2 rounded-full relative flex w-full items-center",
@@ -3007,12 +2499,12 @@ function $t({ className: e, ...a }) {
3007
2499
  }
3008
2500
  );
3009
2501
  }
3010
- function mo({
2502
+ function Qn({
3011
2503
  className: e,
3012
2504
  ...a
3013
2505
  }) {
3014
2506
  return /* @__PURE__ */ d(
3015
- J.Indicator,
2507
+ q.Indicator,
3016
2508
  {
3017
2509
  "data-slot": "progress-indicator",
3018
2510
  className: c(
@@ -3030,7 +2522,7 @@ function mo({
3030
2522
  }
3031
2523
  );
3032
2524
  }
3033
- function go({
2525
+ function eo({
3034
2526
  className: e,
3035
2527
  children: a,
3036
2528
  value: r,
@@ -3038,7 +2530,7 @@ function go({
3038
2530
  ...o
3039
2531
  }) {
3040
2532
  return /* @__PURE__ */ d(
3041
- J.Indicator,
2533
+ q.Indicator,
3042
2534
  {
3043
2535
  "data-slot": "progress-indicator-group",
3044
2536
  "data-value": r,
@@ -3069,13 +2561,13 @@ function go({
3069
2561
  }
3070
2562
  );
3071
2563
  }
3072
- function ho({
2564
+ function to({
3073
2565
  className: e,
3074
2566
  orientation: a = "horizontal",
3075
2567
  ...r
3076
2568
  }) {
3077
2569
  return /* @__PURE__ */ d(
3078
- Te.Root,
2570
+ Ie.Root,
3079
2571
  {
3080
2572
  "data-slot": "tabs",
3081
2573
  "data-orientation": a,
@@ -3089,7 +2581,7 @@ function ho({
3089
2581
  }
3090
2582
  );
3091
2583
  }
3092
- const fo = R(
2584
+ const ao = S(
3093
2585
  "overflow-auto inline-flex bg-transparent w-fit items-start justify-start group-data-horizontal/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",
3094
2586
  {
3095
2587
  variants: {
@@ -3121,7 +2613,7 @@ const fo = R(
3121
2613
  }
3122
2614
  }
3123
2615
  );
3124
- function bo({
2616
+ function ro({
3125
2617
  className: e,
3126
2618
  variant: a = "default",
3127
2619
  size: r = "md",
@@ -3129,13 +2621,13 @@ function bo({
3129
2621
  ...o
3130
2622
  }) {
3131
2623
  return /* @__PURE__ */ d(
3132
- Te.List,
2624
+ Ie.List,
3133
2625
  {
3134
2626
  "data-slot": "tabs-list",
3135
2627
  "data-variant": a,
3136
2628
  "data-size": r,
3137
2629
  className: c(
3138
- fo({ variant: a, size: r, extrude: n }),
2630
+ ao({ variant: a, size: r, extrude: n }),
3139
2631
  "group/tabs-list",
3140
2632
  e
3141
2633
  ),
@@ -3143,20 +2635,20 @@ function bo({
3143
2635
  }
3144
2636
  );
3145
2637
  }
3146
- function Ht({
2638
+ function Ft({
3147
2639
  label: e,
3148
2640
  description: a,
3149
2641
  children: r,
3150
2642
  className: n,
3151
2643
  onClick: o,
3152
- ...s
2644
+ ...i
3153
2645
  }) {
3154
- const { trigger: l } = oe();
3155
- return /* @__PURE__ */ C(
3156
- Te.Tab,
2646
+ const { trigger: l } = se();
2647
+ return /* @__PURE__ */ k(
2648
+ Ie.Tab,
3157
2649
  {
3158
2650
  "data-slot": "tabs-trigger",
3159
- "aria-label": s.value ?? "tabs-trigger",
2651
+ "aria-label": i.value ?? "tabs-trigger",
3160
2652
  className: c(
3161
2653
  "group/tabs-trigger neo-base relative inline-flex flex-1 items-center justify-center overflow-hidden cursor-pointer rounded-base border-2 py-1",
3162
2654
  "bg-surface data-active:bg-main",
@@ -3198,9 +2690,9 @@ function Ht({
3198
2690
  n
3199
2691
  ),
3200
2692
  onClick: (u) => {
3201
- l(hn), o?.(u);
2693
+ l(nn), o?.(u);
3202
2694
  },
3203
- ...s,
2695
+ ...i,
3204
2696
  children: [
3205
2697
  e && /* @__PURE__ */ d(
3206
2698
  "span",
@@ -3245,7 +2737,7 @@ function Ht({
3245
2737
  }
3246
2738
  );
3247
2739
  }
3248
- const Gt = '"Great Vibes", cursive', xo = 64, vo = 24, yo = 20;
2740
+ const Gt = '"Great Vibes", cursive', no = 64, oo = 24, so = 20;
3249
2741
  function Wt({
3250
2742
  canvas: e,
3251
2743
  text: a,
@@ -3253,132 +2745,158 @@ function Wt({
3253
2745
  height: n,
3254
2746
  ratio: o
3255
2747
  }) {
3256
- const s = e.getContext("2d");
3257
- if (!s) return !1;
2748
+ const i = e.getContext("2d");
2749
+ if (!i) return !1;
3258
2750
  const l = Math.max(1, Math.floor(r)), u = Math.max(1, Math.floor(n)), p = Math.max(o || 1, 1);
3259
- e.width = Math.max(1, Math.floor(l * p)), e.height = Math.max(1, Math.floor(u * p)), s.setTransform(p, 0, 0, p, 0, 0), s.clearRect(0, 0, l, u);
3260
- const m = a.trim();
3261
- if (!m) return !1;
3262
- const x = Math.max(1, l - yo * 2);
3263
- s.fillStyle = "#000", s.textAlign = "center", s.textBaseline = "middle";
3264
- let v = xo;
3265
- for (; v > vo && (s.font = `${v}px ${Gt}`, !(s.measureText(m).width <= x)); )
2751
+ e.width = Math.max(1, Math.floor(l * p)), e.height = Math.max(1, Math.floor(u * p)), i.setTransform(p, 0, 0, p, 0, 0), i.clearRect(0, 0, l, u);
2752
+ const g = a.trim();
2753
+ if (!g) return !1;
2754
+ const x = Math.max(1, l - so * 2);
2755
+ i.fillStyle = "#000", i.textAlign = "center", i.textBaseline = "middle";
2756
+ let v = no;
2757
+ for (; v > oo && (i.font = `${v}px ${Gt}`, !(i.measureText(g).width <= x)); )
3266
2758
  v -= 1;
3267
- return s.font = `${v}px ${Gt}`, s.fillText(m, l / 2, u / 2, x), !0;
2759
+ return i.font = `${v}px ${Gt}`, i.fillText(g, l / 2, u / 2, x), !0;
3268
2760
  }
3269
- function wo({
2761
+ function io({
3270
2762
  value: e,
3271
2763
  onChange: a,
3272
2764
  canvasClassname: r,
3273
2765
  imageType: n = "image/png"
3274
2766
  }) {
3275
- const [o, s] = De("sign"), [l, u] = De(""), p = q(null), m = q(null), x = q(a), v = q(e ?? null), A = q(!1), I = q({ width: 0, height: 0 }), E = we((y) => {
3276
- v.current !== y && (v.current = y, x.current?.(y));
2767
+ const o = Bo(), [i, l] = De("sign"), [u, p] = De(""), g = W(null), x = W(null), v = W(a), w = W(e ?? null), z = W(!1), O = W({ width: 0, height: 0 }), E = ye((y) => {
2768
+ w.current !== y && (w.current = y, v.current?.(y));
3277
2769
  }, []);
3278
- le(() => {
3279
- x.current = a;
3280
- }, [a]), le(() => {
3281
- v.current = e ?? null;
3282
- }, [e]), le(() => {
3283
- if (A.current || (A.current = !0, !e || o !== "sign")) return;
3284
- const y = p.current;
2770
+ ce(() => {
2771
+ v.current = a;
2772
+ }, [a]), ce(() => {
2773
+ w.current = e ?? null;
2774
+ }, [e]), ce(() => {
2775
+ if (z.current || (z.current = !0, !e || i !== "sign")) return;
2776
+ const y = g.current;
3285
2777
  if (y)
3286
2778
  try {
3287
2779
  y.fromDataURL(e);
3288
2780
  } catch {
3289
2781
  y.clear();
3290
2782
  }
3291
- }, []), le(() => {
3292
- if (o !== "type") return;
3293
- const y = m.current;
2783
+ }, []), ce(() => {
2784
+ if (i !== "type") return;
2785
+ const y = x.current;
3294
2786
  if (!y) return;
3295
- if (I.current.width === 0) {
3296
- const W = y.getBoundingClientRect();
3297
- I.current = {
3298
- width: Math.max(1, Math.floor(W.width)),
3299
- height: Math.max(1, Math.floor(W.height))
2787
+ if (O.current.width === 0) {
2788
+ const U = y.getBoundingClientRect();
2789
+ O.current = {
2790
+ width: Math.max(1, Math.floor(U.width)),
2791
+ height: Math.max(1, Math.floor(U.height))
3300
2792
  };
3301
2793
  }
3302
- const w = I.current;
3303
- if (!w.width || !w.height) return;
3304
- const z = window.devicePixelRatio || 1;
2794
+ const R = O.current;
2795
+ if (!R.width || !R.height) return;
2796
+ const $ = window.devicePixelRatio || 1;
3305
2797
  if (!Wt({
3306
2798
  canvas: y,
3307
- text: l,
3308
- width: w.width,
3309
- height: w.height,
3310
- ratio: z
2799
+ text: u,
2800
+ width: R.width,
2801
+ height: R.height,
2802
+ ratio: $
3311
2803
  })) {
3312
2804
  E(null);
3313
2805
  return;
3314
2806
  }
3315
- const P = document.createElement("canvas");
2807
+ const H = document.createElement("canvas");
3316
2808
  Wt({
3317
- canvas: P,
3318
- text: l,
3319
- width: w.width,
3320
- height: w.height,
3321
- ratio: z
3322
- }), E(P.toDataURL(n));
3323
- }, [o, l, n, E]);
3324
- const O = () => {
3325
- p.current?.clear(), u(""), E(null);
3326
- }, G = () => {
3327
- if (o !== "sign") return;
3328
- const y = p.current?.toDataURL(n) ?? null;
2809
+ canvas: H,
2810
+ text: u,
2811
+ width: R.width,
2812
+ height: R.height,
2813
+ ratio: $
2814
+ }), E(H.toDataURL(n));
2815
+ }, [i, u, n, E]);
2816
+ const G = () => {
2817
+ g.current?.clear(), p(""), E(null);
2818
+ }, C = () => {
2819
+ if (i !== "sign") return;
2820
+ const y = g.current?.toDataURL(n) ?? null;
3329
2821
  E(y);
3330
- }, S = (y) => {
3331
- y !== o && (O(), s(y));
3332
2822
  }, _ = (y) => {
3333
- u(y.target.value);
2823
+ y !== i && (G(), l(y));
2824
+ }, T = (y) => {
2825
+ p(y.target.value);
3334
2826
  };
3335
- return /* @__PURE__ */ d("div", { id: "signature", children: /* @__PURE__ */ C(
3336
- ma,
2827
+ return o === "pdf" ? /* @__PURE__ */ d("div", { id: "signature", className: "w-full", children: e ? /* @__PURE__ */ d(
2828
+ "img",
2829
+ {
2830
+ src: e,
2831
+ alt: "Signature",
2832
+ className: c(
2833
+ "w-full h-[256px] object-contain",
2834
+ "bg-size-[32px_32px] bg-surface",
2835
+ "bg-[linear-gradient(to_right,#80808022_1px,transparent_1px),linear-gradient(to_bottom,#80808022_1px,transparent_1px)]",
2836
+ "border-border border-2 rounded-base",
2837
+ r
2838
+ )
2839
+ }
2840
+ ) : /* @__PURE__ */ d(
2841
+ "div",
2842
+ {
2843
+ "aria-label": "Unsigned",
2844
+ className: c(
2845
+ "w-full h-[256px] flex items-end",
2846
+ "bg-size-[32px_32px] bg-surface",
2847
+ "bg-[linear-gradient(to_right,#80808022_1px,transparent_1px),linear-gradient(to_bottom,#80808022_1px,transparent_1px)]",
2848
+ "border-border border-2 rounded-base",
2849
+ r
2850
+ ),
2851
+ children: /* @__PURE__ */ d("div", { className: "w-full border-t-2 border-dashed border-border mx-6 mb-8 pb-1 text-center text-sm text-muted-foreground", children: "Signature" })
2852
+ }
2853
+ ) }) : /* @__PURE__ */ d("div", { id: "signature", children: /* @__PURE__ */ k(
2854
+ pa,
3337
2855
  {
3338
2856
  className: c(
3339
- o === "type" ? "max-h-84" : "max-h-69",
2857
+ i === "type" ? "max-h-84" : "max-h-69",
3340
2858
  "overflow-hidden transition-[max-height] duration-300 has-[>[data-align=block-start]]:p-2 gap-2"
3341
2859
  ),
3342
2860
  children: [
3343
- /* @__PURE__ */ d(ga, { align: "block-start", className: "p-0!", children: /* @__PURE__ */ C("div", { className: "relative w-full rounded-base", children: [
3344
- /* @__PURE__ */ C("div", { className: "absolute top-4 left-4 right-3 bg-transparent flex flex-row items-start justify-between gap-3", children: [
2861
+ /* @__PURE__ */ d(ga, { align: "block-start", className: "p-0!", children: /* @__PURE__ */ k("div", { className: "relative w-full rounded-base", children: [
2862
+ /* @__PURE__ */ k("div", { className: "absolute top-4 left-4 right-3 bg-transparent flex flex-row items-start justify-between gap-3", children: [
3345
2863
  /* @__PURE__ */ d(
3346
- ho,
2864
+ to,
3347
2865
  {
3348
- value: o,
3349
- onValueChange: (y) => S(y),
2866
+ value: i,
2867
+ onValueChange: (y) => _(y),
3350
2868
  className: "-mt-1",
3351
- children: /* @__PURE__ */ C(bo, { variant: "contained", extrude: "sm", size: "md", children: [
3352
- /* @__PURE__ */ C(Ht, { value: "sign", children: [
3353
- /* @__PURE__ */ d(Ua, {}),
2869
+ children: /* @__PURE__ */ k(ro, { variant: "contained", extrude: "sm", size: "md", children: [
2870
+ /* @__PURE__ */ k(Ft, { value: "sign", children: [
2871
+ /* @__PURE__ */ d(Oa, {}),
3354
2872
  /* @__PURE__ */ d("span", { className: "hidden sm:flex", children: "Draw" })
3355
2873
  ] }),
3356
- /* @__PURE__ */ C(Ht, { value: "type", children: [
3357
- /* @__PURE__ */ d(Ba, {}),
2874
+ /* @__PURE__ */ k(Ft, { value: "type", children: [
2875
+ /* @__PURE__ */ d(Da, {}),
3358
2876
  /* @__PURE__ */ d("span", { className: "hidden sm:flex", children: "Type" })
3359
2877
  ] })
3360
2878
  ] })
3361
2879
  }
3362
2880
  ),
3363
- /* @__PURE__ */ C(
2881
+ /* @__PURE__ */ k(
3364
2882
  ge,
3365
2883
  {
3366
2884
  size: "sm",
3367
2885
  raised: "xs",
3368
2886
  variant: "outline",
3369
- onClick: O,
2887
+ onClick: G,
3370
2888
  children: [
3371
- /* @__PURE__ */ d(ja, {}),
2889
+ /* @__PURE__ */ d(La, {}),
3372
2890
  /* @__PURE__ */ d("span", { className: "hidden sm:flex", children: "Clear" })
3373
2891
  ]
3374
2892
  }
3375
2893
  )
3376
2894
  ] }),
3377
- o === "sign" ? /* @__PURE__ */ d(
3378
- Qa,
2895
+ i === "sign" ? /* @__PURE__ */ d(
2896
+ Wa,
3379
2897
  {
3380
- ref: p,
3381
- onEnd: G,
2898
+ ref: g,
2899
+ onEnd: C,
3382
2900
  canvasProps: {
3383
2901
  className: r ?? c(
3384
2902
  "w-full h-[256px]",
@@ -3393,7 +2911,7 @@ function wo({
3393
2911
  ) : /* @__PURE__ */ d(
3394
2912
  "canvas",
3395
2913
  {
3396
- ref: m,
2914
+ ref: x,
3397
2915
  className: c(
3398
2916
  "w-full h-64",
3399
2917
  "bg-size-[32px_32px] bg-surface",
@@ -3405,23 +2923,23 @@ function wo({
3405
2923
  )
3406
2924
  ] }) }),
3407
2925
  /* @__PURE__ */ d(
3408
- ha,
2926
+ ma,
3409
2927
  {
3410
- disabled: o !== "type",
2928
+ disabled: i !== "type",
3411
2929
  className: c(
3412
- o === "type" ? "animate-in zoom-in-0 spin-in-20 scale-100" : "animate-out zoom-out-0 spin-out-20 scale-0",
2930
+ i === "type" ? "animate-in zoom-in-0 spin-in-20 scale-100" : "animate-out zoom-out-0 spin-out-20 scale-0",
3413
2931
  "py-2 text-lg font-medium transition-[scale,translate,box-shadow] duration-300 origin-bottom-left"
3414
2932
  ),
3415
2933
  placeholder: "Enter Full Name",
3416
- value: l,
3417
- onChange: _
2934
+ value: u,
2935
+ onChange: T
3418
2936
  }
3419
2937
  )
3420
2938
  ]
3421
2939
  }
3422
2940
  ) });
3423
2941
  }
3424
- const Ao = R("bg-border shrink-0", {
2942
+ const lo = S("bg-border shrink-0", {
3425
2943
  variants: {
3426
2944
  stroke: {
3427
2945
  thin: "border-0.5",
@@ -3438,23 +2956,23 @@ const Ao = R("bg-border shrink-0", {
3438
2956
  orientation: "horizontal"
3439
2957
  }
3440
2958
  });
3441
- function zo({
2959
+ function co({
3442
2960
  className: e,
3443
2961
  orientation: a,
3444
2962
  stroke: r,
3445
2963
  ...n
3446
2964
  }) {
3447
2965
  return /* @__PURE__ */ d(
3448
- er,
2966
+ Va,
3449
2967
  {
3450
2968
  "data-slot": "separator",
3451
2969
  orientation: a,
3452
- className: c(Ao({ orientation: a, stroke: r }), e),
2970
+ className: c(lo({ orientation: a, stroke: r }), e),
3453
2971
  ...n
3454
2972
  }
3455
2973
  );
3456
2974
  }
3457
- const Io = R("bg-foreground/30 rounded-base", {
2975
+ const uo = S("bg-foreground/30 rounded-base", {
3458
2976
  variants: {
3459
2977
  variant: {
3460
2978
  circle: "aspect-square w-auto rounded-full",
@@ -3468,7 +2986,7 @@ const Io = R("bg-foreground/30 rounded-base", {
3468
2986
  }
3469
2987
  }
3470
2988
  });
3471
- function To({
2989
+ function po({
3472
2990
  variant: e = "default",
3473
2991
  animate: a = !0,
3474
2992
  className: r,
@@ -3478,12 +2996,12 @@ function To({
3478
2996
  "div",
3479
2997
  {
3480
2998
  "data-slot": "skeleton",
3481
- className: c(Io({ variant: e, animate: a }), r),
2999
+ className: c(uo({ variant: e, animate: a }), r),
3482
3000
  ...n
3483
3001
  }
3484
3002
  );
3485
3003
  }
3486
- const Co = R(
3004
+ const go = S(
3487
3005
  "neo-base neo-switch-focus relative cursor-pointer inline-flex items-center data-checked:bg-main data-unchecked:bg-surface shrink-0 border-2 border-border transition-[translate,box-shadow,color] aria-disabled:cursor-not-allowed aria-disabled:opacity-50",
3488
3006
  {
3489
3007
  variants: {
@@ -3506,32 +3024,32 @@ const Co = R(
3506
3024
  }
3507
3025
  }
3508
3026
  );
3509
- function ko({
3027
+ function mo({
3510
3028
  className: e,
3511
3029
  size: a = "md",
3512
3030
  rounded: r = "full",
3513
3031
  onCheckedChange: n,
3514
3032
  ...o
3515
3033
  }) {
3516
- const { trigger: s } = oe();
3034
+ const { trigger: i } = se();
3517
3035
  return /* @__PURE__ */ d(
3518
- Le.Root,
3036
+ Ue.Root,
3519
3037
  {
3520
3038
  "data-slot": "switch",
3521
3039
  "data-size": a,
3522
3040
  "data-rounded": r,
3523
3041
  className: c(
3524
- Co({ size: a, rounded: r }),
3042
+ go({ size: a, rounded: r }),
3525
3043
  "peer group/switch",
3526
3044
  e
3527
3045
  ),
3528
3046
  "aria-label": o["aria-label"] ?? "switch",
3529
3047
  onCheckedChange: (l, u) => {
3530
- s(fn), n?.(l, u);
3048
+ i(on), n?.(l, u);
3531
3049
  },
3532
3050
  ...o,
3533
3051
  children: /* @__PURE__ */ d(
3534
- Le.Thumb,
3052
+ Ue.Thumb,
3535
3053
  {
3536
3054
  "data-slot": "switch-thumb",
3537
3055
  className: c(
@@ -3556,7 +3074,7 @@ function ko({
3556
3074
  }
3557
3075
  );
3558
3076
  }
3559
- const So = R("w-full caption-bottom text-sm", {
3077
+ const ho = S("w-full caption-bottom text-sm", {
3560
3078
  variants: {
3561
3079
  variant: {
3562
3080
  default: "",
@@ -3565,7 +3083,7 @@ const So = R("w-full caption-bottom text-sm", {
3565
3083
  }
3566
3084
  }
3567
3085
  });
3568
- function Ro({
3086
+ function fo({
3569
3087
  className: e,
3570
3088
  variant: a = "default",
3571
3089
  ...r
@@ -3580,14 +3098,14 @@ function Ro({
3580
3098
  {
3581
3099
  "data-slot": "table",
3582
3100
  "data-variant": a,
3583
- className: c(So({ variant: a }), "group/table", e),
3101
+ className: c(ho({ variant: a }), "group/table", e),
3584
3102
  ...r
3585
3103
  }
3586
3104
  )
3587
3105
  }
3588
3106
  );
3589
3107
  }
3590
- function _o({ className: e, ...a }) {
3108
+ function bo({ className: e, ...a }) {
3591
3109
  return /* @__PURE__ */ d(
3592
3110
  "thead",
3593
3111
  {
@@ -3597,7 +3115,7 @@ function _o({ className: e, ...a }) {
3597
3115
  }
3598
3116
  );
3599
3117
  }
3600
- function No({ className: e, ...a }) {
3118
+ function xo({ className: e, ...a }) {
3601
3119
  return /* @__PURE__ */ d(
3602
3120
  "tbody",
3603
3121
  {
@@ -3607,7 +3125,7 @@ function No({ className: e, ...a }) {
3607
3125
  }
3608
3126
  );
3609
3127
  }
3610
- function Po({ className: e, ...a }) {
3128
+ function vo({ className: e, ...a }) {
3611
3129
  return /* @__PURE__ */ d(
3612
3130
  "tfoot",
3613
3131
  {
@@ -3623,7 +3141,7 @@ function Po({ className: e, ...a }) {
3623
3141
  }
3624
3142
  );
3625
3143
  }
3626
- function Eo({ className: e, ...a }) {
3144
+ function yo({ className: e, ...a }) {
3627
3145
  return /* @__PURE__ */ d(
3628
3146
  "tr",
3629
3147
  {
@@ -3649,7 +3167,7 @@ function Eo({ className: e, ...a }) {
3649
3167
  }
3650
3168
  );
3651
3169
  }
3652
- function Do({ className: e, ...a }) {
3170
+ function wo({ className: e, ...a }) {
3653
3171
  return /* @__PURE__ */ d(
3654
3172
  "th",
3655
3173
  {
@@ -3664,7 +3182,7 @@ function Do({ className: e, ...a }) {
3664
3182
  }
3665
3183
  );
3666
3184
  }
3667
- function Oo({ className: e, ...a }) {
3185
+ function Ao({ className: e, ...a }) {
3668
3186
  return /* @__PURE__ */ d(
3669
3187
  "td",
3670
3188
  {
@@ -3679,7 +3197,7 @@ function Oo({ className: e, ...a }) {
3679
3197
  }
3680
3198
  );
3681
3199
  }
3682
- function Lo({
3200
+ function zo({
3683
3201
  className: e,
3684
3202
  ...a
3685
3203
  }) {
@@ -3695,64 +3213,63 @@ function Lo({
3695
3213
  }
3696
3214
  );
3697
3215
  }
3698
- const Mt = {
3699
- [i.A]: ia,
3700
- [i.H]: sa,
3701
- [i.P]: da,
3702
- [i.OL]: "ol",
3703
- [i.UL]: "ul",
3704
- [i.LI]: "li",
3705
- [i.DIV]: "div",
3706
- [i.SPAN]: "span",
3707
- [i.IMAGE]: "img",
3708
- [i.ACCORDION]: yn,
3709
- [i.ACCORDION_ITEM]: wn,
3710
- [i.ACCORDION_TRIGGER]: An,
3711
- [i.ACCORDION_CONTENT]: zn,
3712
- [i.ALERT]: Tn,
3713
- [i.AVATAR]: kn,
3714
- [i.BADGE]: Rn,
3715
- [i.BUTTON]: ge,
3716
- [i.CARD]: $n,
3717
- [i.CARD_HEADER]: Hn,
3718
- [i.CARD_TITLE]: Gn,
3719
- [i.CARD_DESCRIPTION]: Wn,
3720
- [i.CARD_CONTENT]: Vn,
3721
- [i.CARD_FOOTER]: Xn,
3722
- [i.CARD_ACTION]: Mn,
3723
- [i.CARD_ICON]: qn,
3724
- [i.MAP]: co,
3725
- [i.CALENDAR]: Un,
3726
- [i.CHECKBOX]: Yn,
3727
- [i.COLLAPSIBLE]: Kn,
3728
- [i.COLLAPSIBLE_TRIGGER]: Zn,
3729
- [i.COLLAPSIBLE_CONTENT]: Qn,
3730
- [i.OTP]: eo,
3731
- [i.INPUT]: ua,
3732
- [i.INPUT_GROUP]: ma,
3733
- [i.INPUT_GROUP_TEXT]: no,
3734
- [i.INPUT_GROUP_ADDON]: ga,
3735
- [i.INPUT_GROUP_INPUT]: ha,
3736
- [i.INPUT_GROUP_BUTTON]: ro,
3737
- [i.INPUT_GROUP_TEXTAREA]: oo,
3738
- [i.LABEL]: so,
3739
- [i.LOADER]: la,
3740
- [i.PROGRESS]: po,
3741
- [i.SWITCH]: ko,
3742
- [i.SEPARATOR]: zo,
3743
- [i.SKELETON]: To,
3744
- [i.TABLE]: Ro,
3745
- [i.TABLE_HEADER]: _o,
3746
- [i.TABLE_BODY]: No,
3747
- [i.TABLE_FOOTER]: Po,
3748
- [i.TABLE_HEAD]: Do,
3749
- [i.TABLE_ROW]: Eo,
3750
- [i.TABLE_CELL]: Oo,
3751
- [i.TABLE_CAPTION]: Lo,
3752
- [i.TEXTAREA]: pa,
3753
- [i.SIGNATURE]: wo
3754
- }, Uo = {
3755
- [i.INPUT]: {
3216
+ const Vt = {
3217
+ [s.A]: oa,
3218
+ [s.H]: sa,
3219
+ [s.P]: ia,
3220
+ [s.OL]: "ol",
3221
+ [s.UL]: "ul",
3222
+ [s.LI]: "li",
3223
+ [s.DIV]: "div",
3224
+ [s.SPAN]: "span",
3225
+ [s.IMAGE]: "img",
3226
+ [s.ACCORDION]: cn,
3227
+ [s.ACCORDION_ITEM]: un,
3228
+ [s.ACCORDION_TRIGGER]: pn,
3229
+ [s.ACCORDION_CONTENT]: gn,
3230
+ [s.ALERT]: hn,
3231
+ [s.AVATAR]: bn,
3232
+ [s.BADGE]: vn,
3233
+ [s.BUTTON]: ge,
3234
+ [s.CARD]: Nn,
3235
+ [s.CARD_HEADER]: En,
3236
+ [s.CARD_TITLE]: Pn,
3237
+ [s.CARD_DESCRIPTION]: On,
3238
+ [s.CARD_CONTENT]: Un,
3239
+ [s.CARD_FOOTER]: Bn,
3240
+ [s.CARD_ACTION]: Dn,
3241
+ [s.CARD_ICON]: Ln,
3242
+ [s.CALENDAR]: kn,
3243
+ [s.CHECKBOX]: $n,
3244
+ [s.COLLAPSIBLE]: Hn,
3245
+ [s.COLLAPSIBLE_TRIGGER]: Fn,
3246
+ [s.COLLAPSIBLE_CONTENT]: Gn,
3247
+ [s.OTP]: Wn,
3248
+ [s.INPUT]: ca,
3249
+ [s.INPUT_GROUP]: pa,
3250
+ [s.INPUT_GROUP_TEXT]: Jn,
3251
+ [s.INPUT_GROUP_ADDON]: ga,
3252
+ [s.INPUT_GROUP_INPUT]: ma,
3253
+ [s.INPUT_GROUP_BUTTON]: Mn,
3254
+ [s.INPUT_GROUP_TEXTAREA]: Xn,
3255
+ [s.LABEL]: Yn,
3256
+ [s.LOADER]: da,
3257
+ [s.PROGRESS]: Zn,
3258
+ [s.SWITCH]: mo,
3259
+ [s.SEPARATOR]: co,
3260
+ [s.SKELETON]: po,
3261
+ [s.TABLE]: fo,
3262
+ [s.TABLE_HEADER]: bo,
3263
+ [s.TABLE_BODY]: xo,
3264
+ [s.TABLE_FOOTER]: vo,
3265
+ [s.TABLE_HEAD]: wo,
3266
+ [s.TABLE_ROW]: yo,
3267
+ [s.TABLE_CELL]: Ao,
3268
+ [s.TABLE_CAPTION]: zo,
3269
+ [s.TEXTAREA]: ua,
3270
+ [s.SIGNATURE]: io
3271
+ }, To = {
3272
+ [s.INPUT]: {
3756
3273
  text: {
3757
3274
  valueProp: "value",
3758
3275
  changeProp: "onChange",
@@ -3779,59 +3296,54 @@ const Mt = {
3779
3296
  extractor: (e) => e.target.value
3780
3297
  }
3781
3298
  },
3782
- [i.OTP]: {
3299
+ [s.OTP]: {
3783
3300
  valueProp: "value",
3784
3301
  changeProp: "onChange",
3785
3302
  extractor: (e) => e.target.value
3786
3303
  },
3787
- [i.CHECKBOX]: {
3304
+ [s.CHECKBOX]: {
3788
3305
  valueProp: "checked",
3789
3306
  changeProp: "onCheckedChange",
3790
3307
  extractor: (e) => e
3791
3308
  },
3792
- [i.TEXTAREA]: {
3309
+ [s.TEXTAREA]: {
3793
3310
  valueProp: "value",
3794
3311
  changeProp: "onChange",
3795
3312
  extractor: (e) => e.target.value
3796
3313
  },
3797
- [i.INPUT_GROUP_INPUT]: {
3314
+ [s.INPUT_GROUP_INPUT]: {
3798
3315
  valueProp: "value",
3799
3316
  changeProp: "onChange",
3800
3317
  extractor: (e) => e.target.value
3801
3318
  },
3802
- [i.INPUT_GROUP_TEXTAREA]: {
3319
+ [s.INPUT_GROUP_TEXTAREA]: {
3803
3320
  valueProp: "value",
3804
3321
  changeProp: "onChange",
3805
3322
  extractor: (e) => e.target.value
3806
3323
  },
3807
- [i.SWITCH]: {
3324
+ [s.SWITCH]: {
3808
3325
  valueProp: "checked",
3809
3326
  changeProp: "onCheckedChange",
3810
3327
  extractor: (e) => e
3811
3328
  },
3812
- [i.SIGNATURE]: {
3329
+ [s.SIGNATURE]: {
3813
3330
  valueProp: "value",
3814
3331
  changeProp: "onChange",
3815
3332
  extractor: (e) => e
3816
3333
  },
3817
- [i.CALENDAR]: {
3334
+ [s.CALENDAR]: {
3818
3335
  valueProp: "selected",
3819
3336
  changeProp: "onSelect",
3820
3337
  extractor: (e) => e
3821
- },
3822
- [i.MAP]: {
3823
- valueProp: "value",
3824
- changeProp: "onChange",
3825
- extractor: (e) => e
3826
3338
  }
3827
3339
  };
3828
- function Yi(e) {
3340
+ function Bs(e) {
3829
3341
  return e;
3830
3342
  }
3831
- function Ki(e) {
3343
+ function js(e) {
3832
3344
  return e;
3833
3345
  }
3834
- const Bo = ["bindings", "formField", "ssr", "pdf"], jo = ["children", "bindings", "ssr", "pdf"];
3346
+ const Io = ["bindings", "formField", "ssr", "pdf"], Co = ["children", "bindings", "ssr", "pdf"];
3835
3347
  function qt(e) {
3836
3348
  return {
3837
3349
  valueProp: e.valueProp,
@@ -3839,7 +3351,7 @@ function qt(e) {
3839
3351
  extract: e.extractor
3840
3352
  };
3841
3353
  }
3842
- function Fo(e) {
3354
+ function ko(e) {
3843
3355
  if (e)
3844
3356
  return typeof e == "object" && "default" in e ? Object.fromEntries(
3845
3357
  Object.entries(e).map(([a, r]) => [
@@ -3854,22 +3366,22 @@ const Ce = {
3854
3366
  namespace: "pebble",
3855
3367
  fallback: "div",
3856
3368
  components: Object.fromEntries(
3857
- Object.keys(Mt).map((e) => {
3858
- const a = Fo(Uo[e]);
3369
+ Object.keys(Vt).map((e) => {
3370
+ const a = ko(To[e]);
3859
3371
  return [
3860
3372
  e,
3861
3373
  {
3862
- component: Mt[e],
3863
- propsSchema: na[e]?.argsSchema,
3864
- capabilities: a ? Bo : jo,
3374
+ component: Vt[e],
3375
+ propsSchema: ra[e]?.argsSchema,
3376
+ capabilities: a ? Io : Co,
3865
3377
  controlled: a
3866
3378
  }
3867
3379
  ];
3868
3380
  })
3869
3381
  )
3870
3382
  };
3871
- aa.plugins.register(tr);
3872
- class $o {
3383
+ ta.plugins.register(qa);
3384
+ class So {
3873
3385
  cache = /* @__PURE__ */ new Map();
3874
3386
  maxSize;
3875
3387
  constructor(a) {
@@ -3889,39 +3401,39 @@ class $o {
3889
3401
  this.cache.clear();
3890
3402
  }
3891
3403
  }
3892
- const Ho = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
3893
- function Vt(e, a) {
3894
- if (e != null && !(typeof a == "string" && Ho.has(a)) && Object.prototype.hasOwnProperty.call(e, a))
3404
+ const Ro = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
3405
+ function Mt(e, a) {
3406
+ if (e != null && !(typeof a == "string" && Ro.has(a)) && Object.prototype.hasOwnProperty.call(e, a))
3895
3407
  return e[a];
3896
3408
  }
3897
- function fa(e) {
3409
+ function ha(e) {
3898
3410
  if (e.type === "Identifier") return e.name;
3899
3411
  if (e.type === "MemberExpression") {
3900
- const a = fa(e.object);
3412
+ const a = ha(e.object);
3901
3413
  if (a == null) return null;
3902
3414
  const r = e.property;
3903
3415
  return e.computed ? r.type !== "Literal" ? null : `${a}[${JSON.stringify(r.value)}]` : r.type !== "Identifier" ? null : `${a}.${r.name}`;
3904
3416
  }
3905
3417
  return null;
3906
3418
  }
3907
- function Go(e) {
3419
+ function _o(e) {
3908
3420
  const a = e.match(/^[^.[]+/);
3909
3421
  return a ? a[0] : e;
3910
3422
  }
3911
- function Wo(e) {
3423
+ function No(e) {
3912
3424
  const a = /* @__PURE__ */ new Set();
3913
3425
  function r(n, o) {
3914
3426
  if (n)
3915
3427
  switch (n.type) {
3916
3428
  case "Identifier": {
3917
- const s = n.name;
3918
- o.has(s) || a.add(s);
3429
+ const i = n.name;
3430
+ o.has(i) || a.add(i);
3919
3431
  return;
3920
3432
  }
3921
3433
  case "MemberExpression": {
3922
- const s = fa(n);
3923
- if (s != null) {
3924
- o.has(Go(s)) || a.add(s);
3434
+ const i = ha(n);
3435
+ if (i != null) {
3436
+ o.has(_o(i)) || a.add(i);
3925
3437
  return;
3926
3438
  }
3927
3439
  r(n.object, o), r(n.property, o);
@@ -3937,11 +3449,11 @@ function Wo(e) {
3937
3449
  r(n.test, o), r(n.consequent, o), r(n.alternate, o);
3938
3450
  return;
3939
3451
  case "ArrayExpression":
3940
- n.elements.forEach((s) => r(s, o));
3452
+ n.elements.forEach((i) => r(i, o));
3941
3453
  return;
3942
3454
  case "CallExpression": {
3943
- const s = n.callee;
3944
- s.type === "MemberExpression" && r(s.object, o), n.arguments.forEach((l) => {
3455
+ const i = n.callee;
3456
+ i.type === "MemberExpression" && r(i.object, o), n.arguments.forEach((l) => {
3945
3457
  if (l.type === "ArrowFunctionExpression") {
3946
3458
  const u = new Set(o);
3947
3459
  l.params?.forEach((p) => {
@@ -3953,7 +3465,7 @@ function Wo(e) {
3953
3465
  return;
3954
3466
  }
3955
3467
  case "Compound":
3956
- n.body.forEach((s) => r(s, o));
3468
+ n.body.forEach((i) => r(i, o));
3957
3469
  return;
3958
3470
  default:
3959
3471
  return;
@@ -3961,8 +3473,8 @@ function Wo(e) {
3961
3473
  }
3962
3474
  return r(e, /* @__PURE__ */ new Set()), Array.from(a);
3963
3475
  }
3964
- const ee = (e, a = 2) => String(e).padStart(a, "0");
3965
- function Mo(e) {
3476
+ const Z = (e, a = 2) => String(e).padStart(a, "0");
3477
+ function Eo(e) {
3966
3478
  const a = e instanceof Date ? e : new Date(e);
3967
3479
  return Number.isNaN(a.getTime()) ? null : a;
3968
3480
  }
@@ -3970,23 +3482,23 @@ function ue(e) {
3970
3482
  const a = typeof e == "number" ? e : parseFloat(e);
3971
3483
  return Number.isNaN(a) ? 0 : a;
3972
3484
  }
3973
- function Xt(e) {
3485
+ function Jt(e) {
3974
3486
  return e.flat(1 / 0).map(ue);
3975
3487
  }
3976
- const qo = {
3488
+ const Po = {
3977
3489
  // Uses UTC getters so SSR and client render the same calendar date regardless of local timezone.
3978
3490
  formatDate(e, a = "YYYY-MM-DD") {
3979
- const r = Mo(e);
3491
+ const r = Eo(e);
3980
3492
  if (!r) return "";
3981
3493
  if (a === "short" || a === "medium" || a === "long" || a === "full")
3982
3494
  return new Intl.DateTimeFormat("en-US", { dateStyle: a, timeZone: "UTC" }).format(r);
3983
3495
  const n = {
3984
3496
  YYYY: String(r.getUTCFullYear()),
3985
- MM: ee(r.getUTCMonth() + 1),
3986
- DD: ee(r.getUTCDate()),
3987
- HH: ee(r.getUTCHours()),
3988
- mm: ee(r.getUTCMinutes()),
3989
- ss: ee(r.getUTCSeconds())
3497
+ MM: Z(r.getUTCMonth() + 1),
3498
+ DD: Z(r.getUTCDate()),
3499
+ HH: Z(r.getUTCHours()),
3500
+ mm: Z(r.getUTCMinutes()),
3501
+ ss: Z(r.getUTCSeconds())
3990
3502
  };
3991
3503
  return a.replace(/YYYY|MM|DD|HH|mm|ss/g, (o) => n[o]);
3992
3504
  },
@@ -4022,36 +3534,36 @@ const qo = {
4022
3534
  return Array.isArray(e) ? e.reduce((a, r) => a + ue(r), 0) : 0;
4023
3535
  },
4024
3536
  min(...e) {
4025
- const a = Xt(e);
3537
+ const a = Jt(e);
4026
3538
  return a.length ? Math.min(...a) : void 0;
4027
3539
  },
4028
3540
  max(...e) {
4029
- const a = Xt(e);
3541
+ const a = Jt(e);
4030
3542
  return a.length ? Math.max(...a) : void 0;
4031
3543
  },
4032
3544
  round(e, a = 0) {
4033
3545
  const r = 10 ** a;
4034
3546
  return Math.round(ue(e) * r) / r;
4035
3547
  }
4036
- }, Vo = /* @__PURE__ */ new Set(["map", "filter", "some", "every", "find"]);
4037
- function Xo(e, a, r) {
3548
+ }, Oo = /* @__PURE__ */ new Set(["map", "filter", "some", "every", "find"]);
3549
+ function Do(e, a, r) {
4038
3550
  const n = { ...r };
4039
- return (e.params ?? []).forEach((o, s) => {
4040
- o.type === "Identifier" && (n[o.name] = a[s]);
4041
- }), D(e.body, n);
3551
+ return (e.params ?? []).forEach((o, i) => {
3552
+ o.type === "Identifier" && (n[o.name] = a[i]);
3553
+ }), N(e.body, n);
4042
3554
  }
4043
- function D(e, a) {
3555
+ function N(e, a) {
4044
3556
  switch (e.type) {
4045
3557
  case "Literal":
4046
3558
  return e.value;
4047
3559
  case "Identifier":
4048
- return Vt(a, e.name);
3560
+ return Mt(a, e.name);
4049
3561
  case "MemberExpression": {
4050
- const r = D(e.object, a), n = e.property, o = e.computed ? D(n, a) : n.name;
4051
- return Vt(r, o);
3562
+ const r = N(e.object, a), n = e.property, o = e.computed ? N(n, a) : n.name;
3563
+ return Mt(r, o);
4052
3564
  }
4053
3565
  case "UnaryExpression": {
4054
- const r = D(e.argument, a);
3566
+ const r = N(e.argument, a);
4055
3567
  switch (e.operator) {
4056
3568
  case "!":
4057
3569
  return !r;
@@ -4068,10 +3580,10 @@ function D(e, a) {
4068
3580
  case "BinaryExpression": {
4069
3581
  const r = e.operator;
4070
3582
  if (r === "&&" || r === "||" || r === "??") {
4071
- const s = D(e.left, a);
4072
- return (r === "&&" ? !s : r === "||" ? !!s : s != null) ? s : D(e.right, a);
3583
+ const i = N(e.left, a);
3584
+ return (r === "&&" ? !i : r === "||" ? !!i : i != null) ? i : N(e.right, a);
4073
3585
  }
4074
- const n = D(e.left, a), o = D(e.right, a);
3586
+ const n = N(e.left, a), o = N(e.right, a);
4075
3587
  switch (r) {
4076
3588
  case "===":
4077
3589
  return n === o;
@@ -4118,12 +3630,12 @@ function D(e, a) {
4118
3630
  }
4119
3631
  }
4120
3632
  case "ConditionalExpression": {
4121
- const r = D(e.test, a);
4122
- return D(r ? e.consequent : e.alternate, a);
3633
+ const r = N(e.test, a);
3634
+ return N(r ? e.consequent : e.alternate, a);
4123
3635
  }
4124
3636
  case "ArrayExpression":
4125
3637
  return e.elements.map(
4126
- (r) => r ? D(r, a) : void 0
3638
+ (r) => r ? N(r, a) : void 0
4127
3639
  );
4128
3640
  case "CallExpression": {
4129
3641
  const r = e.callee, n = e.arguments;
@@ -4132,40 +3644,40 @@ function D(e, a) {
4132
3644
  throw new Error(
4133
3645
  "Method calls must use a fixed dot-notation method name"
4134
3646
  );
4135
- const s = r.property.name;
4136
- if (!Vo.has(s))
4137
- throw new Error(`Unknown array method: ${s}`);
4138
- const l = D(r.object, a);
3647
+ const i = r.property.name;
3648
+ if (!Oo.has(i))
3649
+ throw new Error(`Unknown array method: ${i}`);
3650
+ const l = N(r.object, a);
4139
3651
  if (!Array.isArray(l))
4140
- throw new Error(`.${s}() can only be called on an array`);
3652
+ throw new Error(`.${i}() can only be called on an array`);
4141
3653
  const [u] = n;
4142
3654
  if (n.length !== 1 || u.type !== "ArrowFunctionExpression")
4143
3655
  throw new Error(
4144
- `.${s}() requires a single arrow-function argument`
3656
+ `.${i}() requires a single arrow-function argument`
4145
3657
  );
4146
- return l[s](
4147
- (p, m) => Xo(u, [p, m], a)
3658
+ return l[i](
3659
+ (p, g) => Do(u, [p, g], a)
4148
3660
  );
4149
3661
  }
4150
3662
  if (r.type !== "Identifier")
4151
3663
  throw new Error(
4152
3664
  "Function calls are only allowed via a bare helper name"
4153
3665
  );
4154
- const o = qo[r.name];
3666
+ const o = Po[r.name];
4155
3667
  if (typeof o != "function")
4156
3668
  throw new Error(`Unknown helper: ${r.name}`);
4157
- return o(...n.map((s) => D(s, a)));
3669
+ return o(...n.map((i) => N(i, a)));
4158
3670
  }
4159
3671
  default:
4160
3672
  throw new Error(`Unsupported expression type: ${e.type}`);
4161
3673
  }
4162
3674
  }
4163
- const Jt = new $o(250);
4164
- function ba(e) {
4165
- let a = Jt.get(e);
4166
- return a || (a = aa(e), Jt.set(e, a), a);
3675
+ const Xt = new So(250);
3676
+ function fa(e) {
3677
+ let a = Xt.get(e);
3678
+ return a || (a = ta(e), Xt.set(e, a), a);
4167
3679
  }
4168
- function Jo(e) {
3680
+ function Lo(e) {
4169
3681
  if (!e || typeof e != "string")
4170
3682
  return [];
4171
3683
  if (!e.startsWith("{{") || !e.endsWith("}}"))
@@ -4174,38 +3686,41 @@ function Jo(e) {
4174
3686
  if (!a)
4175
3687
  return [];
4176
3688
  try {
4177
- return Wo(ba(a));
3689
+ return No(fa(a));
4178
3690
  } catch (r) {
4179
3691
  return console.error(`Error extracting variables from "${e}":`, r), [];
4180
3692
  }
4181
3693
  }
4182
- function Yo(e, a) {
3694
+ function Uo(e, a) {
4183
3695
  if (!e || typeof e != "string" || !e.startsWith("{{") || !e.endsWith("}}"))
4184
3696
  return e;
4185
3697
  const r = e.slice(2, -2).trim();
4186
3698
  if (r)
4187
3699
  try {
4188
- return D(ba(r), a);
3700
+ return N(fa(r), a);
4189
3701
  } catch (n) {
4190
3702
  console.error(`Error parsing expression "${e}":`, n);
4191
3703
  return;
4192
3704
  }
4193
3705
  }
4194
- const xa = Zt(null), ie = Zt(Ce);
4195
- function ke() {
4196
- const e = me(xa);
3706
+ const ba = we(null), ie = we(Ce), ke = we("web");
3707
+ function Bo() {
3708
+ return oe(ke);
3709
+ }
3710
+ function Se() {
3711
+ const e = oe(ba);
4197
3712
  if (!e)
4198
3713
  throw new Error("useBonsaiStore must be used within a <Bonsai> component");
4199
3714
  return e;
4200
3715
  }
4201
- function Ko() {
4202
- const e = ke();
4203
- return we(
4204
- (a, r) => Qo(e.data, a, r),
3716
+ function jo() {
3717
+ const e = Se();
3718
+ return ye(
3719
+ (a, r) => Ho(e.data, a, r),
4205
3720
  [e]
4206
3721
  );
4207
3722
  }
4208
- const Se = /* @__PURE__ */ new Set([
3723
+ const Re = /* @__PURE__ */ new Set([
4209
3724
  "area",
4210
3725
  "base",
4211
3726
  "br",
@@ -4220,28 +3735,28 @@ const Se = /* @__PURE__ */ new Set([
4220
3735
  "source",
4221
3736
  "track",
4222
3737
  "wbr"
4223
- ]), j = (e, a, r) => `${e.type || "div"}-${r}-${a}`, Zo = /[^.[\]]+|\[(?:[^\[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/g;
4224
- function Re(e) {
4225
- return e.match(Zo) || [];
3738
+ ]), L = (e, a, r) => `${e.type || "div"}-${r}-${a}`, $o = /[^.[\]]+|\[(?:[^\[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/g;
3739
+ function _e(e) {
3740
+ return e.match($o) || [];
4226
3741
  }
4227
3742
  function V(e) {
4228
3743
  return e.startsWith("[") && e.endsWith("]") ? e.slice(1, -1).replace(/^["']|["']$/g, "") : e;
4229
3744
  }
4230
3745
  function re(e, a, r = void 0) {
4231
- return a ? Re(a).reduce((o, s) => {
3746
+ return a ? _e(a).reduce((o, i) => {
4232
3747
  if (o != null)
4233
- return o[V(s)];
3748
+ return o[V(i)];
4234
3749
  }, e) ?? r : e;
4235
3750
  }
4236
- function Qo(e, a, r) {
3751
+ function Ho(e, a, r) {
4237
3752
  if (!a) {
4238
3753
  Object.assign(e, r);
4239
3754
  return;
4240
3755
  }
4241
- const n = Re(a);
3756
+ const n = _e(a);
4242
3757
  let o = e;
4243
- for (let s = 0; s < n.length - 1; s++) {
4244
- const l = V(n[s]), u = V(n[s + 1]);
3758
+ for (let i = 0; i < n.length - 1; i++) {
3759
+ const l = V(n[i]), u = V(n[i + 1]);
4245
3760
  o[l] ??= /^\d+$/.test(u) ? [] : {}, o = o[l];
4246
3761
  }
4247
3762
  o[V(n[n.length - 1])] = r;
@@ -4251,32 +3766,32 @@ function ne(e, a) {
4251
3766
  const r = e.match(/^[^.[]+/), n = r ? r[0] : e, o = a[n];
4252
3767
  return o == null ? e : o + e.slice(n.length);
4253
3768
  }
4254
- function ei(e, a, r, n) {
4255
- const o = e.match(/^[^.[]+/), s = o ? o[0] : e;
4256
- return n && s in n ? e === s ? n[s] : void 0 : r && s in r ? re(a.data ?? a, ne(e, r)) : e in a && e !== "data" ? a[e] : re(a.data ?? a, e);
3769
+ function Fo(e, a, r, n) {
3770
+ const o = e.match(/^[^.[]+/), i = o ? o[0] : e;
3771
+ return n && i in n ? e === i ? n[i] : void 0 : r && i in r ? re(a.data ?? a, ne(e, r)) : e in a && e !== "data" ? a[e] : re(a.data ?? a, e);
4257
3772
  }
4258
- function _e(e) {
3773
+ function Ne(e) {
4259
3774
  const a = /* @__PURE__ */ new Set();
4260
3775
  function r(n) {
4261
- typeof n == "string" && n.startsWith("{{") && n.endsWith("}}") && Jo(n).forEach((s) => a.add(s));
3776
+ typeof n == "string" && n.startsWith("{{") && n.endsWith("}}") && Lo(n).forEach((i) => a.add(i));
4262
3777
  }
4263
3778
  return typeof e == "string" ? r(e) : Object.values(e?.args ?? {}).forEach(r), Array.from(a);
4264
3779
  }
4265
- const B = (e, a) => Yo(e, a);
4266
- function va(e, a) {
3780
+ const D = (e, a) => Uo(e, a);
3781
+ function xa(e, a) {
4267
3782
  return e.reduce((r, n) => {
4268
- const o = a(n), s = Re(n);
4269
- if (s.length === 1)
3783
+ const o = a(n), i = _e(n);
3784
+ if (i.length === 1)
4270
3785
  return r[n] = o, r;
4271
3786
  let l = r;
4272
- for (let u = 0; u < s.length - 1; u++) {
4273
- const p = V(s[u]), m = V(s[u + 1]);
4274
- (!(p in l) || typeof l[p] != "object" || l[p] === null) && (l[p] = /^\d+$/.test(m) ? [] : {}), l = l[p];
3787
+ for (let u = 0; u < i.length - 1; u++) {
3788
+ const p = V(i[u]), g = V(i[u + 1]);
3789
+ (!(p in l) || typeof l[p] != "object" || l[p] === null) && (l[p] = /^\d+$/.test(g) ? [] : {}), l = l[p];
4275
3790
  }
4276
- return l[V(s[s.length - 1])] = o, r;
3791
+ return l[V(i[i.length - 1])] = o, r;
4277
3792
  }, {});
4278
3793
  }
4279
- const Ne = (e, a) => {
3794
+ const Ee = (e, a) => {
4280
3795
  const r = e ? a.components[e] : void 0;
4281
3796
  if (r) return r.component;
4282
3797
  if (a.fallback === "error")
@@ -4284,84 +3799,84 @@ const Ne = (e, a) => {
4284
3799
  `Bonsai: unknown component type "${e}" in registry "${a.id}"@"${a.version}"`
4285
3800
  );
4286
3801
  return a.fallback && a.fallback !== "div" ? a.fallback : "div";
4287
- }, he = (e, a, r, n = {}) => {
3802
+ }, me = (e, a, r, n = {}) => {
4288
3803
  const o = { key: r, ...e?.args, ...n };
4289
- return Object.keys(o).forEach((s) => {
4290
- o[s] = B(o[s], a);
3804
+ return Object.keys(o).forEach((i) => {
3805
+ o[i] = D(o[i], a);
4291
3806
  }), o;
4292
3807
  };
4293
- function ti(e, a, r, n, o) {
3808
+ function Go(e, a, r, n, o) {
4294
3809
  return n[e.changeProp] ? {} : {
4295
- [e.changeProp]: (s) => o(a, e.extract(s)),
3810
+ [e.changeProp]: (i) => o(a, e.extract(i)),
4296
3811
  [e.valueProp]: r
4297
3812
  };
4298
3813
  }
4299
- function ya({
3814
+ function va({
4300
3815
  tree: e,
4301
3816
  dataSlice: a,
4302
3817
  elementKey: r,
4303
3818
  ElementType: n,
4304
3819
  ctrlInput: o,
4305
- keyPath: s,
3820
+ keyPath: i,
4306
3821
  storeValue: l,
4307
3822
  updateData: u,
4308
3823
  children: p
4309
3824
  }) {
4310
- const m = ti(
3825
+ const g = Go(
4311
3826
  o,
4312
- s,
3827
+ i,
4313
3828
  l,
4314
3829
  e.args ?? {},
4315
3830
  u
4316
- ), x = he(e, a, r, m);
4317
- return p !== void 0 ? M(n, x, p) : M(n, x);
3831
+ ), x = me(e, a, r, g);
3832
+ return p !== void 0 ? F(n, x, p) : F(n, x);
4318
3833
  }
4319
- function wa(e, a, r) {
3834
+ function ya(e, a, r) {
4320
3835
  const n = r.components[e]?.controlled;
4321
3836
  if (n) {
4322
3837
  if (typeof n == "object" && "default" in n) {
4323
- const o = a?.args?.type || "default", s = n;
4324
- return s[o] || s.default;
3838
+ const o = a?.args?.type || "default", i = n;
3839
+ return i[o] || i.default;
4325
3840
  }
4326
3841
  return n;
4327
3842
  }
4328
3843
  }
4329
- function ai(e) {
3844
+ function Wo(e) {
4330
3845
  if (typeof e != "string") {
4331
3846
  const a = e?.type;
4332
- if (a === i.EACH || a === i.IF) return !1;
3847
+ if (a === s.EACH || a === s.IF) return !1;
4333
3848
  }
4334
- return _e(e).length === 0;
3849
+ return Ne(e).length === 0;
4335
3850
  }
4336
- const ri = Ae(
3851
+ const Vo = Ae(
4337
3852
  ({ tree: e, index: a = 0, path: r = "root", scope: n, indexScope: o }) => {
4338
- const s = me(ie);
3853
+ const i = oe(ie);
4339
3854
  if (!e) return null;
4340
3855
  if (typeof e == "string")
4341
3856
  return e;
4342
3857
  try {
4343
- const l = e.type || "div", u = Ne(l, s), p = j(e, a, r), m = he(e, {}, p);
4344
- if (l === i.IMAGE && (m.src === "" || m.src == null))
3858
+ const l = e.type || "div", u = Ee(l, i), p = L(e, a, r), g = me(e, {}, p);
3859
+ if (l === s.IMAGE && (g.src === "" || g.src == null))
4345
3860
  return null;
4346
3861
  const x = e.children && e.children.length > 0 ? e.children.map(
4347
- (A, I) => te(
4348
- A,
4349
- I,
3862
+ (w, z) => Q(
3863
+ w,
3864
+ z,
4350
3865
  `${r}-${a}`,
4351
3866
  n,
4352
3867
  o,
4353
- j(e, I, `${r}-${a}`)
3868
+ L(e, z, `${r}-${a}`)
4354
3869
  )
4355
- ) : void 0, v = typeof u == "string" && Se.has(u) ? void 0 : x;
4356
- return v !== void 0 ? M(u, m, v) : M(u, m);
3870
+ ) : void 0, v = typeof u == "string" && Re.has(u) ? void 0 : x;
3871
+ return v !== void 0 ? F(u, g, v) : F(u, g);
4357
3872
  } catch (l) {
4358
3873
  return console.error(`Error at ${r}-${a}:`, l), null;
4359
3874
  }
4360
3875
  }
4361
3876
  );
4362
- function te(e, a, r, n, o, s) {
4363
- return ai(e) ? /* @__PURE__ */ d(
4364
- ri,
3877
+ function Q(e, a, r, n, o, i) {
3878
+ return Wo(e) ? /* @__PURE__ */ d(
3879
+ Vo,
4365
3880
  {
4366
3881
  tree: e,
4367
3882
  index: a,
@@ -4369,9 +3884,9 @@ function te(e, a, r, n, o, s) {
4369
3884
  scope: n,
4370
3885
  indexScope: o
4371
3886
  },
4372
- s
3887
+ i
4373
3888
  ) : /* @__PURE__ */ d(
4374
- ni,
3889
+ qo,
4375
3890
  {
4376
3891
  tree: e,
4377
3892
  index: a,
@@ -4379,197 +3894,197 @@ function te(e, a, r, n, o, s) {
4379
3894
  scope: n,
4380
3895
  indexScope: o
4381
3896
  },
4382
- s
3897
+ i
4383
3898
  );
4384
3899
  }
4385
3900
  const pe = Ae(
4386
3901
  ({ tree: e, index: a = 0, path: r = "root", data: n, scope: o }) => {
4387
- const s = me(ie), l = Qt(() => _e(e ?? ""), [e]), u = we(() => {
3902
+ const i = oe(ie), l = Zt(() => Ne(e ?? ""), [e]), u = ye(() => {
4388
3903
  }, []);
4389
3904
  if (!e) return null;
4390
- const p = va(l, (m) => m in n && m !== "data" ? n[m] : re(n.data ?? n, m));
3905
+ const p = xa(l, (g) => g in n && g !== "data" ? n[g] : re(n.data ?? n, g));
4391
3906
  if (typeof e == "string")
4392
- return B(e, p);
3907
+ return D(e, p);
4393
3908
  try {
4394
- const m = e.type || "div";
4395
- if (m === i.IF)
4396
- return B(e.args.condition, p) ? /* @__PURE__ */ d(F, { children: (e.children ?? []).map((_, y) => /* @__PURE__ */ d(
3909
+ const g = e.type || "div";
3910
+ if (g === s.IF)
3911
+ return D(e.args.condition, p) ? /* @__PURE__ */ d(M, { children: (e.children ?? []).map((_, T) => /* @__PURE__ */ d(
4397
3912
  pe,
4398
3913
  {
4399
3914
  tree: _,
4400
- index: y,
3915
+ index: T,
4401
3916
  path: `${r}-${a}-if`,
4402
3917
  data: n,
4403
3918
  scope: o
4404
3919
  },
4405
- j(_, y, `${r}-${a}-if`)
3920
+ L(_, T, `${r}-${a}-if`)
4406
3921
  )) }) : null;
4407
- if (m === i.EACH) {
4408
- const { as: S, index: _, key: y } = e.args, w = B(e.args.items, p), z = Array.isArray(w) ? w : [], N = typeof e.args.items == "string" && e.args.items.startsWith("{{") && e.args.items.endsWith("}}") ? e.args.items.slice(2, -2).trim() : "", P = N ? ne(N, o) : "";
4409
- return /* @__PURE__ */ d(F, { children: z.map((W, X) => {
4410
- const fe = {
3922
+ if (g === s.EACH) {
3923
+ const { as: C, index: _, key: T } = e.args, y = D(e.args.items, p), R = Array.isArray(y) ? y : [], $ = typeof e.args.items == "string" && e.args.items.startsWith("{{") && e.args.items.endsWith("}}") ? e.args.items.slice(2, -2).trim() : "", J = $ ? ne($, o) : "";
3924
+ return /* @__PURE__ */ d(M, { children: R.map((H, U) => {
3925
+ const he = {
4411
3926
  ...n,
4412
3927
  data: {
4413
3928
  ...n.data ?? n,
4414
- [S]: W,
4415
- ..._ ? { [_]: X } : {}
3929
+ [C]: H,
3930
+ ..._ ? { [_]: U } : {}
4416
3931
  }
4417
- }, K = P ? { ...o, [S]: `${P}.${X}` } : o, se = y ? B(y, { ...p, [S]: W }) : X, de = `${r}-${a}-each-${se}`;
4418
- return /* @__PURE__ */ d(ea, { children: (e.children ?? []).map((Z, Q) => /* @__PURE__ */ d(
3932
+ }, X = J ? { ...o, [C]: `${J}.${U}` } : o, de = T ? D(T, { ...p, [C]: H }) : U, le = `${r}-${a}-each-${de}`;
3933
+ return /* @__PURE__ */ d(Qt, { children: (e.children ?? []).map((K, Y) => /* @__PURE__ */ d(
4419
3934
  pe,
4420
3935
  {
4421
- tree: Z,
4422
- index: Q,
4423
- path: de,
4424
- data: fe,
4425
- scope: K
3936
+ tree: K,
3937
+ index: Y,
3938
+ path: le,
3939
+ data: he,
3940
+ scope: X
4426
3941
  },
4427
- j(Z, Q, de)
4428
- )) }, String(se));
3942
+ L(K, Y, le)
3943
+ )) }, String(de));
4429
3944
  }) });
4430
3945
  }
4431
- const x = Ne(m, s), v = j(e, a, r), A = wa(m, e, s);
4432
- let I;
4433
- if (A) {
4434
- const S = e.args[A.valueProp];
4435
- if (typeof S == "string" && S.startsWith("{{") && S.endsWith("}}")) {
4436
- const _ = S.slice(2, -2).trim(), y = ne(_, o);
4437
- I = {
4438
- keyPath: y,
4439
- storeValue: re(n.data ?? n, y)
3946
+ const x = Ee(g, i), v = L(e, a, r), w = ya(g, e, i);
3947
+ let z;
3948
+ if (w) {
3949
+ const C = e.args[w.valueProp];
3950
+ if (typeof C == "string" && C.startsWith("{{") && C.endsWith("}}")) {
3951
+ const _ = C.slice(2, -2).trim(), T = ne(_, o);
3952
+ z = {
3953
+ keyPath: T,
3954
+ storeValue: re(n.data ?? n, T)
4440
3955
  };
4441
3956
  }
4442
3957
  }
4443
- if (m === i.IMAGE) {
4444
- const S = B(e.args?.src, p);
4445
- if (S === "" || S == null) return null;
3958
+ if (g === s.IMAGE) {
3959
+ const C = D(e.args?.src, p);
3960
+ if (C === "" || C == null) return null;
4446
3961
  }
4447
- const E = e.children && e.children.length > 0 ? e.children.map((S, _) => /* @__PURE__ */ d(
3962
+ const O = e.children && e.children.length > 0 ? e.children.map((C, _) => /* @__PURE__ */ d(
4448
3963
  pe,
4449
3964
  {
4450
- tree: S,
3965
+ tree: C,
4451
3966
  index: _,
4452
3967
  path: `${r}-${a}`,
4453
3968
  data: n,
4454
3969
  scope: o
4455
3970
  },
4456
- j(e, _, `${r}-${a}`)
4457
- )) : void 0, O = typeof x == "string" && Se.has(x) ? void 0 : E;
4458
- if (I && A)
3971
+ L(e, _, `${r}-${a}`)
3972
+ )) : void 0, E = typeof x == "string" && Re.has(x) ? void 0 : O;
3973
+ if (z && w)
4459
3974
  return /* @__PURE__ */ d(
4460
- ya,
3975
+ va,
4461
3976
  {
4462
3977
  tree: e,
4463
3978
  dataSlice: p,
4464
3979
  elementKey: v,
4465
3980
  ElementType: x,
4466
- ctrlInput: A,
4467
- keyPath: I.keyPath,
4468
- storeValue: I.storeValue,
3981
+ ctrlInput: w,
3982
+ keyPath: z.keyPath,
3983
+ storeValue: z.storeValue,
4469
3984
  updateData: u,
4470
- children: O
3985
+ children: E
4471
3986
  }
4472
3987
  );
4473
- const G = he(e, p, v);
4474
- return O !== void 0 ? M(x, G, O) : M(x, G);
4475
- } catch (m) {
4476
- return console.error(`Error at ${r}-${a}:`, m), null;
3988
+ const G = me(e, p, v);
3989
+ return E !== void 0 ? F(x, G, E) : F(x, G);
3990
+ } catch (g) {
3991
+ return console.error(`Error at ${r}-${a}:`, g), null;
4477
3992
  }
4478
3993
  }
4479
- ), ni = Ae(
3994
+ ), qo = Ae(
4480
3995
  ({ tree: e, index: a = 0, path: r = "root", scope: n, indexScope: o }) => {
4481
- const s = me(ie), l = ke(), u = za(l, { sync: !0 }), p = Ko(), m = Qt(() => _e(e ?? ""), [e]);
3996
+ const i = oe(ie), l = Se(), u = Aa(l, { sync: !0 }), p = jo(), g = Zt(() => Ne(e ?? ""), [e]);
4482
3997
  if (!e) return null;
4483
- const x = va(
4484
- m,
4485
- (v) => ei(v, u, n, o)
3998
+ const x = xa(
3999
+ g,
4000
+ (v) => Fo(v, u, n, o)
4486
4001
  );
4487
4002
  if (typeof e == "string")
4488
- return B(e, x);
4003
+ return D(e, x);
4489
4004
  try {
4490
4005
  const v = e.type || "div";
4491
- if (v === i.IF)
4492
- return B(e.args.condition, x) ? /* @__PURE__ */ d(F, { children: (e.children ?? []).map(
4493
- (w, z) => te(
4494
- w,
4495
- z,
4006
+ if (v === s.IF)
4007
+ return D(e.args.condition, x) ? /* @__PURE__ */ d(M, { children: (e.children ?? []).map(
4008
+ (y, R) => Q(
4009
+ y,
4010
+ R,
4496
4011
  `${r}-${a}-if`,
4497
4012
  n,
4498
4013
  o,
4499
- j(w, z, `${r}-${a}-if`)
4014
+ L(y, R, `${r}-${a}-if`)
4500
4015
  )
4501
4016
  ) }) : null;
4502
- if (v === i.EACH) {
4503
- const { as: y, index: w, key: z } = e.args, N = B(e.args.items, x), P = Array.isArray(N) ? N : [], W = typeof e.args.items == "string" && e.args.items.startsWith("{{") && e.args.items.endsWith("}}") ? e.args.items.slice(2, -2).trim() : "", X = W ? ne(W, n) : "";
4504
- return /* @__PURE__ */ d(F, { children: P.map((fe, K) => {
4505
- const se = X ? { ...n, [y]: `${X}.${K}` } : n, de = w ? { ...o, [w]: K } : o, Z = z ? B(z, { ...x, [y]: fe }) : K, Q = `${r}-${a}-each-${Z}`;
4506
- return /* @__PURE__ */ d(ea, { children: (e.children ?? []).map(
4507
- (Pe, Ee) => te(
4017
+ if (v === s.EACH) {
4018
+ const { as: T, index: y, key: R } = e.args, $ = D(e.args.items, x), J = Array.isArray($) ? $ : [], H = typeof e.args.items == "string" && e.args.items.startsWith("{{") && e.args.items.endsWith("}}") ? e.args.items.slice(2, -2).trim() : "", U = H ? ne(H, n) : "";
4019
+ return /* @__PURE__ */ d(M, { children: J.map((he, X) => {
4020
+ const de = U ? { ...n, [T]: `${U}.${X}` } : n, le = y ? { ...o, [y]: X } : o, K = R ? D(R, { ...x, [T]: he }) : X, Y = `${r}-${a}-each-${K}`;
4021
+ return /* @__PURE__ */ d(Qt, { children: (e.children ?? []).map(
4022
+ (Pe, Oe) => Q(
4508
4023
  Pe,
4509
- Ee,
4510
- Q,
4511
- se,
4024
+ Oe,
4025
+ Y,
4512
4026
  de,
4513
- j(Pe, Ee, Q)
4027
+ le,
4028
+ L(Pe, Oe, Y)
4514
4029
  )
4515
- ) }, String(Z));
4030
+ ) }, String(K));
4516
4031
  }) });
4517
4032
  }
4518
- const A = Ne(v, s), I = j(e, a, r), E = wa(v, e, s);
4519
- let O;
4520
- if (E) {
4521
- const y = e.args[E.valueProp];
4522
- if (typeof y == "string" && y.startsWith("{{") && y.endsWith("}}")) {
4523
- const w = y.slice(2, -2).trim(), z = ne(w, n);
4524
- O = {
4525
- keyPath: z,
4526
- storeValue: re(u.data ?? u, z)
4033
+ const w = Ee(v, i), z = L(e, a, r), O = ya(v, e, i);
4034
+ let E;
4035
+ if (O) {
4036
+ const T = e.args[O.valueProp];
4037
+ if (typeof T == "string" && T.startsWith("{{") && T.endsWith("}}")) {
4038
+ const y = T.slice(2, -2).trim(), R = ne(y, n);
4039
+ E = {
4040
+ keyPath: R,
4041
+ storeValue: re(u.data ?? u, R)
4527
4042
  };
4528
4043
  }
4529
4044
  }
4530
- if (v === i.IMAGE) {
4531
- const y = B(e.args?.src, x);
4532
- if (y === "" || y == null) return null;
4045
+ if (v === s.IMAGE) {
4046
+ const T = D(e.args?.src, x);
4047
+ if (T === "" || T == null) return null;
4533
4048
  }
4534
4049
  const G = e.children && e.children.length > 0 ? e.children.map(
4535
- (y, w) => te(
4050
+ (T, y) => Q(
4051
+ T,
4536
4052
  y,
4537
- w,
4538
4053
  `${r}-${a}`,
4539
4054
  n,
4540
4055
  o,
4541
- j(e, w, `${r}-${a}`)
4056
+ L(e, y, `${r}-${a}`)
4542
4057
  )
4543
- ) : void 0, S = typeof A == "string" && Se.has(A) ? void 0 : G;
4544
- if (O && E)
4058
+ ) : void 0, C = typeof w == "string" && Re.has(w) ? void 0 : G;
4059
+ if (E && O)
4545
4060
  return /* @__PURE__ */ d(
4546
- ya,
4061
+ va,
4547
4062
  {
4548
4063
  tree: e,
4549
4064
  dataSlice: x,
4550
- elementKey: I,
4551
- ElementType: A,
4552
- ctrlInput: E,
4553
- keyPath: O.keyPath,
4554
- storeValue: O.storeValue,
4065
+ elementKey: z,
4066
+ ElementType: w,
4067
+ ctrlInput: O,
4068
+ keyPath: E.keyPath,
4069
+ storeValue: E.storeValue,
4555
4070
  updateData: p,
4556
- children: S
4071
+ children: C
4557
4072
  }
4558
4073
  );
4559
- const _ = he(e, x, I);
4560
- return S !== void 0 ? M(A, _, S) : M(A, _);
4074
+ const _ = me(e, x, z);
4075
+ return C !== void 0 ? F(w, _, C) : F(w, _);
4561
4076
  } catch (v) {
4562
4077
  return console.error(`Error at ${r}-${a}:`, v), null;
4563
4078
  }
4564
4079
  }
4565
4080
  );
4566
- function oi({
4081
+ function Mo({
4567
4082
  template: e,
4568
4083
  expiry: a,
4569
4084
  data: r,
4570
4085
  status: n = "pending",
4571
4086
  render: o = "web",
4572
- registry: s
4087
+ registry: i
4573
4088
  }) {
4574
4089
  const u = /* @__PURE__ */ d(pe, { tree: e, index: 0, path: "root", data: {
4575
4090
  data: r ?? {},
@@ -4577,15 +4092,15 @@ function oi({
4577
4092
  status: n,
4578
4093
  submitting: !1
4579
4094
  } });
4580
- return /* @__PURE__ */ d(ie.Provider, { value: s ?? Ce, children: o === "pdf" ? /* @__PURE__ */ d("div", { "data-mode": o, className: "group bonsai-root w-full", children: u }) : /* @__PURE__ */ d("form", { "data-mode": o, className: "group bonsai-root", children: u }) });
4095
+ return /* @__PURE__ */ d(ie.Provider, { value: i ?? Ce, children: /* @__PURE__ */ d(ke.Provider, { value: o, children: o === "pdf" ? /* @__PURE__ */ d("div", { "data-mode": o, className: "group bonsai-root w-full", children: u }) : /* @__PURE__ */ d("form", { "data-mode": o, className: "group bonsai-root", children: u }) }) });
4581
4096
  }
4582
- function ii({
4097
+ function Jo({
4583
4098
  captureUrl: e,
4584
4099
  template: a,
4585
4100
  render: r = "web",
4586
4101
  registry: n
4587
4102
  }) {
4588
- const o = ke(), s = async (u) => {
4103
+ const o = Se(), i = async (u) => {
4589
4104
  if (u.preventDefault(), o.status !== "pending") {
4590
4105
  o.submitting = !0;
4591
4106
  return;
@@ -4605,22 +4120,22 @@ function ii({
4605
4120
  } finally {
4606
4121
  o.submitting = !1;
4607
4122
  }
4608
- }, l = te(a, 0, "root", void 0, void 0, "root-0");
4609
- return /* @__PURE__ */ d(ie.Provider, { value: n ?? Ce, children: r === "pdf" ? /* @__PURE__ */ d("div", { "data-mode": r, className: "group bonsai-root w-full", children: l }) : /* @__PURE__ */ d("form", { "data-mode": r, className: "group bonsai-root", onSubmit: s, children: l }) });
4123
+ }, l = Q(a, 0, "root", void 0, void 0, "root-0");
4124
+ return /* @__PURE__ */ d(ie.Provider, { value: n ?? Ce, children: /* @__PURE__ */ d(ke.Provider, { value: r, children: r === "pdf" ? /* @__PURE__ */ d("div", { "data-mode": r, className: "group bonsai-root w-full", children: l }) : /* @__PURE__ */ d("form", { "data-mode": r, className: "group bonsai-root", onSubmit: i, children: l }) }) });
4610
4125
  }
4611
- function Zi(e) {
4612
- return typeof window > "u" ? /* @__PURE__ */ d(oi, { ...e }) : /* @__PURE__ */ d(si, { ...e });
4126
+ function $s(e) {
4127
+ return typeof window > "u" ? /* @__PURE__ */ d(Mo, { ...e }) : /* @__PURE__ */ d(Xo, { ...e });
4613
4128
  }
4614
- function si(e) {
4615
- const a = q(null);
4616
- return a.current === null && (a.current = Ia({
4129
+ function Xo(e) {
4130
+ const a = W(null);
4131
+ return a.current === null && (a.current = za({
4617
4132
  status: e.status ?? "pending",
4618
4133
  expiry: e.expiry ?? "",
4619
4134
  data: e.data ?? {},
4620
4135
  submitting: !1
4621
- })), /* @__PURE__ */ d(xa.Provider, { value: a.current, children: /* @__PURE__ */ d(ii, { ...e }) });
4136
+ })), /* @__PURE__ */ d(ba.Provider, { value: a.current, children: /* @__PURE__ */ d(Jo, { ...e }) });
4622
4137
  }
4623
- function di(e, a) {
4138
+ function Ko(e, a) {
4624
4139
  if (!e)
4625
4140
  return { action: "render", reason: "no-pin" };
4626
4141
  if (e.id !== a.id)
@@ -4636,116 +4151,120 @@ function di(e, a) {
4636
4151
  warning: r ? `Template is pinned to registry "${e.id}"@"${e.version}" (manifest ${e.manifestHash}), but the resolved manifest is now ${a.manifestHash}. Re-pin on next save.` : `Template is pinned to registry "${e.id}"@"${e.version}", but rendering registry is "${e.id}"@"${a.version}". Re-pin on next save.`
4637
4152
  };
4638
4153
  }
4639
- const li = [i.EACH, i.IF];
4640
- function ci(e, a) {
4154
+ const Yo = [s.EACH, s.IF];
4155
+ function Zo(e, a) {
4641
4156
  return e.capabilities ? a === "pdf" ? e.capabilities.includes("pdf") : e.capabilities.includes("ssr") : !0;
4642
4157
  }
4643
- function xe(e, a, r, n, o) {
4158
+ function be(e, a, r, n, o) {
4644
4159
  if (e == null || typeof e == "string") return;
4645
- const s = e.type;
4646
- if (!s) {
4160
+ const i = e.type;
4161
+ if (!i) {
4647
4162
  o.push({ path: a, message: "Node is missing a required `type` field" });
4648
4163
  return;
4649
4164
  }
4650
- if (li.includes(s)) {
4165
+ if (Yo.includes(i)) {
4651
4166
  (e.children ?? []).forEach(
4652
- (p, m) => xe(p, `${a}.children[${m}]`, r, n, o)
4167
+ (p, g) => be(p, `${a}.children[${g}]`, r, n, o)
4653
4168
  );
4654
4169
  return;
4655
4170
  }
4656
- const l = r.components[s];
4171
+ const l = r.components[i];
4657
4172
  if (!l) {
4658
4173
  o.push({
4659
4174
  path: a,
4660
- componentType: s,
4661
- message: `Unknown component type "${s}" in registry "${r.id}"@"${r.version}"`
4175
+ componentType: i,
4176
+ message: `Unknown component type "${i}" in registry "${r.id}"@"${r.version}"`
4662
4177
  });
4663
4178
  return;
4664
4179
  }
4665
- if (ci(l, n) || o.push({
4180
+ if (Zo(l, n) || o.push({
4666
4181
  path: a,
4667
- componentType: s,
4668
- message: `Component "${s}" in registry "${r.id}"@"${r.version}" does not support "${n}" rendering`
4182
+ componentType: i,
4183
+ message: `Component "${i}" in registry "${r.id}"@"${r.version}" does not support "${n}" rendering`
4669
4184
  }), l.propsSchema) {
4670
4185
  const p = l.propsSchema.safeParse(e.args);
4671
4186
  if (!p.success)
4672
- for (const m of p.error.issues) {
4673
- const x = m.path.length ? `${a}.args.${m.path.join(".")}` : `${a}.args`;
4674
- o.push({ path: x, componentType: s, message: m.message });
4187
+ for (const g of p.error.issues) {
4188
+ const x = g.path.length ? `${a}.args.${g.path.join(".")}` : `${a}.args`;
4189
+ o.push({ path: x, componentType: i, message: g.message });
4675
4190
  }
4676
4191
  }
4677
4192
  (e.children?.length ?? 0) > 0 && (l.capabilities && !l.capabilities.includes("children") && o.push({
4678
4193
  path: a,
4679
- componentType: s,
4680
- message: `Component "${s}" in registry "${r.id}"@"${r.version}" does not accept children`
4194
+ componentType: i,
4195
+ message: `Component "${i}" in registry "${r.id}"@"${r.version}" does not accept children`
4681
4196
  }), (e.children ?? []).forEach(
4682
- (p, m) => xe(p, `${a}.children[${m}]`, r, n, o)
4197
+ (p, g) => be(p, `${a}.children[${g}]`, r, n, o)
4683
4198
  ));
4684
4199
  }
4685
- function Qi(e, a, r = {}) {
4200
+ function Hs(e, a, r = {}) {
4686
4201
  const n = [], o = [];
4687
4202
  if (r.pin) {
4688
- const s = di(r.pin, a);
4689
- if (s.action === "fail")
4690
- return n.push({ path: "root", message: s.error }), { valid: !1, errors: n, warnings: o };
4691
- s.reason === "version-skew" && o.push(s.warning);
4203
+ const i = Ko(r.pin, a);
4204
+ if (i.action === "fail")
4205
+ return n.push({ path: "root", message: i.error }), { valid: !1, errors: n, warnings: o };
4206
+ i.reason === "version-skew" && o.push(i.warning);
4692
4207
  }
4693
- return xe(e, "root", a, r.mode ?? "web", n), { valid: n.length === 0, errors: n, warnings: o };
4208
+ return be(e, "root", a, r.mode ?? "web", n), { valid: n.length === 0, errors: n, warnings: o };
4694
4209
  }
4695
- function ve(e) {
4210
+ const Qo = t.string().refine((e) => e.startsWith("{{") && e.endsWith("}}"), {
4211
+ message: 'Expected a value of the declared type, or a "{{binding}}" expression'
4212
+ });
4213
+ function xe(e, a = {}) {
4214
+ const r = (o) => a.allowBindings ? t.union([Qo, o]) : o;
4696
4215
  if ("const" in e)
4697
- return t.literal(e.const);
4216
+ return r(t.literal(e.const));
4698
4217
  if (Array.isArray(e.enum)) {
4699
- const r = e.enum;
4700
- if (r.length === 0)
4218
+ const o = e.enum;
4219
+ if (o.length === 0)
4701
4220
  throw new Error("jsonSchemaToZod: enum must have at least one value");
4702
- const [n, ...o] = r;
4703
- return o.reduce((s, l) => t.union([s, t.literal(l)]), t.literal(n));
4221
+ const [i, ...l] = o;
4222
+ return r(l.reduce((u, p) => t.union([u, t.literal(p)]), t.literal(i)));
4704
4223
  }
4705
- const a = e.type;
4706
- switch (a) {
4224
+ const n = e.type;
4225
+ switch (n) {
4707
4226
  case "string": {
4708
- let r = t.string();
4709
- return typeof e.minLength == "number" && (r = r.min(e.minLength)), typeof e.maxLength == "number" && (r = r.max(e.maxLength)), typeof e.pattern == "string" && (r = r.regex(new RegExp(e.pattern))), r;
4227
+ let o = t.string();
4228
+ return typeof e.minLength == "number" && (o = o.min(e.minLength)), typeof e.maxLength == "number" && (o = o.max(e.maxLength)), typeof e.pattern == "string" && (o = o.regex(new RegExp(e.pattern))), r(o);
4710
4229
  }
4711
4230
  case "number":
4712
4231
  case "integer": {
4713
- let r = t.number();
4714
- return a === "integer" && (r = r.int()), typeof e.minimum == "number" && (r = r.min(e.minimum)), typeof e.maximum == "number" && (r = r.max(e.maximum)), r;
4232
+ let o = t.number();
4233
+ return n === "integer" && (o = o.int()), typeof e.minimum == "number" && (o = o.min(e.minimum)), typeof e.maximum == "number" && (o = o.max(e.maximum)), r(o);
4715
4234
  }
4716
4235
  case "boolean":
4717
- return t.boolean();
4236
+ return r(t.boolean());
4718
4237
  case "array": {
4719
- const r = e.items ? ve(e.items) : t.unknown();
4720
- return t.array(r);
4238
+ const o = e.items ? xe(e.items, a) : t.unknown();
4239
+ return r(t.array(o));
4721
4240
  }
4722
4241
  case "object": {
4723
- const r = e.properties ?? {}, n = new Set(e.required ?? []), o = {};
4724
- for (const [l, u] of Object.entries(r)) {
4725
- const p = ve(u);
4726
- o[l] = n.has(l) ? p : p.optional();
4242
+ const o = e.properties ?? {}, i = new Set(e.required ?? []), l = {};
4243
+ for (const [p, g] of Object.entries(o)) {
4244
+ const x = xe(g, a);
4245
+ l[p] = i.has(p) ? x : x.optional();
4727
4246
  }
4728
- let s = t.object(o);
4729
- return e.additionalProperties === !1 && (s = s.strict()), s;
4247
+ let u = t.object(l);
4248
+ return e.additionalProperties === !1 && (u = u.strict()), u;
4730
4249
  }
4731
4250
  default:
4732
4251
  return t.unknown();
4733
4252
  }
4734
4253
  }
4735
- const ui = t.object({
4254
+ const es = t.object({
4736
4255
  valueProp: t.string().min(1),
4737
4256
  changeProp: t.string().min(1),
4738
4257
  extract: t.string().min(1)
4739
- }).strict(), pi = t.object({
4258
+ }).strict(), ts = t.object({
4740
4259
  name: t.string().min(1),
4741
4260
  canonicalName: t.string().min(1).optional(),
4742
4261
  // Case A: a key resolved against `base`'s exports, never a module path to import.
4743
4262
  entry: t.string().min(1),
4744
4263
  propsSchema: t.record(t.string(), t.unknown()).optional(),
4745
4264
  capabilities: t.array(t.enum(["children", "bindings", "events", "formField", "ssr", "pdf"])).optional(),
4746
- controlled: ui.optional(),
4265
+ controlled: es.optional(),
4747
4266
  css: t.array(t.string()).optional()
4748
- }).strict(), Aa = t.object({
4267
+ }).strict(), wa = t.object({
4749
4268
  $schema: t.string().optional(),
4750
4269
  id: t.string().min(1),
4751
4270
  namespace: t.string().min(1).optional(),
@@ -4754,86 +4273,86 @@ const ui = t.object({
4754
4273
  name: t.literal("bonsai"),
4755
4274
  api: t.string().min(1)
4756
4275
  }).strict(),
4757
- components: t.array(pi).min(1),
4276
+ components: t.array(ts).min(1),
4758
4277
  integrity: t.object({
4759
4278
  algorithm: t.literal("sha256"),
4760
4279
  manifestHash: t.string().min(1)
4761
4280
  }).strict().optional()
4762
- }).strict(), mi = "1", Yt = {
4281
+ }).strict(), as = "1", Kt = {
4763
4282
  identity: (e) => e,
4764
4283
  targetValue: (e) => e?.target?.value,
4765
4284
  targetChecked: (e) => e?.target?.checked,
4766
4285
  targetValueAsNumber: (e) => e?.target?.valueAsNumber
4767
4286
  };
4768
- class H extends Error {
4287
+ class j extends Error {
4769
4288
  constructor(a) {
4770
4289
  super(a), this.name = "ManifestLoadError";
4771
4290
  }
4772
4291
  }
4773
- function gi(e, a) {
4292
+ function rs(e, a) {
4774
4293
  return e ? a ? t.any().superRefine((r, n) => {
4775
4294
  const o = e.safeParse(r);
4776
4295
  if (!o.success)
4777
4296
  for (const l of o.error.issues)
4778
4297
  n.addIssue({ code: "custom", message: l.message, path: l.path });
4779
- const s = a.safeParse(r);
4780
- if (!s.success)
4781
- for (const l of s.error.issues)
4298
+ const i = a.safeParse(r);
4299
+ if (!i.success)
4300
+ for (const l of i.error.issues)
4782
4301
  n.addIssue({ code: "custom", message: l.message, path: l.path });
4783
4302
  }) : e : a;
4784
4303
  }
4785
- async function hi(e) {
4304
+ async function ns(e) {
4786
4305
  const a = new TextEncoder().encode(e), r = await crypto.subtle.digest("SHA-256", a);
4787
4306
  return `sha256:${Array.from(new Uint8Array(r)).map((o) => o.toString(16).padStart(2, "0")).join("")}`;
4788
4307
  }
4789
- function fi(e) {
4790
- const a = Yt[e];
4308
+ function os(e) {
4309
+ const a = Kt[e];
4791
4310
  if (!a)
4792
- throw new H(
4793
- `Registry manifest: unknown extractor "${e}" — must be one of: ${Object.keys(Yt).join(", ")}`
4311
+ throw new j(
4312
+ `Registry manifest: unknown extractor "${e}" — must be one of: ${Object.keys(Kt).join(", ")}`
4794
4313
  );
4795
4314
  return a;
4796
4315
  }
4797
- function bi(e, a, r) {
4316
+ function ss(e, a, r) {
4798
4317
  const n = a.components[e.entry];
4799
4318
  if (!n)
4800
- throw new H(
4319
+ throw new j(
4801
4320
  `Registry manifest "${r}": component "${e.name}" resolves entry "${e.entry}", which is not exported by base registry "${a.id}"@"${a.version}"`
4802
4321
  );
4803
- const o = e.propsSchema ? ve(e.propsSchema) : void 0, s = e.controlled ? {
4322
+ const o = e.propsSchema ? xe(e.propsSchema) : void 0, i = e.controlled ? {
4804
4323
  valueProp: e.controlled.valueProp,
4805
4324
  changeProp: e.controlled.changeProp,
4806
- extract: fi(e.controlled.extract)
4325
+ extract: os(e.controlled.extract)
4807
4326
  } : n.controlled;
4808
4327
  return [
4809
4328
  e.canonicalName ?? e.name,
4810
4329
  {
4811
4330
  component: n.component,
4812
- propsSchema: gi(n.propsSchema, o),
4331
+ propsSchema: rs(n.propsSchema, o),
4813
4332
  capabilities: e.capabilities ?? n.capabilities,
4814
- controlled: s,
4333
+ controlled: i,
4815
4334
  assets: e.css ? { css: e.css } : n.assets
4816
4335
  }
4817
4336
  ];
4818
4337
  }
4819
- function xi(e, a) {
4820
- const r = Aa.parse(e), n = a.engineApi ?? mi;
4338
+ function is(e, a) {
4339
+ const r = wa.parse(e), n = a.engineApi ?? as;
4821
4340
  if (r.engine.api !== n)
4822
- throw new H(
4341
+ throw new j(
4823
4342
  `Registry manifest "${r.id}" targets engine.api "${r.engine.api}", but this build supports "${n}"`
4824
4343
  );
4825
4344
  const o = a.maxComponents ?? 500;
4826
4345
  if (r.components.length > o)
4827
- throw new H(
4346
+ throw new j(
4828
4347
  `Registry manifest "${r.id}" declares ${r.components.length} components, exceeding the limit of ${o}`
4829
4348
  );
4830
- const s = a.maxManifestBytes ?? 5 * 1024 * 1024;
4831
- if (a.rawManifestSize != null && a.rawManifestSize > s)
4832
- throw new H(
4833
- `Registry manifest "${r.id}" is ${a.rawManifestSize} bytes, exceeding the limit of ${s}`
4349
+ const i = a.maxManifestBytes ?? 5 * 1024 * 1024;
4350
+ if (a.rawManifestSize != null && a.rawManifestSize > i)
4351
+ throw new j(
4352
+ `Registry manifest "${r.id}" is ${a.rawManifestSize} bytes, exceeding the limit of ${i}`
4834
4353
  );
4835
4354
  const l = Object.fromEntries(
4836
- r.components.map((u) => bi(u, a.base, r.id))
4355
+ r.components.map((u) => ss(u, a.base, r.id))
4837
4356
  );
4838
4357
  return {
4839
4358
  id: r.id,
@@ -4844,102 +4363,102 @@ function xi(e, a) {
4844
4363
  components: l
4845
4364
  };
4846
4365
  }
4847
- const ye = /* @__PURE__ */ new Map();
4848
- function es() {
4849
- ye.clear();
4366
+ const ve = /* @__PURE__ */ new Map();
4367
+ function Fs() {
4368
+ ve.clear();
4850
4369
  }
4851
- function vi(e, a) {
4370
+ function ds(e, a) {
4852
4371
  if (!e.integrity)
4853
- throw new H(
4372
+ throw new j(
4854
4373
  `Registry manifest "${e.id}" has no integrity block — a manifest hash is required before use`
4855
4374
  );
4856
4375
  if (e.integrity.manifestHash !== a)
4857
- throw new H(
4376
+ throw new j(
4858
4377
  `Registry manifest "${e.id}" failed its integrity check: expected "${e.integrity.manifestHash}", computed "${a}"`
4859
4378
  );
4860
4379
  }
4861
- async function ts(e, a) {
4380
+ async function Gs(e, a) {
4862
4381
  let r;
4863
4382
  if (typeof e == "string") {
4864
- const m = new URL(e);
4865
- if (a.allowedOrigins && !a.allowedOrigins.includes(m.origin))
4866
- throw new H(
4867
- `Registry manifest origin "${m.origin}" is not in the allowed origins list`
4383
+ const g = new URL(e);
4384
+ if (a.allowedOrigins && !a.allowedOrigins.includes(g.origin))
4385
+ throw new j(
4386
+ `Registry manifest origin "${g.origin}" is not in the allowed origins list`
4868
4387
  );
4869
4388
  const v = await (a.fetchImpl ?? fetch)(e);
4870
4389
  if (!v.ok)
4871
- throw new H(
4390
+ throw new j(
4872
4391
  `Registry manifest fetch failed: ${e} responded ${v.status}`
4873
4392
  );
4874
4393
  r = await v.text();
4875
4394
  } else
4876
4395
  r = JSON.stringify(e);
4877
- const n = Aa.parse(JSON.parse(r)), { integrity: o, ...s } = n, l = await hi(JSON.stringify(s));
4878
- vi(n, l);
4879
- const u = ye.get(l);
4396
+ const n = wa.parse(JSON.parse(r)), { integrity: o, ...i } = n, l = await ns(JSON.stringify(i));
4397
+ ds(n, l);
4398
+ const u = ve.get(l);
4880
4399
  if (u) return u;
4881
- const p = xi(n, { ...a, rawManifestSize: r.length, manifestHash: l });
4882
- return ye.set(l, p), p;
4400
+ const p = is(n, { ...a, rawManifestSize: r.length, manifestHash: l });
4401
+ return ve.set(l, p), p;
4883
4402
  }
4884
- function as(e, a) {
4403
+ function Ws(e, a) {
4885
4404
  const r = { ...e?.properties ?? {}, ...a?.properties ?? {} }, n = [.../* @__PURE__ */ new Set([...e?.required ?? [], ...a?.required ?? []])];
4886
4405
  return { type: "object", properties: r, required: n };
4887
4406
  }
4888
- function yi(e, a) {
4889
- const r = new Map(e.map((s) => [s.url, s.registryHash])), n = new Map(a.map((s) => [s.url, s.registryHash])), o = [];
4890
- for (const [s, l] of n) {
4891
- const u = r.get(s);
4892
- u === void 0 ? o.push(`${s} is configured but missing from the artifact`) : u !== l && o.push(`${s}: artifact has ${u}, pebble-kit.json records ${l}`);
4407
+ function ls(e, a) {
4408
+ const r = new Map(e.map((i) => [i.url, i.registryHash])), n = new Map(a.map((i) => [i.url, i.registryHash])), o = [];
4409
+ for (const [i, l] of n) {
4410
+ const u = r.get(i);
4411
+ u === void 0 ? o.push(`${i} is configured but missing from the artifact`) : u !== l && o.push(`${i}: artifact has ${u}, pebble-kit.json records ${l}`);
4893
4412
  }
4894
- for (const s of r.keys())
4895
- n.has(s) || o.push(`${s} is in the artifact but no longer configured`);
4413
+ for (const i of r.keys())
4414
+ n.has(i) || o.push(`${i} is in the artifact but no longer configured`);
4896
4415
  return o.length > 0 ? o.join("; ") : void 0;
4897
4416
  }
4898
- function Kt(e) {
4417
+ function Yt(e) {
4899
4418
  const a = /(\d+)\.\d+\.\d+/.exec(e);
4900
4419
  return a ? Number(a[1]) : void 0;
4901
4420
  }
4902
- function rs(e) {
4903
- const a = [], r = yi(e.artifactRegistries, e.configRegistries);
4421
+ function Vs(e) {
4422
+ const a = [], r = ls(e.artifactRegistries, e.configRegistries);
4904
4423
  if (r && a.push({
4905
4424
  check: "stale-artifact",
4906
4425
  level: "fail",
4907
4426
  message: `bonsai.generated.json is out of date with pebble-kit.json (${r}) — run "pebble-kit generate"`
4908
4427
  }), e.artifactBaseUiVersion !== e.installedBaseUiVersion) {
4909
- const n = Kt(e.artifactBaseUiVersion), o = Kt(e.installedBaseUiVersion), s = n !== void 0 && o !== void 0 && n !== o;
4428
+ const n = Yt(e.artifactBaseUiVersion), o = Yt(e.installedBaseUiVersion), i = n !== void 0 && o !== void 0 && n !== o;
4910
4429
  a.push({
4911
4430
  check: "baseui-drift",
4912
- level: s ? "fail" : "warn",
4431
+ level: i ? "fail" : "warn",
4913
4432
  message: `generated artifact's baseline was built against @base-ui/react ${e.artifactBaseUiVersion}, but ${e.installedBaseUiVersion} is installed`
4914
4433
  });
4915
4434
  }
4916
4435
  return a;
4917
4436
  }
4918
- function ns(e) {
4437
+ function qs(e) {
4919
4438
  const a = e.filter((r) => r.level === "fail");
4920
4439
  if (a.length > 0)
4921
4440
  throw new Error(a.map((r) => r.message).join("; "));
4922
4441
  }
4923
4442
  export {
4924
- Zi as Bonsai,
4925
- Yt as EXTRACTOR_ALLOWLIST,
4926
- H as ManifestLoadError,
4927
- Aa as RegistryManifestSchema,
4928
- ns as assertNoFailingDrift,
4929
- rs as checkArtifactDrift,
4930
- es as clearManifestCache,
4931
- Mt as componentMap,
4932
- gi as composePropsSchema,
4933
- hi as computeManifestHash,
4934
- Uo as controlledInputMap,
4935
- Ki as defineBonsaiRegistry,
4936
- Yi as defineComponent,
4937
- ve as jsonSchemaToZod,
4938
- ts as loadRegistryManifest,
4939
- as as mergeGeneratedWithOverrides,
4443
+ $s as Bonsai,
4444
+ Kt as EXTRACTOR_ALLOWLIST,
4445
+ j as ManifestLoadError,
4446
+ wa as RegistryManifestSchema,
4447
+ qs as assertNoFailingDrift,
4448
+ Vs as checkArtifactDrift,
4449
+ Fs as clearManifestCache,
4450
+ Vt as componentMap,
4451
+ rs as composePropsSchema,
4452
+ ns as computeManifestHash,
4453
+ To as controlledInputMap,
4454
+ js as defineBonsaiRegistry,
4455
+ Bs as defineComponent,
4456
+ xe as jsonSchemaToZod,
4457
+ Gs as loadRegistryManifest,
4458
+ Ws as mergeGeneratedWithOverrides,
4940
4459
  Ce as pebbleRegistry,
4941
- xi as resolveManifest,
4942
- di as resolveRegistryPin,
4943
- Ko as useUpdateData,
4944
- Qi as validateTemplate
4460
+ is as resolveManifest,
4461
+ Ko as resolveRegistryPin,
4462
+ jo as useUpdateData,
4463
+ Hs as validateTemplate
4945
4464
  };