@enyxs/wikex-components 0.11.32 → 0.11.33

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/index.js CHANGED
@@ -67,7 +67,7 @@ __export(index_exports, {
67
67
  wikexComponents: () => wikexComponents
68
68
  });
69
69
  module.exports = __toCommonJS(index_exports);
70
- var import_react40 = require("react");
70
+ var import_react41 = require("react");
71
71
 
72
72
  // src/minimal-ui/blocks.tsx
73
73
  var import_react5 = require("react");
@@ -3612,7 +3612,7 @@ var dynamicListBlocks = configs.map(createBlock);
3612
3612
  var dynamicListTypes = new Set(dynamicListBlocks.map((block) => block.definition.type));
3613
3613
 
3614
3614
  // src/wikex/original-commodity-blocks.tsx
3615
- var import_react37 = require("react");
3615
+ var import_react38 = require("react");
3616
3616
  var import_navigation3 = require("next/navigation.js");
3617
3617
  var import_i18next = require("i18next");
3618
3618
  var import_react_i18next27 = require("react-i18next");
@@ -7602,12 +7602,12 @@ function AboutRegistrationSection(props) {
7602
7602
  }
7603
7603
 
7604
7604
  // src/commodity-original/app/bang-phi-ky-quy/FeesAndMarginContent.tsx
7605
- var import_react20 = require("react");
7605
+ var import_react21 = require("react");
7606
7606
  var import_react_i18next4 = require("react-i18next");
7607
7607
 
7608
7608
  // src/wikex/fees-table.tsx
7609
7609
  var import_jsx_runtime23 = require("react/jsx-runtime");
7610
- var import_react19 = require("react");
7610
+ var import_react20 = require("react");
7611
7611
  var import_styled_components12 = __toESM(require("styled-components"));
7612
7612
  var import_TextField2 = __toESM(require("@mui/material/TextField"));
7613
7613
  var import_Dialog = __toESM(require("@mui/material/Dialog"));
@@ -7660,23 +7660,23 @@ function moveFeesItem(items, from, to) {
7660
7660
  next.splice(to, 0, item);
7661
7661
  return next;
7662
7662
  }
7663
- function setFeesCellAlignment(table, target, textAlign) {
7664
- if (!table.columns.some((column) => column.key === target.columnKey)) return table;
7665
- if (target.part === "thead") {
7666
- return { ...table, columns: table.columns.map((column) => {
7667
- if (column.key !== target.columnKey) return column;
7663
+ function setFeesColumnAlignment(table, columnKey, textAlign) {
7664
+ if (!table.columns.some((column) => column.key === columnKey)) return table;
7665
+ return {
7666
+ ...table,
7667
+ columns: table.columns.map((column) => {
7668
+ if (column.key !== columnKey) return column;
7668
7669
  const { textAlign: _previous, ...rest } = column;
7669
7670
  return { ...rest, ...textAlign ? { textAlign } : {} };
7670
- }) };
7671
- }
7672
- if (!table.rows.some((row) => row.id === target.rowId)) return table;
7673
- return { ...table, rows: table.rows.map((row) => {
7674
- if (row.id !== target.rowId) return row;
7675
- const { cellAlignments: _previous, ...rest } = row;
7676
- const alignments = { ...row.cellAlignments, ...textAlign ? { [target.columnKey]: textAlign } : {} };
7677
- if (!textAlign) delete alignments[target.columnKey];
7678
- return { ...rest, ...Object.keys(alignments).length ? { cellAlignments: alignments } : {} };
7679
- }) };
7671
+ }),
7672
+ rows: table.rows.map((row) => {
7673
+ if (!row.cellAlignments || !Object.prototype.hasOwnProperty.call(row.cellAlignments, columnKey)) return row;
7674
+ const { cellAlignments, ...rest } = row;
7675
+ const alignments = { ...cellAlignments };
7676
+ delete alignments[columnKey];
7677
+ return { ...rest, ...Object.keys(alignments).length ? { cellAlignments: alignments } : {} };
7678
+ })
7679
+ };
7680
7680
  }
7681
7681
  function validateFeesTextAlign(value4) {
7682
7682
  if (!FEES_TEXT_ALIGNS.includes(value4)) throw new Error("C\u0103n l\u1EC1 b\u1EA3ng ph\xED kh\xF4ng h\u1EE3p l\u1EC7. Ch\u1ECDn c\u0103n tr\xE1i, gi\u1EEFa ho\u1EB7c ph\u1EA3i.");
@@ -7897,7 +7897,7 @@ function FeesTypographyControls({ value: value4, onChange }) {
7897
7897
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material.Stack, { direction: { xs: "column", sm: "row" }, gap: 1.5, justifyContent: "space-between", alignItems: { sm: "center" }, sx: { mb: 2 }, children: [
7898
7898
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material.Box, { children: [
7899
7899
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Typography, { variant: "subtitle2", children: "\u0110\u1ECBnh d\u1EA1ng ch\u1EEF" }),
7900
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", children: "C\u1EE1 ch\u1EEF v\xE0 \u0111\u1ED9 \u0111\u1EADm \xE1p d\u1EE5ng cho to\xE0n b\u1EA3ng, theo ng\xF4n ng\u1EEF \u0111ang ch\u1ECDn. C\u0103n l\u1EC1 \u0111\u01B0\u1EE3c ch\u1EC9nh ri\xEAng b\u1EB1ng c\xE1ch ch\u1ECDn t\u1EEBng \xF4." })
7900
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", children: "C\u1EE1 ch\u1EEF v\xE0 \u0111\u1ED9 \u0111\u1EADm \xE1p d\u1EE5ng cho to\xE0n b\u1EA3ng, theo ng\xF4n ng\u1EEF \u0111ang ch\u1ECDn. Ch\u1ECDn c\u1ED9t trong m\u1EE5c C\u0103n l\u1EC1 theo c\u1ED9t \u0111\u1EC3 ch\u1EC9nh ti\xEAu \u0111\u1EC1 v\xE0 to\xE0n b\u1ED9 gi\xE1 tr\u1ECB c\u1EE7a c\u1ED9t." })
7901
7901
  ] }),
7902
7902
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material.Stack, { direction: "row", gap: 1, flexShrink: 0, children: [
7903
7903
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material.Button, { size: "small", variant: "outlined", onClick: () => onChange({ thead: { ...value4?.thead, fontSize: 14, fontWeight: 700 }, tbody: { ...value4?.tbody, fontSize: 14, fontWeight: 500 } }), children: "D\u1EC5 \u0111\u1ECDc" }),
@@ -7936,53 +7936,78 @@ function FeesTypographyControls({ value: value4, onChange }) {
7936
7936
  ] });
7937
7937
  }
7938
7938
 
7939
- // src/wikex/fees-cell-alignment-controls.tsx
7939
+ // src/wikex/fees-column-alignment-controls.tsx
7940
+ var import_react18 = require("react");
7940
7941
  var import_material2 = require("@mui/material");
7941
7942
  var import_jsx_runtime18 = require("react/jsx-runtime");
7942
7943
  var labels = { left: "C\u0103n tr\xE1i", center: "C\u0103n gi\u1EEFa", right: "C\u0103n ph\u1EA3i" };
7943
7944
  var englishLabels = { left: "Align left", center: "Align center", right: "Align right" };
7944
- function FeesCellAlignmentControls({ label, value: value4, english, onChange }) {
7945
+ function FeesColumnAlignmentControls({ columns, columnKey, english, onSelectColumn, onChange }) {
7946
+ const root = (0, import_react18.useRef)(null);
7947
+ const column = columns.find((item) => item.key === columnKey);
7945
7948
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
7946
7949
  import_material2.Stack,
7947
7950
  {
7951
+ ref: root,
7948
7952
  role: "group",
7949
- "aria-label": english ? "Selected cell alignment" : "C\u0103n l\u1EC1 \xF4 \u0111ang ch\u1ECDn",
7950
- direction: { xs: "column", sm: "row" },
7953
+ "aria-label": english ? "Column alignment" : "C\u0103n l\u1EC1 theo c\u1ED9t",
7951
7954
  spacing: 1.5,
7952
- alignItems: { sm: "center" },
7953
7955
  sx: { my: 2, p: 1.5, border: "1px solid", borderColor: "divider", borderRadius: 1.5 },
7954
7956
  children: [
7955
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_material2.Stack, { spacing: 0.5, sx: { flex: 1, minWidth: 0 }, children: [
7956
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material2.Typography, { variant: "subtitle2", children: english ? "Selected cell alignment" : "C\u0103n l\u1EC1 \xF4 \u0111ang ch\u1ECDn" }),
7957
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material2.Typography, { variant: "caption", color: "text.secondary", title: label, noWrap: true, "aria-live": "polite", children: label ?? (english ? "Select a header or value cell to align it." : "B\u1EA5m v\xE0o \xF4 ti\xEAu \u0111\u1EC1 ho\u1EB7c \xF4 gi\xE1 tr\u1ECB c\u1EA7n c\u0103n l\u1EC1.") })
7958
- ] }),
7959
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_material2.Stack, { direction: "row", spacing: 0.5, flexWrap: "wrap", useFlexGap: true, children: [
7960
- FEES_TEXT_ALIGNS.map((align) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7961
- import_material2.Button,
7962
- {
7963
- size: "small",
7964
- disabled: !label,
7965
- variant: value4 === align ? "contained" : "outlined",
7966
- "aria-pressed": value4 === align,
7967
- onMouseDown: (event) => event.preventDefault(),
7968
- onClick: () => onChange(align),
7969
- children: (english ? englishLabels : labels)[align]
7970
- },
7971
- align
7972
- )),
7973
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7974
- import_material2.Button,
7957
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material2.Typography, { variant: "subtitle2", children: english ? "Column alignment" : "C\u0103n l\u1EC1 theo c\u1ED9t" }),
7958
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_material2.Stack, { direction: { xs: "column", sm: "row" }, spacing: 1.5, alignItems: { sm: "center" }, children: [
7959
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
7960
+ import_material2.TextField,
7975
7961
  {
7962
+ select: true,
7976
7963
  size: "small",
7977
- color: "inherit",
7978
- disabled: !label || value4 === void 0,
7979
- "aria-label": english ? "Reset selected cell alignment" : "C\u0103n l\u1EC1 m\u1EB7c \u0111\u1ECBnh cho \xF4 \u0111ang ch\u1ECDn",
7980
- onMouseDown: (event) => event.preventDefault(),
7981
- onClick: () => onChange(void 0),
7982
- children: english ? "Default" : "M\u1EB7c \u0111\u1ECBnh"
7964
+ label: english ? "Column to align" : "C\u1ED9t c\u1EA7n c\u0103n l\u1EC1",
7965
+ value: column?.key ?? "",
7966
+ sx: { flex: 1, minWidth: 0 },
7967
+ slotProps: { inputLabel: { shrink: true }, select: {
7968
+ displayEmpty: true,
7969
+ SelectDisplayProps: { "aria-labelledby": void 0 },
7970
+ inputProps: { "aria-label": english ? "Column to align" : "C\u1ED9t c\u1EA7n c\u0103n l\u1EC1" },
7971
+ MenuProps: { container: () => root.current?.ownerDocument.body ?? document.body }
7972
+ } },
7973
+ onChange: (event) => onSelectColumn(event.target.value),
7974
+ children: [
7975
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material2.MenuItem, { value: "", disabled: true, children: english ? "Select a column" : "Ch\u1ECDn c\u1ED9t" }),
7976
+ columns.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_material2.MenuItem, { value: item.key, children: [
7977
+ index + 1,
7978
+ ". ",
7979
+ item.title || (english ? "Untitled column" : "C\u1ED9t ch\u01B0a c\xF3 ti\xEAu \u0111\u1EC1")
7980
+ ] }, item.key))
7981
+ ]
7983
7982
  }
7984
- )
7985
- ] })
7983
+ ),
7984
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_material2.Stack, { direction: "row", spacing: 0.5, flexWrap: "wrap", useFlexGap: true, children: [
7985
+ FEES_TEXT_ALIGNS.map((align) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7986
+ import_material2.Button,
7987
+ {
7988
+ size: "small",
7989
+ disabled: !column,
7990
+ variant: column?.textAlign === align ? "contained" : "outlined",
7991
+ "aria-pressed": column?.textAlign === align,
7992
+ onClick: () => onChange(align),
7993
+ children: (english ? englishLabels : labels)[align]
7994
+ },
7995
+ align
7996
+ )),
7997
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
7998
+ import_material2.Button,
7999
+ {
8000
+ size: "small",
8001
+ color: "inherit",
8002
+ disabled: !column,
8003
+ "aria-label": english ? "Reset selected column alignment" : "C\u0103n l\u1EC1 m\u1EB7c \u0111\u1ECBnh cho c\u1ED9t \u0111ang ch\u1ECDn",
8004
+ onClick: () => onChange(void 0),
8005
+ children: english ? "Default" : "M\u1EB7c \u0111\u1ECBnh"
8006
+ }
8007
+ )
8008
+ ] })
8009
+ ] }),
8010
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_material2.Typography, { variant: "caption", color: "text.secondary", children: english ? "Applies to the header and all values in the selected column, including filtered rows and other pages." : "\xC1p d\u1EE5ng cho ti\xEAu \u0111\u1EC1 v\xE0 to\xE0n b\u1ED9 gi\xE1 tr\u1ECB c\u1EE7a c\u1ED9t \u0111\xE3 ch\u1ECDn, k\u1EC3 c\u1EA3 c\xE1c d\xF2ng \u0111ang l\u1ECDc v\xE0 \u1EDF trang kh\xE1c." })
7986
8011
  ]
7987
8012
  }
7988
8013
  );
@@ -8131,7 +8156,7 @@ var appTheme = {
8131
8156
  };
8132
8157
 
8133
8158
  // src/commodity-original/components/Table/index.tsx
8134
- var import_react18 = require("react");
8159
+ var import_react19 = require("react");
8135
8160
 
8136
8161
  // src/commodity-original/components/Table/style.ts
8137
8162
  var import_styled_components7 = __toESM(require("styled-components"));
@@ -8366,7 +8391,7 @@ function Table({
8366
8391
  const recordKey = getRowKey(record);
8367
8392
  const selectionProps = rowSelection?.getCheckboxProps?.(record);
8368
8393
  const isExpanded = expandedRowKeySet.has(recordKey);
8369
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react18.Fragment, { children: [
8394
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react19.Fragment, { children: [
8370
8395
  /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(TableRow, { "data-row-key": recordKey, children: [
8371
8396
  rowSelection ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
8372
8397
  TableSelectionInput,
@@ -8747,32 +8772,32 @@ var feesTheme = {
8747
8772
  ]))
8748
8773
  };
8749
8774
  var EditorActions = import_styled_components12.default.div.withConfig({
8750
- componentId: "sc-3c959c0c-0"
8775
+ componentId: "sc-a4d52175-0"
8751
8776
  })([
8752
8777
  `display:flex;flex-wrap:wrap;gap:8px;margin-top:16px;`
8753
8778
  ]);
8754
8779
  var EditGroup = import_styled_components12.default.div.withConfig({
8755
- componentId: "sc-3c959c0c-1"
8780
+ componentId: "sc-a4d52175-1"
8756
8781
  })([
8757
8782
  `display:flex;flex-direction:column;gap:6px;`
8758
8783
  ]);
8759
8784
  var HeaderGroup = (0, import_styled_components12.default)(EditGroup).withConfig({
8760
- componentId: "sc-3c959c0c-2"
8785
+ componentId: "sc-a4d52175-2"
8761
8786
  })([
8762
8787
  `gap:8px;`
8763
8788
  ]);
8764
8789
  var HeaderTitle = import_styled_components12.default.div.withConfig({
8765
- componentId: "sc-3c959c0c-3"
8790
+ componentId: "sc-a4d52175-3"
8766
8791
  })([
8767
8792
  `display:flex;align-items:flex-start;min-height:var(--fees-header-title-height,36px);`
8768
8793
  ]);
8769
8794
  var HeaderActions = import_styled_components12.default.div.withConfig({
8770
- componentId: "sc-3c959c0c-4"
8795
+ componentId: "sc-a4d52175-4"
8771
8796
  })([
8772
8797
  `display:flex;align-items:center;min-height:24px;`
8773
8798
  ]);
8774
8799
  var AlignedFeesTable = (0, import_styled_components12.default)(FeesAndMarginTable).withConfig({
8775
- componentId: "sc-3c959c0c-5"
8800
+ componentId: "sc-a4d52175-5"
8776
8801
  })([
8777
8802
  `&[data-editable] th{vertical-align:top;}--fees-row-background:`,
8778
8803
  `;--fees-stripe-background:`,
@@ -8805,14 +8830,14 @@ var AlignedFeesTable = (0, import_styled_components12.default)(FeesAndMarginTabl
8805
8830
  }
8806
8831
  `).join(""), ({ $typography }) => $typography?.thead?.fontSize ?? 8, ({ $typography }) => $typography?.thead?.fontSize ? 1.4 : "10px", ({ $typography }) => $typography?.tbody?.fontSize ?? 10, ({ $typography }) => $typography?.tbody?.fontSize ? 1.4 : "14px", ({ theme }) => theme.colors.accent.primary);
8807
8832
  var FeesCellContent = import_styled_components12.default.span.withConfig({
8808
- componentId: "sc-3c959c0c-6"
8833
+ componentId: "sc-a4d52175-6"
8809
8834
  })([
8810
8835
  `display:block;text-align:`,
8811
8836
  `;@media (max-width:767px){text-align:`,
8812
8837
  `;}`
8813
8838
  ], ({ $align, $alignRight }) => $align ?? ($alignRight ? "right" : "left"), ({ $align }) => $align ?? "left");
8814
8839
  var EditorButton = import_styled_components12.default.button.withConfig({
8815
- componentId: "sc-3c959c0c-7"
8840
+ componentId: "sc-a4d52175-7"
8816
8841
  })([
8817
8842
  `padding:7px 12px;border:1px solid `,
8818
8843
  `;border-radius:6px;background:`,
@@ -8821,17 +8846,17 @@ var EditorButton = import_styled_components12.default.button.withConfig({
8821
8846
  `;}&:disabled{cursor:default;opacity:.4;}`
8822
8847
  ], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
8823
8848
  var OrderActions = import_styled_components12.default.div.withConfig({
8824
- componentId: "sc-3c959c0c-8"
8849
+ componentId: "sc-a4d52175-8"
8825
8850
  })([
8826
8851
  `display:flex;gap:6px;align-items:center;flex-wrap:wrap;`
8827
8852
  ]);
8828
8853
  var PositionLabel = import_styled_components12.default.label.withConfig({
8829
- componentId: "sc-3c959c0c-9"
8854
+ componentId: "sc-a4d52175-9"
8830
8855
  })([
8831
8856
  `display:inline-flex;align-items:center;gap:6px;font-size:12px;`
8832
8857
  ]);
8833
8858
  var PositionInput = import_styled_components12.default.input.withConfig({
8834
- componentId: "sc-3c959c0c-10"
8859
+ componentId: "sc-a4d52175-10"
8835
8860
  })([
8836
8861
  `width:56px;padding:5px;border:1px solid `,
8837
8862
  `;border-radius:4px;background:`,
@@ -8840,17 +8865,17 @@ var PositionInput = import_styled_components12.default.input.withConfig({
8840
8865
  `;}`
8841
8866
  ], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.background.input, ({ theme }) => theme.colors.text.primary, ({ theme }) => theme.colors.accent.primary);
8842
8867
  var ColumnRow = import_styled_components12.default.div.withConfig({
8843
- componentId: "sc-3c959c0c-11"
8868
+ componentId: "sc-a4d52175-11"
8844
8869
  })([
8845
8870
  `display:flex;gap:12px;align-items:center;margin:16px 0;> textarea{flex:1;min-width:120px;}@media (max-width:600px){align-items:stretch;flex-direction:column;}`
8846
8871
  ]);
8847
8872
  var PaginationControls = (0, import_styled_components12.default)(FeesAndMarginPagination).withConfig({
8848
- componentId: "sc-3c959c0c-12"
8873
+ componentId: "sc-a4d52175-12"
8849
8874
  })([
8850
8875
  `align-items:center;flex-wrap:wrap;gap:16px 24px;`
8851
8876
  ]);
8852
8877
  var PageSizeLabel = import_styled_components12.default.div.withConfig({
8853
- componentId: "sc-3c959c0c-13"
8878
+ componentId: "sc-a4d52175-13"
8854
8879
  })([
8855
8880
  `display:inline-flex;align-items:center;gap:8px;color:`,
8856
8881
  `;font:inherit;font-size:13px;`
@@ -8878,20 +8903,20 @@ function Position({ value: value4, max, label, onMove }) {
8878
8903
  });
8879
8904
  }
8880
8905
  var DeleteButton = (0, import_styled_components12.default)(EditorButton).withConfig({
8881
- componentId: "sc-3c959c0c-14"
8906
+ componentId: "sc-a4d52175-14"
8882
8907
  })([
8883
8908
  `align-self:flex-start;padding:4px 8px;border:0;border-radius:4px;background:#d32f2f;color:#fff;font-size:11px;font-weight:600;line-height:16px;white-space:nowrap;text-decoration:none;&:hover{background:#b71c1c;}&:focus-visible{outline:2px solid #d32f2f;outline-offset:2px;}`
8884
8909
  ]);
8885
8910
  var CellEditorInput = import_styled_components12.default.textarea.withConfig({
8886
- componentId: "sc-3c959c0c-15"
8911
+ componentId: "sc-a4d52175-15"
8887
8912
  })([
8888
8913
  `display:block;box-sizing:border-box;width:100%;min-width:0;padding:3px;border:1px solid transparent;border-radius:3px;color:inherit;background:transparent;font:inherit;line-height:inherit;text-align:inherit;resize:none;overflow:hidden;&:hover{border-color:`,
8889
8914
  `;}&:focus{outline:1px solid `,
8890
- `;}&[data-fees-cell-selected="true"]{border-color:`,
8915
+ `;}&[data-fees-column-selected="true"]{border-color:`,
8891
8916
  `;}`
8892
8917
  ], ({ theme }) => theme.colors.border.line, ({ theme }) => theme.colors.accent.primary, ({ theme }) => theme.colors.accent.primary);
8893
8918
  function CellEditor({ onInput, ...props }) {
8894
- const ref = (0, import_react19.useRef)(null);
8919
+ const ref = (0, import_react20.useRef)(null);
8895
8920
  const fit = () => {
8896
8921
  const element = ref.current;
8897
8922
  if (!element) return;
@@ -8900,8 +8925,8 @@ function CellEditor({ onInput, ...props }) {
8900
8925
  const border = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
8901
8926
  element.style.height = `${element.scrollHeight + border}px`;
8902
8927
  };
8903
- (0, import_react19.useLayoutEffect)(fit);
8904
- (0, import_react19.useLayoutEffect)(() => {
8928
+ (0, import_react20.useLayoutEffect)(fit);
8929
+ (0, import_react20.useLayoutEffect)(() => {
8905
8930
  const element = ref.current;
8906
8931
  if (!element) return;
8907
8932
  let width = element.getBoundingClientRect().width;
@@ -8933,7 +8958,7 @@ function CellEditor({ onInput, ...props }) {
8933
8958
  });
8934
8959
  }
8935
8960
  function RowTagSelect({ selected, options, onChange }) {
8936
- const selectRoot = (0, import_react19.useRef)(null);
8961
+ const selectRoot = (0, import_react20.useRef)(null);
8937
8962
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(EditGroup, {
8938
8963
  children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", {
8939
8964
  ref: selectRoot,
@@ -9020,17 +9045,17 @@ var rightAlignedColumns = /* @__PURE__ */ new Set([
9020
9045
  "unit"
9021
9046
  ]);
9022
9047
  function FeesTable({ value: value4, editable = false, onChange, labels: labels2, size = "md", tagOrder = [], language = "vi" }) {
9023
- const [search, setSearch] = (0, import_react19.useState)("");
9024
- const [tag, setTag] = (0, import_react19.useState)("");
9025
- const [page, setPage] = (0, import_react19.useState)(1);
9026
- const [pageSize, setPageSize] = (0, import_react19.useState)(FEES_PAGE_SIZE);
9027
- const [columnsOpen, setColumnsOpen] = (0, import_react19.useState)(false);
9028
- const [typographyOpen, setTypographyOpen] = (0, import_react19.useState)(false);
9029
- const [selectedCell, setSelectedCell] = (0, import_react19.useState)(null);
9048
+ const [search, setSearch] = (0, import_react20.useState)("");
9049
+ const [tag, setTag] = (0, import_react20.useState)("");
9050
+ const [page, setPage] = (0, import_react20.useState)(1);
9051
+ const [pageSize, setPageSize] = (0, import_react20.useState)(FEES_PAGE_SIZE);
9052
+ const [columnsOpen, setColumnsOpen] = (0, import_react20.useState)(false);
9053
+ const [typographyOpen, setTypographyOpen] = (0, import_react20.useState)(false);
9054
+ const [selectedColumnKey, setSelectedColumnKey] = (0, import_react20.useState)("");
9030
9055
  const english = language === "en";
9031
9056
  const canEdit = editable && Boolean(onChange);
9032
- const tableRoot = (0, import_react19.useRef)(null);
9033
- (0, import_react19.useLayoutEffect)(() => {
9057
+ const tableRoot = (0, import_react20.useRef)(null);
9058
+ (0, import_react20.useLayoutEffect)(() => {
9034
9059
  const root = tableRoot.current;
9035
9060
  if (!root || !canEdit) return;
9036
9061
  const editors = [
@@ -9048,11 +9073,11 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
9048
9073
  canEdit,
9049
9074
  value4.columns
9050
9075
  ]);
9051
- const dialogId = (0, import_react19.useId)();
9076
+ const dialogId = (0, import_react20.useId)();
9052
9077
  const mobileFontScale = Math.max(1, (value4.typography?.thead?.fontSize ?? 8) / 8, (value4.typography?.tbody?.fontSize ?? 10) / 10);
9053
- const [createTagOpen, setCreateTagOpen] = (0, import_react19.useState)(false);
9054
- const [tagDraft, setTagDraft] = (0, import_react19.useState)("");
9055
- const [deleteTarget, setDeleteTarget] = (0, import_react19.useState)(null);
9078
+ const [createTagOpen, setCreateTagOpen] = (0, import_react20.useState)(false);
9079
+ const [tagDraft, setTagDraft] = (0, import_react20.useState)("");
9080
+ const [deleteTarget, setDeleteTarget] = (0, import_react20.useState)(null);
9056
9081
  const confirmDelete = () => {
9057
9082
  if (!deleteTarget || !canEdit) return;
9058
9083
  if (deleteTarget.kind === "row") {
@@ -9107,16 +9132,12 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
9107
9132
  const filtered = filterFeesRows(value4, search, activeTag);
9108
9133
  const displayedRows = canEdit ? filtered : sortFeesRowsByName(filtered, language);
9109
9134
  const pagination = paginateFeesRows(displayedRows, page, pageSize);
9110
- const selectedColumn = selectedCell && value4.columns.find((column) => column.key === selectedCell.columnKey);
9111
- const selectedRow = selectedCell?.part === "tbody" ? pagination.rows.find((row) => row.id === selectedCell.rowId) : void 0;
9112
- const selectedTarget = canEdit && selectedColumn && (selectedCell?.part === "thead" || selectedRow) ? selectedCell : null;
9113
- const selectedAlign = selectedTarget?.part === "thead" ? selectedColumn?.textAlign : selectedRow?.cellAlignments?.[selectedTarget?.columnKey ?? ""];
9114
- const selectedLabel = selectedTarget ? selectedTarget.part === "thead" ? `${english ? "Header" : "Ti\xEAu \u0111\u1EC1"}: ${selectedColumn?.title}` : `${selectedColumn?.title} \u2014 ${selectedRow?.cells.name || (english ? "New row" : "H\xE0ng m\u1EDBi")}` : void 0;
9115
- (0, import_react19.useLayoutEffect)(() => {
9116
- if (selectedCell && !selectedTarget) setSelectedCell(null);
9135
+ const selectedColumn = value4.columns.find((column) => column.key === selectedColumnKey);
9136
+ (0, import_react20.useLayoutEffect)(() => {
9137
+ if (selectedColumnKey && !selectedColumn) setSelectedColumnKey("");
9117
9138
  }, [
9118
- selectedCell,
9119
- selectedTarget
9139
+ selectedColumnKey,
9140
+ selectedColumn
9120
9141
  ]);
9121
9142
  const moveColumn = (from, to) => onChange?.({
9122
9143
  ...value4,
@@ -9173,11 +9194,7 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
9173
9194
  style: {
9174
9195
  textAlign: column.textAlign ?? value4.typography?.thead?.textAlign ?? "left"
9175
9196
  },
9176
- "data-fees-cell-selected": selectedTarget?.part === "thead" && selectedTarget.columnKey === column.key,
9177
- onFocus: () => setSelectedCell({
9178
- part: "thead",
9179
- columnKey: column.key
9180
- }),
9197
+ "data-fees-column-selected": selectedColumnKey === column.key,
9181
9198
  onChange: (event) => onChange?.({
9182
9199
  ...value4,
9183
9200
  columns: value4.columns.map((item) => item.key === column.key ? {
@@ -9211,14 +9228,9 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
9211
9228
  value: row.cells[column.key] ?? "",
9212
9229
  "aria-label": `${column.title} \u2014 ${row.cells.name || "H\xE0ng m\u1EDBi"}`,
9213
9230
  style: {
9214
- textAlign: row.cellAlignments?.[column.key] ?? value4.typography?.tbody?.textAlign ?? "left"
9231
+ textAlign: column.textAlign ?? row.cellAlignments?.[column.key] ?? value4.typography?.tbody?.textAlign ?? "left"
9215
9232
  },
9216
- "data-fees-cell-selected": selectedTarget?.part === "tbody" && selectedTarget.rowId === row.id && selectedTarget.columnKey === column.key,
9217
- onFocus: () => setSelectedCell({
9218
- part: "tbody",
9219
- rowId: row.id,
9220
- columnKey: column.key
9221
- }),
9233
+ "data-fees-column-selected": selectedColumnKey === column.key,
9222
9234
  onChange: (event) => changeRow(row.id, {
9223
9235
  cells: {
9224
9236
  ...row.cells,
@@ -9226,7 +9238,7 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
9226
9238
  }
9227
9239
  })
9228
9240
  }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeesCellContent, {
9229
- $align: row.cellAlignments?.[column.key] ?? value4.typography?.tbody?.textAlign,
9241
+ $align: column.textAlign ?? row.cellAlignments?.[column.key] ?? value4.typography?.tbody?.textAlign,
9230
9242
  $alignRight: rightAlignedColumns.has(column.key),
9231
9243
  children: row.cells[column.key] ?? ""
9232
9244
  })
@@ -9429,12 +9441,13 @@ function FeesTable({ value: value4, editable = false, onChange, labels: labels2,
9429
9441
  })
9430
9442
  })
9431
9443
  }),
9432
- canEdit && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeesCellAlignmentControls, {
9433
- label: selectedLabel,
9434
- value: selectedAlign,
9444
+ canEdit && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FeesColumnAlignmentControls, {
9445
+ columns: value4.columns,
9446
+ columnKey: selectedColumnKey,
9435
9447
  english,
9448
+ onSelectColumn: setSelectedColumnKey,
9436
9449
  onChange: (textAlign) => {
9437
- if (selectedTarget) onChange?.(setFeesCellAlignment(value4, selectedTarget, textAlign));
9450
+ if (selectedColumn) onChange?.(setFeesColumnAlignment(value4, selectedColumn.key, textAlign));
9438
9451
  }
9439
9452
  }),
9440
9453
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(AlignedFeesTable, {
@@ -9721,7 +9734,7 @@ var monthCodes = [
9721
9734
  function FeesAndMarginContent({ content, editable, onChange, readOnlyFields }) {
9722
9735
  const { t } = (0, import_react_i18next4.useTranslation)();
9723
9736
  const { isMobile } = useResponsive();
9724
- const [activeMonth] = (0, import_react20.useState)(0);
9737
+ const [activeMonth] = (0, import_react21.useState)(0);
9725
9738
  const field = `${content.__cmsLanguage === "en" ? "en" : "vi"}.feesTable`;
9726
9739
  const data = parseFeesTable(content[field], defaultFeesTable((key) => String(t(key))));
9727
9740
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FeesAndMarginMain, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(FeesAndMarginPageContent, { children: [
@@ -10258,7 +10271,7 @@ function ComplaintPolicyPage() {
10258
10271
  }
10259
10272
 
10260
10273
  // src/commodity-original/app/noti-mxv/NotiMxvContent.tsx
10261
- var import_react22 = require("react");
10274
+ var import_react23 = require("react");
10262
10275
  var import_react_i18next9 = require("react-i18next");
10263
10276
 
10264
10277
  // src/commodity-original/components/BlogCard/style.ts
@@ -10476,7 +10489,7 @@ function InformationHeroSection({
10476
10489
  var import_styled_components19 = __toESM(require("styled-components"));
10477
10490
 
10478
10491
  // src/commodity-original/components/DateRangePicker/index.tsx
10479
- var import_react21 = require("react");
10492
+ var import_react22 = require("react");
10480
10493
  var import_react_i18next8 = require("react-i18next");
10481
10494
  var import_radix_ui3 = require("radix-ui");
10482
10495
 
@@ -10715,11 +10728,11 @@ function DateRangePicker({
10715
10728
  }) {
10716
10729
  const { i18n, t } = (0, import_react_i18next8.useTranslation)();
10717
10730
  const { isMobile } = useResponsive();
10718
- const rootRef = (0, import_react21.useRef)(null);
10719
- const [open, setOpen] = (0, import_react21.useState)(false);
10720
- const [activeField, setActiveField] = (0, import_react21.useState)("from");
10721
- const [draft, setDraft] = (0, import_react21.useState)(value4);
10722
- const [month, setMonth] = (0, import_react21.useState)(() => getInitialMonth(value4));
10731
+ const rootRef = (0, import_react22.useRef)(null);
10732
+ const [open, setOpen] = (0, import_react22.useState)(false);
10733
+ const [activeField, setActiveField] = (0, import_react22.useState)("from");
10734
+ const [draft, setDraft] = (0, import_react22.useState)(value4);
10735
+ const [month, setMonth] = (0, import_react22.useState)(() => getInitialMonth(value4));
10723
10736
  const locale = i18n.resolvedLanguage?.startsWith("en") ? "en-US" : "vi-VN";
10724
10737
  const format = (date) => date ? new Intl.DateTimeFormat(locale, {
10725
10738
  day: "2-digit",
@@ -10728,7 +10741,7 @@ function DateRangePicker({
10728
10741
  }).format(toDate(date)) : "";
10729
10742
  const from = fromLabel ?? t("dateRangePicker.fromLabel");
10730
10743
  const to = toLabel ?? t("dateRangePicker.toLabel");
10731
- const calendarDays = (0, import_react21.useMemo)(() => getMonthDays(month), [month]);
10744
+ const calendarDays = (0, import_react22.useMemo)(() => getMonthDays(month), [month]);
10732
10745
  const duration = getDays(draft);
10733
10746
  const weekdays = [
10734
10747
  "monday",
@@ -10739,7 +10752,7 @@ function DateRangePicker({
10739
10752
  "saturday",
10740
10753
  "sunday"
10741
10754
  ];
10742
- (0, import_react21.useEffect)(() => {
10755
+ (0, import_react22.useEffect)(() => {
10743
10756
  if (!open || isMobile) return;
10744
10757
  const outside = (event) => {
10745
10758
  if (!rootRef.current?.contains(event.target)) {
@@ -11091,12 +11104,12 @@ function NotiMxvContent() {
11091
11104
  const { isMobile } = useResponsive();
11092
11105
  const { t } = (0, import_react_i18next9.useTranslation)();
11093
11106
  const resolveImage = useCmsImageResolver();
11094
- const [search, setSearch] = (0, import_react22.useState)("");
11095
- const [dateRange, setDateRange] = (0, import_react22.useState)({
11107
+ const [search, setSearch] = (0, import_react23.useState)("");
11108
+ const [dateRange, setDateRange] = (0, import_react23.useState)({
11096
11109
  from: "",
11097
11110
  to: ""
11098
11111
  });
11099
- const [page, setPage] = (0, import_react22.useState)(1);
11112
+ const [page, setPage] = (0, import_react23.useState)(1);
11100
11113
  const pageCount = Math.ceil(notifications.length / notificationsPerPage);
11101
11114
  const visibleNotifications = notifications.slice(
11102
11115
  (page - 1) * notificationsPerPage,
@@ -11175,7 +11188,7 @@ function NotiMxvContent() {
11175
11188
  }
11176
11189
 
11177
11190
  // src/commodity-original/app/products/ProductsContent.tsx
11178
- var import_react23 = require("react");
11191
+ var import_react24 = require("react");
11179
11192
 
11180
11193
  // src/commodity-original/components/Breadcrumb/index.tsx
11181
11194
  var import_link3 = __toESM(require("next/link.js"));
@@ -11606,7 +11619,7 @@ var productsPerPage = 8;
11606
11619
  function ProductsContent() {
11607
11620
  const { t } = (0, import_react_i18next10.useTranslation)();
11608
11621
  const resolveImage = useCmsImageResolver();
11609
- const [page, setPage] = (0, import_react23.useState)(1);
11622
+ const [page, setPage] = (0, import_react24.useState)(1);
11610
11623
  const title = t("landing.commodities.groups.0.title");
11611
11624
  const pageCount = Math.max(1, Math.ceil(products2.length / productsPerPage));
11612
11625
  const visibleProducts = products2.slice(
@@ -12156,7 +12169,7 @@ function getProductBySlug(slug) {
12156
12169
  }
12157
12170
 
12158
12171
  // src/commodity-original/app/thong-tin-wikex/FeaturedArticles.tsx
12159
- var import_react24 = require("react");
12172
+ var import_react25 = require("react");
12160
12173
  var import_react_i18next12 = require("react-i18next");
12161
12174
 
12162
12175
  // src/commodity-original/app/thong-tin-wikex/data.ts
@@ -12320,7 +12333,7 @@ function FeaturedArticles() {
12320
12333
  const { t } = (0, import_react_i18next12.useTranslation)();
12321
12334
  const { isMobile } = useResponsive();
12322
12335
  const resolveImage = useCmsImageResolver();
12323
- const [activeSlide, setActiveSlide] = (0, import_react24.useState)(0);
12336
+ const [activeSlide, setActiveSlide] = (0, import_react25.useState)(0);
12324
12337
  const moveSlide = (step) => {
12325
12338
  setActiveSlide(
12326
12339
  (current) => (current + step + featuredArticles.length) % featuredArticles.length
@@ -12411,7 +12424,7 @@ function FeaturedArticles() {
12411
12424
 
12412
12425
  // src/commodity-original/app/thong-tin-wikex/WikexInformationSections.tsx
12413
12426
  var import_jsx_runtime38 = require("react/jsx-runtime");
12414
- var import_react25 = require("react");
12427
+ var import_react26 = require("react");
12415
12428
  var import_react_i18next13 = require("react-i18next");
12416
12429
  var import_styled_components26 = __toESM(require("styled-components"));
12417
12430
 
@@ -12504,18 +12517,18 @@ function WikexInformationArticlesSection() {
12504
12517
  const { isMobile } = useResponsive();
12505
12518
  const { t } = (0, import_react_i18next13.useTranslation)();
12506
12519
  const resolveImage = useCmsImageResolver();
12507
- const [activeCategory, setActiveCategory] = (0, import_react25.useState)("latest");
12508
- const [dateRange, setDateRange] = (0, import_react25.useState)({
12520
+ const [activeCategory, setActiveCategory] = (0, import_react26.useState)("latest");
12521
+ const [dateRange, setDateRange] = (0, import_react26.useState)({
12509
12522
  from: "",
12510
12523
  to: ""
12511
12524
  });
12512
- const [page, setPage] = (0, import_react25.useState)(1);
12513
- const [search, setSearch] = (0, import_react25.useState)("");
12525
+ const [page, setPage] = (0, import_react26.useState)(1);
12526
+ const [search, setSearch] = (0, import_react26.useState)("");
12514
12527
  const tabs = articleCategories.map((category) => ({
12515
12528
  id: category,
12516
12529
  label: t(`wikexInformation.tabs.${category}`)
12517
12530
  }));
12518
- const filteredArticles = (0, import_react25.useMemo)(() => {
12531
+ const filteredArticles = (0, import_react26.useMemo)(() => {
12519
12532
  const normalizedSearch = search.trim().toLocaleLowerCase();
12520
12533
  return articles.filter((article) => {
12521
12534
  const matchesCategory = activeCategory === "latest" || article.category === activeCategory;
@@ -12662,7 +12675,7 @@ var import_react_i18next14 = require("react-i18next");
12662
12675
 
12663
12676
  // src/commodity-original/lib/app-theme-provider.tsx
12664
12677
  var import_jsx_runtime40 = require("react/jsx-runtime");
12665
- var import_react26 = require("react");
12678
+ var import_react27 = require("react");
12666
12679
  var import_styled_components28 = require("styled-components");
12667
12680
 
12668
12681
  // src/commodity-original/app/global-styles.tsx
@@ -12763,7 +12776,7 @@ function getPreviewThemeStore(targetDocument) {
12763
12776
  }
12764
12777
  return store;
12765
12778
  }
12766
- var AppThemeContext = /* @__PURE__ */ (0, import_react26.createContext)(null);
12779
+ var AppThemeContext = /* @__PURE__ */ (0, import_react27.createContext)(null);
12767
12780
  function isThemeName(value4) {
12768
12781
  return value4 === "light" || value4 === "dark";
12769
12782
  }
@@ -12801,15 +12814,15 @@ function subscribeToTheme(onStoreChange) {
12801
12814
  };
12802
12815
  }
12803
12816
  function AppThemeProvider({ children }) {
12804
- const rootRef = (0, import_react26.useRef)(null);
12805
- const getTargetDocument = (0, import_react26.useCallback)(() => rootRef.current?.ownerDocument ?? document, []);
12806
- const getSnapshot = (0, import_react26.useCallback)(() => {
12817
+ const rootRef = (0, import_react27.useRef)(null);
12818
+ const getTargetDocument = (0, import_react27.useCallback)(() => rootRef.current?.ownerDocument ?? document, []);
12819
+ const getSnapshot = (0, import_react27.useCallback)(() => {
12807
12820
  const targetDocument = getTargetDocument();
12808
12821
  return targetDocument === document ? getThemeSnapshot() : getPreviewThemeStore(targetDocument).themeName;
12809
12822
  }, [
12810
12823
  getTargetDocument
12811
12824
  ]);
12812
- const subscribe = (0, import_react26.useCallback)((onStoreChange) => {
12825
+ const subscribe = (0, import_react27.useCallback)((onStoreChange) => {
12813
12826
  const targetDocument = getTargetDocument();
12814
12827
  if (targetDocument === document) return subscribeToTheme(onStoreChange);
12815
12828
  const store = getPreviewThemeStore(targetDocument);
@@ -12820,15 +12833,15 @@ function AppThemeProvider({ children }) {
12820
12833
  }, [
12821
12834
  getTargetDocument
12822
12835
  ]);
12823
- const themeName = (0, import_react26.useSyncExternalStore)(subscribe, getSnapshot, getServerThemeSnapshot);
12824
- (0, import_react26.useLayoutEffect)(() => {
12836
+ const themeName = (0, import_react27.useSyncExternalStore)(subscribe, getSnapshot, getServerThemeSnapshot);
12837
+ (0, import_react27.useLayoutEffect)(() => {
12825
12838
  applyTheme(getSnapshot(), getTargetDocument());
12826
12839
  }, [
12827
12840
  themeName,
12828
12841
  getSnapshot,
12829
12842
  getTargetDocument
12830
12843
  ]);
12831
- const setTheme = (0, import_react26.useCallback)((nextTheme) => {
12844
+ const setTheme = (0, import_react27.useCallback)((nextTheme) => {
12832
12845
  const targetDocument = getTargetDocument();
12833
12846
  if (targetDocument !== document) {
12834
12847
  const store = getPreviewThemeStore(targetDocument);
@@ -12847,13 +12860,13 @@ function AppThemeProvider({ children }) {
12847
12860
  }, [
12848
12861
  getTargetDocument
12849
12862
  ]);
12850
- const toggleTheme = (0, import_react26.useCallback)(() => {
12863
+ const toggleTheme = (0, import_react27.useCallback)(() => {
12851
12864
  setTheme(themeName === "light" ? "dark" : "light");
12852
12865
  }, [
12853
12866
  setTheme,
12854
12867
  themeName
12855
12868
  ]);
12856
- const contextValue = (0, import_react26.useMemo)(() => ({
12869
+ const contextValue = (0, import_react27.useMemo)(() => ({
12857
12870
  themeName,
12858
12871
  setTheme,
12859
12872
  toggleTheme
@@ -12880,7 +12893,7 @@ function AppThemeProvider({ children }) {
12880
12893
  });
12881
12894
  }
12882
12895
  function useAppTheme() {
12883
- const context = (0, import_react26.useContext)(AppThemeContext);
12896
+ const context = (0, import_react27.useContext)(AppThemeContext);
12884
12897
  if (!context) {
12885
12898
  throw new Error("useAppTheme must be used within AppThemeProvider");
12886
12899
  }
@@ -13046,18 +13059,18 @@ function Footer() {
13046
13059
  }
13047
13060
 
13048
13061
  // src/commodity-original/components/Header/index.tsx
13049
- var import_react28 = require("react");
13062
+ var import_react29 = require("react");
13050
13063
  var import_image9 = __toESM(require("next/image.js"));
13051
13064
  var import_link7 = __toESM(require("next/link.js"));
13052
13065
  var import_navigation2 = require("next/navigation.js");
13053
13066
  var import_lucide3 = require("lucide");
13054
- var import_react29 = require("morphicons/react");
13067
+ var import_react30 = require("morphicons/react");
13055
13068
  var import_radix_ui4 = require("radix-ui");
13056
13069
 
13057
13070
  // src/commodity-original/components/theme-toggle.tsx
13058
13071
  var import_jsx_runtime43 = require("react/jsx-runtime");
13059
13072
  var import_lucide2 = require("lucide");
13060
- var import_react27 = require("morphicons/react");
13073
+ var import_react28 = require("morphicons/react");
13061
13074
  var import_styled_components29 = __toESM(require("styled-components"));
13062
13075
  var import_react_i18next15 = require("react-i18next");
13063
13076
  var ToggleButton = import_styled_components29.default.button.withConfig({
@@ -13081,7 +13094,7 @@ function ThemeToggle({ variant = "floating" }) {
13081
13094
  "aria-label": label,
13082
13095
  "aria-pressed": isDarkTheme,
13083
13096
  title: label,
13084
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react27.MorphIcon, {
13097
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react28.MorphIcon, {
13085
13098
  icon: isDarkTheme ? import_lucide2.Sun : import_lucide2.Moon,
13086
13099
  size: 20,
13087
13100
  strokeWidth: 2,
@@ -13094,7 +13107,7 @@ function ThemeToggle({ variant = "floating" }) {
13094
13107
  // src/commodity-original/components/Header/index.tsx
13095
13108
  var import_react_i18next16 = require("react-i18next");
13096
13109
  var import_jsx_runtime44 = require("react/jsx-runtime");
13097
- var import_react30 = require("react");
13110
+ var import_react31 = require("react");
13098
13111
  var languages = [
13099
13112
  {
13100
13113
  value: "vi",
@@ -13136,7 +13149,7 @@ function LanguageSwitcher({
13136
13149
  portalContainer
13137
13150
  }) {
13138
13151
  const { t } = (0, import_react_i18next16.useTranslation)();
13139
- const triggerRef = (0, import_react28.useRef)(null);
13152
+ const triggerRef = (0, import_react29.useRef)(null);
13140
13153
  const currentLanguage = languages.find((item) => item.value === language);
13141
13154
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_radix_ui4.DropdownMenu.Root, { children: [
13142
13155
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_radix_ui4.DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
@@ -13204,17 +13217,17 @@ function Header() {
13204
13217
  if (route === "/comming-soon") return false;
13205
13218
  return pathname === route || pathname.startsWith(`${route}/`);
13206
13219
  };
13207
- const [portalContainer, setPortalContainer] = (0, import_react28.useState)(null);
13208
- const setHeaderRef = (0, import_react28.useCallback)((element) => {
13220
+ const [portalContainer, setPortalContainer] = (0, import_react29.useState)(null);
13221
+ const setHeaderRef = (0, import_react29.useCallback)((element) => {
13209
13222
  setPortalContainer(element);
13210
13223
  }, []);
13211
- const [isMenuOpen, setIsMenuOpen] = (0, import_react28.useState)(false);
13212
- const [isProductsOpen, setIsProductsOpen] = (0, import_react28.useState)(null);
13213
- const [isDesktopProductsOpen, setIsDesktopProductsOpen] = (0, import_react28.useState)(null);
13224
+ const [isMenuOpen, setIsMenuOpen] = (0, import_react29.useState)(false);
13225
+ const [isProductsOpen, setIsProductsOpen] = (0, import_react29.useState)(null);
13226
+ const [isDesktopProductsOpen, setIsDesktopProductsOpen] = (0, import_react29.useState)(null);
13214
13227
  const { t, i18n } = (0, import_react_i18next16.useTranslation)();
13215
13228
  const language = i18n.resolvedLanguage?.startsWith("en") ? "en" : "vi";
13216
- const mobileMenuTriggerRef = (0, import_react28.useRef)(null);
13217
- const pendingMobileSectionRef = (0, import_react28.useRef)(null);
13229
+ const mobileMenuTriggerRef = (0, import_react29.useRef)(null);
13230
+ const pendingMobileSectionRef = (0, import_react29.useRef)(null);
13218
13231
  const { themeName } = useAppTheme();
13219
13232
  const isDarkTheme = themeName === "dark";
13220
13233
  const lightLogo = useCmsImage("headerLogoImage", "/Logo/logo.png");
@@ -13302,7 +13315,7 @@ function Header() {
13302
13315
  }
13303
13316
  target.focus({ preventScroll: true });
13304
13317
  };
13305
- (0, import_react28.useEffect)(() => {
13318
+ (0, import_react29.useEffect)(() => {
13306
13319
  const desktopMediaQuery = window.matchMedia("(min-width: 1280px)");
13307
13320
  const closeDrawerOnDesktop = (event) => {
13308
13321
  if (event.matches) {
@@ -13385,7 +13398,7 @@ function Header() {
13385
13398
  item.labelKey
13386
13399
  );
13387
13400
  }
13388
- return /* @__PURE__ */ (0, import_react30.createElement)(
13401
+ return /* @__PURE__ */ (0, import_react31.createElement)(
13389
13402
  ExactText,
13390
13403
  {
13391
13404
  cmsAs: NavigationLink,
@@ -13422,7 +13435,7 @@ function Header() {
13422
13435
  ref: mobileMenuTriggerRef,
13423
13436
  "aria-label": isMenuOpen ? t("header.closeMenu") : t("header.openMenu"),
13424
13437
  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13425
- import_react29.MorphIcon,
13438
+ import_react30.MorphIcon,
13426
13439
  {
13427
13440
  icon: isMenuOpen ? import_lucide3.X : import_lucide3.Menu,
13428
13441
  size: 21,
@@ -13457,7 +13470,7 @@ function Header() {
13457
13470
  /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(MobileDrawerHeader, { children: [
13458
13471
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ExactText, { cmsAs: MobileDrawerTitle, children: t("header.menu") }),
13459
13472
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(MobileDrawerClose, { "aria-label": t("header.closeMenu"), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13460
- import_react29.MorphIcon,
13473
+ import_react30.MorphIcon,
13461
13474
  {
13462
13475
  icon: import_lucide3.X,
13463
13476
  size: 22,
@@ -13531,7 +13544,7 @@ function Header() {
13531
13544
  "aria-hidden": "true",
13532
13545
  className: "mobile-products-chevron",
13533
13546
  children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
13534
- import_react29.MorphIcon,
13547
+ import_react30.MorphIcon,
13535
13548
  {
13536
13549
  icon: import_lucide3.ChevronDown,
13537
13550
  size: 18,
@@ -13553,7 +13566,7 @@ function Header() {
13553
13566
  hidden: isProductsOpen !== item.index,
13554
13567
  id: `mobile-products-panel-${item.index}`,
13555
13568
  role: "region",
13556
- children: item.children.map((child) => /* @__PURE__ */ (0, import_react30.createElement)(
13569
+ children: item.children.map((child) => /* @__PURE__ */ (0, import_react31.createElement)(
13557
13570
  ExactText,
13558
13571
  {
13559
13572
  cmsAs: import_link7.default,
@@ -13578,7 +13591,7 @@ function Header() {
13578
13591
  )
13579
13592
  ] }, item.labelKey);
13580
13593
  }
13581
- return /* @__PURE__ */ (0, import_react30.createElement)(
13594
+ return /* @__PURE__ */ (0, import_react31.createElement)(
13582
13595
  import_link7.default,
13583
13596
  {
13584
13597
  ...chromeItemAttributes(language, "header.menuItems", item.index),
@@ -13777,11 +13790,11 @@ function AudienceSection() {
13777
13790
  }
13778
13791
 
13779
13792
  // src/commodity-original/components/LandingPage/BenefitsSection.tsx
13780
- var import_react32 = require("react");
13793
+ var import_react33 = require("react");
13781
13794
  var import_react_i18next18 = require("react-i18next");
13782
13795
 
13783
13796
  // src/commodity-original/components/LandingPage/BenefitIcon.tsx
13784
- var import_react31 = require("react");
13797
+ var import_react32 = require("react");
13785
13798
  var import_jsx_runtime47 = require("react/jsx-runtime");
13786
13799
  var sharedProps = {
13787
13800
  xmlns: "http://www.w3.org/2000/svg",
@@ -13794,7 +13807,7 @@ var sharedProps = {
13794
13807
  focusable: "false"
13795
13808
  };
13796
13809
  function BenefitIcon({ name }) {
13797
- const economyRevealId = (0, import_react31.useId)();
13810
+ const economyRevealId = (0, import_react32.useId)();
13798
13811
  const { themeName } = useAppTheme();
13799
13812
  const isDarkTheme = themeName === "dark";
13800
13813
  switch (name) {
@@ -14283,7 +14296,7 @@ function BenefitCopy({
14283
14296
  }
14284
14297
  function BenefitsSection() {
14285
14298
  const { t, i18n } = (0, import_react_i18next18.useTranslation)();
14286
- const [expandedCards, setExpandedCards] = (0, import_react32.useState)([]);
14299
+ const [expandedCards, setExpandedCards] = (0, import_react33.useState)([]);
14287
14300
  const language = i18n.resolvedLanguage?.startsWith("en") ? "en" : "vi";
14288
14301
  const benefitCount = useCmsListCount(
14289
14302
  "landing.benefits.cards.__count",
@@ -14664,14 +14677,14 @@ function DownloadSection() {
14664
14677
  }
14665
14678
 
14666
14679
  // src/commodity-original/components/LandingPage/FaqSection.tsx
14667
- var import_react33 = require("react");
14680
+ var import_react34 = require("react");
14668
14681
  var import_lucide4 = require("lucide");
14669
- var import_react34 = require("morphicons/react");
14682
+ var import_react35 = require("morphicons/react");
14670
14683
  var import_radix_ui5 = require("radix-ui");
14671
14684
  var import_react_i18next21 = require("react-i18next");
14672
14685
  var import_jsx_runtime51 = require("react/jsx-runtime");
14673
14686
  function FaqItem({ question, answer, order }) {
14674
- const [isOpen, setIsOpen] = (0, import_react33.useState)(false);
14687
+ const [isOpen, setIsOpen] = (0, import_react34.useState)(false);
14675
14688
  return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
14676
14689
  import_radix_ui5.Collapsible.Root,
14677
14690
  {
@@ -14683,7 +14696,7 @@ function FaqItem({ question, answer, order }) {
14683
14696
  /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_radix_ui5.Collapsible.Trigger, { className: "faq-trigger", children: [
14684
14697
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ExactText, { cmsAs: "span", children: question }),
14685
14698
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "faq-trigger-icon", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14686
- import_react34.MorphIcon,
14699
+ import_react35.MorphIcon,
14687
14700
  {
14688
14701
  icon: isOpen ? import_lucide4.Minus : import_lucide4.Plus,
14689
14702
  size: 22,
@@ -14728,7 +14741,7 @@ var import_react_i18next23 = require("react-i18next");
14728
14741
 
14729
14742
  // src/commodity-original/components/Background/index.tsx
14730
14743
  var import_jsx_runtime52 = require("react/jsx-runtime");
14731
- var import_react35 = require("react");
14744
+ var import_react36 = require("react");
14732
14745
  var import_styled_components31 = require("styled-components");
14733
14746
  var TWO_PI = Math.PI * 2;
14734
14747
  var DotContainer = import_styled_components31.styled.div.withConfig({
@@ -14736,28 +14749,28 @@ var DotContainer = import_styled_components31.styled.div.withConfig({
14736
14749
  })([
14737
14750
  `position:absolute;top:-130px;left:-200px;width:50%;height:100%;border-radius:20%;overflow:hidden;pointer-events:none;`
14738
14751
  ]);
14739
- var DotField = /* @__PURE__ */ (0, import_react35.memo)(({ dotRadius = 1.5, dotSpacing = 14, cursorRadius = 500, cursorForce = 0.1, bulgeOnly = true, bulgeStrength = 67, glowRadius = 160, sparkle = false, waveAmplitude = 0, gradientFrom = "rgba(168, 85, 247, 0.35)", gradientTo = "rgba(180, 151, 207, 0.25)", glowColor = "#120F17", ...rest }) => {
14740
- const canvasRef = (0, import_react35.useRef)(null);
14741
- const svgRef = (0, import_react35.useRef)(null);
14742
- const glowRef = (0, import_react35.useRef)(null);
14743
- const dotsRef = (0, import_react35.useRef)([]);
14744
- const mouseRef = (0, import_react35.useRef)({
14752
+ var DotField = /* @__PURE__ */ (0, import_react36.memo)(({ dotRadius = 1.5, dotSpacing = 14, cursorRadius = 500, cursorForce = 0.1, bulgeOnly = true, bulgeStrength = 67, glowRadius = 160, sparkle = false, waveAmplitude = 0, gradientFrom = "rgba(168, 85, 247, 0.35)", gradientTo = "rgba(180, 151, 207, 0.25)", glowColor = "#120F17", ...rest }) => {
14753
+ const canvasRef = (0, import_react36.useRef)(null);
14754
+ const svgRef = (0, import_react36.useRef)(null);
14755
+ const glowRef = (0, import_react36.useRef)(null);
14756
+ const dotsRef = (0, import_react36.useRef)([]);
14757
+ const mouseRef = (0, import_react36.useRef)({
14745
14758
  x: -9999,
14746
14759
  y: -9999,
14747
14760
  prevX: -9999,
14748
14761
  prevY: -9999,
14749
14762
  speed: 0
14750
14763
  });
14751
- const rafRef = (0, import_react35.useRef)(null);
14752
- const sizeRef = (0, import_react35.useRef)({
14764
+ const rafRef = (0, import_react36.useRef)(null);
14765
+ const sizeRef = (0, import_react36.useRef)({
14753
14766
  w: 0,
14754
14767
  h: 0,
14755
14768
  offsetX: 0,
14756
14769
  offsetY: 0
14757
14770
  });
14758
- const glowOpacity = (0, import_react35.useRef)(0);
14759
- const engagement = (0, import_react35.useRef)(0);
14760
- const propsRef = (0, import_react35.useRef)({});
14771
+ const glowOpacity = (0, import_react36.useRef)(0);
14772
+ const engagement = (0, import_react36.useRef)(0);
14773
+ const propsRef = (0, import_react36.useRef)({});
14761
14774
  propsRef.current = {
14762
14775
  dotRadius,
14763
14776
  dotSpacing,
@@ -14770,9 +14783,9 @@ var DotField = /* @__PURE__ */ (0, import_react35.memo)(({ dotRadius = 1.5, dotS
14770
14783
  gradientFrom,
14771
14784
  gradientTo
14772
14785
  };
14773
- const rebuildRef = (0, import_react35.useRef)(null);
14774
- const glowId = `dot-field-glow-${(0, import_react35.useId)().replace(/[^a-zA-Z0-9_-]/g, "")}`;
14775
- (0, import_react35.useEffect)(() => {
14786
+ const rebuildRef = (0, import_react36.useRef)(null);
14787
+ const glowId = `dot-field-glow-${(0, import_react36.useId)().replace(/[^a-zA-Z0-9_-]/g, "")}`;
14788
+ (0, import_react36.useEffect)(() => {
14776
14789
  const canvas = canvasRef.current;
14777
14790
  const glowEl = glowRef.current;
14778
14791
  if (!canvas) return;
@@ -14995,7 +15008,7 @@ var DotField = /* @__PURE__ */ (0, import_react35.memo)(({ dotRadius = 1.5, dotS
14995
15008
  window.removeEventListener("mousemove", onMouseMove);
14996
15009
  };
14997
15010
  }, []);
14998
- (0, import_react35.useEffect)(() => {
15011
+ (0, import_react36.useEffect)(() => {
14999
15012
  rebuildRef.current?.();
15000
15013
  }, [
15001
15014
  dotRadius,
@@ -15408,7 +15421,7 @@ function FloatingActions() {
15408
15421
 
15409
15422
  // src/commodity-original/components/LandingPage/PositionSection.tsx
15410
15423
  var import_image15 = __toESM(require("next/image.js"));
15411
- var import_react36 = require("react");
15424
+ var import_react37 = require("react");
15412
15425
  var import_react_i18next25 = require("react-i18next");
15413
15426
  var import_jsx_runtime56 = require("react/jsx-runtime");
15414
15427
  function PositionMedia({
@@ -15486,11 +15499,11 @@ function PositionMedia({
15486
15499
  }
15487
15500
  function PositionSection() {
15488
15501
  const { t } = (0, import_react_i18next25.useTranslation)();
15489
- const [expandedMobileCards, setExpandedMobileCards] = (0, import_react36.useState)([]);
15490
- const [desktopSlide, setDesktopSlide] = (0, import_react36.useState)(0);
15491
- const [mobileSlide, setMobileSlide] = (0, import_react36.useState)(0);
15492
- const mobileCarouselRef = (0, import_react36.useRef)(null);
15493
- const mobileDragRef = (0, import_react36.useRef)(null);
15502
+ const [expandedMobileCards, setExpandedMobileCards] = (0, import_react37.useState)([]);
15503
+ const [desktopSlide, setDesktopSlide] = (0, import_react37.useState)(0);
15504
+ const [mobileSlide, setMobileSlide] = (0, import_react37.useState)(0);
15505
+ const mobileCarouselRef = (0, import_react37.useRef)(null);
15506
+ const mobileDragRef = (0, import_react37.useRef)(null);
15494
15507
  const slideCount = useCmsListCount(
15495
15508
  "landing.position.slides.__count",
15496
15509
  positionSlides.length
@@ -16172,10 +16185,10 @@ function ExactEditableContent({
16172
16185
  onSelectText,
16173
16186
  selectedTextField
16174
16187
  }) {
16175
- const rootRef = (0, import_react37.useRef)(null);
16176
- const callbacks = (0, import_react37.useRef)({ onChange, onSelectText });
16188
+ const rootRef = (0, import_react38.useRef)(null);
16189
+ const callbacks = (0, import_react38.useRef)({ onChange, onSelectText });
16177
16190
  callbacks.current = { onChange, onSelectText };
16178
- (0, import_react37.useLayoutEffect)(() => {
16191
+ (0, import_react38.useLayoutEffect)(() => {
16179
16192
  const root = rootRef.current;
16180
16193
  if (!root || !editable) return void 0;
16181
16194
  const cleanupTasks = [];
@@ -16256,7 +16269,7 @@ function ExactEditableContent({
16256
16269
  });
16257
16270
  return () => cleanupTasks.forEach((cleanup) => cleanup());
16258
16271
  }, [content, editable, fieldKeys]);
16259
- (0, import_react37.useLayoutEffect)(() => {
16272
+ (0, import_react38.useLayoutEffect)(() => {
16260
16273
  rootRef.current?.querySelectorAll("[data-cms-exact-editable-text]").forEach((element) => {
16261
16274
  element.dataset.cmsExactSelected = String(editable && element.dataset.cmsTextField === selectedTextField);
16262
16275
  });
@@ -16303,7 +16316,7 @@ function ExactProviders({ content, children }) {
16303
16316
  else if (field.startsWith("en.")) en[field.slice(3)] = value4;
16304
16317
  else if (field in vi) vi[field] = value4;
16305
16318
  }
16306
- const instance = (0, import_react37.useMemo)(() => {
16319
+ const instance = (0, import_react38.useMemo)(() => {
16307
16320
  const created = (0, import_i18next.createInstance)();
16308
16321
  void created.use(import_react_i18next27.initReactI18next).init({
16309
16322
  resources: {
@@ -16322,7 +16335,7 @@ function ExactProviders({ content, children }) {
16322
16335
  }, [requestedLanguage]);
16323
16336
  instance.addResourceBundle("vi", "translation", vi, true, true);
16324
16337
  instance.addResourceBundle("en", "translation", en, true, true);
16325
- (0, import_react37.useEffect)(() => {
16338
+ (0, import_react38.useEffect)(() => {
16326
16339
  const initialLanguage = requestedLanguage ?? detectBrowserLanguage();
16327
16340
  let receivingLanguage = false;
16328
16341
  const syncLanguage = (value4) => {
@@ -16412,10 +16425,10 @@ function exactBlock(options, Component, wrapSection = false) {
16412
16425
  )
16413
16426
  };
16414
16427
  const Renderer2 = (input) => {
16415
- const props = { ...input, content: (0, import_react37.useMemo)(() => migrateWikexChromeContent(options.type, input.content), [input.content]) };
16428
+ const props = { ...input, content: (0, import_react38.useMemo)(() => migrateWikexChromeContent(options.type, input.content), [input.content]) };
16416
16429
  const language = supportedLanguage(props.content.__cmsLanguage) ?? "vi";
16417
- const chrome2 = (0, import_react37.useMemo)(() => flattenChromeLists(options.type, props.content, language), [props.content, language]);
16418
- const listStates = (0, import_react37.useMemo)(() => lists.map((list) => {
16430
+ const chrome2 = (0, import_react38.useMemo)(() => flattenChromeLists(options.type, props.content, language), [props.content, language]);
16431
+ const listStates = (0, import_react38.useMemo)(() => lists.map((list) => {
16419
16432
  const field = exactListFieldKey(language, list);
16420
16433
  const templates = exactListDefaults(list, language);
16421
16434
  return {
@@ -16425,10 +16438,10 @@ function exactBlock(options, Component, wrapSection = false) {
16425
16438
  templates
16426
16439
  };
16427
16440
  }), [language, props.content]);
16428
- const listCounts = (0, import_react37.useMemo)(() => Object.fromEntries(
16441
+ const listCounts = (0, import_react38.useMemo)(() => Object.fromEntries(
16429
16442
  listStates.map(({ items, list }) => [list.countKey, items.length])
16430
16443
  ), [listStates]);
16431
- const renderedContent = (0, import_react37.useMemo)(() => {
16444
+ const renderedContent = (0, import_react38.useMemo)(() => {
16432
16445
  const renderedContent2 = { ...props.content, ...chrome2.values };
16433
16446
  listStates.forEach(({ items, list }) => {
16434
16447
  renderedContent2[`${language}.${list.countKey}`] = String(items.length);
@@ -16498,7 +16511,7 @@ function exactBlock(options, Component, wrapSection = false) {
16498
16511
  )
16499
16512
  );
16500
16513
  };
16501
- const fieldKeys = (0, import_react37.useMemo)(() => [
16514
+ const fieldKeys = (0, import_react38.useMemo)(() => [
16502
16515
  ...Object.keys(chrome2.values),
16503
16516
  ...translationEntries(options.prefixes).map(([key]) => `${language}.${key}`),
16504
16517
  ...listStates.flatMap(
@@ -17258,17 +17271,17 @@ var wikexCommodityRoutes = wikexCommodityPageTemplates.map(({ route, slug, key }
17258
17271
  }));
17259
17272
 
17260
17273
  // src/shared/text-toolbar.tsx
17261
- var import_react38 = require("react");
17274
+ var import_react39 = require("react");
17262
17275
  var import_material3 = require("@mui/material");
17263
17276
  var import_jsx_runtime59 = require("react/jsx-runtime");
17264
17277
  function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureControls, computedFontSize, computedLineHeight, computedFontFamily, computedTextAlign, onLayoutChange, onColorChange, onReset }) {
17265
- const toolbarRef = (0, import_react38.useRef)(null);
17266
- const [hex, setHex] = (0, import_react38.useState)(color);
17278
+ const toolbarRef = (0, import_react39.useRef)(null);
17279
+ const [hex, setHex] = (0, import_react39.useState)(color);
17267
17280
  const displayedSize = String(computedFontSize ?? layout.fontSize ?? 16);
17268
17281
  const displayedLineHeight = String(layout.lineHeight ?? computedLineHeight ?? 1.5);
17269
- const dirtyLineHeight = (0, import_react38.useRef)(false);
17270
- const [lineHeight, setLineHeight] = (0, import_react38.useState)(displayedLineHeight);
17271
- (0, import_react38.useEffect)(() => {
17282
+ const dirtyLineHeight = (0, import_react39.useRef)(false);
17283
+ const [lineHeight, setLineHeight] = (0, import_react39.useState)(displayedLineHeight);
17284
+ (0, import_react39.useEffect)(() => {
17272
17285
  dirtyLineHeight.current = false;
17273
17286
  setLineHeight(displayedLineHeight);
17274
17287
  }, [displayedLineHeight]);
@@ -17283,10 +17296,10 @@ function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureC
17283
17296
  if (Number.isFinite(value4) && value4 >= 0.5 && value4 <= 5) onLayoutChange({ lineHeight: value4 });
17284
17297
  else setLineHeight(displayedLineHeight);
17285
17298
  };
17286
- const dirtySize = (0, import_react38.useRef)(false);
17287
- const [size, setSize] = (0, import_react38.useState)(displayedSize);
17288
- (0, import_react38.useEffect)(() => setHex(color), [color]);
17289
- (0, import_react38.useEffect)(() => {
17299
+ const dirtySize = (0, import_react39.useRef)(false);
17300
+ const [size, setSize] = (0, import_react39.useState)(displayedSize);
17301
+ (0, import_react39.useEffect)(() => setHex(color), [color]);
17302
+ (0, import_react39.useEffect)(() => {
17290
17303
  dirtySize.current = false;
17291
17304
  setSize(displayedSize);
17292
17305
  }, [displayedSize]);
@@ -17422,14 +17435,14 @@ function CmsTextToolbar({ layout, color, colorPicker, inlineControls, structureC
17422
17435
  }
17423
17436
 
17424
17437
  // src/shared/button-link-control.tsx
17425
- var import_react39 = require("react");
17438
+ var import_react40 = require("react");
17426
17439
  var import_material4 = require("@mui/material");
17427
17440
  var import_jsx_runtime60 = require("react/jsx-runtime");
17428
17441
  function CmsButtonLinkControl({ field, content, onChange }) {
17429
- const [anchor, setAnchor] = (0, import_react39.useState)(null);
17430
- const [href, setHref] = (0, import_react39.useState)("");
17431
- const [type, setType] = (0, import_react39.useState)("internal");
17432
- const [error, setError] = (0, import_react39.useState)("");
17442
+ const [anchor, setAnchor] = (0, import_react40.useState)(null);
17443
+ const [href, setHref] = (0, import_react40.useState)("");
17444
+ const [type, setType] = (0, import_react40.useState)("internal");
17445
+ const [error, setError] = (0, import_react40.useState)("");
17433
17446
  if (!isCmsButtonField(field)) return null;
17434
17447
  const apply = (value4) => {
17435
17448
  onChange(cmsButtonLinkChanges(content, field, value4, type));
@@ -17538,7 +17551,7 @@ var wikexCmsBlocks = sourceCmsBlocks.map((block) => {
17538
17551
  const Renderer2 = cmsBlock.Renderer;
17539
17552
  return {
17540
17553
  ...cmsBlock,
17541
- Renderer: (props) => (0, import_react40.createElement)(
17554
+ Renderer: (props) => (0, import_react41.createElement)(
17542
17555
  CmsTextColorProvider,
17543
17556
  {
17544
17557
  content: props.content,
@@ -17546,7 +17559,7 @@ var wikexCmsBlocks = sourceCmsBlocks.map((block) => {
17546
17559
  onSelectText: props.onSelectText,
17547
17560
  selectedTextField: props.selectedTextField
17548
17561
  },
17549
- (0, import_react40.createElement)(CmsElementProvider, { ...props, children: (0, import_react40.createElement)(Renderer2, props) })
17562
+ (0, import_react41.createElement)(CmsElementProvider, { ...props, children: (0, import_react41.createElement)(Renderer2, props) })
17550
17563
  )
17551
17564
  };
17552
17565
  });