unipo-ui 1.2.0 → 1.3.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.
Files changed (173) hide show
  1. package/cli/index.mjs +53 -4
  2. package/dist/admisi-YCOE3DMH.cjs +20 -0
  3. package/dist/admisi-YXCTBECZ.js +11 -0
  4. package/dist/akademik-PJGL6MSP.cjs +20 -0
  5. package/dist/akademik-TPDFEZGF.js +11 -0
  6. package/dist/akses-AUPQD6YN.cjs +20 -0
  7. package/dist/akses-V5XIMBWT.js +11 -0
  8. package/dist/arsip-2T7IEION.cjs +20 -0
  9. package/dist/arsip-LDRV7FYX.js +11 -0
  10. package/dist/cbt-4N6COVIN.js +11 -0
  11. package/dist/cbt-GMQSR7TP.cjs +20 -0
  12. package/dist/chunk-34OKV63Q.js +122 -0
  13. package/dist/chunk-34OKV63Q.js.map +1 -0
  14. package/dist/chunk-3O5ELKBH.cjs +18 -0
  15. package/dist/chunk-3O5ELKBH.cjs.map +1 -0
  16. package/dist/chunk-4BQOABRV.js +462 -0
  17. package/dist/chunk-4BQOABRV.js.map +1 -0
  18. package/dist/{chunk-DEF5CA7C.cjs → chunk-5VNCBW4R.cjs} +282 -1165
  19. package/dist/chunk-5VNCBW4R.cjs.map +1 -0
  20. package/dist/{chunk-SJ4DJOMZ.js → chunk-7AJ4LW5H.js} +163 -1019
  21. package/dist/chunk-7AJ4LW5H.js.map +1 -0
  22. package/dist/chunk-JASW45YF.cjs +510 -0
  23. package/dist/chunk-JASW45YF.cjs.map +1 -0
  24. package/dist/chunk-JSUHAYQ4.js +15 -0
  25. package/dist/chunk-JSUHAYQ4.js.map +1 -0
  26. package/dist/chunk-LN6HZMPI.js +1006 -0
  27. package/dist/chunk-LN6HZMPI.js.map +1 -0
  28. package/dist/chunk-LNJTDEQR.cjs +1937 -0
  29. package/dist/chunk-LNJTDEQR.cjs.map +1 -0
  30. package/dist/chunk-MKQEH7QS.cjs +1058 -0
  31. package/dist/chunk-MKQEH7QS.cjs.map +1 -0
  32. package/dist/chunk-TAKLMRU7.cjs +150 -0
  33. package/dist/chunk-TAKLMRU7.cjs.map +1 -0
  34. package/dist/chunk-TYCRRYCQ.js +1843 -0
  35. package/dist/chunk-TYCRRYCQ.js.map +1 -0
  36. package/dist/crm-C4XGSG6O.js +11 -0
  37. package/dist/crm-LTVCDNMK.cjs +20 -0
  38. package/dist/dasbor-OJLMSFTF.cjs +20 -0
  39. package/dist/dasbor-Y3UPFYFE.js +11 -0
  40. package/dist/edom-3GZUUB7H.cjs +20 -0
  41. package/dist/edom-K4Y2NV4K.js +11 -0
  42. package/dist/fakultas-DJRUVJBV.js +11 -0
  43. package/dist/fakultas-VVAQOPUX.cjs +20 -0
  44. package/dist/filter-D54KALbB.d.cts +436 -0
  45. package/dist/filter-D54KALbB.d.ts +436 -0
  46. package/dist/helpdesk-AWVC7BPE.cjs +20 -0
  47. package/dist/helpdesk-BAOXAU6G.js +11 -0
  48. package/dist/humas-7BMMJ3WF.js +11 -0
  49. package/dist/humas-H56JFUW6.cjs +20 -0
  50. package/dist/ikon.cjs +125 -0
  51. package/dist/ikon.cjs.map +1 -0
  52. package/dist/ikon.d.cts +140 -0
  53. package/dist/ikon.d.ts +140 -0
  54. package/dist/ikon.js +6 -0
  55. package/dist/ikon.js.map +1 -0
  56. package/dist/iku-7JLF2NIH.js +11 -0
  57. package/dist/iku-F47ZLMYJ.cjs +20 -0
  58. package/dist/index.cjs +544 -257
  59. package/dist/index.cjs.map +1 -1
  60. package/dist/index.d.cts +192 -2
  61. package/dist/index.d.ts +192 -2
  62. package/dist/index.js +126 -4
  63. package/dist/index.js.map +1 -1
  64. package/dist/induk-BGTGKRLL.js +11 -0
  65. package/dist/induk-DLYDMZAM.cjs +20 -0
  66. package/dist/integrasi-4VXNGA3V.cjs +20 -0
  67. package/dist/integrasi-IP3WWDO7.js +11 -0
  68. package/dist/kalender-DGQDGJCL.cjs +20 -0
  69. package/dist/kalender-FGGUBYKZ.js +11 -0
  70. package/dist/karier-H3HBFCQQ.js +11 -0
  71. package/dist/karier-QTU2P5YD.cjs +20 -0
  72. package/dist/katalog.cjs +1709 -0
  73. package/dist/katalog.cjs.map +1 -0
  74. package/dist/katalog.d.cts +645 -0
  75. package/dist/katalog.d.ts +645 -0
  76. package/dist/katalog.js +1626 -0
  77. package/dist/katalog.js.map +1 -0
  78. package/dist/kelulusan-BHFQM5N4.cjs +20 -0
  79. package/dist/kelulusan-ZR7CM6I5.js +11 -0
  80. package/dist/kemahasiswaan-EINWXAY7.cjs +20 -0
  81. package/dist/kemahasiswaan-NH2LEDH7.js +11 -0
  82. package/dist/kerjasama-FAOHZCML.js +11 -0
  83. package/dist/kerjasama-TXWJOU4Y.cjs +20 -0
  84. package/dist/keu-4TXF4FEP.cjs +20 -0
  85. package/dist/keu-SD7UOCDB.js +11 -0
  86. package/dist/kurikulum-SRO7TJYI.cjs +20 -0
  87. package/dist/kurikulum-XT7PZJOK.js +11 -0
  88. package/dist/layanan-RQ2AWCQ5.cjs +20 -0
  89. package/dist/layanan-Y6WUCSD2.js +11 -0
  90. package/dist/lms-5JYOSLBI.cjs +20 -0
  91. package/dist/lms-NTXMSHG2.js +11 -0
  92. package/dist/lppm-7DH7PRF3.cjs +20 -0
  93. package/dist/lppm-UXYGIOIF.js +11 -0
  94. package/dist/master-GKTTAKLF.cjs +20 -0
  95. package/dist/master-ZG4SPPDU.js +11 -0
  96. package/dist/mbkm-OGR72BTB.js +11 -0
  97. package/dist/mbkm-URKJHUIQ.cjs +20 -0
  98. package/dist/notifikasi-FMA26M4I.js +11 -0
  99. package/dist/notifikasi-QDCYIX7G.cjs +20 -0
  100. package/dist/pddikti-RJVYY2J4.cjs +20 -0
  101. package/dist/pddikti-VF2PXDKA.js +11 -0
  102. package/dist/{content-DaJPx5LX.d.cts → pemeliharaan-D5S-1lqW.d.ts} +38 -434
  103. package/dist/{content-DaJPx5LX.d.ts → pemeliharaan-Dr0HSxvZ.d.cts} +38 -434
  104. package/dist/perpustakaan-5RL33XG2.js +11 -0
  105. package/dist/perpustakaan-JXZW43MJ.cjs +20 -0
  106. package/dist/pilih-BEes_D3n.d.cts +205 -0
  107. package/dist/pilih-CEKqXMUS.d.ts +205 -0
  108. package/dist/pmb-EGTWW2ZH.cjs +20 -0
  109. package/dist/pmb-G7EAFJ3R.js +11 -0
  110. package/dist/portal-EI7TXN7H.cjs +20 -0
  111. package/dist/portal-MMUYX3RA.js +11 -0
  112. package/dist/portal-api-BJLO6AGI.js +11 -0
  113. package/dist/portal-api-Q6B3X6ZV.cjs +20 -0
  114. package/dist/profil-46FV46VH.cjs +20 -0
  115. package/dist/profil-4BIXIM6D.js +11 -0
  116. package/dist/referensi-HNYOJGNX.js +11 -0
  117. package/dist/referensi-VOT5BRCL.cjs +20 -0
  118. package/dist/registry.json +606 -4
  119. package/dist/repositori-2MJ43NXM.js +11 -0
  120. package/dist/repositori-KFXVJB7B.cjs +20 -0
  121. package/dist/rpl-2ZXHNSPF.js +11 -0
  122. package/dist/rpl-YF5MV2YA.cjs +20 -0
  123. package/dist/sarpras-CQ7QKVUN.js +11 -0
  124. package/dist/sarpras-XGPHHFCG.cjs +20 -0
  125. package/dist/scss/components/_animasi.scss +280 -0
  126. package/dist/scss/components/_ikon.scss +249 -0
  127. package/dist/scss/components/_katalog.scss +662 -0
  128. package/dist/scss/components/_platform.scss +364 -0
  129. package/dist/scss/index.scss +4 -0
  130. package/dist/sdm-N6LE66PP.cjs +20 -0
  131. package/dist/sdm-QKBXH3JF.js +11 -0
  132. package/dist/siakad.cjs +1389 -2915
  133. package/dist/siakad.cjs.map +1 -1
  134. package/dist/siakad.d.cts +31 -196
  135. package/dist/siakad.d.ts +31 -196
  136. package/dist/siakad.js +446 -2194
  137. package/dist/siakad.js.map +1 -1
  138. package/dist/spmi-J37NEYIU.js +11 -0
  139. package/dist/spmi-N6EU7KNC.cjs +20 -0
  140. package/dist/tracer-G6DDXVXC.cjs +20 -0
  141. package/dist/tracer-M3FTNWBG.js +11 -0
  142. package/dist/ui-unipo.css +1650 -0
  143. package/dist/ui-unipo.min.css +1 -1
  144. package/package.json +25 -3
  145. package/src/components/animasi.tsx +186 -0
  146. package/src/components/modal.tsx +113 -0
  147. package/src/components/overlays.tsx +6 -1
  148. package/src/components/pemeliharaan.tsx +152 -0
  149. package/src/components/platform.tsx +94 -0
  150. package/src/ikon/ilustrasi.tsx +283 -0
  151. package/src/ikon/index.ts +7 -0
  152. package/src/ikon/kotak.tsx +30 -0
  153. package/src/ikon/unipo.tsx +326 -0
  154. package/src/index.ts +8 -0
  155. package/src/katalog/aturan.ts +488 -0
  156. package/src/katalog/data/id.ts +749 -0
  157. package/src/katalog/data/indeks.json +1 -0
  158. package/src/katalog/data/muat.ts +47 -0
  159. package/src/katalog/ikon.tsx +11 -0
  160. package/src/katalog/index.ts +13 -0
  161. package/src/katalog/isian.tsx +372 -0
  162. package/src/katalog/katalog.tsx +138 -0
  163. package/src/katalog/kelola.tsx +620 -0
  164. package/src/katalog/modul.tsx +336 -0
  165. package/src/katalog/tampil.tsx +147 -0
  166. package/src/katalog/tipe.ts +141 -0
  167. package/src/katalog/wizard.tsx +155 -0
  168. package/src/lib/platform.ts +91 -0
  169. package/src/siakad/index.ts +1 -0
  170. package/src/siakad/pemeliharaan.tsx +118 -0
  171. package/src/siakad/provider.tsx +2 -0
  172. package/dist/chunk-DEF5CA7C.cjs.map +0 -1
  173. package/dist/chunk-SJ4DJOMZ.js.map +0 -1
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
  'use strict';
3
3
 
4
+ var chunk3O5ELKBH_cjs = require('./chunk-3O5ELKBH.cjs');
4
5
  var useRender = require('@base-ui/react/use-render');
5
6
  var mergeProps = require('@base-ui/react/merge-props');
6
7
  var separator = require('@base-ui/react/separator');
@@ -34,7 +35,6 @@ var accordion = require('@base-ui/react/accordion');
34
35
  var collapsible = require('@base-ui/react/collapsible');
35
36
  var progress = require('@base-ui/react/progress');
36
37
  var scrollArea = require('@base-ui/react/scroll-area');
37
- var navigationMenu = require('@base-ui/react/navigation-menu');
38
38
 
39
39
  function _interopNamespace(e) {
40
40
  if (e && e.__esModule) return e;
@@ -56,17 +56,6 @@ function _interopNamespace(e) {
56
56
 
57
57
  var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
58
58
 
59
- // src/lib/cn.ts
60
- function cn(...parts) {
61
- if (parts.some((p) => typeof p === "function")) {
62
- return (state) => parts.map((p) => typeof p === "function" ? p(state) : p).filter(Boolean).join(" ");
63
- }
64
- return parts.filter(Boolean).join(" ");
65
- }
66
- function dataFlag(v) {
67
- return v ? "" : void 0;
68
- }
69
-
70
59
  // src/lib/format.ts
71
60
  var LOCALE = "id-ID";
72
61
  function initials(name, max = 2) {
@@ -140,12 +129,12 @@ function formatPersen(n, digits = 1) {
140
129
  }
141
130
  function Button({ variant = "primary", size = "md", iconOnly, fullWidth, loading, className, render, children, disabled, ...props }) {
142
131
  const defaultProps = {
143
- className: cn("u-button", className),
132
+ className: chunk3O5ELKBH_cjs.cn("u-button", className),
144
133
  "data-variant": variant,
145
134
  "data-size": size,
146
- "data-icon-only": dataFlag(iconOnly),
147
- "data-full-width": dataFlag(fullWidth),
148
- "data-loading": dataFlag(loading),
135
+ "data-icon-only": chunk3O5ELKBH_cjs.dataFlag(iconOnly),
136
+ "data-full-width": chunk3O5ELKBH_cjs.dataFlag(fullWidth),
137
+ "data-loading": chunk3O5ELKBH_cjs.dataFlag(loading),
149
138
  "aria-busy": loading || void 0,
150
139
  disabled: disabled || loading,
151
140
  type: render ? void 0 : "button",
@@ -157,10 +146,10 @@ function Button({ variant = "primary", size = "md", iconOnly, fullWidth, loading
157
146
  return useRender.useRender({ render, defaultTagName: "button", props: mergeProps.mergeProps(defaultProps, props) });
158
147
  }
159
148
  function ButtonGroup({ className, ...props }) {
160
- return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "group", className: cn("u-button-group", className), ...props });
149
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "group", className: chunk3O5ELKBH_cjs.cn("u-button-group", className), ...props });
161
150
  }
162
151
  function Badge({ variant = "neutral", size, shape, dot, className, children, ...props }) {
163
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("u-badge", className), "data-variant": variant, "data-size": size, "data-shape": shape, ...props, children: [
152
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: chunk3O5ELKBH_cjs.cn("u-badge", className), "data-variant": variant, "data-size": size, "data-shape": shape, ...props, children: [
164
153
  dot && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-badge-dot", "aria-hidden": true }),
165
154
  children
166
155
  ] });
@@ -171,8 +160,8 @@ function Tag({ active, size, icon, onRemove, removeLabel = "Hapus", className, r
171
160
  defaultTagName: "span",
172
161
  props: mergeProps.mergeProps(
173
162
  {
174
- className: cn("u-tag", className),
175
- "data-active": dataFlag(active),
163
+ className: chunk3O5ELKBH_cjs.cn("u-tag", className),
164
+ "data-active": chunk3O5ELKBH_cjs.dataFlag(active),
176
165
  "data-size": size,
177
166
  children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
178
167
  icon,
@@ -198,35 +187,35 @@ function Tag({ active, size, icon, onRemove, removeLabel = "Hapus", className, r
198
187
  });
199
188
  }
200
189
  function Kbd({ className, ...props }) {
201
- return /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: cn("u-kbd", className), ...props });
190
+ return /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: chunk3O5ELKBH_cjs.cn("u-kbd", className), ...props });
202
191
  }
203
192
  function Spinner({ size = "md", className, label = "Memuat", ...props }) {
204
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", role: "status", "aria-label": label, className: cn("u-spinner", className), "data-size": size, ...props, children: [
193
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", role: "status", "aria-label": label, className: chunk3O5ELKBH_cjs.cn("u-spinner", className), "data-size": size, ...props, children: [
205
194
  /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeOpacity: "0.2", strokeWidth: "2.5" }),
206
195
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12a9 9 0 0 0-9-9", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round" })
207
196
  ] });
208
197
  }
209
198
  function Skeleton({ shape, className, style, width, height, ...props }) {
210
- return /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: cn("u-skeleton", className), "data-shape": shape, style: { width, height, ...style }, ...props });
199
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: chunk3O5ELKBH_cjs.cn("u-skeleton", className), "data-shape": shape, style: { width, height, ...style }, ...props });
211
200
  }
212
201
  function Separator({ className, orientation = "horizontal", label, ...props }) {
213
202
  if (label) {
214
- return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "separator", className: cn("u-separator-label", typeof className === "string" && className), children: label });
203
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "separator", className: chunk3O5ELKBH_cjs.cn("u-separator-label", typeof className === "string" && className), children: label });
215
204
  }
216
- return /* @__PURE__ */ jsxRuntime.jsx(separator.Separator, { orientation, className: cn("u-separator", className), ...props });
205
+ return /* @__PURE__ */ jsxRuntime.jsx(separator.Separator, { orientation, className: chunk3O5ELKBH_cjs.cn("u-separator", className), ...props });
217
206
  }
218
207
  function VisuallyHidden(props) {
219
208
  return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-sr-only", ...props });
220
209
  }
221
210
  function Label({ className, required, optional, children, ...props }) {
222
- return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cn("u-label", className), ...props, children: [
211
+ return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: chunk3O5ELKBH_cjs.cn("u-label", className), ...props, children: [
223
212
  children,
224
213
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-label-required", "aria-hidden": true, children: "*" }),
225
214
  optional && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-label-optional", children: "(opsional)" })
226
215
  ] });
227
216
  }
228
217
  function Field({ label, description, error, required, optional, orientation, className, children, invalid, ...props }) {
229
- return /* @__PURE__ */ jsxRuntime.jsxs(field.Field.Root, { className: cn("u-field", className), "data-orientation": orientation, invalid: invalid ?? Boolean(error), ...props, children: [
218
+ return /* @__PURE__ */ jsxRuntime.jsxs(field.Field.Root, { className: chunk3O5ELKBH_cjs.cn("u-field", className), "data-orientation": orientation, invalid: invalid ?? Boolean(error), ...props, children: [
230
219
  label && /* @__PURE__ */ jsxRuntime.jsxs(field.Field.Label, { className: "u-label", children: [
231
220
  label,
232
221
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-label-required", "aria-hidden": true, children: "*" }),
@@ -242,42 +231,42 @@ function Field({ label, description, error, required, optional, orientation, cla
242
231
  }
243
232
  var FieldControl = field.Field.Control;
244
233
  function FieldDescription({ className, ...props }) {
245
- return /* @__PURE__ */ jsxRuntime.jsx(field.Field.Description, { className: cn("u-field-description", className), ...props });
234
+ return /* @__PURE__ */ jsxRuntime.jsx(field.Field.Description, { className: chunk3O5ELKBH_cjs.cn("u-field-description", className), ...props });
246
235
  }
247
236
  function FieldError({ className, children, ...props }) {
248
- return /* @__PURE__ */ jsxRuntime.jsxs(field.Field.Error, { className: cn("u-field-error", className), ...props, children: [
237
+ return /* @__PURE__ */ jsxRuntime.jsxs(field.Field.Error, { className: chunk3O5ELKBH_cjs.cn("u-field-error", className), ...props, children: [
249
238
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleAlert, { "aria-hidden": true }),
250
239
  children
251
240
  ] });
252
241
  }
253
242
  function Fieldset({ legend, className, children, ...props }) {
254
- return /* @__PURE__ */ jsxRuntime.jsxs(fieldset.Fieldset.Root, { className: cn("u-fieldset", className), ...props, children: [
243
+ return /* @__PURE__ */ jsxRuntime.jsxs(fieldset.Fieldset.Root, { className: chunk3O5ELKBH_cjs.cn("u-fieldset", className), ...props, children: [
255
244
  legend && /* @__PURE__ */ jsxRuntime.jsx(fieldset.Fieldset.Legend, { className: "u-fieldset-legend", children: legend }),
256
245
  children
257
246
  ] });
258
247
  }
259
248
  function Input({ className, size, ...props }) {
260
- return /* @__PURE__ */ jsxRuntime.jsx(input.Input, { className: cn("u-input", className), "data-size": size, ...props });
249
+ return /* @__PURE__ */ jsxRuntime.jsx(input.Input, { className: chunk3O5ELKBH_cjs.cn("u-input", className), "data-size": size, ...props });
261
250
  }
262
251
  function Textarea({ className, ...props }) {
263
252
  return /* @__PURE__ */ jsxRuntime.jsx(
264
253
  field.Field.Control,
265
254
  {
266
255
  render: (p) => /* @__PURE__ */ jsxRuntime.jsx("textarea", { ...p }),
267
- className: cn("u-textarea", className),
256
+ className: chunk3O5ELKBH_cjs.cn("u-textarea", className),
268
257
  ...props
269
258
  }
270
259
  );
271
260
  }
272
261
  function InputGroup({ size, start, end, boxed, invalid, className, children, ...props }) {
273
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-input-group", className), "data-size": size, "data-invalid": dataFlag(invalid), ...props, children: [
274
- start != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-input-addon", "data-align": "start", "data-boxed": dataFlag(boxed), children: start }),
262
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-input-group", className), "data-size": size, "data-invalid": chunk3O5ELKBH_cjs.dataFlag(invalid), ...props, children: [
263
+ start != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-input-addon", "data-align": "start", "data-boxed": chunk3O5ELKBH_cjs.dataFlag(boxed), children: start }),
275
264
  children,
276
- end != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-input-addon", "data-align": "end", "data-boxed": dataFlag(boxed), children: end })
265
+ end != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-input-addon", "data-align": "end", "data-boxed": chunk3O5ELKBH_cjs.dataFlag(boxed), children: end })
277
266
  ] });
278
267
  }
279
268
  function Checkbox({ className, ...props }) {
280
- return /* @__PURE__ */ jsxRuntime.jsx(checkbox.Checkbox.Root, { className: cn("u-checkbox", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
269
+ return /* @__PURE__ */ jsxRuntime.jsx(checkbox.Checkbox.Root, { className: chunk3O5ELKBH_cjs.cn("u-checkbox", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
281
270
  checkbox.Checkbox.Indicator,
282
271
  {
283
272
  className: "u-checkbox-indicator",
@@ -286,10 +275,10 @@ function Checkbox({ className, ...props }) {
286
275
  ) });
287
276
  }
288
277
  function Radio({ className, ...props }) {
289
- return /* @__PURE__ */ jsxRuntime.jsx(radio.Radio.Root, { className: cn("u-radio", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(radio.Radio.Indicator, { className: "u-radio-indicator" }) });
278
+ return /* @__PURE__ */ jsxRuntime.jsx(radio.Radio.Root, { className: chunk3O5ELKBH_cjs.cn("u-radio", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(radio.Radio.Indicator, { className: "u-radio-indicator" }) });
290
279
  }
291
280
  function Choice({ label, description, control, disabled, className, ...props }) {
292
- return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cn("u-choice", className), "data-disabled": dataFlag(disabled), ...props, children: [
281
+ return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: chunk3O5ELKBH_cjs.cn("u-choice", className), "data-disabled": chunk3O5ELKBH_cjs.dataFlag(disabled), ...props, children: [
293
282
  control,
294
283
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-choice-text", children: [
295
284
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
@@ -301,7 +290,7 @@ function CheckboxGroup({ options, orientation, variant = "list", columns = 2, cl
301
290
  return /* @__PURE__ */ jsxRuntime.jsx(
302
291
  checkboxGroup.CheckboxGroup,
303
292
  {
304
- className: cn(variant === "card" ? "u-choice-cards" : "u-choice-group", className),
293
+ className: chunk3O5ELKBH_cjs.cn(variant === "card" ? "u-choice-cards" : "u-choice-group", className),
305
294
  "data-orientation": orientation,
306
295
  style: variant === "card" ? { "--u-cols": columns } : void 0,
307
296
  onValueChange: (v) => onValueChange?.(v),
@@ -316,7 +305,7 @@ function RadioGroup({ options, orientation, variant = "list", columns = 2, class
316
305
  return /* @__PURE__ */ jsxRuntime.jsx(
317
306
  radioGroup.RadioGroup,
318
307
  {
319
- className: cn(variant === "card" ? "u-choice-cards" : "u-choice-group", className),
308
+ className: chunk3O5ELKBH_cjs.cn(variant === "card" ? "u-choice-cards" : "u-choice-group", className),
320
309
  "data-orientation": orientation,
321
310
  style: variant === "card" ? { "--u-cols": columns } : void 0,
322
311
  onValueChange: (v) => onValueChange?.(v),
@@ -328,7 +317,7 @@ function RadioGroup({ options, orientation, variant = "list", columns = 2, class
328
317
  );
329
318
  }
330
319
  function ChoiceCard({ label, description, icon, control, disabled }) {
331
- return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "u-choice-card", "data-disabled": dataFlag(disabled), children: [
320
+ return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "u-choice-card", "data-disabled": chunk3O5ELKBH_cjs.dataFlag(disabled), children: [
332
321
  icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-choice-card-icon", children: icon }),
333
322
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-choice-text", children: [
334
323
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
@@ -338,17 +327,17 @@ function ChoiceCard({ label, description, icon, control, disabled }) {
338
327
  ] });
339
328
  }
340
329
  function Switch({ className, size, ...props }) {
341
- return /* @__PURE__ */ jsxRuntime.jsx(_switch.Switch.Root, { className: cn("u-switch", className), "data-size": size, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(_switch.Switch.Thumb, { className: "u-switch-thumb" }) });
330
+ return /* @__PURE__ */ jsxRuntime.jsx(_switch.Switch.Root, { className: chunk3O5ELKBH_cjs.cn("u-switch", className), "data-size": size, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(_switch.Switch.Thumb, { className: "u-switch-thumb" }) });
342
331
  }
343
332
  function NumberField({ className, ...props }) {
344
- return /* @__PURE__ */ jsxRuntime.jsx(numberField.NumberField.Root, { ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(numberField.NumberField.Group, { className: cn("u-number-field", className), children: [
333
+ return /* @__PURE__ */ jsxRuntime.jsx(numberField.NumberField.Root, { ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(numberField.NumberField.Group, { className: chunk3O5ELKBH_cjs.cn("u-number-field", className), children: [
345
334
  /* @__PURE__ */ jsxRuntime.jsx(numberField.NumberField.Decrement, { className: "u-number-field-button", "aria-label": "Kurangi", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, {}) }),
346
335
  /* @__PURE__ */ jsxRuntime.jsx(numberField.NumberField.Input, {}),
347
336
  /* @__PURE__ */ jsxRuntime.jsx(numberField.NumberField.Increment, { className: "u-number-field-button", "aria-label": "Tambah", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, {}) })
348
337
  ] }) });
349
338
  }
350
339
  function OtpField({ length = 6, separatorAfter, className, ...props }) {
351
- return /* @__PURE__ */ jsxRuntime.jsx(otpField.OTPField.Root, { length, className: cn("u-otp", className), ...props, children: Array.from({ length }, (_, i) => /* @__PURE__ */ jsxRuntime.jsxs(React2__namespace.Fragment, { children: [
340
+ return /* @__PURE__ */ jsxRuntime.jsx(otpField.OTPField.Root, { length, className: chunk3O5ELKBH_cjs.cn("u-otp", className), ...props, children: Array.from({ length }, (_, i) => /* @__PURE__ */ jsxRuntime.jsxs(React2__namespace.Fragment, { children: [
352
341
  /* @__PURE__ */ jsxRuntime.jsx(otpField.OTPField.Input, { className: "u-otp-input" }),
353
342
  separatorAfter === i + 1 && i + 1 < length && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-otp-separator", "aria-hidden": true })
354
343
  ] }, i)) });
@@ -356,16 +345,16 @@ function OtpField({ length = 6, separatorAfter, className, ...props }) {
356
345
  function Slider({ className, ...props }) {
357
346
  const value = props.value ?? props.defaultValue;
358
347
  const thumbs = Array.isArray(value) ? value.length : 1;
359
- return /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Root, { className: cn("u-slider", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Control, { className: "u-slider-control", children: /* @__PURE__ */ jsxRuntime.jsxs(slider.Slider.Track, { className: "u-slider-track", children: [
348
+ return /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Root, { className: chunk3O5ELKBH_cjs.cn("u-slider", className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Control, { className: "u-slider-control", children: /* @__PURE__ */ jsxRuntime.jsxs(slider.Slider.Track, { className: "u-slider-track", children: [
360
349
  /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Indicator, { className: "u-slider-indicator" }),
361
350
  Array.from({ length: thumbs }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(slider.Slider.Thumb, { index: thumbs > 1 ? i : void 0, className: "u-slider-thumb" }, i))
362
351
  ] }) }) });
363
352
  }
364
353
  function Toggle({ className, variant, size, ...props }) {
365
- return /* @__PURE__ */ jsxRuntime.jsx(toggle.Toggle, { className: cn("u-toggle", className), "data-variant": variant, "data-size": size, ...props });
354
+ return /* @__PURE__ */ jsxRuntime.jsx(toggle.Toggle, { className: chunk3O5ELKBH_cjs.cn("u-toggle", className), "data-variant": variant, "data-size": size, ...props });
366
355
  }
367
356
  function ToggleGroup({ className, ...props }) {
368
- return /* @__PURE__ */ jsxRuntime.jsx(toggleGroup.ToggleGroup, { className: cn("u-toggle-group", className), ...props });
357
+ return /* @__PURE__ */ jsxRuntime.jsx(toggleGroup.ToggleGroup, { className: chunk3O5ELKBH_cjs.cn("u-toggle-group", className), ...props });
369
358
  }
370
359
  function SegmentedControl({ options, value, defaultValue, onValueChange, fullWidth, className, ...rest }) {
371
360
  const [inner, setInner] = React2__namespace.useState(defaultValue ?? options[0]?.value);
@@ -373,8 +362,8 @@ function SegmentedControl({ options, value, defaultValue, onValueChange, fullWid
373
362
  return /* @__PURE__ */ jsxRuntime.jsx(
374
363
  toggleGroup.ToggleGroup,
375
364
  {
376
- className: cn("u-segmented", className),
377
- "data-full-width": dataFlag(fullWidth),
365
+ className: chunk3O5ELKBH_cjs.cn("u-segmented", className),
366
+ "data-full-width": chunk3O5ELKBH_cjs.dataFlag(fullWidth),
378
367
  value: current ? [current] : [],
379
368
  onValueChange: (v) => {
380
369
  const next = v[0];
@@ -411,7 +400,7 @@ function Select({ options, placeholder = "Pilih\u2026", size, className, value,
411
400
  name: props.name,
412
401
  required: props.required,
413
402
  children: [
414
- /* @__PURE__ */ jsxRuntime.jsxs(select.Select.Trigger, { className: cn("u-select-trigger", className), "data-size": size, id: props.id, "aria-label": props["aria-label"], children: [
403
+ /* @__PURE__ */ jsxRuntime.jsxs(select.Select.Trigger, { className: chunk3O5ELKBH_cjs.cn("u-select-trigger", className), "data-size": size, id: props.id, "aria-label": props["aria-label"], children: [
415
404
  /* @__PURE__ */ jsxRuntime.jsx(select.Select.Value, { className: "u-select-value", placeholder }),
416
405
  /* @__PURE__ */ jsxRuntime.jsx(select.Select.Icon, { className: "u-select-icon", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, {}) })
417
406
  ] }),
@@ -512,7 +501,7 @@ function Combobox({
512
501
  disabled,
513
502
  name,
514
503
  children: [
515
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-input-group", className), "data-size": size, children: [
504
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-input-group", className), "data-size": size, children: [
516
505
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-input-addon", "data-align": "start", children: icon }),
517
506
  /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Input, { placeholder, id, "aria-label": rest["aria-label"] }),
518
507
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-input-addon", "data-align": "end", children: loading && open ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "sm" }) : selected ? /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Clear, { className: "u-select-icon", "aria-label": "Kosongkan", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Trigger, { className: "u-select-icon", "aria-label": "Buka daftar", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, {}) }) })
@@ -541,14 +530,64 @@ function OptionContent({ media, mediaShape, title, meta }) {
541
530
  ] })
542
531
  ] });
543
532
  }
533
+ function deteksiPlatform() {
534
+ if (typeof window === "undefined") return { platform: "web", os: "lain" };
535
+ const w = window;
536
+ const ua = navigator.userAgent;
537
+ const iOS = /iPhone|iPad|iPod/.test(ua) || /Macintosh/.test(ua) && navigator.maxTouchPoints > 1;
538
+ const os = iOS ? "ios" : /Android/.test(ua) ? "android" : /Mac/.test(ua) ? "macos" : /Win/.test(ua) ? "windows" : /Linux/.test(ua) ? "linux" : "lain";
539
+ const cap = w.Capacitor?.getPlatform?.();
540
+ if (cap === "ios" || cap === "android") return { platform: "mobile", os: cap };
541
+ if (w.cordova) return { platform: "mobile", os };
542
+ if (w.__TAURI__ || w.__TAURI_INTERNALS__ || /Electron/.test(ua)) return { platform: "desktop", os };
543
+ return { platform: "web", os };
544
+ }
545
+ function info(platform, os) {
546
+ const sentuh = typeof window !== "undefined" ? window.matchMedia?.("(pointer: coarse)").matches || platform === "mobile" : platform === "mobile";
547
+ return { platform, os, sentuh, mobile: platform === "mobile", desktop: platform === "desktop", ios: os === "ios", android: os === "android" };
548
+ }
549
+ var sekarang = info("web", "lain");
550
+ var pendengar = /* @__PURE__ */ new Set();
551
+ function setelPlatform({ platform = "auto", os = "auto", target } = {}) {
552
+ const d = deteksiPlatform();
553
+ const p = platform === "auto" ? d.platform : platform;
554
+ let o = os === "auto" ? d.os : os;
555
+ if (p === "mobile" && o !== "ios" && o !== "android") o = "android";
556
+ sekarang = info(p, o);
557
+ const el = target ?? (typeof document !== "undefined" ? document.documentElement : null);
558
+ if (el) {
559
+ el.dataset.uPlatform = p;
560
+ el.dataset.uOs = o;
561
+ if (sekarang.sentuh) el.dataset.uSentuh = "";
562
+ else delete el.dataset.uSentuh;
563
+ }
564
+ pendengar.forEach((l) => l());
565
+ return sekarang;
566
+ }
567
+ function usePlatform() {
568
+ return React2__namespace.useSyncExternalStore(
569
+ (l) => {
570
+ pendengar.add(l);
571
+ return () => void pendengar.delete(l);
572
+ },
573
+ () => sekarang,
574
+ () => sekarang
575
+ );
576
+ }
577
+ function platformSekarang() {
578
+ return sekarang;
579
+ }
544
580
  function Arrow() {
545
581
  return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "14", height: "7", viewBox: "0 0 14 7", "aria-hidden": true, children: [
546
582
  /* @__PURE__ */ jsxRuntime.jsx("path", { className: "u-arrow-stroke", d: "M0 7 7 0l7 7h-1.4L7 1.4 1.4 7Z" }),
547
583
  /* @__PURE__ */ jsxRuntime.jsx("path", { className: "u-arrow-fill", d: "M1.4 7 7 1.4 12.6 7Z" })
548
584
  ] });
549
585
  }
550
- function Dialog({ open, defaultOpen, onOpenChange, trigger, title, description, footer, size = "md", side, children, className }) {
551
- const popup = /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog.Popup, { className: cn(side ? "u-sheet" : "u-dialog", className), "data-size": size, "data-side": side, children: [
586
+ function Dialog({ open, defaultOpen, onOpenChange, trigger, title, description, footer, size = "md", side: sideProp, children, className }) {
587
+ const plat = usePlatform();
588
+ const side = plat.mobile && size !== "full" && sideProp !== "left" ? "bottom" : sideProp;
589
+ const popup = /* @__PURE__ */ jsxRuntime.jsxs(dialog.Dialog.Popup, { className: chunk3O5ELKBH_cjs.cn(side ? "u-sheet" : "u-dialog", className), "data-size": size, "data-side": side, children: [
590
+ side === "bottom" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-sheet-grabber", "aria-hidden": true }),
552
591
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-dialog-header", children: [
553
592
  /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Title, { className: "u-dialog-title", children: title }),
554
593
  description && /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Description, { className: "u-dialog-description", children: description })
@@ -615,7 +654,7 @@ function ConfirmDialog({ open, onOpenChange, trigger, title, description, confir
615
654
  function Popover({ trigger, title, description, children, side = "bottom", align = "center", width, open, onOpenChange, className, openOnHover }) {
616
655
  return /* @__PURE__ */ jsxRuntime.jsxs(popover.Popover.Root, { open, onOpenChange: (o) => onOpenChange?.(o), children: [
617
656
  /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Trigger, { render: trigger, openOnHover }),
618
- /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Positioner, { className: "u-popup-positioner", side, align, sideOffset: 8, children: /* @__PURE__ */ jsxRuntime.jsxs(popover.Popover.Popup, { className: cn("u-popover", className), style: width ? { "--u-popover-w": typeof width === "number" ? `${width}px` : width } : void 0, children: [
657
+ /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Positioner, { className: "u-popup-positioner", side, align, sideOffset: 8, children: /* @__PURE__ */ jsxRuntime.jsxs(popover.Popover.Popup, { className: chunk3O5ELKBH_cjs.cn("u-popover", className), style: width ? { "--u-popover-w": typeof width === "number" ? `${width}px` : width } : void 0, children: [
619
658
  /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Arrow, { className: "u-popup-arrow", children: /* @__PURE__ */ jsxRuntime.jsx(Arrow, {}) }),
620
659
  title && /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Title, { className: "u-popover-title", children: title }),
621
660
  description && /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Description, { className: "u-popover-description", children: description }),
@@ -677,11 +716,11 @@ function Card({ variant = "default", interactive, className, render, ...props })
677
716
  return useRender.useRender({
678
717
  render,
679
718
  defaultTagName: "div",
680
- props: mergeProps.mergeProps({ className: cn("u-card", className), "data-variant": variant, "data-interactive": dataFlag(interactive) }, props)
719
+ props: mergeProps.mergeProps({ className: chunk3O5ELKBH_cjs.cn("u-card", className), "data-variant": variant, "data-interactive": chunk3O5ELKBH_cjs.dataFlag(interactive) }, props)
681
720
  });
682
721
  }
683
722
  function CardHeader({ title, description, action, className, children, ...props }) {
684
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-card-header", className), ...props, children: [
723
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-card-header", className), ...props, children: [
685
724
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
686
725
  title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "u-card-title", children: title }),
687
726
  description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-card-description", children: description }),
@@ -691,10 +730,10 @@ function CardHeader({ title, description, action, className, children, ...props
691
730
  ] });
692
731
  }
693
732
  function CardContent({ className, ...props }) {
694
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-card-content", className), ...props });
733
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk3O5ELKBH_cjs.cn("u-card-content", className), ...props });
695
734
  }
696
735
  function CardFooter({ className, ...props }) {
697
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-card-footer", className), ...props });
736
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk3O5ELKBH_cjs.cn("u-card-footer", className), ...props });
698
737
  }
699
738
  var ALERT_ICON = {
700
739
  neutral: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Info, {}),
@@ -705,7 +744,7 @@ var ALERT_ICON = {
705
744
  danger: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleAlert, {})
706
745
  };
707
746
  function Alert({ variant = "neutral", title, icon, actions, className, children, ...props }) {
708
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: variant === "danger" || variant === "warning" ? "alert" : "status", className: cn("u-alert", className), "data-variant": variant, ...props, children: [
747
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: variant === "danger" || variant === "warning" ? "alert" : "status", className: chunk3O5ELKBH_cjs.cn("u-alert", className), "data-variant": variant, ...props, children: [
709
748
  icon === false ? /* @__PURE__ */ jsxRuntime.jsx("span", {}) : icon ?? ALERT_ICON[variant],
710
749
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-alert-body", children: [
711
750
  title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-alert-title", children: title }),
@@ -719,7 +758,7 @@ function Avatar({ name, src, size = "md", shape, status, badge, className, style
719
758
  return /* @__PURE__ */ jsxRuntime.jsxs(
720
759
  avatar.Avatar.Root,
721
760
  {
722
- className: cn("u-avatar", className),
761
+ className: chunk3O5ELKBH_cjs.cn("u-avatar", className),
723
762
  "data-size": size,
724
763
  "data-shape": shape,
725
764
  style: { "--u-avatar-bg": `oklch(0.93 0.04 ${hue})`, "--u-avatar-fg": `oklch(0.42 0.1 ${hue})`, ...style },
@@ -745,7 +784,7 @@ function AvatarGroup({ people, max = 4, size = "sm" }) {
745
784
  ] });
746
785
  }
747
786
  function Tabs({ items, value, defaultValue, onValueChange, variant = "underline", className }) {
748
- return /* @__PURE__ */ jsxRuntime.jsxs(tabs.Tabs.Root, { className: cn("u-tabs", className), value, defaultValue: defaultValue ?? items[0]?.value, onValueChange: (v) => onValueChange?.(v), children: [
787
+ return /* @__PURE__ */ jsxRuntime.jsxs(tabs.Tabs.Root, { className: chunk3O5ELKBH_cjs.cn("u-tabs", className), value, defaultValue: defaultValue ?? items[0]?.value, onValueChange: (v) => onValueChange?.(v), children: [
749
788
  /* @__PURE__ */ jsxRuntime.jsxs(tabs.Tabs.List, { className: "u-tabs-list", "data-variant": variant, children: [
750
789
  items.map((t) => /* @__PURE__ */ jsxRuntime.jsxs(tabs.Tabs.Tab, { value: t.value, disabled: t.disabled, className: "u-tab", children: [
751
790
  t.icon,
@@ -760,7 +799,7 @@ function Tabs({ items, value, defaultValue, onValueChange, variant = "underline"
760
799
  ] });
761
800
  }
762
801
  function Accordion({ items, variant, multiple, defaultValue, className }) {
763
- return /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Root, { className: cn("u-accordion", className), "data-variant": variant, multiple, defaultValue, children: items.map((it) => /* @__PURE__ */ jsxRuntime.jsxs(accordion.Accordion.Item, { value: it.value, className: "u-accordion-item", children: [
802
+ return /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Root, { className: chunk3O5ELKBH_cjs.cn("u-accordion", className), "data-variant": variant, multiple, defaultValue, children: items.map((it) => /* @__PURE__ */ jsxRuntime.jsxs(accordion.Accordion.Item, { value: it.value, className: "u-accordion-item", children: [
764
803
  /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Header, { className: "u-accordion-header", children: /* @__PURE__ */ jsxRuntime.jsxs(accordion.Accordion.Trigger, { className: "u-accordion-trigger", children: [
765
804
  it.title,
766
805
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, {})
@@ -771,10 +810,10 @@ function Accordion({ items, variant, multiple, defaultValue, className }) {
771
810
  var Collapsible = collapsible.Collapsible.Root;
772
811
  var CollapsibleTrigger = collapsible.Collapsible.Trigger;
773
812
  function CollapsiblePanel({ className, ...props }) {
774
- return /* @__PURE__ */ jsxRuntime.jsx(collapsible.Collapsible.Panel, { className: cn("u-collapsible-panel", className), ...props });
813
+ return /* @__PURE__ */ jsxRuntime.jsx(collapsible.Collapsible.Panel, { className: chunk3O5ELKBH_cjs.cn("u-collapsible-panel", className), ...props });
775
814
  }
776
815
  function Progress({ value, max = 100, label, showValue = Boolean(label), tone, size, className, format }) {
777
- return /* @__PURE__ */ jsxRuntime.jsxs(progress.Progress.Root, { value, max, className: cn("u-progress", className), children: [
816
+ return /* @__PURE__ */ jsxRuntime.jsxs(progress.Progress.Root, { value, max, className: chunk3O5ELKBH_cjs.cn("u-progress", className), children: [
778
817
  label && /* @__PURE__ */ jsxRuntime.jsx(progress.Progress.Label, { className: "u-progress-label", children: label }),
779
818
  showValue && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-progress-value", children: value == null ? "" : format ? format(value, max) : `${Math.round(value / max * 100)}%` }),
780
819
  /* @__PURE__ */ jsxRuntime.jsx(progress.Progress.Track, { className: "u-progress-track", "data-size": size, children: /* @__PURE__ */ jsxRuntime.jsx(progress.Progress.Indicator, { className: "u-progress-indicator", "data-tone": tone }) })
@@ -785,7 +824,7 @@ function ProgressRing({ value, max = 100, size = 64, thickness = 6, tone, label,
785
824
  const c = 2 * Math.PI * r;
786
825
  const pct = Math.max(0, Math.min(1, value / max));
787
826
  const color = tone ? `var(--u-${tone === "danger" ? "danger" : tone})` : void 0;
788
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-progress-ring", className), role: "progressbar", "aria-valuenow": value, "aria-valuemax": max, "aria-valuemin": 0, style: { width: size, height: size, ...color ? { "--u-progress-color": color } : {} }, children: [
827
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-progress-ring", className), role: "progressbar", "aria-valuenow": value, "aria-valuemax": max, "aria-valuemin": 0, style: { width: size, height: size, ...color ? { "--u-progress-color": color } : {} }, children: [
789
828
  /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, children: [
790
829
  /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "u-ring-track", cx: size / 2, cy: size / 2, r, fill: "none", strokeWidth: thickness }),
791
830
  /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "u-ring-indicator", cx: size / 2, cy: size / 2, r, fill: "none", strokeWidth: thickness, strokeDasharray: c, strokeDashoffset: c * (1 - pct) })
@@ -809,7 +848,7 @@ function pageList(page, total) {
809
848
  function Pagination({ page, totalPages, onPageChange, total, perPage, className, compact }) {
810
849
  const from = total != null && perPage ? (page - 1) * perPage + 1 : null;
811
850
  const to = total != null && perPage ? Math.min(total, page * perPage) : null;
812
- return /* @__PURE__ */ jsxRuntime.jsxs("nav", { className: cn("u-pagination", className), "aria-label": "Halaman", children: [
851
+ return /* @__PURE__ */ jsxRuntime.jsxs("nav", { className: chunk3O5ELKBH_cjs.cn("u-pagination", className), "aria-label": "Halaman", children: [
813
852
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-pagination-info", children: total != null && from != null ? total === 0 ? "Tidak ada data" : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
814
853
  /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
815
854
  from.toLocaleString("id-ID"),
@@ -835,7 +874,7 @@ function Pagination({ page, totalPages, onPageChange, total, perPage, className,
835
874
  ] });
836
875
  }
837
876
  function Breadcrumb({ items, className }) {
838
- return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("u-breadcrumb", className), children: items.map((it, i) => {
877
+ return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: chunk3O5ELKBH_cjs.cn("u-breadcrumb", className), children: items.map((it, i) => {
839
878
  const last = i === items.length - 1;
840
879
  return /* @__PURE__ */ jsxRuntime.jsxs(React2__namespace.Fragment, { children: [
841
880
  /* @__PURE__ */ jsxRuntime.jsx("li", { children: last ? /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-current": "page", children: it.label }) : it.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: it.href, onClick: it.onClick, children: it.label }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: it.label }) }),
@@ -844,7 +883,7 @@ function Breadcrumb({ items, className }) {
844
883
  }) }) });
845
884
  }
846
885
  function Empty({ icon, title, description, actions, bordered, className }) {
847
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-empty", className), "data-bordered": dataFlag(bordered), children: [
886
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-empty", className), "data-bordered": chunk3O5ELKBH_cjs.dataFlag(bordered), children: [
848
887
  icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-empty-icon", children: icon }),
849
888
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-empty-title", children: title }),
850
889
  description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-empty-description", children: description }),
@@ -852,13 +891,13 @@ function Empty({ icon, title, description, actions, bordered, className }) {
852
891
  ] });
853
892
  }
854
893
  function TableContainer({ className, ...props }) {
855
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-table-wrap", className), ...props });
894
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk3O5ELKBH_cjs.cn("u-table-wrap", className), ...props });
856
895
  }
857
896
  function Table({ className, density, striped, ...props }) {
858
- return /* @__PURE__ */ jsxRuntime.jsx("table", { className: cn("u-table", className), "data-density": density, "data-striped": dataFlag(striped), ...props });
897
+ return /* @__PURE__ */ jsxRuntime.jsx("table", { className: chunk3O5ELKBH_cjs.cn("u-table", className), "data-density": density, "data-striped": chunk3O5ELKBH_cjs.dataFlag(striped), ...props });
859
898
  }
860
899
  function SortButton({ direction, onClick, children }) {
861
- return /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "u-table-sort", "data-sorted": dataFlag(Boolean(direction)), onClick, children: [
900
+ return /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "u-table-sort", "data-sorted": chunk3O5ELKBH_cjs.dataFlag(Boolean(direction)), onClick, children: [
862
901
  children,
863
902
  direction === "asc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, {}) : direction === "desc" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpDown, { style: { opacity: 0.5 } })
864
903
  ] });
@@ -873,13 +912,13 @@ function CellPrimary({ media, title, subtitle }) {
873
912
  ] });
874
913
  }
875
914
  function ScrollArea({ className, style, maxHeight, children }) {
876
- return /* @__PURE__ */ jsxRuntime.jsxs(scrollArea.ScrollArea.Root, { className: cn("u-scroll-area", className), style, children: [
915
+ return /* @__PURE__ */ jsxRuntime.jsxs(scrollArea.ScrollArea.Root, { className: chunk3O5ELKBH_cjs.cn("u-scroll-area", className), style, children: [
877
916
  /* @__PURE__ */ jsxRuntime.jsx(scrollArea.ScrollArea.Viewport, { className: "u-scroll-viewport", style: { maxHeight }, children }),
878
917
  /* @__PURE__ */ jsxRuntime.jsx(scrollArea.ScrollArea.Scrollbar, { className: "u-scrollbar", orientation: "vertical", children: /* @__PURE__ */ jsxRuntime.jsx(scrollArea.ScrollArea.Thumb, { className: "u-scroll-thumb" }) })
879
918
  ] });
880
919
  }
881
920
  function Stepper({ steps, current, orientation = "horizontal", onStepClick, className }) {
882
- return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("u-stepper", className), "data-orientation": orientation, "data-collapse": "", children: steps.map((s, i) => {
921
+ return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: chunk3O5ELKBH_cjs.cn("u-stepper", className), "data-orientation": orientation, "data-collapse": "", children: steps.map((s, i) => {
883
922
  const state = s.error ? "error" : i < current ? "complete" : i === current ? "current" : "upcoming";
884
923
  const clickable = onStepClick && i < current;
885
924
  const Marker = clickable ? "button" : "span";
@@ -894,7 +933,7 @@ function Stepper({ steps, current, orientation = "horizontal", onStepClick, clas
894
933
  }) });
895
934
  }
896
935
  function DescriptionList({ items, className }) {
897
- return /* @__PURE__ */ jsxRuntime.jsx("dl", { className: cn("u-dl", className), children: items.map((it, i) => /* @__PURE__ */ jsxRuntime.jsxs(React2__namespace.Fragment, { children: [
936
+ return /* @__PURE__ */ jsxRuntime.jsx("dl", { className: chunk3O5ELKBH_cjs.cn("u-dl", className), children: items.map((it, i) => /* @__PURE__ */ jsxRuntime.jsxs(React2__namespace.Fragment, { children: [
898
937
  /* @__PURE__ */ jsxRuntime.jsx("dt", { children: it.label }),
899
938
  /* @__PURE__ */ jsxRuntime.jsx("dd", { children: it.value ?? "\u2013" })
900
939
  ] }, i)) });
@@ -943,7 +982,7 @@ function Calendar({ value, onValueChange, range, onRangeChange, month, onMonthCh
943
982
  const el = gridRef.current?.querySelector(`[data-date="${toISODate(focus)}"]`);
944
983
  if (el && gridRef.current?.contains(document.activeElement)) el.focus();
945
984
  }, [focus]);
946
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-calendar", className), "data-bordered": dataFlag(bordered), style: cellSize ? { "--u-cal-cell": `${cellSize}px` } : void 0, children: [
985
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-calendar", className), "data-bordered": chunk3O5ELKBH_cjs.dataFlag(bordered), style: cellSize ? { "--u-cal-cell": `${cellSize}px` } : void 0, children: [
947
986
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-calendar-header", children: [
948
987
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-calendar-title", "aria-live": "polite", children: title }),
949
988
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-calendar-nav", children: [
@@ -973,24 +1012,24 @@ function Calendar({ value, onValueChange, range, onRangeChange, month, onMonthCh
973
1012
  children: [
974
1013
  WEEKDAYS.map((w) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-calendar-weekday", role: "columnheader", children: w }, w)),
975
1014
  days.map((d) => {
976
- const iso2 = toISODate(d);
1015
+ const iso = toISODate(d);
977
1016
  const outside = d.getMonth() !== view.getMonth();
978
1017
  const selected = value && sameDay(d, value) || range?.from && sameDay(d, range.from) || range?.to && sameDay(d, range.to);
979
1018
  const inRange = range?.from && range?.to && d > range.from && d < range.to;
980
1019
  const weekend = highlightWeekend && (d.getDay() === 0 || d.getDay() === 6);
981
- const m = markers?.[iso2];
1020
+ const m = markers?.[iso];
982
1021
  return /* @__PURE__ */ jsxRuntime.jsxs(
983
1022
  "button",
984
1023
  {
985
1024
  type: "button",
986
1025
  role: "gridcell",
987
1026
  className: "u-calendar-day",
988
- "data-date": iso2,
989
- "data-outside": dataFlag(outside),
990
- "data-today": dataFlag(sameDay(d, today)),
991
- "data-selected": dataFlag(Boolean(selected)),
992
- "data-in-range": dataFlag(Boolean(inRange)),
993
- "data-weekend": dataFlag(weekend),
1027
+ "data-date": iso,
1028
+ "data-outside": chunk3O5ELKBH_cjs.dataFlag(outside),
1029
+ "data-today": chunk3O5ELKBH_cjs.dataFlag(sameDay(d, today)),
1030
+ "data-selected": chunk3O5ELKBH_cjs.dataFlag(Boolean(selected)),
1031
+ "data-in-range": chunk3O5ELKBH_cjs.dataFlag(Boolean(inRange)),
1032
+ "data-weekend": chunk3O5ELKBH_cjs.dataFlag(weekend),
994
1033
  "aria-selected": Boolean(selected),
995
1034
  "aria-label": formatDate(d, "full") + (m?.length ? `, ${m.length} agenda` : ""),
996
1035
  tabIndex: sameDay(d, focus) ? 0 : -1,
@@ -1001,7 +1040,7 @@ function Calendar({ value, onValueChange, range, onRangeChange, month, onMonthCh
1001
1040
  m && m.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-calendar-dots", "aria-hidden": true, children: m.slice(0, 3).map((mk, i) => /* @__PURE__ */ jsxRuntime.jsx("span", { style: mk.color ? { "--u-dot": mk.color } : void 0 }, i)) })
1002
1041
  ]
1003
1042
  },
1004
- iso2
1043
+ iso
1005
1044
  );
1006
1045
  })
1007
1046
  ]
@@ -1019,7 +1058,7 @@ function DatePicker({ value, onValueChange, placeholder = "Pilih tanggal", min,
1019
1058
  align: "start",
1020
1059
  width: "auto",
1021
1060
  className: "u-datepicker-popup",
1022
- trigger: /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", id, className: cn("u-select-trigger", className), disabled, "data-disabled": dataFlag(disabled), children: [
1061
+ trigger: /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", id, className: chunk3O5ELKBH_cjs.cn("u-select-trigger", className), disabled, "data-disabled": chunk3O5ELKBH_cjs.dataFlag(disabled), children: [
1023
1062
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-select-value", "data-placeholder": value ? void 0 : "", children: value ? formatDate(value, "long") : placeholder }),
1024
1063
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-select-icon", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarDays, {}) })
1025
1064
  ] }),
@@ -1053,9 +1092,9 @@ function Dropzone({ onFiles, accept, multiple, maxSize, disabled, title, hint, o
1053
1092
  {
1054
1093
  role: "button",
1055
1094
  tabIndex: disabled ? -1 : 0,
1056
- className: cn("u-dropzone", className),
1057
- "data-dragging": dataFlag(drag),
1058
- "data-disabled": dataFlag(disabled),
1095
+ className: chunk3O5ELKBH_cjs.cn("u-dropzone", className),
1096
+ "data-dragging": chunk3O5ELKBH_cjs.dataFlag(drag),
1097
+ "data-disabled": chunk3O5ELKBH_cjs.dataFlag(disabled),
1059
1098
  "aria-disabled": disabled,
1060
1099
  onClick: () => input.current?.click(),
1061
1100
  onKeyDown: (e) => (e.key === "Enter" || e.key === " ") && (e.preventDefault(), input.current?.click()),
@@ -1177,7 +1216,7 @@ function useCopy(timeout = 1600) {
1177
1216
  }
1178
1217
  function CopyButton({ text, className, label = "Salin" }) {
1179
1218
  const { copied, copy } = useCopy();
1180
- return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: cn("u-code-copy", className), onClick: () => copy(text), "aria-label": copied ? "Tersalin" : label, title: copied ? "Tersalin" : label, "data-copied": dataFlag(copied), children: copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, {}) });
1219
+ return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: chunk3O5ELKBH_cjs.cn("u-code-copy", className), onClick: () => copy(text), "aria-label": copied ? "Tersalin" : label, title: copied ? "Tersalin" : label, "data-copied": chunk3O5ELKBH_cjs.dataFlag(copied), children: copied ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, {}) });
1181
1220
  }
1182
1221
  function CodeBlock({ code, language = "text", filename, tabs, defaultTab = 0, lineNumbers = true, highlightLines, windowControls = true, maxHeight, theme = "dark", wrap, className }) {
1183
1222
  const snippets = tabs ?? [{ label: filename ?? language.toUpperCase(), language, code: code ?? "", filename }];
@@ -1187,7 +1226,7 @@ function CodeBlock({ code, language = "text", filename, tabs, defaultTab = 0, li
1187
1226
  const lines = React2__namespace.useMemo(() => tokenize(text, cur.language), [text, cur.language]);
1188
1227
  const hl = new Set(highlightLines);
1189
1228
  const tabId = React2__namespace.useId();
1190
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-code", className), "data-theme": theme === "dark" ? "code-dark" : void 0, "data-wrap": dataFlag(wrap), children: [
1229
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-code", className), "data-theme": theme === "dark" ? "code-dark" : void 0, "data-wrap": chunk3O5ELKBH_cjs.dataFlag(wrap), children: [
1191
1230
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-code-header", children: [
1192
1231
  windowControls && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-code-dots", "aria-hidden": true, children: [
1193
1232
  /* @__PURE__ */ jsxRuntime.jsx("span", {}),
@@ -1216,15 +1255,15 @@ function CodeBlock({ code, language = "text", filename, tabs, defaultTab = 0, li
1216
1255
  )) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-code-filename", children: cur.filename ?? cur.label }),
1217
1256
  /* @__PURE__ */ jsxRuntime.jsx(CopyButton, { text })
1218
1257
  ] }),
1219
- /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "u-code-body", style: { maxHeight }, role: tabs ? "tabpanel" : void 0, "aria-labelledby": tabs ? `${tabId}-${active}` : void 0, tabIndex: 0, children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: lines.map((line, i) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-code-line", "data-highlight": dataFlag(hl.has(i + 1)), children: [
1258
+ /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "u-code-body", style: { maxHeight }, role: tabs ? "tabpanel" : void 0, "aria-labelledby": tabs ? `${tabId}-${active}` : void 0, tabIndex: 0, children: /* @__PURE__ */ jsxRuntime.jsx("code", { children: lines.map((line, i) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-code-line", "data-highlight": chunk3O5ELKBH_cjs.dataFlag(hl.has(i + 1)), children: [
1220
1259
  lineNumbers && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-code-ln", "aria-hidden": true, children: i + 1 }),
1221
1260
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-code-text", children: line.length ? line.map((tok, k) => tok.c ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: `u-tok-${tok.c}`, children: tok.t }, k) : tok.t) : " " })
1222
1261
  ] }, i)) }) })
1223
1262
  ] });
1224
1263
  }
1225
1264
  function InlineCode({ children, copyable, className }) {
1226
- if (!copyable) return /* @__PURE__ */ jsxRuntime.jsx("code", { className: cn("u-inline-code", className), children });
1227
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("u-inline-code", className), "data-copyable": "", children: [
1265
+ if (!copyable) return /* @__PURE__ */ jsxRuntime.jsx("code", { className: chunk3O5ELKBH_cjs.cn("u-inline-code", className), children });
1266
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: chunk3O5ELKBH_cjs.cn("u-inline-code", className), "data-copyable": "", children: [
1228
1267
  /* @__PURE__ */ jsxRuntime.jsx("code", { children }),
1229
1268
  /* @__PURE__ */ jsxRuntime.jsx(CopyButton, { text: children })
1230
1269
  ] });
@@ -1239,7 +1278,7 @@ function requestIdDari(e) {
1239
1278
  function KodeLaporan({ error, id, className }) {
1240
1279
  const kode = id ?? requestIdDari(error);
1241
1280
  if (!kode) return null;
1242
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("u-kode-laporan", className), children: [
1281
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: chunk3O5ELKBH_cjs.cn("u-kode-laporan", className), children: [
1243
1282
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Kode laporan" }),
1244
1283
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-kode-laporan-nilai", children: [
1245
1284
  /* @__PURE__ */ jsxRuntime.jsx("code", { children: kode }),
@@ -1247,434 +1286,6 @@ function KodeLaporan({ error, id, className }) {
1247
1286
  ] })
1248
1287
  ] });
1249
1288
  }
1250
- function useScrolled(on, threshold = 8) {
1251
- const [s, setS] = React2__namespace.useState(false);
1252
- React2__namespace.useEffect(() => {
1253
- if (!on) return;
1254
- const f = () => setS(window.scrollY > threshold);
1255
- f();
1256
- window.addEventListener("scroll", f, { passive: true });
1257
- return () => window.removeEventListener("scroll", f);
1258
- }, [on, threshold]);
1259
- return s;
1260
- }
1261
- function useWide(ref, px, versi) {
1262
- const [m, setM] = React2__namespace.useState(true);
1263
- const butuh = React2__namespace.useRef(0);
1264
- React2__namespace.useLayoutEffect(() => {
1265
- const el = ref.current;
1266
- if (!el) return;
1267
- const f = () => {
1268
- const bar = el.querySelector(".u-navbar-bar");
1269
- const list = bar?.querySelector(".u-navbar-list");
1270
- const w = el.getBoundingClientRect().width;
1271
- if (bar && list) {
1272
- const cs = getComputedStyle(bar);
1273
- const brand = bar.querySelector(".u-navbar-brand")?.offsetWidth ?? 0;
1274
- const end = bar.querySelector(".u-navbar-end")?.scrollWidth ?? 0;
1275
- butuh.current = parseFloat(cs.paddingLeft) + parseFloat(cs.paddingRight) + brand + list.scrollWidth + end + 2 * (parseFloat(cs.columnGap) || 24) + 8;
1276
- }
1277
- setM(w >= px && w >= butuh.current);
1278
- };
1279
- f();
1280
- const ro = new ResizeObserver(f);
1281
- ro.observe(el);
1282
- return () => ro.disconnect();
1283
- }, [ref, px, versi]);
1284
- return m;
1285
- }
1286
- function Anchor({
1287
- href,
1288
- external,
1289
- renderLink,
1290
- ...props
1291
- }) {
1292
- const p = { ...props, href, ...external ? { target: "_blank", rel: "noopener noreferrer" } : {} };
1293
- return renderLink ? renderLink({ href, external }, p) : /* @__PURE__ */ jsxRuntime.jsx("a", { ...p });
1294
- }
1295
- var hasPanel = (m) => Boolean(m.items?.length || m.columns?.length);
1296
- var columnsOf = (m) => m.columns ?? (m.items ? [{ items: m.items }] : []);
1297
- function LinkBody({ link }) {
1298
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1299
- link.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-navbar-link-icon", children: link.icon }),
1300
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-navbar-link-text", children: [
1301
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-navbar-link-label", children: [
1302
- link.label,
1303
- link.badge != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-navbar-link-badge", children: link.badge })
1304
- ] }),
1305
- link.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-navbar-link-desc", children: link.description })
1306
- ] })
1307
- ] });
1308
- }
1309
- function PanelLink({ link, renderLink }) {
1310
- if (!link.href)
1311
- return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "u-navbar-link", onClick: link.onClick, children: /* @__PURE__ */ jsxRuntime.jsx(LinkBody, { link }) });
1312
- return /* @__PURE__ */ jsxRuntime.jsx(
1313
- navigationMenu.NavigationMenu.Link,
1314
- {
1315
- className: "u-navbar-link",
1316
- render: (props) => /* @__PURE__ */ jsxRuntime.jsx(Anchor, { ...props, href: link.href, external: link.external, renderLink, onClick: link.onClick, children: /* @__PURE__ */ jsxRuntime.jsx(LinkBody, { link }) })
1317
- }
1318
- );
1319
- }
1320
- function Featured({ f, renderLink }) {
1321
- return /* @__PURE__ */ jsxRuntime.jsxs(Anchor, { href: f.href, renderLink, className: "u-navbar-featured", "data-image": dataFlag(Boolean(f.image)), children: [
1322
- f.image && /* @__PURE__ */ jsxRuntime.jsx("img", { src: f.image, alt: "", loading: "lazy" }),
1323
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-navbar-featured-body", children: [
1324
- f.eyebrow && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-navbar-featured-eyebrow", children: f.eyebrow }),
1325
- /* @__PURE__ */ jsxRuntime.jsx("b", { children: f.title }),
1326
- f.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-navbar-featured-desc", children: f.description }),
1327
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-navbar-featured-cta", children: [
1328
- f.cta ?? "Selengkapnya",
1329
- " ",
1330
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { "aria-hidden": true })
1331
- ] })
1332
- ] })
1333
- ] });
1334
- }
1335
- function Panel({ menu, renderLink }) {
1336
- const cols = columnsOf(menu);
1337
- const mega = Boolean(menu.columns?.length) || Boolean(menu.featured);
1338
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-navbar-panel", "data-mega": dataFlag(mega), style: mega ? { "--u-navbar-cols": cols.length } : void 0, children: [
1339
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-navbar-panel-main", children: [
1340
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-navbar-cols", children: cols.map((c, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-navbar-col", children: [
1341
- c.title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-navbar-col-title", children: c.title }),
1342
- /* @__PURE__ */ jsxRuntime.jsx("ul", { children: c.items.map((l, j) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(PanelLink, { link: l, renderLink }) }, l.key ?? j)) })
1343
- ] }, i)) }),
1344
- menu.featured && /* @__PURE__ */ jsxRuntime.jsx(Featured, { f: menu.featured, renderLink })
1345
- ] }),
1346
- menu.footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-navbar-panel-footer", children: menu.footer })
1347
- ] });
1348
- }
1349
- function UserMenu({ user }) {
1350
- return /* @__PURE__ */ jsxRuntime.jsx(
1351
- Menu,
1352
- {
1353
- align: "end",
1354
- trigger: /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "u-navbar-user", "aria-label": `Menu ${user.name}`, children: [
1355
- /* @__PURE__ */ jsxRuntime.jsx(Avatar, { name: user.name, src: user.avatar, size: "sm" }),
1356
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-navbar-user-text", children: [
1357
- /* @__PURE__ */ jsxRuntime.jsx("b", { children: user.name }),
1358
- user.subtitle && /* @__PURE__ */ jsxRuntime.jsx("small", { children: user.subtitle })
1359
- ] }),
1360
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { "aria-hidden": true })
1361
- ] }),
1362
- items: user.menu ?? []
1363
- }
1364
- );
1365
- }
1366
- function MobileNav({
1367
- brand,
1368
- menus,
1369
- activeKey,
1370
- actions,
1371
- user,
1372
- renderLink,
1373
- open,
1374
- onOpenChange
1375
- }) {
1376
- const close = () => onOpenChange(false);
1377
- const item = (l, depth, k) => {
1378
- const active = activeKey != null && "key" in l && l.key === activeKey;
1379
- const cls = "u-navbar-m-link";
1380
- const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1381
- "icon" in l && l.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-navbar-link-icon", children: l.icon }),
1382
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-navbar-link-label", children: l.label })
1383
- ] });
1384
- return l.href ? /* @__PURE__ */ jsxRuntime.jsx(
1385
- Anchor,
1386
- {
1387
- href: l.href,
1388
- external: l.external,
1389
- renderLink,
1390
- className: cls,
1391
- "data-depth": depth,
1392
- "data-active": dataFlag(active),
1393
- "aria-current": active ? "page" : void 0,
1394
- onClick: () => (l.onClick?.(), close()),
1395
- children: body
1396
- },
1397
- k
1398
- ) : /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: cls, "data-depth": depth, onClick: () => (l.onClick?.(), close()), children: body }, k);
1399
- };
1400
- return /* @__PURE__ */ jsxRuntime.jsxs(Dialog, { open, onOpenChange, side: "right", title: brand, className: "u-navbar-sheet", children: [
1401
- /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "u-navbar-m", "aria-label": "Menu utama", children: menus.map(
1402
- (m) => hasPanel(m) ? /* @__PURE__ */ jsxRuntime.jsxs(collapsible.Collapsible.Root, { defaultOpen: activeKey != null && (m.key === activeKey || columnsOf(m).some((c) => c.items.some((l) => l.key === activeKey))), children: [
1403
- /* @__PURE__ */ jsxRuntime.jsxs(collapsible.Collapsible.Trigger, { className: "u-navbar-m-link", "data-depth": 0, children: [
1404
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-navbar-link-label", children: m.label }),
1405
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "u-navbar-m-chevron", "aria-hidden": true })
1406
- ] }),
1407
- /* @__PURE__ */ jsxRuntime.jsx(collapsible.Collapsible.Panel, { className: "u-collapsible-panel", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-navbar-m-sub", children: [
1408
- columnsOf(m).map((c, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1409
- c.title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-navbar-col-title", children: c.title }),
1410
- c.items.map((l, j) => item(l, 1, l.key ?? j))
1411
- ] }, i)),
1412
- m.featured && item({ label: m.featured.title, href: m.featured.href }, 1, "featured")
1413
- ] }) })
1414
- ] }, m.key) : item(m, 0, m.key)
1415
- ) }),
1416
- (actions || user) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-navbar-m-foot", children: [
1417
- user && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-navbar-m-user", children: [
1418
- /* @__PURE__ */ jsxRuntime.jsx(Avatar, { name: user.name, src: user.avatar, size: "md" }),
1419
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-navbar-user-text", children: [
1420
- /* @__PURE__ */ jsxRuntime.jsx("b", { children: user.name }),
1421
- user.subtitle && /* @__PURE__ */ jsxRuntime.jsx("small", { children: user.subtitle })
1422
- ] })
1423
- ] }),
1424
- actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-navbar-m-actions", children: actions })
1425
- ] })
1426
- ] });
1427
- }
1428
- function Navbar({
1429
- brand,
1430
- brandHref = "/",
1431
- menus,
1432
- activeKey,
1433
- actions,
1434
- user,
1435
- search,
1436
- topbar,
1437
- variant = "app",
1438
- transparent,
1439
- sticky = true,
1440
- align = "start",
1441
- maxWidth,
1442
- mobileBreakpoint = 960,
1443
- defaultOpen,
1444
- renderLink,
1445
- className
1446
- }) {
1447
- const scrolled = useScrolled(sticky);
1448
- const ref = React2__namespace.useRef(null);
1449
- const wide = useWide(ref, mobileBreakpoint, menus.map((m) => m.key).join("|"));
1450
- const [open, setOpen] = React2__namespace.useState(false);
1451
- const childActive = (m) => activeKey != null && (m.key === activeKey || columnsOf(m).some((c) => c.items.some((l) => l.key === activeKey)));
1452
- return /* @__PURE__ */ jsxRuntime.jsxs(
1453
- "header",
1454
- {
1455
- ref,
1456
- className: cn("u-navbar", className),
1457
- "data-variant": variant,
1458
- "data-sticky": dataFlag(sticky),
1459
- "data-transparent": dataFlag(Boolean(transparent) && !scrolled && !open),
1460
- "data-scrolled": dataFlag(scrolled),
1461
- style: maxWidth ? { "--u-navbar-max": maxWidth } : void 0,
1462
- children: [
1463
- topbar && wide && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-navbar-topbar", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-navbar-inner", children: topbar }) }),
1464
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-navbar-inner u-navbar-bar", "data-align": align, children: [
1465
- /* @__PURE__ */ jsxRuntime.jsx(Anchor, { href: brandHref, renderLink, className: "u-navbar-brand", children: brand }),
1466
- wide ? /* @__PURE__ */ jsxRuntime.jsxs(navigationMenu.NavigationMenu.Root, { className: "u-navbar-nav", "aria-label": "Menu utama", defaultValue: defaultOpen, children: [
1467
- /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.List, { className: "u-navbar-list", children: menus.map((m) => /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Item, { value: m.key, children: hasPanel(m) ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1468
- /* @__PURE__ */ jsxRuntime.jsxs(navigationMenu.NavigationMenu.Trigger, { className: "u-navbar-item", "data-active": dataFlag(childActive(m)), children: [
1469
- m.label,
1470
- /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Icon, { className: "u-navbar-chevron", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, {}) })
1471
- ] }),
1472
- /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Content, { className: "u-navbar-content", children: /* @__PURE__ */ jsxRuntime.jsx(Panel, { menu: m, renderLink }) })
1473
- ] }) : m.href ? /* @__PURE__ */ jsxRuntime.jsx(
1474
- navigationMenu.NavigationMenu.Link,
1475
- {
1476
- className: "u-navbar-item",
1477
- active: m.key === activeKey,
1478
- render: (props) => /* @__PURE__ */ jsxRuntime.jsx(
1479
- Anchor,
1480
- {
1481
- ...props,
1482
- href: m.href,
1483
- external: m.external,
1484
- renderLink,
1485
- "data-active": dataFlag(m.key === activeKey),
1486
- "aria-current": m.key === activeKey ? "page" : void 0,
1487
- children: m.label
1488
- }
1489
- )
1490
- }
1491
- ) : /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "u-navbar-item", onClick: m.onClick, children: m.label }) }, m.key)) }),
1492
- /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Positioner, { className: "u-navbar-positioner", sideOffset: 8, collisionPadding: 16, collisionAvoidance: { side: "none" }, children: /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Popup, { className: "u-navbar-popup", children: /* @__PURE__ */ jsxRuntime.jsx(navigationMenu.NavigationMenu.Viewport, { className: "u-navbar-viewport" }) }) }) })
1493
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-navbar-spacer" }),
1494
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-navbar-end", children: [
1495
- search,
1496
- wide && actions,
1497
- user && /* @__PURE__ */ jsxRuntime.jsx(UserMenu, { user }),
1498
- !wide && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", iconOnly: true, "aria-label": "Buka menu", "aria-expanded": open, onClick: () => setOpen(true), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, {}) })
1499
- ] })
1500
- ] }),
1501
- !wide && /* @__PURE__ */ jsxRuntime.jsx(MobileNav, { brand, menus, activeKey, actions, user: void 0, renderLink, open, onOpenChange: setOpen })
1502
- ]
1503
- }
1504
- );
1505
- }
1506
- var textOf = (n) => typeof n === "string" || typeof n === "number" ? String(n) : "";
1507
- var norm = (s) => s.toLocaleLowerCase("id").normalize("NFD").replace(/[̀-ͯ]/g, "");
1508
- function Faq({ items, title, description, searchable, categories, layout = "stack", variant = "line", openFirst, loading, contact, onSearch, className }) {
1509
- const [q, setQ] = React2__namespace.useState("");
1510
- const [kat, setKat] = React2__namespace.useState(null);
1511
- const cats = React2__namespace.useMemo(() => [...new Set(items.map((i) => i.category).filter(Boolean))], [items]);
1512
- const showCats = (categories ?? cats.length > 1) && cats.length > 0;
1513
- const showSearch = searchable ?? (items.length > 5 || Boolean(onSearch));
1514
- React2__namespace.useEffect(() => {
1515
- if (!onSearch) return;
1516
- const t = setTimeout(() => onSearch(q.trim()), 300);
1517
- return () => clearTimeout(t);
1518
- }, [q, onSearch]);
1519
- const shown = items.filter((i) => {
1520
- if (kat && i.category !== kat) return false;
1521
- if (!q.trim() || onSearch) return true;
1522
- const hay = norm(`${textOf(i.question)} ${textOf(i.answer)} ${i.searchText ?? ""}`);
1523
- return norm(q.trim()).split(/\s+/).every((w) => hay.includes(w));
1524
- });
1525
- const count = (c) => c ? items.filter((i) => i.category === c).length : items.length;
1526
- const head = (title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-faq-head", children: [
1527
- title && /* @__PURE__ */ jsxRuntime.jsx("h2", { children: title }),
1528
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { children: description })
1529
- ] });
1530
- const search = showSearch && /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "u-faq-search", children: [
1531
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { "aria-hidden": true }),
1532
- /* @__PURE__ */ jsxRuntime.jsx("input", { type: "search", value: q, onChange: (e) => setQ(e.target.value), placeholder: "Cari pertanyaan\u2026", "aria-label": "Cari pertanyaan" })
1533
- ] });
1534
- const pills = showCats && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-faq-cats", role: "tablist", "aria-label": "Kategori", children: [null, ...cats].map((c) => /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", role: "tab", "aria-selected": kat === c, onClick: () => setKat(c), children: [
1535
- c ?? "Semua",
1536
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: count(c) })
1537
- ] }, c ?? "_semua")) });
1538
- const list = loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-faq-loading", children: Array.from({ length: 5 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 52 } }, i)) }) : shown.length ? /* @__PURE__ */ jsxRuntime.jsx(
1539
- Accordion,
1540
- {
1541
- variant,
1542
- defaultValue: openFirst ? [String(shown[0].id ?? 0)] : void 0,
1543
- items: shown.map((i, idx) => ({
1544
- value: String(i.id ?? idx),
1545
- title: i.question,
1546
- content: typeof i.answer === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-faq-answer", children: i.answer }) : i.answer
1547
- }))
1548
- },
1549
- `${kat}|${q}`
1550
- ) : /* @__PURE__ */ jsxRuntime.jsx(
1551
- Empty,
1552
- {
1553
- icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchX, {}),
1554
- title: items.length ? "Tidak ada pertanyaan yang cocok" : "Belum ada tanya jawab",
1555
- description: items.length ? "Coba kata lain atau pilih kategori Semua." : void 0,
1556
- actions: items.length ? /* @__PURE__ */ jsxRuntime.jsx(
1557
- Button,
1558
- {
1559
- variant: "outline",
1560
- size: "sm",
1561
- onClick: () => {
1562
- setQ("");
1563
- setKat(null);
1564
- },
1565
- children: "Atur ulang"
1566
- }
1567
- ) : void 0
1568
- }
1569
- );
1570
- const kontak = contact && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-faq-contact", children: [
1571
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-faq-contact-icon", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleQuestion, {}) }),
1572
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1573
- /* @__PURE__ */ jsxRuntime.jsx("b", { children: contact.title ?? "Masih ada pertanyaan?" }),
1574
- contact.description && /* @__PURE__ */ jsxRuntime.jsx("p", { children: contact.description })
1575
- ] }),
1576
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-faq-contact-action", children: contact.action })
1577
- ] });
1578
- if (layout === "split")
1579
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cn("u-faq", className), "data-layout": "split", children: [
1580
- /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "u-faq-side", children: [
1581
- head,
1582
- search,
1583
- pills
1584
- ] }),
1585
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-faq-main", children: [
1586
- list,
1587
- kontak
1588
- ] })
1589
- ] });
1590
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cn("u-faq", className), "data-layout": "stack", children: [
1591
- head,
1592
- (search || pills) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-faq-tools", children: [
1593
- search,
1594
- pills
1595
- ] }),
1596
- list,
1597
- kontak
1598
- ] });
1599
- }
1600
- function UnipoMark({ size = 32, shape = "square", tone = "brand", color, accent, glyph, title = "UNIPO", ...props }) {
1601
- const bg = tone === "inverse" ? "#fff" : tone === "mono" ? "currentColor" : color ?? "var(--u-primary)";
1602
- const fg = tone === "inverse" ? color ?? "var(--u-primary)" : tone === "mono" ? "var(--u-background, #fff)" : "#fff";
1603
- const acc = tone === "brand" ? accent ?? "var(--u-secondary)" : fg;
1604
- const plain = shape === "plain";
1605
- const stroke = plain ? bg : fg;
1606
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 32 32", role: "img", "aria-label": title, ...props, children: [
1607
- shape === "square" && /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "32", height: "32", rx: "8.5", fill: bg }),
1608
- shape === "circle" && /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "16", cy: "16", r: "16", fill: bg }),
1609
- shape === "shield" && /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 1.5 29 5.6v10.2c0 7.6-5.3 12.6-13 14.7C8.3 28.4 3 23.4 3 15.8V5.6Z", fill: bg }),
1610
- shape !== "plain" && shape !== "shield" && /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 8.5A8.5 8.5 0 0 1 8.5 0h15A8.5 8.5 0 0 1 32 8.5V11C21 9 11 9 0 13Z", fill: "#fff", fillOpacity: tone === "brand" ? 0.08 : 0 }),
1611
- glyph ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1612
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.5 9.5h13", stroke: acc, strokeWidth: "2.6", strokeLinecap: "round" }),
1613
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.5 13.2v4.6a5.5 5.5 0 0 0 11 0v-4.6", stroke, strokeWidth: "3", strokeLinecap: "round", fill: "none" })
1614
- ] })
1615
- ] });
1616
- }
1617
- var MARK_SIZE = { sm: 24, md: 32, lg: 40, xl: 56 };
1618
- function AppLogo({ name = "UNIPO", tagline, src, layout = "horizontal", shape = "square", tone = "brand", size = "md", color, glyph, className, ...props }) {
1619
- const px = MARK_SIZE[size];
1620
- const mark = src ? /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: "", width: px, height: px, style: { objectFit: "contain" } }) : /* @__PURE__ */ jsxRuntime.jsx(UnipoMark, { size: px, shape, tone, color, glyph, title: typeof name === "string" ? name : "UNIPO" });
1621
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("u-app-logo", className), "data-layout": layout, "data-size": size, "data-tone": tone, ...props, children: [
1622
- layout !== "wordmark" && mark,
1623
- layout !== "mark" && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-app-logo-text", children: [
1624
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-app-logo-name", children: name }),
1625
- tagline && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-app-logo-tagline", children: tagline })
1626
- ] })
1627
- ] });
1628
- }
1629
- var G = (d, extra) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1630
- /* @__PURE__ */ jsxRuntime.jsx("path", { d, stroke: "#fff", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }),
1631
- extra
1632
- ] });
1633
- var APP_GLYPHS = {
1634
- siakad: G("M9.5 9.5h13M10.5 13.2v4.6a5.5 5.5 0 0 0 11 0v-4.6"),
1635
- pmb: G("M16 8.5v15M8.5 16h15", /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "16", cy: "16", r: "10", stroke: "#fff", strokeOpacity: ".35", strokeWidth: "1.6", fill: "none" })),
1636
- lms: G("M8 11.5 16 8l8 3.5-8 3.5Zm3.5 2v5c0 1.6 2 3 4.5 3s4.5-1.4 4.5-3v-5"),
1637
- cbt: G("M9 9.5h14v10H9ZM13 23h6M16 19.5V23M12.5 14.5l2.2 2.2 4.3-4.3"),
1638
- tracer: G("M8.5 22.5 13 17l3.5 3 7-8.5M19 11.5h4.5V16"),
1639
- humas: G("M9 13.5v5l3 .5 1.5 4h2l-1-3.6L23 22V10l-11 3.5Z"),
1640
- pustikom: G("M9 9h14v9H9ZM12.5 23h7M16 18v5"),
1641
- sso: G("M12 15v-2.5a4 4 0 0 1 8 0V15M10.5 15h11v8h-11ZM16 18.3v1.7"),
1642
- api: G("M12.5 10.5 8 16l4.5 5.5M19.5 10.5 24 16l-4.5 5.5M17.5 9l-3 14"),
1643
- fakultas: G("M8 13 16 9l8 4M9.5 13v8M22.5 13v8M13 13.5v7M19 13.5v7M8 22.5h16"),
1644
- alumni: G("M16 9a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7ZM9.5 23a6.5 6.5 0 0 1 13 0"),
1645
- arsip: G("M8.5 10h15v4h-15ZM9.5 14v8.5h13V14M14 17.5h4")
1646
- };
1647
- var APP_COLORS = {
1648
- siakad: "var(--u-primary)",
1649
- pmb: "#d9541e",
1650
- lms: "#0f8a6a",
1651
- cbt: "#6d4fd1",
1652
- tracer: "#0e7490",
1653
- humas: "#c2416b",
1654
- pustikom: "#1f2937",
1655
- sso: "#244ce6",
1656
- api: "#0f172a",
1657
- fakultas: "#8a5a12",
1658
- alumni: "#7c3aed",
1659
- arsip: "#5b6b7f"
1660
- };
1661
- var APP_NAMES = {
1662
- siakad: "SIAKAD",
1663
- pmb: "PMB",
1664
- lms: "E-Learning",
1665
- cbt: "CBT",
1666
- tracer: "Tracer Study",
1667
- humas: "Humas",
1668
- pustikom: "Pustikom",
1669
- sso: "SSO",
1670
- api: "API",
1671
- fakultas: "Fakultas",
1672
- alumni: "Alumni",
1673
- arsip: "Arsip"
1674
- };
1675
- function UnipoAppLogo({ app, tagline = "Universitas Pohuwato", ...props }) {
1676
- return /* @__PURE__ */ jsxRuntime.jsx(AppLogo, { name: APP_NAMES[app], tagline, glyph: APP_GLYPHS[app], color: props.color ?? APP_COLORS[app], ...props });
1677
- }
1678
1289
  var isEmpty = (v) => v == null || v === "" || v === false || Array.isArray(v) && v.length === 0 || typeof v === "object" && !Array.isArray(v) && !Object.values(v).some(Boolean);
1679
1290
  function labelOf(f, v) {
1680
1291
  if (f.type === "select") return String(f.options.find((o) => o.value === v)?.text ?? f.options.find((o) => o.value === v)?.label ?? v);
@@ -1724,7 +1335,7 @@ function OptionList({ field, value, onChange, close }) {
1724
1335
  }
1725
1336
  },
1726
1337
  children: [
1727
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: multi ? "u-facet-check" : "u-facet-radio", "data-checked": dataFlag(on), children: on && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, {}) }),
1338
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: multi ? "u-facet-check" : "u-facet-radio", "data-checked": chunk3O5ELKBH_cjs.dataFlag(on), children: on && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, {}) }),
1728
1339
  o.icon,
1729
1340
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-facet-label", children: o.label }),
1730
1341
  o.count != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-facet-count", children: o.count.toLocaleString("id-ID") })
@@ -1746,7 +1357,7 @@ function FieldEditor({ field, value, onChange, close }) {
1746
1357
  if (field.type === "date-range") {
1747
1358
  const r = value ?? {};
1748
1359
  const toD = (s) => s ? /* @__PURE__ */ new Date(s + "T00:00:00") : null;
1749
- const iso2 = (d) => d ? `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}` : void 0;
1360
+ const iso = (d) => d ? `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}` : void 0;
1750
1361
  const today = /* @__PURE__ */ new Date();
1751
1362
  const back = (n) => new Date(today.getFullYear(), today.getMonth(), today.getDate() - n);
1752
1363
  const presets = [
@@ -1760,12 +1371,12 @@ function FieldEditor({ field, value, onChange, close }) {
1760
1371
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-facet-date", children: [
1761
1372
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-facet-presets", role: "group", "aria-label": "Rentang cepat", children: [
1762
1373
  presets.map(([label, from, to]) => {
1763
- const on = r.from === iso2(from) && r.to === iso2(to);
1764
- return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "u-facet-preset", "data-active": dataFlag(on), "aria-pressed": on, onClick: () => onChange({ from: iso2(from), to: iso2(to) }), children: label }, label);
1374
+ const on = r.from === iso(from) && r.to === iso(to);
1375
+ return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "u-facet-preset", "data-active": chunk3O5ELKBH_cjs.dataFlag(on), "aria-pressed": on, onClick: () => onChange({ from: iso(from), to: iso(to) }), children: label }, label);
1765
1376
  }),
1766
1377
  (r.from || r.to) && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "u-facet-clear", onClick: () => onChange(void 0), children: "Hapus rentang" })
1767
1378
  ] }),
1768
- /* @__PURE__ */ jsxRuntime.jsx(Calendar, { range: { from: toD(r.from), to: toD(r.to) }, onRangeChange: (n) => onChange({ from: iso2(n.from), to: iso2(n.to) }) }, r.from ?? "kosong")
1379
+ /* @__PURE__ */ jsxRuntime.jsx(Calendar, { range: { from: toD(r.from), to: toD(r.to) }, onRangeChange: (n) => onChange({ from: iso(n.from), to: iso(n.to) }) }, r.from ?? "kosong")
1769
1380
  ] });
1770
1381
  }
1771
1382
  if (field.type === "boolean") return null;
@@ -1775,14 +1386,14 @@ function FacetFilter({ field, value, onChange }) {
1775
1386
  const [open, setOpen] = React2__namespace.useState(false);
1776
1387
  const active = !isEmpty(value);
1777
1388
  if (field.type === "boolean") {
1778
- return /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "u-facet-trigger", "data-active": dataFlag(active), "aria-pressed": active, onClick: () => onChange(active ? void 0 : true), children: [
1389
+ return /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "u-facet-trigger", "data-active": chunk3O5ELKBH_cjs.dataFlag(active), "aria-pressed": active, onClick: () => onChange(active ? void 0 : true), children: [
1779
1390
  field.icon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusCircle, {}),
1780
1391
  field.label
1781
1392
  ] });
1782
1393
  }
1783
1394
  const multiValues = field.type === "multi" && Array.isArray(value) ? value : [];
1784
1395
  return /* @__PURE__ */ jsxRuntime.jsxs(popover.Popover.Root, { open, onOpenChange: setOpen, children: [
1785
- /* @__PURE__ */ jsxRuntime.jsxs(popover.Popover.Trigger, { className: "u-facet-trigger", "data-active": dataFlag(active), children: [
1396
+ /* @__PURE__ */ jsxRuntime.jsxs(popover.Popover.Trigger, { className: "u-facet-trigger", "data-active": chunk3O5ELKBH_cjs.dataFlag(active), children: [
1786
1397
  field.icon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusCircle, {}),
1787
1398
  field.label,
1788
1399
  active && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -1814,7 +1425,7 @@ function FilterBar({ fields, value, onValueChange, search = {}, resultCount, res
1814
1425
  return () => clearTimeout(t);
1815
1426
  }, [q]);
1816
1427
  const clearAll = () => onValueChange(search ? value[searchKey] ? { [searchKey]: value[searchKey] } : {} : {});
1817
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-filter-bar", className), children: [
1428
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-filter-bar", className), children: [
1818
1429
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-filter-row", children: [
1819
1430
  search !== false && /* @__PURE__ */ jsxRuntime.jsx(InputGroup, { start: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, {}), size: "sm", className: "u-filter-search", end: q ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "u-select-icon", "aria-label": "Kosongkan pencarian", onClick: () => setQ(""), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}) }) : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(Input, { "aria-label": search.placeholder ?? "Cari", placeholder: search.placeholder ?? "Cari\u2026", value: q, onChange: (e) => setQ(e.target.value) }) }),
1820
1431
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-filter-facets", children: [
@@ -2148,8 +1759,8 @@ function DataTable(props) {
2148
1759
  {
2149
1760
  role: "listitem",
2150
1761
  className: "u-dt-grid-item",
2151
- "data-selected": dataFlag(selected.includes(k)),
2152
- "data-clickable": dataFlag(Boolean(onRowClick)),
1762
+ "data-selected": chunk3O5ELKBH_cjs.dataFlag(selected.includes(k)),
1763
+ "data-clickable": chunk3O5ELKBH_cjs.dataFlag(Boolean(onRowClick)),
2153
1764
  tabIndex: onRowClick ? 0 : void 0,
2154
1765
  onClick: onRowClick ? () => onRowClick(row) : void 0,
2155
1766
  onKeyDown: onRowClick ? (e) => {
@@ -2181,8 +1792,8 @@ function DataTable(props) {
2181
1792
  {
2182
1793
  role: "listitem",
2183
1794
  className: "u-dt-card",
2184
- "data-selected": dataFlag(selected.includes(k)),
2185
- "data-clickable": dataFlag(Boolean(onRowClick)),
1795
+ "data-selected": chunk3O5ELKBH_cjs.dataFlag(selected.includes(k)),
1796
+ "data-clickable": chunk3O5ELKBH_cjs.dataFlag(Boolean(onRowClick)),
2186
1797
  onClick: onRowClick ? () => onRowClick(row) : void 0,
2187
1798
  children: [
2188
1799
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-dt-card-head", children: [
@@ -2202,7 +1813,7 @@ function DataTable(props) {
2202
1813
  },
2203
1814
  k
2204
1815
  );
2205
- }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-table-wrap u-dt-scroll", style: maxHeight ? { maxHeight, overflowY: "auto" } : void 0, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "u-table", "data-density": density, "data-striped": dataFlag(striped), "aria-busy": loading || void 0, children: [
1816
+ }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-table-wrap u-dt-scroll", style: maxHeight ? { maxHeight, overflowY: "auto" } : void 0, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "u-table", "data-density": density, "data-striped": chunk3O5ELKBH_cjs.dataFlag(striped), "aria-busy": loading || void 0, children: [
2206
1817
  caption && /* @__PURE__ */ jsxRuntime.jsx("caption", { className: "u-sr-only", children: caption }),
2207
1818
  /* @__PURE__ */ jsxRuntime.jsxs("thead", { children: [
2208
1819
  /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
@@ -2229,7 +1840,7 @@ function DataTable(props) {
2229
1840
  ] }, i)) : state ?? shown.map((row, i) => {
2230
1841
  const k = rowKey(row);
2231
1842
  const sel = selected.includes(k);
2232
- return /* @__PURE__ */ jsxRuntime.jsxs("tr", { "data-selected": dataFlag(sel), "data-clickable": dataFlag(Boolean(onRowClick)), onClick: onRowClick ? () => onRowClick(row) : void 0, children: [
1843
+ return /* @__PURE__ */ jsxRuntime.jsxs("tr", { "data-selected": chunk3O5ELKBH_cjs.dataFlag(sel), "data-clickable": chunk3O5ELKBH_cjs.dataFlag(Boolean(onRowClick)), onClick: onRowClick ? () => onRowClick(row) : void 0, children: [
2233
1844
  selectable && /* @__PURE__ */ jsxRuntime.jsx("td", { className: "u-dt-check", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: sel, onCheckedChange: () => toggleRow(k), "aria-label": "Pilih baris" }) }),
2234
1845
  visible.map((c) => /* @__PURE__ */ jsxRuntime.jsx("td", { "data-align": c.align, "data-shrink": c.shrink ? "" : void 0, children: c.cell ? c.cell(row, i) : String(raw(c, row) ?? "") }, c.key)),
2235
1846
  rowActions && /* @__PURE__ */ jsxRuntime.jsx("td", { "data-shrink": "", "data-align": "end", onClick: (e) => e.stopPropagation(), children: menuCell(row) })
@@ -2237,7 +1848,7 @@ function DataTable(props) {
2237
1848
  }) })
2238
1849
  ] }) });
2239
1850
  const showFooter = !firstLoad && !hasError && total > 0;
2240
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-data-table", className), "data-loading": dataFlag(loading), "data-cards": dataFlag(cards), children: [
1851
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-data-table", className), "data-loading": chunk3O5ELKBH_cjs.dataFlag(loading), "data-cards": chunk3O5ELKBH_cjs.dataFlag(cards), children: [
2241
1852
  (toolbar || columnToggle || exportCsv || actions || densityToggle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-dt-toolbar", children: [
2242
1853
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-dt-toolbar-start", children: toolbar }),
2243
1854
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-dt-toolbar-end", children: tools })
@@ -2282,571 +1893,6 @@ function DataTable(props) {
2282
1893
  ] })
2283
1894
  ] });
2284
1895
  }
2285
- var LABEL = { ok: "Normal", degraded: "Lambat", down: "Gangguan", maintenance: "Pemeliharaan", off: "Nonaktif", checking: "Memeriksa" };
2286
- var ICON = {
2287
- ok: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, {}),
2288
- degraded: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, {}),
2289
- down: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, {}),
2290
- maintenance: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wrench, {}),
2291
- off: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, {}),
2292
- checking: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "u-spin" })
2293
- };
2294
- function overallStatus(states) {
2295
- for (const s of ["down", "degraded", "maintenance", "checking"]) if (states.includes(s)) return s;
2296
- return "ok";
2297
- }
2298
- function ServiceStatusBadge({ status, children, className }) {
2299
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("u-svc-badge", className), "data-status": status, children: [
2300
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-svc-dot", "aria-hidden": true }),
2301
- children ?? LABEL[status]
2302
- ] });
2303
- }
2304
- function LatencyIndicator({ ms, slow = 800, className }) {
2305
- if (ms == null) return null;
2306
- const tone = ms >= slow * 3 ? "down" : ms >= slow ? "degraded" : "ok";
2307
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("u-svc-latency", className), "data-tone": tone, title: "Waktu tanggap", children: [
2308
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { "aria-hidden": true }),
2309
- ms.toLocaleString("id-ID"),
2310
- " ms"
2311
- ] });
2312
- }
2313
- var TITLE = {
2314
- ok: "Semua layanan berjalan normal",
2315
- degraded: "Sebagian layanan melambat",
2316
- down: "Sebagian layanan terganggu",
2317
- maintenance: "Sedang ada pemeliharaan terjadwal",
2318
- off: "Layanan tidak aktif",
2319
- checking: "Memeriksa layanan\u2026"
2320
- };
2321
- function StatusBanner({ status, title, checkedAt, note, action, className }) {
2322
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-status-banner", className), "data-status": status, role: "status", "aria-live": "polite", children: [
2323
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-status-banner-icon", children: ICON[status] }),
2324
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-status-banner-text", children: [
2325
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-status-banner-title", children: title ?? TITLE[status] }),
2326
- (checkedAt || note) && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "u-status-banner-note", children: [
2327
- checkedAt && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2328
- "Diperiksa ",
2329
- formatTime(checkedAt)
2330
- ] }),
2331
- checkedAt && note && " \xB7 ",
2332
- note
2333
- ] })
2334
- ] }),
2335
- action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-status-banner-action", children: action })
2336
- ] });
2337
- }
2338
- function UptimeBar({ history, label }) {
2339
- const ok = history.filter((h) => h.status === "ok").length;
2340
- const pct = history.length ? ok / history.length * 100 : 100;
2341
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-uptime", children: [
2342
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-uptime-bars", role: "img", "aria-label": `${label ?? "Ketersediaan"} ${pct.toFixed(2)}% dalam ${history.length} hari`, children: history.map((h) => /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { content: `${h.date}: ${h.note ?? LABEL[h.status]}`, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-uptime-bar", "data-status": h.status }) }, h.date)) }),
2343
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-uptime-legend", children: [
2344
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2345
- history.length,
2346
- " hari lalu"
2347
- ] }),
2348
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2349
- pct.toFixed(pct === 100 ? 0 : 2),
2350
- "% tersedia"
2351
- ] }),
2352
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Hari ini" })
2353
- ] })
2354
- ] });
2355
- }
2356
- function ServiceList({ services, slowMs, className }) {
2357
- return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("u-svc-list", className), children: services.map((s) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "u-svc-row", "data-status": s.status, children: [
2358
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-svc-main", children: [
2359
- s.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-svc-icon", children: s.icon }),
2360
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-svc-text", children: [
2361
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-svc-name", children: s.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: s.href, children: s.name }) : s.name }),
2362
- s.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-svc-desc", children: s.description })
2363
- ] }),
2364
- /* @__PURE__ */ jsxRuntime.jsx(LatencyIndicator, { ms: s.status === "checking" ? null : s.latency, slow: slowMs, className: "u-svc-hide-sm" }),
2365
- /* @__PURE__ */ jsxRuntime.jsxs(ServiceStatusBadge, { status: s.status, children: [
2366
- s.statusLabel ?? LABEL[s.status],
2367
- s.detail && s.status !== "ok" ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-svc-detail", children: [
2368
- " (",
2369
- s.detail,
2370
- ")"
2371
- ] }) : null
2372
- ] })
2373
- ] }),
2374
- s.history && s.history.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(UptimeBar, { history: s.history, label: typeof s.name === "string" ? s.name : void 0 })
2375
- ] }, s.key)) });
2376
- }
2377
- function useServiceChecks(checks, { intervalMs = 6e4, timeoutMs = 1e4, slowMs = 2e3 } = {}) {
2378
- const [results, setResults] = React2__namespace.useState({});
2379
- const [checking, setChecking] = React2__namespace.useState(false);
2380
- const [checkedAt, setCheckedAt] = React2__namespace.useState(null);
2381
- const ref = React2__namespace.useRef(checks);
2382
- ref.current = checks;
2383
- const run = React2__namespace.useCallback(async () => {
2384
- setChecking(true);
2385
- const out = {};
2386
- await Promise.all(
2387
- ref.current.map(async (c) => {
2388
- const ctrl = new AbortController();
2389
- const timer = setTimeout(() => ctrl.abort(), timeoutMs);
2390
- const t = performance.now();
2391
- try {
2392
- const r = await c.check(ctrl.signal) || {};
2393
- const ms = Math.round(performance.now() - t);
2394
- out[c.key] = { status: ms > slowMs ? "degraded" : "ok", latency: ms, ...r };
2395
- } catch (e) {
2396
- const err = e;
2397
- out[c.key] = { status: "down", latency: Math.round(performance.now() - t), detail: ctrl.signal.aborted ? "waktu habis" : err?.status ? String(err.status) : err?.message?.slice(0, 40) };
2398
- } finally {
2399
- clearTimeout(timer);
2400
- }
2401
- })
2402
- );
2403
- setResults(out);
2404
- setCheckedAt(/* @__PURE__ */ new Date());
2405
- setChecking(false);
2406
- }, [timeoutMs, slowMs]);
2407
- React2__namespace.useEffect(() => {
2408
- void run();
2409
- if (!intervalMs) return;
2410
- const id = setInterval(() => void run(), intervalMs);
2411
- return () => clearInterval(id);
2412
- }, [run, intervalMs]);
2413
- const services = checks.map((c) => ({ key: c.key, name: c.name, description: c.description, icon: c.icon, href: c.href, status: "checking", ...results[c.key] }));
2414
- return { services, checking, checkedAt, recheck: run, status: checkedAt ? overallStatus(services.map((s) => s.status)) : "checking" };
2415
- }
2416
- function ServiceStatusPanel({ checks, intervalMs = 6e4, slowMs = 2e3, title, className }) {
2417
- const { services, checking, checkedAt, recheck, status } = useServiceChecks(checks, { intervalMs, slowMs });
2418
- const tiap = intervalMs >= 6e4 ? `tiap ${Math.round(intervalMs / 6e4)} menit` : `tiap ${Math.round(intervalMs / 1e3)} detik`;
2419
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-status-panel", className), children: [
2420
- /* @__PURE__ */ jsxRuntime.jsx(StatusBanner, { status, title, checkedAt, note: intervalMs ? `diperbarui ${tiap.replace("tiap 1 menit", "tiap menit")}` : void 0 }),
2421
- /* @__PURE__ */ jsxRuntime.jsx(ServiceList, { services, slowMs: slowMs / 2 }),
2422
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-status-panel-footer", children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", loading: checking, onClick: () => void recheck(), children: [
2423
- !checking && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, {}),
2424
- " Periksa ulang"
2425
- ] }) })
2426
- ] });
2427
- }
2428
- var EVENT_COLORS = {
2429
- akademik: "var(--u-primary)",
2430
- perkuliahan: "#0891b2",
2431
- ujian: "#7c3aed",
2432
- krs: "var(--u-info)",
2433
- nilai: "#0d9488",
2434
- libur: "var(--u-danger)",
2435
- cuti_bersama: "var(--u-danger)",
2436
- wisuda: "#c026d3",
2437
- pmb: "var(--u-secondary, #f59e0b)",
2438
- keuangan: "var(--u-warning)",
2439
- kemahasiswaan: "#16a34a",
2440
- rapat: "#64748b",
2441
- lainnya: "#64748b"
2442
- };
2443
- var BULAN = ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"];
2444
- var BULAN_PENDEK = ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agu", "Sep", "Okt", "Nov", "Des"];
2445
- var HARI = ["Sen", "Sel", "Rab", "Kam", "Jum", "Sab", "Min"];
2446
- var HARI_PANJANG = ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"];
2447
- var iso = (s) => s.slice(0, 10);
2448
- function eventColor(e, colors = EVENT_COLORS) {
2449
- return e.color ?? (e.kind ? colors[e.kind] : void 0) ?? "var(--u-primary)";
2450
- }
2451
- function eventsByDay(events, from, to) {
2452
- const map = /* @__PURE__ */ new Map();
2453
- for (const e of events) {
2454
- const a = iso(e.start);
2455
- const b = e.end ? iso(e.end) : a;
2456
- const d = parseISODate(from && a < from ? from : a);
2457
- const last = to && b > to ? to : b;
2458
- for (let i = 0; i < 400 && toISODate(d) <= last; i++) {
2459
- const k = toISODate(d);
2460
- (map.get(k) ?? map.set(k, []).get(k)).push(e);
2461
- d.setDate(d.getDate() + 1);
2462
- }
2463
- }
2464
- return map;
2465
- }
2466
- function formatEventRange(start, end, long = false) {
2467
- const a = parseISODate(iso(start));
2468
- const b = end && iso(end) !== iso(start) ? parseISODate(iso(end)) : null;
2469
- if (!b) return long ? `${HARI_PANJANG[a.getDay()]}, ${a.getDate()} ${BULAN[a.getMonth()]} ${a.getFullYear()}` : `${a.getDate()} ${BULAN_PENDEK[a.getMonth()]} ${a.getFullYear()}`;
2470
- const M = long ? BULAN : BULAN_PENDEK;
2471
- if (a.getFullYear() !== b.getFullYear()) return `${a.getDate()} ${M[a.getMonth()]} ${a.getFullYear()} \u2013 ${b.getDate()} ${M[b.getMonth()]} ${b.getFullYear()}`;
2472
- if (a.getMonth() !== b.getMonth()) return `${a.getDate()} ${M[a.getMonth()]} \u2013 ${b.getDate()} ${M[b.getMonth()]} ${b.getFullYear()}`;
2473
- return `${a.getDate()}\u2013${b.getDate()} ${M[a.getMonth()]} ${a.getFullYear()}`;
2474
- }
2475
- function DateTile({ date, tone, size = "md", className }) {
2476
- const d = typeof date === "string" ? parseISODate(iso(date)) : date;
2477
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("u-date-tile", className), "data-size": size, style: tone ? { "--tone": tone } : void 0, children: [
2478
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-date-tile-month", children: BULAN_PENDEK[d.getMonth()] }),
2479
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-date-tile-day", children: d.getDate() })
2480
- ] });
2481
- }
2482
- function susunMinggu(events, days) {
2483
- const a = days[0];
2484
- const b = days[6];
2485
- const segs = events.filter((e) => iso(e.start) <= b && (e.end ? iso(e.end) : iso(e.start)) >= a).map((e) => {
2486
- const s = iso(e.start);
2487
- const t = e.end ? iso(e.end) : s;
2488
- return {
2489
- e,
2490
- from: s < a ? 0 : days.indexOf(s),
2491
- to: t > b ? 6 : days.indexOf(t),
2492
- lane: 0,
2493
- head: s >= a,
2494
- tail: t <= b
2495
- };
2496
- }).sort((x, y) => x.from - y.from || y.to - y.from - (x.to - x.from));
2497
- const lanes = [];
2498
- for (const s of segs) {
2499
- let l = lanes.findIndex((end) => end < s.from);
2500
- if (l < 0) l = lanes.push(-1) - 1;
2501
- lanes[l] = s.to;
2502
- s.lane = l;
2503
- }
2504
- return segs;
2505
- }
2506
- function EventCalendar({ events, month: monthProp, onMonthChange, selected, onSelect, onEventClick, maxPerDay = 3, loading, colors, toolbar, className }) {
2507
- const [monthState, setMonthState] = React2__namespace.useState(() => monthProp ?? /* @__PURE__ */ new Date());
2508
- const month = monthProp ?? monthState;
2509
- const setMonth = (m) => {
2510
- setMonthState(m);
2511
- onMonthChange?.(m);
2512
- };
2513
- const days = monthMatrix(month.getFullYear(), month.getMonth());
2514
- const from = toISODate(days[0]);
2515
- const to = toISODate(days[41]);
2516
- const byDay = React2__namespace.useMemo(() => eventsByDay(events, from, to), [events, from, to]);
2517
- const today = toISODate(/* @__PURE__ */ new Date());
2518
- const go = (n) => setMonth(new Date(month.getFullYear(), month.getMonth() + n, 1));
2519
- const rows = days[35].getMonth() !== month.getMonth() ? 5 : 6;
2520
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-evcal", className), "data-loading": dataFlag(loading), children: [
2521
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-evcal-head", children: [
2522
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-evcal-nav", children: [
2523
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", size: "sm", onClick: () => setMonth(new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1)), children: "Hari ini" }),
2524
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", iconOnly: true, "aria-label": "Bulan sebelumnya", onClick: () => go(-1), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, {}) }),
2525
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", iconOnly: true, "aria-label": "Bulan berikutnya", onClick: () => go(1), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, {}) })
2526
- ] }),
2527
- /* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "u-evcal-title", "aria-live": "polite", children: [
2528
- BULAN[month.getMonth()],
2529
- " ",
2530
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: month.getFullYear() })
2531
- ] }),
2532
- toolbar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-evcal-toolbar", children: toolbar })
2533
- ] }),
2534
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-evcal-grid", role: "grid", "aria-label": `${BULAN[month.getMonth()]} ${month.getFullYear()}`, children: [
2535
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-evcal-weekdays", role: "row", children: HARI.map((h) => /* @__PURE__ */ jsxRuntime.jsx("span", { role: "columnheader", children: h }, h)) }),
2536
- Array.from({ length: rows }, (_, r) => {
2537
- const week = days.slice(r * 7, r * 7 + 7);
2538
- const keys = week.map(toISODate);
2539
- const segs = loading ? [] : susunMinggu(events, keys);
2540
- const shown = segs.filter((s) => s.lane < maxPerDay - 1 || s.lane === maxPerDay - 1 && keys.slice(s.from, s.to + 1).every((k) => (byDay.get(k)?.length ?? 0) <= maxPerDay));
2541
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-evcal-week", role: "row", style: { "--lanes": maxPerDay }, children: [
2542
- week.map((d, c) => {
2543
- const k = keys[c];
2544
- const list = byDay.get(k) ?? [];
2545
- const hidden = list.length - shown.filter((s) => s.from <= c && s.to >= c).length;
2546
- return /* @__PURE__ */ jsxRuntime.jsxs(
2547
- "div",
2548
- {
2549
- role: "gridcell",
2550
- className: "u-evcal-day",
2551
- style: { gridColumn: c + 1 },
2552
- "data-outside": dataFlag(d.getMonth() !== month.getMonth()),
2553
- "data-today": dataFlag(k === today),
2554
- "data-selected": dataFlag(k === selected),
2555
- "data-weekend": dataFlag(d.getDay() === 0),
2556
- "data-holiday": dataFlag(list.some((e) => e.holiday)),
2557
- "aria-selected": k === selected,
2558
- children: [
2559
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "u-evcal-date", onClick: () => onSelect?.(k, list), "aria-label": `${formatEventRange(k, null, true)}, ${list.length} kegiatan`, children: d.getDate() }),
2560
- loading && (r + c) % 4 === 1 && /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "u-evcal-skel" }),
2561
- hidden > 0 && /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "u-evcal-more", onClick: () => onSelect?.(k, list), children: [
2562
- "+",
2563
- hidden,
2564
- " lagi"
2565
- ] }),
2566
- list.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-evcal-dots", "aria-hidden": true, children: list.slice(0, 3).map((e, i) => /* @__PURE__ */ jsxRuntime.jsx("i", { style: { background: eventColor(e, colors) } }, i)) })
2567
- ]
2568
- },
2569
- k
2570
- );
2571
- }),
2572
- shown.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs(
2573
- "button",
2574
- {
2575
- type: "button",
2576
- className: "u-evcal-chip",
2577
- title: typeof s.e.title === "string" ? s.e.title : void 0,
2578
- "data-span": dataFlag(!!s.e.end && iso(s.e.end) !== iso(s.e.start)),
2579
- "data-head": dataFlag(s.head),
2580
- "data-tail": dataFlag(s.tail),
2581
- style: {
2582
- gridColumn: `${s.from + 1} / ${s.to + 2}`,
2583
- gridRow: s.lane + 2,
2584
- "--tone": eventColor(s.e, colors)
2585
- },
2586
- onClick: () => onEventClick ? onEventClick(s.e) : onSelect?.(keys[s.from], byDay.get(keys[s.from]) ?? []),
2587
- children: [
2588
- s.e.time && !s.e.end ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-evcal-chip-time", children: s.e.time }) : null,
2589
- s.e.title
2590
- ]
2591
- },
2592
- `${s.e.id ?? i}-${i}`
2593
- ))
2594
- ] }, r);
2595
- })
2596
- ] })
2597
- ] });
2598
- }
2599
- function AgendaList({ events, groupBy = "none", colors, kindLabels, onEventClick, empty, loading, compact, limit, className }) {
2600
- if (loading)
2601
- return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("u-agenda", className), "data-compact": dataFlag(compact), "aria-busy": true, children: Array.from({ length: compact ? 3 : 4 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "u-agenda-item", children: [
2602
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "u-agenda-skel-tile" }),
2603
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, display: "grid", gap: 6 }, children: [
2604
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 14, width: "70%" } }),
2605
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 12, width: "40%" } })
2606
- ] })
2607
- ] }, i)) });
2608
- const list = limit ? events.slice(0, limit) : events;
2609
- if (!list.length)
2610
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-agenda-empty", className), children: empty ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2611
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarDays, { "aria-hidden": true }),
2612
- " Tidak ada kegiatan."
2613
- ] }) });
2614
- const item = (e, i, tile) => {
2615
- const color = eventColor(e, colors);
2616
- const Tag2 = e.href ? "a" : onEventClick ? "button" : "div";
2617
- return /* @__PURE__ */ jsxRuntime.jsx("li", { className: "u-agenda-item", style: { "--tone": color }, children: /* @__PURE__ */ jsxRuntime.jsxs(Tag2, { className: "u-agenda-link", ...e.href ? { href: e.href } : onEventClick ? { type: "button", onClick: () => onEventClick(e) } : {}, children: [
2618
- tile ? /* @__PURE__ */ jsxRuntime.jsx(DateTile, { date: e.start, tone: color, size: compact ? "sm" : "md" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-agenda-bar", "aria-hidden": true }),
2619
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-agenda-body", children: [
2620
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-agenda-title", children: e.title }),
2621
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-agenda-meta", children: [
2622
- (tile || e.end) && /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatEventRange(e.start, e.end) }),
2623
- e.time && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2624
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { "aria-hidden": true }),
2625
- e.time
2626
- ] }),
2627
- e.location && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2628
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPin, { "aria-hidden": true }),
2629
- e.location
2630
- ] })
2631
- ] }),
2632
- !compact && e.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-agenda-desc", children: e.description })
2633
- ] }),
2634
- e.kind && kindLabels?.[e.kind] && !compact && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-agenda-kind", children: kindLabels[e.kind] })
2635
- ] }) }, `${e.id ?? i}-${i}`);
2636
- };
2637
- if (groupBy === "none")
2638
- return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("u-agenda", className), "data-compact": dataFlag(compact), children: list.map((e, i) => item(e, i, true)) });
2639
- const groups = /* @__PURE__ */ new Map();
2640
- for (const e of list) (groups.get(iso(e.start)) ?? groups.set(iso(e.start), []).get(iso(e.start))).push(e);
2641
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-agenda-groups", className), "data-compact": dataFlag(compact), children: [...groups].map(([day, evs]) => /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "u-agenda-group", children: [
2642
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "u-agenda-day", children: formatEventRange(day, null, true) }),
2643
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "u-agenda", children: evs.map((e, i) => item(e, i, false)) })
2644
- ] }, day)) });
2645
- }
2646
- function EventLegend({
2647
- kinds,
2648
- labels,
2649
- colors = EVENT_COLORS,
2650
- hidden,
2651
- onToggle,
2652
- className
2653
- }) {
2654
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-ev-legend", className), role: onToggle ? "group" : void 0, "aria-label": "Jenis kegiatan", children: kinds.map((k) => {
2655
- const off = hidden?.includes(k);
2656
- const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2657
- /* @__PURE__ */ jsxRuntime.jsx("i", { style: { background: colors[k] ?? "var(--u-primary)" }, "aria-hidden": true }),
2658
- labels?.[k] ?? k
2659
- ] });
2660
- return onToggle ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "u-ev-legend-item", "aria-pressed": !off, "data-off": dataFlag(off), onClick: () => onToggle(k), children: content }, k) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-ev-legend-item", children: content }, k);
2661
- }) });
2662
- }
2663
- function tanggal(d, relative) {
2664
- if (!d) return null;
2665
- const date = typeof d === "string" ? new Date(d.replace(" ", "T")) : d;
2666
- if (relative && Date.now() - date.getTime() < 7 * 864e5) return formatRelative(date);
2667
- return formatDate(date, "medium");
2668
- }
2669
- function NewsCard({ item, variant = "vertical", relativeDate = true, className, headingLevel = "h3" }) {
2670
- const H = headingLevel;
2671
- const tgl = tanggal(item.date, relativeDate);
2672
- const tone = item.category?.color ?? "var(--u-primary)";
2673
- return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: cn("u-news", className), "data-variant": variant, style: { "--tone": tone }, children: [
2674
- variant !== "minimal" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-news-media", children: item.image ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.image, alt: item.imageAlt ?? "", loading: "lazy", decoding: "async" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-news-placeholder", "aria-hidden": true }) }),
2675
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-news-body", children: [
2676
- (item.category || item.badge) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-news-eyebrow", children: [
2677
- item.category && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-news-cat", children: item.category.name }),
2678
- item.badge && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-news-badge", children: item.badge })
2679
- ] }),
2680
- /* @__PURE__ */ jsxRuntime.jsx(H, { className: "u-news-title", children: item.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: "u-news-link", children: item.title }) : item.title }),
2681
- item.excerpt && variant !== "minimal" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-news-excerpt", children: item.excerpt }),
2682
- (item.author || tgl || item.views != null) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-news-meta", children: [
2683
- item.author && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-news-author", children: item.author }),
2684
- tgl && /* @__PURE__ */ jsxRuntime.jsx("time", { dateTime: typeof item.date === "string" ? item.date : item.date?.toISOString(), children: tgl }),
2685
- item.views != null && /* @__PURE__ */ jsxRuntime.jsxs("span", { title: "Dilihat", children: [
2686
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { "aria-hidden": true }),
2687
- formatCompact(item.views)
2688
- ] })
2689
- ] })
2690
- ] })
2691
- ] });
2692
- }
2693
- function NewsCardSkeleton({ variant = "vertical" }) {
2694
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-news", "data-variant": variant, "aria-hidden": true, children: [
2695
- variant !== "minimal" && /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "u-news-media" }),
2696
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-news-body", children: [
2697
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 12, width: 72 } }),
2698
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 16, width: "92%" } }),
2699
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 16, width: "64%" } }),
2700
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 12, width: 120 } })
2701
- ] })
2702
- ] });
2703
- }
2704
- function NewsGrid({ items, layout = "grid", minColumn = 260, loading, skeletonCount = 6, empty, className }) {
2705
- const style = { "--min": `${minColumn}px` };
2706
- if (loading)
2707
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-news-grid", className), "data-layout": layout, style, "aria-busy": true, children: Array.from({ length: layout === "featured" ? 4 : skeletonCount }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(NewsCardSkeleton, { variant: layout === "list" || layout === "featured" && i > 0 ? "horizontal" : layout === "featured" ? "overlay" : "vertical" }, i)) });
2708
- if (!items.length) return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-agenda-empty", children: empty ?? "Belum ada berita." });
2709
- if (layout === "featured") {
2710
- const [first, ...rest] = items;
2711
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-news-wrap", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-news-grid", "data-layout": "featured", style, children: [
2712
- /* @__PURE__ */ jsxRuntime.jsx(NewsCard, { item: first, variant: "overlay", headingLevel: "h2" }),
2713
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-news-side", children: rest.slice(0, 4).map((it) => /* @__PURE__ */ jsxRuntime.jsx(NewsCard, { item: it, variant: "horizontal" }, it.id)) })
2714
- ] }) });
2715
- }
2716
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-news-grid", className), "data-layout": layout, style, children: items.map((it) => /* @__PURE__ */ jsxRuntime.jsx(NewsCard, { item: it, variant: layout === "list" ? "horizontal" : "vertical" }, it.id)) });
2717
- }
2718
- function RankedList({ items, loading, className }) {
2719
- return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("u-ranked", className), "aria-busy": loading || void 0, children: loading ? Array.from({ length: 5 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
2720
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-ranked-no", children: i + 1 }),
2721
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, display: "grid", gap: 6 }, children: [
2722
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 14 } }),
2723
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 12, width: "50%" } })
2724
- ] })
2725
- ] }, i)) : items.map((it, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
2726
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-ranked-no", children: i + 1 }),
2727
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-ranked-body", children: [
2728
- it.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: it.href, className: "u-ranked-title", children: it.title }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-ranked-title", children: it.title }),
2729
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-news-meta", children: [
2730
- it.category && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: it.category.color ?? void 0 }, children: it.category.name }),
2731
- it.views != null && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2732
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { "aria-hidden": true }),
2733
- formatCompact(it.views)
2734
- ] })
2735
- ] })
2736
- ] })
2737
- ] }, it.id)) });
2738
- }
2739
- var PRIORITAS = {
2740
- penting: "Penting",
2741
- darurat: "Darurat"
2742
- };
2743
- function AnnouncementList({ items, loading, className, empty }) {
2744
- if (loading)
2745
- return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("u-announce", className), "aria-busy": true, children: Array.from({ length: 4 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "u-announce-item", children: [
2746
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { width: 36, height: 36, borderRadius: 10 } }),
2747
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, display: "grid", gap: 6 }, children: [
2748
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 14, width: "80%" } }),
2749
- /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 12, width: "40%" } })
2750
- ] })
2751
- ] }, i)) });
2752
- if (!items.length) return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-agenda-empty", children: empty ?? "Belum ada pengumuman." });
2753
- return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("u-announce", className), children: items.map((a) => {
2754
- const Tag2 = a.href ? "a" : "div";
2755
- return /* @__PURE__ */ jsxRuntime.jsx("li", { className: "u-announce-item", "data-priority": a.priority ?? "biasa", "data-pinned": dataFlag(a.pinned), children: /* @__PURE__ */ jsxRuntime.jsxs(Tag2, { className: "u-announce-link", ...a.href ? { href: a.href } : {}, children: [
2756
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-announce-icon", "aria-hidden": true, children: a.pinned ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pin, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Megaphone, {}) }),
2757
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-announce-body", children: [
2758
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-announce-title", children: [
2759
- a.priority && PRIORITAS[a.priority] && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-announce-flag", children: PRIORITAS[a.priority] }),
2760
- a.title
2761
- ] }),
2762
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-news-meta", children: [
2763
- a.number && /* @__PURE__ */ jsxRuntime.jsx("span", { children: a.number }),
2764
- a.date && /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatDate(a.date.replace(" ", "T"), "medium") }),
2765
- a.until && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2766
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { "aria-hidden": true }),
2767
- "Berlaku s.d. ",
2768
- formatDate(a.until, "medium")
2769
- ] })
2770
- ] })
2771
- ] }),
2772
- a.href && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpRight, { className: "u-announce-arrow", "aria-hidden": true })
2773
- ] }) }, a.id);
2774
- }) });
2775
- }
2776
- var MODE = {
2777
- luring: "Luring",
2778
- daring: "Daring",
2779
- hibrida: "Hibrida"
2780
- };
2781
- var jam = (s) => s && s.length > 10 ? s.slice(11, 16).replace(":", ".") : null;
2782
- function EventCard({ item, variant = "row", className }) {
2783
- const j1 = jam(item.start);
2784
- const j2 = jam(item.end);
2785
- const beda = item.end && item.end.slice(0, 10) !== item.start.slice(0, 10);
2786
- return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: cn("u-event", className), "data-variant": variant, children: [
2787
- variant === "card" && item.image && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-news-media", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.image, alt: "", loading: "lazy" }) }),
2788
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-event-main", children: [
2789
- /* @__PURE__ */ jsxRuntime.jsx(DateTile, { date: item.start.slice(0, 10), size: variant === "card" ? "md" : "lg" }),
2790
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-event-body", children: [
2791
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "u-news-title", children: item.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: "u-news-link", children: item.title }) : item.title }),
2792
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-news-meta", children: [
2793
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2794
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { "aria-hidden": true }),
2795
- beda ? `${formatDate(item.start.slice(0, 10), "medium")} \u2013 ${formatDate(item.end.slice(0, 10), "medium")}` : item.allDay || !j1 ? "Sepanjang hari" : `${j1}${j2 ? `\u2013${j2}` : ""} WITA`
2796
- ] }),
2797
- item.location && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2798
- item.mode === "daring" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Video, { "aria-hidden": true }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPin, { "aria-hidden": true }),
2799
- item.location
2800
- ] }),
2801
- item.organizer && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2802
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { "aria-hidden": true }),
2803
- item.organizer
2804
- ] })
2805
- ] }),
2806
- (item.mode || item.registration) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-event-tags", children: [
2807
- item.mode && MODE[item.mode] && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-event-tag", "data-mode": item.mode, children: MODE[item.mode] }),
2808
- item.registration && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-event-tag", "data-mode": "daftar", children: "Pendaftaran dibuka" })
2809
- ] })
2810
- ] })
2811
- ] })
2812
- ] });
2813
- }
2814
- function Section({ eyebrow, title, description, href, linkLabel = "Lihat semua", actions, align = "start", className, children, ...props }) {
2815
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cn("u-section", className), "data-align": align, ...props, children: [
2816
- /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "u-section-head", children: [
2817
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-section-text", children: [
2818
- eyebrow && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-section-eyebrow", children: eyebrow }),
2819
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "u-section-title", children: title }),
2820
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-section-desc", children: description })
2821
- ] }),
2822
- (href || actions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-section-actions", children: [
2823
- actions,
2824
- href && /* @__PURE__ */ jsxRuntime.jsxs("a", { href, className: "u-section-link", children: [
2825
- linkLabel,
2826
- " ",
2827
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { "aria-hidden": true })
2828
- ] })
2829
- ] })
2830
- ] }),
2831
- children
2832
- ] });
2833
- }
2834
- function Hero({ eyebrow, title, description, actions, stats, media, image, variant = "split", announcement, className }) {
2835
- return /* @__PURE__ */ jsxRuntime.jsx("section", { className: cn("u-hero", className), "data-variant": variant, style: variant === "image" && image ? { "--hero-image": `url("${image}")` } : void 0, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-hero-grid", children: [
2836
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-hero-text", children: [
2837
- announcement && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-hero-announce", children: announcement }),
2838
- eyebrow && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-section-eyebrow", children: eyebrow }),
2839
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "u-hero-title", children: title }),
2840
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-hero-desc", children: description }),
2841
- actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-hero-actions", children: actions }),
2842
- stats && /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "u-hero-stats", children: stats.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2843
- /* @__PURE__ */ jsxRuntime.jsx("dt", { children: s.label }),
2844
- /* @__PURE__ */ jsxRuntime.jsx("dd", { children: s.value })
2845
- ] }, i)) })
2846
- ] }),
2847
- variant === "split" && (media || image) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-hero-media", children: media ?? /* @__PURE__ */ jsxRuntime.jsx("img", { src: image, alt: "" }) })
2848
- ] }) });
2849
- }
2850
1896
  function Wizard({
2851
1897
  steps,
2852
1898
  step: stepProp,
@@ -2897,7 +1943,7 @@ function Wizard({
2897
1943
  }
2898
1944
  };
2899
1945
  const pct = Math.round((step + 1) / steps.length * 100);
2900
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-wizard-wrap", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-wizard", children: [
1946
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk3O5ELKBH_cjs.cn("u-wizard-wrap", className), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-wizard", children: [
2901
1947
  /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "u-wizard-nav", children: [
2902
1948
  (title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-wizard-intro", children: [
2903
1949
  title && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-wizard-intro-title", children: title }),
@@ -2952,7 +1998,7 @@ function Wizard({
2952
1998
  ] }) });
2953
1999
  }
2954
2000
  function WizardReview({ sections, className }) {
2955
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-review", className), children: sections.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "u-review-section", "data-missing": dataFlag(!!s.missing), children: [
2001
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk3O5ELKBH_cjs.cn("u-review", className), children: sections.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "u-review-section", "data-missing": chunk3O5ELKBH_cjs.dataFlag(!!s.missing), children: [
2956
2002
  /* @__PURE__ */ jsxRuntime.jsxs("header", { children: [
2957
2003
  /* @__PURE__ */ jsxRuntime.jsx("h3", { children: s.title }),
2958
2004
  s.onEdit && /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "ghost", size: "sm", onClick: s.onEdit, children: [
@@ -2967,12 +2013,12 @@ function WizardReview({ sections, className }) {
2967
2013
  ] }),
2968
2014
  /* @__PURE__ */ jsxRuntime.jsx("dl", { children: s.items.map((it, j) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2969
2015
  /* @__PURE__ */ jsxRuntime.jsx("dt", { children: it.label }),
2970
- /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-empty": dataFlag(it.value == null || it.value === ""), children: it.value == null || it.value === "" ? "Belum diisi" : it.value })
2016
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { "data-empty": chunk3O5ELKBH_cjs.dataFlag(it.value == null || it.value === ""), children: it.value == null || it.value === "" ? "Belum diisi" : it.value })
2971
2017
  ] }, j)) })
2972
2018
  ] }, i)) });
2973
2019
  }
2974
2020
  function FormGrid({ children, columns = 2, className }) {
2975
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-form-grid", className), style: { "--cols": columns }, children });
2021
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk3O5ELKBH_cjs.cn("u-form-grid", className), style: { "--cols": columns }, children });
2976
2022
  }
2977
2023
  var CHART_COLORS = Array.from({ length: 8 }, (_, i) => `var(--u-chart-${i + 1})`);
2978
2024
  var chartColor = (i) => CHART_COLORS[i % CHART_COLORS.length];
@@ -3009,7 +2055,7 @@ function Sparkline({
3009
2055
  const pts = data.map((v, i) => [i / (data.length - 1) * (width - 4) + 2, height - 3 - (v - min) / span * (height - 6)]);
3010
2056
  const d = pts.map(([x, y], i) => `${i ? "L" : "M"}${x.toFixed(1)} ${y.toFixed(1)}`).join(" ");
3011
2057
  const last = pts[pts.length - 1];
3012
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: cn("u-spark", className), width, height, viewBox: `0 0 ${width} ${height}`, "aria-hidden": true, style: { color: tone }, children: [
2058
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: chunk3O5ELKBH_cjs.cn("u-spark", className), width, height, viewBox: `0 0 ${width} ${height}`, "aria-hidden": true, style: { color: tone }, children: [
3013
2059
  area && /* @__PURE__ */ jsxRuntime.jsx("path", { d: `${d} L${last[0]} ${height} L${pts[0][0]} ${height} Z`, fill: "currentColor", opacity: 0.12 }),
3014
2060
  /* @__PURE__ */ jsxRuntime.jsx("path", { d, fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }),
3015
2061
  /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: last[0], cy: last[1], r: 2.75, fill: "currentColor", stroke: "var(--u-card)", strokeWidth: 1.5 })
@@ -3019,7 +2065,7 @@ function StatCard({ label, value, delta, deltaLabel = "dari periode lalu", inver
3019
2065
  const arah = delta == null ? null : delta > 0 ? "naik" : delta < 0 ? "turun" : "tetap";
3020
2066
  const baik = arah === "tetap" || arah == null ? null : arah === "naik" !== !!inverse;
3021
2067
  const Tag2 = href ? "a" : "div";
3022
- return /* @__PURE__ */ jsxRuntime.jsxs(Tag2, { className: cn("u-stat", className), "data-tone": tone, ...href ? { href } : {}, children: [
2068
+ return /* @__PURE__ */ jsxRuntime.jsxs(Tag2, { className: chunk3O5ELKBH_cjs.cn("u-stat", className), "data-tone": tone, ...href ? { href } : {}, children: [
3023
2069
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-stat-top", children: [
3024
2070
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-stat-label", children: label }),
3025
2071
  icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-stat-icon", children: icon })
@@ -3063,7 +2109,7 @@ function StatGrid({ children, min = 200, className }) {
3063
2109
  ro.observe(el);
3064
2110
  return () => ro.disconnect();
3065
2111
  }, [min, n]);
3066
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("u-stat-grid", className), style: { "--min": `${min}px`, ...cols ? { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` } : {} }, children });
2112
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: chunk3O5ELKBH_cjs.cn("u-stat-grid", className), style: { "--min": `${min}px`, ...cols ? { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` } : {} }, children });
3067
2113
  }
3068
2114
  function BarChart({ data, height = 180, format, highlightLast, tone = "var(--u-primary)", labels = true, loading, className, ...aria }) {
3069
2115
  const tip = useTip();
@@ -3072,7 +2118,7 @@ function BarChart({ data, height = 180, format, highlightLast, tone = "var(--u-p
3072
2118
  const nice = niceMax(max);
3073
2119
  const imax = data.reduce((b, d, i) => d.value > data[b].value ? i : b, 0);
3074
2120
  const step = data.length > 16 ? Math.ceil(data.length / 8) : 1;
3075
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-bars", className), ref: tip.ref, role: "img", "aria-label": aria["aria-label"] ?? data.map((d) => `${d.title ?? d.label}: ${fmt(d.value, format)}`).join(", "), children: [
2121
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-bars", className), ref: tip.ref, role: "img", "aria-label": aria["aria-label"] ?? data.map((d) => `${d.title ?? d.label}: ${fmt(d.value, format)}`).join(", "), children: [
3076
2122
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-bars-plot", style: { height }, children: [
3077
2123
  [0, 0.5, 1].map((g) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-bars-grid", style: { bottom: `${g * 100}%` }, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: fmt(nice * g, format) }) }, g)),
3078
2124
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-bars-cols", children: data.map((d, i) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -3084,7 +2130,7 @@ function BarChart({ data, height = 180, format, highlightLast, tone = "var(--u-p
3084
2130
  onPointerLeave: tip.hide,
3085
2131
  onFocus: (e) => tip.show(e, /* @__PURE__ */ jsxRuntime.jsx(TipBody, { label: d.title ?? d.label, value: fmt(d.value, format) })),
3086
2132
  onBlur: tip.hide,
3087
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-bars-bar", "data-last": dataFlag(highlightLast && i === data.length - 1), style: { height: `${d.value / nice * 100}%`, background: tone }, children: labels && (i === imax || highlightLast && i === data.length - 1) && d.value > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-bars-val", children: fmt(d.value, format) }) })
2133
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-bars-bar", "data-last": chunk3O5ELKBH_cjs.dataFlag(highlightLast && i === data.length - 1), style: { height: `${d.value / nice * 100}%`, background: tone }, children: labels && (i === imax || highlightLast && i === data.length - 1) && d.value > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-bars-val", children: fmt(d.value, format) }) })
3088
2134
  },
3089
2135
  i
3090
2136
  )) })
@@ -3117,7 +2163,7 @@ function GroupedBarChart({
3117
2163
  return /* @__PURE__ */ jsxRuntime.jsxs(
3118
2164
  "div",
3119
2165
  {
3120
- className: cn("u-bars", className),
2166
+ className: chunk3O5ELKBH_cjs.cn("u-bars", className),
3121
2167
  ref: tip.ref,
3122
2168
  role: "img",
3123
2169
  "aria-label": labels.map((l, i) => `${titles?.[i] ?? l}: ${series.map((s) => `${s.label} ${fmt(s.values[i], format)}`).join(", ")}`).join("; "),
@@ -3180,7 +2226,7 @@ function LineChart({
3180
2226
  return /* @__PURE__ */ jsxRuntime.jsxs(
3181
2227
  "div",
3182
2228
  {
3183
- className: cn("u-line", className),
2229
+ className: chunk3O5ELKBH_cjs.cn("u-line", className),
3184
2230
  ref: tip.ref,
3185
2231
  role: "img",
3186
2232
  "aria-label": series.map(
@@ -3250,11 +2296,11 @@ function BarList({
3250
2296
  className
3251
2297
  }) {
3252
2298
  if (loading)
3253
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-barlist", className), children: Array.from({ length: 4 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 28, width: `${90 - i * 15}%` } }, i)) });
2299
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk3O5ELKBH_cjs.cn("u-barlist", className), children: Array.from({ length: 4 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 28, width: `${90 - i * 15}%` } }, i)) });
3254
2300
  const list = limit ? items.slice(0, limit) : items;
3255
2301
  if (!list.length) return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-chart-empty", children: empty });
3256
2302
  const max = maxProp ?? Math.max(1, ...list.map((i) => i.value));
3257
- return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("u-barlist", className), children: list.map((it, i) => {
2303
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: chunk3O5ELKBH_cjs.cn("u-barlist", className), children: list.map((it, i) => {
3258
2304
  const Tag2 = it.href ? "a" : "div";
3259
2305
  return /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
3260
2306
  /* @__PURE__ */ jsxRuntime.jsxs(Tag2, { className: "u-barlist-row", ...it.href ? { href: it.href } : {}, children: [
@@ -3281,7 +2327,7 @@ function DonutChart({
3281
2327
  }) {
3282
2328
  const tip = useTip();
3283
2329
  if (loading)
3284
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-donut", className), children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { shape: "circle", style: { width: size, height: size } }) });
2330
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk3O5ELKBH_cjs.cn("u-donut", className), children: /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { shape: "circle", style: { width: size, height: size } }) });
3285
2331
  const sorted = data.filter((d) => d.value > 0);
3286
2332
  let segs = sorted;
3287
2333
  if (sorted.length > maxSegments) {
@@ -3294,7 +2340,7 @@ function DonutChart({
3294
2340
  const c = 2 * Math.PI * r;
3295
2341
  const gap = segs.length > 1 ? 2 : 0;
3296
2342
  let acc = 0;
3297
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-donut", className), ref: tip.ref, children: [
2343
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-donut", className), ref: tip.ref, children: [
3298
2344
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-donut-ring", style: { width: size, height: size }, children: [
3299
2345
  /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, role: "img", "aria-label": segs.map((s) => `${s.label}: ${fmt(s.value, format)}`).join(", "), children: [
3300
2346
  /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: size / 2, cy: size / 2, r, fill: "none", stroke: "var(--u-muted)", strokeWidth: thickness }),
@@ -3342,7 +2388,7 @@ function SegmentBar({ data, format, className }) {
3342
2388
  const tip = useTip();
3343
2389
  const segs = data.filter((d) => d.value > 0);
3344
2390
  const total = segs.reduce((s, d) => s + d.value, 0);
3345
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-segbar", className), ref: tip.ref, children: [
2391
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-segbar", className), ref: tip.ref, children: [
3346
2392
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-segbar-track", role: "img", "aria-label": segs.map((s) => `${s.label}: ${fmt(s.value, format)}`).join(", "), children: segs.map((s, i) => /* @__PURE__ */ jsxRuntime.jsx(
3347
2393
  "span",
3348
2394
  {
@@ -3362,9 +2408,9 @@ function SegmentBar({ data, format, className }) {
3362
2408
  }
3363
2409
  function Funnel({ stages, format, loading, className }) {
3364
2410
  if (loading)
3365
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-funnel", className), children: Array.from({ length: 4 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 40, width: `${100 - i * 18}%` } }, i)) });
2411
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk3O5ELKBH_cjs.cn("u-funnel", className), children: Array.from({ length: 4 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 40, width: `${100 - i * 18}%` } }, i)) });
3366
2412
  const top = Math.max(1, stages[0]?.value ?? 1);
3367
- return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("u-funnel", className), children: stages.map((s, i) => {
2413
+ return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: chunk3O5ELKBH_cjs.cn("u-funnel", className), children: stages.map((s, i) => {
3368
2414
  const prev = i > 0 ? stages[i - 1].value : null;
3369
2415
  const conv = prev ? Math.round(s.value / prev * 100) : null;
3370
2416
  return /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
@@ -3391,7 +2437,7 @@ function BudgetMeter({
3391
2437
  const p = (n) => target > 0 ? Math.min(100, n / target * 100) : 0;
3392
2438
  const pct = target > 0 ? used / target * 100 : 0;
3393
2439
  const sisa = Math.max(0, target - used - pending);
3394
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("u-budget", className), children: [
2440
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-budget", className), children: [
3395
2441
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-budget-head", children: [
3396
2442
  label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-budget-label", children: label }),
3397
2443
  /* @__PURE__ */ jsxRuntime.jsxs("b", { children: [
@@ -3429,7 +2475,7 @@ function BudgetMeter({
3429
2475
  ] });
3430
2476
  }
3431
2477
  function CycleSteps({ steps, className }) {
3432
- return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("u-cycle", className), children: steps.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { "data-done": dataFlag(s.done), children: [
2478
+ return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: chunk3O5ELKBH_cjs.cn("u-cycle", className), children: steps.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { "data-done": chunk3O5ELKBH_cjs.dataFlag(s.done), children: [
3433
2479
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-cycle-mark", "aria-hidden": true, children: s.done ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, {}) : i + 1 }),
3434
2480
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-cycle-label", children: [
3435
2481
  s.label,
@@ -3438,7 +2484,7 @@ function CycleSteps({ steps, className }) {
3438
2484
  s.detail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-cycle-detail", children: s.detail })
3439
2485
  ] }, i)) });
3440
2486
  }
3441
- function Panel2({
2487
+ function Panel({
3442
2488
  title,
3443
2489
  description,
3444
2490
  actions,
@@ -3446,7 +2492,7 @@ function Panel2({
3446
2492
  className,
3447
2493
  span
3448
2494
  }) {
3449
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: cn("u-panel", className), "data-span": span, children: [
2495
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: chunk3O5ELKBH_cjs.cn("u-panel", className), "data-span": span, children: [
3450
2496
  (title || actions) && /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "u-panel-head", children: [
3451
2497
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3452
2498
  title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "u-panel-title", children: title }),
@@ -3458,11 +2504,11 @@ function Panel2({
3458
2504
  ] });
3459
2505
  }
3460
2506
  function DashboardGrid({ children, className }) {
3461
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-dash-wrap", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-dash", children }) });
2507
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk3O5ELKBH_cjs.cn("u-dash-wrap", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-dash", children }) });
3462
2508
  }
3463
2509
  function ActionList({ items, loading, className }) {
3464
2510
  if (loading) return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className, style: { height: items.length * 44 || 132 } });
3465
- return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("u-actions-list", className), children: items.map((it, i) => {
2511
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: chunk3O5ELKBH_cjs.cn("u-actions-list", className), children: items.map((it, i) => {
3466
2512
  const tone = it.tone ?? (it.count > 0 ? "warning" : "neutral");
3467
2513
  const isi = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3468
2514
  it.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-actions-icon", "aria-hidden": true, children: it.icon }),
@@ -3472,14 +2518,14 @@ function ActionList({ items, loading, className }) {
3472
2518
  ] }),
3473
2519
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-actions-count", "data-tone": it.count > 0 ? tone : "neutral", children: formatNumber(it.count) })
3474
2520
  ] });
3475
- return /* @__PURE__ */ jsxRuntime.jsx("li", { "data-zero": dataFlag(it.count === 0), children: it.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: it.href, className: "u-actions-row", children: isi }) : it.onClick ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "u-actions-row", onClick: it.onClick, children: isi }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-actions-row", children: isi }) }, it.key ?? i);
2521
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { "data-zero": chunk3O5ELKBH_cjs.dataFlag(it.count === 0), children: it.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: it.href, className: "u-actions-row", children: isi }) : it.onClick ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "u-actions-row", onClick: it.onClick, children: isi }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-actions-row", children: isi }) }, it.key ?? i);
3476
2522
  }) });
3477
2523
  }
3478
2524
  function ActivityFeed({ items, loading, empty = "Belum ada aktivitas.", className }) {
3479
2525
  if (loading)
3480
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("u-feed", className), children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 40 } }, i)) });
2526
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk3O5ELKBH_cjs.cn("u-feed", className), children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { style: { height: 40 } }, i)) });
3481
2527
  if (!items.length) return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "u-chart-empty", children: empty });
3482
- return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: cn("u-feed", className), children: items.map((it) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
2528
+ return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: chunk3O5ELKBH_cjs.cn("u-feed", className), children: items.map((it) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
3483
2529
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-feed-icon", "aria-hidden": true, children: it.icon ?? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-feed-dot" }) }),
3484
2530
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "u-feed-body", children: [
3485
2531
  it.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: it.href, className: "u-feed-title", children: it.title }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-feed-title", children: it.title }),
@@ -3491,19 +2537,113 @@ function ActivityFeed({ items, loading, empty = "Belum ada aktivitas.", classNam
3491
2537
  ] })
3492
2538
  ] }, it.id)) });
3493
2539
  }
2540
+ var keDate = (d) => d == null || d === "" ? null : d instanceof Date ? d : new Date(typeof d === "string" ? d.replace(" ", "T") : d);
2541
+ function sisaWaktu(sampai, kini) {
2542
+ const ms = sampai.getTime() - kini.getTime();
2543
+ if (ms <= 0) return "sebentar lagi";
2544
+ const m = Math.ceil(ms / 6e4);
2545
+ if (m < 60) return `sekitar ${m} menit lagi`;
2546
+ const j = Math.floor(m / 60);
2547
+ const sm = m % 60;
2548
+ return `sekitar ${j} jam${sm ? ` ${sm} menit` : ""} lagi`;
2549
+ }
2550
+ function useKini(ms = 3e4) {
2551
+ const [kini, setKini] = React2__namespace.useState(() => /* @__PURE__ */ new Date());
2552
+ React2__namespace.useEffect(() => {
2553
+ const t = setInterval(() => setKini(/* @__PURE__ */ new Date()), ms);
2554
+ return () => clearInterval(t);
2555
+ }, [ms]);
2556
+ return kini;
2557
+ }
2558
+ function ModePemeliharaan({ title = "Sedang ada pemeliharaan", message = "Kami sedang memperbarui sistem agar lebih cepat dan aman. Data Anda tetap aman; silakan kembali sebentar lagi.", until, onRetry, autoRetry = true, logo, footer, variant = "page", className }) {
2559
+ const kini = useKini(15e3);
2560
+ const selesai = keDate(until);
2561
+ const [sibuk, setSibuk] = React2__namespace.useState(false);
2562
+ const coba = React2__namespace.useCallback(async () => {
2563
+ if (!onRetry) return;
2564
+ setSibuk(true);
2565
+ try {
2566
+ await onRetry();
2567
+ } finally {
2568
+ setSibuk(false);
2569
+ }
2570
+ }, [onRetry]);
2571
+ const lewat = Boolean(selesai && kini >= selesai);
2572
+ React2__namespace.useEffect(() => {
2573
+ if (autoRetry && lewat) void coba();
2574
+ }, [autoRetry, lewat]);
2575
+ return /* @__PURE__ */ jsxRuntime.jsx("main", { className: chunk3O5ELKBH_cjs.cn("u-pemeliharaan", className), "data-variant": variant, role: "status", "aria-live": "polite", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "u-pemeliharaan-kartu", children: [
2576
+ logo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-pemeliharaan-logo", children: logo }),
2577
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "u-pemeliharaan-ikon", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wrench, {}) }),
2578
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { children: title }),
2579
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: message }),
2580
+ selesai && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "u-pemeliharaan-waktu", children: [
2581
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarClock, { "aria-hidden": true }),
2582
+ "Perkiraan selesai ",
2583
+ formatDate(selesai, "medium") === formatDate(kini, "medium") ? "" : `${formatDate(selesai, "medium")} `,
2584
+ "pukul ",
2585
+ formatTime(selesai),
2586
+ " (",
2587
+ sisaWaktu(selesai, kini),
2588
+ ")"
2589
+ ] }),
2590
+ onRetry && /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", onClick: coba, loading: sibuk, children: [
2591
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, {}),
2592
+ " Coba lagi"
2593
+ ] }),
2594
+ footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "u-pemeliharaan-kaki", children: footer })
2595
+ ] }) });
2596
+ }
2597
+ function BannerPemeliharaan({ start, end, message, showHoursBefore = 48, dismissible = true, className }) {
2598
+ const kini = useKini(6e4);
2599
+ const mulai = keDate(start);
2600
+ const selesai = keDate(end);
2601
+ const kunci = `u-pemeliharaan:${mulai.toISOString()}`;
2602
+ const [tutup, setTutup] = React2__namespace.useState(false);
2603
+ React2__namespace.useEffect(() => {
2604
+ try {
2605
+ setTutup(localStorage.getItem(kunci) === "1");
2606
+ } catch {
2607
+ }
2608
+ }, [kunci]);
2609
+ const tampil = kini.getTime() >= mulai.getTime() - showHoursBefore * 36e5 && (!selesai || kini < selesai) && !tutup;
2610
+ if (!tampil) return null;
2611
+ const berjalan = kini >= mulai;
2612
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk3O5ELKBH_cjs.cn("u-banner-pemeliharaan", className), "data-berjalan": berjalan || void 0, role: "status", children: [
2613
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wrench, { "aria-hidden": true }),
2614
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
2615
+ /* @__PURE__ */ jsxRuntime.jsx("b", { children: berjalan ? "Pemeliharaan sedang berjalan." : "Pemeliharaan terjadwal." }),
2616
+ " ",
2617
+ message ?? `${berjalan ? "Beberapa fitur mungkin tidak tersedia" : `Layanan tidak tersedia ${formatDate(mulai, "medium")} pukul ${formatTime(mulai)}`}${selesai ? ` sampai ${formatDate(selesai, "medium") === formatDate(mulai, "medium") ? "" : `${formatDate(selesai, "medium")} `}pukul ${formatTime(selesai)}` : ""}.`
2618
+ ] }),
2619
+ dismissible && /* @__PURE__ */ jsxRuntime.jsx(
2620
+ Button,
2621
+ {
2622
+ variant: "ghost",
2623
+ size: "sm",
2624
+ iconOnly: true,
2625
+ "aria-label": "Tutup pengumuman",
2626
+ onClick: () => {
2627
+ setTutup(true);
2628
+ try {
2629
+ localStorage.setItem(kunci, "1");
2630
+ } catch {
2631
+ }
2632
+ },
2633
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {})
2634
+ }
2635
+ )
2636
+ ] });
2637
+ }
3494
2638
 
3495
- exports.APP_COLORS = APP_COLORS;
3496
- exports.APP_GLYPHS = APP_GLYPHS;
3497
2639
  exports.Accordion = Accordion;
3498
2640
  exports.ActionList = ActionList;
3499
2641
  exports.ActivityFeed = ActivityFeed;
3500
- exports.AgendaList = AgendaList;
3501
2642
  exports.Alert = Alert;
3502
- exports.AnnouncementList = AnnouncementList;
3503
- exports.AppLogo = AppLogo;
3504
2643
  exports.Avatar = Avatar;
3505
2644
  exports.AvatarGroup = AvatarGroup;
3506
2645
  exports.Badge = Badge;
2646
+ exports.BannerPemeliharaan = BannerPemeliharaan;
3507
2647
  exports.BarChart = BarChart;
3508
2648
  exports.BarList = BarList;
3509
2649
  exports.Breadcrumb = Breadcrumb;
@@ -3532,19 +2672,13 @@ exports.CycleSteps = CycleSteps;
3532
2672
  exports.DashboardGrid = DashboardGrid;
3533
2673
  exports.DataTable = DataTable;
3534
2674
  exports.DatePicker = DatePicker;
3535
- exports.DateTile = DateTile;
3536
2675
  exports.DescriptionList = DescriptionList;
3537
2676
  exports.Dialog = Dialog;
3538
2677
  exports.DialogClose = DialogClose;
3539
2678
  exports.DonutChart = DonutChart;
3540
2679
  exports.Dropzone = Dropzone;
3541
- exports.EVENT_COLORS = EVENT_COLORS;
3542
2680
  exports.Empty = Empty;
3543
- exports.EventCalendar = EventCalendar;
3544
- exports.EventCard = EventCard;
3545
- exports.EventLegend = EventLegend;
3546
2681
  exports.FacetFilter = FacetFilter;
3547
- exports.Faq = Faq;
3548
2682
  exports.Field = Field;
3549
2683
  exports.FieldControl = FieldControl;
3550
2684
  exports.FieldDescription = FieldDescription;
@@ -3555,40 +2689,30 @@ exports.FilterBar = FilterBar;
3555
2689
  exports.FormGrid = FormGrid;
3556
2690
  exports.Funnel = Funnel;
3557
2691
  exports.GroupedBarChart = GroupedBarChart;
3558
- exports.Hero = Hero;
3559
2692
  exports.InlineCode = InlineCode;
3560
2693
  exports.Input = Input;
3561
2694
  exports.InputGroup = InputGroup;
3562
2695
  exports.Kbd = Kbd;
3563
2696
  exports.KodeLaporan = KodeLaporan;
3564
2697
  exports.Label = Label;
3565
- exports.LatencyIndicator = LatencyIndicator;
3566
2698
  exports.LineChart = LineChart;
3567
2699
  exports.Menu = Menu;
3568
- exports.Navbar = Navbar;
3569
- exports.NewsCard = NewsCard;
3570
- exports.NewsCardSkeleton = NewsCardSkeleton;
3571
- exports.NewsGrid = NewsGrid;
2700
+ exports.ModePemeliharaan = ModePemeliharaan;
3572
2701
  exports.NumberField = NumberField;
3573
2702
  exports.OptionContent = OptionContent;
3574
2703
  exports.OtpField = OtpField;
3575
2704
  exports.Pagination = Pagination;
3576
- exports.Panel = Panel2;
2705
+ exports.Panel = Panel;
3577
2706
  exports.Popover = Popover;
3578
2707
  exports.Progress = Progress;
3579
2708
  exports.ProgressRing = ProgressRing;
3580
2709
  exports.Radio = Radio;
3581
2710
  exports.RadioGroup = RadioGroup;
3582
- exports.RankedList = RankedList;
3583
2711
  exports.ScrollArea = ScrollArea;
3584
- exports.Section = Section;
3585
2712
  exports.SegmentBar = SegmentBar;
3586
2713
  exports.SegmentedControl = SegmentedControl;
3587
2714
  exports.Select = Select;
3588
2715
  exports.Separator = Separator;
3589
- exports.ServiceList = ServiceList;
3590
- exports.ServiceStatusBadge = ServiceStatusBadge;
3591
- exports.ServiceStatusPanel = ServiceStatusPanel;
3592
2716
  exports.Sheet = Sheet;
3593
2717
  exports.Skeleton = Skeleton;
3594
2718
  exports.Slider = Slider;
@@ -3597,7 +2721,6 @@ exports.Sparkline = Sparkline;
3597
2721
  exports.Spinner = Spinner;
3598
2722
  exports.StatCard = StatCard;
3599
2723
  exports.StatGrid = StatGrid;
3600
- exports.StatusBanner = StatusBanner;
3601
2724
  exports.Stepper = Stepper;
3602
2725
  exports.Switch = Switch;
3603
2726
  exports.Table = Table;
@@ -3610,22 +2733,15 @@ exports.Toggle = Toggle;
3610
2733
  exports.ToggleGroup = ToggleGroup;
3611
2734
  exports.Tooltip = Tooltip;
3612
2735
  exports.TooltipProvider = TooltipProvider;
3613
- exports.UnipoAppLogo = UnipoAppLogo;
3614
- exports.UnipoMark = UnipoMark;
3615
- exports.UptimeBar = UptimeBar;
3616
2736
  exports.VisuallyHidden = VisuallyHidden;
3617
2737
  exports.Wizard = Wizard;
3618
2738
  exports.WizardReview = WizardReview;
3619
2739
  exports.chartColor = chartColor;
3620
- exports.cn = cn;
3621
- exports.dataFlag = dataFlag;
3622
- exports.eventColor = eventColor;
3623
- exports.eventsByDay = eventsByDay;
2740
+ exports.deteksiPlatform = deteksiPlatform;
3624
2741
  exports.filterToQuery = filterToQuery;
3625
2742
  exports.formatBytes = formatBytes;
3626
2743
  exports.formatCompact = formatCompact;
3627
2744
  exports.formatDate = formatDate;
3628
- exports.formatEventRange = formatEventRange;
3629
2745
  exports.formatNumber = formatNumber;
3630
2746
  exports.formatPersen = formatPersen;
3631
2747
  exports.formatRelative = formatRelative;
@@ -3635,14 +2751,15 @@ exports.formatTime = formatTime;
3635
2751
  exports.hueFromString = hueFromString;
3636
2752
  exports.initials = initials;
3637
2753
  exports.monthMatrix = monthMatrix;
3638
- exports.overallStatus = overallStatus;
3639
2754
  exports.parseISODate = parseISODate;
2755
+ exports.platformSekarang = platformSekarang;
3640
2756
  exports.requestIdDari = requestIdDari;
2757
+ exports.setelPlatform = setelPlatform;
3641
2758
  exports.toISODate = toISODate;
3642
2759
  exports.tokenize = tokenize;
3643
2760
  exports.useCopy = useCopy;
3644
2761
  exports.useFilterParams = useFilterParams;
3645
- exports.useServiceChecks = useServiceChecks;
2762
+ exports.usePlatform = usePlatform;
3646
2763
  exports.useToast = useToast;
3647
- //# sourceMappingURL=chunk-DEF5CA7C.cjs.map
3648
- //# sourceMappingURL=chunk-DEF5CA7C.cjs.map
2764
+ //# sourceMappingURL=chunk-5VNCBW4R.cjs.map
2765
+ //# sourceMappingURL=chunk-5VNCBW4R.cjs.map