aktion-runtime 0.5.6 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aktion.iife.js +27 -27
- package/dist/aktion.iife.js.map +1 -1
- package/dist/aktion.js +749 -731
- package/dist/aktion.js.map +1 -1
- package/dist/aktion.umd.cjs +27 -27
- package/dist/aktion.umd.cjs.map +1 -1
- package/dist/testing.js +29 -6
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/dist/aktion.js
CHANGED
|
@@ -241,11 +241,11 @@ function ki(t) {
|
|
|
241
241
|
if (i() === "0" && (y === "x" || y === "X" || y === "b" || y === "B" || y === "o" || y === "O")) {
|
|
242
242
|
for (v += s(), v += s(); r < t.length; ) {
|
|
243
243
|
const k = i() ?? "";
|
|
244
|
-
if (
|
|
244
|
+
if (qr(k)) {
|
|
245
245
|
v += s();
|
|
246
246
|
continue;
|
|
247
247
|
}
|
|
248
|
-
if (k === "_" &&
|
|
248
|
+
if (k === "_" && qr(i(1) ?? "")) {
|
|
249
249
|
v += s();
|
|
250
250
|
continue;
|
|
251
251
|
}
|
|
@@ -285,15 +285,15 @@ function ki(t) {
|
|
|
285
285
|
const b = a, h = n;
|
|
286
286
|
s();
|
|
287
287
|
let v = "";
|
|
288
|
-
for (; r < t.length &&
|
|
288
|
+
for (; r < t.length && Kr(i() ?? ""); )
|
|
289
289
|
v += s();
|
|
290
290
|
o("StateIdentifier", v, b, h);
|
|
291
291
|
continue;
|
|
292
292
|
}
|
|
293
|
-
if (
|
|
293
|
+
if (en(c)) {
|
|
294
294
|
const b = a, h = n;
|
|
295
295
|
let v = "";
|
|
296
|
-
for (; r < t.length &&
|
|
296
|
+
for (; r < t.length && Kr(i() ?? ""); )
|
|
297
297
|
v += s();
|
|
298
298
|
const y = wi[v];
|
|
299
299
|
y === "Boolean" ? o("Boolean", v, b, h) : y === "Null" ? o("Null", v, b, h) : yi.has(v) ? o("Keyword", v, b, h) : o("Identifier", v, b, h);
|
|
@@ -337,21 +337,21 @@ function ki(t) {
|
|
|
337
337
|
function Pe(t) {
|
|
338
338
|
return t >= "0" && t <= "9";
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function qr(t) {
|
|
341
341
|
return t >= "0" && t <= "9" || t >= "a" && t <= "f" || t >= "A" && t <= "F";
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function en(t) {
|
|
344
344
|
return t >= "a" && t <= "z" || t >= "A" && t <= "Z" || t === "_";
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
return
|
|
346
|
+
function Kr(t) {
|
|
347
|
+
return en(t) || Pe(t);
|
|
348
348
|
}
|
|
349
349
|
function ye(t) {
|
|
350
350
|
const e = ki(t), r = new Ni(e), a = [], n = [];
|
|
351
351
|
for (; !r.isEnd(); )
|
|
352
352
|
if (!(r.match("Newline") || r.match("Semicolon")))
|
|
353
353
|
try {
|
|
354
|
-
const i =
|
|
354
|
+
const i = jt(r, !0);
|
|
355
355
|
i && a.push(i);
|
|
356
356
|
} catch (i) {
|
|
357
357
|
const o = i;
|
|
@@ -359,7 +359,7 @@ function ye(t) {
|
|
|
359
359
|
}
|
|
360
360
|
return { statements: a, errors: n };
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function jt(t, e) {
|
|
363
363
|
const r = t.peek();
|
|
364
364
|
if (r.type === "StateIdentifier" && r.value === "effect" && t.peek(1).type === "Punctuation" && t.peek(1).value === "(")
|
|
365
365
|
return $i(t);
|
|
@@ -383,9 +383,9 @@ function Bt(t, e) {
|
|
|
383
383
|
case "let":
|
|
384
384
|
case "const":
|
|
385
385
|
case "var":
|
|
386
|
-
return
|
|
386
|
+
return Cr(t);
|
|
387
387
|
case "if":
|
|
388
|
-
return
|
|
388
|
+
return ln(t);
|
|
389
389
|
case "switch":
|
|
390
390
|
return Bi(t);
|
|
391
391
|
case "for":
|
|
@@ -404,9 +404,9 @@ function Bt(t, e) {
|
|
|
404
404
|
return qi(t);
|
|
405
405
|
}
|
|
406
406
|
const a = t.snapshot();
|
|
407
|
-
if (
|
|
407
|
+
if (tn(t))
|
|
408
408
|
try {
|
|
409
|
-
return
|
|
409
|
+
return nn(t);
|
|
410
410
|
} catch (n) {
|
|
411
411
|
if (n && typeof n == "object" && n.__definitive)
|
|
412
412
|
throw n;
|
|
@@ -414,7 +414,7 @@ function Bt(t, e) {
|
|
|
414
414
|
}
|
|
415
415
|
return Si(t);
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function tn(t) {
|
|
418
418
|
const e = t.peek();
|
|
419
419
|
if (e.type !== "Identifier" && e.type !== "StateIdentifier")
|
|
420
420
|
return !1;
|
|
@@ -425,8 +425,8 @@ function Si(t) {
|
|
|
425
425
|
const e = t.peek();
|
|
426
426
|
let r = F(t);
|
|
427
427
|
const a = t.peek();
|
|
428
|
-
if (a.type === "Operator" &&
|
|
429
|
-
if (
|
|
428
|
+
if (a.type === "Operator" && rn(a.value)) {
|
|
429
|
+
if (Gr(r)) {
|
|
430
430
|
t.consume();
|
|
431
431
|
const n = F(t);
|
|
432
432
|
r = {
|
|
@@ -440,7 +440,7 @@ function Si(t) {
|
|
|
440
440
|
loc: { line: a.line, column: a.column }
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
|
-
} else a.type === "Operator" && (a.value === "++" || a.value === "--") &&
|
|
443
|
+
} else a.type === "Operator" && (a.value === "++" || a.value === "--") && Gr(r) && (t.consume(), r = {
|
|
444
444
|
kind: "BuiltinCall",
|
|
445
445
|
name: "__rui_postfix__",
|
|
446
446
|
arguments: [r, { kind: "Literal", value: a.value }],
|
|
@@ -452,14 +452,14 @@ function Si(t) {
|
|
|
452
452
|
loc: { line: e.line, column: e.column }
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function rn(t) {
|
|
456
456
|
return t === "=" || t === "+=" || t === "-=" || t === "*=" || t === "/=" || t === "%=" || t === "**=" || t === "??=" || t === "&&=" || t === "||=" || t === "&=" || t === "|=" || t === "^=" || t === "<<=" || t === ">>=" || t === ">>>=";
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function Gr(t) {
|
|
459
459
|
return t.kind === "Member" || t.kind === "StateRef" || t.kind === "Identifier";
|
|
460
460
|
}
|
|
461
461
|
function It(t) {
|
|
462
|
-
const e = t.expect("Keyword", "function"), r = t.peek().type === "StateIdentifier", a = r ? t.consume() : t.expect("Identifier"), n =
|
|
462
|
+
const e = t.expect("Keyword", "function"), r = t.peek().type === "StateIdentifier", a = r ? t.consume() : t.expect("Identifier"), n = an(t), i = Fe(t);
|
|
463
463
|
return ae(t), r ? {
|
|
464
464
|
kind: "HookDeclaration",
|
|
465
465
|
name: a.value,
|
|
@@ -481,7 +481,7 @@ function It(t) {
|
|
|
481
481
|
loc: { line: e.line, column: e.column }
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function an(t) {
|
|
485
485
|
t.expect("Punctuation", "(");
|
|
486
486
|
const e = [];
|
|
487
487
|
if (z(t), !(t.peek().type === "Punctuation" && t.peek().value === ")"))
|
|
@@ -491,7 +491,7 @@ function nn(t) {
|
|
|
491
491
|
t.peek().type === "Operator" && t.peek().value === "..." && (t.consume(), r = !0);
|
|
492
492
|
const a = t.peek();
|
|
493
493
|
if (!r && a.type === "Punctuation" && (a.value === "{" || a.value === "[")) {
|
|
494
|
-
const n =
|
|
494
|
+
const n = Ar(t);
|
|
495
495
|
let i;
|
|
496
496
|
t.peek().type === "Operator" && t.peek().value === "=" && (t.consume(), i = F(t));
|
|
497
497
|
const o = { name: "", pattern: n };
|
|
@@ -596,7 +596,7 @@ function Ci(t, e, r) {
|
|
|
596
596
|
column: a.column
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function Cr(t) {
|
|
600
600
|
const e = t.consume(), r = t.peek();
|
|
601
601
|
if (r.type === "Punctuation" && (r.value === "[" || r.value === "{"))
|
|
602
602
|
return Ai(t, e);
|
|
@@ -622,7 +622,7 @@ function Ar(t) {
|
|
|
622
622
|
};
|
|
623
623
|
}
|
|
624
624
|
function Ai(t, e) {
|
|
625
|
-
const r =
|
|
625
|
+
const r = Ar(t);
|
|
626
626
|
t.expect("Operator", "=");
|
|
627
627
|
const a = F(t);
|
|
628
628
|
return ae(t), {
|
|
@@ -633,7 +633,7 @@ function Ai(t, e) {
|
|
|
633
633
|
loc: { line: e.line, column: e.column }
|
|
634
634
|
};
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function Ar(t) {
|
|
637
637
|
const r = t.consume().value === "[" ? "array" : "object", a = [];
|
|
638
638
|
if (r === "array") {
|
|
639
639
|
for (z(t); !(t.peek().type === "Punctuation" && t.peek().value === "]"); ) {
|
|
@@ -681,7 +681,7 @@ function Tr(t) {
|
|
|
681
681
|
function Fe(t) {
|
|
682
682
|
const e = t.expect("Punctuation", "{"), r = [];
|
|
683
683
|
for (z(t); !(t.peek().type === "Punctuation" && t.peek().value === "}"); ) {
|
|
684
|
-
const a =
|
|
684
|
+
const a = jt(t);
|
|
685
685
|
a && r.push(a), z(t);
|
|
686
686
|
}
|
|
687
687
|
return t.expect("Punctuation", "}"), {
|
|
@@ -693,7 +693,7 @@ function Fe(t) {
|
|
|
693
693
|
function Je(t) {
|
|
694
694
|
if (z(t), t.peek().type === "Punctuation" && t.peek().value === "{")
|
|
695
695
|
return Fe(t);
|
|
696
|
-
const e = t.peek(), r =
|
|
696
|
+
const e = t.peek(), r = jt(t);
|
|
697
697
|
return {
|
|
698
698
|
kind: "Block",
|
|
699
699
|
body: r ? [r] : [],
|
|
@@ -758,7 +758,7 @@ class Ni {
|
|
|
758
758
|
this.index = e;
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function nn(t) {
|
|
762
762
|
const e = t.peek();
|
|
763
763
|
let r = "", a = !1;
|
|
764
764
|
if (e.type === "Identifier")
|
|
@@ -856,14 +856,14 @@ function Pi(t) {
|
|
|
856
856
|
else if (r.type === "Keyword" && r.value === "async" && t.peek(1).type === "Keyword" && t.peek(1).value === "function")
|
|
857
857
|
t.consume(), a = It(t);
|
|
858
858
|
else if (r.type === "Keyword" && (r.value === "let" || r.value === "const" || r.value === "var")) {
|
|
859
|
-
if (a =
|
|
859
|
+
if (a = Cr(t), a && a.kind === "DestructureStatement")
|
|
860
860
|
throw {
|
|
861
861
|
message: "`export` of a destructuring declaration is not supported — export named bindings individually.",
|
|
862
862
|
line: r.line,
|
|
863
863
|
column: r.column
|
|
864
864
|
};
|
|
865
|
-
} else if (
|
|
866
|
-
a =
|
|
865
|
+
} else if (tn(t))
|
|
866
|
+
a = nn(t);
|
|
867
867
|
else
|
|
868
868
|
throw {
|
|
869
869
|
message: "`export` must be followed by a declaration or assignment (`export function …`, `export let x = …`, `export $state = …`).",
|
|
@@ -910,69 +910,69 @@ function zi(t) {
|
|
|
910
910
|
return e;
|
|
911
911
|
}
|
|
912
912
|
function Li(t) {
|
|
913
|
-
let e =
|
|
913
|
+
let e = Yr(t);
|
|
914
914
|
for (; pe(
|
|
915
915
|
t,
|
|
916
916
|
(r) => r.type === "Operator" && (r.value === "||" || r.value === "??")
|
|
917
917
|
); ) {
|
|
918
918
|
const r = t.consume().value;
|
|
919
919
|
z(t);
|
|
920
|
-
const a =
|
|
920
|
+
const a = Yr(t);
|
|
921
921
|
e = { kind: "Binary", operator: r, left: e, right: a };
|
|
922
922
|
}
|
|
923
923
|
return e;
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
let e =
|
|
925
|
+
function Yr(t) {
|
|
926
|
+
let e = Xr(t);
|
|
927
927
|
for (; pe(t, (r) => r.type === "Operator" && r.value === "&&"); ) {
|
|
928
928
|
t.consume(), z(t);
|
|
929
|
-
const r =
|
|
929
|
+
const r = Xr(t);
|
|
930
930
|
e = { kind: "Binary", operator: "&&", left: e, right: r };
|
|
931
931
|
}
|
|
932
932
|
return e;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
let e =
|
|
934
|
+
function Xr(t) {
|
|
935
|
+
let e = Jr(t);
|
|
936
936
|
for (; pe(t, (r) => r.type === "Operator" && r.value === "|"); ) {
|
|
937
937
|
t.consume(), z(t);
|
|
938
|
-
const r =
|
|
938
|
+
const r = Jr(t);
|
|
939
939
|
e = { kind: "Binary", operator: "|", left: e, right: r };
|
|
940
940
|
}
|
|
941
941
|
return e;
|
|
942
942
|
}
|
|
943
|
-
function
|
|
944
|
-
let e =
|
|
943
|
+
function Jr(t) {
|
|
944
|
+
let e = Zr(t);
|
|
945
945
|
for (; pe(t, (r) => r.type === "Operator" && r.value === "^"); ) {
|
|
946
946
|
t.consume(), z(t);
|
|
947
|
-
const r =
|
|
947
|
+
const r = Zr(t);
|
|
948
948
|
e = { kind: "Binary", operator: "^", left: e, right: r };
|
|
949
949
|
}
|
|
950
950
|
return e;
|
|
951
951
|
}
|
|
952
|
-
function
|
|
953
|
-
let e =
|
|
952
|
+
function Zr(t) {
|
|
953
|
+
let e = Qr(t);
|
|
954
954
|
for (; pe(t, (r) => r.type === "Operator" && r.value === "&"); ) {
|
|
955
955
|
t.consume(), z(t);
|
|
956
|
-
const r =
|
|
956
|
+
const r = Qr(t);
|
|
957
957
|
e = { kind: "Binary", operator: "&", left: e, right: r };
|
|
958
958
|
}
|
|
959
959
|
return e;
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
let e =
|
|
961
|
+
function Qr(t) {
|
|
962
|
+
let e = ea(t);
|
|
963
963
|
for (; pe(
|
|
964
964
|
t,
|
|
965
965
|
(r) => r.type === "Operator" && (r.value === "==" || r.value === "!=" || r.value === "===" || r.value === "!==")
|
|
966
966
|
); ) {
|
|
967
967
|
const r = t.consume().value;
|
|
968
968
|
z(t);
|
|
969
|
-
const a =
|
|
969
|
+
const a = ea(t);
|
|
970
970
|
e = { kind: "Binary", operator: r, left: e, right: a };
|
|
971
971
|
}
|
|
972
972
|
return e;
|
|
973
973
|
}
|
|
974
|
-
function
|
|
975
|
-
let e =
|
|
974
|
+
function ea(t) {
|
|
975
|
+
let e = Xt(t);
|
|
976
976
|
for (; ; ) {
|
|
977
977
|
if (pe(
|
|
978
978
|
t,
|
|
@@ -980,14 +980,14 @@ function ta(t) {
|
|
|
980
980
|
)) {
|
|
981
981
|
const r = t.consume().value;
|
|
982
982
|
z(t);
|
|
983
|
-
const a =
|
|
983
|
+
const a = Xt(t);
|
|
984
984
|
e = { kind: "Binary", operator: r, left: e, right: a };
|
|
985
985
|
continue;
|
|
986
986
|
}
|
|
987
987
|
if (pe(t, (r) => r.type === "Keyword" && (r.value === "instanceof" || r.value === "in"))) {
|
|
988
988
|
const r = t.consume().value;
|
|
989
989
|
z(t);
|
|
990
|
-
const a =
|
|
990
|
+
const a = Xt(t);
|
|
991
991
|
e = { kind: "Binary", operator: r, left: e, right: a };
|
|
992
992
|
continue;
|
|
993
993
|
}
|
|
@@ -995,47 +995,47 @@ function ta(t) {
|
|
|
995
995
|
}
|
|
996
996
|
return e;
|
|
997
997
|
}
|
|
998
|
-
function
|
|
999
|
-
let e =
|
|
998
|
+
function Xt(t) {
|
|
999
|
+
let e = ta(t);
|
|
1000
1000
|
for (; pe(
|
|
1001
1001
|
t,
|
|
1002
1002
|
(r) => r.type === "Operator" && (r.value === "<<" || r.value === ">>" || r.value === ">>>")
|
|
1003
1003
|
); ) {
|
|
1004
1004
|
const r = t.consume().value;
|
|
1005
1005
|
z(t);
|
|
1006
|
-
const a =
|
|
1006
|
+
const a = ta(t);
|
|
1007
1007
|
e = { kind: "Binary", operator: r, left: e, right: a };
|
|
1008
1008
|
}
|
|
1009
1009
|
return e;
|
|
1010
1010
|
}
|
|
1011
|
-
function
|
|
1012
|
-
let e =
|
|
1011
|
+
function ta(t) {
|
|
1012
|
+
let e = ra(t);
|
|
1013
1013
|
for (; pe(t, (r) => r.type === "Operator" && (r.value === "+" || r.value === "-")); ) {
|
|
1014
1014
|
const r = t.consume().value;
|
|
1015
1015
|
z(t);
|
|
1016
|
-
const a =
|
|
1016
|
+
const a = ra(t);
|
|
1017
1017
|
e = { kind: "Binary", operator: r, left: e, right: a };
|
|
1018
1018
|
}
|
|
1019
1019
|
return e;
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1022
|
-
let e =
|
|
1021
|
+
function ra(t) {
|
|
1022
|
+
let e = fr(t);
|
|
1023
1023
|
for (; pe(
|
|
1024
1024
|
t,
|
|
1025
1025
|
(r) => r.type === "Operator" && (r.value === "*" || r.value === "/" || r.value === "%")
|
|
1026
1026
|
); ) {
|
|
1027
1027
|
const r = t.consume().value;
|
|
1028
1028
|
z(t);
|
|
1029
|
-
const a =
|
|
1029
|
+
const a = fr(t);
|
|
1030
1030
|
e = { kind: "Binary", operator: r, left: e, right: a };
|
|
1031
1031
|
}
|
|
1032
1032
|
return e;
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function fr(t) {
|
|
1035
1035
|
const e = lt(t);
|
|
1036
1036
|
if (pe(t, (r) => r.type === "Operator" && r.value === "**")) {
|
|
1037
1037
|
t.consume(), z(t);
|
|
1038
|
-
const r =
|
|
1038
|
+
const r = fr(t);
|
|
1039
1039
|
return { kind: "Binary", operator: "**", left: e, right: r };
|
|
1040
1040
|
}
|
|
1041
1041
|
return e;
|
|
@@ -1075,7 +1075,7 @@ function lt(t) {
|
|
|
1075
1075
|
}
|
|
1076
1076
|
if (e.type === "Keyword" && e.value === "new") {
|
|
1077
1077
|
t.consume();
|
|
1078
|
-
let r =
|
|
1078
|
+
let r = sn(t), a = [];
|
|
1079
1079
|
if (r.kind === "Call")
|
|
1080
1080
|
a = r.arguments, r = { kind: "Identifier", name: r.callee, loc: r.loc };
|
|
1081
1081
|
else {
|
|
@@ -1109,7 +1109,7 @@ function lt(t) {
|
|
|
1109
1109
|
arguments: a,
|
|
1110
1110
|
loc: { line: e.line, column: e.column }
|
|
1111
1111
|
};
|
|
1112
|
-
return
|
|
1112
|
+
return on(t, n);
|
|
1113
1113
|
}
|
|
1114
1114
|
return Ri(t);
|
|
1115
1115
|
}
|
|
@@ -1126,9 +1126,9 @@ function Ri(t) {
|
|
|
1126
1126
|
}) : e;
|
|
1127
1127
|
}
|
|
1128
1128
|
function Di(t) {
|
|
1129
|
-
return
|
|
1129
|
+
return on(t, sn(t));
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function on(t, e) {
|
|
1132
1132
|
let r = e;
|
|
1133
1133
|
for (; ; ) {
|
|
1134
1134
|
pe(
|
|
@@ -1223,7 +1223,7 @@ function sn(t, e) {
|
|
|
1223
1223
|
}
|
|
1224
1224
|
return r;
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function sn(t) {
|
|
1227
1227
|
const e = t.peek();
|
|
1228
1228
|
if (e.type === "Keyword" && (e.value === "if" || e.value === "for" || e.value === "switch" || e.value === "while" || e.value === "try")) {
|
|
1229
1229
|
const r = e.value === "if" ? "Use the ternary operator (`cond ? a : b`) when you need a value." : e.value === "for" ? "Use `arr.map(x => …)` (or `.filter`, `.reduce`, …) to collect bodies into an array." : e.value === "switch" ? "Use chained ternaries, an object lookup, or wrap the switch inside a `function`." : `Use the ${e.value} statement inside a function / effect body.`, a = {
|
|
@@ -1239,7 +1239,7 @@ function ln(t) {
|
|
|
1239
1239
|
if (r.type === "Punctuation" && r.value === "(" || r.type === "Identifier" && a.type === "Punctuation" && a.value === "(") {
|
|
1240
1240
|
const i = e;
|
|
1241
1241
|
t.consume(), t.peek().type === "Identifier" && t.consume();
|
|
1242
|
-
const o =
|
|
1242
|
+
const o = an(t), s = Fe(t);
|
|
1243
1243
|
return {
|
|
1244
1244
|
kind: "Lambda",
|
|
1245
1245
|
params: o,
|
|
@@ -1299,7 +1299,7 @@ function ln(t) {
|
|
|
1299
1299
|
if (e.type === "Identifier") {
|
|
1300
1300
|
if (t.consume(), t.peek().type === "Operator" && t.peek().value === "=>") {
|
|
1301
1301
|
t.consume();
|
|
1302
|
-
const r =
|
|
1302
|
+
const r = cn(t);
|
|
1303
1303
|
return {
|
|
1304
1304
|
kind: "Lambda",
|
|
1305
1305
|
params: [{ name: e.value }],
|
|
@@ -1360,25 +1360,25 @@ function Ce(t) {
|
|
|
1360
1360
|
const e = [];
|
|
1361
1361
|
if (z(t), t.peek().type === "Punctuation" && (t.peek().value === ")" || t.peek().value === "]"))
|
|
1362
1362
|
return e;
|
|
1363
|
-
for (e.push(
|
|
1364
|
-
e.push(
|
|
1363
|
+
for (e.push(aa(t)), z(t); t.peek().type === "Punctuation" && t.peek().value === "," && (t.consume(), z(t), !(t.peek().type === "Punctuation" && (t.peek().value === ")" || t.peek().value === "]"))); )
|
|
1364
|
+
e.push(aa(t)), z(t);
|
|
1365
1365
|
return z(t), e;
|
|
1366
1366
|
}
|
|
1367
|
-
function
|
|
1367
|
+
function aa(t) {
|
|
1368
1368
|
if (t.peek().type === "Operator" && t.peek().value === "...") {
|
|
1369
1369
|
const e = t.consume();
|
|
1370
1370
|
return { kind: "Spread", argument: F(t), loc: { line: e.line, column: e.column } };
|
|
1371
1371
|
}
|
|
1372
1372
|
return F(t);
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1374
|
+
function ln(t) {
|
|
1375
1375
|
const e = t.expect("Keyword", "if");
|
|
1376
1376
|
t.expect("Punctuation", "(");
|
|
1377
1377
|
const r = F(t);
|
|
1378
1378
|
t.expect("Punctuation", ")");
|
|
1379
1379
|
const a = Je(t);
|
|
1380
1380
|
let n;
|
|
1381
|
-
return z(t), t.peek().type === "Keyword" && t.peek().value === "else" && (t.consume(), z(t), t.peek().type === "Keyword" && t.peek().value === "if" ? n =
|
|
1381
|
+
return z(t), t.peek().type === "Keyword" && t.peek().value === "else" && (t.consume(), z(t), t.peek().type === "Keyword" && t.peek().value === "if" ? n = ln(t) : n = Je(t)), ae(t), {
|
|
1382
1382
|
kind: "IfStatement",
|
|
1383
1383
|
test: r,
|
|
1384
1384
|
consequent: a,
|
|
@@ -1407,7 +1407,7 @@ function Bi(t) {
|
|
|
1407
1407
|
t.expect("Punctuation", ":"), z(t);
|
|
1408
1408
|
const i = [];
|
|
1409
1409
|
for (; !t.isEnd() && !(t.peek().type === "Keyword" && (t.peek().value === "case" || t.peek().value === "default")) && !(t.peek().type === "Punctuation" && t.peek().value === "}"); ) {
|
|
1410
|
-
const o =
|
|
1410
|
+
const o = jt(t);
|
|
1411
1411
|
o && i.push(o), z(t);
|
|
1412
1412
|
}
|
|
1413
1413
|
a.push({ test: n, body: i }), z(t);
|
|
@@ -1482,7 +1482,7 @@ function _i(t, e) {
|
|
|
1482
1482
|
let r;
|
|
1483
1483
|
if (t.peek().type !== "Semicolon")
|
|
1484
1484
|
if (t.peek().type === "Keyword" && (t.peek().value === "let" || t.peek().value === "const" || t.peek().value === "var")) {
|
|
1485
|
-
const o =
|
|
1485
|
+
const o = Cr(t);
|
|
1486
1486
|
o.kind === "Assignment" && (r = o), z(t);
|
|
1487
1487
|
} else {
|
|
1488
1488
|
const o = t.peek();
|
|
@@ -1497,7 +1497,7 @@ function _i(t, e) {
|
|
|
1497
1497
|
let a;
|
|
1498
1498
|
t.peek().type !== "Semicolon" && (a = F(t)), t.expect("Semicolon"), z(t);
|
|
1499
1499
|
let n;
|
|
1500
|
-
t.peek().type === "Punctuation" && t.peek().value === ")" || (n =
|
|
1500
|
+
t.peek().type === "Punctuation" && t.peek().value === ")" || (n = un(t)), t.expect("Punctuation", ")");
|
|
1501
1501
|
const i = Je(t);
|
|
1502
1502
|
return ae(t), {
|
|
1503
1503
|
kind: "ForClassicStatement",
|
|
@@ -1574,7 +1574,7 @@ function Ki(t) {
|
|
|
1574
1574
|
if (!n && i.type === "Punctuation" && (i.value === "{" || i.value === "[")) {
|
|
1575
1575
|
let s;
|
|
1576
1576
|
try {
|
|
1577
|
-
s =
|
|
1577
|
+
s = Ar(t);
|
|
1578
1578
|
} catch {
|
|
1579
1579
|
return null;
|
|
1580
1580
|
}
|
|
@@ -1614,7 +1614,7 @@ function Ki(t) {
|
|
|
1614
1614
|
if (z(t), !(t.peek().type === "Punctuation" && t.peek().value === ")") || (t.consume(), !(t.peek().type === "Operator" && t.peek().value === "=>")))
|
|
1615
1615
|
return null;
|
|
1616
1616
|
t.consume();
|
|
1617
|
-
const a =
|
|
1617
|
+
const a = cn(t);
|
|
1618
1618
|
return {
|
|
1619
1619
|
kind: "Lambda",
|
|
1620
1620
|
params: r,
|
|
@@ -1622,13 +1622,13 @@ function Ki(t) {
|
|
|
1622
1622
|
loc: { line: e.line, column: e.column }
|
|
1623
1623
|
};
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1626
|
-
return z(t), t.peek().type === "Punctuation" && t.peek().value === "{" ? Fe(t) :
|
|
1625
|
+
function cn(t) {
|
|
1626
|
+
return z(t), t.peek().type === "Punctuation" && t.peek().value === "{" ? Fe(t) : un(t);
|
|
1627
1627
|
}
|
|
1628
|
-
function
|
|
1628
|
+
function un(t) {
|
|
1629
1629
|
const e = F(t), r = t.peek();
|
|
1630
1630
|
if (r.type === "Operator") {
|
|
1631
|
-
if (
|
|
1631
|
+
if (rn(r.value)) {
|
|
1632
1632
|
t.consume();
|
|
1633
1633
|
const a = F(t);
|
|
1634
1634
|
return {
|
|
@@ -1706,7 +1706,7 @@ function Yi(t) {
|
|
|
1706
1706
|
let e = t.replace(/_/g, ""), r = 1;
|
|
1707
1707
|
return e.startsWith("-") ? (r = -1, e = e.slice(1)) : e.startsWith("+") && (e = e.slice(1)), r * Number(e);
|
|
1708
1708
|
}
|
|
1709
|
-
function
|
|
1709
|
+
function Vg(t) {
|
|
1710
1710
|
const e = ye(t);
|
|
1711
1711
|
return Xi(t, e);
|
|
1712
1712
|
}
|
|
@@ -1734,20 +1734,20 @@ function Xi(t, e) {
|
|
|
1734
1734
|
return {
|
|
1735
1735
|
committedSource: i,
|
|
1736
1736
|
draftingSource: o,
|
|
1737
|
-
committedBindings: a.map(
|
|
1738
|
-
uncommittedBindings: n.map(
|
|
1737
|
+
committedBindings: a.map(na).filter((s) => s !== null),
|
|
1738
|
+
uncommittedBindings: n.map(na).filter((s) => s !== null),
|
|
1739
1739
|
committedStatements: a,
|
|
1740
1740
|
errors: e.errors
|
|
1741
1741
|
};
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function Wg(t, e) {
|
|
1744
1744
|
if (e.length === 0) return !0;
|
|
1745
1745
|
const r = new Set(t.committedBindings);
|
|
1746
1746
|
for (const a of e)
|
|
1747
1747
|
if (!r.has(a)) return !1;
|
|
1748
1748
|
return !0;
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function na(t) {
|
|
1751
1751
|
switch (t.kind) {
|
|
1752
1752
|
case "Assignment":
|
|
1753
1753
|
return t.identifier;
|
|
@@ -1768,25 +1768,25 @@ function Ji(t, e) {
|
|
|
1768
1768
|
` && (a += 1), r += 1;
|
|
1769
1769
|
return { before: t.slice(0, r), after: t.slice(r) };
|
|
1770
1770
|
}
|
|
1771
|
-
const
|
|
1771
|
+
const dn = 1;
|
|
1772
1772
|
function Zi(t) {
|
|
1773
1773
|
if (!t || typeof t != "object") return !1;
|
|
1774
1774
|
const e = t;
|
|
1775
|
-
return e.__aktionCompiled ===
|
|
1775
|
+
return e.__aktionCompiled === dn && typeof e.source == "string" && typeof e.path == "string" && !!e.program && Array.isArray(e.program.statements);
|
|
1776
1776
|
}
|
|
1777
|
-
function
|
|
1777
|
+
function qg(t) {
|
|
1778
1778
|
return t;
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function Kg(t, e = {}) {
|
|
1781
1781
|
const r = ye(t);
|
|
1782
1782
|
return {
|
|
1783
|
-
__aktionCompiled:
|
|
1783
|
+
__aktionCompiled: dn,
|
|
1784
1784
|
program: r,
|
|
1785
1785
|
source: t,
|
|
1786
1786
|
path: e.path ?? "<inline>"
|
|
1787
1787
|
};
|
|
1788
1788
|
}
|
|
1789
|
-
const ke = " ",
|
|
1789
|
+
const ke = " ", ia = /^[A-Za-z_$][A-Za-z0-9_$]*$/, Qi = /[\\"]/;
|
|
1790
1790
|
function eo(t) {
|
|
1791
1791
|
const e = [];
|
|
1792
1792
|
let r = null;
|
|
@@ -1822,7 +1822,7 @@ function Ze(t, e) {
|
|
|
1822
1822
|
return `${r}${a}${n} = ${i}`;
|
|
1823
1823
|
}
|
|
1824
1824
|
case "ComponentDeclaration": {
|
|
1825
|
-
const n = t.params.map(
|
|
1825
|
+
const n = t.params.map(Jt).join(", "), i = `${r}${a}function ${t.name}(${n}) {`, o = ce(t.body.body, e + 1);
|
|
1826
1826
|
return o.length > 0 ? `${i}
|
|
1827
1827
|
${o}
|
|
1828
1828
|
${r}}` : `${i}
|
|
@@ -1837,13 +1837,13 @@ ${i}
|
|
|
1837
1837
|
${r}}, ${o})`;
|
|
1838
1838
|
}
|
|
1839
1839
|
case "ActionDeclaration": {
|
|
1840
|
-
const n = t.params.map(
|
|
1840
|
+
const n = t.params.map(Jt).join(", "), i = `${r}${a}function ${t.name}(${n}) {`, o = ce(t.body.body, e + 1);
|
|
1841
1841
|
return `${i}
|
|
1842
1842
|
${o}
|
|
1843
1843
|
${r}}`;
|
|
1844
1844
|
}
|
|
1845
1845
|
case "HookDeclaration": {
|
|
1846
|
-
const n = t.params.map(
|
|
1846
|
+
const n = t.params.map(Jt).join(", "), i = `${r}${a}function $${t.name}(${n}) {`, o = ce(t.body.body, e + 1);
|
|
1847
1847
|
return `${i}
|
|
1848
1848
|
${o}
|
|
1849
1849
|
${r}}`;
|
|
@@ -1935,7 +1935,7 @@ ${r}}`;
|
|
|
1935
1935
|
}
|
|
1936
1936
|
}
|
|
1937
1937
|
}
|
|
1938
|
-
function
|
|
1938
|
+
function Jt(t) {
|
|
1939
1939
|
return t.defaultValue ? `${t.name} = ${V(t.defaultValue, 0)}` : t.name;
|
|
1940
1940
|
}
|
|
1941
1941
|
function ro(t) {
|
|
@@ -2046,12 +2046,12 @@ ${ke.repeat(e + 1)}break`;
|
|
|
2046
2046
|
function no(t, e) {
|
|
2047
2047
|
if (t.spread) return `...${V(t.value, e)}`;
|
|
2048
2048
|
const r = V(t.value, e);
|
|
2049
|
-
return t.value.kind === "Identifier" && t.value.name === t.key &&
|
|
2049
|
+
return t.value.kind === "Identifier" && t.value.name === t.key && ia.test(t.key) ? t.key : `${ia.test(t.key) ? t.key : pn(t.key)}: ${r}`;
|
|
2050
2050
|
}
|
|
2051
2051
|
function io(t) {
|
|
2052
|
-
return t === null ? "null" : typeof t == "string" ?
|
|
2052
|
+
return t === null ? "null" : typeof t == "string" ? pn(t) : typeof t == "boolean" ? t ? "true" : "false" : String(t);
|
|
2053
2053
|
}
|
|
2054
|
-
function
|
|
2054
|
+
function pn(t) {
|
|
2055
2055
|
return Qi.test(t) ? `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"` : `"${t}"`;
|
|
2056
2056
|
}
|
|
2057
2057
|
function oo(t, e, r) {
|
|
@@ -2086,7 +2086,7 @@ function lo(t, e) {
|
|
|
2086
2086
|
if (a.errors.length > 0 || a.statements.length === 0)
|
|
2087
2087
|
return {
|
|
2088
2088
|
programText: t,
|
|
2089
|
-
warning: `delta(new): could not parse "${
|
|
2089
|
+
warning: `delta(new): could not parse "${oa(e.source)}" — op skipped`
|
|
2090
2090
|
};
|
|
2091
2091
|
const n = t.endsWith(`
|
|
2092
2092
|
`) ? "" : `
|
|
@@ -2095,14 +2095,14 @@ function lo(t, e) {
|
|
|
2095
2095
|
` };
|
|
2096
2096
|
}
|
|
2097
2097
|
case "delete": {
|
|
2098
|
-
const a =
|
|
2098
|
+
const a = Zt(r, e.binding);
|
|
2099
2099
|
return a < 0 ? {
|
|
2100
2100
|
programText: t,
|
|
2101
2101
|
warning: `delta(delete): binding "${e.binding}" not found — op skipped`
|
|
2102
|
-
} : { programText:
|
|
2102
|
+
} : { programText: Qt(t, r, a, null) };
|
|
2103
2103
|
}
|
|
2104
2104
|
case "replace": {
|
|
2105
|
-
const a =
|
|
2105
|
+
const a = Zt(r, e.binding);
|
|
2106
2106
|
return a < 0 ? {
|
|
2107
2107
|
programText: t,
|
|
2108
2108
|
warning: `delta(replace): binding "${e.binding}" not found — op skipped`
|
|
@@ -2110,11 +2110,11 @@ function lo(t, e) {
|
|
|
2110
2110
|
programText: t,
|
|
2111
2111
|
warning: `delta(replace): could not parse new source for "${e.binding}" — op skipped`
|
|
2112
2112
|
} : {
|
|
2113
|
-
programText:
|
|
2113
|
+
programText: Qt(t, r, a, `${e.binding} = ${e.source.trim()}`)
|
|
2114
2114
|
};
|
|
2115
2115
|
}
|
|
2116
2116
|
case "append": {
|
|
2117
|
-
const a =
|
|
2117
|
+
const a = Zt(r, e.binding);
|
|
2118
2118
|
if (a < 0)
|
|
2119
2119
|
return {
|
|
2120
2120
|
programText: t,
|
|
@@ -2130,14 +2130,14 @@ function lo(t, e) {
|
|
|
2130
2130
|
if (i.errors.length > 0 || !o || o.kind !== "Assignment")
|
|
2131
2131
|
return {
|
|
2132
2132
|
programText: t,
|
|
2133
|
-
warning: `delta(append): could not parse item "${
|
|
2133
|
+
warning: `delta(append): could not parse item "${oa(e.item)}" — op skipped`
|
|
2134
2134
|
};
|
|
2135
2135
|
const s = n.expression.elements, c = `${e.binding} = [${[...s.map(ge), e.item.trim()].join(", ")}]`;
|
|
2136
|
-
return { programText:
|
|
2136
|
+
return { programText: Qt(t, r, a, c) };
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
2139
|
}
|
|
2140
|
-
function
|
|
2140
|
+
function Zt(t, e) {
|
|
2141
2141
|
return t.statements.findIndex((r) => co(r) === e);
|
|
2142
2142
|
}
|
|
2143
2143
|
function co(t) {
|
|
@@ -2153,7 +2153,7 @@ function co(t) {
|
|
|
2153
2153
|
return null;
|
|
2154
2154
|
}
|
|
2155
2155
|
}
|
|
2156
|
-
function
|
|
2156
|
+
function Qt(t, e, r, a) {
|
|
2157
2157
|
const n = t.split(`
|
|
2158
2158
|
`), i = e.statements[r], o = e.statements[r + 1], s = (i.loc?.line ?? 1) - 1, c = o ? (o.loc?.line ?? n.length + 1) - 1 : n.length, u = n.slice(0, s), p = n.slice(c);
|
|
2159
2159
|
return a === null ? [...u, ...p].join(`
|
|
@@ -2194,17 +2194,17 @@ function ge(t) {
|
|
|
2194
2194
|
return "/* unprintable */";
|
|
2195
2195
|
}
|
|
2196
2196
|
}
|
|
2197
|
-
function
|
|
2197
|
+
function oa(t) {
|
|
2198
2198
|
return t.length > 40 ? `${t.slice(0, 37)}...` : t;
|
|
2199
2199
|
}
|
|
2200
|
-
const
|
|
2200
|
+
const sa = /* @__PURE__ */ new WeakMap();
|
|
2201
2201
|
function uo(t) {
|
|
2202
|
-
let e =
|
|
2202
|
+
let e = sa.get(t.components);
|
|
2203
2203
|
if (!e) {
|
|
2204
2204
|
e = /* @__PURE__ */ new Map();
|
|
2205
2205
|
for (const r of t.components)
|
|
2206
2206
|
r?.name && e.set(r.name, r);
|
|
2207
|
-
|
|
2207
|
+
sa.set(t.components, e);
|
|
2208
2208
|
}
|
|
2209
2209
|
return e;
|
|
2210
2210
|
}
|
|
@@ -2221,12 +2221,12 @@ function po(t, e) {
|
|
|
2221
2221
|
function Ue(t, e) {
|
|
2222
2222
|
return uo(t).get(e);
|
|
2223
2223
|
}
|
|
2224
|
-
function
|
|
2224
|
+
function mn(t) {
|
|
2225
2225
|
const e = t.props.findIndex((r) => r.positional === !0);
|
|
2226
2226
|
return e >= 0 ? e : t.props.length > 0 ? 0 : -1;
|
|
2227
2227
|
}
|
|
2228
|
-
function
|
|
2229
|
-
const e =
|
|
2228
|
+
function fn(t) {
|
|
2229
|
+
const e = mn(t);
|
|
2230
2230
|
return e >= 0 ? t.props[e] : void 0;
|
|
2231
2231
|
}
|
|
2232
2232
|
function mo(t) {
|
|
@@ -2246,11 +2246,11 @@ function fo(t, e) {
|
|
|
2246
2246
|
n < e.length && (r[a.name] = e[n]);
|
|
2247
2247
|
}), r;
|
|
2248
2248
|
}
|
|
2249
|
-
function
|
|
2250
|
-
const r = ye(t), a =
|
|
2249
|
+
function Gg(t, e) {
|
|
2250
|
+
const r = ye(t), a = gn(r, e);
|
|
2251
2251
|
return a.length > 0 && (r.errors = [...r.errors, ...a]), r;
|
|
2252
2252
|
}
|
|
2253
|
-
function
|
|
2253
|
+
function gn(t, e) {
|
|
2254
2254
|
const r = [];
|
|
2255
2255
|
for (const a of t.statements)
|
|
2256
2256
|
se(a, e, r);
|
|
@@ -2407,7 +2407,7 @@ function go(t, e, r) {
|
|
|
2407
2407
|
for (let p = 0; p < i.length; p++)
|
|
2408
2408
|
p !== o && c.push(i[p]);
|
|
2409
2409
|
if (c.length > 1) {
|
|
2410
|
-
const d =
|
|
2410
|
+
const d = fn(a)?.name ?? "(none)", m = ho(i, s), g = a.props.filter((h) => h.name !== d && !m.has(h.name)).slice(0, c.length - 1).map((h) => h.name), b = g.length > 0 ? g.map((h) => `${h}: …`).join(", ") : "use a trailing { prop: value } object";
|
|
2411
2411
|
r.push({
|
|
2412
2412
|
message: `${t.callee}(...) — Aktion 0.5 §19.1 allows at most one positional argument (the "${d}" prop). The extra ${c.length - 1} positional argument(s) must be passed inside a trailing object: ${b}. Multi-positional calls are removed.`,
|
|
2413
2413
|
line: t.loc?.line ?? 0,
|
|
@@ -2478,7 +2478,7 @@ function xo(t) {
|
|
|
2478
2478
|
}
|
|
2479
2479
|
return "$theme({ colors: {...}, radius: {...}, font: {...} })";
|
|
2480
2480
|
}
|
|
2481
|
-
const
|
|
2481
|
+
const gr = {
|
|
2482
2482
|
name: "aktion",
|
|
2483
2483
|
atoms: ["true", "false", "null", "undefined"],
|
|
2484
2484
|
// Full reserved-word set, kept in sync with `KEYWORDS_AKTION` in
|
|
@@ -2737,7 +2737,7 @@ import { $count } from "./store.aktion"`
|
|
|
2737
2737
|
example: "void sideEffect()"
|
|
2738
2738
|
}
|
|
2739
2739
|
};
|
|
2740
|
-
function ko(t =
|
|
2740
|
+
function ko(t = gr) {
|
|
2741
2741
|
const e = () => ({ inBacktick: !1, inBlockComment: !1 }), r = (d) => ({ ...d }), a = new Set(t.atoms), n = new Set(t.keywords), i = /^[A-Z][A-Za-z0-9_]*/, o = /^[a-z_][A-Za-z0-9_]*/, s = /^-?\d+(?:\.\d+)?/, c = /* @__PURE__ */ new Set([...t.operators.join(""), ..."=<>!&|"]), u = (d, m) => {
|
|
2742
2742
|
for (; !d.eol(); ) {
|
|
2743
2743
|
const g = d.next();
|
|
@@ -2838,7 +2838,7 @@ const So = {
|
|
|
2838
2838
|
property: "propertyName",
|
|
2839
2839
|
operator: "operator",
|
|
2840
2840
|
punctuation: null
|
|
2841
|
-
},
|
|
2841
|
+
}, Tr = [
|
|
2842
2842
|
// Hooks (per-instance state — mirror React's use* family).
|
|
2843
2843
|
{
|
|
2844
2844
|
name: "state",
|
|
@@ -2989,26 +2989,26 @@ const So = {
|
|
|
2989
2989
|
summary: "Translation bundle → { t, setCurrentLanguage, getCurrentLanguage }."
|
|
2990
2990
|
}
|
|
2991
2991
|
], $o = new Set(
|
|
2992
|
-
|
|
2992
|
+
Tr.map((t) => t.name)
|
|
2993
2993
|
), Co = Object.freeze(
|
|
2994
|
-
Object.fromEntries(
|
|
2994
|
+
Object.fromEntries(Tr.map((t) => [t.name, t]))
|
|
2995
2995
|
);
|
|
2996
|
-
function
|
|
2996
|
+
function Yg(t) {
|
|
2997
2997
|
return Co[t];
|
|
2998
2998
|
}
|
|
2999
|
-
function
|
|
2999
|
+
function Xg(t) {
|
|
3000
3000
|
return $o.has(t);
|
|
3001
3001
|
}
|
|
3002
|
-
const Ao = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css",
|
|
3002
|
+
const Ao = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css", la = "6.7.2", ca = "data-rui-font-awesome", To = /* @__PURE__ */ new Set(["solid", "regular", "brands"]), ua = "solid";
|
|
3003
3003
|
function Mo(t) {
|
|
3004
|
-
typeof document < "u" &&
|
|
3004
|
+
typeof document < "u" && da(document.head, document), da(t, t.ownerDocument ?? document);
|
|
3005
3005
|
}
|
|
3006
|
-
function
|
|
3006
|
+
function da(t, e) {
|
|
3007
3007
|
if (No() || t.querySelector(
|
|
3008
|
-
`link[${
|
|
3008
|
+
`link[${ca}="${la}"]`
|
|
3009
3009
|
)) return;
|
|
3010
3010
|
const a = e.createElement("link");
|
|
3011
|
-
a.rel = "stylesheet", a.href = Ao, a.setAttribute(
|
|
3011
|
+
a.rel = "stylesheet", a.href = Ao, a.setAttribute(ca, la);
|
|
3012
3012
|
try {
|
|
3013
3013
|
t.appendChild(a);
|
|
3014
3014
|
} catch {
|
|
@@ -3017,7 +3017,7 @@ function pa(t, e) {
|
|
|
3017
3017
|
function No() {
|
|
3018
3018
|
return typeof globalThis.happyDOM < "u";
|
|
3019
3019
|
}
|
|
3020
|
-
function
|
|
3020
|
+
function Bt(t) {
|
|
3021
3021
|
if (typeof t != "string") return [];
|
|
3022
3022
|
const e = Po(t).trim();
|
|
3023
3023
|
if (!e) return [];
|
|
@@ -3031,9 +3031,9 @@ function Po(t) {
|
|
|
3031
3031
|
}
|
|
3032
3032
|
function Eo(t) {
|
|
3033
3033
|
const e = t.indexOf(":");
|
|
3034
|
-
if (e === -1) return [
|
|
3034
|
+
if (e === -1) return [ua, t];
|
|
3035
3035
|
const r = t.slice(0, e).trim().toLowerCase(), a = t.slice(e + 1).trim();
|
|
3036
|
-
return To.has(r) ? [r, a] : [
|
|
3036
|
+
return To.has(r) ? [r, a] : [ua, a || t];
|
|
3037
3037
|
}
|
|
3038
3038
|
function zo(t) {
|
|
3039
3039
|
return /^[a-zA-Z0-9:_-]+$/.test(t);
|
|
@@ -3122,7 +3122,7 @@ function Uo(t) {
|
|
|
3122
3122
|
const e = t.__kind;
|
|
3123
3123
|
return e === "Component" || e === "UserComponent";
|
|
3124
3124
|
}
|
|
3125
|
-
function
|
|
3125
|
+
function hr(t, e, r, a, n, i) {
|
|
3126
3126
|
const o = e.format ?? "text";
|
|
3127
3127
|
let s = r;
|
|
3128
3128
|
if (typeof e.render == "function")
|
|
@@ -3151,7 +3151,7 @@ function br(t, e, r, a, n, i) {
|
|
|
3151
3151
|
function D(t, e = {}) {
|
|
3152
3152
|
const r = f(t);
|
|
3153
3153
|
if (!r) return null;
|
|
3154
|
-
const a = e.color ? Oo(e.color) : "", n = a ? `color:${a};` : null, i =
|
|
3154
|
+
const a = e.color ? Oo(e.color) : "", n = a ? `color:${a};` : null, i = Bt(r), o = ["rui-icon", e.className].filter(Boolean).join(" ");
|
|
3155
3155
|
return i.length === 0 ? l("span", {
|
|
3156
3156
|
class: o,
|
|
3157
3157
|
"data-icon-size": e.size ?? null,
|
|
@@ -3182,7 +3182,7 @@ function Wo(t) {
|
|
|
3182
3182
|
function qo(t) {
|
|
3183
3183
|
return Vo[t] ?? "flex-start";
|
|
3184
3184
|
}
|
|
3185
|
-
function
|
|
3185
|
+
function pa(t, e) {
|
|
3186
3186
|
return e ? t === "row" ? "row-reverse" : t === "column" ? "column-reverse" : t.endsWith("-reverse") ? t : `${t}-reverse` : t;
|
|
3187
3187
|
}
|
|
3188
3188
|
function He(t, e, r) {
|
|
@@ -3197,7 +3197,7 @@ function Ko(t, e, r, a) {
|
|
|
3197
3197
|
i && t.push(`${r}-${n}:${a(String(i))}`);
|
|
3198
3198
|
}
|
|
3199
3199
|
}
|
|
3200
|
-
function
|
|
3200
|
+
function ma(t, e, r, a) {
|
|
3201
3201
|
const n = he(t);
|
|
3202
3202
|
if (n.kind === "single") {
|
|
3203
3203
|
const i = n.value ? String(n.value) : a.defaultToken;
|
|
@@ -3244,7 +3244,7 @@ const Xo = {
|
|
|
3244
3244
|
return u.append(r.renderNode(e.child)), u;
|
|
3245
3245
|
}
|
|
3246
3246
|
};
|
|
3247
|
-
function
|
|
3247
|
+
function Mr(t, e, r, a, n) {
|
|
3248
3248
|
const i = he(t), o = he(a.gap), s = he(a.padding), c = T(a.reverse), u = {
|
|
3249
3249
|
class: "rui-stack",
|
|
3250
3250
|
"data-wrap": T(a.wrap) ? "true" : null,
|
|
@@ -3254,21 +3254,21 @@ function Nr(t, e, r, a, n) {
|
|
|
3254
3254
|
}, p = [];
|
|
3255
3255
|
if (i.kind === "single") {
|
|
3256
3256
|
const g = i.value ? String(i.value) : "column";
|
|
3257
|
-
u["data-direction"] =
|
|
3257
|
+
u["data-direction"] = pa(g, c);
|
|
3258
3258
|
} else {
|
|
3259
3259
|
u["data-direction"] = "responsive", u["data-responsive-dir"] = "true";
|
|
3260
3260
|
for (const g of et) {
|
|
3261
3261
|
const b = i.values[g];
|
|
3262
|
-
b && p.push(`--rui-stack-dir-${g}:${
|
|
3262
|
+
b && p.push(`--rui-stack-dir-${g}:${pa(String(b), c)}`);
|
|
3263
3263
|
}
|
|
3264
3264
|
}
|
|
3265
|
-
o.kind === "single" ? u["data-gap"] = o.value ? String(o.value) : "m" : (u["data-gap"] = "responsive", u["data-responsive-gap"] = "true", He(p, o, "--rui-stack-gap")),
|
|
3265
|
+
o.kind === "single" ? u["data-gap"] = o.value ? String(o.value) : "m" : (u["data-gap"] = "responsive", u["data-responsive-gap"] = "true", He(p, o, "--rui-stack-gap")), ma(a.align, p, u, {
|
|
3266
3266
|
attrName: "data-align",
|
|
3267
3267
|
responsiveFlag: "data-responsive-align",
|
|
3268
3268
|
cssVarPrefix: "--rui-stack-align",
|
|
3269
3269
|
defaultToken: r,
|
|
3270
3270
|
mapper: Wo
|
|
3271
|
-
}),
|
|
3271
|
+
}), ma(a.justify, p, u, {
|
|
3272
3272
|
attrName: "data-justify",
|
|
3273
3273
|
responsiveFlag: "data-responsive-justify",
|
|
3274
3274
|
cssVarPrefix: "--rui-stack-justify",
|
|
@@ -3287,22 +3287,22 @@ function Nr(t, e, r, a, n) {
|
|
|
3287
3287
|
m.append(n.renderNode(g));
|
|
3288
3288
|
return m;
|
|
3289
3289
|
}
|
|
3290
|
-
const Jo = { name: "gap", type: "string | object", optional: !0, enum: ["xs", "s", "m", "l", "xl"], description: "Spacing between children. May be a responsive map." },
|
|
3290
|
+
const Jo = { name: "gap", type: "string | object", optional: !0, enum: ["xs", "s", "m", "l", "xl"], description: "Spacing between children. May be a responsive map." }, Nr = { name: "justify", type: "string | object", optional: !0, enum: ["start", "center", "end", "between", "around", "evenly"], description: "Main-axis distribution. May be a responsive map." }, Ir = { name: "wrap", type: "boolean", optional: !0, description: "Wrap children onto multiple lines when they overflow" }, Pr = { name: "reverse", type: "boolean", optional: !0, description: "Reverse the visual order of children" }, Er = { name: "padding", type: "string | object", optional: !0, enum: ["xs", "s", "m", "l", "xl"], description: "Inner padding token. May be a responsive map." }, zr = { name: "inline", type: "boolean", optional: !0, description: "Use inline-flex (shrink-to-fit) instead of a full-width block" }, hn = { name: "alignContent", type: "string", optional: !0, enum: ["start", "center", "end", "between", "around", "stretch"], description: "Alignment of wrapped lines (only when `wrap` is on)" }, Zo = {
|
|
3291
3291
|
name: "Row",
|
|
3292
3292
|
description: "Lay children out horizontally (left → right) with even spacing. The developer-friendly default: children keep their natural width and are vertically centered. Set `grow=true` to make children share the row equally (for equal-width columns prefer `Grid(columns: N)`); drop a `Spacer()` between children to push them apart; wrap a child in `StackItem` for per-child grow/shrink/alignment. Use `wrap=true` for chips/tags that should flow onto multiple lines.",
|
|
3293
3293
|
props: [
|
|
3294
3294
|
{ name: "children", type: "Node[]", description: "Children laid out left → right" },
|
|
3295
3295
|
{ name: "gap", type: "string | object", optional: !0, enum: ["xs", "s", "m", "l", "xl"], description: "Horizontal spacing between children (default `m`). May be a responsive map." },
|
|
3296
3296
|
{ name: "align", type: "string | object", optional: !0, enum: ["start", "center", "end", "stretch"], description: "Vertical alignment of children (default `center`). May be a responsive map." },
|
|
3297
|
-
{ ...
|
|
3297
|
+
{ ...Nr },
|
|
3298
3298
|
{ name: "grow", type: "boolean", optional: !0, description: "Children share the row width equally (replaces the old `uniform`)" },
|
|
3299
|
+
{ ...Ir },
|
|
3299
3300
|
{ ...Pr },
|
|
3300
3301
|
{ ...Er },
|
|
3301
3302
|
{ ...zr },
|
|
3302
|
-
{ ...
|
|
3303
|
-
{ ...bn }
|
|
3303
|
+
{ ...hn }
|
|
3304
3304
|
],
|
|
3305
|
-
render: (t, e, r) =>
|
|
3305
|
+
render: (t, e, r) => Mr("row", T(e.grow), "center", e, r)
|
|
3306
3306
|
}, Qo = {
|
|
3307
3307
|
name: "Column",
|
|
3308
3308
|
description: "Lay children out vertically (top → bottom) with even spacing — the most common page/section layout. Children stretch to the full width by default; set `align` to `start`/`center`/`end` to change that. This is the recommended root container for a page or a card body.",
|
|
@@ -3310,13 +3310,13 @@ const Jo = { name: "gap", type: "string | object", optional: !0, enum: ["xs", "s
|
|
|
3310
3310
|
{ name: "children", type: "Node[]", description: "Children laid out top → bottom" },
|
|
3311
3311
|
{ name: "gap", type: "string | object", optional: !0, enum: ["xs", "s", "m", "l", "xl"], description: "Vertical spacing between children (default `m`). May be a responsive map." },
|
|
3312
3312
|
{ name: "align", type: "string | object", optional: !0, enum: ["start", "center", "end", "stretch"], description: "Horizontal alignment of children (default `stretch`). May be a responsive map." },
|
|
3313
|
+
{ ...Nr },
|
|
3313
3314
|
{ ...Ir },
|
|
3314
3315
|
{ ...Pr },
|
|
3315
3316
|
{ ...Er },
|
|
3316
|
-
{ ...zr }
|
|
3317
|
-
{ ...Lr }
|
|
3317
|
+
{ ...zr }
|
|
3318
3318
|
],
|
|
3319
|
-
render: (t, e, r) =>
|
|
3319
|
+
render: (t, e, r) => Mr("column", !1, "stretch", e, r)
|
|
3320
3320
|
}, es = {
|
|
3321
3321
|
name: "Stack",
|
|
3322
3322
|
description: 'Low-level flex container with a configurable, optionally responsive `direction`. Reach for `Row` or `Column` first — they are clearer for fixed-direction layouts. Use `Stack` when the direction itself must change across breakpoints, e.g. `direction: {base: "column", md: "row"}` for a sidebar that stacks on mobile. `gap`, `align`, `justify`, and `padding` also accept responsive maps. NOTE: a `row` Stack grows its children equally by default (`uniform=true`); set `uniform=false` for natural widths (this is `Row`\'s default).',
|
|
@@ -3325,17 +3325,17 @@ const Jo = { name: "gap", type: "string | object", optional: !0, enum: ["xs", "s
|
|
|
3325
3325
|
{ name: "direction", type: "string | object", optional: !0, enum: ["column", "row"], description: 'Layout direction (default column). May be a responsive map like `{base: "column", md: "row"}`.' },
|
|
3326
3326
|
{ ...Jo },
|
|
3327
3327
|
{ name: "align", type: "string | object", optional: !0, enum: ["start", "center", "end", "stretch"], description: "Cross-axis alignment (default stretch). May be a responsive map." },
|
|
3328
|
+
{ ...Nr },
|
|
3329
|
+
{ ...hn },
|
|
3328
3330
|
{ ...Ir },
|
|
3329
|
-
{ ...bn },
|
|
3330
3331
|
{ ...Pr },
|
|
3331
|
-
{ ...Er },
|
|
3332
3332
|
{ name: "uniform", type: "boolean", optional: !0, description: "Row children share space equally (default true for row stacks; use `Row` for natural widths)" },
|
|
3333
|
-
{ ...
|
|
3334
|
-
{ ...
|
|
3333
|
+
{ ...zr },
|
|
3334
|
+
{ ...Er }
|
|
3335
3335
|
],
|
|
3336
3336
|
render: (t, e, r) => {
|
|
3337
3337
|
const n = Yo(e) === "row", i = e.uniform === void 0 ? n : T(e.uniform, n);
|
|
3338
|
-
return
|
|
3338
|
+
return Mr(e.direction, i, "stretch", e, r);
|
|
3339
3339
|
}
|
|
3340
3340
|
}, ts = {
|
|
3341
3341
|
name: "Center",
|
|
@@ -3425,7 +3425,7 @@ const Jo = { name: "gap", type: "string | object", optional: !0, enum: ["xs", "s
|
|
|
3425
3425
|
"aria-orientation": a ? null : r
|
|
3426
3426
|
});
|
|
3427
3427
|
}
|
|
3428
|
-
},
|
|
3428
|
+
}, fa = (t, e, r = !1) => {
|
|
3429
3429
|
const a = l("li", {
|
|
3430
3430
|
class: "rui-steps-item",
|
|
3431
3431
|
"data-active": r ? "true" : "false"
|
|
@@ -3446,14 +3446,14 @@ const Jo = { name: "gap", type: "string | object", optional: !0, enum: ["xs", "s
|
|
|
3446
3446
|
}
|
|
3447
3447
|
if (n && typeof n == "object") {
|
|
3448
3448
|
const i = n;
|
|
3449
|
-
a.append(
|
|
3449
|
+
a.append(fa(
|
|
3450
3450
|
f(i.title),
|
|
3451
3451
|
f(i.details),
|
|
3452
3452
|
T(i.active)
|
|
3453
3453
|
));
|
|
3454
3454
|
continue;
|
|
3455
3455
|
}
|
|
3456
|
-
a.append(
|
|
3456
|
+
a.append(fa(f(n), ""));
|
|
3457
3457
|
}
|
|
3458
3458
|
return a;
|
|
3459
3459
|
}
|
|
@@ -3589,7 +3589,7 @@ const us = {
|
|
|
3589
3589
|
return a;
|
|
3590
3590
|
}
|
|
3591
3591
|
}, Pt = (t) => Math.max(1, Math.min(pt, Math.round(t)));
|
|
3592
|
-
function
|
|
3592
|
+
function er(t) {
|
|
3593
3593
|
if (t == null || t === "") return 12;
|
|
3594
3594
|
const e = String(t).trim();
|
|
3595
3595
|
if (e.includes("/")) {
|
|
@@ -3613,7 +3613,7 @@ const ms = {
|
|
|
3613
3613
|
{ name: "spanAt", type: "object", optional: !0, description: "Responsive span map `{sm: 12, md: 6, lg: 4}`" }
|
|
3614
3614
|
],
|
|
3615
3615
|
render: (t, e, r) => {
|
|
3616
|
-
const a =
|
|
3616
|
+
const a = er(e.span ?? 12), n = he(e.spanAt), i = e.offset === void 0 || e.offset === null ? 0 : Math.max(0, Math.min(pt - 1, Math.round(P(e.offset, 0)))), o = {
|
|
3617
3617
|
class: "rui-grid-item",
|
|
3618
3618
|
"data-span": String(a)
|
|
3619
3619
|
}, s = [`--rui-grid-item-span:${a}`];
|
|
@@ -3622,12 +3622,12 @@ const ms = {
|
|
|
3622
3622
|
for (const u of et) {
|
|
3623
3623
|
const p = n.values[u];
|
|
3624
3624
|
if (p !== void 0) {
|
|
3625
|
-
const d =
|
|
3625
|
+
const d = er(p);
|
|
3626
3626
|
s.push(`--rui-grid-item-span-${u}:${d}`);
|
|
3627
3627
|
}
|
|
3628
3628
|
}
|
|
3629
3629
|
} else if (n.kind === "single" && n.value != null) {
|
|
3630
|
-
const u =
|
|
3630
|
+
const u = er(n.value);
|
|
3631
3631
|
s.push(`--rui-grid-item-span:${u}`), o["data-span"] = String(u);
|
|
3632
3632
|
}
|
|
3633
3633
|
o.style = s.join(";");
|
|
@@ -3666,7 +3666,7 @@ const ms = {
|
|
|
3666
3666
|
for (const u of $(e.children)) c.append(r.renderNode(u));
|
|
3667
3667
|
return c;
|
|
3668
3668
|
}
|
|
3669
|
-
},
|
|
3669
|
+
}, bn = {
|
|
3670
3670
|
name: "Grid",
|
|
3671
3671
|
description: 'Two-dimensional grid with three modes:\n 1. AUTO-FIT (default, no `columns`): wraps as many equal columns as fit, each at least `minChildWidth` wide (default 220px) — perfect for card/KPI grids that should reflow on their own.\n 2. FIXED (`columns: N`, 1–12): exactly N equal columns.\n 3. SPAN (`columns: 12` or any `GridItem` children): a 12-track grid where each `GridItem` sets its own `span` (a number 1–12 or a fraction like `"1/3"`) for dashboards and asymmetric layouts.\n`columns` and `gap` accept responsive maps like `{base: 1, md: 2, lg: 4}`.',
|
|
3672
3672
|
props: [
|
|
@@ -3752,9 +3752,9 @@ const bs = {
|
|
|
3752
3752
|
for (const n of $(e.children)) a.append(r.renderNode(n));
|
|
3753
3753
|
return a;
|
|
3754
3754
|
}
|
|
3755
|
-
}, vs = ["sm", "md", "lg", "xl", "full"],
|
|
3755
|
+
}, vs = ["sm", "md", "lg", "xl", "full"], ga = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
3756
3756
|
let ys = 0;
|
|
3757
|
-
function
|
|
3757
|
+
function ha(t) {
|
|
3758
3758
|
return t.getRootNode().activeElement ?? null;
|
|
3759
3759
|
}
|
|
3760
3760
|
const xs = {
|
|
@@ -3819,12 +3819,12 @@ const xs = {
|
|
|
3819
3819
|
return;
|
|
3820
3820
|
}
|
|
3821
3821
|
if (y.key !== "Tab") return;
|
|
3822
|
-
const x = [...c.querySelectorAll(
|
|
3822
|
+
const x = [...c.querySelectorAll(ga)];
|
|
3823
3823
|
if (x.length === 0) {
|
|
3824
3824
|
y.preventDefault(), c.focus();
|
|
3825
3825
|
return;
|
|
3826
3826
|
}
|
|
3827
|
-
const w = x[0], k = x[x.length - 1], A =
|
|
3827
|
+
const w = x[0], k = x[x.length - 1], A = ha(c);
|
|
3828
3828
|
y.shiftKey && A === w ? (y.preventDefault(), k.focus()) : !y.shiftKey && A === k && (y.preventDefault(), w.focus());
|
|
3829
3829
|
});
|
|
3830
3830
|
const h = r.useInstanceState(
|
|
@@ -3832,10 +3832,10 @@ const xs = {
|
|
|
3832
3832
|
{ open: !1, prev: null }
|
|
3833
3833
|
), v = h.get();
|
|
3834
3834
|
if (b && !v.open) {
|
|
3835
|
-
const y =
|
|
3835
|
+
const y = ha(c);
|
|
3836
3836
|
h.set({ open: !0, prev: y });
|
|
3837
3837
|
const x = () => {
|
|
3838
|
-
([...c.querySelectorAll(
|
|
3838
|
+
([...c.querySelectorAll(ga)][0] ?? c).focus();
|
|
3839
3839
|
};
|
|
3840
3840
|
typeof queueMicrotask == "function" ? queueMicrotask(x) : Promise.resolve().then(x);
|
|
3841
3841
|
} else if (!b && v.open) {
|
|
@@ -3847,10 +3847,10 @@ const xs = {
|
|
|
3847
3847
|
}
|
|
3848
3848
|
return i;
|
|
3849
3849
|
}
|
|
3850
|
-
}, ws = ["solid", "regular", "brands"],
|
|
3851
|
-
function
|
|
3850
|
+
}, ws = ["solid", "regular", "brands"], Ot = ["xs", "sm", "md", "lg", "xl"], ks = ["default", "neutral", "primary", "success", "warning", "danger", "info"];
|
|
3851
|
+
function Lr(t, e = "md") {
|
|
3852
3852
|
const r = f(t).trim().toLowerCase();
|
|
3853
|
-
return r ? r === "small" ? "sm" : r === "normal" ? "md" : r === "large" ? "lg" :
|
|
3853
|
+
return r ? r === "small" ? "sm" : r === "normal" ? "md" : r === "large" ? "lg" : Ot.includes(r) ? r : e : e;
|
|
3854
3854
|
}
|
|
3855
3855
|
const Ss = {
|
|
3856
3856
|
name: "Icon",
|
|
@@ -3879,7 +3879,7 @@ function Cs(t) {
|
|
|
3879
3879
|
const e = f(t).trim();
|
|
3880
3880
|
return !e || /[<>]/.test(e) || /\bexpression\s*\(|\bjavascript\s*:|\bbehavior\s*:|@import\b/i.test(e) ? "" : e;
|
|
3881
3881
|
}
|
|
3882
|
-
const
|
|
3882
|
+
const vn = [
|
|
3883
3883
|
{ name: "value", type: "string" },
|
|
3884
3884
|
{ name: "variant", type: "string", optional: !0, enum: $s },
|
|
3885
3885
|
{ name: "tone", type: "string", optional: !0, enum: ["default", "muted", "primary", "success", "warning", "danger"], description: "Visual accent" },
|
|
@@ -3889,7 +3889,7 @@ const yn = [
|
|
|
3889
3889
|
optional: !0,
|
|
3890
3890
|
description: 'Inline CSS declarations applied to the rendered element (e.g. "font-size: 16px; font-weight: bold; color: #000;").'
|
|
3891
3891
|
}
|
|
3892
|
-
],
|
|
3892
|
+
], yn = (t, e) => {
|
|
3893
3893
|
const r = f(e.variant, "body"), a = f(e.tone, "default"), n = Cs(e.style);
|
|
3894
3894
|
return l("span", {
|
|
3895
3895
|
class: "rui-text",
|
|
@@ -3900,13 +3900,13 @@ const yn = [
|
|
|
3900
3900
|
}, As = {
|
|
3901
3901
|
name: "Text",
|
|
3902
3902
|
description: 'Renders plain text with a typographic variant. Optional `style` prop accepts a CSS declaration string (e.g. "font-size: 16px; color: #000;") applied directly to the rendered element.',
|
|
3903
|
-
props:
|
|
3904
|
-
render:
|
|
3903
|
+
props: vn,
|
|
3904
|
+
render: yn
|
|
3905
3905
|
}, Ts = {
|
|
3906
3906
|
name: "TextContent",
|
|
3907
3907
|
description: "Deprecated alias for `Text`. Prefer `Text(...)` — both render identically.",
|
|
3908
|
-
props:
|
|
3909
|
-
render:
|
|
3908
|
+
props: vn,
|
|
3909
|
+
render: yn
|
|
3910
3910
|
}, Ms = ["cover", "contain", "fill", "none", "scale-down"], Ns = {
|
|
3911
3911
|
name: "Image",
|
|
3912
3912
|
description: "Inline image. `ratio` constrains the box to a fixed aspect ratio (e.g. `16:9`, `1:1`) so callers do not need an outer `AspectRatio`. `fit` controls how the image fills that box. When `src` is missing or unsafe the component renders a placeholder (or `fallback` text/icon).",
|
|
@@ -3955,17 +3955,17 @@ function Is(t) {
|
|
|
3955
3955
|
const e = Number(t);
|
|
3956
3956
|
return Number.isFinite(e) && e > 0 ? `${e} / 1` : "auto";
|
|
3957
3957
|
}
|
|
3958
|
-
const
|
|
3958
|
+
const xn = ["neutral", "primary", "success", "warning", "danger", "info"], Ps = {
|
|
3959
3959
|
name: "Badge",
|
|
3960
3960
|
description: "Small pill-style tag for status, counts, categories. Accepts an optional leading `icon` and a `size`.",
|
|
3961
3961
|
props: [
|
|
3962
3962
|
{ name: "label", type: "string", positional: !0 },
|
|
3963
|
-
{ name: "tone", type: "string", optional: !0, enum:
|
|
3963
|
+
{ name: "tone", type: "string", optional: !0, enum: xn, aliases: ["variant"], description: "Visual tone" },
|
|
3964
3964
|
{ name: "icon", type: "string", optional: !0, description: 'Optional Font Awesome icon name (e.g. "star")' },
|
|
3965
|
-
{ name: "size", type: "string", optional: !0, enum:
|
|
3965
|
+
{ name: "size", type: "string", optional: !0, enum: Ot }
|
|
3966
3966
|
],
|
|
3967
3967
|
render: (t, e) => {
|
|
3968
|
-
const r = f(e.tone, "neutral"), a =
|
|
3968
|
+
const r = f(e.tone, "neutral"), a = Lr(e.size, "md"), n = l("span", {
|
|
3969
3969
|
class: "rui-badge",
|
|
3970
3970
|
"data-variant": r,
|
|
3971
3971
|
"data-size": a
|
|
@@ -3979,11 +3979,11 @@ const wn = ["neutral", "primary", "success", "warning", "danger", "info"], Ps =
|
|
|
3979
3979
|
description: "Cluster of Badge pills rendered from an array of strings.",
|
|
3980
3980
|
props: [
|
|
3981
3981
|
{ name: "labels", type: "string[]", positional: !0, description: "Array of badge labels" },
|
|
3982
|
-
{ name: "tone", type: "string", optional: !0, enum:
|
|
3983
|
-
{ name: "size", type: "string", optional: !0, enum:
|
|
3982
|
+
{ name: "tone", type: "string", optional: !0, enum: xn, aliases: ["variant"] },
|
|
3983
|
+
{ name: "size", type: "string", optional: !0, enum: Ot }
|
|
3984
3984
|
],
|
|
3985
3985
|
render: (t, e) => {
|
|
3986
|
-
const r = f(e.tone, "neutral"), a =
|
|
3986
|
+
const r = f(e.tone, "neutral"), a = Lr(e.size, "md"), n = l("div", { class: "rui-badge-list" });
|
|
3987
3987
|
for (const i of $(e.labels)) {
|
|
3988
3988
|
const o = f(i);
|
|
3989
3989
|
if (!o) continue;
|
|
@@ -4209,12 +4209,12 @@ const Hs = {
|
|
|
4209
4209
|
name: "Spinner",
|
|
4210
4210
|
description: "Indeterminate inline loader. Use for tiny loading states inside buttons, toolbars, table cells, or chat bubbles where `Skeleton` and `Progress(indeterminate=true)` are too heavy. Pass `label` to render an inline caption beside the spinner (also announced via `aria-label`).",
|
|
4211
4211
|
props: [
|
|
4212
|
-
{ name: "size", type: "string", optional: !0, enum:
|
|
4212
|
+
{ name: "size", type: "string", optional: !0, enum: Ot, description: "Default `md`" },
|
|
4213
4213
|
{ name: "label", type: "string", optional: !0, description: "Caption rendered beside the spinner (also announced)" },
|
|
4214
4214
|
{ name: "tone", type: "string", optional: !0, enum: ks, description: "Visual accent (default `primary`)" }
|
|
4215
4215
|
],
|
|
4216
4216
|
render: (t, e) => {
|
|
4217
|
-
const r =
|
|
4217
|
+
const r = Lr(e.size, "md"), a = f(e.tone, "primary"), n = f(e.label), i = l("span", {
|
|
4218
4218
|
class: "rui-spinner",
|
|
4219
4219
|
"data-size": r,
|
|
4220
4220
|
"data-tone": a,
|
|
@@ -4301,14 +4301,14 @@ function Gs(t) {
|
|
|
4301
4301
|
let b = g.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, (h, v, y) => {
|
|
4302
4302
|
const x = ne(y);
|
|
4303
4303
|
return x ? `<img class="rui-markdown-image" src="${At(x)}" alt="${v}" loading="lazy">` : `<span class="rui-markdown-image-fallback">${v}</span>`;
|
|
4304
|
-
}).replace(/`([^`]+)`/g, "<code>$1</code>").replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/\*([^*]+)\*/g, "<em>$1</em>").replace(/\[([^\]]+)\]\(([^)]+)\)/g, (h, v, y) => `<a class="rui-link" href="${
|
|
4304
|
+
}).replace(/`([^`]+)`/g, "<code>$1</code>").replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/\*([^*]+)\*/g, "<em>$1</em>").replace(/\[([^\]]+)\]\(([^)]+)\)/g, (h, v, y) => `<a class="rui-link" href="${ba(y)}" target="_blank" rel="noopener noreferrer">${v}</a>`);
|
|
4305
4305
|
return b = b.replace(
|
|
4306
4306
|
/(?<![="'>])\bhttps?:\/\/[a-zA-Z0-9._~:/?#@!$&'()*+,;=%\-]+/g,
|
|
4307
|
-
(h) => `<a class="rui-link" href="${
|
|
4307
|
+
(h) => `<a class="rui-link" href="${ba(h)}" target="_blank" rel="noopener noreferrer">${h}</a>`
|
|
4308
4308
|
), b;
|
|
4309
4309
|
}
|
|
4310
4310
|
}
|
|
4311
|
-
function
|
|
4311
|
+
function ba(t) {
|
|
4312
4312
|
const e = t.trim();
|
|
4313
4313
|
if (!e || e.startsWith("//")) return "#";
|
|
4314
4314
|
if (e.startsWith("#") || e.startsWith("/") || e.startsWith("?"))
|
|
@@ -4414,7 +4414,7 @@ const Ys = [
|
|
|
4414
4414
|
{ match: /\b(tickets?|issues?|bugs?|requests?)\b/i, icon: "ticket" },
|
|
4415
4415
|
{ match: /\b(deploys?|builds?|releases?|versions?)\b/i, icon: "rocket" }
|
|
4416
4416
|
];
|
|
4417
|
-
function
|
|
4417
|
+
function wn(t) {
|
|
4418
4418
|
if (!t) return null;
|
|
4419
4419
|
for (const e of Ys)
|
|
4420
4420
|
if (e.match.test(t)) return e.icon;
|
|
@@ -4437,7 +4437,7 @@ function Zs(t, e = "shapes") {
|
|
|
4437
4437
|
const r = t.trim() || "anon";
|
|
4438
4438
|
return `https://api.dicebear.com/9.x/${/^[a-z0-9-]+$/i.test(e) ? e : "shapes"}/svg?seed=${encodeURIComponent(r)}`;
|
|
4439
4439
|
}
|
|
4440
|
-
function
|
|
4440
|
+
function kn(t) {
|
|
4441
4441
|
return $(t).map((r) => {
|
|
4442
4442
|
if (r && typeof r == "object") {
|
|
4443
4443
|
const n = r;
|
|
@@ -4464,7 +4464,7 @@ function qe(t, e) {
|
|
|
4464
4464
|
}
|
|
4465
4465
|
return typeof e == "string" ? document.createTextNode(e) : t.renderNode(e);
|
|
4466
4466
|
}
|
|
4467
|
-
function
|
|
4467
|
+
function _t(t, e) {
|
|
4468
4468
|
return l("span", {
|
|
4469
4469
|
class: `rui-wrapper ${t}`,
|
|
4470
4470
|
style: "display: contents;",
|
|
@@ -4489,7 +4489,7 @@ const rl = {
|
|
|
4489
4489
|
{ name: "stopPropagation", type: "boolean", optional: !0, description: "Call event.stopPropagation() after invoking the handler (default false)" }
|
|
4490
4490
|
],
|
|
4491
4491
|
render: (t, e, r) => {
|
|
4492
|
-
const a =
|
|
4492
|
+
const a = _t("rui-on-click", { role: "button", tabindex: "0" });
|
|
4493
4493
|
a.append(qe(r, e.child));
|
|
4494
4494
|
const n = T(e.disabled), i = T(e.stopPropagation), o = (s) => {
|
|
4495
4495
|
n || (i && s.stopPropagation(), r.invoke(e.onClick, s));
|
|
@@ -4545,7 +4545,7 @@ const rl = {
|
|
|
4545
4545
|
{ name: "passiveScroll", type: "boolean", optional: !0, description: "Register scroll/wheel listeners as passive (default true for better scroll performance)" }
|
|
4546
4546
|
],
|
|
4547
4547
|
render: (t, e, r) => {
|
|
4548
|
-
const a =
|
|
4548
|
+
const a = _t("rui-on-mouse");
|
|
4549
4549
|
T(e.draggable) && a.setAttribute("draggable", "true"), a.append(qe(r, e.child));
|
|
4550
4550
|
const n = e.passiveScroll === void 0 ? !0 : T(e.passiveScroll);
|
|
4551
4551
|
for (const { prop: i, event: o } of al) {
|
|
@@ -4573,7 +4573,7 @@ const rl = {
|
|
|
4573
4573
|
{ name: "focusable", type: "boolean", optional: !0, description: "Make the wrapper focusable via Tab (default true)" }
|
|
4574
4574
|
],
|
|
4575
4575
|
render: (t, e, r) => {
|
|
4576
|
-
const a = e.focusable === void 0 ? !0 : T(e.focusable), n =
|
|
4576
|
+
const a = e.focusable === void 0 ? !0 : T(e.focusable), n = _t("rui-on-keyboard", a ? { tabindex: "0" } : {});
|
|
4577
4577
|
n.append(qe(r, e.child));
|
|
4578
4578
|
for (const { prop: i, event: o } of il) {
|
|
4579
4579
|
const s = e[i];
|
|
@@ -4592,7 +4592,7 @@ const rl = {
|
|
|
4592
4592
|
{ name: "onBlur", type: "callable", optional: !0, aliases: ["onblur"], description: "Fired when focus leaves the element and all descendants" }
|
|
4593
4593
|
],
|
|
4594
4594
|
render: (t, e, r) => {
|
|
4595
|
-
const a =
|
|
4595
|
+
const a = _t("rui-on-focus");
|
|
4596
4596
|
return a.append(qe(r, e.child)), e.onFocus != null && a.addEventListener("focusin", (n) => r.invoke(e.onFocus, n)), e.onBlur != null && a.addEventListener("focusout", (n) => r.invoke(e.onBlur, n)), a;
|
|
4597
4597
|
}
|
|
4598
4598
|
}, ll = {
|
|
@@ -4663,7 +4663,7 @@ const rl = {
|
|
|
4663
4663
|
function ul(t, e) {
|
|
4664
4664
|
return e == null ? [] : typeof e == "string" ? [document.createTextNode(e)] : Array.isArray(e) ? e.filter((r) => r != null).map((r) => typeof r == "string" ? document.createTextNode(r) : t.renderNode(r)) : [t.renderNode(e)];
|
|
4665
4665
|
}
|
|
4666
|
-
const
|
|
4666
|
+
const va = {
|
|
4667
4667
|
name: "Link",
|
|
4668
4668
|
description: 'Anchor link. Accepts either a plain string label or a wrapped component as its positional child. Pass `to` for client-side router navigation (no page reload) or `href` for a regular anchor. `external: true` opens the link in a new tab with `rel="noopener noreferrer"`. Use to make any component clickable as a link — cards, icons, badges, list rows.',
|
|
4669
4669
|
props: [
|
|
@@ -4974,7 +4974,7 @@ const hl = {
|
|
|
4974
4974
|
const i = f(e.hint);
|
|
4975
4975
|
return i && a.append(l("p", { class: "rui-form-hint" }, [i])), a;
|
|
4976
4976
|
}
|
|
4977
|
-
},
|
|
4977
|
+
}, Sn = {
|
|
4978
4978
|
name: "SearchBar",
|
|
4979
4979
|
description: "Pre-styled search input with a leading magnifying-glass icon, optional trailing submit button, and optional keyboard-shortcut hint. Pass a `$variable` as `value` for two-way binding. Use anywhere a user needs to filter content — toolbars, command bars, lists, headers.",
|
|
4980
4980
|
props: [
|
|
@@ -5229,7 +5229,7 @@ const hl = {
|
|
|
5229
5229
|
}), b.append(x);
|
|
5230
5230
|
}, i;
|
|
5231
5231
|
}
|
|
5232
|
-
},
|
|
5232
|
+
}, $n = {
|
|
5233
5233
|
name: "Combobox",
|
|
5234
5234
|
description: "Searchable single-select dropdown — type to filter, click an option to choose. Use instead of `Select` when the list is long enough that scanning is faster than scrolling (countries, currencies, repos, users). Pass a `$variable` as `value` for two-way binding; the selected option's `value` is written to state on pick.",
|
|
5235
5235
|
props: [
|
|
@@ -5243,7 +5243,7 @@ const hl = {
|
|
|
5243
5243
|
{ name: "onChange", type: "callable", optional: !0, aliases: ["onchange"], description: "Called with the newly-selected value" }
|
|
5244
5244
|
],
|
|
5245
5245
|
render: (t, e, r) => {
|
|
5246
|
-
const a = f(e.id), n =
|
|
5246
|
+
const a = f(e.id), n = kn(e.items), i = f(e.value), o = n.find((S) => S.value === i)?.label ?? i, s = f(e.placeholder, "Select…"), c = f(e.emptyLabel, "No matches"), u = T(e.disabled), p = T(e.open), d = r.useInstanceState("open", p), m = r.useInstanceState("filter", ""), g = d.get(), b = l("div", {
|
|
5247
5247
|
class: "rui-combobox",
|
|
5248
5248
|
"data-open": g ? "true" : "false",
|
|
5249
5249
|
"data-disabled": u ? "true" : "false"
|
|
@@ -5346,7 +5346,7 @@ const hl = {
|
|
|
5346
5346
|
{ name: "onChange", type: "callable", optional: !0, aliases: ["onchange"], description: "Called with the updated array of selected values" }
|
|
5347
5347
|
],
|
|
5348
5348
|
render: (t, e, r) => {
|
|
5349
|
-
const a = f(e.id), n =
|
|
5349
|
+
const a = f(e.id), n = kn(e.items), i = f(e.placeholder, "Select…"), o = f(e.emptyLabel, "No matches"), s = T(e.disabled), c = Math.max(0, Math.floor(Number(e.max ?? 0))), u = Array.isArray(e.value) ? e.value.map((I) => f(I)).filter(Boolean) : [], p = new Set(u), d = t.argMeta?.[2]?.stateRef, m = T(e.open), g = r.useInstanceState("open", m), b = r.useInstanceState("filter", ""), h = g.get(), v = l("div", {
|
|
5350
5350
|
class: "rui-multiselect",
|
|
5351
5351
|
"data-open": h ? "true" : "false",
|
|
5352
5352
|
"data-disabled": s ? "true" : "false"
|
|
@@ -5411,7 +5411,7 @@ const hl = {
|
|
|
5411
5411
|
}), ue = l("span", { class: "rui-multiselect-option-check" }), ve = D(_ ? "check" : "", { className: "rui-multiselect-option-check-icon" });
|
|
5412
5412
|
ve && ue.append(ve), J.append(ue), J.append(l("span", { class: "rui-multiselect-option-label" }, [B.label])), J.onclick = (rt) => {
|
|
5413
5413
|
if (rt.stopPropagation(), X) return;
|
|
5414
|
-
const De = _ ? u.filter((
|
|
5414
|
+
const De = _ ? u.filter((Gt) => Gt !== B.value) : [...u, B.value];
|
|
5415
5415
|
w(De);
|
|
5416
5416
|
}, I.append(J);
|
|
5417
5417
|
}
|
|
@@ -5499,7 +5499,7 @@ function Rl(t, e, r) {
|
|
|
5499
5499
|
const a = t.argMeta ? [...t.argMeta] : [];
|
|
5500
5500
|
for (; a.length < 5; ) a.push({});
|
|
5501
5501
|
a[4]?.stateRef && (a[2] = a[4]);
|
|
5502
|
-
const n =
|
|
5502
|
+
const n = $n.render(
|
|
5503
5503
|
{ ...t, argMeta: a },
|
|
5504
5504
|
{
|
|
5505
5505
|
id: e.id,
|
|
@@ -5670,7 +5670,7 @@ const Ol = {
|
|
|
5670
5670
|
loading: "lazy"
|
|
5671
5671
|
}));
|
|
5672
5672
|
else {
|
|
5673
|
-
const s = f(e.title), c = f(e.description), u = f(e.icon) ||
|
|
5673
|
+
const s = f(e.title), c = f(e.description), u = f(e.icon) || wn(`${s} ${c}`) || "inbox", p = D(u, { className: "rui-empty-state-icon" });
|
|
5674
5674
|
p && a.append(p);
|
|
5675
5675
|
}
|
|
5676
5676
|
a.append(l("h3", { class: "rui-empty-state-title" }, [f(e.title)]));
|
|
@@ -5967,7 +5967,7 @@ const Ol = {
|
|
|
5967
5967
|
class: "rui-toolbar",
|
|
5968
5968
|
"data-has-center": a.length > 0 ? "true" : "false"
|
|
5969
5969
|
}), i = l("div", { class: "rui-toolbar-side rui-toolbar-left" });
|
|
5970
|
-
T(e.searchable) && i.append(
|
|
5970
|
+
T(e.searchable) && i.append(Sn.render(
|
|
5971
5971
|
{ __kind: "Component", name: "SearchBar", args: [], argMeta: [] },
|
|
5972
5972
|
{
|
|
5973
5973
|
id: "toolbar-search",
|
|
@@ -6280,7 +6280,7 @@ function pc(t) {
|
|
|
6280
6280
|
const e = Number(t);
|
|
6281
6281
|
return Number.isFinite(e) && e > 0 ? `${e} / 1` : "16 / 9";
|
|
6282
6282
|
}
|
|
6283
|
-
function
|
|
6283
|
+
function Rr(t, e = "primary") {
|
|
6284
6284
|
const n = "http://www.w3.org/2000/svg", i = document.createElementNS(n, "svg");
|
|
6285
6285
|
if (i.setAttribute("class", "rui-sparkline"), i.setAttribute("data-tone", e), i.setAttribute("viewBox", "0 0 80 24"), i.setAttribute("width", String(80)), i.setAttribute("height", String(24)), i.setAttribute("aria-hidden", "true"), t.length < 2) return i;
|
|
6286
6286
|
const o = Math.min(...t), s = Math.max(...t), c = s - o || 1, u = 80 / (t.length - 1), d = t.map((h, v) => {
|
|
@@ -6308,7 +6308,7 @@ const mc = {
|
|
|
6308
6308
|
e.layout,
|
|
6309
6309
|
n ? "grid" : "strip"
|
|
6310
6310
|
) === "grid") {
|
|
6311
|
-
const c = e.columns ? Math.max(1, Math.min(6, Math.floor(P(e.columns)))) : 0, u =
|
|
6311
|
+
const c = e.columns ? Math.max(1, Math.min(6, Math.floor(P(e.columns)))) : 0, u = bn.render(
|
|
6312
6312
|
{ __kind: "Component", name: "Grid", args: [], argMeta: [] },
|
|
6313
6313
|
{
|
|
6314
6314
|
children: a,
|
|
@@ -6326,7 +6326,7 @@ const mc = {
|
|
|
6326
6326
|
const m = l("div", { class: "rui-stats-value-row" });
|
|
6327
6327
|
m.append(l("div", { class: "rui-stats-value" }, [f(u.value)]));
|
|
6328
6328
|
const g = $(u.spark).map((h) => Number(h)).filter((h) => Number.isFinite(h));
|
|
6329
|
-
g.length > 1 && m.append(
|
|
6329
|
+
g.length > 1 && m.append(Rr(g, p)), d.append(m);
|
|
6330
6330
|
const b = f(u.hint);
|
|
6331
6331
|
b && d.append(l("div", { class: "rui-stats-hint" }, [b])), s.append(d);
|
|
6332
6332
|
}
|
|
@@ -6357,7 +6357,7 @@ const mc = {
|
|
|
6357
6357
|
const u = f(e.description);
|
|
6358
6358
|
return u && s.append(l("div", { class: "rui-tile-description" }, [u])), i.append(s), a && (i.onclick = () => r.invoke(e.onClick)), i;
|
|
6359
6359
|
}
|
|
6360
|
-
},
|
|
6360
|
+
}, Cn = {
|
|
6361
6361
|
name: "Notification",
|
|
6362
6362
|
description: "Inline notification card with title, message, time, optional avatar, and dismiss/action buttons. Use inside notification panels, inboxes, or activity drawers — for top-of-page announcements prefer `Banner`.",
|
|
6363
6363
|
props: [
|
|
@@ -6417,14 +6417,14 @@ const mc = {
|
|
|
6417
6417
|
const d = f(e.role);
|
|
6418
6418
|
return d && p.append(l("span", { class: "rui-person-chip-role" }, [d])), s.append(p), a && (s.onclick = () => r.invoke(e.onClick)), s;
|
|
6419
6419
|
}
|
|
6420
|
-
},
|
|
6420
|
+
}, An = ["left", "center", "right"], hc = {
|
|
6421
6421
|
name: "Col",
|
|
6422
6422
|
description: 'Single column inside a Table or DataGrid. Use `align` for per-column text alignment, `format` for cell rendering (`text|number|currency|date`). `values` may be plain values OR an array of component nodes — e.g. `Col("Status", rows.map(r => Badge(r.status)))` or `Col("Actions", rows.map(r => Button("Edit")))` — each component renders directly in its cell. Pass `render: (value, index) => …` for the same effect when you prefer to keep `values` as the raw row data (return a component, string, or array). Pass `onClick: (value, index) => …` to make the whole cell clickable (pointer + keyboard). `sortable` and `filterable` only take effect inside `DataGrid` (Table ignores them).',
|
|
6423
6423
|
props: [
|
|
6424
6424
|
{ name: "header", type: "string" },
|
|
6425
6425
|
{ name: "values", type: "any[]", description: "Column values. Plain values are formatted as text; component nodes (e.g. `rows.map(r => Badge(r.status))`) render directly. You can also pass the full row array and map each cell with `render`." },
|
|
6426
6426
|
{ name: "format", type: "string", optional: !0, enum: ["text", "number", "currency", "date"] },
|
|
6427
|
-
{ name: "align", type: "string", optional: !0, enum:
|
|
6427
|
+
{ name: "align", type: "string", optional: !0, enum: An, description: "Per-column horizontal alignment" },
|
|
6428
6428
|
{ name: "sortable", type: "boolean", optional: !0, description: "DataGrid: enable click-to-sort on this column" },
|
|
6429
6429
|
{ name: "filterable", type: "boolean", optional: !0, description: "DataGrid: enable a per-column filter chip" },
|
|
6430
6430
|
{ name: "render", type: "callable", optional: !0, aliases: ["cell"], description: "`(value, index) => Component | string | array` — map each cell to arbitrary content (buttons, badges, links)." },
|
|
@@ -6456,7 +6456,7 @@ const mc = {
|
|
|
6456
6456
|
u && c.append(l("caption", { class: "rui-table-caption" }, [u]));
|
|
6457
6457
|
const p = a.map((w) => {
|
|
6458
6458
|
const k = f(w.args?.[3], "");
|
|
6459
|
-
return
|
|
6459
|
+
return An.includes(k) ? k : "";
|
|
6460
6460
|
}), d = l("thead"), m = l("tr");
|
|
6461
6461
|
for (let w = 0; w < a.length; w += 1) {
|
|
6462
6462
|
const k = a[w], A = l("th", {
|
|
@@ -6470,7 +6470,7 @@ const mc = {
|
|
|
6470
6470
|
const k = l("tr");
|
|
6471
6471
|
b.forEach((A, S) => {
|
|
6472
6472
|
const C = h[S] ?? "text", N = p[S], I = l("td", { "data-format": C, "data-align": N || null });
|
|
6473
|
-
|
|
6473
|
+
hr(
|
|
6474
6474
|
I,
|
|
6475
6475
|
{ format: C, render: v[S], onClick: y[S] },
|
|
6476
6476
|
A[w],
|
|
@@ -6530,14 +6530,14 @@ const mc = {
|
|
|
6530
6530
|
{ name: "tone", type: "string", optional: !0, enum: ["default", "primary", "success", "warning", "danger", "info"] }
|
|
6531
6531
|
],
|
|
6532
6532
|
render: (t, e) => {
|
|
6533
|
-
const r = f(e.tone, "default"), a = l("div", { class: "rui-stat-card", "data-tone": r }), n = l("div", { class: "rui-stat-label-row" }), i = f(e.label), o = f(e.icon) ||
|
|
6533
|
+
const r = f(e.tone, "default"), a = l("div", { class: "rui-stat-card", "data-tone": r }), n = l("div", { class: "rui-stat-label-row" }), i = f(e.label), o = f(e.icon) || wn(i) || "", s = D(o, { className: "rui-stat-icon" });
|
|
6534
6534
|
s && n.append(s), n.append(l("div", { class: "rui-stat-label" }, [i])), a.append(n), a.append(l("div", { class: "rui-stat-value" }, [f(e.value)]));
|
|
6535
6535
|
const c = f(e.delta), u = f(e.trend);
|
|
6536
6536
|
(c || u) && a.append(l("div", { class: "rui-stat-trend", "data-trend": u || "flat" }, [c || Cc(u)]));
|
|
6537
6537
|
const p = $(e.spark).map((d) => P(d));
|
|
6538
6538
|
if (p.length > 1) {
|
|
6539
6539
|
const d = l("div", { class: "rui-stat-spark" });
|
|
6540
|
-
d.append(
|
|
6540
|
+
d.append(Rr(p, r === "default" ? "primary" : r)), a.append(d);
|
|
6541
6541
|
}
|
|
6542
6542
|
return a;
|
|
6543
6543
|
}
|
|
@@ -6550,7 +6550,7 @@ const mc = {
|
|
|
6550
6550
|
],
|
|
6551
6551
|
render: (t, e) => {
|
|
6552
6552
|
const r = f(e.tone, "primary"), a = $(e.values).map((i) => P(i)), n = l("span", { class: "rui-sparkline-wrap" });
|
|
6553
|
-
return n.append(
|
|
6553
|
+
return n.append(Rr(a, r)), n;
|
|
6554
6554
|
}
|
|
6555
6555
|
}, Sc = {
|
|
6556
6556
|
name: "TreeNode",
|
|
@@ -6622,14 +6622,14 @@ function Ac(t, e) {
|
|
|
6622
6622
|
return f(t);
|
|
6623
6623
|
}
|
|
6624
6624
|
}
|
|
6625
|
-
const
|
|
6625
|
+
const tr = [
|
|
6626
6626
|
"var(--rui-chart-1, #6366f1)",
|
|
6627
6627
|
"var(--rui-chart-2, #10b981)",
|
|
6628
6628
|
"var(--rui-chart-3, #f59e0b)",
|
|
6629
6629
|
"var(--rui-chart-4, #ef4444)",
|
|
6630
6630
|
"var(--rui-chart-5, #06b6d4)",
|
|
6631
6631
|
"var(--rui-chart-6, #8b5cf6)"
|
|
6632
|
-
], Xe = (t) =>
|
|
6632
|
+
], Xe = (t) => tr[t % tr.length] ?? tr[0], Tc = {
|
|
6633
6633
|
name: "Series",
|
|
6634
6634
|
description: "Named data series for charts. Used inside BarChart, LineChart, PieChart.",
|
|
6635
6635
|
props: [
|
|
@@ -6637,7 +6637,7 @@ const rr = [
|
|
|
6637
6637
|
{ name: "values", type: "number[]" }
|
|
6638
6638
|
],
|
|
6639
6639
|
render: (t, e) => l("span", { class: "rui-series", "data-name": f(e.name) })
|
|
6640
|
-
},
|
|
6640
|
+
}, Tn = (t) => t.map((e, r) => {
|
|
6641
6641
|
const a = e, n = f(a.args?.[0], `Series ${r + 1}`), i = $(a.args?.[1]).map((o) => P(o));
|
|
6642
6642
|
return { name: n, values: i };
|
|
6643
6643
|
}), Mc = {
|
|
@@ -6649,10 +6649,10 @@ const rr = [
|
|
|
6649
6649
|
{ name: "title", type: "string", optional: !0 }
|
|
6650
6650
|
],
|
|
6651
6651
|
render: (t, e) => {
|
|
6652
|
-
const r = $(e.labels).map((y) => f(y)), a =
|
|
6652
|
+
const r = $(e.labels).map((y) => f(y)), a = Tn($(e.series)), n = l("div", { class: "rui-chart rui-bar-chart" });
|
|
6653
6653
|
f(e.title) && n.append(l("div", { class: "rui-chart-title" }, [f(e.title)]));
|
|
6654
|
-
const i = Math.max(1, ...a.flatMap((y) => y.values)), o = 640, s = 240, c =
|
|
6655
|
-
|
|
6654
|
+
const i = Math.max(1, ...a.flatMap((y) => y.values)), o = 640, s = 240, c = Mn(r, o - 40 - 12), u = { left: 40, right: 12, top: 12, bottom: c.bottomPadding }, p = o - u.left - u.right, d = s - u.top - u.bottom, m = Dr(o, s);
|
|
6655
|
+
In(m, u, p, d, i);
|
|
6656
6656
|
const g = r.length, b = p / Math.max(g, 1), h = a.length, v = b * 0.7 / Math.max(h, 1);
|
|
6657
6657
|
return a.forEach((y, x) => {
|
|
6658
6658
|
y.values.forEach((w, k) => {
|
|
@@ -6666,7 +6666,7 @@ const rr = [
|
|
|
6666
6666
|
});
|
|
6667
6667
|
N.append(be("title", {}, [`${y.name}: ${w}`])), m.append(N);
|
|
6668
6668
|
});
|
|
6669
|
-
}),
|
|
6669
|
+
}), Nn(m, r, u, p, d, c, (y) => u.left + (y + 0.5) * b), n.append(m), a.length > 0 && n.append(jr(a)), n;
|
|
6670
6670
|
}
|
|
6671
6671
|
}, Nc = {
|
|
6672
6672
|
name: "LineChart",
|
|
@@ -6680,7 +6680,7 @@ const rr = [
|
|
|
6680
6680
|
{ name: "stacked", type: "boolean", optional: !0, description: "Stack series when filled=true" }
|
|
6681
6681
|
],
|
|
6682
6682
|
render: (t, e) => {
|
|
6683
|
-
let r = $(e.labels).map((C) => f(C)), a =
|
|
6683
|
+
let r = $(e.labels).map((C) => f(C)), a = Tn($(e.series));
|
|
6684
6684
|
const n = $(e.data);
|
|
6685
6685
|
if (n.length > 0 && (r.length === 0 || a.length === 0)) {
|
|
6686
6686
|
const C = [], N = /* @__PURE__ */ new Map();
|
|
@@ -6710,8 +6710,8 @@ const rr = [
|
|
|
6710
6710
|
"data-filled": i ? "true" : "false"
|
|
6711
6711
|
});
|
|
6712
6712
|
f(e.title) && u.append(l("div", { class: "rui-chart-title" }, [f(e.title)]));
|
|
6713
|
-
const p = i && o ? c.flat() : a.flatMap((C) => C.values), d = Math.max(1, ...p), m = i && o ? 0 : Math.min(0, ...p), g = 640, b = 240, h =
|
|
6714
|
-
|
|
6713
|
+
const p = i && o ? c.flat() : a.flatMap((C) => C.values), d = Math.max(1, ...p), m = i && o ? 0 : Math.min(0, ...p), g = 640, b = 240, h = Mn(r, g - 40 - 12), v = { left: 40, right: 12, top: 12, bottom: h.bottomPadding }, y = g - v.left - v.right, x = b - v.top - v.bottom, w = Dr(g, b);
|
|
6714
|
+
In(w, v, y, x, d, m);
|
|
6715
6715
|
const k = Math.max(r.length - 1, 1), A = y / k, S = (C) => v.left + C * (y / Math.max(s - 1, 1));
|
|
6716
6716
|
return a.forEach((C, N) => {
|
|
6717
6717
|
const I = i && o ? c[N] : C.values, E = i && o && N > 0 ? c[N - 1] : null, L = I.map((B, _) => {
|
|
@@ -6753,7 +6753,7 @@ const rr = [
|
|
|
6753
6753
|
fill: Xe(N)
|
|
6754
6754
|
}));
|
|
6755
6755
|
});
|
|
6756
|
-
}),
|
|
6756
|
+
}), Nn(w, r, v, y, x, h, (C) => v.left + C * A), u.append(w), a.length > 0 && u.append(jr(a)), u;
|
|
6757
6757
|
}
|
|
6758
6758
|
}, Ic = {
|
|
6759
6759
|
name: "PieChart",
|
|
@@ -6768,7 +6768,7 @@ const rr = [
|
|
|
6768
6768
|
render: (t, e) => {
|
|
6769
6769
|
const r = $(e.labels).map((h) => f(h)), a = $(e.values).map((h) => P(h)), n = e.showValues == null ? !0 : T(e.showValues), i = f(e.valueFormat, "value").toLowerCase(), o = i === "percent" ? "percent" : i === "both" ? "both" : "value", s = l("div", { class: "rui-chart rui-pie-chart" });
|
|
6770
6770
|
f(e.title) && s.append(l("div", { class: "rui-chart-title" }, [f(e.title)]));
|
|
6771
|
-
const c = a.reduce((h, v) => h + (v > 0 ? v : 0), 0) || 1, u =
|
|
6771
|
+
const c = a.reduce((h, v) => h + (v > 0 ? v : 0), 0) || 1, u = Dr(240, 240), p = 120, d = 120, m = 90, g = 0.05;
|
|
6772
6772
|
let b = -Math.PI / 2;
|
|
6773
6773
|
return a.forEach((h, v) => {
|
|
6774
6774
|
const y = h > 0 ? h : 0, x = y / c, w = x * Math.PI * 2, k = b + w, A = w > Math.PI ? 1 : 0, S = p + m * Math.cos(b), C = d + m * Math.sin(b), N = p + m * Math.cos(k), I = d + m * Math.sin(k), E = `M${p},${d} L${S},${C} A${m},${m} 0 ${A} 1 ${N},${I} Z`, L = be("path", {
|
|
@@ -6795,7 +6795,7 @@ const rr = [
|
|
|
6795
6795
|
u.append(ue);
|
|
6796
6796
|
}
|
|
6797
6797
|
b = k;
|
|
6798
|
-
}), s.append(u), s.append(
|
|
6798
|
+
}), s.append(u), s.append(jr(r.map((h, v) => ({ name: h, values: [a[v] ?? 0] })))), s;
|
|
6799
6799
|
}
|
|
6800
6800
|
};
|
|
6801
6801
|
function Pc(t, e, r) {
|
|
@@ -6807,20 +6807,20 @@ function Ec(t) {
|
|
|
6807
6807
|
const e = Math.abs(t);
|
|
6808
6808
|
return e >= 1e6 ? `${(t / 1e6).toFixed(1).replace(/\.0$/, "")}M` : e >= 1e3 ? `${(t / 1e3).toFixed(1).replace(/\.0$/, "")}k` : Number.isInteger(t) ? String(t) : t.toFixed(1);
|
|
6809
6809
|
}
|
|
6810
|
-
const zc = 7,
|
|
6811
|
-
function
|
|
6810
|
+
const zc = 7, ya = 12;
|
|
6811
|
+
function Mn(t, e) {
|
|
6812
6812
|
if (t.length === 0)
|
|
6813
6813
|
return { step: 1, rotated: !1, maxChars: 32, bottomPadding: 32 };
|
|
6814
6814
|
const r = e / Math.max(t.length, 1), a = t.reduce((o, s) => Math.max(o, s.length), 0);
|
|
6815
6815
|
if (a * zc + 4 <= r)
|
|
6816
6816
|
return { step: 1, rotated: !1, maxChars: a, bottomPadding: 32 };
|
|
6817
|
-
const n = r <
|
|
6817
|
+
const n = r < ya ? Math.max(1, Math.ceil(ya / r)) : 1, i = Math.min(a, 14);
|
|
6818
6818
|
return { step: n, rotated: !0, maxChars: i, bottomPadding: 60 };
|
|
6819
6819
|
}
|
|
6820
6820
|
function Lc(t, e) {
|
|
6821
6821
|
return t.length <= e ? t : t.slice(0, Math.max(e - 1, 1)) + "…";
|
|
6822
6822
|
}
|
|
6823
|
-
function
|
|
6823
|
+
function Nn(t, e, r, a, n, i, o) {
|
|
6824
6824
|
const s = r.top + n + (i.rotated ? 14 : 18);
|
|
6825
6825
|
e.forEach((c, u) => {
|
|
6826
6826
|
if (u % i.step !== 0) return;
|
|
@@ -6835,7 +6835,7 @@ function In(t, e, r, a, n, i, o) {
|
|
|
6835
6835
|
d !== c && g.append(be("title", {}, [c])), t.append(g);
|
|
6836
6836
|
});
|
|
6837
6837
|
}
|
|
6838
|
-
function
|
|
6838
|
+
function Dr(t, e) {
|
|
6839
6839
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
6840
6840
|
return r.setAttribute("viewBox", `0 0 ${t} ${e}`), r.setAttribute("class", "rui-chart-svg"), r.setAttribute("role", "img"), r;
|
|
6841
6841
|
}
|
|
@@ -6847,7 +6847,7 @@ function be(t, e, r) {
|
|
|
6847
6847
|
a.append(typeof n == "string" ? document.createTextNode(n) : n);
|
|
6848
6848
|
return a;
|
|
6849
6849
|
}
|
|
6850
|
-
function
|
|
6850
|
+
function In(t, e, r, a, n, i = 0) {
|
|
6851
6851
|
for (let s = 0; s <= 4; s += 1) {
|
|
6852
6852
|
const c = s / 4, u = e.top + a - c * a;
|
|
6853
6853
|
t.append(be("line", {
|
|
@@ -6864,7 +6864,7 @@ function Pn(t, e, r, a, n, i = 0) {
|
|
|
6864
6864
|
}, [String(Math.round((i + (n - i) * c) * 10) / 10)]));
|
|
6865
6865
|
}
|
|
6866
6866
|
}
|
|
6867
|
-
function
|
|
6867
|
+
function jr(t) {
|
|
6868
6868
|
const e = l("div", { class: "rui-chart-legend" });
|
|
6869
6869
|
return t.forEach((r, a) => {
|
|
6870
6870
|
const n = l("span", { class: "rui-chart-legend-item" });
|
|
@@ -6959,13 +6959,13 @@ const Rc = {
|
|
|
6959
6959
|
n.preventDefault(), r.invoke(e.onClick);
|
|
6960
6960
|
}, a;
|
|
6961
6961
|
}
|
|
6962
|
-
},
|
|
6962
|
+
}, Pn = ["xs", "sm", "md", "lg", "xl"], Uc = ["initials", "dicebear"], En = {
|
|
6963
6963
|
name: "Avatar",
|
|
6964
6964
|
description: 'User avatar. Shows the image at `src`. When `src` is missing, falls back to a deterministic DiceBear illustration seeded by `name` (pass `fallback="initials"` to render two-letter initials instead). If the image errors at runtime the avatar gracefully degrades to initials.',
|
|
6965
6965
|
props: [
|
|
6966
6966
|
{ name: "name", type: "string", description: "Used for alt text + initials fallback" },
|
|
6967
6967
|
{ name: "src", type: "string", optional: !0, description: "Image URL" },
|
|
6968
|
-
{ name: "size", type: "string", optional: !0, enum:
|
|
6968
|
+
{ name: "size", type: "string", optional: !0, enum: Pn },
|
|
6969
6969
|
{ name: "status", type: "string", optional: !0, enum: ["online", "offline", "busy", "away"] },
|
|
6970
6970
|
{
|
|
6971
6971
|
name: "fallback",
|
|
@@ -6998,7 +6998,7 @@ const Rc = {
|
|
|
6998
6998
|
props: [
|
|
6999
6999
|
{ name: "items", type: "Avatar[]", description: "Avatar(...) nodes or {name, src} objects" },
|
|
7000
7000
|
{ name: "max", type: "number", optional: !0, description: "Maximum avatars to show (default 4)" },
|
|
7001
|
-
{ name: "size", type: "string", optional: !0, enum:
|
|
7001
|
+
{ name: "size", type: "string", optional: !0, enum: Pn }
|
|
7002
7002
|
],
|
|
7003
7003
|
render: (t, e, r) => {
|
|
7004
7004
|
const a = $(e.items), n = Math.max(1, Math.floor(Number(e.max ?? 4))), i = f(e.size, "md"), o = a.slice(0, n), s = a.length - o.length, c = l("div", { class: "rui-avatar-group", "data-size": i });
|
|
@@ -7008,7 +7008,7 @@ const Rc = {
|
|
|
7008
7008
|
continue;
|
|
7009
7009
|
}
|
|
7010
7010
|
const p = u, d = typeof p == "string" ? p : f((p ?? {}).name), m = typeof p == "string" ? "" : f((p ?? {}).src);
|
|
7011
|
-
c.append(
|
|
7011
|
+
c.append(En.render(
|
|
7012
7012
|
{ __kind: "Component", name: "Avatar", args: [], argMeta: [] },
|
|
7013
7013
|
{ name: d, src: m, size: i },
|
|
7014
7014
|
r
|
|
@@ -7219,7 +7219,7 @@ const Gc = {
|
|
|
7219
7219
|
for (const i of $(e.content)) n.append(r.renderNode(i));
|
|
7220
7220
|
return a.append(n), a;
|
|
7221
7221
|
}
|
|
7222
|
-
},
|
|
7222
|
+
}, rr = {
|
|
7223
7223
|
star: { full: "star", half: "star-half-stroke", empty: "regular:star" },
|
|
7224
7224
|
heart: { full: "heart", half: "heart", empty: "regular:heart" },
|
|
7225
7225
|
thumb: { full: "thumbs-up", half: "thumbs-up", empty: "regular:thumbs-up" },
|
|
@@ -7250,7 +7250,7 @@ const Gc = {
|
|
|
7250
7250
|
"aria-label": `${d} of ${a}`
|
|
7251
7251
|
}), b = l("span", { class: "rui-rating-stars" });
|
|
7252
7252
|
for (let y = 1; y <= a; y += 1) {
|
|
7253
|
-
const x = Math.max(0, Math.min(1, d - (y - 1))), w = x >= 1 ? m.full : x > 0 ? m.half : m.empty, k =
|
|
7253
|
+
const x = Math.max(0, Math.min(1, d - (y - 1))), w = x >= 1 ? m.full : x > 0 ? m.half : m.empty, k = Bt(w).join(" "), A = l(s ? "button" : "span", {
|
|
7254
7254
|
class: `rui-rating-star ${k}`.trim(),
|
|
7255
7255
|
type: s ? "button" : null,
|
|
7256
7256
|
"data-fill": x >= 1 ? "full" : x > 0 ? "half" : "empty",
|
|
@@ -7282,12 +7282,12 @@ function Jc(t, e, r, a) {
|
|
|
7282
7282
|
if (!t) return;
|
|
7283
7283
|
t.querySelectorAll(".rui-rating-star").forEach((i, o) => {
|
|
7284
7284
|
const s = Math.max(0, Math.min(1, e - o)), c = s >= 1 ? a.full : s > 0 ? a.half : a.empty;
|
|
7285
|
-
i.setAttribute("data-fill", s >= 1 ? "full" : s > 0 ? "half" : "empty"), i.className = `rui-rating-star ${
|
|
7285
|
+
i.setAttribute("data-fill", s >= 1 ? "full" : s > 0 ? "half" : "empty"), i.className = `rui-rating-star ${Bt(c).join(" ")}`.trim();
|
|
7286
7286
|
}), t.setAttribute("aria-label", `${Math.max(0, Math.min(r, e))} of ${r}`);
|
|
7287
7287
|
}
|
|
7288
7288
|
function Zc(t) {
|
|
7289
7289
|
const e = t.trim().toLowerCase();
|
|
7290
|
-
return e ?
|
|
7290
|
+
return e ? rr[e] ? rr[e] : { full: e, half: e, empty: `regular:${e}` } : rr.star;
|
|
7291
7291
|
}
|
|
7292
7292
|
const Qc = {
|
|
7293
7293
|
name: "ProgressRing",
|
|
@@ -7314,7 +7314,7 @@ const Qc = {
|
|
|
7314
7314
|
const y = document.createElementNS(b, "circle");
|
|
7315
7315
|
y.setAttribute("class", "rui-progress-ring-bar"), y.setAttribute("cx", String(s / 2)), y.setAttribute("cy", String(s / 2)), y.setAttribute("r", String(u)), y.setAttribute("stroke-width", String(c)), y.setAttribute("fill", "none"), y.setAttribute("stroke-linecap", "round"), y.setAttribute("stroke-dasharray", String(p)), y.setAttribute("stroke-dashoffset", String(d)), h.appendChild(y), g.append(h);
|
|
7316
7316
|
const x = f(e.label, a ? "…" : `${i}%`), w = l("span", { class: "rui-progress-ring-value" }), k = D(x, { className: "rui-progress-ring-icon" });
|
|
7317
|
-
k &&
|
|
7317
|
+
k && Bt(x).length > 0 ? w.append(k) : w.append(document.createTextNode(x)), g.append(w), m.append(g);
|
|
7318
7318
|
const A = f(e.caption);
|
|
7319
7319
|
return A && m.append(l("span", { class: "rui-progress-ring-caption" }, [A])), m;
|
|
7320
7320
|
}
|
|
@@ -7334,16 +7334,16 @@ const Qc = {
|
|
|
7334
7334
|
class: "rui-chat-bubble",
|
|
7335
7335
|
"data-from": r
|
|
7336
7336
|
});
|
|
7337
|
-
r !== "me" && a.append(
|
|
7337
|
+
r !== "me" && a.append(xa(f(e.avatarSrc), f(e.author)));
|
|
7338
7338
|
const n = l("div", { class: "rui-chat-bubble-bubble" }), i = l("header", { class: "rui-chat-bubble-head" });
|
|
7339
7339
|
i.append(l("span", { class: "rui-chat-bubble-author" }, [f(e.author)]));
|
|
7340
7340
|
const o = f(e.time);
|
|
7341
7341
|
o && i.append(l("span", { class: "rui-chat-bubble-time" }, [o])), n.append(i), n.append(l("p", { class: "rui-chat-bubble-body" }, [f(e.body)]));
|
|
7342
7342
|
const s = f(e.status);
|
|
7343
|
-
return s && n.append(l("span", { class: "rui-chat-bubble-status", "data-status": s }, [s])), a.append(n), r === "me" && a.append(
|
|
7343
|
+
return s && n.append(l("span", { class: "rui-chat-bubble-status", "data-status": s }, [s])), a.append(n), r === "me" && a.append(xa(f(e.avatarSrc), f(e.author))), a;
|
|
7344
7344
|
}
|
|
7345
7345
|
};
|
|
7346
|
-
function
|
|
7346
|
+
function xa(t, e) {
|
|
7347
7347
|
const r = l("span", { class: "rui-chat-bubble-avatar" }), a = ne(t);
|
|
7348
7348
|
return a ? r.append(l("img", { src: a, alt: e, loading: "lazy" })) : r.append(l("span", { class: "rui-chat-bubble-fallback" }, [mt(e)])), r;
|
|
7349
7349
|
}
|
|
@@ -7407,13 +7407,13 @@ const tu = {
|
|
|
7407
7407
|
return s.append(u), c.onclick = (g) => {
|
|
7408
7408
|
g.stopPropagation();
|
|
7409
7409
|
const b = g.currentTarget ?? g.target, h = !n.get(), v = yt(b, h, n);
|
|
7410
|
-
h && v &&
|
|
7410
|
+
h && v && wa(v, n);
|
|
7411
7411
|
}, c.onkeydown = (g) => {
|
|
7412
7412
|
const b = g, h = b.currentTarget ?? b.target;
|
|
7413
7413
|
if (b.key === "Enter" || b.key === " ") {
|
|
7414
7414
|
b.preventDefault();
|
|
7415
7415
|
const v = !n.get(), y = yt(h, v, n);
|
|
7416
|
-
v && y &&
|
|
7416
|
+
v && y && wa(y, n);
|
|
7417
7417
|
} else b.key === "Escape" && n.get() && (b.preventDefault(), yt(h, !1, n));
|
|
7418
7418
|
}, s;
|
|
7419
7419
|
}
|
|
@@ -7424,7 +7424,7 @@ const tu = {
|
|
|
7424
7424
|
a.setAttribute("data-open", e ? "true" : "false");
|
|
7425
7425
|
const n = a.querySelector(".rui-popover-trigger");
|
|
7426
7426
|
return n?.setAttribute("aria-expanded", e ? "true" : "false"), n?.setAttribute("data-state", e ? "open" : "closed"), e || Ae(a), a;
|
|
7427
|
-
},
|
|
7427
|
+
}, wa = (t, e) => {
|
|
7428
7428
|
tt({
|
|
7429
7429
|
liveRoot: t,
|
|
7430
7430
|
onDismiss: () => {
|
|
@@ -7531,7 +7531,7 @@ function lu(t) {
|
|
|
7531
7531
|
return "circle-info";
|
|
7532
7532
|
}
|
|
7533
7533
|
}
|
|
7534
|
-
const
|
|
7534
|
+
const zn = {
|
|
7535
7535
|
name: "BreadcrumbItem",
|
|
7536
7536
|
description: "Single item inside a Breadcrumb trail. Provide `href` for a link, omit it for the current/leaf page (rendered with emphasis).",
|
|
7537
7537
|
props: [
|
|
@@ -7566,7 +7566,7 @@ const Ln = {
|
|
|
7566
7566
|
return;
|
|
7567
7567
|
}
|
|
7568
7568
|
const u = f(s), p = c === a.length - 1;
|
|
7569
|
-
o.append(
|
|
7569
|
+
o.append(zn.render(
|
|
7570
7570
|
{ __kind: "Component", name: "BreadcrumbItem", args: [], argMeta: [] },
|
|
7571
7571
|
{ label: u, href: p ? "" : "#" },
|
|
7572
7572
|
r
|
|
@@ -7717,14 +7717,14 @@ const mu = {
|
|
|
7717
7717
|
r.set(e);
|
|
7718
7718
|
const a = t.closest(".rui-dropdown-menu");
|
|
7719
7719
|
return a ? (a.setAttribute("data-open", e ? "true" : "false"), a.querySelector(".rui-dropdown-menu-trigger")?.setAttribute("aria-expanded", e ? "true" : "false"), e || Ae(a), a) : null;
|
|
7720
|
-
},
|
|
7720
|
+
}, ka = (t, e) => {
|
|
7721
7721
|
tt({
|
|
7722
7722
|
liveRoot: t,
|
|
7723
7723
|
onDismiss: () => {
|
|
7724
7724
|
e.set(!1), t.setAttribute("data-open", "false"), t.querySelector(".rui-dropdown-menu-trigger")?.setAttribute("aria-expanded", "false");
|
|
7725
7725
|
}
|
|
7726
7726
|
});
|
|
7727
|
-
},
|
|
7727
|
+
}, ar = (t, e) => {
|
|
7728
7728
|
if (!t || typeof t != "object") return !1;
|
|
7729
7729
|
const r = t;
|
|
7730
7730
|
return r.__kind === "Component" && r.name === e;
|
|
@@ -7755,13 +7755,13 @@ const mu = {
|
|
|
7755
7755
|
s.append(r.renderNode(e.trigger)), s.onclick = (u) => {
|
|
7756
7756
|
u.stopPropagation();
|
|
7757
7757
|
const p = u.currentTarget ?? u.target, d = !n.get(), m = xt(p, d, n);
|
|
7758
|
-
d && m &&
|
|
7758
|
+
d && m && ka(m, n);
|
|
7759
7759
|
}, s.onkeydown = (u) => {
|
|
7760
7760
|
const p = u, d = p.currentTarget ?? p.target;
|
|
7761
7761
|
if (p.key === "Enter" || p.key === " ") {
|
|
7762
7762
|
p.preventDefault();
|
|
7763
7763
|
const m = !n.get(), g = xt(d, m, n);
|
|
7764
|
-
m && g &&
|
|
7764
|
+
m && g && ka(g, n);
|
|
7765
7765
|
return;
|
|
7766
7766
|
}
|
|
7767
7767
|
p.key === "Escape" && n.get() && (p.preventDefault(), xt(d, !1, n));
|
|
@@ -7772,7 +7772,7 @@ const mu = {
|
|
|
7772
7772
|
"aria-label": f(e.label) || null
|
|
7773
7773
|
});
|
|
7774
7774
|
for (const u of $(e.items)) {
|
|
7775
|
-
if (
|
|
7775
|
+
if (ar(u, "MenuItem")) {
|
|
7776
7776
|
const p = u.args ?? [], d = f(p[0]), m = p[1], g = p[2], b = f(p[3]), h = f(p[4], "default"), v = T(p[5]), y = l("button", {
|
|
7777
7777
|
type: "button",
|
|
7778
7778
|
class: "rui-menu-item",
|
|
@@ -7786,11 +7786,11 @@ const mu = {
|
|
|
7786
7786
|
}), c.append(y);
|
|
7787
7787
|
continue;
|
|
7788
7788
|
}
|
|
7789
|
-
if (
|
|
7789
|
+
if (ar(u, "MenuSeparator")) {
|
|
7790
7790
|
c.append(l("div", { class: "rui-menu-separator", role: "separator" }));
|
|
7791
7791
|
continue;
|
|
7792
7792
|
}
|
|
7793
|
-
if (
|
|
7793
|
+
if (ar(u, "MenuLabel")) {
|
|
7794
7794
|
const p = f((u.args ?? [])[0]);
|
|
7795
7795
|
c.append(l("div", { class: "rui-menu-label" }, [p]));
|
|
7796
7796
|
continue;
|
|
@@ -7853,7 +7853,7 @@ function Su(t) {
|
|
|
7853
7853
|
};
|
|
7854
7854
|
});
|
|
7855
7855
|
}
|
|
7856
|
-
function
|
|
7856
|
+
function Sa(t, e, r) {
|
|
7857
7857
|
if (t == null) return e == null ? 0 : 1;
|
|
7858
7858
|
if (e == null) return -1;
|
|
7859
7859
|
if (r === "number" || r === "currency")
|
|
@@ -7921,7 +7921,7 @@ const $u = {
|
|
|
7921
7921
|
if (c) {
|
|
7922
7922
|
const j = a.find((q) => q.key === c);
|
|
7923
7923
|
j && j.sortable && w.sort((q, G) => {
|
|
7924
|
-
const K =
|
|
7924
|
+
const K = Sa(j.values[q], j.values[G], j.format);
|
|
7925
7925
|
return u === "desc" ? -K : K;
|
|
7926
7926
|
});
|
|
7927
7927
|
}
|
|
@@ -8006,7 +8006,7 @@ const $u = {
|
|
|
8006
8006
|
J.append(ve);
|
|
8007
8007
|
const De = l("tbody");
|
|
8008
8008
|
J.append(De);
|
|
8009
|
-
const
|
|
8009
|
+
const Gt = (j) => {
|
|
8010
8010
|
if (De.replaceChildren(), j.length === 0) {
|
|
8011
8011
|
const q = l("tr"), G = (m ? 1 : 0) + Math.max(a.length, 1);
|
|
8012
8012
|
q.append(l("td", {
|
|
@@ -8038,7 +8038,7 @@ const $u = {
|
|
|
8038
8038
|
"data-align": Q.align || null,
|
|
8039
8039
|
"data-first": Y === 0 ? "true" : null
|
|
8040
8040
|
});
|
|
8041
|
-
|
|
8041
|
+
hr(Z, Q, Q.values[q], q, r, wt), re.append(Z);
|
|
8042
8042
|
}), typeof e.onRowClick == "function" && (re.setAttribute("data-clickable", "true"), re.onclick = (Q) => {
|
|
8043
8043
|
Q.target?.closest("input,button,a,label,select,textarea") || r.invoke(e.onRowClick, q);
|
|
8044
8044
|
}), De.append(re);
|
|
@@ -8062,7 +8062,7 @@ const $u = {
|
|
|
8062
8062
|
if (c) {
|
|
8063
8063
|
const Y = a.find((Z) => Z.key === c);
|
|
8064
8064
|
Y && Y.sortable && K.sort((Z, me) => {
|
|
8065
|
-
const fe =
|
|
8065
|
+
const fe = Sa(Y.values[Z], Y.values[me], Y.format);
|
|
8066
8066
|
return u === "desc" ? -fe : fe;
|
|
8067
8067
|
});
|
|
8068
8068
|
}
|
|
@@ -8072,20 +8072,20 @@ const $u = {
|
|
|
8072
8072
|
for (const Z of re) {
|
|
8073
8073
|
const me = o(Z), fe = d.has(me), at = l("tr", { "data-selected": fe ? "true" : null });
|
|
8074
8074
|
if (m) {
|
|
8075
|
-
const je = l("td", { class: "rui-data-grid-cell-select" }),
|
|
8075
|
+
const je = l("td", { class: "rui-data-grid-cell-select" }), Yt = l("input", {
|
|
8076
8076
|
type: "checkbox",
|
|
8077
8077
|
class: "rui-data-grid-checkbox",
|
|
8078
8078
|
checked: fe ? "" : null
|
|
8079
8079
|
});
|
|
8080
|
-
je.append(
|
|
8080
|
+
je.append(Yt), at.append(je);
|
|
8081
8081
|
}
|
|
8082
|
-
a.forEach((je,
|
|
8083
|
-
const
|
|
8082
|
+
a.forEach((je, Yt) => {
|
|
8083
|
+
const Wr = l("td", {
|
|
8084
8084
|
"data-format": je.format,
|
|
8085
8085
|
"data-align": je.align || null,
|
|
8086
|
-
"data-first":
|
|
8086
|
+
"data-first": Yt === 0 ? "true" : null
|
|
8087
8087
|
});
|
|
8088
|
-
|
|
8088
|
+
hr(Wr, je, je.values[Z], Z, r, wt), at.append(Wr);
|
|
8089
8089
|
}), Y.append(at);
|
|
8090
8090
|
}
|
|
8091
8091
|
if (re.length === 0) {
|
|
@@ -8097,7 +8097,7 @@ const $u = {
|
|
|
8097
8097
|
}
|
|
8098
8098
|
})(q);
|
|
8099
8099
|
};
|
|
8100
|
-
if (
|
|
8100
|
+
if (Gt(I), X.append(J), E.append(X), k > A) {
|
|
8101
8101
|
const j = l("div", { class: "rui-data-grid-footer" }), q = k === 0 ? 0 : (N - 1) * A + 1, G = Math.min(k, N * A);
|
|
8102
8102
|
j.append(l("span", { class: "rui-data-grid-footer-summary" }, [
|
|
8103
8103
|
k === 0 ? "No results" : `Showing ${q}–${G} of ${k}`
|
|
@@ -8134,11 +8134,11 @@ function Cu(t) {
|
|
|
8134
8134
|
}
|
|
8135
8135
|
return e;
|
|
8136
8136
|
}
|
|
8137
|
-
function
|
|
8137
|
+
function $a(t, e) {
|
|
8138
8138
|
const r = new Date(t.getFullYear(), t.getMonth(), t.getDate()), n = (r.getDay() - e + 7) % 7;
|
|
8139
8139
|
return r.setDate(r.getDate() - n), r;
|
|
8140
8140
|
}
|
|
8141
|
-
function
|
|
8141
|
+
function Ca(t) {
|
|
8142
8142
|
const e = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), a = String(t.getDate()).padStart(2, "0");
|
|
8143
8143
|
return `${e}-${r}-${a}`;
|
|
8144
8144
|
}
|
|
@@ -8181,21 +8181,21 @@ const Au = {
|
|
|
8181
8181
|
g.append(v);
|
|
8182
8182
|
const x = [];
|
|
8183
8183
|
if (a === "week") {
|
|
8184
|
-
const A = p ? new Date(p) : c, S =
|
|
8184
|
+
const A = p ? new Date(p) : c, S = $a(A, u);
|
|
8185
8185
|
for (let C = 0; C < 7; C += 1) {
|
|
8186
8186
|
const N = new Date(S);
|
|
8187
8187
|
N.setDate(S.getDate() + C), x.push({ date: N, inMonth: N.getMonth() === c.getMonth() });
|
|
8188
8188
|
}
|
|
8189
8189
|
} else {
|
|
8190
|
-
const A = new Date(c.getFullYear(), c.getMonth(), 1), S = new Date(c.getFullYear(), c.getMonth() + 1, 0), C =
|
|
8190
|
+
const A = new Date(c.getFullYear(), c.getMonth(), 1), S = new Date(c.getFullYear(), c.getMonth() + 1, 0), C = $a(A, u), N = Math.ceil((S.getDate() + (A.getDay() - u + 7) % 7) / 7) * 7;
|
|
8191
8191
|
for (let I = 0; I < N; I += 1) {
|
|
8192
8192
|
const E = new Date(C);
|
|
8193
8193
|
E.setDate(C.getDate() + I), x.push({ date: E, inMonth: E.getMonth() === c.getMonth() });
|
|
8194
8194
|
}
|
|
8195
8195
|
}
|
|
8196
|
-
const w = l("div", { class: "rui-calendar-grid", "data-view": a }), k =
|
|
8196
|
+
const w = l("div", { class: "rui-calendar-grid", "data-view": a }), k = Ca(s);
|
|
8197
8197
|
for (const A of x) {
|
|
8198
|
-
const S =
|
|
8198
|
+
const S = Ca(A.date), C = S === k, N = S === p, I = d.get(S) ?? [], E = l("button", {
|
|
8199
8199
|
type: "button",
|
|
8200
8200
|
class: "rui-calendar-day",
|
|
8201
8201
|
"data-in-month": A.inMonth ? "true" : "false",
|
|
@@ -8369,7 +8369,7 @@ const zu = {
|
|
|
8369
8369
|
{ name: "ratio", type: "string", optional: !0, description: "Aspect ratio (default 16:9)" }
|
|
8370
8370
|
],
|
|
8371
8371
|
render: (t, e) => {
|
|
8372
|
-
const r = l("figure", { class: "rui-video-player" }), a =
|
|
8372
|
+
const r = l("figure", { class: "rui-video-player" }), a = Br(f(e.ratio, "16:9")), n = l("div", {
|
|
8373
8373
|
class: "rui-video-player-frame",
|
|
8374
8374
|
style: `aspect-ratio:${a};`
|
|
8375
8375
|
}), i = e.controls === void 0 ? !0 : T(e.controls), o = l("video", {
|
|
@@ -8474,7 +8474,7 @@ const Du = {
|
|
|
8474
8474
|
const a = $(e.items), n = a.length, i = Math.max(0, Math.min(Math.max(n - 1, 0), Math.floor(P(e.activeIndex, 0)))), o = r.useInstanceState("active", i);
|
|
8475
8475
|
let s = o.get();
|
|
8476
8476
|
s >= n && (s = 0, o.set(s));
|
|
8477
|
-
const c = e.showDots === void 0 ? !0 : T(e.showDots), u = e.showArrows === void 0 ? !0 : T(e.showArrows), p =
|
|
8477
|
+
const c = e.showDots === void 0 ? !0 : T(e.showDots), u = e.showArrows === void 0 ? !0 : T(e.showArrows), p = Br(f(e.ratio, "16:9")), d = l("div", { class: "rui-carousel" }), m = l("div", {
|
|
8478
8478
|
class: "rui-carousel-frame",
|
|
8479
8479
|
style: `aspect-ratio:${p};`
|
|
8480
8480
|
}), g = l("div", {
|
|
@@ -8533,12 +8533,12 @@ const Du = {
|
|
|
8533
8533
|
{ name: "onSelect", type: "callable", optional: !0, description: "Callable fired when a tile is clicked" }
|
|
8534
8534
|
],
|
|
8535
8535
|
render: (t, e, r) => {
|
|
8536
|
-
const a = $(e.items), n = Math.max(1, Math.min(6, Number(e.columns ?? "auto"))), i =
|
|
8536
|
+
const a = $(e.items), n = Math.max(1, Math.min(6, Number(e.columns ?? "auto"))), i = Br(f(e.ratio, "1:1")), o = l("div", {
|
|
8537
8537
|
class: "rui-gallery",
|
|
8538
8538
|
"data-columns": n > 0 ? String(n) : null
|
|
8539
8539
|
});
|
|
8540
8540
|
return a.forEach((s, c) => {
|
|
8541
|
-
const { src: u, alt: p, caption: d } =
|
|
8541
|
+
const { src: u, alt: p, caption: d } = Ln(s), m = ne(u), g = typeof e.onSelect == "function", b = l(g ? "button" : "figure", {
|
|
8542
8542
|
type: g ? "button" : null,
|
|
8543
8543
|
class: "rui-gallery-tile",
|
|
8544
8544
|
style: `aspect-ratio:${i};`,
|
|
@@ -8554,7 +8554,7 @@ const Du = {
|
|
|
8554
8554
|
}), o;
|
|
8555
8555
|
}
|
|
8556
8556
|
};
|
|
8557
|
-
function
|
|
8557
|
+
function Ln(t) {
|
|
8558
8558
|
if (typeof t == "string") return { src: t, alt: "", caption: "" };
|
|
8559
8559
|
if (t && typeof t == "object") {
|
|
8560
8560
|
const e = t;
|
|
@@ -8579,7 +8579,7 @@ const Bu = {
|
|
|
8579
8579
|
{ name: "index", type: "number", optional: !0, description: "0-indexed current image; typically a $variable" }
|
|
8580
8580
|
],
|
|
8581
8581
|
render: (t, e, r) => {
|
|
8582
|
-
const a = $(e.items).map((C) =>
|
|
8582
|
+
const a = $(e.items).map((C) => Ln(C)).filter((C) => ne(C.src) !== ""), n = a.length, i = t.argMeta?.[2]?.stateRef, o = t.argMeta?.[1]?.stateRef, s = r.useInstanceState("open", !1), c = r.useInstanceState("index", 0), u = o ? T(e.open) : s.get(), p = i ? Math.floor(P(e.index, 0)) : c.get(), d = n === 0 ? 0 : (p % n + n) % n, m = (C) => {
|
|
8583
8583
|
o ? r.setState(o, C) : s.set(C);
|
|
8584
8584
|
}, g = (C) => {
|
|
8585
8585
|
i ? r.setState(i, C) : c.set(C);
|
|
@@ -8704,7 +8704,7 @@ const _u = {
|
|
|
8704
8704
|
return b && r.append(l("figcaption", { class: "rui-map-caption" }, [b])), r;
|
|
8705
8705
|
}
|
|
8706
8706
|
};
|
|
8707
|
-
function
|
|
8707
|
+
function Br(t) {
|
|
8708
8708
|
if (t.includes(":")) {
|
|
8709
8709
|
const [r, a] = t.split(":"), n = Number(r), i = Number(a);
|
|
8710
8710
|
if (Number.isFinite(n) && Number.isFinite(i) && i > 0) return `${n} / ${i}`;
|
|
@@ -9029,21 +9029,21 @@ const Gu = {
|
|
|
9029
9029
|
getValue: (h) => h.value
|
|
9030
9030
|
}), c.append(u, p), o.append(c, d), o;
|
|
9031
9031
|
}
|
|
9032
|
-
},
|
|
9032
|
+
}, nr = [
|
|
9033
9033
|
"var(--rui-chart-1, #6366f1)",
|
|
9034
9034
|
"var(--rui-chart-2, #10b981)",
|
|
9035
9035
|
"var(--rui-chart-3, #f59e0b)",
|
|
9036
9036
|
"var(--rui-chart-4, #ef4444)",
|
|
9037
9037
|
"var(--rui-chart-5, #06b6d4)",
|
|
9038
9038
|
"var(--rui-chart-6, #8b5cf6)"
|
|
9039
|
-
], We = (t) =>
|
|
9039
|
+
], We = (t) => nr[t % nr.length] ?? nr[0];
|
|
9040
9040
|
function Yu(t) {
|
|
9041
9041
|
return t.map((e, r) => {
|
|
9042
9042
|
const a = e, n = f(a.args?.[0], `Series ${r + 1}`), i = $(a.args?.[1]).map((o) => P(o));
|
|
9043
9043
|
return { name: n, values: i };
|
|
9044
9044
|
});
|
|
9045
9045
|
}
|
|
9046
|
-
function
|
|
9046
|
+
function Ft(t, e) {
|
|
9047
9047
|
const r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
9048
9048
|
return r.setAttribute("viewBox", `0 0 ${t} ${e}`), r.setAttribute("class", "rui-chart-svg"), r.setAttribute("role", "img"), r;
|
|
9049
9049
|
}
|
|
@@ -9055,7 +9055,7 @@ function le(t, e, r) {
|
|
|
9055
9055
|
a.append(typeof n == "string" ? document.createTextNode(n) : n);
|
|
9056
9056
|
return a;
|
|
9057
9057
|
}
|
|
9058
|
-
function
|
|
9058
|
+
function Rn(t) {
|
|
9059
9059
|
const e = l("div", { class: "rui-chart-legend" });
|
|
9060
9060
|
return t.forEach((r, a) => {
|
|
9061
9061
|
const n = l("span", { class: "rui-chart-legend-item" });
|
|
@@ -9079,7 +9079,7 @@ const Xu = {
|
|
|
9079
9079
|
class: "rui-gauge",
|
|
9080
9080
|
"data-tone": o,
|
|
9081
9081
|
"data-size": s
|
|
9082
|
-
}), g =
|
|
9082
|
+
}), g = Ft(c, u + p + 4), b = u, h = u, v = b - d, y = h, x = b + d, w = h;
|
|
9083
9083
|
if (g.append(le("path", {
|
|
9084
9084
|
d: `M${v},${y} A${d},${d} 0 0 1 ${x},${w}`,
|
|
9085
9085
|
fill: "none",
|
|
@@ -9148,7 +9148,7 @@ const Zu = {
|
|
|
9148
9148
|
render: (t, e) => {
|
|
9149
9149
|
const r = $(e.axes).map((g) => f(g)), a = Yu($(e.series)), n = Math.max(r.length, 3), i = l("div", { class: "rui-chart rui-radar-chart" });
|
|
9150
9150
|
f(e.title) && i.append(l("div", { class: "rui-chart-title" }, [f(e.title)]));
|
|
9151
|
-
const o = Math.max(1, P(e.max, a.flatMap((g) => g.values).reduce((g, b) => Math.max(g, b), 1))), s = 280, c = s / 2, u = s / 2, p = s / 2 - 24, d =
|
|
9151
|
+
const o = Math.max(1, P(e.max, a.flatMap((g) => g.values).reduce((g, b) => Math.max(g, b), 1))), s = 280, c = s / 2, u = s / 2, p = s / 2 - 24, d = Ft(s, s), m = 4;
|
|
9152
9152
|
for (let g = 1; g <= m; g += 1) {
|
|
9153
9153
|
const b = p / m * g, h = [];
|
|
9154
9154
|
for (let v = 0; v < n; v += 1) {
|
|
@@ -9197,7 +9197,7 @@ const Zu = {
|
|
|
9197
9197
|
"stroke-width": "2",
|
|
9198
9198
|
"stroke-linejoin": "round"
|
|
9199
9199
|
}));
|
|
9200
|
-
}), i.append(d), a.length > 0 && i.append(
|
|
9200
|
+
}), i.append(d), a.length > 0 && i.append(Rn(a)), i;
|
|
9201
9201
|
}
|
|
9202
9202
|
};
|
|
9203
9203
|
function ed(t) {
|
|
@@ -9229,8 +9229,8 @@ const td = {
|
|
|
9229
9229
|
const n = 640, i = 280, o = { left: 50, right: 16, top: 16, bottom: 40 }, s = n - o.left - o.right, c = i - o.top - o.bottom, u = r.flatMap((k) => k.points);
|
|
9230
9230
|
if (u.length === 0)
|
|
9231
9231
|
return a.append(l("div", { class: "rui-chart-empty" }, ["No points"])), a;
|
|
9232
|
-
const p = u.map((k) => k.x), d = u.map((k) => k.y), m = Math.min(...p), g = Math.max(...p), b = Math.min(...d), h = Math.max(...d), v = g - m || 1, y = h - b || 1, x =
|
|
9233
|
-
if (
|
|
9232
|
+
const p = u.map((k) => k.x), d = u.map((k) => k.y), m = Math.min(...p), g = Math.max(...p), b = Math.min(...d), h = Math.max(...d), v = g - m || 1, y = h - b || 1, x = Ft(n, i);
|
|
9233
|
+
if (Dn(x, o, s, c, h, b), x.append(le("line", {
|
|
9234
9234
|
x1: String(o.left),
|
|
9235
9235
|
y1: String(o.top + c),
|
|
9236
9236
|
x2: String(o.left + s),
|
|
@@ -9270,7 +9270,7 @@ const td = {
|
|
|
9270
9270
|
}
|
|
9271
9271
|
a.append(x);
|
|
9272
9272
|
const w = r.map((k) => ({ name: k.name, values: k.points.map((A) => A.y) }));
|
|
9273
|
-
return w.length > 0 && a.append(
|
|
9273
|
+
return w.length > 0 && a.append(Rn(w)), a;
|
|
9274
9274
|
}
|
|
9275
9275
|
}, rd = {
|
|
9276
9276
|
name: "Histogram",
|
|
@@ -9298,15 +9298,15 @@ const td = {
|
|
|
9298
9298
|
}
|
|
9299
9299
|
r = x.map((w, k) => {
|
|
9300
9300
|
const A = b + k * y, S = A + y;
|
|
9301
|
-
return { label: `${
|
|
9301
|
+
return { label: `${Aa(A)}–${Aa(S)}`, count: w };
|
|
9302
9302
|
});
|
|
9303
9303
|
}
|
|
9304
9304
|
}
|
|
9305
9305
|
const a = l("div", { class: "rui-chart rui-histogram" });
|
|
9306
9306
|
if (f(e.title) && a.append(l("div", { class: "rui-chart-title" }, [f(e.title)])), r.length === 0)
|
|
9307
9307
|
return a.append(l("div", { class: "rui-chart-empty" }, ["No data"])), a;
|
|
9308
|
-
const n = 640, i = 240, o = { left: 40, right: 12, top: 16, bottom: 50 }, s = n - o.left - o.right, c = i - o.top - o.bottom, u = Math.max(1, ...r.map((m) => m.count)), p = s / r.length, d =
|
|
9309
|
-
return
|
|
9308
|
+
const n = 640, i = 240, o = { left: 40, right: 12, top: 16, bottom: 50 }, s = n - o.left - o.right, c = i - o.top - o.bottom, u = Math.max(1, ...r.map((m) => m.count)), p = s / r.length, d = Ft(n, i);
|
|
9309
|
+
return Dn(d, o, s, c, u), r.forEach((m, g) => {
|
|
9310
9310
|
const b = o.left + g * p + p * 0.1, h = p * 0.8, v = m.count / u * c, y = o.top + c - v, x = le("rect", {
|
|
9311
9311
|
x: b.toFixed(1),
|
|
9312
9312
|
y: y.toFixed(1),
|
|
@@ -9325,10 +9325,10 @@ const td = {
|
|
|
9325
9325
|
}), a.append(d), a;
|
|
9326
9326
|
}
|
|
9327
9327
|
};
|
|
9328
|
-
function
|
|
9328
|
+
function Aa(t) {
|
|
9329
9329
|
return Number.isFinite(t) ? Math.abs(t) >= 1e3 ? Math.round(t).toLocaleString() : Math.abs(t) >= 10 ? t.toFixed(0) : t.toFixed(1) : "?";
|
|
9330
9330
|
}
|
|
9331
|
-
function
|
|
9331
|
+
function Dn(t, e, r, a, n, i = 0) {
|
|
9332
9332
|
for (let s = 0; s <= 4; s += 1) {
|
|
9333
9333
|
const c = s / 4, u = e.top + a - c * a;
|
|
9334
9334
|
t.append(le("line", {
|
|
@@ -9703,7 +9703,7 @@ const ud = {
|
|
|
9703
9703
|
}), n.append(o), n;
|
|
9704
9704
|
}
|
|
9705
9705
|
};
|
|
9706
|
-
function
|
|
9706
|
+
function Ta(t, e) {
|
|
9707
9707
|
if (!e) return t;
|
|
9708
9708
|
let r = "", a = 0;
|
|
9709
9709
|
const n = String(t ?? "");
|
|
@@ -9734,7 +9734,7 @@ const md = {
|
|
|
9734
9734
|
{ name: "onChange", type: "callable", optional: !0, aliases: ["onchange"], description: "Called with the masked value on every keystroke" }
|
|
9735
9735
|
],
|
|
9736
9736
|
render: (t, e, r) => {
|
|
9737
|
-
const a = f(e.id), n = f(e.mask), i = T(e.disabled), o =
|
|
9737
|
+
const a = f(e.id), n = f(e.mask), i = T(e.disabled), o = Ta(f(e.value), n), s = f(e.label), c = l("input", {
|
|
9738
9738
|
type: "text",
|
|
9739
9739
|
class: "rui-masked-input",
|
|
9740
9740
|
id: a,
|
|
@@ -9746,7 +9746,7 @@ const md = {
|
|
|
9746
9746
|
});
|
|
9747
9747
|
c.value = o;
|
|
9748
9748
|
const u = t.argMeta?.[2]?.stateRef, p = (d) => {
|
|
9749
|
-
const m = d.value, g =
|
|
9749
|
+
const m = d.value, g = Ta(m, n);
|
|
9750
9750
|
if (g === m) return g;
|
|
9751
9751
|
const b = d.selectionStart ?? g.length;
|
|
9752
9752
|
d.value = g;
|
|
@@ -9942,7 +9942,7 @@ const xd = {
|
|
|
9942
9942
|
const p = l("section", { class: "rui-inbox-panel-group" }), d = l("header", { class: "rui-inbox-panel-group-head" });
|
|
9943
9943
|
d.append(l("span", { class: "rui-inbox-panel-group-label" }, [c])), d.append(l("span", { class: "rui-inbox-panel-group-count" }, [String(u.length)])), p.append(d);
|
|
9944
9944
|
for (const m of u) {
|
|
9945
|
-
const g =
|
|
9945
|
+
const g = Cn.render(
|
|
9946
9946
|
{ __kind: "Component", name: "Notification", args: [], argMeta: [] },
|
|
9947
9947
|
{
|
|
9948
9948
|
title: m.title,
|
|
@@ -10020,7 +10020,7 @@ const kd = {
|
|
|
10020
10020
|
return s.append(p), s;
|
|
10021
10021
|
}
|
|
10022
10022
|
};
|
|
10023
|
-
function
|
|
10023
|
+
function jn(t) {
|
|
10024
10024
|
const e = l("div", { class: `rui-${t.klass}` });
|
|
10025
10025
|
if (t.iconName) {
|
|
10026
10026
|
const a = D(t.iconName, { className: t.iconClass });
|
|
@@ -10057,7 +10057,7 @@ const Sd = {
|
|
|
10057
10057
|
{ name: "actions", type: "Node[]", optional: !0 },
|
|
10058
10058
|
{ name: "icon", type: "string", optional: !0, description: "Font Awesome icon (default `circle-exclamation`)" }
|
|
10059
10059
|
],
|
|
10060
|
-
render: (t, e, r) =>
|
|
10060
|
+
render: (t, e, r) => jn({
|
|
10061
10061
|
klass: "error-state",
|
|
10062
10062
|
iconName: f(e.icon, "circle-exclamation"),
|
|
10063
10063
|
iconClass: "rui-error-state-icon",
|
|
@@ -10075,7 +10075,7 @@ const Sd = {
|
|
|
10075
10075
|
{ name: "actions", type: "Node[]", optional: !0 },
|
|
10076
10076
|
{ name: "icon", type: "string", optional: !0, description: "Default `circle-check`" }
|
|
10077
10077
|
],
|
|
10078
|
-
render: (t, e, r) =>
|
|
10078
|
+
render: (t, e, r) => jn({
|
|
10079
10079
|
klass: "success-state",
|
|
10080
10080
|
iconName: f(e.icon, "circle-check"),
|
|
10081
10081
|
iconClass: "rui-success-state-icon",
|
|
@@ -10344,7 +10344,7 @@ function jd(t) {
|
|
|
10344
10344
|
return { value: r, label: r };
|
|
10345
10345
|
}).filter((e) => e.label !== "");
|
|
10346
10346
|
}
|
|
10347
|
-
function
|
|
10347
|
+
function Ut(t) {
|
|
10348
10348
|
return $(t).filter(
|
|
10349
10349
|
(e) => !!e && typeof e == "object" && !Array.isArray(e)
|
|
10350
10350
|
);
|
|
@@ -10365,7 +10365,7 @@ function Bd(t) {
|
|
|
10365
10365
|
return { value: r, label: r };
|
|
10366
10366
|
}).filter((e) => e.label !== "");
|
|
10367
10367
|
}
|
|
10368
|
-
function
|
|
10368
|
+
function Bn(t) {
|
|
10369
10369
|
return $(t).map((e) => {
|
|
10370
10370
|
if (e && typeof e == "object") {
|
|
10371
10371
|
const a = e, n = f(a.name ?? a.label);
|
|
@@ -10376,7 +10376,7 @@ function On(t) {
|
|
|
10376
10376
|
}).filter((e) => e.name !== "");
|
|
10377
10377
|
}
|
|
10378
10378
|
function Od(t) {
|
|
10379
|
-
return
|
|
10379
|
+
return Ut(t).map((e, r) => ({
|
|
10380
10380
|
id: f(e.id, `task-${r}`),
|
|
10381
10381
|
label: f(e.label ?? e.name, `Task ${r + 1}`),
|
|
10382
10382
|
start: f(e.start),
|
|
@@ -10398,33 +10398,33 @@ function _d(t, e) {
|
|
|
10398
10398
|
}
|
|
10399
10399
|
return i;
|
|
10400
10400
|
}
|
|
10401
|
-
function
|
|
10401
|
+
function On(t) {
|
|
10402
10402
|
try {
|
|
10403
10403
|
return JSON.stringify(t, null, 2);
|
|
10404
10404
|
} catch {
|
|
10405
10405
|
return String(t);
|
|
10406
10406
|
}
|
|
10407
10407
|
}
|
|
10408
|
-
function
|
|
10408
|
+
function Ma(t, e, r, a) {
|
|
10409
10409
|
for (const [n, i] of e) {
|
|
10410
10410
|
const o = l("div", { class: "rui-json-tree-row" });
|
|
10411
|
-
o.append(l("span", { class: "rui-json-tree-key" }, [`${n}: `])), i !== null && typeof i == "object" ? o.append(
|
|
10411
|
+
o.append(l("span", { class: "rui-json-tree-key" }, [`${n}: `])), i !== null && typeof i == "object" ? o.append(_n(i, r, a + 1)) : o.append(l("span", { class: "rui-json-tree-leaf" }, [On(i)])), t.append(o);
|
|
10412
10412
|
}
|
|
10413
10413
|
}
|
|
10414
|
-
function
|
|
10414
|
+
function _n(t, e, r = 0) {
|
|
10415
10415
|
const a = l("div", { class: "rui-json-tree-node", "data-depth": String(r) });
|
|
10416
10416
|
if (t === null || typeof t != "object")
|
|
10417
|
-
return a.append(l("span", { class: "rui-json-tree-leaf" }, [
|
|
10417
|
+
return a.append(l("span", { class: "rui-json-tree-leaf" }, [On(t)])), a;
|
|
10418
10418
|
const n = Array.isArray(t), i = n ? t.map((u, p) => [String(p), u]) : Object.entries(t), o = e || r < 1, s = l("button", {
|
|
10419
10419
|
type: "button",
|
|
10420
10420
|
class: "rui-json-tree-toggle",
|
|
10421
10421
|
"aria-expanded": o ? "true" : "false"
|
|
10422
10422
|
}, [o ? "▼" : "▶", n ? ` Array(${i.length})` : " Object"]), c = l("div", { class: "rui-json-tree-children", "data-open": o ? "true" : "false" });
|
|
10423
|
-
return o &&
|
|
10423
|
+
return o && Ma(c, i, e, r), s.onclick = (u) => {
|
|
10424
10424
|
const p = u.currentTarget, d = p.nextElementSibling;
|
|
10425
10425
|
if (!d) return;
|
|
10426
10426
|
const m = d.getAttribute("data-open") !== "true";
|
|
10427
|
-
d.setAttribute("data-open", m ? "true" : "false"), p.setAttribute("aria-expanded", m ? "true" : "false"), p.firstChild && (p.firstChild.textContent = m ? "▼" : "▶"), m && d.childElementCount === 0 ?
|
|
10427
|
+
d.setAttribute("data-open", m ? "true" : "false"), p.setAttribute("aria-expanded", m ? "true" : "false"), p.firstChild && (p.firstChild.textContent = m ? "▼" : "▶"), m && d.childElementCount === 0 ? Ma(d, i, e, r) : m || d.replaceChildren();
|
|
10428
10428
|
}, a.append(s, c), a;
|
|
10429
10429
|
}
|
|
10430
10430
|
const Fd = {
|
|
@@ -10551,7 +10551,7 @@ const Fd = {
|
|
|
10551
10551
|
{ name: "addLabel", type: "string", optional: !0 }
|
|
10552
10552
|
],
|
|
10553
10553
|
render: (t, e, r) => {
|
|
10554
|
-
const a =
|
|
10554
|
+
const a = Ut(e.items), n = Bn(e.fields), i = l("div", { class: "rui-field-repeater" });
|
|
10555
10555
|
if (a.forEach((o, s) => {
|
|
10556
10556
|
const c = l("div", { class: "rui-field-repeater-row", "data-index": String(s) }), u = l("div", { class: "rui-field-repeater-grid" });
|
|
10557
10557
|
for (const p of n) {
|
|
@@ -10626,7 +10626,7 @@ const Fd = {
|
|
|
10626
10626
|
{ name: "onChange", type: "callable", optional: !0, description: "Receives the next rule array" }
|
|
10627
10627
|
],
|
|
10628
10628
|
render: (t, e, r) => {
|
|
10629
|
-
const a =
|
|
10629
|
+
const a = Bn(e.fields), n = Ut(e.value), i = t.argMeta?.[1]?.stateRef, o = l("div", { class: "rui-query-builder" }), s = (c) => {
|
|
10630
10630
|
o.replaceChildren(), c.forEach((p, d) => {
|
|
10631
10631
|
const m = l("div", { class: "rui-query-builder-row", "data-index": String(d) }), g = l("select", { class: "rui-select rui-query-builder-field" });
|
|
10632
10632
|
for (const y of a)
|
|
@@ -10685,7 +10685,7 @@ const Fd = {
|
|
|
10685
10685
|
],
|
|
10686
10686
|
render: (t, e) => {
|
|
10687
10687
|
const r = l("div", { class: "rui-json-tree" });
|
|
10688
|
-
return r.append(
|
|
10688
|
+
return r.append(_n(e.data, T(e.expanded))), r;
|
|
10689
10689
|
}
|
|
10690
10690
|
}, Yd = {
|
|
10691
10691
|
name: "Gantt",
|
|
@@ -10784,7 +10784,7 @@ const Fd = {
|
|
|
10784
10784
|
{ name: "onOpen", type: "callable", optional: !0 }
|
|
10785
10785
|
],
|
|
10786
10786
|
render: (t, e, r) => {
|
|
10787
|
-
const a = Math.max(0, Math.floor(P(e.count, 0))), n =
|
|
10787
|
+
const a = Math.max(0, Math.floor(P(e.count, 0))), n = Ut(e.items), i = r.useInstanceState("open", !1), o = i.get(), s = l("div", { class: "rui-notification-bell", "data-open": o ? "true" : "false" }), c = l("button", {
|
|
10788
10788
|
type: "button",
|
|
10789
10789
|
class: "rui-notification-bell-trigger",
|
|
10790
10790
|
"aria-expanded": o ? "true" : "false",
|
|
@@ -11112,13 +11112,13 @@ const bp = {
|
|
|
11112
11112
|
const r = hp(e.css), a = document.createElement("style");
|
|
11113
11113
|
return a.setAttribute("class", "rui-styles"), r && (a.textContent = r), a;
|
|
11114
11114
|
}
|
|
11115
|
-
},
|
|
11115
|
+
}, Fn = [
|
|
11116
11116
|
Zo,
|
|
11117
11117
|
Qo,
|
|
11118
11118
|
ts,
|
|
11119
11119
|
es,
|
|
11120
11120
|
Xo,
|
|
11121
|
-
|
|
11121
|
+
bn,
|
|
11122
11122
|
ms,
|
|
11123
11123
|
fs,
|
|
11124
11124
|
rs,
|
|
@@ -11138,7 +11138,7 @@ const bp = {
|
|
|
11138
11138
|
As,
|
|
11139
11139
|
Ts,
|
|
11140
11140
|
Ns,
|
|
11141
|
-
|
|
11141
|
+
va,
|
|
11142
11142
|
Ps,
|
|
11143
11143
|
Es,
|
|
11144
11144
|
Ls,
|
|
@@ -11160,12 +11160,12 @@ const bp = {
|
|
|
11160
11160
|
Cl,
|
|
11161
11161
|
hl,
|
|
11162
11162
|
bl,
|
|
11163
|
-
|
|
11163
|
+
Sn,
|
|
11164
11164
|
Ml,
|
|
11165
11165
|
Nl,
|
|
11166
11166
|
Il,
|
|
11167
11167
|
Pl,
|
|
11168
|
-
|
|
11168
|
+
$n,
|
|
11169
11169
|
El,
|
|
11170
11170
|
zl,
|
|
11171
11171
|
vc,
|
|
@@ -11186,7 +11186,7 @@ const bp = {
|
|
|
11186
11186
|
_c,
|
|
11187
11187
|
Fc,
|
|
11188
11188
|
eu,
|
|
11189
|
-
|
|
11189
|
+
En,
|
|
11190
11190
|
Hc,
|
|
11191
11191
|
Vc,
|
|
11192
11192
|
Qc,
|
|
@@ -11199,7 +11199,7 @@ const bp = {
|
|
|
11199
11199
|
tu,
|
|
11200
11200
|
Xc,
|
|
11201
11201
|
cu,
|
|
11202
|
-
|
|
11202
|
+
zn,
|
|
11203
11203
|
du,
|
|
11204
11204
|
fu,
|
|
11205
11205
|
mu,
|
|
@@ -11221,7 +11221,7 @@ const bp = {
|
|
|
11221
11221
|
gc,
|
|
11222
11222
|
Gl,
|
|
11223
11223
|
Yl,
|
|
11224
|
-
|
|
11224
|
+
Cn,
|
|
11225
11225
|
dc,
|
|
11226
11226
|
Zl,
|
|
11227
11227
|
Jl,
|
|
@@ -11315,7 +11315,7 @@ const bp = {
|
|
|
11315
11315
|
ll,
|
|
11316
11316
|
cl,
|
|
11317
11317
|
dl,
|
|
11318
|
-
|
|
11318
|
+
va,
|
|
11319
11319
|
// Escape hatches for raw HTML / CSS — last-resort primitives
|
|
11320
11320
|
mp,
|
|
11321
11321
|
bp
|
|
@@ -11722,10 +11722,10 @@ const bp = {
|
|
|
11722
11722
|
]
|
|
11723
11723
|
}
|
|
11724
11724
|
];
|
|
11725
|
-
mo(
|
|
11726
|
-
const
|
|
11725
|
+
mo(Fn);
|
|
11726
|
+
const Ht = {
|
|
11727
11727
|
root: "Column",
|
|
11728
|
-
components:
|
|
11728
|
+
components: Fn,
|
|
11729
11729
|
componentGroups: vp
|
|
11730
11730
|
}, yp = (t) => {
|
|
11731
11731
|
const e = {
|
|
@@ -11743,7 +11743,7 @@ const Vt = {
|
|
|
11743
11743
|
for (const a of r.components) e.set(a, r.name);
|
|
11744
11744
|
return e;
|
|
11745
11745
|
};
|
|
11746
|
-
function kp(t =
|
|
11746
|
+
function kp(t = Ht) {
|
|
11747
11747
|
const e = wp(t);
|
|
11748
11748
|
return t.components.map((r) => ({
|
|
11749
11749
|
name: r.name,
|
|
@@ -11765,7 +11765,7 @@ function Cp(t, e) {
|
|
|
11765
11765
|
function Ap(t, e) {
|
|
11766
11766
|
return !!(t === e || e.startsWith(t + ".") || t.startsWith(e + "."));
|
|
11767
11767
|
}
|
|
11768
|
-
function
|
|
11768
|
+
function Un(t, e) {
|
|
11769
11769
|
if (t.has(e)) return !0;
|
|
11770
11770
|
for (const r of t)
|
|
11771
11771
|
if (Ap(r, e)) return !0;
|
|
@@ -11773,7 +11773,7 @@ function Hn(t, e) {
|
|
|
11773
11773
|
}
|
|
11774
11774
|
function zt(t, e) {
|
|
11775
11775
|
for (const r of e)
|
|
11776
|
-
if (
|
|
11776
|
+
if (Un(t, r)) return !0;
|
|
11777
11777
|
return !1;
|
|
11778
11778
|
}
|
|
11779
11779
|
class Tp {
|
|
@@ -11950,9 +11950,9 @@ function ct(t, e, r, a) {
|
|
|
11950
11950
|
const o = {};
|
|
11951
11951
|
return o[n] = ct(void 0, e, r + 1, a), o;
|
|
11952
11952
|
}
|
|
11953
|
-
const
|
|
11953
|
+
const Or = Symbol("aktion.httpResource");
|
|
11954
11954
|
function Mp(t) {
|
|
11955
|
-
return typeof t == "object" && t !== null && t[
|
|
11955
|
+
return typeof t == "object" && t !== null && t[Or] === !0;
|
|
11956
11956
|
}
|
|
11957
11957
|
class Np {
|
|
11958
11958
|
constructor() {
|
|
@@ -12033,7 +12033,7 @@ const Pp = /* @__PURE__ */ new Set([
|
|
|
12033
12033
|
"query",
|
|
12034
12034
|
"signal"
|
|
12035
12035
|
]);
|
|
12036
|
-
function
|
|
12036
|
+
function Hn(t) {
|
|
12037
12037
|
const e = t && typeof t == "object" && !Array.isArray(t) ? t : {}, r = typeof e.url == "string" ? e.url : "", a = typeof e.method == "string" ? e.method.toUpperCase() : "GET", n = {};
|
|
12038
12038
|
if (e.headers && typeof e.headers == "object" && !Array.isArray(e.headers))
|
|
12039
12039
|
for (const [c, u] of Object.entries(e.headers))
|
|
@@ -12057,7 +12057,7 @@ function Vn(t) {
|
|
|
12057
12057
|
};
|
|
12058
12058
|
return Object.keys(o).length > 0 && (s.init = o), e.signal instanceof AbortSignal && (s.signal = e.signal), s;
|
|
12059
12059
|
}
|
|
12060
|
-
function
|
|
12060
|
+
function Vn(t, e) {
|
|
12061
12061
|
const r = {
|
|
12062
12062
|
state: "loading",
|
|
12063
12063
|
data: void 0,
|
|
@@ -12070,7 +12070,7 @@ function Wn(t, e) {
|
|
|
12070
12070
|
n += 1, a && a.abort(), a = null, r.loading && (r.loading = !1, r.state = r.data === void 0 ? "idle" : "data", i());
|
|
12071
12071
|
}
|
|
12072
12072
|
};
|
|
12073
|
-
Object.defineProperty(r,
|
|
12073
|
+
Object.defineProperty(r, Or, {
|
|
12074
12074
|
value: !0,
|
|
12075
12075
|
enumerable: !1,
|
|
12076
12076
|
writable: !1
|
|
@@ -12085,7 +12085,7 @@ function Wn(t, e) {
|
|
|
12085
12085
|
return;
|
|
12086
12086
|
}
|
|
12087
12087
|
try {
|
|
12088
|
-
const u =
|
|
12088
|
+
const u = Hn(t);
|
|
12089
12089
|
u.url = e.http.resolveUrl(u.url), u.signal = c.signal;
|
|
12090
12090
|
const p = await e.http.request(u);
|
|
12091
12091
|
if (s !== n) return;
|
|
@@ -12104,7 +12104,7 @@ function Wn(t, e) {
|
|
|
12104
12104
|
};
|
|
12105
12105
|
return o(), r;
|
|
12106
12106
|
}
|
|
12107
|
-
function
|
|
12107
|
+
function br(t) {
|
|
12108
12108
|
return t && typeof t == "object" && !Array.isArray(t) ? t : {};
|
|
12109
12109
|
}
|
|
12110
12110
|
function Ep(t) {
|
|
@@ -12121,17 +12121,17 @@ function Ep(t) {
|
|
|
12121
12121
|
return `${e} ${r} ${a} ${n}`;
|
|
12122
12122
|
}
|
|
12123
12123
|
function zp(t, e) {
|
|
12124
|
-
const r =
|
|
12124
|
+
const r = br(t), a = typeof r.ttl == "number" ? r.ttl : 0, n = r.key != null ? String(r.key) : Ep(r), i = e.queryCache, o = i.get(n);
|
|
12125
12125
|
if (o)
|
|
12126
12126
|
return a > 0 && o.lastUpdated != null && Date.now() - o.lastUpdated > a && !o.loading && o.refetch(), o;
|
|
12127
12127
|
const s = {};
|
|
12128
12128
|
for (const [u, p] of Object.entries(r))
|
|
12129
12129
|
u === "key" || u === "ttl" || (s[u] = p);
|
|
12130
|
-
const c =
|
|
12130
|
+
const c = Vn(s, e);
|
|
12131
12131
|
return i.set(n, c), c;
|
|
12132
12132
|
}
|
|
12133
12133
|
function Lp(t, e) {
|
|
12134
|
-
const r =
|
|
12134
|
+
const r = br(t);
|
|
12135
12135
|
let a = 0, n = null;
|
|
12136
12136
|
const i = () => e.notify?.(), o = {
|
|
12137
12137
|
data: void 0,
|
|
@@ -12149,7 +12149,7 @@ function Lp(t, e) {
|
|
|
12149
12149
|
return;
|
|
12150
12150
|
}
|
|
12151
12151
|
try {
|
|
12152
|
-
const p = { method: "POST", ...r, ...
|
|
12152
|
+
const p = { method: "POST", ...r, ...br(s) }, d = Hn(p);
|
|
12153
12153
|
d.url = e.http.resolveUrl(d.url), d.signal = u.signal;
|
|
12154
12154
|
const m = await e.http.request(d);
|
|
12155
12155
|
if (c !== a) return;
|
|
@@ -12169,7 +12169,7 @@ function Lp(t, e) {
|
|
|
12169
12169
|
}
|
|
12170
12170
|
}
|
|
12171
12171
|
};
|
|
12172
|
-
return Object.defineProperty(o,
|
|
12172
|
+
return Object.defineProperty(o, Or, {
|
|
12173
12173
|
value: !0,
|
|
12174
12174
|
enumerable: !1,
|
|
12175
12175
|
writable: !1
|
|
@@ -12212,7 +12212,7 @@ function jp(t, e) {
|
|
|
12212
12212
|
return n == null ? "" : String(n);
|
|
12213
12213
|
}) : t;
|
|
12214
12214
|
}
|
|
12215
|
-
const U = (t) => typeof t == "number" ? t : typeof t == "string" && t.trim() !== "" && !Number.isNaN(Number(t)) ? Number(t) : 0, ee = (t) => Array.isArray(t) ? t : [], Ee = (t) => !!t && typeof t == "object" && !Array.isArray(t),
|
|
12215
|
+
const U = (t) => typeof t == "number" ? t : typeof t == "string" && t.trim() !== "" && !Number.isNaN(Number(t)) ? Number(t) : 0, ee = (t) => Array.isArray(t) ? t : [], Ee = (t) => !!t && typeof t == "object" && !Array.isArray(t), ir = (t, e, r) => {
|
|
12216
12216
|
switch (t) {
|
|
12217
12217
|
case "==":
|
|
12218
12218
|
return e === r;
|
|
@@ -12313,7 +12313,7 @@ const U = (t) => typeof t == "number" ? t : typeof t == "string" && t.trim() !==
|
|
|
12313
12313
|
if (e === "kebab") return a.join("-");
|
|
12314
12314
|
const n = (i) => i.charAt(0).toUpperCase() + i.slice(1);
|
|
12315
12315
|
return e === "pascal" ? a.map(n).join("") : a[0] + a.slice(1).map(n).join("");
|
|
12316
|
-
},
|
|
12316
|
+
}, Wn = {
|
|
12317
12317
|
// ── Aggregation ───────────────────────────────────────────
|
|
12318
12318
|
count: (t) => ee(t).length,
|
|
12319
12319
|
sum: (t) => ee(t).reduce((e, r) => e + U(r), 0),
|
|
@@ -12335,8 +12335,8 @@ const U = (t) => typeof t == "number" ? t : typeof t == "string" && t.trim() !==
|
|
|
12335
12335
|
return e.length === 0 ? null : e[e.length - 1];
|
|
12336
12336
|
},
|
|
12337
12337
|
// ── Reshaping ─────────────────────────────────────────────
|
|
12338
|
-
filter: (t, e = "", r = "==", a) => ee(t).filter((n) =>
|
|
12339
|
-
find: (t, e = "", r = "==", a) => ee(t).find((n) =>
|
|
12338
|
+
filter: (t, e = "", r = "==", a) => ee(t).filter((n) => ir(r, Ne(n, String(e)), a)),
|
|
12339
|
+
find: (t, e = "", r = "==", a) => ee(t).find((n) => ir(r, Ne(n, String(e)), a)) ?? null,
|
|
12340
12340
|
sort: (t, e = "", r = "asc") => {
|
|
12341
12341
|
const a = [...ee(t)], n = String(r).toLowerCase() === "desc" ? -1 : 1;
|
|
12342
12342
|
return a.sort((i, o) => {
|
|
@@ -12420,7 +12420,7 @@ const U = (t) => typeof t == "number" ? t : typeof t == "string" && t.trim() !==
|
|
|
12420
12420
|
partition: (t, e = "", r = "==", a) => {
|
|
12421
12421
|
const n = [], i = [];
|
|
12422
12422
|
for (const o of ee(t))
|
|
12423
|
-
(
|
|
12423
|
+
(ir(r, Ne(o, String(e)), a) ? n : i).push(o);
|
|
12424
12424
|
return [n, i];
|
|
12425
12425
|
},
|
|
12426
12426
|
keyBy: (t, e = "") => {
|
|
@@ -12436,7 +12436,7 @@ const U = (t) => typeof t == "number" ? t : typeof t == "string" && t.trim() !==
|
|
|
12436
12436
|
if (Ee(a))
|
|
12437
12437
|
for (const n of Object.keys(a)) {
|
|
12438
12438
|
const i = a[n], o = r[n];
|
|
12439
|
-
r[n] = Ee(o) && Ee(i) ?
|
|
12439
|
+
r[n] = Ee(o) && Ee(i) ? Wn.merge(o, i) : Ee(i) || Array.isArray(i) ? ut(i) : i;
|
|
12440
12440
|
}
|
|
12441
12441
|
return r;
|
|
12442
12442
|
},
|
|
@@ -12597,7 +12597,7 @@ class Kp {
|
|
|
12597
12597
|
/** True while we're updating `window.location` ourselves — used to
|
|
12598
12598
|
* filter out the resulting `hashchange` / `popstate` echo. */
|
|
12599
12599
|
R(this, "settingHash", !1);
|
|
12600
|
-
this.defaultPath = _e(e.defaultPath ?? "/"), this.currentPath = this.defaultPath, this.mode = e.mode === "history" ? "history" : "hash", this.basePath =
|
|
12600
|
+
this.defaultPath = _e(e.defaultPath ?? "/"), this.currentPath = this.defaultPath, this.mode = e.mode === "history" ? "history" : "hash", this.basePath = Na(e.basePath);
|
|
12601
12601
|
}
|
|
12602
12602
|
/**
|
|
12603
12603
|
* Re-configure the URL strategy before `start()` is called. The host
|
|
@@ -12605,7 +12605,7 @@ class Kp {
|
|
|
12605
12605
|
* it reads at connect time. No-op once the router is already enabled.
|
|
12606
12606
|
*/
|
|
12607
12607
|
configure(e) {
|
|
12608
|
-
this.enabled || (e.mode && (this.mode = e.mode === "history" ? "history" : "hash"), e.basePath !== void 0 && (this.basePath =
|
|
12608
|
+
this.enabled || (e.mode && (this.mode = e.mode === "history" ? "history" : "hash"), e.basePath !== void 0 && (this.basePath = Na(e.basePath)));
|
|
12609
12609
|
}
|
|
12610
12610
|
getMode() {
|
|
12611
12611
|
return this.mode;
|
|
@@ -12702,7 +12702,7 @@ class Kp {
|
|
|
12702
12702
|
}
|
|
12703
12703
|
}
|
|
12704
12704
|
}
|
|
12705
|
-
function
|
|
12705
|
+
function Na(t) {
|
|
12706
12706
|
if (!t) return "";
|
|
12707
12707
|
let e = String(t).trim();
|
|
12708
12708
|
return e === "" || e === "/" ? "" : (e.startsWith("/") || (e = "/" + e), e.endsWith("/") && (e = e.slice(0, -1)), e);
|
|
@@ -12720,7 +12720,7 @@ const ze = (t, e) => {
|
|
|
12720
12720
|
} catch {
|
|
12721
12721
|
return e;
|
|
12722
12722
|
}
|
|
12723
|
-
},
|
|
12723
|
+
}, qn = (t) => {
|
|
12724
12724
|
if (typeof t == "string") return t;
|
|
12725
12725
|
if (t === null) return "null";
|
|
12726
12726
|
if (t === void 0) return "";
|
|
@@ -12729,21 +12729,21 @@ const ze = (t, e) => {
|
|
|
12729
12729
|
} catch {
|
|
12730
12730
|
return String(t);
|
|
12731
12731
|
}
|
|
12732
|
-
},
|
|
12732
|
+
}, Kn = (t) => {
|
|
12733
12733
|
if (t === null || t === "") return t;
|
|
12734
12734
|
try {
|
|
12735
12735
|
return JSON.parse(t);
|
|
12736
12736
|
} catch {
|
|
12737
12737
|
return t;
|
|
12738
12738
|
}
|
|
12739
|
-
},
|
|
12739
|
+
}, Gn = (t) => ({
|
|
12740
12740
|
set: (e, r) => ze(() => {
|
|
12741
12741
|
const a = t();
|
|
12742
|
-
return a ? (a.setItem(String(e),
|
|
12742
|
+
return a ? (a.setItem(String(e), qn(r)), !0) : !1;
|
|
12743
12743
|
}, !1),
|
|
12744
12744
|
get: (e) => ze(() => {
|
|
12745
12745
|
const r = t();
|
|
12746
|
-
return r ?
|
|
12746
|
+
return r ? Kn(r.getItem(String(e))) : null;
|
|
12747
12747
|
}, null),
|
|
12748
12748
|
remove: (e) => ze(() => {
|
|
12749
12749
|
const r = t();
|
|
@@ -12765,14 +12765,14 @@ const ze = (t, e) => {
|
|
|
12765
12765
|
return e.setTime(e.getTime() + t * 864e5), e.toUTCString();
|
|
12766
12766
|
}
|
|
12767
12767
|
return null;
|
|
12768
|
-
},
|
|
12768
|
+
}, or = (t = {}) => {
|
|
12769
12769
|
const e = [], r = Jp(t.expires);
|
|
12770
12770
|
if (r && e.push(`expires=${r}`), typeof t.maxAge == "number" && Number.isFinite(t.maxAge) && e.push(`max-age=${Math.floor(t.maxAge)}`), e.push(`path=${t.path ?? "/"}`), t.domain && e.push(`domain=${t.domain}`), t.secure && e.push("secure"), t.sameSite) {
|
|
12771
12771
|
const a = t.sameSite.charAt(0).toUpperCase() + t.sameSite.slice(1).toLowerCase();
|
|
12772
12772
|
e.push(`samesite=${a}`);
|
|
12773
12773
|
}
|
|
12774
12774
|
return e.length === 0 ? "" : `; ${e.join("; ")}`;
|
|
12775
|
-
},
|
|
12775
|
+
}, Ia = () => {
|
|
12776
12776
|
const t = Mt();
|
|
12777
12777
|
if (!t) return {};
|
|
12778
12778
|
const e = {}, r = t.cookie ?? "";
|
|
@@ -12793,12 +12793,12 @@ const ze = (t, e) => {
|
|
|
12793
12793
|
set: (t, e, r) => ze(() => {
|
|
12794
12794
|
const a = Mt();
|
|
12795
12795
|
if (!a) return !1;
|
|
12796
|
-
const n = encodeURIComponent(String(t)), i = encodeURIComponent(
|
|
12797
|
-
return a.cookie = `${n}=${i}${
|
|
12796
|
+
const n = encodeURIComponent(String(t)), i = encodeURIComponent(qn(e));
|
|
12797
|
+
return a.cookie = `${n}=${i}${or(r)}`, !0;
|
|
12798
12798
|
}, !1),
|
|
12799
12799
|
get: (t) => ze(() => {
|
|
12800
|
-
const r =
|
|
12801
|
-
return r === void 0 ? null :
|
|
12800
|
+
const r = Ia()[String(t)];
|
|
12801
|
+
return r === void 0 ? null : Kn(r);
|
|
12802
12802
|
}, null),
|
|
12803
12803
|
remove: (t, e) => ze(() => {
|
|
12804
12804
|
const r = Mt();
|
|
@@ -12808,19 +12808,19 @@ const ze = (t, e) => {
|
|
|
12808
12808
|
expires: /* @__PURE__ */ new Date(0),
|
|
12809
12809
|
maxAge: 0
|
|
12810
12810
|
};
|
|
12811
|
-
return r.cookie = `${a}=${
|
|
12811
|
+
return r.cookie = `${a}=${or(n)}`, !0;
|
|
12812
12812
|
}, !1),
|
|
12813
12813
|
clear: () => ze(() => {
|
|
12814
12814
|
const t = Mt();
|
|
12815
12815
|
if (!t) return !1;
|
|
12816
|
-
const e =
|
|
12816
|
+
const e = Ia();
|
|
12817
12817
|
for (const r of Object.keys(e)) {
|
|
12818
12818
|
const a = encodeURIComponent(r);
|
|
12819
|
-
t.cookie = `${a}=${
|
|
12819
|
+
t.cookie = `${a}=${or({ expires: /* @__PURE__ */ new Date(0), maxAge: 0 })}`;
|
|
12820
12820
|
}
|
|
12821
12821
|
return !0;
|
|
12822
12822
|
}, !1)
|
|
12823
|
-
}, ot =
|
|
12823
|
+
}, ot = Gn(Yp), Qp = Gn(Xp), Yn = {
|
|
12824
12824
|
set: ot.set,
|
|
12825
12825
|
get: ot.get,
|
|
12826
12826
|
remove: ot.remove,
|
|
@@ -12841,7 +12841,7 @@ const ze = (t, e) => {
|
|
|
12841
12841
|
(t, e) => (t[e] = rm(e), t),
|
|
12842
12842
|
{}
|
|
12843
12843
|
), nm = 4e3;
|
|
12844
|
-
function
|
|
12844
|
+
function sr(t) {
|
|
12845
12845
|
return t == null ? "" : typeof t == "string" ? t : String(t);
|
|
12846
12846
|
}
|
|
12847
12847
|
function im(t) {
|
|
@@ -12863,9 +12863,9 @@ function im(t) {
|
|
|
12863
12863
|
}, c = (d, m = {}) => {
|
|
12864
12864
|
const g = `toast-${a += 1}`, b = typeof m.duration == "number" ? m.duration : nm, h = {
|
|
12865
12865
|
id: g,
|
|
12866
|
-
message:
|
|
12867
|
-
title: m.title != null ?
|
|
12868
|
-
tone: m.tone != null ?
|
|
12866
|
+
message: sr(d),
|
|
12867
|
+
title: m.title != null ? sr(m.title) : void 0,
|
|
12868
|
+
tone: m.tone != null ? sr(m.tone) : "default",
|
|
12869
12869
|
duration: b,
|
|
12870
12870
|
createdAt: Date.now()
|
|
12871
12871
|
};
|
|
@@ -12933,21 +12933,21 @@ const dt = {
|
|
|
12933
12933
|
encodeURI,
|
|
12934
12934
|
decodeURI,
|
|
12935
12935
|
structuredClone: typeof structuredClone == "function" ? structuredClone : void 0
|
|
12936
|
-
},
|
|
12937
|
-
util:
|
|
12936
|
+
}, vr = {
|
|
12937
|
+
util: Wn,
|
|
12938
12938
|
console: am,
|
|
12939
|
-
storage:
|
|
12940
|
-
},
|
|
12939
|
+
storage: Yn
|
|
12940
|
+
}, Xn = /* @__PURE__ */ new Set(["toast"]);
|
|
12941
12941
|
function om(t) {
|
|
12942
12942
|
return t.toastManager || (t.toastManager = im(t)), t.toastManager;
|
|
12943
12943
|
}
|
|
12944
|
-
function
|
|
12944
|
+
function Jn(t) {
|
|
12945
12945
|
if (typeof globalThis > "u") return { found: !1, value: void 0 };
|
|
12946
12946
|
if (t in Object.prototype) return { found: !1, value: void 0 };
|
|
12947
12947
|
const e = globalThis;
|
|
12948
12948
|
return t in e ? { found: !0, value: e[t] } : { found: !1, value: void 0 };
|
|
12949
12949
|
}
|
|
12950
|
-
const
|
|
12950
|
+
const lr = {
|
|
12951
12951
|
componentDepthLimit: 150,
|
|
12952
12952
|
iterationLimit: 25e4,
|
|
12953
12953
|
arrayLengthLimit: 1e5
|
|
@@ -12973,21 +12973,21 @@ function sm(t, e, r) {
|
|
|
12973
12973
|
}
|
|
12974
12974
|
function lm(t = {}) {
|
|
12975
12975
|
return {
|
|
12976
|
-
componentDepthLimit: t.componentDepthLimit ??
|
|
12977
|
-
iterationLimit: t.iterationLimit ??
|
|
12978
|
-
arrayLengthLimit: t.arrayLengthLimit ??
|
|
12976
|
+
componentDepthLimit: t.componentDepthLimit ?? lr.componentDepthLimit,
|
|
12977
|
+
iterationLimit: t.iterationLimit ?? lr.iterationLimit,
|
|
12978
|
+
arrayLengthLimit: t.arrayLengthLimit ?? lr.arrayLengthLimit,
|
|
12979
12979
|
componentDepth: 0,
|
|
12980
12980
|
iterations: 0
|
|
12981
12981
|
};
|
|
12982
12982
|
}
|
|
12983
|
-
function
|
|
12983
|
+
function Pa(t) {
|
|
12984
12984
|
t.iterations = 0, t.componentDepth = 0;
|
|
12985
12985
|
}
|
|
12986
12986
|
function gt(t, e, r) {
|
|
12987
12987
|
if (t && (t.iterations += e, t.iterations > t.iterationLimit))
|
|
12988
12988
|
throw new Ve("iterations", t.iterationLimit, r);
|
|
12989
12989
|
}
|
|
12990
|
-
function
|
|
12990
|
+
function Ea(t, e) {
|
|
12991
12991
|
const r = t.budget;
|
|
12992
12992
|
if (r && (r.componentDepth += 1, r.componentDepth > r.componentDepthLimit))
|
|
12993
12993
|
throw r.componentDepth -= 1, new Ve(
|
|
@@ -12996,12 +12996,12 @@ function za(t, e) {
|
|
|
12996
12996
|
`component "${e}"`
|
|
12997
12997
|
);
|
|
12998
12998
|
}
|
|
12999
|
-
function
|
|
12999
|
+
function za(t) {
|
|
13000
13000
|
const e = t.budget;
|
|
13001
13001
|
e && e.componentDepth > 0 && (e.componentDepth -= 1);
|
|
13002
13002
|
}
|
|
13003
|
-
const cm = (t) => !!(t && typeof t == "object" && t.__kind === "Component"), um = (t) => !!(t && typeof t == "object" && t.__kind === "UserComponent"),
|
|
13004
|
-
function
|
|
13003
|
+
const cm = (t) => !!(t && typeof t == "object" && t.__kind === "Component"), um = (t) => !!(t && typeof t == "object" && t.__kind === "UserComponent"), _r = (t) => !!(t && typeof t == "object" && t.__kind === "Store");
|
|
13004
|
+
function La(t, e = {}) {
|
|
13005
13005
|
const r = {
|
|
13006
13006
|
state: t,
|
|
13007
13007
|
bindings: /* @__PURE__ */ new Map(),
|
|
@@ -13036,7 +13036,7 @@ function Ra(t, e = {}) {
|
|
|
13036
13036
|
r.timers.timeouts.clear(), r.timers.intervals.clear();
|
|
13037
13037
|
}), r;
|
|
13038
13038
|
}
|
|
13039
|
-
function
|
|
13039
|
+
function Ra(t) {
|
|
13040
13040
|
const e = t.disposers;
|
|
13041
13041
|
t.disposers = [];
|
|
13042
13042
|
for (const r of e)
|
|
@@ -13056,7 +13056,7 @@ function Te(t, e) {
|
|
|
13056
13056
|
}
|
|
13057
13057
|
return e;
|
|
13058
13058
|
}
|
|
13059
|
-
function
|
|
13059
|
+
function Fr(t, e) {
|
|
13060
13060
|
const r = [];
|
|
13061
13061
|
let a = t;
|
|
13062
13062
|
for (; a.kind === "Member"; ) {
|
|
@@ -13076,10 +13076,10 @@ function Ur(t, e) {
|
|
|
13076
13076
|
function St(t, e) {
|
|
13077
13077
|
if (t.kind === "StateRef") return Te(e, t.name);
|
|
13078
13078
|
if (t.kind === "Member") {
|
|
13079
|
-
const r =
|
|
13079
|
+
const r = Fr(t, e);
|
|
13080
13080
|
if (r)
|
|
13081
13081
|
return r.path.length === 0 ? r.name : `${r.name}.${r.path.join(".")}`;
|
|
13082
|
-
const a =
|
|
13082
|
+
const a = ii(t, e);
|
|
13083
13083
|
if (a)
|
|
13084
13084
|
return a.path.length === 0 ? a.atom : `${a.atom}.${a.path.join(".")}`;
|
|
13085
13085
|
}
|
|
@@ -13092,9 +13092,9 @@ function pm(t, e) {
|
|
|
13092
13092
|
e.state.declare(r.identifier, a);
|
|
13093
13093
|
}
|
|
13094
13094
|
for (const r of t.statements)
|
|
13095
|
-
|
|
13095
|
+
yr(r, e);
|
|
13096
13096
|
for (const r of t.statements) {
|
|
13097
|
-
if (r.kind !== "Assignment" || !r.isState || !
|
|
13097
|
+
if (r.kind !== "Assignment" || !r.isState || !Zn(r.expression)) continue;
|
|
13098
13098
|
const a = M(r.expression, e);
|
|
13099
13099
|
e.state.set(r.identifier, a);
|
|
13100
13100
|
}
|
|
@@ -13114,7 +13114,7 @@ function fm(t, e) {
|
|
|
13114
13114
|
o.deps = s;
|
|
13115
13115
|
};
|
|
13116
13116
|
for (const o of t.statements) {
|
|
13117
|
-
if (o.kind !== "Assignment" || !o.isState || Lt(o.expression) ||
|
|
13117
|
+
if (o.kind !== "Assignment" || !o.isState || Lt(o.expression) || Zn(o.expression)) continue;
|
|
13118
13118
|
const s = {
|
|
13119
13119
|
name: o.identifier,
|
|
13120
13120
|
expr: o.expression,
|
|
@@ -13163,16 +13163,16 @@ function Lt(t) {
|
|
|
13163
13163
|
return !1;
|
|
13164
13164
|
}
|
|
13165
13165
|
}
|
|
13166
|
-
function
|
|
13166
|
+
function Zn(t) {
|
|
13167
13167
|
return t.kind === "Invoke" && t.callee.kind === "StateRef" && t.callee.name === "http";
|
|
13168
13168
|
}
|
|
13169
|
-
function
|
|
13169
|
+
function Qn(t) {
|
|
13170
13170
|
return t.kind === "Invoke" && t.callee.kind === "StateRef" && t.callee.name === "theme";
|
|
13171
13171
|
}
|
|
13172
|
-
function
|
|
13172
|
+
function ei(t) {
|
|
13173
13173
|
return t.kind === "Invoke" && t.callee.kind === "StateRef" && t.callee.name === "app";
|
|
13174
13174
|
}
|
|
13175
|
-
function
|
|
13175
|
+
function yr(t, e) {
|
|
13176
13176
|
switch (t.kind) {
|
|
13177
13177
|
case "ComponentDeclaration": {
|
|
13178
13178
|
e.componentDecls.set(t.name, t), e.actionDecls.set(t.name, {
|
|
@@ -13200,7 +13200,7 @@ function xr(t, e) {
|
|
|
13200
13200
|
return;
|
|
13201
13201
|
case "ExpressionStatement": {
|
|
13202
13202
|
const r = t.expression;
|
|
13203
|
-
|
|
13203
|
+
ei(r) ? e.bindings.set("aktion", () => M(r, e)) : Qn(r) && e.bindings.set("theme", () => M(r, e));
|
|
13204
13204
|
return;
|
|
13205
13205
|
}
|
|
13206
13206
|
case "Assignment": {
|
|
@@ -13212,7 +13212,7 @@ function xr(t, e) {
|
|
|
13212
13212
|
}
|
|
13213
13213
|
}
|
|
13214
13214
|
}
|
|
13215
|
-
function
|
|
13215
|
+
function Da(t) {
|
|
13216
13216
|
switch (t.kind) {
|
|
13217
13217
|
case "IfStatement":
|
|
13218
13218
|
case "SwitchStatement":
|
|
@@ -13226,7 +13226,7 @@ function ja(t) {
|
|
|
13226
13226
|
case "ThrowStatement":
|
|
13227
13227
|
return !0;
|
|
13228
13228
|
case "ExpressionStatement":
|
|
13229
|
-
return !
|
|
13229
|
+
return !ei(t.expression) && !Qn(t.expression);
|
|
13230
13230
|
default:
|
|
13231
13231
|
return !1;
|
|
13232
13232
|
}
|
|
@@ -13234,7 +13234,7 @@ function ja(t) {
|
|
|
13234
13234
|
function gm(t, e) {
|
|
13235
13235
|
let r = !1;
|
|
13236
13236
|
for (const a of t.statements)
|
|
13237
|
-
if (
|
|
13237
|
+
if (Da(a)) {
|
|
13238
13238
|
r = !0;
|
|
13239
13239
|
break;
|
|
13240
13240
|
}
|
|
@@ -13242,9 +13242,9 @@ function gm(t, e) {
|
|
|
13242
13242
|
for (const a of t.statements)
|
|
13243
13243
|
a.kind === "Assignment" && a.isState && Lt(a.expression) && e.state.set(a.identifier, Rt(a.expression));
|
|
13244
13244
|
for (const a of t.statements)
|
|
13245
|
-
if (
|
|
13245
|
+
if (Da(a))
|
|
13246
13246
|
try {
|
|
13247
|
-
|
|
13247
|
+
ri(a, e);
|
|
13248
13248
|
} catch (n) {
|
|
13249
13249
|
if (n instanceof Se || n instanceof Me || n instanceof ht)
|
|
13250
13250
|
continue;
|
|
@@ -13271,11 +13271,11 @@ function hm(t, e, r) {
|
|
|
13271
13271
|
}
|
|
13272
13272
|
const c = qp(s, n);
|
|
13273
13273
|
if (c.matched)
|
|
13274
|
-
return
|
|
13274
|
+
return ja(s, o.value, c.params, e);
|
|
13275
13275
|
}
|
|
13276
|
-
return i ?
|
|
13276
|
+
return i ? ja(null, i.value, {}, e) : (e.router?.setActiveMatch(null, {}), null);
|
|
13277
13277
|
}
|
|
13278
|
-
function
|
|
13278
|
+
function ja(t, e, r, a) {
|
|
13279
13279
|
const n = a.loopVars.get("params"), i = a.loopVars.has("params");
|
|
13280
13280
|
a.loopVars.set("params", r);
|
|
13281
13281
|
try {
|
|
@@ -13338,7 +13338,7 @@ function M(t, e) {
|
|
|
13338
13338
|
typeof s == "function" && o(s);
|
|
13339
13339
|
};
|
|
13340
13340
|
}
|
|
13341
|
-
const i =
|
|
13341
|
+
const i = Jn(t.name);
|
|
13342
13342
|
if (i.found) return i.value;
|
|
13343
13343
|
if (e.strict && !e.strictWarned.has(t.name)) {
|
|
13344
13344
|
e.strictWarned.add(t.name);
|
|
@@ -13350,9 +13350,9 @@ function M(t, e) {
|
|
|
13350
13350
|
return null;
|
|
13351
13351
|
}
|
|
13352
13352
|
case "StateRef": {
|
|
13353
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
13354
|
-
return
|
|
13355
|
-
if (
|
|
13353
|
+
if (Object.prototype.hasOwnProperty.call(vr, t.name))
|
|
13354
|
+
return vr[t.name];
|
|
13355
|
+
if (Xn.has(t.name) && t.name === "toast")
|
|
13356
13356
|
return om(e);
|
|
13357
13357
|
if (t.name === "emit" && e.onEmit) {
|
|
13358
13358
|
const a = e.onEmit;
|
|
@@ -13403,9 +13403,9 @@ function M(t, e) {
|
|
|
13403
13403
|
if (t.optional && a == null) return;
|
|
13404
13404
|
if (t.computed) {
|
|
13405
13405
|
const n = M(t.computed, e);
|
|
13406
|
-
return
|
|
13406
|
+
return Hr(a, n);
|
|
13407
13407
|
}
|
|
13408
|
-
return
|
|
13408
|
+
return Vr(a, t.property ?? "");
|
|
13409
13409
|
}
|
|
13410
13410
|
case "Unary": {
|
|
13411
13411
|
if (t.operator === "delete") {
|
|
@@ -13460,7 +13460,7 @@ function M(t, e) {
|
|
|
13460
13460
|
case "Spread":
|
|
13461
13461
|
return M(t.argument, e);
|
|
13462
13462
|
case "Block":
|
|
13463
|
-
return
|
|
13463
|
+
return Ur(t, e, {});
|
|
13464
13464
|
case "Lambda": {
|
|
13465
13465
|
const r = t.params, a = t.body, n = e.stateAliases.map(
|
|
13466
13466
|
(o) => new Map(o)
|
|
@@ -13482,7 +13482,7 @@ function M(t, e) {
|
|
|
13482
13482
|
const m = r[d];
|
|
13483
13483
|
let g = o[d];
|
|
13484
13484
|
if (g === void 0 && m.defaultValue && (g = M(m.defaultValue, e)), m.pattern) {
|
|
13485
|
-
for (const b of
|
|
13485
|
+
for (const b of Vt(m.pattern, g, e))
|
|
13486
13486
|
p(b.name, b.value);
|
|
13487
13487
|
continue;
|
|
13488
13488
|
}
|
|
@@ -13520,14 +13520,14 @@ class ht {
|
|
|
13520
13520
|
this.value = e;
|
|
13521
13521
|
}
|
|
13522
13522
|
}
|
|
13523
|
-
function
|
|
13523
|
+
function ti(t, e) {
|
|
13524
13524
|
if (M(t.test, e)) {
|
|
13525
13525
|
xe(t.consequent.body, e);
|
|
13526
13526
|
return;
|
|
13527
13527
|
}
|
|
13528
13528
|
if (t.alternate) {
|
|
13529
13529
|
if (t.alternate.kind === "IfStatement") {
|
|
13530
|
-
|
|
13530
|
+
ti(t.alternate, e);
|
|
13531
13531
|
return;
|
|
13532
13532
|
}
|
|
13533
13533
|
t.alternate.kind === "Block" && xe(t.alternate.body, e);
|
|
@@ -13581,7 +13581,7 @@ function vm(t, e) {
|
|
|
13581
13581
|
}
|
|
13582
13582
|
}
|
|
13583
13583
|
function ym(t, e) {
|
|
13584
|
-
for (t.init &&
|
|
13584
|
+
for (t.init && Wt(t.init, e); !(t.test && !M(t.test, e)); ) {
|
|
13585
13585
|
gt(e.budget, 1, "`for` loop");
|
|
13586
13586
|
try {
|
|
13587
13587
|
xe(t.body.body, e);
|
|
@@ -13621,7 +13621,7 @@ function wm(t, e) {
|
|
|
13621
13621
|
}
|
|
13622
13622
|
}
|
|
13623
13623
|
function km(t, e) {
|
|
13624
|
-
const r = M(t.expression, e), a =
|
|
13624
|
+
const r = M(t.expression, e), a = Vt(
|
|
13625
13625
|
{ kind: t.patternKind, bindings: t.bindings },
|
|
13626
13626
|
r,
|
|
13627
13627
|
e
|
|
@@ -13629,7 +13629,7 @@ function km(t, e) {
|
|
|
13629
13629
|
for (const { name: n, value: i } of a)
|
|
13630
13630
|
e.loopVars.set(n, i);
|
|
13631
13631
|
}
|
|
13632
|
-
function
|
|
13632
|
+
function Vt(t, e, r) {
|
|
13633
13633
|
const a = [];
|
|
13634
13634
|
if (t.kind === "array") {
|
|
13635
13635
|
const o = Array.isArray(e) ? e : [];
|
|
@@ -13700,12 +13700,12 @@ function $m(t, e) {
|
|
|
13700
13700
|
}
|
|
13701
13701
|
function xe(t, e) {
|
|
13702
13702
|
for (const r of t)
|
|
13703
|
-
|
|
13703
|
+
Wt(r, e);
|
|
13704
13704
|
}
|
|
13705
|
-
function
|
|
13706
|
-
|
|
13705
|
+
function ri(t, e) {
|
|
13706
|
+
Wt(t, e);
|
|
13707
13707
|
}
|
|
13708
|
-
function
|
|
13708
|
+
function Wt(t, e) {
|
|
13709
13709
|
switch (t.kind) {
|
|
13710
13710
|
case "ExpressionStatement":
|
|
13711
13711
|
M(t.expression, e);
|
|
@@ -13720,7 +13720,7 @@ function qt(t, e) {
|
|
|
13720
13720
|
return;
|
|
13721
13721
|
}
|
|
13722
13722
|
case "IfStatement":
|
|
13723
|
-
|
|
13723
|
+
ti(t, e);
|
|
13724
13724
|
return;
|
|
13725
13725
|
case "SwitchStatement":
|
|
13726
13726
|
bm(t, e);
|
|
@@ -13766,23 +13766,23 @@ function qt(t, e) {
|
|
|
13766
13766
|
function Cm(t) {
|
|
13767
13767
|
let e = t;
|
|
13768
13768
|
for (; e.kind === "Member"; ) e = e.object;
|
|
13769
|
-
return e.kind === "StateRef" && (Object.prototype.hasOwnProperty.call(
|
|
13769
|
+
return e.kind === "StateRef" && (Object.prototype.hasOwnProperty.call(vr, e.name) || Xn.has(e.name)) ? !1 : e.kind === "StateRef";
|
|
13770
13770
|
}
|
|
13771
13771
|
function Am(t, e) {
|
|
13772
|
-
const r =
|
|
13772
|
+
const r = ai(t);
|
|
13773
13773
|
let a = t;
|
|
13774
13774
|
for (; a.kind === "Member"; ) a = a.object;
|
|
13775
13775
|
const n = Te(e, a.name);
|
|
13776
|
-
return
|
|
13776
|
+
return ni(r, n, e);
|
|
13777
13777
|
}
|
|
13778
|
-
function
|
|
13778
|
+
function ai(t) {
|
|
13779
13779
|
const e = [];
|
|
13780
13780
|
let r = t;
|
|
13781
13781
|
for (; r.kind === "Member"; )
|
|
13782
13782
|
e.unshift({ property: r.property, computed: r.computed }), r = r.object;
|
|
13783
13783
|
return e;
|
|
13784
13784
|
}
|
|
13785
|
-
function
|
|
13785
|
+
function ni(t, e, r) {
|
|
13786
13786
|
let a = r.state.get(e);
|
|
13787
13787
|
const n = [e];
|
|
13788
13788
|
let i = !0;
|
|
@@ -13790,7 +13790,7 @@ function ii(t, e, r) {
|
|
|
13790
13790
|
let s, c = null;
|
|
13791
13791
|
o.computed ? o.computed.kind === "Literal" ? (s = o.computed.value, (typeof s == "string" || typeof s == "number") && (c = String(s))) : s = M(o.computed, r) : (s = o.property ?? "", c = o.property ?? "");
|
|
13792
13792
|
const u = a != null && typeof a == "object" && !Array.isArray(a);
|
|
13793
|
-
i && c !== null && u ? n.push(c) : i = !1, a = o.computed ?
|
|
13793
|
+
i && c !== null && u ? n.push(c) : i = !1, a = o.computed ? Hr(a, s) : Vr(a, o.property ?? "");
|
|
13794
13794
|
}
|
|
13795
13795
|
return r.trackedState.add(n.join(".")), a;
|
|
13796
13796
|
}
|
|
@@ -13799,19 +13799,19 @@ function Tm(t, e) {
|
|
|
13799
13799
|
for (; r.kind === "Member"; ) r = r.object;
|
|
13800
13800
|
if (r.kind !== "Identifier") return null;
|
|
13801
13801
|
const a = M(r, e);
|
|
13802
|
-
return
|
|
13802
|
+
return _r(a) ? a : null;
|
|
13803
13803
|
}
|
|
13804
13804
|
function Mm(t, e, r) {
|
|
13805
|
-
const a =
|
|
13805
|
+
const a = ai(t), n = a[0];
|
|
13806
13806
|
if (n && n.computed === void 0 && n.property !== void 0 && Object.prototype.hasOwnProperty.call(r.__methods, n.property)) {
|
|
13807
13807
|
let i = r.__methods[n.property];
|
|
13808
13808
|
for (let o = 1; o < a.length; o += 1) {
|
|
13809
13809
|
const s = a[o];
|
|
13810
|
-
s.computed ? i =
|
|
13810
|
+
s.computed ? i = Hr(i, M(s.computed, e)) : i = Vr(i, s.property ?? "");
|
|
13811
13811
|
}
|
|
13812
13812
|
return i;
|
|
13813
13813
|
}
|
|
13814
|
-
return
|
|
13814
|
+
return ni(a, r.__atom, e);
|
|
13815
13815
|
}
|
|
13816
13816
|
function Nm(t, e, r) {
|
|
13817
13817
|
const a = r ? `${r.line}:${r.column}` : `anon:${e.stores.size}`, n = e.stores.get(a);
|
|
@@ -13827,7 +13827,7 @@ function Nm(t, e, r) {
|
|
|
13827
13827
|
u[d] = (...g) => m(p, ...g);
|
|
13828
13828
|
return e.stores.set(a, p), p;
|
|
13829
13829
|
}
|
|
13830
|
-
function
|
|
13830
|
+
function ii(t, e) {
|
|
13831
13831
|
const r = [];
|
|
13832
13832
|
let a = t;
|
|
13833
13833
|
for (; a.kind === "Member"; ) {
|
|
@@ -13844,7 +13844,7 @@ function oi(t, e) {
|
|
|
13844
13844
|
}
|
|
13845
13845
|
if (a.kind !== "Identifier") return null;
|
|
13846
13846
|
const n = M(a, e);
|
|
13847
|
-
return
|
|
13847
|
+
return _r(n) ? { atom: n.__atom, path: r } : null;
|
|
13848
13848
|
}
|
|
13849
13849
|
function Im(t, e) {
|
|
13850
13850
|
if (t.callee.kind === "StateRef") {
|
|
@@ -13861,7 +13861,7 @@ function Im(t, e) {
|
|
|
13861
13861
|
return hm(t.arguments, e, t.loc);
|
|
13862
13862
|
case "http": {
|
|
13863
13863
|
const o = t.arguments[0];
|
|
13864
|
-
return
|
|
13864
|
+
return Vn(o ? M(o, e) : {}, e);
|
|
13865
13865
|
}
|
|
13866
13866
|
case "query": {
|
|
13867
13867
|
const o = t.arguments[0];
|
|
@@ -13889,7 +13889,7 @@ function Im(t, e) {
|
|
|
13889
13889
|
return;
|
|
13890
13890
|
}
|
|
13891
13891
|
case "storage":
|
|
13892
|
-
return t.arguments[0] && M(t.arguments[0], e),
|
|
13892
|
+
return t.arguments[0] && M(t.arguments[0], e), Yn;
|
|
13893
13893
|
case "optimistic":
|
|
13894
13894
|
return Om(t.arguments[0], e);
|
|
13895
13895
|
}
|
|
@@ -13935,7 +13935,7 @@ function Pm(t, e) {
|
|
|
13935
13935
|
return console.error("[aktion] `new` threw", n), null;
|
|
13936
13936
|
}
|
|
13937
13937
|
}
|
|
13938
|
-
function
|
|
13938
|
+
function Ur(t, e, r) {
|
|
13939
13939
|
let a = null;
|
|
13940
13940
|
const n = [];
|
|
13941
13941
|
try {
|
|
@@ -13979,13 +13979,13 @@ function Hr(t, e, r) {
|
|
|
13979
13979
|
// frame. Cloned so later mutations of `ctx.loopVars` don't
|
|
13980
13980
|
// bleed in.
|
|
13981
13981
|
capturedLoopVars: new Map(e.loopVars)
|
|
13982
|
-
}) :
|
|
13982
|
+
}) : yr(i, e);
|
|
13983
13983
|
continue;
|
|
13984
13984
|
}
|
|
13985
13985
|
case "ComponentDeclaration":
|
|
13986
13986
|
case "ActionDeclaration":
|
|
13987
13987
|
case "HookDeclaration":
|
|
13988
|
-
|
|
13988
|
+
yr(i, e);
|
|
13989
13989
|
continue;
|
|
13990
13990
|
case "Await":
|
|
13991
13991
|
continue;
|
|
@@ -14000,7 +14000,7 @@ function Hr(t, e, r) {
|
|
|
14000
14000
|
case "BreakStatement":
|
|
14001
14001
|
case "ContinueStatement":
|
|
14002
14002
|
case "DestructureStatement":
|
|
14003
|
-
|
|
14003
|
+
Wt(i, e);
|
|
14004
14004
|
continue;
|
|
14005
14005
|
}
|
|
14006
14006
|
} catch (i) {
|
|
@@ -14015,7 +14015,7 @@ function Hr(t, e, r) {
|
|
|
14015
14015
|
function Em(t, e, r) {
|
|
14016
14016
|
let a = t[0] ?? "";
|
|
14017
14017
|
for (let n = 0; n < e.length; n += 1)
|
|
14018
|
-
a +=
|
|
14018
|
+
a += wr(M(e[n], r)), a += t[n + 1] ?? "";
|
|
14019
14019
|
return a;
|
|
14020
14020
|
}
|
|
14021
14021
|
function zm(t, e, r, a) {
|
|
@@ -14034,7 +14034,7 @@ function zm(t, e, r, a) {
|
|
|
14034
14034
|
const n = M(e, a), i = M(r, a);
|
|
14035
14035
|
switch (t) {
|
|
14036
14036
|
case "+":
|
|
14037
|
-
return typeof n == "string" || typeof i == "string" ?
|
|
14037
|
+
return typeof n == "string" || typeof i == "string" ? wr(n) + wr(i) : O(n) + O(i);
|
|
14038
14038
|
case "-":
|
|
14039
14039
|
return O(n) - O(i);
|
|
14040
14040
|
case "*":
|
|
@@ -14106,7 +14106,7 @@ function Lm(t, e) {
|
|
|
14106
14106
|
const r = M(t.object, e);
|
|
14107
14107
|
if (r == null)
|
|
14108
14108
|
return t.optional ? void 0 : null;
|
|
14109
|
-
const a =
|
|
14109
|
+
const a = _r(r) ? r.__methods[t.method] : r[t.method];
|
|
14110
14110
|
if (typeof a != "function") return null;
|
|
14111
14111
|
const n = [];
|
|
14112
14112
|
for (const o of t.arguments) {
|
|
@@ -14133,7 +14133,7 @@ function Rm(t, e, r, a) {
|
|
|
14133
14133
|
const i = r.actionDecls.get(t);
|
|
14134
14134
|
if (i) {
|
|
14135
14135
|
const g = e.map((b) => M(b, r));
|
|
14136
|
-
return
|
|
14136
|
+
return oi(i, g, r);
|
|
14137
14137
|
}
|
|
14138
14138
|
if (t === "cleanup" && r.cleanupSink) {
|
|
14139
14139
|
const g = e[0] ? M(e[0], r) : void 0;
|
|
@@ -14177,7 +14177,7 @@ function Rm(t, e, r, a) {
|
|
|
14177
14177
|
}
|
|
14178
14178
|
}
|
|
14179
14179
|
if (r.library && !Ue(r.library, t)) {
|
|
14180
|
-
const g =
|
|
14180
|
+
const g = Jn(t);
|
|
14181
14181
|
if (g.found && typeof g.value == "function") {
|
|
14182
14182
|
const b = g.value, h = [];
|
|
14183
14183
|
for (const v of e) {
|
|
@@ -14240,7 +14240,7 @@ function Dm(t, e, r) {
|
|
|
14240
14240
|
for (const b of m.aliases)
|
|
14241
14241
|
n.has(b) || n.set(b, g);
|
|
14242
14242
|
});
|
|
14243
|
-
const i =
|
|
14243
|
+
const i = mn(a), o = a.props.map(() => ({
|
|
14244
14244
|
value: void 0,
|
|
14245
14245
|
meta: {},
|
|
14246
14246
|
filled: !1
|
|
@@ -14354,7 +14354,7 @@ function Bm(t, e, r) {
|
|
|
14354
14354
|
if (g.pattern) {
|
|
14355
14355
|
let h = n[m];
|
|
14356
14356
|
h === void 0 && g.defaultValue && (h = M(g.defaultValue, e));
|
|
14357
|
-
for (const v of
|
|
14357
|
+
for (const v of Vt(g.pattern, h, e))
|
|
14358
14358
|
s(v.name, v.value);
|
|
14359
14359
|
continue;
|
|
14360
14360
|
}
|
|
@@ -14391,15 +14391,15 @@ function Bm(t, e, r) {
|
|
|
14391
14391
|
const p = e.hookScope, d = { instanceKey: r, cursor: 0 };
|
|
14392
14392
|
e.hookScope = d;
|
|
14393
14393
|
try {
|
|
14394
|
-
return { value:
|
|
14394
|
+
return { value: Ur(a.body, e, { stateAsDeclaration: !0 }), effects: u, hooks: d.cursor };
|
|
14395
14395
|
} finally {
|
|
14396
14396
|
e.hookScope = p, e.componentEffectStack.pop(), e.stateAliases.pop();
|
|
14397
14397
|
for (const m of o)
|
|
14398
14398
|
m.had ? e.loopVars.set(m.name, m.prev) : e.loopVars.delete(m.name);
|
|
14399
14399
|
}
|
|
14400
14400
|
}
|
|
14401
|
-
function
|
|
14402
|
-
return
|
|
14401
|
+
function oi(t, e, r) {
|
|
14402
|
+
return si(t.params, t.body, e, r);
|
|
14403
14403
|
}
|
|
14404
14404
|
function Om(t, e) {
|
|
14405
14405
|
const r = t ? M(t, e) : void 0;
|
|
@@ -14421,7 +14421,7 @@ function Om(t, e) {
|
|
|
14421
14421
|
throw i instanceof ht || i instanceof Se || i instanceof Me || n(), i;
|
|
14422
14422
|
}
|
|
14423
14423
|
}
|
|
14424
|
-
function
|
|
14424
|
+
function si(t, e, r, a) {
|
|
14425
14425
|
const n = [], i = (o, s) => {
|
|
14426
14426
|
n.push({
|
|
14427
14427
|
name: o,
|
|
@@ -14433,14 +14433,14 @@ function li(t, e, r, a) {
|
|
|
14433
14433
|
const s = t[o];
|
|
14434
14434
|
let c = r[o];
|
|
14435
14435
|
if (c === void 0 && s.defaultValue && (c = M(s.defaultValue, a)), s.pattern) {
|
|
14436
|
-
for (const u of
|
|
14436
|
+
for (const u of Vt(s.pattern, c, a))
|
|
14437
14437
|
i(u.name, u.value);
|
|
14438
14438
|
continue;
|
|
14439
14439
|
}
|
|
14440
14440
|
i(s.name, c);
|
|
14441
14441
|
}
|
|
14442
14442
|
try {
|
|
14443
|
-
return
|
|
14443
|
+
return Ur(e, a, { stateAsDeclaration: a.state.isRendering() });
|
|
14444
14444
|
} finally {
|
|
14445
14445
|
for (const o of n)
|
|
14446
14446
|
o.had ? a.loopVars.set(o.name, o.prev) : a.loopVars.delete(o.name);
|
|
@@ -14508,14 +14508,14 @@ function Vm(t, e, r) {
|
|
|
14508
14508
|
};
|
|
14509
14509
|
return [c.value, u];
|
|
14510
14510
|
}
|
|
14511
|
-
let
|
|
14511
|
+
let Ba = 0;
|
|
14512
14512
|
function Wm(t, e, r) {
|
|
14513
14513
|
const a = t[0] ? String(M(t[0], e)) : "rui", n = bt(e);
|
|
14514
14514
|
if (!n)
|
|
14515
|
-
return vt("id", r), `${a}-${
|
|
14515
|
+
return vt("id", r), `${a}-${Ba += 1}`;
|
|
14516
14516
|
const i = e.hookScope.cursor++;
|
|
14517
14517
|
let o = n[i];
|
|
14518
|
-
return (!o || o.kind !== "id") && (o = { kind: "id", value: `${a}-${
|
|
14518
|
+
return (!o || o.kind !== "id") && (o = { kind: "id", value: `${a}-${Ba += 1}` }, n[i] = o), o.value;
|
|
14519
14519
|
}
|
|
14520
14520
|
function qm(t, e, r) {
|
|
14521
14521
|
const a = [];
|
|
@@ -14527,11 +14527,11 @@ function qm(t, e, r) {
|
|
|
14527
14527
|
}
|
|
14528
14528
|
a.push(M(n, r));
|
|
14529
14529
|
}
|
|
14530
|
-
return
|
|
14530
|
+
return si(t.params, t.body, a, r);
|
|
14531
14531
|
}
|
|
14532
|
-
let
|
|
14532
|
+
let Oa = !1;
|
|
14533
14533
|
function vt(t, e) {
|
|
14534
|
-
|
|
14534
|
+
Oa || (Oa = !0, console.error(
|
|
14535
14535
|
`[aktion] $${t}(...) was called outside a component render. Hooks may only be called at the top level of a component body or another $hook.`,
|
|
14536
14536
|
e
|
|
14537
14537
|
));
|
|
@@ -14550,7 +14550,7 @@ function Gm(t, e) {
|
|
|
14550
14550
|
e.stateAliases.length = 0;
|
|
14551
14551
|
for (const s of r) e.stateAliases.push(s);
|
|
14552
14552
|
try {
|
|
14553
|
-
return
|
|
14553
|
+
return oi(t, n, e);
|
|
14554
14554
|
} finally {
|
|
14555
14555
|
e.loopVars.clear();
|
|
14556
14556
|
for (const [s, c] of i) e.loopVars.set(s, c);
|
|
@@ -14656,7 +14656,7 @@ function Qm(t, e) {
|
|
|
14656
14656
|
return e.state.set(s, u), u;
|
|
14657
14657
|
}
|
|
14658
14658
|
if (r.kind === "Member") {
|
|
14659
|
-
const s =
|
|
14659
|
+
const s = Fr(r, e);
|
|
14660
14660
|
if (s) {
|
|
14661
14661
|
const d = e.state.get(s.name);
|
|
14662
14662
|
if (s.path.length >= 1 && Mp(d)) {
|
|
@@ -14668,12 +14668,12 @@ function Qm(t, e) {
|
|
|
14668
14668
|
return b[h] = y, e.notify?.(), y;
|
|
14669
14669
|
}
|
|
14670
14670
|
}
|
|
14671
|
-
const m =
|
|
14671
|
+
const m = xr(d, s.path), g = Ie(i, m, o);
|
|
14672
14672
|
return e.state.setPath(s.name, s.path, g), g;
|
|
14673
14673
|
}
|
|
14674
|
-
const c =
|
|
14674
|
+
const c = ii(r, e);
|
|
14675
14675
|
if (c) {
|
|
14676
|
-
const d =
|
|
14676
|
+
const d = xr(e.state.get(c.atom), c.path), m = Ie(i, d, o);
|
|
14677
14677
|
return e.state.setPath(c.atom, c.path, m), m;
|
|
14678
14678
|
}
|
|
14679
14679
|
const u = M(r.object, e), p = r.computed ? r.computed.kind === "Literal" ? r.computed.value : null : r.property;
|
|
@@ -14698,7 +14698,7 @@ function Qm(t, e) {
|
|
|
14698
14698
|
}
|
|
14699
14699
|
return o;
|
|
14700
14700
|
}
|
|
14701
|
-
function
|
|
14701
|
+
function xr(t, e) {
|
|
14702
14702
|
let r = t;
|
|
14703
14703
|
for (const a of e) {
|
|
14704
14704
|
if (r == null) return;
|
|
@@ -14715,7 +14715,7 @@ function wr(t, e) {
|
|
|
14715
14715
|
}
|
|
14716
14716
|
return r;
|
|
14717
14717
|
}
|
|
14718
|
-
function
|
|
14718
|
+
function li(t, e, r) {
|
|
14719
14719
|
const [a, n] = t;
|
|
14720
14720
|
if (!a) return null;
|
|
14721
14721
|
const o = (n && n.kind === "Literal" ? String(n.value ?? "++") : "++") === "--" ? -1 : 1;
|
|
@@ -14724,9 +14724,9 @@ function ci(t, e, r) {
|
|
|
14724
14724
|
return e.state.set(s, u), r === "prefix" ? u : c;
|
|
14725
14725
|
}
|
|
14726
14726
|
if (a.kind === "Member") {
|
|
14727
|
-
const s =
|
|
14727
|
+
const s = Fr(a, e);
|
|
14728
14728
|
if (s) {
|
|
14729
|
-
const c = O(
|
|
14729
|
+
const c = O(xr(e.state.get(s.name), s.path)), u = c + o;
|
|
14730
14730
|
return e.state.setPath(s.name, s.path, u), r === "prefix" ? u : c;
|
|
14731
14731
|
}
|
|
14732
14732
|
}
|
|
@@ -14748,10 +14748,10 @@ function ci(t, e, r) {
|
|
|
14748
14748
|
return null;
|
|
14749
14749
|
}
|
|
14750
14750
|
function ef(t, e) {
|
|
14751
|
-
return
|
|
14751
|
+
return li(t, e, "postfix");
|
|
14752
14752
|
}
|
|
14753
14753
|
function tf(t, e) {
|
|
14754
|
-
return
|
|
14754
|
+
return li(t, e, "prefix");
|
|
14755
14755
|
}
|
|
14756
14756
|
function rf(t) {
|
|
14757
14757
|
if (t.trackedState.add("route"), t.router)
|
|
@@ -14788,21 +14788,21 @@ function af(t) {
|
|
|
14788
14788
|
}
|
|
14789
14789
|
};
|
|
14790
14790
|
}
|
|
14791
|
-
function
|
|
14791
|
+
function Hr(t, e) {
|
|
14792
14792
|
if (t != null) {
|
|
14793
14793
|
if (Array.isArray(t)) {
|
|
14794
|
-
const r =
|
|
14794
|
+
const r = _a(e, t.length);
|
|
14795
14795
|
return r === null ? void 0 : t[r];
|
|
14796
14796
|
}
|
|
14797
14797
|
if (typeof t == "string") {
|
|
14798
|
-
const r =
|
|
14798
|
+
const r = _a(e, t.length);
|
|
14799
14799
|
return r === null ? void 0 : t[r];
|
|
14800
14800
|
}
|
|
14801
14801
|
if (typeof t == "object")
|
|
14802
14802
|
return t[String(e ?? "")];
|
|
14803
14803
|
}
|
|
14804
14804
|
}
|
|
14805
|
-
function
|
|
14805
|
+
function _a(t, e) {
|
|
14806
14806
|
let r;
|
|
14807
14807
|
if (typeof t == "number")
|
|
14808
14808
|
r = t;
|
|
@@ -14812,7 +14812,7 @@ function Fa(t, e) {
|
|
|
14812
14812
|
return null;
|
|
14813
14813
|
return r < 0 && (r = e + r), r < 0 || r >= e ? null : r;
|
|
14814
14814
|
}
|
|
14815
|
-
function
|
|
14815
|
+
function Vr(t, e) {
|
|
14816
14816
|
if (t != null) {
|
|
14817
14817
|
if (Array.isArray(t)) {
|
|
14818
14818
|
switch (e) {
|
|
@@ -14869,7 +14869,7 @@ function lf(t) {
|
|
|
14869
14869
|
function cf(t) {
|
|
14870
14870
|
return typeof t == "string" ? t : typeof t == "number" ? String(t) : "";
|
|
14871
14871
|
}
|
|
14872
|
-
function
|
|
14872
|
+
function wr(t) {
|
|
14873
14873
|
if (t == null) return "";
|
|
14874
14874
|
if (typeof t == "string") return t;
|
|
14875
14875
|
if (typeof t == "number" || typeof t == "boolean") return String(t);
|
|
@@ -14890,18 +14890,18 @@ const uf = "__AKTION_DEVTOOLS_HOOK__";
|
|
|
14890
14890
|
function df() {
|
|
14891
14891
|
return globalThis;
|
|
14892
14892
|
}
|
|
14893
|
-
function
|
|
14893
|
+
function qt() {
|
|
14894
14894
|
return df()[uf];
|
|
14895
14895
|
}
|
|
14896
|
-
function
|
|
14897
|
-
const t =
|
|
14896
|
+
function kr() {
|
|
14897
|
+
const t = qt();
|
|
14898
14898
|
return t !== void 0 && t.active;
|
|
14899
14899
|
}
|
|
14900
|
-
function
|
|
14901
|
-
|
|
14900
|
+
function cr(t) {
|
|
14901
|
+
qt()?.emit(t);
|
|
14902
14902
|
}
|
|
14903
14903
|
function pf(t) {
|
|
14904
|
-
|
|
14904
|
+
qt()?.unregisterApp(t);
|
|
14905
14905
|
}
|
|
14906
14906
|
function de() {
|
|
14907
14907
|
return typeof performance < "u" && typeof performance.now == "function" ? performance.now() : Date.now();
|
|
@@ -14997,13 +14997,13 @@ class gf {
|
|
|
14997
14997
|
try {
|
|
14998
14998
|
h();
|
|
14999
14999
|
} catch (v) {
|
|
15000
|
-
|
|
15000
|
+
Ua(e, v);
|
|
15001
15001
|
}
|
|
15002
15002
|
this.emitEffect(e, r, "cleanup", m, { cleanups: g.length });
|
|
15003
15003
|
}
|
|
15004
15004
|
const b = de();
|
|
15005
15005
|
try {
|
|
15006
|
-
|
|
15006
|
+
Fa(r, a(), o, this.options), this.emitEffect(e, r, "run", m, { duration: de() - b });
|
|
15007
15007
|
} catch (h) {
|
|
15008
15008
|
this.emitEffect(e, r, "error", m, {
|
|
15009
15009
|
duration: de() - b,
|
|
@@ -15027,7 +15027,7 @@ class gf {
|
|
|
15027
15027
|
}
|
|
15028
15028
|
case "state": {
|
|
15029
15029
|
const g = xf(m.name, n), b = `state:${m.name}`, h = this.options.state.subscribe((v) => {
|
|
15030
|
-
|
|
15030
|
+
Un(v, g) && c(b);
|
|
15031
15031
|
});
|
|
15032
15032
|
o.unsubscribers.push(h);
|
|
15033
15033
|
break;
|
|
@@ -15042,7 +15042,7 @@ class gf {
|
|
|
15042
15042
|
*/
|
|
15043
15043
|
emitEffect(e, r, a, n, i = {}) {
|
|
15044
15044
|
const o = this.options.onEffectEvent;
|
|
15045
|
-
if (!o || !
|
|
15045
|
+
if (!o || !kr()) return;
|
|
15046
15046
|
const s = e.lastIndexOf($t);
|
|
15047
15047
|
o({
|
|
15048
15048
|
effectKey: e,
|
|
@@ -15070,7 +15070,7 @@ class gf {
|
|
|
15070
15070
|
try {
|
|
15071
15071
|
i();
|
|
15072
15072
|
} catch (o) {
|
|
15073
|
-
|
|
15073
|
+
Ua(e, o);
|
|
15074
15074
|
}
|
|
15075
15075
|
this.emitEffect(e, r.decl, "cleanup", "unmount", { cleanups: n });
|
|
15076
15076
|
}
|
|
@@ -15079,7 +15079,7 @@ class gf {
|
|
|
15079
15079
|
)) {
|
|
15080
15080
|
const n = de();
|
|
15081
15081
|
try {
|
|
15082
|
-
|
|
15082
|
+
Fa(r.decl, r.ctxRef(), r, this.options), this.emitEffect(e, r.decl, "run", "unmount", { duration: de() - n });
|
|
15083
15083
|
} catch (i) {
|
|
15084
15084
|
this.emitEffect(e, r.decl, "error", "unmount", {
|
|
15085
15085
|
error: i instanceof Error ? i.message : String(i)
|
|
@@ -15112,7 +15112,7 @@ function hf(t, e, r) {
|
|
|
15112
15112
|
}, e.ms - c));
|
|
15113
15113
|
};
|
|
15114
15114
|
}
|
|
15115
|
-
function
|
|
15115
|
+
function Fa(t, e, r, a) {
|
|
15116
15116
|
const n = r.capturedAliases.length > 0 ? e.stateAliases.slice() : null;
|
|
15117
15117
|
if (n) {
|
|
15118
15118
|
e.stateAliases.length = 0;
|
|
@@ -15178,13 +15178,13 @@ function bf(t, e, r, a) {
|
|
|
15178
15178
|
case "ContinueStatement":
|
|
15179
15179
|
case "ThrowStatement":
|
|
15180
15180
|
case "DestructureStatement":
|
|
15181
|
-
|
|
15181
|
+
ri(t, e);
|
|
15182
15182
|
return;
|
|
15183
15183
|
default:
|
|
15184
15184
|
return;
|
|
15185
15185
|
}
|
|
15186
15186
|
}
|
|
15187
|
-
function
|
|
15187
|
+
function Ua(t, e) {
|
|
15188
15188
|
console.error(`[aktion] cleanup for effect "${t}" threw`, e);
|
|
15189
15189
|
}
|
|
15190
15190
|
function vf(t) {
|
|
@@ -15204,13 +15204,13 @@ function xf(t, e) {
|
|
|
15204
15204
|
return t;
|
|
15205
15205
|
}
|
|
15206
15206
|
const wf = "$";
|
|
15207
|
-
function
|
|
15207
|
+
function Ha(t, e) {
|
|
15208
15208
|
if (t.length !== e.length) return !1;
|
|
15209
15209
|
for (let r = 0; r < t.length; r += 1)
|
|
15210
15210
|
if (!Object.is(t[r], e[r])) return !1;
|
|
15211
15211
|
return !0;
|
|
15212
15212
|
}
|
|
15213
|
-
function
|
|
15213
|
+
function Va(t, e) {
|
|
15214
15214
|
const r = Object.keys(t), a = Object.keys(e);
|
|
15215
15215
|
if (r.length !== a.length) return !1;
|
|
15216
15216
|
for (const n of r)
|
|
@@ -15454,18 +15454,18 @@ class kf {
|
|
|
15454
15454
|
const n = a(), i = e.explicitKey != null ? `=${String(e.explicitKey)}` : `@${e.source?.line ?? 0}:${e.source?.column ?? 0}`, o = `${r}#${e.decl.name}${i}`;
|
|
15455
15455
|
this.aliveInstances.add(o);
|
|
15456
15456
|
const s = this.memoCache.get(o);
|
|
15457
|
-
if (this.memoEnabled && s &&
|
|
15457
|
+
if (this.memoEnabled && s && Ha(e.positional, s.positional) && Va(e.named, s.named) && !zt(this.changedPaths, s.deps)) {
|
|
15458
15458
|
const d = n.trackedState;
|
|
15459
15459
|
for (const m of s.deps) d.add(m);
|
|
15460
|
-
this.profiling && this.profile(o, e.decl.name, "user", "memo", 0, "memoized (args + deps unchanged)", s.deps),
|
|
15460
|
+
this.profiling && this.profile(o, e.decl.name, "user", "memo", 0, "memoized (args + deps unchanged)", s.deps), Ea(n, e.decl.name);
|
|
15461
15461
|
try {
|
|
15462
15462
|
return this.renderAt(s.value, o);
|
|
15463
15463
|
} finally {
|
|
15464
|
-
|
|
15464
|
+
za(n);
|
|
15465
15465
|
}
|
|
15466
15466
|
}
|
|
15467
|
-
const c = this.profiledInstances.has(o) ? "update" : "mount", u = s ?
|
|
15468
|
-
|
|
15467
|
+
const c = this.profiledInstances.has(o) ? "update" : "mount", u = s ? Ha(e.positional, s.positional) ? Va(e.named, s.named) ? zt(this.changedPaths, s.deps) ? "state dependency changed" : "full render" : "named args changed" : "positional args changed" : c === "mount" ? "initial mount" : "no memo (full render)", p = this.profiling ? de() : 0;
|
|
15468
|
+
Ea(n, e.decl.name);
|
|
15469
15469
|
try {
|
|
15470
15470
|
const d = n.trackedState, m = /* @__PURE__ */ new Set();
|
|
15471
15471
|
n.trackedState = m;
|
|
@@ -15484,7 +15484,7 @@ class kf {
|
|
|
15484
15484
|
value: b
|
|
15485
15485
|
}), this.renderAt(b, o);
|
|
15486
15486
|
} finally {
|
|
15487
|
-
|
|
15487
|
+
za(n);
|
|
15488
15488
|
}
|
|
15489
15489
|
}
|
|
15490
15490
|
renderComponent(e, r) {
|
|
@@ -15622,18 +15622,18 @@ function $f(t, e) {
|
|
|
15622
15622
|
const r = e.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? Array.from(e.childNodes) : [e];
|
|
15623
15623
|
ui(t, r);
|
|
15624
15624
|
}
|
|
15625
|
-
function
|
|
15625
|
+
function Wa(t, e) {
|
|
15626
15626
|
if (t === e) return t;
|
|
15627
15627
|
if (t.nodeType !== e.nodeType)
|
|
15628
|
-
return
|
|
15628
|
+
return qa(t, e);
|
|
15629
15629
|
if (t.nodeType === Node.TEXT_NODE)
|
|
15630
15630
|
return t.textContent !== e.textContent && (t.textContent = e.textContent), t;
|
|
15631
15631
|
if (t.nodeType !== Node.ELEMENT_NODE)
|
|
15632
15632
|
return t;
|
|
15633
15633
|
const r = t, a = e;
|
|
15634
|
-
return r.tagName !== a.tagName ?
|
|
15634
|
+
return r.tagName !== a.tagName ? qa(r, a) : (Cf(r, a), r);
|
|
15635
15635
|
}
|
|
15636
|
-
function
|
|
15636
|
+
function qa(t, e) {
|
|
15637
15637
|
return t.parentNode?.replaceChild(e, t), e;
|
|
15638
15638
|
}
|
|
15639
15639
|
function Cf(t, e) {
|
|
@@ -15667,58 +15667,76 @@ function Mf(t, e) {
|
|
|
15667
15667
|
return;
|
|
15668
15668
|
}
|
|
15669
15669
|
if (t instanceof HTMLSelectElement && e instanceof HTMLSelectElement) {
|
|
15670
|
-
|
|
15670
|
+
t.value !== e.value && (t.value = e.value);
|
|
15671
15671
|
return;
|
|
15672
15672
|
}
|
|
15673
15673
|
}
|
|
15674
15674
|
function Nf(t, e) {
|
|
15675
15675
|
if (t.type === "checkbox" || t.type === "radio") {
|
|
15676
15676
|
const a = e.hasAttribute("checked") || e.checked;
|
|
15677
|
-
t.checked !== a &&
|
|
15677
|
+
t.checked !== a && (t.checked = a);
|
|
15678
15678
|
return;
|
|
15679
15679
|
}
|
|
15680
15680
|
const r = e.getAttribute("value") ?? e.value ?? "";
|
|
15681
|
-
|
|
15681
|
+
t.value !== r && ci(t, r);
|
|
15682
15682
|
}
|
|
15683
15683
|
function If(t, e) {
|
|
15684
15684
|
const r = e.value ?? e.textContent ?? "";
|
|
15685
|
-
|
|
15685
|
+
t.value !== r && ci(t, r);
|
|
15686
15686
|
}
|
|
15687
|
-
function
|
|
15687
|
+
function ci(t, e) {
|
|
15688
|
+
if (!Pf(t)) {
|
|
15689
|
+
t.value = e;
|
|
15690
|
+
return;
|
|
15691
|
+
}
|
|
15692
|
+
let r = null, a = null;
|
|
15693
|
+
try {
|
|
15694
|
+
r = t.selectionStart, a = t.selectionEnd;
|
|
15695
|
+
} catch {
|
|
15696
|
+
}
|
|
15697
|
+
const n = t.value.length;
|
|
15698
|
+
if (t.value = e, r == null || a == null) return;
|
|
15699
|
+
const i = r >= n && a >= n, o = i ? e.length : Math.min(r, e.length), s = i ? e.length : Math.min(a, e.length);
|
|
15700
|
+
try {
|
|
15701
|
+
t.setSelectionRange(o, s);
|
|
15702
|
+
} catch {
|
|
15703
|
+
}
|
|
15704
|
+
}
|
|
15705
|
+
function Pf(t) {
|
|
15688
15706
|
const e = t.getRootNode();
|
|
15689
15707
|
return e instanceof ShadowRoot || e instanceof Document ? e.activeElement === t : t.ownerDocument?.activeElement === t;
|
|
15690
15708
|
}
|
|
15691
15709
|
function ui(t, e) {
|
|
15692
15710
|
const r = /* @__PURE__ */ new Map();
|
|
15693
15711
|
for (const n of Array.from(t.childNodes)) {
|
|
15694
|
-
const i =
|
|
15712
|
+
const i = ur(n);
|
|
15695
15713
|
i && r.set(i, n);
|
|
15696
15714
|
}
|
|
15697
15715
|
let a = 0;
|
|
15698
15716
|
for (const n of e) {
|
|
15699
|
-
const i = t.childNodes[a] ?? null, o =
|
|
15717
|
+
const i = t.childNodes[a] ?? null, o = ur(n);
|
|
15700
15718
|
if (o && r.has(o)) {
|
|
15701
15719
|
const c = r.get(o);
|
|
15702
|
-
r.delete(o), c !== i && t.insertBefore(c, i),
|
|
15720
|
+
r.delete(o), c !== i && t.insertBefore(c, i), Wa(c, n), a += 1;
|
|
15703
15721
|
continue;
|
|
15704
15722
|
}
|
|
15705
15723
|
if (!i) {
|
|
15706
15724
|
t.appendChild(n), a += 1;
|
|
15707
15725
|
continue;
|
|
15708
15726
|
}
|
|
15709
|
-
const s =
|
|
15727
|
+
const s = ur(i);
|
|
15710
15728
|
if (s && (!o || s !== o)) {
|
|
15711
15729
|
t.insertBefore(n, i), a += 1;
|
|
15712
15730
|
continue;
|
|
15713
15731
|
}
|
|
15714
|
-
|
|
15732
|
+
Wa(i, n), a += 1;
|
|
15715
15733
|
}
|
|
15716
15734
|
for (; t.childNodes.length > e.length; ) {
|
|
15717
15735
|
const n = t.childNodes[t.childNodes.length - 1];
|
|
15718
15736
|
t.removeChild(n);
|
|
15719
15737
|
}
|
|
15720
15738
|
}
|
|
15721
|
-
function
|
|
15739
|
+
function ur(t) {
|
|
15722
15740
|
if (t.nodeType !== Node.ELEMENT_NODE) return null;
|
|
15723
15741
|
const e = t;
|
|
15724
15742
|
if (e.id) return `#${e.id}`;
|
|
@@ -15726,102 +15744,102 @@ function dr(t) {
|
|
|
15726
15744
|
return r ? `@${r}` : null;
|
|
15727
15745
|
}
|
|
15728
15746
|
function di(t, e = {}) {
|
|
15729
|
-
return e.mode === "chat" ?
|
|
15747
|
+
return e.mode === "chat" ? zf(t, e) : Ef(t, e);
|
|
15730
15748
|
}
|
|
15731
|
-
function
|
|
15732
|
-
return
|
|
15749
|
+
function Jg(t) {
|
|
15750
|
+
return Dt(t);
|
|
15733
15751
|
}
|
|
15734
|
-
function
|
|
15752
|
+
function Ef(t, e) {
|
|
15735
15753
|
const r = e.bindings ?? !0, a = e.toolCalls ?? !0, n = [];
|
|
15736
|
-
n.push(
|
|
15737
|
-
const i = e.examples ??
|
|
15738
|
-
return i.length > 0 && n.push(
|
|
15754
|
+
n.push(Lf(e.preamble)), n.push(Rf()), n.push(Df()), r && n.push(jf()), n.push(Bf()), n.push(Of()), a && n.push(_f()), n.push(Ff()), n.push(Uf()), n.push(Hf()), n.push(Vf()), n.push(Wf()), n.push(qf()), n.push(Kf()), n.push(Gf(t)), e.inlineMode && n.push(Yf()), e.editMode && n.push(Xf()), e.tools && e.tools.length > 0 && n.push(cg(e.tools)), e.toolExamples && e.toolExamples.length > 0 && n.push(Sr("Endpoint examples", e.toolExamples));
|
|
15755
|
+
const i = e.examples ?? Zf();
|
|
15756
|
+
return i.length > 0 && n.push(Sr("Examples", i)), e.additionalRules && e.additionalRules.length > 0 && n.push(pi(e.additionalRules)), n.push(Jf()), n.join(`
|
|
15739
15757
|
|
|
15740
15758
|
`).trim() + `
|
|
15741
15759
|
`;
|
|
15742
15760
|
}
|
|
15743
|
-
function
|
|
15761
|
+
function zf(t, e) {
|
|
15744
15762
|
const r = [];
|
|
15745
|
-
r.push(
|
|
15746
|
-
const a = e.examples ??
|
|
15747
|
-
return a.length > 0 && r.push(
|
|
15763
|
+
r.push(eg(e.preamble)), r.push(tg()), r.push(rg(t)), r.push(ag()), e.tools && e.tools.length > 0 && r.push(ig(e.tools));
|
|
15764
|
+
const a = e.examples ?? og();
|
|
15765
|
+
return a.length > 0 && r.push(Sr("Examples", a)), e.additionalRules && e.additionalRules.length > 0 && r.push(pi(e.additionalRules)), r.push(ng()), r.push(sg()), r.push(lg()), r.join(`
|
|
15748
15766
|
|
|
15749
15767
|
`).trim() + `
|
|
15750
15768
|
`;
|
|
15751
15769
|
}
|
|
15752
|
-
function
|
|
15770
|
+
function Lf(t) {
|
|
15753
15771
|
return `${t?.trim() || "You are a UI engineer building complete, working apps in Aktion — a declarative language that is a strict subset of JavaScript: every program is valid JS, and the runtime adds reactivity on top. Respond ONLY in Aktion — no prose, JSON, markdown, or HTML."}
|
|
15754
15772
|
|
|
15755
15773
|
Register the UI root with \`$app(...)\` on the first line. Pass it one node (\`$app(Component())\`), an array (\`$app([Component1(), Component2()])\`), or variadic nodes (\`$app(Component1(), Component2())\`). Wrap a dashboard/app in \`AppShell\` (left sidebar + topbar); build a website or marketing page from a top \`Navbar\` + stacked sections — never an \`AppShell\`. References resolve across the whole program, so call \`$app(...)\` first and let the rest stream in below it. There should be only one \`$app(...)\` in the program, as the runtime treats it as the UI root.`;
|
|
15756
15774
|
}
|
|
15757
|
-
function
|
|
15775
|
+
function Rf() {
|
|
15758
15776
|
return '## Core syntax\n\nA program is a flat list of `name = expression` statements, one per line (newlines end statements; semicolons optional).\n\n```\n$app(Column([header, kpis, table])) // UI root — always first\nheader = PageHeader("Sales", { subtitle: "Q4 2026" })\n$count = 0 // reactive atom — the \'$\' prefix is the contract\nfunction Counter(label) { return Text(`${label}: ${$count}`) } // component (returns a tree)\nfunction inc() { $count += 1 } // action (no return — runs for side effects)\n$effect(() => $console.log($count), [$count]) // declarative side effect\n```\n\n### Three kinds of name\n- `name = value` — plain binding, captured once (not reactive).\n- `$name = value` — reactive atom: reading subscribes, writing notifies.\n- `function name(...)` — declares a component AND an action of that name. First-letter case is NOT significant (`Card`/`card`, `SaveOrder`/`saveOrder`); same for arrow bindings (`row = item => Row(...)`).\n\n### Two rules, broken constantly — always check\n1. **Invoke components with parentheses.** A component is a function; the bare name is just its value. Render it by calling it, even with no args: `$app(MyApp())` not `$app(MyApp)`; `Column([Header(), Body()])` not `Column([Header, Body])`. (Exception: passing a component as a callback, e.g. `render: UserCard`.)\n2. **One positional argument max** (the trailing-object rule): each call takes at most one bare positional arg; all other props go in a trailing `{ }` object.\n\n```\nButton("Save", { variant: "primary", loading: $isSaving })\nStatCard("Revenue", { value: "$48k", trend: "up", delta: "+12%" })\nRow([Card1(), Card2()], { gap: "m" })\n```\n\n`Button("Save", "primary")` is a schema error — use the named-prop form. Any call also accepts `{ key: ... }` to pin per-instance state across reorders.\n\n### Reserved top-level names\n- `$app(...)` — registers the UI root (REQUIRED).\n- `$theme({...})` — optional brand override (written as a bare statement).\n- `route` — the reactive router handle (`route.path`, `route.params`, `route.navigate("/x")`); never declare it yourself.';
|
|
15759
15777
|
}
|
|
15760
|
-
function
|
|
15778
|
+
function Df() {
|
|
15761
15779
|
return '## JavaScript is fully supported\n\nAktion *is* JavaScript — every standard feature works inside expressions, action bodies, effect callbacks, and lambdas. Use whatever is clearest.\n\n### Ways to produce the UI\nThere is no single required shape — compose however the content suggests, and mix these freely:\n- **Inline in `$app(...)`** — `$app(Column([Hero(), Features(), Footer()]))` for a self-contained tree.\n- **Named statements** — pull pieces into `name = ...` bindings and reference them; they hoist and stream in independently.\n- **`.map` / `.filter` over data** — turn arrays into nodes: `rows = $items.map(i => Row(i))`.\n- **`function` components** — factor reusable or parameterised UI into components; invoke them with `()`.\n- **`$router({...})` pages** — split a multi-page app into route arms.\n\n### In expressions (right of `=`) — value-producing JS only\n```\nbanner = $error ? Banner($error, { tone: "danger" }) : null // ternary\nrows = $todos.filter(t => !t.done).map(t => TodoRow(t)) // map / filter / reduce\ntotal = $cart.reduce((sum, i) => sum + i.price, 0)\nmerged = { ...$base, status: "done" } // spread / destructuring\nname = $user?.profile?.name ?? "Guest" // optional chain / nullish\ntitle = `${rows.length} ${$util.plural(rows.length, "result", "results")}` // template literal\n```\n`if` / `switch` / `for` / `while` / `try` are statements — they can\'t sit on the right of `=`. Use a ternary, an array method, or wrap them in a function and call it.\n\n### In action / effect / lambda bodies — full statement surface\n`if`/`else`, `switch`, every `for` and `while`, `try`/`catch`/`finally`, `throw`, `return`, plus all assignment operators (`= += -= *= /= ??= ++ --`) against `$atoms` and member chains (`$user.name = "Alex"`).\n\n```\nfunction submit(payload) {\n if (!payload.email) return\n for (let tag of payload.tags) $tags = [...$tags, tag]\n $emit("submitted", { id: payload.id })\n}\n```\n\n### Lambdas, continuations, comments, timers\n- Arrow functions in every form: `() => expr`, `x => expr`, `(a, b = 0) => { ...; return ... }`, `(...args) => ...`.\n- A leading operator (`.`, `?.`, `&&`, `??`, `?`/`:`, arithmetic) continues an expression onto the next line.\n- Comments: `// line` and `/* block */` only.\n- `setTimeout` / `setInterval` / `clearTimeout` / `clearInterval` work and are torn down on re-plan — create them in an `$effect` and clear them in its `cleanup`, or prefer `$effect(..., ["every(1000)"])` for simple repeats.\n- Every JavaScript global resolves by name (see *Built-in globals*).';
|
|
15762
15780
|
}
|
|
15763
|
-
function
|
|
15781
|
+
function jf() {
|
|
15764
15782
|
return '## Reactive State\n\nThe `$` sigil is the only thing that makes a binding reactive; `let`/`const`/`var` are optional and don\'t affect reactivity.\n\n```\n$count = 0\n$user = { name: "Ada", role: "Engineer" }\n```\n\n- **Read** `$name` anywhere — it auto-subscribes whoever reads it (component, derived value, effect).\n- **Write** `$name = ...` (and `+= -= ??= ++ --`) only from event handlers, effects, and lambdas — never while building the UI. Member writes (`$user.name = "Alex"`) update immutably so subscribers see a fresh reference.\n- **Never write reactive state in render position.** A write that runs while the UI is built loops; the runtime applies it but skips the re-render and warns. Hold component-local state by declaring it at the top of a component body (set-once per instance) or with the `$state` hook.\n\n### Fine-grained reactivity (path-level)\nSubscriptions track the exact **path** you read. Reading `$user.name` subscribes to `user.name` alone — writing `$user.role` won\'t recompute it, but replacing `$user` will; effect deps work the same (`$effect(..., [$user.name])`). Prefer reading the precise field for the tightest updates. A component re-executes only when its own inputs change — its args or a `$` path its body read — like `React.memo`, but automatic. Args compare shallowly, so hoist inline-lambda props to a stable binding to avoid needless child re-renders.\n\n### Per-instance state\n`$name = value` inside a function body is per-instance when the function renders as a component — two `Counter()`s each own their `$count`. Add `{ key: id }` to keep state attached when siblings reorder.\n\n### Hooks\nFor composable local state, use hooks — a function whose name starts with `$`, called only at the top level of a component (or another hook) in a stable order:\n- `$state(initial)` → `[value, setValue]` (like `useState`; `setValue(prev => next)` supported, `initial` runs once).\n- `$memo(() => value, [deps])` → a cached value (like `useMemo`).\n- `$ref(initial)` → a stable `{ current }` box (like `useRef`; writing `.current` does NOT re-render — for DOM nodes, timer ids, previous values).\n- `$reducer((state, action) => next, initial)` → `[state, dispatch]` (like `useReducer`; the clean way to manage many related transitions).\n- `$id(prefix?)` → a stable unique id per instance (like `useId`; for `for`/`aria-*` wiring).\n- `function $name(...)` declares a custom hook composing the built-ins.\n\n```\nfunction Counter() {\n const [count, setCount] = $state(0)\n const label = $memo(() => `Count: ${count}`, [count])\n return Stack([Text(label), Button("+1", { onClick: () => setCount(c => c + 1) })])\n}\n```\n\n### Two-way binding\nPass a `$variable` (or member chain — `value: $form.email`) as the value prop of any input/select/checkbox/switch/slider and the runtime wires the change handler automatically; add `onChange: v => ...` for an extra side effect.\n\n```\n$draft = ""\nfield = Input("draft", { value: $draft })\n```\n\n### Computed values\nNo separate "computed" tier — just compute. Every `$` reference in an expression auto-tracks: `$open = $todos.filter(t => !t.done)`.\n\n### Global stores — `$store({...})`\nFor app-wide state without prop-drilling, declare a store. Non-function entries are reactive state; function entries are methods that receive the store handle `s` first. Read `store.field` (fine-grained) and call `store.method(args)`.\n\n```\ncart = $store({\n items: [],\n total: (s) => $util.sum(s.items.map(i => i.price)), // → cart.total()\n add: (s, item) => { s.items = [...s.items, item] }, // → cart.add(item)\n})\nfunction CartBadge() { return Badge(`${cart.items.length} items`) }\n```\n\nUse a store for shared state; use a component\'s local `$state` / `$name` for state one component owns.';
|
|
15765
15783
|
}
|
|
15766
|
-
function
|
|
15784
|
+
function Bf() {
|
|
15767
15785
|
return '## Components & Actions\n\nA `function` declaration is both a **component** (call it in render position → its return value renders) and an **action** (call it from an event handler → its body runs). Name case is not significant, and a function with no `return` renders nothing.\n\n### Components\n```\nfunction UserCard(user, { tone = "default" } = {}) {\n return Card([\n Avatar(user.name, { size: "md" }),\n Text(user.name, { variant: "large-heavy" }),\n Badge(tone, { tone })\n ])\n}\n$app(Column([UserCard($currentUser), UserCard($other, { tone: "primary" })]))\n```\n\n- The positional argument lands in the component\'s first parameter (the `children` slot for container-style components).\n- User components shadow built-ins of the same name — wrap a library component to add telemetry or styling.\n- Use a lambda (`row = item => Row(item)`) for one-off helpers that don\'t need a named component.\n\n### Actions\nA `function` whose body runs for side effects is an action — use it as a handler (`onClick: save`) or call it for its result. `return` is optional; the full JS statement surface applies. Wrap optimistic writes in `$optimistic(() => { … })` to snapshot state and auto-roll-back if the callback throws (or its promise rejects).\n\n```\nfunction save(item) {\n $items = [...$items, item]\n $save = $http({ url: "https://api.example.com/save", method: "POST", body: { item } })\n $emit("saved", { id: item.id })\n}\nfunction addTodo(text) {\n $optimistic(() => {\n $todos = [...$todos, { id: $todos.length + 1, text }] // optimistic write\n if (text == "") throw new Error("empty") // → rolls $todos back\n })\n}\nsaveBtn = Button("Save", { onClick: save })\nresetBtn = Button("Reset", { onClick: () => { $count = 0; $message = "" } })\n```\n\n### `$emit("name", { detail })`\nFrom any action / effect / lambda, `$emit` dispatches a `CustomEvent` on the host `<aktion-app>` (listen with `el.addEventListener`). Reserved names: `assistant-message`, `error`, `route-change`.';
|
|
15768
15786
|
}
|
|
15769
|
-
function
|
|
15787
|
+
function Of() {
|
|
15770
15788
|
return '## Effects — Declarative side effects\n\n`$effect(() => { ... }, [...deps])` runs side effects. Dep entries: `$atom` (re-run on change), `"mount"` / `"unmount"` (once), `"every(N)"` (every N ms), `"debounce(N)"` / `"throttle(N)"` (trailing-edge rate limit). No second argument ≡ `["mount"]`.\n\nTop-level effects mount on parse and tear down on the next response; effects inside a component mount per-instance and tear down — running their `cleanup(fn)` — when the instance leaves the tree.\n\n```\n$effect(() => {\n $results = $http({ url: "https://api.example.com/search", query: { q: $term } })\n}, [$term, "debounce(250)"])\n\n$effect(() => {\n const onKey = e => { if (e.key == "/") $palette = true }\n document.addEventListener("keydown", onKey)\n cleanup(() => document.removeEventListener("keydown", onKey))\n}, ["mount"])\n```';
|
|
15771
15789
|
}
|
|
15772
|
-
function
|
|
15790
|
+
function _f() {
|
|
15773
15791
|
return '## Data — `$http({...})`\n\n`$http({ ... })` is the only HTTP primitive. Each call is self-contained: pass an absolute `url`, optional `method` (default `GET`), `query` (serialised into the URL), `headers`, `body` (JSON-encoded automatically), and any `fetch` option. No host-wide defaults.\n\n```\n$orders = $http({ url: `https://api.example.com/users/${$userId}/orders`, query: { limit: 5 } })\n```\n\nIt fires once when the binding mounts and exposes a reactive bag:\n```\n$orders.data $orders.error $orders.status $orders.loading\n$orders.headers $orders.lastUpdated\n$orders.refetch() $orders.cancel() $orders.onDone = fn\n```\n\nRe-run with `.refetch()`, or wrap the call in `$effect(..., [$dep])` to re-issue when a dep changes. After a write, refresh a list from the write\'s `onDone` (fires on every settle — the initial load and each refetch):\n\n```\nfunction saveOrder(payload) {\n $save = $http({ url: "https://api.example.com/orders", method: "POST", body: payload })\n $save.onDone = () => $orders.refetch()\n}\n```\n\nBranch on resource state with `Async`:\n```\nview = Async($orders, {\n loading: LoadingState("Loading orders…"),\n error: ErrorState("Couldn\'t fetch orders"),\n empty: EmptyState("No orders yet"),\n data: Table([Col("Item", $orders.data.title), Col("Total", $orders.data.total, { format: "currency" })])\n})\n```\n\n### `$query({...})` and `$mutation({...})`\nSame config shape as `$http`, for two common needs:\n- `$query({ url, key?, ttl? })` — a **cached, deduplicated** read. Identical queries (same `key`, or same method+url+query+body) share one in-flight request and one cached bag, so calling it from several components fetches once. Pass `ttl` (ms) to auto-refetch stale data. Same bag as `$http` (`.data`/`.loading`/`.error`/`.refetch()`).\n- `$mutation({ url, method? })` — a **deferred** write that fires only when you call `.mutate(overrides?)`, not on render (method defaults to `POST`). Assign it to an atom, then trigger it from a handler:\n```\n$save = $mutation({ url: "https://api.example.com/orders" })\n$save.onDone = () => $orders.refetch()\n...\nButton("Save", { onClick: () => $save.mutate({ body: { item: $item } }) })\n```\n`.mutate()` resolves with the response body; the bag exposes `.loading`/`.error`/`.data` plus `.reset()`.';
|
|
15774
15792
|
}
|
|
15775
|
-
function
|
|
15793
|
+
function Ff() {
|
|
15776
15794
|
return '## Routing\n\n`$router({ ... })` is a plain function call — assign it and drop the result into your page shell.\n\n```\npages = $router({\n "/": Dashboard(),\n "/orders/:id": OrderDetail({ id: params.id }),\n "/docs/*": Docs({ rest: params._ }),\n default: NotFound()\n})\n$app(AppShell(MainSidebar(), pages)) // app/dashboard shell\n```\n\n- **Pick the shell for the surface.** `AppShell(Sidebar(...), pages)` for an app/dashboard (left sidebar + optional topbar); a top `Navbar(...)` above the pages inside a `Column` for a website / marketing / docs layout (no sidebar) — never wrap a website in `AppShell`. The router result is just a node, so it drops into either.\n- Patterns: literal, `:param` (read `params.id`), trailing `*` (read `params._`), and `default:` for the catch-all (unknown paths render `null` without it).\n- The read-only `route` handle: `route.path`, `route.params.x`, `route.query.tab`; navigate with `route.navigate("/path")` from an action/effect.\n- `NavLink(label, { to, exact?, icon? })` and `SidebarItem(label, { to, icon?, badge? })` derive active state from `route.path`. Never declare `route` yourself.';
|
|
15777
15795
|
}
|
|
15778
|
-
function
|
|
15796
|
+
function Uf() {
|
|
15779
15797
|
return '## Built-in globals — `storage`, `console` & `$toast`\n\nAlways in scope, lowercase, no imports.\n\n```\n$storage.set("name", "John"); $name = $storage.get("name"); $storage.remove("name")\n$storage.session.set("draft", $draft)\n$storage.cookies.set("user", "John", { expires: 7, path: "/" })\n$console.log("Hello", $user)\n```\n\nNon-string values JSON-roundtrip; missing keys return `null`. Beyond these, every JavaScript global resolves by name — `Math`, `JSON`, `Date`, `crypto`, `fetch`, `URL`, `navigator`, `window`, `document`, dialogs like `confirm`, … — and your declarations and components shadow same-named globals. Prefer reactive `$http({...})` over raw `fetch` for UI data, and keep timers/listeners inside `$effect` so they\'re cleaned up.\n\n```\nfunction copyLink() { navigator.clipboard.writeText(window.location.href); $toast.show("Copied", { tone: "success" }) }\nid = crypto.randomUUID()\n```\n\n### `$toast` — imperative notifications\nInstead of hand-managing a `$toasts = [...]` array, use the reserved `$toast` namespace. `$toast.show(message, { tone?, title?, duration? })` appends a toast (auto-dismisses after `duration` ms, default 4000; pass `0` to keep it). Shortcuts: `$toast.success/.error/.info/.warning`. Remove with `$toast.dismiss(id)` / `$toast.clear()`. Render the reactive `$toast.items` list:\n\n```\nfunction save() { $save = $http({ url, method: "POST", body }); $save.onDone = () => $toast.success("Saved") }\ntoaster = Toasts(map($toast.items, t => Toast({ title: t.title, message: t.message, tone: t.tone, onClose: () => $toast.dismiss(t.id) })))\n```';
|
|
15780
15798
|
}
|
|
15781
|
-
function
|
|
15799
|
+
function Hf() {
|
|
15782
15800
|
return '## Behaviour wrappers\n\nThese attach behaviour or styling to ANY node via `display: contents` (the visual tree is unchanged):\n- `OnClick(child, { onClick, disabled?, stopPropagation? })` — pointer + keyboard activatable. (Don\'t wrap `Button` — it already has `onClick`; use this for clickable cards / list rows.)\n- `OnMouse(child, { enter?, leave?, move?, down?, up?, drag?, drop?, dragOver?, ... })` — pass only the events you need.\n- `OnKeyboard(child, { onKeyDown?, onKeyUp?, focusable? })` and `OnFocus(child, { onFocus?, onBlur? })`.\n- `OnIntersect(child, { onEnter?, onLeave?, threshold?, once? })` — IntersectionObserver (lazy-load, infinite scroll).\n- `OnMount(child, { onMount?, onUnmount? })` — DOM-ref / lifecycle. `onMount(node)` fires once after attach (grab a node, focus it, hand it to a chart/map/editor); `onUnmount(node)` on teardown. Stash the node in a `$ref(...)`.\n- `Css(child, { class?, style? })` — last-resort class/style merge.\n- `Link(childOrLabel, { to?, href?, external?, variant? })` — anchor; `to` for router nav, `href`+`external: true` for outbound links.\n\n```\nOnClick(Card([Text("View order")]), { onClick: () => route.navigate("/orders/4821") })\nOnIntersect(Skeleton({ variant: "card" }), { onEnter: $items.refetch, once: true })\n```';
|
|
15783
15801
|
}
|
|
15784
|
-
function
|
|
15802
|
+
function Vf() {
|
|
15785
15803
|
return '## Escape hatches — `HTMLTag` & `Styles`\n\nOnly when the catalogue can\'t express the markup/styling you need:\n- `HTMLTag(tag, { attributes?, children? })` — an allow-listed HTML tag (`on*` attributes, `javascript:` URLs, and unsafe `style` are stripped; unknown tags become `div`).\n- `Styles(css)` — inject a `<style>` block (`</style>`, `<script>`, `@import`, `javascript:` are dropped).\n\n```\n$app(Column([\n Styles(`.hero { background: linear-gradient(135deg, #6366f1, #10b981); padding: 24px; border-radius: 12px; }`),\n HTMLTag("div", { attributes: { class: "hero" }, children: [Text("Custom block")] })\n]))\n```';
|
|
15786
15804
|
}
|
|
15787
|
-
function
|
|
15805
|
+
function Wf() {
|
|
15788
15806
|
return '## Theming, i18n & icons\n\n### `$theme({ ... })`\nA bare `$theme({...})` statement (near the top) brands the response. Structured groups: `colors`, `radius`, `font` (plus metadata `name`, `direction`). Omit it to inherit the host theme.\n\n```\n$theme({\n colors: { primary: "#635bff", bg: "#0a0a23", surface: "#10103a", text: "#fff" },\n radius: { md: "0.5rem", button: "999px" },\n font: { family: "Inter, sans-serif", familyHeading: "Inter, sans-serif" }\n})\n```\n\nThe host picks one of seven base themes (`light`, `dark`, `neon`, `pastel`, `glass`, `brutalist`, `skyline`) — author theme-neutral UI (use `tone:` / `variant:`, not hard-coded colours).\n\n### i18n\n```\nconst { t, setCurrentLanguage } = $i18n({\n defaultLanguage: "en", currentLanguage: $lang,\n translations: { greeting: { en: "Hello, {name}!", fr: "Bonjour, {name}!" } }\n})\nwelcome = Text(t("greeting", { name: $user.name }))\n```\n`t(key, vars?)` resolves `translations[key][currentLanguage]`, falling back to the default language then the bare key; `{name}` placeholders interpolate. Drive `currentLanguage` from a reactive atom for live switching.\n\n### Icons\nIcon props take a Font Awesome name (no `fa-` prefix, never an emoji): `"house"`, `"chart-line"`, `"regular:star"`, `"brands:github"`. `Icon(name, { variant?, size? })` renders a standalone glyph.';
|
|
15789
15807
|
}
|
|
15790
|
-
function
|
|
15808
|
+
function qf() {
|
|
15791
15809
|
return '## `$util` — runtime helper namespace\n\nPure helpers (no side effects), available in every expression, action, effect, and lambda. Reach for `$util` when plain JS would be verbose (formatting, dates, grouping); use plain JS when it\'s just as clear (`arr.length`, `arr.slice(0, 5)`).\n\n- **Collections**: `$util.sort(arr, field, dir?)`, `$util.groupBy(arr, field)`, `$util.unique(arr, field?)`, `$util.sum / .avg / .min / .max / .count`, `.first / .last`, `.filter(arr, field, op, value)`, `.find`, `.partition(arr, field, op, value)`, `.keyBy(arr, field)`, `.chunk(arr, size)`, `.flatten(arr, depth?)`, `.zip(...arrays)`, `.range(start, end, step?)`.\n- **Objects**: `$util.pick(obj, keys)`, `.omit(obj, keys)`, `.merge(target, ...sources)` (deep), `.cloneDeep(value)`.\n- **Strings**: `$util.capitalize / .titlecase / .uppercase / .lowercase`, `.plural(n, singular, plural)`, `.trim / .replace / .split / .match`.\n- **Formatting**: `$util.format(value, mode, opts?)` (number, currency, percent, compact) and `$util.formatDate(value, mode)` (`"short" | "long" | "time" | "relative"` or a token string).\n- **Dates / math**: `.now / .today / .addDays / .diffDays / .startOfWeek`; `.round / .floor / .ceil / .abs / .clamp(v, min, max) / .random`.\n\n```\nsorted = $util.sort($users.filter(u => u.team === $team), "joinedAt", "desc")\nsummary = `${rows.length} ${$util.plural(rows.length, "order", "orders")} · ${$util.format($util.sum(rows.amount), "currency")}`\n```';
|
|
15792
15810
|
}
|
|
15793
|
-
function
|
|
15811
|
+
function Kf() {
|
|
15794
15812
|
return "## Standard helper components\n\n| Component | Purpose |\n|---|---|\n| `Async(resource, { loading, error, empty, data })` | Branch on an `$http({...})` resource state. |\n| `Show(when, { fallback?, children })` | Sugar for `when ? children : fallback`. |\n| `Portal(children, { target? })` | Render outside the parent subtree. |\n| `Redirect(path)` | Navigate and unmount the rest of the subtree. |\n| `Lazy(loader, { fallback?, children })` | Defer rendering until the async `loader` resolves; show `fallback` while pending. |\n| `ErrorBoundary(children, { fallback?, onError? })` | Catch render errors thrown by descendants. |\n| `VirtualList(items, { key, render })` | Virtualised list — preferred for >100 rows. |";
|
|
15795
15813
|
}
|
|
15796
|
-
function
|
|
15814
|
+
function Gf(t) {
|
|
15797
15815
|
const e = t.componentGroups ?? [{ name: "Components", components: t.components.map((o) => o.name) }], r = new Map(t.components.map((o) => [o.name, o])), a = [];
|
|
15798
15816
|
a.push("## Component library"), a.push("Use only these components. Each signature lists props in declaration order; optional props end with `?`. The prop tagged `(positional)` is the canonical positional slot — pass it bare; every other prop goes in a trailing `{ prop: value }` object."), a.push("");
|
|
15799
15817
|
for (const o of e) {
|
|
15800
15818
|
a.push(`### ${o.name}`);
|
|
15801
15819
|
for (const s of o.components) {
|
|
15802
15820
|
const c = r.get(s);
|
|
15803
|
-
c && a.push(
|
|
15821
|
+
c && a.push(Dt(c));
|
|
15804
15822
|
}
|
|
15805
15823
|
a.push("");
|
|
15806
15824
|
}
|
|
15807
15825
|
const n = new Set(e.flatMap((o) => o.components)), i = t.components.filter((o) => !n.has(o.name));
|
|
15808
15826
|
if (i.length > 0) {
|
|
15809
15827
|
a.push("### Other");
|
|
15810
|
-
for (const o of i) a.push(
|
|
15828
|
+
for (const o of i) a.push(Dt(o));
|
|
15811
15829
|
}
|
|
15812
15830
|
return a.join(`
|
|
15813
15831
|
`).trim();
|
|
15814
15832
|
}
|
|
15815
|
-
function
|
|
15833
|
+
function Yf() {
|
|
15816
15834
|
return "## Inline mode\n\nYou may answer questions in plain text. When you do, wrap any UI you produce in a fenced ```aktion``` block. Otherwise output Aktion directly with no surrounding prose.";
|
|
15817
15835
|
}
|
|
15818
|
-
function
|
|
15836
|
+
function Xf() {
|
|
15819
15837
|
return "## Edit mode\n\nWhen the user asks for an incremental change to a prior response, output ONLY the statements that need to change (additions, replacements, removals). Do NOT re-emit the whole UI. To remove a statement, write `name = null`.";
|
|
15820
15838
|
}
|
|
15821
|
-
function
|
|
15839
|
+
function Jf() {
|
|
15822
15840
|
return '## Streaming & verification\n\n### Hoisting & streaming (CRITICAL)\nReferences resolve across the whole top-level scope, not source order — undefined refs render empty until they arrive, giving a smooth top-down reveal. Emit in this order: (1) `$app(...)` first; (2) `function` declarations and `$effect(...)`; (3) leaf data (arrays, objects, strings) last. Give each `Col` / `TabItem` / `Series` its own named binding so it streams independently. Never split a statement across lines unless it sits inside an unmatched `[`, `(`, or `{`.\n\n### Before finishing, check\n1. `$app(...)` is first; every name it reaches is defined below, and every defined name is reachable from it.\n2. Every component reference is invoked with `()` — scan the root, array elements, and prop values for bare identifiers (callback props like `render: UserCard` are the one exception).\n3. State uses `$name = ...`; writes happen only in handlers/effects, never in render position.\n4. `$http({...})` uses an absolute URL and exposes `.data` / `.error` / `.loading` / `.refetch()`; `$router({...})` arms use `:` and `default`; effects are `$effect(() => {...}, [deps])`.\n5. Build a complete surface — `PageHeader`, multi-section layout, wired buttons, 5–20 rows of realistic seed data — not a lone Card. Lay out with `Column` / `Row` / `Grid`; use responsive maps (`{ base: 1, md: 2 }`) where they help.\n6. Tables are column-oriented (`Table([Col("Label", arr)])`, cells may be components via `rows.map(r => Badge(r.status))`); charts take numeric arrays (`PieChart(rows.label, rows.value)`); icons are Font Awesome names; `storage` / `console` are lowercase; `route` is reserved.';
|
|
15823
15841
|
}
|
|
15824
|
-
function
|
|
15842
|
+
function Zf() {
|
|
15825
15843
|
return [
|
|
15826
15844
|
`// Tasks dashboard — $http, Async, an action, multi-section layout
|
|
15827
15845
|
$tasks = $http({ url: "https://api.example.com/tasks" })
|
|
@@ -15848,7 +15866,7 @@ $app(Column([
|
|
|
15848
15866
|
], { gap: "l" }))`
|
|
15849
15867
|
];
|
|
15850
15868
|
}
|
|
15851
|
-
const
|
|
15869
|
+
const Qf = [
|
|
15852
15870
|
// Layout
|
|
15853
15871
|
"Column",
|
|
15854
15872
|
"Row",
|
|
@@ -15943,40 +15961,40 @@ const Zf = [
|
|
|
15943
15961
|
"FollowUpBlock",
|
|
15944
15962
|
"FollowUpItem"
|
|
15945
15963
|
];
|
|
15946
|
-
function
|
|
15964
|
+
function eg(t) {
|
|
15947
15965
|
return `${t?.trim() || "You respond in Aktion — a declarative language that is a strict subset of JavaScript. The host renders your reply as a rich, read-only UI. Output ONLY Aktion: no markdown, prose, or JSON."}
|
|
15948
15966
|
|
|
15949
15967
|
Register the UI root with \`$app(...)\` on the first line (typically \`$app(Column([...]))\`). This is read-only display mode — use only the layout, content, data, chart, and feedback components listed below. Do NOT emit state writes, actions, effects, HTTP, routing, form controls, or clickable buttons. The single exception is \`FollowUpBlock\`, which the host renders as suggested follow-up prompts.`;
|
|
15950
15968
|
}
|
|
15951
|
-
function
|
|
15969
|
+
function tg() {
|
|
15952
15970
|
return '## Syntax (read-only subset)\n\nA program is a flat list of `name = expression` statements in standard JavaScript. `$app(...)` registers the entry point (always first); every other binding hoists, so order is free — emit `$app(...)`, then containers, then leaf data last for a smooth streaming reveal.\n\n- Strings, numbers, booleans, `null`, arrays, objects; template literals `Found ${rows.length}` over `+` concatenation.\n- Operators `+ - * / %`, comparisons, `&& || !`, ternary `cond ? a : b`, nullish `a ?? b`, spread, member `obj.field`, optional chaining `obj?.field`.\n\n### Component calls\n- **Case doesn\'t matter** — `Card` and `card` are equivalent.\n- **Always invoke with parentheses** — `Column([Header(), Body()])`, never `Column([Header, Body])`; write `Hero()` even with no args.\n- **One positional arg, the rest in a trailing object** — `Callout("info", { title: "Heads up", icon: "circle-info" })`, `Badge("Live", { tone: "success" })`.\n\n### Build UI from data — JS is fully supported\n`.map` / `.filter` arrays into nodes (`rows.map(r => ListItem(r.title))`), ternaries for branching, and the array-pluck shortcut `rows.title` → `[each row.title]` to feed columns (`Col("Title", rows.title)`) and chart series (`PieChart(rows.label, rows.value)`). `if` / `for` are statements — not usable on the right of `=`.\n\n```\n$app(Column([title, table, follow]))\ntitle = Text("Q4 results", { variant: "large-heavy" })\ntable = Table([Col("Region", rows.region), Col("Revenue", rows.revenue, { format: "currency" })])\nfollow = FollowUpBlock(["Break down by region", "Compare to Q3"])\nrows = [{ region: "NA", revenue: 184000 }, { region: "EU", revenue: 122000 }]\n```';
|
|
15953
15971
|
}
|
|
15954
|
-
function
|
|
15972
|
+
function rg(t) {
|
|
15955
15973
|
const e = t.componentGroups ?? [{ name: "Components", components: t.components.map((n) => n.name) }], r = new Map(t.components.map((n) => [n.name, n])), a = [
|
|
15956
15974
|
"## Component library (read-only)",
|
|
15957
15975
|
"Use only these components. Each signature lists props in declaration order; optional props end with `?`. Pass the positional prop bare, then all other props in a trailing `{ prop: value }` object."
|
|
15958
15976
|
];
|
|
15959
15977
|
for (const n of e) {
|
|
15960
|
-
const i = n.components.filter((o) =>
|
|
15978
|
+
const i = n.components.filter((o) => Qf.includes(o));
|
|
15961
15979
|
if (i.length !== 0) {
|
|
15962
15980
|
a.push(`
|
|
15963
15981
|
### ${n.name}`);
|
|
15964
15982
|
for (const o of i) {
|
|
15965
15983
|
const s = r.get(o);
|
|
15966
|
-
s && a.push(
|
|
15984
|
+
s && a.push(Dt(s));
|
|
15967
15985
|
}
|
|
15968
15986
|
}
|
|
15969
15987
|
}
|
|
15970
15988
|
return a.join(`
|
|
15971
15989
|
`);
|
|
15972
15990
|
}
|
|
15973
|
-
function
|
|
15991
|
+
function ag() {
|
|
15974
15992
|
return '## `$util` — runtime helper namespace\n\nPure helpers — no side effects. Use `$util` anywhere in expressions for data shaping, formatting, math, and strings. Prefer plain JavaScript where it is just as clear (`arr.length`, `arr.slice(0, 5)`, `s.toUpperCase()`).\n\n### Most useful helpers\n- Collections: `$util.sum / .avg / .min / .max / .sort(arr, field, dir?) / .groupBy(arr, field) / .unique(arr, field?) / .chunk / .partition / .keyBy`.\n- Objects: `$util.pick / .omit / .merge / .cloneDeep`.\n- Strings: `$util.capitalize / .titlecase / .plural(n, singular, plural)`.\n- Formatting: `$util.format(value, mode, opts?)` (numbers, currency, percent, compact) and `$util.formatDate(value, mode)` (`"short"` | `"long"` | `"time"` | `"relative"`).\n\nIcons are Font Awesome names — `"house"`, `"chart-line"`, `"regular:star"`, `"brands:github"`. Never use `fa-` prefixes or emoji characters.';
|
|
15975
15993
|
}
|
|
15976
|
-
function
|
|
15994
|
+
function ng() {
|
|
15977
15995
|
return "## Hoisting & streaming (CRITICAL)\n\nReferences resolve from the whole scope, not source order — undefined refs render empty until they arrive, producing a smooth top-down reveal. Order: (1) `$app(...)` first; (2) container statements; (3) leaf data (arrays, objects, strings) last. Give each `Col` / `TabItem` / `Series` / `FollowUpItem` its own binding so it streams independently. Never split a statement across lines unless it sits inside an unmatched `[`, `(`, or `{`.";
|
|
15978
15996
|
}
|
|
15979
|
-
function
|
|
15997
|
+
function ig(t) {
|
|
15980
15998
|
const e = [
|
|
15981
15999
|
"## Available data sources (context only)",
|
|
15982
16000
|
"These endpoints are available to the host. You cannot call them from read-only mode, but you may incorporate the data they describe when composing the UI:"
|
|
@@ -15986,7 +16004,7 @@ function ng(t) {
|
|
|
15986
16004
|
return e.join(`
|
|
15987
16005
|
`);
|
|
15988
16006
|
}
|
|
15989
|
-
function
|
|
16007
|
+
function og() {
|
|
15990
16008
|
return [
|
|
15991
16009
|
`// Comparison table with a template-literal summary and follow-ups
|
|
15992
16010
|
$app(Column([title, tbl, totals, follow]))
|
|
@@ -16006,20 +16024,20 @@ langs = [
|
|
|
16006
16024
|
]`
|
|
16007
16025
|
];
|
|
16008
16026
|
}
|
|
16009
|
-
function
|
|
16027
|
+
function sg() {
|
|
16010
16028
|
return "## Important rules\n\n- **Match the component to the content** — tables for comparisons, charts for trends, `Callout`/`Banner` for highlights, `Markdown` for paragraph prose, `Text` for short labels, `Hero`/`PageHeader` for titles, `Stats` for KPI strips.\n- **Lead with a clear title**, and use **realistic data** — believable names, numbers, dates; never Lorem Ipsum.\n- **Template literals** for any string mixing copy with values.\n- **End conversational replies with `FollowUpBlock([...])`** — 2–4 short next-prompt suggestions.\n- **Compose freely** — vary the structure and component mix to fit each request rather than reaching for the same template every time.";
|
|
16011
16029
|
}
|
|
16012
|
-
function
|
|
16030
|
+
function lg() {
|
|
16013
16031
|
return '## Final verification\n\n1. `$app(...)` is first; every referenced name is defined below and reachable from the root.\n2. Every component is invoked with `()` — `Hero()`, never bare `Hero`.\n3. Only the read-only display components above — no forms, clickable buttons, state writes, actions, effects, HTTP, or routing.\n4. Tables are column-oriented (`Table([Col("Label", arr)])`, cells may be components via `rows.map(r => Badge(r.status))`); charts take numeric arrays (array-pluck `rows.value`).\n5. One positional arg per call, everything else in a trailing `{ }` object; no statement split across lines outside an unmatched bracket.';
|
|
16014
16032
|
}
|
|
16015
|
-
function
|
|
16016
|
-
const e =
|
|
16033
|
+
function Dt(t) {
|
|
16034
|
+
const e = fn(t), r = t.props.map((a) => {
|
|
16017
16035
|
const n = a.enum ? a.enum.map((o) => `"${o}"`).join("|") : a.type, i = a === e && a.positional === !0 ? " (positional)" : "";
|
|
16018
16036
|
return `${a.name}${a.optional ? "?" : ""}: ${n}${i}`;
|
|
16019
16037
|
}).join(", ");
|
|
16020
16038
|
return `- ${t.name}(${r}) — ${t.description}`;
|
|
16021
16039
|
}
|
|
16022
|
-
function
|
|
16040
|
+
function Sr(t, e) {
|
|
16023
16041
|
const r = [`## ${t}`];
|
|
16024
16042
|
for (const a of e)
|
|
16025
16043
|
r.push("```"), r.push(a.trim()), r.push("```");
|
|
@@ -16032,7 +16050,7 @@ function pi(t) {
|
|
|
16032
16050
|
return e.join(`
|
|
16033
16051
|
`);
|
|
16034
16052
|
}
|
|
16035
|
-
function
|
|
16053
|
+
function cg(t) {
|
|
16036
16054
|
const e = [
|
|
16037
16055
|
"## Available endpoints",
|
|
16038
16056
|
"These endpoints are provided by the host. Fire requests with `$http({ url, method, body, headers, ... })` and observe the reactive bag (`.data`, `.error`, `.loading`, `.status`, `.refetch()`)."
|
|
@@ -16045,11 +16063,11 @@ ${n}`);
|
|
|
16045
16063
|
return e.join(`
|
|
16046
16064
|
`);
|
|
16047
16065
|
}
|
|
16048
|
-
const
|
|
16066
|
+
const ug = {
|
|
16049
16067
|
fontFamily: "system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
16050
16068
|
fontFamilyHeading: "system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
16051
16069
|
fontFamilyMono: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace"
|
|
16052
|
-
},
|
|
16070
|
+
}, dg = {
|
|
16053
16071
|
fontSizeBase: "14px",
|
|
16054
16072
|
fontSizeSm: "12px",
|
|
16055
16073
|
fontSizeLg: "16px",
|
|
@@ -16061,13 +16079,13 @@ const cg = {
|
|
|
16061
16079
|
lineHeightHeading: "1.2",
|
|
16062
16080
|
letterSpacingHeading: "0",
|
|
16063
16081
|
headingTextTransform: "none"
|
|
16064
|
-
},
|
|
16082
|
+
}, pg = {
|
|
16065
16083
|
spacingXs: "4px",
|
|
16066
16084
|
spacingS: "8px",
|
|
16067
16085
|
spacingM: "12px",
|
|
16068
16086
|
spacingL: "20px",
|
|
16069
16087
|
spacingXl: "32px"
|
|
16070
|
-
},
|
|
16088
|
+
}, mg = {
|
|
16071
16089
|
radiusXs: "4px",
|
|
16072
16090
|
radiusSm: "6px",
|
|
16073
16091
|
radiusMd: "10px",
|
|
@@ -16075,13 +16093,13 @@ const cg = {
|
|
|
16075
16093
|
radiusPill: "999px",
|
|
16076
16094
|
radiusButton: "6px",
|
|
16077
16095
|
radiusInput: "6px"
|
|
16078
|
-
},
|
|
16096
|
+
}, fg = {
|
|
16079
16097
|
buttonFontWeight: "600",
|
|
16080
16098
|
buttonTextTransform: "none",
|
|
16081
16099
|
buttonLetterSpacing: "0",
|
|
16082
16100
|
buttonPaddingY: "8px",
|
|
16083
16101
|
buttonPaddingX: "14px"
|
|
16084
|
-
},
|
|
16102
|
+
}, gg = {
|
|
16085
16103
|
transitionDuration: "120ms"
|
|
16086
16104
|
}, we = {
|
|
16087
16105
|
colorBg: "#ffffff",
|
|
@@ -16113,13 +16131,13 @@ const cg = {
|
|
|
16113
16131
|
chart4: "#ef4444",
|
|
16114
16132
|
chart5: "#06b6d4",
|
|
16115
16133
|
chart6: "#8b5cf6",
|
|
16116
|
-
...cg,
|
|
16117
16134
|
...ug,
|
|
16118
16135
|
...dg,
|
|
16119
16136
|
...pg,
|
|
16120
16137
|
...mg,
|
|
16121
|
-
...fg
|
|
16122
|
-
|
|
16138
|
+
...fg,
|
|
16139
|
+
...gg
|
|
16140
|
+
}, hg = {
|
|
16123
16141
|
...we,
|
|
16124
16142
|
colorBg: "#0b1220",
|
|
16125
16143
|
colorBgSubtle: "#0f172a",
|
|
@@ -16139,7 +16157,7 @@ const cg = {
|
|
|
16139
16157
|
shadowSm: "0 1px 2px rgba(0, 0, 0, 0.4)",
|
|
16140
16158
|
shadowMd: "0 8px 24px rgba(0, 0, 0, 0.4)",
|
|
16141
16159
|
shadowLg: "0 22px 60px rgba(0, 0, 0, 0.55)"
|
|
16142
|
-
},
|
|
16160
|
+
}, bg = {
|
|
16143
16161
|
...we,
|
|
16144
16162
|
colorBg: "#05060f",
|
|
16145
16163
|
colorBgSubtle: "#0a0c1c",
|
|
@@ -16184,7 +16202,7 @@ const cg = {
|
|
|
16184
16202
|
chart4: "#a78bfa",
|
|
16185
16203
|
chart5: "#34d399",
|
|
16186
16204
|
chart6: "#f472b6"
|
|
16187
|
-
},
|
|
16205
|
+
}, vg = {
|
|
16188
16206
|
...we,
|
|
16189
16207
|
colorBg: "#fdf6ff",
|
|
16190
16208
|
colorBgSubtle: "#fbf2ff",
|
|
@@ -16228,7 +16246,7 @@ const cg = {
|
|
|
16228
16246
|
chart4: "#fda4af",
|
|
16229
16247
|
chart5: "#93c5fd",
|
|
16230
16248
|
chart6: "#f9a8d4"
|
|
16231
|
-
},
|
|
16249
|
+
}, yg = {
|
|
16232
16250
|
...we,
|
|
16233
16251
|
colorBg: "#0f1730",
|
|
16234
16252
|
colorBgSubtle: "#13204a",
|
|
@@ -16272,7 +16290,7 @@ const cg = {
|
|
|
16272
16290
|
chart4: "#f472b6",
|
|
16273
16291
|
chart5: "#34d399",
|
|
16274
16292
|
chart6: "#fbbf24"
|
|
16275
|
-
},
|
|
16293
|
+
}, xg = {
|
|
16276
16294
|
...we,
|
|
16277
16295
|
colorBg: "#fef9c3",
|
|
16278
16296
|
colorBgSubtle: "#fde68a",
|
|
@@ -16324,7 +16342,7 @@ const cg = {
|
|
|
16324
16342
|
chart4: "#ea580c",
|
|
16325
16343
|
chart5: "#7c3aed",
|
|
16326
16344
|
chart6: "#0a0a0a"
|
|
16327
|
-
},
|
|
16345
|
+
}, wg = {
|
|
16328
16346
|
...we,
|
|
16329
16347
|
colorBg: "#eff2f7",
|
|
16330
16348
|
colorBgSubtle: "#e6ecf3",
|
|
@@ -16370,13 +16388,13 @@ const cg = {
|
|
|
16370
16388
|
chart6: "#5a6a85"
|
|
16371
16389
|
}, mi = {
|
|
16372
16390
|
light: we,
|
|
16373
|
-
dark:
|
|
16374
|
-
neon:
|
|
16375
|
-
pastel:
|
|
16376
|
-
glass:
|
|
16377
|
-
brutalist:
|
|
16378
|
-
skyline:
|
|
16379
|
-
},
|
|
16391
|
+
dark: hg,
|
|
16392
|
+
neon: bg,
|
|
16393
|
+
pastel: vg,
|
|
16394
|
+
glass: yg,
|
|
16395
|
+
brutalist: xg,
|
|
16396
|
+
skyline: wg
|
|
16397
|
+
}, Kt = {
|
|
16380
16398
|
colorBg: "--rui-color-bg",
|
|
16381
16399
|
colorBgSubtle: "--rui-color-bg-subtle",
|
|
16382
16400
|
colorSurface: "--rui-color-surface",
|
|
@@ -16439,55 +16457,55 @@ const cg = {
|
|
|
16439
16457
|
chart5: "--rui-chart-5",
|
|
16440
16458
|
chart6: "--rui-chart-6"
|
|
16441
16459
|
};
|
|
16442
|
-
function
|
|
16460
|
+
function Ka(t) {
|
|
16443
16461
|
if (!t) return { name: "light", tokens: we };
|
|
16444
16462
|
if (typeof t == "string") {
|
|
16445
16463
|
const e = t.trim().toLowerCase();
|
|
16446
16464
|
if (e.startsWith("{"))
|
|
16447
16465
|
try {
|
|
16448
|
-
return { name: "custom", tokens:
|
|
16466
|
+
return { name: "custom", tokens: Ya(JSON.parse(t)) };
|
|
16449
16467
|
} catch {
|
|
16450
16468
|
return { name: "light", tokens: we };
|
|
16451
16469
|
}
|
|
16452
16470
|
const r = mi[e];
|
|
16453
16471
|
return r ? { name: e, tokens: r } : { name: "light", tokens: we };
|
|
16454
16472
|
}
|
|
16455
|
-
return { name: "custom", tokens:
|
|
16473
|
+
return { name: "custom", tokens: Ya(t) };
|
|
16456
16474
|
}
|
|
16457
|
-
function
|
|
16475
|
+
function Ga(t, e) {
|
|
16458
16476
|
const r = "tokens" in e ? e : { name: "custom", tokens: e };
|
|
16459
|
-
for (const [a, n] of Object.entries(
|
|
16477
|
+
for (const [a, n] of Object.entries(Kt))
|
|
16460
16478
|
t.style.setProperty(n, r.tokens[a]);
|
|
16461
16479
|
t.setAttribute("data-rui-theme", r.name);
|
|
16462
16480
|
}
|
|
16463
|
-
function
|
|
16481
|
+
function kg(t, e) {
|
|
16464
16482
|
const r = [];
|
|
16465
16483
|
for (const a of Object.keys(e)) {
|
|
16466
|
-
const n =
|
|
16484
|
+
const n = Kt[a];
|
|
16467
16485
|
if (!n) continue;
|
|
16468
16486
|
const i = e[a];
|
|
16469
16487
|
typeof i != "string" || i === "" || (t.style.setProperty(n, i), r.push(a));
|
|
16470
16488
|
}
|
|
16471
16489
|
return r;
|
|
16472
16490
|
}
|
|
16473
|
-
function
|
|
16491
|
+
function Sg(t, e) {
|
|
16474
16492
|
for (const r of e) {
|
|
16475
|
-
const a =
|
|
16493
|
+
const a = Kt[r];
|
|
16476
16494
|
a && t.style.removeProperty(a);
|
|
16477
16495
|
}
|
|
16478
16496
|
}
|
|
16479
|
-
function
|
|
16497
|
+
function $g(t) {
|
|
16480
16498
|
if (!t || typeof t != "object" || Array.isArray(t)) return {};
|
|
16481
16499
|
const e = {};
|
|
16482
16500
|
for (const [r, a] of Object.entries(t))
|
|
16483
|
-
if (r in
|
|
16501
|
+
if (r in Kt && a != null)
|
|
16484
16502
|
if (typeof a == "string") {
|
|
16485
16503
|
if (a.trim() === "") continue;
|
|
16486
16504
|
e[r] = a;
|
|
16487
16505
|
} else typeof a == "number" && (e[r] = String(a));
|
|
16488
16506
|
return e;
|
|
16489
16507
|
}
|
|
16490
|
-
function
|
|
16508
|
+
function Ya(t) {
|
|
16491
16509
|
return { ...we, ...t };
|
|
16492
16510
|
}
|
|
16493
16511
|
const fi = `
|
|
@@ -24371,8 +24389,8 @@ th[data-active="true"] .rui-data-grid-sort-icon { opacity: 1; }
|
|
|
24371
24389
|
}
|
|
24372
24390
|
.rui-lightbox-thumb img { display: block; width: 100%; height: auto; }
|
|
24373
24391
|
.rui-lightbox-thumb:hover { border-color: var(--rui-color-primary); }
|
|
24374
|
-
`,
|
|
24375
|
-
function
|
|
24392
|
+
`, dr = "theme", st = "streaming", pr = "response", Ye = "showerrors", Xa = "route";
|
|
24393
|
+
function Cg(t) {
|
|
24376
24394
|
const e = t.getPath(), r = { ...t.getParams() }, a = t.getActivePattern(), n = {};
|
|
24377
24395
|
if (typeof window < "u" && window.location) {
|
|
24378
24396
|
const i = window.location.search || "";
|
|
@@ -24394,22 +24412,22 @@ function $g(t) {
|
|
|
24394
24412
|
}
|
|
24395
24413
|
};
|
|
24396
24414
|
}
|
|
24397
|
-
function
|
|
24415
|
+
function Ag(t, e) {
|
|
24398
24416
|
if (!t || !e || typeof t != "object" || typeof e != "object") return !1;
|
|
24399
24417
|
const r = t, a = e;
|
|
24400
|
-
return r.path !== a.path || r.pattern !== a.pattern ? !1 :
|
|
24418
|
+
return r.path !== a.path || r.pattern !== a.pattern ? !1 : Ja(r.params ?? {}, a.params ?? {}) && Ja(r.query ?? {}, a.query ?? {});
|
|
24401
24419
|
}
|
|
24402
|
-
function
|
|
24420
|
+
function Ja(t, e) {
|
|
24403
24421
|
const r = Object.keys(t), a = Object.keys(e);
|
|
24404
24422
|
if (r.length !== a.length) return !1;
|
|
24405
24423
|
for (const n of r)
|
|
24406
24424
|
if (t[n] !== e[n]) return !1;
|
|
24407
24425
|
return !0;
|
|
24408
24426
|
}
|
|
24409
|
-
let
|
|
24410
|
-
function
|
|
24427
|
+
let mr = null, Ct = null, Tg = 0;
|
|
24428
|
+
function Mg() {
|
|
24411
24429
|
if (Ct === !1) return null;
|
|
24412
|
-
if (
|
|
24430
|
+
if (mr) return mr;
|
|
24413
24431
|
try {
|
|
24414
24432
|
if (typeof CSSStyleSheet > "u" || !("replaceSync" in CSSStyleSheet.prototype) || // Some test environments (happy-dom) expose `CSSStyleSheet` but its
|
|
24415
24433
|
// `replaceSync` is a no-op that doesn't propagate to adoption — keep
|
|
@@ -24417,7 +24435,7 @@ function Tg() {
|
|
|
24417
24435
|
typeof document > "u" || !("adoptedStyleSheets" in Document.prototype))
|
|
24418
24436
|
return Ct = !1, null;
|
|
24419
24437
|
const t = new CSSStyleSheet();
|
|
24420
|
-
return t.replaceSync(fi),
|
|
24438
|
+
return t.replaceSync(fi), mr = t, Ct = !0, t;
|
|
24421
24439
|
} catch {
|
|
24422
24440
|
return Ct = !1, null;
|
|
24423
24441
|
}
|
|
@@ -24427,7 +24445,7 @@ class Nt extends HTMLElement {
|
|
|
24427
24445
|
super();
|
|
24428
24446
|
R(this, "state", new Tp());
|
|
24429
24447
|
R(this, "router", new Kp());
|
|
24430
|
-
R(this, "library",
|
|
24448
|
+
R(this, "library", Ht);
|
|
24431
24449
|
R(this, "http", new Np());
|
|
24432
24450
|
R(this, "effectRunner");
|
|
24433
24451
|
R(this, "renderer");
|
|
@@ -24485,7 +24503,7 @@ class Nt extends HTMLElement {
|
|
|
24485
24503
|
*/
|
|
24486
24504
|
R(this, "scriptThemeKeys", []);
|
|
24487
24505
|
/** Stable DevTools id for this element (`aktion-app-N`). */
|
|
24488
|
-
R(this, "devtoolsId", `aktion-app-${
|
|
24506
|
+
R(this, "devtoolsId", `aktion-app-${Tg += 1}`);
|
|
24489
24507
|
/** Monotonic commit sequence for the render profiler (0 = initial mount). */
|
|
24490
24508
|
R(this, "devtoolsCommitId", 0);
|
|
24491
24509
|
/** True once this element has been registered with the DevTools hook. */
|
|
@@ -24493,7 +24511,7 @@ class Nt extends HTMLElement {
|
|
|
24493
24511
|
/** Whether the "state write during render" warning has already fired. */
|
|
24494
24512
|
R(this, "warnedStateWriteDuringRender", !1);
|
|
24495
24513
|
this.root = this.attachShadow({ mode: "open" }), this.errorEl = document.createElement("div"), this.errorEl.className = "rui-error-banner", this.errorEl.hidden = !0, this.rootEl = document.createElement("div"), this.rootEl.className = "rui-root";
|
|
24496
|
-
const r =
|
|
24514
|
+
const r = Mg();
|
|
24497
24515
|
if (r)
|
|
24498
24516
|
try {
|
|
24499
24517
|
this.root.adoptedStyleSheets = [r], this.root.append(this.errorEl, this.rootEl);
|
|
@@ -24514,7 +24532,7 @@ class Nt extends HTMLElement {
|
|
|
24514
24532
|
notify: () => this.requestFullRender(),
|
|
24515
24533
|
onEmit: (n, i) => this.emitCustomEvent(n, i),
|
|
24516
24534
|
onEffectEvent: (n) => this.emitDevtoolsEffect(n)
|
|
24517
|
-
}), this.context =
|
|
24535
|
+
}), this.context = La(this.state, {
|
|
24518
24536
|
router: this.router,
|
|
24519
24537
|
library: this.library,
|
|
24520
24538
|
http: this.http,
|
|
@@ -24545,7 +24563,7 @@ class Nt extends HTMLElement {
|
|
|
24545
24563
|
unmountInstanceHooks: (n) => Km(this.context, n)
|
|
24546
24564
|
}), this.state.subscribe((n) => {
|
|
24547
24565
|
for (const i of n) this.pendingChangedPaths.add(i);
|
|
24548
|
-
|
|
24566
|
+
kr() && cr({
|
|
24549
24567
|
kind: "state",
|
|
24550
24568
|
appId: this.devtoolsId,
|
|
24551
24569
|
snapshot: this.state.snapshot(),
|
|
@@ -24556,15 +24574,15 @@ class Nt extends HTMLElement {
|
|
|
24556
24574
|
}
|
|
24557
24575
|
static get observedAttributes() {
|
|
24558
24576
|
return [
|
|
24559
|
-
|
|
24577
|
+
dr,
|
|
24560
24578
|
st,
|
|
24561
|
-
|
|
24579
|
+
pr,
|
|
24562
24580
|
Ye
|
|
24563
24581
|
];
|
|
24564
24582
|
}
|
|
24565
24583
|
connectedCallback() {
|
|
24566
24584
|
Mo(this.root), this.registerWithDevtools(), this.applyThemeFromAttribute(), this.startRouter();
|
|
24567
|
-
const r = this.getAttribute(
|
|
24585
|
+
const r = this.getAttribute(pr);
|
|
24568
24586
|
if (r !== null && r !== "" && r !== this.currentResponse) {
|
|
24569
24587
|
this.setResponse(r);
|
|
24570
24588
|
return;
|
|
@@ -24579,10 +24597,10 @@ class Nt extends HTMLElement {
|
|
|
24579
24597
|
this.currentResponse && (this.programDirty = !0, this.scheduleRender());
|
|
24580
24598
|
}
|
|
24581
24599
|
disconnectedCallback() {
|
|
24582
|
-
this.effectRunner.reset(), this.context &&
|
|
24600
|
+
this.effectRunner.reset(), this.context && Ra(this.context), this.router.stop(), this.devtoolsRegistered && (pf(this.devtoolsId), this.devtoolsRegistered = !1);
|
|
24583
24601
|
}
|
|
24584
24602
|
attributeChangedCallback(r, a, n) {
|
|
24585
|
-
if (r ===
|
|
24603
|
+
if (r === dr && this.applyThemeFromAttribute(), r === st && (this.updateErrorBanner(), this.scheduleRender()), r === Ye && this.updateErrorBanner(), r === pr) {
|
|
24586
24604
|
const i = n ?? "";
|
|
24587
24605
|
i !== this.currentResponse && this.setResponse(i);
|
|
24588
24606
|
}
|
|
@@ -24690,7 +24708,7 @@ class Nt extends HTMLElement {
|
|
|
24690
24708
|
a !== "" && (this.currentResponse += a, this.programDirty = !0, this.scheduleRender());
|
|
24691
24709
|
}
|
|
24692
24710
|
setTheme(r) {
|
|
24693
|
-
|
|
24711
|
+
Ga(this, Ka(r)), this.scriptThemeKeys = [], this.scheduleRender();
|
|
24694
24712
|
}
|
|
24695
24713
|
registerComponents(r, a) {
|
|
24696
24714
|
this.library = po(this.library, { components: r, root: a }), this.renderer.setLibrary(this.library), this.scheduleRender();
|
|
@@ -24722,13 +24740,13 @@ class Nt extends HTMLElement {
|
|
|
24722
24740
|
this.setResponse(r);
|
|
24723
24741
|
}
|
|
24724
24742
|
get streaming() {
|
|
24725
|
-
return
|
|
24743
|
+
return Za(this.getAttribute(st));
|
|
24726
24744
|
}
|
|
24727
24745
|
set streaming(r) {
|
|
24728
24746
|
r ? this.setAttribute(st, "true") : this.removeAttribute(st);
|
|
24729
24747
|
}
|
|
24730
24748
|
get showErrors() {
|
|
24731
|
-
return
|
|
24749
|
+
return Za(this.getAttribute(Ye));
|
|
24732
24750
|
}
|
|
24733
24751
|
set showErrors(r) {
|
|
24734
24752
|
r ? this.setAttribute(Ye, "true") : this.removeAttribute(Ye);
|
|
@@ -24753,7 +24771,7 @@ class Nt extends HTMLElement {
|
|
|
24753
24771
|
*/
|
|
24754
24772
|
registerWithDevtools() {
|
|
24755
24773
|
if (this.devtoolsRegistered) return;
|
|
24756
|
-
const r =
|
|
24774
|
+
const r = qt();
|
|
24757
24775
|
if (!r) return;
|
|
24758
24776
|
const a = {
|
|
24759
24777
|
id: this.devtoolsId,
|
|
@@ -24797,7 +24815,7 @@ class Nt extends HTMLElement {
|
|
|
24797
24815
|
* by the time we're here a frontend is listening.
|
|
24798
24816
|
*/
|
|
24799
24817
|
emitDevtoolsEffect(r) {
|
|
24800
|
-
|
|
24818
|
+
cr({
|
|
24801
24819
|
kind: "effect",
|
|
24802
24820
|
appId: this.devtoolsId,
|
|
24803
24821
|
time: de(),
|
|
@@ -24826,8 +24844,8 @@ class Nt extends HTMLElement {
|
|
|
24826
24844
|
* `routesEqual` for the structural comparison.
|
|
24827
24845
|
*/
|
|
24828
24846
|
writeRouteState() {
|
|
24829
|
-
const r =
|
|
24830
|
-
|
|
24847
|
+
const r = Cg(this.router);
|
|
24848
|
+
Ag(this.state.get(Xa), r) || this.state.set(Xa, r);
|
|
24831
24849
|
}
|
|
24832
24850
|
/**
|
|
24833
24851
|
* React to any path change: write the new value into the route slot (so
|
|
@@ -24842,8 +24860,8 @@ class Nt extends HTMLElement {
|
|
|
24842
24860
|
})), this.scheduleRender();
|
|
24843
24861
|
}
|
|
24844
24862
|
applyThemeFromAttribute() {
|
|
24845
|
-
const r = this.getAttribute(
|
|
24846
|
-
|
|
24863
|
+
const r = this.getAttribute(dr);
|
|
24864
|
+
Ga(this, Ka(r)), this.scriptThemeKeys = [];
|
|
24847
24865
|
}
|
|
24848
24866
|
/**
|
|
24849
24867
|
* Look for the reserved `theme` binding in the active program — set by a
|
|
@@ -24855,7 +24873,7 @@ class Nt extends HTMLElement {
|
|
|
24855
24873
|
* line snaps the renderer back to the underlying theme without a reload.
|
|
24856
24874
|
*/
|
|
24857
24875
|
applyScriptThemeOverrides() {
|
|
24858
|
-
this.scriptThemeKeys.length > 0 && (
|
|
24876
|
+
this.scriptThemeKeys.length > 0 && (Sg(this, this.scriptThemeKeys), this.scriptThemeKeys = []);
|
|
24859
24877
|
const r = this.context.bindings.get("theme");
|
|
24860
24878
|
if (!r) return;
|
|
24861
24879
|
let a;
|
|
@@ -24865,8 +24883,8 @@ class Nt extends HTMLElement {
|
|
|
24865
24883
|
return;
|
|
24866
24884
|
}
|
|
24867
24885
|
if (!$p(a)) return;
|
|
24868
|
-
const n =
|
|
24869
|
-
Object.keys(n).length !== 0 && (this.scriptThemeKeys =
|
|
24886
|
+
const n = $g(a.tokens);
|
|
24887
|
+
Object.keys(n).length !== 0 && (this.scriptThemeKeys = kg(this, n));
|
|
24870
24888
|
}
|
|
24871
24889
|
scheduleRender() {
|
|
24872
24890
|
this.renderScheduled || (this.renderScheduled = !0, queueMicrotask(() => this.renderNow()));
|
|
@@ -24881,8 +24899,8 @@ class Nt extends HTMLElement {
|
|
|
24881
24899
|
}
|
|
24882
24900
|
renderNow() {
|
|
24883
24901
|
if (this.renderScheduled = !1, !this.isConnected) return;
|
|
24884
|
-
this.programDirty && (this.replan(), this.programDirty = !1), this.context.budget &&
|
|
24885
|
-
const r =
|
|
24902
|
+
this.programDirty && (this.replan(), this.programDirty = !1), this.context.budget && Pa(this.context.budget), this.devtoolsRegistered || this.registerWithDevtools();
|
|
24903
|
+
const r = kr();
|
|
24886
24904
|
this.renderer.setProfiling(r);
|
|
24887
24905
|
const a = r ? de() : 0, n = /* @__PURE__ */ new Set(), i = this.context.trackedState;
|
|
24888
24906
|
this.context.trackedState = n;
|
|
@@ -24922,7 +24940,7 @@ class Nt extends HTMLElement {
|
|
|
24922
24940
|
let b = 0, h = 0;
|
|
24923
24941
|
for (const v of g)
|
|
24924
24942
|
v.phase === "memo" ? h += 1 : b += 1;
|
|
24925
|
-
|
|
24943
|
+
cr({
|
|
24926
24944
|
kind: "commit",
|
|
24927
24945
|
appId: this.devtoolsId,
|
|
24928
24946
|
commitId: this.devtoolsCommitId,
|
|
@@ -24971,8 +24989,8 @@ class Nt extends HTMLElement {
|
|
|
24971
24989
|
}
|
|
24972
24990
|
restoreFocus(r) {
|
|
24973
24991
|
if (!r) return;
|
|
24974
|
-
const a = this.rootEl.querySelector(`#${
|
|
24975
|
-
!a || a.tagName !== r.tagName || this.root.activeElement === a || (a.focus(), (a instanceof HTMLInputElement || a instanceof HTMLTextAreaElement) && r.selectionStart != null && r.selectionEnd != null &&
|
|
24992
|
+
const a = this.rootEl.querySelector(`#${Ng(r.id)}`);
|
|
24993
|
+
!a || a.tagName !== r.tagName || this.root.activeElement === a || (a.focus(), (a instanceof HTMLInputElement || a instanceof HTMLTextAreaElement) && r.selectionStart != null && r.selectionEnd != null && Pg(
|
|
24976
24994
|
a,
|
|
24977
24995
|
r.selectionStart,
|
|
24978
24996
|
r.selectionEnd,
|
|
@@ -24980,7 +24998,7 @@ class Nt extends HTMLElement {
|
|
|
24980
24998
|
));
|
|
24981
24999
|
}
|
|
24982
25000
|
replan() {
|
|
24983
|
-
this.effectRunner.reset(), this.lastRenderDeps = null, this.warnedStateWriteDuringRender = !1, this.context &&
|
|
25001
|
+
this.effectRunner.reset(), this.lastRenderDeps = null, this.warnedStateWriteDuringRender = !1, this.context && Ra(this.context), this.context = La(this.state, {
|
|
24984
25002
|
router: this.router,
|
|
24985
25003
|
library: this.library,
|
|
24986
25004
|
http: this.http,
|
|
@@ -24990,8 +25008,8 @@ class Nt extends HTMLElement {
|
|
|
24990
25008
|
});
|
|
24991
25009
|
const r = this.pendingCompiled ?? ye(this.currentResponse);
|
|
24992
25010
|
this.pendingCompiled = null;
|
|
24993
|
-
const a =
|
|
24994
|
-
a.length > 0 && (r.errors = [...r.errors, ...a]), this.context.budget &&
|
|
25011
|
+
const a = gn(r, this.library);
|
|
25012
|
+
a.length > 0 && (r.errors = [...r.errors, ...a]), this.context.budget && Pa(this.context.budget);
|
|
24995
25013
|
try {
|
|
24996
25014
|
pm(r, this.context);
|
|
24997
25015
|
} catch (i) {
|
|
@@ -25030,10 +25048,10 @@ class Nt extends HTMLElement {
|
|
|
25030
25048
|
}
|
|
25031
25049
|
}
|
|
25032
25050
|
R(Nt, "tagName", "aktion-app");
|
|
25033
|
-
function
|
|
25051
|
+
function Ng(t) {
|
|
25034
25052
|
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(t) : t.replace(/([^A-Za-z0-9_-])/g, "\\$1");
|
|
25035
25053
|
}
|
|
25036
|
-
const
|
|
25054
|
+
const Ig = /* @__PURE__ */ new Set([
|
|
25037
25055
|
"email",
|
|
25038
25056
|
"number",
|
|
25039
25057
|
"tel",
|
|
@@ -25045,8 +25063,8 @@ const Ng = /* @__PURE__ */ new Set([
|
|
|
25045
25063
|
"time",
|
|
25046
25064
|
"color"
|
|
25047
25065
|
]);
|
|
25048
|
-
function
|
|
25049
|
-
if (t instanceof HTMLInputElement &&
|
|
25066
|
+
function Pg(t, e, r, a) {
|
|
25067
|
+
if (t instanceof HTMLInputElement && Ig.has(t.type)) {
|
|
25050
25068
|
const n = t.type;
|
|
25051
25069
|
try {
|
|
25052
25070
|
t.type = "text", t.setSelectionRange(e, r, a);
|
|
@@ -25061,15 +25079,15 @@ function Ig(t, e, r, a) {
|
|
|
25061
25079
|
} catch {
|
|
25062
25080
|
}
|
|
25063
25081
|
}
|
|
25064
|
-
function
|
|
25082
|
+
function Za(t) {
|
|
25065
25083
|
if (t === null) return !1;
|
|
25066
25084
|
const e = t.trim().toLowerCase();
|
|
25067
25085
|
return e === "" || e === "true" || e === "1" || e === Ye;
|
|
25068
25086
|
}
|
|
25069
|
-
function
|
|
25087
|
+
function Eg() {
|
|
25070
25088
|
customElements.get(Nt.tagName) || customElements.define(Nt.tagName, Nt);
|
|
25071
25089
|
}
|
|
25072
|
-
const
|
|
25090
|
+
const zg = [
|
|
25073
25091
|
{
|
|
25074
25092
|
name: "App",
|
|
25075
25093
|
description: "Top-level `$app(...)` root — every program needs one.",
|
|
@@ -25307,26 +25325,26 @@ list = $users.map(u => \${1:UserCard}(u))`
|
|
|
25307
25325
|
template: 'cards${1} = Grid(${2:items}, { columns: {sm: 1, md: 2, lg: 4}, gap: "${3:l}" })'
|
|
25308
25326
|
}
|
|
25309
25327
|
];
|
|
25310
|
-
function
|
|
25311
|
-
return
|
|
25328
|
+
function Lg() {
|
|
25329
|
+
return zg;
|
|
25312
25330
|
}
|
|
25313
|
-
function
|
|
25331
|
+
function Zg(t = Ht) {
|
|
25314
25332
|
const e = kp(t);
|
|
25315
25333
|
return {
|
|
25316
|
-
grammar:
|
|
25317
|
-
tokenizer: ko(
|
|
25334
|
+
grammar: gr,
|
|
25335
|
+
tokenizer: ko(gr),
|
|
25318
25336
|
tagMap: So,
|
|
25319
25337
|
components: e,
|
|
25320
25338
|
componentsByName: Sp(e),
|
|
25321
|
-
builtins:
|
|
25322
|
-
snippets:
|
|
25339
|
+
builtins: Tr,
|
|
25340
|
+
snippets: Lg(),
|
|
25323
25341
|
keywordDocs: wo,
|
|
25324
25342
|
themeNames: Object.keys(mi),
|
|
25325
25343
|
severityTokenMap: { "parse-error": "error" },
|
|
25326
|
-
iconAliases:
|
|
25344
|
+
iconAliases: Rg
|
|
25327
25345
|
};
|
|
25328
25346
|
}
|
|
25329
|
-
const
|
|
25347
|
+
const Rg = [
|
|
25330
25348
|
"house",
|
|
25331
25349
|
"user",
|
|
25332
25350
|
"users",
|
|
@@ -25428,7 +25446,7 @@ const Lg = [
|
|
|
25428
25446
|
"thumbs-down",
|
|
25429
25447
|
"thumbtack"
|
|
25430
25448
|
];
|
|
25431
|
-
function
|
|
25449
|
+
function Dg(t, e, r) {
|
|
25432
25450
|
const a = /* @__PURE__ */ new Map(), n = [], i = /* @__PURE__ */ new Set(), o = [];
|
|
25433
25451
|
let s = 0;
|
|
25434
25452
|
const c = (m, g, b, h) => {
|
|
@@ -25466,7 +25484,7 @@ function Rg(t, e, r) {
|
|
|
25466
25484
|
renamePlain: /* @__PURE__ */ new Map(),
|
|
25467
25485
|
renameState: /* @__PURE__ */ new Map()
|
|
25468
25486
|
};
|
|
25469
|
-
a.set(m, y),
|
|
25487
|
+
a.set(m, y), jg(y);
|
|
25470
25488
|
for (const x of v.statements) {
|
|
25471
25489
|
if (x.kind !== "Import") continue;
|
|
25472
25490
|
const w = r.resolve(x.source, m);
|
|
@@ -25508,9 +25526,9 @@ function Rg(t, e, r) {
|
|
|
25508
25526
|
}
|
|
25509
25527
|
const p = [];
|
|
25510
25528
|
for (const m of n) {
|
|
25511
|
-
const g = a.get(m), b =
|
|
25529
|
+
const g = a.get(m), b = Og(g);
|
|
25512
25530
|
for (const h of g.program.statements)
|
|
25513
|
-
h.kind !== "Import" && (b.renameTopLevel(h),
|
|
25531
|
+
h.kind !== "Import" && (b.renameTopLevel(h), Bg(h), h.kind === "EffectDeclaration" && g.path !== e && (h.name = `__effect_a${g.id}_${h.name.replace(/^__effect_/, "")}`), p.push(h));
|
|
25514
25532
|
}
|
|
25515
25533
|
const d = a.get(e);
|
|
25516
25534
|
return {
|
|
@@ -25519,7 +25537,7 @@ function Rg(t, e, r) {
|
|
|
25519
25537
|
dependencies: n.filter((m) => m !== e)
|
|
25520
25538
|
};
|
|
25521
25539
|
}
|
|
25522
|
-
function
|
|
25540
|
+
function jg(t) {
|
|
25523
25541
|
for (const e of t.program.statements)
|
|
25524
25542
|
switch (e.kind) {
|
|
25525
25543
|
case "Assignment":
|
|
@@ -25537,10 +25555,10 @@ function Dg(t) {
|
|
|
25537
25555
|
break;
|
|
25538
25556
|
}
|
|
25539
25557
|
}
|
|
25540
|
-
function
|
|
25558
|
+
function Bg(t) {
|
|
25541
25559
|
(t.kind === "Assignment" || t.kind === "ComponentDeclaration" || t.kind === "ActionDeclaration" || t.kind === "HookDeclaration") && delete t.exported;
|
|
25542
25560
|
}
|
|
25543
|
-
function
|
|
25561
|
+
function Og(t) {
|
|
25544
25562
|
const e = [], r = (h) => {
|
|
25545
25563
|
for (const v of e) if (v.has(h)) return !0;
|
|
25546
25564
|
return !1;
|
|
@@ -25712,35 +25730,35 @@ function Bg(t) {
|
|
|
25712
25730
|
}
|
|
25713
25731
|
return { renameTopLevel: g };
|
|
25714
25732
|
}
|
|
25715
|
-
function
|
|
25733
|
+
function $r(t) {
|
|
25716
25734
|
return /^[a-z][a-z0-9+.-]*:\/\//i.test(t);
|
|
25717
25735
|
}
|
|
25718
|
-
function
|
|
25736
|
+
function Qa(t) {
|
|
25719
25737
|
const e = [];
|
|
25720
25738
|
for (const r of t)
|
|
25721
25739
|
r === "" || r === "." || (r === ".." ? e.pop() : e.push(r));
|
|
25722
25740
|
return e.join("/");
|
|
25723
25741
|
}
|
|
25724
|
-
function
|
|
25742
|
+
function _g(t) {
|
|
25725
25743
|
const e = t.lastIndexOf("/");
|
|
25726
25744
|
return e < 0 ? "" : t.slice(0, e);
|
|
25727
25745
|
}
|
|
25728
25746
|
function gi(t, e) {
|
|
25729
|
-
if (
|
|
25747
|
+
if ($r(t))
|
|
25730
25748
|
try {
|
|
25731
25749
|
return new URL(t).href;
|
|
25732
25750
|
} catch {
|
|
25733
25751
|
return null;
|
|
25734
25752
|
}
|
|
25735
|
-
if (
|
|
25753
|
+
if ($r(e))
|
|
25736
25754
|
try {
|
|
25737
25755
|
return new URL(t, e).href;
|
|
25738
25756
|
} catch {
|
|
25739
25757
|
return null;
|
|
25740
25758
|
}
|
|
25741
|
-
return t.startsWith("/") ?
|
|
25759
|
+
return t.startsWith("/") ? Qa(t.split("/")) : t.startsWith("./") || t.startsWith("../") ? Qa(`${_g(e)}/${t}`.split("/")) : null;
|
|
25742
25760
|
}
|
|
25743
|
-
function
|
|
25761
|
+
function Fg(t) {
|
|
25744
25762
|
return {
|
|
25745
25763
|
resolve: (e, r) => gi(e, r),
|
|
25746
25764
|
load: (e) => {
|
|
@@ -25750,19 +25768,19 @@ function _g(t) {
|
|
|
25750
25768
|
}
|
|
25751
25769
|
};
|
|
25752
25770
|
}
|
|
25753
|
-
async function
|
|
25771
|
+
async function Ug(t) {
|
|
25754
25772
|
if (typeof fetch != "function")
|
|
25755
25773
|
throw new Error("global fetch is unavailable; cannot load URL imports");
|
|
25756
25774
|
const e = await fetch(t);
|
|
25757
25775
|
if (!e.ok) throw new Error(`HTTP ${e.status}`);
|
|
25758
25776
|
return e.text();
|
|
25759
25777
|
}
|
|
25760
|
-
async function
|
|
25761
|
-
const { entry: e, files: r } = t, a = t.fetch ??
|
|
25778
|
+
async function Qg(t) {
|
|
25779
|
+
const { entry: e, files: r } = t, a = t.fetch ?? Ug, n = [], i = { ...r }, o = /* @__PURE__ */ new Set();
|
|
25762
25780
|
async function s(p) {
|
|
25763
25781
|
if (o.has(p)) return;
|
|
25764
25782
|
if (o.add(p), i[p] === void 0)
|
|
25765
|
-
if (
|
|
25783
|
+
if ($r(p))
|
|
25766
25784
|
try {
|
|
25767
25785
|
i[p] = await a(p);
|
|
25768
25786
|
} catch (g) {
|
|
@@ -25800,7 +25818,7 @@ async function Zg(t) {
|
|
|
25800
25818
|
dependencies: []
|
|
25801
25819
|
};
|
|
25802
25820
|
await s(e);
|
|
25803
|
-
const c =
|
|
25821
|
+
const c = Dg(i[e], e, Fg(i));
|
|
25804
25822
|
let u;
|
|
25805
25823
|
try {
|
|
25806
25824
|
u = eo(c.program);
|
|
@@ -25814,104 +25832,104 @@ async function Zg(t) {
|
|
|
25814
25832
|
dependencies: c.dependencies
|
|
25815
25833
|
};
|
|
25816
25834
|
}
|
|
25817
|
-
|
|
25818
|
-
const
|
|
25835
|
+
Eg();
|
|
25836
|
+
const eh = di(Ht);
|
|
25819
25837
|
export {
|
|
25820
25838
|
Nt as AktionElement,
|
|
25821
25839
|
Se as BreakSignal,
|
|
25822
|
-
|
|
25840
|
+
dn as COMPILED_PROGRAM_VERSION,
|
|
25823
25841
|
Me as ContinueSignal,
|
|
25824
|
-
|
|
25842
|
+
lr as DEFAULT_RUNTIME_BUDGET,
|
|
25825
25843
|
gf as EffectRunner,
|
|
25826
25844
|
Np as HttpRuntime,
|
|
25827
25845
|
kf as Renderer,
|
|
25828
25846
|
ht as ReturnSignal,
|
|
25829
25847
|
Kp as Router,
|
|
25830
25848
|
Ve as RuntimeBudgetError,
|
|
25831
|
-
|
|
25849
|
+
eh as SYSTEM_PROMPT_TEXT,
|
|
25832
25850
|
Tp as StateStore,
|
|
25833
|
-
|
|
25834
|
-
|
|
25835
|
-
|
|
25851
|
+
Un as anyPathAffects,
|
|
25852
|
+
kg as applyPartialTheme,
|
|
25853
|
+
Ga as applyTheme,
|
|
25836
25854
|
mo as assertOnePositionalMax,
|
|
25837
|
-
|
|
25855
|
+
xg as brutalistTheme,
|
|
25838
25856
|
Xi as buildFrontier,
|
|
25839
25857
|
mi as builtInThemes,
|
|
25840
|
-
|
|
25858
|
+
Tr as builtinCatalog,
|
|
25841
25859
|
$o as builtinNames,
|
|
25842
25860
|
Co as builtinsByName,
|
|
25843
25861
|
Km as clearInstanceHooks,
|
|
25844
|
-
|
|
25845
|
-
|
|
25846
|
-
|
|
25862
|
+
Sg as clearTokenOverrides,
|
|
25863
|
+
Kg as compileLite,
|
|
25864
|
+
Vg as computeFrontier,
|
|
25847
25865
|
am as consoleNs,
|
|
25848
|
-
|
|
25849
|
-
|
|
25866
|
+
La as createContext,
|
|
25867
|
+
Vn as createHttpResource,
|
|
25850
25868
|
Rp as createI18n,
|
|
25851
|
-
|
|
25869
|
+
Fg as createMemoryResolver,
|
|
25852
25870
|
Lp as createMutationResource,
|
|
25853
25871
|
zp as createQueryResource,
|
|
25854
25872
|
lm as createRuntimeBudget,
|
|
25855
25873
|
ko as createStreamTokenizer,
|
|
25856
25874
|
im as createToastManager,
|
|
25857
|
-
|
|
25858
|
-
|
|
25875
|
+
hg as darkTheme,
|
|
25876
|
+
Ht as defaultLibrary,
|
|
25859
25877
|
So as defaultTagMap,
|
|
25860
|
-
|
|
25861
|
-
|
|
25862
|
-
|
|
25863
|
-
|
|
25864
|
-
|
|
25878
|
+
qg as defineCompiledProgram,
|
|
25879
|
+
Eg as defineElement,
|
|
25880
|
+
Jg as describeComponentSpec,
|
|
25881
|
+
Ra as disposeContext,
|
|
25882
|
+
Ea as enterUserComponent,
|
|
25865
25883
|
M as evaluate,
|
|
25866
25884
|
Bm as evaluateUserComponent,
|
|
25867
|
-
|
|
25868
|
-
|
|
25885
|
+
Fr as extractStatePath,
|
|
25886
|
+
Yg as findBuiltin,
|
|
25869
25887
|
Ue as findComponent,
|
|
25870
|
-
|
|
25871
|
-
|
|
25888
|
+
mn as findPositionalIndex,
|
|
25889
|
+
fn as findPositionalProp,
|
|
25872
25890
|
di as generatePrompt,
|
|
25873
25891
|
kp as getComponentCatalog,
|
|
25874
|
-
|
|
25875
|
-
|
|
25876
|
-
|
|
25877
|
-
|
|
25892
|
+
Zg as getLanguageSpec,
|
|
25893
|
+
Lg as getSnippets,
|
|
25894
|
+
yg as glassTheme,
|
|
25895
|
+
gr as grammarSpec,
|
|
25878
25896
|
Sp as indexCatalog,
|
|
25879
|
-
|
|
25897
|
+
Xg as isBuiltinName,
|
|
25880
25898
|
Zi as isCompiledProgram,
|
|
25881
25899
|
cm as isComponentNode,
|
|
25882
25900
|
Mp as isEndpointResource,
|
|
25883
|
-
|
|
25884
|
-
|
|
25901
|
+
Wg as isQuiescent,
|
|
25902
|
+
_r as isStoreHandle,
|
|
25885
25903
|
$p as isThemeNode,
|
|
25886
25904
|
um as isUserComponentNode,
|
|
25887
25905
|
Cp as joinStatePath,
|
|
25888
25906
|
wo as keywordDocs,
|
|
25889
|
-
|
|
25907
|
+
za as leaveUserComponent,
|
|
25890
25908
|
we as lightTheme,
|
|
25891
|
-
|
|
25892
|
-
|
|
25909
|
+
Dg as linkProgram,
|
|
25910
|
+
Qg as linkProject,
|
|
25893
25911
|
fo as mapPositionalArgs,
|
|
25894
25912
|
qp as matchRoute,
|
|
25895
25913
|
po as mergeLibraries,
|
|
25896
|
-
|
|
25914
|
+
bg as neonTheme,
|
|
25897
25915
|
_e as normalisePath,
|
|
25898
25916
|
ye as parse,
|
|
25899
|
-
|
|
25917
|
+
vg as pastelTheme,
|
|
25900
25918
|
Ap as pathAffects,
|
|
25901
25919
|
zt as pathsOverlap,
|
|
25902
25920
|
pm as planProgram,
|
|
25903
25921
|
dm as resetMutableBindings,
|
|
25904
|
-
|
|
25905
|
-
|
|
25922
|
+
Pa as resetRuntimeBudget,
|
|
25923
|
+
Vt as resolvePatternBindings,
|
|
25906
25924
|
gi as resolveSpecifier,
|
|
25907
25925
|
Te as resolveStateAlias,
|
|
25908
|
-
|
|
25909
|
-
|
|
25910
|
-
|
|
25911
|
-
|
|
25912
|
-
|
|
25926
|
+
Ka as resolveTheme,
|
|
25927
|
+
ri as runControlFlowStatement,
|
|
25928
|
+
$g as sanitiseThemeTokens,
|
|
25929
|
+
wg as skylineTheme,
|
|
25930
|
+
Yn as storage,
|
|
25913
25931
|
ki as tokenize,
|
|
25914
|
-
|
|
25915
|
-
|
|
25932
|
+
Gg as validateProgram,
|
|
25933
|
+
gn as validateProgramSchema
|
|
25916
25934
|
};
|
|
25917
25935
|
//# sourceMappingURL=aktion.js.map
|