@wp-playground/components 3.0.13 → 3.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import d, { forwardRef as St, useMemo as wt, useState as Q, useRef as re, useEffect as le, useImperativeHandle as Ot } from "react";
2
- import { __experimentalTreeGrid as Dt, Popover as Ft, NavigableMenu as jt, MenuItem as rt, __experimentalTreeGridRow as At, __experimentalTreeGridCell as Vt, Button as mt, Modal as Nt } from "@wordpress/components";
3
- import gt from "classnames";
4
- import { dirname as ke, joinPaths as Ae, basename as Mt } from "@php-wasm/util";
5
- import { forwardRef as bt, cloneElement as $t, createElement as Ht } from "@wordpress/element";
6
- import It from "clsx";
7
- const wr = (l) => /* @__PURE__ */ d.createElement(
1
+ import f, { forwardRef as St, useMemo as gt, useState as ae, useRef as ie, useEffect as ue, useImperativeHandle as Ot } from "react";
2
+ import { __experimentalTreeGrid as Dt, Popover as jt, NavigableMenu as Ft, MenuItem as tt, __experimentalTreeGridRow as At, __experimentalTreeGridCell as $t, Button as pt, Modal as Nt } from "@wordpress/components";
3
+ import yt from "classnames";
4
+ import { dirname as je, joinPaths as Ne, basename as Mt } from "@php-wasm/util";
5
+ import { forwardRef as Ct, cloneElement as It, createElement as Vt } from "@wordpress/element";
6
+ import Lt from "clsx";
7
+ const wr = (s) => /* @__PURE__ */ f.createElement(
8
8
  "svg",
9
9
  {
10
10
  width: "32",
@@ -12,9 +12,9 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
12
12
  viewBox: "0 0 32 32",
13
13
  fill: "none",
14
14
  xmlns: "http://www.w3.org/2000/svg",
15
- ...l
15
+ ...s
16
16
  },
17
- /* @__PURE__ */ d.createElement(
17
+ /* @__PURE__ */ f.createElement(
18
18
  "rect",
19
19
  {
20
20
  width: "10.4176",
@@ -25,7 +25,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
25
25
  strokeWidth: "0.965644"
26
26
  }
27
27
  ),
28
- /* @__PURE__ */ d.createElement(
28
+ /* @__PURE__ */ f.createElement(
29
29
  "rect",
30
30
  {
31
31
  width: "13.2346",
@@ -36,7 +36,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
36
36
  strokeWidth: "1.44847"
37
37
  }
38
38
  ),
39
- /* @__PURE__ */ d.createElement(
39
+ /* @__PURE__ */ f.createElement(
40
40
  "rect",
41
41
  {
42
42
  width: "17.451",
@@ -47,7 +47,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
47
47
  strokeWidth: "1.93129"
48
48
  }
49
49
  )
50
- ), gr = (l) => /* @__PURE__ */ d.createElement(
50
+ ), gr = (s) => /* @__PURE__ */ f.createElement(
51
51
  "svg",
52
52
  {
53
53
  width: "16",
@@ -55,9 +55,9 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
55
55
  viewBox: "0 0 16 17",
56
56
  fill: "none",
57
57
  xmlns: "http://www.w3.org/2000/svg",
58
- ...l
58
+ ...s
59
59
  },
60
- /* @__PURE__ */ d.createElement(
60
+ /* @__PURE__ */ f.createElement(
61
61
  "path",
62
62
  {
63
63
  fillRule: "evenodd",
@@ -66,7 +66,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
66
66
  fill: "#949494"
67
67
  }
68
68
  )
69
- ), vr = (l) => /* @__PURE__ */ d.createElement(
69
+ ), yr = (s) => /* @__PURE__ */ f.createElement(
70
70
  "svg",
71
71
  {
72
72
  width: "20",
@@ -74,16 +74,16 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
74
74
  viewBox: "0 0 20 21",
75
75
  fill: "none",
76
76
  xmlns: "http://www.w3.org/2000/svg",
77
- ...l
77
+ ...s
78
78
  },
79
- /* @__PURE__ */ d.createElement(
79
+ /* @__PURE__ */ f.createElement(
80
80
  "path",
81
81
  {
82
82
  d: "M20 10.5C20 4.99 15.51 0.5 10 0.5C4.48 0.5 0 4.99 0 10.5C0 16.02 4.48 20.5 10 20.5C15.51 20.5 20 16.02 20 10.5ZM7.78 15.87L4.37 6.72C4.92 6.7 5.54 6.64 5.54 6.64C6.04 6.58 5.98 5.51 5.48 5.53C5.48 5.53 4.03 5.64 3.11 5.64C2.93 5.64 2.74 5.64 2.53 5.63C4.12 3.19 6.87 1.61 10 1.61C12.33 1.61 14.45 2.48 16.05 3.95C15.37 3.84 14.4 4.34 14.4 5.53C14.4 6.27 14.85 6.89 15.3 7.63C15.65 8.24 15.85 8.99 15.85 10.09C15.85 11.58 14.45 15.09 14.45 15.09L11.42 6.72C11.96 6.7 12.24 6.55 12.24 6.55C12.74 6.5 12.68 5.3 12.18 5.33C12.18 5.33 10.74 5.45 9.8 5.45C8.93 5.45 7.47 5.33 7.47 5.33C6.97 5.3 6.91 6.53 7.41 6.55L8.33 6.63L9.59 10.04L7.78 15.87ZM17.41 10.5C17.65 9.86 18.15 8.63 17.84 6.25C18.54 7.54 18.89 8.96 18.89 10.5C18.89 13.79 17.16 16.74 14.49 18.28C15.46 15.69 16.43 13.08 17.41 10.5ZM6.1 18.59C3.12 17.15 1.11 14.03 1.11 10.5C1.11 9.2 1.34 8.02 1.83 6.91C3.25 10.8 4.67 14.7 6.1 18.59ZM10.13 11.96L12.71 18.94C11.85 19.23 10.95 19.39 10 19.39C9.21 19.39 8.43 19.28 7.71 19.06C8.52 16.68 9.33 14.32 10.13 11.96Z",
83
83
  fill: "#ffffff"
84
84
  }
85
85
  )
86
- ), Lt = /* @__PURE__ */ d.createElement(
86
+ ), Wt = /* @__PURE__ */ f.createElement(
87
87
  "svg",
88
88
  {
89
89
  xmlns: "http://www.w3.org/2000/svg",
@@ -92,7 +92,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
92
92
  viewBox: "0 0 15 14",
93
93
  fill: "none"
94
94
  },
95
- /* @__PURE__ */ d.createElement(
95
+ /* @__PURE__ */ f.createElement(
96
96
  "path",
97
97
  {
98
98
  fillRule: "evenodd",
@@ -100,7 +100,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
100
100
  d: "M7.59196 3.59524L6.77745 1.96623C6.70755 1.82641 6.56464 1.7381 6.40832 1.7381H1.65079C1.42287 1.7381 1.2381 1.92287 1.2381 2.15079V11.8492C1.2381 12.0771 1.42287 12.2619 1.65079 12.2619H13.2063C13.4343 12.2619 13.619 12.0771 13.619 11.8492V4.00794C13.619 3.78001 13.4343 3.59524 13.2063 3.59524H7.59196ZM8.35714 2.35714L7.88484 1.41254C7.60521 0.853274 7.0336 0.5 6.40832 0.5H1.65079C0.739085 0.5 0 1.23909 0 2.15079V11.8492C0 12.7609 0.739085 13.5 1.65079 13.5H13.2063C14.1181 13.5 14.8571 12.7609 14.8571 11.8492V4.00794C14.8571 3.09623 14.1181 2.35714 13.2063 2.35714H8.35714Z"
101
101
  }
102
102
  )
103
- ), Bt = /* @__PURE__ */ d.createElement(
103
+ ), Bt = /* @__PURE__ */ f.createElement(
104
104
  "svg",
105
105
  {
106
106
  xmlns: "http://www.w3.org/2000/svg",
@@ -110,8 +110,8 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
110
110
  className: "bi bi-file-earmark",
111
111
  viewBox: "0 0 16 16"
112
112
  },
113
- /* @__PURE__ */ d.createElement("path", { d: "M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z" })
114
- ), yr = (l) => /* @__PURE__ */ d.createElement(
113
+ /* @__PURE__ */ f.createElement("path", { d: "M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z" })
114
+ ), vr = (s) => /* @__PURE__ */ f.createElement(
115
115
  "svg",
116
116
  {
117
117
  xmlns: "http://www.w3.org/2000/svg",
@@ -119,9 +119,9 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
119
119
  height: "18",
120
120
  viewBox: "0 0 14 14",
121
121
  fill: "none",
122
- ...l
122
+ ...s
123
123
  },
124
- /* @__PURE__ */ d.createElement(
124
+ /* @__PURE__ */ f.createElement(
125
125
  "path",
126
126
  {
127
127
  fillRule: "evenodd",
@@ -130,7 +130,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
130
130
  fill: "#949494"
131
131
  }
132
132
  )
133
- ), Er = /* @__PURE__ */ d.createElement(
133
+ ), Er = /* @__PURE__ */ f.createElement(
134
134
  "svg",
135
135
  {
136
136
  xmlns: "http://www.w3.org/2000/svg",
@@ -139,7 +139,7 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
139
139
  viewBox: "0 0 14 14",
140
140
  fill: "none"
141
141
  },
142
- /* @__PURE__ */ d.createElement(
142
+ /* @__PURE__ */ f.createElement(
143
143
  "path",
144
144
  {
145
145
  fillRule: "evenodd",
@@ -149,41 +149,65 @@ const wr = (l) => /* @__PURE__ */ d.createElement(
149
149
  }
150
150
  )
151
151
  );
152
- function Cr(l) {
153
- return `data:${l.mime};base64,${l.data}`;
152
+ function _r(s) {
153
+ return `data:${s.mime};base64,${s.data}`;
154
154
  }
155
- function br() {
156
- return /* @__PURE__ */ d.createElement(
155
+ function br({
156
+ size: s = 24,
157
+ sidebarActive: l = !1
158
+ }) {
159
+ return /* @__PURE__ */ f.createElement(
157
160
  "svg",
158
161
  {
159
- width: "14",
160
- height: "14",
161
- viewBox: "0 0 14 14",
162
+ width: s,
163
+ height: s,
164
+ viewBox: "0 0 24 24",
165
+ xmlns: "http://www.w3.org/2000/svg",
162
166
  fill: "none",
163
- xmlns: "http://www.w3.org/2000/svg"
167
+ stroke: "currentColor",
168
+ strokeWidth: "2",
169
+ strokeLinecap: "round",
170
+ strokeLinejoin: "round"
164
171
  },
165
- /* @__PURE__ */ d.createElement(
166
- "path",
172
+ /* @__PURE__ */ f.createElement("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", ry: "2" }),
173
+ l ? /* @__PURE__ */ f.createElement(
174
+ "rect",
175
+ {
176
+ x: "3",
177
+ y: "3",
178
+ width: "7",
179
+ height: "18",
180
+ rx: "2",
181
+ ry: "2",
182
+ fill: "currentColor"
183
+ }
184
+ ) : /* @__PURE__ */ f.createElement(
185
+ "rect",
167
186
  {
168
- fillRule: "evenodd",
169
- clipRule: "evenodd",
170
- d: "M1.99967 1.58301H4.49967C4.72979 1.58301 4.91634 1.76956 4.91634 1.99967V4.49967C4.91634 4.72979 4.72979 4.91634 4.49967 4.91634H1.99967C1.76956 4.91634 1.58301 4.72979 1.58301 4.49967V1.99967C1.58301 1.76956 1.76956 1.58301 1.99967 1.58301ZM0.333008 1.99967C0.333008 1.0792 1.0792 0.333008 1.99967 0.333008H4.49967C5.42015 0.333008 6.16634 1.0792 6.16634 1.99967V4.49967C6.16634 5.42015 5.42015 6.16634 4.49967 6.16634H1.99967C1.0792 6.16634 0.333008 5.42015 0.333008 4.49967V1.99967ZM9.49967 1.58301H11.9997C12.2298 1.58301 12.4163 1.76956 12.4163 1.99967V4.49967C12.4163 4.72979 12.2298 4.91634 11.9997 4.91634H9.49967C9.26956 4.91634 9.08301 4.72979 9.08301 4.49967V1.99967C9.08301 1.76956 9.26956 1.58301 9.49967 1.58301ZM7.83301 1.99967C7.83301 1.0792 8.5792 0.333008 9.49967 0.333008H11.9997C12.9201 0.333008 13.6663 1.0792 13.6663 1.99967V4.49967C13.6663 5.42015 12.9201 6.16634 11.9997 6.16634H9.49967C8.5792 6.16634 7.83301 5.42015 7.83301 4.49967V1.99967ZM11.9997 9.08301H9.49967C9.26956 9.08301 9.08301 9.26956 9.08301 9.49967V11.9997C9.08301 12.2298 9.26956 12.4163 9.49967 12.4163H11.9997C12.2298 12.4163 12.4163 12.2298 12.4163 11.9997V9.49967C12.4163 9.26956 12.2298 9.08301 11.9997 9.08301ZM9.49967 7.83301C8.5792 7.83301 7.83301 8.5792 7.83301 9.49967V11.9997C7.83301 12.9201 8.5792 13.6663 9.49967 13.6663H11.9997C12.9201 13.6663 13.6663 12.9201 13.6663 11.9997V9.49967C13.6663 8.5792 12.9201 7.83301 11.9997 7.83301H9.49967ZM1.99967 9.08301H4.49967C4.72979 9.08301 4.91634 9.26956 4.91634 9.49967V11.9997C4.91634 12.2298 4.72979 12.4163 4.49967 12.4163H1.99967C1.76956 12.4163 1.58301 12.2298 1.58301 11.9997V9.49967C1.58301 9.26956 1.76956 9.08301 1.99967 9.08301ZM0.333008 9.49967C0.333008 8.5792 1.0792 7.83301 1.99967 7.83301H4.49967C5.42015 7.83301 6.16634 8.5792 6.16634 9.49967V11.9997C6.16634 12.9201 5.42015 13.6663 4.49967 13.6663H1.99967C1.0792 13.6663 0.333008 12.9201 0.333008 11.9997V9.49967Z",
171
- fill: "white"
187
+ x: "3",
188
+ y: "3",
189
+ width: "8",
190
+ height: "18",
191
+ rx: "2",
192
+ ry: "2",
193
+ fill: "none",
194
+ stroke: "currentColor",
195
+ strokeWidth: "2"
172
196
  }
173
197
  )
174
198
  );
175
199
  }
176
- const vt = bt(({
177
- icon: l,
178
- size: s = 24,
179
- ...C
180
- }, h) => $t(l, {
181
- width: s,
182
- height: s,
183
- ...C,
184
- ref: h
200
+ const vt = Ct(({
201
+ icon: s,
202
+ size: l = 24,
203
+ ...E
204
+ }, g) => It(s, {
205
+ width: l,
206
+ height: l,
207
+ ...E,
208
+ ref: g
185
209
  }));
186
- var pt = { exports: {} }, Le = {};
210
+ var ht = { exports: {} }, Ye = {};
187
211
  /**
188
212
  * @license React
189
213
  * react-jsx-runtime.production.min.js
@@ -193,21 +217,21 @@ var pt = { exports: {} }, Le = {};
193
217
  * This source code is licensed under the MIT license found in the
194
218
  * LICENSE file in the root directory of this source tree.
195
219
  */
196
- var yt;
197
- function Wt() {
198
- if (yt) return Le;
199
- yt = 1;
200
- var l = d, s = Symbol.for("react.element"), C = Symbol.for("react.fragment"), h = Object.prototype.hasOwnProperty, x = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, P = { key: !0, ref: !0, __self: !0, __source: !0 };
201
- function T(H, k, O) {
202
- var y, I = {}, M = null, F = null;
203
- O !== void 0 && (M = "" + O), k.key !== void 0 && (M = "" + k.key), k.ref !== void 0 && (F = k.ref);
204
- for (y in k) h.call(k, y) && !P.hasOwnProperty(y) && (I[y] = k[y]);
205
- if (H && H.defaultProps) for (y in k = H.defaultProps, k) I[y] === void 0 && (I[y] = k[y]);
206
- return { $$typeof: s, type: H, key: M, ref: F, props: I, _owner: x.current };
220
+ var Et;
221
+ function Ht() {
222
+ if (Et) return Ye;
223
+ Et = 1;
224
+ var s = f, l = Symbol.for("react.element"), E = Symbol.for("react.fragment"), g = Object.prototype.hasOwnProperty, k = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, C = { key: !0, ref: !0, __self: !0, __source: !0 };
225
+ function M(P, S, I) {
226
+ var _, R = {}, V = null, Q = null;
227
+ I !== void 0 && (V = "" + I), S.key !== void 0 && (V = "" + S.key), S.ref !== void 0 && (Q = S.ref);
228
+ for (_ in S) g.call(S, _) && !C.hasOwnProperty(_) && (R[_] = S[_]);
229
+ if (P && P.defaultProps) for (_ in S = P.defaultProps, S) R[_] === void 0 && (R[_] = S[_]);
230
+ return { $$typeof: l, type: P, key: V, ref: Q, props: R, _owner: k.current };
207
231
  }
208
- return Le.Fragment = C, Le.jsx = T, Le.jsxs = T, Le;
232
+ return Ye.Fragment = E, Ye.jsx = M, Ye.jsxs = M, Ye;
209
233
  }
210
- var Be = {};
234
+ var ze = {};
211
235
  /**
212
236
  * @license React
213
237
  * react-jsx-runtime.development.js
@@ -217,91 +241,91 @@ var Be = {};
217
241
  * This source code is licensed under the MIT license found in the
218
242
  * LICENSE file in the root directory of this source tree.
219
243
  */
220
- var Et;
221
- function Zt() {
222
- return Et || (Et = 1, process.env.NODE_ENV !== "production" && function() {
223
- var l = d, s = Symbol.for("react.element"), C = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), H = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), ee = Symbol.iterator, q = "@@iterator";
244
+ var _t;
245
+ function Yt() {
246
+ return _t || (_t = 1, process.env.NODE_ENV !== "production" && function() {
247
+ var s = f, l = Symbol.for("react.element"), E = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), M = Symbol.for("react.provider"), P = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), Q = Symbol.for("react.offscreen"), $ = Symbol.iterator, Z = "@@iterator";
224
248
  function he(e) {
225
249
  if (e === null || typeof e != "object")
226
250
  return null;
227
- var o = ee && e[ee] || e[q];
251
+ var o = $ && e[$] || e[Z];
228
252
  return typeof o == "function" ? o : null;
229
253
  }
230
- var S = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
231
- function R(e) {
254
+ var j = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
255
+ function T(e) {
232
256
  {
233
- for (var o = arguments.length, c = new Array(o > 1 ? o - 1 : 0), p = 1; p < o; p++)
234
- c[p - 1] = arguments[p];
235
- se("error", e, c);
257
+ for (var o = arguments.length, c = new Array(o > 1 ? o - 1 : 0), w = 1; w < o; w++)
258
+ c[w - 1] = arguments[w];
259
+ fe("error", e, c);
236
260
  }
237
261
  }
238
- function se(e, o, c) {
262
+ function fe(e, o, c) {
239
263
  {
240
- var p = S.ReactDebugCurrentFrame, b = p.getStackAddendum();
264
+ var w = j.ReactDebugCurrentFrame, b = w.getStackAddendum();
241
265
  b !== "" && (o += "%s", c = c.concat([b]));
242
- var _ = c.map(function(E) {
243
- return String(E);
266
+ var x = c.map(function(v) {
267
+ return String(v);
244
268
  });
245
- _.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, _);
269
+ x.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, x);
246
270
  }
247
271
  }
248
- var we = !1, K = !1, W = !1, ie = !1, ce = !1, w;
249
- w = Symbol.for("react.module.reference");
250
- function G(e) {
251
- return !!(typeof e == "string" || typeof e == "function" || e === h || e === P || ce || e === x || e === O || e === y || ie || e === F || we || K || W || typeof e == "object" && e !== null && (e.$$typeof === M || e.$$typeof === I || e.$$typeof === T || e.$$typeof === H || e.$$typeof === k || // This needs to include all possible module reference object
272
+ var we = !1, ve = !1, q = !1, B = !1, Ee = !1, ee;
273
+ ee = Symbol.for("react.module.reference");
274
+ function m(e) {
275
+ return !!(typeof e == "string" || typeof e == "function" || e === g || e === C || Ee || e === k || e === I || e === _ || B || e === Q || we || ve || q || typeof e == "object" && e !== null && (e.$$typeof === V || e.$$typeof === R || e.$$typeof === M || e.$$typeof === P || e.$$typeof === S || // This needs to include all possible module reference object
252
276
  // types supported by any Flight configuration anywhere since
253
277
  // we don't know which Flight build this will end up being used
254
278
  // with.
255
- e.$$typeof === w || e.getModuleId !== void 0));
279
+ e.$$typeof === ee || e.getModuleId !== void 0));
256
280
  }
257
- function ne(e, o, c) {
258
- var p = e.displayName;
259
- if (p)
260
- return p;
281
+ function H(e, o, c) {
282
+ var w = e.displayName;
283
+ if (w)
284
+ return w;
261
285
  var b = o.displayName || o.name || "";
262
286
  return b !== "" ? c + "(" + b + ")" : c;
263
287
  }
264
- function ue(e) {
288
+ function oe(e) {
265
289
  return e.displayName || "Context";
266
290
  }
267
- function Z(e) {
291
+ function Y(e) {
268
292
  if (e == null)
269
293
  return null;
270
- if (typeof e.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
294
+ if (typeof e.tag == "number" && T("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
271
295
  return e.displayName || e.name || null;
272
296
  if (typeof e == "string")
273
297
  return e;
274
298
  switch (e) {
275
- case h:
299
+ case g:
276
300
  return "Fragment";
277
- case C:
301
+ case E:
278
302
  return "Portal";
279
- case P:
303
+ case C:
280
304
  return "Profiler";
281
- case x:
305
+ case k:
282
306
  return "StrictMode";
283
- case O:
307
+ case I:
284
308
  return "Suspense";
285
- case y:
309
+ case _:
286
310
  return "SuspenseList";
287
311
  }
288
312
  if (typeof e == "object")
289
313
  switch (e.$$typeof) {
290
- case H:
314
+ case P:
291
315
  var o = e;
292
- return ue(o) + ".Consumer";
293
- case T:
316
+ return oe(o) + ".Consumer";
317
+ case M:
294
318
  var c = e;
295
- return ue(c._context) + ".Provider";
296
- case k:
297
- return ne(e, e.render, "ForwardRef");
298
- case I:
299
- var p = e.displayName || null;
300
- return p !== null ? p : Z(e.type) || "Memo";
301
- case M: {
302
- var b = e, _ = b._payload, E = b._init;
319
+ return oe(c._context) + ".Provider";
320
+ case S:
321
+ return H(e, e.render, "ForwardRef");
322
+ case R:
323
+ var w = e.displayName || null;
324
+ return w !== null ? w : Y(e.type) || "Memo";
325
+ case V: {
326
+ var b = e, x = b._payload, v = b._init;
303
327
  try {
304
- return Z(E(_));
328
+ return Y(v(x));
305
329
  } catch {
306
330
  return null;
307
331
  }
@@ -309,18 +333,18 @@ function Zt() {
309
333
  }
310
334
  return null;
311
335
  }
312
- var j = Object.assign, L = 0, be, _e, ge, oe, ve, A, ye;
313
- function ae() {
336
+ var K = Object.assign, L = 0, te, Te, ke, _e, de, G, z;
337
+ function se() {
314
338
  }
315
- ae.__reactDisabledLog = !0;
316
- function fe() {
339
+ se.__reactDisabledLog = !0;
340
+ function le() {
317
341
  {
318
342
  if (L === 0) {
319
- be = console.log, _e = console.info, ge = console.warn, oe = console.error, ve = console.group, A = console.groupCollapsed, ye = console.groupEnd;
343
+ te = console.log, Te = console.info, ke = console.warn, _e = console.error, de = console.group, G = console.groupCollapsed, z = console.groupEnd;
320
344
  var e = {
321
345
  configurable: !0,
322
346
  enumerable: !0,
323
- value: ae,
347
+ value: se,
324
348
  writable: !0
325
349
  };
326
350
  Object.defineProperties(console, {
@@ -336,7 +360,7 @@ function Zt() {
336
360
  L++;
337
361
  }
338
362
  }
339
- function Re() {
363
+ function be() {
340
364
  {
341
365
  if (L--, L === 0) {
342
366
  var e = {
@@ -345,238 +369,238 @@ function Zt() {
345
369
  writable: !0
346
370
  };
347
371
  Object.defineProperties(console, {
348
- log: j({}, e, {
349
- value: be
372
+ log: K({}, e, {
373
+ value: te
350
374
  }),
351
- info: j({}, e, {
352
- value: _e
375
+ info: K({}, e, {
376
+ value: Te
353
377
  }),
354
- warn: j({}, e, {
355
- value: ge
378
+ warn: K({}, e, {
379
+ value: ke
356
380
  }),
357
- error: j({}, e, {
358
- value: oe
381
+ error: K({}, e, {
382
+ value: _e
359
383
  }),
360
- group: j({}, e, {
361
- value: ve
384
+ group: K({}, e, {
385
+ value: de
362
386
  }),
363
- groupCollapsed: j({}, e, {
364
- value: A
387
+ groupCollapsed: K({}, e, {
388
+ value: G
365
389
  }),
366
- groupEnd: j({}, e, {
367
- value: ye
390
+ groupEnd: K({}, e, {
391
+ value: z
368
392
  })
369
393
  });
370
394
  }
371
- L < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
395
+ L < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
372
396
  }
373
397
  }
374
- var de = S.ReactCurrentDispatcher, B;
375
- function u(e, o, c) {
398
+ var me = j.ReactCurrentDispatcher, ge;
399
+ function W(e, o, c) {
376
400
  {
377
- if (B === void 0)
401
+ if (ge === void 0)
378
402
  try {
379
403
  throw Error();
380
404
  } catch (b) {
381
- var p = b.stack.trim().match(/\n( *(at )?)/);
382
- B = p && p[1] || "";
405
+ var w = b.stack.trim().match(/\n( *(at )?)/);
406
+ ge = w && w[1] || "";
383
407
  }
384
408
  return `
385
- ` + B + e;
409
+ ` + ge + e;
386
410
  }
387
411
  }
388
- var $ = !1, me;
412
+ var D = !1, re;
389
413
  {
390
- var Y = typeof WeakMap == "function" ? WeakMap : Map;
391
- me = new Y();
414
+ var d = typeof WeakMap == "function" ? WeakMap : Map;
415
+ re = new d();
392
416
  }
393
- function z(e, o) {
394
- if (!e || $)
417
+ function F(e, o) {
418
+ if (!e || D)
395
419
  return "";
396
420
  {
397
- var c = me.get(e);
421
+ var c = re.get(e);
398
422
  if (c !== void 0)
399
423
  return c;
400
424
  }
401
- var p;
402
- $ = !0;
425
+ var w;
426
+ D = !0;
403
427
  var b = Error.prepareStackTrace;
404
428
  Error.prepareStackTrace = void 0;
405
- var _;
406
- _ = de.current, de.current = null, fe();
429
+ var x;
430
+ x = me.current, me.current = null, le();
407
431
  try {
408
432
  if (o) {
409
- var E = function() {
433
+ var v = function() {
410
434
  throw Error();
411
435
  };
412
- if (Object.defineProperty(E.prototype, "props", {
436
+ if (Object.defineProperty(v.prototype, "props", {
413
437
  set: function() {
414
438
  throw Error();
415
439
  }
416
440
  }), typeof Reflect == "object" && Reflect.construct) {
417
441
  try {
418
- Reflect.construct(E, []);
442
+ Reflect.construct(v, []);
419
443
  } catch (J) {
420
- p = J;
444
+ w = J;
421
445
  }
422
- Reflect.construct(e, [], E);
446
+ Reflect.construct(e, [], v);
423
447
  } else {
424
448
  try {
425
- E.call();
449
+ v.call();
426
450
  } catch (J) {
427
- p = J;
451
+ w = J;
428
452
  }
429
- e.call(E.prototype);
453
+ e.call(v.prototype);
430
454
  }
431
455
  } else {
432
456
  try {
433
457
  throw Error();
434
458
  } catch (J) {
435
- p = J;
459
+ w = J;
436
460
  }
437
461
  e();
438
462
  }
439
463
  } catch (J) {
440
- if (J && p && typeof J.stack == "string") {
441
- for (var v = J.stack.split(`
442
- `), U = p.stack.split(`
443
- `), D = v.length - 1, V = U.length - 1; D >= 1 && V >= 0 && v[D] !== U[V]; )
444
- V--;
445
- for (; D >= 1 && V >= 0; D--, V--)
446
- if (v[D] !== U[V]) {
447
- if (D !== 1 || V !== 1)
464
+ if (J && w && typeof J.stack == "string") {
465
+ for (var y = J.stack.split(`
466
+ `), U = w.stack.split(`
467
+ `), A = y.length - 1, N = U.length - 1; A >= 1 && N >= 0 && y[A] !== U[N]; )
468
+ N--;
469
+ for (; A >= 1 && N >= 0; A--, N--)
470
+ if (y[A] !== U[N]) {
471
+ if (A !== 1 || N !== 1)
448
472
  do
449
- if (D--, V--, V < 0 || v[D] !== U[V]) {
450
- var te = `
451
- ` + v[D].replace(" at new ", " at ");
452
- return e.displayName && te.includes("<anonymous>") && (te = te.replace("<anonymous>", e.displayName)), typeof e == "function" && me.set(e, te), te;
473
+ if (A--, N--, N < 0 || y[A] !== U[N]) {
474
+ var ce = `
475
+ ` + y[A].replace(" at new ", " at ");
476
+ return e.displayName && ce.includes("<anonymous>") && (ce = ce.replace("<anonymous>", e.displayName)), typeof e == "function" && re.set(e, ce), ce;
453
477
  }
454
- while (D >= 1 && V >= 0);
478
+ while (A >= 1 && N >= 0);
455
479
  break;
456
480
  }
457
481
  }
458
482
  } finally {
459
- $ = !1, de.current = _, Re(), Error.prepareStackTrace = b;
483
+ D = !1, me.current = x, be(), Error.prepareStackTrace = b;
460
484
  }
461
- var je = e ? e.displayName || e.name : "", Pe = je ? u(je) : "";
462
- return typeof e == "function" && me.set(e, Pe), Pe;
485
+ var $e = e ? e.displayName || e.name : "", De = $e ? W($e) : "";
486
+ return typeof e == "function" && re.set(e, De), De;
463
487
  }
464
- function Se(e, o, c) {
465
- return z(e, !1);
488
+ function ne(e, o, c) {
489
+ return F(e, !1);
466
490
  }
467
- function Ze(e) {
491
+ function Ce(e) {
468
492
  var o = e.prototype;
469
493
  return !!(o && o.isReactComponent);
470
494
  }
471
- function pe(e, o, c) {
495
+ function Pe(e, o, c) {
472
496
  if (e == null)
473
497
  return "";
474
498
  if (typeof e == "function")
475
- return z(e, Ze(e));
499
+ return F(e, Ce(e));
476
500
  if (typeof e == "string")
477
- return u(e);
501
+ return W(e);
478
502
  switch (e) {
479
- case O:
480
- return u("Suspense");
481
- case y:
482
- return u("SuspenseList");
503
+ case I:
504
+ return W("Suspense");
505
+ case _:
506
+ return W("SuspenseList");
483
507
  }
484
508
  if (typeof e == "object")
485
509
  switch (e.$$typeof) {
486
- case k:
487
- return Se(e.render);
488
- case I:
489
- return pe(e.type, o, c);
490
- case M: {
491
- var p = e, b = p._payload, _ = p._init;
510
+ case S:
511
+ return ne(e.render);
512
+ case R:
513
+ return Pe(e.type, o, c);
514
+ case V: {
515
+ var w = e, b = w._payload, x = w._init;
492
516
  try {
493
- return pe(_(b), o, c);
517
+ return Pe(x(b), o, c);
494
518
  } catch {
495
519
  }
496
520
  }
497
521
  }
498
522
  return "";
499
523
  }
500
- var Ee = Object.prototype.hasOwnProperty, Ye = {}, Oe = S.ReactDebugCurrentFrame;
501
- function De(e) {
524
+ var pe = Object.prototype.hasOwnProperty, Ie = {}, Ze = j.ReactDebugCurrentFrame;
525
+ function xe(e) {
502
526
  if (e) {
503
- var o = e._owner, c = pe(e.type, e._source, o ? o.type : null);
504
- Oe.setExtraStackFrame(c);
527
+ var o = e._owner, c = Pe(e.type, e._source, o ? o.type : null);
528
+ Ze.setExtraStackFrame(c);
505
529
  } else
506
- Oe.setExtraStackFrame(null);
530
+ Ze.setExtraStackFrame(null);
507
531
  }
508
- function Ne(e, o, c, p, b) {
532
+ function rt(e, o, c, w, b) {
509
533
  {
510
- var _ = Function.call.bind(Ee);
511
- for (var E in e)
512
- if (_(e, E)) {
513
- var v = void 0;
534
+ var x = Function.call.bind(pe);
535
+ for (var v in e)
536
+ if (x(e, v)) {
537
+ var y = void 0;
514
538
  try {
515
- if (typeof e[E] != "function") {
516
- var U = Error((p || "React class") + ": " + c + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
539
+ if (typeof e[v] != "function") {
540
+ var U = Error((w || "React class") + ": " + c + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
517
541
  throw U.name = "Invariant Violation", U;
518
542
  }
519
- v = e[E](o, E, p, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
520
- } catch (D) {
521
- v = D;
543
+ y = e[v](o, v, w, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
544
+ } catch (A) {
545
+ y = A;
522
546
  }
523
- v && !(v instanceof Error) && (De(b), R("%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).", p || "React class", c, E, typeof v), De(null)), v instanceof Error && !(v.message in Ye) && (Ye[v.message] = !0, De(b), R("Failed %s type: %s", c, v.message), De(null));
547
+ y && !(y instanceof Error) && (xe(b), T("%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).", w || "React class", c, v, typeof y), xe(null)), y instanceof Error && !(y.message in Ie) && (Ie[y.message] = !0, xe(b), T("Failed %s type: %s", c, y.message), xe(null));
524
548
  }
525
549
  }
526
550
  }
527
- var nt = Array.isArray;
528
- function Me(e) {
529
- return nt(e);
551
+ var Ve = Array.isArray;
552
+ function Le(e) {
553
+ return Ve(e);
530
554
  }
531
- function at(e) {
555
+ function nt(e) {
532
556
  {
533
557
  var o = typeof Symbol == "function" && Symbol.toStringTag, c = o && e[Symbol.toStringTag] || e.constructor.name || "Object";
534
558
  return c;
535
559
  }
536
560
  }
537
- function it(e) {
561
+ function at(e) {
538
562
  try {
539
- return ze(e), !1;
563
+ return qe(e), !1;
540
564
  } catch {
541
565
  return !0;
542
566
  }
543
567
  }
544
- function ze(e) {
568
+ function qe(e) {
545
569
  return "" + e;
546
570
  }
547
- function Ue(e) {
548
- if (it(e))
549
- return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", at(e)), ze(e);
571
+ function Ke(e) {
572
+ if (at(e))
573
+ return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nt(e)), qe(e);
550
574
  }
551
- var qe = S.ReactCurrentOwner, Fe = {
575
+ var Ge = j.ReactCurrentOwner, it = {
552
576
  key: !0,
553
577
  ref: !0,
554
578
  __self: !0,
555
579
  __source: !0
556
- }, xe, Ke;
580
+ }, Se, Oe;
557
581
  function ot(e) {
558
- if (Ee.call(e, "ref")) {
582
+ if (pe.call(e, "ref")) {
559
583
  var o = Object.getOwnPropertyDescriptor(e, "ref").get;
560
584
  if (o && o.isReactWarning)
561
585
  return !1;
562
586
  }
563
587
  return e.ref !== void 0;
564
588
  }
565
- function lt(e) {
566
- if (Ee.call(e, "key")) {
589
+ function st(e) {
590
+ if (pe.call(e, "key")) {
567
591
  var o = Object.getOwnPropertyDescriptor(e, "key").get;
568
592
  if (o && o.isReactWarning)
569
593
  return !1;
570
594
  }
571
595
  return e.key !== void 0;
572
596
  }
573
- function st(e, o) {
574
- typeof e.ref == "string" && qe.current;
597
+ function lt(e, o) {
598
+ typeof e.ref == "string" && Ge.current;
575
599
  }
576
600
  function ct(e, o) {
577
601
  {
578
602
  var c = function() {
579
- xe || (xe = !0, R("%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)", o));
603
+ Se || (Se = !0, T("%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)", o));
580
604
  };
581
605
  c.isReactWarning = !0, Object.defineProperty(e, "key", {
582
606
  get: c,
@@ -584,10 +608,10 @@ function Zt() {
584
608
  });
585
609
  }
586
610
  }
587
- function Ge(e, o) {
611
+ function ut(e, o) {
588
612
  {
589
613
  var c = function() {
590
- Ke || (Ke = !0, R("%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)", o));
614
+ Oe || (Oe = !0, T("%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)", o));
591
615
  };
592
616
  c.isReactWarning = !0, Object.defineProperty(e, "ref", {
593
617
  get: c,
@@ -595,70 +619,70 @@ function Zt() {
595
619
  });
596
620
  }
597
621
  }
598
- var Je = function(e, o, c, p, b, _, E) {
599
- var v = {
622
+ var Je = function(e, o, c, w, b, x, v) {
623
+ var y = {
600
624
  // This tag allows us to uniquely identify this as a React Element
601
- $$typeof: s,
625
+ $$typeof: l,
602
626
  // Built-in properties that belong on the element
603
627
  type: e,
604
628
  key: o,
605
629
  ref: c,
606
- props: E,
630
+ props: v,
607
631
  // Record the component responsible for creating this element.
608
- _owner: _
632
+ _owner: x
609
633
  };
610
- return v._store = {}, Object.defineProperty(v._store, "validated", {
634
+ return y._store = {}, Object.defineProperty(y._store, "validated", {
611
635
  configurable: !1,
612
636
  enumerable: !1,
613
637
  writable: !0,
614
638
  value: !1
615
- }), Object.defineProperty(v, "_self", {
639
+ }), Object.defineProperty(y, "_self", {
616
640
  configurable: !1,
617
641
  enumerable: !1,
618
642
  writable: !1,
619
- value: p
620
- }), Object.defineProperty(v, "_source", {
643
+ value: w
644
+ }), Object.defineProperty(y, "_source", {
621
645
  configurable: !1,
622
646
  enumerable: !1,
623
647
  writable: !1,
624
648
  value: b
625
- }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
649
+ }), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y;
626
650
  };
627
- function Xe(e, o, c, p, b) {
651
+ function Xe(e, o, c, w, b) {
628
652
  {
629
- var _, E = {}, v = null, U = null;
630
- c !== void 0 && (Ue(c), v = "" + c), lt(o) && (Ue(o.key), v = "" + o.key), ot(o) && (U = o.ref, st(o, b));
631
- for (_ in o)
632
- Ee.call(o, _) && !Fe.hasOwnProperty(_) && (E[_] = o[_]);
653
+ var x, v = {}, y = null, U = null;
654
+ c !== void 0 && (Ke(c), y = "" + c), st(o) && (Ke(o.key), y = "" + o.key), ot(o) && (U = o.ref, lt(o, b));
655
+ for (x in o)
656
+ pe.call(o, x) && !it.hasOwnProperty(x) && (v[x] = o[x]);
633
657
  if (e && e.defaultProps) {
634
- var D = e.defaultProps;
635
- for (_ in D)
636
- E[_] === void 0 && (E[_] = D[_]);
658
+ var A = e.defaultProps;
659
+ for (x in A)
660
+ v[x] === void 0 && (v[x] = A[x]);
637
661
  }
638
- if (v || U) {
639
- var V = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
640
- v && ct(E, V), U && Ge(E, V);
662
+ if (y || U) {
663
+ var N = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
664
+ y && ct(v, N), U && ut(v, N);
641
665
  }
642
- return Je(e, v, U, b, p, qe.current, E);
666
+ return Je(e, y, U, b, w, Ge.current, v);
643
667
  }
644
668
  }
645
- var $e = S.ReactCurrentOwner, Qe = S.ReactDebugCurrentFrame;
646
- function Ce(e) {
669
+ var Fe = j.ReactCurrentOwner, Qe = j.ReactDebugCurrentFrame;
670
+ function Re(e) {
647
671
  if (e) {
648
- var o = e._owner, c = pe(e.type, e._source, o ? o.type : null);
672
+ var o = e._owner, c = Pe(e.type, e._source, o ? o.type : null);
649
673
  Qe.setExtraStackFrame(c);
650
674
  } else
651
675
  Qe.setExtraStackFrame(null);
652
676
  }
653
- var He;
654
- He = !1;
655
- function Ie(e) {
656
- return typeof e == "object" && e !== null && e.$$typeof === s;
677
+ var We;
678
+ We = !1;
679
+ function Be(e) {
680
+ return typeof e == "object" && e !== null && e.$$typeof === l;
657
681
  }
658
- function t() {
682
+ function et() {
659
683
  {
660
- if ($e.current) {
661
- var e = Z($e.current.type);
684
+ if (Fe.current) {
685
+ var e = Y(Fe.current.type);
662
686
  if (e)
663
687
  return `
664
688
 
@@ -667,13 +691,13 @@ Check the render method of \`` + e + "`.";
667
691
  return "";
668
692
  }
669
693
  }
670
- function r(e) {
694
+ function t(e) {
671
695
  return "";
672
696
  }
673
- var n = {};
674
- function i(e) {
697
+ var r = {};
698
+ function n(e) {
675
699
  {
676
- var o = t();
700
+ var o = et();
677
701
  if (!o) {
678
702
  var c = typeof e == "string" ? e : e.displayName || e.name;
679
703
  c && (o = `
@@ -683,39 +707,39 @@ Check the top-level render call using <` + c + ">.");
683
707
  return o;
684
708
  }
685
709
  }
686
- function a(e, o) {
710
+ function i(e, o) {
687
711
  {
688
712
  if (!e._store || e._store.validated || e.key != null)
689
713
  return;
690
714
  e._store.validated = !0;
691
- var c = i(o);
692
- if (n[c])
715
+ var c = n(o);
716
+ if (r[c])
693
717
  return;
694
- n[c] = !0;
695
- var p = "";
696
- e && e._owner && e._owner !== $e.current && (p = " It was passed a child from " + Z(e._owner.type) + "."), Ce(e), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, p), Ce(null);
718
+ r[c] = !0;
719
+ var w = "";
720
+ e && e._owner && e._owner !== Fe.current && (w = " It was passed a child from " + Y(e._owner.type) + "."), Re(e), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, w), Re(null);
697
721
  }
698
722
  }
699
- function m(e, o) {
723
+ function a(e, o) {
700
724
  {
701
725
  if (typeof e != "object")
702
726
  return;
703
- if (Me(e))
727
+ if (Le(e))
704
728
  for (var c = 0; c < e.length; c++) {
705
- var p = e[c];
706
- Ie(p) && a(p, o);
729
+ var w = e[c];
730
+ Be(w) && i(w, o);
707
731
  }
708
- else if (Ie(e))
732
+ else if (Be(e))
709
733
  e._store && (e._store.validated = !0);
710
734
  else if (e) {
711
735
  var b = he(e);
712
736
  if (typeof b == "function" && b !== e.entries)
713
- for (var _ = b.call(e), E; !(E = _.next()).done; )
714
- Ie(E.value) && a(E.value, o);
737
+ for (var x = b.call(e), v; !(v = x.next()).done; )
738
+ Be(v.value) && i(v.value, o);
715
739
  }
716
740
  }
717
741
  }
718
- function f(e) {
742
+ function p(e) {
719
743
  {
720
744
  var o = e.type;
721
745
  if (o == null || typeof o == "string")
@@ -723,93 +747,93 @@ Check the top-level render call using <` + c + ">.");
723
747
  var c;
724
748
  if (typeof o == "function")
725
749
  c = o.propTypes;
726
- else if (typeof o == "object" && (o.$$typeof === k || // Note: Memo only checks outer props here.
750
+ else if (typeof o == "object" && (o.$$typeof === S || // Note: Memo only checks outer props here.
727
751
  // Inner props are checked in the reconciler.
728
- o.$$typeof === I))
752
+ o.$$typeof === R))
729
753
  c = o.propTypes;
730
754
  else
731
755
  return;
732
756
  if (c) {
733
- var p = Z(o);
734
- Ne(c, e.props, "prop", p, e);
735
- } else if (o.PropTypes !== void 0 && !He) {
736
- He = !0;
737
- var b = Z(o);
738
- R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
757
+ var w = Y(o);
758
+ rt(c, e.props, "prop", w, e);
759
+ } else if (o.PropTypes !== void 0 && !We) {
760
+ We = !0;
761
+ var b = Y(o);
762
+ T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
739
763
  }
740
- typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
764
+ typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
741
765
  }
742
766
  }
743
- function g(e) {
767
+ function u(e) {
744
768
  {
745
769
  for (var o = Object.keys(e.props), c = 0; c < o.length; c++) {
746
- var p = o[c];
747
- if (p !== "children" && p !== "key") {
748
- Ce(e), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), Ce(null);
770
+ var w = o[c];
771
+ if (w !== "children" && w !== "key") {
772
+ Re(e), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), Re(null);
749
773
  break;
750
774
  }
751
775
  }
752
- e.ref !== null && (Ce(e), R("Invalid attribute `ref` supplied to `React.Fragment`."), Ce(null));
776
+ e.ref !== null && (Re(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), Re(null));
753
777
  }
754
778
  }
755
- var N = {};
756
- function Te(e, o, c, p, b, _) {
779
+ var h = {};
780
+ function O(e, o, c, w, b, x) {
757
781
  {
758
- var E = G(e);
759
- if (!E) {
760
- var v = "";
761
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
762
- var U = r();
763
- U ? v += U : v += t();
764
- var D;
765
- e === null ? D = "null" : Me(e) ? D = "array" : e !== void 0 && e.$$typeof === s ? (D = "<" + (Z(e.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, v);
782
+ var v = m(e);
783
+ if (!v) {
784
+ var y = "";
785
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (y += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
786
+ var U = t();
787
+ U ? y += U : y += et();
788
+ var A;
789
+ e === null ? A = "null" : Le(e) ? A = "array" : e !== void 0 && e.$$typeof === l ? (A = "<" + (Y(e.type) || "Unknown") + " />", y = " Did you accidentally export a JSX literal instead of a component?") : A = typeof e, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", A, y);
766
790
  }
767
- var V = Xe(e, o, c, b, _);
768
- if (V == null)
769
- return V;
770
- if (E) {
771
- var te = o.children;
772
- if (te !== void 0)
773
- if (p)
774
- if (Me(te)) {
775
- for (var je = 0; je < te.length; je++)
776
- m(te[je], e);
777
- Object.freeze && Object.freeze(te);
791
+ var N = Xe(e, o, c, b, x);
792
+ if (N == null)
793
+ return N;
794
+ if (v) {
795
+ var ce = o.children;
796
+ if (ce !== void 0)
797
+ if (w)
798
+ if (Le(ce)) {
799
+ for (var $e = 0; $e < ce.length; $e++)
800
+ a(ce[$e], e);
801
+ Object.freeze && Object.freeze(ce);
778
802
  } else
779
- R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
803
+ T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
780
804
  else
781
- m(te, e);
805
+ a(ce, e);
782
806
  }
783
- if (Ee.call(o, "key")) {
784
- var Pe = Z(e), J = Object.keys(o).filter(function(kt) {
785
- return kt !== "key";
786
- }), ut = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
787
- if (!N[Pe + ut]) {
788
- var Pt = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
789
- R(`A props object containing a "key" prop is being spread into JSX:
807
+ if (pe.call(o, "key")) {
808
+ var De = Y(e), J = Object.keys(o).filter(function(Pt) {
809
+ return Pt !== "key";
810
+ }), ft = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
811
+ if (!h[De + ft]) {
812
+ var kt = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
813
+ T(`A props object containing a "key" prop is being spread into JSX:
790
814
  let props = %s;
791
815
  <%s {...props} />
792
816
  React keys must be passed directly to JSX without using spread:
793
817
  let props = %s;
794
- <%s key={someKey} {...props} />`, ut, Pe, Pt, Pe), N[Pe + ut] = !0;
818
+ <%s key={someKey} {...props} />`, ft, De, kt, De), h[De + ft] = !0;
795
819
  }
796
820
  }
797
- return e === h ? g(V) : f(V), V;
821
+ return e === g ? u(N) : p(N), N;
798
822
  }
799
823
  }
800
- function et(e, o, c) {
801
- return Te(e, o, c, !0);
824
+ function ye(e, o, c) {
825
+ return O(e, o, c, !0);
802
826
  }
803
- function tt(e, o, c) {
804
- return Te(e, o, c, !1);
827
+ function He(e, o, c) {
828
+ return O(e, o, c, !1);
805
829
  }
806
- var xt = tt, Tt = et;
807
- Be.Fragment = h, Be.jsx = xt, Be.jsxs = Tt;
808
- }()), Be;
830
+ var Ae = He, Tt = ye;
831
+ ze.Fragment = g, ze.jsx = Ae, ze.jsxs = Tt;
832
+ }()), ze;
809
833
  }
810
- process.env.NODE_ENV === "production" ? pt.exports = Wt() : pt.exports = Zt();
811
- var We = pt.exports;
812
- const _t = (l) => Ht("path", l), ht = bt(
834
+ process.env.NODE_ENV === "production" ? ht.exports = Ht() : ht.exports = Yt();
835
+ var Ue = ht.exports;
836
+ const xt = (s) => Vt("path", s), wt = Ct(
813
837
  /**
814
838
  * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.
815
839
  * Other props will be passed through to svg component.
@@ -818,39 +842,39 @@ const _t = (l) => Ht("path", l), ht = bt(
818
842
  * @return {JSX.Element} Stop component
819
843
  */
820
844
  ({
821
- className: l,
822
- isPressed: s,
823
- ...C
824
- }, h) => {
825
- const x = {
826
- ...C,
827
- className: It(l, {
828
- "is-pressed": s
845
+ className: s,
846
+ isPressed: l,
847
+ ...E
848
+ }, g) => {
849
+ const k = {
850
+ ...E,
851
+ className: Lt(s, {
852
+ "is-pressed": l
829
853
  }) || void 0,
830
854
  "aria-hidden": !0,
831
855
  focusable: !1
832
856
  };
833
- return /* @__PURE__ */ We.jsx("svg", {
834
- ...x,
835
- ref: h
857
+ return /* @__PURE__ */ Ue.jsx("svg", {
858
+ ...k,
859
+ ref: g
836
860
  });
837
861
  }
838
862
  );
839
- ht.displayName = "SVG";
840
- const Yt = /* @__PURE__ */ We.jsx(ht, {
863
+ wt.displayName = "SVG";
864
+ const zt = /* @__PURE__ */ Ue.jsx(wt, {
841
865
  viewBox: "0 0 24 24",
842
866
  xmlns: "http://www.w3.org/2000/svg",
843
- children: /* @__PURE__ */ We.jsx(_t, {
867
+ children: /* @__PURE__ */ Ue.jsx(xt, {
844
868
  d: "M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"
845
869
  })
846
- }), zt = /* @__PURE__ */ We.jsx(ht, {
870
+ }), Ut = /* @__PURE__ */ Ue.jsx(wt, {
847
871
  xmlns: "http://www.w3.org/2000/svg",
848
872
  viewBox: "0 0 24 24",
849
- children: /* @__PURE__ */ We.jsx(_t, {
873
+ children: /* @__PURE__ */ Ue.jsx(xt, {
850
874
  d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"
851
875
  })
852
- }), Ut = "_file-picker-tree_3rwm2_1", qt = "_file-node-button_3rwm2_17", Kt = "_selected_3rwm2_53", Gt = "_focused_3rwm2_65", Jt = "_dropTarget_3rwm2_70", Xt = "_dropTargetInvalid_3rwm2_79", Qt = "_renaming_3rwm2_88", er = "_renameInput_3rwm2_93", tr = "_file-name_3rwm2_108", X = {
853
- filePickerTree: Ut,
876
+ }), Zt = "_file-picker-tree_3rwm2_1", qt = "_file-node-button_3rwm2_17", Kt = "_selected_3rwm2_53", Gt = "_focused_3rwm2_65", Jt = "_dropTarget_3rwm2_70", Xt = "_dropTargetInvalid_3rwm2_79", Qt = "_renaming_3rwm2_88", er = "_renameInput_3rwm2_93", tr = "_file-name_3rwm2_108", X = {
877
+ filePickerTree: Zt,
854
878
  fileNodeButton: qt,
855
879
  selected: Kt,
856
880
  focused: Gt,
@@ -860,169 +884,182 @@ const Yt = /* @__PURE__ */ We.jsx(ht, {
860
884
  renameInput: er,
861
885
  fileName: tr
862
886
  };
863
- function ft(l) {
864
- if (!l) return [];
865
- const s = l.replaceAll(/\\+/g, "/").replace(/\/{2,}/g, "/").replace(/\/$/, "") || l, C = s.startsWith("/"), h = s.split("/").filter(Boolean), x = [];
866
- let P = C ? "/" : "";
867
- C && x.push("/");
868
- for (const T of h)
869
- !P || P === "/" ? P = P === "/" ? `/${T}` : T : P = `${P}/${T}`, x.push(P);
870
- return x;
887
+ function dt(s) {
888
+ if (!s) return [];
889
+ const l = s.replaceAll(/\\+/g, "/").replace(/\/{2,}/g, "/").replace(/\/$/, "") || s, E = l.startsWith("/"), g = l.split("/").filter(Boolean), k = [];
890
+ let C = E ? "/" : "";
891
+ E && k.push("/");
892
+ for (const M of g)
893
+ !C || C === "/" ? C = C === "/" ? `/${M}` : M : C = `${C}/${M}`, k.push(C);
894
+ return k;
871
895
  }
872
- function rr(l, s) {
873
- if (!l || !s || l === s) return !1;
874
- const C = l === "/" ? "/" : l.replace(/\/{2,}/g, "/"), h = s.replace(/\/{2,}/g, "/");
875
- return C === "/" ? h.startsWith("/") && h !== "/" : h.startsWith(`${C}/`);
896
+ function rr(s, l) {
897
+ if (!s || !l || s === l) return !1;
898
+ const E = s === "/" ? "/" : s.replace(/\/{2,}/g, "/"), g = l.replace(/\/{2,}/g, "/");
899
+ return E === "/" ? g.startsWith("/") && g !== "/" : g.startsWith(`${E}/`);
876
900
  }
877
- function dt(l, s, C) {
878
- return l && (l === s ? C : l.startsWith(s === "/" ? "/" : `${s}/`) ? C + l.slice(s.length) : l);
901
+ function mt(s, l, E) {
902
+ return s && (s === l ? E : s.startsWith(l === "/" ? "/" : `${l}/`) ? E + s.slice(l.length) : s);
879
903
  }
880
904
  const nr = St(function({
881
- filesystem: s,
882
- root: C = "/wordpress",
883
- initialSelectedPath: h,
884
- onSelect: x = () => {
885
- }
886
- }, P) {
887
- const T = wt(() => {
888
- let t = (C || "/").replace(/\\+/g, "/");
905
+ filesystem: l,
906
+ root: E = "/wordpress",
907
+ initialSelectedPath: g,
908
+ onSelect: k = () => {
909
+ },
910
+ onDoubleClickFile: C
911
+ }, M) {
912
+ const P = gt(() => {
913
+ let t = (E || "/").replace(/\\+/g, "/");
889
914
  return t.startsWith("/") || (t = `/${t}`), t = t.replace(/\/{2,}/g, "/"), t.length > 1 && t.endsWith("/") && (t = t.slice(0, -1)), t || "/";
890
- }, [C]), H = (t) => !t || t === "." || t === ".." ? !1 : !/[\\/]/.test(t), [k, O] = Q(() => {
891
- if (!h)
915
+ }, [E]), S = (t) => !t || t === "." || t === ".." ? !1 : !/[\\/]/.test(t), [I, _] = ae(() => {
916
+ if (!g)
892
917
  return {};
893
918
  const t = {};
894
- for (const r of ft(h))
919
+ for (const r of dt(g))
895
920
  t[r] = !0;
896
921
  return t;
897
- }), [y, I] = Q(
898
- () => h ?? null
899
- ), [M, F] = Q(
900
- () => h ?? null
901
- ), [ee, q] = Q({}), [he, S] = Q(
922
+ }), [R, V] = ae(
923
+ () => g ?? null
924
+ ), [Q, $] = ae(
925
+ () => g ?? null
926
+ ), [Z, he] = ae({}), [j, T] = ae(
902
927
  {}
903
- ), [R, se] = Q(null), [we, K] = Q(
928
+ ), [fe, we] = ae(null), [ve, q] = ae(
904
929
  null
905
- ), W = re({}), ie = re(!1), ce = re(null), w = re(null), G = re(he), ne = re(ee), ue = () => {
906
- for (const t of Object.keys(W.current))
907
- clearTimeout(W.current[t]), delete W.current[t];
908
- }, Z = (t) => {
909
- const r = W.current[t];
910
- r && (clearTimeout(r), delete W.current[t]);
930
+ ), B = ie({}), Ee = ie(!1), ee = ie(null), m = ie(null), H = ie(j), oe = ie(Z), Y = () => {
931
+ for (const t of Object.keys(B.current))
932
+ clearTimeout(B.current[t]), delete B.current[t];
933
+ }, K = (t) => {
934
+ const r = B.current[t];
935
+ r && (clearTimeout(r), delete B.current[t]);
911
936
  };
912
- le(() => {
913
- G.current = he;
914
- }, [he]), le(() => {
915
- ne.current = ee;
916
- }, [ee]);
917
- const j = (t) => {
937
+ ue(() => {
938
+ H.current = j;
939
+ }, [j]), ue(() => {
940
+ oe.current = Z;
941
+ }, [Z]);
942
+ const L = (t) => {
918
943
  var n;
919
- const r = (n = ce.current) == null ? void 0 : n.querySelector(
944
+ const r = (n = ee.current) == null ? void 0 : n.querySelector(
920
945
  `[data-path="${t}"]`
921
946
  );
922
- r && typeof r.focus == "function" && r.focus();
923
- }, L = (t, r = "") => (r ? `${r}/${t.name}` : t.name).replaceAll(/\\+/g, "/").replace(/\/{2,}/g, "/"), be = (t, r) => t.children ? t.children : ee[r], _e = async (t, r) => {
947
+ r && typeof r.focus == "function" && (r.focus(), r.scrollIntoView({
948
+ behavior: "smooth",
949
+ block: "nearest"
950
+ }));
951
+ }, te = (t, r = "") => (r ? `${r}/${t.name}` : t.name).replaceAll(/\\+/g, "/").replace(/\/{2,}/g, "/"), Te = (t, r) => t.children ? t.children : Z[r], ke = async (t, r) => {
924
952
  const n = await t.listFiles(r), i = [];
925
953
  for (const a of n) {
926
- const m = r === "/" ? `/${a}` : `${r}/${a}`, f = await t.isDir(m);
927
- i.push({ name: a, type: f ? "folder" : "file" });
928
- }
929
- return i.sort((a, m) => a.type !== m.type ? a.type === "folder" ? -1 : 1 : a.name.localeCompare(m.name)), i;
930
- }, ge = async (t) => await _e(s, t), oe = (t, r) => {
954
+ const p = r === "/" ? `/${a}` : `${r}/${a}`, u = await t.isDir(p);
955
+ i.push({ name: a, type: u ? "folder" : "file" });
956
+ }
957
+ return i.sort((a, p) => {
958
+ var ye;
959
+ if (a.type !== p.type) return a.type === "folder" ? -1 : 1;
960
+ const u = r === "/" ? `/${a.name}` : `${r}/${a.name}`, h = r === "/" ? `/${p.name}` : `${r}/${p.name}`, O = (ye = ne.current) == null ? void 0 : ye.tempPath;
961
+ if (O) {
962
+ if (u === O) return -1;
963
+ if (h === O) return 1;
964
+ }
965
+ return a.name.localeCompare(p.name);
966
+ }), i;
967
+ }, _e = async (t) => await ke(l, t), de = (t, r) => {
931
968
  if (r.type !== "folder")
932
969
  return r.children;
933
- const n = r.children ?? ne.current[t];
934
- return n || G.current[t] ? n : (S((i) => ({ ...i, [t]: !0 })), new Promise((i) => {
935
- ge(t).then((a) => {
936
- q((m) => ({
937
- ...m,
970
+ const n = r.children ?? oe.current[t];
971
+ return n || H.current[t] ? n : (T((i) => ({ ...i, [t]: !0 })), new Promise((i) => {
972
+ _e(t).then((a) => {
973
+ he((p) => ({
974
+ ...p,
938
975
  [t]: a ?? []
939
976
  })), i(a ?? []);
940
977
  }).catch(() => {
941
978
  i([]);
942
979
  }).finally(() => {
943
- S((a) => {
944
- const m = { ...a };
945
- return delete m[t], m;
980
+ T((a) => {
981
+ const p = { ...a };
982
+ return delete p[t], p;
946
983
  });
947
984
  });
948
985
  }));
949
- }, ve = (t, r) => {
950
- r.type === "folder" && (typeof window > "u" || W.current[t] || (W.current[t] = window.setTimeout(() => {
951
- O((n) => n[t] ? n : { ...n, [t]: !0 }), oe(t, r), delete W.current[t];
986
+ }, G = (t, r) => {
987
+ r.type === "folder" && (typeof window > "u" || B.current[t] || (B.current[t] = window.setTimeout(() => {
988
+ _((n) => n[t] ? n : { ...n, [t]: !0 }), de(t, r), delete B.current[t];
952
989
  }, 600)));
953
- }, A = (t) => (S((r) => ({ ...r, [t]: !0 })), new Promise((r) => {
954
- ge(t).then((n) => {
955
- q((i) => ({
990
+ }, z = (t) => (T((r) => ({ ...r, [t]: !0 })), new Promise((r) => {
991
+ _e(t).then((n) => {
992
+ he((i) => ({
956
993
  ...i,
957
994
  [t]: n ?? []
958
995
  })), r(n ?? []);
959
996
  }).catch(() => {
960
997
  r([]);
961
998
  }).finally(() => {
962
- S((n) => {
999
+ T((n) => {
963
1000
  const i = { ...n };
964
1001
  return delete i[t], i;
965
1002
  });
966
1003
  });
967
- })), ye = (t, r, n) => {
968
- O((i) => ({
1004
+ })), se = (t, r, n) => {
1005
+ _((i) => ({
969
1006
  ...i,
970
1007
  [t]: n
971
- })), n ? oe(t, r) : q((i) => {
1008
+ })), n ? de(t, r) : he((i) => {
972
1009
  if (i[t] === void 0)
973
1010
  return i;
974
1011
  const a = { ...i };
975
1012
  return delete a[t], a;
976
1013
  });
977
- }, ae = async (t) => {
1014
+ }, le = async (t) => {
978
1015
  if (!t) return;
979
- const r = ft(t);
1016
+ const r = dt(t);
980
1017
  if (r.length === 0) return;
981
- O((a) => {
982
- const m = { ...a };
983
- for (const f of r)
984
- m[f] = !0;
985
- return m;
1018
+ _((a) => {
1019
+ const p = { ...a };
1020
+ for (const u of r)
1021
+ p[u] = !0;
1022
+ return p;
986
1023
  });
987
1024
  let n = [
988
- { name: T, type: "folder" }
1025
+ { name: P, type: "folder" }
989
1026
  ], i = "";
990
1027
  for (const a of r) {
991
- const m = n == null ? void 0 : n.find((g) => L(g, i) === a);
992
- if (!m || m.type !== "folder") {
1028
+ const p = n == null ? void 0 : n.find((h) => te(h, i) === a);
1029
+ if (!p || p.type !== "folder") {
993
1030
  i = a, n = [];
994
1031
  continue;
995
1032
  }
996
- n = await oe(a, m) ?? ne.current[a], i = a;
1033
+ n = await de(a, p) ?? oe.current[a], i = a;
997
1034
  }
998
- }, fe = (t, r) => {
1035
+ }, be = (t, r) => {
999
1036
  if (!t || !r || t === r)
1000
1037
  return;
1001
1038
  const n = t === "/" ? "/" : `${t}/`, i = (a) => a === t ? r : a.startsWith(n) ? r + a.slice(t.length) : null;
1002
- O((a) => {
1003
- let m = !1;
1004
- const f = { ...a };
1005
- for (const g of Object.keys(a)) {
1006
- const N = i(g);
1007
- N && N !== g && (f[N] = a[g], delete f[g], m = !0);
1039
+ _((a) => {
1040
+ let p = !1;
1041
+ const u = { ...a };
1042
+ for (const h of Object.keys(a)) {
1043
+ const O = i(h);
1044
+ O && O !== h && (u[O] = a[h], delete u[h], p = !0);
1008
1045
  }
1009
- return m ? f : a;
1010
- }), q((a) => {
1011
- let m = !1;
1012
- const f = { ...a };
1013
- for (const g of Object.keys(a)) {
1014
- const N = i(g);
1015
- N && N !== g && (f[N] = a[g], delete f[g], m = !0);
1046
+ return p ? u : a;
1047
+ }), he((a) => {
1048
+ let p = !1;
1049
+ const u = { ...a };
1050
+ for (const h of Object.keys(a)) {
1051
+ const O = i(h);
1052
+ O && O !== h && (u[O] = a[h], delete u[h], p = !0);
1016
1053
  }
1017
- return m ? f : a;
1018
- }), I((a) => a && (i(a) ?? a)), F((a) => a && (i(a) ?? a));
1019
- }, Re = () => {
1020
- se(null), K(null), ue();
1021
- }, de = (t, r = !0) => {
1022
- I(t), r && x(t);
1023
- }, B = wt(() => [{ name: T, type: "folder" }], [T]), [u, $] = Q(null), [me, Y] = Q(null), z = re(null), Se = me;
1054
+ return p ? u : a;
1055
+ }), V((a) => a && (i(a) ?? a)), $((a) => a && (i(a) ?? a));
1056
+ }, me = () => {
1057
+ we(null), q(null), Y();
1058
+ }, ge = (t, r = !0) => {
1059
+ V(t), r && k(t);
1060
+ }, W = gt(() => [{ name: P, type: "folder" }], [P]), [D, re] = ae(null), [d, F] = ae(null), ne = ie(null), Ce = d;
1024
1061
  Ot(
1025
- P,
1062
+ M,
1026
1063
  () => ({
1027
1064
  focusPath: (t, r = {}) => {
1028
1065
  if (!t) return;
@@ -1031,82 +1068,83 @@ const nr = St(function({
1031
1068
  domFocus: i = !0,
1032
1069
  notify: a = !1
1033
1070
  } = r;
1034
- n && de(t, a), F(t), i && j(t);
1071
+ n && ge(t, a), $(t), i && L(t);
1035
1072
  },
1036
1073
  selectPath: (t) => {
1037
- t && (de(t), F(t), j(t));
1074
+ t && (ge(t), $(t), L(t));
1038
1075
  },
1039
- getSelectedPath: () => y,
1040
- expandToPath: async (t) => await ae(t),
1041
- refresh: async (t) => await A(t),
1042
- remapPath: fe,
1076
+ getSelectedPath: () => R,
1077
+ expandToPath: async (t) => await le(t),
1078
+ refresh: async (t) => await z(t),
1079
+ remapPath: be,
1043
1080
  createFile: async (t) => {
1044
- await xe(t, "file", "untitled.php");
1081
+ await Oe(t, "file", "untitled.php");
1045
1082
  },
1046
1083
  createFolder: async (t) => {
1047
- await xe(t, "folder", "New Folder");
1084
+ await Oe(t, "folder", "New Folder");
1048
1085
  }
1049
1086
  }),
1050
- [y, A, fe, ae]
1087
+ [R, z, be, le]
1051
1088
  );
1052
- const Ze = re(!1), pe = re(
1053
- h ?? null
1054
- ), Ee = re(h);
1055
- le(() => {
1056
- ie.current = !1;
1057
- }, [T]), le(() => {
1058
- h && h !== Ee.current ? pe.current = h : h || (pe.current = null), Ee.current = h;
1059
- }, [h]), le(() => {
1060
- if (!h || Ze.current)
1089
+ const Pe = ie(!1), pe = ie(
1090
+ g ?? null
1091
+ ), Ie = ie(g);
1092
+ ue(() => {
1093
+ Ee.current = !1;
1094
+ }, [P]), ue(() => {
1095
+ g && g !== Ie.current ? pe.current = g : g || (pe.current = null), Ie.current = g;
1096
+ }, [g]), ue(() => {
1097
+ if (!g || Pe.current)
1061
1098
  return;
1062
- Ze.current = !0;
1063
- const t = ft(h);
1064
- O((n) => {
1099
+ Pe.current = !0;
1100
+ const t = dt(g);
1101
+ _((n) => {
1065
1102
  const i = { ...n };
1066
1103
  for (const a of t)
1067
1104
  i[a] = !0;
1068
1105
  return i;
1069
1106
  });
1070
- const r = t[t.length - 1] || h;
1071
- F(r), I(r), ae(h);
1072
- }, [h, ae]), le(() => {
1107
+ const r = t[t.length - 1] || g;
1108
+ $(r), V(r), le(g);
1109
+ }, [g, le]), ue(() => {
1073
1110
  const t = pe.current;
1074
- !t || B.length === 0 || (pe.current = null, ae(t));
1075
- }, [B, ae]), le(() => {
1076
- if (!M) {
1077
- if (B.length > 0) {
1078
- const t = L(B[0]);
1079
- F(t);
1111
+ !t || W.length === 0 || (pe.current = null, le(t));
1112
+ }, [W, le]), ue(() => {
1113
+ if (!Q) {
1114
+ if (W.length > 0) {
1115
+ const t = te(W[0]);
1116
+ $(t);
1080
1117
  }
1081
1118
  return;
1082
1119
  }
1083
- Se && Se === M || j(M);
1084
- }, [
1085
- B,
1086
- M,
1087
- L,
1088
- Se,
1089
- j
1090
- ]), le(() => {
1091
- if (B.length === 0)
1120
+ Ce && Ce === Q || L(Q);
1121
+ }, [W, Q, Ce]), ue(() => {
1122
+ if (W.length === 0)
1092
1123
  return;
1093
- const t = B[0];
1094
- if ((t == null ? void 0 : t.type) !== "folder" || ie.current)
1124
+ const t = W[0];
1125
+ if ((t == null ? void 0 : t.type) !== "folder" || Ee.current)
1095
1126
  return;
1096
1127
  const r = t.name;
1097
- ie.current = !0, O(
1128
+ Ee.current = !0, _(
1098
1129
  (n) => n[r] ? n : { ...n, [r]: !0 }
1099
- ), !ne.current[r] && !G.current[r] && oe(r, t);
1100
- }, [B, oe, T]), le(() => () => {
1101
- w.current && clearTimeout(w.current), ue();
1102
- }, []);
1103
- const [Ye, Oe] = Q(""), De = (t, r) => {
1130
+ ), !oe.current[r] && !H.current[r] && de(r, t);
1131
+ }, [W, de, P]), ue(() => () => {
1132
+ m.current && clearTimeout(m.current), Y();
1133
+ }, []), ue(() => {
1134
+ D && setTimeout(() => {
1135
+ const t = document.querySelector(
1136
+ '[role="menu"] [role="menuitem"]'
1137
+ );
1138
+ t && typeof t.focus == "function" && t.focus();
1139
+ }, 0);
1140
+ }, [D]);
1141
+ const [Ze, xe] = ae(""), rt = (t, r) => {
1104
1142
  if (t.type === "folder")
1105
1143
  return r;
1106
- const n = ke(r);
1144
+ const n = je(r);
1107
1145
  return n && n || "/";
1108
- }, Ne = (t, r, n) => {
1109
- const i = De(t, r);
1146
+ }, Ve = (t, r, n) => {
1147
+ const i = rt(t, r);
1110
1148
  if (!i)
1111
1149
  return { allowed: !1, state: "invalid", destination: null };
1112
1150
  if (n) {
@@ -1116,319 +1154,323 @@ const nr = St(function({
1116
1154
  return { allowed: !1, state: "invalid", destination: null };
1117
1155
  }
1118
1156
  return { allowed: !0, state: "valid", destination: i };
1119
- }, nt = (t, r, n) => {
1120
- r.type !== "folder" && r.type !== "file" || (se(n), K(null), t.dataTransfer && (t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(
1157
+ }, Le = (t, r, n) => {
1158
+ r.type !== "folder" && r.type !== "file" || (we(n), q(null), t.dataTransfer && (t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(
1121
1159
  "application/x-wp-playground-path",
1122
1160
  n
1123
1161
  ), t.dataTransfer.setData("text/plain", n)));
1124
- }, Me = () => {
1125
- Re();
1162
+ }, nt = () => {
1163
+ me();
1126
1164
  }, at = (t, r, n) => {
1127
- const i = Ne(r, n, R);
1128
- i.allowed && r.type === "folder" && ve(n, r), K((a) => (a == null ? void 0 : a.path) === n && a.state === i.state ? a : { path: n, state: i.state });
1129
- }, it = (t, r, n) => {
1130
- const i = Ne(r, n, R);
1131
- i.allowed && i.destination ? (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = R ? "move" : "copy"), r.type === "folder" && ve(n, r), K((a) => (a == null ? void 0 : a.path) === n && a.state === i.state ? a : { path: n, state: i.state })) : (t.dataTransfer && (t.dataTransfer.dropEffect = "none"), Z(n), K((a) => (a == null ? void 0 : a.path) === n && a.state === "invalid" ? a : { path: n, state: "invalid" }));
1132
- }, ze = (t, r, n) => {
1133
- Z(n);
1165
+ const i = Ve(r, n, fe);
1166
+ i.allowed && r.type === "folder" && G(n, r), q((a) => (a == null ? void 0 : a.path) === n && a.state === i.state ? a : { path: n, state: i.state });
1167
+ }, qe = (t, r, n) => {
1168
+ const i = Ve(r, n, fe);
1169
+ i.allowed && i.destination ? (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = fe ? "move" : "copy"), r.type === "folder" && G(n, r), q((a) => (a == null ? void 0 : a.path) === n && a.state === i.state ? a : { path: n, state: i.state })) : (t.dataTransfer && (t.dataTransfer.dropEffect = "none"), K(n), q((a) => (a == null ? void 0 : a.path) === n && a.state === "invalid" ? a : { path: n, state: "invalid" }));
1170
+ }, Ke = (t, r, n) => {
1171
+ K(n);
1134
1172
  const i = t.relatedTarget;
1135
- i && t.currentTarget.contains(i) || K((a) => (a == null ? void 0 : a.path) === n ? null : a);
1136
- }, Ue = async (t, r, n) => {
1137
- const i = R, a = Ne(r, n, i);
1173
+ i && t.currentTarget.contains(i) || q((a) => (a == null ? void 0 : a.path) === n ? null : a);
1174
+ }, Ge = async (t, r, n) => {
1175
+ const i = fe, a = Ve(r, n, i);
1138
1176
  if (!a.allowed || !a.destination) {
1139
- Re();
1177
+ me();
1140
1178
  return;
1141
1179
  }
1142
- t.preventDefault(), t.stopPropagation(), Z(n), K(null);
1180
+ t.preventDefault(), t.stopPropagation(), K(n), q(null);
1143
1181
  try {
1144
- i ? await lt(i, a.destination) : await $e(t, a.destination);
1182
+ i ? await lt(i, a.destination) : await Qe(t, a.destination);
1145
1183
  } finally {
1146
- Re();
1184
+ me();
1147
1185
  }
1148
- }, qe = (t, r, n) => {
1149
- t.preventDefault(), t.stopPropagation(), Y(null), $({
1186
+ }, it = (t, r, n) => {
1187
+ t.preventDefault(), t.stopPropagation(), F(null), re({
1150
1188
  absPath: n,
1151
1189
  type: r.type,
1152
1190
  x: t.clientX,
1153
1191
  y: t.clientY
1154
1192
  });
1155
- }, Fe = async (t, r) => {
1193
+ }, Se = async (t, r) => {
1156
1194
  let n = r, i = 0;
1157
- const a = (f) => {
1158
- const g = f.lastIndexOf(".");
1159
- return g > 0 ? { stem: f.slice(0, g), ext: f.slice(g) } : { stem: f, ext: "" };
1160
- }, m = t === "/" ? "" : t;
1161
- for (; await (s == null ? void 0 : s.fileExists(`${m}/${n}`)) || await (s == null ? void 0 : s.isDir(`${m}/${n}`)); ) {
1195
+ const a = (u) => {
1196
+ const h = u.lastIndexOf(".");
1197
+ return h > 0 ? { stem: u.slice(0, h), ext: u.slice(h) } : { stem: u, ext: "" };
1198
+ }, p = t === "/" ? "" : t;
1199
+ for (; await (l == null ? void 0 : l.fileExists(`${p}/${n}`)) || await (l == null ? void 0 : l.isDir(`${p}/${n}`)); ) {
1162
1200
  i += 1;
1163
- const { stem: f, ext: g } = a(r);
1164
- n = `${f} (${i})${g}`;
1201
+ const { stem: u, ext: h } = a(r);
1202
+ n = `${u} (${i})${h}`;
1165
1203
  }
1166
1204
  return n;
1167
- }, xe = async (t, r, n) => {
1168
- if (!s) return;
1169
- let i = t || y || T;
1205
+ }, Oe = async (t, r, n) => {
1206
+ if (!l) return;
1207
+ let i = t || R || P;
1170
1208
  try {
1171
- await s.isDir(i) || (i = ke(i));
1209
+ await l.isDir(i) || (i = je(i));
1172
1210
  } catch {
1173
- i = ke(i);
1211
+ i = je(i);
1174
1212
  }
1175
- const a = i, m = await Fe(a, n), f = Ae(a, m);
1176
- r === "folder" ? await s.mkdir(f) : await s.writeFile(f, ""), z.current = { type: r, tempPath: f }, Y(f), await A(a), setTimeout(() => {
1177
- F(f), j(f);
1213
+ const a = i, p = await Se(a, n), u = Ne(a, p);
1214
+ r === "folder" ? await l.mkdir(u) : await l.writeFile(u, ""), ne.current = { type: r, tempPath: u }, F(u), await z(a), setTimeout(() => {
1215
+ $(u), L(u);
1178
1216
  }, 0);
1179
- }, Ke = async (t) => {
1180
- if (!s) return !1;
1217
+ }, ot = async (t) => {
1218
+ if (!l) return !1;
1181
1219
  try {
1182
- if (await s.fileExists(t))
1220
+ if (await l.fileExists(t))
1183
1221
  return !0;
1184
1222
  } catch {
1185
1223
  }
1186
1224
  try {
1187
- if (await s.isDir(t))
1225
+ if (await l.isDir(t))
1188
1226
  return !0;
1189
1227
  } catch {
1190
1228
  }
1191
1229
  return !1;
1192
- }, ot = async (t) => {
1193
- if (s)
1230
+ }, st = async (t) => {
1231
+ if (l)
1194
1232
  try {
1195
- await s.mkdir(t);
1233
+ await l.mkdir(t);
1196
1234
  } catch (r) {
1197
- if (!await s.isDir(t).catch(() => !1))
1235
+ if (!await l.isDir(t).catch(() => !1))
1198
1236
  throw r;
1199
1237
  }
1200
1238
  }, lt = async (t, r) => {
1201
- if (!s) return;
1202
- const n = Mt(t), i = Ae(r, n);
1203
- if (i === t || await Ke(i))
1239
+ if (!l) return;
1240
+ const n = Mt(t), i = Ne(r, n);
1241
+ if (i === t || await ot(i))
1204
1242
  return;
1205
- const a = ke(t);
1243
+ const a = je(t);
1206
1244
  try {
1207
- await s.mv(t, i), fe(t, i);
1208
- const m = dt(
1209
- y,
1245
+ await l.mv(t, i), be(t, i);
1246
+ const p = mt(
1247
+ R,
1210
1248
  t,
1211
1249
  i
1212
1250
  );
1213
- y && (y === t || y.startsWith(`${t}/`)) && x(m), F(
1214
- (f) => dt(f, t, i)
1215
- ), O((f) => ({
1216
- ...f,
1251
+ R && (R === t || R.startsWith(`${t}/`)) && k(p), $(
1252
+ (u) => mt(u, t, i)
1253
+ ), _((u) => ({
1254
+ ...u,
1217
1255
  [r]: !0
1218
1256
  })), await Promise.all([
1219
- A(a),
1220
- A(r)
1221
- ]), I(
1222
- (f) => dt(f, t, i)
1223
- ), j(i);
1257
+ z(a),
1258
+ z(r)
1259
+ ]), V(
1260
+ (u) => mt(u, t, i)
1261
+ ), L(i);
1224
1262
  } catch {
1225
1263
  }
1226
- }, st = (t) => {
1264
+ }, ct = (t) => {
1227
1265
  const r = t;
1228
1266
  return r.webkitGetAsEntry ? r.webkitGetAsEntry() : null;
1229
- }, ct = (t) => new Promise((r, n) => {
1267
+ }, ut = (t) => new Promise((r, n) => {
1230
1268
  t.file(r, n);
1231
- }), Ge = async (t, r) => {
1232
- if (!s) return;
1233
- const n = t.name || "untitled", i = await Fe(r, n), a = Ae(r, i), m = new Uint8Array(await t.arrayBuffer());
1234
- await s.writeFile(a, m);
1235
- }, Je = async (t, r) => {
1236
- const n = await ct(t);
1237
- await Ge(n, r);
1269
+ }), Je = async (t, r) => {
1270
+ if (!l) return;
1271
+ const n = t.name || "untitled", i = await Se(r, n), a = Ne(r, i), p = new Uint8Array(await t.arrayBuffer());
1272
+ await l.writeFile(a, p);
1238
1273
  }, Xe = async (t, r) => {
1239
- const n = await Fe(
1274
+ const n = await ut(t);
1275
+ await Je(n, r);
1276
+ }, Fe = async (t, r) => {
1277
+ const n = await Se(
1240
1278
  r,
1241
1279
  t.name || "New Folder"
1242
- ), i = Ae(r, n);
1243
- await ot(i);
1244
- const a = t.createReader(), m = () => new Promise((f, g) => {
1280
+ ), i = Ne(r, n);
1281
+ await st(i);
1282
+ const a = t.createReader(), p = () => new Promise((u, h) => {
1245
1283
  a.readEntries(
1246
- (N) => f(Array.from(N)),
1247
- g
1284
+ (O) => u(Array.from(O)),
1285
+ h
1248
1286
  );
1249
1287
  });
1250
1288
  for (; ; ) {
1251
- const f = await m();
1252
- if (!f.length)
1289
+ const u = await p();
1290
+ if (!u.length)
1253
1291
  break;
1254
- for (const g of f)
1255
- g.isFile ? await Je(
1256
- g,
1292
+ for (const h of u)
1293
+ h.isFile ? await Xe(
1294
+ h,
1257
1295
  i
1258
- ) : g.isDirectory && await Xe(
1259
- g,
1296
+ ) : h.isDirectory && await Fe(
1297
+ h,
1260
1298
  i
1261
1299
  );
1262
1300
  }
1263
- }, $e = async (t, r) => {
1264
- var a, m;
1265
- if (!s) return;
1266
- const i = ((a = t.dataTransfer) != null && a.items ? Array.from(t.dataTransfer.items) : []).filter((f) => f.kind === "file").map((f) => st(f)).filter((f) => !!f);
1301
+ }, Qe = async (t, r) => {
1302
+ var a, p;
1303
+ if (!l) return;
1304
+ const i = ((a = t.dataTransfer) != null && a.items ? Array.from(t.dataTransfer.items) : []).filter((u) => u.kind === "file").map((u) => ct(u)).filter((u) => !!u);
1267
1305
  if (i.length > 0)
1268
- for (const f of i)
1269
- f.isFile ? await Je(
1270
- f,
1306
+ for (const u of i)
1307
+ u.isFile ? await Xe(
1308
+ u,
1271
1309
  r
1272
- ) : f.isDirectory && await Xe(
1273
- f,
1310
+ ) : u.isDirectory && await Fe(
1311
+ u,
1274
1312
  r
1275
1313
  );
1276
1314
  else {
1277
- const f = (m = t.dataTransfer) != null && m.files ? Array.from(t.dataTransfer.files) : [];
1278
- for (const g of f)
1279
- await Ge(g, r);
1315
+ const u = (p = t.dataTransfer) != null && p.files ? Array.from(t.dataTransfer.files) : [];
1316
+ for (const h of u)
1317
+ await Je(h, r);
1280
1318
  }
1281
- await A(r), O((f) => ({
1282
- ...f,
1319
+ await z(r), _((u) => ({
1320
+ ...u,
1283
1321
  [r]: !0
1284
1322
  }));
1285
- }, Qe = async (t, r) => {
1286
- if (!s) return;
1323
+ }, Re = async (t, r) => {
1324
+ if (!l) return;
1287
1325
  const n = t;
1288
- $(null);
1326
+ re(null);
1289
1327
  try {
1290
- r === "folder" ? await s.rmdir(n, { recursive: !0 }) : await s.unlink(n);
1328
+ r === "folder" ? await l.rmdir(n, { recursive: !0 }) : await l.unlink(n);
1291
1329
  } catch {
1292
1330
  } finally {
1293
- Y(null);
1294
- const i = ke(n);
1295
- await A(i), y && (y === n || y.startsWith(`${n}/`)) && x(null);
1331
+ F(null);
1332
+ const i = je(n);
1333
+ await z(i), R && (R === n || R.startsWith(`${n}/`)) && k(null);
1296
1334
  }
1297
- }, Ce = (t) => {
1335
+ }, We = (t) => {
1298
1336
  var r;
1299
- if (t.key.length === 1 && t.key.match(/\S/)) {
1300
- const n = Ye + t.key.toLowerCase();
1301
- if (Oe(n), w.current && clearTimeout(w.current), w.current = setTimeout(() => {
1302
- Oe("");
1303
- }, 1e3), !ce.current)
1304
- return;
1305
- const i = Array.from(
1306
- ce.current.querySelectorAll(".file-node-button")
1307
- ), a = document.activeElement;
1308
- let m = 0;
1309
- a && i.includes(a) && (m = i.indexOf(
1310
- a
1311
- ));
1312
- for (let f = 0; f < i.length; f++) {
1313
- const g = (m + f) % i.length, N = i[g];
1314
- if ((r = N.textContent) != null && r.toLowerCase().trim().startsWith(n)) {
1315
- N.focus();
1316
- const Te = N.getAttribute("data-path");
1317
- Te && F(Te);
1318
- break;
1337
+ if (!d)
1338
+ if (t.key.length === 1 && t.key.match(/\S/)) {
1339
+ const n = Ze + t.key.toLowerCase();
1340
+ if (xe(n), m.current && clearTimeout(m.current), m.current = setTimeout(() => {
1341
+ xe("");
1342
+ }, 1e3), !ee.current)
1343
+ return;
1344
+ const i = Array.from(
1345
+ ee.current.querySelectorAll(".file-node-button")
1346
+ ), a = document.activeElement;
1347
+ let p = 0;
1348
+ a && i.includes(a) && (p = i.indexOf(
1349
+ a
1350
+ ));
1351
+ for (let u = 0; u < i.length; u++) {
1352
+ const h = (p + u) % i.length, O = i[h];
1353
+ if ((r = O.textContent) != null && r.toLowerCase().trim().startsWith(n)) {
1354
+ O.focus();
1355
+ const ye = O.getAttribute("data-path");
1356
+ ye && $(ye);
1357
+ break;
1358
+ }
1319
1359
  }
1320
- }
1321
- } else
1322
- Oe(""), w.current && clearTimeout(w.current);
1323
- }, He = async (t, r) => {
1324
- const n = z.current, i = (n == null ? void 0 : n.tempPath) === t, a = ke(t), m = (r || "").trim();
1325
- if (!H(m)) {
1360
+ } else
1361
+ xe(""), m.current && clearTimeout(m.current);
1362
+ }, Be = async (t, r) => {
1363
+ const n = ne.current, i = (n == null ? void 0 : n.tempPath) === t, a = je(t), p = (r || "").trim();
1364
+ if (!S(p)) {
1326
1365
  if (i) {
1327
1366
  try {
1328
- n.type === "folder" ? await s.rmdir(t, {
1367
+ n.type === "folder" ? await l.rmdir(t, {
1329
1368
  recursive: !0
1330
- }) : await s.unlink(t);
1369
+ }) : await l.unlink(t);
1331
1370
  } catch {
1332
1371
  }
1333
- z.current = null;
1372
+ ne.current = null;
1334
1373
  }
1335
- Y(i ? null : t);
1374
+ F(i ? null : t);
1336
1375
  return;
1337
1376
  }
1338
- let f = Ae(a, m), g = f;
1339
- if (g === t) {
1340
- Y(null), i && (z.current = null), setTimeout(() => {
1341
- F(g), j(g);
1377
+ let u = Ne(a, p), h = u;
1378
+ if (h === t) {
1379
+ F(null);
1380
+ const Ae = i && (n == null ? void 0 : n.type) === "file";
1381
+ i && (ne.current = null), setTimeout(() => {
1382
+ $(h), L(h), Ae && C && C(h);
1342
1383
  }, 0);
1343
1384
  return;
1344
1385
  }
1345
- const N = await s.fileExists(g), Te = await s.isDir(g);
1346
- if ((N || Te) && g !== t)
1386
+ const O = await l.fileExists(h), ye = await l.isDir(h);
1387
+ if ((O || ye) && h !== t)
1347
1388
  if (i)
1348
1389
  try {
1349
- const tt = await Fe(
1390
+ const Ae = await Se(
1350
1391
  a === "/" ? "/" : a,
1351
- m
1392
+ p
1352
1393
  );
1353
- f = Ae(a, tt), g = f;
1394
+ u = Ne(a, Ae), h = u;
1354
1395
  } catch {
1355
1396
  }
1356
1397
  else {
1357
- Y(t);
1398
+ F(t);
1358
1399
  return;
1359
1400
  }
1360
- let et = (n == null ? void 0 : n.type) === "folder";
1401
+ let He = (n == null ? void 0 : n.type) === "folder";
1361
1402
  try {
1362
- await s.mv(t, f), n || (et = await s.isDir(f)), et && fe(t, g), y === t && x(g), await A(a), F(g), j(g);
1403
+ await l.mv(t, u), n || (He = await l.isDir(u)), He && be(t, h), R === t && k(h), await z(a), $(h), L(h), i && !He && C && C(h);
1363
1404
  } catch {
1364
1405
  if (i)
1365
1406
  try {
1366
- (n == null ? void 0 : n.type) === "folder" ? await s.rmdir(t, {
1407
+ (n == null ? void 0 : n.type) === "folder" ? await l.rmdir(t, {
1367
1408
  recursive: !0
1368
- }) : await s.unlink(t);
1409
+ }) : await l.unlink(t);
1369
1410
  } catch {
1370
1411
  }
1371
1412
  } finally {
1372
- z.current = null, Y(null);
1413
+ ne.current = null, F(null);
1373
1414
  }
1374
- }, Ie = async (t) => {
1375
- const r = z.current;
1376
- if (!s || (r == null ? void 0 : r.tempPath) !== t) {
1377
- Y((i) => i === t ? null : i);
1415
+ }, et = async (t) => {
1416
+ const r = ne.current;
1417
+ if (!l || (r == null ? void 0 : r.tempPath) !== t) {
1418
+ F((i) => i === t ? null : i);
1378
1419
  return;
1379
1420
  }
1380
1421
  try {
1381
- r.type === "folder" ? await s.rmdir(t, { recursive: !0 }) : await s.unlink(t);
1422
+ r.type === "folder" ? await l.rmdir(t, { recursive: !0 }) : await l.unlink(t);
1382
1423
  } catch {
1383
1424
  }
1384
- z.current = null, Y(null);
1385
- const n = ke(t);
1386
- await A(n), F(n), j(n);
1425
+ ne.current = null, F(null);
1426
+ const n = je(t);
1427
+ await z(n), $(n), L(n);
1387
1428
  };
1388
- return /* @__PURE__ */ d.createElement("div", { onKeyDown: Ce, ref: ce }, /* @__PURE__ */ d.createElement(Dt, { className: X.filePickerTree }, B.map((t, r) => /* @__PURE__ */ d.createElement(
1429
+ return /* @__PURE__ */ f.createElement("div", { onKeyDown: We, ref: ee }, /* @__PURE__ */ f.createElement(Dt, { className: X.filePickerTree }, W.map((t, r) => /* @__PURE__ */ f.createElement(
1389
1430
  Rt,
1390
1431
  {
1391
1432
  key: t.name,
1392
1433
  node: t,
1393
1434
  level: 0,
1394
1435
  position: r + 1,
1395
- setSize: B.length,
1396
- expandedNodePaths: k,
1397
- onToggle: ye,
1398
- selectedNode: y,
1399
- focusPath: (n) => F(n),
1400
- focusedNode: M,
1401
- selectPath: de,
1402
- generatePath: L,
1403
- getChildren: be,
1404
- onContextMenu: qe,
1405
- renamingPath: Se,
1406
- onRename: He,
1407
- onRenameCancel: Ie,
1408
- dropIndicator: we,
1409
- onDragStart: nt,
1410
- onDragEnd: Me,
1436
+ setSize: W.length,
1437
+ expandedNodePaths: I,
1438
+ onToggle: se,
1439
+ selectedNode: R,
1440
+ focusPath: (n) => $(n),
1441
+ focusedNode: Q,
1442
+ selectPath: ge,
1443
+ generatePath: te,
1444
+ getChildren: Te,
1445
+ onContextMenu: it,
1446
+ renamingPath: Ce,
1447
+ onRename: Be,
1448
+ onRenameCancel: et,
1449
+ dropIndicator: ve,
1450
+ onDragStart: Le,
1451
+ onDragEnd: nt,
1411
1452
  onDragEnter: at,
1412
- onDragOver: it,
1413
- onDragLeave: ze,
1414
- onDrop: Ue,
1415
- rootPath: T
1416
- }
1417
- ))), u && /* @__PURE__ */ d.createElement(
1418
- Ft,
1453
+ onDragOver: qe,
1454
+ onDragLeave: Ke,
1455
+ onDrop: Ge,
1456
+ rootPath: P,
1457
+ onDoubleClickFile: C
1458
+ }
1459
+ ))), D && /* @__PURE__ */ f.createElement(
1460
+ jt,
1419
1461
  {
1420
1462
  placement: "bottom-start",
1421
- onClose: () => $(null),
1463
+ onClose: () => re(null),
1422
1464
  anchor: {
1423
1465
  getBoundingClientRect: () => ({
1424
- x: u.x,
1425
- y: u.y,
1466
+ x: D.x,
1467
+ y: D.y,
1426
1468
  width: 0,
1427
1469
  height: 0,
1428
- top: u.y,
1429
- left: u.x,
1430
- right: u.x,
1431
- bottom: u.y,
1470
+ top: D.y,
1471
+ left: D.x,
1472
+ right: D.x,
1473
+ bottom: D.y,
1432
1474
  toJSON: () => ({})
1433
1475
  }),
1434
1476
  ownerDocument: document
@@ -1437,334 +1479,342 @@ const nr = St(function({
1437
1479
  resize: !1,
1438
1480
  focusOnMount: "firstElement"
1439
1481
  },
1440
- /* @__PURE__ */ d.createElement(jt, { role: "menu" }, u.type === "folder" && /* @__PURE__ */ d.createElement(
1441
- rt,
1482
+ /* @__PURE__ */ f.createElement(Ft, { role: "menu" }, D.type === "folder" && /* @__PURE__ */ f.createElement(
1483
+ tt,
1442
1484
  {
1443
1485
  role: "menuitem",
1444
1486
  onClick: async () => {
1445
- $(null), await xe(
1446
- u.absPath,
1487
+ re(null), await Oe(
1488
+ D.absPath,
1447
1489
  "file",
1448
1490
  "untitled.php"
1449
1491
  );
1450
1492
  }
1451
1493
  },
1452
1494
  "Create file"
1453
- ), u.type === "folder" && /* @__PURE__ */ d.createElement(
1454
- rt,
1495
+ ), D.type === "folder" && /* @__PURE__ */ f.createElement(
1496
+ tt,
1455
1497
  {
1456
1498
  role: "menuitem",
1457
1499
  onClick: async () => {
1458
- $(null), await xe(
1459
- u.absPath,
1500
+ re(null), await Oe(
1501
+ D.absPath,
1460
1502
  "folder",
1461
1503
  "New Folder"
1462
1504
  );
1463
1505
  }
1464
1506
  },
1465
1507
  "Create directory"
1466
- ), /* @__PURE__ */ d.createElement(
1467
- rt,
1508
+ ), /* @__PURE__ */ f.createElement(
1509
+ tt,
1468
1510
  {
1469
1511
  role: "menuitem",
1470
1512
  onClick: () => {
1471
- $(null), Y(u.absPath);
1513
+ re(null), F(D.absPath);
1472
1514
  }
1473
1515
  },
1474
1516
  "Rename"
1475
- ), /* @__PURE__ */ d.createElement(
1476
- rt,
1517
+ ), /* @__PURE__ */ f.createElement(
1518
+ tt,
1477
1519
  {
1478
1520
  role: "menuitem",
1479
- onClick: () => Qe(
1480
- u.absPath,
1481
- u.type
1521
+ onClick: () => Re(
1522
+ D.absPath,
1523
+ D.type
1482
1524
  )
1483
1525
  },
1484
1526
  "Delete"
1485
1527
  ))
1486
1528
  ));
1487
1529
  }), Rt = ({
1488
- node: l,
1489
- level: s,
1490
- position: C,
1491
- setSize: h,
1492
- expandedNodePaths: x,
1493
- onToggle: P,
1494
- selectedNode: T,
1495
- focusPath: H,
1496
- focusedNode: k,
1497
- selectPath: O,
1498
- generatePath: y,
1499
- getChildren: I,
1500
- onContextMenu: M,
1501
- renamingPath: F,
1502
- onRename: ee,
1503
- onRenameCancel: q,
1530
+ node: s,
1531
+ level: l,
1532
+ position: E,
1533
+ setSize: g,
1534
+ expandedNodePaths: k,
1535
+ onToggle: C,
1536
+ selectedNode: M,
1537
+ focusPath: P,
1538
+ focusedNode: S,
1539
+ selectPath: I,
1540
+ generatePath: _,
1541
+ getChildren: R,
1542
+ onContextMenu: V,
1543
+ renamingPath: Q,
1544
+ onRename: $,
1545
+ onRenameCancel: Z,
1504
1546
  parentPath: he = "",
1505
- dropIndicator: S,
1506
- onDragStart: R,
1507
- onDragEnd: se,
1547
+ dropIndicator: j,
1548
+ onDragStart: T,
1549
+ onDragEnd: fe,
1508
1550
  onDragEnter: we,
1509
- onDragOver: K,
1510
- onDragLeave: W,
1511
- onDrop: ie,
1512
- rootPath: ce
1551
+ onDragOver: ve,
1552
+ onDragLeave: q,
1553
+ onDrop: B,
1554
+ rootPath: Ee,
1555
+ onDoubleClickFile: ee
1513
1556
  }) => {
1514
- const w = y(l, he), G = x[w], ne = F === w, ue = re(null), [Z, j] = Q(l.name), L = re(!1), be = (S == null ? void 0 : S.path) === w, _e = be && (S == null ? void 0 : S.state) === "valid", ge = be && (S == null ? void 0 : S.state) === "invalid", oe = !ne && w !== ce, ve = {
1515
- onDragEnter: (u) => we == null ? void 0 : we(u, l, w),
1516
- onDragOver: (u) => K == null ? void 0 : K(u, l, w),
1517
- onDragLeave: (u) => W == null ? void 0 : W(u, l, w),
1518
- onDrop: (u) => ie == null ? void 0 : ie(u, l, w)
1519
- }, A = I(l, w) ?? [];
1520
- le(() => {
1521
- var u;
1522
- ne ? (j(l.name), L.current = !1, typeof window < "u" && window.requestAnimationFrame ? window.requestAnimationFrame(() => {
1523
- var $;
1524
- ($ = ue.current) == null || $.select();
1525
- }) : (u = ue.current) == null || u.select()) : L.current = !1;
1526
- }, [ne, l.name]);
1527
- const ye = () => {
1528
- l.type === "folder" && P(w, l, !G);
1529
- }, ae = (u) => {
1530
- var $, me, Y;
1531
- if (u.key === "ArrowLeft")
1532
- G ? ye() : ($ = document.querySelector(
1557
+ const m = _(s, he), H = k[m], oe = Q === m, Y = ie(null), [K, L] = ae(s.name), te = ie(!1), Te = (j == null ? void 0 : j.path) === m, ke = Te && (j == null ? void 0 : j.state) === "valid", _e = Te && (j == null ? void 0 : j.state) === "invalid", de = !oe && m !== Ee, G = ie(null), z = {
1558
+ onDragEnter: (d) => we == null ? void 0 : we(d, s, m),
1559
+ onDragOver: (d) => ve == null ? void 0 : ve(d, s, m),
1560
+ onDragLeave: (d) => q == null ? void 0 : q(d, s, m),
1561
+ onDrop: (d) => B == null ? void 0 : B(d, s, m)
1562
+ }, se = R(s, m) ?? [];
1563
+ ue(() => {
1564
+ var d;
1565
+ oe ? (L(s.name), te.current = !1, typeof window < "u" && requestAnimationFrame ? requestAnimationFrame(() => {
1566
+ var F;
1567
+ (F = Y.current) == null || F.select();
1568
+ }) : (d = Y.current) == null || d.select()) : te.current = !1;
1569
+ }, [oe, s.name]);
1570
+ const le = () => {
1571
+ s.type === "folder" && C(m, s, !H);
1572
+ }, be = (d) => {
1573
+ var F, ne;
1574
+ if (d.key === "ArrowLeft")
1575
+ H ? le() : (F = document.querySelector(
1533
1576
  `[data-path="${he}"]`
1534
- )) == null || $.focus(), u.preventDefault(), u.stopPropagation();
1535
- else if (u.key === "ArrowRight") {
1536
- if (G) {
1537
- if (A != null && A.length) {
1538
- const z = y(
1539
- A[0],
1540
- w
1577
+ )) == null || F.focus(), d.preventDefault(), d.stopPropagation();
1578
+ else if (d.key === "ArrowRight") {
1579
+ if (H) {
1580
+ if (se != null && se.length) {
1581
+ const Ce = _(
1582
+ se[0],
1583
+ m
1541
1584
  );
1542
- (me = document.querySelector(
1543
- `[data-path="${z}"]`
1544
- )) == null || me.focus();
1585
+ (ne = document.querySelector(
1586
+ `[data-path="${Ce}"]`
1587
+ )) == null || ne.focus();
1545
1588
  }
1546
1589
  } else
1547
- ye();
1548
- u.preventDefault(), u.stopPropagation();
1549
- } else if (u.key === " " || u.key === "Space" || u.key === "Spacebar")
1550
- l.type === "folder" && P(w, l, !G), u.preventDefault();
1551
- else if (u.key === "Enter") {
1552
- O(w), H(w);
1553
- const z = (Y = u.currentTarget) == null ? void 0 : Y.closest("form");
1554
- z && setTimeout(() => {
1555
- z.dispatchEvent(new Event("submit", { bubbles: !0 }));
1556
- });
1590
+ le();
1591
+ d.preventDefault(), d.stopPropagation();
1592
+ } else d.key === " " || d.key === "Space" || d.key === "Spacebar" ? (s.type === "folder" && C(m, s, !H), d.preventDefault()) : d.key === "Enter" && (s.type === "folder" ? C(m, s, !H) : (I(m, !1), P(m), ee ? ee(m) : I(m, !0)), d.preventDefault());
1593
+ }, me = (d) => {
1594
+ V == null || V(d, s, m);
1595
+ }, ge = (d) => {
1596
+ d.preventDefault(), te.current = !0, $ == null || $(m, K.trim());
1597
+ }, W = (d) => {
1598
+ if (d.key === "Escape") {
1599
+ d.preventDefault(), d.stopPropagation(), te.current = !0, Z == null || Z(m);
1600
+ return;
1601
+ }
1602
+ (d.key === "ArrowLeft" || d.key === "ArrowRight" || d.key === "ArrowUp" || d.key === "ArrowDown") && d.stopPropagation();
1603
+ }, D = () => {
1604
+ te.current || Z == null || Z(m), te.current = !1;
1605
+ }, re = () => {
1606
+ if (s.type === "folder") {
1607
+ le(), I(m), P(m);
1608
+ return;
1557
1609
  }
1558
- }, fe = (u) => {
1559
- M == null || M(u, l, w);
1560
- }, Re = (u) => {
1561
- u.preventDefault(), L.current = !0, ee == null || ee(w, Z.trim());
1562
- }, de = (u) => {
1563
- if (u.key === "Escape") {
1564
- u.preventDefault(), u.stopPropagation(), L.current = !0, q == null || q(w);
1610
+ const d = G.current !== null;
1611
+ if (d && G.current && clearTimeout(G.current), G.current = null, d) {
1612
+ ee ? ee(m) : I(m, !0);
1565
1613
  return;
1566
1614
  }
1567
- (u.key === "ArrowLeft" || u.key === "ArrowRight" || u.key === "ArrowUp" || u.key === "ArrowDown") && u.stopPropagation();
1568
- }, B = () => {
1569
- L.current || q == null || q(w), L.current = !1;
1615
+ I(m, !1), P(m), I(m, !0), G.current = window.setTimeout(() => {
1616
+ G.current = null;
1617
+ }, 300);
1570
1618
  };
1571
- return /* @__PURE__ */ d.createElement(d.Fragment, null, /* @__PURE__ */ d.createElement(
1619
+ return ue(() => () => {
1620
+ G.current !== null && typeof window < "u" && clearTimeout(G.current);
1621
+ }, []), /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
1572
1622
  At,
1573
1623
  {
1574
- level: s,
1575
- positionInSet: C,
1576
- setSize: h
1624
+ level: l,
1625
+ positionInSet: E,
1626
+ setSize: g
1577
1627
  },
1578
- /* @__PURE__ */ d.createElement(Vt, null, () => /* @__PURE__ */ d.createElement(d.Fragment, null, ne ? /* @__PURE__ */ d.createElement(
1628
+ /* @__PURE__ */ f.createElement($t, null, () => /* @__PURE__ */ f.createElement(f.Fragment, null, oe ? /* @__PURE__ */ f.createElement(
1579
1629
  "form",
1580
1630
  {
1581
- onSubmit: Re,
1582
- className: gt(
1631
+ onSubmit: ge,
1632
+ className: yt(
1583
1633
  X.fileNodeButton,
1584
1634
  X.renaming,
1585
1635
  "file-node-button",
1586
1636
  {
1587
- [X.selected]: T === w,
1588
- [X.focused]: k === w,
1589
- [X.dropTarget]: _e,
1590
- [X.dropTargetInvalid]: ge
1637
+ [X.selected]: M === m,
1638
+ [X.focused]: S === m,
1639
+ [X.dropTarget]: ke,
1640
+ [X.dropTargetInvalid]: _e
1591
1641
  }
1592
1642
  ),
1593
- "data-path": w,
1594
- onContextMenu: fe,
1595
- ...ve
1643
+ "data-path": m,
1644
+ onContextMenu: me,
1645
+ ...z
1596
1646
  },
1597
- /* @__PURE__ */ d.createElement(
1598
- Ct,
1647
+ /* @__PURE__ */ f.createElement(
1648
+ bt,
1599
1649
  {
1600
- node: l,
1601
- isOpen: l.type === "folder" && G,
1602
- level: s,
1650
+ node: s,
1651
+ isOpen: s.type === "folder" && H,
1652
+ level: l,
1603
1653
  hideName: !0
1604
1654
  }
1605
1655
  ),
1606
- /* @__PURE__ */ d.createElement(
1656
+ /* @__PURE__ */ f.createElement(
1607
1657
  "input",
1608
1658
  {
1609
- ref: ue,
1659
+ ref: Y,
1610
1660
  className: X.renameInput,
1611
- value: Z,
1612
- onChange: (u) => j(u.target.value),
1613
- onBlur: B,
1614
- onFocus: () => H(w),
1615
- onKeyDown: de
1661
+ value: K,
1662
+ onChange: (d) => L(d.target.value),
1663
+ onBlur: D,
1664
+ onFocus: () => P(m),
1665
+ onKeyDown: W
1616
1666
  }
1617
1667
  )
1618
- ) : /* @__PURE__ */ d.createElement(
1619
- mt,
1668
+ ) : /* @__PURE__ */ f.createElement(
1669
+ pt,
1620
1670
  {
1621
- ...ve,
1622
- draggable: oe,
1623
- onDragStart: (u) => R == null ? void 0 : R(u, l, w),
1624
- onDragEnd: (u) => se == null ? void 0 : se(u, l, w),
1625
- onClick: () => {
1626
- l.type === "folder" && ye(), O(w), H(w);
1627
- },
1628
- onKeyDown: ae,
1671
+ ...z,
1672
+ draggable: de,
1673
+ onDragStart: (d) => T == null ? void 0 : T(d, s, m),
1674
+ onDragEnd: (d) => fe == null ? void 0 : fe(d, s, m),
1675
+ onClick: re,
1676
+ onKeyDown: be,
1629
1677
  onFocus: () => {
1630
- H(w);
1678
+ P(m);
1631
1679
  },
1632
- onContextMenu: fe,
1633
- className: gt(
1680
+ onContextMenu: me,
1681
+ className: yt(
1634
1682
  X.fileNodeButton,
1683
+ "file-node-button",
1635
1684
  {
1636
- [X.selected]: T === w,
1637
- [X.focused]: k === w,
1638
- [X.dropTarget]: _e,
1639
- [X.dropTargetInvalid]: ge
1685
+ [X.selected]: M === m,
1686
+ [X.focused]: S === m,
1687
+ [X.dropTarget]: ke,
1688
+ [X.dropTargetInvalid]: _e
1640
1689
  }
1641
1690
  ),
1642
- "data-path": w,
1643
- "data-expanded": G ? "true" : "false"
1691
+ "data-path": m,
1692
+ "data-expanded": H ? "true" : "false"
1644
1693
  },
1645
- /* @__PURE__ */ d.createElement(
1646
- Ct,
1694
+ /* @__PURE__ */ f.createElement(
1695
+ bt,
1647
1696
  {
1648
- node: l,
1649
- isOpen: l.type === "folder" && G,
1650
- level: s
1697
+ node: s,
1698
+ isOpen: s.type === "folder" && H,
1699
+ level: l
1651
1700
  }
1652
1701
  )
1653
1702
  )))
1654
- ), G && A && A.map((u, $) => /* @__PURE__ */ d.createElement(
1703
+ ), H && se && se.map((d, F) => /* @__PURE__ */ f.createElement(
1655
1704
  Rt,
1656
1705
  {
1657
- key: u.name,
1658
- node: u,
1659
- level: s + 1,
1660
- position: $ + 1,
1661
- setSize: A.length,
1662
- expandedNodePaths: x,
1663
- onToggle: P,
1664
- selectedNode: T,
1665
- focusPath: H,
1666
- focusedNode: k,
1667
- selectPath: O,
1668
- generatePath: y,
1669
- getChildren: I,
1670
- onContextMenu: M,
1671
- renamingPath: F,
1672
- onRename: ee,
1673
- onRenameCancel: q,
1674
- parentPath: w,
1675
- dropIndicator: S,
1676
- onDragStart: R,
1677
- onDragEnd: se,
1706
+ key: d.name,
1707
+ node: d,
1708
+ level: l + 1,
1709
+ position: F + 1,
1710
+ setSize: se.length,
1711
+ expandedNodePaths: k,
1712
+ onToggle: C,
1713
+ selectedNode: M,
1714
+ focusPath: P,
1715
+ focusedNode: S,
1716
+ selectPath: I,
1717
+ generatePath: _,
1718
+ getChildren: R,
1719
+ onContextMenu: V,
1720
+ renamingPath: Q,
1721
+ onRename: $,
1722
+ onRenameCancel: Z,
1723
+ parentPath: m,
1724
+ dropIndicator: j,
1725
+ onDragStart: T,
1726
+ onDragEnd: fe,
1678
1727
  onDragEnter: we,
1679
- onDragOver: K,
1680
- onDragLeave: W,
1681
- onDrop: ie,
1682
- rootPath: ce
1728
+ onDragOver: ve,
1729
+ onDragLeave: q,
1730
+ onDrop: B,
1731
+ rootPath: Ee,
1732
+ onDoubleClickFile: ee
1683
1733
  }
1684
1734
  )));
1685
- }, Ct = ({ node: l, level: s, isOpen: C, hideName: h = !1 }) => {
1686
- const x = [];
1687
- for (let P = 0; P < s; P++)
1688
- x.push("&nbsp;&nbsp;&nbsp;&nbsp;");
1689
- return /* @__PURE__ */ d.createElement(d.Fragment, null, /* @__PURE__ */ d.createElement(
1735
+ }, bt = ({ node: s, level: l, isOpen: E, hideName: g = !1 }) => {
1736
+ const k = [];
1737
+ for (let C = 0; C < l; C++)
1738
+ k.push("&nbsp;&nbsp;&nbsp;&nbsp;");
1739
+ return /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
1690
1740
  "span",
1691
1741
  {
1692
1742
  "aria-hidden": "true",
1693
- dangerouslySetInnerHTML: { __html: x.join("") }
1743
+ dangerouslySetInnerHTML: { __html: k.join("") }
1694
1744
  }
1695
- ), l.type === "folder" ? /* @__PURE__ */ d.createElement(vt, { width: 16, icon: C ? Yt : zt }) : /* @__PURE__ */ d.createElement("div", { style: { width: 16 } }, " "), /* @__PURE__ */ d.createElement(vt, { width: 16, icon: l.type === "folder" ? Lt : Bt }), !h && /* @__PURE__ */ d.createElement("span", { className: X.fileName }, l.name));
1696
- }, ar = "_control_kp9d9_1", ir = "_browse-label_kp9d9_11", or = "_path-preview_kp9d9_37", lr = "_modal_kp9d9_43", sr = "_modal-footer_kp9d9_48", Ve = {
1745
+ ), s.type === "folder" ? /* @__PURE__ */ f.createElement(vt, { width: 16, icon: E ? zt : Ut }) : /* @__PURE__ */ f.createElement("div", { style: { width: 16 } }, " "), /* @__PURE__ */ f.createElement(vt, { width: 16, icon: s.type === "folder" ? Wt : Bt }), !g && /* @__PURE__ */ f.createElement("span", { className: X.fileName }, s.name));
1746
+ }, ar = "_control_kp9d9_1", ir = "_browse-label_kp9d9_11", or = "_path-preview_kp9d9_37", sr = "_modal_kp9d9_43", lr = "_modal-footer_kp9d9_48", Me = {
1697
1747
  control: ar,
1698
1748
  browseLabel: ir,
1699
1749
  pathPreview: or,
1700
- modal: lr,
1701
- modalFooter: sr
1750
+ modal: sr,
1751
+ modalFooter: lr
1702
1752
  };
1703
- function cr({ path: l }) {
1704
- if (!l)
1705
- return /* @__PURE__ */ d.createElement("div", { className: Ve.pathPreview }, /* @__PURE__ */ d.createElement("i", null, "Select a path"));
1706
- const s = l.split("/");
1707
- let C = (s.length > 2 ? "/" : "") + s.pop();
1708
- C.length > 10 && (C = C.substring(C.length - 10));
1709
- const h = l.substring(
1753
+ function cr({ path: s }) {
1754
+ if (!s)
1755
+ return /* @__PURE__ */ f.createElement("div", { className: Me.pathPreview }, /* @__PURE__ */ f.createElement("i", null, "Select a path"));
1756
+ const l = s.split("/");
1757
+ let E = (l.length > 2 ? "/" : "") + l.pop();
1758
+ E.length > 10 && (E = E.substring(E.length - 10));
1759
+ const g = s.substring(
1710
1760
  0,
1711
- l.length - C.length
1761
+ s.length - E.length
1712
1762
  );
1713
- return /* @__PURE__ */ d.createElement(
1763
+ return /* @__PURE__ */ f.createElement(
1714
1764
  "div",
1715
1765
  {
1716
- className: Ve.pathPreview,
1717
- "data-content-start": h,
1718
- "data-content-end": C
1766
+ className: Me.pathPreview,
1767
+ "data-content-start": g,
1768
+ "data-content-end": E
1719
1769
  }
1720
1770
  );
1721
1771
  }
1722
- function _r({
1723
- value: l = "",
1724
- onChange: s,
1725
- filesystem: C
1772
+ function Cr({
1773
+ value: s = "",
1774
+ onChange: l,
1775
+ filesystem: E
1726
1776
  }) {
1727
- const [h, x] = Q(!1), P = () => x(!0), T = () => x(!1), [H, k] = Q(
1728
- l || null
1777
+ const [g, k] = ae(!1), C = () => k(!0), M = () => k(!1), [P, S] = ae(
1778
+ s || null
1729
1779
  );
1730
- function O(y) {
1731
- y == null || y.preventDefault(), s(H || ""), T();
1780
+ function I(_) {
1781
+ _ == null || _.preventDefault(), l(P || ""), M();
1732
1782
  }
1733
- return /* @__PURE__ */ d.createElement(d.Fragment, null, /* @__PURE__ */ d.createElement(
1734
- mt,
1783
+ return /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
1784
+ pt,
1735
1785
  {
1736
1786
  variant: "tertiary",
1737
- className: Ve.control,
1738
- onClick: P
1787
+ className: Me.control,
1788
+ onClick: C
1739
1789
  },
1740
- /* @__PURE__ */ d.createElement("span", { className: Ve.browseLabel }, "Browse"),
1741
- /* @__PURE__ */ d.createElement(cr, { path: l || "" })
1742
- ), h && /* @__PURE__ */ d.createElement(
1790
+ /* @__PURE__ */ f.createElement("span", { className: Me.browseLabel }, "Browse"),
1791
+ /* @__PURE__ */ f.createElement(cr, { path: s || "" })
1792
+ ), g && /* @__PURE__ */ f.createElement(
1743
1793
  Nt,
1744
1794
  {
1745
1795
  title: "Select a path ",
1746
- onRequestClose: T,
1747
- className: Ve.modal
1796
+ onRequestClose: M,
1797
+ className: Me.modal
1748
1798
  },
1749
- /* @__PURE__ */ d.createElement("form", { onSubmit: O }, /* @__PURE__ */ d.createElement(
1799
+ /* @__PURE__ */ f.createElement("form", { onSubmit: I }, /* @__PURE__ */ f.createElement(
1750
1800
  nr,
1751
1801
  {
1752
- filesystem: C,
1753
- initialSelectedPath: l,
1754
- onSelect: k
1802
+ filesystem: E,
1803
+ initialSelectedPath: s,
1804
+ onSelect: S
1755
1805
  }
1756
- ), /* @__PURE__ */ d.createElement("div", { className: Ve.modalFooter }, /* @__PURE__ */ d.createElement(mt, { type: "submit", variant: "primary" }, "Select Path")))
1806
+ ), /* @__PURE__ */ f.createElement("div", { className: Me.modalFooter }, /* @__PURE__ */ f.createElement(pt, { type: "submit", variant: "primary" }, "Select Path")))
1757
1807
  ));
1758
1808
  }
1759
1809
  export {
1760
- yr as ClockIcon,
1761
- _r as FilePickerControl,
1810
+ vr as ClockIcon,
1811
+ Cr as FilePickerControl,
1762
1812
  nr as FilePickerTree,
1763
1813
  br as SiteManagerIcon,
1764
- vr as WordPressIcon,
1814
+ yr as WordPressIcon,
1765
1815
  Bt as file,
1766
- Lt as folder,
1767
- Cr as getLogoDataURL,
1816
+ Wt as folder,
1817
+ _r as getLogoDataURL,
1768
1818
  Er as layout,
1769
1819
  wr as playgroundLogo,
1770
1820
  gr as temporaryStorage