@argon-router/react 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,687 +1,499 @@
1
- import Ce, { createContext as pr, useContext as hr } from "react";
2
- import { useUnit as ee } from "effector-react";
3
- var Q = { exports: {} }, W = {};
1
+ import Ce, { createContext as ke, useContext as Oe } from "react";
2
+ import { useUnit as L } from "effector-react";
3
+ var H = { exports: {} }, k = {};
4
4
  /**
5
5
  * @license React
6
- * react-jsx-runtime.production.min.js
6
+ * react-jsx-runtime.production.js
7
7
  *
8
- * Copyright (c) Facebook, Inc. and its affiliates.
8
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9
9
  *
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var Pe;
14
- function yr() {
15
- if (Pe) return W;
16
- Pe = 1;
17
- var c = Ce, h = Symbol.for("react.element"), b = Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, g = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, j = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function m(E, i, T) {
19
- var v, w = {}, C = null, L = null;
20
- T !== void 0 && (C = "" + T), i.key !== void 0 && (C = "" + i.key), i.ref !== void 0 && (L = i.ref);
21
- for (v in i) y.call(i, v) && !j.hasOwnProperty(v) && (w[v] = i[v]);
22
- if (E && E.defaultProps) for (v in i = E.defaultProps, i) w[v] === void 0 && (w[v] = i[v]);
23
- return { $$typeof: h, type: E, key: C, ref: L, props: w, _owner: g.current };
13
+ var ve;
14
+ function Ae() {
15
+ if (ve) return k;
16
+ ve = 1;
17
+ var a = Symbol.for("react.transitional.element"), v = Symbol.for("react.fragment");
18
+ function d(E, i, l) {
19
+ var b = null;
20
+ if (l !== void 0 && (b = "" + l), i.key !== void 0 && (b = "" + i.key), "key" in i) {
21
+ l = {};
22
+ for (var m in i)
23
+ m !== "key" && (l[m] = i[m]);
24
+ } else l = i;
25
+ return i = l.ref, {
26
+ $$typeof: a,
27
+ type: E,
28
+ key: b,
29
+ ref: i !== void 0 ? i : null,
30
+ props: l
31
+ };
24
32
  }
25
- return W.Fragment = b, W.jsx = m, W.jsxs = m, W;
33
+ return k.Fragment = v, k.jsx = d, k.jsxs = d, k;
26
34
  }
27
- var Y = {};
35
+ var O = {};
28
36
  /**
29
37
  * @license React
30
38
  * react-jsx-runtime.development.js
31
39
  *
32
- * Copyright (c) Facebook, Inc. and its affiliates.
40
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
33
41
  *
34
42
  * This source code is licensed under the MIT license found in the
35
43
  * LICENSE file in the root directory of this source tree.
36
44
  */
37
- var je;
38
- function Rr() {
39
- return je || (je = 1, process.env.NODE_ENV !== "production" && function() {
40
- var c = Ce, h = Symbol.for("react.element"), b = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), E = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), L = Symbol.for("react.offscreen"), re = Symbol.iterator, ke = "@@iterator";
41
- function De(e) {
42
- if (e === null || typeof e != "object")
43
- return null;
44
- var r = re && e[re] || e[ke];
45
- return typeof r == "function" ? r : null;
46
- }
47
- var k = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
48
- function d(e) {
49
- {
50
- for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
51
- t[n - 1] = arguments[n];
52
- Fe("error", e, t);
53
- }
54
- }
55
- function Fe(e, r, t) {
56
- {
57
- var n = k.ReactDebugCurrentFrame, u = n.getStackAddendum();
58
- u !== "" && (r += "%s", t = t.concat([u]));
59
- var s = t.map(function(o) {
60
- return String(o);
61
- });
62
- s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
63
- }
64
- }
65
- var Ae = !1, Ie = !1, $e = !1, We = !1, Ye = !1, te;
66
- te = Symbol.for("react.module.reference");
67
- function Le(e) {
68
- return !!(typeof e == "string" || typeof e == "function" || e === y || e === j || Ye || e === g || e === T || e === v || We || e === L || Ae || Ie || $e || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === w || e.$$typeof === m || e.$$typeof === E || e.$$typeof === i || // This needs to include all possible module reference object
69
- // types supported by any Flight configuration anywhere since
70
- // we don't know which Flight build this will end up being used
71
- // with.
72
- e.$$typeof === te || e.getModuleId !== void 0));
73
- }
74
- function Ve(e, r, t) {
75
- var n = e.displayName;
76
- if (n)
77
- return n;
78
- var u = r.displayName || r.name || "";
79
- return u !== "" ? t + "(" + u + ")" : t;
80
- }
81
- function ne(e) {
82
- return e.displayName || "Context";
83
- }
84
- function O(e) {
85
- if (e == null)
86
- return null;
87
- if (typeof e.tag == "number" && d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
88
- return e.displayName || e.name || null;
89
- if (typeof e == "string")
90
- return e;
45
+ var Ee;
46
+ function Se() {
47
+ return Ee || (Ee = 1, process.env.NODE_ENV !== "production" && function() {
48
+ function a(e) {
49
+ if (e == null) return null;
50
+ if (typeof e == "function")
51
+ return e.$$typeof === he ? null : e.displayName || e.name || null;
52
+ if (typeof e == "string") return e;
91
53
  switch (e) {
92
- case y:
54
+ case Y:
93
55
  return "Fragment";
94
- case b:
56
+ case _e:
95
57
  return "Portal";
96
- case j:
58
+ case Z:
97
59
  return "Profiler";
98
- case g:
60
+ case K:
99
61
  return "StrictMode";
100
- case T:
62
+ case $:
101
63
  return "Suspense";
102
- case v:
64
+ case W:
103
65
  return "SuspenseList";
104
66
  }
105
67
  if (typeof e == "object")
106
- switch (e.$$typeof) {
107
- case E:
108
- var r = e;
109
- return ne(r) + ".Consumer";
110
- case m:
111
- var t = e;
112
- return ne(t._context) + ".Provider";
113
- case i:
114
- return Ve(e, e.render, "ForwardRef");
115
- case w:
116
- var n = e.displayName || null;
117
- return n !== null ? n : O(e.type) || "Memo";
118
- case C: {
119
- var u = e, s = u._payload, o = u._init;
68
+ switch (typeof e.tag == "number" && console.error(
69
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
+ ), e.$$typeof) {
71
+ case Q:
72
+ return (e.displayName || "Context") + ".Provider";
73
+ case I:
74
+ return (e._context.displayName || "Context") + ".Consumer";
75
+ case M:
76
+ var r = e.render;
77
+ return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
78
+ case U:
79
+ return r = e.displayName || null, r !== null ? r : a(e.type) || "Memo";
80
+ case V:
81
+ r = e._payload, e = e._init;
120
82
  try {
121
- return O(o(s));
83
+ return a(e(r));
122
84
  } catch {
123
- return null;
124
85
  }
125
- }
126
86
  }
127
87
  return null;
128
88
  }
129
- var S = Object.assign, A = 0, ae, oe, ie, ue, se, fe, le;
130
- function ce() {
131
- }
132
- ce.__reactDisabledLog = !0;
133
- function Me() {
134
- {
135
- if (A === 0) {
136
- ae = console.log, oe = console.info, ie = console.warn, ue = console.error, se = console.group, fe = console.groupCollapsed, le = console.groupEnd;
137
- var e = {
138
- configurable: !0,
139
- enumerable: !0,
140
- value: ce,
141
- writable: !0
142
- };
143
- Object.defineProperties(console, {
144
- info: e,
145
- log: e,
146
- warn: e,
147
- error: e,
148
- group: e,
149
- groupCollapsed: e,
150
- groupEnd: e
151
- });
152
- }
153
- A++;
154
- }
89
+ function v(e) {
90
+ return "" + e;
155
91
  }
156
- function Ue() {
157
- {
158
- if (A--, A === 0) {
159
- var e = {
160
- configurable: !0,
161
- enumerable: !0,
162
- writable: !0
163
- };
164
- Object.defineProperties(console, {
165
- log: S({}, e, {
166
- value: ae
167
- }),
168
- info: S({}, e, {
169
- value: oe
170
- }),
171
- warn: S({}, e, {
172
- value: ie
173
- }),
174
- error: S({}, e, {
175
- value: ue
176
- }),
177
- group: S({}, e, {
178
- value: se
179
- }),
180
- groupCollapsed: S({}, e, {
181
- value: fe
182
- }),
183
- groupEnd: S({}, e, {
184
- value: le
185
- })
186
- });
187
- }
188
- A < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
92
+ function d(e) {
93
+ try {
94
+ v(e);
95
+ var r = !1;
96
+ } catch {
97
+ r = !0;
189
98
  }
190
- }
191
- var K = k.ReactCurrentDispatcher, B;
192
- function V(e, r, t) {
193
- {
194
- if (B === void 0)
195
- try {
196
- throw Error();
197
- } catch (u) {
198
- var n = u.stack.trim().match(/\n( *(at )?)/);
199
- B = n && n[1] || "";
200
- }
201
- return `
202
- ` + B + e;
99
+ if (r) {
100
+ r = console;
101
+ var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
102
+ return t.call(
103
+ r,
104
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
105
+ n
106
+ ), v(e);
203
107
  }
204
108
  }
205
- var J = !1, M;
206
- {
207
- var Ne = typeof WeakMap == "function" ? WeakMap : Map;
208
- M = new Ne();
109
+ function E() {
209
110
  }
210
- function de(e, r) {
211
- if (!e || J)
212
- return "";
213
- {
214
- var t = M.get(e);
215
- if (t !== void 0)
216
- return t;
111
+ function i() {
112
+ if (j === 0) {
113
+ re = console.log, te = console.info, oe = console.warn, ne = console.error, ae = console.group, ue = console.groupCollapsed, ie = console.groupEnd;
114
+ var e = {
115
+ configurable: !0,
116
+ enumerable: !0,
117
+ value: E,
118
+ writable: !0
119
+ };
120
+ Object.defineProperties(console, {
121
+ info: e,
122
+ log: e,
123
+ warn: e,
124
+ error: e,
125
+ group: e,
126
+ groupCollapsed: e,
127
+ groupEnd: e
128
+ });
129
+ }
130
+ j++;
131
+ }
132
+ function l() {
133
+ if (j--, j === 0) {
134
+ var e = { configurable: !0, enumerable: !0, writable: !0 };
135
+ Object.defineProperties(console, {
136
+ log: p({}, e, { value: re }),
137
+ info: p({}, e, { value: te }),
138
+ warn: p({}, e, { value: oe }),
139
+ error: p({}, e, { value: ne }),
140
+ group: p({}, e, { value: ae }),
141
+ groupCollapsed: p({}, e, { value: ue }),
142
+ groupEnd: p({}, e, { value: ie })
143
+ });
217
144
  }
218
- var n;
219
- J = !0;
220
- var u = Error.prepareStackTrace;
221
- Error.prepareStackTrace = void 0;
222
- var s;
223
- s = K.current, K.current = null, Me();
145
+ 0 > j && console.error(
146
+ "disabledDepth fell below zero. This is a bug in React. Please file an issue."
147
+ );
148
+ }
149
+ function b(e) {
150
+ if (q === void 0)
151
+ try {
152
+ throw Error();
153
+ } catch (t) {
154
+ var r = t.stack.trim().match(/\n( *(at )?)/);
155
+ q = r && r[1] || "", se = -1 < t.stack.indexOf(`
156
+ at`) ? " (<anonymous>)" : -1 < t.stack.indexOf("@") ? "@unknown:0:0" : "";
157
+ }
158
+ return `
159
+ ` + q + e + se;
160
+ }
161
+ function m(e, r) {
162
+ if (!e || G) return "";
163
+ var t = J.get(e);
164
+ if (t !== void 0) return t;
165
+ G = !0, t = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
166
+ var n = null;
167
+ n = _.H, _.H = null, i();
224
168
  try {
225
- if (r) {
226
- var o = function() {
227
- throw Error();
228
- };
229
- if (Object.defineProperty(o.prototype, "props", {
230
- set: function() {
231
- throw Error();
232
- }
233
- }), typeof Reflect == "object" && Reflect.construct) {
169
+ var c = {
170
+ DetermineComponentFrameRoot: function() {
234
171
  try {
235
- Reflect.construct(o, []);
236
- } catch (R) {
237
- n = R;
238
- }
239
- Reflect.construct(e, [], o);
240
- } else {
241
- try {
242
- o.call();
243
- } catch (R) {
244
- n = R;
172
+ if (r) {
173
+ var y = function() {
174
+ throw Error();
175
+ };
176
+ if (Object.defineProperty(y.prototype, "props", {
177
+ set: function() {
178
+ throw Error();
179
+ }
180
+ }), typeof Reflect == "object" && Reflect.construct) {
181
+ try {
182
+ Reflect.construct(y, []);
183
+ } catch (x) {
184
+ var A = x;
185
+ }
186
+ Reflect.construct(e, [], y);
187
+ } else {
188
+ try {
189
+ y.call();
190
+ } catch (x) {
191
+ A = x;
192
+ }
193
+ e.call(y.prototype);
194
+ }
195
+ } else {
196
+ try {
197
+ throw Error();
198
+ } catch (x) {
199
+ A = x;
200
+ }
201
+ (y = e()) && typeof y.catch == "function" && y.catch(function() {
202
+ });
203
+ }
204
+ } catch (x) {
205
+ if (x && A && typeof x.stack == "string")
206
+ return [x.stack, A.stack];
245
207
  }
246
- e.call(o.prototype);
247
- }
248
- } else {
249
- try {
250
- throw Error();
251
- } catch (R) {
252
- n = R;
208
+ return [null, null];
253
209
  }
254
- e();
255
- }
256
- } catch (R) {
257
- if (R && n && typeof R.stack == "string") {
258
- for (var a = R.stack.split(`
259
- `), p = n.stack.split(`
260
- `), f = a.length - 1, l = p.length - 1; f >= 1 && l >= 0 && a[f] !== p[l]; )
261
- l--;
262
- for (; f >= 1 && l >= 0; f--, l--)
263
- if (a[f] !== p[l]) {
264
- if (f !== 1 || l !== 1)
210
+ };
211
+ c.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
212
+ var u = Object.getOwnPropertyDescriptor(
213
+ c.DetermineComponentFrameRoot,
214
+ "name"
215
+ );
216
+ u && u.configurable && Object.defineProperty(
217
+ c.DetermineComponentFrameRoot,
218
+ "name",
219
+ { value: "DetermineComponentFrameRoot" }
220
+ );
221
+ var o = c.DetermineComponentFrameRoot(), w = o[0], T = o[1];
222
+ if (w && T) {
223
+ var f = w.split(`
224
+ `), h = T.split(`
225
+ `);
226
+ for (o = u = 0; u < f.length && !f[u].includes(
227
+ "DetermineComponentFrameRoot"
228
+ ); )
229
+ u++;
230
+ for (; o < h.length && !h[o].includes(
231
+ "DetermineComponentFrameRoot"
232
+ ); )
233
+ o++;
234
+ if (u === f.length || o === h.length)
235
+ for (u = f.length - 1, o = h.length - 1; 1 <= u && 0 <= o && f[u] !== h[o]; )
236
+ o--;
237
+ for (; 1 <= u && 0 <= o; u--, o--)
238
+ if (f[u] !== h[o]) {
239
+ if (u !== 1 || o !== 1)
265
240
  do
266
- if (f--, l--, l < 0 || a[f] !== p[l]) {
267
- var _ = `
268
- ` + a[f].replace(" at new ", " at ");
269
- return e.displayName && _.includes("<anonymous>") && (_ = _.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, _), _;
241
+ if (u--, o--, 0 > o || f[u] !== h[o]) {
242
+ var C = `
243
+ ` + f[u].replace(
244
+ " at new ",
245
+ " at "
246
+ );
247
+ return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && J.set(e, C), C;
270
248
  }
271
- while (f >= 1 && l >= 0);
249
+ while (1 <= u && 0 <= o);
272
250
  break;
273
251
  }
274
252
  }
275
253
  } finally {
276
- J = !1, K.current = s, Ue(), Error.prepareStackTrace = u;
254
+ G = !1, _.H = n, l(), Error.prepareStackTrace = t;
277
255
  }
278
- var F = e ? e.displayName || e.name : "", x = F ? V(F) : "";
279
- return typeof e == "function" && M.set(e, x), x;
280
- }
281
- function Ke(e, r, t) {
282
- return de(e, !1);
283
- }
284
- function Be(e) {
285
- var r = e.prototype;
286
- return !!(r && r.isReactComponent);
287
- }
288
- function U(e, r, t) {
289
- if (e == null)
290
- return "";
291
- if (typeof e == "function")
292
- return de(e, Be(e));
293
- if (typeof e == "string")
294
- return V(e);
256
+ return f = (f = e ? e.displayName || e.name : "") ? b(f) : "", typeof e == "function" && J.set(e, f), f;
257
+ }
258
+ function g(e) {
259
+ if (e == null) return "";
260
+ if (typeof e == "function") {
261
+ var r = e.prototype;
262
+ return m(
263
+ e,
264
+ !(!r || !r.isReactComponent)
265
+ );
266
+ }
267
+ if (typeof e == "string") return b(e);
295
268
  switch (e) {
296
- case T:
297
- return V("Suspense");
298
- case v:
299
- return V("SuspenseList");
269
+ case $:
270
+ return b("Suspense");
271
+ case W:
272
+ return b("SuspenseList");
300
273
  }
301
274
  if (typeof e == "object")
302
275
  switch (e.$$typeof) {
303
- case i:
304
- return Ke(e.render);
305
- case w:
306
- return U(e.type, r, t);
307
- case C: {
308
- var n = e, u = n._payload, s = n._init;
276
+ case M:
277
+ return e = m(e.render, !1), e;
278
+ case U:
279
+ return g(e.type);
280
+ case V:
281
+ r = e._payload, e = e._init;
309
282
  try {
310
- return U(s(u), r, t);
283
+ return g(e(r));
311
284
  } catch {
312
285
  }
313
- }
314
286
  }
315
287
  return "";
316
288
  }
317
- var I = Object.prototype.hasOwnProperty, ve = {}, pe = k.ReactDebugCurrentFrame;
318
- function N(e) {
319
- if (e) {
320
- var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
321
- pe.setExtraStackFrame(t);
322
- } else
323
- pe.setExtraStackFrame(null);
324
- }
325
- function Je(e, r, t, n, u) {
326
- {
327
- var s = Function.call.bind(I);
328
- for (var o in e)
329
- if (s(e, o)) {
330
- var a = void 0;
331
- try {
332
- if (typeof e[o] != "function") {
333
- var p = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
334
- throw p.name = "Invariant Violation", p;
335
- }
336
- a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
337
- } catch (f) {
338
- a = f;
339
- }
340
- a && !(a instanceof Error) && (N(u), d("%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).", n || "React class", t, o, typeof a), N(null)), a instanceof Error && !(a.message in ve) && (ve[a.message] = !0, N(u), d("Failed %s type: %s", t, a.message), N(null));
341
- }
342
- }
343
- }
344
- var qe = Array.isArray;
345
- function q(e) {
346
- return qe(e);
347
- }
348
- function Ge(e) {
349
- {
350
- var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
351
- return t;
352
- }
353
- }
354
- function ze(e) {
355
- try {
356
- return he(e), !1;
357
- } catch {
358
- return !0;
359
- }
360
- }
361
- function he(e) {
362
- return "" + e;
289
+ function s() {
290
+ var e = _.A;
291
+ return e === null ? null : e.getOwner();
363
292
  }
364
- function ye(e) {
365
- if (ze(e))
366
- return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), he(e);
367
- }
368
- var $ = k.ReactCurrentOwner, Xe = {
369
- key: !0,
370
- ref: !0,
371
- __self: !0,
372
- __source: !0
373
- }, Re, ge, G;
374
- G = {};
375
- function He(e) {
376
- if (I.call(e, "ref")) {
377
- var r = Object.getOwnPropertyDescriptor(e, "ref").get;
378
- if (r && r.isReactWarning)
379
- return !1;
380
- }
381
- return e.ref !== void 0;
382
- }
383
- function Ze(e) {
384
- if (I.call(e, "key")) {
293
+ function S(e) {
294
+ if (ee.call(e, "key")) {
385
295
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
386
- if (r && r.isReactWarning)
387
- return !1;
296
+ if (r && r.isReactWarning) return !1;
388
297
  }
389
298
  return e.key !== void 0;
390
299
  }
391
- function Qe(e, r) {
392
- if (typeof e.ref == "string" && $.current && r && $.current.stateNode !== r) {
393
- var t = O($.current.type);
394
- G[t] || (d('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', O($.current.type), e.ref), G[t] = !0);
395
- }
396
- }
397
- function er(e, r) {
398
- {
399
- var t = function() {
400
- Re || (Re = !0, d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
401
- };
402
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
403
- get: t,
404
- configurable: !0
405
- });
406
- }
407
- }
408
- function rr(e, r) {
409
- {
410
- var t = function() {
411
- ge || (ge = !0, d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
412
- };
413
- t.isReactWarning = !0, Object.defineProperty(e, "ref", {
414
- get: t,
415
- configurable: !0
416
- });
300
+ function ge(e, r) {
301
+ function t() {
302
+ le || (le = !0, console.error(
303
+ "%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://react.dev/link/special-props)",
304
+ r
305
+ ));
417
306
  }
418
- }
419
- var tr = function(e, r, t, n, u, s, o) {
420
- var a = {
421
- // This tag allows us to uniquely identify this as a React Element
422
- $$typeof: h,
423
- // Built-in properties that belong on the element
307
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
308
+ get: t,
309
+ configurable: !0
310
+ });
311
+ }
312
+ function we() {
313
+ var e = a(this.type);
314
+ return ce[e] || (ce[e] = !0, console.error(
315
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
316
+ )), e = this.props.ref, e !== void 0 ? e : null;
317
+ }
318
+ function xe(e, r, t, n, c, u) {
319
+ return t = u.ref, e = {
320
+ $$typeof: P,
424
321
  type: e,
425
322
  key: r,
426
- ref: t,
427
- props: o,
428
- // Record the component responsible for creating this element.
429
- _owner: s
430
- };
431
- return a._store = {}, Object.defineProperty(a._store, "validated", {
432
- configurable: !1,
323
+ props: u,
324
+ _owner: c
325
+ }, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
433
326
  enumerable: !1,
434
- writable: !0,
435
- value: !1
436
- }), Object.defineProperty(a, "_self", {
327
+ get: we
328
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
437
329
  configurable: !1,
438
330
  enumerable: !1,
439
- writable: !1,
440
- value: n
441
- }), Object.defineProperty(a, "_source", {
331
+ writable: !0,
332
+ value: 0
333
+ }), Object.defineProperty(e, "_debugInfo", {
442
334
  configurable: !1,
443
335
  enumerable: !1,
444
- writable: !1,
445
- value: u
446
- }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
447
- };
448
- function nr(e, r, t, n, u) {
449
- {
450
- var s, o = {}, a = null, p = null;
451
- t !== void 0 && (ye(t), a = "" + t), Ze(r) && (ye(r.key), a = "" + r.key), He(r) && (p = r.ref, Qe(r, u));
452
- for (s in r)
453
- I.call(r, s) && !Xe.hasOwnProperty(s) && (o[s] = r[s]);
454
- if (e && e.defaultProps) {
455
- var f = e.defaultProps;
456
- for (s in f)
457
- o[s] === void 0 && (o[s] = f[s]);
458
- }
459
- if (a || p) {
460
- var l = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
461
- a && er(o, l), p && rr(o, l);
462
- }
463
- return tr(e, a, p, u, n, $.current, o);
464
- }
465
- }
466
- var z = k.ReactCurrentOwner, be = k.ReactDebugCurrentFrame;
467
- function D(e) {
468
- if (e) {
469
- var r = e._owner, t = U(e.type, e._source, r ? r.type : null);
470
- be.setExtraStackFrame(t);
336
+ writable: !0,
337
+ value: null
338
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
339
+ }
340
+ function X(e, r, t, n, c, u) {
341
+ if (typeof e == "string" || typeof e == "function" || e === Y || e === Z || e === K || e === $ || e === W || e === pe || typeof e == "object" && e !== null && (e.$$typeof === V || e.$$typeof === U || e.$$typeof === Q || e.$$typeof === I || e.$$typeof === M || e.$$typeof === Te || e.getModuleId !== void 0)) {
342
+ var o = r.children;
343
+ if (o !== void 0)
344
+ if (n)
345
+ if (z(o)) {
346
+ for (n = 0; n < o.length; n++)
347
+ B(o[n], e);
348
+ Object.freeze && Object.freeze(o);
349
+ } else
350
+ console.error(
351
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
352
+ );
353
+ else B(o, e);
471
354
  } else
472
- be.setExtraStackFrame(null);
473
- }
474
- var X;
475
- X = !1;
476
- function H(e) {
477
- return typeof e == "object" && e !== null && e.$$typeof === h;
478
- }
479
- function Ee() {
480
- {
481
- if (z.current) {
482
- var e = O(z.current.type);
483
- if (e)
484
- return `
485
-
486
- Check the render method of \`` + e + "`.";
487
- }
488
- return "";
489
- }
490
- }
491
- function ar(e) {
492
- return "";
493
- }
494
- var _e = {};
495
- function or(e) {
496
- {
497
- var r = Ee();
498
- if (!r) {
499
- var t = typeof e == "string" ? e : e.displayName || e.name;
500
- t && (r = `
501
-
502
- Check the top-level render call using <` + t + ">.");
503
- }
504
- return r;
505
- }
506
- }
507
- function me(e, r) {
508
- {
509
- if (!e._store || e._store.validated || e.key != null)
510
- return;
511
- e._store.validated = !0;
512
- var t = or(r);
513
- if (_e[t])
514
- return;
515
- _e[t] = !0;
516
- var n = "";
517
- e && e._owner && e._owner !== z.current && (n = " It was passed a child from " + O(e._owner.type) + "."), D(e), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), D(null);
518
- }
519
- }
520
- function we(e, r) {
521
- {
522
- if (typeof e != "object")
523
- return;
524
- if (q(e))
525
- for (var t = 0; t < e.length; t++) {
526
- var n = e[t];
527
- H(n) && me(n, r);
528
- }
529
- else if (H(e))
530
- e._store && (e._store.validated = !0);
531
- else if (e) {
532
- var u = De(e);
533
- if (typeof u == "function" && u !== e.entries)
534
- for (var s = u.call(e), o; !(o = s.next()).done; )
535
- H(o.value) && me(o.value, r);
536
- }
537
- }
538
- }
539
- function ir(e) {
540
- {
541
- var r = e.type;
542
- if (r == null || typeof r == "string")
543
- return;
544
- var t;
545
- if (typeof r == "function")
546
- t = r.propTypes;
547
- else if (typeof r == "object" && (r.$$typeof === i || // Note: Memo only checks outer props here.
548
- // Inner props are checked in the reconciler.
549
- r.$$typeof === w))
550
- t = r.propTypes;
551
- else
552
- return;
553
- if (t) {
554
- var n = O(r);
555
- Je(t, e.props, "prop", n, e);
556
- } else if (r.PropTypes !== void 0 && !X) {
557
- X = !0;
558
- var u = O(r);
559
- d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
560
- }
561
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
562
- }
563
- }
564
- function ur(e) {
565
- {
566
- for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
567
- var n = r[t];
568
- if (n !== "children" && n !== "key") {
569
- D(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), D(null);
570
- break;
571
- }
572
- }
573
- e.ref !== null && (D(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
574
- }
575
- }
576
- var Te = {};
577
- function Oe(e, r, t, n, u, s) {
578
- {
579
- var o = Le(e);
580
- if (!o) {
581
- var a = "";
582
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
583
- var p = ar();
584
- p ? a += p : a += Ee();
585
- var f;
586
- e === null ? f = "null" : q(e) ? f = "array" : e !== void 0 && e.$$typeof === h ? (f = "<" + (O(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : f = typeof e, d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", f, a);
587
- }
588
- var l = nr(e, r, t, u, s);
589
- if (l == null)
590
- return l;
591
- if (o) {
592
- var _ = r.children;
593
- if (_ !== void 0)
594
- if (n)
595
- if (q(_)) {
596
- for (var F = 0; F < _.length; F++)
597
- we(_[F], e);
598
- Object.freeze && Object.freeze(_);
599
- } else
600
- d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
601
- else
602
- we(_, e);
603
- }
604
- if (I.call(r, "key")) {
605
- var x = O(e), R = Object.keys(r).filter(function(vr) {
606
- return vr !== "key";
607
- }), Z = R.length > 0 ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}";
608
- if (!Te[x + Z]) {
609
- var dr = R.length > 0 ? "{" + R.join(": ..., ") + ": ...}" : "{}";
610
- d(`A props object containing a "key" prop is being spread into JSX:
355
+ o = "", (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), e === null ? n = "null" : z(e) ? n = "array" : e !== void 0 && e.$$typeof === P ? (n = "<" + (a(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : n = typeof e, console.error(
356
+ "React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
357
+ n,
358
+ o
359
+ );
360
+ if (ee.call(r, "key")) {
361
+ o = a(e);
362
+ var w = Object.keys(r).filter(function(f) {
363
+ return f !== "key";
364
+ });
365
+ n = 0 < w.length ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}", fe[o + n] || (w = 0 < w.length ? "{" + w.join(": ..., ") + ": ...}" : "{}", console.error(
366
+ `A props object containing a "key" prop is being spread into JSX:
611
367
  let props = %s;
612
368
  <%s {...props} />
613
369
  React keys must be passed directly to JSX without using spread:
614
370
  let props = %s;
615
- <%s key={someKey} {...props} />`, Z, x, dr, x), Te[x + Z] = !0;
371
+ <%s key={someKey} {...props} />`,
372
+ n,
373
+ o,
374
+ w,
375
+ o
376
+ ), fe[o + n] = !0);
377
+ }
378
+ if (o = null, t !== void 0 && (d(t), o = "" + t), S(r) && (d(r.key), o = "" + r.key), "key" in r) {
379
+ t = {};
380
+ for (var T in r)
381
+ T !== "key" && (t[T] = r[T]);
382
+ } else t = r;
383
+ return o && ge(
384
+ t,
385
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
386
+ ), xe(e, o, u, c, s(), t);
387
+ }
388
+ function B(e, r) {
389
+ if (typeof e == "object" && e && e.$$typeof !== je) {
390
+ if (z(e))
391
+ for (var t = 0; t < e.length; t++) {
392
+ var n = e[t];
393
+ N(n) && F(n, r);
616
394
  }
617
- }
618
- return e === y ? ur(l) : ir(l), l;
395
+ else if (N(e))
396
+ e._store && (e._store.validated = 1);
397
+ else if (e === null || typeof e != "object" ? t = null : (t = D && e[D] || e["@@iterator"], t = typeof t == "function" ? t : null), typeof t == "function" && t !== e.entries && (t = t.call(e), t !== e))
398
+ for (; !(e = t.next()).done; )
399
+ N(e.value) && F(e.value, r);
619
400
  }
620
401
  }
621
- function sr(e, r, t) {
622
- return Oe(e, r, t, !0);
623
- }
624
- function fr(e, r, t) {
625
- return Oe(e, r, t, !1);
402
+ function N(e) {
403
+ return typeof e == "object" && e !== null && e.$$typeof === P;
404
+ }
405
+ function F(e, r) {
406
+ if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, r = Re(r), !de[r])) {
407
+ de[r] = !0;
408
+ var t = "";
409
+ e && e._owner != null && e._owner !== s() && (t = null, typeof e._owner.tag == "number" ? t = a(e._owner.type) : typeof e._owner.name == "string" && (t = e._owner.name), t = " It was passed a child from " + t + ".");
410
+ var n = _.getCurrentStack;
411
+ _.getCurrentStack = function() {
412
+ var c = g(e.type);
413
+ return n && (c += n() || ""), c;
414
+ }, console.error(
415
+ 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
416
+ r,
417
+ t
418
+ ), _.getCurrentStack = n;
419
+ }
626
420
  }
627
- var lr = fr, cr = sr;
628
- Y.Fragment = y, Y.jsx = lr, Y.jsxs = cr;
629
- }()), Y;
421
+ function Re(e) {
422
+ var r = "", t = s();
423
+ return t && (t = a(t.type)) && (r = `
424
+
425
+ Check the render method of \`` + t + "`."), r || (e = a(e)) && (r = `
426
+
427
+ Check the top-level render call using <` + e + ">."), r;
428
+ }
429
+ var ye = Ce, P = Symbol.for("react.transitional.element"), _e = Symbol.for("react.portal"), Y = Symbol.for("react.fragment"), K = Symbol.for("react.strict_mode"), Z = Symbol.for("react.profiler"), I = Symbol.for("react.consumer"), Q = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), U = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), pe = Symbol.for("react.offscreen"), D = Symbol.iterator, he = Symbol.for("react.client.reference"), _ = ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ee = Object.prototype.hasOwnProperty, p = Object.assign, Te = Symbol.for("react.client.reference"), z = Array.isArray, j = 0, re, te, oe, ne, ae, ue, ie;
430
+ E.__reactDisabledLog = !0;
431
+ var q, se, G = !1, J = new (typeof WeakMap == "function" ? WeakMap : Map)(), je = Symbol.for("react.client.reference"), le, ce = {}, fe = {}, de = {};
432
+ O.Fragment = Y, O.jsx = function(e, r, t, n, c) {
433
+ return X(e, r, t, !1, n, c);
434
+ }, O.jsxs = function(e, r, t, n, c) {
435
+ return X(e, r, t, !0, n, c);
436
+ };
437
+ }()), O;
630
438
  }
631
- process.env.NODE_ENV === "production" ? Q.exports = yr() : Q.exports = Rr();
632
- var P = Q.exports;
633
- const Se = pr(null), Er = (c) => /* @__PURE__ */ P.jsx(Se.Provider, { value: c.router, children: c.children });
634
- function xe() {
635
- const c = hr(Se);
636
- if (!c)
439
+ process.env.NODE_ENV === "production" ? H.exports = Ae() : H.exports = Se();
440
+ var R = H.exports;
441
+ const be = ke(null), Me = (a) => /* @__PURE__ */ R.jsx(be.Provider, { value: a.router, children: a.children });
442
+ function me() {
443
+ const a = Oe(be);
444
+ if (!a)
637
445
  throw new Error(
638
- "[useRouter] Router not found. Insert RouterProvider in app root"
446
+ "[useRouter] Router not found. Add RouterProvider in app root"
639
447
  );
640
- return c;
448
+ return a;
449
+ }
450
+ function Ne() {
451
+ return L(me());
641
452
  }
642
- function _r(c) {
643
- const { to: h, params: b, onClick: y, ...g } = c, m = xe().mappedRoutes.find(({ route: i }) => i === h), { onOpen: E } = ee(h);
453
+ function $e(a) {
454
+ const { to: v, params: d, onClick: E, ref: i, ...l } = a, { mappedRoutes: b } = me(), m = b.find(({ route: s }) => s === v), { onOpen: g } = L(v);
644
455
  if (!m) {
645
- const { internal: i } = h;
456
+ const { internal: s } = v;
646
457
  throw new Error(
647
- `[Link] Route with path "${i.path}" not found. Maybe it is not passed into createRouter?`
458
+ `[Link] Route with path "${s.path}" not found. Maybe it is not passed into createRouter?`
648
459
  );
649
460
  }
650
- return /* @__PURE__ */ P.jsx(
461
+ return /* @__PURE__ */ R.jsx(
651
462
  "a",
652
463
  {
653
- ...g,
654
- href: m.toPath(b ?? void 0),
655
- onClick: (i) => {
656
- y == null || y(i), !i.defaultPrevented && (g.target && g.target !== "_self" || i.metaKey || i.altKey || i.ctrlKey || i.shiftKey || (i.preventDefault(), E({ params: b || {} })));
464
+ ...l,
465
+ ref: i,
466
+ href: m.toPath(d ?? void 0),
467
+ onClick: (s) => {
468
+ E == null || E(s), !s.defaultPrevented && (l.target && l.target !== "_self" || s.metaKey || s.altKey || s.ctrlKey || s.shiftKey || (s.preventDefault(), g({ params: d || {} })));
657
469
  }
658
470
  }
659
471
  );
660
472
  }
661
- const mr = (c) => ({
662
- ...c,
473
+ const We = (a) => ({
474
+ ...a,
663
475
  view: () => {
664
- const { view: h, layout: b, route: y } = c, { isOpened: g } = ee(y);
665
- return g ? b ? /* @__PURE__ */ P.jsx(b, { children: /* @__PURE__ */ P.jsx(h, {}) }) : /* @__PURE__ */ P.jsx(h, {}) : null;
476
+ const { view: v, layout: d, route: E } = a, { isOpened: i } = L(E);
477
+ return i ? d ? /* @__PURE__ */ R.jsx(d, { children: /* @__PURE__ */ R.jsx(v, {}) }) : /* @__PURE__ */ R.jsx(v, {}) : null;
666
478
  }
667
- }), wr = (c) => {
668
- const { routes: h, otherwise: b } = c;
479
+ }), Ue = (a) => {
480
+ const { routes: v, otherwise: d } = a;
669
481
  return () => {
670
- const y = xe(), g = ee(y.$activeRoutes), j = g.reduce((T, v) => T.filter(
671
- (w) => w !== v.internal.parent
672
- ), g), m = h.find(
673
- (T) => T.route === j.at(-1)
482
+ const { activeRoutes: E } = Ne(), i = E.reduce((g, s) => g.filter(
483
+ (S) => S !== s.internal.parent
484
+ ), E), l = v.find(
485
+ (g) => g.route === i.at(-1)
674
486
  );
675
- if (!m)
676
- return b ? /* @__PURE__ */ P.jsx(b, {}) : null;
677
- const { view: E, layout: i } = m;
678
- return i ? /* @__PURE__ */ P.jsx(i, { children: /* @__PURE__ */ P.jsx(E, {}) }) : /* @__PURE__ */ P.jsx(E, {});
487
+ if (!l)
488
+ return d ? /* @__PURE__ */ R.jsx(d, {}) : null;
489
+ const { view: b, layout: m } = l;
490
+ return m ? /* @__PURE__ */ R.jsx(m, { children: /* @__PURE__ */ R.jsx(b, {}) }) : /* @__PURE__ */ R.jsx(b, {});
679
491
  };
680
492
  };
681
493
  export {
682
- _r as Link,
683
- Er as RouterProvider,
684
- mr as createRouteView,
685
- wr as createRoutesView,
686
- xe as useRouter
494
+ $e as Link,
495
+ Me as RouterProvider,
496
+ We as createRouteView,
497
+ Ue as createRoutesView,
498
+ Ne as useRouter
687
499
  };