@shiftengineering/folio 0.0.79 → 0.0.81

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.
@@ -1,6 +1,6 @@
1
- import * as vr from "react";
2
- import bt, { createContext as Er, useState as Ee, useEffect as Pr, useContext as Rr } from "react";
3
- var Pe = { exports: {} }, Y = {};
1
+ import * as Et from "react";
2
+ import br, { createContext as Rt, useState as Ee, useEffect as Pt, useContext as Ot } from "react";
3
+ var Re = { exports: {} }, Y = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.min.js
@@ -10,19 +10,19 @@ var Pe = { exports: {} }, Y = {};
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 et;
14
- function Tr() {
15
- if (et) return Y;
16
- et = 1;
17
- var e = bt, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
13
+ var er;
14
+ function Tt() {
15
+ if (er) return Y;
16
+ er = 1;
17
+ var e = br, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
18
18
  function u(l, a, f) {
19
19
  var m, p = {}, h = null, b = null;
20
20
  f !== void 0 && (h = "" + f), a.key !== void 0 && (h = "" + a.key), a.ref !== void 0 && (b = a.ref);
21
21
  for (m in a) n.call(a, m) && !s.hasOwnProperty(m) && (p[m] = a[m]);
22
22
  if (l && l.defaultProps) for (m in a = l.defaultProps, a) p[m] === void 0 && (p[m] = a[m]);
23
- return { $$typeof: t, type: l, key: h, ref: b, props: p, _owner: i.current };
23
+ return { $$typeof: r, type: l, key: h, ref: b, props: p, _owner: i.current };
24
24
  }
25
- return Y.Fragment = r, Y.jsx = u, Y.jsxs = u, Y;
25
+ return Y.Fragment = t, Y.jsx = u, Y.jsxs = u, Y;
26
26
  }
27
27
  var H = {};
28
28
  /**
@@ -34,14 +34,14 @@ var H = {};
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
36
  */
37
- var tt;
38
- function Or() {
39
- return tt || (tt = 1, process.env.NODE_ENV !== "production" && function() {
40
- var e = bt, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), x = Symbol.iterator, P = "@@iterator";
37
+ var rr;
38
+ function St() {
39
+ return rr || (rr = 1, process.env.NODE_ENV !== "production" && function() {
40
+ var e = br, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), x = Symbol.iterator, R = "@@iterator";
41
41
  function L(o) {
42
42
  if (o === null || typeof o != "object")
43
43
  return null;
44
- var c = x && o[x] || o[P];
44
+ var c = x && o[x] || o[R];
45
45
  return typeof c == "function" ? c : null;
46
46
  }
47
47
  var j = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -49,29 +49,29 @@ function Or() {
49
49
  {
50
50
  for (var c = arguments.length, d = new Array(c > 1 ? c - 1 : 0), y = 1; y < c; y++)
51
51
  d[y - 1] = arguments[y];
52
- Lt("error", o, d);
52
+ Vr("error", o, d);
53
53
  }
54
54
  }
55
- function Lt(o, c, d) {
55
+ function Vr(o, c, d) {
56
56
  {
57
57
  var y = j.ReactDebugCurrentFrame, E = y.getStackAddendum();
58
58
  E !== "" && (c += "%s", d = d.concat([E]));
59
- var R = d.map(function(v) {
59
+ var P = d.map(function(v) {
60
60
  return String(v);
61
61
  });
62
- R.unshift("Warning: " + c), Function.prototype.apply.call(console[o], console, R);
62
+ P.unshift("Warning: " + c), Function.prototype.apply.call(console[o], console, P);
63
63
  }
64
64
  }
65
- var Vt = !1, qt = !1, zt = !1, Mt = !1, Wt = !1, ke;
65
+ var qr = !1, zr = !1, Mr = !1, Wr = !1, Br = !1, ke;
66
66
  ke = Symbol.for("react.module.reference");
67
- function Bt(o) {
68
- return !!(typeof o == "string" || typeof o == "function" || o === n || o === s || Wt || o === i || o === f || o === m || Mt || o === b || Vt || qt || zt || typeof o == "object" && o !== null && (o.$$typeof === h || o.$$typeof === p || o.$$typeof === u || o.$$typeof === l || o.$$typeof === a || // This needs to include all possible module reference object
67
+ function Kr(o) {
68
+ return !!(typeof o == "string" || typeof o == "function" || o === n || o === s || Br || o === i || o === f || o === m || Wr || o === b || qr || zr || Mr || typeof o == "object" && o !== null && (o.$$typeof === h || o.$$typeof === p || o.$$typeof === u || o.$$typeof === l || o.$$typeof === a || // This needs to include all possible module reference object
69
69
  // types supported by any Flight configuration anywhere since
70
70
  // we don't know which Flight build this will end up being used
71
71
  // with.
72
72
  o.$$typeof === ke || o.getModuleId !== void 0));
73
73
  }
74
- function Kt(o, c, d) {
74
+ function Yr(o, c, d) {
75
75
  var y = o.displayName;
76
76
  if (y)
77
77
  return y;
@@ -81,7 +81,7 @@ function Or() {
81
81
  function Ce(o) {
82
82
  return o.displayName || "Context";
83
83
  }
84
- function I(o) {
84
+ function A(o) {
85
85
  if (o == null)
86
86
  return null;
87
87
  if (typeof o.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
@@ -91,7 +91,7 @@ function Or() {
91
91
  switch (o) {
92
92
  case n:
93
93
  return "Fragment";
94
- case r:
94
+ case t:
95
95
  return "Portal";
96
96
  case s:
97
97
  return "Profiler";
@@ -111,14 +111,14 @@ function Or() {
111
111
  var d = o;
112
112
  return Ce(d._context) + ".Provider";
113
113
  case a:
114
- return Kt(o, o.render, "ForwardRef");
114
+ return Yr(o, o.render, "ForwardRef");
115
115
  case p:
116
116
  var y = o.displayName || null;
117
- return y !== null ? y : I(o.type) || "Memo";
117
+ return y !== null ? y : A(o.type) || "Memo";
118
118
  case h: {
119
- var E = o, R = E._payload, v = E._init;
119
+ var E = o, P = E._payload, v = E._init;
120
120
  try {
121
- return I(v(R));
121
+ return A(v(P));
122
122
  } catch {
123
123
  return null;
124
124
  }
@@ -126,14 +126,14 @@ function Or() {
126
126
  }
127
127
  return null;
128
128
  }
129
- var $ = Object.assign, B = 0, je, Ae, Ie, Fe, De, $e, Ne;
129
+ var N = Object.assign, B = 0, je, Ie, Ae, Fe, De, Ne, $e;
130
130
  function Ue() {
131
131
  }
132
132
  Ue.__reactDisabledLog = !0;
133
- function Yt() {
133
+ function Hr() {
134
134
  {
135
135
  if (B === 0) {
136
- je = console.log, Ae = console.info, Ie = console.warn, Fe = console.error, De = console.group, $e = console.groupCollapsed, Ne = console.groupEnd;
136
+ je = console.log, Ie = console.info, Ae = console.warn, Fe = console.error, De = console.group, Ne = console.groupCollapsed, $e = console.groupEnd;
137
137
  var o = {
138
138
  configurable: !0,
139
139
  enumerable: !0,
@@ -153,7 +153,7 @@ function Or() {
153
153
  B++;
154
154
  }
155
155
  }
156
- function Ht() {
156
+ function Gr() {
157
157
  {
158
158
  if (B--, B === 0) {
159
159
  var o = {
@@ -162,26 +162,26 @@ function Or() {
162
162
  writable: !0
163
163
  };
164
164
  Object.defineProperties(console, {
165
- log: $({}, o, {
165
+ log: N({}, o, {
166
166
  value: je
167
167
  }),
168
- info: $({}, o, {
169
- value: Ae
170
- }),
171
- warn: $({}, o, {
168
+ info: N({}, o, {
172
169
  value: Ie
173
170
  }),
174
- error: $({}, o, {
171
+ warn: N({}, o, {
172
+ value: Ae
173
+ }),
174
+ error: N({}, o, {
175
175
  value: Fe
176
176
  }),
177
- group: $({}, o, {
177
+ group: N({}, o, {
178
178
  value: De
179
179
  }),
180
- groupCollapsed: $({}, o, {
181
- value: $e
182
- }),
183
- groupEnd: $({}, o, {
180
+ groupCollapsed: N({}, o, {
184
181
  value: Ne
182
+ }),
183
+ groupEnd: N({}, o, {
184
+ value: $e
185
185
  })
186
186
  });
187
187
  }
@@ -202,16 +202,16 @@ function Or() {
202
202
  ` + ce + o;
203
203
  }
204
204
  }
205
- var le = !1, te;
205
+ var le = !1, re;
206
206
  {
207
- var Gt = typeof WeakMap == "function" ? WeakMap : Map;
208
- te = new Gt();
207
+ var Xr = typeof WeakMap == "function" ? WeakMap : Map;
208
+ re = new Xr();
209
209
  }
210
210
  function Le(o, c) {
211
211
  if (!o || le)
212
212
  return "";
213
213
  {
214
- var d = te.get(o);
214
+ var d = re.get(o);
215
215
  if (d !== void 0)
216
216
  return d;
217
217
  }
@@ -219,8 +219,8 @@ function Or() {
219
219
  le = !0;
220
220
  var E = Error.prepareStackTrace;
221
221
  Error.prepareStackTrace = void 0;
222
- var R;
223
- R = ue.current, ue.current = null, Yt();
222
+ var P;
223
+ P = ue.current, ue.current = null, Hr();
224
224
  try {
225
225
  if (c) {
226
226
  var v = function() {
@@ -257,39 +257,39 @@ function Or() {
257
257
  if (k && y && typeof k.stack == "string") {
258
258
  for (var g = k.stack.split(`
259
259
  `), _ = y.stack.split(`
260
- `), T = g.length - 1, O = _.length - 1; T >= 1 && O >= 0 && g[T] !== _[O]; )
261
- O--;
262
- for (; T >= 1 && O >= 0; T--, O--)
263
- if (g[T] !== _[O]) {
264
- if (T !== 1 || O !== 1)
260
+ `), O = g.length - 1, T = _.length - 1; O >= 1 && T >= 0 && g[O] !== _[T]; )
261
+ T--;
262
+ for (; O >= 1 && T >= 0; O--, T--)
263
+ if (g[O] !== _[T]) {
264
+ if (O !== 1 || T !== 1)
265
265
  do
266
- if (T--, O--, O < 0 || g[T] !== _[O]) {
266
+ if (O--, T--, T < 0 || g[O] !== _[T]) {
267
267
  var C = `
268
- ` + g[T].replace(" at new ", " at ");
269
- return o.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", o.displayName)), typeof o == "function" && te.set(o, C), C;
268
+ ` + g[O].replace(" at new ", " at ");
269
+ return o.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", o.displayName)), typeof o == "function" && re.set(o, C), C;
270
270
  }
271
- while (T >= 1 && O >= 0);
271
+ while (O >= 1 && T >= 0);
272
272
  break;
273
273
  }
274
274
  }
275
275
  } finally {
276
- le = !1, ue.current = R, Ht(), Error.prepareStackTrace = E;
276
+ le = !1, ue.current = P, Gr(), Error.prepareStackTrace = E;
277
277
  }
278
- var q = o ? o.displayName || o.name : "", N = q ? ee(q) : "";
279
- return typeof o == "function" && te.set(o, N), N;
278
+ var q = o ? o.displayName || o.name : "", $ = q ? ee(q) : "";
279
+ return typeof o == "function" && re.set(o, $), $;
280
280
  }
281
- function Xt(o, c, d) {
281
+ function Jr(o, c, d) {
282
282
  return Le(o, !1);
283
283
  }
284
- function Jt(o) {
284
+ function Zr(o) {
285
285
  var c = o.prototype;
286
286
  return !!(c && c.isReactComponent);
287
287
  }
288
- function re(o, c, d) {
288
+ function te(o, c, d) {
289
289
  if (o == null)
290
290
  return "";
291
291
  if (typeof o == "function")
292
- return Le(o, Jt(o));
292
+ return Le(o, Zr(o));
293
293
  if (typeof o == "string")
294
294
  return ee(o);
295
295
  switch (o) {
@@ -301,13 +301,13 @@ function Or() {
301
301
  if (typeof o == "object")
302
302
  switch (o.$$typeof) {
303
303
  case a:
304
- return Xt(o.render);
304
+ return Jr(o.render);
305
305
  case p:
306
- return re(o.type, c, d);
306
+ return te(o.type, c, d);
307
307
  case h: {
308
- var y = o, E = y._payload, R = y._init;
308
+ var y = o, E = y._payload, P = y._init;
309
309
  try {
310
- return re(R(E), c, d);
310
+ return te(P(E), c, d);
311
311
  } catch {
312
312
  }
313
313
  }
@@ -317,16 +317,16 @@ function Or() {
317
317
  var K = Object.prototype.hasOwnProperty, Ve = {}, qe = j.ReactDebugCurrentFrame;
318
318
  function ne(o) {
319
319
  if (o) {
320
- var c = o._owner, d = re(o.type, o._source, c ? c.type : null);
320
+ var c = o._owner, d = te(o.type, o._source, c ? c.type : null);
321
321
  qe.setExtraStackFrame(d);
322
322
  } else
323
323
  qe.setExtraStackFrame(null);
324
324
  }
325
- function Zt(o, c, d, y, E) {
325
+ function Qr(o, c, d, y, E) {
326
326
  {
327
- var R = Function.call.bind(K);
327
+ var P = Function.call.bind(K);
328
328
  for (var v in o)
329
- if (R(o, v)) {
329
+ if (P(o, v)) {
330
330
  var g = void 0;
331
331
  try {
332
332
  if (typeof o[v] != "function") {
@@ -334,24 +334,24 @@ function Or() {
334
334
  throw _.name = "Invariant Violation", _;
335
335
  }
336
336
  g = o[v](c, v, y, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
337
- } catch (T) {
338
- g = T;
337
+ } catch (O) {
338
+ g = O;
339
339
  }
340
340
  g && !(g instanceof Error) && (ne(E), S("%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).", y || "React class", d, v, typeof g), ne(null)), g instanceof Error && !(g.message in Ve) && (Ve[g.message] = !0, ne(E), S("Failed %s type: %s", d, g.message), ne(null));
341
341
  }
342
342
  }
343
343
  }
344
- var Qt = Array.isArray;
344
+ var et = Array.isArray;
345
345
  function fe(o) {
346
- return Qt(o);
346
+ return et(o);
347
347
  }
348
- function er(o) {
348
+ function rt(o) {
349
349
  {
350
350
  var c = typeof Symbol == "function" && Symbol.toStringTag, d = c && o[Symbol.toStringTag] || o.constructor.name || "Object";
351
351
  return d;
352
352
  }
353
353
  }
354
- function tr(o) {
354
+ function tt(o) {
355
355
  try {
356
356
  return ze(o), !1;
357
357
  } catch {
@@ -362,16 +362,16 @@ function Or() {
362
362
  return "" + o;
363
363
  }
364
364
  function Me(o) {
365
- if (tr(o))
366
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(o)), ze(o);
365
+ if (tt(o))
366
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rt(o)), ze(o);
367
367
  }
368
- var We = j.ReactCurrentOwner, rr = {
368
+ var We = j.ReactCurrentOwner, nt = {
369
369
  key: !0,
370
370
  ref: !0,
371
371
  __self: !0,
372
372
  __source: !0
373
373
  }, Be, Ke;
374
- function nr(o) {
374
+ function ot(o) {
375
375
  if (K.call(o, "ref")) {
376
376
  var c = Object.getOwnPropertyDescriptor(o, "ref").get;
377
377
  if (c && c.isReactWarning)
@@ -379,7 +379,7 @@ function Or() {
379
379
  }
380
380
  return o.ref !== void 0;
381
381
  }
382
- function or(o) {
382
+ function it(o) {
383
383
  if (K.call(o, "key")) {
384
384
  var c = Object.getOwnPropertyDescriptor(o, "key").get;
385
385
  if (c && c.isReactWarning)
@@ -387,10 +387,10 @@ function Or() {
387
387
  }
388
388
  return o.key !== void 0;
389
389
  }
390
- function ir(o, c) {
390
+ function st(o, c) {
391
391
  typeof o.ref == "string" && We.current;
392
392
  }
393
- function sr(o, c) {
393
+ function at(o, c) {
394
394
  {
395
395
  var d = function() {
396
396
  Be || (Be = !0, S("%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)", c));
@@ -401,7 +401,7 @@ function Or() {
401
401
  });
402
402
  }
403
403
  }
404
- function ar(o, c) {
404
+ function ut(o, c) {
405
405
  {
406
406
  var d = function() {
407
407
  Ke || (Ke = !0, S("%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)", c));
@@ -412,17 +412,17 @@ function Or() {
412
412
  });
413
413
  }
414
414
  }
415
- var ur = function(o, c, d, y, E, R, v) {
415
+ var ct = function(o, c, d, y, E, P, v) {
416
416
  var g = {
417
417
  // This tag allows us to uniquely identify this as a React Element
418
- $$typeof: t,
418
+ $$typeof: r,
419
419
  // Built-in properties that belong on the element
420
420
  type: o,
421
421
  key: c,
422
422
  ref: d,
423
423
  props: v,
424
424
  // Record the component responsible for creating this element.
425
- _owner: R
425
+ _owner: P
426
426
  };
427
427
  return g._store = {}, Object.defineProperty(g._store, "validated", {
428
428
  configurable: !1,
@@ -441,28 +441,28 @@ function Or() {
441
441
  value: E
442
442
  }), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
443
443
  };
444
- function cr(o, c, d, y, E) {
444
+ function lt(o, c, d, y, E) {
445
445
  {
446
- var R, v = {}, g = null, _ = null;
447
- d !== void 0 && (Me(d), g = "" + d), or(c) && (Me(c.key), g = "" + c.key), nr(c) && (_ = c.ref, ir(c, E));
448
- for (R in c)
449
- K.call(c, R) && !rr.hasOwnProperty(R) && (v[R] = c[R]);
446
+ var P, v = {}, g = null, _ = null;
447
+ d !== void 0 && (Me(d), g = "" + d), it(c) && (Me(c.key), g = "" + c.key), ot(c) && (_ = c.ref, st(c, E));
448
+ for (P in c)
449
+ K.call(c, P) && !nt.hasOwnProperty(P) && (v[P] = c[P]);
450
450
  if (o && o.defaultProps) {
451
- var T = o.defaultProps;
452
- for (R in T)
453
- v[R] === void 0 && (v[R] = T[R]);
451
+ var O = o.defaultProps;
452
+ for (P in O)
453
+ v[P] === void 0 && (v[P] = O[P]);
454
454
  }
455
455
  if (g || _) {
456
- var O = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
457
- g && sr(v, O), _ && ar(v, O);
456
+ var T = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
457
+ g && at(v, T), _ && ut(v, T);
458
458
  }
459
- return ur(o, g, _, E, y, We.current, v);
459
+ return ct(o, g, _, E, y, We.current, v);
460
460
  }
461
461
  }
462
462
  var de = j.ReactCurrentOwner, Ye = j.ReactDebugCurrentFrame;
463
463
  function V(o) {
464
464
  if (o) {
465
- var c = o._owner, d = re(o.type, o._source, c ? c.type : null);
465
+ var c = o._owner, d = te(o.type, o._source, c ? c.type : null);
466
466
  Ye.setExtraStackFrame(d);
467
467
  } else
468
468
  Ye.setExtraStackFrame(null);
@@ -470,12 +470,12 @@ function Or() {
470
470
  var me;
471
471
  me = !1;
472
472
  function pe(o) {
473
- return typeof o == "object" && o !== null && o.$$typeof === t;
473
+ return typeof o == "object" && o !== null && o.$$typeof === r;
474
474
  }
475
475
  function He() {
476
476
  {
477
477
  if (de.current) {
478
- var o = I(de.current.type);
478
+ var o = A(de.current.type);
479
479
  if (o)
480
480
  return `
481
481
 
@@ -484,11 +484,11 @@ Check the render method of \`` + o + "`.";
484
484
  return "";
485
485
  }
486
486
  }
487
- function lr(o) {
487
+ function ft(o) {
488
488
  return "";
489
489
  }
490
490
  var Ge = {};
491
- function fr(o) {
491
+ function dt(o) {
492
492
  {
493
493
  var c = He();
494
494
  if (!c) {
@@ -505,12 +505,12 @@ Check the top-level render call using <` + d + ">.");
505
505
  if (!o._store || o._store.validated || o.key != null)
506
506
  return;
507
507
  o._store.validated = !0;
508
- var d = fr(c);
508
+ var d = dt(c);
509
509
  if (Ge[d])
510
510
  return;
511
511
  Ge[d] = !0;
512
512
  var y = "";
513
- o && o._owner && o._owner !== de.current && (y = " It was passed a child from " + I(o._owner.type) + "."), V(o), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, y), V(null);
513
+ o && o._owner && o._owner !== de.current && (y = " It was passed a child from " + A(o._owner.type) + "."), V(o), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, y), V(null);
514
514
  }
515
515
  }
516
516
  function Je(o, c) {
@@ -527,12 +527,12 @@ Check the top-level render call using <` + d + ">.");
527
527
  else if (o) {
528
528
  var E = L(o);
529
529
  if (typeof E == "function" && E !== o.entries)
530
- for (var R = E.call(o), v; !(v = R.next()).done; )
530
+ for (var P = E.call(o), v; !(v = P.next()).done; )
531
531
  pe(v.value) && Xe(v.value, c);
532
532
  }
533
533
  }
534
534
  }
535
- function dr(o) {
535
+ function mt(o) {
536
536
  {
537
537
  var c = o.type;
538
538
  if (c == null || typeof c == "string")
@@ -547,17 +547,17 @@ Check the top-level render call using <` + d + ">.");
547
547
  else
548
548
  return;
549
549
  if (d) {
550
- var y = I(c);
551
- Zt(d, o.props, "prop", y, o);
550
+ var y = A(c);
551
+ Qr(d, o.props, "prop", y, o);
552
552
  } else if (c.PropTypes !== void 0 && !me) {
553
553
  me = !0;
554
- var E = I(c);
554
+ var E = A(c);
555
555
  S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
556
556
  }
557
557
  typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
558
558
  }
559
559
  }
560
- function mr(o) {
560
+ function pt(o) {
561
561
  {
562
562
  for (var c = Object.keys(o.props), d = 0; d < c.length; d++) {
563
563
  var y = c[d];
@@ -570,20 +570,20 @@ Check the top-level render call using <` + d + ">.");
570
570
  }
571
571
  }
572
572
  var Ze = {};
573
- function Qe(o, c, d, y, E, R) {
573
+ function Qe(o, c, d, y, E, P) {
574
574
  {
575
- var v = Bt(o);
575
+ var v = Kr(o);
576
576
  if (!v) {
577
577
  var g = "";
578
578
  (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (g += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
579
- var _ = lr();
579
+ var _ = ft();
580
580
  _ ? g += _ : g += He();
581
- var T;
582
- o === null ? T = "null" : fe(o) ? T = "array" : o !== void 0 && o.$$typeof === t ? (T = "<" + (I(o.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : T = typeof o, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, g);
581
+ var O;
582
+ o === null ? O = "null" : fe(o) ? O = "array" : o !== void 0 && o.$$typeof === r ? (O = "<" + (A(o.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : O = typeof o, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, g);
583
583
  }
584
- var O = cr(o, c, d, E, R);
585
- if (O == null)
586
- return O;
584
+ var T = lt(o, c, d, E, P);
585
+ if (T == null)
586
+ return T;
587
587
  if (v) {
588
588
  var C = c.children;
589
589
  if (C !== void 0)
@@ -598,47 +598,47 @@ Check the top-level render call using <` + d + ">.");
598
598
  Je(C, o);
599
599
  }
600
600
  if (K.call(c, "key")) {
601
- var N = I(o), k = Object.keys(c).filter(function(wr) {
602
- return wr !== "key";
601
+ var $ = A(o), k = Object.keys(c).filter(function(vt) {
602
+ return vt !== "key";
603
603
  }), ye = k.length > 0 ? "{key: someKey, " + k.join(": ..., ") + ": ...}" : "{key: someKey}";
604
- if (!Ze[N + ye]) {
605
- var br = k.length > 0 ? "{" + k.join(": ..., ") + ": ...}" : "{}";
604
+ if (!Ze[$ + ye]) {
605
+ var wt = k.length > 0 ? "{" + k.join(": ..., ") + ": ...}" : "{}";
606
606
  S(`A props object containing a "key" prop is being spread into JSX:
607
607
  let props = %s;
608
608
  <%s {...props} />
609
609
  React keys must be passed directly to JSX without using spread:
610
610
  let props = %s;
611
- <%s key={someKey} {...props} />`, ye, N, br, N), Ze[N + ye] = !0;
611
+ <%s key={someKey} {...props} />`, ye, $, wt, $), Ze[$ + ye] = !0;
612
612
  }
613
613
  }
614
- return o === n ? mr(O) : dr(O), O;
614
+ return o === n ? pt(T) : mt(T), T;
615
615
  }
616
616
  }
617
- function pr(o, c, d) {
617
+ function yt(o, c, d) {
618
618
  return Qe(o, c, d, !0);
619
619
  }
620
- function yr(o, c, d) {
620
+ function ht(o, c, d) {
621
621
  return Qe(o, c, d, !1);
622
622
  }
623
- var hr = yr, gr = pr;
624
- H.Fragment = n, H.jsx = hr, H.jsxs = gr;
623
+ var gt = ht, bt = yt;
624
+ H.Fragment = n, H.jsx = gt, H.jsxs = bt;
625
625
  }()), H;
626
626
  }
627
- process.env.NODE_ENV === "production" ? Pe.exports = Tr() : Pe.exports = Or();
628
- var Re = Pe.exports, _e = /* @__PURE__ */ ((e) => (e.PDF = "application/pdf", e.TXT = "text/plain", e.CSV = "text/csv", e))(_e || {});
629
- const he = 4e3 * 1024 * 1024, Sr = [
627
+ process.env.NODE_ENV === "production" ? Re.exports = Tt() : Re.exports = St();
628
+ var Pe = Re.exports, wr = /* @__PURE__ */ ((e) => (e.NOT_CHUNKED = "NOT_CHUNKED", e.PROCESSING = "PROCESSING", e.CHUNKED = "CHUNKED", e.ERROR_CHUNKING = "ERROR_CHUNKING", e))(wr || {}), _e = /* @__PURE__ */ ((e) => (e.PDF = "application/pdf", e.TXT = "text/plain", e.CSV = "text/csv", e))(_e || {});
629
+ const he = 4e3 * 1024 * 1024, xt = [
630
630
  ".txt",
631
631
  ".json",
632
632
  ".py",
633
633
  ".ts",
634
634
  ".tsx"
635
- ], xr = {
635
+ ], _t = {
636
636
  "application/pdf": {
637
637
  extensions: [".pdf"],
638
638
  maxSize: he
639
639
  },
640
640
  "text/plain": {
641
- extensions: Sr,
641
+ extensions: xt,
642
642
  maxSize: he
643
643
  },
644
644
  "text/csv": {
@@ -646,17 +646,17 @@ const he = 4e3 * 1024 * 1024, Sr = [
646
646
  maxSize: he
647
647
  }
648
648
  };
649
- Object.entries(xr).reduce(
650
- (e, [t, r]) => ({
649
+ Object.entries(_t).reduce(
650
+ (e, [r, t]) => ({
651
651
  ...e,
652
- [t]: r.extensions
652
+ [r]: t.extensions
653
653
  }),
654
654
  {}
655
655
  );
656
656
  new Set(Object.values(_e));
657
657
  function W(e) {
658
- const t = {
659
- subscribe(r) {
658
+ const r = {
659
+ subscribe(t) {
660
660
  let n = null, i = !1, s = !1, u = !1;
661
661
  function l() {
662
662
  if (n === null) {
@@ -668,38 +668,38 @@ function W(e) {
668
668
  return n = e({
669
669
  next(a) {
670
670
  var f;
671
- i || (f = r.next) == null || f.call(r, a);
671
+ i || (f = t.next) == null || f.call(t, a);
672
672
  },
673
673
  error(a) {
674
674
  var f;
675
- i || (i = !0, (f = r.error) == null || f.call(r, a), l());
675
+ i || (i = !0, (f = t.error) == null || f.call(t, a), l());
676
676
  },
677
677
  complete() {
678
678
  var a;
679
- i || (i = !0, (a = r.complete) == null || a.call(r), l());
679
+ i || (i = !0, (a = t.complete) == null || a.call(t), l());
680
680
  }
681
681
  }), u && l(), {
682
682
  unsubscribe: l
683
683
  };
684
684
  },
685
- pipe(...r) {
686
- return r.reduce(_r, t);
685
+ pipe(...t) {
686
+ return t.reduce(kt, r);
687
687
  }
688
688
  };
689
- return t;
689
+ return r;
690
690
  }
691
- function _r(e, t) {
692
- return t(e);
691
+ function kt(e, r) {
692
+ return r(e);
693
693
  }
694
- function kr(e) {
695
- const t = new AbortController();
694
+ function Ct(e) {
695
+ const r = new AbortController();
696
696
  return new Promise((n, i) => {
697
697
  let s = !1;
698
698
  function u() {
699
699
  s || (s = !0, l.unsubscribe());
700
700
  }
701
- t.signal.addEventListener("abort", () => {
702
- i(t.signal.reason);
701
+ r.signal.addEventListener("abort", () => {
702
+ i(r.signal.reason);
703
703
  });
704
704
  const l = e.subscribe({
705
705
  next(a) {
@@ -709,17 +709,17 @@ function kr(e) {
709
709
  i(a);
710
710
  },
711
711
  complete() {
712
- t.abort(), u();
712
+ r.abort(), u();
713
713
  }
714
714
  });
715
715
  });
716
716
  }
717
- function Cr(e) {
718
- return (t) => {
719
- let r = 0, n = null;
717
+ function jt(e) {
718
+ return (r) => {
719
+ let t = 0, n = null;
720
720
  const i = [];
721
721
  function s() {
722
- n || (n = t.subscribe({
722
+ n || (n = r.subscribe({
723
723
  next(l) {
724
724
  var a;
725
725
  for (const f of i)
@@ -738,114 +738,114 @@ function Cr(e) {
738
738
  }));
739
739
  }
740
740
  function u() {
741
- if (r === 0 && n) {
741
+ if (t === 0 && n) {
742
742
  const l = n;
743
743
  n = null, l.unsubscribe();
744
744
  }
745
745
  }
746
- return W((l) => (r++, i.push(l), s(), {
746
+ return W((l) => (t++, i.push(l), s(), {
747
747
  unsubscribe() {
748
- r--, u();
748
+ t--, u();
749
749
  const a = i.findIndex((f) => f === l);
750
750
  a > -1 && i.splice(a, 1);
751
751
  }
752
752
  }));
753
753
  };
754
754
  }
755
- function jr(e) {
756
- return (t) => W((r) => t.subscribe({
755
+ function It(e) {
756
+ return (r) => W((t) => r.subscribe({
757
757
  next(n) {
758
758
  var i;
759
- (i = e.next) == null || i.call(e, n), r.next(n);
759
+ (i = e.next) == null || i.call(e, n), t.next(n);
760
760
  },
761
761
  error(n) {
762
762
  var i;
763
- (i = e.error) == null || i.call(e, n), r.error(n);
763
+ (i = e.error) == null || i.call(e, n), t.error(n);
764
764
  },
765
765
  complete() {
766
766
  var n;
767
- (n = e.complete) == null || n.call(e), r.complete();
767
+ (n = e.complete) == null || n.call(e), t.complete();
768
768
  }
769
769
  }));
770
770
  }
771
- function Ar(e) {
772
- let t = e;
773
- const r = [], n = (u) => {
774
- t !== void 0 && u.next(t), r.push(u);
771
+ function At(e) {
772
+ let r = e;
773
+ const t = [], n = (u) => {
774
+ r !== void 0 && u.next(r), t.push(u);
775
775
  }, i = (u) => {
776
- r.splice(r.indexOf(u), 1);
776
+ t.splice(t.indexOf(u), 1);
777
777
  }, s = W((u) => (n(u), () => {
778
778
  i(u);
779
779
  }));
780
780
  return s.next = (u) => {
781
- if (t !== u) {
782
- t = u;
783
- for (const l of r)
781
+ if (r !== u) {
782
+ r = u;
783
+ for (const l of t)
784
784
  l.next(u);
785
785
  }
786
- }, s.get = () => t, s;
786
+ }, s.get = () => r, s;
787
787
  }
788
- function Ir(e) {
789
- return W((t) => {
790
- function r(i = 0, s = e.op) {
788
+ function Ft(e) {
789
+ return W((r) => {
790
+ function t(i = 0, s = e.op) {
791
791
  const u = e.links[i];
792
792
  if (!u)
793
793
  throw new Error("No more links to execute - did you forget to add an ending link?");
794
794
  return u({
795
795
  op: s,
796
796
  next(a) {
797
- return r(i + 1, a);
797
+ return t(i + 1, a);
798
798
  }
799
799
  });
800
800
  }
801
- return r().subscribe(t);
801
+ return t().subscribe(r);
802
802
  });
803
803
  }
804
- const wt = () => {
805
- }, rt = (e) => {
804
+ const vr = () => {
805
+ }, tr = (e) => {
806
806
  Object.freeze && Object.freeze(e);
807
807
  };
808
- function vt(e, t, r) {
808
+ function Er(e, r, t) {
809
809
  var n, i;
810
- const s = t.join(".");
811
- return (n = r)[i = s] ?? (n[i] = new Proxy(wt, {
810
+ const s = r.join(".");
811
+ return (n = t)[i = s] ?? (n[i] = new Proxy(vr, {
812
812
  get(u, l) {
813
813
  if (!(typeof l != "string" || l === "then"))
814
- return vt(e, [
815
- ...t,
814
+ return Er(e, [
815
+ ...r,
816
816
  l
817
- ], r);
817
+ ], t);
818
818
  },
819
819
  apply(u, l, a) {
820
- const f = t[t.length - 1];
820
+ const f = r[r.length - 1];
821
821
  let m = {
822
822
  args: a,
823
- path: t
823
+ path: r
824
824
  };
825
825
  return f === "call" ? m = {
826
826
  args: a.length >= 2 ? [
827
827
  a[1]
828
828
  ] : [],
829
- path: t.slice(0, -1)
829
+ path: r.slice(0, -1)
830
830
  } : f === "apply" && (m = {
831
831
  args: a.length >= 2 ? a[1] : [],
832
- path: t.slice(0, -1)
833
- }), rt(m.args), rt(m.path), e(m);
832
+ path: r.slice(0, -1)
833
+ }), tr(m.args), tr(m.path), e(m);
834
834
  }
835
- })), r[s];
835
+ })), t[s];
836
836
  }
837
- const Fr = (e) => vt(e, [], /* @__PURE__ */ Object.create(null)), Dr = (e) => new Proxy(wt, {
838
- get(t, r) {
839
- if (r !== "then")
840
- return e(r);
837
+ const Dt = (e) => Er(e, [], /* @__PURE__ */ Object.create(null)), Nt = (e) => new Proxy(vr, {
838
+ get(r, t) {
839
+ if (t !== "then")
840
+ return e(t);
841
841
  }
842
842
  });
843
843
  function X(e) {
844
844
  return !!e && !Array.isArray(e) && typeof e == "object";
845
845
  }
846
- function $r(e, t) {
846
+ function $t(e, r) {
847
847
  if ("error" in e) {
848
- const n = t.deserialize(e.error);
848
+ const n = r.deserialize(e.error);
849
849
  return {
850
850
  ok: !1,
851
851
  error: {
@@ -860,7 +860,7 @@ function $r(e, t) {
860
860
  ...e.result,
861
861
  ...(!e.result.type || e.result.type === "data") && {
862
862
  type: "data",
863
- data: t.deserialize(e.result.data)
863
+ data: r.deserialize(e.result.data)
864
864
  }
865
865
  }
866
866
  };
@@ -870,64 +870,64 @@ class ge extends Error {
870
870
  super("Unable to transform response from server");
871
871
  }
872
872
  }
873
- function Nr(e, t) {
874
- let r;
873
+ function Ut(e, r) {
874
+ let t;
875
875
  try {
876
- r = $r(e, t);
876
+ t = $t(e, r);
877
877
  } catch {
878
878
  throw new ge();
879
879
  }
880
- if (!r.ok && (!X(r.error.error) || typeof r.error.error.code != "number"))
880
+ if (!t.ok && (!X(t.error.error) || typeof t.error.error.code != "number"))
881
881
  throw new ge();
882
- if (r.ok && !X(r.result))
882
+ if (t.ok && !X(t.result))
883
883
  throw new ge();
884
- return r;
884
+ return t;
885
885
  }
886
- var nt, ot;
887
- (nt = Symbol).dispose ?? (nt.dispose = Symbol());
888
- (ot = Symbol).asyncDispose ?? (ot.asyncDispose = Symbol());
889
- var dt, mt, pt, yt, ht, gt;
886
+ var nr, or;
887
+ (nr = Symbol).dispose ?? (nr.dispose = Symbol());
888
+ (or = Symbol).asyncDispose ?? (or.asyncDispose = Symbol());
889
+ var dr, mr, pr, yr, hr, gr;
890
890
  typeof window > "u" || "Deno" in window || // eslint-disable-next-line @typescript-eslint/dot-notation
891
- ((mt = (dt = globalThis.process) == null ? void 0 : dt.env) == null ? void 0 : mt.NODE_ENV) === "test" || (yt = (pt = globalThis.process) == null ? void 0 : pt.env) != null && yt.JEST_WORKER_ID || (gt = (ht = globalThis.process) == null ? void 0 : ht.env) != null && gt.VITEST_WORKER_ID;
892
- function oe(e, t, r) {
893
- return t in e ? Object.defineProperty(e, t, {
894
- value: r,
891
+ ((mr = (dr = globalThis.process) == null ? void 0 : dr.env) == null ? void 0 : mr.NODE_ENV) === "test" || (yr = (pr = globalThis.process) == null ? void 0 : pr.env) != null && yr.JEST_WORKER_ID || (gr = (hr = globalThis.process) == null ? void 0 : hr.env) != null && gr.VITEST_WORKER_ID;
892
+ function oe(e, r, t) {
893
+ return r in e ? Object.defineProperty(e, r, {
894
+ value: t,
895
895
  enumerable: !0,
896
896
  configurable: !0,
897
897
  writable: !0
898
- }) : e[t] = r, e;
898
+ }) : e[r] = t, e;
899
899
  }
900
- function Ur(e) {
900
+ function Lt(e) {
901
901
  return e instanceof F || /**
902
902
  * @deprecated
903
903
  * Delete in next major
904
904
  */
905
905
  e instanceof Error && e.name === "TRPCClientError";
906
906
  }
907
- function Lr(e) {
907
+ function Vt(e) {
908
908
  return X(e) && X(e.error) && typeof e.error.code == "number" && typeof e.error.message == "string";
909
909
  }
910
- function Vr(e, t) {
911
- return typeof e == "string" ? e : X(e) && typeof e.message == "string" ? e.message : t;
910
+ function qt(e, r) {
911
+ return typeof e == "string" ? e : X(e) && typeof e.message == "string" ? e.message : r;
912
912
  }
913
913
  class F extends Error {
914
- static from(t, r = {}) {
915
- const n = t;
916
- return Ur(n) ? (r.meta && (n.meta = {
914
+ static from(r, t = {}) {
915
+ const n = r;
916
+ return Lt(n) ? (t.meta && (n.meta = {
917
917
  ...n.meta,
918
- ...r.meta
919
- }), n) : Lr(n) ? new F(n.error.message, {
920
- ...r,
918
+ ...t.meta
919
+ }), n) : Vt(n) ? new F(n.error.message, {
920
+ ...t,
921
921
  result: n
922
- }) : new F(Vr(n, "Unknown error"), {
923
- ...r,
922
+ }) : new F(qt(n, "Unknown error"), {
923
+ ...t,
924
924
  cause: n
925
925
  });
926
926
  }
927
- constructor(t, r) {
927
+ constructor(r, t) {
928
928
  var i, s;
929
- const n = r == null ? void 0 : r.cause;
930
- super(t, {
929
+ const n = t == null ? void 0 : t.cause;
930
+ super(r, {
931
931
  cause: n
932
932
  }), // eslint-disable-next-line @typescript-eslint/ban-ts-comment
933
933
  // @ts-ignore override doesn't work in all environments due to "This member cannot have an 'override' modifier because it is not declared in the base class 'Error'"
@@ -935,59 +935,59 @@ class F extends Error {
935
935
  * Additional meta data about the error
936
936
  * In the case of HTTP-errors, we'll have `response` and potentially `responseJSON` here
937
937
  */
938
- oe(this, "meta", void 0), this.meta = r == null ? void 0 : r.meta, this.cause = n, this.shape = (i = r == null ? void 0 : r.result) == null ? void 0 : i.error, this.data = (s = r == null ? void 0 : r.result) == null ? void 0 : s.error.data, this.name = "TRPCClientError", Object.setPrototypeOf(this, F.prototype);
938
+ oe(this, "meta", void 0), this.meta = t == null ? void 0 : t.meta, this.cause = n, this.shape = (i = t == null ? void 0 : t.result) == null ? void 0 : i.error, this.data = (s = t == null ? void 0 : t.result) == null ? void 0 : s.error.data, this.name = "TRPCClientError", Object.setPrototypeOf(this, F.prototype);
939
939
  }
940
940
  }
941
- function be(e, t, r) {
942
- return t in e ? Object.defineProperty(e, t, {
943
- value: r,
941
+ function be(e, r, t) {
942
+ return r in e ? Object.defineProperty(e, r, {
943
+ value: t,
944
944
  enumerable: !0,
945
945
  configurable: !0,
946
946
  writable: !0
947
- }) : e[t] = r, e;
947
+ }) : e[r] = t, e;
948
948
  }
949
- class qr {
950
- $request(t) {
951
- return Ir({
949
+ class zt {
950
+ $request(r) {
951
+ return Ft({
952
952
  links: this.links,
953
953
  op: {
954
- ...t,
955
- context: t.context ?? {},
954
+ ...r,
955
+ context: r.context ?? {},
956
956
  id: ++this.requestId
957
957
  }
958
- }).pipe(Cr());
958
+ }).pipe(jt());
959
959
  }
960
- async requestAsPromise(t) {
960
+ async requestAsPromise(r) {
961
961
  try {
962
- const r = this.$request(t);
963
- return (await kr(r)).result.data;
964
- } catch (r) {
965
- throw F.from(r);
962
+ const t = this.$request(r);
963
+ return (await Ct(t)).result.data;
964
+ } catch (t) {
965
+ throw F.from(t);
966
966
  }
967
967
  }
968
- query(t, r, n) {
968
+ query(r, t, n) {
969
969
  return this.requestAsPromise({
970
970
  type: "query",
971
- path: t,
972
- input: r,
971
+ path: r,
972
+ input: t,
973
973
  context: n == null ? void 0 : n.context,
974
974
  signal: n == null ? void 0 : n.signal
975
975
  });
976
976
  }
977
- mutation(t, r, n) {
977
+ mutation(r, t, n) {
978
978
  return this.requestAsPromise({
979
979
  type: "mutation",
980
- path: t,
981
- input: r,
980
+ path: r,
981
+ input: t,
982
982
  context: n == null ? void 0 : n.context,
983
983
  signal: n == null ? void 0 : n.signal
984
984
  });
985
985
  }
986
- subscription(t, r, n) {
986
+ subscription(r, t, n) {
987
987
  return this.$request({
988
988
  type: "subscription",
989
- path: t,
990
- input: r,
989
+ path: r,
990
+ input: t,
991
991
  context: n.context,
992
992
  signal: n.signal
993
993
  }).subscribe({
@@ -1025,45 +1025,45 @@ class qr {
1025
1025
  }
1026
1026
  });
1027
1027
  }
1028
- constructor(t) {
1029
- be(this, "links", void 0), be(this, "runtime", void 0), be(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links = t.links.map((r) => r(this.runtime));
1028
+ constructor(r) {
1029
+ be(this, "links", void 0), be(this, "runtime", void 0), be(this, "requestId", void 0), this.requestId = 0, this.runtime = {}, this.links = r.links.map((t) => t(this.runtime));
1030
1030
  }
1031
1031
  }
1032
- const zr = Symbol.for("trpc_untypedClient"), Mr = {
1032
+ const Mt = Symbol.for("trpc_untypedClient"), Wt = {
1033
1033
  query: "query",
1034
1034
  mutate: "mutation",
1035
1035
  subscribe: "subscription"
1036
- }, Wr = (e) => Mr[e];
1037
- function Br(e) {
1038
- const t = Fr(({ path: r, args: n }) => {
1036
+ }, Bt = (e) => Wt[e];
1037
+ function Kt(e) {
1038
+ const r = Dt(({ path: t, args: n }) => {
1039
1039
  const i = [
1040
- ...r
1041
- ], s = Wr(i.pop()), u = i.join(".");
1040
+ ...t
1041
+ ], s = Bt(i.pop()), u = i.join(".");
1042
1042
  return e[s](u, ...n);
1043
1043
  });
1044
- return Dr((r) => r === zr ? e : t[r]);
1044
+ return Nt((t) => t === Mt ? e : r[t]);
1045
1045
  }
1046
- function Kr(e) {
1047
- const t = new qr(e);
1048
- return Br(t);
1046
+ function Yt(e) {
1047
+ const r = new zt(e);
1048
+ return Kt(r);
1049
1049
  }
1050
- const it = (e) => typeof e == "function";
1051
- function Yr(e) {
1050
+ const ir = (e) => typeof e == "function";
1051
+ function Ht(e) {
1052
1052
  if (e)
1053
1053
  return e;
1054
- if (typeof window < "u" && it(window.fetch))
1054
+ if (typeof window < "u" && ir(window.fetch))
1055
1055
  return window.fetch;
1056
- if (typeof globalThis < "u" && it(globalThis.fetch))
1056
+ if (typeof globalThis < "u" && ir(globalThis.fetch))
1057
1057
  return globalThis.fetch;
1058
1058
  throw new Error("No fetch implementation found");
1059
1059
  }
1060
- const st = () => {
1060
+ const sr = () => {
1061
1061
  throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new");
1062
1062
  };
1063
- function at(e) {
1064
- let t = null, r = null;
1063
+ function ar(e) {
1064
+ let r = null, t = null;
1065
1065
  const n = () => {
1066
- clearTimeout(r), r = null, t = null;
1066
+ clearTimeout(t), t = null, r = null;
1067
1067
  };
1068
1068
  function i(l) {
1069
1069
  var m, p;
@@ -1080,7 +1080,7 @@ function at(e) {
1080
1080
  (m = h.reject) == null || m.call(h, new Error("Aborted")), f++;
1081
1081
  continue;
1082
1082
  }
1083
- if (e.validate(b.concat(h).map((P) => P.key))) {
1083
+ if (e.validate(b.concat(h).map((R) => R.key))) {
1084
1084
  b.push(h), f++;
1085
1085
  continue;
1086
1086
  }
@@ -1093,7 +1093,7 @@ function at(e) {
1093
1093
  return a;
1094
1094
  }
1095
1095
  function s() {
1096
- const l = i(t);
1096
+ const l = i(r);
1097
1097
  n();
1098
1098
  for (const a of l) {
1099
1099
  if (!a.length)
@@ -1107,14 +1107,14 @@ function at(e) {
1107
1107
  var h;
1108
1108
  await Promise.all(p.map(async (b, x) => {
1109
1109
  var L, j;
1110
- const P = f.items[x];
1110
+ const R = f.items[x];
1111
1111
  try {
1112
1112
  const S = await Promise.resolve(b);
1113
- (L = P.resolve) == null || L.call(P, S);
1113
+ (L = R.resolve) == null || L.call(R, S);
1114
1114
  } catch (S) {
1115
- (j = P.reject) == null || j.call(P, S);
1115
+ (j = R.reject) == null || j.call(R, S);
1116
1116
  }
1117
- P.batch = null, P.reject = null, P.resolve = null;
1117
+ R.batch = null, R.reject = null, R.resolve = null;
1118
1118
  }));
1119
1119
  for (const b of f.items)
1120
1120
  (h = b.reject) == null || h.call(b, new Error("Missing result")), b.batch = null;
@@ -1130,103 +1130,103 @@ function at(e) {
1130
1130
  aborted: !1,
1131
1131
  key: l,
1132
1132
  batch: null,
1133
- resolve: st,
1134
- reject: st
1133
+ resolve: sr,
1134
+ reject: sr
1135
1135
  }, f = new Promise((m, p) => {
1136
- a.reject = p, a.resolve = m, t || (t = []), t.push(a);
1136
+ a.reject = p, a.resolve = m, r || (r = []), r.push(a);
1137
1137
  });
1138
- return r || (r = setTimeout(s)), f;
1138
+ return t || (t = setTimeout(s)), f;
1139
1139
  }
1140
1140
  return {
1141
1141
  load: u
1142
1142
  };
1143
1143
  }
1144
- function Hr(...e) {
1145
- const t = new AbortController(), r = e.length;
1144
+ function Gt(...e) {
1145
+ const r = new AbortController(), t = e.length;
1146
1146
  let n = 0;
1147
1147
  const i = () => {
1148
- ++n === r && t.abort();
1148
+ ++n === t && r.abort();
1149
1149
  };
1150
1150
  for (const s of e)
1151
1151
  s != null && s.aborted ? i() : s == null || s.addEventListener("abort", i, {
1152
1152
  once: !0
1153
1153
  });
1154
- return t.signal;
1154
+ return r.signal;
1155
1155
  }
1156
- function Gr(e) {
1157
- const t = e;
1158
- return t ? "input" in t ? t : {
1159
- input: t,
1160
- output: t
1156
+ function Xt(e) {
1157
+ const r = e;
1158
+ return r ? "input" in r ? r : {
1159
+ input: r,
1160
+ output: r
1161
1161
  } : {
1162
1162
  input: {
1163
- serialize: (r) => r,
1164
- deserialize: (r) => r
1163
+ serialize: (t) => t,
1164
+ deserialize: (t) => t
1165
1165
  },
1166
1166
  output: {
1167
- serialize: (r) => r,
1168
- deserialize: (r) => r
1167
+ serialize: (t) => t,
1168
+ deserialize: (t) => t
1169
1169
  }
1170
1170
  };
1171
1171
  }
1172
- function Xr(e) {
1172
+ function Jt(e) {
1173
1173
  return {
1174
1174
  url: e.url.toString(),
1175
1175
  fetch: e.fetch,
1176
- transformer: Gr(e.transformer),
1176
+ transformer: Xt(e.transformer),
1177
1177
  methodOverride: e.methodOverride
1178
1178
  };
1179
1179
  }
1180
- function Jr(e) {
1181
- const t = {};
1182
- for (let r = 0; r < e.length; r++) {
1183
- const n = e[r];
1184
- t[r] = n;
1180
+ function Zt(e) {
1181
+ const r = {};
1182
+ for (let t = 0; t < e.length; t++) {
1183
+ const n = e[t];
1184
+ r[t] = n;
1185
1185
  }
1186
- return t;
1186
+ return r;
1187
1187
  }
1188
- const Zr = {
1188
+ const Qt = {
1189
1189
  query: "GET",
1190
1190
  mutation: "POST",
1191
1191
  subscription: "PATCH"
1192
1192
  };
1193
- function Et(e) {
1194
- return "input" in e ? e.transformer.input.serialize(e.input) : Jr(e.inputs.map((t) => e.transformer.input.serialize(t)));
1193
+ function Rr(e) {
1194
+ return "input" in e ? e.transformer.input.serialize(e.input) : Zt(e.inputs.map((r) => e.transformer.input.serialize(r)));
1195
1195
  }
1196
- const Pt = (e) => {
1197
- const t = e.url.split("?");
1198
- let n = t[0].replace(/\/$/, "") + "/" + e.path;
1196
+ const Pr = (e) => {
1197
+ const r = e.url.split("?");
1198
+ let n = r[0].replace(/\/$/, "") + "/" + e.path;
1199
1199
  const i = [];
1200
- if (t[1] && i.push(t[1]), "inputs" in e && i.push("batch=1"), e.type === "query" || e.type === "subscription") {
1201
- const s = Et(e);
1200
+ if (r[1] && i.push(r[1]), "inputs" in e && i.push("batch=1"), e.type === "query" || e.type === "subscription") {
1201
+ const s = Rr(e);
1202
1202
  s !== void 0 && e.methodOverride !== "POST" && i.push(`input=${encodeURIComponent(JSON.stringify(s))}`);
1203
1203
  }
1204
1204
  return i.length && (n += "?" + i.join("&")), n;
1205
- }, Qr = (e) => {
1205
+ }, en = (e) => {
1206
1206
  if (e.type === "query" && e.methodOverride !== "POST")
1207
1207
  return;
1208
- const t = Et(e);
1209
- return t !== void 0 ? JSON.stringify(t) : void 0;
1210
- }, en = (e) => on({
1208
+ const r = Rr(e);
1209
+ return r !== void 0 ? JSON.stringify(r) : void 0;
1210
+ }, rn = (e) => sn({
1211
1211
  ...e,
1212
1212
  contentTypeHeader: "application/json",
1213
- getUrl: Pt,
1214
- getBody: Qr
1213
+ getUrl: Pr,
1214
+ getBody: en
1215
1215
  });
1216
1216
  class tn extends Error {
1217
1217
  constructor() {
1218
- const t = "AbortError";
1219
- super(t), this.name = t, this.message = t;
1218
+ const r = "AbortError";
1219
+ super(r), this.name = r, this.message = r;
1220
1220
  }
1221
1221
  }
1222
- const rn = (e) => {
1223
- var t;
1222
+ const nn = (e) => {
1223
+ var r;
1224
1224
  if (e != null && e.aborted)
1225
- throw (t = e.throwIfAborted) == null || t.call(e), typeof DOMException < "u" ? new DOMException("AbortError", "AbortError") : new tn();
1225
+ throw (r = e.throwIfAborted) == null || r.call(e), typeof DOMException < "u" ? new DOMException("AbortError", "AbortError") : new tn();
1226
1226
  };
1227
- async function nn(e) {
1228
- rn(e.signal);
1229
- const t = e.getUrl(e), r = e.getBody(e), { type: n } = e, i = await (async () => {
1227
+ async function on(e) {
1228
+ nn(e.signal);
1229
+ const r = e.getUrl(e), t = e.getBody(e), { type: n } = e, i = await (async () => {
1230
1230
  const u = await e.headers();
1231
1231
  return Symbol.iterator in u ? Object.fromEntries(u) : u;
1232
1232
  })(), s = {
@@ -1238,41 +1238,41 @@ async function nn(e) {
1238
1238
  } : void 0,
1239
1239
  ...i
1240
1240
  };
1241
- return Yr(e.fetch)(t, {
1242
- method: e.methodOverride ?? Zr[n],
1241
+ return Ht(e.fetch)(r, {
1242
+ method: e.methodOverride ?? Qt[n],
1243
1243
  signal: e.signal,
1244
- body: r,
1244
+ body: t,
1245
1245
  headers: s
1246
1246
  });
1247
1247
  }
1248
- async function on(e) {
1249
- const t = {}, r = await nn(e);
1250
- t.response = r;
1251
- const n = await r.json();
1252
- return t.responseJSON = n, {
1248
+ async function sn(e) {
1249
+ const r = {}, t = await on(e);
1250
+ r.response = t;
1251
+ const n = await t.json();
1252
+ return r.responseJSON = n, {
1253
1253
  json: n,
1254
- meta: t
1254
+ meta: r
1255
1255
  };
1256
1256
  }
1257
- function sn(e) {
1258
- const t = Xr(e), r = e.maxURLLength ?? 1 / 0;
1257
+ function an(e) {
1258
+ const r = Jt(e), t = e.maxURLLength ?? 1 / 0;
1259
1259
  return () => {
1260
1260
  const n = (l) => ({
1261
1261
  validate(a) {
1262
- if (r === 1 / 0)
1262
+ if (t === 1 / 0)
1263
1263
  return !0;
1264
1264
  const f = a.map((h) => h.path).join(","), m = a.map((h) => h.input);
1265
- return Pt({
1266
- ...t,
1265
+ return Pr({
1266
+ ...r,
1267
1267
  type: l,
1268
1268
  path: f,
1269
1269
  inputs: m,
1270
1270
  signal: null
1271
- }).length <= r;
1271
+ }).length <= t;
1272
1272
  },
1273
1273
  async fetch(a) {
1274
- const f = a.map((P) => P.path).join(","), m = a.map((P) => P.input), p = Hr(...a.map((P) => P.signal)), h = await en({
1275
- ...t,
1274
+ const f = a.map((R) => R.path).join(","), m = a.map((R) => R.input), p = Gt(...a.map((R) => R.signal)), h = await rn({
1275
+ ...r,
1276
1276
  path: f,
1277
1277
  inputs: m,
1278
1278
  type: l,
@@ -1283,12 +1283,12 @@ function sn(e) {
1283
1283
  },
1284
1284
  signal: p
1285
1285
  });
1286
- return (Array.isArray(h.json) ? h.json : a.map(() => h.json)).map((P) => ({
1286
+ return (Array.isArray(h.json) ? h.json : a.map(() => h.json)).map((R) => ({
1287
1287
  meta: h.meta,
1288
- json: P
1288
+ json: R
1289
1289
  }));
1290
1290
  }
1291
- }), i = at(n("query")), s = at(n("mutation")), u = {
1291
+ }), i = ar(n("query")), s = ar(n("mutation")), u = {
1292
1292
  query: i,
1293
1293
  mutation: s
1294
1294
  };
@@ -1300,7 +1300,7 @@ function sn(e) {
1300
1300
  let p;
1301
1301
  return m.then((h) => {
1302
1302
  p = h;
1303
- const b = Nr(h.json, t.transformer.output);
1303
+ const b = Ut(h.json, r.transformer.output);
1304
1304
  if (!b.ok) {
1305
1305
  a.error(F.from(b.error, {
1306
1306
  meta: h.meta
@@ -1320,7 +1320,7 @@ function sn(e) {
1320
1320
  });
1321
1321
  };
1322
1322
  }
1323
- function an(e) {
1323
+ function un(e) {
1324
1324
  return typeof FormData > "u" ? !1 : e instanceof FormData;
1325
1325
  }
1326
1326
  const we = {
@@ -1372,22 +1372,22 @@ const we = {
1372
1372
  }
1373
1373
  }
1374
1374
  };
1375
- function un(e) {
1376
- const { direction: t, type: r, withContext: n, path: i, id: s, input: u } = e, l = [], a = [];
1375
+ function cn(e) {
1376
+ const { direction: r, type: t, withContext: n, path: i, id: s, input: u } = e, l = [], a = [];
1377
1377
  if (e.colorMode === "none")
1378
- l.push(t === "up" ? ">>" : "<<", r, `#${s}`, i);
1378
+ l.push(r === "up" ? ">>" : "<<", t, `#${s}`, i);
1379
1379
  else if (e.colorMode === "ansi") {
1380
- const [f, m] = we.ansi.regular[r], [p, h] = we.ansi.bold[r];
1381
- l.push(t === "up" ? f : m, t === "up" ? ">>" : "<<", r, t === "up" ? p : h, `#${s}`, i, "\x1B[0m");
1380
+ const [f, m] = we.ansi.regular[t], [p, h] = we.ansi.bold[t];
1381
+ l.push(r === "up" ? f : m, r === "up" ? ">>" : "<<", t, r === "up" ? p : h, `#${s}`, i, "\x1B[0m");
1382
1382
  } else {
1383
- const [f, m] = we.css[r], p = `
1384
- background-color: #${t === "up" ? f : m};
1385
- color: ${t === "up" ? "black" : "white"};
1383
+ const [f, m] = we.css[t], p = `
1384
+ background-color: #${r === "up" ? f : m};
1385
+ color: ${r === "up" ? "black" : "white"};
1386
1386
  padding: 2px;
1387
1387
  `;
1388
- l.push("%c", t === "up" ? ">>" : "<<", r, `#${s}`, `%c${i}%c`, "%O"), a.push(p, `${p}; font-weight: bold;`, `${p}; font-weight: normal;`);
1388
+ l.push("%c", r === "up" ? ">>" : "<<", t, `#${s}`, `%c${i}%c`, "%O"), a.push(p, `${p}; font-weight: bold;`, `${p}; font-weight: normal;`);
1389
1389
  }
1390
- return t === "up" ? a.push(n ? {
1390
+ return r === "up" ? a.push(n ? {
1391
1391
  input: u,
1392
1392
  context: e.context
1393
1393
  } : {
@@ -1404,25 +1404,25 @@ function un(e) {
1404
1404
  args: a
1405
1405
  };
1406
1406
  }
1407
- const cn = ({ c: e = console, colorMode: t = "css", withContext: r }) => (n) => {
1408
- const i = n.input, s = an(i) ? Object.fromEntries(i) : i, { parts: u, args: l } = un({
1407
+ const ln = ({ c: e = console, colorMode: r = "css", withContext: t }) => (n) => {
1408
+ const i = n.input, s = un(i) ? Object.fromEntries(i) : i, { parts: u, args: l } = cn({
1409
1409
  ...n,
1410
- colorMode: t,
1410
+ colorMode: r,
1411
1411
  input: s,
1412
- withContext: r
1412
+ withContext: t
1413
1413
  }), a = n.direction === "down" && n.result && (n.result instanceof Error || "error" in n.result.result && n.result.result.error) ? "error" : "log";
1414
1414
  e[a].apply(null, [
1415
1415
  u.join(" ")
1416
1416
  ].concat(l));
1417
1417
  };
1418
- function ln(e = {}) {
1419
- const { enabled: t = () => !0 } = e, r = e.colorMode ?? (typeof window > "u" ? "ansi" : "css"), n = e.withContext ?? r === "css", { logger: i = cn({
1418
+ function fn(e = {}) {
1419
+ const { enabled: r = () => !0 } = e, t = e.colorMode ?? (typeof window > "u" ? "ansi" : "css"), n = e.withContext ?? t === "css", { logger: i = ln({
1420
1420
  c: e.console,
1421
- colorMode: r,
1421
+ colorMode: t,
1422
1422
  withContext: n
1423
1423
  }) } = e;
1424
1424
  return () => ({ op: s, next: u }) => W((l) => {
1425
- t({
1425
+ r({
1426
1426
  ...s,
1427
1427
  direction: "up"
1428
1428
  }) && i({
@@ -1432,7 +1432,7 @@ function ln(e = {}) {
1432
1432
  const a = Date.now();
1433
1433
  function f(m) {
1434
1434
  const p = Date.now() - a;
1435
- t({
1435
+ r({
1436
1436
  ...s,
1437
1437
  direction: "down",
1438
1438
  result: m
@@ -1443,7 +1443,7 @@ function ln(e = {}) {
1443
1443
  result: m
1444
1444
  });
1445
1445
  }
1446
- return u(s).pipe(jr({
1446
+ return u(s).pipe(It({
1447
1447
  next(m) {
1448
1448
  f(m);
1449
1449
  },
@@ -1453,45 +1453,45 @@ function ln(e = {}) {
1453
1453
  })).subscribe(l);
1454
1454
  });
1455
1455
  }
1456
- const fn = (e, ...t) => typeof e == "function" ? e(...t) : e;
1457
- function dn() {
1458
- let e, t;
1456
+ const dn = (e, ...r) => typeof e == "function" ? e(...r) : e;
1457
+ function mn() {
1458
+ let e, r;
1459
1459
  return {
1460
1460
  promise: new Promise((n, i) => {
1461
- e = n, t = i;
1461
+ e = n, r = i;
1462
1462
  }),
1463
1463
  resolve: e,
1464
- reject: t
1464
+ reject: r
1465
1465
  };
1466
1466
  }
1467
- async function mn(e) {
1468
- const t = await fn(e.url);
1469
- if (!e.connectionParams) return t;
1470
- const n = `${t.includes("?") ? "&" : "?"}connectionParams=1`;
1471
- return t + n;
1467
+ async function pn(e) {
1468
+ const r = await dn(e.url);
1469
+ if (!e.connectionParams) return r;
1470
+ const n = `${r.includes("?") ? "&" : "?"}connectionParams=1`;
1471
+ return r + n;
1472
1472
  }
1473
- function U(e, t, r) {
1474
- return t in e ? Object.defineProperty(e, t, {
1475
- value: r,
1473
+ function U(e, r, t) {
1474
+ return r in e ? Object.defineProperty(e, r, {
1475
+ value: t,
1476
1476
  enumerable: !0,
1477
1477
  configurable: !0,
1478
1478
  writable: !0
1479
- }) : e[t] = r, e;
1479
+ }) : e[r] = t, e;
1480
1480
  }
1481
- function pn(e) {
1482
- const { promise: t, resolve: r, reject: n } = dn();
1481
+ function yn(e) {
1482
+ const { promise: r, resolve: t, reject: n } = mn();
1483
1483
  return e.addEventListener("open", () => {
1484
- e.removeEventListener("error", n), r();
1485
- }), e.addEventListener("error", n), t;
1484
+ e.removeEventListener("error", n), t();
1485
+ }), e.addEventListener("error", n), r;
1486
1486
  }
1487
- function yn(e, { intervalMs: t, pongTimeoutMs: r }) {
1487
+ function hn(e, { intervalMs: r, pongTimeoutMs: t }) {
1488
1488
  let n, i;
1489
1489
  function s() {
1490
1490
  n = setTimeout(() => {
1491
1491
  e.send("PING"), i = setTimeout(() => {
1492
1492
  e.close();
1493
- }, r);
1494
- }, t);
1493
+ }, t);
1494
+ }, r);
1495
1495
  }
1496
1496
  function u() {
1497
1497
  clearTimeout(n), s();
@@ -1509,8 +1509,8 @@ class se {
1509
1509
  get ws() {
1510
1510
  return this.wsObservable.get();
1511
1511
  }
1512
- set ws(t) {
1513
- this.wsObservable.next(t);
1512
+ set ws(r) {
1513
+ this.wsObservable.next(r);
1514
1514
  }
1515
1515
  /**
1516
1516
  * Checks if the WebSocket connection is open and ready to communicate.
@@ -1527,10 +1527,10 @@ class se {
1527
1527
  async open() {
1528
1528
  if (this.openPromise) return this.openPromise;
1529
1529
  this.id = ++se.connectCount;
1530
- const t = mn(this.urlOptions).then((r) => new this.WebSocketPonyfill(r));
1531
- this.openPromise = t.then(pn), this.ws = await t, this.ws.addEventListener("message", function({ data: r }) {
1532
- r === "PING" && this.send("PONG");
1533
- }), this.keepAliveOpts.enabled && yn(this.ws, this.keepAliveOpts), this.ws.addEventListener("close", () => {
1530
+ const r = pn(this.urlOptions).then((t) => new this.WebSocketPonyfill(t));
1531
+ this.openPromise = r.then(yn), this.ws = await r, this.ws.addEventListener("message", function({ data: t }) {
1532
+ t === "PING" && this.send("PONG");
1533
+ }), this.keepAliveOpts.enabled && hn(this.ws, this.keepAliveOpts), this.ws.addEventListener("close", () => {
1534
1534
  this.ws = null;
1535
1535
  });
1536
1536
  try {
@@ -1544,161 +1544,161 @@ class se {
1544
1544
  * Waits for any ongoing open operation to complete before closing.
1545
1545
  */
1546
1546
  async close() {
1547
- var t;
1547
+ var r;
1548
1548
  try {
1549
1549
  await this.openPromise;
1550
1550
  } finally {
1551
- (t = this.ws) == null || t.close();
1551
+ (r = this.ws) == null || r.close();
1552
1552
  }
1553
1553
  }
1554
- constructor(t) {
1555
- if (U(this, "id", ++se.connectCount), U(this, "WebSocketPonyfill", void 0), U(this, "urlOptions", void 0), U(this, "keepAliveOpts", void 0), U(this, "wsObservable", Ar(null)), U(this, "openPromise", null), this.WebSocketPonyfill = t.WebSocketPonyfill ?? WebSocket, !this.WebSocketPonyfill)
1554
+ constructor(r) {
1555
+ if (U(this, "id", ++se.connectCount), U(this, "WebSocketPonyfill", void 0), U(this, "urlOptions", void 0), U(this, "keepAliveOpts", void 0), U(this, "wsObservable", At(null)), U(this, "openPromise", null), this.WebSocketPonyfill = r.WebSocketPonyfill ?? WebSocket, !this.WebSocketPonyfill)
1556
1556
  throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");
1557
- this.urlOptions = t.urlOptions, this.keepAliveOpts = t.keepAlive;
1557
+ this.urlOptions = r.urlOptions, this.keepAliveOpts = r.keepAlive;
1558
1558
  }
1559
1559
  }
1560
1560
  U(se, "connectCount", 0);
1561
- class hn {
1561
+ class gn {
1562
1562
  constructor() {
1563
1563
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
1564
1564
  }
1565
- set(t, r) {
1566
- this.keyToValue.set(t, r), this.valueToKey.set(r, t);
1565
+ set(r, t) {
1566
+ this.keyToValue.set(r, t), this.valueToKey.set(t, r);
1567
1567
  }
1568
- getByKey(t) {
1569
- return this.keyToValue.get(t);
1568
+ getByKey(r) {
1569
+ return this.keyToValue.get(r);
1570
1570
  }
1571
- getByValue(t) {
1572
- return this.valueToKey.get(t);
1571
+ getByValue(r) {
1572
+ return this.valueToKey.get(r);
1573
1573
  }
1574
1574
  clear() {
1575
1575
  this.keyToValue.clear(), this.valueToKey.clear();
1576
1576
  }
1577
1577
  }
1578
- class Rt {
1579
- constructor(t) {
1580
- this.generateIdentifier = t, this.kv = new hn();
1578
+ class Or {
1579
+ constructor(r) {
1580
+ this.generateIdentifier = r, this.kv = new gn();
1581
1581
  }
1582
- register(t, r) {
1583
- this.kv.getByValue(t) || (r || (r = this.generateIdentifier(t)), this.kv.set(r, t));
1582
+ register(r, t) {
1583
+ this.kv.getByValue(r) || (t || (t = this.generateIdentifier(r)), this.kv.set(t, r));
1584
1584
  }
1585
1585
  clear() {
1586
1586
  this.kv.clear();
1587
1587
  }
1588
- getIdentifier(t) {
1589
- return this.kv.getByValue(t);
1588
+ getIdentifier(r) {
1589
+ return this.kv.getByValue(r);
1590
1590
  }
1591
- getValue(t) {
1592
- return this.kv.getByKey(t);
1591
+ getValue(r) {
1592
+ return this.kv.getByKey(r);
1593
1593
  }
1594
1594
  }
1595
- class gn extends Rt {
1595
+ class bn extends Or {
1596
1596
  constructor() {
1597
- super((t) => t.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
1597
+ super((r) => r.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
1598
1598
  }
1599
- register(t, r) {
1600
- typeof r == "object" ? (r.allowProps && this.classToAllowedProps.set(t, r.allowProps), super.register(t, r.identifier)) : super.register(t, r);
1599
+ register(r, t) {
1600
+ typeof t == "object" ? (t.allowProps && this.classToAllowedProps.set(r, t.allowProps), super.register(r, t.identifier)) : super.register(r, t);
1601
1601
  }
1602
- getAllowedProps(t) {
1603
- return this.classToAllowedProps.get(t);
1602
+ getAllowedProps(r) {
1603
+ return this.classToAllowedProps.get(r);
1604
1604
  }
1605
1605
  }
1606
- function bn(e) {
1606
+ function wn(e) {
1607
1607
  if ("values" in Object)
1608
1608
  return Object.values(e);
1609
- const t = [];
1610
- for (const r in e)
1611
- e.hasOwnProperty(r) && t.push(e[r]);
1612
- return t;
1609
+ const r = [];
1610
+ for (const t in e)
1611
+ e.hasOwnProperty(t) && r.push(e[t]);
1612
+ return r;
1613
1613
  }
1614
- function wn(e, t) {
1615
- const r = bn(e);
1616
- if ("find" in r)
1617
- return r.find(t);
1618
- const n = r;
1614
+ function vn(e, r) {
1615
+ const t = wn(e);
1616
+ if ("find" in t)
1617
+ return t.find(r);
1618
+ const n = t;
1619
1619
  for (let i = 0; i < n.length; i++) {
1620
1620
  const s = n[i];
1621
- if (t(s))
1621
+ if (r(s))
1622
1622
  return s;
1623
1623
  }
1624
1624
  }
1625
- function M(e, t) {
1626
- Object.entries(e).forEach(([r, n]) => t(n, r));
1625
+ function M(e, r) {
1626
+ Object.entries(e).forEach(([t, n]) => r(n, t));
1627
1627
  }
1628
- function ie(e, t) {
1629
- return e.indexOf(t) !== -1;
1628
+ function ie(e, r) {
1629
+ return e.indexOf(r) !== -1;
1630
1630
  }
1631
- function ut(e, t) {
1632
- for (let r = 0; r < e.length; r++) {
1633
- const n = e[r];
1634
- if (t(n))
1631
+ function ur(e, r) {
1632
+ for (let t = 0; t < e.length; t++) {
1633
+ const n = e[t];
1634
+ if (r(n))
1635
1635
  return n;
1636
1636
  }
1637
1637
  }
1638
- class vn {
1638
+ class En {
1639
1639
  constructor() {
1640
1640
  this.transfomers = {};
1641
1641
  }
1642
- register(t) {
1643
- this.transfomers[t.name] = t;
1642
+ register(r) {
1643
+ this.transfomers[r.name] = r;
1644
1644
  }
1645
- findApplicable(t) {
1646
- return wn(this.transfomers, (r) => r.isApplicable(t));
1645
+ findApplicable(r) {
1646
+ return vn(this.transfomers, (t) => t.isApplicable(r));
1647
1647
  }
1648
- findByName(t) {
1649
- return this.transfomers[t];
1648
+ findByName(r) {
1649
+ return this.transfomers[r];
1650
1650
  }
1651
1651
  }
1652
- const En = (e) => Object.prototype.toString.call(e).slice(8, -1), Tt = (e) => typeof e > "u", Pn = (e) => e === null, J = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Te = (e) => J(e) && Object.keys(e).length === 0, D = (e) => Array.isArray(e), Rn = (e) => typeof e == "string", Tn = (e) => typeof e == "number" && !isNaN(e), On = (e) => typeof e == "boolean", Sn = (e) => e instanceof RegExp, Z = (e) => e instanceof Map, Q = (e) => e instanceof Set, Ot = (e) => En(e) === "Symbol", xn = (e) => e instanceof Date && !isNaN(e.valueOf()), _n = (e) => e instanceof Error, ct = (e) => typeof e == "number" && isNaN(e), kn = (e) => On(e) || Pn(e) || Tt(e) || Tn(e) || Rn(e) || Ot(e), Cn = (e) => typeof e == "bigint", jn = (e) => e === 1 / 0 || e === -1 / 0, An = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), In = (e) => e instanceof URL, St = (e) => e.replace(/\./g, "\\."), ve = (e) => e.map(String).map(St).join("."), G = (e) => {
1653
- const t = [];
1654
- let r = "";
1652
+ const Rn = (e) => Object.prototype.toString.call(e).slice(8, -1), Tr = (e) => typeof e > "u", Pn = (e) => e === null, J = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Oe = (e) => J(e) && Object.keys(e).length === 0, D = (e) => Array.isArray(e), On = (e) => typeof e == "string", Tn = (e) => typeof e == "number" && !isNaN(e), Sn = (e) => typeof e == "boolean", xn = (e) => e instanceof RegExp, Z = (e) => e instanceof Map, Q = (e) => e instanceof Set, Sr = (e) => Rn(e) === "Symbol", _n = (e) => e instanceof Date && !isNaN(e.valueOf()), kn = (e) => e instanceof Error, cr = (e) => typeof e == "number" && isNaN(e), Cn = (e) => Sn(e) || Pn(e) || Tr(e) || Tn(e) || On(e) || Sr(e), jn = (e) => typeof e == "bigint", In = (e) => e === 1 / 0 || e === -1 / 0, An = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Fn = (e) => e instanceof URL, xr = (e) => e.replace(/\./g, "\\."), ve = (e) => e.map(String).map(xr).join("."), G = (e) => {
1653
+ const r = [];
1654
+ let t = "";
1655
1655
  for (let i = 0; i < e.length; i++) {
1656
1656
  let s = e.charAt(i);
1657
1657
  if (s === "\\" && e.charAt(i + 1) === ".") {
1658
- r += ".", i++;
1658
+ t += ".", i++;
1659
1659
  continue;
1660
1660
  }
1661
1661
  if (s === ".") {
1662
- t.push(r), r = "";
1662
+ r.push(t), t = "";
1663
1663
  continue;
1664
1664
  }
1665
- r += s;
1665
+ t += s;
1666
1666
  }
1667
- const n = r;
1668
- return t.push(n), t;
1667
+ const n = t;
1668
+ return r.push(n), r;
1669
1669
  };
1670
- function A(e, t, r, n) {
1670
+ function I(e, r, t, n) {
1671
1671
  return {
1672
1672
  isApplicable: e,
1673
- annotation: t,
1674
- transform: r,
1673
+ annotation: r,
1674
+ transform: t,
1675
1675
  untransform: n
1676
1676
  };
1677
1677
  }
1678
- const xt = [
1679
- A(Tt, "undefined", () => null, () => {
1678
+ const _r = [
1679
+ I(Tr, "undefined", () => null, () => {
1680
1680
  }),
1681
- A(Cn, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
1682
- A(xn, "Date", (e) => e.toISOString(), (e) => new Date(e)),
1683
- A(_n, "Error", (e, t) => {
1684
- const r = {
1681
+ I(jn, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
1682
+ I(_n, "Date", (e) => e.toISOString(), (e) => new Date(e)),
1683
+ I(kn, "Error", (e, r) => {
1684
+ const t = {
1685
1685
  name: e.name,
1686
1686
  message: e.message
1687
1687
  };
1688
- return t.allowedErrorProps.forEach((n) => {
1689
- r[n] = e[n];
1690
- }), r;
1691
- }, (e, t) => {
1692
- const r = new Error(e.message);
1693
- return r.name = e.name, r.stack = e.stack, t.allowedErrorProps.forEach((n) => {
1694
- r[n] = e[n];
1695
- }), r;
1688
+ return r.allowedErrorProps.forEach((n) => {
1689
+ t[n] = e[n];
1690
+ }), t;
1691
+ }, (e, r) => {
1692
+ const t = new Error(e.message);
1693
+ return t.name = e.name, t.stack = e.stack, r.allowedErrorProps.forEach((n) => {
1694
+ t[n] = e[n];
1695
+ }), t;
1696
1696
  }),
1697
- A(Sn, "regexp", (e) => "" + e, (e) => {
1698
- const t = e.slice(1, e.lastIndexOf("/")), r = e.slice(e.lastIndexOf("/") + 1);
1699
- return new RegExp(t, r);
1697
+ I(xn, "regexp", (e) => "" + e, (e) => {
1698
+ const r = e.slice(1, e.lastIndexOf("/")), t = e.slice(e.lastIndexOf("/") + 1);
1699
+ return new RegExp(r, t);
1700
1700
  }),
1701
- A(
1701
+ I(
1702
1702
  Q,
1703
1703
  "set",
1704
1704
  // (sets only exist in es6+)
@@ -1706,25 +1706,25 @@ const xt = [
1706
1706
  (e) => [...e.values()],
1707
1707
  (e) => new Set(e)
1708
1708
  ),
1709
- A(Z, "map", (e) => [...e.entries()], (e) => new Map(e)),
1710
- A((e) => ct(e) || jn(e), "number", (e) => ct(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
1711
- A((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
1712
- A(In, "URL", (e) => e.toString(), (e) => new URL(e))
1709
+ I(Z, "map", (e) => [...e.entries()], (e) => new Map(e)),
1710
+ I((e) => cr(e) || In(e), "number", (e) => cr(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
1711
+ I((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
1712
+ I(Fn, "URL", (e) => e.toString(), (e) => new URL(e))
1713
1713
  ];
1714
- function ae(e, t, r, n) {
1714
+ function ae(e, r, t, n) {
1715
1715
  return {
1716
1716
  isApplicable: e,
1717
- annotation: t,
1718
- transform: r,
1717
+ annotation: r,
1718
+ transform: t,
1719
1719
  untransform: n
1720
1720
  };
1721
1721
  }
1722
- const _t = ae((e, t) => Ot(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, r) => {
1723
- const n = r.symbolRegistry.getValue(t[1]);
1722
+ const kr = ae((e, r) => Sr(e) ? !!r.symbolRegistry.getIdentifier(e) : !1, (e, r) => ["symbol", r.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, r, t) => {
1723
+ const n = t.symbolRegistry.getValue(r[1]);
1724
1724
  if (!n)
1725
1725
  throw new Error("Trying to deserialize unknown symbol");
1726
1726
  return n;
1727
- }), Fn = [
1727
+ }), Dn = [
1728
1728
  Int8Array,
1729
1729
  Uint8Array,
1730
1730
  Int16Array,
@@ -1734,79 +1734,79 @@ const _t = ae((e, t) => Ot(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t)
1734
1734
  Float32Array,
1735
1735
  Float64Array,
1736
1736
  Uint8ClampedArray
1737
- ].reduce((e, t) => (e[t.name] = t, e), {}), kt = ae(An, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
1738
- const r = Fn[t[1]];
1739
- if (!r)
1737
+ ].reduce((e, r) => (e[r.name] = r, e), {}), Cr = ae(An, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, r) => {
1738
+ const t = Dn[r[1]];
1739
+ if (!t)
1740
1740
  throw new Error("Trying to deserialize unknown typed array");
1741
- return new r(e);
1741
+ return new t(e);
1742
1742
  });
1743
- function Ct(e, t) {
1744
- return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
1743
+ function jr(e, r) {
1744
+ return e != null && e.constructor ? !!r.classRegistry.getIdentifier(e.constructor) : !1;
1745
1745
  }
1746
- const jt = ae(Ct, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
1747
- const r = t.classRegistry.getAllowedProps(e.constructor);
1748
- if (!r)
1746
+ const Ir = ae(jr, (e, r) => ["class", r.classRegistry.getIdentifier(e.constructor)], (e, r) => {
1747
+ const t = r.classRegistry.getAllowedProps(e.constructor);
1748
+ if (!t)
1749
1749
  return { ...e };
1750
1750
  const n = {};
1751
- return r.forEach((i) => {
1751
+ return t.forEach((i) => {
1752
1752
  n[i] = e[i];
1753
1753
  }), n;
1754
- }, (e, t, r) => {
1755
- const n = r.classRegistry.getValue(t[1]);
1754
+ }, (e, r, t) => {
1755
+ const n = t.classRegistry.getValue(r[1]);
1756
1756
  if (!n)
1757
- throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
1757
+ throw new Error(`Trying to deserialize unknown class '${r[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
1758
1758
  return Object.assign(Object.create(n.prototype), e);
1759
- }), At = ae((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, r) => {
1760
- const n = r.customTransformerRegistry.findByName(t[1]);
1759
+ }), Ar = ae((e, r) => !!r.customTransformerRegistry.findApplicable(e), (e, r) => ["custom", r.customTransformerRegistry.findApplicable(e).name], (e, r) => r.customTransformerRegistry.findApplicable(e).serialize(e), (e, r, t) => {
1760
+ const n = t.customTransformerRegistry.findByName(r[1]);
1761
1761
  if (!n)
1762
1762
  throw new Error("Trying to deserialize unknown custom value");
1763
1763
  return n.deserialize(e);
1764
- }), Dn = [jt, _t, At, kt], lt = (e, t) => {
1765
- const r = ut(Dn, (i) => i.isApplicable(e, t));
1766
- if (r)
1764
+ }), Nn = [Ir, kr, Ar, Cr], lr = (e, r) => {
1765
+ const t = ur(Nn, (i) => i.isApplicable(e, r));
1766
+ if (t)
1767
1767
  return {
1768
- value: r.transform(e, t),
1769
- type: r.annotation(e, t)
1768
+ value: t.transform(e, r),
1769
+ type: t.annotation(e, r)
1770
1770
  };
1771
- const n = ut(xt, (i) => i.isApplicable(e, t));
1771
+ const n = ur(_r, (i) => i.isApplicable(e, r));
1772
1772
  if (n)
1773
1773
  return {
1774
- value: n.transform(e, t),
1774
+ value: n.transform(e, r),
1775
1775
  type: n.annotation
1776
1776
  };
1777
- }, It = {};
1778
- xt.forEach((e) => {
1779
- It[e.annotation] = e;
1777
+ }, Fr = {};
1778
+ _r.forEach((e) => {
1779
+ Fr[e.annotation] = e;
1780
1780
  });
1781
- const $n = (e, t, r) => {
1782
- if (D(t))
1783
- switch (t[0]) {
1781
+ const $n = (e, r, t) => {
1782
+ if (D(r))
1783
+ switch (r[0]) {
1784
1784
  case "symbol":
1785
- return _t.untransform(e, t, r);
1785
+ return kr.untransform(e, r, t);
1786
1786
  case "class":
1787
- return jt.untransform(e, t, r);
1787
+ return Ir.untransform(e, r, t);
1788
1788
  case "custom":
1789
- return At.untransform(e, t, r);
1789
+ return Ar.untransform(e, r, t);
1790
1790
  case "typed-array":
1791
- return kt.untransform(e, t, r);
1791
+ return Cr.untransform(e, r, t);
1792
1792
  default:
1793
- throw new Error("Unknown transformation: " + t);
1793
+ throw new Error("Unknown transformation: " + r);
1794
1794
  }
1795
1795
  else {
1796
- const n = It[t];
1796
+ const n = Fr[r];
1797
1797
  if (!n)
1798
- throw new Error("Unknown transformation: " + t);
1799
- return n.untransform(e, r);
1798
+ throw new Error("Unknown transformation: " + r);
1799
+ return n.untransform(e, t);
1800
1800
  }
1801
- }, z = (e, t) => {
1802
- if (t > e.size)
1801
+ }, z = (e, r) => {
1802
+ if (r > e.size)
1803
1803
  throw new Error("index out of bounds");
1804
- const r = e.keys();
1805
- for (; t > 0; )
1806
- r.next(), t--;
1807
- return r.next().value;
1804
+ const t = e.keys();
1805
+ for (; r > 0; )
1806
+ t.next(), r--;
1807
+ return t.next().value;
1808
1808
  };
1809
- function Ft(e) {
1809
+ function Dr(e) {
1810
1810
  if (ie(e, "__proto__"))
1811
1811
  throw new Error("__proto__ is not allowed as a property");
1812
1812
  if (ie(e, "prototype"))
@@ -1814,14 +1814,14 @@ function Ft(e) {
1814
1814
  if (ie(e, "constructor"))
1815
1815
  throw new Error("constructor is not allowed as a property");
1816
1816
  }
1817
- const Nn = (e, t) => {
1818
- Ft(t);
1819
- for (let r = 0; r < t.length; r++) {
1820
- const n = t[r];
1817
+ const Un = (e, r) => {
1818
+ Dr(r);
1819
+ for (let t = 0; t < r.length; t++) {
1820
+ const n = r[t];
1821
1821
  if (Q(e))
1822
1822
  e = z(e, +n);
1823
1823
  else if (Z(e)) {
1824
- const i = +n, s = +t[++r] == 0 ? "key" : "value", u = z(e, i);
1824
+ const i = +n, s = +r[++t] == 0 ? "key" : "value", u = z(e, i);
1825
1825
  switch (s) {
1826
1826
  case "key":
1827
1827
  e = u;
@@ -1834,12 +1834,12 @@ const Nn = (e, t) => {
1834
1834
  e = e[n];
1835
1835
  }
1836
1836
  return e;
1837
- }, Oe = (e, t, r) => {
1838
- if (Ft(t), t.length === 0)
1839
- return r(e);
1837
+ }, Te = (e, r, t) => {
1838
+ if (Dr(r), r.length === 0)
1839
+ return t(e);
1840
1840
  let n = e;
1841
- for (let s = 0; s < t.length - 1; s++) {
1842
- const u = t[s];
1841
+ for (let s = 0; s < r.length - 1; s++) {
1842
+ const u = r[s];
1843
1843
  if (D(n)) {
1844
1844
  const l = +u;
1845
1845
  n = n[l];
@@ -1849,9 +1849,9 @@ const Nn = (e, t) => {
1849
1849
  const l = +u;
1850
1850
  n = z(n, l);
1851
1851
  } else if (Z(n)) {
1852
- if (s === t.length - 2)
1852
+ if (s === r.length - 2)
1853
1853
  break;
1854
- const a = +u, f = +t[++s] == 0 ? "key" : "value", m = z(n, a);
1854
+ const a = +u, f = +r[++s] == 0 ? "key" : "value", m = z(n, a);
1855
1855
  switch (f) {
1856
1856
  case "key":
1857
1857
  n = m;
@@ -1862,88 +1862,88 @@ const Nn = (e, t) => {
1862
1862
  }
1863
1863
  }
1864
1864
  }
1865
- const i = t[t.length - 1];
1866
- if (D(n) ? n[+i] = r(n[+i]) : J(n) && (n[i] = r(n[i])), Q(n)) {
1867
- const s = z(n, +i), u = r(s);
1865
+ const i = r[r.length - 1];
1866
+ if (D(n) ? n[+i] = t(n[+i]) : J(n) && (n[i] = t(n[i])), Q(n)) {
1867
+ const s = z(n, +i), u = t(s);
1868
1868
  s !== u && (n.delete(s), n.add(u));
1869
1869
  }
1870
1870
  if (Z(n)) {
1871
- const s = +t[t.length - 2], u = z(n, s);
1871
+ const s = +r[r.length - 2], u = z(n, s);
1872
1872
  switch (+i == 0 ? "key" : "value") {
1873
1873
  case "key": {
1874
- const a = r(u);
1874
+ const a = t(u);
1875
1875
  n.set(a, n.get(u)), a !== u && n.delete(u);
1876
1876
  break;
1877
1877
  }
1878
1878
  case "value": {
1879
- n.set(u, r(n.get(u)));
1879
+ n.set(u, t(n.get(u)));
1880
1880
  break;
1881
1881
  }
1882
1882
  }
1883
1883
  }
1884
1884
  return e;
1885
1885
  };
1886
- function Se(e, t, r = []) {
1886
+ function Se(e, r, t = []) {
1887
1887
  if (!e)
1888
1888
  return;
1889
1889
  if (!D(e)) {
1890
- M(e, (s, u) => Se(s, t, [...r, ...G(u)]));
1890
+ M(e, (s, u) => Se(s, r, [...t, ...G(u)]));
1891
1891
  return;
1892
1892
  }
1893
1893
  const [n, i] = e;
1894
1894
  i && M(i, (s, u) => {
1895
- Se(s, t, [...r, ...G(u)]);
1896
- }), t(n, r);
1895
+ Se(s, r, [...t, ...G(u)]);
1896
+ }), r(n, t);
1897
1897
  }
1898
- function Un(e, t, r) {
1899
- return Se(t, (n, i) => {
1900
- e = Oe(e, i, (s) => $n(s, n, r));
1898
+ function Ln(e, r, t) {
1899
+ return Se(r, (n, i) => {
1900
+ e = Te(e, i, (s) => $n(s, n, t));
1901
1901
  }), e;
1902
1902
  }
1903
- function Ln(e, t) {
1904
- function r(n, i) {
1905
- const s = Nn(e, G(i));
1903
+ function Vn(e, r) {
1904
+ function t(n, i) {
1905
+ const s = Un(e, G(i));
1906
1906
  n.map(G).forEach((u) => {
1907
- e = Oe(e, u, () => s);
1907
+ e = Te(e, u, () => s);
1908
1908
  });
1909
1909
  }
1910
- if (D(t)) {
1911
- const [n, i] = t;
1910
+ if (D(r)) {
1911
+ const [n, i] = r;
1912
1912
  n.forEach((s) => {
1913
- e = Oe(e, G(s), () => e);
1914
- }), i && M(i, r);
1913
+ e = Te(e, G(s), () => e);
1914
+ }), i && M(i, t);
1915
1915
  } else
1916
- M(t, r);
1916
+ M(r, t);
1917
1917
  return e;
1918
1918
  }
1919
- const Vn = (e, t) => J(e) || D(e) || Z(e) || Q(e) || Ct(e, t);
1920
- function qn(e, t, r) {
1921
- const n = r.get(e);
1922
- n ? n.push(t) : r.set(e, [t]);
1919
+ const qn = (e, r) => J(e) || D(e) || Z(e) || Q(e) || jr(e, r);
1920
+ function zn(e, r, t) {
1921
+ const n = t.get(e);
1922
+ n ? n.push(r) : t.set(e, [r]);
1923
1923
  }
1924
- function zn(e, t) {
1925
- const r = {};
1924
+ function Mn(e, r) {
1925
+ const t = {};
1926
1926
  let n;
1927
1927
  return e.forEach((i) => {
1928
1928
  if (i.length <= 1)
1929
1929
  return;
1930
- t || (i = i.map((l) => l.map(String)).sort((l, a) => l.length - a.length));
1930
+ r || (i = i.map((l) => l.map(String)).sort((l, a) => l.length - a.length));
1931
1931
  const [s, ...u] = i;
1932
- s.length === 0 ? n = u.map(ve) : r[ve(s)] = u.map(ve);
1933
- }), n ? Te(r) ? [n] : [n, r] : Te(r) ? void 0 : r;
1932
+ s.length === 0 ? n = u.map(ve) : t[ve(s)] = u.map(ve);
1933
+ }), n ? Oe(t) ? [n] : [n, t] : Oe(t) ? void 0 : t;
1934
1934
  }
1935
- const Dt = (e, t, r, n, i = [], s = [], u = /* @__PURE__ */ new Map()) => {
1936
- const l = kn(e);
1935
+ const Nr = (e, r, t, n, i = [], s = [], u = /* @__PURE__ */ new Map()) => {
1936
+ const l = Cn(e);
1937
1937
  if (!l) {
1938
- qn(e, i, t);
1938
+ zn(e, i, r);
1939
1939
  const b = u.get(e);
1940
1940
  if (b)
1941
1941
  return n ? {
1942
1942
  transformedValue: null
1943
1943
  } : b;
1944
1944
  }
1945
- if (!Vn(e, r)) {
1946
- const b = lt(e, r), x = b ? {
1945
+ if (!qn(e, t)) {
1946
+ const b = lr(e, t), x = b ? {
1947
1947
  transformedValue: b.value,
1948
1948
  annotations: [b.type]
1949
1949
  } : {
@@ -1955,16 +1955,16 @@ const Dt = (e, t, r, n, i = [], s = [], u = /* @__PURE__ */ new Map()) => {
1955
1955
  return {
1956
1956
  transformedValue: null
1957
1957
  };
1958
- const a = lt(e, r), f = (a == null ? void 0 : a.value) ?? e, m = D(f) ? [] : {}, p = {};
1958
+ const a = lr(e, t), f = (a == null ? void 0 : a.value) ?? e, m = D(f) ? [] : {}, p = {};
1959
1959
  M(f, (b, x) => {
1960
1960
  if (x === "__proto__" || x === "constructor" || x === "prototype")
1961
1961
  throw new Error(`Detected property ${x}. This is a prototype pollution risk, please remove it from your object.`);
1962
- const P = Dt(b, t, r, n, [...i, x], [...s, e], u);
1963
- m[x] = P.transformedValue, D(P.annotations) ? p[x] = P.annotations : J(P.annotations) && M(P.annotations, (L, j) => {
1964
- p[St(x) + "." + j] = L;
1962
+ const R = Nr(b, r, t, n, [...i, x], [...s, e], u);
1963
+ m[x] = R.transformedValue, D(R.annotations) ? p[x] = R.annotations : J(R.annotations) && M(R.annotations, (L, j) => {
1964
+ p[xr(x) + "." + j] = L;
1965
1965
  });
1966
1966
  });
1967
- const h = Te(p) ? {
1967
+ const h = Oe(p) ? {
1968
1968
  transformedValue: m,
1969
1969
  annotations: a ? [a.type] : void 0
1970
1970
  } : {
@@ -1973,86 +1973,86 @@ const Dt = (e, t, r, n, i = [], s = [], u = /* @__PURE__ */ new Map()) => {
1973
1973
  };
1974
1974
  return l || u.set(e, h), h;
1975
1975
  };
1976
- function $t(e) {
1976
+ function $r(e) {
1977
1977
  return Object.prototype.toString.call(e).slice(8, -1);
1978
1978
  }
1979
- function ft(e) {
1980
- return $t(e) === "Array";
1979
+ function fr(e) {
1980
+ return $r(e) === "Array";
1981
1981
  }
1982
- function Mn(e) {
1983
- if ($t(e) !== "Object")
1982
+ function Wn(e) {
1983
+ if ($r(e) !== "Object")
1984
1984
  return !1;
1985
- const t = Object.getPrototypeOf(e);
1986
- return !!t && t.constructor === Object && t === Object.prototype;
1985
+ const r = Object.getPrototypeOf(e);
1986
+ return !!r && r.constructor === Object && r === Object.prototype;
1987
1987
  }
1988
- function Wn(e, t, r, n, i) {
1989
- const s = {}.propertyIsEnumerable.call(n, t) ? "enumerable" : "nonenumerable";
1990
- s === "enumerable" && (e[t] = r), i && s === "nonenumerable" && Object.defineProperty(e, t, {
1991
- value: r,
1988
+ function Bn(e, r, t, n, i) {
1989
+ const s = {}.propertyIsEnumerable.call(n, r) ? "enumerable" : "nonenumerable";
1990
+ s === "enumerable" && (e[r] = t), i && s === "nonenumerable" && Object.defineProperty(e, r, {
1991
+ value: t,
1992
1992
  enumerable: !1,
1993
1993
  writable: !0,
1994
1994
  configurable: !0
1995
1995
  });
1996
1996
  }
1997
- function xe(e, t = {}) {
1998
- if (ft(e))
1999
- return e.map((i) => xe(i, t));
2000
- if (!Mn(e))
1997
+ function xe(e, r = {}) {
1998
+ if (fr(e))
1999
+ return e.map((i) => xe(i, r));
2000
+ if (!Wn(e))
2001
2001
  return e;
2002
- const r = Object.getOwnPropertyNames(e), n = Object.getOwnPropertySymbols(e);
2003
- return [...r, ...n].reduce((i, s) => {
2004
- if (ft(t.props) && !t.props.includes(s))
2002
+ const t = Object.getOwnPropertyNames(e), n = Object.getOwnPropertySymbols(e);
2003
+ return [...t, ...n].reduce((i, s) => {
2004
+ if (fr(r.props) && !r.props.includes(s))
2005
2005
  return i;
2006
- const u = e[s], l = xe(u, t);
2007
- return Wn(i, s, l, e, t.nonenumerable), i;
2006
+ const u = e[s], l = xe(u, r);
2007
+ return Bn(i, s, l, e, r.nonenumerable), i;
2008
2008
  }, {});
2009
2009
  }
2010
2010
  class w {
2011
2011
  /**
2012
2012
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
2013
2013
  */
2014
- constructor({ dedupe: t = !1 } = {}) {
2015
- this.classRegistry = new gn(), this.symbolRegistry = new Rt((r) => r.description ?? ""), this.customTransformerRegistry = new vn(), this.allowedErrorProps = [], this.dedupe = t;
2014
+ constructor({ dedupe: r = !1 } = {}) {
2015
+ this.classRegistry = new bn(), this.symbolRegistry = new Or((t) => t.description ?? ""), this.customTransformerRegistry = new En(), this.allowedErrorProps = [], this.dedupe = r;
2016
2016
  }
2017
- serialize(t) {
2018
- const r = /* @__PURE__ */ new Map(), n = Dt(t, r, this, this.dedupe), i = {
2017
+ serialize(r) {
2018
+ const t = /* @__PURE__ */ new Map(), n = Nr(r, t, this, this.dedupe), i = {
2019
2019
  json: n.transformedValue
2020
2020
  };
2021
2021
  n.annotations && (i.meta = {
2022
2022
  ...i.meta,
2023
2023
  values: n.annotations
2024
2024
  });
2025
- const s = zn(r, this.dedupe);
2025
+ const s = Mn(t, this.dedupe);
2026
2026
  return s && (i.meta = {
2027
2027
  ...i.meta,
2028
2028
  referentialEqualities: s
2029
2029
  }), i;
2030
2030
  }
2031
- deserialize(t) {
2032
- const { json: r, meta: n } = t;
2033
- let i = xe(r);
2034
- return n != null && n.values && (i = Un(i, n.values, this)), n != null && n.referentialEqualities && (i = Ln(i, n.referentialEqualities)), i;
2031
+ deserialize(r) {
2032
+ const { json: t, meta: n } = r;
2033
+ let i = xe(t);
2034
+ return n != null && n.values && (i = Ln(i, n.values, this)), n != null && n.referentialEqualities && (i = Vn(i, n.referentialEqualities)), i;
2035
2035
  }
2036
- stringify(t) {
2037
- return JSON.stringify(this.serialize(t));
2036
+ stringify(r) {
2037
+ return JSON.stringify(this.serialize(r));
2038
2038
  }
2039
- parse(t) {
2040
- return this.deserialize(JSON.parse(t));
2039
+ parse(r) {
2040
+ return this.deserialize(JSON.parse(r));
2041
2041
  }
2042
- registerClass(t, r) {
2043
- this.classRegistry.register(t, r);
2042
+ registerClass(r, t) {
2043
+ this.classRegistry.register(r, t);
2044
2044
  }
2045
- registerSymbol(t, r) {
2046
- this.symbolRegistry.register(t, r);
2045
+ registerSymbol(r, t) {
2046
+ this.symbolRegistry.register(r, t);
2047
2047
  }
2048
- registerCustom(t, r) {
2048
+ registerCustom(r, t) {
2049
2049
  this.customTransformerRegistry.register({
2050
- name: r,
2051
- ...t
2050
+ name: t,
2051
+ ...r
2052
2052
  });
2053
2053
  }
2054
- allowErrorProps(...t) {
2055
- this.allowedErrorProps.push(...t);
2054
+ allowErrorProps(...r) {
2055
+ this.allowedErrorProps.push(...r);
2056
2056
  }
2057
2057
  }
2058
2058
  w.defaultInstance = new w();
@@ -2072,29 +2072,29 @@ w.registerClass;
2072
2072
  w.registerCustom;
2073
2073
  w.registerSymbol;
2074
2074
  w.allowErrorProps;
2075
- const Bn = "dev-jwt-token-for-testing", Kn = async () => Bn, Nt = Er(null);
2076
- function Yn(e, t) {
2077
- const r = Kr({
2075
+ const Ur = Rt(null);
2076
+ function Kn(e, r) {
2077
+ const t = Yt({
2078
2078
  links: [
2079
- ln({
2079
+ fn({
2080
2080
  enabled: (n) => process.env.NODE_ENV === "development" && typeof window < "u" || n.direction === "down" && n.result instanceof Error
2081
2081
  }),
2082
- sn({
2082
+ an({
2083
2083
  url: `${e}/trpc`,
2084
2084
  headers: async () => ({
2085
- Authorization: `Bearer ${await t()}`
2085
+ Authorization: `Bearer ${await r()}`
2086
2086
  }),
2087
2087
  transformer: w
2088
2088
  })
2089
2089
  ]
2090
2090
  });
2091
2091
  return {
2092
- getProjectsForUser: async () => (await r.projectRouter.getAllProjects.query()).map((i) => ({
2092
+ getProjectsForUser: async () => (await t.projectRouter.getAllProjects.query()).map((i) => ({
2093
2093
  name: i.name,
2094
2094
  id: i.id
2095
2095
  })),
2096
2096
  addProjectForUser: async (n) => {
2097
- const i = await r.projectRouter.createProject.mutate({
2097
+ const i = await t.projectRouter.createProject.mutate({
2098
2098
  name: n
2099
2099
  });
2100
2100
  return {
@@ -2105,7 +2105,7 @@ function Yn(e, t) {
2105
2105
  addFilesToProject: async (n, i) => {
2106
2106
  const s = [];
2107
2107
  for (const u of i) {
2108
- const l = await r.fileRouter.createFile.mutate({
2108
+ const l = await t.fileRouter.createFile.mutate({
2109
2109
  file: {
2110
2110
  projectId: n,
2111
2111
  mimeType: _e.PDF,
@@ -2117,7 +2117,8 @@ function Yn(e, t) {
2117
2117
  // You might need to calculate or pass size
2118
2118
  metadata: null,
2119
2119
  isArtifact: !1,
2120
- summary: null
2120
+ summary: null,
2121
+ chunkingStatus: wr.NOT_CHUNKED
2121
2122
  }
2122
2123
  });
2123
2124
  s.push({
@@ -2129,7 +2130,7 @@ function Yn(e, t) {
2129
2130
  }
2130
2131
  return s;
2131
2132
  },
2132
- getFilesForProject: async (n) => (await r.fileRouter.getFilesByProject.query({
2133
+ getFilesForProject: async (n) => (await t.fileRouter.getFilesByProject.query({
2133
2134
  projectId: n
2134
2135
  })).map((s) => ({
2135
2136
  blobUrl: s.path,
@@ -2139,47 +2140,47 @@ function Yn(e, t) {
2139
2140
  }))
2140
2141
  };
2141
2142
  }
2142
- function Zn({
2143
+ function Jn({
2143
2144
  children: e,
2144
- host: t = "http://localhost",
2145
- port: r = 5174,
2146
- getToken: n = Kn
2145
+ host: r = "http://localhost",
2146
+ port: t = 5174,
2147
+ getToken: n
2147
2148
  }) {
2148
2149
  const [i, s] = Ee(null);
2149
- return Pr(() => {
2150
- const u = `${t}:${r}`, l = Yn(u, n);
2150
+ return Pt(() => {
2151
+ const u = `${r}:${t}`, l = Kn(u, n);
2151
2152
  s(l);
2152
- }, [t, r, n]), /* @__PURE__ */ Re.jsx(Nt.Provider, { value: { host: t, port: r, client: i }, children: e });
2153
+ }, [r, t, n]), /* @__PURE__ */ Pe.jsx(Ur.Provider, { value: { host: r, port: t, client: i }, children: e });
2153
2154
  }
2154
- function Ut() {
2155
- const e = Rr(Nt);
2155
+ function Lr() {
2156
+ const e = Ot(Ur);
2156
2157
  if (!e)
2157
2158
  throw new Error("useFolioContext must be used within a FolioProvider");
2158
2159
  return e;
2159
2160
  }
2160
- const { useEffect: Hn, useRef: Gn, useState: Xn } = vr;
2161
- function Qn({
2161
+ const { useEffect: Yn, useRef: Hn, useState: Gn } = Et;
2162
+ function Zn({
2162
2163
  width: e = "100%",
2163
- height: t = "100vh",
2164
- allow: r = "camera; microphone; clipboard-read; clipboard-write; fullscreen",
2164
+ height: r = "100vh",
2165
+ allow: t = "camera; microphone; clipboard-read; clipboard-write; fullscreen",
2165
2166
  style: n,
2166
2167
  className: i = "",
2167
2168
  iframeProps: s = {}
2168
2169
  }) {
2169
- const { host: u, port: l } = Ut(), a = Gn(null), [f, m] = Xn();
2170
- return Hn(() => {
2170
+ const { host: u, port: l } = Lr(), a = Hn(null), [f, m] = Gn();
2171
+ return Yn(() => {
2171
2172
  m(`${u}:${l}`);
2172
- }, [u, l]), f ? /* @__PURE__ */ Re.jsx(
2173
+ }, [u, l]), f ? /* @__PURE__ */ Pe.jsx(
2173
2174
  "div",
2174
2175
  {
2175
2176
  className: `folio-embed-container ${i}`,
2176
2177
  style: {
2177
2178
  width: e,
2178
- height: t,
2179
+ height: r,
2179
2180
  overflow: "hidden",
2180
2181
  ...n
2181
2182
  },
2182
- children: /* @__PURE__ */ Re.jsx(
2183
+ children: /* @__PURE__ */ Pe.jsx(
2183
2184
  "iframe",
2184
2185
  {
2185
2186
  ref: a,
@@ -2192,7 +2193,7 @@ function Qn({
2192
2193
  height: "100%",
2193
2194
  overflow: "auto"
2194
2195
  },
2195
- allow: r,
2196
+ allow: t,
2196
2197
  allowFullScreen: !0,
2197
2198
  ...s
2198
2199
  }
@@ -2200,63 +2201,63 @@ function Qn({
2200
2201
  }
2201
2202
  ) : null;
2202
2203
  }
2203
- function eo() {
2204
- const { client: e } = Ut(), [t, r] = Ee(!1), [n, i] = Ee(null);
2204
+ function Qn() {
2205
+ const { client: e } = Lr(), [r, t] = Ee(!1), [n, i] = Ee(null);
2205
2206
  return {
2206
- isLoading: t,
2207
+ isLoading: r,
2207
2208
  error: n,
2208
2209
  getProjectsForUser: async () => {
2209
2210
  for (; !e; )
2210
2211
  await new Promise((f) => setTimeout(f, 100));
2211
- r(!0), i(null);
2212
+ t(!0), i(null);
2212
2213
  try {
2213
2214
  return await e.getProjectsForUser();
2214
2215
  } catch (f) {
2215
2216
  return i(f instanceof Error ? f : new Error(String(f))), [];
2216
2217
  } finally {
2217
- r(!1);
2218
+ t(!1);
2218
2219
  }
2219
2220
  },
2220
2221
  addProjectForUser: async (f) => {
2221
2222
  for (; !e; )
2222
2223
  await new Promise((m) => setTimeout(m, 100));
2223
- r(!0), i(null);
2224
+ t(!0), i(null);
2224
2225
  try {
2225
2226
  return await e.addProjectForUser(f);
2226
2227
  } catch (m) {
2227
2228
  return i(m instanceof Error ? m : new Error(String(m))), null;
2228
2229
  } finally {
2229
- r(!1);
2230
+ t(!1);
2230
2231
  }
2231
2232
  },
2232
2233
  addFilesToProject: async (f, m) => {
2233
2234
  for (; !e; )
2234
2235
  await new Promise((p) => setTimeout(p, 100));
2235
- r(!0), i(null);
2236
+ t(!0), i(null);
2236
2237
  try {
2237
2238
  return await e.addFilesToProject(f, m);
2238
2239
  } catch (p) {
2239
2240
  return i(p instanceof Error ? p : new Error(String(p))), null;
2240
2241
  } finally {
2241
- r(!1);
2242
+ t(!1);
2242
2243
  }
2243
2244
  },
2244
2245
  getFilesForProject: async (f) => {
2245
2246
  for (; !e; )
2246
2247
  await new Promise((m) => setTimeout(m, 100));
2247
- r(!0), i(null);
2248
+ t(!0), i(null);
2248
2249
  try {
2249
2250
  return await e.getFilesForProject(f);
2250
2251
  } catch (m) {
2251
2252
  return i(m instanceof Error ? m : new Error(String(m))), [];
2252
2253
  } finally {
2253
- r(!1);
2254
+ t(!1);
2254
2255
  }
2255
2256
  }
2256
2257
  };
2257
2258
  }
2258
2259
  export {
2259
- Qn as FolioEmbed,
2260
- Zn as FolioProvider,
2261
- eo as useFolio
2260
+ Zn as FolioEmbed,
2261
+ Jn as FolioProvider,
2262
+ Qn as useFolio
2262
2263
  };