@blockbite/ui 2.0.20 → 2.0.22

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 (45) hide show
  1. package/dist/AutocompleteDropdown.d.ts +2 -3
  2. package/dist/Badge.d.ts +1 -2
  3. package/dist/BitePreview.d.ts +1 -2
  4. package/dist/Button.d.ts +1 -2
  5. package/dist/ButtonToggle.d.ts +8 -5
  6. package/dist/Chapter.d.ts +1 -2
  7. package/dist/ChapterDivider.d.ts +1 -2
  8. package/dist/Checkbox.d.ts +1 -2
  9. package/dist/DataItemList.d.ts +1 -2
  10. package/dist/DisappearingMessage.d.ts +1 -2
  11. package/dist/DropdownPicker.d.ts +4 -3
  12. package/dist/EmptyState.d.ts +1 -2
  13. package/dist/FloatingPanel.d.ts +1 -2
  14. package/dist/FocalPointControl.d.ts +1 -2
  15. package/dist/Icon.d.ts +2 -3
  16. package/dist/LinkPicker.d.ts +1 -2
  17. package/dist/MediaPicker.d.ts +1 -2
  18. package/dist/MetricsControl.d.ts +2 -3
  19. package/dist/Modal.d.ts +1 -6
  20. package/dist/NewWindowPortal.d.ts +1 -2
  21. package/dist/Notice.d.ts +1 -2
  22. package/dist/PasswordInput.d.ts +1 -2
  23. package/dist/Popover.d.ts +0 -1
  24. package/dist/ProjectsNavigation.d.ts +1 -2
  25. package/dist/RangeSlider.d.ts +1 -2
  26. package/dist/ResponsiveImage.d.ts +1 -2
  27. package/dist/ResponsiveVideo.d.ts +1 -2
  28. package/dist/ScrollList.d.ts +0 -1
  29. package/dist/SelectControlWrapper.d.ts +2 -3
  30. package/dist/SingleBlockTypeAppender.d.ts +1 -2
  31. package/dist/SlideIn.d.ts +1 -2
  32. package/dist/Spinner.d.ts +1 -2
  33. package/dist/Tabs.d.ts +6 -7
  34. package/dist/Tag.d.ts +1 -2
  35. package/dist/TextControl.d.ts +1 -18
  36. package/dist/TextControlLabel.d.ts +1 -2
  37. package/dist/ToggleGroup.d.ts +1 -2
  38. package/dist/ToggleSwitch.d.ts +1 -2
  39. package/dist/Wrap.d.ts +1 -2
  40. package/dist/global.d.ts +0 -0
  41. package/dist/index.js +1345 -3366
  42. package/dist/index.js.map +1 -1
  43. package/dist/react-shim.d.ts +19 -0
  44. package/dist/ui.css +1 -1
  45. package/package.json +10 -7
package/dist/index.js CHANGED
@@ -1,2888 +1,918 @@
1
- import { Button as ye, Dropdown as pn, TextControl as rt, CheckboxControl as vn, DropdownMenu as mn, FocalPointPicker as hn, PanelRow as yn, Popover as bn, RangeControl as gn, Modal as xn, Notice as _n, __experimentalInputControl as jn, __experimentalInputControlSuffixWrapper as Cn, SelectControl as wn, Spinner as En, TabPanel as Rn, __experimentalToggleGroupControl as Sn, __experimentalToggleGroupControlOptionIcon as kn, __experimentalToggleGroupControlOption as Tn, ToggleControl as On } from "@wordpress/components";
2
- import { memo as tt, useState as F, useEffect as G, useCallback as Mt, useRef as lr, createPortal as Bt, forwardRef as Pn, createContext as Wt, useContext as nt, Children as Rr, isValidElement as Sr, useMemo as Nn } from "@wordpress/element";
3
- import { Plus as An, Trash as In, ChevronDown as Dn, Cross2 as $n, Tailwind as Fn, Percentage as Ln, Grid as Mn, Desktop as Bn, Slider as Wn, ColumnSpacing as Un, Pencil1 as Vn } from "@blockbite/icons";
4
- import Yn from "@wordpress/api-fetch";
5
- import { __ as Me } from "@wordpress/i18n";
6
- import { MediaUploadCheck as Qr, MediaUpload as Pt } from "@wordpress/block-editor";
7
- import { SVG as zn, Path as Hn } from "@wordpress/primitives";
8
- import { createBlock as qn } from "@wordpress/blocks";
9
- function Gn(o) {
10
- return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
1
+ import { Button as C, Dropdown as X, TextControl as B, CheckboxControl as Y, DropdownMenu as J, FocalPointPicker as Q, PanelRow as ee, Popover as te, RangeControl as ae, __experimentalInputControl as O, __experimentalInputControlSuffixWrapper as z, Modal as le, Notice as ne, SelectControl as re, Spinner as ce, TabPanel as se, __experimentalToggleGroupControl as oe, __experimentalToggleGroupControlOptionIcon as ie, __experimentalToggleGroupControlOption as me, ToggleControl as ue } from "@wordpress/components";
2
+ import { memo as V, useCallback as j, useState as g, useEffect as R, useRef as y, createPortal as D, forwardRef as de, createContext as A, useContext as P, Children as _, isValidElement as L, useMemo as fe } from "@wordpress/element";
3
+ import pe from "@wordpress/api-fetch";
4
+ import { __ as w } from "@wordpress/i18n";
5
+ import { MediaUploadCheck as T, MediaUpload as $ } from "@wordpress/block-editor";
6
+ import { SVG as ge, Path as Re } from "@wordpress/primitives";
7
+ import { createBlock as Ee } from "@wordpress/blocks";
8
+ function he(e) {
9
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
11
10
  }
12
- var kr = { exports: {} }, or = {}, Tr = { exports: {} }, N = {};
13
- /**
14
- * @license React
15
- * react.production.min.js
16
- *
17
- * Copyright (c) Facebook, Inc. and its affiliates.
18
- *
19
- * This source code is licensed under the MIT license found in the
20
- * LICENSE file in the root directory of this source tree.
21
- */
22
- var Nt;
23
- function Kn() {
24
- if (Nt) return N;
25
- Nt = 1;
26
- var o = Symbol.for("react.element"), a = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), h = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), p = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), _ = Symbol.iterator;
27
- function O(s) {
28
- return s === null || typeof s != "object" ? null : (s = _ && s[_] || s["@@iterator"], typeof s == "function" ? s : null);
29
- }
30
- var T = { isMounted: function() {
31
- return !1;
32
- }, enqueueForceUpdate: function() {
33
- }, enqueueReplaceState: function() {
34
- }, enqueueSetState: function() {
35
- } }, k = Object.assign, ae = {};
36
- function de(s, y, I) {
37
- this.props = s, this.context = y, this.refs = ae, this.updater = I || T;
38
- }
39
- de.prototype.isReactComponent = {}, de.prototype.setState = function(s, y) {
40
- if (typeof s != "object" && typeof s != "function" && s != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
41
- this.updater.enqueueSetState(this, s, y, "setState");
42
- }, de.prototype.forceUpdate = function(s) {
43
- this.updater.enqueueForceUpdate(this, s, "forceUpdate");
44
- };
45
- function A() {
46
- }
47
- A.prototype = de.prototype;
48
- function Y(s, y, I) {
49
- this.props = s, this.context = y, this.refs = ae, this.updater = I || T;
50
- }
51
- var ge = Y.prototype = new A();
52
- ge.constructor = Y, k(ge, de.prototype), ge.isPureReactComponent = !0;
53
- var K = Array.isArray, X = Object.prototype.hasOwnProperty, ie = { current: null }, pe = { key: !0, ref: !0, __self: !0, __source: !0 };
54
- function je(s, y, I) {
55
- var $, M = {}, J = null, H = null;
56
- if (y != null) for ($ in y.ref !== void 0 && (H = y.ref), y.key !== void 0 && (J = "" + y.key), y) X.call(y, $) && !pe.hasOwnProperty($) && (M[$] = y[$]);
57
- var z = arguments.length - 2;
58
- if (z === 1) M.children = I;
59
- else if (1 < z) {
60
- for (var U = Array(z), oe = 0; oe < z; oe++) U[oe] = arguments[oe + 2];
61
- M.children = U;
62
- }
63
- if (s && s.defaultProps) for ($ in z = s.defaultProps, z) M[$] === void 0 && (M[$] = z[$]);
64
- return { $$typeof: o, type: s, key: J, ref: H, props: M, _owner: ie.current };
65
- }
66
- function Te(s, y) {
67
- return { $$typeof: o, type: s.type, key: y, ref: s.ref, props: s.props, _owner: s._owner };
68
- }
69
- function Oe(s) {
70
- return typeof s == "object" && s !== null && s.$$typeof === o;
71
- }
72
- function Je(s) {
73
- var y = { "=": "=0", ":": "=2" };
74
- return "$" + s.replace(/[=:]/g, function(I) {
75
- return y[I];
76
- });
77
- }
78
- var Pe = /\/+/g;
79
- function ve(s, y) {
80
- return typeof s == "object" && s !== null && s.key != null ? Je("" + s.key) : y.toString(36);
81
- }
82
- function me(s, y, I, $, M) {
83
- var J = typeof s;
84
- (J === "undefined" || J === "boolean") && (s = null);
85
- var H = !1;
86
- if (s === null) H = !0;
87
- else switch (J) {
88
- case "string":
89
- case "number":
90
- H = !0;
91
- break;
92
- case "object":
93
- switch (s.$$typeof) {
94
- case o:
95
- case a:
96
- H = !0;
97
- }
98
- }
99
- if (H) return H = s, M = M(H), s = $ === "" ? "." + ve(H, 0) : $, K(M) ? (I = "", s != null && (I = s.replace(Pe, "$&/") + "/"), me(M, y, I, "", function(oe) {
100
- return oe;
101
- })) : M != null && (Oe(M) && (M = Te(M, I + (!M.key || H && H.key === M.key ? "" : ("" + M.key).replace(Pe, "$&/") + "/") + s)), y.push(M)), 1;
102
- if (H = 0, $ = $ === "" ? "." : $ + ":", K(s)) for (var z = 0; z < s.length; z++) {
103
- J = s[z];
104
- var U = $ + ve(J, z);
105
- H += me(J, y, I, U, M);
106
- }
107
- else if (U = O(s), typeof U == "function") for (s = U.call(s), z = 0; !(J = s.next()).done; ) J = J.value, U = $ + ve(J, z++), H += me(J, y, I, U, M);
108
- else if (J === "object") throw y = String(s), Error("Objects are not valid as a React child (found: " + (y === "[object Object]" ? "object with keys {" + Object.keys(s).join(", ") + "}" : y) + "). If you meant to render a collection of children, use an array instead.");
109
- return H;
110
- }
111
- function le(s, y, I) {
112
- if (s == null) return s;
113
- var $ = [], M = 0;
114
- return me(s, $, "", "", function(J) {
115
- return y.call(I, J, M++);
116
- }), $;
117
- }
118
- function be(s) {
119
- if (s._status === -1) {
120
- var y = s._result;
121
- y = y(), y.then(function(I) {
122
- (s._status === 0 || s._status === -1) && (s._status = 1, s._result = I);
123
- }, function(I) {
124
- (s._status === 0 || s._status === -1) && (s._status = 2, s._result = I);
125
- }), s._status === -1 && (s._status = 0, s._result = y);
126
- }
127
- if (s._status === 1) return s._result.default;
128
- throw s._result;
129
- }
130
- var E = { current: null }, xe = { transition: null }, Ne = { ReactCurrentDispatcher: E, ReactCurrentBatchConfig: xe, ReactCurrentOwner: ie };
131
- function Ce() {
132
- throw Error("act(...) is not supported in production builds of React.");
133
- }
134
- return N.Children = { map: le, forEach: function(s, y, I) {
135
- le(s, function() {
136
- y.apply(this, arguments);
137
- }, I);
138
- }, count: function(s) {
139
- var y = 0;
140
- return le(s, function() {
141
- y++;
142
- }), y;
143
- }, toArray: function(s) {
144
- return le(s, function(y) {
145
- return y;
146
- }) || [];
147
- }, only: function(s) {
148
- if (!Oe(s)) throw Error("React.Children.only expected to receive a single React element child.");
149
- return s;
150
- } }, N.Component = de, N.Fragment = u, N.Profiler = d, N.PureComponent = Y, N.StrictMode = l, N.Suspense = g, N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Ne, N.act = Ce, N.cloneElement = function(s, y, I) {
151
- if (s == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + s + ".");
152
- var $ = k({}, s.props), M = s.key, J = s.ref, H = s._owner;
153
- if (y != null) {
154
- if (y.ref !== void 0 && (J = y.ref, H = ie.current), y.key !== void 0 && (M = "" + y.key), s.type && s.type.defaultProps) var z = s.type.defaultProps;
155
- for (U in y) X.call(y, U) && !pe.hasOwnProperty(U) && ($[U] = y[U] === void 0 && z !== void 0 ? z[U] : y[U]);
156
- }
157
- var U = arguments.length - 2;
158
- if (U === 1) $.children = I;
159
- else if (1 < U) {
160
- z = Array(U);
161
- for (var oe = 0; oe < U; oe++) z[oe] = arguments[oe + 2];
162
- $.children = z;
163
- }
164
- return { $$typeof: o, type: s.type, key: M, ref: J, props: $, _owner: H };
165
- }, N.createContext = function(s) {
166
- return s = { $$typeof: h, _currentValue: s, _currentValue2: s, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, s.Provider = { $$typeof: f, _context: s }, s.Consumer = s;
167
- }, N.createElement = je, N.createFactory = function(s) {
168
- var y = je.bind(null, s);
169
- return y.type = s, y;
170
- }, N.createRef = function() {
171
- return { current: null };
172
- }, N.forwardRef = function(s) {
173
- return { $$typeof: v, render: s };
174
- }, N.isValidElement = Oe, N.lazy = function(s) {
175
- return { $$typeof: j, _payload: { _status: -1, _result: s }, _init: be };
176
- }, N.memo = function(s, y) {
177
- return { $$typeof: p, type: s, compare: y === void 0 ? null : y };
178
- }, N.startTransition = function(s) {
179
- var y = xe.transition;
180
- xe.transition = {};
181
- try {
182
- s();
183
- } finally {
184
- xe.transition = y;
185
- }
186
- }, N.unstable_act = Ce, N.useCallback = function(s, y) {
187
- return E.current.useCallback(s, y);
188
- }, N.useContext = function(s) {
189
- return E.current.useContext(s);
190
- }, N.useDebugValue = function() {
191
- }, N.useDeferredValue = function(s) {
192
- return E.current.useDeferredValue(s);
193
- }, N.useEffect = function(s, y) {
194
- return E.current.useEffect(s, y);
195
- }, N.useId = function() {
196
- return E.current.useId();
197
- }, N.useImperativeHandle = function(s, y, I) {
198
- return E.current.useImperativeHandle(s, y, I);
199
- }, N.useInsertionEffect = function(s, y) {
200
- return E.current.useInsertionEffect(s, y);
201
- }, N.useLayoutEffect = function(s, y) {
202
- return E.current.useLayoutEffect(s, y);
203
- }, N.useMemo = function(s, y) {
204
- return E.current.useMemo(s, y);
205
- }, N.useReducer = function(s, y, I) {
206
- return E.current.useReducer(s, y, I);
207
- }, N.useRef = function(s) {
208
- return E.current.useRef(s);
209
- }, N.useState = function(s) {
210
- return E.current.useState(s);
211
- }, N.useSyncExternalStore = function(s, y, I) {
212
- return E.current.useSyncExternalStore(s, y, I);
213
- }, N.useTransition = function() {
214
- return E.current.useTransition();
215
- }, N.version = "18.3.1", N;
216
- }
217
- var ir = { exports: {} };
218
- /**
219
- * @license React
220
- * react.development.js
221
- *
222
- * Copyright (c) Facebook, Inc. and its affiliates.
223
- *
224
- * This source code is licensed under the MIT license found in the
225
- * LICENSE file in the root directory of this source tree.
226
- */
227
- ir.exports;
228
- var At;
229
- function Jn() {
230
- return At || (At = 1, function(o, a) {
231
- process.env.NODE_ENV !== "production" && function() {
232
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
233
- var u = "18.3.1", l = Symbol.for("react.element"), d = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), p = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), ae = Symbol.for("react.offscreen"), de = Symbol.iterator, A = "@@iterator";
234
- function Y(e) {
235
- if (e === null || typeof e != "object")
236
- return null;
237
- var r = de && e[de] || e[A];
238
- return typeof r == "function" ? r : null;
239
- }
240
- var ge = {
241
- /**
242
- * @internal
243
- * @type {ReactComponent}
244
- */
245
- current: null
246
- }, K = {
247
- transition: null
248
- }, X = {
249
- current: null,
250
- // Used to reproduce behavior of `batchedUpdates` in legacy mode.
251
- isBatchingLegacy: !1,
252
- didScheduleLegacyUpdate: !1
253
- }, ie = {
254
- /**
255
- * @internal
256
- * @type {ReactComponent}
257
- */
258
- current: null
259
- }, pe = {}, je = null;
260
- function Te(e) {
261
- je = e;
262
- }
263
- pe.setExtraStackFrame = function(e) {
264
- je = e;
265
- }, pe.getCurrentStack = null, pe.getStackAddendum = function() {
266
- var e = "";
267
- je && (e += je);
268
- var r = pe.getCurrentStack;
269
- return r && (e += r() || ""), e;
270
- };
271
- var Oe = !1, Je = !1, Pe = !1, ve = !1, me = !1, le = {
272
- ReactCurrentDispatcher: ge,
273
- ReactCurrentBatchConfig: K,
274
- ReactCurrentOwner: ie
275
- };
276
- le.ReactDebugCurrentFrame = pe, le.ReactCurrentActQueue = X;
277
- function be(e) {
278
- {
279
- for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), c = 1; c < r; c++)
280
- i[c - 1] = arguments[c];
281
- xe("warn", e, i);
282
- }
283
- }
284
- function E(e) {
285
- {
286
- for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), c = 1; c < r; c++)
287
- i[c - 1] = arguments[c];
288
- xe("error", e, i);
289
- }
290
- }
291
- function xe(e, r, i) {
292
- {
293
- var c = le.ReactDebugCurrentFrame, b = c.getStackAddendum();
294
- b !== "" && (r += "%s", i = i.concat([b]));
295
- var R = i.map(function(w) {
296
- return String(w);
297
- });
298
- R.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, R);
299
- }
300
- }
301
- var Ne = {};
302
- function Ce(e, r) {
303
- {
304
- var i = e.constructor, c = i && (i.displayName || i.name) || "ReactClass", b = c + "." + r;
305
- if (Ne[b])
306
- return;
307
- E("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", r, c), Ne[b] = !0;
308
- }
309
- }
310
- var s = {
311
- /**
312
- * Checks whether or not this composite component is mounted.
313
- * @param {ReactClass} publicInstance The instance we want to test.
314
- * @return {boolean} True if mounted, false otherwise.
315
- * @protected
316
- * @final
317
- */
318
- isMounted: function(e) {
319
- return !1;
320
- },
321
- /**
322
- * Forces an update. This should only be invoked when it is known with
323
- * certainty that we are **not** in a DOM transaction.
324
- *
325
- * You may want to call this when you know that some deeper aspect of the
326
- * component's state has changed but `setState` was not called.
327
- *
328
- * This will not invoke `shouldComponentUpdate`, but it will invoke
329
- * `componentWillUpdate` and `componentDidUpdate`.
330
- *
331
- * @param {ReactClass} publicInstance The instance that should rerender.
332
- * @param {?function} callback Called after component is updated.
333
- * @param {?string} callerName name of the calling function in the public API.
334
- * @internal
335
- */
336
- enqueueForceUpdate: function(e, r, i) {
337
- Ce(e, "forceUpdate");
338
- },
339
- /**
340
- * Replaces all of the state. Always use this or `setState` to mutate state.
341
- * You should treat `this.state` as immutable.
342
- *
343
- * There is no guarantee that `this.state` will be immediately updated, so
344
- * accessing `this.state` after calling this method may return the old value.
345
- *
346
- * @param {ReactClass} publicInstance The instance that should rerender.
347
- * @param {object} completeState Next state.
348
- * @param {?function} callback Called after component is updated.
349
- * @param {?string} callerName name of the calling function in the public API.
350
- * @internal
351
- */
352
- enqueueReplaceState: function(e, r, i, c) {
353
- Ce(e, "replaceState");
354
- },
355
- /**
356
- * Sets a subset of the state. This only exists because _pendingState is
357
- * internal. This provides a merging strategy that is not available to deep
358
- * properties which is confusing. TODO: Expose pendingState or don't use it
359
- * during the merge.
360
- *
361
- * @param {ReactClass} publicInstance The instance that should rerender.
362
- * @param {object} partialState Next partial state to be merged with state.
363
- * @param {?function} callback Called after component is updated.
364
- * @param {?string} Name of the calling function in the public API.
365
- * @internal
366
- */
367
- enqueueSetState: function(e, r, i, c) {
368
- Ce(e, "setState");
369
- }
370
- }, y = Object.assign, I = {};
371
- Object.freeze(I);
372
- function $(e, r, i) {
373
- this.props = e, this.context = r, this.refs = I, this.updater = i || s;
374
- }
375
- $.prototype.isReactComponent = {}, $.prototype.setState = function(e, r) {
376
- if (typeof e != "object" && typeof e != "function" && e != null)
377
- throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
378
- this.updater.enqueueSetState(this, e, r, "setState");
379
- }, $.prototype.forceUpdate = function(e) {
380
- this.updater.enqueueForceUpdate(this, e, "forceUpdate");
381
- };
382
- {
383
- var M = {
384
- isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
385
- replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
386
- }, J = function(e, r) {
387
- Object.defineProperty($.prototype, e, {
388
- get: function() {
389
- be("%s(...) is deprecated in plain JavaScript React classes. %s", r[0], r[1]);
390
- }
391
- });
392
- };
393
- for (var H in M)
394
- M.hasOwnProperty(H) && J(H, M[H]);
395
- }
396
- function z() {
397
- }
398
- z.prototype = $.prototype;
399
- function U(e, r, i) {
400
- this.props = e, this.context = r, this.refs = I, this.updater = i || s;
401
- }
402
- var oe = U.prototype = new z();
403
- oe.constructor = U, y(oe, $.prototype), oe.isPureReactComponent = !0;
404
- function Or() {
405
- var e = {
406
- current: null
407
- };
408
- return Object.seal(e), e;
409
- }
410
- var ur = Array.isArray;
411
- function Be(e) {
412
- return ur(e);
413
- }
414
- function Pr(e) {
415
- {
416
- var r = typeof Symbol == "function" && Symbol.toStringTag, i = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
417
- return i;
418
- }
419
- }
420
- function We(e) {
421
- try {
422
- return Ee(e), !1;
423
- } catch {
424
- return !0;
425
- }
426
- }
427
- function Ee(e) {
428
- return "" + e;
429
- }
430
- function Ae(e) {
431
- if (We(e))
432
- return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Pr(e)), Ee(e);
433
- }
434
- function cr(e, r, i) {
435
- var c = e.displayName;
436
- if (c)
437
- return c;
438
- var b = r.displayName || r.name || "";
439
- return b !== "" ? i + "(" + b + ")" : i;
440
- }
441
- function Ie(e) {
442
- return e.displayName || "Context";
443
- }
444
- function _e(e) {
445
- if (e == null)
446
- return null;
447
- if (typeof e.tag == "number" && E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
448
- return e.displayName || e.name || null;
449
- if (typeof e == "string")
450
- return e;
451
- switch (e) {
452
- case f:
453
- return "Fragment";
454
- case d:
455
- return "Portal";
456
- case v:
457
- return "Profiler";
458
- case h:
459
- return "StrictMode";
460
- case _:
461
- return "Suspense";
462
- case O:
463
- return "SuspenseList";
464
- }
465
- if (typeof e == "object")
466
- switch (e.$$typeof) {
467
- case p:
468
- var r = e;
469
- return Ie(r) + ".Consumer";
470
- case g:
471
- var i = e;
472
- return Ie(i._context) + ".Provider";
473
- case j:
474
- return cr(e, e.render, "ForwardRef");
475
- case T:
476
- var c = e.displayName || null;
477
- return c !== null ? c : _e(e.type) || "Memo";
478
- case k: {
479
- var b = e, R = b._payload, w = b._init;
480
- try {
481
- return _e(w(R));
482
- } catch {
483
- return null;
484
- }
485
- }
486
- }
487
- return null;
488
- }
489
- var De = Object.prototype.hasOwnProperty, Ue = {
490
- key: !0,
491
- ref: !0,
492
- __self: !0,
493
- __source: !0
494
- }, fr, dr, Ve;
495
- Ve = {};
496
- function Xe(e) {
497
- if (De.call(e, "ref")) {
498
- var r = Object.getOwnPropertyDescriptor(e, "ref").get;
499
- if (r && r.isReactWarning)
500
- return !1;
501
- }
502
- return e.ref !== void 0;
503
- }
504
- function Ze(e) {
505
- if (De.call(e, "key")) {
506
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
507
- if (r && r.isReactWarning)
508
- return !1;
509
- }
510
- return e.key !== void 0;
511
- }
512
- function Nr(e, r) {
513
- var i = function() {
514
- fr || (fr = !0, E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
515
- };
516
- i.isReactWarning = !0, Object.defineProperty(e, "key", {
517
- get: i,
518
- configurable: !0
519
- });
520
- }
521
- function pr(e, r) {
522
- var i = function() {
523
- dr || (dr = !0, E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
524
- };
525
- i.isReactWarning = !0, Object.defineProperty(e, "ref", {
526
- get: i,
527
- configurable: !0
528
- });
529
- }
530
- function vr(e) {
531
- if (typeof e.ref == "string" && ie.current && e.__self && ie.current.stateNode !== e.__self) {
532
- var r = _e(ie.current.type);
533
- Ve[r] || (E('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', r, e.ref), Ve[r] = !0);
534
- }
535
- }
536
- var Qe = function(e, r, i, c, b, R, w) {
537
- var S = {
538
- // This tag allows us to uniquely identify this as a React Element
539
- $$typeof: l,
540
- // Built-in properties that belong on the element
541
- type: e,
542
- key: r,
543
- ref: i,
544
- props: w,
545
- // Record the component responsible for creating this element.
546
- _owner: R
547
- };
548
- return S._store = {}, Object.defineProperty(S._store, "validated", {
549
- configurable: !1,
550
- enumerable: !1,
551
- writable: !0,
552
- value: !1
553
- }), Object.defineProperty(S, "_self", {
554
- configurable: !1,
555
- enumerable: !1,
556
- writable: !1,
557
- value: c
558
- }), Object.defineProperty(S, "_source", {
559
- configurable: !1,
560
- enumerable: !1,
561
- writable: !1,
562
- value: b
563
- }), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
564
- };
565
- function Ar(e, r, i) {
566
- var c, b = {}, R = null, w = null, S = null, L = null;
567
- if (r != null) {
568
- Xe(r) && (w = r.ref, vr(r)), Ze(r) && (Ae(r.key), R = "" + r.key), S = r.__self === void 0 ? null : r.__self, L = r.__source === void 0 ? null : r.__source;
569
- for (c in r)
570
- De.call(r, c) && !Ue.hasOwnProperty(c) && (b[c] = r[c]);
571
- }
572
- var q = arguments.length - 2;
573
- if (q === 1)
574
- b.children = i;
575
- else if (q > 1) {
576
- for (var Z = Array(q), Q = 0; Q < q; Q++)
577
- Z[Q] = arguments[Q + 2];
578
- Object.freeze && Object.freeze(Z), b.children = Z;
579
- }
580
- if (e && e.defaultProps) {
581
- var re = e.defaultProps;
582
- for (c in re)
583
- b[c] === void 0 && (b[c] = re[c]);
584
- }
585
- if (R || w) {
586
- var se = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
587
- R && Nr(b, se), w && pr(b, se);
588
- }
589
- return Qe(e, R, w, S, L, ie.current, b);
590
- }
591
- function Ir(e, r) {
592
- var i = Qe(e.type, r, e.ref, e._self, e._source, e._owner, e.props);
593
- return i;
594
- }
595
- function Dr(e, r, i) {
596
- if (e == null)
597
- throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
598
- var c, b = y({}, e.props), R = e.key, w = e.ref, S = e._self, L = e._source, q = e._owner;
599
- if (r != null) {
600
- Xe(r) && (w = r.ref, q = ie.current), Ze(r) && (Ae(r.key), R = "" + r.key);
601
- var Z;
602
- e.type && e.type.defaultProps && (Z = e.type.defaultProps);
603
- for (c in r)
604
- De.call(r, c) && !Ue.hasOwnProperty(c) && (r[c] === void 0 && Z !== void 0 ? b[c] = Z[c] : b[c] = r[c]);
605
- }
606
- var Q = arguments.length - 2;
607
- if (Q === 1)
608
- b.children = i;
609
- else if (Q > 1) {
610
- for (var re = Array(Q), se = 0; se < Q; se++)
611
- re[se] = arguments[se + 2];
612
- b.children = re;
613
- }
614
- return Qe(e.type, R, w, S, L, q, b);
615
- }
616
- function Re(e) {
617
- return typeof e == "object" && e !== null && e.$$typeof === l;
618
- }
619
- var mr = ".", $r = ":";
620
- function er(e) {
621
- var r = /[=:]/g, i = {
622
- "=": "=0",
623
- ":": "=2"
624
- }, c = e.replace(r, function(b) {
625
- return i[b];
626
- });
627
- return "$" + c;
628
- }
629
- var rr = !1, Se = /\/+/g;
630
- function Ye(e) {
631
- return e.replace(Se, "$&/");
632
- }
633
- function $e(e, r) {
634
- return typeof e == "object" && e !== null && e.key != null ? (Ae(e.key), er("" + e.key)) : r.toString(36);
635
- }
636
- function Fe(e, r, i, c, b) {
637
- var R = typeof e;
638
- (R === "undefined" || R === "boolean") && (e = null);
639
- var w = !1;
640
- if (e === null)
641
- w = !0;
642
- else
643
- switch (R) {
644
- case "string":
645
- case "number":
646
- w = !0;
647
- break;
648
- case "object":
649
- switch (e.$$typeof) {
650
- case l:
651
- case d:
652
- w = !0;
653
- }
654
- }
655
- if (w) {
656
- var S = e, L = b(S), q = c === "" ? mr + $e(S, 0) : c;
657
- if (Be(L)) {
658
- var Z = "";
659
- q != null && (Z = Ye(q) + "/"), Fe(L, r, Z, "", function(dn) {
660
- return dn;
661
- });
662
- } else L != null && (Re(L) && (L.key && (!S || S.key !== L.key) && Ae(L.key), L = Ir(
663
- L,
664
- // Keep both the (mapped) and old keys if they differ, just as
665
- // traverseAllChildren used to do for objects as children
666
- i + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
667
- (L.key && (!S || S.key !== L.key) ? (
668
- // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
669
- // eslint-disable-next-line react-internal/safe-string-coercion
670
- Ye("" + L.key) + "/"
671
- ) : "") + q
672
- )), r.push(L));
673
- return 1;
674
- }
675
- var Q, re, se = 0, ce = c === "" ? mr : c + $r;
676
- if (Be(e))
677
- for (var Er = 0; Er < e.length; Er++)
678
- Q = e[Er], re = ce + $e(Q, Er), se += Fe(Q, r, i, re, b);
679
- else {
680
- var Zr = Y(e);
681
- if (typeof Zr == "function") {
682
- var kt = e;
683
- Zr === kt.entries && (rr || be("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), rr = !0);
684
- for (var cn = Zr.call(kt), Tt, fn = 0; !(Tt = cn.next()).done; )
685
- Q = Tt.value, re = ce + $e(Q, fn++), se += Fe(Q, r, i, re, b);
686
- } else if (R === "object") {
687
- var Ot = String(e);
688
- throw new Error("Objects are not valid as a React child (found: " + (Ot === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : Ot) + "). If you meant to render a collection of children, use an array instead.");
689
- }
690
- }
691
- return se;
692
- }
693
- function ze(e, r, i) {
694
- if (e == null)
695
- return e;
696
- var c = [], b = 0;
697
- return Fe(e, c, "", "", function(R) {
698
- return r.call(i, R, b++);
699
- }), c;
700
- }
701
- function hr(e) {
702
- var r = 0;
703
- return ze(e, function() {
704
- r++;
705
- }), r;
706
- }
707
- function Fr(e, r, i) {
708
- ze(e, function() {
709
- r.apply(this, arguments);
710
- }, i);
711
- }
712
- function yr(e) {
713
- return ze(e, function(r) {
714
- return r;
715
- }) || [];
716
- }
717
- function br(e) {
718
- if (!Re(e))
719
- throw new Error("React.Children.only expected to receive a single React element child.");
720
- return e;
721
- }
722
- function Lr(e) {
723
- var r = {
724
- $$typeof: p,
725
- // As a workaround to support multiple concurrent renderers, we categorize
726
- // some renderers as primary and others as secondary. We only expect
727
- // there to be two concurrent renderers at most: React Native (primary) and
728
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
729
- // Secondary renderers store their context values on separate fields.
730
- _currentValue: e,
731
- _currentValue2: e,
732
- // Used to track how many concurrent renderers this context currently
733
- // supports within in a single renderer. Such as parallel server rendering.
734
- _threadCount: 0,
735
- // These are circular
736
- Provider: null,
737
- Consumer: null,
738
- // Add these to use same hidden class in VM as ServerContext
739
- _defaultValue: null,
740
- _globalName: null
741
- };
742
- r.Provider = {
743
- $$typeof: g,
744
- _context: r
745
- };
746
- var i = !1, c = !1, b = !1;
747
- {
748
- var R = {
749
- $$typeof: p,
750
- _context: r
751
- };
752
- Object.defineProperties(R, {
753
- Provider: {
754
- get: function() {
755
- return c || (c = !0, E("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), r.Provider;
756
- },
757
- set: function(w) {
758
- r.Provider = w;
759
- }
760
- },
761
- _currentValue: {
762
- get: function() {
763
- return r._currentValue;
764
- },
765
- set: function(w) {
766
- r._currentValue = w;
767
- }
768
- },
769
- _currentValue2: {
770
- get: function() {
771
- return r._currentValue2;
772
- },
773
- set: function(w) {
774
- r._currentValue2 = w;
775
- }
776
- },
777
- _threadCount: {
778
- get: function() {
779
- return r._threadCount;
780
- },
781
- set: function(w) {
782
- r._threadCount = w;
783
- }
784
- },
785
- Consumer: {
786
- get: function() {
787
- return i || (i = !0, E("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), r.Consumer;
788
- }
789
- },
790
- displayName: {
791
- get: function() {
792
- return r.displayName;
793
- },
794
- set: function(w) {
795
- b || (be("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", w), b = !0);
796
- }
797
- }
798
- }), r.Consumer = R;
799
- }
800
- return r._currentRenderer = null, r._currentRenderer2 = null, r;
801
- }
802
- var Le = -1, He = 0, tr = 1, Mr = 2;
803
- function Br(e) {
804
- if (e._status === Le) {
805
- var r = e._result, i = r();
806
- if (i.then(function(R) {
807
- if (e._status === He || e._status === Le) {
808
- var w = e;
809
- w._status = tr, w._result = R;
810
- }
811
- }, function(R) {
812
- if (e._status === He || e._status === Le) {
813
- var w = e;
814
- w._status = Mr, w._result = R;
815
- }
816
- }), e._status === Le) {
817
- var c = e;
818
- c._status = He, c._result = i;
819
- }
820
- }
821
- if (e._status === tr) {
822
- var b = e._result;
823
- return b === void 0 && E(`lazy: Expected the result of a dynamic import() call. Instead received: %s
824
-
825
- Your code should look like:
826
- const MyComponent = lazy(() => import('./MyComponent'))
827
-
828
- Did you accidentally put curly braces around the import?`, b), "default" in b || E(`lazy: Expected the result of a dynamic import() call. Instead received: %s
829
-
830
- Your code should look like:
831
- const MyComponent = lazy(() => import('./MyComponent'))`, b), b.default;
832
- } else
833
- throw e._result;
834
- }
835
- function Wr(e) {
836
- var r = {
837
- // We use these fields to store the result.
838
- _status: Le,
839
- _result: e
840
- }, i = {
841
- $$typeof: k,
842
- _payload: r,
843
- _init: Br
844
- };
845
- {
846
- var c, b;
847
- Object.defineProperties(i, {
848
- defaultProps: {
849
- configurable: !0,
850
- get: function() {
851
- return c;
852
- },
853
- set: function(R) {
854
- E("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), c = R, Object.defineProperty(i, "defaultProps", {
855
- enumerable: !0
856
- });
857
- }
858
- },
859
- propTypes: {
860
- configurable: !0,
861
- get: function() {
862
- return b;
863
- },
864
- set: function(R) {
865
- E("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), b = R, Object.defineProperty(i, "propTypes", {
866
- enumerable: !0
867
- });
868
- }
869
- }
870
- });
871
- }
872
- return i;
873
- }
874
- function Ur(e) {
875
- e != null && e.$$typeof === T ? E("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof e != "function" ? E("forwardRef requires a render function but was given %s.", e === null ? "null" : typeof e) : e.length !== 0 && e.length !== 2 && E("forwardRef render functions accept exactly two parameters: props and ref. %s", e.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), e != null && (e.defaultProps != null || e.propTypes != null) && E("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
876
- var r = {
877
- $$typeof: j,
878
- render: e
879
- };
880
- {
881
- var i;
882
- Object.defineProperty(r, "displayName", {
883
- enumerable: !1,
884
- configurable: !0,
885
- get: function() {
886
- return i;
887
- },
888
- set: function(c) {
889
- i = c, !e.name && !e.displayName && (e.displayName = c);
890
- }
891
- });
892
- }
893
- return r;
894
- }
895
- var t;
896
- t = Symbol.for("react.module.reference");
897
- function m(e) {
898
- return !!(typeof e == "string" || typeof e == "function" || e === f || e === v || me || e === h || e === _ || e === O || ve || e === ae || Oe || Je || Pe || typeof e == "object" && e !== null && (e.$$typeof === k || e.$$typeof === T || e.$$typeof === g || e.$$typeof === p || e.$$typeof === j || // This needs to include all possible module reference object
899
- // types supported by any Flight configuration anywhere since
900
- // we don't know which Flight build this will end up being used
901
- // with.
902
- e.$$typeof === t || e.getModuleId !== void 0));
903
- }
904
- function x(e, r) {
905
- m(e) || E("memo: The first argument must be a component. Instead received: %s", e === null ? "null" : typeof e);
906
- var i = {
907
- $$typeof: T,
908
- type: e,
909
- compare: r === void 0 ? null : r
910
- };
911
- {
912
- var c;
913
- Object.defineProperty(i, "displayName", {
914
- enumerable: !1,
915
- configurable: !0,
916
- get: function() {
917
- return c;
918
- },
919
- set: function(b) {
920
- c = b, !e.name && !e.displayName && (e.displayName = b);
921
- }
922
- });
923
- }
924
- return i;
925
- }
926
- function C() {
927
- var e = ge.current;
928
- return e === null && E(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
929
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
930
- 2. You might be breaking the Rules of Hooks
931
- 3. You might have more than one copy of React in the same app
932
- See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`), e;
933
- }
934
- function B(e) {
935
- var r = C();
936
- if (e._context !== void 0) {
937
- var i = e._context;
938
- i.Consumer === e ? E("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?") : i.Provider === e && E("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
939
- }
940
- return r.useContext(e);
941
- }
942
- function V(e) {
943
- var r = C();
944
- return r.useState(e);
945
- }
946
- function D(e, r, i) {
947
- var c = C();
948
- return c.useReducer(e, r, i);
949
- }
950
- function P(e) {
951
- var r = C();
952
- return r.useRef(e);
953
- }
954
- function ue(e, r) {
955
- var i = C();
956
- return i.useEffect(e, r);
957
- }
958
- function ee(e, r) {
959
- var i = C();
960
- return i.useInsertionEffect(e, r);
961
- }
962
- function te(e, r) {
963
- var i = C();
964
- return i.useLayoutEffect(e, r);
965
- }
966
- function he(e, r) {
967
- var i = C();
968
- return i.useCallback(e, r);
969
- }
970
- function ke(e, r) {
971
- var i = C();
972
- return i.useMemo(e, r);
973
- }
974
- function we(e, r, i) {
975
- var c = C();
976
- return c.useImperativeHandle(e, r, i);
977
- }
978
- function fe(e, r) {
979
- {
980
- var i = C();
981
- return i.useDebugValue(e, r);
982
- }
983
- }
984
- function nr() {
985
- var e = C();
986
- return e.useTransition();
987
- }
988
- function Vr(e) {
989
- var r = C();
990
- return r.useDeferredValue(e);
991
- }
992
- function Yr() {
993
- var e = C();
994
- return e.useId();
995
- }
996
- function Yt(e, r, i) {
997
- var c = C();
998
- return c.useSyncExternalStore(e, r, i);
999
- }
1000
- var ar = 0, it, lt, ut, ct, ft, dt, pt;
1001
- function vt() {
1002
- }
1003
- vt.__reactDisabledLog = !0;
1004
- function zt() {
1005
- {
1006
- if (ar === 0) {
1007
- it = console.log, lt = console.info, ut = console.warn, ct = console.error, ft = console.group, dt = console.groupCollapsed, pt = console.groupEnd;
1008
- var e = {
1009
- configurable: !0,
1010
- enumerable: !0,
1011
- value: vt,
1012
- writable: !0
1013
- };
1014
- Object.defineProperties(console, {
1015
- info: e,
1016
- log: e,
1017
- warn: e,
1018
- error: e,
1019
- group: e,
1020
- groupCollapsed: e,
1021
- groupEnd: e
1022
- });
1023
- }
1024
- ar++;
1025
- }
1026
- }
1027
- function Ht() {
1028
- {
1029
- if (ar--, ar === 0) {
1030
- var e = {
1031
- configurable: !0,
1032
- enumerable: !0,
1033
- writable: !0
1034
- };
1035
- Object.defineProperties(console, {
1036
- log: y({}, e, {
1037
- value: it
1038
- }),
1039
- info: y({}, e, {
1040
- value: lt
1041
- }),
1042
- warn: y({}, e, {
1043
- value: ut
1044
- }),
1045
- error: y({}, e, {
1046
- value: ct
1047
- }),
1048
- group: y({}, e, {
1049
- value: ft
1050
- }),
1051
- groupCollapsed: y({}, e, {
1052
- value: dt
1053
- }),
1054
- groupEnd: y({}, e, {
1055
- value: pt
1056
- })
1057
- });
1058
- }
1059
- ar < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1060
- }
1061
- }
1062
- var zr = le.ReactCurrentDispatcher, Hr;
1063
- function gr(e, r, i) {
1064
- {
1065
- if (Hr === void 0)
1066
- try {
1067
- throw Error();
1068
- } catch (b) {
1069
- var c = b.stack.trim().match(/\n( *(at )?)/);
1070
- Hr = c && c[1] || "";
1071
- }
1072
- return `
1073
- ` + Hr + e;
1074
- }
1075
- }
1076
- var qr = !1, xr;
1077
- {
1078
- var qt = typeof WeakMap == "function" ? WeakMap : Map;
1079
- xr = new qt();
1080
- }
1081
- function mt(e, r) {
1082
- if (!e || qr)
1083
- return "";
1084
- {
1085
- var i = xr.get(e);
1086
- if (i !== void 0)
1087
- return i;
1088
- }
1089
- var c;
1090
- qr = !0;
1091
- var b = Error.prepareStackTrace;
1092
- Error.prepareStackTrace = void 0;
1093
- var R;
1094
- R = zr.current, zr.current = null, zt();
1095
- try {
1096
- if (r) {
1097
- var w = function() {
1098
- throw Error();
1099
- };
1100
- if (Object.defineProperty(w.prototype, "props", {
1101
- set: function() {
1102
- throw Error();
1103
- }
1104
- }), typeof Reflect == "object" && Reflect.construct) {
1105
- try {
1106
- Reflect.construct(w, []);
1107
- } catch (ce) {
1108
- c = ce;
1109
- }
1110
- Reflect.construct(e, [], w);
1111
- } else {
1112
- try {
1113
- w.call();
1114
- } catch (ce) {
1115
- c = ce;
1116
- }
1117
- e.call(w.prototype);
1118
- }
1119
- } else {
1120
- try {
1121
- throw Error();
1122
- } catch (ce) {
1123
- c = ce;
1124
- }
1125
- e();
1126
- }
1127
- } catch (ce) {
1128
- if (ce && c && typeof ce.stack == "string") {
1129
- for (var S = ce.stack.split(`
1130
- `), L = c.stack.split(`
1131
- `), q = S.length - 1, Z = L.length - 1; q >= 1 && Z >= 0 && S[q] !== L[Z]; )
1132
- Z--;
1133
- for (; q >= 1 && Z >= 0; q--, Z--)
1134
- if (S[q] !== L[Z]) {
1135
- if (q !== 1 || Z !== 1)
1136
- do
1137
- if (q--, Z--, Z < 0 || S[q] !== L[Z]) {
1138
- var Q = `
1139
- ` + S[q].replace(" at new ", " at ");
1140
- return e.displayName && Q.includes("<anonymous>") && (Q = Q.replace("<anonymous>", e.displayName)), typeof e == "function" && xr.set(e, Q), Q;
1141
- }
1142
- while (q >= 1 && Z >= 0);
1143
- break;
1144
- }
1145
- }
1146
- } finally {
1147
- qr = !1, zr.current = R, Ht(), Error.prepareStackTrace = b;
1148
- }
1149
- var re = e ? e.displayName || e.name : "", se = re ? gr(re) : "";
1150
- return typeof e == "function" && xr.set(e, se), se;
1151
- }
1152
- function Gt(e, r, i) {
1153
- return mt(e, !1);
1154
- }
1155
- function Kt(e) {
1156
- var r = e.prototype;
1157
- return !!(r && r.isReactComponent);
1158
- }
1159
- function _r(e, r, i) {
1160
- if (e == null)
1161
- return "";
1162
- if (typeof e == "function")
1163
- return mt(e, Kt(e));
1164
- if (typeof e == "string")
1165
- return gr(e);
1166
- switch (e) {
1167
- case _:
1168
- return gr("Suspense");
1169
- case O:
1170
- return gr("SuspenseList");
1171
- }
1172
- if (typeof e == "object")
1173
- switch (e.$$typeof) {
1174
- case j:
1175
- return Gt(e.render);
1176
- case T:
1177
- return _r(e.type, r, i);
1178
- case k: {
1179
- var c = e, b = c._payload, R = c._init;
1180
- try {
1181
- return _r(R(b), r, i);
1182
- } catch {
1183
- }
1184
- }
1185
- }
1186
- return "";
1187
- }
1188
- var ht = {}, yt = le.ReactDebugCurrentFrame;
1189
- function jr(e) {
1190
- if (e) {
1191
- var r = e._owner, i = _r(e.type, e._source, r ? r.type : null);
1192
- yt.setExtraStackFrame(i);
1193
- } else
1194
- yt.setExtraStackFrame(null);
1195
- }
1196
- function Jt(e, r, i, c, b) {
1197
- {
1198
- var R = Function.call.bind(De);
1199
- for (var w in e)
1200
- if (R(e, w)) {
1201
- var S = void 0;
1202
- try {
1203
- if (typeof e[w] != "function") {
1204
- var L = Error((c || "React class") + ": " + i + " type `" + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[w] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1205
- throw L.name = "Invariant Violation", L;
1206
- }
1207
- S = e[w](r, w, c, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1208
- } catch (q) {
1209
- S = q;
1210
- }
1211
- S && !(S instanceof Error) && (jr(b), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", c || "React class", i, w, typeof S), jr(null)), S instanceof Error && !(S.message in ht) && (ht[S.message] = !0, jr(b), E("Failed %s type: %s", i, S.message), jr(null));
1212
- }
1213
- }
1214
- }
1215
- function qe(e) {
1216
- if (e) {
1217
- var r = e._owner, i = _r(e.type, e._source, r ? r.type : null);
1218
- Te(i);
1219
- } else
1220
- Te(null);
1221
- }
1222
- var Gr;
1223
- Gr = !1;
1224
- function bt() {
1225
- if (ie.current) {
1226
- var e = _e(ie.current.type);
1227
- if (e)
1228
- return `
1229
-
1230
- Check the render method of \`` + e + "`.";
1231
- }
1232
- return "";
1233
- }
1234
- function Xt(e) {
1235
- if (e !== void 0) {
1236
- var r = e.fileName.replace(/^.*[\\\/]/, ""), i = e.lineNumber;
1237
- return `
1238
-
1239
- Check your code at ` + r + ":" + i + ".";
1240
- }
1241
- return "";
1242
- }
1243
- function Zt(e) {
1244
- return e != null ? Xt(e.__source) : "";
1245
- }
1246
- var gt = {};
1247
- function Qt(e) {
1248
- var r = bt();
1249
- if (!r) {
1250
- var i = typeof e == "string" ? e : e.displayName || e.name;
1251
- i && (r = `
1252
-
1253
- Check the top-level render call using <` + i + ">.");
1254
- }
1255
- return r;
1256
- }
1257
- function xt(e, r) {
1258
- if (!(!e._store || e._store.validated || e.key != null)) {
1259
- e._store.validated = !0;
1260
- var i = Qt(r);
1261
- if (!gt[i]) {
1262
- gt[i] = !0;
1263
- var c = "";
1264
- e && e._owner && e._owner !== ie.current && (c = " It was passed a child from " + _e(e._owner.type) + "."), qe(e), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, c), qe(null);
1265
- }
1266
- }
1267
- }
1268
- function _t(e, r) {
1269
- if (typeof e == "object") {
1270
- if (Be(e))
1271
- for (var i = 0; i < e.length; i++) {
1272
- var c = e[i];
1273
- Re(c) && xt(c, r);
1274
- }
1275
- else if (Re(e))
1276
- e._store && (e._store.validated = !0);
1277
- else if (e) {
1278
- var b = Y(e);
1279
- if (typeof b == "function" && b !== e.entries)
1280
- for (var R = b.call(e), w; !(w = R.next()).done; )
1281
- Re(w.value) && xt(w.value, r);
1282
- }
1283
- }
1284
- }
1285
- function jt(e) {
1286
- {
1287
- var r = e.type;
1288
- if (r == null || typeof r == "string")
1289
- return;
1290
- var i;
1291
- if (typeof r == "function")
1292
- i = r.propTypes;
1293
- else if (typeof r == "object" && (r.$$typeof === j || // Note: Memo only checks outer props here.
1294
- // Inner props are checked in the reconciler.
1295
- r.$$typeof === T))
1296
- i = r.propTypes;
1297
- else
1298
- return;
1299
- if (i) {
1300
- var c = _e(r);
1301
- Jt(i, e.props, "prop", c, e);
1302
- } else if (r.PropTypes !== void 0 && !Gr) {
1303
- Gr = !0;
1304
- var b = _e(r);
1305
- E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
1306
- }
1307
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1308
- }
1309
- }
1310
- function en(e) {
1311
- {
1312
- for (var r = Object.keys(e.props), i = 0; i < r.length; i++) {
1313
- var c = r[i];
1314
- if (c !== "children" && c !== "key") {
1315
- qe(e), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", c), qe(null);
1316
- break;
1317
- }
1318
- }
1319
- e.ref !== null && (qe(e), E("Invalid attribute `ref` supplied to `React.Fragment`."), qe(null));
1320
- }
1321
- }
1322
- function Ct(e, r, i) {
1323
- var c = m(e);
1324
- if (!c) {
1325
- var b = "";
1326
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1327
- var R = Zt(r);
1328
- R ? b += R : b += bt();
1329
- var w;
1330
- e === null ? w = "null" : Be(e) ? w = "array" : e !== void 0 && e.$$typeof === l ? (w = "<" + (_e(e.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : w = typeof e, E("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", w, b);
1331
- }
1332
- var S = Ar.apply(this, arguments);
1333
- if (S == null)
1334
- return S;
1335
- if (c)
1336
- for (var L = 2; L < arguments.length; L++)
1337
- _t(arguments[L], e);
1338
- return e === f ? en(S) : jt(S), S;
1339
- }
1340
- var wt = !1;
1341
- function rn(e) {
1342
- var r = Ct.bind(null, e);
1343
- return r.type = e, wt || (wt = !0, be("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(r, "type", {
1344
- enumerable: !1,
1345
- get: function() {
1346
- return be("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
1347
- value: e
1348
- }), e;
1349
- }
1350
- }), r;
1351
- }
1352
- function tn(e, r, i) {
1353
- for (var c = Dr.apply(this, arguments), b = 2; b < arguments.length; b++)
1354
- _t(arguments[b], c.type);
1355
- return jt(c), c;
1356
- }
1357
- function nn(e, r) {
1358
- var i = K.transition;
1359
- K.transition = {};
1360
- var c = K.transition;
1361
- K.transition._updatedFibers = /* @__PURE__ */ new Set();
1362
- try {
1363
- e();
1364
- } finally {
1365
- if (K.transition = i, i === null && c._updatedFibers) {
1366
- var b = c._updatedFibers.size;
1367
- b > 10 && be("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."), c._updatedFibers.clear();
1368
- }
1369
- }
1370
- }
1371
- var Et = !1, Cr = null;
1372
- function an(e) {
1373
- if (Cr === null)
1374
- try {
1375
- var r = ("require" + Math.random()).slice(0, 7), i = o && o[r];
1376
- Cr = i.call(o, "timers").setImmediate;
1377
- } catch {
1378
- Cr = function(b) {
1379
- Et === !1 && (Et = !0, typeof MessageChannel > "u" && E("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
1380
- var R = new MessageChannel();
1381
- R.port1.onmessage = b, R.port2.postMessage(void 0);
1382
- };
1383
- }
1384
- return Cr(e);
1385
- }
1386
- var Ge = 0, Rt = !1;
1387
- function St(e) {
1388
- {
1389
- var r = Ge;
1390
- Ge++, X.current === null && (X.current = []);
1391
- var i = X.isBatchingLegacy, c;
1392
- try {
1393
- if (X.isBatchingLegacy = !0, c = e(), !i && X.didScheduleLegacyUpdate) {
1394
- var b = X.current;
1395
- b !== null && (X.didScheduleLegacyUpdate = !1, Xr(b));
1396
- }
1397
- } catch (re) {
1398
- throw wr(r), re;
1399
- } finally {
1400
- X.isBatchingLegacy = i;
1401
- }
1402
- if (c !== null && typeof c == "object" && typeof c.then == "function") {
1403
- var R = c, w = !1, S = {
1404
- then: function(re, se) {
1405
- w = !0, R.then(function(ce) {
1406
- wr(r), Ge === 0 ? Kr(ce, re, se) : re(ce);
1407
- }, function(ce) {
1408
- wr(r), se(ce);
1409
- });
1410
- }
1411
- };
1412
- return !Rt && typeof Promise < "u" && Promise.resolve().then(function() {
1413
- }).then(function() {
1414
- w || (Rt = !0, E("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
1415
- }), S;
1416
- } else {
1417
- var L = c;
1418
- if (wr(r), Ge === 0) {
1419
- var q = X.current;
1420
- q !== null && (Xr(q), X.current = null);
1421
- var Z = {
1422
- then: function(re, se) {
1423
- X.current === null ? (X.current = [], Kr(L, re, se)) : re(L);
1424
- }
1425
- };
1426
- return Z;
1427
- } else {
1428
- var Q = {
1429
- then: function(re, se) {
1430
- re(L);
1431
- }
1432
- };
1433
- return Q;
1434
- }
1435
- }
1436
- }
1437
- }
1438
- function wr(e) {
1439
- e !== Ge - 1 && E("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), Ge = e;
1440
- }
1441
- function Kr(e, r, i) {
1442
- {
1443
- var c = X.current;
1444
- if (c !== null)
1445
- try {
1446
- Xr(c), an(function() {
1447
- c.length === 0 ? (X.current = null, r(e)) : Kr(e, r, i);
1448
- });
1449
- } catch (b) {
1450
- i(b);
1451
- }
1452
- else
1453
- r(e);
1454
- }
1455
- }
1456
- var Jr = !1;
1457
- function Xr(e) {
1458
- if (!Jr) {
1459
- Jr = !0;
1460
- var r = 0;
1461
- try {
1462
- for (; r < e.length; r++) {
1463
- var i = e[r];
1464
- do
1465
- i = i(!0);
1466
- while (i !== null);
1467
- }
1468
- e.length = 0;
1469
- } catch (c) {
1470
- throw e = e.slice(r + 1), c;
1471
- } finally {
1472
- Jr = !1;
1473
- }
1474
- }
1475
- }
1476
- var on = Ct, sn = tn, ln = rn, un = {
1477
- map: ze,
1478
- forEach: Fr,
1479
- count: hr,
1480
- toArray: yr,
1481
- only: br
1482
- };
1483
- a.Children = un, a.Component = $, a.Fragment = f, a.Profiler = v, a.PureComponent = U, a.StrictMode = h, a.Suspense = _, a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = le, a.act = St, a.cloneElement = sn, a.createContext = Lr, a.createElement = on, a.createFactory = ln, a.createRef = Or, a.forwardRef = Ur, a.isValidElement = Re, a.lazy = Wr, a.memo = x, a.startTransition = nn, a.unstable_act = St, a.useCallback = he, a.useContext = B, a.useDebugValue = fe, a.useDeferredValue = Vr, a.useEffect = ue, a.useId = Yr, a.useImperativeHandle = we, a.useInsertionEffect = ee, a.useLayoutEffect = te, a.useMemo = ke, a.useReducer = D, a.useRef = P, a.useState = V, a.useSyncExternalStore = Yt, a.useTransition = nr, a.version = u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
1484
- }();
1485
- }(ir, ir.exports)), ir.exports;
1486
- }
1487
- var It;
1488
- function at() {
1489
- return It || (It = 1, process.env.NODE_ENV === "production" ? Tr.exports = Kn() : Tr.exports = Jn()), Tr.exports;
1490
- }
1491
- /**
1492
- * @license React
1493
- * react-jsx-runtime.production.min.js
1494
- *
1495
- * Copyright (c) Facebook, Inc. and its affiliates.
1496
- *
1497
- * This source code is licensed under the MIT license found in the
1498
- * LICENSE file in the root directory of this source tree.
1499
- */
1500
- var Dt;
1501
- function Xn() {
1502
- if (Dt) return or;
1503
- Dt = 1;
1504
- var o = at(), a = Symbol.for("react.element"), u = Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, d = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
1505
- function h(v, g, p) {
1506
- var j, _ = {}, O = null, T = null;
1507
- p !== void 0 && (O = "" + p), g.key !== void 0 && (O = "" + g.key), g.ref !== void 0 && (T = g.ref);
1508
- for (j in g) l.call(g, j) && !f.hasOwnProperty(j) && (_[j] = g[j]);
1509
- if (v && v.defaultProps) for (j in g = v.defaultProps, g) _[j] === void 0 && (_[j] = g[j]);
1510
- return { $$typeof: a, type: v, key: O, ref: T, props: _, _owner: d.current };
1511
- }
1512
- return or.Fragment = u, or.jsx = h, or.jsxs = h, or;
1513
- }
1514
- var sr = {};
1515
- /**
1516
- * @license React
1517
- * react-jsx-runtime.development.js
1518
- *
1519
- * Copyright (c) Facebook, Inc. and its affiliates.
1520
- *
1521
- * This source code is licensed under the MIT license found in the
1522
- * LICENSE file in the root directory of this source tree.
1523
- */
1524
- var $t;
1525
- function Zn() {
1526
- return $t || ($t = 1, process.env.NODE_ENV !== "production" && function() {
1527
- var o = at(), a = Symbol.for("react.element"), u = Symbol.for("react.portal"), l = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), v = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), k = Symbol.iterator, ae = "@@iterator";
1528
- function de(t) {
1529
- if (t === null || typeof t != "object")
1530
- return null;
1531
- var m = k && t[k] || t[ae];
1532
- return typeof m == "function" ? m : null;
1533
- }
1534
- var A = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1535
- function Y(t) {
1536
- {
1537
- for (var m = arguments.length, x = new Array(m > 1 ? m - 1 : 0), C = 1; C < m; C++)
1538
- x[C - 1] = arguments[C];
1539
- ge("error", t, x);
1540
- }
1541
- }
1542
- function ge(t, m, x) {
1543
- {
1544
- var C = A.ReactDebugCurrentFrame, B = C.getStackAddendum();
1545
- B !== "" && (m += "%s", x = x.concat([B]));
1546
- var V = x.map(function(D) {
1547
- return String(D);
1548
- });
1549
- V.unshift("Warning: " + m), Function.prototype.apply.call(console[t], console, V);
1550
- }
1551
- }
1552
- var K = !1, X = !1, ie = !1, pe = !1, je = !1, Te;
1553
- Te = Symbol.for("react.module.reference");
1554
- function Oe(t) {
1555
- return !!(typeof t == "string" || typeof t == "function" || t === l || t === f || je || t === d || t === p || t === j || pe || t === T || K || X || ie || typeof t == "object" && t !== null && (t.$$typeof === O || t.$$typeof === _ || t.$$typeof === h || t.$$typeof === v || t.$$typeof === g || // This needs to include all possible module reference object
1556
- // types supported by any Flight configuration anywhere since
1557
- // we don't know which Flight build this will end up being used
1558
- // with.
1559
- t.$$typeof === Te || t.getModuleId !== void 0));
1560
- }
1561
- function Je(t, m, x) {
1562
- var C = t.displayName;
1563
- if (C)
1564
- return C;
1565
- var B = m.displayName || m.name || "";
1566
- return B !== "" ? x + "(" + B + ")" : x;
1567
- }
1568
- function Pe(t) {
1569
- return t.displayName || "Context";
1570
- }
1571
- function ve(t) {
1572
- if (t == null)
1573
- return null;
1574
- if (typeof t.tag == "number" && Y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
1575
- return t.displayName || t.name || null;
1576
- if (typeof t == "string")
1577
- return t;
1578
- switch (t) {
1579
- case l:
1580
- return "Fragment";
1581
- case u:
1582
- return "Portal";
1583
- case f:
1584
- return "Profiler";
1585
- case d:
1586
- return "StrictMode";
1587
- case p:
1588
- return "Suspense";
1589
- case j:
1590
- return "SuspenseList";
1591
- }
1592
- if (typeof t == "object")
1593
- switch (t.$$typeof) {
1594
- case v:
1595
- var m = t;
1596
- return Pe(m) + ".Consumer";
1597
- case h:
1598
- var x = t;
1599
- return Pe(x._context) + ".Provider";
1600
- case g:
1601
- return Je(t, t.render, "ForwardRef");
1602
- case _:
1603
- var C = t.displayName || null;
1604
- return C !== null ? C : ve(t.type) || "Memo";
1605
- case O: {
1606
- var B = t, V = B._payload, D = B._init;
1607
- try {
1608
- return ve(D(V));
1609
- } catch {
1610
- return null;
1611
- }
1612
- }
1613
- }
1614
- return null;
1615
- }
1616
- var me = Object.assign, le = 0, be, E, xe, Ne, Ce, s, y;
1617
- function I() {
1618
- }
1619
- I.__reactDisabledLog = !0;
1620
- function $() {
1621
- {
1622
- if (le === 0) {
1623
- be = console.log, E = console.info, xe = console.warn, Ne = console.error, Ce = console.group, s = console.groupCollapsed, y = console.groupEnd;
1624
- var t = {
1625
- configurable: !0,
1626
- enumerable: !0,
1627
- value: I,
1628
- writable: !0
1629
- };
1630
- Object.defineProperties(console, {
1631
- info: t,
1632
- log: t,
1633
- warn: t,
1634
- error: t,
1635
- group: t,
1636
- groupCollapsed: t,
1637
- groupEnd: t
1638
- });
1639
- }
1640
- le++;
1641
- }
1642
- }
1643
- function M() {
1644
- {
1645
- if (le--, le === 0) {
1646
- var t = {
1647
- configurable: !0,
1648
- enumerable: !0,
1649
- writable: !0
1650
- };
1651
- Object.defineProperties(console, {
1652
- log: me({}, t, {
1653
- value: be
1654
- }),
1655
- info: me({}, t, {
1656
- value: E
1657
- }),
1658
- warn: me({}, t, {
1659
- value: xe
1660
- }),
1661
- error: me({}, t, {
1662
- value: Ne
1663
- }),
1664
- group: me({}, t, {
1665
- value: Ce
1666
- }),
1667
- groupCollapsed: me({}, t, {
1668
- value: s
1669
- }),
1670
- groupEnd: me({}, t, {
1671
- value: y
1672
- })
1673
- });
1674
- }
1675
- le < 0 && Y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1676
- }
1677
- }
1678
- var J = A.ReactCurrentDispatcher, H;
1679
- function z(t, m, x) {
1680
- {
1681
- if (H === void 0)
1682
- try {
1683
- throw Error();
1684
- } catch (B) {
1685
- var C = B.stack.trim().match(/\n( *(at )?)/);
1686
- H = C && C[1] || "";
1687
- }
1688
- return `
1689
- ` + H + t;
1690
- }
1691
- }
1692
- var U = !1, oe;
1693
- {
1694
- var Or = typeof WeakMap == "function" ? WeakMap : Map;
1695
- oe = new Or();
1696
- }
1697
- function ur(t, m) {
1698
- if (!t || U)
1699
- return "";
1700
- {
1701
- var x = oe.get(t);
1702
- if (x !== void 0)
1703
- return x;
1704
- }
1705
- var C;
1706
- U = !0;
1707
- var B = Error.prepareStackTrace;
1708
- Error.prepareStackTrace = void 0;
1709
- var V;
1710
- V = J.current, J.current = null, $();
1711
- try {
1712
- if (m) {
1713
- var D = function() {
1714
- throw Error();
1715
- };
1716
- if (Object.defineProperty(D.prototype, "props", {
1717
- set: function() {
1718
- throw Error();
1719
- }
1720
- }), typeof Reflect == "object" && Reflect.construct) {
1721
- try {
1722
- Reflect.construct(D, []);
1723
- } catch (fe) {
1724
- C = fe;
1725
- }
1726
- Reflect.construct(t, [], D);
1727
- } else {
1728
- try {
1729
- D.call();
1730
- } catch (fe) {
1731
- C = fe;
1732
- }
1733
- t.call(D.prototype);
1734
- }
1735
- } else {
1736
- try {
1737
- throw Error();
1738
- } catch (fe) {
1739
- C = fe;
1740
- }
1741
- t();
1742
- }
1743
- } catch (fe) {
1744
- if (fe && C && typeof fe.stack == "string") {
1745
- for (var P = fe.stack.split(`
1746
- `), ue = C.stack.split(`
1747
- `), ee = P.length - 1, te = ue.length - 1; ee >= 1 && te >= 0 && P[ee] !== ue[te]; )
1748
- te--;
1749
- for (; ee >= 1 && te >= 0; ee--, te--)
1750
- if (P[ee] !== ue[te]) {
1751
- if (ee !== 1 || te !== 1)
1752
- do
1753
- if (ee--, te--, te < 0 || P[ee] !== ue[te]) {
1754
- var he = `
1755
- ` + P[ee].replace(" at new ", " at ");
1756
- return t.displayName && he.includes("<anonymous>") && (he = he.replace("<anonymous>", t.displayName)), typeof t == "function" && oe.set(t, he), he;
1757
- }
1758
- while (ee >= 1 && te >= 0);
1759
- break;
1760
- }
1761
- }
1762
- } finally {
1763
- U = !1, J.current = V, M(), Error.prepareStackTrace = B;
1764
- }
1765
- var ke = t ? t.displayName || t.name : "", we = ke ? z(ke) : "";
1766
- return typeof t == "function" && oe.set(t, we), we;
1767
- }
1768
- function Be(t, m, x) {
1769
- return ur(t, !1);
1770
- }
1771
- function Pr(t) {
1772
- var m = t.prototype;
1773
- return !!(m && m.isReactComponent);
1774
- }
1775
- function We(t, m, x) {
1776
- if (t == null)
1777
- return "";
1778
- if (typeof t == "function")
1779
- return ur(t, Pr(t));
1780
- if (typeof t == "string")
1781
- return z(t);
1782
- switch (t) {
1783
- case p:
1784
- return z("Suspense");
1785
- case j:
1786
- return z("SuspenseList");
1787
- }
1788
- if (typeof t == "object")
1789
- switch (t.$$typeof) {
1790
- case g:
1791
- return Be(t.render);
1792
- case _:
1793
- return We(t.type, m, x);
1794
- case O: {
1795
- var C = t, B = C._payload, V = C._init;
1796
- try {
1797
- return We(V(B), m, x);
1798
- } catch {
1799
- }
1800
- }
1801
- }
1802
- return "";
1803
- }
1804
- var Ee = Object.prototype.hasOwnProperty, Ae = {}, cr = A.ReactDebugCurrentFrame;
1805
- function Ie(t) {
1806
- if (t) {
1807
- var m = t._owner, x = We(t.type, t._source, m ? m.type : null);
1808
- cr.setExtraStackFrame(x);
1809
- } else
1810
- cr.setExtraStackFrame(null);
1811
- }
1812
- function _e(t, m, x, C, B) {
1813
- {
1814
- var V = Function.call.bind(Ee);
1815
- for (var D in t)
1816
- if (V(t, D)) {
1817
- var P = void 0;
1818
- try {
1819
- if (typeof t[D] != "function") {
1820
- var ue = Error((C || "React class") + ": " + x + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1821
- throw ue.name = "Invariant Violation", ue;
1822
- }
1823
- P = t[D](m, D, C, x, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1824
- } catch (ee) {
1825
- P = ee;
1826
- }
1827
- P && !(P instanceof Error) && (Ie(B), Y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", x, D, typeof P), Ie(null)), P instanceof Error && !(P.message in Ae) && (Ae[P.message] = !0, Ie(B), Y("Failed %s type: %s", x, P.message), Ie(null));
1828
- }
1829
- }
1830
- }
1831
- var De = Array.isArray;
1832
- function Ue(t) {
1833
- return De(t);
1834
- }
1835
- function fr(t) {
1836
- {
1837
- var m = typeof Symbol == "function" && Symbol.toStringTag, x = m && t[Symbol.toStringTag] || t.constructor.name || "Object";
1838
- return x;
1839
- }
1840
- }
1841
- function dr(t) {
1842
- try {
1843
- return Ve(t), !1;
1844
- } catch {
1845
- return !0;
1846
- }
1847
- }
1848
- function Ve(t) {
1849
- return "" + t;
1850
- }
1851
- function Xe(t) {
1852
- if (dr(t))
1853
- return Y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", fr(t)), Ve(t);
1854
- }
1855
- var Ze = A.ReactCurrentOwner, Nr = {
1856
- key: !0,
1857
- ref: !0,
1858
- __self: !0,
1859
- __source: !0
1860
- }, pr, vr;
1861
- function Qe(t) {
1862
- if (Ee.call(t, "ref")) {
1863
- var m = Object.getOwnPropertyDescriptor(t, "ref").get;
1864
- if (m && m.isReactWarning)
1865
- return !1;
1866
- }
1867
- return t.ref !== void 0;
1868
- }
1869
- function Ar(t) {
1870
- if (Ee.call(t, "key")) {
1871
- var m = Object.getOwnPropertyDescriptor(t, "key").get;
1872
- if (m && m.isReactWarning)
1873
- return !1;
1874
- }
1875
- return t.key !== void 0;
1876
- }
1877
- function Ir(t, m) {
1878
- typeof t.ref == "string" && Ze.current;
1879
- }
1880
- function Dr(t, m) {
1881
- {
1882
- var x = function() {
1883
- pr || (pr = !0, Y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
1884
- };
1885
- x.isReactWarning = !0, Object.defineProperty(t, "key", {
1886
- get: x,
1887
- configurable: !0
1888
- });
1889
- }
1890
- }
1891
- function Re(t, m) {
1892
- {
1893
- var x = function() {
1894
- vr || (vr = !0, Y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
1895
- };
1896
- x.isReactWarning = !0, Object.defineProperty(t, "ref", {
1897
- get: x,
1898
- configurable: !0
1899
- });
1900
- }
1901
- }
1902
- var mr = function(t, m, x, C, B, V, D) {
1903
- var P = {
1904
- // This tag allows us to uniquely identify this as a React Element
1905
- $$typeof: a,
1906
- // Built-in properties that belong on the element
1907
- type: t,
1908
- key: m,
1909
- ref: x,
1910
- props: D,
1911
- // Record the component responsible for creating this element.
1912
- _owner: V
1913
- };
1914
- return P._store = {}, Object.defineProperty(P._store, "validated", {
1915
- configurable: !1,
1916
- enumerable: !1,
1917
- writable: !0,
1918
- value: !1
1919
- }), Object.defineProperty(P, "_self", {
1920
- configurable: !1,
1921
- enumerable: !1,
1922
- writable: !1,
1923
- value: C
1924
- }), Object.defineProperty(P, "_source", {
1925
- configurable: !1,
1926
- enumerable: !1,
1927
- writable: !1,
1928
- value: B
1929
- }), Object.freeze && (Object.freeze(P.props), Object.freeze(P)), P;
1930
- };
1931
- function $r(t, m, x, C, B) {
1932
- {
1933
- var V, D = {}, P = null, ue = null;
1934
- x !== void 0 && (Xe(x), P = "" + x), Ar(m) && (Xe(m.key), P = "" + m.key), Qe(m) && (ue = m.ref, Ir(m, B));
1935
- for (V in m)
1936
- Ee.call(m, V) && !Nr.hasOwnProperty(V) && (D[V] = m[V]);
1937
- if (t && t.defaultProps) {
1938
- var ee = t.defaultProps;
1939
- for (V in ee)
1940
- D[V] === void 0 && (D[V] = ee[V]);
1941
- }
1942
- if (P || ue) {
1943
- var te = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
1944
- P && Dr(D, te), ue && Re(D, te);
1945
- }
1946
- return mr(t, P, ue, B, C, Ze.current, D);
1947
- }
1948
- }
1949
- var er = A.ReactCurrentOwner, rr = A.ReactDebugCurrentFrame;
1950
- function Se(t) {
1951
- if (t) {
1952
- var m = t._owner, x = We(t.type, t._source, m ? m.type : null);
1953
- rr.setExtraStackFrame(x);
1954
- } else
1955
- rr.setExtraStackFrame(null);
1956
- }
1957
- var Ye;
1958
- Ye = !1;
1959
- function $e(t) {
1960
- return typeof t == "object" && t !== null && t.$$typeof === a;
1961
- }
1962
- function Fe() {
1963
- {
1964
- if (er.current) {
1965
- var t = ve(er.current.type);
1966
- if (t)
1967
- return `
1968
-
1969
- Check the render method of \`` + t + "`.";
1970
- }
1971
- return "";
1972
- }
1973
- }
1974
- function ze(t) {
1975
- return "";
1976
- }
1977
- var hr = {};
1978
- function Fr(t) {
1979
- {
1980
- var m = Fe();
1981
- if (!m) {
1982
- var x = typeof t == "string" ? t : t.displayName || t.name;
1983
- x && (m = `
1984
-
1985
- Check the top-level render call using <` + x + ">.");
1986
- }
1987
- return m;
1988
- }
1989
- }
1990
- function yr(t, m) {
1991
- {
1992
- if (!t._store || t._store.validated || t.key != null)
1993
- return;
1994
- t._store.validated = !0;
1995
- var x = Fr(m);
1996
- if (hr[x])
1997
- return;
1998
- hr[x] = !0;
1999
- var C = "";
2000
- t && t._owner && t._owner !== er.current && (C = " It was passed a child from " + ve(t._owner.type) + "."), Se(t), Y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, C), Se(null);
2001
- }
2002
- }
2003
- function br(t, m) {
2004
- {
2005
- if (typeof t != "object")
2006
- return;
2007
- if (Ue(t))
2008
- for (var x = 0; x < t.length; x++) {
2009
- var C = t[x];
2010
- $e(C) && yr(C, m);
2011
- }
2012
- else if ($e(t))
2013
- t._store && (t._store.validated = !0);
2014
- else if (t) {
2015
- var B = de(t);
2016
- if (typeof B == "function" && B !== t.entries)
2017
- for (var V = B.call(t), D; !(D = V.next()).done; )
2018
- $e(D.value) && yr(D.value, m);
2019
- }
2020
- }
2021
- }
2022
- function Lr(t) {
2023
- {
2024
- var m = t.type;
2025
- if (m == null || typeof m == "string")
2026
- return;
2027
- var x;
2028
- if (typeof m == "function")
2029
- x = m.propTypes;
2030
- else if (typeof m == "object" && (m.$$typeof === g || // Note: Memo only checks outer props here.
2031
- // Inner props are checked in the reconciler.
2032
- m.$$typeof === _))
2033
- x = m.propTypes;
2034
- else
2035
- return;
2036
- if (x) {
2037
- var C = ve(m);
2038
- _e(x, t.props, "prop", C, t);
2039
- } else if (m.PropTypes !== void 0 && !Ye) {
2040
- Ye = !0;
2041
- var B = ve(m);
2042
- Y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", B || "Unknown");
2043
- }
2044
- typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && Y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2045
- }
2046
- }
2047
- function Le(t) {
2048
- {
2049
- for (var m = Object.keys(t.props), x = 0; x < m.length; x++) {
2050
- var C = m[x];
2051
- if (C !== "children" && C !== "key") {
2052
- Se(t), Y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), Se(null);
2053
- break;
2054
- }
2055
- }
2056
- t.ref !== null && (Se(t), Y("Invalid attribute `ref` supplied to `React.Fragment`."), Se(null));
2057
- }
2058
- }
2059
- var He = {};
2060
- function tr(t, m, x, C, B, V) {
2061
- {
2062
- var D = Oe(t);
2063
- if (!D) {
2064
- var P = "";
2065
- (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2066
- var ue = ze();
2067
- ue ? P += ue : P += Fe();
2068
- var ee;
2069
- t === null ? ee = "null" : Ue(t) ? ee = "array" : t !== void 0 && t.$$typeof === a ? (ee = "<" + (ve(t.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : ee = typeof t, Y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ee, P);
2070
- }
2071
- var te = $r(t, m, x, B, V);
2072
- if (te == null)
2073
- return te;
2074
- if (D) {
2075
- var he = m.children;
2076
- if (he !== void 0)
2077
- if (C)
2078
- if (Ue(he)) {
2079
- for (var ke = 0; ke < he.length; ke++)
2080
- br(he[ke], t);
2081
- Object.freeze && Object.freeze(he);
2082
- } else
2083
- Y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2084
- else
2085
- br(he, t);
2086
- }
2087
- if (Ee.call(m, "key")) {
2088
- var we = ve(t), fe = Object.keys(m).filter(function(Yr) {
2089
- return Yr !== "key";
2090
- }), nr = fe.length > 0 ? "{key: someKey, " + fe.join(": ..., ") + ": ...}" : "{key: someKey}";
2091
- if (!He[we + nr]) {
2092
- var Vr = fe.length > 0 ? "{" + fe.join(": ..., ") + ": ...}" : "{}";
2093
- Y(`A props object containing a "key" prop is being spread into JSX:
2094
- let props = %s;
2095
- <%s {...props} />
2096
- React keys must be passed directly to JSX without using spread:
2097
- let props = %s;
2098
- <%s key={someKey} {...props} />`, nr, we, Vr, we), He[we + nr] = !0;
2099
- }
2100
- }
2101
- return t === l ? Le(te) : Lr(te), te;
2102
- }
2103
- }
2104
- function Mr(t, m, x) {
2105
- return tr(t, m, x, !0);
2106
- }
2107
- function Br(t, m, x) {
2108
- return tr(t, m, x, !1);
2109
- }
2110
- var Wr = Br, Ur = Mr;
2111
- sr.Fragment = l, sr.jsx = Wr, sr.jsxs = Ur;
2112
- }()), sr;
2113
- }
2114
- var Ft;
2115
- function Qn() {
2116
- return Ft || (Ft = 1, process.env.NODE_ENV === "production" ? kr.exports = Xn() : kr.exports = Zn()), kr.exports;
2117
- }
2118
- var n = Qn();
2119
- at();
2120
- var et = { exports: {} };
11
+ var H = { exports: {} };
2121
12
  /*!
2122
13
  Copyright (c) 2018 Jed Watson.
2123
14
  Licensed under the MIT License (MIT), see
2124
15
  http://jedwatson.github.io/classnames
2125
16
  */
2126
- var Lt;
2127
- function ea() {
2128
- return Lt || (Lt = 1, function(o) {
17
+ var I;
18
+ function Ce() {
19
+ return I || (I = 1, function(e) {
2129
20
  (function() {
2130
- var a = {}.hasOwnProperty;
2131
- function u() {
2132
- for (var f = "", h = 0; h < arguments.length; h++) {
2133
- var v = arguments[h];
2134
- v && (f = d(f, l(v)));
21
+ var t = {}.hasOwnProperty;
22
+ function l() {
23
+ for (var r = "", s = 0; s < arguments.length; s++) {
24
+ var c = arguments[s];
25
+ c && (r = n(r, a(c)));
2135
26
  }
2136
- return f;
27
+ return r;
2137
28
  }
2138
- function l(f) {
2139
- if (typeof f == "string" || typeof f == "number")
2140
- return f;
2141
- if (typeof f != "object")
29
+ function a(r) {
30
+ if (typeof r == "string" || typeof r == "number")
31
+ return r;
32
+ if (typeof r != "object")
2142
33
  return "";
2143
- if (Array.isArray(f))
2144
- return u.apply(null, f);
2145
- if (f.toString !== Object.prototype.toString && !f.toString.toString().includes("[native code]"))
2146
- return f.toString();
2147
- var h = "";
2148
- for (var v in f)
2149
- a.call(f, v) && f[v] && (h = d(h, v));
2150
- return h;
2151
- }
2152
- function d(f, h) {
2153
- return h ? f ? f + " " + h : f + h : f;
2154
- }
2155
- o.exports ? (u.default = u, o.exports = u) : window.classNames = u;
34
+ if (Array.isArray(r))
35
+ return l.apply(null, r);
36
+ if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
37
+ return r.toString();
38
+ var s = "";
39
+ for (var c in r)
40
+ t.call(r, c) && r[c] && (s = n(s, c));
41
+ return s;
42
+ }
43
+ function n(r, s) {
44
+ return s ? r ? r + " " + s : r + s : r;
45
+ }
46
+ e.exports ? (l.default = l, e.exports = l) : window.classNames = l;
2156
47
  })();
2157
- }(et)), et.exports;
48
+ }(H)), H.exports;
2158
49
  }
2159
- var ra = ea();
2160
- const W = /* @__PURE__ */ Gn(ra), ne = ({
2161
- children: o,
2162
- className: a,
2163
- important: u = !1,
2164
- onClick: l
2165
- }) => u ? /* @__PURE__ */ n.jsx("div", { className: "bb_", onClick: l, children: /* @__PURE__ */ n.jsx("div", { className: a, children: o }) }) : /* @__PURE__ */ n.jsx("div", { className: a, children: o }), Ke = ({ icon: o, className: a = "" }) => o ? /* @__PURE__ */ n.jsxs(ne, { className: "blockbite--icon", children: [
2166
- /* @__PURE__ */ n.jsx(o, { className: a }),
2167
- " "
2168
- ] }) : null, ta = tt(
50
+ var be = Ce();
51
+ const p = /* @__PURE__ */ he(be), v = ({ icon: e, ...t }) => e ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--icon" }, /* @__PURE__ */ React.createElement(e, { ...t })) : null, xe = V(
2169
52
  ({
2170
- children: o,
2171
- className: a,
2172
- value: u,
2173
- variant: l = "secondary",
2174
- defaultPressed: d,
2175
- onPressedChange: f,
2176
- icon: h,
2177
- size: v = "compact",
2178
- display: g = "auto",
2179
- label: p
53
+ children: e,
54
+ className: t,
55
+ value: l,
56
+ variant: a = "secondary",
57
+ pressed: n,
58
+ onPressedChange: r,
59
+ icon: s,
60
+ size: c = "compact",
61
+ display: i = "auto",
62
+ label: o
2180
63
  }) => {
2181
- const [j, _] = F(!1);
2182
- G(() => {
2183
- _(d === u);
2184
- }, [d]);
2185
- const O = Mt(() => {
2186
- _((T) => !T), f(u);
2187
- }, [j, f]);
2188
- return /* @__PURE__ */ n.jsxs(
2189
- ye,
64
+ const f = j(() => {
65
+ r(l);
66
+ }, [r, l]);
67
+ return /* @__PURE__ */ React.createElement(
68
+ C,
2190
69
  {
2191
- "aria-label": p,
2192
- className: W(a, "blockbite-ui__button--default"),
2193
- value: u,
2194
- size: v,
2195
- label: p,
2196
- variant: l,
70
+ "aria-label": o,
71
+ className: p(t, "blockbite-ui__button--default"),
72
+ value: l,
73
+ size: c,
74
+ label: o,
75
+ variant: a,
2197
76
  showTooltip: !0,
2198
- isPressed: j,
2199
- onClick: O,
2200
- children: [
2201
- h && /* @__PURE__ */ n.jsx(Ke, { icon: h }),
2202
- g !== "icon" ? o : null,
2203
- p && !o && g !== "icon" ? /* @__PURE__ */ n.jsx("span", { children: p }) : null
2204
- ]
2205
- }
77
+ isPressed: n,
78
+ onClick: f
79
+ },
80
+ s && /* @__PURE__ */ React.createElement(v, { icon: s }),
81
+ i !== "icon" ? e : null,
82
+ o && !e && i !== "icon" ? /* @__PURE__ */ React.createElement("span", null, o) : null
2206
83
  );
2207
84
  }
2208
- ), na = tt(
85
+ ), we = V(
2209
86
  ({
2210
- className: o,
2211
- defaultPressed: a = "",
2212
- toggle: u = !0,
2213
- display: l = "auto",
2214
- options: d,
2215
- size: f = "compact",
2216
- tabs: h = !1,
2217
- variant: v = "secondary",
2218
- stretch: g = !1,
2219
- onPressedChange: p
87
+ className: e,
88
+ value: t,
89
+ toggle: l = !0,
90
+ display: a = "auto",
91
+ options: n,
92
+ size: r = "compact",
93
+ tabs: s = !1,
94
+ variant: c = "secondary",
95
+ stretch: i = !1,
96
+ onPressedChange: o
2220
97
  }) => {
2221
- const [j, _] = F(a);
2222
- G(() => {
2223
- _(a);
2224
- }, [a]);
2225
- const O = Mt(
2226
- (k) => {
2227
- const ae = u && j === k ? "" : k;
2228
- _(ae), p?.(ae);
98
+ const f = j(
99
+ (m) => {
100
+ const u = l && t === m ? "" : m;
101
+ o == null || o(u);
2229
102
  },
2230
- [j, p, u]
2231
- ), T = (k) => l === "icon" && k?.icon ? /* @__PURE__ */ n.jsx(Ke, { icon: k.icon }) : l === "label" ? /* @__PURE__ */ n.jsx("span", { children: k.label }) : /* @__PURE__ */ n.jsxs("span", { className: "flex items-center justify-center gap-1", children: [
2232
- k.icon && /* @__PURE__ */ n.jsx(Ke, { icon: k.icon }),
2233
- /* @__PURE__ */ n.jsx("span", { children: k.label })
2234
- ] });
2235
- return /* @__PURE__ */ n.jsx(
2236
- ne,
103
+ [o, l, t]
104
+ ), d = (m) => a === "icon" && (m != null && m.icon) ? /* @__PURE__ */ React.createElement(v, { icon: m.icon }) : a === "label" ? /* @__PURE__ */ React.createElement("span", null, m.label) : /* @__PURE__ */ React.createElement("span", { className: "flex items-center justify-center gap-1" }, m.icon && /* @__PURE__ */ React.createElement(v, { icon: m.icon }), /* @__PURE__ */ React.createElement("span", null, m.label));
105
+ return /* @__PURE__ */ React.createElement(
106
+ "div",
2237
107
  {
2238
- className: W(
108
+ className: p(
2239
109
  "blockbite-ui__button-group flex flex-wrap gap-1",
2240
- o,
2241
- h ? "blockbite-ui__button-group--tabs" : ""
2242
- ),
2243
- children: d.map((k, ae) => /* @__PURE__ */ n.jsxs(
2244
- ye,
2245
- {
2246
- className: W("blockbite-ui__button--default", {
2247
- grow: g,
2248
- "justify-center": g
2249
- }),
2250
- "aria-label": k.label,
2251
- showTooltip: !0,
2252
- value: k.value,
2253
- size: f,
2254
- label: k?.tooltip || k.label,
2255
- variant: v,
2256
- isPressed: j === k.value,
2257
- onClick: () => O(k.value),
2258
- children: [
2259
- T(k),
2260
- k.children && k.children
2261
- ]
2262
- },
2263
- `ButtonToggleGroup__${k.value}__${k.label}__${ae}`
2264
- ))
2265
- }
110
+ e,
111
+ s ? "blockbite-ui__button-group--tabs" : ""
112
+ )
113
+ },
114
+ n.map((m, u) => /* @__PURE__ */ React.createElement(
115
+ C,
116
+ {
117
+ key: `ButtonToggleGroup__${m.value}__${m.label}__${u}`,
118
+ className: p("blockbite-ui__button--default", {
119
+ grow: i,
120
+ "justify-center": i
121
+ }),
122
+ "aria-label": m.label,
123
+ showTooltip: !0,
124
+ value: m.value,
125
+ size: r,
126
+ label: (m == null ? void 0 : m.tooltip) || m.label,
127
+ variant: c,
128
+ isPressed: t === m.value,
129
+ onClick: () => f(m.value)
130
+ },
131
+ d(m),
132
+ m.children && m.children
133
+ ))
2266
134
  );
2267
135
  }
2268
- );
2269
- function Sa({
2270
- defaultValue: o,
2271
- options: a,
2272
- swatch: u,
2273
- onPressedChange: l
136
+ ), E = ({
137
+ children: e,
138
+ className: t,
139
+ important: l = !1,
140
+ onClick: a
141
+ }) => l ? /* @__PURE__ */ React.createElement("div", { onClick: a }, /* @__PURE__ */ React.createElement("div", { className: t }, e)) : /* @__PURE__ */ React.createElement("div", { className: t }, e);
142
+ function at({
143
+ value: e,
144
+ options: t,
145
+ swatch: l,
146
+ onPressedChange: a
2274
147
  }) {
2275
- const [d, f] = F(""), [h, v] = F([]);
2276
- return G(() => {
2277
- v(
2278
- a.filter(
2279
- (g) => g.label.toLowerCase().includes(d.toLowerCase())
148
+ const [n, r] = g(""), [s, c] = g([]);
149
+ return R(() => {
150
+ c(
151
+ t.filter(
152
+ (i) => i.label.toLowerCase().includes(n.toLowerCase())
2280
153
  )
2281
154
  );
2282
- }, [d, a]), G(() => {
2283
- f(""), v(a);
2284
- }, [o, a]), /* @__PURE__ */ n.jsx(
2285
- pn,
155
+ }, [n, t]), R(() => {
156
+ r(""), c(t);
157
+ }, [e, t]), /* @__PURE__ */ React.createElement(
158
+ X,
2286
159
  {
2287
160
  className: "option-panel-dropdown",
2288
161
  contentClassName: "option-panel-dropdown-content",
2289
162
  popoverProps: { placement: "bottom-start" },
2290
- renderToggle: ({ isOpen: g, onToggle: p }) => /* @__PURE__ */ n.jsx(ne, { important: !0, children: /* @__PURE__ */ n.jsx(
2291
- ye,
163
+ renderToggle: ({ isOpen: i, onToggle: o }) => /* @__PURE__ */ React.createElement(E, { important: !0 }, /* @__PURE__ */ React.createElement(
164
+ C,
2292
165
  {
2293
166
  variant: "secondary",
2294
167
  size: "small",
2295
- onClick: p,
2296
- "aria-expanded": g,
2297
- children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-1.5 !bg-transparent !p-0 !text-[11px] !text-current", children: [
2298
- u && !!o && /* @__PURE__ */ n.jsx(
2299
- "div",
2300
- {
2301
- className: W(
2302
- `h-3 w-3 rounded-full bg-${o}`
2303
- )
2304
- }
2305
- ),
2306
- /* @__PURE__ */ n.jsx("span", { children: o || "Select option…" })
2307
- ] })
2308
- }
2309
- ) }),
2310
- renderContent: () => /* @__PURE__ */ n.jsx(ne, { important: !0, children: /* @__PURE__ */ n.jsxs("div", { className: "w-52", children: [
2311
- /* @__PURE__ */ n.jsx(
2312
- rt,
168
+ onClick: o,
169
+ "aria-expanded": i
170
+ },
171
+ /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-1.5 !bg-transparent !p-0 !text-[11px] !text-current" }, l && !!e && /* @__PURE__ */ React.createElement(
172
+ "div",
2313
173
  {
2314
- __next40pxDefaultSize: !0,
2315
- __nextHasNoMarginBottom: !0,
2316
- label: "Search options",
2317
- value: d,
2318
- onChange: (g) => f(g),
2319
- autoComplete: "off"
174
+ className: p(`h-3 w-3 rounded-full bg-${e}`)
175
+ }
176
+ ), /* @__PURE__ */ React.createElement("span", null, e || "Select option…"))
177
+ )),
178
+ renderContent: () => /* @__PURE__ */ React.createElement(E, { important: !0 }, /* @__PURE__ */ React.createElement("div", { className: "w-52" }, /* @__PURE__ */ React.createElement(
179
+ B,
180
+ {
181
+ __next40pxDefaultSize: !0,
182
+ __nextHasNoMarginBottom: !0,
183
+ label: "Search options",
184
+ value: n,
185
+ onChange: (i) => r(i),
186
+ autoComplete: "off"
187
+ }
188
+ ), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-2 gap-1 !bg-transparent p-0 !pt-2" }, s.length === 0 && /* @__PURE__ */ React.createElement("div", { className: "!text-gray-medium col-span-2 pb-2 text-center !text-[11px]" }, "No options found."), s.map((i, o) => /* @__PURE__ */ React.createElement(
189
+ xe,
190
+ {
191
+ key: `ButtonToggle__${i.value}___${o}`,
192
+ className: p({
193
+ "bg-primary": i.value
194
+ }),
195
+ size: "small",
196
+ value: i.value.toString(),
197
+ pressed: e === i.value,
198
+ onPressedChange: (f) => {
199
+ a(f ? i.value : "");
200
+ }
201
+ },
202
+ l && /* @__PURE__ */ React.createElement(
203
+ "div",
204
+ {
205
+ className: p(
206
+ `mr-3 h-3 w-3 rounded-full bg-${i.value}`
207
+ )
2320
208
  }
2321
209
  ),
2322
- /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-2 gap-1 !bg-transparent p-0 !pt-2", children: [
2323
- h.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "!text-gray-medium col-span-2 pb-2 text-center !text-[11px]", children: "No options found." }),
2324
- h.map((g, p) => /* @__PURE__ */ n.jsxs(
2325
- ta,
2326
- {
2327
- className: W({
2328
- "bg-primary": g.value
2329
- }),
2330
- size: "small",
2331
- value: g.value.toString(),
2332
- defaultPressed: o,
2333
- onPressedChange: (j) => {
2334
- l(j ? g.value : "");
2335
- },
2336
- children: [
2337
- u && /* @__PURE__ */ n.jsx(
2338
- "div",
2339
- {
2340
- className: W(
2341
- `mr-3 h-3 w-3 rounded-full bg-${g.value}`
2342
- )
2343
- }
2344
- ),
2345
- g.label
2346
- ]
2347
- },
2348
- `ButtonToggle__${g.value}___${p}`
2349
- ))
2350
- ] })
2351
- ] }) })
210
+ i.label
211
+ )))))
2352
212
  }
2353
213
  );
2354
214
  }
2355
- const aa = ({ children: o, className: a, label: u, onClick: l }) => /* @__PURE__ */ n.jsxs(
215
+ const ve = ({ children: e, className: t, label: l, onClick: a }) => /* @__PURE__ */ React.createElement(
2356
216
  "div",
2357
217
  {
2358
- onClick: l,
2359
- className: W(
2360
- a,
218
+ onClick: a,
219
+ className: p(
220
+ t,
2361
221
  "inline-flex items-center rounded-full bg-blue-100 px-2.5 py-0.5 text-xs font-medium text-blue-800"
2362
- ),
2363
- children: [
2364
- u && /* @__PURE__ */ n.jsx("span", { className: "mr-1 text-xs font-semibold text-gray-700", children: u }),
2365
- o
2366
- ]
2367
- }
2368
- ), ka = ({ htmlContent: o, cssContent: a, frontendAssets: u }) => {
2369
- const l = lr(null), [d, f] = F(null);
2370
- return G(() => {
2371
- const h = l.current;
2372
- return h && (h.onload = () => {
2373
- const v = h.contentDocument || h.contentWindow.document;
2374
- if (v) {
2375
- f(v.body);
2376
- const g = v.createElement("style");
2377
- g.innerHTML = a, v.head.appendChild(g), u.forEach(({ type: p, id: j, url: _ }) => {
2378
- const O = document.getElementById(j);
2379
- if (O) {
2380
- const T = document.adoptNode(
2381
- O.cloneNode(!0)
222
+ )
223
+ },
224
+ l && /* @__PURE__ */ React.createElement("span", { className: "mr-1 text-xs font-semibold text-gray-700" }, l),
225
+ e
226
+ ), lt = ({ htmlContent: e, cssContent: t, frontendAssets: l }) => {
227
+ const a = y(null), [n, r] = g(null);
228
+ return R(() => {
229
+ const s = a.current;
230
+ return s && (s.onload = () => {
231
+ const c = s.contentDocument || s.contentWindow.document;
232
+ if (c) {
233
+ r(c.body);
234
+ const i = c.createElement("style");
235
+ i.innerHTML = t, c.head.appendChild(i), l.forEach(({ type: o, id: f, url: d }) => {
236
+ const m = document.getElementById(f);
237
+ if (m) {
238
+ const u = document.adoptNode(
239
+ m.cloneNode(!0)
2382
240
  );
2383
- v.head.appendChild(T);
241
+ c.head.appendChild(u);
2384
242
  } else {
2385
- const T = v.createElement(
2386
- p === "script" ? "script" : "link"
243
+ const u = c.createElement(
244
+ o === "script" ? "script" : "link"
2387
245
  );
2388
- T.id = j, p === "script" ? (T.src = _, T.async = !0) : (T.rel = "stylesheet", T.href = _), v.head.appendChild(T);
246
+ u.id = f, o === "script" ? (u.src = d, u.async = !0) : (u.rel = "stylesheet", u.href = d), c.head.appendChild(u);
2389
247
  }
2390
248
  });
2391
249
  }
2392
250
  }), () => {
2393
- h && (h.onload = null);
251
+ s && (s.onload = null);
2394
252
  };
2395
- }, [o, a, u]), /* @__PURE__ */ n.jsxs(
253
+ }, [e, t, l]), /* @__PURE__ */ React.createElement(
2396
254
  "div",
2397
255
  {
2398
256
  className: "render-preview-container",
2399
- style: { width: "100%", minHeight: "100%" },
2400
- children: [
2401
- /* @__PURE__ */ n.jsx(
2402
- "iframe",
2403
- {
2404
- ref: l,
2405
- title: "Preview",
2406
- className: "editor-styles-wrapper",
2407
- width: "100%",
2408
- height: "100%"
2409
- }
2410
- ),
2411
- d && Bt(
2412
- /* @__PURE__ */ n.jsx("div", { className: "b_", children: /* @__PURE__ */ n.jsx(
2413
- "div",
2414
- {
2415
- className: "b_utils",
2416
- dangerouslySetInnerHTML: { __html: o }
2417
- }
2418
- ) }),
2419
- d
2420
- )
2421
- ]
2422
- }
257
+ style: { width: "100%", minHeight: "100%" }
258
+ },
259
+ /* @__PURE__ */ React.createElement(
260
+ "iframe",
261
+ {
262
+ ref: a,
263
+ title: "Preview",
264
+ className: "editor-styles-wrapper",
265
+ width: "100%",
266
+ height: "100%"
267
+ }
268
+ ),
269
+ n && D(
270
+ /* @__PURE__ */ React.createElement("div", { className: "b_" }, /* @__PURE__ */ React.createElement(
271
+ "div",
272
+ {
273
+ className: "b_utils",
274
+ dangerouslySetInnerHTML: { __html: e }
275
+ }
276
+ )),
277
+ n
278
+ )
2423
279
  );
2424
- }, Ta = ({
2425
- children: o,
2426
- size: a = "default",
2427
- label: u,
2428
- className: l,
2429
- onClick: d,
2430
- variant: f = "primary",
2431
- display: h = "auto",
2432
- icon: v,
2433
- disabled: g = !1
280
+ }, nt = ({
281
+ children: e,
282
+ size: t = "default",
283
+ label: l,
284
+ className: a,
285
+ onClick: n,
286
+ variant: r = "primary",
287
+ display: s = "auto",
288
+ icon: c,
289
+ disabled: i = !1
2434
290
  }) => {
2435
- const p = h === "icon" || h === "icon-lg";
2436
- return /* @__PURE__ */ n.jsxs(
2437
- ye,
291
+ const o = s === "icon" || s === "icon-lg";
292
+ return /* @__PURE__ */ React.createElement(
293
+ C,
2438
294
  {
2439
- size: a,
2440
- variant: f,
2441
- label: u,
295
+ size: t,
296
+ variant: r,
297
+ label: l,
2442
298
  showTooltip: !0,
2443
- disabled: g,
2444
- className: W(
2445
- l,
299
+ disabled: i,
300
+ className: p(
301
+ a,
2446
302
  "blockbite-ui__button",
2447
303
  "flex items-center justify-center gap-1",
2448
- { "is-primary": f === "primary" },
2449
- { "is-secondary": f === "secondary" },
2450
- { "is-link": f === "link" },
2451
- { "is-tertiary": f === "tertiary" },
2452
- { "is-icon": h === "icon" }
304
+ { "is-primary": r === "primary" },
305
+ { "is-secondary": r === "secondary" },
306
+ { "is-link": r === "link" },
307
+ { "is-tertiary": r === "tertiary" },
308
+ { "is-icon": s === "icon" }
2453
309
  ),
2454
- onClick: d,
2455
- children: [
2456
- v && /* @__PURE__ */ n.jsx(
2457
- Ke,
2458
- {
2459
- icon: v,
2460
- className: W({ "h-4 w-4": h === "icon-lg" })
2461
- }
2462
- ),
2463
- p ? null : o,
2464
- u && !o && !p ? /* @__PURE__ */ n.jsx("span", { children: u }) : null
2465
- ]
2466
- }
310
+ onClick: n
311
+ },
312
+ c && /* @__PURE__ */ React.createElement(
313
+ v,
314
+ {
315
+ icon: c,
316
+ className: p({ "h-4 w-4": s === "icon-lg" })
317
+ }
318
+ ),
319
+ o ? null : e,
320
+ l && !e && !o ? /* @__PURE__ */ React.createElement("span", null, l) : null
2467
321
  );
2468
- }, Oa = ({ children: o, title: a }) => /* @__PURE__ */ n.jsxs(
2469
- ne,
322
+ }, rt = ({ children: e, title: t }) => /* @__PURE__ */ React.createElement(
323
+ E,
2470
324
  {
2471
- className: W(
325
+ className: p(
2472
326
  "text-gray-medium my-2 flex items-center gap-1 text-[12px] font-medium",
2473
- W
2474
- ),
2475
- children: [
2476
- a && /* @__PURE__ */ n.jsx(ne, { className: "font-medium", children: a }),
2477
- o
2478
- ]
2479
- }
2480
- ), Pa = ({
2481
- title: o,
2482
- className: a,
2483
- help: u,
2484
- badge: l,
2485
- ...d
2486
- }) => /* @__PURE__ */ n.jsxs("div", { className: W("mb-2", a), ...d, children: [
2487
- /* @__PURE__ */ n.jsxs("div", { className: "flex w-full flex-wrap items-center gap-2 justify-between", children: [
2488
- /* @__PURE__ */ n.jsx("span", { className: "shrink-1 text-[11px] font-medium uppercase leading-snug", children: o }),
2489
- !!l && /* @__PURE__ */ n.jsx(aa, { className: "text-[10px] py-px px-1", children: l })
2490
- ] }),
2491
- u && /* @__PURE__ */ n.jsx("small", { className: "w-full shrink-0 text-[11px]", children: u })
2492
- ] }), Na = ({ label: o, help: a, defaultChecked: u }) => {
2493
- const [l, d] = F(u);
2494
- return G(() => {
2495
- d(u);
2496
- }, [u]), /* @__PURE__ */ n.jsx(ne, { className: "blockbite-ui__checkbox mx-1 flex items-center gap-2", children: /* @__PURE__ */ n.jsx(
2497
- vn,
327
+ p
328
+ )
329
+ },
330
+ "dwdwwdwd",
331
+ t && /* @__PURE__ */ React.createElement(E, { className: "font-medium" }, t),
332
+ e
333
+ ), ct = ({
334
+ title: e,
335
+ className: t,
336
+ help: l,
337
+ badge: a,
338
+ ...n
339
+ }) => /* @__PURE__ */ React.createElement("div", { className: p("mb-2", t), ...n }, /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-wrap items-center gap-2 justify-between" }, /* @__PURE__ */ React.createElement("span", { className: "shrink-1 text-[11px] font-medium uppercase leading-snug" }, e), !!a && /* @__PURE__ */ React.createElement(ve, { className: "text-[10px] py-px px-1" }, a)), l && /* @__PURE__ */ React.createElement("small", { className: "w-full shrink-0 text-[11px]" }, l)), st = ({ label: e, help: t, defaultChecked: l }) => {
340
+ const [a, n] = g(l);
341
+ return R(() => {
342
+ n(l);
343
+ }, [l]), /* @__PURE__ */ React.createElement(E, { className: "blockbite-ui__checkbox mx-1 flex items-center gap-2" }, /* @__PURE__ */ React.createElement(
344
+ Y,
345
+ {
346
+ label: e,
347
+ help: t,
348
+ checked: a,
349
+ onChange: n
350
+ }
351
+ ));
352
+ }, Ne = (e) => /* @__PURE__ */ React.createElement(
353
+ "svg",
354
+ {
355
+ width: e.width || "1em",
356
+ height: e.height || "1em",
357
+ viewBox: "0 0 15 15",
358
+ fill: "none",
359
+ xmlns: "http://www.w3.org/2000/svg",
360
+ role: "img",
361
+ ...e
362
+ },
363
+ /* @__PURE__ */ React.createElement(
364
+ "path",
365
+ {
366
+ d: "M3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523Z",
367
+ fill: "currentColor"
368
+ }
369
+ )
370
+ ), ye = (e) => /* @__PURE__ */ React.createElement(
371
+ "svg",
372
+ {
373
+ width: e.width || "1em",
374
+ height: e.height || "1em",
375
+ viewBox: "0 0 15 15",
376
+ fill: "none",
377
+ xmlns: "http://www.w3.org/2000/svg",
378
+ role: "img",
379
+ ...e
380
+ },
381
+ /* @__PURE__ */ React.createElement(
382
+ "path",
383
+ {
384
+ fillRule: "evenodd",
385
+ clipRule: "evenodd",
386
+ d: "M7.50012 1C7.22398 1 7.00012 1.22386 7.00012 1.5V13.5C7.00012 13.7761 7.22398 14 7.50012 14C7.77626 14 8.00012 13.7761 8.00012 13.5V1.5C8.00012 1.22386 7.77626 1 7.50012 1ZM3.31812 5.18161C3.14239 5.00587 2.85746 5.00587 2.68173 5.18161L0.681729 7.18161C0.505993 7.35734 0.505993 7.64227 0.681729 7.818L2.68173 9.818C2.85746 9.99374 3.14239 9.99374 3.31812 9.818C3.49386 9.64227 3.49386 9.35734 3.31812 9.18161L2.08632 7.9498H5.50017C5.7487 7.9498 5.95017 7.74833 5.95017 7.4998C5.95017 7.25128 5.7487 7.0498 5.50017 7.0498H2.08632L3.31812 5.818C3.49386 5.64227 3.49386 5.35734 3.31812 5.18161ZM11.6817 5.18161C11.506 5.35734 11.506 5.64227 11.6817 5.818L12.9135 7.0498H9.50017C9.25164 7.0498 9.05017 7.25128 9.05017 7.4998C9.05017 7.74833 9.25164 7.9498 9.50017 7.9498H12.9135L11.6817 9.18161C11.506 9.35734 11.506 9.64227 11.6817 9.818C11.8575 9.99374 12.1424 9.99374 12.3181 9.818L14.3181 7.818C14.4939 7.64227 14.4939 7.35734 14.3181 7.18161L12.3181 5.18161C12.1424 5.00587 11.8575 5.00587 11.6817 5.18161Z",
387
+ fill: "currentColor"
388
+ }
389
+ )
390
+ ), ke = (e) => /* @__PURE__ */ React.createElement(
391
+ "svg",
392
+ {
393
+ width: e.width || "1em",
394
+ height: e.height || "1em",
395
+ viewBox: "0 0 15 15",
396
+ fill: "none",
397
+ xmlns: "http://www.w3.org/2000/svg",
398
+ role: "img",
399
+ ...e
400
+ },
401
+ /* @__PURE__ */ React.createElement(
402
+ "path",
403
+ {
404
+ d: "M11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184Z",
405
+ fill: "currentColor"
406
+ }
407
+ )
408
+ ), _e = (e) => /* @__PURE__ */ React.createElement(
409
+ "svg",
410
+ {
411
+ width: e.width || "1em",
412
+ height: e.height || "1em",
413
+ viewBox: "0 0 15 15",
414
+ fill: "none",
415
+ xmlns: "http://www.w3.org/2000/svg",
416
+ role: "img",
417
+ ...e
418
+ },
419
+ /* @__PURE__ */ React.createElement(
420
+ "path",
421
+ {
422
+ fillRule: "evenodd",
423
+ clipRule: "evenodd",
424
+ d: "M0 3.25V10.75C0 11.4404 0.559644 12 1.25 12H5.07341L4.82991 13.2986C4.76645 13.6371 5.02612 13.95 5.37049 13.95H9.62951C9.97389 13.95 10.2336 13.6371 10.1701 13.2986L9.92659 12H13.75C14.4404 12 15 11.4404 15 10.75V3.25C15 2.55964 14.4404 2 13.75 2H1.25C0.559643 2 0 2.55964 0 3.25ZM1.25 3H13.75C13.8881 3 14 3.11193 14 3.25V10.75C14 10.8881 13.8881 11 13.75 11H1.25C1.11193 11 1 10.8881 1 10.75V3.25C1 3.11193 1.11193 3 1.25 3ZM5.98909 12L5.79222 13.05H9.20778L9.01091 12H5.98909Z",
425
+ fill: "currentColor"
426
+ }
427
+ )
428
+ ), Le = (e) => /* @__PURE__ */ React.createElement(
429
+ "svg",
430
+ {
431
+ width: e.width || "1em",
432
+ height: e.height || "1em",
433
+ viewBox: "0 0 15 15",
434
+ fill: "none",
435
+ xmlns: "http://www.w3.org/2000/svg",
436
+ role: "img",
437
+ ...e
438
+ },
439
+ /* @__PURE__ */ React.createElement(
440
+ "path",
441
+ {
442
+ fillRule: "evenodd",
443
+ clipRule: "evenodd",
444
+ d: "M1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5C1.67157 1 1 1.67157 1 2.5ZM8 2V7H13V2.5C13 2.22386 12.7761 2 12.5 2H8ZM8 8V13H12.5C12.7761 13 13 12.7761 13 12.5V8H8ZM7 2H2.5C2.22386 2 2 2.22386 2 2.5V7H7V2ZM2 12.5C2 12.7761 2.22386 13 2.5 13H7V8H2V12.5Z",
445
+ fill: "currentColor"
446
+ }
447
+ )
448
+ ), Me = (e) => /* @__PURE__ */ React.createElement(
449
+ "svg",
450
+ {
451
+ width: e.width || "1em",
452
+ height: e.height || "1em",
453
+ viewBox: "0 0 15 15",
454
+ fill: "none",
455
+ xmlns: "http://www.w3.org/2000/svg",
456
+ role: "img",
457
+ ...e
458
+ },
459
+ /* @__PURE__ */ React.createElement(
460
+ "path",
461
+ {
462
+ fillRule: "evenodd",
463
+ clipRule: "evenodd",
464
+ d: "M11.1465 1.14645L3.71455 8.57836C3.62459 8.66832 3.55263 8.77461 3.50251 8.89155L2.04044 12.303C1.9599 12.491 2.00189 12.709 2.14646 12.8536C2.29103 12.9981 2.50905 13.0401 2.69697 12.9596L6.10847 11.4975C6.2254 11.4474 6.3317 11.3754 6.42166 11.2855L13.8536 3.85355C14.0488 3.65829 14.0488 3.34171 13.8536 3.14645L11.8536 1.14645C11.6583 0.951184 11.3417 0.951184 11.1465 1.14645ZM11.5 2.20711L12.7929 3.5L5.71455 10.5784L4.21924 11.2192L3.78081 10.7808L4.42166 9.28547L11.5 2.20711Z",
465
+ fill: "currentColor"
466
+ }
467
+ )
468
+ ), Se = (e) => /* @__PURE__ */ React.createElement(
469
+ "svg",
470
+ {
471
+ width: e.width || "1em",
472
+ height: e.height || "1em",
473
+ viewBox: "0 0 15 15",
474
+ fill: "none",
475
+ xmlns: "http://www.w3.org/2000/svg",
476
+ role: "img",
477
+ ...e
478
+ },
479
+ /* @__PURE__ */ React.createElement("circle", { cx: 4.85355, cy: 4.5, r: 1.5, fill: "currentColor" }),
480
+ /* @__PURE__ */ React.createElement("circle", { cx: 9.85355, cy: 10.5, r: 1.5, fill: "currentColor" }),
481
+ /* @__PURE__ */ React.createElement(
482
+ "path",
483
+ {
484
+ d: "M3 11.6464L11 3.64642",
485
+ stroke: "currentColor",
486
+ strokeLinecap: "round"
487
+ }
488
+ )
489
+ ), Te = (e) => /* @__PURE__ */ React.createElement(
490
+ "svg",
491
+ {
492
+ width: e.width || "1em",
493
+ height: e.height || "1em",
494
+ viewBox: "0 0 15 15",
495
+ fill: "none",
496
+ xmlns: "http://www.w3.org/2000/svg",
497
+ role: "img",
498
+ ...e
499
+ },
500
+ /* @__PURE__ */ React.createElement(
501
+ "path",
2498
502
  {
2499
- label: o,
2500
- help: a,
2501
- checked: l,
2502
- onChange: d
503
+ d: "M7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75C8 2.47386 7.77614 2.25 7.5 2.25Z",
504
+ fill: "currentColor"
2503
505
  }
2504
- ) });
2505
- }, ot = Pn(
506
+ )
507
+ ), He = (e) => /* @__PURE__ */ React.createElement(
508
+ "svg",
509
+ {
510
+ width: e.width || "1em",
511
+ height: e.height || "1em",
512
+ viewBox: "0 0 15 15",
513
+ fill: "none",
514
+ xmlns: "http://www.w3.org/2000/svg",
515
+ role: "img",
516
+ ...e
517
+ },
518
+ /* @__PURE__ */ React.createElement(
519
+ "path",
520
+ {
521
+ fillRule: "evenodd",
522
+ clipRule: "evenodd",
523
+ d: "M8.49988 10.2504C7.1516 10.2504 6.0299 9.28026 5.79473 7.99997H0.5C0.223858 7.99997 0 7.77611 0 7.49997C0 7.22383 0.223858 6.99997 0.5 6.99997H5.7947C6.0298 5.71959 7.15154 4.74939 8.49988 4.74939C9.84822 4.74939 10.97 5.71959 11.2051 6.99997H14.5C14.7761 6.99997 15 7.22383 15 7.49997C15 7.77611 14.7761 7.99997 14.5 7.99997H11.205C10.9699 9.28026 9.84816 10.2504 8.49988 10.2504ZM8.49988 9.30038C7.50549 9.30038 6.69938 8.49427 6.69938 7.49988C6.69938 6.5055 7.50549 5.69939 8.49988 5.69939C9.49426 5.69939 10.3004 6.5055 10.3004 7.49988C10.3004 8.49427 9.49426 9.30038 8.49988 9.30038Z",
524
+ fill: "currentColor"
525
+ }
526
+ )
527
+ ), Be = (e) => /* @__PURE__ */ React.createElement(
528
+ "svg",
529
+ {
530
+ width: e.width || "1em",
531
+ height: e.height || "1em",
532
+ viewBox: "0 0 15 15",
533
+ fill: "none",
534
+ xmlns: "http://www.w3.org/2000/svg",
535
+ role: "img",
536
+ ...e
537
+ },
538
+ /* @__PURE__ */ React.createElement(
539
+ "path",
540
+ {
541
+ d: "M4 5.33333C4.4 3.77778 5.4 3 7 3C9.4 3 9.7 4.75 10.9 5.04167C11.7 5.23611 12.4 4.94444 13 4.16667C12.6 5.72222 11.6 6.5 10 6.5C7.6 6.5 7.3 4.75 6.1 4.45833C5.3 4.26389 4.6 4.55556 4 5.33333ZM1 8.83333C1.4 7.27778 2.4 6.5 4 6.5C6.4 6.5 6.7 8.25 7.9 8.54167C8.7 8.73611 9.4 8.44444 10 7.66667C9.6 9.22222 8.6 10 7 10C4.6 10 4.3 8.25 3.1 7.95833C2.3 7.76389 1.6 8.05556 1 8.83333Z",
542
+ fill: "currentColor"
543
+ }
544
+ )
545
+ ), Ve = (e) => /* @__PURE__ */ React.createElement(
546
+ "svg",
547
+ {
548
+ width: e.width || "1em",
549
+ height: e.height || "1em",
550
+ viewBox: "0 0 15 15",
551
+ fill: "none",
552
+ xmlns: "http://www.w3.org/2000/svg",
553
+ role: "img",
554
+ ...e
555
+ },
556
+ /* @__PURE__ */ React.createElement(
557
+ "path",
558
+ {
559
+ fillRule: "evenodd",
560
+ clipRule: "evenodd",
561
+ d: "M5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5C5.22386 1 5 1.22386 5 1.5ZM3.5 3H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5C3 3.22386 3.22386 3 3.5 3ZM10 4V12H5V4H10Z",
562
+ fill: "currentColor"
563
+ }
564
+ )
565
+ ), F = de(
2506
566
  ({
2507
- onClick: o,
2508
- onChange: a,
2509
- className: u,
2510
- defaultValue: l,
2511
- children: d,
2512
- inputClassName: f,
2513
- readOnly: h,
2514
- placeholder: v,
2515
- onBlur: g,
2516
- type: p = "text",
2517
- label: j,
2518
- helper: _ = "",
2519
- ...O
2520
- }, T) => {
2521
- const k = `text-control-${Math.random().toString(36).substring(2, 15)}`;
2522
- return /* @__PURE__ */ n.jsxs(
567
+ onClick: e,
568
+ onChange: t,
569
+ className: l,
570
+ value: a,
571
+ children: n,
572
+ inputClassName: r,
573
+ readOnly: s,
574
+ placeholder: c,
575
+ onBlur: i,
576
+ type: o = "text",
577
+ label: f,
578
+ helper: d = "",
579
+ ...m
580
+ }, u) => {
581
+ const b = `text-control-${Math.random().toString(36).substring(2, 15)}`;
582
+ return /* @__PURE__ */ React.createElement(
2523
583
  "div",
2524
584
  {
2525
- className: W("flex items-center p-0", u),
2526
- ...O,
2527
- children: [
2528
- j ? /* @__PURE__ */ n.jsx("label", { htmlFor: k, className: "text-primary !m-0 !mb-0 !mr-2", children: j }) : null,
2529
- /* @__PURE__ */ n.jsx(
2530
- "input",
2531
- {
2532
- id: k,
2533
- className: W(
2534
- "border-primary !m-0 !mb-0 h-[32px] !rounded-none border border-opacity-70 focus:outline-none focus:ring-0",
2535
- f
2536
- ),
2537
- type: p,
2538
- value: l,
2539
- placeholder: v,
2540
- onFocus: () => o && o(),
2541
- onBlur: (ae) => {
2542
- o && o(), g && g(ae.target.value);
2543
- },
2544
- onChange: (ae) => a && a(ae.target.value),
2545
- readOnly: h,
2546
- ref: T
2547
- }
585
+ className: p("flex items-center p-0", l),
586
+ ...m
587
+ },
588
+ f ? /* @__PURE__ */ React.createElement("label", { htmlFor: b, className: "text-primary !m-0 !mb-0 !mr-2" }, f) : null,
589
+ /* @__PURE__ */ React.createElement(
590
+ "input",
591
+ {
592
+ id: b,
593
+ className: p(
594
+ "components-text-control__input",
595
+ r
2548
596
  ),
2549
- /* @__PURE__ */ n.jsx("span", { children: d }),
2550
- _ && /* @__PURE__ */ n.jsx("p", { className: "text-primary !m-0 !mb-0 text-xs", children: _ })
2551
- ]
2552
- }
597
+ type: o,
598
+ value: a,
599
+ placeholder: c,
600
+ onFocus: () => e && e(),
601
+ onBlur: (x) => {
602
+ e && e(), i && i(x.target.value);
603
+ },
604
+ onChange: (x) => t && t(x.target.value),
605
+ readOnly: s,
606
+ ref: u
607
+ }
608
+ ),
609
+ n,
610
+ d && /* @__PURE__ */ React.createElement("p", { className: "text-primary !m-0 !mb-0 text-xs" }, d)
2553
611
  );
2554
612
  }
2555
613
  );
2556
- ot.displayName = "TextControl";
2557
- const Aa = ({
2558
- data: o,
2559
- active: a,
2560
- setActive: u,
2561
- onCreate: l,
2562
- onDelete: d,
2563
- onUpdate: f,
2564
- onSwitch: h,
2565
- renderItemActions: v,
2566
- addons: g,
2567
- className: p = "",
2568
- footerSlot: j,
2569
- footerSlotClassName: _ = ""
614
+ F.displayName = "TextControl";
615
+ const ot = ({
616
+ data: e,
617
+ active: t,
618
+ setActive: l,
619
+ onCreate: a,
620
+ onDelete: n,
621
+ onUpdate: r,
622
+ onSwitch: s,
623
+ renderItemActions: c,
624
+ addons: i,
625
+ className: o = "",
626
+ footerSlot: f,
627
+ footerSlotClassName: d = ""
2570
628
  }) => {
2571
- const [O, T] = F({
629
+ const [m, u] = g({
2572
630
  id: "",
2573
631
  name: ""
2574
- }), [k, ae] = F(!1), de = lr(null), A = () => {
2575
- l();
2576
- }, Y = () => {
2577
- if (!a || o.length === 0) return;
2578
- const K = o.filter((pe) => pe.id !== a?.id), X = o.findIndex((pe) => pe.id === a?.id), ie = K[X] || K[0];
2579
- d(a?.id), u(ie);
2580
- }, ge = (K) => {
2581
- ae(!0), O.id && f(O.id, { name: K }), setTimeout(() => {
2582
- T({ id: "", name: "" }), ae(!1);
632
+ }), [b, x] = g(!1), k = y(null), N = () => {
633
+ a();
634
+ }, W = () => {
635
+ if (!t || e.length === 0) return;
636
+ const h = e.filter((S) => S.id !== (t == null ? void 0 : t.id)), M = e.findIndex((S) => S.id === (t == null ? void 0 : t.id)), q = h[M] || h[0];
637
+ n(t == null ? void 0 : t.id), l(q);
638
+ }, K = (h) => {
639
+ x(!0), m.id && r(m.id, { name: h }), setTimeout(() => {
640
+ u({ id: "", name: "" }), x(!1);
2583
641
  }, 500);
2584
642
  };
2585
- return /* @__PURE__ */ n.jsxs(ne, { important: !0, className: p, children: [
2586
- /* @__PURE__ */ n.jsxs("ul", { className: "h-[calc(100%-80px)] divide-y overflow-auto", children: [
2587
- g,
2588
- o.length > 0 && /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("ul", { className: "divide-y border-b", children: o.map((K) => /* @__PURE__ */ n.jsxs(
2589
- "li",
643
+ return /* @__PURE__ */ React.createElement(E, { important: !0, className: o }, /* @__PURE__ */ React.createElement("ul", { className: "h-[calc(100%-80px)] divide-y overflow-auto" }, i, e.length > 0 && /* @__PURE__ */ React.createElement("li", null, /* @__PURE__ */ React.createElement("ul", { className: "divide-y divide-border border-b border-border" }, e.map((h) => /* @__PURE__ */ React.createElement(
644
+ "li",
645
+ {
646
+ key: `data__${h.id}`,
647
+ className: p(
648
+ "relative !mb-0 flex items-center justify-between gap-1 bg-opacity-50 hover:bg-easy",
2590
649
  {
2591
- className: W(
2592
- "relative m-0 flex items-center justify-between gap-1 bg-opacity-50 hover:bg-easy",
2593
- {
2594
- "bg-easy": K.id === a?.id
2595
- }
2596
- ),
2597
- children: [
2598
- /* @__PURE__ */ n.jsxs("div", { className: "flex-1 relative", children: [
2599
- /* @__PURE__ */ n.jsx(
2600
- "button",
2601
- {
2602
- className: "text-gray-medium w-full truncate px-3 py-2 text-left text-sm/6 font-semibold hover:text-wordpress",
2603
- onClick: () => {
2604
- h(a?.id, { ...a }), u(K);
2605
- },
2606
- onDoubleClick: () => {
2607
- T({ id: K.id, name: K.name || "" });
2608
- },
2609
- children: k && O.id === K.id ? /* @__PURE__ */ n.jsx("span", { className: "animate-pulse text-gray-medium", children: O.name }) : /* @__PURE__ */ n.jsx("span", { className: "text-gray-medium", children: K.name || "Untitled" })
2610
- }
2611
- ),
2612
- O.id === K.id && !k && /* @__PURE__ */ n.jsx(
2613
- ot,
2614
- {
2615
- className: "absolute left-1 top-0 w-[calc(100%-.5rem)] h-full",
2616
- inputClassName: "w-full",
2617
- defaultValue: O.name,
2618
- onChange: (X) => T({ ...O, name: X }),
2619
- ref: de,
2620
- onBlur: ge
2621
- }
2622
- )
2623
- ] }),
2624
- v && /* @__PURE__ */ n.jsx("div", { className: "flex gap-1 pr-1", children: v(K) })
2625
- ]
650
+ "bg-easy": h.id === (t == null ? void 0 : t.id)
651
+ }
652
+ )
653
+ },
654
+ /* @__PURE__ */ React.createElement("div", { className: "flex-1 relative" }, /* @__PURE__ */ React.createElement(
655
+ "button",
656
+ {
657
+ className: "text-gray-medium w-full truncate px-3 py-2 text-left text-sm/6 font-semibold hover:text-wordpress",
658
+ onClick: () => {
659
+ s(t == null ? void 0 : t.id, { ...t }), l(h);
2626
660
  },
2627
- `data__${K.id}`
2628
- )) }) })
2629
- ] }),
2630
- /* @__PURE__ */ n.jsxs(
2631
- "div",
661
+ onDoubleClick: () => {
662
+ u({ id: h.id, name: h.name || "" });
663
+ }
664
+ },
665
+ b && m.id === h.id ? /* @__PURE__ */ React.createElement("span", { className: "animate-pulse text-gray-medium" }, m.name) : /* @__PURE__ */ React.createElement("span", { className: "text-gray-medium" }, h.name || "Untitled")
666
+ ), m.id === h.id && !b && /* @__PURE__ */ React.createElement(
667
+ F,
2632
668
  {
2633
- className: W(
2634
- "flex flex-wrap justify-center gap-2 p-2",
2635
- _
2636
- ),
2637
- children: [
2638
- j,
2639
- /* @__PURE__ */ n.jsx(
2640
- ye,
2641
- {
2642
- onClick: A,
2643
- icon: /* @__PURE__ */ n.jsx(An, { className: "h-4 w-4" }),
2644
- variant: "tertiary",
2645
- size: "compact",
2646
- children: "Add"
2647
- }
2648
- ),
2649
- /* @__PURE__ */ n.jsx(
2650
- ye,
2651
- {
2652
- onClick: Y,
2653
- icon: /* @__PURE__ */ n.jsx(In, { className: "h-4 w-4" }),
2654
- variant: "tertiary",
2655
- size: "compact",
2656
- disabled: !a || o.length === 0,
2657
- children: "Remove"
2658
- }
2659
- )
2660
- ]
2661
- }
669
+ className: "absolute left-1 top-0 w-[calc(100%-.5rem)] h-full",
670
+ inputClassName: "w-full",
671
+ defaultValue: m.name,
672
+ onChange: (M) => u({ ...m, name: M }),
673
+ ref: k,
674
+ onBlur: K
675
+ }
676
+ )),
677
+ c && /* @__PURE__ */ React.createElement("div", { className: "flex gap-1 pr-1" }, c(h))
678
+ ))))), /* @__PURE__ */ React.createElement(
679
+ "div",
680
+ {
681
+ className: p(
682
+ "flex flex-wrap justify-center gap-2 p-2",
683
+ d
684
+ )
685
+ },
686
+ f,
687
+ /* @__PURE__ */ React.createElement(
688
+ C,
689
+ {
690
+ onClick: N,
691
+ icon: /* @__PURE__ */ React.createElement(Te, { className: "h-4 w-4" }),
692
+ variant: "tertiary",
693
+ size: "compact"
694
+ },
695
+ "Add"
696
+ ),
697
+ /* @__PURE__ */ React.createElement(
698
+ C,
699
+ {
700
+ onClick: W,
701
+ icon: /* @__PURE__ */ React.createElement(Ve, { className: "h-4 w-4" }),
702
+ variant: "tertiary",
703
+ size: "compact",
704
+ disabled: !t || e.length === 0
705
+ },
706
+ "Remove"
2662
707
  )
2663
- ] });
2664
- }, Ia = ({
2665
- duration: o = 3e3,
2666
- className: a,
2667
- children: u,
2668
- show: l,
2669
- message: d
708
+ ));
709
+ }, it = ({
710
+ duration: e = 3e3,
711
+ className: t,
712
+ children: l,
713
+ show: a,
714
+ message: n
2670
715
  }) => {
2671
- const [f, h] = F(!1), v = lr(!1), g = lr(null);
2672
- return G(() => {
2673
- v.current = !0;
2674
- }, []), G(() => {
2675
- if (v.current)
2676
- return l && (h(!0), g.current = setTimeout(() => {
2677
- h(!1);
2678
- }, o)), () => {
2679
- g.current && clearTimeout(g.current);
716
+ const [r, s] = g(!1), c = y(!1), i = y(null);
717
+ return R(() => {
718
+ c.current = !0;
719
+ }, []), R(() => {
720
+ if (c.current)
721
+ return a && (s(!0), i.current = setTimeout(() => {
722
+ s(!1);
723
+ }, e)), () => {
724
+ i.current && clearTimeout(i.current);
2680
725
  };
2681
- }, [l, o]), f ? /* @__PURE__ */ n.jsx(
2682
- ne,
726
+ }, [a, e]), r ? /* @__PURE__ */ React.createElement(
727
+ E,
2683
728
  {
2684
729
  important: !0,
2685
- className: W("bb-ui__disappearing-message", a),
2686
- children: /* @__PURE__ */ n.jsx("div", { className: "bb-ui__disappearing-message__content", children: d ?? u })
2687
- }
730
+ className: p("bb-ui__disappearing-message", t)
731
+ },
732
+ /* @__PURE__ */ React.createElement("div", { className: "bb-ui__disappearing-message__content" }, n ?? l)
2688
733
  ) : null;
2689
- }, oa = ({
2690
- label: o,
2691
- className: a,
2692
- defaultValue: u,
2693
- defaultIcon: l = Dn,
2694
- onPressedChange: d,
2695
- options: f
734
+ }, Pe = ({
735
+ label: e,
736
+ className: t,
737
+ value: l,
738
+ defaultIcon: a = Ne,
739
+ size: n = "medium",
740
+ onPressedChange: r,
741
+ options: s,
742
+ ...c
2696
743
  }) => {
2697
- const [h, v] = F(null);
2698
- G(() => {
2699
- v(u);
2700
- }, [u]);
2701
- const g = [
2702
- ...f.map((p) => ({
2703
- icon: p.icon,
2704
- label: p.label,
2705
- title: p.label,
2706
- value: p.value,
744
+ var m;
745
+ const [i, o] = g(null);
746
+ R(() => {
747
+ o(l);
748
+ }, [l]);
749
+ const f = [
750
+ ...s.map((u) => ({
751
+ icon: u.icon,
752
+ label: u.label,
753
+ title: u.label,
754
+ value: u.value,
2707
755
  onClick: () => {
2708
- v(p.value), d(p.value);
756
+ o(u.value), r(u.value);
2709
757
  }
2710
758
  })),
2711
759
  {
2712
- icon: /* @__PURE__ */ n.jsx(Ke, { icon: l }),
760
+ icon: /* @__PURE__ */ React.createElement(v, { icon: a }),
2713
761
  title: "Reset",
2714
762
  value: "reset",
2715
763
  onClick: () => {
2716
- v("reset"), d("reset");
764
+ o("reset"), r("reset");
2717
765
  }
2718
766
  }
2719
767
  ];
2720
- return /* @__PURE__ */ n.jsx(
2721
- mn,
768
+ let d = "1em";
769
+ return n === "medium" ? d = "1.5em" : n === "large" && (d = "2em"), /* @__PURE__ */ React.createElement(
770
+ J,
2722
771
  {
2723
- controls: g,
2724
- className: W(
2725
- "blockbite-ui__dropdown-picker border-primary border",
2726
- a
2727
- ),
2728
- icon: f.find((p) => p.value === h)?.icon || /* @__PURE__ */ n.jsx(Ke, { icon: l }),
2729
- label: o || "Select"
772
+ controls: f,
773
+ className: p("blockbite-ui__dropdown-picker", t),
774
+ icon: ((m = s.find((u) => u.value === i)) == null ? void 0 : m.icon) || /* @__PURE__ */ React.createElement(v, { width: d, height: d, icon: a }),
775
+ label: e || "Select",
776
+ ...c
2730
777
  }
2731
778
  );
2732
779
  };
2733
- function Da({
2734
- icon: o,
2735
- title: a,
2736
- description: u,
2737
- children: l = null,
2738
- ...d
780
+ function mt({
781
+ icon: e,
782
+ title: t,
783
+ description: l,
784
+ children: a = null,
785
+ ...n
2739
786
  }) {
2740
- return /* @__PURE__ */ n.jsx("div", { ...d, children: /* @__PURE__ */ n.jsx("div", { className: "flex h-full w-full flex-col items-center justify-center text-center !font-sans", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-sm", children: [
2741
- o && /* @__PURE__ */ n.jsx("div", { className: "mx-auto !text-gray-400", children: o }),
2742
- /* @__PURE__ */ n.jsx("h3", { className: "text-gray-medium mt-2 !font-sans text-sm font-medium", children: a }),
2743
- /* @__PURE__ */ n.jsx("p", { className: "mt-1 !font-sans text-sm !text-gray-500", children: u }),
2744
- l && /* @__PURE__ */ n.jsx("div", { className: "mt-4", children: l })
2745
- ] }) }) });
787
+ return /* @__PURE__ */ React.createElement("div", { ...n }, /* @__PURE__ */ React.createElement("div", { className: "flex h-full w-full flex-col items-center justify-center text-center !font-sans" }, /* @__PURE__ */ React.createElement("div", { className: "max-w-sm" }, e && /* @__PURE__ */ React.createElement("div", { className: "mx-auto !text-gray-400" }, e), /* @__PURE__ */ React.createElement("h3", { className: "text-gray-medium mt-2 !font-sans text-sm font-medium" }, t), /* @__PURE__ */ React.createElement("p", { className: "mt-1 !font-sans text-sm !text-gray-500" }, l), a && /* @__PURE__ */ React.createElement("div", { className: "mt-4" }, a))));
2746
788
  }
2747
- function $a({
2748
- children: o
789
+ function ut({
790
+ children: e
2749
791
  }) {
2750
- const a = lr(null), [u, l] = F({ x: 100, y: 100 }), [d, f] = F(!1), [h, v] = F({ x: 0, y: 0 });
2751
- G(() => {
2752
- const p = (_) => {
2753
- d && l({
2754
- x: _.clientX - h.x,
2755
- y: _.clientY - h.y
792
+ const t = y(null), [l, a] = g({ x: 100, y: 100 }), [n, r] = g(!1), [s, c] = g({ x: 0, y: 0 });
793
+ R(() => {
794
+ const o = (d) => {
795
+ n && a({
796
+ x: d.clientX - s.x,
797
+ y: d.clientY - s.y
2756
798
  });
2757
- }, j = () => f(!1);
2758
- return window.addEventListener("mousemove", p), window.addEventListener("mouseup", j), () => {
2759
- window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", j);
799
+ }, f = () => r(!1);
800
+ return window.addEventListener("mousemove", o), window.addEventListener("mouseup", f), () => {
801
+ window.removeEventListener("mousemove", o), window.removeEventListener("mouseup", f);
2760
802
  };
2761
- }, [d, h]);
2762
- const g = (p) => {
2763
- const j = a.current.getBoundingClientRect();
2764
- v({ x: p.clientX - j.left, y: p.clientY - j.top }), f(!0);
803
+ }, [n, s]);
804
+ const i = (o) => {
805
+ const f = t.current.getBoundingClientRect();
806
+ c({ x: o.clientX - f.left, y: o.clientY - f.top }), r(!0);
2765
807
  };
2766
- return /* @__PURE__ */ n.jsx("div", { className: "bb_", children: /* @__PURE__ */ n.jsxs(
808
+ return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(
2767
809
  "div",
2768
810
  {
2769
- ref: a,
811
+ ref: t,
2770
812
  className: "fixed bg-white shadow-xl rounded-2xl p-4 w-[400px] h-[550px] z-[9999]",
2771
- style: { left: u.x, top: u.y },
2772
- children: [
2773
- o,
2774
- /* @__PURE__ */ n.jsx(
2775
- "div",
2776
- {
2777
- className: "absolute top-1 right-1 cursor-move w-5 h-5 bg-gray-300 rounded",
2778
- onMouseDown: g
2779
- }
2780
- )
2781
- ]
2782
- }
2783
- ) });
813
+ style: { left: l.x, top: l.y }
814
+ },
815
+ e,
816
+ /* @__PURE__ */ React.createElement(
817
+ "div",
818
+ {
819
+ className: "absolute top-1 right-1 cursor-move w-5 h-5 bg-gray-300 rounded",
820
+ onMouseDown: i
821
+ }
822
+ )
823
+ ));
2784
824
  }
2785
- const Fa = ({
2786
- defaultValue: o,
2787
- onValueChange: a,
2788
- url: u
825
+ const dt = ({
826
+ value: e,
827
+ onValueChange: t,
828
+ url: l
2789
829
  }) => {
2790
- const [l, d] = F({
830
+ const [a, n] = g({
2791
831
  x: 0.5,
2792
832
  y: 0.5
2793
833
  });
2794
- return G(() => {
2795
- a(
2796
- `[${(l.x * 100).toFixed(2)}%_${(l.y * 100).toFixed(
2797
- 2
2798
- )}%]`
834
+ return R(() => {
835
+ if (e && e.includes("%")) {
836
+ const [r, s] = e.replace("[", "").replace("%]", "").split("_").map((c) => parseFloat(c) / 100);
837
+ n({ x: r, y: s });
838
+ }
839
+ }, [e]), R(() => {
840
+ t(
841
+ `[${(a.x * 100).toFixed(2)}%_${(a.y * 100).toFixed(2)}%]`
2799
842
  );
2800
- }, [l]), G(() => {
2801
- if (o.includes("%")) {
2802
- const [f, h] = o.replace("[", "").replace("%]", "").split("_").map((v) => parseFloat(v) / 100);
2803
- d({
2804
- x: f,
2805
- y: h
2806
- });
2807
- }
2808
- }, [o]), /* @__PURE__ */ n.jsx(ne, { className: "relative flex flex-col", children: /* @__PURE__ */ n.jsx(
2809
- hn,
843
+ }, [a]), /* @__PURE__ */ React.createElement(E, { className: "relative flex flex-col" }, /* @__PURE__ */ React.createElement(
844
+ Q,
2810
845
  {
2811
- url: u,
2812
- value: l,
2813
- onDrag: (f) => d(f),
2814
- onChange: (f) => d(f)
846
+ url: l,
847
+ value: a,
848
+ onDrag: n,
849
+ onChange: n
2815
850
  }
2816
- ) });
851
+ ));
2817
852
  };
2818
- function La(o) {
2819
- const [a, u] = F(""), [l, d] = F([]), [f, h] = F({
853
+ function ft(e) {
854
+ const [t, l] = g(""), [a, n] = g([]), [r, s] = g({
2820
855
  url: "",
2821
856
  title: ""
2822
857
  });
2823
- return G(() => {
2824
- a !== "" && (d(null), Yn({
2825
- path: `/blockbite/v1/block-helpers/get-links/${a}`
858
+ return R(() => {
859
+ t !== "" && (n(null), pe({
860
+ path: `/blockbite/v1/block-helpers/get-links/${t}`
2826
861
  }).then(
2827
- (v) => {
2828
- v?.length ? d([...v]) : d([]);
862
+ (c) => {
863
+ c != null && c.length ? n([...c]) : n([]);
2829
864
  }
2830
865
  ));
2831
- }, [a]), G(() => {
2832
- f.url !== "" && o.parentCallback(f);
2833
- }, [f]), /* @__PURE__ */ n.jsxs(ne, { className: "blockbite--editor-linkwrap", children: [
2834
- /* @__PURE__ */ n.jsx(
2835
- rt,
2836
- {
2837
- __next40pxDefaultSize: !0,
2838
- __nextHasNoMarginBottom: !0,
2839
- label: Me("Search link", "blockbitelinks"),
2840
- value: a,
2841
- placeholder: "Example: About",
2842
- onChange: (v) => u(v),
2843
- help: Me("Type a post, page, title", "blockbitelinks")
2844
- }
2845
- ),
2846
- a ? /* @__PURE__ */ n.jsx("div", { className: "blockbite--editor-linklist", children: /* @__PURE__ */ n.jsx(
2847
- sa,
2848
- {
2849
- links: l,
2850
- onActiveLink: (v) => [
2851
- h({ ...v }),
2852
- u("")
2853
- ]
2854
- }
2855
- ) }) : null
2856
- ] });
866
+ }, [t]), R(() => {
867
+ r.url !== "" && e.parentCallback(r);
868
+ }, [r]), /* @__PURE__ */ React.createElement(E, { className: "blockbite--editor-linkwrap" }, /* @__PURE__ */ React.createElement(
869
+ B,
870
+ {
871
+ __next40pxDefaultSize: !0,
872
+ __nextHasNoMarginBottom: !0,
873
+ label: w("Search link", "blockbitelinks"),
874
+ value: t,
875
+ placeholder: "Example: About",
876
+ onChange: (c) => l(c),
877
+ help: w("Type a post, page, title", "blockbitelinks")
878
+ }
879
+ ), t ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--editor-linklist" }, /* @__PURE__ */ React.createElement(
880
+ Ze,
881
+ {
882
+ links: a,
883
+ onActiveLink: (c) => [
884
+ s({ ...c }),
885
+ l("")
886
+ ]
887
+ }
888
+ )) : null);
2857
889
  }
2858
- function sa({ links: o, onActiveLink: a }) {
2859
- if (o === null)
2860
- return /* @__PURE__ */ n.jsx("p", { children: "Loading..." });
2861
- if (o.length === 0)
2862
- return /* @__PURE__ */ n.jsx("p", { children: "No Results" });
2863
- const u = o.map((l) => /* @__PURE__ */ n.jsx(ne, { children: /* @__PURE__ */ n.jsxs(
890
+ function Ze({ links: e, onActiveLink: t }) {
891
+ if (e === null)
892
+ return /* @__PURE__ */ React.createElement("p", null, "Loading...");
893
+ if (e.length === 0)
894
+ return /* @__PURE__ */ React.createElement("p", null, "No Results");
895
+ const l = e.map((a) => /* @__PURE__ */ React.createElement(E, { key: a.id }, /* @__PURE__ */ React.createElement(
2864
896
  "span",
2865
897
  {
2866
898
  className: "blockbite--editor-link",
2867
- onClick: () => a(l),
2868
- children: [
2869
- /* @__PURE__ */ n.jsx("span", { children: l.title }),
2870
- /* @__PURE__ */ n.jsx("span", { className: "blockbite--preview-link", children: l.url }),
2871
- /* @__PURE__ */ n.jsx("span", { className: "blockbite--preview-link", children: l.post_type })
2872
- ]
2873
- }
2874
- ) }, l.id));
2875
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: u });
899
+ onClick: () => t(a)
900
+ },
901
+ /* @__PURE__ */ React.createElement("span", null, a.title),
902
+ /* @__PURE__ */ React.createElement("span", { className: "blockbite--preview-link" }, a.url),
903
+ /* @__PURE__ */ React.createElement("span", { className: "blockbite--preview-link" }, a.post_type)
904
+ )));
905
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, l);
2876
906
  }
2877
- function Ma({ mediaProps: o, mediaCallback: a }) {
2878
- const u = [
907
+ function pt({ mediaProps: e, mediaCallback: t }) {
908
+ const l = [
2879
909
  "image",
2880
910
  "video",
2881
911
  "image/svg+xml",
2882
912
  "svg",
2883
913
  "text/plain",
2884
914
  "application/json"
2885
- ], [l, d] = F({
915
+ ], [a, n] = g({
2886
916
  id: null,
2887
917
  url: "",
2888
918
  sizes: [],
@@ -2891,740 +921,689 @@ function Ma({ mediaProps: o, mediaCallback: a }) {
2891
921
  width: 0,
2892
922
  height: 0
2893
923
  });
2894
- G(() => {
2895
- o && d({ ...o });
2896
- }, [o]);
2897
- const f = () => {
2898
- a({ ...{
924
+ R(() => {
925
+ e && n({ ...e });
926
+ }, [e]);
927
+ const r = () => {
928
+ t({ ...{
2899
929
  mediaId: 0,
2900
930
  mediaUrl: ""
2901
931
  } });
2902
- }, h = (v) => {
2903
- const g = {
932
+ }, s = (c) => {
933
+ const i = {
2904
934
  thumbnail: null,
2905
935
  medium: null,
2906
936
  large: null
2907
937
  };
2908
- v?.sizes && Object.keys(v.sizes).map((j) => {
2909
- const _ = v.sizes[j];
2910
- return (j === "thumbnail" || _.width < 768 || _.height < 768) && (g.thumbnail = _.url), (j === "medium" || _.width > 1024 && _.width < 1024 || _.height < 1536 && _.height > 1536) && (g.medium = _.url), (j === "large" || _.width > 1536 || _.height > 1536) && (g.large = _.url), null;
2911
- }), v.url.endsWith(".json") && (v.type = "lottie"), v.url.endsWith(".svg") && (v.type = "svg");
2912
- const p = {
2913
- id: v.id,
2914
- url: v.url,
2915
- sizes: g,
2916
- alt: v.alt,
2917
- type: v.type,
2918
- width: v.width,
2919
- height: v.height
938
+ c != null && c.sizes && Object.keys(c.sizes).map((f) => {
939
+ const d = c.sizes[f];
940
+ return (f === "thumbnail" || d.width < 768 || d.height < 768) && (i.thumbnail = d.url), (f === "medium" || d.width > 1024 && d.width < 1024 || d.height < 1536 && d.height > 1536) && (i.medium = d.url), (f === "large" || d.width > 1536 || d.height > 1536) && (i.large = d.url), null;
941
+ }), c.url.endsWith(".json") && (c.type = "lottie"), c.url.endsWith(".svg") && (c.type = "svg");
942
+ const o = {
943
+ id: c.id,
944
+ url: c.url,
945
+ sizes: i,
946
+ alt: c.alt,
947
+ type: c.type,
948
+ width: c.width,
949
+ height: c.height
2920
950
  };
2921
- a({ ...p });
951
+ t({ ...o });
2922
952
  };
2923
- return /* @__PURE__ */ n.jsxs(yn, { children: [
2924
- l.id !== null && /* @__PURE__ */ n.jsx(Qr, { children: /* @__PURE__ */ n.jsx(
2925
- Pt,
2926
- {
2927
- onSelect: h,
2928
- value: l.id,
2929
- allowedTypes: u,
2930
- render: ({ open: v }) => /* @__PURE__ */ n.jsxs(
2931
- ye,
953
+ return /* @__PURE__ */ React.createElement(ee, null, a.id !== null && /* @__PURE__ */ React.createElement(T, null, /* @__PURE__ */ React.createElement(
954
+ $,
955
+ {
956
+ onSelect: s,
957
+ value: a.id,
958
+ allowedTypes: l,
959
+ render: ({ open: c }) => /* @__PURE__ */ React.createElement(
960
+ C,
961
+ {
962
+ className: a.id === 0 ? "editor-post-featured-image__toggle" : "editor-post-featured-image__preview",
963
+ onClick: c
964
+ },
965
+ a.id === 0 && w("Choose Media", "blockbite"),
966
+ a.id && a.type === "image" ? /* @__PURE__ */ React.createElement("div", { className: "blockbite--editor-visual-image" }, /* @__PURE__ */ React.createElement(
967
+ "img",
2932
968
  {
2933
- className: l.id === 0 ? "editor-post-featured-image__toggle" : "editor-post-featured-image__preview",
2934
- onClick: v,
2935
- children: [
2936
- l.id === 0 && Me("Choose Media", "blockbite"),
2937
- l.id && l.type === "image" ? /* @__PURE__ */ n.jsx("div", { className: "blockbite--editor-visual-image", children: /* @__PURE__ */ n.jsx(
2938
- "img",
2939
- {
2940
- alt: l.alt ? l.alt : Me("Image", "blockbite"),
2941
- src: l.url
2942
- }
2943
- ) }) : "Add media"
2944
- ]
969
+ alt: a.alt ? a.alt : w("Image", "blockbite"),
970
+ src: a.url
2945
971
  }
2946
- )
2947
- }
2948
- ) }),
2949
- l.id !== 0 && /* @__PURE__ */ n.jsx(Qr, { children: /* @__PURE__ */ n.jsx(
2950
- Pt,
2951
- {
2952
- title: Me("Replace media", "blockbite"),
2953
- value: l.id,
2954
- onSelect: h,
2955
- allowedTypes: u,
2956
- render: ({ open: v }) => /* @__PURE__ */ n.jsx(ye, { onClick: v, children: Me("Replace media", "blockbite") })
2957
- }
2958
- ) }),
2959
- l.id !== 0 && /* @__PURE__ */ n.jsx(Qr, { children: /* @__PURE__ */ n.jsx(ye, { onClick: () => f(), isDestructive: !0, children: Me("Remove media", "blockbite") }) })
2960
- ] });
972
+ )) : "Add media"
973
+ )
974
+ }
975
+ )), a.id !== 0 && /* @__PURE__ */ React.createElement(T, null, /* @__PURE__ */ React.createElement(
976
+ $,
977
+ {
978
+ title: w("Replace media", "blockbite"),
979
+ value: a.id,
980
+ onSelect: s,
981
+ allowedTypes: l,
982
+ render: ({ open: c }) => /* @__PURE__ */ React.createElement(C, { onClick: c }, w("Replace media", "blockbite"))
983
+ }
984
+ )), a.id !== 0 && /* @__PURE__ */ React.createElement(T, null, /* @__PURE__ */ React.createElement(C, { onClick: () => r(), isDestructive: !0 }, w("Remove media", "blockbite"))));
2961
985
  }
2962
- const ia = ({
2963
- children: o,
2964
- className: a,
2965
- position: u,
2966
- visible: l,
2967
- onClick: d,
2968
- onVisibleChange: f
986
+ const $e = ({
987
+ children: e,
988
+ className: t,
989
+ position: l,
990
+ visible: a,
991
+ onClick: n,
992
+ onVisibleChange: r
2969
993
  }) => {
2970
- const [h, v] = F(!!l);
2971
- G(() => {
2972
- l !== void 0 && v(l);
2973
- }, [l]);
2974
- const g = () => {
2975
- const p = !h;
2976
- v(p), f && f(p);
994
+ const [s, c] = g(!!a);
995
+ R(() => {
996
+ a !== void 0 && c(a);
997
+ }, [a]);
998
+ const i = () => {
999
+ const o = !s;
1000
+ c(o), r && r(o);
2977
1001
  };
2978
- return /* @__PURE__ */ n.jsx(n.Fragment, { children: h && /* @__PURE__ */ n.jsx(
2979
- bn,
1002
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, s && /* @__PURE__ */ React.createElement(
1003
+ te,
2980
1004
  {
2981
- position: u,
2982
- className: "blockbite-ui__popover bb_",
2983
- onClick: d,
1005
+ position: l,
1006
+ className: "blockbite-ui__popover",
1007
+ onClick: n,
2984
1008
  onFocusOutside: () => {
2985
- v(!1), f && f(!1);
1009
+ c(!1), r && r(!1);
1010
+ }
1011
+ },
1012
+ /* @__PURE__ */ React.createElement("div", { className: t }, /* @__PURE__ */ React.createElement("div", { className: "relative h-full w-full p-4" }, /* @__PURE__ */ React.createElement(
1013
+ C,
1014
+ {
1015
+ onClick: i,
1016
+ size: "small",
1017
+ className: "close-button absolute right-0 top-0"
2986
1018
  },
2987
- children: /* @__PURE__ */ n.jsx("div", { className: a, children: /* @__PURE__ */ n.jsxs("div", { className: "relative h-full w-full p-4", children: [
2988
- /* @__PURE__ */ n.jsx(
2989
- ye,
2990
- {
2991
- onClick: g,
2992
- size: "small",
2993
- className: "close-button absolute right-0 top-0",
2994
- children: /* @__PURE__ */ n.jsx($n, {})
2995
- }
2996
- ),
2997
- o
2998
- ] }) })
2999
- }
3000
- ) });
3001
- }, la = ({
3002
- defaultValue: o,
3003
- label: a,
3004
- min: u = 0,
3005
- max: l = 2e3,
3006
- withInputField: d = !1,
3007
- onValueChange: f,
3008
- gridMode: h = !1,
3009
- showTooltip: v = !1,
3010
- ...g
1019
+ /* @__PURE__ */ React.createElement(ke, null)
1020
+ ), e))
1021
+ ));
1022
+ }, Ie = ({
1023
+ value: e,
1024
+ label: t,
1025
+ min: l = 0,
1026
+ max: a = 2e3,
1027
+ withInputField: n = !1,
1028
+ onValueChange: r,
1029
+ gridMode: s = !1,
1030
+ showTooltip: c = !1,
1031
+ ...i
3011
1032
  }) => {
3012
- const [p] = F(0), [j, _] = F(0);
3013
- G(() => {
3014
- _(Math.round(parseInt(o) / (h ? 16 : 1)));
3015
- }, [o]);
3016
- function O(T) {
3017
- const k = T * (h ? 16 : 1);
3018
- f(k.toString());
1033
+ const [o] = g(0), [f, d] = g(0);
1034
+ R(() => {
1035
+ d(Math.round(parseInt(e) / (s ? 16 : 1)));
1036
+ }, [e]);
1037
+ function m(u) {
1038
+ const b = u * (s ? 16 : 1);
1039
+ r(b.toString());
3019
1040
  }
3020
- return /* @__PURE__ */ n.jsxs(ne, { className: "flex min-w-[240px] flex-col", children: [
3021
- /* @__PURE__ */ n.jsx(
3022
- gn,
3023
- {
3024
- __next40pxDefaultSize: !0,
3025
- __nextHasNoMarginBottom: !0,
3026
- label: a,
3027
- value: j,
3028
- min: u,
3029
- max: l,
3030
- showTooltip: v,
3031
- withInputField: d,
3032
- onChange: (T) => {
3033
- _(T), O(T);
3034
- },
3035
- resetFallbackValue: p,
3036
- ...g
3037
- }
3038
- ),
3039
- /* @__PURE__ */ n.jsxs("span", { children: [
3040
- h ? `${j * 16}px` : null,
3041
- " "
3042
- ] })
3043
- ] });
3044
- }, Ba = ({
3045
- defaultUnit: o,
3046
- defaultValue: a,
3047
- onValueChange: u,
3048
- onUnitChange: l,
3049
- inputClassName: d = "w-[75px]"
1041
+ return /* @__PURE__ */ React.createElement(E, { className: "flex min-w-[240px] flex-col" }, /* @__PURE__ */ React.createElement(
1042
+ ae,
1043
+ {
1044
+ __next40pxDefaultSize: !0,
1045
+ __nextHasNoMarginBottom: !0,
1046
+ label: t,
1047
+ value: f,
1048
+ min: l,
1049
+ max: a,
1050
+ showTooltip: c,
1051
+ withInputField: n,
1052
+ onChange: (u) => {
1053
+ d(u), m(u);
1054
+ },
1055
+ resetFallbackValue: o,
1056
+ ...i
1057
+ }
1058
+ ), /* @__PURE__ */ React.createElement("span", null, s ? `${f * 16}px` : null, " "));
1059
+ }, gt = ({
1060
+ unit: e,
1061
+ value: t,
1062
+ onValueChange: l,
1063
+ onUnitChange: a,
1064
+ inputClassName: n = ""
3050
1065
  }) => {
3051
- const [f, h] = F(!1), [v, g] = F([]), [p, j] = F(o), [_, O] = F(""), [T, k] = F(a);
3052
- G(() => {
3053
- o && j(o), O(a.toString());
3054
- }, [o, a]), G(() => {
3055
- !f && p === "arbitrary" && k(_);
3056
- }, [f]);
3057
- const ae = (A) => {
3058
- if (A !== "arbitrary" && bb?.codex?.units?.spacing?.[A]) {
3059
- const Y = bb.codex.units.spacing[A];
3060
- g(
3061
- Array.isArray(Y) ? Y : Object.keys(Y)
1066
+ const [r, s] = g(!1), [c, i] = g([]), [o, f] = g(t);
1067
+ R(() => {
1068
+ !r && e === "arbitrary" && f(t);
1069
+ }, [r]);
1070
+ const d = (u) => {
1071
+ var b, x, k;
1072
+ if (u !== "arbitrary" && ((k = (x = (b = bb == null ? void 0 : bb.codex) == null ? void 0 : b.units) == null ? void 0 : x.spacing) != null && k[u])) {
1073
+ const N = bb.codex.units.spacing[u];
1074
+ i(
1075
+ Array.isArray(N) ? N : Object.keys(N)
3062
1076
  );
3063
1077
  } else
3064
- g([]);
3065
- h(!0);
3066
- }, de = [
1078
+ i([]);
1079
+ s(!0);
1080
+ }, m = [
3067
1081
  {
3068
- icon: /* @__PURE__ */ n.jsx(Fn, {}),
1082
+ icon: /* @__PURE__ */ React.createElement(Be, null),
3069
1083
  label: "Tailwind CSS Units",
3070
1084
  value: "native"
3071
1085
  },
3072
- { icon: /* @__PURE__ */ n.jsx(Ln, {}), label: "Percentage Units", value: "percent" },
3073
- { icon: /* @__PURE__ */ n.jsx(Mn, {}), label: "Grid Units", value: "grid" },
3074
- { icon: /* @__PURE__ */ n.jsx(Bn, {}), label: "Screen Units", value: "screen" },
3075
- { icon: /* @__PURE__ */ n.jsx(Wn, {}), label: "Pixel Units", value: "arbitrary" },
3076
- { icon: /* @__PURE__ */ n.jsx(Un, {}), label: "Fluid Units", value: "fluid" }
1086
+ { icon: /* @__PURE__ */ React.createElement(Se, null), label: "Percentage Units", value: "percent" },
1087
+ { icon: /* @__PURE__ */ React.createElement(Le, null), label: "Grid Units", value: "grid" },
1088
+ { icon: /* @__PURE__ */ React.createElement(_e, null), label: "Screen Units", value: "screen" },
1089
+ { icon: /* @__PURE__ */ React.createElement(He, null), label: "Pixel Units", value: "arbitrary" },
1090
+ { icon: /* @__PURE__ */ React.createElement(ye, null), label: "Fluid Units", value: "fluid" }
3077
1091
  ];
3078
- return /* @__PURE__ */ n.jsx("div", { className: "relative flex flex-col items-baseline", children: /* @__PURE__ */ n.jsxs(
3079
- ot,
1092
+ return /* @__PURE__ */ React.createElement("div", { className: "relative flex flex-col items-baseline" }, /* @__PURE__ */ React.createElement(
1093
+ O,
3080
1094
  {
3081
- inputClassName: d,
3082
- defaultValue: (
3083
- // Remove the "b_" prefix for grid units
3084
- p === "grid" ? _.replace("b_", "") : _
3085
- ),
3086
- onClick: () => p !== "arbitrary" && ae(p),
3087
- onChange: (A) => {
3088
- O(A), u(A);
3089
- },
3090
- readOnly: p !== "arbitrary",
3091
- children: [
3092
- /* @__PURE__ */ n.jsx(
3093
- ia,
1095
+ __next40pxDefaultSize: !0,
1096
+ className: n,
1097
+ value: e === "grid" ? t.replace("b_", "") : t,
1098
+ onClick: () => e !== "arbitrary" && d(e),
1099
+ onChange: l,
1100
+ readOnly: e !== "arbitrary",
1101
+ autoComplete: "off",
1102
+ suffix: /* @__PURE__ */ React.createElement(z, null, /* @__PURE__ */ React.createElement(
1103
+ $e,
1104
+ {
1105
+ visible: r,
1106
+ position: "bottom left",
1107
+ className: "w-[300px] bg-white shadow-sm",
1108
+ onVisibleChange: s
1109
+ },
1110
+ e === "arbitrary" ? /* @__PURE__ */ React.createElement(
1111
+ Ie,
3094
1112
  {
3095
- visible: f,
3096
- position: "bottom left",
3097
- className: "w-[300px] bg-white shadow-sm",
3098
- onVisibleChange: h,
3099
- children: p === "arbitrary" ? /* @__PURE__ */ n.jsx(
3100
- la,
3101
- {
3102
- defaultValue: _,
3103
- label: "Pixel Value",
3104
- min: 0,
3105
- max: 100,
3106
- gridMode: !0,
3107
- showTooltip: !1,
3108
- allowReset: !0,
3109
- resetFallbackValue: isNaN(T.toString()) ? 0 : Number(T) / 16,
3110
- onValueChange: (A) => {
3111
- O(A), u(A);
3112
- }
3113
- }
3114
- ) : /* @__PURE__ */ n.jsx(
3115
- na,
3116
- {
3117
- className: "mt-4",
3118
- options: v.map((A) => ({
3119
- value: A,
3120
- label: p === "grid" ? A.toString().replace("b_", "") : A,
3121
- onClick: () => {
3122
- O(A), u(A);
3123
- }
3124
- })),
3125
- size: "small",
3126
- defaultPressed: _?.toString() || "",
3127
- onPressedChange: (A) => {
3128
- O(A), u(A);
3129
- }
3130
- }
3131
- )
1113
+ value: t,
1114
+ label: "Pixel Value",
1115
+ min: 0,
1116
+ max: 100,
1117
+ gridMode: !0,
1118
+ showTooltip: !1,
1119
+ allowReset: !0,
1120
+ resetFallbackValue: isNaN(o.toString()) ? 0 : Number(o) / 16,
1121
+ onValueChange: l
3132
1122
  }
3133
- ),
3134
- /* @__PURE__ */ n.jsx(
3135
- oa,
1123
+ ) : /* @__PURE__ */ React.createElement(
1124
+ we,
3136
1125
  {
3137
- className: "h-[32px]",
3138
- defaultValue: p,
3139
- options: de,
3140
- onPressedChange: (A) => {
3141
- A === "reset" ? (O(""), u(""), h(!1)) : (j(A), l(A), ae(A));
3142
- }
1126
+ className: "mt-4",
1127
+ options: c.map((u) => ({
1128
+ value: u,
1129
+ label: e === "grid" ? u.toString().replace("b_", "") : u,
1130
+ onClick: () => {
1131
+ l(u);
1132
+ }
1133
+ })),
1134
+ size: "small",
1135
+ value: (t == null ? void 0 : t.toString()) || "",
1136
+ onPressedChange: l
3143
1137
  }
3144
1138
  )
3145
- ]
1139
+ ), /* @__PURE__ */ React.createElement(
1140
+ Pe,
1141
+ {
1142
+ value: e,
1143
+ options: m,
1144
+ toggleProps: {
1145
+ className: "!p-0 !min-w-0 !h-6 w-6"
1146
+ },
1147
+ onPressedChange: (u) => {
1148
+ u === "reset" ? (l(""), s(!1)) : (a(u), d(u));
1149
+ }
1150
+ }
1151
+ ))
3146
1152
  }
3147
- ) });
3148
- }, Ut = Wt(null), Vt = () => {
3149
- const o = nt(Ut);
3150
- if (!o)
1153
+ ));
1154
+ }, U = A(null), G = () => {
1155
+ const e = P(U);
1156
+ if (!e)
3151
1157
  throw new Error("useModalContext must be used within a ModalProvider");
3152
- return o;
3153
- }, Wa = ({
3154
- children: o,
3155
- defaultOpen: a,
3156
- onOpenChange: u,
3157
- title: l,
3158
- className: d
1158
+ return e;
1159
+ }, Rt = ({
1160
+ children: e,
1161
+ defaultOpen: t,
1162
+ onOpenChange: l,
1163
+ title: a,
1164
+ className: n
3159
1165
  }) => {
3160
- const [f, h] = F(!1);
3161
- G(() => {
3162
- h(a);
3163
- }, [a]);
3164
- const v = () => h(!0), g = () => h(!1);
3165
- return G(() => {
3166
- u(f);
3167
- }, [f, u]), /* @__PURE__ */ n.jsxs(Ut.Provider, { value: { closeModal: g, openModal: v }, children: [
3168
- Rr.map(o, (p) => Sr(p) && p.type === da ? p : null),
3169
- f && /* @__PURE__ */ n.jsx(
3170
- xn,
3171
- {
3172
- className: W("blockbite-ui__modal bb_", d),
3173
- onRequestClose: g,
3174
- title: l,
3175
- children: /* @__PURE__ */ n.jsxs("div", { className: "relative", children: [
3176
- Rr.map(o, (p) => Sr(p) && p.type === ua ? p : null),
3177
- Rr.map(o, (p) => Sr(p) && p.type === fa ? p : null),
3178
- Rr.map(o, (p) => Sr(p) && p.type === ca ? p : null)
3179
- ] })
3180
- }
3181
- )
3182
- ] });
3183
- }, ua = ({ children: o, className: a = "", ...u }) => /* @__PURE__ */ n.jsx(
1166
+ const [r, s] = g(!1);
1167
+ R(() => {
1168
+ s(t);
1169
+ }, [t]);
1170
+ const c = () => s(!0), i = () => s(!1);
1171
+ return R(() => {
1172
+ l(r);
1173
+ }, [r, l]), /* @__PURE__ */ React.createElement(U.Provider, { value: { closeModal: i, openModal: c } }, _.map(e, (o) => L(o) && o.type === De ? o : null), r && /* @__PURE__ */ React.createElement(
1174
+ le,
1175
+ {
1176
+ className: p("blockbite-ui__modal", n),
1177
+ onRequestClose: i,
1178
+ title: a
1179
+ },
1180
+ /* @__PURE__ */ React.createElement("div", { className: "relative" }, _.map(e, (o) => L(o) && o.type === Oe ? o : null), _.map(e, (o) => L(o) && o.type === je ? o : null), _.map(e, (o) => L(o) && o.type === ze ? o : null))
1181
+ ));
1182
+ }, Oe = ({ children: e, className: t = "", ...l }) => /* @__PURE__ */ React.createElement(
3184
1183
  "div",
3185
1184
  {
3186
- className: W(
1185
+ className: p(
3187
1186
  "flex flex-col space-y-1.5 text-center sm:text-left",
3188
- a
1187
+ t
3189
1188
  ),
3190
- ...u,
3191
- children: o
3192
- }
3193
- ), ca = ({ children: o, className: a = "", ...u }) => /* @__PURE__ */ n.jsx(
1189
+ ...l
1190
+ },
1191
+ e
1192
+ ), ze = ({ children: e, className: t = "", ...l }) => /* @__PURE__ */ React.createElement(
3194
1193
  "div",
3195
1194
  {
3196
- className: W(
3197
- "border-gray-light fixed bottom-0 left-0 right-0 flex h-[4rem] flex-row items-center justify-end space-x-2 border-t bg-white px-4",
3198
- a
1195
+ className: p(
1196
+ "border-border fixed bottom-0 left-0 right-0 flex h-[4rem] flex-row items-center justify-end gap-2 border-t bg-white px-4",
1197
+ t
3199
1198
  ),
3200
- ...u,
3201
- children: o
3202
- }
3203
- ), fa = ({ children: o, className: a = "", ...u }) => /* @__PURE__ */ n.jsx(
1199
+ ...l
1200
+ },
1201
+ e
1202
+ ), je = ({ children: e, className: t = "", ...l }) => /* @__PURE__ */ React.createElement(
3204
1203
  "div",
3205
1204
  {
3206
- className: W("text-gray-medium px-4 pb-4 text-sm", a),
3207
- ...u,
3208
- children: o
3209
- }
3210
- ), Ua = ({ children: o }) => {
3211
- const { closeModal: a } = Vt();
3212
- return /* @__PURE__ */ n.jsx("div", { onClick: a, className: "cursor-pointer", children: o });
3213
- }, da = ({ children: o }) => {
3214
- const { openModal: a } = Vt();
3215
- return /* @__PURE__ */ n.jsx("div", { onClick: a, className: "cursor-pointer", children: o });
1205
+ className: p("text-gray-medium px-4 pb-4 text-sm", t),
1206
+ ...l
1207
+ },
1208
+ e
1209
+ ), Et = ({ children: e }) => {
1210
+ const { closeModal: t } = G();
1211
+ return /* @__PURE__ */ React.createElement("div", { onClick: t, className: "cursor-pointer" }, e);
1212
+ }, De = ({ children: e }) => {
1213
+ const { openModal: t } = G();
1214
+ return /* @__PURE__ */ React.createElement("div", { onClick: t, className: "cursor-pointer" }, e);
3216
1215
  };
3217
- function pa(o, a) {
3218
- Array.from(o.styleSheets).forEach((u) => {
1216
+ function Ae(e, t) {
1217
+ Array.from(e.styleSheets).forEach((l) => {
3219
1218
  try {
3220
- if (u.cssRules) {
3221
- const l = a.createElement("style");
3222
- Array.from(u.cssRules).forEach((d) => {
3223
- l.appendChild(a.createTextNode(d.cssText));
3224
- }), a.head.appendChild(l);
3225
- } else if (u.href) {
3226
- const l = a.createElement("link");
3227
- l.rel = "stylesheet", l.href = u.href, a.head.appendChild(l);
3228
- }
3229
- } catch (l) {
3230
- if (u.href) {
3231
- const d = a.createElement("link");
3232
- d.rel = "stylesheet", d.href = u.href, a.head.appendChild(d);
1219
+ if (l.cssRules) {
1220
+ const a = t.createElement("style");
1221
+ Array.from(l.cssRules).forEach((n) => {
1222
+ a.appendChild(t.createTextNode(n.cssText));
1223
+ }), t.head.appendChild(a);
1224
+ } else if (l.href) {
1225
+ const a = t.createElement("link");
1226
+ a.rel = "stylesheet", a.href = l.href, t.head.appendChild(a);
1227
+ }
1228
+ } catch (a) {
1229
+ if (l.href) {
1230
+ const n = t.createElement("link");
1231
+ n.rel = "stylesheet", n.href = l.href, t.head.appendChild(n);
3233
1232
  } else
3234
- console.warn("Error copying styles:", l);
1233
+ console.warn("Error copying styles:", a);
3235
1234
  }
3236
1235
  });
3237
1236
  }
3238
- const Va = ({
3239
- windowInstance: o,
3240
- onClose: a,
3241
- children: u
1237
+ const ht = ({
1238
+ windowInstance: e,
1239
+ onClose: t,
1240
+ children: l
3242
1241
  }) => {
3243
- const l = Nn(() => document.createElement("div"), []);
3244
- return G(() => {
3245
- const d = o;
3246
- d.document.body.innerHTML = "", d.document.body.appendChild(l), d.document.body.classList.add("bb_"), pa(document, d.document), d.document.title = document.title || "Blockbite Editor";
3247
- const f = () => {
3248
- setTimeout(a, 100);
1242
+ const a = fe(() => document.createElement("div"), []);
1243
+ return R(() => {
1244
+ const n = e;
1245
+ n.document.body.innerHTML = "", n.document.body.appendChild(a), Ae(document, n.document), n.document.title = document.title || "Blockbite Editor";
1246
+ const r = () => {
1247
+ setTimeout(t, 100);
3249
1248
  };
3250
- return d.addEventListener("beforeunload", f), () => {
3251
- d.removeEventListener("beforeunload", f);
1249
+ return n.addEventListener("beforeunload", r), () => {
1250
+ n.removeEventListener("beforeunload", r);
3252
1251
  };
3253
- }, [o]), Bt(u, l);
3254
- }, Ya = ({
3255
- children: o,
3256
- status: a = "success",
3257
- className: u
1252
+ }, [e]), D(l, a);
1253
+ }, Ct = ({
1254
+ children: e,
1255
+ status: t = "success",
1256
+ className: l
3258
1257
  }) => {
3259
- const [l, d] = F(!0);
3260
- return /* @__PURE__ */ n.jsx(ne, { onClick: () => d(!1), children: l && /* @__PURE__ */ n.jsx(
3261
- _n,
1258
+ const [a, n] = g(!0);
1259
+ return /* @__PURE__ */ React.createElement(E, { onClick: () => n(!1) }, a && /* @__PURE__ */ React.createElement(
1260
+ ne,
3262
1261
  {
3263
- status: a,
3264
- className: W(u),
3265
- onRemove: () => d(!1),
3266
- children: o
3267
- }
3268
- ) });
3269
- }, za = ({
3270
- label: o,
3271
- value: a,
3272
- onChange: u,
3273
- ...l
1262
+ status: t,
1263
+ className: p(l),
1264
+ onRemove: () => n(!1)
1265
+ },
1266
+ e
1267
+ ));
1268
+ }, bt = ({
1269
+ label: e,
1270
+ value: t,
1271
+ onChange: l,
1272
+ ...a
3274
1273
  }) => {
3275
- const [d, f] = F(!1);
3276
- return /* @__PURE__ */ n.jsx(
3277
- jn,
1274
+ const [n, r] = g(!1);
1275
+ return /* @__PURE__ */ React.createElement(
1276
+ O,
3278
1277
  {
3279
- label: o,
3280
- value: a,
3281
- type: d ? "text" : "password",
3282
- suffix: /* @__PURE__ */ n.jsx(Cn, { variant: "control", children: /* @__PURE__ */ n.jsx(
3283
- ye,
1278
+ label: e,
1279
+ value: t,
1280
+ type: n ? "text" : "password",
1281
+ suffix: /* @__PURE__ */ React.createElement(z, { variant: "control" }, /* @__PURE__ */ React.createElement(
1282
+ C,
3284
1283
  {
3285
- icon: /* @__PURE__ */ n.jsx(zn, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n.jsx(
3286
- Hn,
1284
+ icon: /* @__PURE__ */ React.createElement(ge, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React.createElement(
1285
+ Re,
3287
1286
  {
3288
- d: d ? "M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z" : "M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"
1287
+ d: n ? "M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z" : "M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"
3289
1288
  }
3290
- ) }),
1289
+ )),
3291
1290
  label: "Show password",
3292
- onClick: () => f((h) => !h),
1291
+ onClick: () => r((s) => !s),
3293
1292
  size: "small"
3294
1293
  }
3295
- ) }),
3296
- onChange: u,
3297
- ...l
1294
+ )),
1295
+ onChange: l,
1296
+ ...a
3298
1297
  }
3299
1298
  );
3300
- }, Ha = ({
3301
- items: o,
3302
- activeId: a,
3303
- onSelect: u,
3304
- className: l
3305
- }) => /* @__PURE__ */ n.jsx(ne, { important: !0, className: l, children: /* @__PURE__ */ n.jsx("div", { className: "w-[200px] overflow-y-auto border-r border-gray-200 gap-2", children: o.map((d) => /* @__PURE__ */ n.jsxs(
1299
+ }, xt = ({
1300
+ items: e,
1301
+ activeId: t,
1302
+ onSelect: l,
1303
+ className: a
1304
+ }) => /* @__PURE__ */ React.createElement(E, { important: !0, className: a }, /* @__PURE__ */ React.createElement("div", { className: "w-[200px] overflow-y-auto border-r border-border gap-2" }, e.map((n) => /* @__PURE__ */ React.createElement(
3306
1305
  "div",
3307
1306
  {
3308
- onClick: () => u(d.id),
3309
- className: `cursor-pointer p-2 border-l-4 flex gap-2 items-center ${a === d.id ? "border-blue-500 bg-gray-100" : "border-transparent"}`,
3310
- children: [
3311
- /* @__PURE__ */ n.jsx("span", { className: "rounded bg-slate-300 w-12 h-12 flex items-center justify-center text-2xl font-bold text-white", children: d.name.charAt(0).toUpperCase() }),
3312
- /* @__PURE__ */ n.jsx("p", { className: "text-sm text-center mt-1", children: d.name })
3313
- ]
1307
+ key: n.id,
1308
+ onClick: () => l(n.id),
1309
+ className: `cursor-pointer p-2 border-l-4 flex gap-2 items-center ${t === n.id ? "border-blue-500 bg-gray-100" : "border-transparent"}`
3314
1310
  },
3315
- d.id
3316
- )) }) });
3317
- function qa(o) {
3318
- const { media: a, mediaClass: u } = o, { url: l, alt: d, sizes: f } = a;
3319
- if (f === void 0)
3320
- return /* @__PURE__ */ n.jsx("img", { src: l, alt: d, className: `bf_media ${u}` });
3321
- const { thumbnail: h, medium: v, large: g } = f, p = h || l, j = v || l, _ = g || l;
3322
- return /* @__PURE__ */ n.jsxs("picture", { className: "bf_responsive-media", children: [
3323
- p ? /* @__PURE__ */ n.jsx(
3324
- "source",
3325
- {
3326
- media: "(max-width: 768px)",
3327
- srcSet: p,
3328
- className: `bf_media ${u}`
3329
- }
3330
- ) : null,
3331
- j ? /* @__PURE__ */ n.jsx(
3332
- "source",
3333
- {
3334
- media: "(min-width: 1024px)",
3335
- srcSet: j,
3336
- className: `bf_media ${u}`
3337
- }
3338
- ) : null,
3339
- _ ? /* @__PURE__ */ n.jsx(
3340
- "source",
3341
- {
3342
- media: "(min-width: 1536px)",
3343
- srcSet: _,
3344
- className: `bf_media ${u}`
3345
- }
3346
- ) : null,
3347
- j ? /* @__PURE__ */ n.jsx("img", { src: j, alt: d, className: `bf_media ${u}` }) : null
3348
- ] });
1311
+ /* @__PURE__ */ React.createElement("span", { className: "rounded bg-slate-300 w-12 h-12 flex items-center justify-center text-2xl font-bold text-white" }, n.name.charAt(0).toUpperCase()),
1312
+ /* @__PURE__ */ React.createElement("p", { className: "text-sm text-center mt-1" }, n.name)
1313
+ ))));
1314
+ function wt(e) {
1315
+ const { media: t, mediaClass: l } = e, { url: a, alt: n, sizes: r } = t;
1316
+ if (r === void 0)
1317
+ return /* @__PURE__ */ React.createElement("img", { src: a, alt: n, className: `media ${l}` });
1318
+ const { thumbnail: s, medium: c, large: i } = r, o = s || a, f = c || a, d = i || a;
1319
+ return /* @__PURE__ */ React.createElement("picture", { className: "responsive-media" }, o ? /* @__PURE__ */ React.createElement(
1320
+ "source",
1321
+ {
1322
+ media: "(max-width: 768px)",
1323
+ srcSet: o,
1324
+ className: `media ${l}`
1325
+ }
1326
+ ) : null, f ? /* @__PURE__ */ React.createElement(
1327
+ "source",
1328
+ {
1329
+ media: "(min-width: 1024px)",
1330
+ srcSet: f,
1331
+ className: `media ${l}`
1332
+ }
1333
+ ) : null, d ? /* @__PURE__ */ React.createElement(
1334
+ "source",
1335
+ {
1336
+ media: "(min-width: 1536px)",
1337
+ srcSet: d,
1338
+ className: `media ${l}`
1339
+ }
1340
+ ) : null, f ? /* @__PURE__ */ React.createElement("img", { src: f, alt: n, className: `media ${l}` }) : null);
3349
1341
  }
3350
- function Ga(o) {
3351
- const { media: a, mediaClass: u } = o, { url: l } = a, d = l;
3352
- return /* @__PURE__ */ n.jsx(
1342
+ function vt(e) {
1343
+ const { media: t, mediaClass: l } = e, { url: a } = t, n = a;
1344
+ return /* @__PURE__ */ React.createElement(
3353
1345
  "video",
3354
1346
  {
3355
- className: `bf_responsive-media ${u}`,
1347
+ className: `responsive-media ${l}`,
3356
1348
  preload: "none",
3357
1349
  playsInline: !0,
3358
1350
  controls: !0,
3359
1351
  autoPlay: !0,
3360
1352
  muted: !0,
3361
- loop: !0,
3362
- children: /* @__PURE__ */ n.jsx("source", { src: d, type: "video/mp4" })
3363
- }
1353
+ loop: !0
1354
+ },
1355
+ /* @__PURE__ */ React.createElement("source", { src: n, type: "video/mp4" })
3364
1356
  );
3365
1357
  }
3366
- const Ka = ({
3367
- children: o,
3368
- className: a = "",
3369
- height: u = "large"
3370
- }) => /* @__PURE__ */ n.jsx(
3371
- ne,
1358
+ const Nt = ({
1359
+ children: e,
1360
+ className: t = "",
1361
+ height: l = "large"
1362
+ }) => /* @__PURE__ */ React.createElement(
1363
+ E,
3372
1364
  {
3373
- className: W("scrollbar relative overflow-y-scroll", a, {
3374
- "h-[400px]": u === "large",
3375
- "h-[300px]": u === "medium",
3376
- "h-[200px]": u === "small"
3377
- }),
3378
- children: o
3379
- }
3380
- ), Ja = ({
3381
- onChange: o,
3382
- className: a,
3383
- defaultValue: u,
3384
- options: l,
3385
- label: d = "",
3386
- emptyLabel: f = "No options available"
1365
+ className: p("scrollbar relative overflow-y-scroll", t, {
1366
+ "h-[400px]": l === "large",
1367
+ "h-[300px]": l === "medium",
1368
+ "h-[200px]": l === "small"
1369
+ })
1370
+ },
1371
+ e
1372
+ ), yt = ({
1373
+ onChange: e,
1374
+ className: t,
1375
+ value: l,
1376
+ options: a,
1377
+ label: n = "",
1378
+ emptyLabel: r = "No options available"
3387
1379
  }) => {
3388
- const [h, v] = F("");
3389
- G(() => {
3390
- v(u);
3391
- }, []);
3392
- const g = (p) => {
3393
- v(p), o && o(p);
1380
+ const s = (c) => {
1381
+ e && e(c);
3394
1382
  };
3395
- return /* @__PURE__ */ n.jsxs("div", { className: a, children: [
3396
- l && l.length > 0 && /* @__PURE__ */ n.jsx(
3397
- wn,
3398
- {
3399
- __next40pxDefaultSize: !0,
3400
- __nextHasNoMarginBottom: !0,
3401
- label: d || "",
3402
- value: h || "",
3403
- onChange: g,
3404
- options: [{ value: "", label: "Select an option" }, ...l]
3405
- }
3406
- ),
3407
- (!l || l?.length === 0) && /* @__PURE__ */ n.jsx("p", { className: "mb-2", children: f })
3408
- ] });
3409
- }, { select: va, dispatch: ma } = wp.data, Xa = ({
3410
- buttonText: o = "Add block"
1383
+ return /* @__PURE__ */ React.createElement("div", { className: t }, a && a.length > 0 && /* @__PURE__ */ React.createElement(
1384
+ re,
1385
+ {
1386
+ __next40pxDefaultSize: !0,
1387
+ __nextHasNoMarginBottom: !0,
1388
+ label: n || "",
1389
+ value: l || "",
1390
+ onChange: s,
1391
+ options: [{ value: "", label: "Select an option" }, ...a]
1392
+ }
1393
+ ), (!a || (a == null ? void 0 : a.length) === 0) && /* @__PURE__ */ React.createElement("p", { className: "mb-2" }, r));
1394
+ }, { select: Fe, dispatch: Ue } = wp.data, kt = ({
1395
+ buttonText: e = "Add block"
3411
1396
  }) => {
3412
- const a = () => {
3413
- const u = va("core/block-editor").getSelectedBlock(), { clientId: l, innerBlocks: d } = u, f = d[d.length - 1], h = qn(
3414
- f.name,
3415
- f.attributes,
3416
- f.innerBlocks
1397
+ const t = () => {
1398
+ const l = Fe("core/block-editor").getSelectedBlock(), { clientId: a, innerBlocks: n } = l, r = n[n.length - 1], s = Ee(
1399
+ r.name,
1400
+ r.attributes,
1401
+ r.innerBlocks
3417
1402
  );
3418
- ma("core/block-editor").insertBlocks(h, 0, l);
1403
+ Ue("core/block-editor").insertBlocks(s, 0, a);
3419
1404
  };
3420
- return /* @__PURE__ */ n.jsx(ye, { variant: "primary", onClick: () => a(), children: o });
3421
- }, Za = ({ children: o, watch: a, className: u }) => {
3422
- const [l, d] = F(0);
3423
- return G(() => {
1405
+ return /* @__PURE__ */ React.createElement(C, { variant: "primary", onClick: () => t() }, e);
1406
+ }, _t = ({ children: e, watch: t, className: l }) => {
1407
+ const [a, n] = g(0);
1408
+ return R(() => {
3424
1409
  setTimeout(() => {
3425
- d(1);
1410
+ n(1);
3426
1411
  }, 250);
3427
- }, [a]), /* @__PURE__ */ n.jsx(
3428
- ne,
1412
+ }, [t]), /* @__PURE__ */ React.createElement(
1413
+ E,
3429
1414
  {
3430
- className: W(
3431
- u,
1415
+ className: p(
1416
+ l,
3432
1417
  "duration-50 transform transition-all ease-in-out",
3433
1418
  {
3434
- "translate-x-0": l === 1,
3435
- "-translate-x-full": l === 0
1419
+ "translate-x-0": a === 1,
1420
+ "-translate-x-full": a === 0
3436
1421
  }
3437
- ),
3438
- children: o
3439
- }
1422
+ )
1423
+ },
1424
+ e
3440
1425
  );
3441
- }, Qa = ({ className: o, defaultValue: a }) => {
3442
- const [u, l] = F(!1);
3443
- return G(() => {
1426
+ }, Lt = ({ className: e, defaultValue: t }) => {
1427
+ const [l, a] = g(!1);
1428
+ return R(() => {
3444
1429
  setTimeout(() => {
3445
- l(!1);
3446
- }, 500), a && l(!0);
3447
- }, [u, a]), u && /* @__PURE__ */ n.jsx(En, { className: W(o) });
3448
- }, st = Wt(null), ha = ({
3449
- children: o,
3450
- defaultValue: a,
3451
- value: u,
3452
- onValueChange: l,
3453
- ...d
1430
+ a(!1);
1431
+ }, 500), t && a(!0);
1432
+ }, [l, t]), l && /* @__PURE__ */ React.createElement(ce, { className: p(e) });
1433
+ }, Z = A(null), Ge = ({
1434
+ children: e,
1435
+ defaultValue: t,
1436
+ value: l,
1437
+ onValueChange: a,
1438
+ ...n
3454
1439
  }) => {
3455
- const f = u !== void 0, [h, v] = F(a || ""), j = {
3456
- activeTab: f ? u : h,
3457
- setActiveTab: (_) => {
3458
- f || v(_), l && l(_);
1440
+ const r = l !== void 0, [s, c] = g(t || ""), f = {
1441
+ activeTab: r ? l : s,
1442
+ setActiveTab: (d) => {
1443
+ r || c(d), a && a(d);
3459
1444
  }
3460
1445
  };
3461
- return /* @__PURE__ */ n.jsx(st.Provider, { value: j, children: /* @__PURE__ */ n.jsx(ne, { important: !0, className: d.className, children: o }) });
3462
- }, ya = ({
3463
- options: o,
3464
- children: a,
3465
- className: u,
3466
- onValueChange: l
1446
+ return /* @__PURE__ */ React.createElement(Z.Provider, { value: f }, /* @__PURE__ */ React.createElement(E, { important: !0, className: n.className }, e));
1447
+ }, We = ({
1448
+ options: e,
1449
+ children: t,
1450
+ className: l,
1451
+ onValueChange: a
3467
1452
  }) => {
3468
- const d = nt(st), f = l || d?.setActiveTab;
3469
- return /* @__PURE__ */ n.jsx(
3470
- Rn,
1453
+ const n = P(Z), r = a || (n == null ? void 0 : n.setActiveTab);
1454
+ return /* @__PURE__ */ React.createElement(
1455
+ se,
3471
1456
  {
3472
- className: W("tabs-list", u),
3473
- tabs: o,
3474
- onSelect: (h) => {
3475
- f(h);
3476
- },
3477
- children: () => a
3478
- }
1457
+ className: p("tabs-list", l),
1458
+ tabs: e,
1459
+ onSelect: (s) => {
1460
+ r(s);
1461
+ }
1462
+ },
1463
+ () => t
3479
1464
  );
3480
- }, ba = ({
3481
- value: o,
3482
- children: a,
3483
- className: u
3484
- }) => nt(st)?.activeTab === o ? /* @__PURE__ */ n.jsx(ne, { className: u, children: a }) : null, eo = {
3485
- Wrapper: ha,
3486
- List: ya,
3487
- Content: ba
3488
- }, ro = ({
3489
- children: o,
3490
- onClick: a,
3491
- color: u = "blue",
1465
+ }, Ke = ({
1466
+ value: e,
1467
+ children: t,
3492
1468
  className: l
3493
- }) => /* @__PURE__ */ n.jsx("button", { onClick: a, children: /* @__PURE__ */ n.jsx("div", { color: u, className: W(l), children: o }) }), to = ({
3494
- onChange: o,
3495
- defaultValue: a,
3496
- children: u
3497
- }) => /* @__PURE__ */ n.jsxs(ne, { className: "blockbite-ui__text-control-label flex items-center", children: [
3498
- /* @__PURE__ */ n.jsxs("span", { className: "outline-b-2 relative block -outline-offset-2 outline-black", children: [
3499
- /* @__PURE__ */ n.jsx(
3500
- rt,
3501
- {
3502
- __next40pxDefaultSize: !0,
3503
- __nextHasNoMarginBottom: !0,
3504
- type: "text",
3505
- value: a,
3506
- onChange: o
3507
- }
3508
- ),
3509
- /* @__PURE__ */ n.jsx(Vn, { className: "absolute right-1 top-2" })
3510
- ] }),
3511
- " ",
3512
- u
3513
- ] }), no = tt(
1469
+ }) => {
1470
+ const a = P(Z);
1471
+ return (a == null ? void 0 : a.activeTab) === e ? /* @__PURE__ */ React.createElement(E, { className: l }, t) : null;
1472
+ }, Mt = {
1473
+ Wrapper: Ge,
1474
+ List: We,
1475
+ Content: Ke
1476
+ }, St = ({
1477
+ children: e,
1478
+ onClick: t,
1479
+ color: l = "blue",
1480
+ className: a
1481
+ }) => /* @__PURE__ */ React.createElement("button", { onClick: t }, /* @__PURE__ */ React.createElement("div", { color: l, className: p(a) }, e)), Tt = ({
1482
+ onChange: e,
1483
+ defaultValue: t,
1484
+ children: l
1485
+ }) => /* @__PURE__ */ React.createElement(E, { className: "blockbite-ui__text-control-label flex items-center" }, /* @__PURE__ */ React.createElement("span", { className: "outline-b-2 relative block -outline-offset-2 outline-black" }, /* @__PURE__ */ React.createElement(
1486
+ B,
1487
+ {
1488
+ __next40pxDefaultSize: !0,
1489
+ __nextHasNoMarginBottom: !0,
1490
+ type: "text",
1491
+ value: t,
1492
+ onChange: e
1493
+ }
1494
+ ), /* @__PURE__ */ React.createElement(Me, { className: "absolute right-1 top-2" })), " ", l), Ht = V(
3514
1495
  ({
3515
- className: o,
3516
- options: a,
3517
- defaultPressed: u,
3518
- display: l = "label",
3519
- label: d = !1,
3520
- onPressedChange: f
1496
+ className: e,
1497
+ options: t,
1498
+ value: l,
1499
+ display: a = "label",
1500
+ label: n = !1,
1501
+ onPressedChange: r
3521
1502
  }) => {
3522
- const [h, v] = F(""), g = (p) => {
3523
- f(p);
1503
+ const s = (c) => {
1504
+ r(c);
3524
1505
  };
3525
- return G(() => {
3526
- v(u);
3527
- }, [u]), /* @__PURE__ */ n.jsx(ne, { className: W(o), children: /* @__PURE__ */ n.jsx(
3528
- Sn,
1506
+ return /* @__PURE__ */ React.createElement(E, { className: p(e) }, /* @__PURE__ */ React.createElement(
1507
+ oe,
3529
1508
  {
3530
1509
  __next40pxDefaultSize: !0,
3531
1510
  __nextHasNoMarginBottom: !0,
3532
1511
  isBlock: !0,
3533
- value: h,
3534
- label: typeof d == "string" ? d : "",
3535
- children: a.map(
3536
- (p) => l === "icon" ? /* @__PURE__ */ n.jsx(
3537
- kn,
3538
- {
3539
- icon: p.icon,
3540
- label: p.label,
3541
- value: p.value,
3542
- onClick: () => g(p.value)
3543
- },
3544
- `ToggleGroupControlIcon-${p.value}`
3545
- ) : /* @__PURE__ */ n.jsx(
3546
- Tn,
3547
- {
3548
- value: p.value,
3549
- label: p.label,
3550
- onClick: () => g(p.value)
3551
- },
3552
- `ToggleGroupControlOption-${p.value}`
3553
- )
1512
+ value: l,
1513
+ ...n ? { label: n } : {}
1514
+ },
1515
+ t.map(
1516
+ (c) => a === "icon" ? /* @__PURE__ */ React.createElement(
1517
+ ie,
1518
+ {
1519
+ icon: c.icon,
1520
+ label: c.label,
1521
+ key: `ToggleGroupControlIcon-${c.value}`,
1522
+ value: c.value,
1523
+ onClick: () => s(c.value)
1524
+ }
1525
+ ) : /* @__PURE__ */ React.createElement(
1526
+ me,
1527
+ {
1528
+ key: `ToggleGroupControlOption-${c.value}`,
1529
+ value: c.value,
1530
+ label: c.label,
1531
+ onClick: () => s(c.value)
1532
+ }
3554
1533
  )
3555
- }
3556
- ) });
1534
+ )
1535
+ ));
3557
1536
  }
3558
- ), ao = ({
3559
- label: o,
3560
- className: a,
3561
- onChange: u,
3562
- checked: l = !1
1537
+ ), Bt = ({
1538
+ label: e,
1539
+ className: t,
1540
+ onChange: l,
1541
+ checked: a = !1
3563
1542
  // Default to false if undefined, so it's always controlled
3564
1543
  }) => {
3565
- const [d, f] = F(l);
3566
- return G(() => {
3567
- f(l);
3568
- }, [l]), /* @__PURE__ */ n.jsx(ne, { className: W(a, "flex items-center gap-2"), children: /* @__PURE__ */ n.jsx(
3569
- On,
1544
+ const [n, r] = g(a);
1545
+ return R(() => {
1546
+ r(a);
1547
+ }, [a]), /* @__PURE__ */ React.createElement(E, { className: p(t, "flex items-center gap-2") }, /* @__PURE__ */ React.createElement(
1548
+ ue,
3570
1549
  {
3571
- checked: d,
3572
- label: o,
3573
- onChange: (h) => {
3574
- f(h), u && u(h);
1550
+ checked: n,
1551
+ label: e,
1552
+ onChange: (s) => {
1553
+ r(s), l && l(s);
3575
1554
  }
3576
1555
  }
3577
- ) });
1556
+ ));
3578
1557
  };
3579
1558
  export {
3580
- Sa as AutocompleteDropdown,
3581
- aa as Badge,
3582
- ka as BitePreview,
3583
- Ta as Button,
3584
- ta as ButtonToggle,
3585
- na as ButtonToggleGroup,
3586
- Oa as Chapter,
3587
- Pa as ChapterDivider,
3588
- Na as Checkbox,
3589
- Aa as DataItemList,
3590
- Ia as DisappearingMessage,
3591
- oa as DropdownPicker,
3592
- Da as EmptyState,
3593
- $a as FloatingPanel,
3594
- Fa as FocalPointControl,
3595
- Ke as Icon,
3596
- La as LinkPicker,
3597
- Ma as MediaPicker,
3598
- Ba as MetricsControl,
3599
- Wa as Modal,
3600
- Ua as ModalClose,
3601
- fa as ModalContent,
3602
- ca as ModalFooter,
3603
- ua as ModalHeader,
3604
- da as ModalTrigger,
3605
- Va as NewWindowPortal,
3606
- Ya as Notice,
3607
- za as PasswordInput,
3608
- ia as Popover,
3609
- Ha as ProjectsNavigation,
3610
- la as RangeSlider,
3611
- qa as ResponsiveImage,
3612
- Ga as ResponsiveVideo,
3613
- Ka as ScrollList,
3614
- Ja as SelectControlWrapper,
3615
- Xa as SingleBlockTypeAppender,
3616
- Za as SlideIn,
3617
- Qa as Spinner,
3618
- eo as Tabs,
3619
- ba as TabsContent,
3620
- ya as TabsList,
3621
- ha as TabsWrapper,
3622
- ro as Tag,
3623
- ot as TextControl,
3624
- to as TextControlLabel,
3625
- no as ToggleGroup,
3626
- ao as ToggleSwitch,
3627
- ne as Wrap,
3628
- Vt as useModalContext
1559
+ at as AutocompleteDropdown,
1560
+ ve as Badge,
1561
+ lt as BitePreview,
1562
+ nt as Button,
1563
+ xe as ButtonToggle,
1564
+ we as ButtonToggleGroup,
1565
+ rt as Chapter,
1566
+ ct as ChapterDivider,
1567
+ st as Checkbox,
1568
+ ot as DataItemList,
1569
+ it as DisappearingMessage,
1570
+ Pe as DropdownPicker,
1571
+ mt as EmptyState,
1572
+ ut as FloatingPanel,
1573
+ dt as FocalPointControl,
1574
+ v as Icon,
1575
+ ft as LinkPicker,
1576
+ pt as MediaPicker,
1577
+ gt as MetricsControl,
1578
+ Rt as Modal,
1579
+ Et as ModalClose,
1580
+ je as ModalContent,
1581
+ ze as ModalFooter,
1582
+ Oe as ModalHeader,
1583
+ De as ModalTrigger,
1584
+ ht as NewWindowPortal,
1585
+ Ct as Notice,
1586
+ bt as PasswordInput,
1587
+ $e as Popover,
1588
+ xt as ProjectsNavigation,
1589
+ Ie as RangeSlider,
1590
+ wt as ResponsiveImage,
1591
+ vt as ResponsiveVideo,
1592
+ Nt as ScrollList,
1593
+ yt as SelectControlWrapper,
1594
+ kt as SingleBlockTypeAppender,
1595
+ _t as SlideIn,
1596
+ Lt as Spinner,
1597
+ Mt as Tabs,
1598
+ Ke as TabsContent,
1599
+ We as TabsList,
1600
+ Ge as TabsWrapper,
1601
+ St as Tag,
1602
+ F as TextControl,
1603
+ Tt as TextControlLabel,
1604
+ Ht as ToggleGroup,
1605
+ Bt as ToggleSwitch,
1606
+ E as Wrap,
1607
+ G as useModalContext
3629
1608
  };
3630
1609
  //# sourceMappingURL=index.js.map