@overmap-ai/forms 1.0.40-file-component-improvements.5 → 1.0.40-file-component-improvements.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/form/renderer/FieldsRenderer.d.ts +3 -1
- package/dist/forms.js +218 -216
- package/dist/forms.umd.cjs +8 -8
- package/package.json +1 -1
package/dist/forms.js
CHANGED
|
@@ -4,7 +4,7 @@ var R = (r, e, t) => Hs(r, typeof e != "symbol" ? e + "" : e, t);
|
|
|
4
4
|
import { jsxs as _, Fragment as Ie, jsx as p } from "react/jsx-runtime";
|
|
5
5
|
import { Card as ht, LuIcon as N, Text as pe, Spinner as ti, Overlay as xt, preventDefault as Gs, ButtonGroup as ue, Tooltip as Xt, IconButton as ne, Separator as Vt, Input as ge, Badge as ye, Checkbox as Hr, CheckboxGroup as En, Popover as xe, Button as B, DayPicker as za, Menu as D, OneTimePasswordField as Sn, stopPropagation as mt, RadioGroup as Wt, TextArea as sr, Rating as Fi, Heading as qs, toast as qe, ToggleGroup as bn, useAlertDialog as Xs } from "@overmap-ai/blocks";
|
|
6
6
|
import { cx as kt, cva as ri } from "class-variance-authority";
|
|
7
|
-
import { forwardRef as ni, createElement as kn, memo as
|
|
7
|
+
import { forwardRef as ni, createElement as kn, memo as z, createContext as jr, useState as Xe, useLayoutEffect as Ua, useContext as Ws, useCallback as b, useEffect as pt, Fragment as ii, use as ce, useMemo as se, useRef as Yr } from "react";
|
|
8
8
|
import "@xyflow/react/dist/style.css";
|
|
9
9
|
import { getBezierPath as $s, Position as yt, BaseEdge as js, EdgeLabelRenderer as Ys, NodeToolbar as Zs, Handle as Pi, MarkerType as Ks, useNodesState as Qs, useEdgesState as Js, ReactFlow as el, Panel as In } from "@xyflow/react";
|
|
10
10
|
import { willCreateCycle as Ha } from "graphology-dag";
|
|
@@ -651,7 +651,7 @@ const Mc = [
|
|
|
651
651
|
const Fc = [
|
|
652
652
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
653
653
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
654
|
-
], bt = q("x", Fc), lo =
|
|
654
|
+
], bt = q("x", Fc), lo = z((r) => {
|
|
655
655
|
const { ref: e, file: t, className: n, error: i, rightSlot: a, size: o, ...s } = r, l = () => i ? /* @__PURE__ */ _(Ie, { children: [
|
|
656
656
|
/* @__PURE__ */ p(N, { icon: bl, color: "var(--base-a11)" }),
|
|
657
657
|
/* @__PURE__ */ p(pe, { accentColor: "base", className: "truncate", size: o, children: i })
|
|
@@ -776,14 +776,14 @@ const Ce = jr({}), uo = (r) => {
|
|
|
776
776
|
URL.revokeObjectURL(n);
|
|
777
777
|
};
|
|
778
778
|
}, [r]), e;
|
|
779
|
-
}, br =
|
|
779
|
+
}, br = z((r) => {
|
|
780
780
|
const { file: e, ...t } = r, n = uo(e);
|
|
781
781
|
return /* @__PURE__ */ p("img", { src: n ?? void 0, alt: e.name, ...t });
|
|
782
782
|
});
|
|
783
783
|
br.displayName = "ImageFile";
|
|
784
784
|
const fo = jr(() => {
|
|
785
785
|
throw new Error("No ImageViewerProvider found");
|
|
786
|
-
}), si = () => Ws(fo), ho =
|
|
786
|
+
}), si = () => Ws(fo), ho = z((r) => {
|
|
787
787
|
const { file: e, onClose: t } = r, n = b(() => {
|
|
788
788
|
ja(e, e.name);
|
|
789
789
|
}, [e]);
|
|
@@ -808,7 +808,7 @@ const fo = jr(() => {
|
|
|
808
808
|
] }) });
|
|
809
809
|
});
|
|
810
810
|
ho.displayName = "ImageViewer";
|
|
811
|
-
const Pc =
|
|
811
|
+
const Pc = z((r) => {
|
|
812
812
|
const { children: e } = r, [t, n] = Xe(null), i = b(() => {
|
|
813
813
|
n(null);
|
|
814
814
|
}, []), a = b(
|
|
@@ -825,7 +825,7 @@ const Pc = L((r) => {
|
|
|
825
825
|
] });
|
|
826
826
|
});
|
|
827
827
|
Pc.displayName = "FileViewerProvider";
|
|
828
|
-
const Me =
|
|
828
|
+
const Me = z((r) => {
|
|
829
829
|
const { label: e, error: t, description: n, required: i, children: a, inputId: o, image: s, size: l } = r, [c, u] = Xe(void 0), d = si();
|
|
830
830
|
pt(() => {
|
|
831
831
|
s instanceof Promise ? s.then(u).catch(console.error) : u(s);
|
|
@@ -869,7 +869,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
869
869
|
onChange: i,
|
|
870
870
|
onBlur: a
|
|
871
871
|
};
|
|
872
|
-
}, po =
|
|
872
|
+
}, po = z((r) => {
|
|
873
873
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), [c, u] = Xe(""), [d, f] = Xe(""), h = b(
|
|
874
874
|
(w) => {
|
|
875
875
|
o(w), a();
|
|
@@ -961,12 +961,12 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
961
961
|
draggableId: `${S}-draggable`,
|
|
962
962
|
index: O,
|
|
963
963
|
isDragDisabled: l,
|
|
964
|
-
children: ({ draggableProps: T, dragHandleProps: F, innerRef:
|
|
964
|
+
children: ({ draggableProps: T, dragHandleProps: F, innerRef: U }) => /* @__PURE__ */ _(
|
|
965
965
|
ye,
|
|
966
966
|
{
|
|
967
967
|
...F,
|
|
968
968
|
...T,
|
|
969
|
-
ref:
|
|
969
|
+
ref: U,
|
|
970
970
|
className: "flex items-center justify-between gap-2",
|
|
971
971
|
accentColor: "base",
|
|
972
972
|
size: t,
|
|
@@ -1127,7 +1127,7 @@ class Qr extends tt {
|
|
|
1127
1127
|
];
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
-
const vo =
|
|
1130
|
+
const vo = z((r) => {
|
|
1131
1131
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1132
1132
|
(d) => {
|
|
1133
1133
|
o(!!d), a();
|
|
@@ -1216,7 +1216,7 @@ class Yt extends tt {
|
|
|
1216
1216
|
return t === n;
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
|
-
const go =
|
|
1219
|
+
const go = z((r) => {
|
|
1220
1220
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1221
1221
|
(f) => {
|
|
1222
1222
|
const h = f.target.valueAsNumber, v = isNaN(h) ? null : h;
|
|
@@ -1478,7 +1478,7 @@ class xo extends tt {
|
|
|
1478
1478
|
return t === n;
|
|
1479
1479
|
}
|
|
1480
1480
|
}
|
|
1481
|
-
const yo =
|
|
1481
|
+
const yo = z((r) => {
|
|
1482
1482
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1483
1483
|
(d) => {
|
|
1484
1484
|
o(d), a();
|
|
@@ -1578,7 +1578,7 @@ class Zt extends Qr {
|
|
|
1578
1578
|
return i.size === a.size && i.isSubsetOf(a);
|
|
1579
1579
|
}
|
|
1580
1580
|
}
|
|
1581
|
-
const mo =
|
|
1581
|
+
const mo = z((r) => {
|
|
1582
1582
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), [c, u] = Xe(!1), d = b(
|
|
1583
1583
|
(h) => {
|
|
1584
1584
|
o(h ?? null), a(), u(!1);
|
|
@@ -1690,7 +1690,7 @@ class wr extends tt {
|
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
1692
|
var J = /* @__PURE__ */ ((r) => (r.Text = "text", r.Selection = "selection", r.Numeric = "numeric", r.Temporal = "temporal", r.Capture = "capture", r.Assessment = "assessment", r.Verification = "verification", r))(J || {});
|
|
1693
|
-
const Co =
|
|
1693
|
+
const Co = z((r) => {
|
|
1694
1694
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1695
1695
|
(d) => {
|
|
1696
1696
|
o(d), a();
|
|
@@ -1814,7 +1814,7 @@ class St extends Qr {
|
|
|
1814
1814
|
return i.size === a.size && i.isSubsetOf(a);
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
|
-
const wo =
|
|
1817
|
+
const wo = z((r) => {
|
|
1818
1818
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1819
1819
|
(f) => {
|
|
1820
1820
|
o(f ?? null), a();
|
|
@@ -1928,7 +1928,7 @@ class Ft extends Qr {
|
|
|
1928
1928
|
return t === n;
|
|
1929
1929
|
}
|
|
1930
1930
|
}
|
|
1931
|
-
const _o =
|
|
1931
|
+
const _o = z((r) => {
|
|
1932
1932
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1933
1933
|
(f) => {
|
|
1934
1934
|
o(f);
|
|
@@ -2156,7 +2156,7 @@ function li(r, e) {
|
|
|
2156
2156
|
const t = new Set(r.map(({ uuid: i }) => i)), n = new Set(e.map(({ uuid: i }) => i));
|
|
2157
2157
|
return t.size === n.size && t.isSubsetOf(n);
|
|
2158
2158
|
}
|
|
2159
|
-
const Ao =
|
|
2159
|
+
const Ao = z((r) => {
|
|
2160
2160
|
const { ref: e, file: t, error: n, rightSlot: i, className: a, size: o, ...s } = r;
|
|
2161
2161
|
return /* @__PURE__ */ _(
|
|
2162
2162
|
ht,
|
|
@@ -2181,12 +2181,12 @@ const Ao = L((r) => {
|
|
|
2181
2181
|
);
|
|
2182
2182
|
});
|
|
2183
2183
|
Ao.displayName = "ImageCard";
|
|
2184
|
-
const Eo =
|
|
2184
|
+
const Eo = z((r) => {
|
|
2185
2185
|
const { file: e, ...t } = r, n = uo(e);
|
|
2186
2186
|
return /* @__PURE__ */ p("video", { src: n ?? void 0, ...t });
|
|
2187
2187
|
});
|
|
2188
2188
|
Eo.displayName = "VideoFile";
|
|
2189
|
-
const So =
|
|
2189
|
+
const So = z((r) => {
|
|
2190
2190
|
const { ref: e, file: t, className: n, error: i, rightSlot: a, size: o, ...s } = r;
|
|
2191
2191
|
return /* @__PURE__ */ _(
|
|
2192
2192
|
ht,
|
|
@@ -2211,7 +2211,7 @@ const So = L((r) => {
|
|
|
2211
2211
|
);
|
|
2212
2212
|
});
|
|
2213
2213
|
So.displayName = "VideoCard";
|
|
2214
|
-
const ci =
|
|
2214
|
+
const ci = z((r) => {
|
|
2215
2215
|
const { fileOrPromise: e, onRemove: t, disabled: n, size: i } = r, [a, o] = Xe(
|
|
2216
2216
|
e instanceof Qt ? null : e
|
|
2217
2217
|
), [s, l] = Xe(null), c = si();
|
|
@@ -2309,7 +2309,7 @@ const ci = L((r) => {
|
|
|
2309
2309
|
);
|
|
2310
2310
|
});
|
|
2311
2311
|
ci.displayName = "DisplayFile";
|
|
2312
|
-
const bo =
|
|
2312
|
+
const bo = z((r) => {
|
|
2313
2313
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = Yr(null), u = b(
|
|
2314
2314
|
(w) => {
|
|
2315
2315
|
const S = e.cleanValue({
|
|
@@ -2424,7 +2424,7 @@ const bo = L((r) => {
|
|
|
2424
2424
|
{
|
|
2425
2425
|
className: "w-max",
|
|
2426
2426
|
size: t,
|
|
2427
|
-
variant: "
|
|
2427
|
+
variant: "surface",
|
|
2428
2428
|
accentColor: "base",
|
|
2429
2429
|
onClick: v,
|
|
2430
2430
|
type: "button",
|
|
@@ -2587,7 +2587,7 @@ class Jt extends tt {
|
|
|
2587
2587
|
return qc(t, n);
|
|
2588
2588
|
}
|
|
2589
2589
|
}
|
|
2590
|
-
const Oo =
|
|
2590
|
+
const Oo = z((r) => {
|
|
2591
2591
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
2592
2592
|
(f) => {
|
|
2593
2593
|
o(f), a();
|
|
@@ -2720,7 +2720,7 @@ const Xc = ri(
|
|
|
2720
2720
|
}
|
|
2721
2721
|
}
|
|
2722
2722
|
}
|
|
2723
|
-
), No =
|
|
2723
|
+
), No = z((r) => {
|
|
2724
2724
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
2725
2725
|
(f) => {
|
|
2726
2726
|
o(f), a();
|
|
@@ -3529,7 +3529,7 @@ var Ee = (
|
|
|
3529
3529
|
return new Uint8Array(i);
|
|
3530
3530
|
}, r;
|
|
3531
3531
|
}()
|
|
3532
|
-
),
|
|
3532
|
+
), K = (
|
|
3533
3533
|
/** @class */
|
|
3534
3534
|
function() {
|
|
3535
3535
|
function r() {
|
|
@@ -3607,7 +3607,7 @@ var Ee = (
|
|
|
3607
3607
|
return r.prototype.enableDecoding = function(e) {
|
|
3608
3608
|
return this.encoding = e, this;
|
|
3609
3609
|
}, r.prototype.append = function(e) {
|
|
3610
|
-
return typeof e == "string" ? this.value += e.toString() : this.encoding ? this.value +=
|
|
3610
|
+
return typeof e == "string" ? this.value += e.toString() : this.encoding ? this.value += K.castAsNonUtf8Char(e, this.encoding) : this.value += String.fromCharCode(e), this;
|
|
3611
3611
|
}, r.prototype.appendChars = function(e, t, n) {
|
|
3612
3612
|
for (var i = t; t < t + n; i++)
|
|
3613
3613
|
this.append(e[i]);
|
|
@@ -5164,7 +5164,7 @@ var zi = (
|
|
|
5164
5164
|
}
|
|
5165
5165
|
var c = r.readCode(e, o, 8);
|
|
5166
5166
|
a += /*(char)*/
|
|
5167
|
-
|
|
5167
|
+
K.castAsNonUtf8Char(c), o += 8;
|
|
5168
5168
|
}
|
|
5169
5169
|
i = n;
|
|
5170
5170
|
} else {
|
|
@@ -6225,18 +6225,18 @@ var be = (
|
|
|
6225
6225
|
}
|
|
6226
6226
|
F && (u = u === e.CODE_CODE_A ? e.CODE_CODE_B : e.CODE_CODE_A);
|
|
6227
6227
|
}
|
|
6228
|
-
var
|
|
6228
|
+
var U = g - v;
|
|
6229
6229
|
if (g = n.getNextUnset(g), !n.isRange(g, Math.min(n.getSize(), g + (g - v) / 2), !1))
|
|
6230
6230
|
throw new I();
|
|
6231
6231
|
if (A -= w * m, A % 103 !== m)
|
|
6232
6232
|
throw new De();
|
|
6233
|
-
var
|
|
6234
|
-
if (
|
|
6233
|
+
var L = h.length;
|
|
6234
|
+
if (L === 0)
|
|
6235
6235
|
throw new I();
|
|
6236
|
-
|
|
6237
|
-
for (var
|
|
6236
|
+
L > 0 && S && (u === e.CODE_CODE_C ? h = h.substring(0, L - 2) : h = h.substring(0, L - 1));
|
|
6237
|
+
for (var Y = (o[1] + o[0]) / 2, X = v + U / 2, Z = c.length, Pe = new Uint8Array(Z), Ze = 0; Ze < Z; Ze++)
|
|
6238
6238
|
Pe[Ze] = c[Ze];
|
|
6239
|
-
var dr = [new k(
|
|
6239
|
+
var dr = [new k(Y, t), new k(X, t)];
|
|
6240
6240
|
return new We(h, Pe, 0, dr, P.CODE_128, (/* @__PURE__ */ new Date()).getTime());
|
|
6241
6241
|
}, e.CODE_PATTERNS = [
|
|
6242
6242
|
Int32Array.from([2, 1, 2, 2, 2, 2]),
|
|
@@ -6396,8 +6396,8 @@ var be = (
|
|
|
6396
6396
|
var C = m.value;
|
|
6397
6397
|
d += C;
|
|
6398
6398
|
}
|
|
6399
|
-
} catch (
|
|
6400
|
-
a = { error:
|
|
6399
|
+
} catch (Z) {
|
|
6400
|
+
a = { error: Z };
|
|
6401
6401
|
} finally {
|
|
6402
6402
|
try {
|
|
6403
6403
|
m && !m.done && (o = y.return) && o.call(y);
|
|
@@ -6414,8 +6414,8 @@ var be = (
|
|
|
6414
6414
|
var C = S.value;
|
|
6415
6415
|
A += C;
|
|
6416
6416
|
}
|
|
6417
|
-
} catch (
|
|
6418
|
-
s = { error:
|
|
6417
|
+
} catch (Z) {
|
|
6418
|
+
s = { error: Z };
|
|
6419
6419
|
} finally {
|
|
6420
6420
|
try {
|
|
6421
6421
|
S && !S.done && (l = w.return) && l.call(w);
|
|
@@ -6427,18 +6427,18 @@ var be = (
|
|
|
6427
6427
|
if (d !== f && O * 2 < A)
|
|
6428
6428
|
throw new I();
|
|
6429
6429
|
if (this.usingCheckDigit) {
|
|
6430
|
-
for (var T = this.decodeRowResult.length - 1, F = 0,
|
|
6431
|
-
F += e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(
|
|
6430
|
+
for (var T = this.decodeRowResult.length - 1, F = 0, U = 0; U < T; U++)
|
|
6431
|
+
F += e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(U));
|
|
6432
6432
|
if (this.decodeRowResult.charAt(T) !== e.ALPHABET_STRING.charAt(F % 43))
|
|
6433
6433
|
throw new De();
|
|
6434
6434
|
this.decodeRowResult = this.decodeRowResult.substring(0, T);
|
|
6435
6435
|
}
|
|
6436
6436
|
if (this.decodeRowResult.length === 0)
|
|
6437
6437
|
throw new I();
|
|
6438
|
-
var
|
|
6439
|
-
this.extendedMode ?
|
|
6440
|
-
var
|
|
6441
|
-
return new We(
|
|
6438
|
+
var L;
|
|
6439
|
+
this.extendedMode ? L = e.decodeExtended(this.decodeRowResult) : L = this.decodeRowResult;
|
|
6440
|
+
var Y = (u[1] + u[0]) / 2, X = v + A / 2;
|
|
6441
|
+
return new We(L, null, 0, [new k(Y, t), new k(X, t)], P.CODE_39, (/* @__PURE__ */ new Date()).getTime());
|
|
6442
6442
|
}, e.findAsteriskPattern = function(t, n) {
|
|
6443
6443
|
for (var i = t.getSize(), a = t.getNextSet(0), o = 0, s = a, l = !1, c = n.length, u = a; u < i; u++)
|
|
6444
6444
|
if (t.get(u) !== l)
|
|
@@ -6639,8 +6639,8 @@ var be = (
|
|
|
6639
6639
|
var C = m.value;
|
|
6640
6640
|
u += C;
|
|
6641
6641
|
}
|
|
6642
|
-
} catch (
|
|
6643
|
-
a = { error:
|
|
6642
|
+
} catch (U) {
|
|
6643
|
+
a = { error: U };
|
|
6644
6644
|
} finally {
|
|
6645
6645
|
try {
|
|
6646
6646
|
m && !m.done && (o = y.return) && o.call(y);
|
|
@@ -6657,8 +6657,8 @@ var be = (
|
|
|
6657
6657
|
var C = S.value;
|
|
6658
6658
|
A += C;
|
|
6659
6659
|
}
|
|
6660
|
-
} catch (
|
|
6661
|
-
s = { error:
|
|
6660
|
+
} catch (U) {
|
|
6661
|
+
s = { error: U };
|
|
6662
6662
|
} finally {
|
|
6663
6663
|
try {
|
|
6664
6664
|
S && !S.done && (l = w.return) && l.call(w);
|
|
@@ -7322,13 +7322,13 @@ var be = (
|
|
|
7322
7322
|
}
|
|
7323
7323
|
var F = i == null ? null : i.get(ve.ALLOWED_EAN_EXTENSIONS);
|
|
7324
7324
|
if (F != null) {
|
|
7325
|
-
var
|
|
7326
|
-
for (var
|
|
7327
|
-
if (O.toString() ===
|
|
7328
|
-
|
|
7325
|
+
var U = !1;
|
|
7326
|
+
for (var L in F)
|
|
7327
|
+
if (O.toString() === L) {
|
|
7328
|
+
U = !0;
|
|
7329
7329
|
break;
|
|
7330
7330
|
}
|
|
7331
|
-
if (!
|
|
7331
|
+
if (!U)
|
|
7332
7332
|
throw new I();
|
|
7333
7333
|
}
|
|
7334
7334
|
return A === P.EAN_13 || P.UPC_A, S;
|
|
@@ -9429,16 +9429,16 @@ var Qi = (
|
|
|
9429
9429
|
}
|
|
9430
9430
|
O += v[l];
|
|
9431
9431
|
}
|
|
9432
|
-
for (var
|
|
9432
|
+
for (var U = 0, l = g.length - 1; l >= 0; l--)
|
|
9433
9433
|
if (e.isNotA1left(n, i, a)) {
|
|
9434
9434
|
var F = e.WEIGHTS[S][2 * l + 1];
|
|
9435
|
-
|
|
9435
|
+
U += g[l] * F;
|
|
9436
9436
|
}
|
|
9437
|
-
var
|
|
9437
|
+
var L = T + U;
|
|
9438
9438
|
if ((O & 1) !== 0 || O > 13 || O < 4)
|
|
9439
9439
|
throw new I();
|
|
9440
|
-
var
|
|
9441
|
-
return new Wr(An,
|
|
9440
|
+
var Y = (13 - O) / 2, X = e.SYMBOL_WIDEST[Y], Z = 9 - X, Pe = Gt.getRSSvalue(v, X, !0), Ze = Gt.getRSSvalue(g, Z, !1), dr = e.EVEN_TOTAL_SUBSET[Y], _n = e.GSUM[Y], An = Pe * dr + Ze + _n;
|
|
9441
|
+
return new Wr(An, L);
|
|
9442
9442
|
}, e.isNotA1left = function(t, n, i) {
|
|
9443
9443
|
return !(t.getValue() === 0 && n && i);
|
|
9444
9444
|
}, e.prototype.adjustOddEvenCounts = function(t) {
|
|
@@ -9779,13 +9779,13 @@ var Qi = (
|
|
|
9779
9779
|
if (i) {
|
|
9780
9780
|
if ((A & 1) !== 0 || A > 12 || A < 4)
|
|
9781
9781
|
throw new I();
|
|
9782
|
-
var F = (12 - A) / 2,
|
|
9783
|
-
return new Wr(
|
|
9782
|
+
var F = (12 - A) / 2, U = e.OUTSIDE_ODD_WIDEST[F], L = 9 - U, Y = Gt.getRSSvalue(f, U, !1), X = Gt.getRSSvalue(h, L, !0), Z = e.OUTSIDE_EVEN_TOTAL_SUBSET[F], Pe = e.OUTSIDE_GSUM[F];
|
|
9783
|
+
return new Wr(Y * Z + X + Pe, T);
|
|
9784
9784
|
} else {
|
|
9785
9785
|
if ((O & 1) !== 0 || O > 10 || O < 4)
|
|
9786
9786
|
throw new I();
|
|
9787
|
-
var F = (10 - O) / 2,
|
|
9788
|
-
return new Wr(X * Ze +
|
|
9787
|
+
var F = (10 - O) / 2, U = e.INSIDE_ODD_WIDEST[F], L = 9 - U, Y = Gt.getRSSvalue(f, U, !0), X = Gt.getRSSvalue(h, L, !1), Ze = e.INSIDE_ODD_TOTAL_SUBSET[F], Pe = e.INSIDE_GSUM[F];
|
|
9788
|
+
return new Wr(X * Ze + Y + Pe, T);
|
|
9789
9789
|
}
|
|
9790
9790
|
}, e.prototype.findFinderPattern = function(t, n) {
|
|
9791
9791
|
var i = this.getDecodeFinderCounters();
|
|
@@ -10180,12 +10180,12 @@ var ea = function(r) {
|
|
|
10180
10180
|
for (var w = h[0].codewords.length, S = w - s.getECCodewords(), O = S - 1, T = 0, m = 0; m < O; m++)
|
|
10181
10181
|
for (var F = 0; F < v; F++)
|
|
10182
10182
|
h[F].codewords[m] = e[T++];
|
|
10183
|
-
for (var
|
|
10183
|
+
for (var U = t.getVersionNumber() === 24, L = U ? 8 : v, F = 0; F < L; F++)
|
|
10184
10184
|
h[F].codewords[S - 1] = e[T++];
|
|
10185
|
-
for (var
|
|
10185
|
+
for (var Y = h[0].codewords.length, m = S; m < Y; m++)
|
|
10186
10186
|
for (var F = 0; F < v; F++) {
|
|
10187
|
-
var X =
|
|
10188
|
-
h[X].codewords[
|
|
10187
|
+
var X = U ? (F + 8) % v : F, Z = U && X > 7 ? m - 1 : m;
|
|
10188
|
+
h[X].codewords[Z] = e[T++];
|
|
10189
10189
|
}
|
|
10190
10190
|
if (T !== e.length)
|
|
10191
10191
|
throw new H();
|
|
@@ -10480,7 +10480,7 @@ var Td = (
|
|
|
10480
10480
|
}
|
|
10481
10481
|
n.push(s);
|
|
10482
10482
|
try {
|
|
10483
|
-
t.append(at.decode(s,
|
|
10483
|
+
t.append(at.decode(s, K.ISO88591));
|
|
10484
10484
|
} catch (c) {
|
|
10485
10485
|
throw new Ir("Platform does not support required encoding: " + c.message);
|
|
10486
10486
|
}
|
|
@@ -11313,8 +11313,8 @@ var ra = (
|
|
|
11313
11313
|
var h = f.value;
|
|
11314
11314
|
c += h.getCount();
|
|
11315
11315
|
}
|
|
11316
|
-
} catch (
|
|
11317
|
-
i = { error:
|
|
11316
|
+
} catch (Z) {
|
|
11317
|
+
i = { error: Z };
|
|
11318
11318
|
} finally {
|
|
11319
11319
|
try {
|
|
11320
11320
|
f && !f.done && (a = d.return) && a.call(d);
|
|
@@ -11329,8 +11329,8 @@ var ra = (
|
|
|
11329
11329
|
var A = h.getDataCodewords(), w = l.getECCodewordsPerBlock() + A;
|
|
11330
11330
|
v[g++] = new r(A, new Uint8Array(w));
|
|
11331
11331
|
}
|
|
11332
|
-
} catch (
|
|
11333
|
-
o = { error:
|
|
11332
|
+
} catch (Z) {
|
|
11333
|
+
o = { error: Z };
|
|
11334
11334
|
} finally {
|
|
11335
11335
|
try {
|
|
11336
11336
|
m && !m.done && (s = y.return) && s.call(y);
|
|
@@ -11345,15 +11345,15 @@ var ra = (
|
|
|
11345
11345
|
O--;
|
|
11346
11346
|
}
|
|
11347
11347
|
O++;
|
|
11348
|
-
for (var F = S - l.getECCodewordsPerBlock(),
|
|
11349
|
-
for (var
|
|
11350
|
-
v[
|
|
11351
|
-
for (var
|
|
11352
|
-
v[
|
|
11353
|
-
for (var
|
|
11354
|
-
for (var
|
|
11355
|
-
var X =
|
|
11356
|
-
v[
|
|
11348
|
+
for (var F = S - l.getECCodewordsPerBlock(), U = 0, C = 0; C < F; C++)
|
|
11349
|
+
for (var L = 0; L < g; L++)
|
|
11350
|
+
v[L].codewords[C] = e[U++];
|
|
11351
|
+
for (var L = O; L < g; L++)
|
|
11352
|
+
v[L].codewords[F] = e[U++];
|
|
11353
|
+
for (var Y = v[0].codewords.length, C = F; C < Y; C++)
|
|
11354
|
+
for (var L = 0; L < g; L++) {
|
|
11355
|
+
var X = L < O ? C : C + 1;
|
|
11356
|
+
v[L].codewords[X] = e[U++];
|
|
11357
11357
|
}
|
|
11358
11358
|
return v;
|
|
11359
11359
|
}, r.prototype.getNumDataCodewords = function() {
|
|
@@ -11465,7 +11465,7 @@ var he = (
|
|
|
11465
11465
|
s & 255, a += 2, n--;
|
|
11466
11466
|
}
|
|
11467
11467
|
try {
|
|
11468
|
-
t.append(at.decode(i,
|
|
11468
|
+
t.append(at.decode(i, K.GB2312));
|
|
11469
11469
|
} catch (l) {
|
|
11470
11470
|
throw new M(l);
|
|
11471
11471
|
}
|
|
@@ -11479,7 +11479,7 @@ var he = (
|
|
|
11479
11479
|
s, a += 2, n--;
|
|
11480
11480
|
}
|
|
11481
11481
|
try {
|
|
11482
|
-
t.append(at.decode(i,
|
|
11482
|
+
t.append(at.decode(i, K.SHIFT_JIS));
|
|
11483
11483
|
} catch (l) {
|
|
11484
11484
|
throw new M(l);
|
|
11485
11485
|
}
|
|
@@ -11490,7 +11490,7 @@ var he = (
|
|
|
11490
11490
|
s[l] = /*(byte) */
|
|
11491
11491
|
e.readBits(8);
|
|
11492
11492
|
var c;
|
|
11493
|
-
i === null ? c =
|
|
11493
|
+
i === null ? c = K.guessEncoding(s, o) : c = i.getName();
|
|
11494
11494
|
try {
|
|
11495
11495
|
t.append(at.decode(s, c));
|
|
11496
11496
|
} catch (u) {
|
|
@@ -12150,8 +12150,8 @@ var he = (
|
|
|
12150
12150
|
// CenterComparator implements Comparator<FinderPattern>
|
|
12151
12151
|
function(O, T) {
|
|
12152
12152
|
if (T.getCount() === O.getCount()) {
|
|
12153
|
-
var F = Math.abs(T.getEstimatedModuleSize() - s),
|
|
12154
|
-
return F <
|
|
12153
|
+
var F = Math.abs(T.getEstimatedModuleSize() - s), U = Math.abs(O.getEstimatedModuleSize() - s);
|
|
12154
|
+
return F < U ? 1 : F > U ? -1 : 0;
|
|
12155
12155
|
} else
|
|
12156
12156
|
return T.getCount() - O.getCount();
|
|
12157
12157
|
}
|
|
@@ -20816,8 +20816,8 @@ var Uo = (
|
|
|
20816
20816
|
var O = S.value, m = O.getDataBytes();
|
|
20817
20817
|
h < m.length && A.appendBits(m[h], 8);
|
|
20818
20818
|
}
|
|
20819
|
-
} catch (
|
|
20820
|
-
a = { error:
|
|
20819
|
+
} catch (L) {
|
|
20820
|
+
a = { error: L };
|
|
20821
20821
|
} finally {
|
|
20822
20822
|
try {
|
|
20823
20823
|
S && !S.done && (o = w.return) && o.call(w);
|
|
@@ -20831,8 +20831,8 @@ var Uo = (
|
|
|
20831
20831
|
var O = F.value, C = O.getErrorCorrectionBytes();
|
|
20832
20832
|
h < C.length && A.appendBits(C[h], 8);
|
|
20833
20833
|
}
|
|
20834
|
-
} catch (
|
|
20835
|
-
s = { error:
|
|
20834
|
+
} catch (L) {
|
|
20835
|
+
s = { error: L };
|
|
20836
20836
|
} finally {
|
|
20837
20837
|
try {
|
|
20838
20838
|
F && !F.done && (l = T.return) && l.call(T);
|
|
@@ -21274,9 +21274,9 @@ var fa = 129, Ho = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21274
21274
|
var l = e.getSymbolInfo().getDataCapacity() - s > 0;
|
|
21275
21275
|
if (e.hasMoreCharacters() || l)
|
|
21276
21276
|
if (a <= 249)
|
|
21277
|
-
t.setCharAt(0,
|
|
21277
|
+
t.setCharAt(0, K.getCharAt(a));
|
|
21278
21278
|
else if (a <= 1555)
|
|
21279
|
-
t.setCharAt(0,
|
|
21279
|
+
t.setCharAt(0, K.getCharAt(Math.floor(a / 250) + 249)), t.insert(1, K.getCharAt(a % 250));
|
|
21280
21280
|
else
|
|
21281
21281
|
throw new Error("Message length not in valid ranges: " + a);
|
|
21282
21282
|
for (var c = 0, n = t.length(); c < n; c++)
|
|
@@ -21404,7 +21404,7 @@ var fa = 129, Ho = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21404
21404
|
}
|
|
21405
21405
|
}
|
|
21406
21406
|
}
|
|
21407
|
-
t.append(
|
|
21407
|
+
t.append(K.getCharAt(31)), this.handleEOD(e, t);
|
|
21408
21408
|
}, r.prototype.handleEOD = function(e, t) {
|
|
21409
21409
|
try {
|
|
21410
21410
|
var n = t.length();
|
|
@@ -21429,7 +21429,7 @@ var fa = 129, Ho = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21429
21429
|
e.signalEncoderChange(oe);
|
|
21430
21430
|
}
|
|
21431
21431
|
}, r.prototype.encodeChar = function(e, t) {
|
|
21432
|
-
e >= 32 && e <= 63 ? t.append(e) : e >= 64 && e <= 94 ? t.append(
|
|
21432
|
+
e >= 32 && e <= 63 ? t.append(e) : e >= 64 && e <= 94 ? t.append(K.getCharAt(e - 64)) : ut.illegalCharacter(K.getCharAt(e));
|
|
21433
21433
|
}, r.prototype.encodeToCodewords = function(e) {
|
|
21434
21434
|
var t = e.length;
|
|
21435
21435
|
if (t === 0)
|
|
@@ -21698,7 +21698,7 @@ var fa = 129, Ho = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21698
21698
|
n.append(3);
|
|
21699
21699
|
break;
|
|
21700
21700
|
default:
|
|
21701
|
-
t >= 48 && t <= 57 ? n.append(t - 48 + 4) : t >= 65 && t <= 90 ? n.append(t - 65 + 14) : ut.illegalCharacter(
|
|
21701
|
+
t >= 48 && t <= 57 ? n.append(t - 48 + 4) : t >= 65 && t <= 90 ? n.append(t - 65 + 14) : ut.illegalCharacter(K.getCharAt(t));
|
|
21702
21702
|
break;
|
|
21703
21703
|
}
|
|
21704
21704
|
return 1;
|
|
@@ -21941,8 +21941,8 @@ var fa = 129, Ho = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21941
21941
|
"windows-1252",
|
|
21942
21942
|
"windows-1256",
|
|
21943
21943
|
"Shift_JIS"
|
|
21944
|
-
].map(function(
|
|
21945
|
-
return new ga(Hf.forName(
|
|
21944
|
+
].map(function(U) {
|
|
21945
|
+
return new ga(Hf.forName(U));
|
|
21946
21946
|
}), this.encoders = [];
|
|
21947
21947
|
var u = [];
|
|
21948
21948
|
u.push(new ga(Gf.ISO_8859_1));
|
|
@@ -21956,8 +21956,8 @@ var fa = 129, Ho = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21956
21956
|
break;
|
|
21957
21957
|
}
|
|
21958
21958
|
}
|
|
21959
|
-
} catch (
|
|
21960
|
-
i = { error:
|
|
21959
|
+
} catch (U) {
|
|
21960
|
+
i = { error: U };
|
|
21961
21961
|
} finally {
|
|
21962
21962
|
try {
|
|
21963
21963
|
g && !g.done && (a = v.return) && a.call(v);
|
|
@@ -21974,8 +21974,8 @@ var fa = 129, Ho = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21974
21974
|
break;
|
|
21975
21975
|
}
|
|
21976
21976
|
}
|
|
21977
|
-
} catch (
|
|
21978
|
-
o = { error:
|
|
21977
|
+
} catch (U) {
|
|
21978
|
+
o = { error: U };
|
|
21979
21979
|
} finally {
|
|
21980
21980
|
try {
|
|
21981
21981
|
w && !w.done && (s = A.return) && s.call(A);
|
|
@@ -21995,8 +21995,8 @@ var fa = 129, Ho = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21995
21995
|
var y = T.value;
|
|
21996
21996
|
this.encoders[S++] = y;
|
|
21997
21997
|
}
|
|
21998
|
-
} catch (
|
|
21999
|
-
l = { error:
|
|
21998
|
+
} catch (U) {
|
|
21999
|
+
l = { error: U };
|
|
22000
22000
|
} finally {
|
|
22001
22001
|
try {
|
|
22002
22002
|
T && !T.done && (c = O.return) && c.call(O);
|
|
@@ -22036,7 +22036,7 @@ var fa = 129, Ho = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
22036
22036
|
}, r.prototype.encode = function(e, t) {
|
|
22037
22037
|
if (!(t < this.length()))
|
|
22038
22038
|
throw new Error("index must be less than length");
|
|
22039
|
-
return at.encode(
|
|
22039
|
+
return at.encode(K.getCharAt(e), this.encoders[t].name);
|
|
22040
22040
|
}, r;
|
|
22041
22041
|
}()
|
|
22042
22042
|
), h1 = 3, p1 = (
|
|
@@ -22439,22 +22439,22 @@ var qo = S1(Se.createInt32Array(6, 6)), b1 = function(r) {
|
|
|
22439
22439
|
}
|
|
22440
22440
|
return o;
|
|
22441
22441
|
}, r.prototype.toString = function() {
|
|
22442
|
-
return
|
|
22442
|
+
return K.format("%s bits=%d bytes=%d", _1[this.mode], this.bitCount, this.binaryShiftByteCount);
|
|
22443
22443
|
}, r.calculateBinaryShiftCost = function(e) {
|
|
22444
22444
|
return e.binaryShiftByteCount > 62 ? 21 : e.binaryShiftByteCount > 31 ? 20 : e.binaryShiftByteCount > 0 ? 10 : 0;
|
|
22445
22445
|
}, r.INITIAL_STATE = new r(A1, Et, 0, 0), r;
|
|
22446
22446
|
}()
|
|
22447
22447
|
);
|
|
22448
22448
|
function O1(r) {
|
|
22449
|
-
var e =
|
|
22449
|
+
var e = K.getCharCode(" "), t = K.getCharCode("."), n = K.getCharCode(",");
|
|
22450
22450
|
r[Et][e] = 1;
|
|
22451
|
-
for (var i =
|
|
22451
|
+
for (var i = K.getCharCode("Z"), a = K.getCharCode("A"), o = a; o <= i; o++)
|
|
22452
22452
|
r[Et][o] = o - a + 2;
|
|
22453
22453
|
r[$r][e] = 1;
|
|
22454
|
-
for (var s =
|
|
22454
|
+
for (var s = K.getCharCode("z"), l = K.getCharCode("a"), o = l; o <= s; o++)
|
|
22455
22455
|
r[$r][o] = o - l + 2;
|
|
22456
22456
|
r[it][e] = 1;
|
|
22457
|
-
for (var c =
|
|
22457
|
+
for (var c = K.getCharCode("9"), u = K.getCharCode("0"), o = u; o <= c; o++)
|
|
22458
22458
|
r[it][o] = o - u + 2;
|
|
22459
22459
|
r[it][n] = 12, r[it][t] = 13;
|
|
22460
22460
|
for (var d = [
|
|
@@ -22488,7 +22488,7 @@ function O1(r) {
|
|
|
22488
22488
|
"~",
|
|
22489
22489
|
""
|
|
22490
22490
|
], f = 0; f < d.length; f++)
|
|
22491
|
-
r[Go][
|
|
22491
|
+
r[Go][K.getCharCode(d[f])] = f;
|
|
22492
22492
|
for (var h = [
|
|
22493
22493
|
"\0",
|
|
22494
22494
|
"\r",
|
|
@@ -22522,7 +22522,7 @@ function O1(r) {
|
|
|
22522
22522
|
"{",
|
|
22523
22523
|
"}"
|
|
22524
22524
|
], f = 0; f < h.length; f++)
|
|
22525
|
-
|
|
22525
|
+
K.getCharCode(h[f]) > 0 && (r[ft][K.getCharCode(h[f])] = f);
|
|
22526
22526
|
return r;
|
|
22527
22527
|
}
|
|
22528
22528
|
var Pn = O1(Se.createInt32Array(5, 256)), Fr = function(r) {
|
|
@@ -22541,20 +22541,20 @@ var Pn = O1(Se.createInt32Array(5, 256)), Fr = function(r) {
|
|
|
22541
22541
|
this.text = e;
|
|
22542
22542
|
}
|
|
22543
22543
|
return r.prototype.encode = function() {
|
|
22544
|
-
for (var e =
|
|
22544
|
+
for (var e = K.getCharCode(" "), t = K.getCharCode(`
|
|
22545
22545
|
`), n = ma.singletonList(I1.INITIAL_STATE), i = 0; i < this.text.length; i++) {
|
|
22546
22546
|
var a = void 0, o = i + 1 < this.text.length ? this.text[i + 1] : 0;
|
|
22547
22547
|
switch (this.text[i]) {
|
|
22548
|
-
case
|
|
22548
|
+
case K.getCharCode("\r"):
|
|
22549
22549
|
a = o === t ? 2 : 0;
|
|
22550
22550
|
break;
|
|
22551
|
-
case
|
|
22551
|
+
case K.getCharCode("."):
|
|
22552
22552
|
a = o === e ? 3 : 0;
|
|
22553
22553
|
break;
|
|
22554
|
-
case
|
|
22554
|
+
case K.getCharCode(","):
|
|
22555
22555
|
a = o === e ? 4 : 0;
|
|
22556
22556
|
break;
|
|
22557
|
-
case
|
|
22557
|
+
case K.getCharCode(":"):
|
|
22558
22558
|
a = o === e ? 5 : 0;
|
|
22559
22559
|
break;
|
|
22560
22560
|
default:
|
|
@@ -22687,7 +22687,7 @@ var Pn = O1(Se.createInt32Array(5, 256)), Fr = function(r) {
|
|
|
22687
22687
|
var i = new N1(e).encode(), a = j.truncDivision(i.getSize() * t, 100) + 11, o = i.getSize() + a, s, l, c, u, d;
|
|
22688
22688
|
if (n !== r.DEFAULT_AZTEC_LAYERS) {
|
|
22689
22689
|
if (s = n < 0, l = Math.abs(n), l > (s ? r.MAX_NB_BITS_COMPACT : r.MAX_NB_BITS))
|
|
22690
|
-
throw new H(
|
|
22690
|
+
throw new H(K.format("Illegal value %s for layers", n));
|
|
22691
22691
|
c = r.totalBitsInLayer(l, s), u = r.WORD_SIZE[l];
|
|
22692
22692
|
var f = c - c % u;
|
|
22693
22693
|
if (d = r.stuffBits(i, u), d.getSize() + a > f)
|
|
@@ -22720,21 +22720,21 @@ var Pn = O1(Se.createInt32Array(5, 256)), Fr = function(r) {
|
|
|
22720
22720
|
}
|
|
22721
22721
|
}
|
|
22722
22722
|
for (var T = new vt(A), h = 0, F = 0; h < l; h++) {
|
|
22723
|
-
for (var
|
|
22724
|
-
for (var
|
|
22725
|
-
v.get(F +
|
|
22726
|
-
F +=
|
|
22723
|
+
for (var U = (l - h) * 4 + (s ? 9 : 12), L = 0; L < U; L++)
|
|
22724
|
+
for (var Y = L * 2, X = 0; X < 2; X++)
|
|
22725
|
+
v.get(F + Y + X) && T.set(C[h * 2 + X], C[h * 2 + L]), v.get(F + U * 2 + Y + X) && T.set(C[h * 2 + L], C[m - 1 - h * 2 - X]), v.get(F + U * 4 + Y + X) && T.set(C[m - 1 - h * 2 - X], C[m - 1 - h * 2 - L]), v.get(F + U * 6 + Y + X) && T.set(C[m - 1 - h * 2 - L], C[h * 2 + X]);
|
|
22726
|
+
F += U * 8;
|
|
22727
22727
|
}
|
|
22728
22728
|
if (r.drawModeMessage(T, s, A, y), s)
|
|
22729
22729
|
r.drawBullsEye(T, j.truncDivision(A, 2), 5);
|
|
22730
22730
|
else {
|
|
22731
22731
|
r.drawBullsEye(T, j.truncDivision(A, 2), 7);
|
|
22732
|
-
for (var h = 0,
|
|
22732
|
+
for (var h = 0, L = 0; h < j.truncDivision(m, 2) - 1; h += 15, L += 16)
|
|
22733
22733
|
for (var X = j.truncDivision(A, 2) & 1; X < A; X += 2)
|
|
22734
|
-
T.set(j.truncDivision(A, 2) -
|
|
22734
|
+
T.set(j.truncDivision(A, 2) - L, X), T.set(j.truncDivision(A, 2) + L, X), T.set(X, j.truncDivision(A, 2) - L), T.set(X, j.truncDivision(A, 2) + L);
|
|
22735
22735
|
}
|
|
22736
|
-
var
|
|
22737
|
-
return
|
|
22736
|
+
var Z = new g1();
|
|
22737
|
+
return Z.setCompact(s), Z.setSize(A), Z.setLayers(l), Z.setCodeWords(g), Z.setMatrix(T), Z;
|
|
22738
22738
|
}, r.drawBullsEye = function(e, t, n) {
|
|
22739
22739
|
for (var i = 0; i < n; i += 2)
|
|
22740
22740
|
for (var a = t - i; a <= t + i; a++)
|
|
@@ -22866,7 +22866,7 @@ const D1 = /* @__PURE__ */ new Map([
|
|
|
22866
22866
|
P.UPC_EAN_EXTENSION
|
|
22867
22867
|
]
|
|
22868
22868
|
]
|
|
22869
|
-
]), yi =
|
|
22869
|
+
]), yi = z((r) => {
|
|
22870
22870
|
const {
|
|
22871
22871
|
children: e,
|
|
22872
22872
|
open: t,
|
|
@@ -22886,7 +22886,7 @@ const D1 = /* @__PURE__ */ new Map([
|
|
|
22886
22886
|
] });
|
|
22887
22887
|
});
|
|
22888
22888
|
yi.displayName = "Scanner";
|
|
22889
|
-
const Xo =
|
|
22889
|
+
const Xo = z((r) => {
|
|
22890
22890
|
const { paused: e, timeBetweenDecodingAttempts: t, onDecodeResult: n, onDecodeError: i, onError: a } = r, { ref: o } = ol({
|
|
22891
22891
|
paused: e,
|
|
22892
22892
|
timeBetweenDecodingAttempts: t,
|
|
@@ -22901,7 +22901,7 @@ const Xo = L((r) => {
|
|
|
22901
22901
|
] });
|
|
22902
22902
|
});
|
|
22903
22903
|
Xo.displayName = "ScannerInternal";
|
|
22904
|
-
const R1 =
|
|
22904
|
+
const R1 = z((r) => {
|
|
22905
22905
|
const { children: e } = r, [t, n] = Xe(null), i = b(() => {
|
|
22906
22906
|
n(null);
|
|
22907
22907
|
}, []), a = b(
|
|
@@ -22918,7 +22918,7 @@ const R1 = L((r) => {
|
|
|
22918
22918
|
] });
|
|
22919
22919
|
});
|
|
22920
22920
|
R1.displayName = "FileViewerProvider";
|
|
22921
|
-
const Wo =
|
|
22921
|
+
const Wo = z((r) => {
|
|
22922
22922
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), [c, u] = Xe(!1), d = b(
|
|
22923
22923
|
(y) => {
|
|
22924
22924
|
const m = y.target.value;
|
|
@@ -23037,7 +23037,7 @@ class Ar extends tt {
|
|
|
23037
23037
|
return t === n;
|
|
23038
23038
|
}
|
|
23039
23039
|
}
|
|
23040
|
-
const Ca = 500, $o =
|
|
23040
|
+
const Ca = 500, $o = z((r) => {
|
|
23041
23041
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
23042
23042
|
(f) => {
|
|
23043
23043
|
const h = f.target.value;
|
|
@@ -23112,7 +23112,7 @@ class nr extends xo {
|
|
|
23112
23112
|
return /* @__PURE__ */ p($o, { field: this });
|
|
23113
23113
|
}
|
|
23114
23114
|
}
|
|
23115
|
-
const jo =
|
|
23115
|
+
const jo = z((r) => {
|
|
23116
23116
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
23117
23117
|
(d) => {
|
|
23118
23118
|
const f = d.target.value;
|
|
@@ -23243,7 +23243,7 @@ const rn = (r) => {
|
|
|
23243
23243
|
}, Pr = (r) => typeof r == "object" && (Te(r.from) || Te(r.to)), Zo = (r, e) => {
|
|
23244
23244
|
const t = Rt(r), n = e.from ? Rt(e.from) : null, i = e.to ? Rt(e.to) : null;
|
|
23245
23245
|
return n === null && i === null ? !0 : n === null ? t <= i : i === null ? t >= n : n <= i ? t >= n && t <= i : t >= n || t <= i;
|
|
23246
|
-
}, Ci =
|
|
23246
|
+
}, Ci = z((r) => {
|
|
23247
23247
|
const { value: e, onChange: t, onBlur: n, disabled: i, size: a = "md", id: o, name: s, compact: l = !1 } = r, c = e ? rn(e) : null, u = c ? `${c.hours.toString().padStart(2, "0")}:${c.minutes.toString().padStart(2, "0")}` : "", d = b(
|
|
23248
23248
|
(v) => {
|
|
23249
23249
|
const g = v.target.value;
|
|
@@ -23318,7 +23318,7 @@ const rn = (r) => {
|
|
|
23318
23318
|
] });
|
|
23319
23319
|
});
|
|
23320
23320
|
Ci.displayName = "TimeFieldControl";
|
|
23321
|
-
const Ko =
|
|
23321
|
+
const Ko = z((r) => {
|
|
23322
23322
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e });
|
|
23323
23323
|
return /* @__PURE__ */ p(
|
|
23324
23324
|
Me,
|
|
@@ -23394,7 +23394,7 @@ class Er extends tt {
|
|
|
23394
23394
|
return t === n;
|
|
23395
23395
|
}
|
|
23396
23396
|
}
|
|
23397
|
-
const Qo =
|
|
23397
|
+
const Qo = z((r) => {
|
|
23398
23398
|
var y;
|
|
23399
23399
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = Yr(null), u = b(() => {
|
|
23400
23400
|
var m;
|
|
@@ -23447,7 +23447,7 @@ const Qo = L((r) => {
|
|
|
23447
23447
|
{
|
|
23448
23448
|
className: "w-max",
|
|
23449
23449
|
size: t,
|
|
23450
|
-
variant: "
|
|
23450
|
+
variant: "surface",
|
|
23451
23451
|
accentColor: "base",
|
|
23452
23452
|
onClick: u,
|
|
23453
23453
|
type: "button",
|
|
@@ -23624,7 +23624,7 @@ class ar extends tt {
|
|
|
23624
23624
|
return t.length === n.length;
|
|
23625
23625
|
}
|
|
23626
23626
|
}
|
|
23627
|
-
const Jo =
|
|
23627
|
+
const Jo = z((r) => {
|
|
23628
23628
|
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
23629
23629
|
(h) => {
|
|
23630
23630
|
const v = h.target.value;
|
|
@@ -24225,7 +24225,7 @@ class Ue extends Kr {
|
|
|
24225
24225
|
return t;
|
|
24226
24226
|
}
|
|
24227
24227
|
}
|
|
24228
|
-
const fs =
|
|
24228
|
+
const fs = z, Bt = fs(function(r) {
|
|
24229
24229
|
const { ref: e, children: t, ...n } = r, i = b(
|
|
24230
24230
|
(a) => typeof t == "function" ? /* @__PURE__ */ _(Ie, { children: [
|
|
24231
24231
|
t(a),
|
|
@@ -24249,7 +24249,7 @@ const fs = L, Bt = fs(function(r) {
|
|
|
24249
24249
|
[t]
|
|
24250
24250
|
);
|
|
24251
24251
|
return /* @__PURE__ */ p(D.MultiSelectItem, { ref: e, ...n, children: i });
|
|
24252
|
-
}), bi =
|
|
24252
|
+
}), bi = z((r) => {
|
|
24253
24253
|
const { ref: e, children: t, ...n } = r, i = b(
|
|
24254
24254
|
(a) => typeof t == "function" ? /* @__PURE__ */ _(Ie, { children: [
|
|
24255
24255
|
t(a),
|
|
@@ -24274,7 +24274,7 @@ const He = (r) => {
|
|
|
24274
24274
|
/* @__PURE__ */ p(D.ClickTrigger, { children: e }),
|
|
24275
24275
|
/* @__PURE__ */ p(D.Content, { size: n, variant: i, radius: o, accentColor: a, children: /* @__PURE__ */ p(D.SelectGroup, { required: !0, value: t.getConditionModifier(), onValueChange: s, children: t.getConditionModifiers().map(([l, c]) => /* @__PURE__ */ p(Bt, { value: l, children: c.modifier.label }, l)) }) })
|
|
24276
24276
|
] });
|
|
24277
|
-
}, zr =
|
|
24277
|
+
}, zr = z((r) => {
|
|
24278
24278
|
const { children: e, open: t, onOpenChange: n, defaultOpen: i, modal: a, size: o, align: s, accentColor: l = "base", ...c } = r;
|
|
24279
24279
|
return /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
|
|
24280
24280
|
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
|
|
@@ -24282,7 +24282,7 @@ const He = (r) => {
|
|
|
24282
24282
|
] });
|
|
24283
24283
|
});
|
|
24284
24284
|
zr.displayName = "DayPickerPopover";
|
|
24285
|
-
const ps =
|
|
24285
|
+
const ps = z((r) => {
|
|
24286
24286
|
const {
|
|
24287
24287
|
children: e,
|
|
24288
24288
|
open: t,
|
|
@@ -24367,7 +24367,7 @@ const ps = L((r) => {
|
|
|
24367
24367
|
] });
|
|
24368
24368
|
});
|
|
24369
24369
|
ps.displayName = "NumberInputPopover";
|
|
24370
|
-
const Mt =
|
|
24370
|
+
const Mt = z((r) => {
|
|
24371
24371
|
const {
|
|
24372
24372
|
children: e,
|
|
24373
24373
|
open: t,
|
|
@@ -24416,7 +24416,7 @@ const Fe = (r) => {
|
|
|
24416
24416
|
return /* @__PURE__ */ p(ne, { onClick: i, ...n, children: /* @__PURE__ */ p(N, { icon: bt }) });
|
|
24417
24417
|
};
|
|
24418
24418
|
Fe.displayName = "RemoveConditionButton";
|
|
24419
|
-
const Tr =
|
|
24419
|
+
const Tr = z((r) => {
|
|
24420
24420
|
const { ref: e, selectFieldOptions: t, ...n } = r, i = se(() => t.map(
|
|
24421
24421
|
(a) => typeof a == "string" ? {
|
|
24422
24422
|
value: a,
|
|
@@ -24429,7 +24429,7 @@ const Tr = L((r) => {
|
|
|
24429
24429
|
] });
|
|
24430
24430
|
});
|
|
24431
24431
|
Tr.displayName = "SelectFieldOptionMultiSelectGroup";
|
|
24432
|
-
const Ii =
|
|
24432
|
+
const Ii = z((r) => {
|
|
24433
24433
|
const { ref: e, selectFieldOptions: t, ...n } = r, i = se(() => t.map(
|
|
24434
24434
|
(a) => typeof a == "string" ? {
|
|
24435
24435
|
value: a,
|
|
@@ -24439,7 +24439,7 @@ const Ii = L((r) => {
|
|
|
24439
24439
|
return /* @__PURE__ */ p(D.SelectGroup, { ref: e, ...n, children: i.map((a) => /* @__PURE__ */ p(Bt, { value: a.value, children: /* @__PURE__ */ p("span", { className: "truncate", children: a.label }) }, a.value)) });
|
|
24440
24440
|
});
|
|
24441
24441
|
Ii.displayName = "SelectFieldOptionSelectGroup";
|
|
24442
|
-
const cr =
|
|
24442
|
+
const cr = z((r) => {
|
|
24443
24443
|
const {
|
|
24444
24444
|
children: e,
|
|
24445
24445
|
open: t,
|
|
@@ -24478,7 +24478,7 @@ const cr = L((r) => {
|
|
|
24478
24478
|
] });
|
|
24479
24479
|
});
|
|
24480
24480
|
cr.displayName = "TextInputPopover";
|
|
24481
|
-
const Ur =
|
|
24481
|
+
const Ur = z((r) => {
|
|
24482
24482
|
const {
|
|
24483
24483
|
children: e,
|
|
24484
24484
|
open: t,
|
|
@@ -26206,7 +26206,7 @@ const V0 = (r, e) => {
|
|
|
26206
26206
|
xl: ["gap-10"]
|
|
26207
26207
|
}
|
|
26208
26208
|
}
|
|
26209
|
-
}), ws =
|
|
26209
|
+
}), ws = z((r) => {
|
|
26210
26210
|
const { fieldSection: e } = r, { label: t, description: n } = e, i = Ga(), { fieldSchema: a, size: o } = ce(Ce), s = se(() => a.getFieldSections(), [a]), l = se(() => s.findIndex(({ identifier: f }) => f === e.identifier), [s, e.identifier]), c = se(() => s.filter((f) => e.identifier in f.conditions), [s, e.identifier]), u = se(() => c.length === 0 ? !0 : c.some((f) => {
|
|
26211
26211
|
const h = f.getConditions(e.identifier);
|
|
26212
26212
|
return new Oi(h).applyConditions(i);
|
|
@@ -26362,7 +26362,7 @@ R(Cr, "deserialize", (t) => {
|
|
|
26362
26362
|
return new Cr({ ...t, fields: n, conditions: i });
|
|
26363
26363
|
});
|
|
26364
26364
|
let ot = Cr;
|
|
26365
|
-
const gt = jr({}), wn =
|
|
26365
|
+
const gt = jr({}), wn = z((r) => {
|
|
26366
26366
|
const { children: e, variant: t, size: n, accentColor: i, onSelectFieldType: a, ...o } = r, s = se(() => {
|
|
26367
26367
|
const l = {
|
|
26368
26368
|
[J.Assessment]: [],
|
|
@@ -26398,7 +26398,7 @@ const gt = jr({}), wn = L((r) => {
|
|
|
26398
26398
|
] });
|
|
26399
26399
|
});
|
|
26400
26400
|
wn.displayName = "CreateFieldDropdownMenu";
|
|
26401
|
-
const _s =
|
|
26401
|
+
const _s = z((r) => {
|
|
26402
26402
|
const { fieldType: e, onSelectFieldType: t } = r, n = b(() => {
|
|
26403
26403
|
t(e);
|
|
26404
26404
|
}, [e, t]), { icon: i, name: a } = me[e];
|
|
@@ -26664,7 +26664,7 @@ const Ri = (r) => {
|
|
|
26664
26664
|
default:
|
|
26665
26665
|
return;
|
|
26666
26666
|
}
|
|
26667
|
-
}, Ss =
|
|
26667
|
+
}, Ss = z((r) => {
|
|
26668
26668
|
const { popoverInputs: e, ...t } = r;
|
|
26669
26669
|
return /* @__PURE__ */ _(xe.Root, { children: [
|
|
26670
26670
|
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ _(B, { variant: "soft", type: "button", size: "sm", accentColor: "base", children: [
|
|
@@ -26675,7 +26675,7 @@ const Ri = (r) => {
|
|
|
26675
26675
|
] });
|
|
26676
26676
|
});
|
|
26677
26677
|
Ss.displayName = "FieldSettingsPopover";
|
|
26678
|
-
const bs =
|
|
26678
|
+
const bs = z((r) => {
|
|
26679
26679
|
const { parentPath: e, fieldIndex: t, field: n } = r, i = si(), { disableRequiredFields: a } = ce(gt), [o, s] = Xe(void 0);
|
|
26680
26680
|
pt(() => {
|
|
26681
26681
|
n.image instanceof Promise ? n.image.then(s).catch(console.error) : s(n.image);
|
|
@@ -26779,7 +26779,7 @@ const bs = L((r) => {
|
|
|
26779
26779
|
] });
|
|
26780
26780
|
});
|
|
26781
26781
|
bs.displayName = "FieldBuilder";
|
|
26782
|
-
const Mi =
|
|
26782
|
+
const Mi = z((r) => {
|
|
26783
26783
|
const { field: e, fieldSection: t, fieldIndex: n, sectionIndex: i } = r, a = Yr(null), o = `fields.${i}.fields`, s = b(
|
|
26784
26784
|
(g) => {
|
|
26785
26785
|
t.addField(Ri(g), n + 1);
|
|
@@ -26836,7 +26836,7 @@ const Mi = L((r) => {
|
|
|
26836
26836
|
] });
|
|
26837
26837
|
});
|
|
26838
26838
|
Mi.displayName = "FieldBuilderWithActions";
|
|
26839
|
-
const Vi =
|
|
26839
|
+
const Vi = z((r) => {
|
|
26840
26840
|
const { children: e, variant: t, size: n, accentColor: i, fields: a, onSelectField: o, ...s } = r;
|
|
26841
26841
|
return /* @__PURE__ */ _(D.Root, { ...s, children: [
|
|
26842
26842
|
/* @__PURE__ */ p(D.ClickTrigger, { children: e }),
|
|
@@ -26844,7 +26844,7 @@ const Vi = L((r) => {
|
|
|
26844
26844
|
] });
|
|
26845
26845
|
});
|
|
26846
26846
|
Vi.displayName = "FieldDropdownMenu";
|
|
26847
|
-
const Is =
|
|
26847
|
+
const Is = z((r) => {
|
|
26848
26848
|
const { field: e, onSelectField: t } = r, n = b(() => {
|
|
26849
26849
|
t(e);
|
|
26850
26850
|
}, [e, t]);
|
|
@@ -26854,7 +26854,7 @@ const Is = L((r) => {
|
|
|
26854
26854
|
] });
|
|
26855
26855
|
});
|
|
26856
26856
|
Is.displayName = "FieldDropdownMenuItem";
|
|
26857
|
-
const Os =
|
|
26857
|
+
const Os = z((r) => {
|
|
26858
26858
|
const { children: e, variant: t, size: n, accentColor: i, fieldSections: a, onSelectFieldSection: o, ...s } = r;
|
|
26859
26859
|
return /* @__PURE__ */ _(D.Root, { ...s, children: [
|
|
26860
26860
|
/* @__PURE__ */ p(D.ClickTrigger, { children: e }),
|
|
@@ -26869,7 +26869,7 @@ const Os = L((r) => {
|
|
|
26869
26869
|
] });
|
|
26870
26870
|
});
|
|
26871
26871
|
Os.displayName = "FieldSectionDropdownMenu";
|
|
26872
|
-
const Ns =
|
|
26872
|
+
const Ns = z((r) => {
|
|
26873
26873
|
const { fieldSection: e, onSelectFieldSection: t } = r, n = b(() => {
|
|
26874
26874
|
t(e);
|
|
26875
26875
|
}, [e, t]);
|
|
@@ -26879,7 +26879,7 @@ const Ns = L((r) => {
|
|
|
26879
26879
|
] });
|
|
26880
26880
|
});
|
|
26881
26881
|
Ns.displayName = "FieldSectionDropdownMenuItem";
|
|
26882
|
-
const Ts =
|
|
26882
|
+
const Ts = z((r) => {
|
|
26883
26883
|
const { id: e, sourceX: t, sourceY: n, targetX: i, targetY: a, style: o, markerEnd: s, data: l } = r, { targetSection: c, sourceSection: u, layoutDirection: d } = l, f = se(() => u.getConditions(c.identifier), [u, c.identifier]), h = b(() => {
|
|
26884
26884
|
u.removeConditional(c.identifier);
|
|
26885
26885
|
}, [u, c.identifier]), v = b(
|
|
@@ -26954,7 +26954,7 @@ const Ts = L((r) => {
|
|
|
26954
26954
|
] });
|
|
26955
26955
|
});
|
|
26956
26956
|
Ts.displayName = "FieldSectionConditionEdgeComponent";
|
|
26957
|
-
const Ds =
|
|
26957
|
+
const Ds = z((r) => {
|
|
26958
26958
|
const { data: e, selected: t } = r, { fieldSection: n, index: i, layoutDirection: a } = e, { fieldSchema: o } = ce(gt), s = b(() => {
|
|
26959
26959
|
o.removeFieldSection(n);
|
|
26960
26960
|
}, [o, n]), l = b(
|
|
@@ -27095,19 +27095,19 @@ const L0 = {
|
|
|
27095
27095
|
];
|
|
27096
27096
|
}, H0 = {
|
|
27097
27097
|
hideAttribution: !0
|
|
27098
|
-
}, Rs =
|
|
27099
|
-
var
|
|
27098
|
+
}, Rs = z(() => {
|
|
27099
|
+
var L;
|
|
27100
27100
|
const { errors: r } = qa(), { handleSubmit: e } = Xa(), { onSave: t, onCancel: n } = ce(gt), { fieldSchema: i } = ce(gt), a = Yr(null), [o, s] = Xe(), [l, c] = Xe("TB");
|
|
27101
27101
|
Ua(() => {
|
|
27102
27102
|
a.current && a.current.classList.remove("light");
|
|
27103
27103
|
}, []);
|
|
27104
27104
|
const u = se(
|
|
27105
|
-
() => i.fieldSections.map((
|
|
27106
|
-
id:
|
|
27105
|
+
() => i.fieldSections.map((Y, X) => ({
|
|
27106
|
+
id: Y.identifier,
|
|
27107
27107
|
position: { x: 0, y: 0 },
|
|
27108
27108
|
data: {
|
|
27109
27109
|
index: X,
|
|
27110
|
-
fieldSection:
|
|
27110
|
+
fieldSection: Y,
|
|
27111
27111
|
layoutDirection: l
|
|
27112
27112
|
},
|
|
27113
27113
|
draggable: !0,
|
|
@@ -27115,19 +27115,19 @@ const L0 = {
|
|
|
27115
27115
|
})),
|
|
27116
27116
|
[i.fieldSections, l]
|
|
27117
27117
|
), d = se(() => {
|
|
27118
|
-
const
|
|
27119
|
-
for (const
|
|
27120
|
-
X[
|
|
27121
|
-
for (const
|
|
27122
|
-
const Pe =
|
|
27118
|
+
const Y = [], X = {};
|
|
27119
|
+
for (const Z of i.fieldSections)
|
|
27120
|
+
X[Z.identifier] = Z;
|
|
27121
|
+
for (const Z of i.fieldSections) {
|
|
27122
|
+
const Pe = Z.conditions;
|
|
27123
27123
|
for (const [Ze, dr] of Object.entries(Pe))
|
|
27124
|
-
|
|
27125
|
-
id: `${
|
|
27126
|
-
source:
|
|
27124
|
+
Y.push({
|
|
27125
|
+
id: `${Z.identifier}-${Ze}`,
|
|
27126
|
+
source: Z.identifier,
|
|
27127
27127
|
target: Ze,
|
|
27128
27128
|
data: {
|
|
27129
27129
|
targetSection: X[Ze],
|
|
27130
|
-
sourceSection:
|
|
27130
|
+
sourceSection: Z,
|
|
27131
27131
|
layoutDirection: l
|
|
27132
27132
|
},
|
|
27133
27133
|
animated: dr.length > 0,
|
|
@@ -27136,7 +27136,7 @@ const L0 = {
|
|
|
27136
27136
|
type: "fieldSectionCondition"
|
|
27137
27137
|
});
|
|
27138
27138
|
}
|
|
27139
|
-
return
|
|
27139
|
+
return Y;
|
|
27140
27140
|
}, [i.fieldSections, l]), [f, h, v] = Qs(u), [g, y, m] = Js(d);
|
|
27141
27141
|
pt(() => {
|
|
27142
27142
|
h(u);
|
|
@@ -27146,27 +27146,27 @@ const L0 = {
|
|
|
27146
27146
|
const [C, A] = se(() => U0(f, g, l), [g, l, f]), w = b(() => {
|
|
27147
27147
|
i.addFieldSection(new ot({ identifier: G(), fields: [] }));
|
|
27148
27148
|
}, [i]), S = b(
|
|
27149
|
-
(
|
|
27150
|
-
const { source: X, target:
|
|
27149
|
+
(Y) => {
|
|
27150
|
+
const { source: X, target: Z } = Y, Pe = i.fieldSections.find(({ identifier: Ze }) => Ze === X);
|
|
27151
27151
|
Pe.setOptions({
|
|
27152
27152
|
conditions: {
|
|
27153
27153
|
...Pe.conditions,
|
|
27154
|
-
[
|
|
27154
|
+
[Z]: []
|
|
27155
27155
|
}
|
|
27156
27156
|
});
|
|
27157
27157
|
},
|
|
27158
27158
|
[i.fieldSections]
|
|
27159
27159
|
), O = b(
|
|
27160
|
-
(
|
|
27160
|
+
(Y) => {
|
|
27161
27161
|
const X = i.getSectionDependencyGraph();
|
|
27162
|
-
return !Ha(X,
|
|
27162
|
+
return !Ha(X, Y.source, Y.target);
|
|
27163
27163
|
},
|
|
27164
27164
|
[i]
|
|
27165
27165
|
), T = b(() => {
|
|
27166
27166
|
o == null || o.zoomOut();
|
|
27167
27167
|
}, [o]), F = b(() => {
|
|
27168
27168
|
o == null || o.zoomIn();
|
|
27169
|
-
}, [o]),
|
|
27169
|
+
}, [o]), U = b(() => {
|
|
27170
27170
|
o == null || o.fitView();
|
|
27171
27171
|
}, [o]);
|
|
27172
27172
|
return /* @__PURE__ */ _("form", { className: "flex size-full flex-col gap-4", onSubmit: e(t), children: [
|
|
@@ -27214,7 +27214,7 @@ const L0 = {
|
|
|
27214
27214
|
/* @__PURE__ */ _(ue, { className: "flex flex-col", size: "sm", accentColor: "base", variant: "soft", children: [
|
|
27215
27215
|
/* @__PURE__ */ p(ne, { className: "rounded-b-none", onClick: F, type: "button", children: /* @__PURE__ */ p(N, { icon: dt }) }),
|
|
27216
27216
|
/* @__PURE__ */ p(ne, { onClick: T, radius: "none", type: "button", children: /* @__PURE__ */ p(N, { icon: Gr }) }),
|
|
27217
|
-
/* @__PURE__ */ p(ne, { className: "rounded-t-none", onClick:
|
|
27217
|
+
/* @__PURE__ */ p(ne, { className: "rounded-t-none", onClick: U, type: "button", children: /* @__PURE__ */ p(N, { icon: Sc }) })
|
|
27218
27218
|
] })
|
|
27219
27219
|
] }),
|
|
27220
27220
|
/* @__PURE__ */ p(In, { position: "bottom-right", children: /* @__PURE__ */ _(ue, { className: "flex items-center justify-end gap-2", size: "sm", children: [
|
|
@@ -27222,7 +27222,7 @@ const L0 = {
|
|
|
27222
27222
|
/* @__PURE__ */ p(B, { type: "submit", variant: "surface", children: "Save" })
|
|
27223
27223
|
] }) })
|
|
27224
27224
|
] }),
|
|
27225
|
-
!!((
|
|
27225
|
+
!!((L = r.fields) != null && L.message) && /* @__PURE__ */ p(pe, { size: "xs", accentColor: "danger", children: r.fields.message })
|
|
27226
27226
|
] });
|
|
27227
27227
|
});
|
|
27228
27228
|
Rs.displayName = "FormBuilderFlowBuilder";
|
|
@@ -27430,7 +27430,7 @@ class or extends Kr {
|
|
|
27430
27430
|
return M0(this.getFields(), t, n);
|
|
27431
27431
|
}
|
|
27432
27432
|
}
|
|
27433
|
-
const Vs =
|
|
27433
|
+
const Vs = z((r) => {
|
|
27434
27434
|
const { sourceFieldSection: e, targetFieldSection: t } = r, n = se(() => e.getConditions(t.identifier), [e, t.identifier]), i = b(() => {
|
|
27435
27435
|
e.removeConditional(t.identifier);
|
|
27436
27436
|
}, [e, t.identifier]), a = b(
|
|
@@ -27461,7 +27461,7 @@ const Vs = L((r) => {
|
|
|
27461
27461
|
] });
|
|
27462
27462
|
});
|
|
27463
27463
|
Vs.displayName = "FieldSectionConditionalItem";
|
|
27464
|
-
const Fs =
|
|
27464
|
+
const Fs = z((r) => {
|
|
27465
27465
|
const { fieldSection: e } = r, { fieldSchema: t } = ce(gt), n = se(() => t.fieldSections.filter((l) => e.identifier in l.conditions), [t.fieldSections, e.identifier]), i = b(
|
|
27466
27466
|
(l) => {
|
|
27467
27467
|
l.addConditional(e.identifier);
|
|
@@ -27536,7 +27536,7 @@ const Fs = L((r) => {
|
|
|
27536
27536
|
] });
|
|
27537
27537
|
});
|
|
27538
27538
|
Fs.displayName = "FieldSectionBuilder";
|
|
27539
|
-
const Ps =
|
|
27539
|
+
const Ps = z((r) => {
|
|
27540
27540
|
const { fieldSection: e, sectionIndex: t } = r, { fieldSchema: n } = ce(gt), i = Xs(), a = b(() => {
|
|
27541
27541
|
n.removeFieldSection(e);
|
|
27542
27542
|
}, [n, e]), o = b(
|
|
@@ -27673,7 +27673,7 @@ const Ps = L((r) => {
|
|
|
27673
27673
|
] });
|
|
27674
27674
|
});
|
|
27675
27675
|
Ps.displayName = "FieldSectionWithActions";
|
|
27676
|
-
const Bs =
|
|
27676
|
+
const Bs = z(() => {
|
|
27677
27677
|
var l;
|
|
27678
27678
|
const { handleSubmit: r } = Xa(), { errors: e } = qa(), { onSave: t, onCancel: n } = ce(gt), { fieldSchema: i } = ce(gt), a = b(() => {
|
|
27679
27679
|
i.addFieldSection(new ot({ identifier: G(), fields: [] }));
|
|
@@ -27787,7 +27787,7 @@ function ks(r) {
|
|
|
27787
27787
|
};
|
|
27788
27788
|
return e(r);
|
|
27789
27789
|
}
|
|
27790
|
-
const X0 =
|
|
27790
|
+
const X0 = z(
|
|
27791
27791
|
ni((r, e) => {
|
|
27792
27792
|
const {
|
|
27793
27793
|
disabled: t = !1,
|
|
@@ -27803,58 +27803,60 @@ const X0 = L(
|
|
|
27803
27803
|
className: f,
|
|
27804
27804
|
submitButtonProps: h,
|
|
27805
27805
|
cancelButtonProps: v,
|
|
27806
|
-
|
|
27807
|
-
|
|
27808
|
-
|
|
27809
|
-
|
|
27806
|
+
cancelIcon: g,
|
|
27807
|
+
submitIcon: y,
|
|
27808
|
+
size: m = "md"
|
|
27809
|
+
} = r, C = se(() => n.initializeValues(i), [n, i]), A = b(
|
|
27810
|
+
(L) => {
|
|
27811
|
+
o == null || o(L);
|
|
27810
27812
|
},
|
|
27811
27813
|
[o]
|
|
27812
|
-
),
|
|
27813
|
-
values:
|
|
27814
|
+
), w = Wa({
|
|
27815
|
+
values: C,
|
|
27814
27816
|
mode: "onBlur",
|
|
27815
27817
|
criteriaMode: "all",
|
|
27816
27818
|
disabled: t,
|
|
27817
|
-
resolver: (
|
|
27818
|
-
const
|
|
27819
|
-
return Object.keys(
|
|
27819
|
+
resolver: (L) => {
|
|
27820
|
+
const Y = n.validateValues(L), X = ks(Y);
|
|
27821
|
+
return Object.keys(Y).length > 0 ? {
|
|
27820
27822
|
values: {},
|
|
27821
|
-
errors:
|
|
27823
|
+
errors: X
|
|
27822
27824
|
} : {
|
|
27823
|
-
values:
|
|
27825
|
+
values: L,
|
|
27824
27826
|
errors: {}
|
|
27825
27827
|
};
|
|
27826
27828
|
}
|
|
27827
|
-
}),
|
|
27828
|
-
(
|
|
27829
|
-
a == null || a(
|
|
27829
|
+
}), S = b(
|
|
27830
|
+
(L) => {
|
|
27831
|
+
a == null || a(L);
|
|
27830
27832
|
},
|
|
27831
27833
|
[a]
|
|
27832
27834
|
);
|
|
27833
27835
|
pt(() => {
|
|
27834
|
-
const { unsubscribe:
|
|
27835
|
-
|
|
27836
|
+
const { unsubscribe: L } = w.watch((Y, { type: X }) => {
|
|
27837
|
+
X === "change" && S(Y);
|
|
27836
27838
|
});
|
|
27837
27839
|
return () => {
|
|
27838
|
-
|
|
27840
|
+
L();
|
|
27839
27841
|
};
|
|
27840
|
-
}, [
|
|
27841
|
-
const
|
|
27842
|
+
}, [w, S]);
|
|
27843
|
+
const O = Bc(n.getFieldSections()), T = se(
|
|
27842
27844
|
() => ({
|
|
27843
27845
|
fieldSchema: n,
|
|
27844
|
-
size:
|
|
27846
|
+
size: m
|
|
27845
27847
|
}),
|
|
27846
|
-
[n,
|
|
27847
|
-
),
|
|
27848
|
-
return /* @__PURE__ */ p($a, { ...
|
|
27848
|
+
[n, m]
|
|
27849
|
+
), F = !d && !!u, U = !l;
|
|
27850
|
+
return /* @__PURE__ */ p($a, { ...w, children: /* @__PURE__ */ p(Ce, { value: T, children: /* @__PURE__ */ _(
|
|
27849
27851
|
"form",
|
|
27850
27852
|
{
|
|
27851
27853
|
ref: e,
|
|
27852
27854
|
className: kt(f, "flex flex-col gap-4"),
|
|
27853
|
-
onSubmit:
|
|
27855
|
+
onSubmit: w.handleSubmit(A),
|
|
27854
27856
|
children: [
|
|
27855
|
-
/* @__PURE__ */ p("div", { className: k0({ size:
|
|
27856
|
-
!t && (
|
|
27857
|
-
|
|
27857
|
+
/* @__PURE__ */ p("div", { className: k0({ size: m }), children: O }),
|
|
27858
|
+
!t && (F || U) ? /* @__PURE__ */ _(ue, { className: "flex items-center justify-end gap-2", size: m, children: [
|
|
27859
|
+
F ? /* @__PURE__ */ _(
|
|
27858
27860
|
B,
|
|
27859
27861
|
{
|
|
27860
27862
|
accentColor: "base",
|
|
@@ -27863,12 +27865,12 @@ const X0 = L(
|
|
|
27863
27865
|
onClick: u,
|
|
27864
27866
|
...v,
|
|
27865
27867
|
children: [
|
|
27866
|
-
/* @__PURE__ */ p(N, { icon: bt }),
|
|
27868
|
+
/* @__PURE__ */ p(N, { icon: g ?? bt }),
|
|
27867
27869
|
c
|
|
27868
27870
|
]
|
|
27869
27871
|
}
|
|
27870
27872
|
) : null,
|
|
27871
|
-
|
|
27873
|
+
U ? /* @__PURE__ */ _(
|
|
27872
27874
|
B,
|
|
27873
27875
|
{
|
|
27874
27876
|
type: "submit",
|
|
@@ -27876,7 +27878,7 @@ const X0 = L(
|
|
|
27876
27878
|
variant: "surface",
|
|
27877
27879
|
...h,
|
|
27878
27880
|
children: [
|
|
27879
|
-
/* @__PURE__ */ p(N, { icon: et }),
|
|
27881
|
+
/* @__PURE__ */ p(N, { icon: y ?? et }),
|
|
27880
27882
|
s
|
|
27881
27883
|
]
|
|
27882
27884
|
}
|
|
@@ -27886,12 +27888,12 @@ const X0 = L(
|
|
|
27886
27888
|
}
|
|
27887
27889
|
) }) });
|
|
27888
27890
|
})
|
|
27889
|
-
), Ls =
|
|
27891
|
+
), Ls = z(() => {
|
|
27890
27892
|
const { fieldSchema: r } = ce(gt);
|
|
27891
27893
|
return /* @__PURE__ */ p(X0, { fieldSchema: r, disabled: !1 });
|
|
27892
27894
|
});
|
|
27893
27895
|
Ls.displayName = "FormBuilderPreview";
|
|
27894
|
-
const zs =
|
|
27896
|
+
const zs = z((r) => {
|
|
27895
27897
|
const { children: e, initialFields: t, onSave: n, onCancel: i, disableRequiredFields: a = !1 } = r, o = b((v) => {
|
|
27896
27898
|
var A;
|
|
27897
27899
|
const g = {};
|
|
@@ -27900,7 +27902,7 @@ const zs = L((r) => {
|
|
|
27900
27902
|
for (const [w, S] of v.fields.entries())
|
|
27901
27903
|
for (const [O, T] of S.fields.entries()) {
|
|
27902
27904
|
const F = ((A = Es(T.type, `fields.${w}.fields.${O}`)) == null ? void 0 : A.map(
|
|
27903
|
-
({ field:
|
|
27905
|
+
({ field: U }) => U
|
|
27904
27906
|
)) ?? [];
|
|
27905
27907
|
y.push(...F);
|
|
27906
27908
|
}
|