@editora/ui-react 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,74 +1,57 @@
1
- function te(e, a, i = "top") {
2
- const o = typeof i == "string" ? { placement: i } : i, n = o.placement || "top", r = typeof o.offset == "number" ? o.offset : 8, f = !!o.shift, d = e.getBoundingClientRect(), s = a.getBoundingClientRect();
3
- let p = 0, x = 0;
4
- n === "top" ? (p = d.top - s.height - r, x = d.left + (d.width - s.width) / 2) : n === "bottom" ? (p = d.bottom + r, x = d.left + (d.width - s.width) / 2) : n === "left" ? (p = d.top + (d.height - s.height) / 2, x = d.left - s.width - r) : (p = d.top + (d.height - s.height) / 2, x = d.right + r);
5
- const m = d.left + d.width / 2, b = d.top + d.height / 2, y = Math.round(m - x), w = Math.round(b - p);
6
- if (f) {
7
- const k = window.innerWidth || document.documentElement.clientWidth, _ = window.innerHeight || document.documentElement.clientHeight;
8
- if (n === "top" || n === "bottom") {
9
- const v = k - s.width - 4;
10
- x < 4 && (x = Math.min(v, x + (4 - x))), x > v && (x = Math.max(4, x - (x - v)));
11
- } else {
12
- const v = _ - s.height - 4;
13
- p < 4 && (p = Math.min(v, p + (4 - p))), p > v && (p = Math.max(4, p - (p - v)));
14
- }
15
- }
16
- return { top: p, left: x, placement: n, x: y, y: w };
17
- }
18
1
  function Fa() {
19
2
  return typeof window < "u" && typeof document < "u";
20
3
  }
21
- function Qa(e) {
4
+ function Wa(e) {
22
5
  return e ? typeof e == "string" ? e : e instanceof Error && e.message ? e.message : "Something went wrong. Please try again." : "Something went wrong. Please try again.";
23
6
  }
24
7
  function $a(e) {
25
8
  return e === "replace" || e === "stack" ? e : "queue";
26
9
  }
27
- function Ba(e) {
10
+ function Va(e) {
28
11
  return `ui-alert-dialog-${e}`;
29
12
  }
30
- function Na(e, a) {
31
- var i, o;
32
- const n = e.kind === "alert" && a.action === "cancel" ? "dismiss" : a.action, r = (i = e.dialog) == null ? void 0 : i.getChecked();
13
+ function Ka(e, a) {
14
+ var i, r;
15
+ const t = e.kind === "alert" && a.action === "cancel" ? "dismiss" : a.action, o = (i = e.dialog) == null ? void 0 : i.getChecked();
33
16
  if (e.kind === "prompt") {
34
- const f = ((o = e.dialog) == null ? void 0 : o.getInputValue()) ?? e.value ?? "";
17
+ const c = ((r = e.dialog) == null ? void 0 : r.getInputValue()) ?? e.value ?? "";
35
18
  return {
36
19
  id: e.id,
37
- action: n,
38
- value: f,
39
- checked: r,
20
+ action: t,
21
+ value: c,
22
+ checked: o,
40
23
  source: a.source,
41
24
  reason: a.reason
42
25
  };
43
26
  }
44
27
  return {
45
28
  id: e.id,
46
- action: n,
29
+ action: t,
47
30
  value: e.value,
48
- checked: r,
31
+ checked: o,
49
32
  source: a.source,
50
33
  reason: a.reason
51
34
  };
52
35
  }
53
36
  function ba(e, a, i) {
54
- var o, n, r;
37
+ var r, t, o;
55
38
  return e.kind === "prompt" ? {
56
39
  id: e.id,
57
40
  action: "dismiss",
58
- value: ((o = e.dialog) == null ? void 0 : o.getInputValue()) ?? e.value ?? "",
59
- checked: (n = e.dialog) == null ? void 0 : n.getChecked(),
41
+ value: ((r = e.dialog) == null ? void 0 : r.getInputValue()) ?? e.value ?? "",
42
+ checked: (t = e.dialog) == null ? void 0 : t.getChecked(),
60
43
  source: a,
61
44
  reason: i
62
45
  } : {
63
46
  id: e.id,
64
47
  action: "dismiss",
65
48
  value: e.value,
66
- checked: (r = e.dialog) == null ? void 0 : r.getChecked(),
49
+ checked: (o = e.dialog) == null ? void 0 : o.getChecked(),
67
50
  source: a,
68
51
  reason: i
69
52
  };
70
53
  }
71
- function Ka(e) {
54
+ function Na(e) {
72
55
  return e === "esc" || e === "backdrop" || e === "close-icon" || e === "abort" || e === "unmount" || e === "replace" || e === "programmatic" ? e : "abort";
73
56
  }
74
57
  class Ga {
@@ -94,43 +77,43 @@ class Ga {
94
77
  this._disposed = !0;
95
78
  const i = [...this._active, ...this._queue];
96
79
  this._queue = [];
97
- for (const o of i)
98
- this._settle(o, ba(o, a), !1);
80
+ for (const r of i)
81
+ this._settle(r, ba(r, a), !1);
99
82
  this._active = [], this._ownsContainer && this._container && this._container.parentElement && this._container.parentElement.removeChild(this._container), this._container = null, this._ownsContainer = !1;
100
83
  }
101
84
  _enqueue(a, i) {
102
- const o = this._mergeOptions(i);
85
+ const r = this._mergeOptions(i);
103
86
  if (!Fa() || this._disposed) {
104
- const f = {
105
- id: o.id || Ba(++this._seed),
87
+ const c = {
88
+ id: r.id || Va(++this._seed),
106
89
  action: "dismiss",
107
90
  source: "unmount"
108
91
  };
109
- return Promise.resolve(f);
92
+ return Promise.resolve(c);
110
93
  }
111
- const n = o.id || Ba(++this._seed), r = $a(o.mode);
112
- return new Promise((f) => {
113
- var d;
94
+ const t = r.id || Va(++this._seed), o = $a(r.mode);
95
+ return new Promise((c) => {
96
+ var u;
114
97
  const s = {
115
- id: n,
98
+ id: t,
116
99
  kind: a,
117
- mode: r,
118
- options: o,
100
+ mode: o,
101
+ options: r,
119
102
  settled: !1,
120
103
  processing: !1,
121
- resolve: f,
104
+ resolve: c,
122
105
  cleanup: []
123
106
  };
124
- if ((d = o.signal) != null && d.aborted) {
107
+ if ((u = r.signal) != null && u.aborted) {
125
108
  this._settle(s, ba(s, "abort"), !1);
126
109
  return;
127
110
  }
128
- if (r === "replace") {
129
- const p = this._active[this._active.length - 1];
130
- p && this._settle(p, ba(p, "replace", "replace"), !1, !1), this._open(s);
111
+ if (o === "replace") {
112
+ const f = this._active[this._active.length - 1];
113
+ f && this._settle(f, ba(f, "replace", "replace"), !1, !1), this._open(s);
131
114
  return;
132
115
  }
133
- if (r === "stack") {
116
+ if (o === "stack") {
134
117
  this._open(s);
135
118
  return;
136
119
  }
@@ -143,79 +126,79 @@ class Ga {
143
126
  }
144
127
  _open(a) {
145
128
  var i;
146
- const o = this._ensureContainer();
147
- if (!o) {
129
+ const r = this._ensureContainer();
130
+ if (!r) {
148
131
  this._settle(a, ba(a, "unmount"), !1);
149
132
  return;
150
133
  }
151
- const n = document.createElement("ui-alert-dialog");
152
- a.dialog = n, a.checked = !!((i = a.options.checkbox) != null && i.defaultChecked);
153
- const r = this._buildConfig(a);
154
- n.dialogId = a.id, n.config = r;
155
- const f = (p) => {
134
+ const t = document.createElement("ui-alert-dialog");
135
+ a.dialog = t, a.checked = !!((i = a.options.checkbox) != null && i.defaultChecked);
136
+ const o = this._buildConfig(a);
137
+ t.dialogId = a.id, t.config = o;
138
+ const c = (f) => {
156
139
  if (a.settled)
157
140
  return;
158
- const x = p.detail;
141
+ const x = f.detail;
159
142
  a.value = x == null ? void 0 : x.inputValue, a.checked = x == null ? void 0 : x.checked;
160
143
  const m = this._validatePrompt(a);
161
144
  if (m) {
162
- p.preventDefault(), n.setError(m);
145
+ f.preventDefault(), t.setError(m);
163
146
  return;
164
147
  }
165
148
  if (!a.options.onConfirm) {
166
- n.clearError();
149
+ t.clearError();
167
150
  return;
168
151
  }
169
- p.preventDefault(), a.processing = !0, n.state = "loading", n.clearError(), Promise.resolve(
152
+ f.preventDefault(), a.processing = !0, t.state = "loading", t.clearError(), Promise.resolve(
170
153
  a.options.onConfirm({
171
154
  id: a.id,
172
155
  value: a.value,
173
156
  checked: a.checked,
174
- dialog: n,
157
+ dialog: t,
175
158
  signal: a.options.signal
176
159
  })
177
160
  ).then(() => {
178
- a.processing = !1, n.state = "idle", n.clearError(), a.settled || n.close("confirm");
179
- }).catch((b) => {
180
- a.processing = !1, n.state = "error", n.setError(Qa(b));
161
+ a.processing = !1, t.state = "idle", t.clearError(), a.settled || t.close("confirm");
162
+ }).catch((h) => {
163
+ a.processing = !1, t.state = "error", t.setError(Wa(h));
181
164
  });
182
- }, d = () => {
183
- a.settled || (a.value = n.getInputValue(), a.checked = n.getChecked(), n.state === "error" && n.clearError());
184
- }, s = (p) => {
165
+ }, u = () => {
166
+ a.settled || (a.value = t.getInputValue(), a.checked = t.getChecked(), t.state === "error" && t.clearError());
167
+ }, s = (f) => {
185
168
  if (a.settled)
186
169
  return;
187
- const x = p.detail;
170
+ const x = f.detail;
188
171
  this._handleClose(a, x);
189
172
  };
190
- if (n.addEventListener("ui-confirm", f), n.addEventListener("ui-change", d), n.addEventListener("ui-close", s), a.cleanup.push(() => n.removeEventListener("ui-confirm", f)), a.cleanup.push(() => n.removeEventListener("ui-change", d)), a.cleanup.push(() => n.removeEventListener("ui-close", s)), a.options.signal) {
191
- const p = () => {
173
+ if (t.addEventListener("ui-confirm", c), t.addEventListener("ui-change", u), t.addEventListener("ui-close", s), a.cleanup.push(() => t.removeEventListener("ui-confirm", c)), a.cleanup.push(() => t.removeEventListener("ui-change", u)), a.cleanup.push(() => t.removeEventListener("ui-close", s)), a.options.signal) {
174
+ const f = () => {
192
175
  a.settled || this._settle(a, ba(a, "abort"), !1);
193
176
  };
194
- a.options.signal.addEventListener("abort", p, { once: !0 }), a.cleanup.push(() => {
177
+ a.options.signal.addEventListener("abort", f, { once: !0 }), a.cleanup.push(() => {
195
178
  var x;
196
- return (x = a.options.signal) == null ? void 0 : x.removeEventListener("abort", p);
179
+ return (x = a.options.signal) == null ? void 0 : x.removeEventListener("abort", f);
197
180
  });
198
181
  }
199
- this._active.push(a), o.appendChild(n), n.open = !0, this._updateStackZIndex();
182
+ this._active.push(a), r.appendChild(t), t.open = !0, this._updateStackZIndex();
200
183
  }
201
184
  _validatePrompt(a) {
202
185
  var i;
203
186
  if (a.kind !== "prompt")
204
187
  return null;
205
- const o = a.options.input, n = ((i = a.dialog) == null ? void 0 : i.getInputValue()) ?? a.value ?? "";
206
- return o != null && o.required && !n.trim() ? "Please enter a value." : o != null && o.validate ? o.validate(n) : null;
188
+ const r = a.options.input, t = ((i = a.dialog) == null ? void 0 : i.getInputValue()) ?? a.value ?? "";
189
+ return r != null && r.required && !t.trim() ? "Please enter a value." : r != null && r.validate ? r.validate(t) : null;
207
190
  }
208
- _settle(a, i, o, n = !0) {
191
+ _settle(a, i, r, t = !0) {
209
192
  if (!a.settled) {
210
- if (a.settled = !0, this._cleanupRequest(a), this._active = this._active.filter((r) => r !== a), this._queue = this._queue.filter((r) => r !== a), a.dialog) {
211
- const r = a.dialog;
212
- if (!o && r.open) {
213
- const f = Ka(i.source);
214
- r.close("dismiss", f, i.reason);
193
+ if (a.settled = !0, this._cleanupRequest(a), this._active = this._active.filter((o) => o !== a), this._queue = this._queue.filter((o) => o !== a), a.dialog) {
194
+ const o = a.dialog;
195
+ if (!r && o.open) {
196
+ const c = Na(i.source);
197
+ o.close("dismiss", c, i.reason);
215
198
  }
216
- r.parentElement && r.parentElement.removeChild(r);
199
+ o.parentElement && o.parentElement.removeChild(o);
217
200
  }
218
- a.resolve(i), this._updateStackZIndex(), !this._disposed && n && this._drainQueue();
201
+ a.resolve(i), this._updateStackZIndex(), !this._disposed && t && this._drainQueue();
219
202
  }
220
203
  }
221
204
  _cleanupRequest(a) {
@@ -232,63 +215,63 @@ class Ga {
232
215
  a && this._open(a);
233
216
  }
234
217
  _buildConfig(a) {
235
- var i, o, n;
236
- const r = a.options, f = a.kind === "prompt", d = a.kind === "alert", s = f ? r.input : void 0;
218
+ var i, r, t;
219
+ const o = a.options, c = a.kind === "prompt", u = a.kind === "alert", s = c ? o.input : void 0;
237
220
  return {
238
221
  id: a.id,
239
- title: r.title,
240
- description: r.description,
241
- confirmText: r.confirmText || (d ? "OK" : "Confirm"),
242
- cancelText: r.cancelText || "Cancel",
243
- loadingText: r.loadingText,
244
- errorMessage: r.errorMessage,
245
- dismissible: r.dismissible ?? !0,
246
- closeOnEsc: r.closeOnEsc,
247
- closeOnBackdrop: r.closeOnBackdrop,
248
- lockWhileLoading: r.lockWhileLoading ?? !0,
249
- role: r.role || "alertdialog",
250
- tone: r.tone || (d ? "info" : f ? "neutral" : "warning"),
251
- size: r.size || "md",
252
- variant: r.variant || "surface",
253
- radius: r.radius,
254
- elevation: r.elevation || "low",
255
- indicator: r.indicator || "line",
256
- initialFocus: r.initialFocus,
257
- ariaLabel: r.ariaLabel,
258
- ariaLabelledby: r.ariaLabelledby,
259
- ariaDescribedby: r.ariaDescribedby,
260
- headless: r.headless,
261
- showCancel: !d,
262
- showClose: r.dismissible ?? !0,
222
+ title: o.title,
223
+ description: o.description,
224
+ confirmText: o.confirmText || (u ? "OK" : "Confirm"),
225
+ cancelText: o.cancelText || "Cancel",
226
+ loadingText: o.loadingText,
227
+ errorMessage: o.errorMessage,
228
+ dismissible: o.dismissible ?? !0,
229
+ closeOnEsc: o.closeOnEsc,
230
+ closeOnBackdrop: o.closeOnBackdrop,
231
+ lockWhileLoading: o.lockWhileLoading ?? !0,
232
+ role: o.role || "alertdialog",
233
+ tone: o.tone || (u ? "info" : c ? "neutral" : "warning"),
234
+ size: o.size || "md",
235
+ variant: o.variant || "surface",
236
+ radius: o.radius,
237
+ elevation: o.elevation || "low",
238
+ indicator: o.indicator || "line",
239
+ initialFocus: o.initialFocus,
240
+ ariaLabel: o.ariaLabel,
241
+ ariaLabelledby: o.ariaLabelledby,
242
+ ariaDescribedby: o.ariaDescribedby,
243
+ headless: o.headless,
244
+ showCancel: !u,
245
+ showClose: o.dismissible ?? !0,
263
246
  input: {
264
- enabled: f,
247
+ enabled: c,
265
248
  label: s == null ? void 0 : s.label,
266
249
  placeholder: s == null ? void 0 : s.placeholder,
267
250
  value: (s == null ? void 0 : s.defaultValue) || "",
268
251
  required: s == null ? void 0 : s.required
269
252
  },
270
253
  checkbox: {
271
- enabled: !!((i = r.checkbox) != null && i.enabled),
272
- label: (o = r.checkbox) == null ? void 0 : o.label,
273
- checked: (n = r.checkbox) == null ? void 0 : n.defaultChecked
254
+ enabled: !!((i = o.checkbox) != null && i.enabled),
255
+ label: (r = o.checkbox) == null ? void 0 : r.label,
256
+ checked: (t = o.checkbox) == null ? void 0 : t.defaultChecked
274
257
  }
275
258
  };
276
259
  }
277
260
  _buildLifecycleContext(a) {
278
- var i, o;
261
+ var i, r;
279
262
  return {
280
263
  id: a.id,
281
264
  value: ((i = a.dialog) == null ? void 0 : i.getInputValue()) ?? a.value,
282
- checked: ((o = a.dialog) == null ? void 0 : o.getChecked()) ?? a.checked,
265
+ checked: ((r = a.dialog) == null ? void 0 : r.getChecked()) ?? a.checked,
283
266
  dialog: a.dialog,
284
267
  signal: a.options.signal
285
268
  };
286
269
  }
287
270
  _handleClose(a, i) {
288
- const o = Na(a, i);
271
+ const r = Ka(a, i);
289
272
  if (i.action === "cancel" && a.options.onCancel) {
290
273
  Promise.resolve(a.options.onCancel(this._buildLifecycleContext(a))).finally(() => {
291
- this._settle(a, o, !0);
274
+ this._settle(a, r, !0);
292
275
  });
293
276
  return;
294
277
  }
@@ -300,11 +283,11 @@ class Ga {
300
283
  reason: i.reason
301
284
  })
302
285
  ).finally(() => {
303
- this._settle(a, o, !0);
286
+ this._settle(a, r, !0);
304
287
  });
305
288
  return;
306
289
  }
307
- this._settle(a, o, !0);
290
+ this._settle(a, r, !0);
308
291
  }
309
292
  _mergeOptions(a) {
310
293
  const i = this._defaults;
@@ -332,22 +315,22 @@ class Ga {
332
315
  }
333
316
  }
334
317
  }
335
- function le(e = {}) {
318
+ function te(e = {}) {
336
319
  return new Ga(e.container ?? null);
337
320
  }
338
- function Va() {
321
+ function ja() {
339
322
  return typeof window < "u" && typeof document < "u";
340
323
  }
341
324
  function Ja(e) {
342
325
  return e === "replace" || e === "stack" ? e : "queue";
343
326
  }
344
- function ja(e) {
327
+ function Ba(e) {
345
328
  return `ui-dialog-${e}`;
346
329
  }
347
- function Ya(e) {
330
+ function Xa(e) {
348
331
  return e ? typeof e == "string" ? e : e instanceof Error && e.message ? e.message : "Something went wrong. Please try again." : "Something went wrong. Please try again.";
349
332
  }
350
- class Xa {
333
+ class Ya {
351
334
  constructor(a) {
352
335
  this._container = null, this._ownsContainer = !1, this._queue = [], this._active = [], this._disposed = !1, this._seed = 0, this._container = a ?? null;
353
336
  }
@@ -364,9 +347,9 @@ class Xa {
364
347
  this._disposed = !0;
365
348
  const i = [...this._active, ...this._queue];
366
349
  this._queue = [];
367
- for (const o of i)
368
- this._settle(o, {
369
- id: o.id,
350
+ for (const r of i)
351
+ this._settle(r, {
352
+ id: r.id,
370
353
  action: "dismiss",
371
354
  source: a,
372
355
  reason: a
@@ -374,41 +357,41 @@ class Xa {
374
357
  this._active = [], this._ownsContainer && this._container && this._container.parentElement && this._container.parentElement.removeChild(this._container), this._container = null, this._ownsContainer = !1;
375
358
  }
376
359
  _enqueue(a) {
377
- if (!Va() || this._disposed)
360
+ if (!ja() || this._disposed)
378
361
  return Promise.resolve({
379
- id: a.id || ja(++this._seed),
362
+ id: a.id || Ba(++this._seed),
380
363
  action: "dismiss",
381
364
  source: "unmount"
382
365
  });
383
- const i = a.id || ja(++this._seed), o = Ja(a.mode);
384
- return new Promise((n) => {
385
- var r;
386
- const f = {
366
+ const i = a.id || Ba(++this._seed), r = Ja(a.mode);
367
+ return new Promise((t) => {
368
+ var o;
369
+ const c = {
387
370
  id: i,
388
- mode: o,
371
+ mode: r,
389
372
  options: a,
390
373
  settled: !1,
391
- resolve: n,
374
+ resolve: t,
392
375
  cleanup: []
393
376
  };
394
- if ((r = a.signal) != null && r.aborted) {
395
- this._settle(f, { id: i, action: "dismiss", source: "abort" }, !1);
377
+ if ((o = a.signal) != null && o.aborted) {
378
+ this._settle(c, { id: i, action: "dismiss", source: "abort" }, !1);
396
379
  return;
397
380
  }
398
- if (o === "replace") {
399
- const d = this._active[this._active.length - 1];
400
- d && this._settle(d, { id: d.id, action: "dismiss", source: "replace", reason: "replace" }, !1, !1), this._open(f);
381
+ if (r === "replace") {
382
+ const u = this._active[this._active.length - 1];
383
+ u && this._settle(u, { id: u.id, action: "dismiss", source: "replace", reason: "replace" }, !1, !1), this._open(c);
401
384
  return;
402
385
  }
403
- if (o === "stack") {
404
- this._open(f);
386
+ if (r === "stack") {
387
+ this._open(c);
405
388
  return;
406
389
  }
407
390
  if (this._active.length > 0) {
408
- this._queue.push(f);
391
+ this._queue.push(c);
409
392
  return;
410
393
  }
411
- this._open(f);
394
+ this._open(c);
412
395
  });
413
396
  }
414
397
  _open(a) {
@@ -421,34 +404,34 @@ class Xa {
421
404
  }, !1);
422
405
  return;
423
406
  }
424
- const o = document.createElement("ui-dialog");
425
- a.dialog = o;
426
- const n = this._buildConfig(a.options, a.id);
427
- o.dialogId = a.id, o.config = n;
428
- const r = (d) => {
407
+ const r = document.createElement("ui-dialog");
408
+ a.dialog = r;
409
+ const t = this._buildConfig(a.options, a.id);
410
+ r.dialogId = a.id, r.config = t;
411
+ const o = (u) => {
429
412
  if (a.settled)
430
413
  return;
431
- const s = d.detail;
414
+ const s = u.detail;
432
415
  if (a.resultFormData = s == null ? void 0 : s.formData, !a.options.onSubmit) {
433
- o.clearError();
416
+ r.clearError();
434
417
  return;
435
418
  }
436
- d.preventDefault(), o.state = "loading", o.clearError(), Promise.resolve(
419
+ u.preventDefault(), r.state = "loading", r.clearError(), Promise.resolve(
437
420
  a.options.onSubmit({
438
421
  id: a.id,
439
- dialog: o,
422
+ dialog: r,
440
423
  signal: a.options.signal,
441
424
  formData: s == null ? void 0 : s.formData
442
425
  })
443
426
  ).then(() => {
444
- a.settled || (o.state = "idle", o.clearError(), o.close("submit"));
445
- }).catch((p) => {
446
- o.state = "error", o.setError(Ya(p));
427
+ a.settled || (r.state = "idle", r.clearError(), r.close("submit"));
428
+ }).catch((f) => {
429
+ r.state = "error", r.setError(Xa(f));
447
430
  });
448
- }, f = (d) => {
431
+ }, c = (u) => {
449
432
  if (a.settled)
450
433
  return;
451
- const s = d.detail;
434
+ const s = u.detail;
452
435
  this._settle(a, {
453
436
  id: a.id,
454
437
  action: s.action,
@@ -457,28 +440,28 @@ class Xa {
457
440
  formData: a.resultFormData
458
441
  }, !0);
459
442
  };
460
- if (o.addEventListener("ui-submit", r), o.addEventListener("ui-close", f), a.cleanup.push(() => o.removeEventListener("ui-submit", r)), a.cleanup.push(() => o.removeEventListener("ui-close", f)), a.options.signal) {
461
- const d = () => {
443
+ if (r.addEventListener("ui-submit", o), r.addEventListener("ui-close", c), a.cleanup.push(() => r.removeEventListener("ui-submit", o)), a.cleanup.push(() => r.removeEventListener("ui-close", c)), a.options.signal) {
444
+ const u = () => {
462
445
  a.settled || this._settle(a, {
463
446
  id: a.id,
464
447
  action: "dismiss",
465
448
  source: "abort"
466
449
  }, !1);
467
450
  };
468
- a.options.signal.addEventListener("abort", d, { once: !0 }), a.cleanup.push(() => {
451
+ a.options.signal.addEventListener("abort", u, { once: !0 }), a.cleanup.push(() => {
469
452
  var s;
470
- return (s = a.options.signal) == null ? void 0 : s.removeEventListener("abort", d);
453
+ return (s = a.options.signal) == null ? void 0 : s.removeEventListener("abort", u);
471
454
  });
472
455
  }
473
- this._active.push(a), i.appendChild(o), o.openDialog(), this._updateStackZIndex();
456
+ this._active.push(a), i.appendChild(r), r.openDialog(), this._updateStackZIndex();
474
457
  }
475
- _settle(a, i, o, n = !0) {
458
+ _settle(a, i, r, t = !0) {
476
459
  if (!a.settled) {
477
- if (a.settled = !0, this._cleanupRequest(a), this._active = this._active.filter((r) => r !== a), this._queue = this._queue.filter((r) => r !== a), a.dialog) {
478
- const r = a.dialog;
479
- !o && r.open && r.close("dismiss", i.source || "abort", i.reason), r.parentElement && r.parentElement.removeChild(r);
460
+ if (a.settled = !0, this._cleanupRequest(a), this._active = this._active.filter((o) => o !== a), this._queue = this._queue.filter((o) => o !== a), a.dialog) {
461
+ const o = a.dialog;
462
+ !r && o.open && o.close("dismiss", i.source || "abort", i.reason), o.parentElement && o.parentElement.removeChild(o);
480
463
  }
481
- a.resolve(i), this._updateStackZIndex(), !this._disposed && n && this._drainQueue();
464
+ a.resolve(i), this._updateStackZIndex(), !this._disposed && t && this._drainQueue();
482
465
  }
483
466
  }
484
467
  _cleanupRequest(a) {
@@ -519,7 +502,7 @@ class Xa {
519
502
  };
520
503
  }
521
504
  _ensureContainer() {
522
- if (!Va())
505
+ if (!ja())
523
506
  return null;
524
507
  if (this._container && this._container.isConnected)
525
508
  return this._container;
@@ -533,10 +516,10 @@ class Xa {
533
516
  }
534
517
  }
535
518
  }
536
- function se(e = {}) {
537
- return new Xa(e.container ?? null);
519
+ function le(e = {}) {
520
+ return new Ya(e.container ?? null);
538
521
  }
539
- const Za = {
522
+ const Ua = {
540
523
  1: "#0000000d",
541
524
  2: "#0000001a",
542
525
  3: "#00000026",
@@ -549,7 +532,7 @@ const Za = {
549
532
  10: "#000c",
550
533
  11: "#000000e6",
551
534
  12: "#000000f2"
552
- }, Ua = {
535
+ }, Qa = {
553
536
  1: "#ffffff0d",
554
537
  2: "#ffffff1a",
555
538
  3: "#ffffff26",
@@ -562,7 +545,7 @@ const Za = {
562
545
  10: "#fffc",
563
546
  11: "#ffffffe6",
564
547
  12: "#fffffff2"
565
- }, h = {
548
+ }, v = {
566
549
  amber: {
567
550
  light: {
568
551
  scale: {
@@ -1566,18 +1549,18 @@ const ya = {
1566
1549
  11: "#0000009b",
1567
1550
  12: "#000000df"
1568
1551
  },
1569
- blackAlpha: Za,
1570
- whiteAlpha: Ua,
1552
+ blackAlpha: Ua,
1553
+ whiteAlpha: Qa,
1571
1554
  accent: {
1572
- ...h.amber.light.scale
1555
+ ...v.amber.light.scale
1573
1556
  },
1574
1557
  accentAlpha: {
1575
- ...h.amber.light.alphaScale
1558
+ ...v.amber.light.alphaScale
1576
1559
  },
1577
- accentContrast: h.amber.light.contrast,
1578
- accentSurface: h.amber.light.surface,
1579
- accentIndicator: h.amber.light.indicator,
1580
- accentTrack: h.amber.light.track
1560
+ accentContrast: v.amber.light.contrast,
1561
+ accentSurface: v.amber.light.surface,
1562
+ accentIndicator: v.amber.light.indicator,
1563
+ accentTrack: v.amber.light.track
1581
1564
  },
1582
1565
  surfaces: {
1583
1566
  background: "#ffffff",
@@ -1678,7 +1661,7 @@ const ya = {
1678
1661
  components: ae,
1679
1662
  zIndex: { modal: 1e3, overlay: 900, toast: 1100 },
1680
1663
  breakpoints: { sm: "640px", md: "768px", lg: "1024px" }
1681
- }, oe = {
1664
+ }, re = {
1682
1665
  ...ya,
1683
1666
  colors: {
1684
1667
  primary: "#ffc53d",
@@ -1725,18 +1708,18 @@ const ya = {
1725
1708
  11: "#ffffffaf",
1726
1709
  12: "#ffffffed"
1727
1710
  },
1728
- blackAlpha: Za,
1729
- whiteAlpha: Ua,
1711
+ blackAlpha: Ua,
1712
+ whiteAlpha: Qa,
1730
1713
  accent: {
1731
- ...h.amber.dark.scale
1714
+ ...v.amber.dark.scale
1732
1715
  },
1733
1716
  accentAlpha: {
1734
- ...h.amber.dark.alphaScale
1717
+ ...v.amber.dark.alphaScale
1735
1718
  },
1736
- accentContrast: h.amber.dark.contrast,
1737
- accentSurface: h.amber.dark.surface,
1738
- accentIndicator: h.amber.dark.indicator,
1739
- accentTrack: h.amber.dark.track
1719
+ accentContrast: v.amber.dark.contrast,
1720
+ accentSurface: v.amber.dark.surface,
1721
+ accentIndicator: v.amber.dark.indicator,
1722
+ accentTrack: v.amber.dark.track
1740
1723
  },
1741
1724
  surfaces: {
1742
1725
  background: "#111111",
@@ -1759,14 +1742,14 @@ const ya = {
1759
1742
  6: "0 0 0 1px var(--gray-a6),0 12px 60px var(--black-a4),0 16px 64px var(--black-a6),0 16px 36px -20px var(--black-a11)"
1760
1743
  },
1761
1744
  components: ee
1762
- }, de = ya, re = /* @__PURE__ */ new Set();
1763
- function u(e, a) {
1745
+ }, se = ya, oe = /* @__PURE__ */ new Set();
1746
+ function p(e, a) {
1764
1747
  if (!(!e && !a))
1765
1748
  return { ...e || {}, ...a || {} };
1766
1749
  }
1767
1750
  function ne(e, a) {
1768
- var i, o, n, r, f, d, s, p, x, m, b, y, w, k, _, v, C, z, E, A, q, I, L, P, M, D, H, O, R, T, F, B, V, j, W, Z, U, Q, $, N, K, G, J, Y, X, aa, ea, ia, oa, ra, na, ta, la, sa, da, pa, ca, ua, fa, xa, ga, va;
1769
- const ha = (a == null ? void 0 : a.mode) || "light", l = ha === "dark" ? oe : ya, ma = a == null ? void 0 : a.accentPalette, g = ma ? h[ma][ha] : null, S = g ? {
1751
+ var i, r, t, o, c, u, s, f, x, m, h, y, w, k, _, S, C, z, E, A, q, I, L, P, D, O, T, M, H, R, F, V, j, B, Z, U, Q, W, $, K, N, G, J, X, Y, aa, ea, ia, ra, oa, na, ta, la, sa, da, pa, ca, ua, fa, xa, ga, va;
1752
+ const ma = (a == null ? void 0 : a.mode) || "light", l = ma === "dark" ? re : ya, ha = a == null ? void 0 : a.accentPalette, g = ha ? v[ha][ma] : null, b = g ? {
1770
1753
  colors: {
1771
1754
  ...ie(g)
1772
1755
  },
@@ -1784,19 +1767,19 @@ function ne(e, a) {
1784
1767
  ...e,
1785
1768
  colors: {
1786
1769
  ...l.colors,
1787
- ...(S == null ? void 0 : S.colors) || {},
1770
+ ...(b == null ? void 0 : b.colors) || {},
1788
1771
  ...(e == null ? void 0 : e.colors) || {}
1789
1772
  },
1790
1773
  palette: {
1791
1774
  ...l.palette || {},
1792
- ...(S == null ? void 0 : S.palette) || {},
1775
+ ...(b == null ? void 0 : b.palette) || {},
1793
1776
  ...(e == null ? void 0 : e.palette) || {},
1794
- gray: u((i = l.palette) == null ? void 0 : i.gray, (o = e == null ? void 0 : e.palette) == null ? void 0 : o.gray),
1795
- grayAlpha: u((n = l.palette) == null ? void 0 : n.grayAlpha, (r = e == null ? void 0 : e.palette) == null ? void 0 : r.grayAlpha),
1796
- blackAlpha: u((f = l.palette) == null ? void 0 : f.blackAlpha, (d = e == null ? void 0 : e.palette) == null ? void 0 : d.blackAlpha),
1797
- whiteAlpha: u((s = l.palette) == null ? void 0 : s.whiteAlpha, (p = e == null ? void 0 : e.palette) == null ? void 0 : p.whiteAlpha),
1798
- accent: u((g == null ? void 0 : g.scale) || ((x = l.palette) == null ? void 0 : x.accent), (m = e == null ? void 0 : e.palette) == null ? void 0 : m.accent),
1799
- accentAlpha: u((g == null ? void 0 : g.alphaScale) || ((b = l.palette) == null ? void 0 : b.accentAlpha), (y = e == null ? void 0 : e.palette) == null ? void 0 : y.accentAlpha)
1777
+ gray: p((i = l.palette) == null ? void 0 : i.gray, (r = e == null ? void 0 : e.palette) == null ? void 0 : r.gray),
1778
+ grayAlpha: p((t = l.palette) == null ? void 0 : t.grayAlpha, (o = e == null ? void 0 : e.palette) == null ? void 0 : o.grayAlpha),
1779
+ blackAlpha: p((c = l.palette) == null ? void 0 : c.blackAlpha, (u = e == null ? void 0 : e.palette) == null ? void 0 : u.blackAlpha),
1780
+ whiteAlpha: p((s = l.palette) == null ? void 0 : s.whiteAlpha, (f = e == null ? void 0 : e.palette) == null ? void 0 : f.whiteAlpha),
1781
+ accent: p((g == null ? void 0 : g.scale) || ((x = l.palette) == null ? void 0 : x.accent), (m = e == null ? void 0 : e.palette) == null ? void 0 : m.accent),
1782
+ accentAlpha: p((g == null ? void 0 : g.alphaScale) || ((h = l.palette) == null ? void 0 : h.accentAlpha), (y = e == null ? void 0 : e.palette) == null ? void 0 : y.accentAlpha)
1800
1783
  },
1801
1784
  surfaces: {
1802
1785
  ...l.surfaces || {},
@@ -1810,8 +1793,8 @@ function ne(e, a) {
1810
1793
  ...l.spacing || {},
1811
1794
  ...(e == null ? void 0 : e.spacing) || {}
1812
1795
  },
1813
- spaceScale: u(l.spaceScale, e == null ? void 0 : e.spaceScale),
1814
- radiusScale: u(l.radiusScale, e == null ? void 0 : e.radiusScale),
1796
+ spaceScale: p(l.spaceScale, e == null ? void 0 : e.spaceScale),
1797
+ radiusScale: p(l.radiusScale, e == null ? void 0 : e.radiusScale),
1815
1798
  typography: {
1816
1799
  ...l.typography || {},
1817
1800
  ...(e == null ? void 0 : e.typography) || {},
@@ -1819,9 +1802,9 @@ function ne(e, a) {
1819
1802
  ...((w = l.typography) == null ? void 0 : w.size) || {},
1820
1803
  ...((k = e == null ? void 0 : e.typography) == null ? void 0 : k.size) || {}
1821
1804
  },
1822
- fontScale: u((_ = l.typography) == null ? void 0 : _.fontScale, (v = e == null ? void 0 : e.typography) == null ? void 0 : v.fontScale),
1823
- lineHeight: u((C = l.typography) == null ? void 0 : C.lineHeight, (z = e == null ? void 0 : e.typography) == null ? void 0 : z.lineHeight),
1824
- letterSpacing: u((E = l.typography) == null ? void 0 : E.letterSpacing, (A = e == null ? void 0 : e.typography) == null ? void 0 : A.letterSpacing)
1805
+ fontScale: p((_ = l.typography) == null ? void 0 : _.fontScale, (S = e == null ? void 0 : e.typography) == null ? void 0 : S.fontScale),
1806
+ lineHeight: p((C = l.typography) == null ? void 0 : C.lineHeight, (z = e == null ? void 0 : e.typography) == null ? void 0 : z.lineHeight),
1807
+ letterSpacing: p((E = l.typography) == null ? void 0 : E.letterSpacing, (A = e == null ? void 0 : e.typography) == null ? void 0 : A.letterSpacing)
1825
1808
  },
1826
1809
  motion: {
1827
1810
  ...l.motion || {},
@@ -1834,27 +1817,27 @@ function ne(e, a) {
1834
1817
  components: {
1835
1818
  ...l.components || {},
1836
1819
  ...(e == null ? void 0 : e.components) || {},
1837
- button: u((q = l.components) == null ? void 0 : q.button, (I = e == null ? void 0 : e.components) == null ? void 0 : I.button),
1838
- badge: u((L = l.components) == null ? void 0 : L.badge, (P = e == null ? void 0 : e.components) == null ? void 0 : P.badge),
1839
- dropdown: u((M = l.components) == null ? void 0 : M.dropdown, (D = e == null ? void 0 : e.components) == null ? void 0 : D.dropdown),
1840
- select: u((H = l.components) == null ? void 0 : H.select, (O = e == null ? void 0 : e.components) == null ? void 0 : O.select),
1841
- sidebar: u((R = l.components) == null ? void 0 : R.sidebar, (T = e == null ? void 0 : e.components) == null ? void 0 : T.sidebar),
1842
- card: u((F = l.components) == null ? void 0 : F.card, (B = e == null ? void 0 : e.components) == null ? void 0 : B.card),
1843
- navigationMenu: u((V = l.components) == null ? void 0 : V.navigationMenu, (j = e == null ? void 0 : e.components) == null ? void 0 : j.navigationMenu),
1844
- blockControls: u((W = l.components) == null ? void 0 : W.blockControls, (Z = e == null ? void 0 : e.components) == null ? void 0 : Z.blockControls),
1845
- box: u((U = l.components) == null ? void 0 : U.box, (Q = e == null ? void 0 : e.components) == null ? void 0 : Q.box),
1846
- breadcrumb: u(($ = l.components) == null ? void 0 : $.breadcrumb, (N = e == null ? void 0 : e.components) == null ? void 0 : N.breadcrumb),
1847
- contextMenu: u((K = l.components) == null ? void 0 : K.contextMenu, (G = e == null ? void 0 : e.components) == null ? void 0 : G.contextMenu),
1848
- menubar: u((J = l.components) == null ? void 0 : J.menubar, (Y = e == null ? void 0 : e.components) == null ? void 0 : Y.menubar),
1849
- alert: u((X = l.components) == null ? void 0 : X.alert, (aa = e == null ? void 0 : e.components) == null ? void 0 : aa.alert),
1850
- alertDialog: u((ea = l.components) == null ? void 0 : ea.alertDialog, (ia = e == null ? void 0 : e.components) == null ? void 0 : ia.alertDialog),
1851
- appHeader: u((oa = l.components) == null ? void 0 : oa.appHeader, (ra = e == null ? void 0 : e.components) == null ? void 0 : ra.appHeader),
1852
- aspectRatio: u((na = l.components) == null ? void 0 : na.aspectRatio, (ta = e == null ? void 0 : e.components) == null ? void 0 : ta.aspectRatio),
1853
- avatar: u((la = l.components) == null ? void 0 : la.avatar, (sa = e == null ? void 0 : e.components) == null ? void 0 : sa.avatar),
1854
- menu: u((da = l.components) == null ? void 0 : da.menu, (pa = e == null ? void 0 : e.components) == null ? void 0 : pa.menu),
1855
- multiSelect: u((ca = l.components) == null ? void 0 : ca.multiSelect, (ua = e == null ? void 0 : e.components) == null ? void 0 : ua.multiSelect),
1856
- panel: u((fa = l.components) == null ? void 0 : fa.panel, (xa = e == null ? void 0 : e.components) == null ? void 0 : xa.panel),
1857
- input: u((ga = l.components) == null ? void 0 : ga.input, (va = e == null ? void 0 : e.components) == null ? void 0 : va.input)
1820
+ button: p((q = l.components) == null ? void 0 : q.button, (I = e == null ? void 0 : e.components) == null ? void 0 : I.button),
1821
+ badge: p((L = l.components) == null ? void 0 : L.badge, (P = e == null ? void 0 : e.components) == null ? void 0 : P.badge),
1822
+ dropdown: p((D = l.components) == null ? void 0 : D.dropdown, (O = e == null ? void 0 : e.components) == null ? void 0 : O.dropdown),
1823
+ select: p((T = l.components) == null ? void 0 : T.select, (M = e == null ? void 0 : e.components) == null ? void 0 : M.select),
1824
+ sidebar: p((H = l.components) == null ? void 0 : H.sidebar, (R = e == null ? void 0 : e.components) == null ? void 0 : R.sidebar),
1825
+ card: p((F = l.components) == null ? void 0 : F.card, (V = e == null ? void 0 : e.components) == null ? void 0 : V.card),
1826
+ navigationMenu: p((j = l.components) == null ? void 0 : j.navigationMenu, (B = e == null ? void 0 : e.components) == null ? void 0 : B.navigationMenu),
1827
+ blockControls: p((Z = l.components) == null ? void 0 : Z.blockControls, (U = e == null ? void 0 : e.components) == null ? void 0 : U.blockControls),
1828
+ box: p((Q = l.components) == null ? void 0 : Q.box, (W = e == null ? void 0 : e.components) == null ? void 0 : W.box),
1829
+ breadcrumb: p(($ = l.components) == null ? void 0 : $.breadcrumb, (K = e == null ? void 0 : e.components) == null ? void 0 : K.breadcrumb),
1830
+ contextMenu: p((N = l.components) == null ? void 0 : N.contextMenu, (G = e == null ? void 0 : e.components) == null ? void 0 : G.contextMenu),
1831
+ menubar: p((J = l.components) == null ? void 0 : J.menubar, (X = e == null ? void 0 : e.components) == null ? void 0 : X.menubar),
1832
+ alert: p((Y = l.components) == null ? void 0 : Y.alert, (aa = e == null ? void 0 : e.components) == null ? void 0 : aa.alert),
1833
+ alertDialog: p((ea = l.components) == null ? void 0 : ea.alertDialog, (ia = e == null ? void 0 : e.components) == null ? void 0 : ia.alertDialog),
1834
+ appHeader: p((ra = l.components) == null ? void 0 : ra.appHeader, (oa = e == null ? void 0 : e.components) == null ? void 0 : oa.appHeader),
1835
+ aspectRatio: p((na = l.components) == null ? void 0 : na.aspectRatio, (ta = e == null ? void 0 : e.components) == null ? void 0 : ta.aspectRatio),
1836
+ avatar: p((la = l.components) == null ? void 0 : la.avatar, (sa = e == null ? void 0 : e.components) == null ? void 0 : sa.avatar),
1837
+ menu: p((da = l.components) == null ? void 0 : da.menu, (pa = e == null ? void 0 : e.components) == null ? void 0 : pa.menu),
1838
+ multiSelect: p((ca = l.components) == null ? void 0 : ca.multiSelect, (ua = e == null ? void 0 : e.components) == null ? void 0 : ua.multiSelect),
1839
+ panel: p((fa = l.components) == null ? void 0 : fa.panel, (xa = e == null ? void 0 : e.components) == null ? void 0 : xa.panel),
1840
+ input: p((ga = l.components) == null ? void 0 : ga.input, (va = e == null ? void 0 : e.components) == null ? void 0 : va.input)
1858
1841
  },
1859
1842
  zIndex: {
1860
1843
  ...l.zIndex || {},
@@ -1866,37 +1849,36 @@ function ne(e, a) {
1866
1849
  }
1867
1850
  };
1868
1851
  }
1869
- function t(e, a, i) {
1852
+ function n(e, a, i) {
1870
1853
  try {
1871
1854
  e.style.setProperty(a, i);
1872
1855
  } catch {
1873
1856
  }
1874
1857
  }
1875
- function c(e, a, i) {
1876
- i && Object.entries(i).forEach(([o, n]) => {
1877
- typeof n == "string" && n && e.style.setProperty(`${a}${o}`, n);
1858
+ function d(e, a, i) {
1859
+ i && Object.entries(i).forEach(([r, t]) => {
1860
+ typeof t == "string" && t && e.style.setProperty(`${a}${r}`, t);
1878
1861
  });
1879
1862
  }
1880
- function Wa(e, a) {
1881
- var i, o, n, r, f, d, s, p, x, m, b, y, w, k, _, v, C, z, E, A, q, I, L, P, M, D, H, O, R, T, F, B, V, j, W, Z, U, Q, $, N, K, G, J, Y, X, aa, ea, ia, oa, ra, na, ta, la, sa, da, pa, ca, ua, fa, xa, ga, va, ha, l, ma, g, S, wa, ka, _a, Sa, Ca, za, Ea, Aa, qa, Ia, La, Pa, Ma, Da, Ha, Oa, Ra, Ta;
1882
- t(e, "--ui-color-primary", a.colors.primary), t(e, "--ui-color-primary-hover", a.colors.primaryHover || a.colors.primary), t(e, "--ui-color-foreground-on-primary", a.colors.foregroundOnPrimary || "#ffffff"), t(e, "--ui-color-background", a.colors.background || "#ffffff"), t(e, "--ui-color-surface", a.colors.surface || a.colors.background || "#ffffff"), t(e, "--ui-color-surface-alt", a.colors.surfaceAlt || a.colors.surface || "#f9f9f9"), t(e, "--ui-color-text", a.colors.text || "#202020"), t(e, "--ui-color-muted", a.colors.muted || "#646464"), t(e, "--ui-color-border", a.colors.border || "#0000001f"), t(e, "--ui-color-focus-ring", a.colors.focusRing || a.colors.primary), t(e, "--ui-color-success", a.colors.success || "#30a46c"), t(e, "--ui-color-danger", a.colors.danger || "#e5484d"), t(e, "--ui-color-warning", a.colors.warning || a.colors.primary), t(e, "--ui-primary", a.colors.primary), t(e, "--ui-primary-hover", a.colors.primaryHover || a.colors.primary), t(e, "--ui-foreground", a.colors.foregroundOnPrimary || "#ffffff"), t(e, "--ui-background", a.colors.background || "#ffffff"), t(e, "--ui-surface", a.colors.surface || a.colors.background || "#ffffff"), t(e, "--ui-surface-alt", a.colors.surfaceAlt || a.colors.surface || "#f9f9f9"), t(e, "--ui-text", a.colors.text || "#202020"), t(e, "--ui-muted", a.colors.muted || "#646464"), t(e, "--ui-border", a.colors.border || "#0000001f"), t(e, "--ui-focus-ring", a.colors.focusRing || a.colors.primary), t(e, "--ui-success", a.colors.success || "#30a46c"), t(e, "--ui-error", a.colors.danger || "#e5484d"), t(e, "--ui-warning", a.colors.warning || a.colors.primary), t(e, "--ui-radius", a.radius || "4px"), t(e, "--ui-space-xs", ((i = a.spacing) == null ? void 0 : i.xs) || "4px"), t(e, "--ui-space-sm", ((o = a.spacing) == null ? void 0 : o.sm) || "8px"), t(e, "--ui-space-md", ((n = a.spacing) == null ? void 0 : n.md) || "12px"), t(e, "--ui-space-lg", ((r = a.spacing) == null ? void 0 : r.lg) || "24px"), t(e, "--ui-space-xl", ((f = a.spacing) == null ? void 0 : f.xl) || "32px"), t(e, "--ui-space-xxl", ((d = a.spacing) == null ? void 0 : d.xxl) || "48px"), t(e, "--ui-default-gap", ((s = a.spacing) == null ? void 0 : s.sm) || ((p = a.spaceScale) == null ? void 0 : p[2]) || "8px"), t(e, "--ui-shadow-sm", ((x = a.shadows) == null ? void 0 : x.sm) || ((m = a.shadows) == null ? void 0 : m[2]) || "none"), t(e, "--ui-shadow-md", ((b = a.shadows) == null ? void 0 : b.md) || ((y = a.shadows) == null ? void 0 : y[3]) || "none"), t(e, "--ui-shadow-lg", ((w = a.shadows) == null ? void 0 : w.lg) || ((k = a.shadows) == null ? void 0 : k[4]) || "none"), t(e, "--ui-font-family", ((_ = a.typography) == null ? void 0 : _.family) || "system-ui, sans-serif"), t(e, "--ui-font-family-heading", ((v = a.typography) == null ? void 0 : v.headingFamily) || ((C = a.typography) == null ? void 0 : C.family) || "system-ui, sans-serif"), t(e, "--ui-font-family-code", ((z = a.typography) == null ? void 0 : z.codeFamily) || "monospace"), t(e, "--ui-font-size-sm", ((A = (E = a.typography) == null ? void 0 : E.size) == null ? void 0 : A.sm) || "12px"), t(e, "--ui-font-size-md", ((I = (q = a.typography) == null ? void 0 : q.size) == null ? void 0 : I.md) || "14px"), t(e, "--ui-font-size-lg", ((P = (L = a.typography) == null ? void 0 : L.size) == null ? void 0 : P.lg) || "16px"), t(e, "--ui-default-font-size", ((D = (M = a.typography) == null ? void 0 : M.size) == null ? void 0 : D.md) || ((O = (H = a.typography) == null ? void 0 : H.fontScale) == null ? void 0 : O[2]) || "14px"), t(e, "--ui-default-line-height", ((T = (R = a.typography) == null ? void 0 : R.lineHeight) == null ? void 0 : T[2]) || "20px"), t(e, "--ui-default-letter-spacing", ((B = (F = a.typography) == null ? void 0 : F.letterSpacing) == null ? void 0 : B[2]) || "0em"), t(e, "--ui-motion-short", ((V = a.motion) == null ? void 0 : V.durationShort) || "120ms"), t(e, "--ui-motion-base", ((j = a.motion) == null ? void 0 : j.durationBase) || "180ms"), t(e, "--ui-motion-long", ((W = a.motion) == null ? void 0 : W.durationLong) || "260ms"), t(e, "--ui-motion-easing", ((Z = a.motion) == null ? void 0 : Z.easing) || "cubic-bezier(0.2, 0.8, 0.2, 1)"), t(e, "--ui-z-modal", String(((U = a.zIndex) == null ? void 0 : U.modal) ?? 1e3)), t(e, "--ui-z-overlay", String(((Q = a.zIndex) == null ? void 0 : Q.overlay) ?? 900)), t(e, "--ui-z-toast", String((($ = a.zIndex) == null ? void 0 : $.toast) ?? 1100)), t(e, "--ui-breakpoint-sm", ((N = a.breakpoints) == null ? void 0 : N.sm) || "640px"), t(e, "--ui-breakpoint-md", ((K = a.breakpoints) == null ? void 0 : K.md) || "768px"), t(e, "--ui-breakpoint-lg", ((G = a.breakpoints) == null ? void 0 : G.lg) || "1024px"), t(e, "--color-background", ((J = a.surfaces) == null ? void 0 : J.background) || a.colors.background || "#ffffff"), t(e, "--color-surface", ((Y = a.surfaces) == null ? void 0 : Y.surface) || a.colors.surface || "#fcfcfc"), t(e, "--color-panel", ((X = a.surfaces) == null ? void 0 : X.panel) || ((aa = a.surfaces) == null ? void 0 : aa.panelTranslucent) || "#ffffffcc"), t(e, "--color-panel-solid", ((ea = a.surfaces) == null ? void 0 : ea.panelSolid) || a.colors.surface || "#ffffff"), t(e, "--color-panel-translucent", ((ia = a.surfaces) == null ? void 0 : ia.panelTranslucent) || "#ffffffcc"), t(e, "--color-overlay", ((oa = a.surfaces) == null ? void 0 : oa.overlay) || "rgba(2, 6, 23, 0.52)"), t(e, "--color-transparent", ((ra = a.surfaces) == null ? void 0 : ra.transparent) || "transparent"), t(e, "--backdrop-filter-panel", ((na = a.effects) == null ? void 0 : na.backdropFilterPanel) || "blur(64px)"), (ta = a.palette) != null && ta.accentContrast && t(e, "--accent-contrast", a.palette.accentContrast), (la = a.palette) != null && la.accentSurface && t(e, "--accent-surface", a.palette.accentSurface), (sa = a.palette) != null && sa.accentIndicator && t(e, "--accent-indicator", a.palette.accentIndicator), (da = a.palette) != null && da.accentTrack && t(e, "--accent-track", a.palette.accentTrack), c(e, "--gray-", (pa = a.palette) == null ? void 0 : pa.gray), c(e, "--gray-a", (ca = a.palette) == null ? void 0 : ca.grayAlpha), c(e, "--black-a", (ua = a.palette) == null ? void 0 : ua.blackAlpha), c(e, "--white-a", (fa = a.palette) == null ? void 0 : fa.whiteAlpha), c(e, "--accent-", (xa = a.palette) == null ? void 0 : xa.accent), c(e, "--accent-a", (ga = a.palette) == null ? void 0 : ga.accentAlpha), c(e, "--space-", a.spaceScale), c(e, "--radius-", a.radiusScale), c(e, "--font-size-", (va = a.typography) == null ? void 0 : va.fontScale), c(e, "--line-height-", (ha = a.typography) == null ? void 0 : ha.lineHeight), c(e, "--letter-spacing-", (l = a.typography) == null ? void 0 : l.letterSpacing), c(e, "--shadow-", a.shadows), c(e, "--base-button-", (ma = a.components) == null ? void 0 : ma.button), c(e, "--base-badge-", (g = a.components) == null ? void 0 : g.badge), c(e, "--base-dropdown-", (S = a.components) == null ? void 0 : S.dropdown), c(e, "--base-select-", (wa = a.components) == null ? void 0 : wa.select), c(e, "--base-sidebar-", (ka = a.components) == null ? void 0 : ka.sidebar), c(e, "--base-block-controls-", (_a = a.components) == null ? void 0 : _a.blockControls), c(e, "--base-box-", (Sa = a.components) == null ? void 0 : Sa.box), c(e, "--base-breadcrumb-", (Ca = a.components) == null ? void 0 : Ca.breadcrumb), c(e, "--base-card-", (za = a.components) == null ? void 0 : za.card), c(e, "--base-multi-select-", (Ea = a.components) == null ? void 0 : Ea.multiSelect), c(e, "--base-navigation-menu-", (Aa = a.components) == null ? void 0 : Aa.navigationMenu), c(e, "--base-menubar-", (qa = a.components) == null ? void 0 : qa.menubar), c(e, "--base-context-menu-", (Ia = a.components) == null ? void 0 : Ia.contextMenu), c(e, "--base-alert-", (La = a.components) == null ? void 0 : La.alert), c(e, "--base-alert-dialog-", (Pa = a.components) == null ? void 0 : Pa.alertDialog), c(e, "--base-app-header-", (Ma = a.components) == null ? void 0 : Ma.appHeader), c(e, "--base-aspect-ratio-", (Da = a.components) == null ? void 0 : Da.aspectRatio), c(e, "--base-avatar-", (Ha = a.components) == null ? void 0 : Ha.avatar), c(e, "--base-menu-", (Oa = a.components) == null ? void 0 : Oa.menu), c(e, "--base-panel-", (Ra = a.components) == null ? void 0 : Ra.panel), c(e, "--base-input-", (Ta = a.components) == null ? void 0 : Ta.input);
1863
+ function Za(e, a) {
1864
+ var i, r, t, o, c, u, s, f, x, m, h, y, w, k, _, S, C, z, E, A, q, I, L, P, D, O, T, M, H, R, F, V, j, B, Z, U, Q, W, $, K, N, G, J, X, Y, aa, ea, ia, ra, oa, na, ta, la, sa, da, pa, ca, ua, fa, xa, ga, va, ma, l, ha, g, b, wa, ka, _a, Sa, Ca, za, Ea, Aa, qa, Ia, La, Pa, Da, Oa, Ta, Ma, Ha, Ra;
1865
+ n(e, "--ui-color-primary", a.colors.primary), n(e, "--ui-color-primary-hover", a.colors.primaryHover || a.colors.primary), n(e, "--ui-color-foreground-on-primary", a.colors.foregroundOnPrimary || "#ffffff"), n(e, "--ui-color-background", a.colors.background || "#ffffff"), n(e, "--ui-color-surface", a.colors.surface || a.colors.background || "#ffffff"), n(e, "--ui-color-surface-alt", a.colors.surfaceAlt || a.colors.surface || "#f9f9f9"), n(e, "--ui-color-text", a.colors.text || "#202020"), n(e, "--ui-color-muted", a.colors.muted || "#646464"), n(e, "--ui-color-border", a.colors.border || "#0000001f"), n(e, "--ui-color-focus-ring", a.colors.focusRing || a.colors.primary), n(e, "--ui-color-success", a.colors.success || "#30a46c"), n(e, "--ui-color-danger", a.colors.danger || "#e5484d"), n(e, "--ui-color-warning", a.colors.warning || a.colors.primary), n(e, "--ui-primary", a.colors.primary), n(e, "--ui-primary-hover", a.colors.primaryHover || a.colors.primary), n(e, "--ui-foreground", a.colors.foregroundOnPrimary || "#ffffff"), n(e, "--ui-background", a.colors.background || "#ffffff"), n(e, "--ui-surface", a.colors.surface || a.colors.background || "#ffffff"), n(e, "--ui-surface-alt", a.colors.surfaceAlt || a.colors.surface || "#f9f9f9"), n(e, "--ui-text", a.colors.text || "#202020"), n(e, "--ui-muted", a.colors.muted || "#646464"), n(e, "--ui-border", a.colors.border || "#0000001f"), n(e, "--ui-focus-ring", a.colors.focusRing || a.colors.primary), n(e, "--ui-success", a.colors.success || "#30a46c"), n(e, "--ui-error", a.colors.danger || "#e5484d"), n(e, "--ui-warning", a.colors.warning || a.colors.primary), n(e, "--ui-radius", a.radius || "4px"), n(e, "--ui-space-xs", ((i = a.spacing) == null ? void 0 : i.xs) || "4px"), n(e, "--ui-space-sm", ((r = a.spacing) == null ? void 0 : r.sm) || "8px"), n(e, "--ui-space-md", ((t = a.spacing) == null ? void 0 : t.md) || "12px"), n(e, "--ui-space-lg", ((o = a.spacing) == null ? void 0 : o.lg) || "24px"), n(e, "--ui-space-xl", ((c = a.spacing) == null ? void 0 : c.xl) || "32px"), n(e, "--ui-space-xxl", ((u = a.spacing) == null ? void 0 : u.xxl) || "48px"), n(e, "--ui-default-gap", ((s = a.spacing) == null ? void 0 : s.sm) || ((f = a.spaceScale) == null ? void 0 : f[2]) || "8px"), n(e, "--ui-shadow-sm", ((x = a.shadows) == null ? void 0 : x.sm) || ((m = a.shadows) == null ? void 0 : m[2]) || "none"), n(e, "--ui-shadow-md", ((h = a.shadows) == null ? void 0 : h.md) || ((y = a.shadows) == null ? void 0 : y[3]) || "none"), n(e, "--ui-shadow-lg", ((w = a.shadows) == null ? void 0 : w.lg) || ((k = a.shadows) == null ? void 0 : k[4]) || "none"), n(e, "--ui-font-family", ((_ = a.typography) == null ? void 0 : _.family) || "system-ui, sans-serif"), n(e, "--ui-font-family-heading", ((S = a.typography) == null ? void 0 : S.headingFamily) || ((C = a.typography) == null ? void 0 : C.family) || "system-ui, sans-serif"), n(e, "--ui-font-family-code", ((z = a.typography) == null ? void 0 : z.codeFamily) || "monospace"), n(e, "--ui-font-size-sm", ((A = (E = a.typography) == null ? void 0 : E.size) == null ? void 0 : A.sm) || "12px"), n(e, "--ui-font-size-md", ((I = (q = a.typography) == null ? void 0 : q.size) == null ? void 0 : I.md) || "14px"), n(e, "--ui-font-size-lg", ((P = (L = a.typography) == null ? void 0 : L.size) == null ? void 0 : P.lg) || "16px"), n(e, "--ui-default-font-size", ((O = (D = a.typography) == null ? void 0 : D.size) == null ? void 0 : O.md) || ((M = (T = a.typography) == null ? void 0 : T.fontScale) == null ? void 0 : M[2]) || "14px"), n(e, "--ui-default-line-height", ((R = (H = a.typography) == null ? void 0 : H.lineHeight) == null ? void 0 : R[2]) || "20px"), n(e, "--ui-default-letter-spacing", ((V = (F = a.typography) == null ? void 0 : F.letterSpacing) == null ? void 0 : V[2]) || "0em"), n(e, "--ui-motion-short", ((j = a.motion) == null ? void 0 : j.durationShort) || "120ms"), n(e, "--ui-motion-base", ((B = a.motion) == null ? void 0 : B.durationBase) || "180ms"), n(e, "--ui-motion-long", ((Z = a.motion) == null ? void 0 : Z.durationLong) || "260ms"), n(e, "--ui-motion-easing", ((U = a.motion) == null ? void 0 : U.easing) || "cubic-bezier(0.2, 0.8, 0.2, 1)"), n(e, "--ui-z-modal", String(((Q = a.zIndex) == null ? void 0 : Q.modal) ?? 1e3)), n(e, "--ui-z-overlay", String(((W = a.zIndex) == null ? void 0 : W.overlay) ?? 900)), n(e, "--ui-z-toast", String((($ = a.zIndex) == null ? void 0 : $.toast) ?? 1100)), n(e, "--ui-breakpoint-sm", ((K = a.breakpoints) == null ? void 0 : K.sm) || "640px"), n(e, "--ui-breakpoint-md", ((N = a.breakpoints) == null ? void 0 : N.md) || "768px"), n(e, "--ui-breakpoint-lg", ((G = a.breakpoints) == null ? void 0 : G.lg) || "1024px"), n(e, "--color-background", ((J = a.surfaces) == null ? void 0 : J.background) || a.colors.background || "#ffffff"), n(e, "--color-surface", ((X = a.surfaces) == null ? void 0 : X.surface) || a.colors.surface || "#fcfcfc"), n(e, "--color-panel", ((Y = a.surfaces) == null ? void 0 : Y.panel) || ((aa = a.surfaces) == null ? void 0 : aa.panelTranslucent) || "#ffffffcc"), n(e, "--color-panel-solid", ((ea = a.surfaces) == null ? void 0 : ea.panelSolid) || a.colors.surface || "#ffffff"), n(e, "--color-panel-translucent", ((ia = a.surfaces) == null ? void 0 : ia.panelTranslucent) || "#ffffffcc"), n(e, "--color-overlay", ((ra = a.surfaces) == null ? void 0 : ra.overlay) || "rgba(2, 6, 23, 0.52)"), n(e, "--color-transparent", ((oa = a.surfaces) == null ? void 0 : oa.transparent) || "transparent"), n(e, "--backdrop-filter-panel", ((na = a.effects) == null ? void 0 : na.backdropFilterPanel) || "blur(64px)"), (ta = a.palette) != null && ta.accentContrast && n(e, "--accent-contrast", a.palette.accentContrast), (la = a.palette) != null && la.accentSurface && n(e, "--accent-surface", a.palette.accentSurface), (sa = a.palette) != null && sa.accentIndicator && n(e, "--accent-indicator", a.palette.accentIndicator), (da = a.palette) != null && da.accentTrack && n(e, "--accent-track", a.palette.accentTrack), d(e, "--gray-", (pa = a.palette) == null ? void 0 : pa.gray), d(e, "--gray-a", (ca = a.palette) == null ? void 0 : ca.grayAlpha), d(e, "--black-a", (ua = a.palette) == null ? void 0 : ua.blackAlpha), d(e, "--white-a", (fa = a.palette) == null ? void 0 : fa.whiteAlpha), d(e, "--accent-", (xa = a.palette) == null ? void 0 : xa.accent), d(e, "--accent-a", (ga = a.palette) == null ? void 0 : ga.accentAlpha), d(e, "--space-", a.spaceScale), d(e, "--radius-", a.radiusScale), d(e, "--font-size-", (va = a.typography) == null ? void 0 : va.fontScale), d(e, "--line-height-", (ma = a.typography) == null ? void 0 : ma.lineHeight), d(e, "--letter-spacing-", (l = a.typography) == null ? void 0 : l.letterSpacing), d(e, "--shadow-", a.shadows), d(e, "--base-button-", (ha = a.components) == null ? void 0 : ha.button), d(e, "--base-badge-", (g = a.components) == null ? void 0 : g.badge), d(e, "--base-dropdown-", (b = a.components) == null ? void 0 : b.dropdown), d(e, "--base-select-", (wa = a.components) == null ? void 0 : wa.select), d(e, "--base-sidebar-", (ka = a.components) == null ? void 0 : ka.sidebar), d(e, "--base-block-controls-", (_a = a.components) == null ? void 0 : _a.blockControls), d(e, "--base-box-", (Sa = a.components) == null ? void 0 : Sa.box), d(e, "--base-breadcrumb-", (Ca = a.components) == null ? void 0 : Ca.breadcrumb), d(e, "--base-card-", (za = a.components) == null ? void 0 : za.card), d(e, "--base-multi-select-", (Ea = a.components) == null ? void 0 : Ea.multiSelect), d(e, "--base-navigation-menu-", (Aa = a.components) == null ? void 0 : Aa.navigationMenu), d(e, "--base-menubar-", (qa = a.components) == null ? void 0 : qa.menubar), d(e, "--base-context-menu-", (Ia = a.components) == null ? void 0 : Ia.contextMenu), d(e, "--base-alert-", (La = a.components) == null ? void 0 : La.alert), d(e, "--base-alert-dialog-", (Pa = a.components) == null ? void 0 : Pa.alertDialog), d(e, "--base-app-header-", (Da = a.components) == null ? void 0 : Da.appHeader), d(e, "--base-aspect-ratio-", (Oa = a.components) == null ? void 0 : Oa.aspectRatio), d(e, "--base-avatar-", (Ta = a.components) == null ? void 0 : Ta.avatar), d(e, "--base-menu-", (Ma = a.components) == null ? void 0 : Ma.menu), d(e, "--base-panel-", (Ha = a.components) == null ? void 0 : Ha.panel), d(e, "--base-input-", (Ra = a.components) == null ? void 0 : Ra.input);
1883
1866
  }
1884
- function pe(e, a = typeof document < "u" ? document : null) {
1867
+ function de(e, a = typeof document < "u" ? document : null) {
1885
1868
  if (!a)
1886
1869
  return;
1887
- const i = ne(e), o = a === document || a instanceof ShadowRoot;
1888
- let n;
1889
- if (a === document ? n = document.documentElement : a instanceof ShadowRoot ? n = a.host : n = a, Wa(n, i), o)
1890
- for (const r of re)
1870
+ const i = ne(e), r = a === document || a instanceof ShadowRoot;
1871
+ let t;
1872
+ if (a === document ? t = document.documentElement : a instanceof ShadowRoot ? t = a.host : t = a, Za(t, i), r)
1873
+ for (const o of oe)
1891
1874
  try {
1892
- Wa(r, i);
1875
+ Za(o, i);
1893
1876
  } catch {
1894
1877
  }
1895
1878
  }
1896
1879
  export {
1897
- te as V,
1898
1880
  de as _,
1899
- se as d,
1900
- le as s,
1901
- pe as z
1881
+ te as o,
1882
+ le as p,
1883
+ se as w
1902
1884
  };