@snksergio/design-system 0.54.0 → 0.55.0
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-lib/chunks/{avatar-DAmZ7fBZ.cjs → avatar-CMWPg3A3.cjs} +157 -70
- package/dist-lib/chunks/avatar-CMWPg3A3.cjs.map +1 -0
- package/dist-lib/chunks/{avatar-FPbG1TRy.mjs → avatar-CZRLkTxt.mjs} +214 -127
- package/dist-lib/chunks/avatar-CZRLkTxt.mjs.map +1 -0
- package/dist-lib/chunks/{input-tjIT8HNE.mjs → input-BQABJR2N.mjs} +2 -2
- package/dist-lib/chunks/{input-tjIT8HNE.mjs.map → input-BQABJR2N.mjs.map} +1 -1
- package/dist-lib/chunks/{input-Ci_2-5Te.cjs → input-DqaLFxER.cjs} +2 -2
- package/dist-lib/chunks/{input-Ci_2-5Te.cjs.map → input-DqaLFxER.cjs.map} +1 -1
- package/dist-lib/chunks/{kpi-delta-BRTgTaO1.mjs → kpi-delta-Bfs_oVpq.mjs} +3 -3
- package/dist-lib/chunks/{kpi-delta-BRTgTaO1.mjs.map → kpi-delta-Bfs_oVpq.mjs.map} +1 -1
- package/dist-lib/chunks/{kpi-delta-1-gsPFvU.cjs → kpi-delta-wEzw5zSu.cjs} +3 -3
- package/dist-lib/chunks/{kpi-delta-1-gsPFvU.cjs.map → kpi-delta-wEzw5zSu.cjs.map} +1 -1
- package/dist-lib/chunks/{page-header-DrKDiVFN.cjs → page-header-sValhWca.cjs} +2 -2
- package/dist-lib/chunks/{page-header-DrKDiVFN.cjs.map → page-header-sValhWca.cjs.map} +1 -1
- package/dist-lib/chunks/{page-header-DdWp9c-r.mjs → page-header-t5hFIp7o.mjs} +2 -2
- package/dist-lib/chunks/{page-header-DdWp9c-r.mjs.map → page-header-t5hFIp7o.mjs.map} +1 -1
- package/dist-lib/chunks/{panel-DsOKm4Im.mjs → panel-C3puLY_V.mjs} +5 -5
- package/dist-lib/chunks/{panel-DsOKm4Im.mjs.map → panel-C3puLY_V.mjs.map} +1 -1
- package/dist-lib/chunks/{panel-CTbiCa0_.cjs → panel-DmnK2n5_.cjs} +5 -5
- package/dist-lib/chunks/{panel-CTbiCa0_.cjs.map → panel-DmnK2n5_.cjs.map} +1 -1
- package/dist-lib/chunks/{sheet-DIpYkRYS.mjs → sheet-Bjjo4ZaT.mjs} +2 -2
- package/dist-lib/chunks/{sheet-DIpYkRYS.mjs.map → sheet-Bjjo4ZaT.mjs.map} +1 -1
- package/dist-lib/chunks/{sheet-rg6uupt1.cjs → sheet-BrYriaDN.cjs} +2 -2
- package/dist-lib/chunks/{sheet-rg6uupt1.cjs.map → sheet-BrYriaDN.cjs.map} +1 -1
- package/dist-lib/chunks/{toggle-group-BTnqY_nt.cjs → toggle-group-DeoBmogo.cjs} +2 -89
- package/dist-lib/chunks/toggle-group-DeoBmogo.cjs.map +1 -0
- package/dist-lib/chunks/{toggle-group-BYmj8142.mjs → toggle-group-XMgZgL-H.mjs} +90 -177
- package/dist-lib/chunks/toggle-group-XMgZgL-H.mjs.map +1 -0
- package/dist-lib/chunks/{useTheme-Dh3POjCr.cjs → useTheme-BTjHuaT2.cjs} +225 -84
- package/dist-lib/chunks/useTheme-BTjHuaT2.cjs.map +1 -0
- package/dist-lib/chunks/{useTheme-Bk8AYqLr.mjs → useTheme-caPM-I73.mjs} +267 -126
- package/dist-lib/chunks/useTheme-caPM-I73.mjs.map +1 -0
- package/dist-lib/index.cjs +18 -8
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.mjs +436 -426
- package/dist-lib/index.mjs.map +1 -1
- package/dist-lib/preview/chat.cjs +3 -3
- package/dist-lib/preview/chat.mjs +3 -3
- package/dist-lib/preview/clientes.cjs +6 -6
- package/dist-lib/preview/clientes.mjs +6 -6
- package/dist-lib/preview/dashboard.cjs +4 -4
- package/dist-lib/preview/dashboard.mjs +4 -4
- package/dist-lib/shadcn.cjs +11 -11
- package/dist-lib/shadcn.mjs +153 -153
- package/dist-lib/src/components/index.d.ts +1 -0
- package/dist-lib/src/components/index.d.ts.map +1 -1
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.d.ts +35 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.styles.d.ts +94 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.types.d.ts +50 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb-switcher.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.d.ts +32 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.styles.d.ts +111 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.styles.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.types.d.ts +40 -0
- package/dist-lib/src/components/ui/Breadcrumb/breadcrumb.types.d.ts.map +1 -0
- package/dist-lib/src/components/ui/Breadcrumb/index.d.ts +21 -0
- package/dist-lib/src/components/ui/Breadcrumb/index.d.ts.map +1 -0
- package/dist-lib/src/components/ui/DataTable/parts/data-table-cell-addons.styles.d.ts +3 -3
- package/dist-lib/src/components/ui/Header/header-breadcrumb.d.ts +13 -3
- package/dist-lib/src/components/ui/Header/header-breadcrumb.d.ts.map +1 -1
- package/dist-lib/src/components/ui/Header/header.styles.d.ts +12 -33
- package/dist-lib/src/components/ui/Header/header.styles.d.ts.map +1 -1
- package/dist-lib/src/components/ui/Header/header.types.d.ts +17 -0
- package/dist-lib/src/components/ui/Header/header.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist-lib/chunks/avatar-DAmZ7fBZ.cjs.map +0 -1
- package/dist-lib/chunks/avatar-FPbG1TRy.mjs.map +0 -1
- package/dist-lib/chunks/toggle-group-BTnqY_nt.cjs.map +0 -1
- package/dist-lib/chunks/toggle-group-BYmj8142.mjs.map +0 -1
- package/dist-lib/chunks/useTheme-Bk8AYqLr.mjs.map +0 -1
- package/dist-lib/chunks/useTheme-Dh3POjCr.cjs.map +0 -1
package/dist-lib/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { g as getContrastTextColor, a as FormField, e as Avatar, i as isFilterEntryActive, f as FilterPopover, T as ToolbarToolButton, h as ButtonGroup, j as ToolbarSimpleFilterDrawer, k as TableToolbar, l as ToolbarActions, m as ToolbarFilterButton, n as ToolbarSearch, o as ToolbarApplied, q as ToolbarTabs, r as columnTypeRegistry, L as ListItem, s as List } from "./chunks/panel-
|
|
2
|
-
import { t, A, u, B, v, C, w, x, y, D, z, E, G, H, I, J, K, M, N, d, O, Q, R, S, U, F, b, V, c, W, X, P, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, p, al, am, an, ao, ap } from "./chunks/panel-
|
|
3
|
-
import { C as Chip } from "./chunks/useTheme-
|
|
4
|
-
import { A as A2, a, b as b2, H as H2,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { g as getContrastTextColor, a as FormField, e as Avatar, i as isFilterEntryActive, f as FilterPopover, T as ToolbarToolButton, h as ButtonGroup, j as ToolbarSimpleFilterDrawer, k as TableToolbar, l as ToolbarActions, m as ToolbarFilterButton, n as ToolbarSearch, o as ToolbarApplied, q as ToolbarTabs, r as columnTypeRegistry, L as ListItem, s as List } from "./chunks/panel-C3puLY_V.mjs";
|
|
2
|
+
import { t, A, u, B, v, C, w, x, y, D, z, E, G, H, I, J, K, M, N, d, O, Q, R, S, U, F, b, V, c, W, X, P, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, p, al, am, an, ao, ap } from "./chunks/panel-C3puLY_V.mjs";
|
|
3
|
+
import { C as Chip } from "./chunks/useTheme-caPM-I73.mjs";
|
|
4
|
+
import { A as A2, B as B2, c as c2, a, b as b2, H as H2, d as d2, e, f, g, h, M as M2, S as S2, i, j, k, l, m, n, o, U as U2, p as p2, q, r, s, t as t2, v as v2, w as w2, x as x2, y as y2, z as z2, u as u2 } from "./chunks/useTheme-caPM-I73.mjs";
|
|
5
|
+
import { af as tv, c as cn, a0 as Popover, a4 as PopoverTrigger, a3 as PopoverContent, ae as Button, D as Dialog, G as DialogTrigger, v as DialogContent, F as DialogTitle, a1 as PopoverAnchor, u as DialogClose, w as DialogDescription, H as DropdownMenu, V as DropdownMenuTrigger, J as DropdownMenuContent, M as DropdownMenuLabel, Q as DropdownMenuSeparator, L as DropdownMenuItem } from "./chunks/avatar-CZRLkTxt.mjs";
|
|
6
|
+
import { d as d3, e as e2, f as f2, g as g2, h as h2, i as i2, W as W2, X as X2, Y as Y2, Z as Z2, _ as _2, $ as $2, I as I2, O as O2, P as P2, ag as ag2, ad as ad2 } from "./chunks/avatar-CZRLkTxt.mjs";
|
|
7
7
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import { createContext, forwardRef, useContext, useId, useState, Fragment as Fragment$1, isValidElement, useCallback, useMemo, createElement, useRef, useEffect, useLayoutEffect, Children } from "react";
|
|
10
|
-
import { Q as Switch, l as Checkbox, C as Calendar, T as Textarea } from "./chunks/sheet-
|
|
11
|
-
import { G as G2, H as
|
|
12
|
-
import {
|
|
13
|
-
import { B as
|
|
14
|
-
import { Check, MoreHorizontal, SlidersHorizontal, Calendar as Calendar$1, AlertCircle, CheckCheck, Clock, MoreVertical, Ban, X as
|
|
10
|
+
import { Q as Switch, l as Checkbox, C as Calendar, T as Textarea } from "./chunks/sheet-Bjjo4ZaT.mjs";
|
|
11
|
+
import { G as G2, H as H3, F as F2, O as O3 } from "./chunks/sheet-Bjjo4ZaT.mjs";
|
|
12
|
+
import { ao as RadioGroup, ap as RadioGroupItem, as as Separator, at as Skeleton, T as HoverCard, V as HoverCardTrigger, U as HoverCardContent } from "./chunks/toggle-group-XMgZgL-H.mjs";
|
|
13
|
+
import { B as B3, aC } from "./chunks/toggle-group-XMgZgL-H.mjs";
|
|
14
|
+
import { Check, MoreHorizontal, SlidersHorizontal, Calendar as Calendar$1, AlertCircle, CheckCheck, Clock, MoreVertical, Ban, X as X3, CalendarDays, ChevronDown, ChevronLeft, ChevronRight, Circle, Plus, RefreshCw, OctagonX, TriangleAlert, CircleCheck, Info, Bell } from "lucide-react";
|
|
15
15
|
import { Reply } from "lucide-react";
|
|
16
|
-
import { I as Input } from "./chunks/input-
|
|
17
|
-
import { i as
|
|
18
|
-
import { a as a10, b as b3, K as K2 } from "./chunks/kpi-delta-
|
|
19
|
-
import { P as P3, p as p3 } from "./chunks/page-header-
|
|
16
|
+
import { I as Input } from "./chunks/input-BQABJR2N.mjs";
|
|
17
|
+
import { i as i3 } from "./chunks/input-BQABJR2N.mjs";
|
|
18
|
+
import { a as a10, b as b3, K as K2 } from "./chunks/kpi-delta-Bfs_oVpq.mjs";
|
|
19
|
+
import { P as P3, p as p3 } from "./chunks/page-header-t5hFIp7o.mjs";
|
|
20
20
|
import * as RechartsPrimitive from "recharts";
|
|
21
21
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
22
22
|
import "@hello-pangea/dnd";
|
|
@@ -434,12 +434,12 @@ const DEFAULT_COLOR_PRESETS = [
|
|
|
434
434
|
"#111827"
|
|
435
435
|
];
|
|
436
436
|
function normalizeHex(raw) {
|
|
437
|
-
let
|
|
438
|
-
if (/^[0-9a-fA-F]{3}$/.test(
|
|
439
|
-
|
|
437
|
+
let h3 = raw.trim().replace(/^#/, "");
|
|
438
|
+
if (/^[0-9a-fA-F]{3}$/.test(h3)) {
|
|
439
|
+
h3 = h3.split("").map((c3) => c3 + c3).join("");
|
|
440
440
|
}
|
|
441
|
-
if (/^[0-9a-fA-F]{6}$/.test(
|
|
442
|
-
return `#${
|
|
441
|
+
if (/^[0-9a-fA-F]{6}$/.test(h3)) {
|
|
442
|
+
return `#${h3.toUpperCase()}`;
|
|
443
443
|
}
|
|
444
444
|
return null;
|
|
445
445
|
}
|
|
@@ -530,11 +530,11 @@ const ColorPicker = forwardRef(
|
|
|
530
530
|
"aria-label": "Cor hexadecimal",
|
|
531
531
|
className: styles2.hexInput(),
|
|
532
532
|
value: inlineDraft,
|
|
533
|
-
onChange: (
|
|
533
|
+
onChange: (e3) => setInlineDraft(e3.target.value),
|
|
534
534
|
onBlur: handleInlineCommit,
|
|
535
|
-
onKeyDown: (
|
|
536
|
-
if (
|
|
537
|
-
|
|
535
|
+
onKeyDown: (e3) => {
|
|
536
|
+
if (e3.key === "Enter") {
|
|
537
|
+
e3.preventDefault();
|
|
538
538
|
handleInlineCommit();
|
|
539
539
|
}
|
|
540
540
|
}
|
|
@@ -595,10 +595,10 @@ const ColorPicker = forwardRef(
|
|
|
595
595
|
placeholder,
|
|
596
596
|
"aria-label": "Cor hexadecimal",
|
|
597
597
|
value: customDraft,
|
|
598
|
-
onChange: (
|
|
599
|
-
onKeyDown: (
|
|
600
|
-
if (
|
|
601
|
-
|
|
598
|
+
onChange: (e3) => setCustomDraft(e3.target.value),
|
|
599
|
+
onKeyDown: (e3) => {
|
|
600
|
+
if (e3.key === "Enter") {
|
|
601
|
+
e3.preventDefault();
|
|
602
602
|
handleCustomConfirm();
|
|
603
603
|
}
|
|
604
604
|
}
|
|
@@ -705,12 +705,12 @@ function parseInline(text, s2, prefix) {
|
|
|
705
705
|
function parseLinksAndInline(text, s2, prefix) {
|
|
706
706
|
const out = [];
|
|
707
707
|
let last = 0;
|
|
708
|
-
let
|
|
708
|
+
let i4 = 0;
|
|
709
709
|
URL_RE.lastIndex = 0;
|
|
710
710
|
let m2;
|
|
711
711
|
while ((m2 = URL_RE.exec(text)) !== null) {
|
|
712
712
|
if (m2.index > last) {
|
|
713
|
-
pushAll(out, parseInline(text.slice(last, m2.index), s2, `${prefix}-${
|
|
713
|
+
pushAll(out, parseInline(text.slice(last, m2.index), s2, `${prefix}-${i4}t`));
|
|
714
714
|
}
|
|
715
715
|
const raw = m2[0];
|
|
716
716
|
const href = raw.startsWith("www.") ? `https://${raw}` : raw;
|
|
@@ -724,36 +724,36 @@ function parseLinksAndInline(text, s2, prefix) {
|
|
|
724
724
|
className: s2.link(),
|
|
725
725
|
children: raw
|
|
726
726
|
},
|
|
727
|
-
`${prefix}-${
|
|
727
|
+
`${prefix}-${i4}link`
|
|
728
728
|
)
|
|
729
729
|
);
|
|
730
730
|
last = m2.index + raw.length;
|
|
731
|
-
|
|
731
|
+
i4 += 1;
|
|
732
732
|
}
|
|
733
733
|
if (last < text.length) {
|
|
734
|
-
pushAll(out, parseInline(text.slice(last), s2, `${prefix}-${
|
|
734
|
+
pushAll(out, parseInline(text.slice(last), s2, `${prefix}-${i4}t`));
|
|
735
735
|
}
|
|
736
736
|
return out;
|
|
737
737
|
}
|
|
738
738
|
function parseMarkdown(source, s2) {
|
|
739
739
|
const out = [];
|
|
740
740
|
let last = 0;
|
|
741
|
-
let
|
|
741
|
+
let i4 = 0;
|
|
742
742
|
CODE_RE.lastIndex = 0;
|
|
743
743
|
let m2;
|
|
744
744
|
while ((m2 = CODE_RE.exec(source)) !== null) {
|
|
745
745
|
if (m2.index > last) {
|
|
746
|
-
pushAll(out, parseLinksAndInline(source.slice(last, m2.index), s2, `${
|
|
746
|
+
pushAll(out, parseLinksAndInline(source.slice(last, m2.index), s2, `${i4}t`));
|
|
747
747
|
}
|
|
748
748
|
const codeContent = m2[1] ?? m2[2] ?? "";
|
|
749
749
|
out.push(
|
|
750
|
-
/* @__PURE__ */ jsx("code", { className: s2.code(), children: codeContent }, `${
|
|
750
|
+
/* @__PURE__ */ jsx("code", { className: s2.code(), children: codeContent }, `${i4}code`)
|
|
751
751
|
);
|
|
752
752
|
last = m2.index + m2[0].length;
|
|
753
|
-
|
|
753
|
+
i4 += 1;
|
|
754
754
|
}
|
|
755
755
|
if (last < source.length) {
|
|
756
|
-
pushAll(out, parseLinksAndInline(source.slice(last), s2, `${
|
|
756
|
+
pushAll(out, parseLinksAndInline(source.slice(last), s2, `${i4}t`));
|
|
757
757
|
}
|
|
758
758
|
return out;
|
|
759
759
|
}
|
|
@@ -765,7 +765,7 @@ function MarkdownText({
|
|
|
765
765
|
const styles2 = markdownTextStyles({ inline });
|
|
766
766
|
const source = inline ? children.replace(/\s+/g, " ").trim() : children;
|
|
767
767
|
const nodes = parseMarkdown(source, styles2);
|
|
768
|
-
const content = nodes.map((node,
|
|
768
|
+
const content = nodes.map((node, i4) => /* @__PURE__ */ jsx(Fragment$1, { children: node }, i4));
|
|
769
769
|
if (inline) {
|
|
770
770
|
return /* @__PURE__ */ jsx("span", { className: styles2.root({ className }), children: content });
|
|
771
771
|
}
|
|
@@ -888,14 +888,14 @@ const ConversationListItem = forwardRef(function ConversationListItem2({
|
|
|
888
888
|
disabled
|
|
889
889
|
});
|
|
890
890
|
const interactive = !disabled && typeof onClick === "function";
|
|
891
|
-
const handleKeyDown = (
|
|
891
|
+
const handleKeyDown = (e3) => {
|
|
892
892
|
if (!interactive) return;
|
|
893
|
-
if (
|
|
894
|
-
|
|
893
|
+
if (e3.key === "Enter" || e3.key === " ") {
|
|
894
|
+
e3.preventDefault();
|
|
895
895
|
onClick?.();
|
|
896
896
|
}
|
|
897
897
|
};
|
|
898
|
-
const stopActions = (
|
|
898
|
+
const stopActions = (e3) => e3.stopPropagation();
|
|
899
899
|
let avatarNode = null;
|
|
900
900
|
if (avatar != null) {
|
|
901
901
|
if (isAvatarData(avatar)) {
|
|
@@ -1025,20 +1025,20 @@ function useToolbarFilters(options) {
|
|
|
1025
1025
|
[generateId]
|
|
1026
1026
|
);
|
|
1027
1027
|
const remove = useCallback((id) => {
|
|
1028
|
-
setList((prev) => prev.filter((
|
|
1028
|
+
setList((prev) => prev.filter((f3) => f3.id !== id));
|
|
1029
1029
|
}, []);
|
|
1030
1030
|
const update = useCallback((id, patch) => {
|
|
1031
1031
|
setList(
|
|
1032
|
-
(prev) => prev.map((
|
|
1032
|
+
(prev) => prev.map((f3) => f3.id === id ? { ...f3, ...patch } : f3)
|
|
1033
1033
|
);
|
|
1034
1034
|
}, []);
|
|
1035
1035
|
const clear = useCallback(() => setList([]), []);
|
|
1036
1036
|
const replaceAll = useCallback((next) => setList(next), []);
|
|
1037
1037
|
const count = useMemo(
|
|
1038
|
-
() => list.filter((
|
|
1039
|
-
if (
|
|
1040
|
-
if (typeof
|
|
1041
|
-
if (Array.isArray(
|
|
1038
|
+
() => list.filter((f3) => {
|
|
1039
|
+
if (f3.value === null || f3.value === void 0) return false;
|
|
1040
|
+
if (typeof f3.value === "string") return f3.value.length > 0;
|
|
1041
|
+
if (Array.isArray(f3.value)) return f3.value.length > 0;
|
|
1042
1042
|
return true;
|
|
1043
1043
|
}).length,
|
|
1044
1044
|
[list]
|
|
@@ -1063,7 +1063,7 @@ function useToolbarSort(options) {
|
|
|
1063
1063
|
next[idx] = { ...current, direction: "desc" };
|
|
1064
1064
|
return next;
|
|
1065
1065
|
}
|
|
1066
|
-
return prev.filter((
|
|
1066
|
+
return prev.filter((_3, i4) => i4 !== idx);
|
|
1067
1067
|
});
|
|
1068
1068
|
},
|
|
1069
1069
|
[maxColumns]
|
|
@@ -3861,7 +3861,7 @@ const Icon = forwardRef(
|
|
|
3861
3861
|
...props,
|
|
3862
3862
|
children: [
|
|
3863
3863
|
title2 ? /* @__PURE__ */ jsx("title", { children: title2 }) : null,
|
|
3864
|
-
paths.map((
|
|
3864
|
+
paths.map((d4, i4) => /* @__PURE__ */ jsx("path", { d: d4 }, i4))
|
|
3865
3865
|
]
|
|
3866
3866
|
}
|
|
3867
3867
|
);
|
|
@@ -4132,7 +4132,7 @@ function FileUploadField({
|
|
|
4132
4132
|
accept,
|
|
4133
4133
|
disabled,
|
|
4134
4134
|
className: "hidden",
|
|
4135
|
-
onChange: (
|
|
4135
|
+
onChange: (e3) => handleFiles(e3.target.files?.[0])
|
|
4136
4136
|
}
|
|
4137
4137
|
),
|
|
4138
4138
|
value == null ? /* @__PURE__ */ jsxs(
|
|
@@ -4352,7 +4352,7 @@ function MessageMediaRenderer({
|
|
|
4352
4352
|
role: onMediaClick ? "button" : void 0,
|
|
4353
4353
|
tabIndex: onMediaClick ? 0 : void 0,
|
|
4354
4354
|
onClick: onMediaClick,
|
|
4355
|
-
onKeyDown: (
|
|
4355
|
+
onKeyDown: (e3) => handleMediaKeyDown(e3, onMediaClick)
|
|
4356
4356
|
}
|
|
4357
4357
|
) : null });
|
|
4358
4358
|
case "audio":
|
|
@@ -4372,7 +4372,7 @@ function MessageMediaRenderer({
|
|
|
4372
4372
|
role: onMediaClick ? "button" : void 0,
|
|
4373
4373
|
tabIndex: onMediaClick ? 0 : void 0,
|
|
4374
4374
|
onClick: onMediaClick,
|
|
4375
|
-
onKeyDown: (
|
|
4375
|
+
onKeyDown: (e3) => handleMediaKeyDown(e3, onMediaClick)
|
|
4376
4376
|
}
|
|
4377
4377
|
)
|
|
4378
4378
|
) : null });
|
|
@@ -4686,7 +4686,7 @@ const MessageComposer = forwardRef(function MessageComposer2({
|
|
|
4686
4686
|
placeholder,
|
|
4687
4687
|
"aria-label": placeholder ?? "Mensagem",
|
|
4688
4688
|
className: styles2.textarea(),
|
|
4689
|
-
onChange: (
|
|
4689
|
+
onChange: (e3) => onChange(e3.target.value),
|
|
4690
4690
|
onKeyDown: handleKeyDown
|
|
4691
4691
|
}
|
|
4692
4692
|
) }),
|
|
@@ -4804,7 +4804,7 @@ function MessageVariablesPicker({
|
|
|
4804
4804
|
size: "sm",
|
|
4805
4805
|
asButton: true,
|
|
4806
4806
|
"aria-label": `Inserir ${variable.label}`,
|
|
4807
|
-
onMouseDown: (
|
|
4807
|
+
onMouseDown: (e3) => e3.preventDefault(),
|
|
4808
4808
|
onClick: () => handleSelect(variable.token),
|
|
4809
4809
|
children: variable.label
|
|
4810
4810
|
},
|
|
@@ -4958,7 +4958,7 @@ function Modal({
|
|
|
4958
4958
|
...description$1 ? {} : { "aria-describedby": void 0 },
|
|
4959
4959
|
children: [
|
|
4960
4960
|
!title$1 && /* @__PURE__ */ jsx(DialogTitle, { className: "sr-only", children: "Diálogo" }),
|
|
4961
|
-
!hideClose && /* @__PURE__ */ jsx(DialogClose, { className: closeBtn(), "aria-label": "Fechar", children: /* @__PURE__ */ jsx(
|
|
4961
|
+
!hideClose && /* @__PURE__ */ jsx(DialogClose, { className: closeBtn(), "aria-label": "Fechar", children: /* @__PURE__ */ jsx(X3, { className: "size-icon-sm" }) }),
|
|
4962
4962
|
hasHeader && /* @__PURE__ */ jsxs("header", { className: head(), children: [
|
|
4963
4963
|
icon && /* @__PURE__ */ jsx("span", { className: headIcon(), "aria-hidden": "true", children: icon }),
|
|
4964
4964
|
(title$1 || description$1) && /* @__PURE__ */ jsxs("div", { className: headTitleWrap(), children: [
|
|
@@ -5146,7 +5146,7 @@ const MonthYearPicker = forwardRef(function MonthYearPicker2({
|
|
|
5146
5146
|
const fmt = new Intl.DateTimeFormat(locale, { month: "short" });
|
|
5147
5147
|
return Array.from(
|
|
5148
5148
|
{ length: 12 },
|
|
5149
|
-
(
|
|
5149
|
+
(_3, i4) => capitalizeFirst(fmt.format(new Date(2020, i4, 1)).replace(/\.$/, ""))
|
|
5150
5150
|
);
|
|
5151
5151
|
}, [locale]);
|
|
5152
5152
|
const triggerLabel = useMemo(() => {
|
|
@@ -5228,9 +5228,9 @@ const MonthYearPicker = forwardRef(function MonthYearPicker2({
|
|
|
5228
5228
|
}
|
|
5229
5229
|
)
|
|
5230
5230
|
] }),
|
|
5231
|
-
/* @__PURE__ */ jsx("div", { className: styles2.grid(), role: "grid", children: monthLabels.map((label,
|
|
5232
|
-
const monthDisabled = isMonthDisabled(
|
|
5233
|
-
const isSelected = parsed?.year === viewYear && parsed?.month ===
|
|
5231
|
+
/* @__PURE__ */ jsx("div", { className: styles2.grid(), role: "grid", children: monthLabels.map((label, i4) => {
|
|
5232
|
+
const monthDisabled = isMonthDisabled(i4);
|
|
5233
|
+
const isSelected = parsed?.year === viewYear && parsed?.month === i4 + 1;
|
|
5234
5234
|
return /* @__PURE__ */ jsx(
|
|
5235
5235
|
"button",
|
|
5236
5236
|
{
|
|
@@ -5238,7 +5238,7 @@ const MonthYearPicker = forwardRef(function MonthYearPicker2({
|
|
|
5238
5238
|
role: "gridcell",
|
|
5239
5239
|
"aria-pressed": isSelected,
|
|
5240
5240
|
disabled: monthDisabled,
|
|
5241
|
-
onClick: () => selectMonth(
|
|
5241
|
+
onClick: () => selectMonth(i4),
|
|
5242
5242
|
className: monthYearMonthButton({
|
|
5243
5243
|
selected: isSelected,
|
|
5244
5244
|
disabled: monthDisabled
|
|
@@ -5392,7 +5392,7 @@ const ScreenLoader = forwardRef(
|
|
|
5392
5392
|
] }),
|
|
5393
5393
|
/* @__PURE__ */ jsx(Skeleton, { className: "min-h-form-md w-[120px] shrink-0" })
|
|
5394
5394
|
] }),
|
|
5395
|
-
skeletonLayout !== "page" && /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: styles2.skeletonKpis(), children: Array.from({ length: 4 }, (
|
|
5395
|
+
skeletonLayout !== "page" && /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: styles2.skeletonKpis(), children: Array.from({ length: 4 }, (_3, i4) => /* @__PURE__ */ jsx(Skeleton, { className: styles2.skeletonKpiCard() }, i4)) }),
|
|
5396
5396
|
/* @__PURE__ */ jsx(Skeleton, { "aria-hidden": "true", className: styles2.skeletonBody() })
|
|
5397
5397
|
] })
|
|
5398
5398
|
}
|
|
@@ -5416,38 +5416,38 @@ function useArrastarParaRolar(trilho, ativo = true, limiarPx = 6) {
|
|
|
5416
5416
|
const ehInterativo = (alvo) => alvo instanceof Element && !!alvo.closest(
|
|
5417
5417
|
'button, a, input, select, textarea, [role="button"], [role="menuitem"], [data-radix-popper-content-wrapper], [role="dialog"], [role="menu"], [role="tooltip"]'
|
|
5418
5418
|
);
|
|
5419
|
-
const onPointerDown = (
|
|
5420
|
-
if (
|
|
5419
|
+
const onPointerDown = (e3) => {
|
|
5420
|
+
if (e3.button !== 0 || ehInterativo(e3.target)) return;
|
|
5421
5421
|
arrastando = true;
|
|
5422
5422
|
passouLimiar = false;
|
|
5423
|
-
xInicial =
|
|
5423
|
+
xInicial = e3.clientX;
|
|
5424
5424
|
scrollInicial = el.scrollLeft;
|
|
5425
5425
|
};
|
|
5426
|
-
const onPointerMove = (
|
|
5426
|
+
const onPointerMove = (e3) => {
|
|
5427
5427
|
if (!arrastando) return;
|
|
5428
|
-
const delta =
|
|
5428
|
+
const delta = e3.clientX - xInicial;
|
|
5429
5429
|
if (!passouLimiar) {
|
|
5430
5430
|
if (Math.abs(delta) < limiarPx) return;
|
|
5431
5431
|
passouLimiar = true;
|
|
5432
5432
|
engolirClique.current = true;
|
|
5433
|
-
el.setPointerCapture?.(
|
|
5433
|
+
el.setPointerCapture?.(e3.pointerId);
|
|
5434
5434
|
el.style.cursor = "grabbing";
|
|
5435
5435
|
el.style.userSelect = "none";
|
|
5436
5436
|
}
|
|
5437
5437
|
el.scrollLeft = scrollInicial - delta;
|
|
5438
5438
|
};
|
|
5439
|
-
const encerrar = (
|
|
5439
|
+
const encerrar = (e3) => {
|
|
5440
5440
|
if (!arrastando) return;
|
|
5441
5441
|
arrastando = false;
|
|
5442
|
-
el.releasePointerCapture?.(
|
|
5442
|
+
el.releasePointerCapture?.(e3.pointerId);
|
|
5443
5443
|
el.style.cursor = "";
|
|
5444
5444
|
el.style.userSelect = "";
|
|
5445
5445
|
};
|
|
5446
|
-
const onClickCapture = (
|
|
5446
|
+
const onClickCapture = (e3) => {
|
|
5447
5447
|
if (!engolirClique.current) return;
|
|
5448
5448
|
engolirClique.current = false;
|
|
5449
|
-
|
|
5450
|
-
|
|
5449
|
+
e3.stopPropagation();
|
|
5450
|
+
e3.preventDefault();
|
|
5451
5451
|
};
|
|
5452
5452
|
el.addEventListener("pointerdown", onPointerDown);
|
|
5453
5453
|
el.addEventListener("pointermove", onPointerMove);
|
|
@@ -5680,9 +5680,9 @@ const TabsNavigationAction = forwardRef(function TabsNavigationAction2({ tom = "
|
|
|
5680
5680
|
ref,
|
|
5681
5681
|
type: "button",
|
|
5682
5682
|
className: tabsNavigationAcao({ tom, className }),
|
|
5683
|
-
onClick: (
|
|
5684
|
-
|
|
5685
|
-
onClick?.(
|
|
5683
|
+
onClick: (e3) => {
|
|
5684
|
+
e3.stopPropagation();
|
|
5685
|
+
onClick?.(e3);
|
|
5686
5686
|
},
|
|
5687
5687
|
...rest
|
|
5688
5688
|
}
|
|
@@ -5740,9 +5740,9 @@ const TabsNavigationTab = forwardRef(function TabsNavigationTab2({
|
|
|
5740
5740
|
"aria-controls": panelId,
|
|
5741
5741
|
tabIndex: ativa ? 0 : -1,
|
|
5742
5742
|
onClick: () => ctx.onValueChange(value),
|
|
5743
|
-
onKeyDown: (
|
|
5744
|
-
if (
|
|
5745
|
-
|
|
5743
|
+
onKeyDown: (e3) => {
|
|
5744
|
+
if (e3.key === "Enter" || e3.key === " ") {
|
|
5745
|
+
e3.preventDefault();
|
|
5746
5746
|
ctx.onValueChange(value);
|
|
5747
5747
|
}
|
|
5748
5748
|
},
|
|
@@ -5800,14 +5800,14 @@ function AcoesPadrao({ onClose, menu }) {
|
|
|
5800
5800
|
onSelect: onClose,
|
|
5801
5801
|
className: "text-fg-danger focus:bg-bg-danger-muted focus:text-fg-danger",
|
|
5802
5802
|
children: [
|
|
5803
|
-
/* @__PURE__ */ jsx(
|
|
5803
|
+
/* @__PURE__ */ jsx(X3, { className: "size-icon-sm" }),
|
|
5804
5804
|
" Fechar aba"
|
|
5805
5805
|
]
|
|
5806
5806
|
}
|
|
5807
5807
|
)
|
|
5808
5808
|
] })
|
|
5809
5809
|
] }),
|
|
5810
|
-
/* @__PURE__ */ jsx(TabsNavigationAction, { "aria-label": "Fechar aba", onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
5810
|
+
/* @__PURE__ */ jsx(TabsNavigationAction, { "aria-label": "Fechar aba", onClick: onClose, children: /* @__PURE__ */ jsx(X3, { className: "size-icon-sm" }) })
|
|
5811
5811
|
] });
|
|
5812
5812
|
}
|
|
5813
5813
|
const TabsNavigationRoot = forwardRef(function TabsNavigation2({
|
|
@@ -5873,13 +5873,13 @@ const TabsNavigationRoot = forwardRef(function TabsNavigation2({
|
|
|
5873
5873
|
}, [value]);
|
|
5874
5874
|
useArrastarParaRolar(trilho);
|
|
5875
5875
|
const rolar = (dir) => trilho.current?.scrollBy({ left: dir * 240, behavior: "smooth" });
|
|
5876
|
-
const onKeyDown = (
|
|
5876
|
+
const onKeyDown = (e3) => {
|
|
5877
5877
|
const valores = abas.map((a11) => a11.props.value);
|
|
5878
|
-
const
|
|
5879
|
-
if (
|
|
5880
|
-
const proximo =
|
|
5878
|
+
const i4 = valores.indexOf(value);
|
|
5879
|
+
if (i4 < 0) return;
|
|
5880
|
+
const proximo = e3.key === "ArrowRight" ? valores[(i4 + 1) % valores.length] : e3.key === "ArrowLeft" ? valores[(i4 - 1 + valores.length) % valores.length] : e3.key === "Home" ? valores[0] : e3.key === "End" ? valores[valores.length - 1] : null;
|
|
5881
5881
|
if (!proximo) return;
|
|
5882
|
-
|
|
5882
|
+
e3.preventDefault();
|
|
5883
5883
|
onValueChange(proximo);
|
|
5884
5884
|
};
|
|
5885
5885
|
const controles = tabsNavigationControles({ fill, density });
|
|
@@ -5914,15 +5914,15 @@ const TabsNavigationRoot = forwardRef(function TabsNavigation2({
|
|
|
5914
5914
|
),
|
|
5915
5915
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: tabsNavigationDivisoria({ fill }) })
|
|
5916
5916
|
] }) : null,
|
|
5917
|
-
/* @__PURE__ */ jsx("div", { ref: trilho, onScroll: medir, className: tabsNavigationTrilho({ fill }), children: abas.map((aba,
|
|
5918
|
-
const vizinhaDaAtiva = aba.props.value === value || abas[
|
|
5917
|
+
/* @__PURE__ */ jsx("div", { ref: trilho, onScroll: medir, className: tabsNavigationTrilho({ fill }), children: abas.map((aba, i4) => {
|
|
5918
|
+
const vizinhaDaAtiva = aba.props.value === value || abas[i4 + 1]?.props.value === value;
|
|
5919
5919
|
return /* @__PURE__ */ jsxs(
|
|
5920
5920
|
"div",
|
|
5921
5921
|
{
|
|
5922
5922
|
className: ["flex shrink-0", fill ? "items-stretch" : "items-end"].join(" "),
|
|
5923
5923
|
children: [
|
|
5924
5924
|
aba,
|
|
5925
|
-
|
|
5925
|
+
i4 < abas.length - 1 ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: tabsNavigationDivisoria({ fill, oculta: vizinhaDaAtiva }) }) : null
|
|
5926
5926
|
]
|
|
5927
5927
|
},
|
|
5928
5928
|
aba.props.value
|
|
@@ -6017,34 +6017,34 @@ class Adder {
|
|
|
6017
6017
|
this._partials = new Float64Array(32);
|
|
6018
6018
|
this._n = 0;
|
|
6019
6019
|
}
|
|
6020
|
-
add(
|
|
6020
|
+
add(x3) {
|
|
6021
6021
|
const p4 = this._partials;
|
|
6022
|
-
let
|
|
6022
|
+
let i4 = 0;
|
|
6023
6023
|
for (let j2 = 0; j2 < this._n && j2 < 32; j2++) {
|
|
6024
|
-
const y3 = p4[j2], hi =
|
|
6025
|
-
if (lo) p4[
|
|
6026
|
-
|
|
6024
|
+
const y3 = p4[j2], hi = x3 + y3, lo = Math.abs(x3) < Math.abs(y3) ? x3 - (hi - y3) : y3 - (hi - x3);
|
|
6025
|
+
if (lo) p4[i4++] = lo;
|
|
6026
|
+
x3 = hi;
|
|
6027
6027
|
}
|
|
6028
|
-
p4[
|
|
6029
|
-
this._n =
|
|
6028
|
+
p4[i4] = x3;
|
|
6029
|
+
this._n = i4 + 1;
|
|
6030
6030
|
return this;
|
|
6031
6031
|
}
|
|
6032
6032
|
valueOf() {
|
|
6033
6033
|
const p4 = this._partials;
|
|
6034
|
-
let n2 = this._n,
|
|
6034
|
+
let n2 = this._n, x3, y3, lo, hi = 0;
|
|
6035
6035
|
if (n2 > 0) {
|
|
6036
6036
|
hi = p4[--n2];
|
|
6037
6037
|
while (n2 > 0) {
|
|
6038
|
-
|
|
6038
|
+
x3 = hi;
|
|
6039
6039
|
y3 = p4[--n2];
|
|
6040
|
-
hi =
|
|
6041
|
-
lo = y3 - (hi -
|
|
6040
|
+
hi = x3 + y3;
|
|
6041
|
+
lo = y3 - (hi - x3);
|
|
6042
6042
|
if (lo) break;
|
|
6043
6043
|
}
|
|
6044
6044
|
if (n2 > 0 && (lo < 0 && p4[n2 - 1] < 0 || lo > 0 && p4[n2 - 1] > 0)) {
|
|
6045
6045
|
y3 = lo * 2;
|
|
6046
|
-
|
|
6047
|
-
if (y3 ==
|
|
6046
|
+
x3 = hi + y3;
|
|
6047
|
+
if (y3 == x3 - hi) hi = x3;
|
|
6048
6048
|
}
|
|
6049
6049
|
}
|
|
6050
6050
|
return hi;
|
|
@@ -6072,16 +6072,16 @@ var cos = Math.cos;
|
|
|
6072
6072
|
var exp = Math.exp;
|
|
6073
6073
|
var log = Math.log;
|
|
6074
6074
|
var sin = Math.sin;
|
|
6075
|
-
var sign = Math.sign || function(
|
|
6076
|
-
return
|
|
6075
|
+
var sign = Math.sign || function(x3) {
|
|
6076
|
+
return x3 > 0 ? 1 : x3 < 0 ? -1 : 0;
|
|
6077
6077
|
};
|
|
6078
6078
|
var sqrt = Math.sqrt;
|
|
6079
6079
|
var tan = Math.tan;
|
|
6080
|
-
function acos(
|
|
6081
|
-
return
|
|
6080
|
+
function acos(x3) {
|
|
6081
|
+
return x3 > 1 ? 0 : x3 < -1 ? pi : Math.acos(x3);
|
|
6082
6082
|
}
|
|
6083
|
-
function asin(
|
|
6084
|
-
return
|
|
6083
|
+
function asin(x3) {
|
|
6084
|
+
return x3 > 1 ? halfPi : x3 < -1 ? -halfPi : Math.asin(x3);
|
|
6085
6085
|
}
|
|
6086
6086
|
function noop() {
|
|
6087
6087
|
}
|
|
@@ -6095,8 +6095,8 @@ var streamObjectType = {
|
|
|
6095
6095
|
streamGeometry(object2.geometry, stream);
|
|
6096
6096
|
},
|
|
6097
6097
|
FeatureCollection: function(object2, stream) {
|
|
6098
|
-
var features = object2.features,
|
|
6099
|
-
while (++
|
|
6098
|
+
var features = object2.features, i4 = -1, n2 = features.length;
|
|
6099
|
+
while (++i4 < n2) streamGeometry(features[i4].geometry, stream);
|
|
6100
6100
|
}
|
|
6101
6101
|
};
|
|
6102
6102
|
var streamGeometryType = {
|
|
@@ -6108,38 +6108,38 @@ var streamGeometryType = {
|
|
|
6108
6108
|
stream.point(object2[0], object2[1], object2[2]);
|
|
6109
6109
|
},
|
|
6110
6110
|
MultiPoint: function(object2, stream) {
|
|
6111
|
-
var coordinates = object2.coordinates,
|
|
6112
|
-
while (++
|
|
6111
|
+
var coordinates = object2.coordinates, i4 = -1, n2 = coordinates.length;
|
|
6112
|
+
while (++i4 < n2) object2 = coordinates[i4], stream.point(object2[0], object2[1], object2[2]);
|
|
6113
6113
|
},
|
|
6114
6114
|
LineString: function(object2, stream) {
|
|
6115
6115
|
streamLine(object2.coordinates, stream, 0);
|
|
6116
6116
|
},
|
|
6117
6117
|
MultiLineString: function(object2, stream) {
|
|
6118
|
-
var coordinates = object2.coordinates,
|
|
6119
|
-
while (++
|
|
6118
|
+
var coordinates = object2.coordinates, i4 = -1, n2 = coordinates.length;
|
|
6119
|
+
while (++i4 < n2) streamLine(coordinates[i4], stream, 0);
|
|
6120
6120
|
},
|
|
6121
6121
|
Polygon: function(object2, stream) {
|
|
6122
6122
|
streamPolygon(object2.coordinates, stream);
|
|
6123
6123
|
},
|
|
6124
6124
|
MultiPolygon: function(object2, stream) {
|
|
6125
|
-
var coordinates = object2.coordinates,
|
|
6126
|
-
while (++
|
|
6125
|
+
var coordinates = object2.coordinates, i4 = -1, n2 = coordinates.length;
|
|
6126
|
+
while (++i4 < n2) streamPolygon(coordinates[i4], stream);
|
|
6127
6127
|
},
|
|
6128
6128
|
GeometryCollection: function(object2, stream) {
|
|
6129
|
-
var geometries = object2.geometries,
|
|
6130
|
-
while (++
|
|
6129
|
+
var geometries = object2.geometries, i4 = -1, n2 = geometries.length;
|
|
6130
|
+
while (++i4 < n2) streamGeometry(geometries[i4], stream);
|
|
6131
6131
|
}
|
|
6132
6132
|
};
|
|
6133
6133
|
function streamLine(coordinates, stream, closed) {
|
|
6134
|
-
var
|
|
6134
|
+
var i4 = -1, n2 = coordinates.length - closed, coordinate;
|
|
6135
6135
|
stream.lineStart();
|
|
6136
|
-
while (++
|
|
6136
|
+
while (++i4 < n2) coordinate = coordinates[i4], stream.point(coordinate[0], coordinate[1], coordinate[2]);
|
|
6137
6137
|
stream.lineEnd();
|
|
6138
6138
|
}
|
|
6139
6139
|
function streamPolygon(coordinates, stream) {
|
|
6140
|
-
var
|
|
6140
|
+
var i4 = -1, n2 = coordinates.length;
|
|
6141
6141
|
stream.polygonStart();
|
|
6142
|
-
while (++
|
|
6142
|
+
while (++i4 < n2) streamLine(coordinates[i4], stream, 1);
|
|
6143
6143
|
stream.polygonEnd();
|
|
6144
6144
|
}
|
|
6145
6145
|
function geoStream(object2, stream) {
|
|
@@ -6168,16 +6168,16 @@ function cartesianAddInPlace(a11, b4) {
|
|
|
6168
6168
|
function cartesianScale(vector, k2) {
|
|
6169
6169
|
return [vector[0] * k2, vector[1] * k2, vector[2] * k2];
|
|
6170
6170
|
}
|
|
6171
|
-
function cartesianNormalizeInPlace(
|
|
6172
|
-
var l2 = sqrt(
|
|
6173
|
-
|
|
6171
|
+
function cartesianNormalizeInPlace(d4) {
|
|
6172
|
+
var l2 = sqrt(d4[0] * d4[0] + d4[1] * d4[1] + d4[2] * d4[2]);
|
|
6173
|
+
d4[0] /= l2, d4[1] /= l2, d4[2] /= l2;
|
|
6174
6174
|
}
|
|
6175
6175
|
function compose(a11, b4) {
|
|
6176
|
-
function compose2(
|
|
6177
|
-
return
|
|
6176
|
+
function compose2(x3, y3) {
|
|
6177
|
+
return x3 = a11(x3, y3), b4(x3[0], x3[1]);
|
|
6178
6178
|
}
|
|
6179
|
-
if (a11.invert && b4.invert) compose2.invert = function(
|
|
6180
|
-
return
|
|
6179
|
+
if (a11.invert && b4.invert) compose2.invert = function(x3, y3) {
|
|
6180
|
+
return x3 = b4.invert(x3, y3), x3 && a11.invert(x3[0], x3[1]);
|
|
6181
6181
|
};
|
|
6182
6182
|
return compose2;
|
|
6183
6183
|
}
|
|
@@ -6204,17 +6204,17 @@ function rotationLambda(deltaLambda) {
|
|
|
6204
6204
|
function rotationPhiGamma(deltaPhi, deltaGamma) {
|
|
6205
6205
|
var cosDeltaPhi = cos(deltaPhi), sinDeltaPhi = sin(deltaPhi), cosDeltaGamma = cos(deltaGamma), sinDeltaGamma = sin(deltaGamma);
|
|
6206
6206
|
function rotation2(lambda, phi) {
|
|
6207
|
-
var cosPhi = cos(phi),
|
|
6207
|
+
var cosPhi = cos(phi), x3 = cos(lambda) * cosPhi, y3 = sin(lambda) * cosPhi, z3 = sin(phi), k2 = z3 * cosDeltaPhi + x3 * sinDeltaPhi;
|
|
6208
6208
|
return [
|
|
6209
|
-
atan2(y3 * cosDeltaGamma - k2 * sinDeltaGamma,
|
|
6209
|
+
atan2(y3 * cosDeltaGamma - k2 * sinDeltaGamma, x3 * cosDeltaPhi - z3 * sinDeltaPhi),
|
|
6210
6210
|
asin(k2 * cosDeltaGamma + y3 * sinDeltaGamma)
|
|
6211
6211
|
];
|
|
6212
6212
|
}
|
|
6213
6213
|
rotation2.invert = function(lambda, phi) {
|
|
6214
|
-
var cosPhi = cos(phi),
|
|
6214
|
+
var cosPhi = cos(phi), x3 = cos(lambda) * cosPhi, y3 = sin(lambda) * cosPhi, z3 = sin(phi), k2 = z3 * cosDeltaGamma - y3 * sinDeltaGamma;
|
|
6215
6215
|
return [
|
|
6216
|
-
atan2(y3 * cosDeltaGamma +
|
|
6217
|
-
asin(k2 * cosDeltaPhi -
|
|
6216
|
+
atan2(y3 * cosDeltaGamma + z3 * sinDeltaGamma, x3 * cosDeltaPhi + k2 * sinDeltaPhi),
|
|
6217
|
+
asin(k2 * cosDeltaPhi - x3 * sinDeltaPhi)
|
|
6218
6218
|
];
|
|
6219
6219
|
};
|
|
6220
6220
|
return rotation2;
|
|
@@ -6256,8 +6256,8 @@ function circleRadius(cosRadius, point) {
|
|
|
6256
6256
|
function clipBuffer() {
|
|
6257
6257
|
var lines = [], line;
|
|
6258
6258
|
return {
|
|
6259
|
-
point: function(
|
|
6260
|
-
line.push([
|
|
6259
|
+
point: function(x3, y3, m2) {
|
|
6260
|
+
line.push([x3, y3, m2]);
|
|
6261
6261
|
},
|
|
6262
6262
|
lineStart: function() {
|
|
6263
6263
|
lines.push(line = []);
|
|
@@ -6286,30 +6286,30 @@ function Intersection(point, points, other, entry) {
|
|
|
6286
6286
|
this.n = this.p = null;
|
|
6287
6287
|
}
|
|
6288
6288
|
function clipRejoin(segments, compareIntersection2, startInside, interpolate, stream) {
|
|
6289
|
-
var subject = [], clip2 = [],
|
|
6289
|
+
var subject = [], clip2 = [], i4, n2;
|
|
6290
6290
|
segments.forEach(function(segment) {
|
|
6291
6291
|
if ((n3 = segment.length - 1) <= 0) return;
|
|
6292
|
-
var n3, p0 = segment[0], p1 = segment[n3],
|
|
6292
|
+
var n3, p0 = segment[0], p1 = segment[n3], x3;
|
|
6293
6293
|
if (pointEqual(p0, p1)) {
|
|
6294
6294
|
if (!p0[2] && !p1[2]) {
|
|
6295
6295
|
stream.lineStart();
|
|
6296
|
-
for (
|
|
6296
|
+
for (i4 = 0; i4 < n3; ++i4) stream.point((p0 = segment[i4])[0], p0[1]);
|
|
6297
6297
|
stream.lineEnd();
|
|
6298
6298
|
return;
|
|
6299
6299
|
}
|
|
6300
6300
|
p1[0] += 2 * epsilon;
|
|
6301
6301
|
}
|
|
6302
|
-
subject.push(
|
|
6303
|
-
clip2.push(
|
|
6304
|
-
subject.push(
|
|
6305
|
-
clip2.push(
|
|
6302
|
+
subject.push(x3 = new Intersection(p0, segment, null, true));
|
|
6303
|
+
clip2.push(x3.o = new Intersection(p0, null, x3, false));
|
|
6304
|
+
subject.push(x3 = new Intersection(p1, segment, null, false));
|
|
6305
|
+
clip2.push(x3.o = new Intersection(p1, null, x3, true));
|
|
6306
6306
|
});
|
|
6307
6307
|
if (!subject.length) return;
|
|
6308
6308
|
clip2.sort(compareIntersection2);
|
|
6309
6309
|
link(subject);
|
|
6310
6310
|
link(clip2);
|
|
6311
|
-
for (
|
|
6312
|
-
clip2[
|
|
6311
|
+
for (i4 = 0, n2 = clip2.length; i4 < n2; ++i4) {
|
|
6312
|
+
clip2[i4].e = startInside = !startInside;
|
|
6313
6313
|
}
|
|
6314
6314
|
var start = subject[0], points, point;
|
|
6315
6315
|
while (1) {
|
|
@@ -6321,7 +6321,7 @@ function clipRejoin(segments, compareIntersection2, startInside, interpolate, st
|
|
|
6321
6321
|
current.v = current.o.v = true;
|
|
6322
6322
|
if (current.e) {
|
|
6323
6323
|
if (isSubject) {
|
|
6324
|
-
for (
|
|
6324
|
+
for (i4 = 0, n2 = points.length; i4 < n2; ++i4) stream.point((point = points[i4])[0], point[1]);
|
|
6325
6325
|
} else {
|
|
6326
6326
|
interpolate(current.x, current.n.x, 1, stream);
|
|
6327
6327
|
}
|
|
@@ -6329,7 +6329,7 @@ function clipRejoin(segments, compareIntersection2, startInside, interpolate, st
|
|
|
6329
6329
|
} else {
|
|
6330
6330
|
if (isSubject) {
|
|
6331
6331
|
points = current.p.z;
|
|
6332
|
-
for (
|
|
6332
|
+
for (i4 = points.length - 1; i4 >= 0; --i4) stream.point((point = points[i4])[0], point[1]);
|
|
6333
6333
|
} else {
|
|
6334
6334
|
interpolate(current.x, current.p.x, -1, stream);
|
|
6335
6335
|
}
|
|
@@ -6344,9 +6344,9 @@ function clipRejoin(segments, compareIntersection2, startInside, interpolate, st
|
|
|
6344
6344
|
}
|
|
6345
6345
|
function link(array) {
|
|
6346
6346
|
if (!(n2 = array.length)) return;
|
|
6347
|
-
var n2,
|
|
6348
|
-
while (++
|
|
6349
|
-
a11.n = b4 = array[
|
|
6347
|
+
var n2, i4 = 0, a11 = array[0], b4;
|
|
6348
|
+
while (++i4 < n2) {
|
|
6349
|
+
a11.n = b4 = array[i4];
|
|
6350
6350
|
b4.p = a11;
|
|
6351
6351
|
a11 = b4;
|
|
6352
6352
|
}
|
|
@@ -6361,8 +6361,8 @@ function polygonContains(polygon, point) {
|
|
|
6361
6361
|
var sum = new Adder();
|
|
6362
6362
|
if (sinPhi === 1) phi = halfPi + epsilon;
|
|
6363
6363
|
else if (sinPhi === -1) phi = -halfPi - epsilon;
|
|
6364
|
-
for (var
|
|
6365
|
-
if (!(m2 = (ring = polygon[
|
|
6364
|
+
for (var i4 = 0, n2 = polygon.length; i4 < n2; ++i4) {
|
|
6365
|
+
if (!(m2 = (ring = polygon[i4]).length)) continue;
|
|
6366
6366
|
var ring, m2, point0 = ring[m2 - 1], lambda0 = longitude(point0), phi0 = point0[1] / 2 + quarterPi, sinPhi0 = sin(phi0), cosPhi0 = cos(phi0);
|
|
6367
6367
|
for (var j2 = 0; j2 < m2; ++j2, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {
|
|
6368
6368
|
var point1 = ring[j2], lambda1 = longitude(point1), phi1 = point1[1] / 2 + quarterPi, sinPhi1 = sin(phi1), cosPhi1 = cos(phi1), delta = lambda1 - lambda0, sign2 = delta >= 0 ? 1 : -1, absDelta = sign2 * delta, antimeridian = absDelta > pi, k2 = sinPhi0 * sinPhi1;
|
|
@@ -6447,7 +6447,7 @@ function clip(pointVisible, clipLine2, interpolate, start) {
|
|
|
6447
6447
|
function ringEnd() {
|
|
6448
6448
|
pointRing(ring[0][0], ring[0][1]);
|
|
6449
6449
|
ringSink.lineEnd();
|
|
6450
|
-
var clean = ringSink.clean(), ringSegments = ringBuffer.result(),
|
|
6450
|
+
var clean = ringSink.clean(), ringSegments = ringBuffer.result(), i4, n2 = ringSegments.length, m2, segment, point2;
|
|
6451
6451
|
ring.pop();
|
|
6452
6452
|
polygon.push(ring);
|
|
6453
6453
|
ring = null;
|
|
@@ -6457,7 +6457,7 @@ function clip(pointVisible, clipLine2, interpolate, start) {
|
|
|
6457
6457
|
if ((m2 = segment.length - 1) > 0) {
|
|
6458
6458
|
if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
|
|
6459
6459
|
sink.lineStart();
|
|
6460
|
-
for (
|
|
6460
|
+
for (i4 = 0; i4 < m2; ++i4) sink.point((point2 = segment[i4])[0], point2[1]);
|
|
6461
6461
|
sink.lineEnd();
|
|
6462
6462
|
}
|
|
6463
6463
|
return;
|
|
@@ -6620,18 +6620,18 @@ function clipCircle(radius) {
|
|
|
6620
6620
|
var pa = cartesian(a11), pb = cartesian(b4);
|
|
6621
6621
|
var n1 = [1, 0, 0], n2 = cartesianCross(pa, pb), n2n2 = cartesianDot(n2, n2), n1n2 = n2[0], determinant = n2n2 - n1n2 * n1n2;
|
|
6622
6622
|
if (!determinant) return !two && a11;
|
|
6623
|
-
var c1 = cr * n2n2 / determinant, c22 = -cr * n1n2 / determinant, n1xn2 = cartesianCross(n1, n2), A3 = cartesianScale(n1, c1),
|
|
6624
|
-
cartesianAddInPlace(A3,
|
|
6623
|
+
var c1 = cr * n2n2 / determinant, c22 = -cr * n1n2 / determinant, n1xn2 = cartesianCross(n1, n2), A3 = cartesianScale(n1, c1), B4 = cartesianScale(n2, c22);
|
|
6624
|
+
cartesianAddInPlace(A3, B4);
|
|
6625
6625
|
var u3 = n1xn2, w3 = cartesianDot(A3, u3), uu = cartesianDot(u3, u3), t22 = w3 * w3 - uu * (cartesianDot(A3, A3) - 1);
|
|
6626
6626
|
if (t22 < 0) return;
|
|
6627
6627
|
var t3 = sqrt(t22), q2 = cartesianScale(u3, (-w3 - t3) / uu);
|
|
6628
6628
|
cartesianAddInPlace(q2, A3);
|
|
6629
6629
|
q2 = spherical(q2);
|
|
6630
6630
|
if (!two) return q2;
|
|
6631
|
-
var lambda0 = a11[0], lambda1 = b4[0], phi0 = a11[1], phi1 = b4[1],
|
|
6632
|
-
if (lambda1 < lambda0)
|
|
6631
|
+
var lambda0 = a11[0], lambda1 = b4[0], phi0 = a11[1], phi1 = b4[1], z3;
|
|
6632
|
+
if (lambda1 < lambda0) z3 = lambda0, lambda0 = lambda1, lambda1 = z3;
|
|
6633
6633
|
var delta2 = lambda1 - lambda0, polar = abs(delta2 - pi) < epsilon, meridian = polar || delta2 < epsilon;
|
|
6634
|
-
if (!polar && phi1 < phi0)
|
|
6634
|
+
if (!polar && phi1 < phi0) z3 = phi0, phi0 = phi1, phi1 = z3;
|
|
6635
6635
|
if (meridian ? polar ? phi0 + phi1 > 0 ^ q2[1] < (abs(q2[0] - lambda0) < epsilon ? phi0 : phi1) : phi0 <= q2[1] && q2[1] <= phi1 : delta2 > pi ^ (lambda0 <= q2[0] && q2[0] <= lambda1)) {
|
|
6636
6636
|
var q1 = cartesianScale(u3, (-w3 + t3) / uu);
|
|
6637
6637
|
cartesianAddInPlace(q1, A3);
|
|
@@ -6696,8 +6696,8 @@ function clipLine(a11, b4, x02, y02, x12, y12) {
|
|
|
6696
6696
|
}
|
|
6697
6697
|
var clipMax = 1e9, clipMin = -clipMax;
|
|
6698
6698
|
function clipRectangle(x02, y02, x12, y12) {
|
|
6699
|
-
function visible(
|
|
6700
|
-
return x02 <=
|
|
6699
|
+
function visible(x3, y3) {
|
|
6700
|
+
return x02 <= x3 && x3 <= x12 && y02 <= y3 && y3 <= y12;
|
|
6701
6701
|
}
|
|
6702
6702
|
function interpolate(from, to, direction, stream) {
|
|
6703
6703
|
var a11 = 0, a12 = 0;
|
|
@@ -6728,13 +6728,13 @@ function clipRectangle(x02, y02, x12, y12) {
|
|
|
6728
6728
|
polygonStart,
|
|
6729
6729
|
polygonEnd
|
|
6730
6730
|
};
|
|
6731
|
-
function point(
|
|
6732
|
-
if (visible(
|
|
6731
|
+
function point(x3, y3) {
|
|
6732
|
+
if (visible(x3, y3)) activeStream.point(x3, y3);
|
|
6733
6733
|
}
|
|
6734
6734
|
function polygonInside() {
|
|
6735
6735
|
var winding = 0;
|
|
6736
|
-
for (var
|
|
6737
|
-
for (var ring2 = polygon[
|
|
6736
|
+
for (var i4 = 0, n2 = polygon.length; i4 < n2; ++i4) {
|
|
6737
|
+
for (var ring2 = polygon[i4], j2 = 1, m2 = ring2.length, point2 = ring2[0], a02, a12, b0 = point2[0], b1 = point2[1]; j2 < m2; ++j2) {
|
|
6738
6738
|
a02 = b0, a12 = b1, point2 = ring2[j2], b0 = point2[0], b1 = point2[1];
|
|
6739
6739
|
if (a12 <= y12) {
|
|
6740
6740
|
if (b1 > y12 && (b0 - a02) * (y12 - a12) > (b1 - a12) * (x02 - a02)) ++winding;
|
|
@@ -6780,20 +6780,20 @@ function clipRectangle(x02, y02, x12, y12) {
|
|
|
6780
6780
|
clipStream.point = point;
|
|
6781
6781
|
if (v_) activeStream.lineEnd();
|
|
6782
6782
|
}
|
|
6783
|
-
function linePoint(
|
|
6784
|
-
var v3 = visible(
|
|
6785
|
-
if (polygon) ring.push([
|
|
6783
|
+
function linePoint(x3, y3) {
|
|
6784
|
+
var v3 = visible(x3, y3);
|
|
6785
|
+
if (polygon) ring.push([x3, y3]);
|
|
6786
6786
|
if (first) {
|
|
6787
|
-
x__ =
|
|
6787
|
+
x__ = x3, y__ = y3, v__ = v3;
|
|
6788
6788
|
first = false;
|
|
6789
6789
|
if (v3) {
|
|
6790
6790
|
activeStream.lineStart();
|
|
6791
|
-
activeStream.point(
|
|
6791
|
+
activeStream.point(x3, y3);
|
|
6792
6792
|
}
|
|
6793
6793
|
} else {
|
|
6794
|
-
if (v3 && v_) activeStream.point(
|
|
6794
|
+
if (v3 && v_) activeStream.point(x3, y3);
|
|
6795
6795
|
else {
|
|
6796
|
-
var a11 = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))], b4 = [
|
|
6796
|
+
var a11 = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))], b4 = [x3 = Math.max(clipMin, Math.min(clipMax, x3)), y3 = Math.max(clipMin, Math.min(clipMax, y3))];
|
|
6797
6797
|
if (clipLine(a11, b4, x02, y02, x12, y12)) {
|
|
6798
6798
|
if (!v_) {
|
|
6799
6799
|
activeStream.lineStart();
|
|
@@ -6804,17 +6804,17 @@ function clipRectangle(x02, y02, x12, y12) {
|
|
|
6804
6804
|
clean = false;
|
|
6805
6805
|
} else if (v3) {
|
|
6806
6806
|
activeStream.lineStart();
|
|
6807
|
-
activeStream.point(
|
|
6807
|
+
activeStream.point(x3, y3);
|
|
6808
6808
|
clean = false;
|
|
6809
6809
|
}
|
|
6810
6810
|
}
|
|
6811
6811
|
}
|
|
6812
|
-
x_ =
|
|
6812
|
+
x_ = x3, y_ = y3, v_ = v3;
|
|
6813
6813
|
}
|
|
6814
6814
|
return clipStream;
|
|
6815
6815
|
};
|
|
6816
6816
|
}
|
|
6817
|
-
const identity$1 = (
|
|
6817
|
+
const identity$1 = (x3) => x3;
|
|
6818
6818
|
var areaSum = new Adder(), areaRingSum = new Adder(), x00$2, y00$2, x0$3, y0$3;
|
|
6819
6819
|
var areaStream = {
|
|
6820
6820
|
point: noop,
|
|
@@ -6838,13 +6838,13 @@ var areaStream = {
|
|
|
6838
6838
|
function areaRingStart() {
|
|
6839
6839
|
areaStream.point = areaPointFirst;
|
|
6840
6840
|
}
|
|
6841
|
-
function areaPointFirst(
|
|
6841
|
+
function areaPointFirst(x3, y3) {
|
|
6842
6842
|
areaStream.point = areaPoint;
|
|
6843
|
-
x00$2 = x0$3 =
|
|
6843
|
+
x00$2 = x0$3 = x3, y00$2 = y0$3 = y3;
|
|
6844
6844
|
}
|
|
6845
|
-
function areaPoint(
|
|
6846
|
-
areaRingSum.add(y0$3 *
|
|
6847
|
-
x0$3 =
|
|
6845
|
+
function areaPoint(x3, y3) {
|
|
6846
|
+
areaRingSum.add(y0$3 * x3 - x0$3 * y3);
|
|
6847
|
+
x0$3 = x3, y0$3 = y3;
|
|
6848
6848
|
}
|
|
6849
6849
|
function areaRingEnd() {
|
|
6850
6850
|
areaPoint(x00$2, y00$2);
|
|
@@ -6862,13 +6862,13 @@ var boundsStream = {
|
|
|
6862
6862
|
return bounds;
|
|
6863
6863
|
}
|
|
6864
6864
|
};
|
|
6865
|
-
function boundsPoint(
|
|
6866
|
-
if (
|
|
6867
|
-
if (
|
|
6865
|
+
function boundsPoint(x3, y3) {
|
|
6866
|
+
if (x3 < x0$2) x0$2 = x3;
|
|
6867
|
+
if (x3 > x1) x1 = x3;
|
|
6868
6868
|
if (y3 < y0$2) y0$2 = y3;
|
|
6869
6869
|
if (y3 > y1) y1 = y3;
|
|
6870
6870
|
}
|
|
6871
|
-
var X0 = 0, Y0 = 0, Z0 = 0, X1 = 0, Y1 = 0, Z1 = 0, X22 = 0,
|
|
6871
|
+
var X0 = 0, Y0 = 0, Z0 = 0, X1 = 0, Y1 = 0, Z1 = 0, X22 = 0, Y22 = 0, Z22 = 0, x00$1, y00$1, x0$1, y0$1;
|
|
6872
6872
|
var centroidStream = {
|
|
6873
6873
|
point: centroidPoint,
|
|
6874
6874
|
lineStart: centroidLineStart,
|
|
@@ -6883,29 +6883,29 @@ var centroidStream = {
|
|
|
6883
6883
|
centroidStream.lineEnd = centroidLineEnd;
|
|
6884
6884
|
},
|
|
6885
6885
|
result: function() {
|
|
6886
|
-
var centroid =
|
|
6887
|
-
X0 = Y0 = Z0 = X1 = Y1 = Z1 = X22 =
|
|
6886
|
+
var centroid = Z22 ? [X22 / Z22, Y22 / Z22] : Z1 ? [X1 / Z1, Y1 / Z1] : Z0 ? [X0 / Z0, Y0 / Z0] : [NaN, NaN];
|
|
6887
|
+
X0 = Y0 = Z0 = X1 = Y1 = Z1 = X22 = Y22 = Z22 = 0;
|
|
6888
6888
|
return centroid;
|
|
6889
6889
|
}
|
|
6890
6890
|
};
|
|
6891
|
-
function centroidPoint(
|
|
6892
|
-
X0 +=
|
|
6891
|
+
function centroidPoint(x3, y3) {
|
|
6892
|
+
X0 += x3;
|
|
6893
6893
|
Y0 += y3;
|
|
6894
6894
|
++Z0;
|
|
6895
6895
|
}
|
|
6896
6896
|
function centroidLineStart() {
|
|
6897
6897
|
centroidStream.point = centroidPointFirstLine;
|
|
6898
6898
|
}
|
|
6899
|
-
function centroidPointFirstLine(
|
|
6899
|
+
function centroidPointFirstLine(x3, y3) {
|
|
6900
6900
|
centroidStream.point = centroidPointLine;
|
|
6901
|
-
centroidPoint(x0$1 =
|
|
6901
|
+
centroidPoint(x0$1 = x3, y0$1 = y3);
|
|
6902
6902
|
}
|
|
6903
|
-
function centroidPointLine(
|
|
6904
|
-
var dx =
|
|
6905
|
-
X1 +=
|
|
6906
|
-
Y1 +=
|
|
6907
|
-
Z1 +=
|
|
6908
|
-
centroidPoint(x0$1 =
|
|
6903
|
+
function centroidPointLine(x3, y3) {
|
|
6904
|
+
var dx = x3 - x0$1, dy = y3 - y0$1, z3 = sqrt(dx * dx + dy * dy);
|
|
6905
|
+
X1 += z3 * (x0$1 + x3) / 2;
|
|
6906
|
+
Y1 += z3 * (y0$1 + y3) / 2;
|
|
6907
|
+
Z1 += z3;
|
|
6908
|
+
centroidPoint(x0$1 = x3, y0$1 = y3);
|
|
6909
6909
|
}
|
|
6910
6910
|
function centroidLineEnd() {
|
|
6911
6911
|
centroidStream.point = centroidPoint;
|
|
@@ -6916,28 +6916,28 @@ function centroidRingStart() {
|
|
|
6916
6916
|
function centroidRingEnd() {
|
|
6917
6917
|
centroidPointRing(x00$1, y00$1);
|
|
6918
6918
|
}
|
|
6919
|
-
function centroidPointFirstRing(
|
|
6919
|
+
function centroidPointFirstRing(x3, y3) {
|
|
6920
6920
|
centroidStream.point = centroidPointRing;
|
|
6921
|
-
centroidPoint(x00$1 = x0$1 =
|
|
6922
|
-
}
|
|
6923
|
-
function centroidPointRing(
|
|
6924
|
-
var dx =
|
|
6925
|
-
X1 +=
|
|
6926
|
-
Y1 +=
|
|
6927
|
-
Z1 +=
|
|
6928
|
-
|
|
6929
|
-
X22 +=
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
centroidPoint(x0$1 =
|
|
6921
|
+
centroidPoint(x00$1 = x0$1 = x3, y00$1 = y0$1 = y3);
|
|
6922
|
+
}
|
|
6923
|
+
function centroidPointRing(x3, y3) {
|
|
6924
|
+
var dx = x3 - x0$1, dy = y3 - y0$1, z3 = sqrt(dx * dx + dy * dy);
|
|
6925
|
+
X1 += z3 * (x0$1 + x3) / 2;
|
|
6926
|
+
Y1 += z3 * (y0$1 + y3) / 2;
|
|
6927
|
+
Z1 += z3;
|
|
6928
|
+
z3 = y0$1 * x3 - x0$1 * y3;
|
|
6929
|
+
X22 += z3 * (x0$1 + x3);
|
|
6930
|
+
Y22 += z3 * (y0$1 + y3);
|
|
6931
|
+
Z22 += z3 * 3;
|
|
6932
|
+
centroidPoint(x0$1 = x3, y0$1 = y3);
|
|
6933
6933
|
}
|
|
6934
6934
|
function PathContext(context) {
|
|
6935
6935
|
this._context = context;
|
|
6936
6936
|
}
|
|
6937
6937
|
PathContext.prototype = {
|
|
6938
6938
|
_radius: 4.5,
|
|
6939
|
-
pointRadius: function(
|
|
6940
|
-
return this._radius =
|
|
6939
|
+
pointRadius: function(_3) {
|
|
6940
|
+
return this._radius = _3, this;
|
|
6941
6941
|
},
|
|
6942
6942
|
polygonStart: function() {
|
|
6943
6943
|
this._line = 0;
|
|
@@ -6952,20 +6952,20 @@ PathContext.prototype = {
|
|
|
6952
6952
|
if (this._line === 0) this._context.closePath();
|
|
6953
6953
|
this._point = NaN;
|
|
6954
6954
|
},
|
|
6955
|
-
point: function(
|
|
6955
|
+
point: function(x3, y3) {
|
|
6956
6956
|
switch (this._point) {
|
|
6957
6957
|
case 0: {
|
|
6958
|
-
this._context.moveTo(
|
|
6958
|
+
this._context.moveTo(x3, y3);
|
|
6959
6959
|
this._point = 1;
|
|
6960
6960
|
break;
|
|
6961
6961
|
}
|
|
6962
6962
|
case 1: {
|
|
6963
|
-
this._context.lineTo(
|
|
6963
|
+
this._context.lineTo(x3, y3);
|
|
6964
6964
|
break;
|
|
6965
6965
|
}
|
|
6966
6966
|
default: {
|
|
6967
|
-
this._context.moveTo(
|
|
6968
|
-
this._context.arc(
|
|
6967
|
+
this._context.moveTo(x3 + this._radius, y3);
|
|
6968
|
+
this._context.arc(x3, y3, this._radius, 0, tau);
|
|
6969
6969
|
break;
|
|
6970
6970
|
}
|
|
6971
6971
|
}
|
|
@@ -6994,14 +6994,14 @@ var lengthStream = {
|
|
|
6994
6994
|
return length;
|
|
6995
6995
|
}
|
|
6996
6996
|
};
|
|
6997
|
-
function lengthPointFirst(
|
|
6997
|
+
function lengthPointFirst(x3, y3) {
|
|
6998
6998
|
lengthStream.point = lengthPoint;
|
|
6999
|
-
x00 = x0 =
|
|
6999
|
+
x00 = x0 = x3, y00 = y0 = y3;
|
|
7000
7000
|
}
|
|
7001
|
-
function lengthPoint(
|
|
7002
|
-
x0 -=
|
|
7001
|
+
function lengthPoint(x3, y3) {
|
|
7002
|
+
x0 -= x3, y0 -= y3;
|
|
7003
7003
|
lengthSum.add(sqrt(x0 * x0 + y0 * y0));
|
|
7004
|
-
x0 =
|
|
7004
|
+
x0 = x3, y0 = y3;
|
|
7005
7005
|
}
|
|
7006
7006
|
let cacheDigits, cacheAppend, cacheRadius, cacheCircle;
|
|
7007
7007
|
class PathString {
|
|
@@ -7010,8 +7010,8 @@ class PathString {
|
|
|
7010
7010
|
this._radius = 4.5;
|
|
7011
7011
|
this._ = "";
|
|
7012
7012
|
}
|
|
7013
|
-
pointRadius(
|
|
7014
|
-
this._radius = +
|
|
7013
|
+
pointRadius(_3) {
|
|
7014
|
+
this._radius = +_3;
|
|
7015
7015
|
return this;
|
|
7016
7016
|
}
|
|
7017
7017
|
polygonStart() {
|
|
@@ -7027,19 +7027,19 @@ class PathString {
|
|
|
7027
7027
|
if (this._line === 0) this._ += "Z";
|
|
7028
7028
|
this._point = NaN;
|
|
7029
7029
|
}
|
|
7030
|
-
point(
|
|
7030
|
+
point(x3, y3) {
|
|
7031
7031
|
switch (this._point) {
|
|
7032
7032
|
case 0: {
|
|
7033
|
-
this._append`M${
|
|
7033
|
+
this._append`M${x3},${y3}`;
|
|
7034
7034
|
this._point = 1;
|
|
7035
7035
|
break;
|
|
7036
7036
|
}
|
|
7037
7037
|
case 1: {
|
|
7038
|
-
this._append`L${
|
|
7038
|
+
this._append`L${x3},${y3}`;
|
|
7039
7039
|
break;
|
|
7040
7040
|
}
|
|
7041
7041
|
default: {
|
|
7042
|
-
this._append`M${
|
|
7042
|
+
this._append`M${x3},${y3}`;
|
|
7043
7043
|
if (this._radius !== cacheRadius || this._append !== cacheAppend) {
|
|
7044
7044
|
const r2 = this._radius;
|
|
7045
7045
|
const s2 = this._;
|
|
@@ -7062,24 +7062,24 @@ class PathString {
|
|
|
7062
7062
|
}
|
|
7063
7063
|
}
|
|
7064
7064
|
function append(strings) {
|
|
7065
|
-
let
|
|
7065
|
+
let i4 = 1;
|
|
7066
7066
|
this._ += strings[0];
|
|
7067
|
-
for (const j2 = strings.length;
|
|
7068
|
-
this._ += arguments[
|
|
7067
|
+
for (const j2 = strings.length; i4 < j2; ++i4) {
|
|
7068
|
+
this._ += arguments[i4] + strings[i4];
|
|
7069
7069
|
}
|
|
7070
7070
|
}
|
|
7071
7071
|
function appendRound(digits) {
|
|
7072
|
-
const
|
|
7073
|
-
if (!(
|
|
7074
|
-
if (
|
|
7075
|
-
if (
|
|
7076
|
-
const k2 = 10 **
|
|
7077
|
-
cacheDigits =
|
|
7072
|
+
const d4 = Math.floor(digits);
|
|
7073
|
+
if (!(d4 >= 0)) throw new RangeError(`invalid digits: ${digits}`);
|
|
7074
|
+
if (d4 > 15) return append;
|
|
7075
|
+
if (d4 !== cacheDigits) {
|
|
7076
|
+
const k2 = 10 ** d4;
|
|
7077
|
+
cacheDigits = d4;
|
|
7078
7078
|
cacheAppend = function append2(strings) {
|
|
7079
|
-
let
|
|
7079
|
+
let i4 = 1;
|
|
7080
7080
|
this._ += strings[0];
|
|
7081
|
-
for (const j2 = strings.length;
|
|
7082
|
-
this._ += Math.round(arguments[
|
|
7081
|
+
for (const j2 = strings.length; i4 < j2; ++i4) {
|
|
7082
|
+
this._ += Math.round(arguments[i4] * k2) / k2 + strings[i4];
|
|
7083
7083
|
}
|
|
7084
7084
|
};
|
|
7085
7085
|
}
|
|
@@ -7110,29 +7110,29 @@ function geoPath(projection2, context) {
|
|
|
7110
7110
|
geoStream(object2, projectionStream(centroidStream));
|
|
7111
7111
|
return centroidStream.result();
|
|
7112
7112
|
};
|
|
7113
|
-
path.projection = function(
|
|
7113
|
+
path.projection = function(_3) {
|
|
7114
7114
|
if (!arguments.length) return projection2;
|
|
7115
|
-
projectionStream =
|
|
7115
|
+
projectionStream = _3 == null ? (projection2 = null, identity$1) : (projection2 = _3).stream;
|
|
7116
7116
|
return path;
|
|
7117
7117
|
};
|
|
7118
|
-
path.context = function(
|
|
7118
|
+
path.context = function(_3) {
|
|
7119
7119
|
if (!arguments.length) return context;
|
|
7120
|
-
contextStream =
|
|
7120
|
+
contextStream = _3 == null ? (context = null, new PathString(digits)) : new PathContext(context = _3);
|
|
7121
7121
|
if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius);
|
|
7122
7122
|
return path;
|
|
7123
7123
|
};
|
|
7124
|
-
path.pointRadius = function(
|
|
7124
|
+
path.pointRadius = function(_3) {
|
|
7125
7125
|
if (!arguments.length) return pointRadius;
|
|
7126
|
-
pointRadius = typeof
|
|
7126
|
+
pointRadius = typeof _3 === "function" ? _3 : (contextStream.pointRadius(+_3), +_3);
|
|
7127
7127
|
return path;
|
|
7128
7128
|
};
|
|
7129
|
-
path.digits = function(
|
|
7129
|
+
path.digits = function(_3) {
|
|
7130
7130
|
if (!arguments.length) return digits;
|
|
7131
|
-
if (
|
|
7131
|
+
if (_3 == null) digits = null;
|
|
7132
7132
|
else {
|
|
7133
|
-
const
|
|
7134
|
-
if (!(
|
|
7135
|
-
digits =
|
|
7133
|
+
const d4 = Math.floor(_3);
|
|
7134
|
+
if (!(d4 >= 0)) throw new RangeError(`invalid digits: ${_3}`);
|
|
7135
|
+
digits = d4;
|
|
7136
7136
|
}
|
|
7137
7137
|
if (context === null) contextStream = new PathString(digits);
|
|
7138
7138
|
return path;
|
|
@@ -7151,8 +7151,8 @@ function TransformStream() {
|
|
|
7151
7151
|
}
|
|
7152
7152
|
TransformStream.prototype = {
|
|
7153
7153
|
constructor: TransformStream,
|
|
7154
|
-
point: function(
|
|
7155
|
-
this.stream.point(
|
|
7154
|
+
point: function(x3, y3) {
|
|
7155
|
+
this.stream.point(x3, y3);
|
|
7156
7156
|
},
|
|
7157
7157
|
sphere: function() {
|
|
7158
7158
|
this.stream.sphere();
|
|
@@ -7181,8 +7181,8 @@ function fit(projection2, fitBounds, object2) {
|
|
|
7181
7181
|
}
|
|
7182
7182
|
function fitExtent(projection2, extent, object2) {
|
|
7183
7183
|
return fit(projection2, function(b4) {
|
|
7184
|
-
var w3 = extent[1][0] - extent[0][0],
|
|
7185
|
-
projection2.scale(150 * k2).translate([
|
|
7184
|
+
var w3 = extent[1][0] - extent[0][0], h3 = extent[1][1] - extent[0][1], k2 = Math.min(w3 / (b4[1][0] - b4[0][0]), h3 / (b4[1][1] - b4[0][1])), x3 = +extent[0][0] + (w3 - k2 * (b4[1][0] + b4[0][0])) / 2, y3 = +extent[0][1] + (h3 - k2 * (b4[1][1] + b4[0][1])) / 2;
|
|
7185
|
+
projection2.scale(150 * k2).translate([x3, y3]);
|
|
7186
7186
|
}, object2);
|
|
7187
7187
|
}
|
|
7188
7188
|
function fitSize(projection2, size, object2) {
|
|
@@ -7190,14 +7190,14 @@ function fitSize(projection2, size, object2) {
|
|
|
7190
7190
|
}
|
|
7191
7191
|
function fitWidth(projection2, width, object2) {
|
|
7192
7192
|
return fit(projection2, function(b4) {
|
|
7193
|
-
var w3 = +width, k2 = w3 / (b4[1][0] - b4[0][0]),
|
|
7194
|
-
projection2.scale(150 * k2).translate([
|
|
7193
|
+
var w3 = +width, k2 = w3 / (b4[1][0] - b4[0][0]), x3 = (w3 - k2 * (b4[1][0] + b4[0][0])) / 2, y3 = -k2 * b4[0][1];
|
|
7194
|
+
projection2.scale(150 * k2).translate([x3, y3]);
|
|
7195
7195
|
}, object2);
|
|
7196
7196
|
}
|
|
7197
7197
|
function fitHeight(projection2, height, object2) {
|
|
7198
7198
|
return fit(projection2, function(b4) {
|
|
7199
|
-
var
|
|
7200
|
-
projection2.scale(150 * k2).translate([
|
|
7199
|
+
var h3 = +height, k2 = h3 / (b4[1][1] - b4[0][1]), x3 = -k2 * b4[0][0], y3 = (h3 - k2 * (b4[1][1] + b4[0][1])) / 2;
|
|
7200
|
+
projection2.scale(150 * k2).translate([x3, y3]);
|
|
7201
7201
|
}, object2);
|
|
7202
7202
|
}
|
|
7203
7203
|
var maxDepth = 16, cosMinDistance = cos(30 * radians);
|
|
@@ -7206,9 +7206,9 @@ function resample(project, delta2) {
|
|
|
7206
7206
|
}
|
|
7207
7207
|
function resampleNone(project) {
|
|
7208
7208
|
return transformer({
|
|
7209
|
-
point: function(
|
|
7210
|
-
|
|
7211
|
-
this.stream.point(
|
|
7209
|
+
point: function(x3, y3) {
|
|
7210
|
+
x3 = project(x3, y3);
|
|
7211
|
+
this.stream.point(x3[0], x3[1]);
|
|
7212
7212
|
}
|
|
7213
7213
|
});
|
|
7214
7214
|
}
|
|
@@ -7216,11 +7216,11 @@ function resample$1(project, delta2) {
|
|
|
7216
7216
|
function resampleLineTo(x02, y02, lambda0, a02, b0, c0, x12, y12, lambda1, a12, b1, c1, depth, stream) {
|
|
7217
7217
|
var dx = x12 - x02, dy = y12 - y02, d22 = dx * dx + dy * dy;
|
|
7218
7218
|
if (d22 > 4 * delta2 && depth--) {
|
|
7219
|
-
var a11 = a02 + a12, b4 = b0 + b1, c3 = c0 + c1, m2 = sqrt(a11 * a11 + b4 * b4 + c3 * c3), phi2 = asin(c3 /= m2), lambda2 = abs(abs(c3) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b4, a11), p4 = project(lambda2, phi2),
|
|
7219
|
+
var a11 = a02 + a12, b4 = b0 + b1, c3 = c0 + c1, m2 = sqrt(a11 * a11 + b4 * b4 + c3 * c3), phi2 = asin(c3 /= m2), lambda2 = abs(abs(c3) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b4, a11), p4 = project(lambda2, phi2), x22 = p4[0], y22 = p4[1], dx2 = x22 - x02, dy2 = y22 - y02, dz = dy * dx2 - dx * dy2;
|
|
7220
7220
|
if (dz * dz / d22 > delta2 || abs((dx * dx2 + dy * dy2) / d22 - 0.5) > 0.3 || a02 * a12 + b0 * b1 + c0 * c1 < cosMinDistance) {
|
|
7221
|
-
resampleLineTo(x02, y02, lambda0, a02, b0, c0,
|
|
7222
|
-
stream.point(
|
|
7223
|
-
resampleLineTo(
|
|
7221
|
+
resampleLineTo(x02, y02, lambda0, a02, b0, c0, x22, y22, lambda2, a11 /= m2, b4 /= m2, c3, depth, stream);
|
|
7222
|
+
stream.point(x22, y22);
|
|
7223
|
+
resampleLineTo(x22, y22, lambda2, a11, b4, c3, x12, y12, lambda1, a12, b1, c1, depth, stream);
|
|
7224
7224
|
}
|
|
7225
7225
|
}
|
|
7226
7226
|
}
|
|
@@ -7239,9 +7239,9 @@ function resample$1(project, delta2) {
|
|
|
7239
7239
|
resampleStream.lineStart = lineStart;
|
|
7240
7240
|
}
|
|
7241
7241
|
};
|
|
7242
|
-
function point(
|
|
7243
|
-
|
|
7244
|
-
stream.point(
|
|
7242
|
+
function point(x3, y3) {
|
|
7243
|
+
x3 = project(x3, y3);
|
|
7244
|
+
stream.point(x3[0], x3[1]);
|
|
7245
7245
|
}
|
|
7246
7246
|
function lineStart() {
|
|
7247
7247
|
x02 = NaN;
|
|
@@ -7275,39 +7275,39 @@ function resample$1(project, delta2) {
|
|
|
7275
7275
|
};
|
|
7276
7276
|
}
|
|
7277
7277
|
var transformRadians = transformer({
|
|
7278
|
-
point: function(
|
|
7279
|
-
this.stream.point(
|
|
7278
|
+
point: function(x3, y3) {
|
|
7279
|
+
this.stream.point(x3 * radians, y3 * radians);
|
|
7280
7280
|
}
|
|
7281
7281
|
});
|
|
7282
7282
|
function transformRotate(rotate) {
|
|
7283
7283
|
return transformer({
|
|
7284
|
-
point: function(
|
|
7285
|
-
var r2 = rotate(
|
|
7284
|
+
point: function(x3, y3) {
|
|
7285
|
+
var r2 = rotate(x3, y3);
|
|
7286
7286
|
return this.stream.point(r2[0], r2[1]);
|
|
7287
7287
|
}
|
|
7288
7288
|
});
|
|
7289
7289
|
}
|
|
7290
7290
|
function scaleTranslate(k2, dx, dy, sx, sy) {
|
|
7291
|
-
function transform2(
|
|
7292
|
-
|
|
7291
|
+
function transform2(x3, y3) {
|
|
7292
|
+
x3 *= sx;
|
|
7293
7293
|
y3 *= sy;
|
|
7294
|
-
return [dx + k2 *
|
|
7294
|
+
return [dx + k2 * x3, dy - k2 * y3];
|
|
7295
7295
|
}
|
|
7296
|
-
transform2.invert = function(
|
|
7297
|
-
return [(
|
|
7296
|
+
transform2.invert = function(x3, y3) {
|
|
7297
|
+
return [(x3 - dx) / k2 * sx, (dy - y3) / k2 * sy];
|
|
7298
7298
|
};
|
|
7299
7299
|
return transform2;
|
|
7300
7300
|
}
|
|
7301
7301
|
function scaleTranslateRotate(k2, dx, dy, sx, sy, alpha) {
|
|
7302
7302
|
if (!alpha) return scaleTranslate(k2, dx, dy, sx, sy);
|
|
7303
7303
|
var cosAlpha = cos(alpha), sinAlpha = sin(alpha), a11 = cosAlpha * k2, b4 = sinAlpha * k2, ai2 = cosAlpha / k2, bi = sinAlpha / k2, ci = (sinAlpha * dy - cosAlpha * dx) / k2, fi = (sinAlpha * dx + cosAlpha * dy) / k2;
|
|
7304
|
-
function transform2(
|
|
7305
|
-
|
|
7304
|
+
function transform2(x3, y3) {
|
|
7305
|
+
x3 *= sx;
|
|
7306
7306
|
y3 *= sy;
|
|
7307
|
-
return [a11 *
|
|
7307
|
+
return [a11 * x3 - b4 * y3 + dx, dy - b4 * x3 - a11 * y3];
|
|
7308
7308
|
}
|
|
7309
|
-
transform2.invert = function(
|
|
7310
|
-
return [sx * (ai2 *
|
|
7309
|
+
transform2.invert = function(x3, y3) {
|
|
7310
|
+
return [sx * (ai2 * x3 - bi * y3 + ci), sy * (fi - bi * x3 - ai2 * y3)];
|
|
7311
7311
|
};
|
|
7312
7312
|
return transform2;
|
|
7313
7313
|
}
|
|
@@ -7317,7 +7317,7 @@ function projection(project) {
|
|
|
7317
7317
|
})();
|
|
7318
7318
|
}
|
|
7319
7319
|
function projectionMutator(projectAt) {
|
|
7320
|
-
var project, k2 = 150,
|
|
7320
|
+
var project, k2 = 150, x3 = 480, y3 = 250, lambda = 0, phi = 0, deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, alpha = 0, sx = 1, sy = 1, theta = null, preclip = clipAntimeridian, x02 = null, y02, x12, y12, postclip = identity$1, delta2 = 0.5, projectResample, projectTransform, projectRotateTransform, cache, cacheStream;
|
|
7321
7321
|
function projection2(point) {
|
|
7322
7322
|
return projectRotateTransform(point[0] * radians, point[1] * radians);
|
|
7323
7323
|
}
|
|
@@ -7328,41 +7328,41 @@ function projectionMutator(projectAt) {
|
|
|
7328
7328
|
projection2.stream = function(stream) {
|
|
7329
7329
|
return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));
|
|
7330
7330
|
};
|
|
7331
|
-
projection2.preclip = function(
|
|
7332
|
-
return arguments.length ? (preclip =
|
|
7331
|
+
projection2.preclip = function(_3) {
|
|
7332
|
+
return arguments.length ? (preclip = _3, theta = void 0, reset()) : preclip;
|
|
7333
7333
|
};
|
|
7334
|
-
projection2.postclip = function(
|
|
7335
|
-
return arguments.length ? (postclip =
|
|
7334
|
+
projection2.postclip = function(_3) {
|
|
7335
|
+
return arguments.length ? (postclip = _3, x02 = y02 = x12 = y12 = null, reset()) : postclip;
|
|
7336
7336
|
};
|
|
7337
|
-
projection2.clipAngle = function(
|
|
7338
|
-
return arguments.length ? (preclip = +
|
|
7337
|
+
projection2.clipAngle = function(_3) {
|
|
7338
|
+
return arguments.length ? (preclip = +_3 ? clipCircle(theta = _3 * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;
|
|
7339
7339
|
};
|
|
7340
|
-
projection2.clipExtent = function(
|
|
7341
|
-
return arguments.length ? (postclip =
|
|
7340
|
+
projection2.clipExtent = function(_3) {
|
|
7341
|
+
return arguments.length ? (postclip = _3 == null ? (x02 = y02 = x12 = y12 = null, identity$1) : clipRectangle(x02 = +_3[0][0], y02 = +_3[0][1], x12 = +_3[1][0], y12 = +_3[1][1]), reset()) : x02 == null ? null : [[x02, y02], [x12, y12]];
|
|
7342
7342
|
};
|
|
7343
|
-
projection2.scale = function(
|
|
7344
|
-
return arguments.length ? (k2 = +
|
|
7343
|
+
projection2.scale = function(_3) {
|
|
7344
|
+
return arguments.length ? (k2 = +_3, recenter()) : k2;
|
|
7345
7345
|
};
|
|
7346
|
-
projection2.translate = function(
|
|
7347
|
-
return arguments.length ? (
|
|
7346
|
+
projection2.translate = function(_3) {
|
|
7347
|
+
return arguments.length ? (x3 = +_3[0], y3 = +_3[1], recenter()) : [x3, y3];
|
|
7348
7348
|
};
|
|
7349
|
-
projection2.center = function(
|
|
7350
|
-
return arguments.length ? (lambda =
|
|
7349
|
+
projection2.center = function(_3) {
|
|
7350
|
+
return arguments.length ? (lambda = _3[0] % 360 * radians, phi = _3[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];
|
|
7351
7351
|
};
|
|
7352
|
-
projection2.rotate = function(
|
|
7353
|
-
return arguments.length ? (deltaLambda =
|
|
7352
|
+
projection2.rotate = function(_3) {
|
|
7353
|
+
return arguments.length ? (deltaLambda = _3[0] % 360 * radians, deltaPhi = _3[1] % 360 * radians, deltaGamma = _3.length > 2 ? _3[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];
|
|
7354
7354
|
};
|
|
7355
|
-
projection2.angle = function(
|
|
7356
|
-
return arguments.length ? (alpha =
|
|
7355
|
+
projection2.angle = function(_3) {
|
|
7356
|
+
return arguments.length ? (alpha = _3 % 360 * radians, recenter()) : alpha * degrees;
|
|
7357
7357
|
};
|
|
7358
|
-
projection2.reflectX = function(
|
|
7359
|
-
return arguments.length ? (sx =
|
|
7358
|
+
projection2.reflectX = function(_3) {
|
|
7359
|
+
return arguments.length ? (sx = _3 ? -1 : 1, recenter()) : sx < 0;
|
|
7360
7360
|
};
|
|
7361
|
-
projection2.reflectY = function(
|
|
7362
|
-
return arguments.length ? (sy =
|
|
7361
|
+
projection2.reflectY = function(_3) {
|
|
7362
|
+
return arguments.length ? (sy = _3 ? -1 : 1, recenter()) : sy < 0;
|
|
7363
7363
|
};
|
|
7364
|
-
projection2.precision = function(
|
|
7365
|
-
return arguments.length ? (projectResample = resample(projectTransform, delta2 =
|
|
7364
|
+
projection2.precision = function(_3) {
|
|
7365
|
+
return arguments.length ? (projectResample = resample(projectTransform, delta2 = _3 * _3), reset()) : sqrt(delta2);
|
|
7366
7366
|
};
|
|
7367
7367
|
projection2.fitExtent = function(extent, object2) {
|
|
7368
7368
|
return fitExtent(projection2, extent, object2);
|
|
@@ -7377,7 +7377,7 @@ function projectionMutator(projectAt) {
|
|
|
7377
7377
|
return fitHeight(projection2, height, object2);
|
|
7378
7378
|
};
|
|
7379
7379
|
function recenter() {
|
|
7380
|
-
var center = scaleTranslateRotate(k2, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)), transform2 = scaleTranslateRotate(k2,
|
|
7380
|
+
var center = scaleTranslateRotate(k2, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)), transform2 = scaleTranslateRotate(k2, x3 - center[0], y3 - center[1], sx, sy, alpha);
|
|
7381
7381
|
rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);
|
|
7382
7382
|
projectTransform = compose(project, transform2);
|
|
7383
7383
|
projectRotateTransform = compose(rotate, projectTransform);
|
|
@@ -7397,25 +7397,25 @@ function projectionMutator(projectAt) {
|
|
|
7397
7397
|
function mercatorRaw(lambda, phi) {
|
|
7398
7398
|
return [lambda, log(tan((halfPi + phi) / 2))];
|
|
7399
7399
|
}
|
|
7400
|
-
mercatorRaw.invert = function(
|
|
7401
|
-
return [
|
|
7400
|
+
mercatorRaw.invert = function(x3, y3) {
|
|
7401
|
+
return [x3, 2 * atan(exp(y3)) - halfPi];
|
|
7402
7402
|
};
|
|
7403
7403
|
function geoMercator() {
|
|
7404
7404
|
return mercatorProjection(mercatorRaw).scale(961 / tau);
|
|
7405
7405
|
}
|
|
7406
7406
|
function mercatorProjection(project) {
|
|
7407
7407
|
var m2 = projection(project), center = m2.center, scale = m2.scale, translate = m2.translate, clipExtent = m2.clipExtent, x02 = null, y02, x12, y12;
|
|
7408
|
-
m2.scale = function(
|
|
7409
|
-
return arguments.length ? (scale(
|
|
7408
|
+
m2.scale = function(_3) {
|
|
7409
|
+
return arguments.length ? (scale(_3), reclip()) : scale();
|
|
7410
7410
|
};
|
|
7411
|
-
m2.translate = function(
|
|
7412
|
-
return arguments.length ? (translate(
|
|
7411
|
+
m2.translate = function(_3) {
|
|
7412
|
+
return arguments.length ? (translate(_3), reclip()) : translate();
|
|
7413
7413
|
};
|
|
7414
|
-
m2.center = function(
|
|
7415
|
-
return arguments.length ? (center(
|
|
7414
|
+
m2.center = function(_3) {
|
|
7415
|
+
return arguments.length ? (center(_3), reclip()) : center();
|
|
7416
7416
|
};
|
|
7417
|
-
m2.clipExtent = function(
|
|
7418
|
-
return arguments.length ? (
|
|
7417
|
+
m2.clipExtent = function(_3) {
|
|
7418
|
+
return arguments.length ? (_3 == null ? x02 = y02 = x12 = y12 = null : (x02 = +_3[0][0], y02 = +_3[0][1], x12 = +_3[1][0], y12 = +_3[1][1]), reclip()) : x02 == null ? null : [[x02, y02], [x12, y12]];
|
|
7419
7419
|
};
|
|
7420
7420
|
function reclip() {
|
|
7421
7421
|
var k2 = pi * scale(), t3 = m2(rotation(m2.rotate()).invert([0, 0]));
|
|
@@ -7423,14 +7423,14 @@ function mercatorProjection(project) {
|
|
|
7423
7423
|
}
|
|
7424
7424
|
return reclip();
|
|
7425
7425
|
}
|
|
7426
|
-
function identity(
|
|
7427
|
-
return
|
|
7426
|
+
function identity(x3) {
|
|
7427
|
+
return x3;
|
|
7428
7428
|
}
|
|
7429
7429
|
function transform(transform2) {
|
|
7430
7430
|
if (transform2 == null) return identity;
|
|
7431
7431
|
var x02, y02, kx = transform2.scale[0], ky = transform2.scale[1], dx = transform2.translate[0], dy = transform2.translate[1];
|
|
7432
|
-
return function(input,
|
|
7433
|
-
if (!
|
|
7432
|
+
return function(input, i4) {
|
|
7433
|
+
if (!i4) x02 = y02 = 0;
|
|
7434
7434
|
var j2 = 2, n2 = input.length, output = new Array(n2);
|
|
7435
7435
|
output[0] = (x02 += input[0]) * kx + dx;
|
|
7436
7436
|
output[1] = (y02 += input[1]) * ky + dy;
|
|
@@ -7439,8 +7439,8 @@ function transform(transform2) {
|
|
|
7439
7439
|
};
|
|
7440
7440
|
}
|
|
7441
7441
|
function reverse(array, n2) {
|
|
7442
|
-
var t3, j2 = array.length,
|
|
7443
|
-
while (
|
|
7442
|
+
var t3, j2 = array.length, i4 = j2 - n2;
|
|
7443
|
+
while (i4 < --j2) t3 = array[i4], array[i4++] = array[j2], array[j2] = t3;
|
|
7444
7444
|
}
|
|
7445
7445
|
function topojsonFeature(topology, o2) {
|
|
7446
7446
|
if (typeof o2 === "string") o2 = topology.objects[o2];
|
|
@@ -7454,19 +7454,19 @@ function feature(topology, o2) {
|
|
|
7454
7454
|
}
|
|
7455
7455
|
function object(topology, o2) {
|
|
7456
7456
|
var transformPoint = transform(topology.transform), arcs = topology.arcs;
|
|
7457
|
-
function arc(
|
|
7457
|
+
function arc(i4, points) {
|
|
7458
7458
|
if (points.length) points.pop();
|
|
7459
|
-
for (var a11 = arcs[
|
|
7459
|
+
for (var a11 = arcs[i4 < 0 ? ~i4 : i4], k2 = 0, n2 = a11.length; k2 < n2; ++k2) {
|
|
7460
7460
|
points.push(transformPoint(a11[k2], k2));
|
|
7461
7461
|
}
|
|
7462
|
-
if (
|
|
7462
|
+
if (i4 < 0) reverse(points, n2);
|
|
7463
7463
|
}
|
|
7464
7464
|
function point(p4) {
|
|
7465
7465
|
return transformPoint(p4);
|
|
7466
7466
|
}
|
|
7467
7467
|
function line(arcs2) {
|
|
7468
7468
|
var points = [];
|
|
7469
|
-
for (var
|
|
7469
|
+
for (var i4 = 0, n2 = arcs2.length; i4 < n2; ++i4) arc(arcs2[i4], points);
|
|
7470
7470
|
if (points.length < 2) points.push(points[0]);
|
|
7471
7471
|
return points;
|
|
7472
7472
|
}
|
|
@@ -7555,11 +7555,11 @@ const choroplethStyles = tv({
|
|
|
7555
7555
|
legendScale: "flex items-center justify-between text-caption-xs text-fg-muted tabular-nums"
|
|
7556
7556
|
}
|
|
7557
7557
|
});
|
|
7558
|
-
function isTopology(
|
|
7559
|
-
return !Array.isArray(
|
|
7558
|
+
function isTopology(g3) {
|
|
7559
|
+
return !Array.isArray(g3) && g3.type === "Topology";
|
|
7560
7560
|
}
|
|
7561
|
-
function isFeatureCollection(
|
|
7562
|
-
return !Array.isArray(
|
|
7561
|
+
function isFeatureCollection(g3) {
|
|
7562
|
+
return !Array.isArray(g3) && g3.type === "FeatureCollection";
|
|
7563
7563
|
}
|
|
7564
7564
|
function normalizeFeatures(geography, topologyObject) {
|
|
7565
7565
|
if (Array.isArray(geography)) return geography;
|
|
@@ -7613,21 +7613,21 @@ const ChoroplethMap = forwardRef(
|
|
|
7613
7613
|
}
|
|
7614
7614
|
);
|
|
7615
7615
|
const pathGen = geoPath(proj);
|
|
7616
|
-
return features.map((
|
|
7617
|
-
feature:
|
|
7618
|
-
d: pathGen(
|
|
7616
|
+
return features.map((f3) => ({
|
|
7617
|
+
feature: f3,
|
|
7618
|
+
d: pathGen(f3) ?? ""
|
|
7619
7619
|
}));
|
|
7620
7620
|
}, [features, projection2, width, height]);
|
|
7621
|
-
const getId = (
|
|
7622
|
-
if (getFeatureId) return getFeatureId(
|
|
7623
|
-
if (
|
|
7624
|
-
const p4 =
|
|
7621
|
+
const getId = (f3) => {
|
|
7622
|
+
if (getFeatureId) return getFeatureId(f3);
|
|
7623
|
+
if (f3.id != null) return f3.id;
|
|
7624
|
+
const p4 = f3.properties ?? {};
|
|
7625
7625
|
return p4.id ?? p4.ID ?? "";
|
|
7626
7626
|
};
|
|
7627
|
-
const getName = (
|
|
7628
|
-
if (getFeatureName) return getFeatureName(
|
|
7629
|
-
const p4 =
|
|
7630
|
-
return String(p4.name ?? p4.nome ?? p4.NOME ?? p4.Name ?? getId(
|
|
7627
|
+
const getName = (f3) => {
|
|
7628
|
+
if (getFeatureName) return getFeatureName(f3);
|
|
7629
|
+
const p4 = f3.properties ?? {};
|
|
7630
|
+
return String(p4.name ?? p4.nome ?? p4.NOME ?? p4.Name ?? getId(f3));
|
|
7631
7631
|
};
|
|
7632
7632
|
const numeric = Object.values(values).filter(
|
|
7633
7633
|
(v3) => typeof v3 === "number" && Number.isFinite(v3)
|
|
@@ -7661,26 +7661,26 @@ const ChoroplethMap = forwardRef(
|
|
|
7661
7661
|
role: "img",
|
|
7662
7662
|
"aria-label": ariaLabel,
|
|
7663
7663
|
onMouseLeave: () => setHover(null),
|
|
7664
|
-
onMouseMove: (
|
|
7665
|
-
const r2 =
|
|
7664
|
+
onMouseMove: (e3) => {
|
|
7665
|
+
const r2 = e3.currentTarget.getBoundingClientRect();
|
|
7666
7666
|
setPos({
|
|
7667
|
-
ax: (
|
|
7668
|
-
ay: (
|
|
7667
|
+
ax: (e3.clientX - r2.left) / r2.width * 100,
|
|
7668
|
+
ay: (e3.clientY - r2.top) / r2.height * 100
|
|
7669
7669
|
});
|
|
7670
7670
|
},
|
|
7671
7671
|
children: [
|
|
7672
|
-
geometry.map(({ feature: feature2, d:
|
|
7672
|
+
geometry.map(({ feature: feature2, d: d4 }, index) => {
|
|
7673
7673
|
const id = getId(feature2);
|
|
7674
7674
|
const value = values[id];
|
|
7675
7675
|
return /* @__PURE__ */ jsx(
|
|
7676
7676
|
"path",
|
|
7677
7677
|
{
|
|
7678
|
-
d:
|
|
7678
|
+
d: d4,
|
|
7679
7679
|
fill: fillFor(value),
|
|
7680
7680
|
strokeWidth,
|
|
7681
7681
|
className: styles2.path(),
|
|
7682
7682
|
style: onFeatureClick ? { cursor: "pointer" } : void 0,
|
|
7683
|
-
onMouseEnter: () => setHover({ id, name: getName(feature2), value, feature: feature2, d:
|
|
7683
|
+
onMouseEnter: () => setHover({ id, name: getName(feature2), value, feature: feature2, d: d4 }),
|
|
7684
7684
|
onClick: onFeatureClick ? () => onFeatureClick({
|
|
7685
7685
|
id,
|
|
7686
7686
|
name: getName(feature2),
|
|
@@ -7693,7 +7693,7 @@ const ChoroplethMap = forwardRef(
|
|
|
7693
7693
|
}),
|
|
7694
7694
|
selectedId != null && (() => {
|
|
7695
7695
|
const sel = geometry.find(
|
|
7696
|
-
(
|
|
7696
|
+
(g3) => getId(g3.feature) === selectedId
|
|
7697
7697
|
);
|
|
7698
7698
|
return sel ? /* @__PURE__ */ jsx(
|
|
7699
7699
|
"path",
|
|
@@ -8031,13 +8031,13 @@ function applyFilterModel(items, model, fieldsById) {
|
|
|
8031
8031
|
const field = fieldsById.get(fieldId);
|
|
8032
8032
|
if (!field) return true;
|
|
8033
8033
|
const val = field.accessor(item);
|
|
8034
|
-
const anyOf = group.filter((
|
|
8035
|
-
const noneOf = group.filter((
|
|
8036
|
-
const scalar = group.filter((
|
|
8034
|
+
const anyOf = group.filter((g3) => g3.operator === "isAnyOf").map((g3) => g3.value);
|
|
8035
|
+
const noneOf = group.filter((g3) => g3.operator === "isNoneOf").map((g3) => g3.value);
|
|
8036
|
+
const scalar = group.filter((g3) => g3.operator !== "isAnyOf" && g3.operator !== "isNoneOf");
|
|
8037
8037
|
if (anyOf.length && !anyOf.some((v3) => matchOp("equals", val, v3))) return false;
|
|
8038
8038
|
if (noneOf.length && noneOf.some((v3) => matchOp("equals", val, v3))) return false;
|
|
8039
|
-
for (const
|
|
8040
|
-
if (!matchOp(
|
|
8039
|
+
for (const g3 of scalar) {
|
|
8040
|
+
if (!matchOp(g3.operator, val, g3.value)) return false;
|
|
8041
8041
|
}
|
|
8042
8042
|
return true;
|
|
8043
8043
|
};
|
|
@@ -8145,7 +8145,7 @@ function useDataList({
|
|
|
8145
8145
|
}, []);
|
|
8146
8146
|
const fieldsById = useMemo(() => {
|
|
8147
8147
|
const m2 = /* @__PURE__ */ new Map();
|
|
8148
|
-
for (const
|
|
8148
|
+
for (const f3 of filterFields ?? []) m2.set(f3.id, f3);
|
|
8149
8149
|
return m2;
|
|
8150
8150
|
}, [filterFields]);
|
|
8151
8151
|
const matchesSearch = useCallback(
|
|
@@ -8156,7 +8156,7 @@ function useDataList({
|
|
|
8156
8156
|
asText(item.title),
|
|
8157
8157
|
asText(item.subtitle),
|
|
8158
8158
|
asText(item.description),
|
|
8159
|
-
...(filterFields ?? []).map((
|
|
8159
|
+
...(filterFields ?? []).map((f3) => asText(f3.accessor(item)))
|
|
8160
8160
|
].join(" ").toLowerCase();
|
|
8161
8161
|
return hay.includes(s2);
|
|
8162
8162
|
},
|
|
@@ -8186,12 +8186,12 @@ function useDataList({
|
|
|
8186
8186
|
}
|
|
8187
8187
|
const ALL_VIEW_ID = "__all__";
|
|
8188
8188
|
function toColumns(fields) {
|
|
8189
|
-
return fields.map((
|
|
8190
|
-
key:
|
|
8191
|
-
label:
|
|
8192
|
-
filterType:
|
|
8193
|
-
type:
|
|
8194
|
-
options:
|
|
8189
|
+
return fields.map((f3) => ({
|
|
8190
|
+
key: f3.id,
|
|
8191
|
+
label: f3.label,
|
|
8192
|
+
filterType: f3.type,
|
|
8193
|
+
type: f3.type === "select" ? "select" : f3.type === "number" ? "number" : "text",
|
|
8194
|
+
options: f3.options
|
|
8195
8195
|
}));
|
|
8196
8196
|
}
|
|
8197
8197
|
function toAppliedFilters(model, fieldsById) {
|
|
@@ -8254,7 +8254,7 @@ function DataListToolbar({
|
|
|
8254
8254
|
const columns = useMemo(() => toColumns(filterFields ?? []), [filterFields]);
|
|
8255
8255
|
const fieldsById = useMemo(() => {
|
|
8256
8256
|
const m2 = /* @__PURE__ */ new Map();
|
|
8257
|
-
for (const
|
|
8257
|
+
for (const f3 of filterFields ?? []) m2.set(f3.id, f3);
|
|
8258
8258
|
return m2;
|
|
8259
8259
|
}, [filterFields]);
|
|
8260
8260
|
const appliedFilters = useMemo(
|
|
@@ -8266,7 +8266,7 @@ function DataListToolbar({
|
|
|
8266
8266
|
const isEmptyVal2 = (v3) => v3 == null || v3 === "" || Array.isArray(v3) && v3.length === 0;
|
|
8267
8267
|
const setGroupValue = (field, operator, value) => {
|
|
8268
8268
|
const rest = filterModel.items.filter(
|
|
8269
|
-
(
|
|
8269
|
+
(i4) => !(i4.field === field && i4.operator === operator)
|
|
8270
8270
|
);
|
|
8271
8271
|
const next = isEmptyVal2(value) ? rest : [
|
|
8272
8272
|
...rest,
|
|
@@ -8279,8 +8279,8 @@ function DataListToolbar({
|
|
|
8279
8279
|
];
|
|
8280
8280
|
onFilterModelChange({ ...filterModel, items: next });
|
|
8281
8281
|
};
|
|
8282
|
-
const renderEditableChip = (
|
|
8283
|
-
const [field, operator] =
|
|
8282
|
+
const renderEditableChip = (f3, defaultChip) => {
|
|
8283
|
+
const [field, operator] = f3.id.split("|");
|
|
8284
8284
|
const fieldDef = fieldsById.get(field);
|
|
8285
8285
|
if (!fieldDef) return defaultChip;
|
|
8286
8286
|
const isMulti = operator === "isAnyOf" || operator === "isNoneOf";
|
|
@@ -8288,16 +8288,16 @@ function DataListToolbar({
|
|
|
8288
8288
|
const regType = isMulti ? "multiSelect" : fieldDef.type;
|
|
8289
8289
|
const def = columnTypeRegistry.get(regType);
|
|
8290
8290
|
const groupItems = filterModel.items.filter(
|
|
8291
|
-
(
|
|
8291
|
+
(i4) => i4.field === field && i4.operator === operator
|
|
8292
8292
|
);
|
|
8293
8293
|
const currentValue = isTuple ? groupItems[0]?.value : isMulti ? groupItems.flatMap(
|
|
8294
|
-
(
|
|
8294
|
+
(i4) => Array.isArray(i4.value) ? i4.value : i4.value != null ? [i4.value] : []
|
|
8295
8295
|
) : groupItems[0]?.value;
|
|
8296
8296
|
return /* @__PURE__ */ jsxs(
|
|
8297
8297
|
Popover,
|
|
8298
8298
|
{
|
|
8299
|
-
open: openChipKey ===
|
|
8300
|
-
onOpenChange: (o2) => setOpenChipKey(o2 ?
|
|
8299
|
+
open: openChipKey === f3.id,
|
|
8300
|
+
onOpenChange: (o2) => setOpenChipKey(o2 ? f3.id : null),
|
|
8301
8301
|
children: [
|
|
8302
8302
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: defaultChip }),
|
|
8303
8303
|
/* @__PURE__ */ jsx(PopoverContent, { align: "start", className: "p-0", children: def.renderFastFilterInput({
|
|
@@ -8333,7 +8333,7 @@ function DataListToolbar({
|
|
|
8333
8333
|
onFilterModelChange({
|
|
8334
8334
|
...filterModel,
|
|
8335
8335
|
items: filterModel.items.filter(
|
|
8336
|
-
(
|
|
8336
|
+
(i4) => !(i4.field === field && i4.operator === operator)
|
|
8337
8337
|
)
|
|
8338
8338
|
});
|
|
8339
8339
|
};
|
|
@@ -8356,7 +8356,7 @@ function DataListToolbar({
|
|
|
8356
8356
|
{
|
|
8357
8357
|
value: search,
|
|
8358
8358
|
placeholder: searchPlaceholder ?? "Buscar...",
|
|
8359
|
-
onChange: (
|
|
8359
|
+
onChange: (e3) => onSearch(e3.target.value)
|
|
8360
8360
|
}
|
|
8361
8361
|
) : void 0,
|
|
8362
8362
|
filter: filterFields && filterFields.length > 0 ? /* @__PURE__ */ jsx(
|
|
@@ -8378,7 +8378,7 @@ function DataListToolbar({
|
|
|
8378
8378
|
}
|
|
8379
8379
|
) }),
|
|
8380
8380
|
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", sideOffset: 4, children: moreActions.map(
|
|
8381
|
-
(a11,
|
|
8381
|
+
(a11, i4) => a11.separator ? /* @__PURE__ */ jsx(DropdownMenuSeparator, {}, `s${i4}`) : /* @__PURE__ */ jsxs(
|
|
8382
8382
|
DropdownMenuItem,
|
|
8383
8383
|
{
|
|
8384
8384
|
variant: a11.destructive ? "destructive" : "default",
|
|
@@ -8389,7 +8389,7 @@ function DataListToolbar({
|
|
|
8389
8389
|
a11.label
|
|
8390
8390
|
]
|
|
8391
8391
|
},
|
|
8392
|
-
a11.label?.toString() ??
|
|
8392
|
+
a11.label?.toString() ?? i4
|
|
8393
8393
|
)
|
|
8394
8394
|
) })
|
|
8395
8395
|
] }) : void 0
|
|
@@ -8402,7 +8402,7 @@ function DataListToolbar({
|
|
|
8402
8402
|
onRemove: removeFilter,
|
|
8403
8403
|
onClearAll: () => onFilterModelChange({ ...filterModel, items: [] }),
|
|
8404
8404
|
separator: false,
|
|
8405
|
-
renderChip: (
|
|
8405
|
+
renderChip: (f3, defaultChip) => renderEditableChip(f3, defaultChip)
|
|
8406
8406
|
}
|
|
8407
8407
|
),
|
|
8408
8408
|
filterFields && filterFields.length > 0 && /* @__PURE__ */ jsx(
|
|
@@ -8480,7 +8480,7 @@ function DataListVirtualized({
|
|
|
8480
8480
|
}) }) });
|
|
8481
8481
|
}
|
|
8482
8482
|
function DataListSkeleton({ count = 3 }) {
|
|
8483
|
-
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-gp-lg", "aria-hidden": "true", children: Array.from({ length: count }).map((
|
|
8483
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-gp-lg", "aria-hidden": "true", children: Array.from({ length: count }).map((_3, i4) => /* @__PURE__ */ jsxs(
|
|
8484
8484
|
"div",
|
|
8485
8485
|
{
|
|
8486
8486
|
className: "w-full p-pad-xl bg-bg-surface border border-border-subtle dark:border-border-default rounded-radius-lg",
|
|
@@ -8489,7 +8489,7 @@ function DataListSkeleton({ count = 3 }) {
|
|
|
8489
8489
|
/* @__PURE__ */ jsx("div", { className: cn("h-[12px] rounded-radius-full bg-bg-muted animate-pulse", "w-2/3") })
|
|
8490
8490
|
]
|
|
8491
8491
|
},
|
|
8492
|
-
|
|
8492
|
+
i4
|
|
8493
8493
|
)) });
|
|
8494
8494
|
}
|
|
8495
8495
|
function DataListInfinite({
|
|
@@ -8683,7 +8683,7 @@ function DataList(props) {
|
|
|
8683
8683
|
" selecionado(s)"
|
|
8684
8684
|
] }),
|
|
8685
8685
|
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-gp-sm", children: [
|
|
8686
|
-
bulkActions.map((a11,
|
|
8686
|
+
bulkActions.map((a11, i4) => /* @__PURE__ */ jsx(
|
|
8687
8687
|
Button,
|
|
8688
8688
|
{
|
|
8689
8689
|
size: "sm",
|
|
@@ -8693,7 +8693,7 @@ function DataList(props) {
|
|
|
8693
8693
|
onClick: () => a11.onClick(ctrl.selected),
|
|
8694
8694
|
children: a11.label
|
|
8695
8695
|
},
|
|
8696
|
-
|
|
8696
|
+
i4
|
|
8697
8697
|
)),
|
|
8698
8698
|
/* @__PURE__ */ jsx(
|
|
8699
8699
|
Button,
|
|
@@ -8799,7 +8799,7 @@ function ToastCard({
|
|
|
8799
8799
|
variant: "ghost",
|
|
8800
8800
|
size: "icon-2xs",
|
|
8801
8801
|
"aria-label": "Fechar",
|
|
8802
|
-
iconLeft: /* @__PURE__ */ jsx(
|
|
8802
|
+
iconLeft: /* @__PURE__ */ jsx(X3, {}),
|
|
8803
8803
|
onClick: handleClose
|
|
8804
8804
|
}
|
|
8805
8805
|
)
|
|
@@ -8876,13 +8876,13 @@ function useBrand(options) {
|
|
|
8876
8876
|
useEffect(() => {
|
|
8877
8877
|
if (typeof window === "undefined") return;
|
|
8878
8878
|
const valido = (v3) => typeof v3 === "string" && ids.split(",").includes(v3);
|
|
8879
|
-
const onCustom = (
|
|
8880
|
-
const next =
|
|
8879
|
+
const onCustom = (e3) => {
|
|
8880
|
+
const next = e3.detail;
|
|
8881
8881
|
if (valido(next)) setBrandState(next);
|
|
8882
8882
|
};
|
|
8883
|
-
const onStorage = (
|
|
8884
|
-
if (
|
|
8885
|
-
if (valido(
|
|
8883
|
+
const onStorage = (e3) => {
|
|
8884
|
+
if (e3.key !== STORAGE_KEY) return;
|
|
8885
|
+
if (valido(e3.newValue)) setBrandState(e3.newValue);
|
|
8886
8886
|
};
|
|
8887
8887
|
window.addEventListener(CHANGE_EVENT, onCustom);
|
|
8888
8888
|
window.addEventListener("storage", onStorage);
|
|
@@ -8893,8 +8893,8 @@ function useBrand(options) {
|
|
|
8893
8893
|
}, [ids]);
|
|
8894
8894
|
const toggle = useCallback(() => {
|
|
8895
8895
|
const lista = ids.split(",");
|
|
8896
|
-
const
|
|
8897
|
-
setBrand(lista[(
|
|
8896
|
+
const i4 = lista.indexOf(brand);
|
|
8897
|
+
setBrand(lista[(i4 + 1) % lista.length] ?? fallback);
|
|
8898
8898
|
}, [brand, ids, setBrand, fallback]);
|
|
8899
8899
|
const current = useMemo(
|
|
8900
8900
|
() => brands.find((b4) => b4.id === brand) ?? brands[0],
|
|
@@ -8909,7 +8909,15 @@ export {
|
|
|
8909
8909
|
Avatar,
|
|
8910
8910
|
u as AvatarGroup,
|
|
8911
8911
|
BRANDS,
|
|
8912
|
-
|
|
8912
|
+
B3 as Badge,
|
|
8913
|
+
B2 as Breadcrumb,
|
|
8914
|
+
d3 as BreadcrumbEllipsis,
|
|
8915
|
+
e2 as BreadcrumbItem,
|
|
8916
|
+
f2 as BreadcrumbLink,
|
|
8917
|
+
g2 as BreadcrumbList,
|
|
8918
|
+
h2 as BreadcrumbPage,
|
|
8919
|
+
i2 as BreadcrumbSeparator,
|
|
8920
|
+
c2 as BreadcrumbSwitcher,
|
|
8913
8921
|
B as BulkActionButton,
|
|
8914
8922
|
v as BulkActionsBar,
|
|
8915
8923
|
Button,
|
|
@@ -8963,19 +8971,19 @@ export {
|
|
|
8963
8971
|
V as FormFieldSwitch,
|
|
8964
8972
|
c as FormFieldTextarea,
|
|
8965
8973
|
H2 as Header,
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8974
|
+
d2 as HeaderBreadcrumb,
|
|
8975
|
+
e as HeaderMessages,
|
|
8976
|
+
f as HeaderNotifications,
|
|
8977
|
+
g as HeaderSearch,
|
|
8978
|
+
h as HeaderThemeSwitcher,
|
|
8971
8979
|
Icon,
|
|
8972
8980
|
Input,
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8981
|
+
W2 as InputGroup,
|
|
8982
|
+
X2 as InputGroupAddon,
|
|
8983
|
+
Y2 as InputGroupButton,
|
|
8984
|
+
Z2 as InputGroupInput,
|
|
8985
|
+
_2 as InputGroupText,
|
|
8986
|
+
$2 as InputGroupTextarea,
|
|
8979
8987
|
W as Kanban,
|
|
8980
8988
|
a10 as Kpi,
|
|
8981
8989
|
b3 as KpiDelta,
|
|
@@ -8992,31 +9000,31 @@ export {
|
|
|
8992
9000
|
Modal,
|
|
8993
9001
|
MonthYearPicker,
|
|
8994
9002
|
X as MoreMenu,
|
|
8995
|
-
|
|
9003
|
+
I2 as MoreMenuCheckboxItem,
|
|
8996
9004
|
DropdownMenuItem as MoreMenuItem,
|
|
8997
9005
|
DropdownMenuLabel as MoreMenuLabel,
|
|
8998
|
-
|
|
8999
|
-
|
|
9006
|
+
O2 as MoreMenuRadioGroup,
|
|
9007
|
+
P2 as MoreMenuRadioItem,
|
|
9000
9008
|
DropdownMenuSeparator as MoreMenuSeparator,
|
|
9001
9009
|
P3 as PageHeader,
|
|
9002
9010
|
P as Panel,
|
|
9003
9011
|
Y as PanelBody,
|
|
9004
9012
|
G2 as PanelCloseAction,
|
|
9005
|
-
|
|
9013
|
+
H3 as PanelContent,
|
|
9006
9014
|
Z as PanelFooter,
|
|
9007
9015
|
_ as PanelHeader,
|
|
9008
9016
|
F2 as PanelRoot,
|
|
9009
|
-
|
|
9017
|
+
O3 as PanelTrigger,
|
|
9010
9018
|
$ as SELECTION_COLUMN_WIDTH,
|
|
9011
9019
|
ScreenLoader,
|
|
9012
9020
|
S2 as SidebarBrandIcon,
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9021
|
+
i as SidebarItem,
|
|
9022
|
+
j as SidebarPanel,
|
|
9023
|
+
k as SidebarPill,
|
|
9024
|
+
l as SidebarRail,
|
|
9025
|
+
m as SidebarSection,
|
|
9026
|
+
n as SidebarSubgroup,
|
|
9027
|
+
o as SingleMenuSidebar,
|
|
9020
9028
|
a0 as SortPanel,
|
|
9021
9029
|
a1 as SortPopover,
|
|
9022
9030
|
Spinner,
|
|
@@ -9059,13 +9067,15 @@ export {
|
|
|
9059
9067
|
ag as avatarGroupItem,
|
|
9060
9068
|
ah as avatarGroupRoot,
|
|
9061
9069
|
ai as avatarVariants,
|
|
9062
|
-
|
|
9063
|
-
|
|
9070
|
+
aC as badgeVariants,
|
|
9071
|
+
p2 as breadcrumbCaminho,
|
|
9072
|
+
q as breadcrumbSwitcher,
|
|
9073
|
+
ag2 as buttonVariants,
|
|
9064
9074
|
cardCheckbox,
|
|
9065
9075
|
cardOption,
|
|
9066
9076
|
cardOptionGroup,
|
|
9067
|
-
|
|
9068
|
-
|
|
9077
|
+
r as chipCount,
|
|
9078
|
+
s as chipVariants,
|
|
9069
9079
|
colorPickerStyles,
|
|
9070
9080
|
columnTypeRegistry,
|
|
9071
9081
|
conversationListItemStyles,
|
|
@@ -9078,12 +9088,12 @@ export {
|
|
|
9078
9088
|
aj as floatingPanelStyles,
|
|
9079
9089
|
iconStyles,
|
|
9080
9090
|
icons,
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9091
|
+
ad2 as inputGroupVariants,
|
|
9092
|
+
i3 as inputVariants,
|
|
9093
|
+
t2 as isExternalHref,
|
|
9084
9094
|
isFilterEntryActive,
|
|
9085
|
-
|
|
9086
|
-
|
|
9095
|
+
v2 as isHashHref,
|
|
9096
|
+
w2 as isModifiedClick,
|
|
9087
9097
|
markdownTextStyles,
|
|
9088
9098
|
messageAckStyles,
|
|
9089
9099
|
messageBubbleStyles,
|
|
@@ -9095,7 +9105,7 @@ export {
|
|
|
9095
9105
|
phoneColumn,
|
|
9096
9106
|
p as presetView,
|
|
9097
9107
|
al as savedViewsMockService,
|
|
9098
|
-
|
|
9108
|
+
x2 as shouldPreventNavigation,
|
|
9099
9109
|
statusColumn,
|
|
9100
9110
|
tabsNavigationAcao,
|
|
9101
9111
|
tabsNavigationAcoes,
|
|
@@ -9112,10 +9122,10 @@ export {
|
|
|
9112
9122
|
useChart,
|
|
9113
9123
|
am as useColumnResize,
|
|
9114
9124
|
an as useColumnWidths,
|
|
9115
|
-
|
|
9125
|
+
y2 as useControllable,
|
|
9116
9126
|
ao as useDataTableContext,
|
|
9117
9127
|
ap as useFloatingPanelResize,
|
|
9118
|
-
|
|
9128
|
+
z2 as useMediaQuery,
|
|
9119
9129
|
u2 as useTheme,
|
|
9120
9130
|
useToolbarFilterControl,
|
|
9121
9131
|
useToolbarFilters,
|